@telia-ace/alliance-internal-node-utilities 1.1.0-next.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
- import{b as wi,c as ki}from"./chunk-RKK7CWA6.js";import{a as ie,b as Vt,e as pe}from"./chunk-26VIM55J.js";import"./chunk-JG7V63GM.js";var T;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function i(s){throw new Error}e.assertNever=i,e.arrayToEnum=s=>{let a={};for(let n of s)a[n]=n;return a},e.getValidEnumValues=s=>{let a=e.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),n={};for(let u of a)n[u]=s[u];return e.objectValues(n)},e.objectValues=s=>e.objectKeys(s).map(function(a){return s[a]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let a=[];for(let n in s)Object.prototype.hasOwnProperty.call(s,n)&&a.push(n);return a},e.find=(s,a)=>{for(let n of s)if(a(n))return n},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,a=" | "){return s.map(n=>typeof n=="string"?`'${n}'`:n).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(T||(T={}));var Mt;(function(e){e.mergeShapes=(t,i)=>({...t,...i})})(Mt||(Mt={}));var d=T.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),de=e=>{switch(typeof e){case"undefined":return d.undefined;case"string":return d.string;case"number":return isNaN(e)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"symbol":return d.symbol;case"object":return Array.isArray(e)?d.array:e===null?d.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?d.promise:typeof Map<"u"&&e instanceof Map?d.map:typeof Set<"u"&&e instanceof Set?d.set:typeof Date<"u"&&e instanceof Date?d.date:d.object;default:return d.unknown}},f=T.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),cs=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Q=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(s){return s.message},i={_errors:[]},r=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(r);else if(a.code==="invalid_return_type")r(a.returnTypeError);else if(a.code==="invalid_arguments")r(a.argumentsError);else if(a.path.length===0)i._errors.push(t(a));else{let n=i,u=0;for(;u<a.path.length;){let c=a.path[u];u===a.path.length-1?(n[c]=n[c]||{_errors:[]},n[c]._errors.push(t(a))):n[c]=n[c]||{_errors:[]},n=n[c],u++}}};return r(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,T.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},i=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):i.push(e(r));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}};Q.create=e=>new Q(e);var Me=(e,t)=>{let i;switch(e.code){case f.invalid_type:e.received===d.undefined?i="Required":i=`Expected ${e.expected}, received ${e.received}`;break;case f.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(e.expected,T.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:i=`Unrecognized key(s) in object: ${T.joinValues(e.keys,", ")}`;break;case f.invalid_union:i="Invalid input";break;case f.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${T.joinValues(e.options)}`;break;case f.invalid_enum_value:i=`Invalid enum value. Expected ${T.joinValues(e.options)}, received '${e.received}'`;break;case f.invalid_arguments:i="Invalid function arguments";break;case f.invalid_return_type:i="Invalid function return type";break;case f.invalid_date:i="Invalid date";break;case f.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(i=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?i=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?i=`Invalid input: must end with "${e.validation.endsWith}"`:T.assertNever(e.validation):e.validation!=="regex"?i=`Invalid ${e.validation}`:i="Invalid";break;case f.too_small:e.type==="array"?i=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?i=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?i=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?i=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:i="Invalid input";break;case f.too_big:e.type==="array"?i=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?i=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?i=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?i=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?i=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:i="Invalid input";break;case f.custom:i="Invalid input";break;case f.invalid_intersection_types:i="Intersection results could not be merged";break;case f.not_multiple_of:i=`Number must be a multiple of ${e.multipleOf}`;break;case f.not_finite:i="Number must be finite";break;default:i=t.defaultError,T.assertNever(e)}return{message:i}},Ci=Me;function ls(e){Ci=e}function ct(){return Ci}var lt=e=>{let{data:t,path:i,errorMaps:r,issueData:s}=e,a=[...i,...s.path||[]],n={...s,path:a},u="",c=r.filter(l=>!!l).slice().reverse();for(let l of c)u=l(n,{data:t,defaultError:u}).message;return{...s,path:a,message:s.message||u}},hs=[];function m(e,t){let i=lt({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,ct(),Me].filter(r=>!!r)});e.common.issues.push(i)}var U=class Ai{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,i){let r=[];for(let s of i){if(s.status==="aborted")return w;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,i){let r=[];for(let s of i)r.push({key:await s.key,value:await s.value});return Ai.mergeObjectSync(t,r)}static mergeObjectSync(t,i){let r={};for(let s of i){let{key:a,value:n}=s;if(a.status==="aborted"||n.status==="aborted")return w;a.status==="dirty"&&t.dirty(),n.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof n.value<"u"||s.alwaysSet)&&(r[a.value]=n.value)}return{status:t.value,value:r}}},w=Object.freeze({status:"aborted"}),Pi=e=>({status:"dirty",value:e}),D=e=>({status:"valid",value:e}),jt=e=>e.status==="aborted",Ft=e=>e.status==="dirty",je=e=>e.status==="valid",ht=e=>typeof Promise<"u"&&e instanceof Promise,x;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(x||(x={}));var re=class{constructor(e,t,i,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Ei=(e,t)=>{if(je(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let i=new Q(e.common.issues);return this._error=i,this._error}}};function k(e){if(!e)return{};let{errorMap:t,invalid_type_error:i,required_error:r,description:s}=e;if(t&&(i||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(a,n)=>a.code!=="invalid_type"?{message:n.defaultError}:typeof n.data>"u"?{message:r??n.defaultError}:{message:i??n.defaultError},description:s}}var E=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return de(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:de(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new U,ctx:{common:e.parent.common,data:e.data,parsedType:de(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ht(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var i;let r={common:{issues:[],async:(i=t?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:de(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Ei(r,s)}async parseAsync(e,t){let i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){let i={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:de(e)},r=this._parse({data:e,path:i.path,parent:i}),s=await(ht(r)?r:Promise.resolve(r));return Ei(i,s)}refine(e,t){let i=r=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(r):t;return this._refinement((r,s)=>{let a=e(r),n=()=>s.addIssue({code:f.custom,...i(r)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(n(),!1)):a?!0:(n(),!1)})}refinement(e,t){return this._refinement((i,r)=>e(i)?!0:(r.addIssue(typeof t=="function"?t(i,r):t),!1))}_refinement(e){return new J({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ne.create(this,this._def)}nullable(){return Ee.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ke.create(this,this._def)}promise(){return Pe.create(this,this._def)}or(e){return qe.create([this,e],this._def)}and(e){return ze.create(this,e,this._def)}transform(e){return new J({...k(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new Xe({...k(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new Di({typeName:_.ZodBranded,type:this,...k(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new gt({...k(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return zt.create(this,e)}readonly(){return vt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},fs=/^c[^\s-]{8,}$/i,ps=/^[a-z][a-z0-9]*$/,ds=/^[0-9A-HJKMNP-TV-Z]{26}$/,ms=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gs=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ys="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Dt,vs=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,xs=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,_s=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function bs(e,t){return!!((t==="v4"||!t)&&vs.test(e)||(t==="v6"||!t)&&xs.test(e))}var Ce=class De extends E{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==d.string){let s=this._getOrReturnCtx(t);return m(s,{code:f.invalid_type,expected:d.string,received:s.parsedType}),w}let i=new U,r;for(let s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(r=this._getOrReturnCtx(t,r),m(r,{code:f.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")t.data.length>s.value&&(r=this._getOrReturnCtx(t,r),m(r,{code:f.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){let a=t.data.length>s.value,n=t.data.length<s.value;(a||n)&&(r=this._getOrReturnCtx(t,r),a?m(r,{code:f.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):n&&m(r,{code:f.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")gs.test(t.data)||(r=this._getOrReturnCtx(t,r),m(r,{validation:"email",code:f.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")Dt||(Dt=new RegExp(ys,"u")),Dt.test(t.data)||(r=this._getOrReturnCtx(t,r),m(r,{validation:"emoji",code:f.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")ms.test(t.data)||(r=this._getOrReturnCtx(t,r),m(r,{validation:"uuid",code:f.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")fs.test(t.data)||(r=this._getOrReturnCtx(t,r),m(r,{validation:"cuid",code:f.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")ps.test(t.data)||(r=this._getOrReturnCtx(t,r),m(r,{validation:"cuid2",code:f.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")ds.test(t.data)||(r=this._getOrReturnCtx(t,r),m(r,{validation:"ulid",code:f.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),m(r,{validation:"url",code:f.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),m(r,{validation:"regex",code:f.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(r=this._getOrReturnCtx(t,r),m(r,{code:f.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(r=this._getOrReturnCtx(t,r),m(r,{code:f.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(r=this._getOrReturnCtx(t,r),m(r,{code:f.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?_s(s).test(t.data)||(r=this._getOrReturnCtx(t,r),m(r,{code:f.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="ip"?bs(t.data,s.version)||(r=this._getOrReturnCtx(t,r),m(r,{validation:"ip",code:f.invalid_string,message:s.message}),i.dirty()):T.assertNever(s);return{status:i.value,value:t.data}}_regex(t,i,r){return this.refinement(s=>t.test(s),{validation:i,code:f.invalid_string,...x.errToObj(r)})}_addCheck(t){return new De({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...x.errToObj(t)})}url(t){return this._addCheck({kind:"url",...x.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...x.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...x.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...x.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...x.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...x.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...x.errToObj(t)})}datetime(t){var i;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(i=t?.offset)!==null&&i!==void 0?i:!1,...x.errToObj(t?.message)})}regex(t,i){return this._addCheck({kind:"regex",regex:t,...x.errToObj(i)})}includes(t,i){return this._addCheck({kind:"includes",value:t,position:i?.position,...x.errToObj(i?.message)})}startsWith(t,i){return this._addCheck({kind:"startsWith",value:t,...x.errToObj(i)})}endsWith(t,i){return this._addCheck({kind:"endsWith",value:t,...x.errToObj(i)})}min(t,i){return this._addCheck({kind:"min",value:t,...x.errToObj(i)})}max(t,i){return this._addCheck({kind:"max",value:t,...x.errToObj(i)})}length(t,i){return this._addCheck({kind:"length",value:t,...x.errToObj(i)})}nonempty(t){return this.min(1,x.errToObj(t))}trim(){return new De({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new De({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new De({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let i of this._def.checks)i.kind==="min"&&(t===null||i.value>t)&&(t=i.value);return t}get maxLength(){let t=null;for(let i of this._def.checks)i.kind==="max"&&(t===null||i.value<t)&&(t=i.value);return t}};Ce.create=e=>{var t;return new Ce({checks:[],typeName:_.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...k(e)})};function ws(e,t){let i=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=i>r?i:r,a=parseInt(e.toFixed(s).replace(".","")),n=parseInt(t.toFixed(s).replace(".",""));return a%n/Math.pow(10,s)}var Fe=class Bt extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==d.number){let s=this._getOrReturnCtx(t);return m(s,{code:f.invalid_type,expected:d.number,received:s.parsedType}),w}let i,r=new U;for(let s of this._def.checks)s.kind==="int"?T.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),m(i,{code:f.invalid_type,expected:"integer",received:"float",message:s.message}),r.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(i=this._getOrReturnCtx(t,i),m(i,{code:f.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(i=this._getOrReturnCtx(t,i),m(i,{code:f.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):s.kind==="multipleOf"?ws(t.data,s.value)!==0&&(i=this._getOrReturnCtx(t,i),m(i,{code:f.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),m(i,{code:f.not_finite,message:s.message}),r.dirty()):T.assertNever(s);return{status:r.value,value:t.data}}gte(t,i){return this.setLimit("min",t,!0,x.toString(i))}gt(t,i){return this.setLimit("min",t,!1,x.toString(i))}lte(t,i){return this.setLimit("max",t,!0,x.toString(i))}lt(t,i){return this.setLimit("max",t,!1,x.toString(i))}setLimit(t,i,r,s){return new Bt({...this._def,checks:[...this._def.checks,{kind:t,value:i,inclusive:r,message:x.toString(s)}]})}_addCheck(t){return new Bt({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:x.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:x.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:x.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:x.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:x.toString(t)})}multipleOf(t,i){return this._addCheck({kind:"multipleOf",value:t,message:x.toString(i)})}finite(t){return this._addCheck({kind:"finite",message:x.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(t)})}get minValue(){let t=null;for(let i of this._def.checks)i.kind==="min"&&(t===null||i.value>t)&&(t=i.value);return t}get maxValue(){let t=null;for(let i of this._def.checks)i.kind==="max"&&(t===null||i.value<t)&&(t=i.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&T.isInteger(t.value))}get isFinite(){let t=null,i=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(i===null||r.value>i)&&(i=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(i)&&Number.isFinite(t)}};Fe.create=e=>new Fe({checks:[],typeName:_.ZodNumber,coerce:e?.coerce||!1,...k(e)});var Be=class Ut extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==d.bigint){let s=this._getOrReturnCtx(t);return m(s,{code:f.invalid_type,expected:d.bigint,received:s.parsedType}),w}let i,r=new U;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(i=this._getOrReturnCtx(t,i),m(i,{code:f.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(i=this._getOrReturnCtx(t,i),m(i,{code:f.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),m(i,{code:f.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):T.assertNever(s);return{status:r.value,value:t.data}}gte(t,i){return this.setLimit("min",t,!0,x.toString(i))}gt(t,i){return this.setLimit("min",t,!1,x.toString(i))}lte(t,i){return this.setLimit("max",t,!0,x.toString(i))}lt(t,i){return this.setLimit("max",t,!1,x.toString(i))}setLimit(t,i,r,s){return new Ut({...this._def,checks:[...this._def.checks,{kind:t,value:i,inclusive:r,message:x.toString(s)}]})}_addCheck(t){return new Ut({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:x.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:x.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:x.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:x.toString(t)})}multipleOf(t,i){return this._addCheck({kind:"multipleOf",value:t,message:x.toString(i)})}get minValue(){let t=null;for(let i of this._def.checks)i.kind==="min"&&(t===null||i.value>t)&&(t=i.value);return t}get maxValue(){let t=null;for(let i of this._def.checks)i.kind==="max"&&(t===null||i.value<t)&&(t=i.value);return t}};Be.create=e=>{var t;return new Be({checks:[],typeName:_.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...k(e)})};var Ue=class extends E{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==d.boolean){let t=this._getOrReturnCtx(e);return m(t,{code:f.invalid_type,expected:d.boolean,received:t.parsedType}),w}return D(e.data)}};Ue.create=e=>new Ue({typeName:_.ZodBoolean,coerce:e?.coerce||!1,...k(e)});var $e=class Ii extends E{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==d.date){let s=this._getOrReturnCtx(t);return m(s,{code:f.invalid_type,expected:d.date,received:s.parsedType}),w}if(isNaN(t.data.getTime())){let s=this._getOrReturnCtx(t);return m(s,{code:f.invalid_date}),w}let i=new U,r;for(let s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(r=this._getOrReturnCtx(t,r),m(r,{code:f.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(r=this._getOrReturnCtx(t,r),m(r,{code:f.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):T.assertNever(s);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ii({...this._def,checks:[...this._def.checks,t]})}min(t,i){return this._addCheck({kind:"min",value:t.getTime(),message:x.toString(i)})}max(t,i){return this._addCheck({kind:"max",value:t.getTime(),message:x.toString(i)})}get minDate(){let t=null;for(let i of this._def.checks)i.kind==="min"&&(t===null||i.value>t)&&(t=i.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let i of this._def.checks)i.kind==="max"&&(t===null||i.value<t)&&(t=i.value);return t!=null?new Date(t):null}};$e.create=e=>new $e({checks:[],coerce:e?.coerce||!1,typeName:_.ZodDate,...k(e)});var ft=class extends E{_parse(e){if(this._getType(e)!==d.symbol){let t=this._getOrReturnCtx(e);return m(t,{code:f.invalid_type,expected:d.symbol,received:t.parsedType}),w}return D(e.data)}};ft.create=e=>new ft({typeName:_.ZodSymbol,...k(e)});var Ze=class extends E{_parse(e){if(this._getType(e)!==d.undefined){let t=this._getOrReturnCtx(e);return m(t,{code:f.invalid_type,expected:d.undefined,received:t.parsedType}),w}return D(e.data)}};Ze.create=e=>new Ze({typeName:_.ZodUndefined,...k(e)});var We=class extends E{_parse(e){if(this._getType(e)!==d.null){let t=this._getOrReturnCtx(e);return m(t,{code:f.invalid_type,expected:d.null,received:t.parsedType}),w}return D(e.data)}};We.create=e=>new We({typeName:_.ZodNull,...k(e)});var Ae=class extends E{constructor(){super(...arguments),this._any=!0}_parse(e){return D(e.data)}};Ae.create=e=>new Ae({typeName:_.ZodAny,...k(e)});var we=class extends E{constructor(){super(...arguments),this._unknown=!0}_parse(e){return D(e.data)}};we.create=e=>new we({typeName:_.ZodUnknown,...k(e)});var oe=class extends E{_parse(e){let t=this._getOrReturnCtx(e);return m(t,{code:f.invalid_type,expected:d.never,received:t.parsedType}),w}};oe.create=e=>new oe({typeName:_.ZodNever,...k(e)});var pt=class extends E{_parse(e){if(this._getType(e)!==d.undefined){let t=this._getOrReturnCtx(e);return m(t,{code:f.invalid_type,expected:d.void,received:t.parsedType}),w}return D(e.data)}};pt.create=e=>new pt({typeName:_.ZodVoid,...k(e)});var ke=class nt extends E{_parse(t){let{ctx:i,status:r}=this._processInputParams(t),s=this._def;if(i.parsedType!==d.array)return m(i,{code:f.invalid_type,expected:d.array,received:i.parsedType}),w;if(s.exactLength!==null){let n=i.data.length>s.exactLength.value,u=i.data.length<s.exactLength.value;(n||u)&&(m(i,{code:n?f.too_big:f.too_small,minimum:u?s.exactLength.value:void 0,maximum:n?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&i.data.length<s.minLength.value&&(m(i,{code:f.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&i.data.length>s.maxLength.value&&(m(i,{code:f.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),i.common.async)return Promise.all([...i.data].map((n,u)=>s.type._parseAsync(new re(i,n,i.path,u)))).then(n=>U.mergeArray(r,n));let a=[...i.data].map((n,u)=>s.type._parseSync(new re(i,n,i.path,u)));return U.mergeArray(r,a)}get element(){return this._def.type}min(t,i){return new nt({...this._def,minLength:{value:t,message:x.toString(i)}})}max(t,i){return new nt({...this._def,maxLength:{value:t,message:x.toString(i)}})}length(t,i){return new nt({...this._def,exactLength:{value:t,message:x.toString(i)}})}nonempty(t){return this.min(1,t)}};ke.create=(e,t)=>new ke({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...k(t)});function Se(e){if(e instanceof Z){let t={};for(let i in e.shape){let r=e.shape[i];t[i]=ne.create(Se(r))}return new Z({...e._def,shape:()=>t})}else return e instanceof ke?new ke({...e._def,type:Se(e.element)}):e instanceof ne?ne.create(Se(e.unwrap())):e instanceof Ee?Ee.create(Se(e.unwrap())):e instanceof me?me.create(e.items.map(t=>Se(t))):e}var Z=class Y extends E{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),i=T.objectKeys(t);return this._cached={shape:t,keys:i}}_parse(t){if(this._getType(t)!==d.object){let c=this._getOrReturnCtx(t);return m(c,{code:f.invalid_type,expected:d.object,received:c.parsedType}),w}let{status:i,ctx:r}=this._processInputParams(t),{shape:s,keys:a}=this._getCached(),n=[];if(!(this._def.catchall instanceof oe&&this._def.unknownKeys==="strip"))for(let c in r.data)a.includes(c)||n.push(c);let u=[];for(let c of a){let l=s[c],h=r.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new re(r,h,r.path,c)),alwaysSet:c in r.data})}if(this._def.catchall instanceof oe){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of n)u.push({key:{status:"valid",value:l},value:{status:"valid",value:r.data[l]}});else if(c==="strict")n.length>0&&(m(r,{code:f.unrecognized_keys,keys:n}),i.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of n){let h=r.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new re(r,h,r.path,l)),alwaysSet:l in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let h=await l.key;c.push({key:h,value:await l.value,alwaysSet:l.alwaysSet})}return c}).then(c=>U.mergeObjectSync(i,c)):U.mergeObjectSync(i,u)}get shape(){return this._def.shape()}strict(t){return x.errToObj,new Y({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(i,r)=>{var s,a,n,u;let c=(n=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,i,r).message)!==null&&n!==void 0?n:r.defaultError;return i.code==="unrecognized_keys"?{message:(u=x.errToObj(t).message)!==null&&u!==void 0?u:c}:{message:c}}}:{}})}strip(){return new Y({...this._def,unknownKeys:"strip"})}passthrough(){return new Y({...this._def,unknownKeys:"passthrough"})}extend(t){return new Y({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Y({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:_.ZodObject})}setKey(t,i){return this.augment({[t]:i})}catchall(t){return new Y({...this._def,catchall:t})}pick(t){let i={};return T.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(i[r]=this.shape[r])}),new Y({...this._def,shape:()=>i})}omit(t){let i={};return T.objectKeys(this.shape).forEach(r=>{t[r]||(i[r]=this.shape[r])}),new Y({...this._def,shape:()=>i})}deepPartial(){return Se(this)}partial(t){let i={};return T.objectKeys(this.shape).forEach(r=>{let s=this.shape[r];t&&!t[r]?i[r]=s:i[r]=s.optional()}),new Y({...this._def,shape:()=>i})}required(t){let i={};return T.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])i[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof ne;)s=s._def.innerType;i[r]=s}}),new Y({...this._def,shape:()=>i})}keyof(){return Vi(T.objectKeys(this.shape))}};Z.create=(e,t)=>new Z({shape:()=>e,unknownKeys:"strip",catchall:oe.create(),typeName:_.ZodObject,...k(t)});Z.strictCreate=(e,t)=>new Z({shape:()=>e,unknownKeys:"strict",catchall:oe.create(),typeName:_.ZodObject,...k(t)});Z.lazycreate=(e,t)=>new Z({shape:e,unknownKeys:"strip",catchall:oe.create(),typeName:_.ZodObject,...k(t)});var qe=class extends E{_parse(e){let{ctx:t}=this._processInputParams(e),i=this._def.options;function r(s){for(let n of s)if(n.result.status==="valid")return n.result;for(let n of s)if(n.result.status==="dirty")return t.common.issues.push(...n.ctx.common.issues),n.result;let a=s.map(n=>new Q(n.ctx.common.issues));return m(t,{code:f.invalid_union,unionErrors:a}),w}if(t.common.async)return Promise.all(i.map(async s=>{let a={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(r);{let s,a=[];for(let u of i){let c={...t,common:{...t.common,issues:[]},parent:null},l=u._parseSync({data:t.data,path:t.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;let n=a.map(u=>new Q(u));return m(t,{code:f.invalid_union,unionErrors:n}),w}}get options(){return this._def.options}};qe.create=(e,t)=>new qe({options:e,typeName:_.ZodUnion,...k(t)});var ot=e=>e instanceof Ge?ot(e.schema):e instanceof J?ot(e.innerType()):e instanceof He?[e.value]:e instanceof Ye?e.options:e instanceof Ke?Object.keys(e.enum):e instanceof Xe?ot(e._def.innerType):e instanceof Ze?[void 0]:e instanceof We?[null]:null,Ti=class Ni extends E{_parse(t){let{ctx:i}=this._processInputParams(t);if(i.parsedType!==d.object)return m(i,{code:f.invalid_type,expected:d.object,received:i.parsedType}),w;let r=this.discriminator,s=i.data[r],a=this.optionsMap.get(s);return a?i.common.async?a._parseAsync({data:i.data,path:i.path,parent:i}):a._parseSync({data:i.data,path:i.path,parent:i}):(m(i,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),w)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,i,r){let s=new Map;for(let a of i){let n=ot(a.shape[t]);if(!n)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let u of n){if(s.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);s.set(u,a)}}return new Ni({typeName:_.ZodDiscriminatedUnion,discriminator:t,options:i,optionsMap:s,...k(r)})}};function $t(e,t){let i=de(e),r=de(t);if(e===t)return{valid:!0,data:e};if(i===d.object&&r===d.object){let s=T.objectKeys(t),a=T.objectKeys(e).filter(u=>s.indexOf(u)!==-1),n={...e,...t};for(let u of a){let c=$t(e[u],t[u]);if(!c.valid)return{valid:!1};n[u]=c.data}return{valid:!0,data:n}}else if(i===d.array&&r===d.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let a=0;a<e.length;a++){let n=e[a],u=t[a],c=$t(n,u);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return i===d.date&&r===d.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var ze=class extends E{_parse(e){let{status:t,ctx:i}=this._processInputParams(e),r=(s,a)=>{if(jt(s)||jt(a))return w;let n=$t(s.value,a.value);return n.valid?((Ft(s)||Ft(a))&&t.dirty(),{status:t.value,value:n.data}):(m(i,{code:f.invalid_intersection_types}),w)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,a])=>r(s,a)):r(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};ze.create=(e,t,i)=>new ze({left:e,right:t,typeName:_.ZodIntersection,...k(i)});var me=class Ri extends E{_parse(t){let{status:i,ctx:r}=this._processInputParams(t);if(r.parsedType!==d.array)return m(r,{code:f.invalid_type,expected:d.array,received:r.parsedType}),w;if(r.data.length<this._def.items.length)return m(r,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),w;!this._def.rest&&r.data.length>this._def.items.length&&(m(r,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());let s=[...r.data].map((a,n)=>{let u=this._def.items[n]||this._def.rest;return u?u._parse(new re(r,a,r.path,n)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>U.mergeArray(i,a)):U.mergeArray(i,s)}get items(){return this._def.items}rest(t){return new Ri({...this._def,rest:t})}};me.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new me({items:e,typeName:_.ZodTuple,rest:null,...k(t)})};var Oi=class Zt extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:i,ctx:r}=this._processInputParams(t);if(r.parsedType!==d.object)return m(r,{code:f.invalid_type,expected:d.object,received:r.parsedType}),w;let s=[],a=this._def.keyType,n=this._def.valueType;for(let u in r.data)s.push({key:a._parse(new re(r,u,r.path,u)),value:n._parse(new re(r,r.data[u],r.path,u))});return r.common.async?U.mergeObjectAsync(i,s):U.mergeObjectSync(i,s)}get element(){return this._def.valueType}static create(t,i,r){return i instanceof E?new Zt({keyType:t,valueType:i,typeName:_.ZodRecord,...k(r)}):new Zt({keyType:Ce.create(),valueType:t,typeName:_.ZodRecord,...k(i)})}},dt=class extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==d.map)return m(i,{code:f.invalid_type,expected:d.map,received:i.parsedType}),w;let r=this._def.keyType,s=this._def.valueType,a=[...i.data.entries()].map(([n,u],c)=>({key:r._parse(new re(i,n,i.path,[c,"key"])),value:s._parse(new re(i,u,i.path,[c,"value"]))}));if(i.common.async){let n=new Map;return Promise.resolve().then(async()=>{for(let u of a){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return w;(c.status==="dirty"||l.status==="dirty")&&t.dirty(),n.set(c.value,l.value)}return{status:t.value,value:n}})}else{let n=new Map;for(let u of a){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return w;(c.status==="dirty"||l.status==="dirty")&&t.dirty(),n.set(c.value,l.value)}return{status:t.value,value:n}}}};dt.create=(e,t,i)=>new dt({valueType:t,keyType:e,typeName:_.ZodMap,...k(i)});var mt=class Wt extends E{_parse(t){let{status:i,ctx:r}=this._processInputParams(t);if(r.parsedType!==d.set)return m(r,{code:f.invalid_type,expected:d.set,received:r.parsedType}),w;let s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(m(r,{code:f.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),i.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(m(r,{code:f.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),i.dirty());let a=this._def.valueType;function n(c){let l=new Set;for(let h of c){if(h.status==="aborted")return w;h.status==="dirty"&&i.dirty(),l.add(h.value)}return{status:i.value,value:l}}let u=[...r.data.values()].map((c,l)=>a._parse(new re(r,c,r.path,l)));return r.common.async?Promise.all(u).then(c=>n(c)):n(u)}min(t,i){return new Wt({...this._def,minSize:{value:t,message:x.toString(i)}})}max(t,i){return new Wt({...this._def,maxSize:{value:t,message:x.toString(i)}})}size(t,i){return this.min(t,i).max(t,i)}nonempty(t){return this.min(1,t)}};mt.create=(e,t)=>new mt({valueType:e,minSize:null,maxSize:null,typeName:_.ZodSet,...k(t)});var Li=class ut extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:i}=this._processInputParams(t);if(i.parsedType!==d.function)return m(i,{code:f.invalid_type,expected:d.function,received:i.parsedType}),w;function r(u,c){return lt({data:u,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,ct(),Me].filter(l=>!!l),issueData:{code:f.invalid_arguments,argumentsError:c}})}function s(u,c){return lt({data:u,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,ct(),Me].filter(l=>!!l),issueData:{code:f.invalid_return_type,returnTypeError:c}})}let a={errorMap:i.common.contextualErrorMap},n=i.data;if(this._def.returns instanceof Pe){let u=this;return D(async function(...c){let l=new Q([]),h=await u._def.args.parseAsync(c,a).catch(S=>{throw l.addIssue(r(c,S)),l}),p=await Reflect.apply(n,this,h);return await u._def.returns._def.type.parseAsync(p,a).catch(S=>{throw l.addIssue(s(p,S)),l})})}else{let u=this;return D(function(...c){let l=u._def.args.safeParse(c,a);if(!l.success)throw new Q([r(c,l.error)]);let h=Reflect.apply(n,this,l.data),p=u._def.returns.safeParse(h,a);if(!p.success)throw new Q([s(h,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ut({...this._def,args:me.create(t).rest(we.create())})}returns(t){return new ut({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,i,r){return new ut({args:t||me.create([]).rest(we.create()),returns:i||we.create(),typeName:_.ZodFunction,...k(r)})}},Ge=class extends E{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Ge.create=(e,t)=>new Ge({getter:e,typeName:_.ZodLazy,...k(t)});var He=class extends E{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return m(t,{received:t.data,code:f.invalid_literal,expected:this._def.value}),w}return{status:"valid",value:e.data}}get value(){return this._def.value}};He.create=(e,t)=>new He({value:e,typeName:_.ZodLiteral,...k(t)});function Vi(e,t){return new Ye({values:e,typeName:_.ZodEnum,...k(t)})}var Ye=class qt extends E{_parse(t){if(typeof t.data!="string"){let i=this._getOrReturnCtx(t),r=this._def.values;return m(i,{expected:T.joinValues(r),received:i.parsedType,code:f.invalid_type}),w}if(this._def.values.indexOf(t.data)===-1){let i=this._getOrReturnCtx(t),r=this._def.values;return m(i,{received:i.data,code:f.invalid_enum_value,options:r}),w}return D(t.data)}get options(){return this._def.values}get enum(){let t={};for(let i of this._def.values)t[i]=i;return t}get Values(){let t={};for(let i of this._def.values)t[i]=i;return t}get Enum(){let t={};for(let i of this._def.values)t[i]=i;return t}extract(t){return qt.create(t)}exclude(t){return qt.create(this.options.filter(i=>!t.includes(i)))}};Ye.create=Vi;var Ke=class extends E{_parse(e){let t=T.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==d.string&&i.parsedType!==d.number){let r=T.objectValues(t);return m(i,{expected:T.joinValues(r),received:i.parsedType,code:f.invalid_type}),w}if(t.indexOf(e.data)===-1){let r=T.objectValues(t);return m(i,{received:i.data,code:f.invalid_enum_value,options:r}),w}return D(e.data)}get enum(){return this._def.values}};Ke.create=(e,t)=>new Ke({values:e,typeName:_.ZodNativeEnum,...k(t)});var Pe=class extends E{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.promise&&t.common.async===!1)return m(t,{code:f.invalid_type,expected:d.promise,received:t.parsedType}),w;let i=t.parsedType===d.promise?t.data:Promise.resolve(t.data);return D(i.then(r=>this._def.type.parseAsync(r,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Pe.create=(e,t)=>new Pe({type:e,typeName:_.ZodPromise,...k(t)});var J=class extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:i}=this._processInputParams(e),r=this._def.effect||null,s={addIssue:a=>{m(i,a),a.fatal?t.abort():t.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),r.type==="preprocess"){let a=r.transform(i.data,s);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(a).then(n=>this._def.schema._parseAsync({data:n,path:i.path,parent:i})):this._def.schema._parseSync({data:a,path:i.path,parent:i})}if(r.type==="refinement"){let a=n=>{let u=r.refinement(n,s);if(i.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return n};if(i.common.async===!1){let n=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?w:(n.status==="dirty"&&t.dirty(),a(n.value),{status:t.value,value:n.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(n=>n.status==="aborted"?w:(n.status==="dirty"&&t.dirty(),a(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!je(a))return a;let n=r.transform(a.value,s);if(n instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>je(a)?Promise.resolve(r.transform(a.value,s)).then(n=>({status:t.value,value:n})):a);T.assertNever(r)}};J.create=(e,t,i)=>new J({schema:e,typeName:_.ZodEffects,effect:t,...k(i)});J.createWithPreprocess=(e,t,i)=>new J({schema:t,effect:{type:"preprocess",transform:e},typeName:_.ZodEffects,...k(i)});var ne=class extends E{_parse(e){return this._getType(e)===d.undefined?D(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ne.create=(e,t)=>new ne({innerType:e,typeName:_.ZodOptional,...k(t)});var Ee=class extends E{_parse(e){return this._getType(e)===d.null?D(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ee.create=(e,t)=>new Ee({innerType:e,typeName:_.ZodNullable,...k(t)});var Xe=class extends E{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return t.parsedType===d.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Xe.create=(e,t)=>new Xe({innerType:e,typeName:_.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...k(t)});var gt=class extends E{_parse(e){let{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return ht(r)?r.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Q(i.common.issues)},input:i.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Q(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};gt.create=(e,t)=>new gt({innerType:e,typeName:_.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...k(t)});var yt=class extends E{_parse(e){if(this._getType(e)!==d.nan){let t=this._getOrReturnCtx(e);return m(t,{code:f.invalid_type,expected:d.nan,received:t.parsedType}),w}return{status:"valid",value:e.data}}};yt.create=e=>new yt({typeName:_.ZodNaN,...k(e)});var ks=Symbol("zod_brand"),Di=class extends E{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}},zt=class Mi extends E{_parse(t){let{status:i,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?w:s.status==="dirty"?(i.dirty(),Pi(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{let s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?w:s.status==="dirty"?(i.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,i){return new Mi({in:t,out:i,typeName:_.ZodPipeline})}},vt=class extends E{_parse(e){let t=this._def.innerType._parse(e);return je(t)&&(t.value=Object.freeze(t.value)),t}};vt.create=(e,t)=>new vt({innerType:e,typeName:_.ZodReadonly,...k(t)});var ji=(e,t={},i)=>e?Ae.create().superRefine((r,s)=>{var a,n;if(!e(r)){let u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(n=(a=u.fatal)!==null&&a!==void 0?a:i)!==null&&n!==void 0?n:!0,l=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...l,fatal:c})}}):Ae.create(),Es={object:Z.lazycreate},_;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(_||(_={}));var Ss=(e,t={message:`Input not instance of ${e.name}`})=>ji(i=>i instanceof e,t),Fi=Ce.create,Bi=Fe.create,Cs=yt.create,As=Be.create,Ui=Ue.create,Ps=$e.create,Is=ft.create,Ts=Ze.create,Ns=We.create,Rs=Ae.create,Os=we.create,Ls=oe.create,Vs=pt.create,Ds=ke.create,Ms=Z.create,js=Z.strictCreate,Fs=qe.create,Bs=Ti.create,Us=ze.create,$s=me.create,Zs=Oi.create,Ws=dt.create,qs=mt.create,zs=Li.create,Gs=Ge.create,Hs=He.create,Ks=Ye.create,Xs=Ke.create,Ys=Pe.create,Si=J.create,Qs=ne.create,Js=Ee.create,ea=J.createWithPreprocess,ta=zt.create,ia=()=>Fi().optional(),ra=()=>Bi().optional(),sa=()=>Ui().optional(),aa={string:e=>Ce.create({...e,coerce:!0}),number:e=>Fe.create({...e,coerce:!0}),boolean:e=>Ue.create({...e,coerce:!0}),bigint:e=>Be.create({...e,coerce:!0}),date:e=>$e.create({...e,coerce:!0})},na=w,M=Object.freeze({__proto__:null,defaultErrorMap:Me,setErrorMap:ls,getErrorMap:ct,makeIssue:lt,EMPTY_PATH:hs,addIssueToContext:m,ParseStatus:U,INVALID:w,DIRTY:Pi,OK:D,isAborted:jt,isDirty:Ft,isValid:je,isAsync:ht,get util(){return T},get objectUtil(){return Mt},ZodParsedType:d,getParsedType:de,ZodType:E,ZodString:Ce,ZodNumber:Fe,ZodBigInt:Be,ZodBoolean:Ue,ZodDate:$e,ZodSymbol:ft,ZodUndefined:Ze,ZodNull:We,ZodAny:Ae,ZodUnknown:we,ZodNever:oe,ZodVoid:pt,ZodArray:ke,ZodObject:Z,ZodUnion:qe,ZodDiscriminatedUnion:Ti,ZodIntersection:ze,ZodTuple:me,ZodRecord:Oi,ZodMap:dt,ZodSet:mt,ZodFunction:Li,ZodLazy:Ge,ZodLiteral:He,ZodEnum:Ye,ZodNativeEnum:Ke,ZodPromise:Pe,ZodEffects:J,ZodTransformer:J,ZodOptional:ne,ZodNullable:Ee,ZodDefault:Xe,ZodCatch:gt,ZodNaN:yt,BRAND:ks,ZodBranded:Di,ZodPipeline:zt,ZodReadonly:vt,custom:ji,Schema:E,ZodSchema:E,late:Es,get ZodFirstPartyTypeKind(){return _},coerce:aa,any:Rs,array:Ds,bigint:As,boolean:Ui,date:Ps,discriminatedUnion:Bs,effect:Si,enum:Ks,function:zs,instanceof:Ss,intersection:Us,lazy:Gs,literal:Hs,map:Ws,nan:Cs,nativeEnum:Xs,never:Ls,null:Ns,nullable:Js,number:Bi,object:Ms,oboolean:sa,onumber:ra,optional:Qs,ostring:ia,pipeline:ta,preprocess:ea,promise:Ys,record:Zs,set:qs,strictObject:js,string:Fi,symbol:Is,transformer:Si,tuple:$s,undefined:Ts,union:Fs,unknown:Os,void:Vs,NEVER:na,ZodIssueCode:f,quotelessJson:cs,ZodError:Q});var oa=M.enum(["necessary","functional","analytics","marketing"]),ua=M.object({purpose:M.string().describe("Purpose of the storing the value."),category:oa.describe("Category of the storage value - necessary, functional, analytics or marketing."),lifespan:M.string().describe("Basic description of how long the value will be stored.")}),ca=M.record(ua.describe("Key used when writing to the storage.")),la=M.object({value:M.string().describe("The localization token default value."),description:M.string().describe("The localization token description.")}),ha=M.object({localization:M.record(la.describe("Key used when getting the localized text.")).default({}).describe("Translateable texts used in the app")}),fa=M.object({name:M.string().describe("URL friendly name of the app."),endpoints:M.string().array().default([]).describe("Endpoints that should be communicated with using the API gateway."),permissions:M.string().array().default([]).describe("Permissions that can be added to user roles."),resources:ha.default({}).describe("Resources used by the app."),storage:ca.default({}).describe("Cookies, session storage, and local storage values that are used by the app.")}).passthrough();function $i(e,t){let i=fa.safeParse(e);return i.success?i.data:Zi(i.error.format(),t?[t]:[]).join(`
3
- `)}function Zi(e,t=[],i=""){e._errors?.length&&t.push(`${i} - ${e._errors.join(" + ")}`);for(let[r,s]of Object.entries(e))r==="_errors"||!s||typeof s!="object"||Array.isArray(s)||Zi(s,t,i?`${i}.${r}`:r);return t}function pa(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function Gt(e,t=""){let i=[];for(let r of e)for(let[s,a]of r.entries())i[s]=Math.max(i[s]||0,a.length);return e.map(r=>r.map((s,a)=>t+s[a===0?"padStart":"padEnd"](i[a])).join(" ")).join(`
4
- `)}function ee(e){return typeof e=="function"?e():e}var ge=class extends Error{constructor(t,i){super(t),this.code=i,this.name="CLIError"}},da=/\d/,ma=["-","_","/","."];function ga(e=""){if(!da.test(e))return e.toUpperCase()===e}function Wi(e,t){let i=t??ma,r=[];if(!e||typeof e!="string")return r;let s="",a,n;for(let u of e){let c=i.includes(u);if(c===!0){r.push(s),s="",a=void 0;continue}let l=ga(u);if(n===!1){if(a===!1&&l===!0){r.push(s),s=u,a=l;continue}if(a===!0&&l===!1&&s.length>1){let h=s[s.length-1];r.push(s.slice(0,Math.max(0,s.length-1))),s=h+u,a=l;continue}}s+=u,a=l,n=c}return r.push(s),r}function ya(e){return e?e[0].toUpperCase()+e.slice(1):""}function va(e){return e?e[0].toLowerCase()+e.slice(1):""}function xa(e){return e?(Array.isArray(e)?e:Wi(e)).map(t=>ya(t)).join(""):""}function _a(e){return va(xa(e))}function ba(e,t){return e?(Array.isArray(e)?e:Wi(e)).map(i=>i.toLowerCase()).join(t??"-"):""}function Ht(e){return e==null?[]:Array.isArray(e)?e:[e]}function wa(e,t,i,r){let s,a=e[t],n=~r.string.indexOf(t)?i==null||i===!0?"":String(i):typeof i=="boolean"?i:~r.boolean.indexOf(t)?i==="false"?!1:i==="true"||(e._.push((s=+i,s*0===0?s:i)),!!i):(s=+i,s*0===0?s:i);e[t]=a==null?n:Array.isArray(a)?a.concat(n):[a,n]}function ka(e=[],t={}){let i,r,s,a,n,u={_:[]},c=0,l=0,h=0,p=e.length,S=t.alias!==void 0,v=t.unknown!==void 0,R=t.default!==void 0;if(t.alias=t.alias||{},t.string=Ht(t.string),t.boolean=Ht(t.boolean),S)for(i in t.alias)for(r=t.alias[i]=Ht(t.alias[i]),c=0;c<r.length;c++)(t.alias[r[c]]=r.concat(i)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(r=t.alias[t.boolean[c]]||[],l=r.length;l-- >0;)t.boolean.push(r[l]);for(c=t.string.length;c-- >0;)for(r=t.alias[t.string[c]]||[],l=r.length;l-- >0;)t.string.push(r[l]);if(R){for(i in t.default)if(a=typeof t.default[i],r=t.alias[i]=t.alias[i]||[],t[a]!==void 0)for(t[a].push(i),c=0;c<r.length;c++)t[a].push(r[c])}let L=v?Object.keys(t.alias):[];for(c=0;c<p;c++){if(s=e[c],s==="--"){u._=u._.concat(e.slice(++c));break}for(l=0;l<s.length&&s.charCodeAt(l)===45;l++);if(l===0)u._.push(s);else if(s.substring(l,l+3)==="no-"){if(a=s.slice(Math.max(0,l+3)),v&&!~L.indexOf(a))return t.unknown(s);u[a]=!1}else{for(h=l+1;h<s.length&&s.charCodeAt(h)!==61;h++);for(a=s.substring(l,h),n=s.slice(Math.max(0,++h))||c+1===p||(""+e[c+1]).charCodeAt(0)===45||e[++c],r=l===2?[a]:a,h=0;h<r.length;h++){if(a=r[h],v&&!~L.indexOf(a))return t.unknown("-".repeat(l)+a);wa(u,a,h+1<r.length||n,t)}}}if(R)for(i in t.default)u[i]===void 0&&(u[i]=t.default[i]);if(S)for(i in u)for(r=t.alias[i]||[];r.length>0;)u[r.shift()]=u[i];return u}function Ea(e,t){let i={boolean:[],string:[],mixed:[],alias:{},default:{}},r=qi(t);for(let u of r)u.type!=="positional"&&(u.type==="string"?i.string.push(u.name):u.type==="boolean"&&i.boolean.push(u.name),u.default!==void 0&&(i.default[u.name]=u.default),u.alias&&(i.alias[u.name]=u.alias));let s=ka(e,i),[...a]=s._,n=new Proxy(s,{get(u,c){return u[c]??u[_a(c)]??u[ba(c)]}});for(let[,u]of r.entries())if(u.type==="positional"){let c=a.shift();if(c!==void 0)n[u.name]=c;else{if(u.default===void 0&&u.required!==!1)throw new ge(`Missing required positional argument: ${u.name.toUpperCase()}`,"EARG");n[u.name]=u.default}}else if(u.required&&n[u.name]===void 0)throw new ge(`Missing required argument: --${u.name}`,"EARG");return n}function qi(e){let t=[];for(let[i,r]of Object.entries(e||{}))t.push({...r,name:i,alias:pa(r.alias)});return t}async function zi(e,t){let i=await ee(e.args||{}),r=Ea(t.rawArgs,i),s={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e};typeof e.setup=="function"&&await e.setup(s);let a;try{let n=await ee(e.subCommands);if(n&&Object.keys(n).length>0){let u=t.rawArgs.findIndex(l=>!l.startsWith("-")),c=t.rawArgs[u];if(c){if(!n[c])throw new ge(`Unknown command \`${c}\``,"E_UNKNOWN_COMMAND");let l=await ee(n[c]);l&&await zi(l,{rawArgs:t.rawArgs.slice(u+1)})}else if(!e.run)throw new ge("No command specified.","E_NO_COMMAND")}typeof e.run=="function"&&(a=await e.run(s))}finally{typeof e.cleanup=="function"&&await e.cleanup(s)}return{result:a}}async function Kt(e,t,i){let r=await ee(e.subCommands);if(r&&Object.keys(r).length>0){let s=t.findIndex(u=>!u.startsWith("-")),a=t[s],n=await ee(r[a]);if(n)return Kt(n,t.slice(s+1),e)}return[e,i]}async function Sa(e,t){try{pe.log(await Ca(e,t)+`
5
- `)}catch(i){pe.error(i)}}async function Ca(e,t){let i=await ee(e.meta||{}),r=qi(await ee(e.args||{})),s=await ee(t?.meta||{}),a=`${s.name?`${s.name} `:""}`+(i.name||process.argv[1]),n=[],u=[],c=[],l=[];for(let v of r)if(v.type==="positional"){let R=v.name.toUpperCase(),L=v.required!==!1&&v.default===void 0,B=v.default?`="${v.default}"`:"";u.push(["`"+R+B+"`",v.description||""]),l.push(L?`<${R}>`:`[${R}]`)}else{let R=v.required===!0&&v.default===void 0,L=(v.type==="boolean"&&v.default===!0?[...(v.alias||[]).map(B=>`--no-${B}`),`--no-${v.name}`].join(", "):[...(v.alias||[]).map(B=>`-${B}`),`--${v.name}`].join(", "))+(v.type==="string"&&(v.valueHint||v.default)?`=${v.valueHint?`<${v.valueHint}>`:`"${v.default||""}"`}`:"");n.push(["`"+L+(R?" (required)":"")+"`",v.description||""]),R&&l.push(L)}if(e.subCommands){let v=[],R=await ee(e.subCommands);for(let[L,B]of Object.entries(R)){let fe=await ee(B),us=await ee(fe?.meta);c.push([`\`${L}\``,us?.description||""]),v.push(L)}l.push(v.join("|"))}let h=[],p=i.version||s.version;h.push(ie.gray(`${i.description} (${a+(p?` v${p}`:"")})`),"");let S=n.length>0||u.length>0;return h.push(`${ie.underline(ie.bold("USAGE"))} \`${a}${S?" [OPTIONS]":""} ${l.join(" ")}\``,""),u.length>0&&(h.push(ie.underline(ie.bold("ARGUMENTS")),""),h.push(Gt(u," ")),h.push("")),n.length>0&&(h.push(ie.underline(ie.bold("OPTIONS")),""),h.push(Gt(n," ")),h.push("")),c.length>0&&(h.push(ie.underline(ie.bold("COMMANDS")),""),h.push(Gt(c," ")),h.push("",`Use \`${a} <command> --help\` for more information about a command.`)),h.filter(v=>typeof v=="string").join(`
6
- `)}async function Gi(e,t={}){let i=t.rawArgs||process.argv.slice(2),r=t.showUsage||Sa;try{if(i.includes("--help")||i.includes("-h"))await r(...await Kt(e,i)),process.exit(0);else if(i.length===1&&i[0]==="--version"){let s=typeof e.meta=="function"?await e.meta():await e.meta;if(!s?.version)throw new ge("No version specified","E_NO_VERSION");pe.log(s.version)}else await zi(e,{rawArgs:i})}catch(s){let a=s instanceof ge;a||pe.error(s,`
7
- `),a&&await r(...await Kt(e,i)),pe.error(s.message),process.exit(1)}}import{existsSync as To,mkdirSync as No,readFileSync as os,writeFileSync as Lt}from"node:fs";import{relative as Ro,resolve as be}from"node:path";import{statSync as ko,promises as Eo}from"node:fs";function Hi(e=""){return!e||!e.includes("\\")?e:e.replace(/\\/g,"/")}var Aa=/^[/\\]{2}/,Pa=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Ia=/^[A-Za-z]:$/;var Xt=function(e){if(e.length===0)return".";e=Hi(e);let t=e.match(Aa),i=ue(e),r=e[e.length-1]==="/";return e=Qt(e,!i),e.length===0?i?"/":r?"./":".":(r&&(e+="/"),Ia.test(e)&&(e+="/"),t?i?`//${e}`:`//./${e}`:i&&!ue(e)?`/${e}`:e)},xt=function(...e){if(e.length===0)return".";let t;for(let i of e)i&&i.length>0&&(t===void 0?t=i:t+=`/${i}`);return t===void 0?".":Xt(t.replace(/\/\/+/g,"/"))};function Ta(){return typeof process<"u"?process.cwd().replace(/\\/g,"/"):"/"}var Yt=function(...e){e=e.map(r=>Hi(r));let t="",i=!1;for(let r=e.length-1;r>=-1&&!i;r--){let s=r>=0?e[r]:Ta();!s||s.length===0||(t=`${s}/${t}`,i=ue(s))}return t=Qt(t,!i),i&&!ue(t)?`/${t}`:t.length>0?t:"."};function Qt(e,t){let i="",r=0,s=-1,a=0,n=null;for(let u=0;u<=e.length;++u){if(u<e.length)n=e[u];else{if(n==="/")break;n="/"}if(n==="/"){if(!(s===u-1||a===1))if(a===2){if(i.length<2||r!==2||i[i.length-1]!=="."||i[i.length-2]!=="."){if(i.length>2){let c=i.lastIndexOf("/");c===-1?(i="",r=0):(i=i.slice(0,c),r=i.length-1-i.lastIndexOf("/")),s=u,a=0;continue}else if(i.length>0){i="",r=0,s=u,a=0;continue}}t&&(i+=i.length>0?"/..":"..",r=2)}else i.length>0?i+=`/${e.slice(s+1,u)}`:i=e.slice(s+1,u),r=u-s-1;s=u,a=0}else n==="."&&a!==-1?++a:a=-1}return i}var ue=function(e){return Pa.test(e)};var Oa=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,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,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,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,983,6,110,6,6,9,4759,9,787719,239],er=[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,68,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,349,41,7,1,79,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,159,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,264,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,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,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,757,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],La="\u200C\u200D\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\u0898-\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",tr="\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-\u1C88\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-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\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",Jt={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},ei="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Va={5:ei,"5module":ei+" export import",6:ei+" const class extends export import super"},Da=/^in(stanceof)?$/,Ma=new RegExp("["+tr+"]"),ja=new RegExp("["+tr+La+"]");function ii(e,t){for(var i=65536,r=0;r<t.length;r+=2){if(i+=t[r],i>e)return!1;if(i+=t[r+1],i>=e)return!0}return!1}function ce(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ma.test(String.fromCharCode(e)):t===!1?!1:ii(e,er)}function Ie(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ja.test(String.fromCharCode(e)):t===!1?!1:ii(e,er)||ii(e,Oa)}var P=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function W(e,t){return new P(e,{beforeExpr:!0,binop:t})}var q={beforeExpr:!0},$={startsExpr:!0},ai={};function A(e,t){return t===void 0&&(t={}),t.keyword=e,ai[e]=new P(e,t)}var o={num:new P("num",$),regexp:new P("regexp",$),string:new P("string",$),name:new P("name",$),privateId:new P("privateId",$),eof:new P("eof"),bracketL:new P("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new P("]"),braceL:new P("{",{beforeExpr:!0,startsExpr:!0}),braceR:new P("}"),parenL:new P("(",{beforeExpr:!0,startsExpr:!0}),parenR:new P(")"),comma:new P(",",q),semi:new P(";",q),colon:new P(":",q),dot:new P("."),question:new P("?",q),questionDot:new P("?."),arrow:new P("=>",q),template:new P("template"),invalidTemplate:new P("invalidTemplate"),ellipsis:new P("...",q),backQuote:new P("`",$),dollarBraceL:new P("${",{beforeExpr:!0,startsExpr:!0}),eq:new P("=",{beforeExpr:!0,isAssign:!0}),assign:new P("_=",{beforeExpr:!0,isAssign:!0}),incDec:new P("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new P("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:W("||",1),logicalAND:W("&&",2),bitwiseOR:W("|",3),bitwiseXOR:W("^",4),bitwiseAND:W("&",5),equality:W("==/!=/===/!==",6),relational:W("</>/<=/>=",7),bitShift:W("<</>>/>>>",8),plusMin:new P("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:W("%",10),star:W("*",10),slash:W("/",10),starstar:new P("**",{beforeExpr:!0}),coalesce:W("??",1),_break:A("break"),_case:A("case",q),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",q),_do:A("do",{isLoop:!0,beforeExpr:!0}),_else:A("else",q),_finally:A("finally"),_for:A("for",{isLoop:!0}),_function:A("function",$),_if:A("if"),_return:A("return",q),_switch:A("switch"),_throw:A("throw",q),_try:A("try"),_var:A("var"),_const:A("const"),_while:A("while",{isLoop:!0}),_with:A("with"),_new:A("new",{beforeExpr:!0,startsExpr:!0}),_this:A("this",$),_super:A("super",$),_class:A("class",$),_extends:A("extends",q),_export:A("export"),_import:A("import",$),_null:A("null",$),_true:A("true",$),_false:A("false",$),_in:A("in",{beforeExpr:!0,binop:7}),_instanceof:A("instanceof",{beforeExpr:!0,binop:7}),_typeof:A("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:A("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:A("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},H=/\r\n?|\n|\u2028|\u2029/,Fa=new RegExp(H.source,"g");function Te(e){return e===10||e===13||e===8232||e===8233}function ir(e,t,i){i===void 0&&(i=e.length);for(var r=t;r<i;r++){var s=e.charCodeAt(r);if(Te(s))return r<i-1&&s===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var rr=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,z=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,sr=Object.prototype,Ba=sr.hasOwnProperty,Ua=sr.toString,tt=Object.hasOwn||function(e,t){return Ba.call(e,t)},Ki=Array.isArray||function(e){return Ua.call(e)==="[object Array]"},Xi=Object.create(null);function ye(e){return Xi[e]||(Xi[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function ve(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var $a=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Je=function(t,i){this.line=t,this.column=i};Je.prototype.offset=function(t){return new Je(this.line,this.column+t)};var Et=function(t,i,r){this.start=i,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};function ar(e,t){for(var i=1,r=0;;){var s=ir(e,r,t);if(s<0)return new Je(i,t-r);++i,r=s}}var ri={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Yi=!1;function Za(e){var t={};for(var i in ri)t[i]=e&&tt(e,i)?e[i]:ri[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Yi&&typeof console=="object"&&console.warn&&(Yi=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
8
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),Ki(t.onToken)){var r=t.onToken;t.onToken=function(s){return r.push(s)}}return Ki(t.onComment)&&(t.onComment=Wa(t,t.onComment)),t}function Wa(e,t){return function(i,r,s,a,n,u){var c={type:i?"Block":"Line",value:r,start:s,end:a};e.locations&&(c.loc=new Et(this,n,u)),e.ranges&&(c.range=[s,a]),t.push(c)}}var et=1,Ne=2,ni=4,nr=8,or=16,ur=32,oi=64,cr=128,it=256,ui=et|Ne|it;function ci(e,t){return Ne|(e?ni:0)|(t?nr:0)}var bt=0,li=1,he=2,lr=3,hr=4,fr=5,V=function(t,i,r){this.options=t=Za(t),this.sourceFile=t.sourceFile,this.keywords=ye(Va[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==!0&&(s=Jt[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=ye(s);var a=(s?s+" ":"")+Jt.strict;this.reservedWordsStrict=ye(a),this.reservedWordsStrictBind=ye(a+" "+Jt.strictBind),this.input=String(i),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
9
- `,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(H).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(et),this.regexpState=null,this.privateNameStack=[]},se={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};V.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};se.inFunction.get=function(){return(this.currentVarScope().flags&Ne)>0};se.inGenerator.get=function(){return(this.currentVarScope().flags&nr)>0&&!this.currentVarScope().inClassFieldInit};se.inAsync.get=function(){return(this.currentVarScope().flags&ni)>0&&!this.currentVarScope().inClassFieldInit};se.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&it)return!1;if(t.flags&Ne)return(t.flags&ni)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};se.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&oi)>0||i||this.options.allowSuperOutsideMethod};se.allowDirectSuper.get=function(){return(this.currentThisScope().flags&cr)>0};se.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};se.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(Ne|it))>0||i};se.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&it)>0};V.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var r=this,s=0;s<t.length;s++)r=t[s](r);return r};V.parse=function(t,i){return new this(i,t).parse()};V.parseExpressionAt=function(t,i,r){var s=new this(r,t,i);return s.nextToken(),s.parseExpression()};V.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(V.prototype,se);var j=V.prototype,qa=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;j.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){z.lastIndex=e,e+=z.exec(this.input)[0].length;var t=qa.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){z.lastIndex=e+t[0].length;var i=z.exec(this.input),r=i.index+i[0].length,s=this.input.charAt(r);return s===";"||s==="}"||H.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||s==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,z.lastIndex=e,e+=z.exec(this.input)[0].length,this.input[e]===";"&&e++}};j.eat=function(e){return this.type===e?(this.next(),!0):!1};j.isContextual=function(e){return this.type===o.name&&this.value===e&&!this.containsEsc};j.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};j.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};j.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||H.test(this.input.slice(this.lastTokEnd,this.start))};j.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};j.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()};j.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};j.expect=function(e){this.eat(e)||this.unexpected()};j.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var St=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};j.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};j.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,r=e.doubleProto;if(!t)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};j.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};j.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var y=V.prototype;y.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==o.eof;){var i=this.parseStatement(null,!0,t);e.body.push(i)}if(this.inModule)for(var r=0,s=Object.keys(this.undefinedExports);r<s.length;r+=1){var a=s[r];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var hi={kind:"loop"},za={kind:"switch"};y.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;z.lastIndex=this.pos;var t=z.exec(this.input),i=this.pos+t[0].length,r=this.input.charCodeAt(i);if(r===91||r===92)return!0;if(e)return!1;if(r===123||r>55295&&r<56320)return!0;if(ce(r,!0)){for(var s=i+1;Ie(r=this.input.charCodeAt(s),!0);)++s;if(r===92||r>55295&&r<56320)return!0;var a=this.input.slice(i,s);if(!Da.test(a))return!0}return!1};y.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;z.lastIndex=this.pos;var e=z.exec(this.input),t=this.pos+e[0].length,i;return!H.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Ie(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};y.parseStatement=function(e,t,i){var r=this.type,s=this.startNode(),a;switch(this.isLet(e)&&(r=o._var,a="let"),r){case o._break:case o._continue:return this.parseBreakContinueStatement(s,r.keyword);case o._debugger:return this.parseDebuggerStatement(s);case o._do:return this.parseDoStatement(s);case o._for:return this.parseForStatement(s);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(s,!0);case o._if:return this.parseIfStatement(s);case o._return:return this.parseReturnStatement(s);case o._switch:return this.parseSwitchStatement(s);case o._throw:return this.parseThrowStatement(s);case o._try:return this.parseTryStatement(s);case o._const:case o._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(s,a);case o._while:return this.parseWhileStatement(s);case o._with:return this.parseWithStatement(s);case o.braceL:return this.parseBlock(!0,s);case o.semi:return this.parseEmptyStatement(s);case o._export:case o._import:if(this.options.ecmaVersion>10&&r===o._import){z.lastIndex=this.pos;var n=z.exec(this.input),u=this.pos+n[0].length,c=this.input.charCodeAt(u);if(c===40||c===46)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===o._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var l=this.value,h=this.parseExpression();return r===o.name&&h.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(s,l,h,e):this.parseExpressionStatement(s,h)}};y.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var s=this.labels[r];if((e.label==null||s.name===e.label.name)&&(s.kind!=null&&(i||s.kind==="loop")||e.label&&i))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")};y.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};y.parseDoStatement=function(e){return this.next(),this.labels.push(hi),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};y.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(hi),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===o._var||this.type===o._const||i){var r=this.startNode(),s=i?"let":this.value;return this.next(),this.parseVar(r,!0,s),this.finishNode(r,"VariableDeclaration"),(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&r.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===o._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var a=this.isContextual("let"),n=!1,u=new St,c=this.parseExpression(t>-1?"await":!0,u);return this.type===o._in||(n=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===o._in?t>-1&&this.unexpected(t):e.await=t>-1),a&&n&&this.raise(c.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(c,!1,u),this.checkLValPattern(c),this.parseForIn(e,c)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,c))};y.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,Qe|(i?0:si),!1,t)};y.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};y.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};y.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push(za),this.enterScope(0);for(var t,i=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var r=this.type===o._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(o.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};y.parseThrowStatement=function(e){return this.next(),H.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Ga=[];y.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?ur:0),this.checkLValPattern(e,t?hr:he),this.expect(o.parenR),e};y.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};y.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};y.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(hi),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};y.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};y.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};y.parseLabeledStatement=function(e,t,i,r){for(var s=0,a=this.labels;s<a.length;s+=1){var n=a[s];n.name===t&&this.raise(i.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===o._switch?"switch":null,c=this.labels.length-1;c>=0;c--){var l=this.labels[c];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};y.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};y.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(o.braceL),e&&this.enterScope(0);this.type!==o.braceR;){var r=this.parseStatement(null);t.body.push(r)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};y.parseFor=function(e,t){return e.init=t,this.expect(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};y.parseForIn=function(e,t){var i=this.type===o._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};y.parseVar=function(e,t,i,r){for(e.declarations=[],e.kind=i;;){var s=this.startNode();if(this.parseVarId(s,i),this.eat(o.eq)?s.init=this.parseMaybeAssign(t):!r&&i==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&s.id.type!=="Identifier"&&!(t&&(this.type===o._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):s.init=null,e.declarations.push(this.finishNode(s,"VariableDeclarator")),!this.eat(o.comma))break}return e};y.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?li:he,!1)};var Qe=1,si=2,pr=4;y.parseFunction=function(e,t,i,r,s){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===o.star&&t&si&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Qe&&(e.id=t&pr&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&si)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?li:he:lr));var a=this.yieldPos,n=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ci(e.async,e.generator)),t&Qe||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,s),this.yieldPos=a,this.awaitPos=n,this.awaitIdentPos=u,this.finishNode(e,t&Qe?"FunctionDeclaration":"FunctionExpression")};y.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};y.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),s=this.startNode(),a=!1;for(s.body=[],this.expect(o.braceL);this.type!==o.braceR;){var n=this.parseClassElement(e.superClass!==null);n&&(s.body.push(n),n.type==="MethodDefinition"&&n.kind==="constructor"?(a&&this.raiseRecoverable(n.start,"Duplicate constructor in the same class"),a=!0):n.key&&n.key.type==="PrivateIdentifier"&&Ha(r,n)&&this.raiseRecoverable(n.key.start,"Identifier '#"+n.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(s,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};y.parseClassElement=function(e){if(this.eat(o.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),r="",s=!1,a=!1,n="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===o.star?u=!0:r="static"}if(i.static=u,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?a=!0:r="async"),!r&&(t>=9||!a)&&this.eat(o.star)&&(s=!0),!r&&!a&&!s){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?n=c:r=c)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===o.parenL||n!=="method"||s||a){var l=!i.static&&wt(i,"constructor"),h=l&&e;l&&n!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=l?"constructor":n,this.parseClassMethod(i,s,a,h)}else this.parseClassField(i);return i};y.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword};y.parseClassElementName=function(e){this.type===o.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};y.parseClassMethod=function(e,t,i,r){var s=e.key;e.kind==="constructor"?(t&&this.raise(s.start,"Constructor can't be a generator"),i&&this.raise(s.start,"Constructor can't be an async method")):e.static&&wt(e,"prototype")&&this.raise(s.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,i,r);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};y.parseClassField=function(e){if(wt(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&wt(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};y.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(it|oi);this.type!==o.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};y.parseClassId=function(e,t){this.type===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,he,!1)):(t===!0&&this.unexpected(),e.id=null)};y.parseClassSuper=function(e){e.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null};y.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};y.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,s=r===0?null:this.privateNameStack[r-1],a=0;a<i.length;++a){var n=i[a];tt(t,n.name)||(s?s.used.push(n):this.raiseRecoverable(n.start,"Private field '#"+n.name+"' must be declared in an enclosing class"))}};function Ha(e,t){var i=t.key.name,r=e[i],s="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(s=(t.static?"s":"i")+t.kind),r==="iget"&&s==="iset"||r==="iset"&&s==="iget"||r==="sget"&&s==="sset"||r==="sset"&&s==="sget"?(e[i]="true",!1):r?!0:(e[i]=s,!1)}function wt(e,t){var i=e.computed,r=e.key;return!i&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}y.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};y.parseExport=function(e,t){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,r=e.specifiers;i<r.length;i+=1){var s=r[i];this.checkUnreserved(s.local),this.checkLocalExport(s.local),s.local.type==="Literal"&&this.raise(s.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};y.parseExportDeclaration=function(e){return this.parseStatement(null)};y.parseExportDefaultDeclaration=function(){var e;if(this.type===o._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,Qe|pr,!1,e)}else if(this.type===o._class){var i=this.startNode();return this.parseClass(i,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};y.checkExport=function(e,t,i){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),tt(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)};y.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier")this.checkExport(e,t,t.start);else if(i==="ObjectPattern")for(var r=0,s=t.properties;r<s.length;r+=1){var a=s[r];this.checkPatternExport(e,a)}else if(i==="ArrayPattern")for(var n=0,u=t.elements;n<u.length;n+=1){var c=u[n];c&&this.checkPatternExport(e,c)}else i==="Property"?this.checkPatternExport(e,t.value):i==="AssignmentPattern"?this.checkPatternExport(e,t.left):i==="RestElement"&&this.checkPatternExport(e,t.argument)};y.checkVariableExport=function(e,t){if(e)for(var i=0,r=t;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s.id)}};y.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};y.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};y.parseExportSpecifiers=function(e){var t=[],i=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseExportSpecifier(e))}return t};y.parseImport=function(e){return this.next(),this.type===o.string?(e.specifiers=Ga,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===o.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};y.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,he),this.finishNode(e,"ImportSpecifier")};y.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,he),this.finishNode(e,"ImportDefaultSpecifier")};y.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,he),this.finishNode(e,"ImportNamespaceSpecifier")};y.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===o.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return e;if(this.type===o.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(o.braceL);!this.eat(o.braceR);){if(t)t=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseImportSpecifier())}return e};y.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var e=this.parseLiteral(this.value);return $a.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};y.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};y.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var K=V.prototype;K.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var r=0,s=e.properties;r<s.length;r+=1){var a=s[r];this.toAssignable(a,t),a.type==="RestElement"&&(a.argument.type==="ArrayPattern"||a.argument.type==="ObjectPattern")&&this.raise(a.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return e};K.toAssignableList=function(e,t){for(var i=e.length,r=0;r<i;r++){var s=e[r];s&&this.toAssignable(s,t)}if(i){var a=e[i-1];this.options.ecmaVersion===6&&t&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return e};K.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};K.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==o.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};K.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()};K.parseBindingList=function(e,t,i,r){for(var s=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(o.comma),t&&this.type===o.comma)s.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===o.ellipsis){var n=this.parseRestBinding();this.parseBindingListItem(n),s.push(n),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else s.push(this.parseAssignableListItem(r))}return s};K.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};K.parseBindingListItem=function(e){return e};K.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return i;var r=this.startNodeAt(e,t);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};K.checkLValSimple=function(e,t,i){t===void 0&&(t=bt);var r=t!==bt;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===he&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(tt(i,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),i[e.name]=!0),t!==fr&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};K.checkLValPattern=function(e,t,i){switch(t===void 0&&(t=bt),e.type){case"ObjectPattern":for(var r=0,s=e.properties;r<s.length;r+=1){var a=s[r];this.checkLValInnerPattern(a,t,i)}break;case"ArrayPattern":for(var n=0,u=e.elements;n<u.length;n+=1){var c=u[n];c&&this.checkLValInnerPattern(c,t,i)}break;default:this.checkLValSimple(e,t,i)}};K.checkLValInnerPattern=function(e,t,i){switch(t===void 0&&(t=bt),e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var te=function(t,i,r,s,a){this.token=t,this.isExpr=!!i,this.preserveSpace=!!r,this.override=s,this.generator=!!a},N={b_stat:new te("{",!1),b_expr:new te("{",!0),b_tmpl:new te("${",!1),p_stat:new te("(",!1),p_expr:new te("(",!0),q_tmpl:new te("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new te("function",!1),f_expr:new te("function",!0),f_expr_gen:new te("function",!0,!1,null,!0),f_gen:new te("function",!1,!1,null,!0)},Re=V.prototype;Re.initialContext=function(){return[N.b_stat]};Re.curContext=function(){return this.context[this.context.length-1]};Re.braceIsBlock=function(e){var t=this.curContext();return t===N.f_expr||t===N.f_stat?!0:e===o.colon&&(t===N.b_stat||t===N.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?H.test(this.input.slice(this.lastTokEnd,this.start)):e===o._else||e===o.semi||e===o.eof||e===o.parenR||e===o.arrow?!0:e===o.braceL?t===N.b_stat:e===o._var||e===o._const||e===o.name?!1:!this.exprAllowed};Re.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Re.updateContext=function(e){var t,i=this.type;i.keyword&&e===o.dot?this.exprAllowed=!1:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr};Re.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};o.parenR.updateContext=o.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===N.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};o.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?N.b_stat:N.b_expr),this.exprAllowed=!0};o.dollarBraceL.updateContext=function(){this.context.push(N.b_tmpl),this.exprAllowed=!0};o.parenL.updateContext=function(e){var t=e===o._if||e===o._for||e===o._with||e===o._while;this.context.push(t?N.p_stat:N.p_expr),this.exprAllowed=!0};o.incDec.updateContext=function(){};o._function.updateContext=o._class.updateContext=function(e){e.beforeExpr&&e!==o._else&&!(e===o.semi&&this.curContext()!==N.p_stat)&&!(e===o._return&&H.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===N.b_stat)?this.context.push(N.f_expr):this.context.push(N.f_stat),this.exprAllowed=!1};o.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};o.backQuote.updateContext=function(){this.curContext()===N.q_tmpl?this.context.pop():this.context.push(N.q_tmpl),this.exprAllowed=!1};o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===N.f_expr?this.context[t]=N.f_expr_gen:this.context[t]=N.f_gen}this.exprAllowed=!0};o.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==o.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var b=V.prototype;b.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,s;switch(r.type){case"Identifier":s=r.name;break;case"Literal":s=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){s==="__proto__"&&a==="init"&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);return}s="$"+s;var n=t[s];if(n){var u;a==="init"?u=this.strict&&n.init||n.get||n.set:u=n.init||n[a],u&&this.raiseRecoverable(r.start,"Redefinition of property")}else n=t[s]={init:!1,get:!1,set:!1};n[a]=!0}};b.parseExpression=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===o.comma){var a=this.startNodeAt(i,r);for(a.expressions=[s];this.eat(o.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return s};b.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,s=-1,a=-1,n=-1;t?(s=t.parenthesizedAssign,a=t.trailingComma,n=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new St,r=!0);var u=this.start,c=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var l=this.parseMaybeConditional(e,t);if(i&&(l=i.call(this,l,u,c)),this.type.isAssign){var h=this.startNodeAt(u,c);return h.operator=this.value,this.type===o.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(l):this.checkLValSimple(l),h.left=l,this.next(),h.right=this.parseMaybeAssign(e),n>-1&&(t.doubleProto=n),this.finishNode(h,"AssignmentExpression")}else r&&this.checkExpressionErrors(t,!0);return s>-1&&(t.parenthesizedAssign=s),a>-1&&(t.trailingComma=a),l};b.parseMaybeConditional=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return s;if(this.eat(o.question)){var a=this.startNodeAt(i,r);return a.test=s,a.consequent=this.parseMaybeAssign(),this.expect(o.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return s};b.parseExprOps=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||s.start===i&&s.type==="ArrowFunctionExpression"?s:this.parseExprOp(s,i,r,-1,e)};b.parseExprOp=function(e,t,i,r,s){var a=this.type.binop;if(a!=null&&(!s||this.type!==o._in)&&a>r){var n=this.type===o.logicalOR||this.type===o.logicalAND,u=this.type===o.coalesce;u&&(a=o.logicalAND.binop);var c=this.value;this.next();var l=this.start,h=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,s),l,h,a,s),S=this.buildBinary(t,i,e,p,c,n||u);return(n&&this.type===o.coalesce||u&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(S,t,i,r,s)}return e};b.buildBinary=function(e,t,i,r,s,a){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var n=this.startNodeAt(e,t);return n.left=i,n.operator=s,n.right=r,this.finishNode(n,a?"LogicalExpression":"BinaryExpression")};b.parseMaybeUnary=function(e,t,i,r){var s=this.start,a=this.startLoc,n;if(this.isContextual("await")&&this.canAwait)n=this.parseAwait(r),t=!0;else if(this.type.prefix){var u=this.startNode(),c=this.type===o.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&u.argument.type==="Identifier"?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&dr(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,n=this.finishNode(u,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===o.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();else{if(n=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(s,a);l.operator=this.value,l.prefix=!1,l.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(l,"UpdateExpression")}}if(!i&&this.eat(o.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(s,a,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return n};function dr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&dr(e.expression)}b.parseExprSubscripts=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprAtom(e,t);if(s.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return s;var a=this.parseSubscripts(s,i,r,!1,t);return e&&a.type==="MemberExpression"&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a};b.parseSubscripts=function(e,t,i,r,s){for(var a=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,n=!1;;){var u=this.parseSubscript(e,t,i,r,a,n,s);if(u.optional&&(n=!0),u===e||u.type==="ArrowFunctionExpression"){if(n){var c=this.startNodeAt(t,i);c.expression=u,u=this.finishNode(c,"ChainExpression")}return u}e=u}};b.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)};b.parseSubscriptAsyncArrow=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!0,r)};b.parseSubscript=function(e,t,i,r,s,a,n){var u=this.options.ecmaVersion>=11,c=u&&this.eat(o.questionDot);r&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(o.bracketL);if(l||c&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var h=this.startNodeAt(t,i);h.object=e,l?(h.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&e.type!=="Super"?h.property=this.parsePrivateIdent():h.property=this.parseIdent(this.options.allowReserved!=="never"),h.computed=!!l,u&&(h.optional=c),e=this.finishNode(h,"MemberExpression")}else if(!r&&this.eat(o.parenL)){var p=new St,S=this.yieldPos,v=this.awaitPos,R=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var L=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,p);if(s&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=S,this.awaitPos=v,this.awaitIdentPos=R,this.parseSubscriptAsyncArrow(t,i,L,n);this.checkExpressionErrors(p,!0),this.yieldPos=S||this.yieldPos,this.awaitPos=v||this.awaitPos,this.awaitIdentPos=R||this.awaitIdentPos;var B=this.startNodeAt(t,i);B.callee=e,B.arguments=L,u&&(B.optional=c),e=this.finishNode(B,"CallExpression")}else if(this.type===o.backQuote){(c||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var fe=this.startNodeAt(t,i);fe.tag=e,fe.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(fe,"TaggedTemplateExpression")}return e};b.parseExprAtom=function(e,t,i){this.type===o.slash&&this.readRegexp();var r,s=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(r,"Super");case o._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case o.name:var a=this.start,n=this.startLoc,u=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(N.f_expr),this.parseFunction(this.startNodeAt(a,n),0,!1,!0,t);if(s&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(a,n),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===o.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,n),[c],!0,t)}return c;case o.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return r=this.startNode(),r.value=this.type===o._null?null:this.type===o._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case o.parenL:var h=this.start,p=this.parseParenAndDistinguishExpression(s,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),p;case o.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case o.braceL:return this.overrideContext(N.b_expr),this.parseObj(!1,e);case o._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};b.parseExprAtomDefault=function(){this.unexpected()};b.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var i=this.parseIdent(!0);if(this.type===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.dot)return t.meta=i,this.parseImportMeta(t);this.unexpected()};b.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};b.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};b.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};b.parseParenExpression=function(){this.expect(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e};b.shouldParseArrow=function(e){return!this.canInsertSemicolon()};b.parseParenAndDistinguishExpression=function(e,t){var i=this.start,r=this.startLoc,s,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var n=this.start,u=this.startLoc,c=[],l=!0,h=!1,p=new St,S=this.yieldPos,v=this.awaitPos,R;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(l?l=!1:this.expect(o.comma),a&&this.afterTrailingComma(o.parenR,!0)){h=!0;break}else if(this.type===o.ellipsis){R=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,p,this.parseParenItem));var L=this.lastTokEnd,B=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(c)&&this.eat(o.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=S,this.awaitPos=v,this.parseParenArrowList(i,r,c,t);(!c.length||h)&&this.unexpected(this.lastTokStart),R&&this.unexpected(R),this.checkExpressionErrors(p,!0),this.yieldPos=S||this.yieldPos,this.awaitPos=v||this.awaitPos,c.length>1?(s=this.startNodeAt(n,u),s.expressions=c,this.finishNodeAt(s,"SequenceExpression",L,B)):s=c[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var fe=this.startNodeAt(i,r);return fe.expression=s,this.finishNode(fe,"ParenthesizedExpression")}else return s};b.parseParenItem=function(e){return e};b.parseParenArrowList=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,r)};var Ka=[];b.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var t=this.startNodeAt(e.start,e.startLoc);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,s=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,s,!0,!1),this.eat(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Ka,this.finishNode(e,"NewExpression")};b.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
10
- `),cooked:this.value},this.next(),i.tail=this.type===o.backQuote,this.finishNode(i,"TemplateElement")};b.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(o.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};b.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!H.test(this.input.slice(this.lastTokEnd,this.start))};b.parseObj=function(e,t){var i=this.startNode(),r=!0,s={};for(i.properties=[],this.next();!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,s,t),i.properties.push(a)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};b.parseProperty=function(e,t){var i=this.startNode(),r,s,a,n;if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===o.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(a=this.start,n=this.startLoc),e||(r=this.eat(o.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(i)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(o.star),this.parsePropertyName(i)):s=!1,this.parsePropertyValue(i,e,r,s,a,n,t,u),this.finishNode(i,"Property")};b.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};b.parsePropertyValue=function(e,t,i,r,s,a,n,u){(i||r)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,n),e.kind="init"):this.options.ecmaVersion>=6&&this.type===o.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,r)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==o.comma&&this.type!==o.braceR&&this.type!==o.eq?((i||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=s),e.kind="init",t?e.value=this.parseMaybeDefault(s,a,this.copyNode(e.key)):this.type===o.eq&&n?(n.shorthandAssign<0&&(n.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};b.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(o.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(o.bracketR),e.key;e.computed=!1}return e.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};b.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};b.parseMethod=function(e,t,i){var r=this.startNode(),s=this.yieldPos,a=this.awaitPos,n=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ci(t,r.generator)|oi|(i?cr:0)),this.expect(o.parenL),r.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=n,this.finishNode(r,"FunctionExpression")};b.parseArrowExpression=function(e,t,i,r){var s=this.yieldPos,a=this.awaitPos,n=this.awaitIdentPos;return this.enterScope(ci(i,!1)|or),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=n,this.finishNode(e,"ArrowFunctionExpression")};b.parseFunctionBody=function(e,t,i,r){var s=t&&this.type!==o.braceL,a=this.strict,n=!1;if(s)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||u)&&(n=this.strictDirective(this.end),n&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],n&&(this.strict=!0),this.checkParams(e,!a&&!n&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,fr),e.body=this.parseBlock(!1,void 0,n&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};b.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1){var r=i[t];if(r.type!=="Identifier")return!1}return!0};b.checkParams=function(e,t){for(var i=Object.create(null),r=0,s=e.params;r<s.length;r+=1){var a=s[r];this.checkLValInnerPattern(a,li,t?null:i)}};b.parseExprList=function(e,t,i,r){for(var s=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(o.comma),t&&this.afterTrailingComma(e))break;var n=void 0;i&&this.type===o.comma?n=null:this.type===o.ellipsis?(n=this.parseSpread(r),r&&this.type===o.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):n=this.parseMaybeAssign(!1,r),s.push(n)}return s};b.checkUnreserved=function(e){var t=e.start,i=e.end,r=e.name;if(this.inGenerator&&r==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&r==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(r==="arguments"||r==="await")&&this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,i).indexOf("\\")!==-1)){var s=this.strict?this.reservedWordsStrict:this.reservedWords;s.test(r)&&(!this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))}};b.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};b.parseIdentNode=function(){var e=this.startNode();return this.type===o.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=o.name):this.unexpected(),e};b.parsePrivateIdent=function(){var e=this.startNode();return this.type===o.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};b.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(o.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};b.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var kt=V.prototype;kt.raise=function(e,t){var i=ar(this.input,e);t+=" ("+i.line+":"+i.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=i,r.raisedAt=this.pos,r};kt.raiseRecoverable=kt.raise;kt.curPosition=function(){if(this.options.locations)return new Je(this.curLine,this.pos-this.lineStart)};var xe=V.prototype,Xa=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};xe.enterScope=function(e){this.scopeStack.push(new Xa(e))};xe.exitScope=function(){this.scopeStack.pop()};xe.treatFunctionsAsVarInScope=function(e){return e.flags&Ne||!this.inModule&&e.flags&et};xe.declareName=function(e,t,i){var r=!1;if(t===he){var s=this.currentScope();r=s.lexical.indexOf(e)>-1||s.functions.indexOf(e)>-1||s.var.indexOf(e)>-1,s.lexical.push(e),this.inModule&&s.flags&et&&delete this.undefinedExports[e]}else if(t===hr){var a=this.currentScope();a.lexical.push(e)}else if(t===lr){var n=this.currentScope();this.treatFunctionsAsVar?r=n.lexical.indexOf(e)>-1:r=n.lexical.indexOf(e)>-1||n.var.indexOf(e)>-1,n.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var c=this.scopeStack[u];if(c.lexical.indexOf(e)>-1&&!(c.flags&ur&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){r=!0;break}if(c.var.push(e),this.inModule&&c.flags&et&&delete this.undefinedExports[e],c.flags&ui)break}r&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};xe.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};xe.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};xe.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&ui)return t}};xe.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&ui&&!(t.flags&or))return t}};var Ct=function(t,i,r){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new Et(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},rt=V.prototype;rt.startNode=function(){return new Ct(this,this.start,this.startLoc)};rt.startNodeAt=function(e,t){return new Ct(this,e,t)};function mr(e,t,i,r){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=i),e}rt.finishNode=function(e,t){return mr.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};rt.finishNodeAt=function(e,t,i,r){return mr.call(this,e,t,i,r)};rt.copyNode=function(e){var t=new Ct(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var gr="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",yr=gr+" Extended_Pictographic",vr=yr,xr=vr+" EBase EComp EMod EPres ExtPict",_r=xr,Ya=_r,Qa={9:gr,10:yr,11:vr,12:xr,13:_r,14:Ya},Ja="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",en={9:"",10:"",11:"",12:"",13:"",14:Ja},Qi="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",br="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",wr=br+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",kr=wr+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Er=kr+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Sr=Er+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",tn=Sr+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",rn={9:br,10:wr,11:kr,12:Er,13:Sr,14:tn},Cr={};function sn(e){var t=Cr[e]={binary:ye(Qa[e]+" "+Qi),binaryOfStrings:ye(en[e]),nonBinary:{General_Category:ye(Qi),Script:ye(rn[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(_t=0,ti=[9,10,11,12,13,14];_t<ti.length;_t+=1)Ji=ti[_t],sn(Ji);var Ji,_t,ti,g=V.prototype,ae=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Cr[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};ae.prototype.reset=function(t,i,r){var s=r.indexOf("v")!==-1,a=r.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=r,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)};ae.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};ae.prototype.at=function(t,i){i===void 0&&(i=!1);var r=this.source,s=r.length;if(t>=s)return-1;var a=r.charCodeAt(t);if(!(i||this.switchU)||a<=55295||a>=57344||t+1>=s)return a;var n=r.charCodeAt(t+1);return n>=56320&&n<=57343?(a<<10)+n-56613888:a};ae.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var r=this.source,s=r.length;if(t>=s)return s;var a=r.charCodeAt(t),n;return!(i||this.switchU)||a<=55295||a>=57344||t+1>=s||(n=r.charCodeAt(t+1))<56320||n>57343?t+1:t+2};ae.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};ae.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};ae.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};ae.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};ae.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var r=this.pos,s=0,a=t;s<a.length;s+=1){var n=a[s],u=this.at(r,i);if(u===-1||u!==n)return!1;r=this.nextIndex(r,i)}return this.pos=r,!0};g.validateRegExpFlags=function(e){for(var t=e.validFlags,i=e.flags,r=!1,s=!1,a=0;a<i.length;a++){var n=i.charAt(a);t.indexOf(n)===-1&&this.raise(e.start,"Invalid regular expression flag"),i.indexOf(n,a+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),n==="u"&&(r=!0),n==="v"&&(s=!0)}this.options.ecmaVersion>=15&&r&&s&&this.raise(e.start,"Invalid regular expression flag")};g.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};g.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var r=i[t];e.groupNames.indexOf(r)===-1&&e.raise("Invalid named capture referenced")}};g.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};g.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};g.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};g.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};g.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};g.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};g.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var r=0,s=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue),e.eat(125)))return s!==-1&&s<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=i}return!1};g.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};g.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};g.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1};g.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};g.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};g.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};g.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Ar(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Ar(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}g.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!Ar(i);)e.advance();return e.pos!==t};g.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};g.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};g.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};g.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ve(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ve(e.lastIntValue);return!0}return!1};g.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),an(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function an(e){return ce(e,!0)||e===36||e===95}g.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),nn(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function nn(e){return Ie(e,!0)||e===36||e===95||e===8204||e===8205}g.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};g.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};g.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};g.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};g.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};g.regexp_eatZero=function(e){return e.current()===48&&!At(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};g.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};g.regexp_eatControlLetter=function(e){var t=e.current();return Pr(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Pr(e){return e>=65&&e<=90||e>=97&&e<=122}g.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(r&&s>=55296&&s<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(n>=56320&&n<=57343)return e.lastIntValue=(s-55296)*1024+(n-56320)+65536,!0}e.pos=a,e.lastIntValue=s}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&on(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=i}return!1};function on(e){return e>=0&&e<=1114111}g.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};g.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var Ir=0,le=1,G=2;g.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(un(t))return e.lastIntValue=-1,e.advance(),le;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&r===G&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return Ir};function un(e){return e===100||e===68||e===115||e===83||e===119||e===87}g.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,r),le}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,s)}return Ir};g.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){tt(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};g.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return le;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return G;e.raise("Invalid property name")};g.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Tr(t=e.current());)e.lastStringValue+=ve(t),e.advance();return e.lastStringValue!==""};function Tr(e){return Pr(e)||e===95}g.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";cn(t=e.current());)e.lastStringValue+=ve(t),e.advance();return e.lastStringValue!==""};function cn(e){return Tr(e)||At(e)}g.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};g.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===G&&e.raise("Negated character class may contain strings"),!0}return!1};g.regexp_classContents=function(e){return e.current()===93?le:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),le)};g.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};g.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||Or(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};g.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};g.regexp_classSetExpression=function(e){var t=le,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===G&&(t=G);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==G&&(t=le);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===G&&(t=G)}};g.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return i!==-1&&r!==-1&&i>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};g.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?le:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};g.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return i&&r===G&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var s=this.regexp_eatCharacterClassEscape(e);if(s)return s;e.pos=t}return null};g.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};g.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===G&&(t=G);return t};g.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?le:G};g.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&ln(i)||hn(i)?!1:(e.advance(),e.lastIntValue=i,!0)};function ln(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function hn(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}g.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return fn(t)?(e.lastIntValue=t,e.advance(),!0):!1};function fn(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}g.regexp_eatClassControlLetter=function(e){var t=e.current();return At(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};g.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};g.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;At(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function At(e){return e>=48&&e<=57}g.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Nr(i=e.current());)e.lastIntValue=16*e.lastIntValue+Rr(i),e.advance();return e.pos!==t};function Nr(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Rr(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}g.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};g.regexp_eatOctalDigit=function(e){var t=e.current();return Or(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Or(e){return e>=48&&e<=55}g.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var s=e.current();if(!Nr(s))return e.pos=i,!1;e.lastIntValue=16*e.lastIntValue+Rr(s),e.advance()}return!0};var fi=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Et(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},C=V.prototype;C.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new fi(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};C.getToken=function(){return this.next(),new fi(this)};typeof Symbol<"u"&&(C[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===o.eof,value:t}}}});C.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(o.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};C.readToken=function(e){return ce(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};C.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};C.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var r=void 0,s=t;(r=ir(this.input,s,this.pos))>-1;)++this.curLine,s=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};C.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Te(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition())};C.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&rr.test(String.fromCharCode(e)))++this.pos;else break e}}};C.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};C.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(o.ellipsis)):(++this.pos,this.finishToken(o.dot))};C.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(o.assign,2):this.finishOp(o.slash,1)};C.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,r=e===42?o.star:o.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,r=o.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(o.assign,i+1):this.finishOp(r,i)};C.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(o.assign,3)}return this.finishOp(e===124?o.logicalOR:o.logicalAND,2)}return t===61?this.finishOp(o.assign,2):this.finishOp(e===124?o.bitwiseOR:o.bitwiseAND,1)};C.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)};C.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||H.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.incDec,2):t===61?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)};C.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(o.assign,i+1):this.finishOp(o.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(o.relational,i))};C.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(o.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(e===61?o.eq:o.prefix,1)};C.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(o.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(o.assign,3)}return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)};C.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),ce(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ve(t)+"'")};C.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ve(e)+"'")};C.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};C.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(H.test(r)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var s=this.input.slice(i,this.pos);++this.pos;var a=this.pos,n=this.readWord1();this.containsEsc&&this.unexpected(a);var u=this.regexpState||(this.regexpState=new ae(this));u.reset(i,s,n),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var c=null;try{c=new RegExp(s,n)}catch{}return this.finishToken(o.regexp,{pattern:s,flags:n,value:c})};C.readInt=function(e,t,i){for(var r=this.options.ecmaVersion>=12&&t===void 0,s=i&&this.input.charCodeAt(this.pos)===48,a=this.pos,n=0,u=0,c=0,l=t??1/0;c<l;++c,++this.pos){var h=this.input.charCodeAt(this.pos),p=void 0;if(r&&h===95){s&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),c===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=h;continue}if(h>=97?p=h-97+10:h>=65?p=h-65+10:h>=48&&h<=57?p=h-48:p=1/0,p>=e)break;u=h,n=n*e+p}return r&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||t!=null&&this.pos-a!==t?null:n};function pn(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function Lr(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}C.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=Lr(this.input.slice(t,this.pos)),++this.pos):ce(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,i)};C.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&r===110){var s=Lr(this.input.slice(t,this.pos));return++this.pos,ce(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,s)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),r===46&&!i&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!i&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),ce(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=pn(this.input.slice(t,this.pos),i);return this.finishToken(o.num,a)};C.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};C.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Te(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(o.string,t)};var Vr={};C.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Vr)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};C.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Vr;this.raise(e,t)};C.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===o.template||this.type===o.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(o.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Te(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
11
- `;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};C.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(o.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")};C.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
12
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ve(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(r,8);return s>255&&(r=r.slice(0,-1),s=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return Te(t)?"":String.fromCharCode(t)}};C.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};C.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var s=this.fullCharCodeAtPos();if(Ie(s,r))this.pos+=s<=65535?1:2;else if(s===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var n=this.readCodePoint();(t?ce:Ie)(n,r)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=ve(n),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};C.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=ai[e]),this.finishToken(t,e)};var dn="8.11.2";V.acorn={Parser:V,version:dn,defaultOptions:ri,Position:Je,SourceLocation:Et,getLineInfo:ar,Node:Ct,TokenType:P,tokTypes:o,keywordTypes:ai,TokContext:te,tokContexts:N,isIdentifierChar:Ie,isIdentifierStart:ce,Token:fi,isNewLine:Te,lineBreak:H,lineBreakG:Fa,nonASCIIwhitespace:rr};import{builtinModules as Hr,createRequire as Mu}from"node:module";import _n,{realpathSync as mi,statSync as Kr,Stats as bn,promises as Fu,existsSync as wn}from"node:fs";import{fileURLToPath as I,URL as O,pathToFileURL as Oe}from"node:url";var Ru=String.fromCharCode;var mn=/\/$|\/\?|\/#/;function gn(e="",t){return t?mn.test(e):e.endsWith("/")}function yn(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(gn(e,!0))return e||"/";let i=e,r="",s=e.indexOf("#");if(s>=0&&(i=e.slice(0,s),r=e.slice(s),!i))return r;let[a,...n]=i.split("?");return a+"/"+(n.length>0?`?${n.join("?")}`:"")+r}function vn(e){return e&&e!=="/"}var xn=/^\.?\//;function Dr(e,...t){let i=e||"";for(let r of t.filter(s=>vn(s)))if(i){let s=r.replace(xn,"");i=yn(i)+s}else i=r;return i}import _e from"node:assert";import at from"node:process";import Tt,{dirname as zu}from"node:path";import kn from"node:v8";import{format as En,inspect as gi}from"node:util";var Xr=new Set(Hr);function yi(e){return e.replace(/\\/g,"/")}function Yr(e,...t){try{return Promise.resolve(e(...t)).catch(i=>Mr(i))}catch(i){return Mr(i)}}function Mr(e){let t=new Error(e);return t.code=e.code,Error.captureStackTrace(t,Yr),Promise.reject(t)}var Sn=at.platform==="win32",Cn={}.hasOwnProperty,An=/^([A-Z][a-z\d]*)+$/,Pn=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),F={};function Nt(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}var Qr=new Map,In="__node_internal_",jr;F.ERR_INVALID_ARG_TYPE=X("ERR_INVALID_ARG_TYPE",(e,t,i)=>{_e(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let r="The ";if(e.endsWith(" argument"))r+=`${e} `;else{let u=e.includes(".")?"property":"argument";r+=`"${e}" ${u} `}r+="must be ";let s=[],a=[],n=[];for(let u of t)_e(typeof u=="string","All expected entries have to be of type string"),Pn.has(u)?s.push(u.toLowerCase()):An.exec(u)===null?(_e(u!=="object",'The value "object" should be written as "Object"'),n.push(u)):a.push(u);if(a.length>0){let u=s.indexOf("object");u!==-1&&(s.slice(u,1),a.push("Object"))}return s.length>0&&(r+=`${s.length>1?"one of type":"of type"} ${Nt(s,"or")}`,(a.length>0||n.length>0)&&(r+=" or ")),a.length>0&&(r+=`an instance of ${Nt(a,"or")}`,n.length>0&&(r+=" or ")),n.length>0&&(n.length>1?r+=`one of ${Nt(n,"or")}`:(n[0].toLowerCase()!==n[0]&&(r+="an "),r+=`${n[0]}`)),r+=`. Received ${Ln(i)}`,r},TypeError);F.ERR_INVALID_MODULE_SPECIFIER=X("ERR_INVALID_MODULE_SPECIFIER",(e,t,i=void 0)=>`Invalid module "${e}" ${t}${i?` imported from ${i}`:""}`,TypeError);F.ERR_INVALID_PACKAGE_CONFIG=X("ERR_INVALID_PACKAGE_CONFIG",(e,t,i)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${i?`. ${i}`:""}`,Error);F.ERR_INVALID_PACKAGE_TARGET=X("ERR_INVALID_PACKAGE_TARGET",(e,t,i,r=!1,s=void 0)=>{let a=typeof i=="string"&&!r&&i.length>0&&!i.startsWith("./");return t==="."?(_e(r===!1),`Invalid "exports" main target ${JSON.stringify(i)} defined in the package config ${e}package.json${s?` imported from ${s}`:""}${a?'; targets must start with "./"':""}`):`Invalid "${r?"imports":"exports"}" target ${JSON.stringify(i)} defined for '${t}' in the package config ${e}package.json${s?` imported from ${s}`:""}${a?'; targets must start with "./"':""}`},Error);F.ERR_MODULE_NOT_FOUND=X("ERR_MODULE_NOT_FOUND",(e,t,i="package")=>`Cannot find ${i} '${e}' imported from ${t}`,Error);F.ERR_NETWORK_IMPORT_DISALLOWED=X("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);F.ERR_PACKAGE_IMPORT_NOT_DEFINED=X("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,i)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${i}`,TypeError);F.ERR_PACKAGE_PATH_NOT_EXPORTED=X("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,i=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${i?` imported from ${i}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${i?` imported from ${i}`:""}`,Error);F.ERR_UNSUPPORTED_DIR_IMPORT=X("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);F.ERR_UNKNOWN_FILE_EXTENSION=X("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);F.ERR_INVALID_ARG_VALUE=X("ERR_INVALID_ARG_VALUE",(e,t,i="is invalid")=>{let r=gi(t);return r.length>128&&(r=`${r.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${i}. Received ${r}`},TypeError);F.ERR_UNSUPPORTED_ESM_URL_SCHEME=X("ERR_UNSUPPORTED_ESM_URL_SCHEME",(e,t)=>{let i=`Only URLs with a scheme in: ${Nt(t)} are supported by the default ESM loader`;return Sn&&e.protocol.length===2&&(i+=". On Windows, absolute paths must be valid file:// URLs"),i+=`. Received protocol '${e.protocol}'`,i},Error);function X(e,t,i){return Qr.set(e,t),Tn(i,e)}function Tn(e,t){return i;function i(...r){let s=Error.stackTraceLimit;vi()&&(Error.stackTraceLimit=0);let a=new e;vi()&&(Error.stackTraceLimit=s);let n=On(t,r,a);return Object.defineProperties(a,{message:{value:n,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Rn(a),a.code=t,a}}function vi(){try{if(kn.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):Cn.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function Nn(e){let t=In+e.name;return Object.defineProperty(e,"name",{value:t}),e}var Rn=Nn(function(e){let t=vi();return t&&(jr=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=jr),e});function On(e,t,i){let r=Qr.get(e);if(_e(r!==void 0,"expected `message` to be found"),typeof r=="function")return _e(r.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`),Reflect.apply(r,i,t);let s=/%[dfijoOs]/g,a=0;for(;s.exec(r)!==null;)a++;return _e(a===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${a}).`),t.length===0?r:(t.unshift(r),Reflect.apply(En,null,t))}function Ln(e){if(e==null)return String(e);if(typeof e=="function"&&e.name)return`function ${e.name}`;if(typeof e=="object")return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${gi(e,{depth:-1})}`;let t=gi(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}var Vn={read:Mn},Dn=Vn;function Mn(e){try{return{string:_n.readFileSync(Tt.toNamespacedPath(Tt.join(Tt.dirname(e),"package.json")),"utf8")}}catch(t){let i=t;if(i.code==="ENOENT")return{string:void 0};throw i}}var{ERR_INVALID_PACKAGE_CONFIG:jn}=F,Rt=new Map;function Jr(e,t,i){let r=Rt.get(e);if(r!==void 0)return r;let s=Dn.read(e).string;if(s===void 0){let S={pjsonPath:e,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return Rt.set(e,S),S}let a;try{a=JSON.parse(s)}catch(S){let v=S;throw new jn(e,(i?`"${t}" from `:"")+I(i||t),v.message)}let{exports:n,imports:u,main:c,name:l,type:h}=a,p={pjsonPath:e,exists:!0,main:typeof c=="string"?c:void 0,name:typeof l=="string"?l:void 0,type:h==="module"||h==="commonjs"?h:"none",exports:n,imports:u&&typeof u=="object"?u:void 0};return Rt.set(e,p),p}function _i(e){let t=new O("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let a=Jr(I(t),e);if(a.exists)return a;let n=t;if(t=new O("../package.json",t),t.pathname===n.pathname)break}let i=I(t),r={pjsonPath:i,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return Rt.set(i,r),r}function Fn(e){return _i(e).type}var{ERR_UNKNOWN_FILE_EXTENSION:Bn}=F,Un={}.hasOwnProperty,$n={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function Zn(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}var Fr={__proto__:null,"data:":Wn,"file:":zn,"http:":Br,"https:":Br,"node:"(){return"builtin"}};function Wn(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return Zn(t)}function qn(e){let t=e.pathname,i=t.length;for(;i--;){let r=t.codePointAt(i);if(r===47)return"";if(r===46)return t.codePointAt(i-1)===47?"":t.slice(i)}return""}function zn(e,t,i){let r=qn(e);if(r===".js")return Fn(e)==="module"?"module":"commonjs";let s=$n[r];if(s)return s;if(i)return;let a=I(e);throw new Bn(r,a)}function Br(){}function Gn(e,t){return Un.call(Fr,e.protocol)&&Fr[e.protocol](e,t,!0)||null}var Pt=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:Ku,ERR_INVALID_MODULE_SPECIFIER:Ot,ERR_INVALID_PACKAGE_CONFIG:es,ERR_INVALID_PACKAGE_TARGET:Hn,ERR_MODULE_NOT_FOUND:bi,ERR_PACKAGE_IMPORT_NOT_DEFINED:Kn,ERR_PACKAGE_PATH_NOT_EXPORTED:Xn,ERR_UNSUPPORTED_DIR_IMPORT:Yn,ERR_UNSUPPORTED_ESM_URL_SCHEME:Xu}=F,ts={}.hasOwnProperty,Ur=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,$r=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,Qn=/^\.|%|\\/,It=/\*/g,Jn=/%2f|%5c/i,Zr=new Set,eo=/[/\\]{2}/;function Wr(e,t,i,r,s,a,n){let u=I(r),c=eo.exec(n?e:t)!==null;at.emitWarning(`Use of deprecated ${c?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===i?"":`matched to "${i}" `}in the "${s?"imports":"exports"}" field module resolution of the package at ${u}${a?` imported from ${I(a)}`:""}.`,"DeprecationWarning","DEP0166")}function qr(e,t,i,r){if(Gn(e,{parentURL:i.href})!=="module")return;let a=I(e.href),n=I(new O(".",t)),u=I(i);r?at.emitWarning(`Package ${n} has a "main" field set to ${JSON.stringify(r)}, excluding the full filename and extension to the resolved file at "${a.slice(n.length)}", imported from ${u}.
13
- Automatic extension resolution of the "main" field isdeprecated for ES modules.`,"DeprecationWarning","DEP0151"):at.emitWarning(`No "main" or "exports" field defined in the package.json for ${n} resolving the main entry point "${a.slice(n.length)}", imported from ${u}.
14
- Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function is(e){try{return Kr(e)}catch{return new bn}}function pi(e){let t=Kr(e,{throwIfNoEntry:!1}),i=t?t.isFile():void 0;return i??!1}function to(e,t,i){let r;if(t.main!==void 0){if(r=new O(t.main,e),pi(r))return r;let n=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<n.length&&(r=new O(n[u],e),!pi(r));)r=void 0;if(r)return qr(r,e,i,t.main),r}let s=["./index.js","./index.json","./index.node"],a=-1;for(;++a<s.length&&(r=new O(s[a],e),!pi(r));)r=void 0;if(r)return qr(r,e,i,t.main),r;throw new bi(I(new O(".",e)),I(i))}function io(e,t,i){if(Jn.exec(e.pathname)!==null)throw new Ot(e.pathname,'must not include encoded "/" or "\\" characters',I(t));let r=I(e),s=is(r.endsWith("/")?r.slice(-1):r);if(s.isDirectory()){let a=new Yn(r,I(t));throw a.url=String(e),a}if(!s.isFile())throw new bi(r||e.pathname,t&&I(t),"module");if(!i){let a=mi(r),{search:n,hash:u}=e;e=Oe(a+(r.endsWith(Tt.sep)?"/":"")),e.search=n,e.hash=u}return e}function ro(e,t,i){return new Kn(e,t&&I(new O(".",t)),I(i))}function di(e,t,i){return new Xn(I(new O(".",t)),e,i&&I(i))}function so(e,t,i,r,s){let a=`request is not a valid match in pattern "${t}" for the "${r?"imports":"exports"}" resolution of ${I(i)}`;throw new Ot(e,a,s&&I(s))}function st(e,t,i,r,s){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new Hn(I(new O(".",i)),e,t,r,s&&I(s))}function ao(e,t,i,r,s,a,n,u,c){if(t!==""&&!a&&e[e.length-1]!=="/")throw st(i,e,r,n,s);if(!e.startsWith("./")){if(n&&!e.startsWith("../")&&!e.startsWith("/")){let S=!1;try{new O(e),S=!0}catch{}if(!S){let v=a?Pt.call(It,e,()=>t):e+t;return ss(v,r,c)}}throw st(i,e,r,n,s)}if(Ur.exec(e.slice(2))!==null)if($r.exec(e.slice(2))===null){if(!u){let S=a?i.replace("*",()=>t):i+t,v=a?Pt.call(It,e,()=>t):e;Wr(v,S,i,r,n,s,!0)}}else throw st(i,e,r,n,s);let l=new O(e,r),h=l.pathname,p=new O(".",r).pathname;if(!h.startsWith(p))throw st(i,e,r,n,s);if(t==="")return l;if(Ur.exec(t)!==null){let S=a?i.replace("*",()=>t):i+t;if($r.exec(t)===null){if(!u){let v=a?Pt.call(It,e,()=>t):e;Wr(v,S,i,r,n,s,!1)}}else so(S,i,r,n,s)}return a?new O(Pt.call(It,l.href,()=>t)):new O(t,l)}function no(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Le(e,t,i,r,s,a,n,u,c){if(typeof t=="string")return ao(t,i,r,e,s,a,n,u,c);if(Array.isArray(t)){let l=t;if(l.length===0)return null;let h,p=-1;for(;++p<l.length;){let S=l[p],v;try{v=Le(e,S,i,r,s,a,n,u,c)}catch(R){let L=R;if(h=L,L.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw R}if(v!==void 0){if(v===null){h=null;continue}return v}}if(h==null)return null;throw h}if(typeof t=="object"&&t!==null){let l=Object.getOwnPropertyNames(t),h=-1;for(;++h<l.length;){let p=l[h];if(no(p))throw new es(I(e),s,'"exports" cannot contain numeric property keys.')}for(h=-1;++h<l.length;){let p=l[h];if(p==="default"||c&&c.has(p)){let S=t[p],v=Le(e,S,i,r,s,a,n,u,c);if(v===void 0)continue;return v}}return null}if(t===null)return null;throw st(r,t,e,n,s)}function oo(e,t,i){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let r=Object.getOwnPropertyNames(e),s=!1,a=0,n=-1;for(;++n<r.length;){let u=r[n],c=u===""||u[0]!==".";if(a++===0)s=c;else if(s!==c)throw new es(I(t),i,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return s}function uo(e,t,i){let r=I(t);Zr.has(r+"|"+e)||(Zr.add(r+"|"+e),at.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${r}${i?` imported from ${I(i)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function zr(e,t,i,r,s){let a=i.exports;if(oo(a,e,r)&&(a={".":a}),ts.call(a,t)&&!t.includes("*")&&!t.endsWith("/")){let h=a[t],p=Le(e,h,"",t,r,!1,!1,!1,s);if(p==null)throw di(t,e,r);return p}let n="",u="",c=Object.getOwnPropertyNames(a),l=-1;for(;++l<c.length;){let h=c[l],p=h.indexOf("*");if(p!==-1&&t.startsWith(h.slice(0,p))){t.endsWith("/")&&uo(t,e,r);let S=h.slice(p+1);t.length>=h.length&&t.endsWith(S)&&rs(n,h)===1&&h.lastIndexOf("*")===p&&(n=h,u=t.slice(p,t.length-S.length))}}if(n){let h=a[n],p=Le(e,h,u,n,r,!0,!1,t.endsWith("/"),s);if(p==null)throw di(t,e,r);return p}throw di(t,e,r)}function rs(e,t){let i=e.indexOf("*"),r=t.indexOf("*"),s=i===-1?e.length:i+1,a=r===-1?t.length:r+1;return s>a?-1:a>s||i===-1?1:r===-1||e.length>t.length?-1:t.length>e.length?1:0}function co(e,t,i){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let a="is not a valid internal imports specifier name";throw new Ot(e,a,I(t))}let r,s=_i(t);if(s.exists){r=Oe(s.pjsonPath);let a=s.imports;if(a)if(ts.call(a,e)&&!e.includes("*")){let n=Le(r,a[e],"",e,t,!1,!0,!1,i);if(n!=null)return n}else{let n="",u="",c=Object.getOwnPropertyNames(a),l=-1;for(;++l<c.length;){let h=c[l],p=h.indexOf("*");if(p!==-1&&e.startsWith(h.slice(0,-1))){let S=h.slice(p+1);e.length>=h.length&&e.endsWith(S)&&rs(n,h)===1&&h.lastIndexOf("*")===p&&(n=h,u=e.slice(p,e.length-S.length))}}if(n){let h=a[n],p=Le(r,h,u,n,t,!0,!0,!1,i);if(p!=null)return p}}}throw ro(e,r,t)}function lo(e,t){let i=e.indexOf("/"),r=!0,s=!1;e[0]==="@"&&(s=!0,i===-1||e.length===0?r=!1:i=e.indexOf("/",i+1));let a=i===-1?e:e.slice(0,i);if(Qn.exec(a)!==null&&(r=!1),!r)throw new Ot(e,"is not a valid package name",I(t));let n="."+(i===-1?"":e.slice(i));return{packageName:a,packageSubpath:n,isScoped:s}}function ss(e,t,i){if(Hr.includes(e))return new O("node:"+e);let{packageName:r,packageSubpath:s,isScoped:a}=lo(e,t),n=_i(t);if(n.exists){let h=Oe(n.pjsonPath);if(n.name===r&&n.exports!==void 0&&n.exports!==null)return zr(h,s,n,t,i)}let u=new O("./node_modules/"+r+"/package.json",t),c=I(u),l;do{if(!is(c.slice(0,-13)).isDirectory()){l=c,u=new O((a?"../../../../node_modules/":"../../../node_modules/")+r+"/package.json",u),c=I(u);continue}let p=Jr(c,e,t);return p.exports!==void 0&&p.exports!==null?zr(u,s,p,t,i):s==="."?to(u,p,t):new O(s,u)}while(c.length!==l.length);throw new bi(r,I(t))}function ho(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function fo(e){return e===""?!1:e[0]==="/"?!0:ho(e)}function po(e,t,i,r){let s=t.protocol,a=s==="http:"||s==="https:",n;if(fo(e))n=new O(e,t);else if(!a&&e[0]==="#")n=co(e,t,i);else try{n=new O(e)}catch{a||(n=ss(e,t,i))}return _e(n!==void 0,"expected to be defined"),n.protocol!=="file:"?n:io(n,t,r)}function xi(e){return typeof e=="string"&&!e.startsWith("file://")?yi(e):yi(I(e))}function mo(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:Xr.has(e)?"node:"+e:"file://"+encodeURI(yi(e))}var go=new Set(["node","import"]),yo=Oe(process.cwd()),vo=[".mjs",".cjs",".js",".json"],xo=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function Gr(e,t,i){try{return po(e,t,i)}catch(r){if(!xo.has(r.code))throw r}}function _o(e,t={}){if(/(node|data|http|https):/.test(e))return e;if(Xr.has(e))return"node:"+e;if(ue(e)&&wn(e)){let u=mi(xi(e));return Oe(u).toString()}let i=t.conditions?new Set(t.conditions):go,r=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(u=>new URL(mo(u.toString())));r.length===0&&r.push(yo);let s=[...r];for(let u of r)u.protocol==="file:"&&s.push(new URL("./",u),new URL(Dr(u.pathname,"_index.js"),u),new URL("node_modules",u));let a;for(let u of s){if(a=Gr(e,u,i),a)break;for(let c of["","/index"]){for(let l of t.extensions||vo)if(a=Gr(e+c+l,u,i),a)break;if(a)break}if(a)break}if(!a){let u=new Error(`Cannot find module ${e} imported from ${s.join(", ")}`);throw u.code="ERR_MODULE_NOT_FOUND",u}let n=mi(xi(a));return Oe(n).toString()}function bo(e,t){return _o(e,t)}function wo(e,t){return xi(bo(e,t))}function as(e,t){return Yr(wo,e,t)}var So={startingFrom:".",rootPattern:/^node_modules$/,reverse:!1,test:e=>{try{if(ko(e).isFile())return!0}catch{}}};async function Co(e,t={}){let i={...So,...t},r=Yt(i.startingFrom),s=r[0]==="/",a=r.split("/").filter(Boolean);s&&(a[0]="/"+a[0]);let n=a.findIndex(u=>u.match(i.rootPattern));if(n===-1&&(n=0),i.reverse)for(let u=n+1;u<=a.length;u++){let c=xt(...a.slice(0,u),e);if(await i.test(c))return c}else for(let u=a.length;u>n;u--){let c=xt(...a.slice(0,u),e);if(await i.test(c))return c}throw new Error(`Cannot find matching ${e} in ${i.startingFrom} or parent directories`)}function Ao(e,t={}){return Co(e,t)}var Po=new Map;async function ns(e,t={}){let i=await Io(e,t),r=t.cache&&typeof t.cache!="boolean"?t.cache:Po;if(t.cache&&r.has(i))return r.get(i);let s=await Eo.readFile(i,"utf8"),a=JSON.parse(s);return r.set(i,a),a}async function Io(e=process.cwd(),t={}){let i=ue(e)?e:await as(e,t);return Ao("package.json",{startingFrom:i,...t})}var Oo="public",Lo="manifests.json",Vo="cookie-policy.html",Do="config.schema.json",Mo="manifest.schema.json";function Ve(e){console.log(Vt("yellowBright","DIST ")+Vt("bold",Ro(process.cwd(),e)))}await Gi({meta:{name:"compile-distribution",description:"Creates files used when building an Alliance distribution by reading alliance.apps in the CWD package.json."},async run(){let e=await ns(),t=e?.alliance?.apps||[];if(!t.length)throw new Error("No alliance.apps in package.json.");let i=await ki(e.alliance.apps);for(let l of i){let h=$i(l,`App '${l.name}' has an invalid manifest`);typeof h=="string"&&(pe.error(h),process.exit(1))}let r=wi(t.map(l=>({packageName:l,appImportPath:`${l}/app`,manifestImportPath:`${l}/manifest`})));Ve(r);let s=be(process.cwd(),Oo);To(s)||(No(s),Ve(s));let a=be(s,Lo);Lt(a,JSON.stringify(i)),Ve(a);let n=be(s,Vo);Lt(n,Fo(i)),Ve(n);let[u,c]=jo(s);Ve(u),Ve(c)}});function jo(e){let t=be(process.cwd(),"node_modules","@telia-ace/alliance-framework","dist"),i=be(e,Do);Lt(i,os(be(t,"config.schema.json")));let r=be(e,Mo);return Lt(r,os(be(t,"manifest.schema.json"))),[i,r]}function Fo(e){let t=[];for(let i of e)if(i.storage)for(let[r,s]of Object.entries(i.storage)){let a=Bo(r,s);t.push(a)}return Uo().replace("{APP_COOKIES}",t.join("")).trim()}function Bo(e,t){let i=["<tr>"],{category:r,purpose:s,lifespan:a}=t;return i.push(`<td>${e}</td>`),i.push(`<td>${r}</td>`),i.push(`<td>${s}</td>`),i.push(`<td>${a}</td>`),i.push("</tr>"),i.join("")}function Uo(){return`
2
+ import{a as A,c as ct,d as ht}from"./chunk-UNKGNXJ3.js";import{a as U,b as Le,e as X}from"./chunk-26VIM55J.js";import"./chunk-JG7V63GM.js";var Ti=A.enum(["necessary","functional","analytics","marketing"]),Li=A.object({purpose:A.string().describe("Purpose of the storing the value."),category:Ti.describe("Category of the storage value - necessary, functional, analytics or marketing."),lifespan:A.string().describe("Basic description of how long the value will be stored.")}),Oi=A.record(Li.describe("Key used when writing to the storage.")),Vi=A.object({value:A.string().describe("The localization token default value."),description:A.string().describe("The localization token description.")}),Di=A.object({localization:A.record(Vi.describe("Key used when getting the localized text.")).default({}).describe("Translateable texts used in the app")}),Fi=A.object({name:A.string().describe("URL friendly name of the app."),endpoints:A.string().array().default([]).describe("Endpoints that should be communicated with using the API gateway."),permissions:A.string().array().default([]).describe("Permissions that can be added to user roles."),resources:Di.default({}).describe("Resources used by the app."),storage:Oi.default({}).describe("Cookies, session storage, and local storage values that are used by the app.")}).passthrough();function lt(e,t){let i=Fi.safeParse(e);return i.success?i.data:ft(i.error.format(),t?[t]:[]).join(`
3
+ `)}function ft(e,t=[],i=""){e._errors?.length&&t.push(`${i} - ${e._errors.join(" + ")}`);for(let[s,r]of Object.entries(e))s==="_errors"||!r||typeof r!="object"||Array.isArray(r)||ft(r,t,i?`${i}.${s}`:s);return t}function Mi(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function Oe(e,t=""){let i=[];for(let s of e)for(let[r,a]of s.entries())i[r]=Math.max(i[r]||0,a.length);return e.map(s=>s.map((r,a)=>t+r[a===0?"padStart":"padEnd"](i[a])).join(" ")).join(`
4
+ `)}function B(e){return typeof e=="function"?e():e}var Q=class extends Error{constructor(t,i){super(t),this.code=i,this.name="CLIError"}},Bi=/\d/,ji=["-","_","/","."];function Ui(e=""){if(!Bi.test(e))return e.toUpperCase()===e}function pt(e,t){let i=t??ji,s=[];if(!e||typeof e!="string")return s;let r="",a,o;for(let u of e){let c=i.includes(u);if(c===!0){s.push(r),r="",a=void 0;continue}let h=Ui(u);if(o===!1){if(a===!1&&h===!0){s.push(r),r=u,a=h;continue}if(a===!0&&h===!1&&r.length>1){let l=r[r.length-1];s.push(r.slice(0,Math.max(0,r.length-1))),r=l+u,a=h;continue}}r+=u,a=h,o=c}return s.push(r),s}function $i(e){return e?e[0].toUpperCase()+e.slice(1):""}function Gi(e){return e?e[0].toLowerCase()+e.slice(1):""}function qi(e){return e?(Array.isArray(e)?e:pt(e)).map(t=>$i(t)).join(""):""}function Wi(e){return Gi(qi(e))}function Hi(e,t){return e?(Array.isArray(e)?e:pt(e)).map(i=>i.toLowerCase()).join(t??"-"):""}function Ve(e){return e==null?[]:Array.isArray(e)?e:[e]}function zi(e,t,i,s){let r,a=e[t],o=~s.string.indexOf(t)?i==null||i===!0?"":String(i):typeof i=="boolean"?i:~s.boolean.indexOf(t)?i==="false"?!1:i==="true"||(e._.push((r=+i,r*0===0?r:i)),!!i):(r=+i,r*0===0?r:i);e[t]=a==null?o:Array.isArray(a)?a.concat(o):[a,o]}function Ki(e=[],t={}){let i,s,r,a,o,u={_:[]},c=0,h=0,l=0,f=e.length,y=t.alias!==void 0,m=t.unknown!==void 0,E=t.default!==void 0;if(t.alias=t.alias||{},t.string=Ve(t.string),t.boolean=Ve(t.boolean),y)for(i in t.alias)for(s=t.alias[i]=Ve(t.alias[i]),c=0;c<s.length;c++)(t.alias[s[c]]=s.concat(i)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(s=t.alias[t.boolean[c]]||[],h=s.length;h-- >0;)t.boolean.push(s[h]);for(c=t.string.length;c-- >0;)for(s=t.alias[t.string[c]]||[],h=s.length;h-- >0;)t.string.push(s[h]);if(E){for(i in t.default)if(a=typeof t.default[i],s=t.alias[i]=t.alias[i]||[],t[a]!==void 0)for(t[a].push(i),c=0;c<s.length;c++)t[a].push(s[c])}let S=m?Object.keys(t.alias):[];for(c=0;c<f;c++){if(r=e[c],r==="--"){u._=u._.concat(e.slice(++c));break}for(h=0;h<r.length&&r.charCodeAt(h)===45;h++);if(h===0)u._.push(r);else if(r.substring(h,h+3)==="no-"){if(a=r.slice(Math.max(0,h+3)),m&&!~S.indexOf(a))return t.unknown(r);u[a]=!1}else{for(l=h+1;l<r.length&&r.charCodeAt(l)!==61;l++);for(a=r.substring(h,l),o=r.slice(Math.max(0,++l))||c+1===f||(""+e[c+1]).charCodeAt(0)===45||e[++c],s=h===2?[a]:a,l=0;l<s.length;l++){if(a=s[l],m&&!~S.indexOf(a))return t.unknown("-".repeat(h)+a);zi(u,a,l+1<s.length||o,t)}}}if(E)for(i in t.default)u[i]===void 0&&(u[i]=t.default[i]);if(y)for(i in u)for(s=t.alias[i]||[];s.length>0;)u[s.shift()]=u[i];return u}function Xi(e,t){let i={boolean:[],string:[],mixed:[],alias:{},default:{}},s=dt(t);for(let u of s)u.type!=="positional"&&(u.type==="string"?i.string.push(u.name):u.type==="boolean"&&i.boolean.push(u.name),u.default!==void 0&&(i.default[u.name]=u.default),u.alias&&(i.alias[u.name]=u.alias));let r=Ki(e,i),[...a]=r._,o=new Proxy(r,{get(u,c){return u[c]??u[Wi(c)]??u[Hi(c)]}});for(let[,u]of s.entries())if(u.type==="positional"){let c=a.shift();if(c!==void 0)o[u.name]=c;else{if(u.default===void 0&&u.required!==!1)throw new Q(`Missing required positional argument: ${u.name.toUpperCase()}`,"EARG");o[u.name]=u.default}}else if(u.required&&o[u.name]===void 0)throw new Q(`Missing required argument: --${u.name}`,"EARG");return o}function dt(e){let t=[];for(let[i,s]of Object.entries(e||{}))t.push({...s,name:i,alias:Mi(s.alias)});return t}async function mt(e,t){let i=await B(e.args||{}),s=Xi(t.rawArgs,i),r={rawArgs:t.rawArgs,args:s,data:t.data,cmd:e};typeof e.setup=="function"&&await e.setup(r);let a;try{let o=await B(e.subCommands);if(o&&Object.keys(o).length>0){let u=t.rawArgs.findIndex(h=>!h.startsWith("-")),c=t.rawArgs[u];if(c){if(!o[c])throw new Q(`Unknown command \`${c}\``,"E_UNKNOWN_COMMAND");let h=await B(o[c]);h&&await mt(h,{rawArgs:t.rawArgs.slice(u+1)})}else if(!e.run)throw new Q("No command specified.","E_NO_COMMAND")}typeof e.run=="function"&&(a=await e.run(r))}finally{typeof e.cleanup=="function"&&await e.cleanup(r)}return{result:a}}async function De(e,t,i){let s=await B(e.subCommands);if(s&&Object.keys(s).length>0){let r=t.findIndex(u=>!u.startsWith("-")),a=t[r],o=await B(s[a]);if(o)return De(o,t.slice(r+1),e)}return[e,i]}async function Qi(e,t){try{X.log(await Yi(e,t)+`
5
+ `)}catch(i){X.error(i)}}async function Yi(e,t){let i=await B(e.meta||{}),s=dt(await B(e.args||{})),r=await B(t?.meta||{}),a=`${r.name?`${r.name} `:""}`+(i.name||process.argv[1]),o=[],u=[],c=[],h=[];for(let m of s)if(m.type==="positional"){let E=m.name.toUpperCase(),S=m.required!==!1&&m.default===void 0,R=m.default?`="${m.default}"`:"";u.push(["`"+E+R+"`",m.description||""]),h.push(S?`<${E}>`:`[${E}]`)}else{let E=m.required===!0&&m.default===void 0,S=(m.type==="boolean"&&m.default===!0?[...(m.alias||[]).map(R=>`--no-${R}`),`--no-${m.name}`].join(", "):[...(m.alias||[]).map(R=>`-${R}`),`--${m.name}`].join(", "))+(m.type==="string"&&(m.valueHint||m.default)?`=${m.valueHint?`<${m.valueHint}>`:`"${m.default||""}"`}`:"");o.push(["`"+S+(E?" (required)":"")+"`",m.description||""]),E&&h.push(S)}if(e.subCommands){let m=[],E=await B(e.subCommands);for(let[S,R]of Object.entries(E)){let K=await B(R),Ni=await B(K?.meta);c.push([`\`${S}\``,Ni?.description||""]),m.push(S)}h.push(m.join("|"))}let l=[],f=i.version||r.version;l.push(U.gray(`${i.description} (${a+(f?` v${f}`:"")})`),"");let y=o.length>0||u.length>0;return l.push(`${U.underline(U.bold("USAGE"))} \`${a}${y?" [OPTIONS]":""} ${h.join(" ")}\``,""),u.length>0&&(l.push(U.underline(U.bold("ARGUMENTS")),""),l.push(Oe(u," ")),l.push("")),o.length>0&&(l.push(U.underline(U.bold("OPTIONS")),""),l.push(Oe(o," ")),l.push("")),c.length>0&&(l.push(U.underline(U.bold("COMMANDS")),""),l.push(Oe(c," ")),l.push("",`Use \`${a} <command> --help\` for more information about a command.`)),l.filter(m=>typeof m=="string").join(`
6
+ `)}async function gt(e,t={}){let i=t.rawArgs||process.argv.slice(2),s=t.showUsage||Qi;try{if(i.includes("--help")||i.includes("-h"))await s(...await De(e,i)),process.exit(0);else if(i.length===1&&i[0]==="--version"){let r=typeof e.meta=="function"?await e.meta():await e.meta;if(!r?.version)throw new Q("No version specified","E_NO_VERSION");X.log(r.version)}else await mt(e,{rawArgs:i})}catch(r){let a=r instanceof Q;a||X.error(r,`
7
+ `),a&&await s(...await De(e,i)),X.error(r.message),process.exit(1)}}import{existsSync as Jr,mkdirSync as en,readFileSync as Ri,writeFileSync as Te}from"node:fs";import{relative as tn,resolve as te}from"node:path";import{statSync as Hr,promises as zr}from"node:fs";function xt(e=""){return!e||!e.includes("\\")?e:e.replace(/\\/g,"/")}var Zi=/^[/\\]{2}/,Ji=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,es=/^[A-Za-z]:$/;var Fe=function(e){if(e.length===0)return".";e=xt(e);let t=e.match(Zi),i=q(e),s=e[e.length-1]==="/";return e=Be(e,!i),e.length===0?i?"/":s?"./":".":(s&&(e+="/"),es.test(e)&&(e+="/"),t?i?`//${e}`:`//./${e}`:i&&!q(e)?`/${e}`:e)},xe=function(...e){if(e.length===0)return".";let t;for(let i of e)i&&i.length>0&&(t===void 0?t=i:t+=`/${i}`);return t===void 0?".":Fe(t.replace(/\/\/+/g,"/"))};function ts(){return typeof process<"u"?process.cwd().replace(/\\/g,"/"):"/"}var Me=function(...e){e=e.map(s=>xt(s));let t="",i=!1;for(let s=e.length-1;s>=-1&&!i;s--){let r=s>=0?e[s]:ts();!r||r.length===0||(t=`${r}/${t}`,i=q(r))}return t=Be(t,!i),i&&!q(t)?`/${t}`:t.length>0?t:"."};function Be(e,t){let i="",s=0,r=-1,a=0,o=null;for(let u=0;u<=e.length;++u){if(u<e.length)o=e[u];else{if(o==="/")break;o="/"}if(o==="/"){if(!(r===u-1||a===1))if(a===2){if(i.length<2||s!==2||i[i.length-1]!=="."||i[i.length-2]!=="."){if(i.length>2){let c=i.lastIndexOf("/");c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf("/")),r=u,a=0;continue}else if(i.length>0){i="",s=0,r=u,a=0;continue}}t&&(i+=i.length>0?"/..":"..",s=2)}else i.length>0?i+=`/${e.slice(r+1,u)}`:i=e.slice(r+1,u),s=u-r-1;r=u,a=0}else o==="."&&a!==-1?++a:a=-1}return i}var q=function(e){return Ji.test(e)};var rs=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,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,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,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,983,6,110,6,6,9,4759,9,787719,239],Et=[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,68,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,349,41,7,1,79,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,159,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,264,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,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,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,757,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],ns="\u200C\u200D\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\u0898-\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",Ct="\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-\u1C88\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-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\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",je={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ue="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",as={5:Ue,"5module":Ue+" export import",6:Ue+" const class extends export import super"},os=/^in(stanceof)?$/,us=new RegExp("["+Ct+"]"),cs=new RegExp("["+Ct+ns+"]");function Ge(e,t){for(var i=65536,s=0;s<t.length;s+=2){if(i+=t[s],i>e)return!1;if(i+=t[s+1],i>=e)return!0}return!1}function W(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&us.test(String.fromCharCode(e)):t===!1?!1:Ge(e,Et)}function ie(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&cs.test(String.fromCharCode(e)):t===!1?!1:Ge(e,Et)||Ge(e,rs)}var b=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function T(e,t){return new b(e,{beforeExpr:!0,binop:t})}var L={beforeExpr:!0},N={startsExpr:!0},He={};function v(e,t){return t===void 0&&(t={}),t.keyword=e,He[e]=new b(e,t)}var n={num:new b("num",N),regexp:new b("regexp",N),string:new b("string",N),name:new b("name",N),privateId:new b("privateId",N),eof:new b("eof"),bracketL:new b("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new b("]"),braceL:new b("{",{beforeExpr:!0,startsExpr:!0}),braceR:new b("}"),parenL:new b("(",{beforeExpr:!0,startsExpr:!0}),parenR:new b(")"),comma:new b(",",L),semi:new b(";",L),colon:new b(":",L),dot:new b("."),question:new b("?",L),questionDot:new b("?."),arrow:new b("=>",L),template:new b("template"),invalidTemplate:new b("invalidTemplate"),ellipsis:new b("...",L),backQuote:new b("`",N),dollarBraceL:new b("${",{beforeExpr:!0,startsExpr:!0}),eq:new b("=",{beforeExpr:!0,isAssign:!0}),assign:new b("_=",{beforeExpr:!0,isAssign:!0}),incDec:new b("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new b("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:T("||",1),logicalAND:T("&&",2),bitwiseOR:T("|",3),bitwiseXOR:T("^",4),bitwiseAND:T("&",5),equality:T("==/!=/===/!==",6),relational:T("</>/<=/>=",7),bitShift:T("<</>>/>>>",8),plusMin:new b("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:T("%",10),star:T("*",10),slash:T("/",10),starstar:new b("**",{beforeExpr:!0}),coalesce:T("??",1),_break:v("break"),_case:v("case",L),_catch:v("catch"),_continue:v("continue"),_debugger:v("debugger"),_default:v("default",L),_do:v("do",{isLoop:!0,beforeExpr:!0}),_else:v("else",L),_finally:v("finally"),_for:v("for",{isLoop:!0}),_function:v("function",N),_if:v("if"),_return:v("return",L),_switch:v("switch"),_throw:v("throw",L),_try:v("try"),_var:v("var"),_const:v("const"),_while:v("while",{isLoop:!0}),_with:v("with"),_new:v("new",{beforeExpr:!0,startsExpr:!0}),_this:v("this",N),_super:v("super",N),_class:v("class",N),_extends:v("extends",L),_export:v("export"),_import:v("import",N),_null:v("null",N),_true:v("true",N),_false:v("false",N),_in:v("in",{beforeExpr:!0,binop:7}),_instanceof:v("instanceof",{beforeExpr:!0,binop:7}),_typeof:v("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:v("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:v("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},D=/\r\n?|\n|\u2028|\u2029/,hs=new RegExp(D.source,"g");function se(e){return e===10||e===13||e===8232||e===8233}function St(e,t,i){i===void 0&&(i=e.length);for(var s=t;s<i;s++){var r=e.charCodeAt(s);if(se(r))return s<i-1&&r===13&&e.charCodeAt(s+1)===10?s+2:s+1}return-1}var kt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,O=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,At=Object.prototype,ls=At.hasOwnProperty,fs=At.toString,fe=Object.hasOwn||function(e,t){return ls.call(e,t)},yt=Array.isArray||function(e){return fs.call(e)==="[object Array]"},vt=Object.create(null);function Y(e){return vt[e]||(vt[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Z(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var ps=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,he=function(t,i){this.line=t,this.column=i};he.prototype.offset=function(t){return new he(this.line,this.column+t)};var _e=function(t,i,s){this.start=i,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function Pt(e,t){for(var i=1,s=0;;){var r=St(e,s,t);if(r<0)return new he(i,t-s);++i,s=r}}var qe={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},bt=!1;function ds(e){var t={};for(var i in qe)t[i]=e&&fe(e,i)?e[i]:qe[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!bt&&typeof console=="object"&&console.warn&&(bt=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
8
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),yt(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return yt(t.onComment)&&(t.onComment=ms(t,t.onComment)),t}function ms(e,t){return function(i,s,r,a,o,u){var c={type:i?"Block":"Line",value:s,start:r,end:a};e.locations&&(c.loc=new _e(this,o,u)),e.ranges&&(c.range=[r,a]),t.push(c)}}var le=1,re=2,ze=4,It=8,Rt=16,Nt=32,Ke=64,Tt=128,pe=256,Xe=le|re|pe;function Qe(e,t){return re|(e?ze:0)|(t?It:0)}var ve=0,Ye=1,z=2,Lt=3,Ot=4,Vt=5,k=function(t,i,s){this.options=t=ds(t),this.sourceFile=t.sourceFile,this.keywords=Y(as[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=je[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=Y(r);var a=(r?r+" ":"")+je.strict;this.reservedWordsStrict=Y(a),this.reservedWordsStrictBind=Y(a+" "+je.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
9
+ `,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(D).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=n.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(le),this.regexpState=null,this.privateNameStack=[]},$={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};k.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};$.inFunction.get=function(){return(this.currentVarScope().flags&re)>0};$.inGenerator.get=function(){return(this.currentVarScope().flags&It)>0&&!this.currentVarScope().inClassFieldInit};$.inAsync.get=function(){return(this.currentVarScope().flags&ze)>0&&!this.currentVarScope().inClassFieldInit};$.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&pe)return!1;if(t.flags&re)return(t.flags&ze)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};$.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&Ke)>0||i||this.options.allowSuperOutsideMethod};$.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Tt)>0};$.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};$.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(re|pe))>0||i};$.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&pe)>0};k.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r<t.length;r++)s=t[r](s);return s};k.parse=function(t,i){return new this(i,t).parse()};k.parseExpressionAt=function(t,i,s){var r=new this(s,t,i);return r.nextToken(),r.parseExpression()};k.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(k.prototype,$);var P=k.prototype,gs=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;P.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){O.lastIndex=e,e+=O.exec(this.input)[0].length;var t=gs.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){O.lastIndex=e+t[0].length;var i=O.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||D.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,O.lastIndex=e,e+=O.exec(this.input)[0].length,this.input[e]===";"&&e++}};P.eat=function(e){return this.type===e?(this.next(),!0):!1};P.isContextual=function(e){return this.type===n.name&&this.value===e&&!this.containsEsc};P.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};P.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};P.canInsertSemicolon=function(){return this.type===n.eof||this.type===n.braceR||D.test(this.input.slice(this.lastTokEnd,this.start))};P.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};P.semicolon=function(){!this.eat(n.semi)&&!this.insertSemicolon()&&this.unexpected()};P.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};P.expect=function(e){this.eat(e)||this.unexpected()};P.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Ee=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};P.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};P.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};P.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};P.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var d=k.prototype;d.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==n.eof;){var i=this.parseStatement(null,!0,t);e.body.push(i)}if(this.inModule)for(var s=0,r=Object.keys(this.undefinedExports);s<r.length;s+=1){var a=r[s];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Ze={kind:"loop"},xs={kind:"switch"};d.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;O.lastIndex=this.pos;var t=O.exec(this.input),i=this.pos+t[0].length,s=this.input.charCodeAt(i);if(s===91||s===92)return!0;if(e)return!1;if(s===123||s>55295&&s<56320)return!0;if(W(s,!0)){for(var r=i+1;ie(s=this.input.charCodeAt(r),!0);)++r;if(s===92||s>55295&&s<56320)return!0;var a=this.input.slice(i,r);if(!os.test(a))return!0}return!1};d.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;O.lastIndex=this.pos;var e=O.exec(this.input),t=this.pos+e[0].length,i;return!D.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(ie(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};d.parseStatement=function(e,t,i){var s=this.type,r=this.startNode(),a;switch(this.isLet(e)&&(s=n._var,a="let"),s){case n._break:case n._continue:return this.parseBreakContinueStatement(r,s.keyword);case n._debugger:return this.parseDebuggerStatement(r);case n._do:return this.parseDoStatement(r);case n._for:return this.parseForStatement(r);case n._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case n._class:return e&&this.unexpected(),this.parseClass(r,!0);case n._if:return this.parseIfStatement(r);case n._return:return this.parseReturnStatement(r);case n._switch:return this.parseSwitchStatement(r);case n._throw:return this.parseThrowStatement(r);case n._try:return this.parseTryStatement(r);case n._const:case n._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(r,a);case n._while:return this.parseWhileStatement(r);case n._with:return this.parseWithStatement(r);case n.braceL:return this.parseBlock(!0,r);case n.semi:return this.parseEmptyStatement(r);case n._export:case n._import:if(this.options.ecmaVersion>10&&s===n._import){O.lastIndex=this.pos;var o=O.exec(this.input),u=this.pos+o[0].length,c=this.input.charCodeAt(u);if(c===40||c===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===n._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var h=this.value,l=this.parseExpression();return s===n.name&&l.type==="Identifier"&&this.eat(n.colon)?this.parseLabeledStatement(r,h,l,e):this.parseExpressionStatement(r,l)}};d.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(n.semi)||this.insertSemicolon()?e.label=null:this.type!==n.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var r=this.labels[s];if((e.label==null||r.name===e.label.name)&&(r.kind!=null&&(i||r.kind==="loop")||e.label&&i))break}return s===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")};d.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};d.parseDoStatement=function(e){return this.next(),this.labels.push(Ze),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(n._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(n.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};d.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ze),this.enterScope(0),this.expect(n.parenL),this.type===n.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===n._var||this.type===n._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),(this.type===n._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&s.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===n._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,s)):(t>-1&&this.unexpected(t),this.parseFor(e,s))}var a=this.isContextual("let"),o=!1,u=new Ee,c=this.parseExpression(t>-1?"await":!0,u);return this.type===n._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===n._in?t>-1&&this.unexpected(t):e.await=t>-1),a&&o&&this.raise(c.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(c,!1,u),this.checkLValPattern(c),this.parseForIn(e,c)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,c))};d.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,ce|(i?0:We),!1,t)};d.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(n._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};d.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(n.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};d.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(n.braceL),this.labels.push(xs),this.enterScope(0);for(var t,i=!1;this.type!==n.braceR;)if(this.type===n._case||this.type===n._default){var s=this.type===n._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(n.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};d.parseThrowStatement=function(e){return this.next(),D.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ys=[];d.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Nt:0),this.checkLValPattern(e,t?Ot:z),this.expect(n.parenR),e};d.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===n._catch){var t=this.startNode();this.next(),this.eat(n.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(n._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};d.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};d.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ze),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};d.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};d.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};d.parseLabeledStatement=function(e,t,i,s){for(var r=0,a=this.labels;r<a.length;r+=1){var o=a[r];o.name===t&&this.raise(i.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===n._switch?"switch":null,c=this.labels.length-1;c>=0;c--){var h=this.labels[c];if(h.statementStart===e.start)h.statementStart=this.start,h.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};d.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};d.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(n.braceL),e&&this.enterScope(0);this.type!==n.braceR;){var s=this.parseStatement(null);t.body.push(s)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};d.parseFor=function(e,t){return e.init=t,this.expect(n.semi),e.test=this.type===n.semi?null:this.parseExpression(),this.expect(n.semi),e.update=this.type===n.parenR?null:this.parseExpression(),this.expect(n.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};d.parseForIn=function(e,t){var i=this.type===n._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(n.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};d.parseVar=function(e,t,i,s){for(e.declarations=[],e.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(n.eq)?r.init=this.parseMaybeAssign(t):!s&&i==="const"&&!(this.type===n._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&r.id.type!=="Identifier"&&!(t&&(this.type===n._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):r.init=null,e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(n.comma))break}return e};d.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ye:z,!1)};var ce=1,We=2,Dt=4;d.parseFunction=function(e,t,i,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===n.star&&t&We&&this.unexpected(),e.generator=this.eat(n.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&ce&&(e.id=t&Dt&&this.type!==n.name?null:this.parseIdent(),e.id&&!(t&We)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ye:z:Lt));var a=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Qe(e.async,e.generator)),t&ce||(e.id=this.type===n.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,r),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=u,this.finishNode(e,t&ce?"FunctionDeclaration":"FunctionExpression")};d.parseFunctionParams=function(e){this.expect(n.parenL),e.params=this.parseBindingList(n.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};d.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),r=this.startNode(),a=!1;for(r.body=[],this.expect(n.braceL);this.type!==n.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(a&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),a=!0):o.key&&o.key.type==="PrivateIdentifier"&&vs(s,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};d.parseClassElement=function(e){if(this.eat(n.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,a=!1,o="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(n.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===n.star?u=!0:s="static"}if(i.static=u,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===n.star)&&!this.canInsertSemicolon()?a=!0:s="async"),!s&&(t>=9||!a)&&this.eat(n.star)&&(r=!0),!s&&!a&&!r){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=c:s=c)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===n.parenL||o!=="method"||r||a){var h=!i.static&&be(i,"constructor"),l=h&&e;h&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=h?"constructor":o,this.parseClassMethod(i,r,a,l)}else this.parseClassField(i);return i};d.isClassElementNameStart=function(){return this.type===n.name||this.type===n.privateId||this.type===n.num||this.type===n.string||this.type===n.bracketL||this.type.keyword};d.parseClassElementName=function(e){this.type===n.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};d.parseClassMethod=function(e,t,i,s){var r=e.key;e.kind==="constructor"?(t&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):e.static&&be(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,i,s);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};d.parseClassField=function(e){if(be(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&be(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(n.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};d.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(pe|Ke);this.type!==n.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};d.parseClassId=function(e,t){this.type===n.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,z,!1)):(t===!0&&this.unexpected(),e.id=null)};d.parseClassSuper=function(e){e.superClass=this.eat(n._extends)?this.parseExprSubscripts(null,!1):null};d.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};d.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=s===0?null:this.privateNameStack[s-1],a=0;a<i.length;++a){var o=i[a];fe(t,o.name)||(r?r.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}};function vs(e,t){var i=t.key.name,s=e[i],r="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(r=(t.static?"s":"i")+t.kind),s==="iget"&&r==="iset"||s==="iset"&&r==="iget"||s==="sget"&&r==="sset"||s==="sset"&&r==="sget"?(e[i]="true",!1):s?!0:(e[i]=r,!1)}function be(e,t){var i=e.computed,s=e.key;return!i&&(s.type==="Identifier"&&s.name===t||s.type==="Literal"&&s.value===t)}d.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==n.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};d.parseExport=function(e,t){if(this.next(),this.eat(n.star))return this.parseExportAllDeclaration(e,t);if(this.eat(n._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==n.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,s=e.specifiers;i<s.length;i+=1){var r=s[i];this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal"&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};d.parseExportDeclaration=function(e){return this.parseStatement(null)};d.parseExportDefaultDeclaration=function(){var e;if(this.type===n._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,ce|Dt,!1,e)}else if(this.type===n._class){var i=this.startNode();return this.parseClass(i,"nullableID")}else{var s=this.parseMaybeAssign();return this.semicolon(),s}};d.checkExport=function(e,t,i){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),fe(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)};d.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier")this.checkExport(e,t,t.start);else if(i==="ObjectPattern")for(var s=0,r=t.properties;s<r.length;s+=1){var a=r[s];this.checkPatternExport(e,a)}else if(i==="ArrayPattern")for(var o=0,u=t.elements;o<u.length;o+=1){var c=u[o];c&&this.checkPatternExport(e,c)}else i==="Property"?this.checkPatternExport(e,t.value):i==="AssignmentPattern"?this.checkPatternExport(e,t.left):i==="RestElement"&&this.checkPatternExport(e,t.argument)};d.checkVariableExport=function(e,t){if(e)for(var i=0,s=t;i<s.length;i+=1){var r=s[i];this.checkPatternExport(e,r.id)}};d.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};d.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};d.parseExportSpecifiers=function(e){var t=[],i=!0;for(this.expect(n.braceL);!this.eat(n.braceR);){if(i)i=!1;else if(this.expect(n.comma),this.afterTrailingComma(n.braceR))break;t.push(this.parseExportSpecifier(e))}return t};d.parseImport=function(e){return this.next(),this.type===n.string?(e.specifiers=ys,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===n.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};d.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,z),this.finishNode(e,"ImportSpecifier")};d.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,z),this.finishNode(e,"ImportDefaultSpecifier")};d.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,z),this.finishNode(e,"ImportNamespaceSpecifier")};d.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===n.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(n.comma)))return e;if(this.type===n.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(n.braceL);!this.eat(n.braceR);){if(t)t=!1;else if(this.expect(n.comma),this.afterTrailingComma(n.braceR))break;e.push(this.parseImportSpecifier())}return e};d.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===n.string){var e=this.parseLiteral(this.value);return ps.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};d.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};d.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var F=k.prototype;F.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=e.properties;s<r.length;s+=1){var a=r[s];this.toAssignable(a,t),a.type==="RestElement"&&(a.argument.type==="ArrayPattern"||a.argument.type==="ObjectPattern")&&this.raise(a.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return e};F.toAssignableList=function(e,t){for(var i=e.length,s=0;s<i;s++){var r=e[s];r&&this.toAssignable(r,t)}if(i){var a=e[i-1];this.options.ecmaVersion===6&&t&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return e};F.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};F.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==n.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};F.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case n.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(n.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case n.braceL:return this.parseObj(!0)}return this.parseIdent()};F.parseBindingList=function(e,t,i,s){for(var r=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(n.comma),t&&this.type===n.comma)r.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===n.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),r.push(o),this.type===n.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else r.push(this.parseAssignableListItem(s))}return r};F.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};F.parseBindingListItem=function(e){return e};F.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(n.eq))return i;var s=this.startNodeAt(e,t);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")};F.checkLValSimple=function(e,t,i){t===void 0&&(t=ve);var s=t!==ve;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode"),s&&(t===z&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(fe(i,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),i[e.name]=!0),t!==Vt&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}};F.checkLValPattern=function(e,t,i){switch(t===void 0&&(t=ve),e.type){case"ObjectPattern":for(var s=0,r=e.properties;s<r.length;s+=1){var a=r[s];this.checkLValInnerPattern(a,t,i)}break;case"ArrayPattern":for(var o=0,u=e.elements;o<u.length;o+=1){var c=u[o];c&&this.checkLValInnerPattern(c,t,i)}break;default:this.checkLValSimple(e,t,i)}};F.checkLValInnerPattern=function(e,t,i){switch(t===void 0&&(t=ve),e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var j=function(t,i,s,r,a){this.token=t,this.isExpr=!!i,this.preserveSpace=!!s,this.override=r,this.generator=!!a},_={b_stat:new j("{",!1),b_expr:new j("{",!0),b_tmpl:new j("${",!1),p_stat:new j("(",!1),p_expr:new j("(",!0),q_tmpl:new j("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new j("function",!1),f_expr:new j("function",!0),f_expr_gen:new j("function",!0,!1,null,!0),f_gen:new j("function",!1,!1,null,!0)},ne=k.prototype;ne.initialContext=function(){return[_.b_stat]};ne.curContext=function(){return this.context[this.context.length-1]};ne.braceIsBlock=function(e){var t=this.curContext();return t===_.f_expr||t===_.f_stat?!0:e===n.colon&&(t===_.b_stat||t===_.b_expr)?!t.isExpr:e===n._return||e===n.name&&this.exprAllowed?D.test(this.input.slice(this.lastTokEnd,this.start)):e===n._else||e===n.semi||e===n.eof||e===n.parenR||e===n.arrow?!0:e===n.braceL?t===_.b_stat:e===n._var||e===n._const||e===n.name?!1:!this.exprAllowed};ne.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};ne.updateContext=function(e){var t,i=this.type;i.keyword&&e===n.dot?this.exprAllowed=!1:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr};ne.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};n.parenR.updateContext=n.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===_.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};n.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?_.b_stat:_.b_expr),this.exprAllowed=!0};n.dollarBraceL.updateContext=function(){this.context.push(_.b_tmpl),this.exprAllowed=!0};n.parenL.updateContext=function(e){var t=e===n._if||e===n._for||e===n._with||e===n._while;this.context.push(t?_.p_stat:_.p_expr),this.exprAllowed=!0};n.incDec.updateContext=function(){};n._function.updateContext=n._class.updateContext=function(e){e.beforeExpr&&e!==n._else&&!(e===n.semi&&this.curContext()!==_.p_stat)&&!(e===n._return&&D.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===n.colon||e===n.braceL)&&this.curContext()===_.b_stat)?this.context.push(_.f_expr):this.context.push(_.f_stat),this.exprAllowed=!1};n.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};n.backQuote.updateContext=function(){this.curContext()===_.q_tmpl?this.context.pop():this.context.push(_.q_tmpl),this.exprAllowed=!1};n.star.updateContext=function(e){if(e===n._function){var t=this.context.length-1;this.context[t]===_.f_expr?this.context[t]=_.f_expr_gen:this.context[t]=_.f_gen}this.exprAllowed=!0};n.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==n.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var g=k.prototype;g.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var s=e.key,r;switch(s.type){case"Identifier":r=s.name;break;case"Literal":r=String(s.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){r==="__proto__"&&a==="init"&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),t.proto=!0);return}r="$"+r;var o=t[r];if(o){var u;a==="init"?u=this.strict&&o.init||o.get||o.set:u=o.init||o[a],u&&this.raiseRecoverable(s.start,"Redefinition of property")}else o=t[r]={init:!1,get:!1,set:!1};o[a]=!0}};g.parseExpression=function(e,t){var i=this.start,s=this.startLoc,r=this.parseMaybeAssign(e,t);if(this.type===n.comma){var a=this.startNodeAt(i,s);for(a.expressions=[r];this.eat(n.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return r};g.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var s=!1,r=-1,a=-1,o=-1;t?(r=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Ee,s=!0);var u=this.start,c=this.startLoc;(this.type===n.parenL||this.type===n.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var h=this.parseMaybeConditional(e,t);if(i&&(h=i.call(this,h,u,c)),this.type.isAssign){var l=this.startNodeAt(u,c);return l.operator=this.value,this.type===n.eq&&(h=this.toAssignable(h,!1,t)),s||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=h.start&&(t.shorthandAssign=-1),this.type===n.eq?this.checkLValPattern(h):this.checkLValSimple(h),l.left=h,this.next(),l.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(l,"AssignmentExpression")}else s&&this.checkExpressionErrors(t,!0);return r>-1&&(t.parenthesizedAssign=r),a>-1&&(t.trailingComma=a),h};g.parseMaybeConditional=function(e,t){var i=this.start,s=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(this.eat(n.question)){var a=this.startNodeAt(i,s);return a.test=r,a.consequent=this.parseMaybeAssign(),this.expect(n.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return r};g.parseExprOps=function(e,t){var i=this.start,s=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||r.start===i&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,i,s,-1,e)};g.parseExprOp=function(e,t,i,s,r){var a=this.type.binop;if(a!=null&&(!r||this.type!==n._in)&&a>s){var o=this.type===n.logicalOR||this.type===n.logicalAND,u=this.type===n.coalesce;u&&(a=n.logicalAND.binop);var c=this.value;this.next();var h=this.start,l=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),h,l,a,r),y=this.buildBinary(t,i,e,f,c,o||u);return(o&&this.type===n.coalesce||u&&(this.type===n.logicalOR||this.type===n.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(y,t,i,s,r)}return e};g.buildBinary=function(e,t,i,s,r,a){s.type==="PrivateIdentifier"&&this.raise(s.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(e,t);return o.left=i,o.operator=r,o.right=s,this.finishNode(o,a?"LogicalExpression":"BinaryExpression")};g.parseMaybeUnary=function(e,t,i,s){var r=this.start,a=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(s),t=!0;else if(this.type.prefix){var u=this.startNode(),c=this.type===n.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,c,s),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&u.argument.type==="Identifier"?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&Ft(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,o=this.finishNode(u,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===n.privateId)(s||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==n._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,s),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var h=this.startNodeAt(r,a);h.operator=this.value,h.prefix=!1,h.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(h,"UpdateExpression")}}if(!i&&this.eat(n.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(r,a,o,this.parseMaybeUnary(null,!1,!1,s),"**",!1);else return o};function Ft(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Ft(e.expression)}g.parseExprSubscripts=function(e,t){var i=this.start,s=this.startLoc,r=this.parseExprAtom(e,t);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;var a=this.parseSubscripts(r,i,s,!1,t);return e&&a.type==="MemberExpression"&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a};g.parseSubscripts=function(e,t,i,s,r){for(var a=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var u=this.parseSubscript(e,t,i,s,a,o,r);if(u.optional&&(o=!0),u===e||u.type==="ArrowFunctionExpression"){if(o){var c=this.startNodeAt(t,i);c.expression=u,u=this.finishNode(c,"ChainExpression")}return u}e=u}};g.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(n.arrow)};g.parseSubscriptAsyncArrow=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!0,s)};g.parseSubscript=function(e,t,i,s,r,a,o){var u=this.options.ecmaVersion>=11,c=u&&this.eat(n.questionDot);s&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var h=this.eat(n.bracketL);if(h||c&&this.type!==n.parenL&&this.type!==n.backQuote||this.eat(n.dot)){var l=this.startNodeAt(t,i);l.object=e,h?(l.property=this.parseExpression(),this.expect(n.bracketR)):this.type===n.privateId&&e.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!h,u&&(l.optional=c),e=this.finishNode(l,"MemberExpression")}else if(!s&&this.eat(n.parenL)){var f=new Ee,y=this.yieldPos,m=this.awaitPos,E=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var S=this.parseExprList(n.parenR,this.options.ecmaVersion>=8,!1,f);if(r&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=y,this.awaitPos=m,this.awaitIdentPos=E,this.parseSubscriptAsyncArrow(t,i,S,o);this.checkExpressionErrors(f,!0),this.yieldPos=y||this.yieldPos,this.awaitPos=m||this.awaitPos,this.awaitIdentPos=E||this.awaitIdentPos;var R=this.startNodeAt(t,i);R.callee=e,R.arguments=S,u&&(R.optional=c),e=this.finishNode(R,"CallExpression")}else if(this.type===n.backQuote){(c||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var K=this.startNodeAt(t,i);K.tag=e,K.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(K,"TaggedTemplateExpression")}return e};g.parseExprAtom=function(e,t,i){this.type===n.slash&&this.readRegexp();var s,r=this.potentialArrowAt===this.start;switch(this.type){case n._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type===n.parenL&&!this.allowDirectSuper&&this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==n.dot&&this.type!==n.bracketL&&this.type!==n.parenL&&this.unexpected(),this.finishNode(s,"Super");case n._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case n.name:var a=this.start,o=this.startLoc,u=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(n._function))return this.overrideContext(_.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(n.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===n.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(n.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case n.regexp:var h=this.value;return s=this.parseLiteral(h.value),s.regex={pattern:h.pattern,flags:h.flags},s;case n.num:case n.string:return this.parseLiteral(this.value);case n._null:case n._true:case n._false:return s=this.startNode(),s.value=this.type===n._null?null:this.type===n._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case n.parenL:var l=this.start,f=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),f;case n.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(n.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case n.braceL:return this.overrideContext(_.b_expr),this.parseObj(!1,e);case n._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case n._class:return this.parseClass(this.startNode(),!1);case n._new:return this.parseNew();case n.backQuote:return this.parseTemplate();case n._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};g.parseExprAtomDefault=function(){this.unexpected()};g.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var i=this.parseIdent(!0);if(this.type===n.parenL&&!e)return this.parseDynamicImport(t);if(this.type===n.dot)return t.meta=i,this.parseImportMeta(t);this.unexpected()};g.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(n.parenR)){var t=this.start;this.eat(n.comma)&&this.eat(n.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};g.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};g.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};g.parseParenExpression=function(){this.expect(n.parenL);var e=this.parseExpression();return this.expect(n.parenR),e};g.shouldParseArrow=function(e){return!this.canInsertSemicolon()};g.parseParenAndDistinguishExpression=function(e,t){var i=this.start,s=this.startLoc,r,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,u=this.startLoc,c=[],h=!0,l=!1,f=new Ee,y=this.yieldPos,m=this.awaitPos,E;for(this.yieldPos=0,this.awaitPos=0;this.type!==n.parenR;)if(h?h=!1:this.expect(n.comma),a&&this.afterTrailingComma(n.parenR,!0)){l=!0;break}else if(this.type===n.ellipsis){E=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===n.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,f,this.parseParenItem));var S=this.lastTokEnd,R=this.lastTokEndLoc;if(this.expect(n.parenR),e&&this.shouldParseArrow(c)&&this.eat(n.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=y,this.awaitPos=m,this.parseParenArrowList(i,s,c,t);(!c.length||l)&&this.unexpected(this.lastTokStart),E&&this.unexpected(E),this.checkExpressionErrors(f,!0),this.yieldPos=y||this.yieldPos,this.awaitPos=m||this.awaitPos,c.length>1?(r=this.startNodeAt(o,u),r.expressions=c,this.finishNodeAt(r,"SequenceExpression",S,R)):r=c[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var K=this.startNodeAt(i,s);return K.expression=r,this.finishNode(K,"ParenthesizedExpression")}else return r};g.parseParenItem=function(e){return e};g.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,s)};var bs=[];g.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===n.dot){var t=this.startNodeAt(e.start,e.startLoc);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(n.parenL)?e.arguments=this.parseExprList(n.parenR,this.options.ecmaVersion>=8,!1):e.arguments=bs,this.finishNode(e,"NewExpression")};g.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===n.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
10
+ `),cooked:this.value},this.next(),i.tail=this.type===n.backQuote,this.finishNode(i,"TemplateElement")};g.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===n.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(n.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(n.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};g.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===n.name||this.type===n.num||this.type===n.string||this.type===n.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===n.star)&&!D.test(this.input.slice(this.lastTokEnd,this.start))};g.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(n.braceR);){if(s)s=!1;else if(this.expect(n.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(n.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,r,t),i.properties.push(a)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};g.parseProperty=function(e,t){var i=this.startNode(),s,r,a,o;if(this.options.ecmaVersion>=9&&this.eat(n.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===n.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===n.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(s=this.eat(n.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(n.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,a,o,t,u),this.finishNode(i,"Property")};g.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};g.parsePropertyValue=function(e,t,i,s,r,a,o,u){(i||s)&&this.type===n.colon&&this.unexpected(),this.eat(n.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===n.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,s)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==n.comma&&this.type!==n.braceR&&this.type!==n.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,a,this.copyNode(e.key)):this.type===n.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};g.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(n.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(n.bracketR),e.key;e.computed=!1}return e.key=this.type===n.num||this.type===n.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};g.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};g.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Qe(t,s.generator)|Ke|(i?Tt:0)),this.expect(n.parenL),s.params=this.parseBindingList(n.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};g.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(Qe(i,!1)|Rt),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};g.parseFunctionBody=function(e,t,i,s){var r=t&&this.type!==n.braceL,a=this.strict,o=!1;if(r)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||u)&&(o=this.strictDirective(this.end),o&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Vt),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};g.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1){var s=i[t];if(s.type!=="Identifier")return!1}return!0};g.checkParams=function(e,t){for(var i=Object.create(null),s=0,r=e.params;s<r.length;s+=1){var a=r[s];this.checkLValInnerPattern(a,Ye,t?null:i)}};g.parseExprList=function(e,t,i,s){for(var r=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(n.comma),t&&this.afterTrailingComma(e))break;var o=void 0;i&&this.type===n.comma?o=null:this.type===n.ellipsis?(o=this.parseSpread(s),s&&this.type===n.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):o=this.parseMaybeAssign(!1,s),r.push(o)}return r};g.checkUnreserved=function(e){var t=e.start,i=e.end,s=e.name;if(this.inGenerator&&s==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&s==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&s==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(s==="arguments"||s==="await")&&this.raise(t,"Cannot use "+s+" in class static initialization block"),this.keywords.test(s)&&this.raise(t,"Unexpected keyword '"+s+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,i).indexOf("\\")!==-1)){var r=this.strict?this.reservedWordsStrict:this.reservedWords;r.test(s)&&(!this.inAsync&&s==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+s+"' is reserved"))}};g.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};g.parseIdentNode=function(){var e=this.startNode();return this.type===n.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=n.name):this.unexpected(),e};g.parsePrivateIdent=function(){var e=this.startNode();return this.type===n.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};g.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===n.semi||this.canInsertSemicolon()||this.type!==n.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(n.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};g.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var we=k.prototype;we.raise=function(e,t){var i=Pt(this.input,e);t+=" ("+i.line+":"+i.column+")";var s=new SyntaxError(t);throw s.pos=e,s.loc=i,s.raisedAt=this.pos,s};we.raiseRecoverable=we.raise;we.curPosition=function(){if(this.options.locations)return new he(this.curLine,this.pos-this.lineStart)};var J=k.prototype,ws=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};J.enterScope=function(e){this.scopeStack.push(new ws(e))};J.exitScope=function(){this.scopeStack.pop()};J.treatFunctionsAsVarInScope=function(e){return e.flags&re||!this.inModule&&e.flags&le};J.declareName=function(e,t,i){var s=!1;if(t===z){var r=this.currentScope();s=r.lexical.indexOf(e)>-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&r.flags&le&&delete this.undefinedExports[e]}else if(t===Ot){var a=this.currentScope();a.lexical.push(e)}else if(t===Lt){var o=this.currentScope();this.treatFunctionsAsVar?s=o.lexical.indexOf(e)>-1:s=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var c=this.scopeStack[u];if(c.lexical.indexOf(e)>-1&&!(c.flags&Nt&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){s=!0;break}if(c.var.push(e),this.inModule&&c.flags&le&&delete this.undefinedExports[e],c.flags&Xe)break}s&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};J.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};J.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};J.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Xe)return t}};J.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Xe&&!(t.flags&Rt))return t}};var Ce=function(t,i,s){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new _e(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},de=k.prototype;de.startNode=function(){return new Ce(this,this.start,this.startLoc)};de.startNodeAt=function(e,t){return new Ce(this,e,t)};function Mt(e,t,i,s){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=i),e}de.finishNode=function(e,t){return Mt.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};de.finishNodeAt=function(e,t,i,s){return Mt.call(this,e,t,i,s)};de.copyNode=function(e){var t=new Ce(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var Bt="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",jt=Bt+" Extended_Pictographic",Ut=jt,$t=Ut+" EBase EComp EMod EPres ExtPict",Gt=$t,_s=Gt,Es={9:Bt,10:jt,11:Ut,12:$t,13:Gt,14:_s},Cs="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Ss={9:"",10:"",11:"",12:"",13:"",14:Cs},wt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",qt="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Wt=qt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ht=Wt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",zt=Ht+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Kt=zt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ks=Kt+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",As={9:qt,10:Wt,11:Ht,12:zt,13:Kt,14:ks},Xt={};function Ps(e){var t=Xt[e]={binary:Y(Es[e]+" "+wt),binaryOfStrings:Y(Ss[e]),nonBinary:{General_Category:Y(wt),Script:Y(As[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(ye=0,$e=[9,10,11,12,13,14];ye<$e.length;ye+=1)_t=$e[ye],Ps(_t);var _t,ye,$e,p=k.prototype,G=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Xt[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};G.prototype.reset=function(t,i,s){var r=s.indexOf("v")!==-1,a=s.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=s,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)};G.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};G.prototype.at=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return-1;var a=s.charCodeAt(t);if(!(i||this.switchU)||a<=55295||a>=57344||t+1>=r)return a;var o=s.charCodeAt(t+1);return o>=56320&&o<=57343?(a<<10)+o-56613888:a};G.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return r;var a=s.charCodeAt(t),o;return!(i||this.switchU)||a<=55295||a>=57344||t+1>=r||(o=s.charCodeAt(t+1))<56320||o>57343?t+1:t+2};G.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};G.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};G.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};G.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};G.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var s=this.pos,r=0,a=t;r<a.length;r+=1){var o=a[r],u=this.at(s,i);if(u===-1||u!==o)return!1;s=this.nextIndex(s,i)}return this.pos=s,!0};p.validateRegExpFlags=function(e){for(var t=e.validFlags,i=e.flags,s=!1,r=!1,a=0;a<i.length;a++){var o=i.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,"Invalid regular expression flag"),i.indexOf(o,a+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(s=!0),o==="v"&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(e.start,"Invalid regular expression flag")};p.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};p.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var s=i[t];e.groupNames.indexOf(s)===-1&&e.raise("Invalid named capture referenced")}};p.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};p.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};p.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};p.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};p.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};p.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};p.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return r!==-1&&r<s&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=i}return!1};p.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};p.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};p.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1};p.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};p.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};p.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};p.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Qt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Qt(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}p.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!Qt(i);)e.advance();return e.pos!==t};p.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};p.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};p.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};p.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Z(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Z(e.lastIntValue);return!0}return!1};p.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),Is(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function Is(e){return W(e,!0)||e===36||e===95}p.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),Rs(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function Rs(e){return ie(e,!0)||e===36||e===95||e===8204||e===8205}p.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};p.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};p.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};p.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};p.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};p.regexp_eatZero=function(e){return e.current()===48&&!Se(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};p.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};p.regexp_eatControlLetter=function(e){var t=e.current();return Yt(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Yt(e){return e>=65&&e<=90||e>=97&&e<=122}p.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(s&&r>=55296&&r<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(r-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=r}return!0}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ns(e.lastIntValue))return!0;s&&e.raise("Invalid unicode escape"),e.pos=i}return!1};function Ns(e){return e>=0&&e<=1114111}p.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};p.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var Zt=0,H=1,V=2;p.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Ts(t))return e.lastIntValue=-1,e.advance(),H;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var s;if(e.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&s===V&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return Zt};function Ts(e){return e===100||e===68||e===115||e===83||e===119||e===87}p.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,s),H}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r)}return Zt};p.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){fe(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};p.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return H;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return V;e.raise("Invalid property name")};p.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Jt(t=e.current());)e.lastStringValue+=Z(t),e.advance();return e.lastStringValue!==""};function Jt(e){return Yt(e)||e===95}p.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Ls(t=e.current());)e.lastStringValue+=Z(t),e.advance();return e.lastStringValue!==""};function Ls(e){return Jt(e)||Se(e)}p.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};p.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===V&&e.raise("Negated character class may contain strings"),!0}return!1};p.regexp_classContents=function(e){return e.current()===93?H:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),H)};p.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};p.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||ii(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return s!==93?(e.lastIntValue=s,e.advance(),!0):!1};p.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};p.regexp_classSetExpression=function(e){var t=H,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===V&&(t=V);for(var s=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==V&&(t=H);continue}e.raise("Invalid character in character class")}if(s!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(s!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===V&&(t=V)}};p.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;return i!==-1&&s!==-1&&i>s&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};p.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?H:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};p.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),s=this.regexp_classContents(e);if(e.eat(93))return i&&s===V&&e.raise("Negated character class may contain strings"),s;e.pos=t}if(e.eat(92)){var r=this.regexp_eatCharacterClassEscape(e);if(r)return r;e.pos=t}return null};p.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};p.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===V&&(t=V);return t};p.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?H:V};p.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&Os(i)||Vs(i)?!1:(e.advance(),e.lastIntValue=i,!0)};function Os(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Vs(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}p.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Ds(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Ds(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}p.regexp_eatClassControlLetter=function(e){var t=e.current();return Se(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};p.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};p.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Se(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function Se(e){return e>=48&&e<=57}p.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;ei(i=e.current());)e.lastIntValue=16*e.lastIntValue+ti(i),e.advance();return e.pos!==t};function ei(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function ti(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}p.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};p.regexp_eatOctalDigit=function(e){var t=e.current();return ii(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function ii(e){return e>=48&&e<=55}p.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var s=0;s<t;++s){var r=e.current();if(!ei(r))return e.pos=i,!1;e.lastIntValue=16*e.lastIntValue+ti(r),e.advance()}return!0};var Je=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new _e(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},x=k.prototype;x.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Je(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};x.getToken=function(){return this.next(),new Je(this)};typeof Symbol<"u"&&(x[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===n.eof,value:t}}}});x.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(n.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};x.readToken=function(e){return W(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};x.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};x.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=t;(s=St(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};x.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!se(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition())};x.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&kt.test(String.fromCharCode(e)))++this.pos;else break e}}};x.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};x.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(n.ellipsis)):(++this.pos,this.finishToken(n.dot))};x.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(n.assign,2):this.finishOp(n.slash,1)};x.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,s=e===42?n.star:n.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,s=n.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(n.assign,i+1):this.finishOp(s,i)};x.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(n.assign,3)}return this.finishOp(e===124?n.logicalOR:n.logicalAND,2)}return t===61?this.finishOp(n.assign,2):this.finishOp(e===124?n.bitwiseOR:n.bitwiseAND,1)};x.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(n.assign,2):this.finishOp(n.bitwiseXOR,1)};x.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||D.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(n.incDec,2):t===61?this.finishOp(n.assign,2):this.finishOp(n.plusMin,1)};x.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(n.assign,i+1):this.finishOp(n.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(n.relational,i))};x.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(n.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(n.arrow)):this.finishOp(e===61?n.eq:n.prefix,1)};x.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(n.questionDot,2)}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(n.assign,3)}return this.finishOp(n.coalesce,2)}}return this.finishOp(n.question,1)};x.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),W(t,!0)||t===92))return this.finishToken(n.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Z(t)+"'")};x.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(n.parenL);case 41:return++this.pos,this.finishToken(n.parenR);case 59:return++this.pos,this.finishToken(n.semi);case 44:return++this.pos,this.finishToken(n.comma);case 91:return++this.pos,this.finishToken(n.bracketL);case 93:return++this.pos,this.finishToken(n.bracketR);case 123:return++this.pos,this.finishToken(n.braceL);case 125:return++this.pos,this.finishToken(n.braceR);case 58:return++this.pos,this.finishToken(n.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(n.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(n.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Z(e)+"'")};x.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};x.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(D.test(s)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(s==="[")t=!0;else if(s==="]"&&t)t=!1;else if(s==="/"&&!t)break;e=s==="\\"}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var u=this.regexpState||(this.regexpState=new G(this));u.reset(i,r,o),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var c=null;try{c=new RegExp(r,o)}catch{}return this.finishToken(n.regexp,{pattern:r,flags:o,value:c})};x.readInt=function(e,t,i){for(var s=this.options.ecmaVersion>=12&&t===void 0,r=i&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,u=0,c=0,h=t??1/0;c<h;++c,++this.pos){var l=this.input.charCodeAt(this.pos),f=void 0;if(s&&l===95){r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),c===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=l;continue}if(l>=97?f=l-97+10:l>=65?f=l-65+10:l>=48&&l<=57?f=l-48:f=1/0,f>=e)break;u=l,o=o*e+f}return s&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||t!=null&&this.pos-a!==t?null:o};function Fs(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function si(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}x.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=si(this.input.slice(t,this.pos)),++this.pos):W(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(n.num,i)};x.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&s===110){var r=si(this.input.slice(t,this.pos));return++this.pos,W(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(n.num,r)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),s===46&&!i&&(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),(s===69||s===101)&&!i&&(s=this.input.charCodeAt(++this.pos),(s===43||s===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),W(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=Fs(this.input.slice(t,this.pos),i);return this.finishToken(n.num,a)};x.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};x.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;s===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):s===8232||s===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(se(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(n.string,t)};var ri={};x.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===ri)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};x.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ri;this.raise(e,t)};x.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===n.template||this.type===n.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(n.dollarBraceL)):(++this.pos,this.finishToken(n.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(n.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(se(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
11
+ `;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};x.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(n.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")};x.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
12
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Z(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return se(t)?"":String.fromCharCode(t)}};x.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};x.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(ie(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?W:ie)(o,s)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=Z(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};x.readWord=function(){var e=this.readWord1(),t=n.name;return this.keywords.test(e)&&(t=He[e]),this.finishToken(t,e)};var Ms="8.11.2";k.acorn={Parser:k,version:Ms,defaultOptions:qe,Position:he,SourceLocation:_e,getLineInfo:Pt,Node:Ce,TokenType:b,tokTypes:n,keywordTypes:He,TokContext:j,tokContexts:_,isIdentifierChar:ie,isIdentifierStart:W,Token:Je,isNewLine:se,lineBreak:D,lineBreakG:hs,nonASCIIwhitespace:kt};import{builtinModules as xi,createRequire as On}from"node:module";import qs,{realpathSync as it,statSync as yi,Stats as Ws,promises as Dn,existsSync as Hs}from"node:fs";import{fileURLToPath as w,URL as C,pathToFileURL as ae}from"node:url";var In=String.fromCharCode;var Bs=/\/$|\/\?|\/#/;function js(e="",t){return t?Bs.test(e):e.endsWith("/")}function Us(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(js(e,!0))return e||"/";let i=e,s="",r=e.indexOf("#");if(r>=0&&(i=e.slice(0,r),s=e.slice(r),!i))return s;let[a,...o]=i.split("?");return a+"/"+(o.length>0?`?${o.join("?")}`:"")+s}function $s(e){return e&&e!=="/"}var Gs=/^\.?\//;function ni(e,...t){let i=e||"";for(let s of t.filter(r=>$s(r)))if(i){let r=s.replace(Gs,"");i=Us(i)+r}else i=s;return i}import ee from"node:assert";import ge from"node:process";import Pe,{dirname as Gn}from"node:path";import zs from"node:v8";import{format as Ks,inspect as st}from"node:util";var vi=new Set(xi);function rt(e){return e.replace(/\\/g,"/")}function bi(e,...t){try{return Promise.resolve(e(...t)).catch(i=>ai(i))}catch(i){return ai(i)}}function ai(e){let t=new Error(e);return t.code=e.code,Error.captureStackTrace(t,bi),Promise.reject(t)}var Xs=ge.platform==="win32",Qs={}.hasOwnProperty,Ys=/^([A-Z][a-z\d]*)+$/,Zs=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),I={};function Ie(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}var wi=new Map,Js="__node_internal_",oi;I.ERR_INVALID_ARG_TYPE=M("ERR_INVALID_ARG_TYPE",(e,t,i)=>{ee(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let s="The ";if(e.endsWith(" argument"))s+=`${e} `;else{let u=e.includes(".")?"property":"argument";s+=`"${e}" ${u} `}s+="must be ";let r=[],a=[],o=[];for(let u of t)ee(typeof u=="string","All expected entries have to be of type string"),Zs.has(u)?r.push(u.toLowerCase()):Ys.exec(u)===null?(ee(u!=="object",'The value "object" should be written as "Object"'),o.push(u)):a.push(u);if(a.length>0){let u=r.indexOf("object");u!==-1&&(r.slice(u,1),a.push("Object"))}return r.length>0&&(s+=`${r.length>1?"one of type":"of type"} ${Ie(r,"or")}`,(a.length>0||o.length>0)&&(s+=" or ")),a.length>0&&(s+=`an instance of ${Ie(a,"or")}`,o.length>0&&(s+=" or ")),o.length>0&&(o.length>1?s+=`one of ${Ie(o,"or")}`:(o[0].toLowerCase()!==o[0]&&(s+="an "),s+=`${o[0]}`)),s+=`. Received ${rr(i)}`,s},TypeError);I.ERR_INVALID_MODULE_SPECIFIER=M("ERR_INVALID_MODULE_SPECIFIER",(e,t,i=void 0)=>`Invalid module "${e}" ${t}${i?` imported from ${i}`:""}`,TypeError);I.ERR_INVALID_PACKAGE_CONFIG=M("ERR_INVALID_PACKAGE_CONFIG",(e,t,i)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${i?`. ${i}`:""}`,Error);I.ERR_INVALID_PACKAGE_TARGET=M("ERR_INVALID_PACKAGE_TARGET",(e,t,i,s=!1,r=void 0)=>{let a=typeof i=="string"&&!s&&i.length>0&&!i.startsWith("./");return t==="."?(ee(s===!1),`Invalid "exports" main target ${JSON.stringify(i)} defined in the package config ${e}package.json${r?` imported from ${r}`:""}${a?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${JSON.stringify(i)} defined for '${t}' in the package config ${e}package.json${r?` imported from ${r}`:""}${a?'; targets must start with "./"':""}`},Error);I.ERR_MODULE_NOT_FOUND=M("ERR_MODULE_NOT_FOUND",(e,t,i="package")=>`Cannot find ${i} '${e}' imported from ${t}`,Error);I.ERR_NETWORK_IMPORT_DISALLOWED=M("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);I.ERR_PACKAGE_IMPORT_NOT_DEFINED=M("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,i)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${i}`,TypeError);I.ERR_PACKAGE_PATH_NOT_EXPORTED=M("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,i=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${i?` imported from ${i}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${i?` imported from ${i}`:""}`,Error);I.ERR_UNSUPPORTED_DIR_IMPORT=M("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);I.ERR_UNKNOWN_FILE_EXTENSION=M("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);I.ERR_INVALID_ARG_VALUE=M("ERR_INVALID_ARG_VALUE",(e,t,i="is invalid")=>{let s=st(t);return s.length>128&&(s=`${s.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${i}. Received ${s}`},TypeError);I.ERR_UNSUPPORTED_ESM_URL_SCHEME=M("ERR_UNSUPPORTED_ESM_URL_SCHEME",(e,t)=>{let i=`Only URLs with a scheme in: ${Ie(t)} are supported by the default ESM loader`;return Xs&&e.protocol.length===2&&(i+=". On Windows, absolute paths must be valid file:// URLs"),i+=`. Received protocol '${e.protocol}'`,i},Error);function M(e,t,i){return wi.set(e,t),er(i,e)}function er(e,t){return i;function i(...s){let r=Error.stackTraceLimit;nt()&&(Error.stackTraceLimit=0);let a=new e;nt()&&(Error.stackTraceLimit=r);let o=sr(t,s,a);return Object.defineProperties(a,{message:{value:o,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),ir(a),a.code=t,a}}function nt(){try{if(zs.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):Qs.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function tr(e){let t=Js+e.name;return Object.defineProperty(e,"name",{value:t}),e}var ir=tr(function(e){let t=nt();return t&&(oi=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=oi),e});function sr(e,t,i){let s=wi.get(e);if(ee(s!==void 0,"expected `message` to be found"),typeof s=="function")return ee(s.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${s.length}).`),Reflect.apply(s,i,t);let r=/%[dfijoOs]/g,a=0;for(;r.exec(s)!==null;)a++;return ee(a===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${a}).`),t.length===0?s:(t.unshift(s),Reflect.apply(Ks,null,t))}function rr(e){if(e==null)return String(e);if(typeof e=="function"&&e.name)return`function ${e.name}`;if(typeof e=="object")return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${st(e,{depth:-1})}`;let t=st(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}var nr={read:or},ar=nr;function or(e){try{return{string:qs.readFileSync(Pe.toNamespacedPath(Pe.join(Pe.dirname(e),"package.json")),"utf8")}}catch(t){let i=t;if(i.code==="ENOENT")return{string:void 0};throw i}}var{ERR_INVALID_PACKAGE_CONFIG:ur}=I,Re=new Map;function _i(e,t,i){let s=Re.get(e);if(s!==void 0)return s;let r=ar.read(e).string;if(r===void 0){let y={pjsonPath:e,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return Re.set(e,y),y}let a;try{a=JSON.parse(r)}catch(y){let m=y;throw new ur(e,(i?`"${t}" from `:"")+w(i||t),m.message)}let{exports:o,imports:u,main:c,name:h,type:l}=a,f={pjsonPath:e,exists:!0,main:typeof c=="string"?c:void 0,name:typeof h=="string"?h:void 0,type:l==="module"||l==="commonjs"?l:"none",exports:o,imports:u&&typeof u=="object"?u:void 0};return Re.set(e,f),f}function ot(e){let t=new C("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let a=_i(w(t),e);if(a.exists)return a;let o=t;if(t=new C("../package.json",t),t.pathname===o.pathname)break}let i=w(t),s={pjsonPath:i,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return Re.set(i,s),s}function cr(e){return ot(e).type}var{ERR_UNKNOWN_FILE_EXTENSION:hr}=I,lr={}.hasOwnProperty,fr={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function pr(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}var ui={__proto__:null,"data:":dr,"file:":gr,"http:":ci,"https:":ci,"node:"(){return"builtin"}};function dr(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return pr(t)}function mr(e){let t=e.pathname,i=t.length;for(;i--;){let s=t.codePointAt(i);if(s===47)return"";if(s===46)return t.codePointAt(i-1)===47?"":t.slice(i)}return""}function gr(e,t,i){let s=mr(e);if(s===".js")return cr(e)==="module"?"module":"commonjs";let r=fr[s];if(r)return r;if(i)return;let a=w(e);throw new hr(s,a)}function ci(){}function xr(e,t){return lr.call(ui,e.protocol)&&ui[e.protocol](e,t,!0)||null}var ke=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:Hn,ERR_INVALID_MODULE_SPECIFIER:Ne,ERR_INVALID_PACKAGE_CONFIG:Ei,ERR_INVALID_PACKAGE_TARGET:yr,ERR_MODULE_NOT_FOUND:ut,ERR_PACKAGE_IMPORT_NOT_DEFINED:vr,ERR_PACKAGE_PATH_NOT_EXPORTED:br,ERR_UNSUPPORTED_DIR_IMPORT:wr,ERR_UNSUPPORTED_ESM_URL_SCHEME:zn}=I,Ci={}.hasOwnProperty,hi=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,li=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,_r=/^\.|%|\\/,Ae=/\*/g,Er=/%2f|%5c/i,fi=new Set,Cr=/[/\\]{2}/;function pi(e,t,i,s,r,a,o){let u=w(s),c=Cr.exec(o?e:t)!==null;ge.emitWarning(`Use of deprecated ${c?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===i?"":`matched to "${i}" `}in the "${r?"imports":"exports"}" field module resolution of the package at ${u}${a?` imported from ${w(a)}`:""}.`,"DeprecationWarning","DEP0166")}function di(e,t,i,s){if(xr(e,{parentURL:i.href})!=="module")return;let a=w(e.href),o=w(new C(".",t)),u=w(i);s?ge.emitWarning(`Package ${o} has a "main" field set to ${JSON.stringify(s)}, excluding the full filename and extension to the resolved file at "${a.slice(o.length)}", imported from ${u}.
13
+ Automatic extension resolution of the "main" field isdeprecated for ES modules.`,"DeprecationWarning","DEP0151"):ge.emitWarning(`No "main" or "exports" field defined in the package.json for ${o} resolving the main entry point "${a.slice(o.length)}", imported from ${u}.
14
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function Si(e){try{return yi(e)}catch{return new Ws}}function et(e){let t=yi(e,{throwIfNoEntry:!1}),i=t?t.isFile():void 0;return i??!1}function Sr(e,t,i){let s;if(t.main!==void 0){if(s=new C(t.main,e),et(s))return s;let o=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<o.length&&(s=new C(o[u],e),!et(s));)s=void 0;if(s)return di(s,e,i,t.main),s}let r=["./index.js","./index.json","./index.node"],a=-1;for(;++a<r.length&&(s=new C(r[a],e),!et(s));)s=void 0;if(s)return di(s,e,i,t.main),s;throw new ut(w(new C(".",e)),w(i))}function kr(e,t,i){if(Er.exec(e.pathname)!==null)throw new Ne(e.pathname,'must not include encoded "/" or "\\" characters',w(t));let s=w(e),r=Si(s.endsWith("/")?s.slice(-1):s);if(r.isDirectory()){let a=new wr(s,w(t));throw a.url=String(e),a}if(!r.isFile())throw new ut(s||e.pathname,t&&w(t),"module");if(!i){let a=it(s),{search:o,hash:u}=e;e=ae(a+(s.endsWith(Pe.sep)?"/":"")),e.search=o,e.hash=u}return e}function Ar(e,t,i){return new vr(e,t&&w(new C(".",t)),w(i))}function tt(e,t,i){return new br(w(new C(".",t)),e,i&&w(i))}function Pr(e,t,i,s,r){let a=`request is not a valid match in pattern "${t}" for the "${s?"imports":"exports"}" resolution of ${w(i)}`;throw new Ne(e,a,r&&w(r))}function me(e,t,i,s,r){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new yr(w(new C(".",i)),e,t,s,r&&w(r))}function Ir(e,t,i,s,r,a,o,u,c){if(t!==""&&!a&&e[e.length-1]!=="/")throw me(i,e,s,o,r);if(!e.startsWith("./")){if(o&&!e.startsWith("../")&&!e.startsWith("/")){let y=!1;try{new C(e),y=!0}catch{}if(!y){let m=a?ke.call(Ae,e,()=>t):e+t;return Ai(m,s,c)}}throw me(i,e,s,o,r)}if(hi.exec(e.slice(2))!==null)if(li.exec(e.slice(2))===null){if(!u){let y=a?i.replace("*",()=>t):i+t,m=a?ke.call(Ae,e,()=>t):e;pi(m,y,i,s,o,r,!0)}}else throw me(i,e,s,o,r);let h=new C(e,s),l=h.pathname,f=new C(".",s).pathname;if(!l.startsWith(f))throw me(i,e,s,o,r);if(t==="")return h;if(hi.exec(t)!==null){let y=a?i.replace("*",()=>t):i+t;if(li.exec(t)===null){if(!u){let m=a?ke.call(Ae,e,()=>t):e;pi(m,y,i,s,o,r,!1)}}else Pr(y,i,s,o,r)}return a?new C(ke.call(Ae,h.href,()=>t)):new C(t,h)}function Rr(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function oe(e,t,i,s,r,a,o,u,c){if(typeof t=="string")return Ir(t,i,s,e,r,a,o,u,c);if(Array.isArray(t)){let h=t;if(h.length===0)return null;let l,f=-1;for(;++f<h.length;){let y=h[f],m;try{m=oe(e,y,i,s,r,a,o,u,c)}catch(E){let S=E;if(l=S,S.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw E}if(m!==void 0){if(m===null){l=null;continue}return m}}if(l==null)return null;throw l}if(typeof t=="object"&&t!==null){let h=Object.getOwnPropertyNames(t),l=-1;for(;++l<h.length;){let f=h[l];if(Rr(f))throw new Ei(w(e),r,'"exports" cannot contain numeric property keys.')}for(l=-1;++l<h.length;){let f=h[l];if(f==="default"||c&&c.has(f)){let y=t[f],m=oe(e,y,i,s,r,a,o,u,c);if(m===void 0)continue;return m}}return null}if(t===null)return null;throw me(s,t,e,o,r)}function Nr(e,t,i){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let s=Object.getOwnPropertyNames(e),r=!1,a=0,o=-1;for(;++o<s.length;){let u=s[o],c=u===""||u[0]!==".";if(a++===0)r=c;else if(r!==c)throw new Ei(w(t),i,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return r}function Tr(e,t,i){let s=w(t);fi.has(s+"|"+e)||(fi.add(s+"|"+e),ge.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${i?` imported from ${w(i)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function mi(e,t,i,s,r){let a=i.exports;if(Nr(a,e,s)&&(a={".":a}),Ci.call(a,t)&&!t.includes("*")&&!t.endsWith("/")){let l=a[t],f=oe(e,l,"",t,s,!1,!1,!1,r);if(f==null)throw tt(t,e,s);return f}let o="",u="",c=Object.getOwnPropertyNames(a),h=-1;for(;++h<c.length;){let l=c[h],f=l.indexOf("*");if(f!==-1&&t.startsWith(l.slice(0,f))){t.endsWith("/")&&Tr(t,e,s);let y=l.slice(f+1);t.length>=l.length&&t.endsWith(y)&&ki(o,l)===1&&l.lastIndexOf("*")===f&&(o=l,u=t.slice(f,t.length-y.length))}}if(o){let l=a[o],f=oe(e,l,u,o,s,!0,!1,t.endsWith("/"),r);if(f==null)throw tt(t,e,s);return f}throw tt(t,e,s)}function ki(e,t){let i=e.indexOf("*"),s=t.indexOf("*"),r=i===-1?e.length:i+1,a=s===-1?t.length:s+1;return r>a?-1:a>r||i===-1?1:s===-1||e.length>t.length?-1:t.length>e.length?1:0}function Lr(e,t,i){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let a="is not a valid internal imports specifier name";throw new Ne(e,a,w(t))}let s,r=ot(t);if(r.exists){s=ae(r.pjsonPath);let a=r.imports;if(a)if(Ci.call(a,e)&&!e.includes("*")){let o=oe(s,a[e],"",e,t,!1,!0,!1,i);if(o!=null)return o}else{let o="",u="",c=Object.getOwnPropertyNames(a),h=-1;for(;++h<c.length;){let l=c[h],f=l.indexOf("*");if(f!==-1&&e.startsWith(l.slice(0,-1))){let y=l.slice(f+1);e.length>=l.length&&e.endsWith(y)&&ki(o,l)===1&&l.lastIndexOf("*")===f&&(o=l,u=e.slice(f,e.length-y.length))}}if(o){let l=a[o],f=oe(s,l,u,o,t,!0,!0,!1,i);if(f!=null)return f}}}throw Ar(e,s,t)}function Or(e,t){let i=e.indexOf("/"),s=!0,r=!1;e[0]==="@"&&(r=!0,i===-1||e.length===0?s=!1:i=e.indexOf("/",i+1));let a=i===-1?e:e.slice(0,i);if(_r.exec(a)!==null&&(s=!1),!s)throw new Ne(e,"is not a valid package name",w(t));let o="."+(i===-1?"":e.slice(i));return{packageName:a,packageSubpath:o,isScoped:r}}function Ai(e,t,i){if(xi.includes(e))return new C("node:"+e);let{packageName:s,packageSubpath:r,isScoped:a}=Or(e,t),o=ot(t);if(o.exists){let l=ae(o.pjsonPath);if(o.name===s&&o.exports!==void 0&&o.exports!==null)return mi(l,r,o,t,i)}let u=new C("./node_modules/"+s+"/package.json",t),c=w(u),h;do{if(!Si(c.slice(0,-13)).isDirectory()){h=c,u=new C((a?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",u),c=w(u);continue}let f=_i(c,e,t);return f.exports!==void 0&&f.exports!==null?mi(u,r,f,t,i):r==="."?Sr(u,f,t):new C(r,u)}while(c.length!==h.length);throw new ut(s,w(t))}function Vr(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Dr(e){return e===""?!1:e[0]==="/"?!0:Vr(e)}function Fr(e,t,i,s){let r=t.protocol,a=r==="http:"||r==="https:",o;if(Dr(e))o=new C(e,t);else if(!a&&e[0]==="#")o=Lr(e,t,i);else try{o=new C(e)}catch{a||(o=Ai(e,t,i))}return ee(o!==void 0,"expected to be defined"),o.protocol!=="file:"?o:kr(o,t,s)}function at(e){return typeof e=="string"&&!e.startsWith("file://")?rt(e):rt(w(e))}function Mr(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:vi.has(e)?"node:"+e:"file://"+encodeURI(rt(e))}var Br=new Set(["node","import"]),jr=ae(process.cwd()),Ur=[".mjs",".cjs",".js",".json"],$r=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function gi(e,t,i){try{return Fr(e,t,i)}catch(s){if(!$r.has(s.code))throw s}}function Gr(e,t={}){if(/(node|data|http|https):/.test(e))return e;if(vi.has(e))return"node:"+e;if(q(e)&&Hs(e)){let u=it(at(e));return ae(u).toString()}let i=t.conditions?new Set(t.conditions):Br,s=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(u=>new URL(Mr(u.toString())));s.length===0&&s.push(jr);let r=[...s];for(let u of s)u.protocol==="file:"&&r.push(new URL("./",u),new URL(ni(u.pathname,"_index.js"),u),new URL("node_modules",u));let a;for(let u of r){if(a=gi(e,u,i),a)break;for(let c of["","/index"]){for(let h of t.extensions||Ur)if(a=gi(e+c+h,u,i),a)break;if(a)break}if(a)break}if(!a){let u=new Error(`Cannot find module ${e} imported from ${r.join(", ")}`);throw u.code="ERR_MODULE_NOT_FOUND",u}let o=it(at(a));return ae(o).toString()}function qr(e,t){return Gr(e,t)}function Wr(e,t){return at(qr(e,t))}function Pi(e,t){return bi(Wr,e,t)}var Kr={startingFrom:".",rootPattern:/^node_modules$/,reverse:!1,test:e=>{try{if(Hr(e).isFile())return!0}catch{}}};async function Xr(e,t={}){let i={...Kr,...t},s=Me(i.startingFrom),r=s[0]==="/",a=s.split("/").filter(Boolean);r&&(a[0]="/"+a[0]);let o=a.findIndex(u=>u.match(i.rootPattern));if(o===-1&&(o=0),i.reverse)for(let u=o+1;u<=a.length;u++){let c=xe(...a.slice(0,u),e);if(await i.test(c))return c}else for(let u=a.length;u>o;u--){let c=xe(...a.slice(0,u),e);if(await i.test(c))return c}throw new Error(`Cannot find matching ${e} in ${i.startingFrom} or parent directories`)}function Qr(e,t={}){return Xr(e,t)}var Yr=new Map;async function Ii(e,t={}){let i=await Zr(e,t),s=t.cache&&typeof t.cache!="boolean"?t.cache:Yr;if(t.cache&&s.has(i))return s.get(i);let r=await zr.readFile(i,"utf8"),a=JSON.parse(r);return s.set(i,a),a}async function Zr(e=process.cwd(),t={}){let i=q(e)?e:await Pi(e,t);return Qr("package.json",{startingFrom:i,...t})}var sn="public",rn="manifests.json",nn="cookie-policy.html",an="config.schema.json",on="manifest.schema.json";function ue(e){console.log(Le("yellowBright","DIST ")+Le("bold",tn(process.cwd(),e)))}await gt({meta:{name:"compile-distribution",description:"Creates files used when building an Alliance distribution by reading alliance.apps in the CWD package.json."},async run(){let e=await Ii(),t=e?.alliance?.apps||[];if(!t.length)throw new Error("No alliance.apps in package.json.");let i=await ht(e.alliance.apps);for(let h of i){let l=lt(h,`App '${h.name}' has an invalid manifest`);typeof l=="string"&&(X.error(l),process.exit(1))}let s=ct(t.map(h=>({packageName:h,appImportPath:`${h}/app`,manifestImportPath:`${h}/manifest`})));ue(s);let r=te(process.cwd(),sn);Jr(r)||(en(r),ue(r));let a=te(r,rn);Te(a,JSON.stringify(i)),ue(a);let o=te(r,nn);Te(o,cn(i)),ue(o);let[u,c]=un(r);ue(u),ue(c)}});function un(e){let t=te(process.cwd(),"node_modules","@telia-ace/alliance-framework","dist"),i=te(e,an);Te(i,Ri(te(t,"config.schema.json")));let s=te(e,on);return Te(s,Ri(te(t,"manifest.schema.json"))),[i,s]}function cn(e){let t=[];for(let i of e)if(i.storage)for(let[s,r]of Object.entries(i.storage)){let a=hn(s,r);t.push(a)}return ln().replace("{APP_COOKIES}",t.join("")).trim()}function hn(e,t){let i=["<tr>"],{category:s,purpose:r,lifespan:a}=t;return i.push(`<td>${e}</td>`),i.push(`<td>${s}</td>`),i.push(`<td>${r}</td>`),i.push(`<td>${a}</td>`),i.push("</tr>"),i.join("")}function ln(){return`
15
15
  <!DOCTYPE html>
16
16
  <html lang="en">
17
17
  <head>