@batijs/core 0.0.61 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -4,4 +4,4 @@ import"module";import*as e from"tty";import*as t from"util";import*as r from"os"
|
|
|
4
4
|
|| ${o} === "boolean" || ${s} === null`).assign(l,i._`[${s}]`)}}n.else(),d(e),n.endIf(),n.if(i._`${l} !== undefined`,(()=>{n.assign(s,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(i._`${t} !== undefined`,(()=>e.assign(i._`${t}[${r}]`,n)))}(e,l)}))}(e,t,l):d(e)}))}return p};const u=new Set(["string","number","integer","boolean","null"]);function l(e,t,r,n=a.Correct){const s=n===a.Correct?i.operators.EQ:i.operators.NEQ;let o;switch(e){case"null":return i._`${t} ${s} null`;case"array":o=i._`Array.isArray(${t})`;break;case"object":o=i._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=u(i._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=u();break;default:return i._`typeof ${t} ${s} ${e}`}return n===a.Correct?o:(0,i.not)(o);function u(e=i.nil){return(0,i.and)(i._`typeof ${t} == "number"`,e,r?i._`isFinite(${t})`:i.nil)}}function c(e,t,r,n){if(1===e.length)return l(e[0],t,r,n);let a;const o=(0,s.toHash)(e);if(o.array&&o.object){const e=i._`typeof ${t} != "object"`;a=o.null?e:i._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else a=i.nil;o.number&&delete o.integer;for(const e in o)a=(0,i.and)(a,l(e,t,r,n));return a}e.checkDataType=l,e.checkDataTypes=c;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?i._`{type: ${e}}`:i._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,s.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,n.reportError)(t,p)}e.reportTypeError=d}(dz);var xz,bz={};var Sz,Tz,Ez={},vz={};function Pz(){if(Sz)return vz;Sz=1,Object.defineProperty(vz,"__esModule",{value:!0}),vz.validateUnion=vz.validateArray=vz.usePattern=vz.callValidateCode=vz.schemaProperties=vz.allSchemaProperties=vz.noPropertyInData=vz.propertyInData=vz.isOwnProperty=vz.hasPropFunc=vz.reportMissingProp=vz.checkMissingProp=vz.checkReportMissingProp=void 0;const e=iz(),t=sz,r=cz(),n=sz;function i(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function s(t,r,n){return e._`${i(t)}.call(${r}, ${n})`}function a(t,r,n,i){const a=e._`${r}${(0,e.getProperty)(n)} === undefined`;return i?(0,e.or)(a,(0,e.not)(s(t,r,n))):a}function o(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}vz.checkReportMissingProp=function(t,r){const{gen:n,data:i,it:s}=t;n.if(a(n,i,r,s.opts.ownProperties),(()=>{t.setParams({missingProperty:e._`${r}`},!0),t.error()}))},vz.checkMissingProp=function({gen:t,data:r,it:{opts:n}},i,s){return(0,e.or)(...i.map((i=>(0,e.and)(a(t,r,i,n.ownProperties),e._`${s} = ${i}`))))},vz.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},vz.hasPropFunc=i,vz.isOwnProperty=s,vz.propertyInData=function(t,r,n,i){const a=e._`${r}${(0,e.getProperty)(n)} !== undefined`;return i?e._`${a} && ${s(t,r,n)}`:a},vz.noPropertyInData=a,vz.allSchemaProperties=o,vz.schemaProperties=function(e,r){return o(r).filter((n=>!(0,t.alwaysValidSchema)(e,r[n])))},vz.callValidateCode=function({schemaCode:t,data:n,it:{gen:i,topSchemaRef:s,schemaPath:a,errorPath:o},it:u},l,c,p){const d=p?e._`${t}, ${n}, ${s}${a}`:n,h=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,o)],[r.default.parentData,u.parentData],[r.default.parentDataProperty,u.parentDataProperty],[r.default.rootData,r.default.rootData]];u.opts.dynamicRef&&h.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const f=e._`${d}, ${i.object(...h)}`;return c!==e.nil?e._`${l}.call(${c}, ${f})`:e._`${l}(${f})`};const u=e._`new RegExp`;return vz.usePattern=function({gen:t,it:{opts:r}},i){const s=r.unicodeRegExp?"u":"",{regExp:a}=r.code,o=a(i,s);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:e._`${"new RegExp"===a.code?u:(0,n.useFunc)(t,a)}(${i}, ${s})`})},vz.validateArray=function(r){const{gen:n,data:i,keyword:s,it:a}=r,o=n.name("valid");if(a.allErrors){const e=n.let("valid",!0);return u((()=>n.assign(e,!1))),e}return n.var(o,!0),u((()=>n.break())),o;function u(a){const u=n.const("len",e._`${i}.length`);n.forRange("i",0,u,(i=>{r.subschema({keyword:s,dataProp:i,dataPropType:t.Type.Num},o),n.if((0,e.not)(o),a)}))}},vz.validateUnion=function(r){const{gen:n,schema:i,keyword:s,it:a}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");if(i.some((e=>(0,t.alwaysValidSchema)(a,e)))&&!a.opts.unevaluated)return;const o=n.let("valid",!1),u=n.name("_valid");n.block((()=>i.forEach(((t,i)=>{const a=r.subschema({keyword:s,schemaProp:i,compositeRule:!0},u);n.assign(o,e._`${o} || ${u}`);r.mergeValidEvaluated(a,u)||n.if((0,e.not)(o))})))),r.result(o,(()=>r.reset()),(()=>r.error(!0)))},vz}function Az(){if(Tz)return Ez;Tz=1,Object.defineProperty(Ez,"__esModule",{value:!0}),Ez.validateKeywordUsage=Ez.validSchemaType=Ez.funcKeywordCode=Ez.macroKeywordCode=void 0;const e=iz(),t=cz(),r=Pz(),n=pz();function i(t){const{gen:r,data:n,it:i}=t;r.if(i.parentData,(()=>r.assign(n,e._`${i.parentData}[${i.parentDataProperty}]`)))}function s(t,r,n){if(void 0===n)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,e.stringify)(n)})}return Ez.macroKeywordCode=function(t,r){const{gen:n,keyword:i,schema:a,parentSchema:o,it:u}=t,l=r.macro.call(u.self,a,o,u),c=s(n,i,l);!1!==u.opts.validateSchema&&u.self.validateSchema(l,!0);const p=n.name("valid");t.subschema({schema:l,schemaPath:e.nil,errSchemaPath:`${u.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},p),t.pass(p,(()=>t.error(!0)))},Ez.funcKeywordCode=function(a,o){var u;const{gen:l,keyword:c,schema:p,parentSchema:d,$data:h,it:f}=a;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,o);const m=!h&&o.compile?o.compile.call(f.self,p,d,f):o.validate,y=s(l,c,m),g=l.let("valid");function x(n=(o.async?e._`await `:e.nil)){const i=f.opts.passContext?t.default.this:t.default.self,s=!("compile"in o&&!h||!1===o.schema);l.assign(g,e._`${n}${(0,r.callValidateCode)(a,y,i,s)}`,o.modifying)}function b(t){var r;l.if((0,e.not)(null!==(r=o.valid)&&void 0!==r?r:g),t)}a.block$data(g,(function(){if(!1===o.errors)x(),o.modifying&&i(a),b((()=>a.error()));else{const r=o.async?function(){const t=l.let("ruleErrs",null);return l.try((()=>x(e._`await `)),(r=>l.assign(g,!1).if(e._`${r} instanceof ${f.ValidationError}`,(()=>l.assign(t,e._`${r}.errors`)),(()=>l.throw(r))))),t}():function(){const t=e._`${y}.errors`;return l.assign(t,null),x(e.nil),t}();o.modifying&&i(a),b((()=>function(r,i){const{gen:s}=r;s.if(e._`Array.isArray(${i})`,(()=>{s.assign(t.default.vErrors,e._`${t.default.vErrors} === null ? ${i} : ${t.default.vErrors}.concat(${i})`).assign(t.default.errors,e._`${t.default.vErrors}.length`),(0,n.extendErrors)(r)}),(()=>r.error()))}(a,r)))}})),a.ok(null!==(u=o.valid)&&void 0!==u?u:g)},Ez.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},Ez.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const a=i.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(i.validateSchema){if(!i.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},Ez}var Dz,Cz={};var wz={},kz=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;0!=i--;){var a=s[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r},Iz={exports:{}},Nz=Iz.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),Fz(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function Fz(e,t,r,n,i,s,a,o,u,l){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var c in t(n,i,s,a,o,u,l),n){var p=n[c];if(Array.isArray(p)){if(c in Nz.arrayKeywords)for(var d=0;d<p.length;d++)Fz(e,t,r,p[d],i+"/"+c+"/"+d,s,i,c,n,d)}else if(c in Nz.propsKeywords){if(p&&"object"==typeof p)for(var h in p)Fz(e,t,r,p[h],i+"/"+c+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,c,n,h)}else(c in Nz.keywords||e.allKeys&&!(c in Nz.skipKeywords))&&Fz(e,t,r,p,i+"/"+c,s,i,c,n)}r(n,i,s,a,o,u,l)}}Nz.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Nz.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Nz.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Nz.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var _z=Iz.exports;Object.defineProperty(wz,"__esModule",{value:!0}),wz.getSchemaRefs=wz.resolveUrl=wz.normalizeId=wz._getFullPath=wz.getFullPath=wz.inlineRef=void 0;const Oz=sz,Lz=kz,Mz=_z,Bz=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);wz.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!Rz(e):!!t&&Uz(e)<=t)};const jz=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Rz(e){for(const t in e){if(jz.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(Rz))return!0;if("object"==typeof r&&Rz(r))return!0}return!1}function Uz(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!Bz.has(r)&&("object"==typeof e[r]&&(0,Oz.eachItem)(e[r],(e=>t+=Uz(e))),t===1/0))return 1/0}return t}function $z(e,t="",r){!1!==r&&(t=Kz(t));const n=e.parse(t);return Vz(e,n)}function Vz(e,t){return e.serialize(t).split("#")[0]+"#"}wz.getFullPath=$z,wz._getFullPath=Vz;const qz=/#\/?$/;function Kz(e){return e?e.replace(qz,""):""}wz.normalizeId=Kz,wz.resolveUrl=function(e,t,r){return r=Kz(r),e.resolve(t,r)};const Jz=/^[a-z_][-a-z0-9._]*$/i;var Wz;function Xz(){if(Wz)return HH;Wz=1,Object.defineProperty(HH,"__esModule",{value:!0}),HH.getData=HH.KeywordCxt=HH.validateFunctionCode=void 0;const e=function(){if(uz)return zH;uz=1,Object.defineProperty(zH,"__esModule",{value:!0}),zH.boolOrEmptySchema=zH.topBoolOrEmptySchema=void 0;const e=pz(),t=iz(),r=cz(),n={message:"boolean schema is false"};function i(t,r){const{gen:i,data:s}=t,a={gen:i,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,e.reportError)(a,n,void 0,r)}return zH.topBoolOrEmptySchema=function(e){const{gen:n,schema:s,validateName:a}=e;!1===s?i(e,!1):"object"==typeof s&&!0===s.$async?n.return(r.default.data):(n.assign(t._`${a}.errors`,null),n.return(!0))},zH.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),i(e)):r.var(t,!0)},zH}(),t=dz,r=gz(),n=dz,i=function(){if(xz)return bz;xz=1,Object.defineProperty(bz,"__esModule",{value:!0}),bz.assignDefaults=void 0;const e=iz(),t=sz;function r(r,n,i){const{gen:s,compositeRule:a,data:o,opts:u}=r;if(void 0===i)return;const l=e._`${o}${(0,e.getProperty)(n)}`;if(a)return void(0,t.checkStrictMode)(r,`default is ignored for: ${l}`);let c=e._`${l} === undefined`;"empty"===u.useDefaults&&(c=e._`${c} || ${l} === null || ${l} === ""`),s.if(c,e._`${l} = ${(0,e.stringify)(i)}`)}return bz.assignDefaults=function(e,t){const{properties:n,items:i}=e.schema;if("object"===t&&n)for(const t in n)r(e,t,n[t].default);else"array"===t&&Array.isArray(i)&&i.forEach(((t,n)=>r(e,n,t.default)))},bz}(),s=Az(),a=function(){if(Dz)return Cz;Dz=1,Object.defineProperty(Cz,"__esModule",{value:!0}),Cz.extendSubschemaMode=Cz.extendSubschemaData=Cz.getSubschema=void 0;const e=iz(),t=sz;return Cz.getSubschema=function(r,{keyword:n,schemaProp:i,schema:s,schemaPath:a,errSchemaPath:o,topSchemaRef:u}){if(void 0!==n&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const s=r.schema[n];return void 0===i?{schema:s,schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}`,errSchemaPath:`${r.errSchemaPath}/${n}`}:{schema:s[i],schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}${(0,e.getProperty)(i)}`,errSchemaPath:`${r.errSchemaPath}/${n}/${(0,t.escapeFragment)(i)}`}}if(void 0!==s){if(void 0===a||void 0===o||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:a,topSchemaRef:u,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')},Cz.extendSubschemaData=function(r,n,{dataProp:i,dataPropType:s,data:a,dataTypes:o,propertyName:u}){if(void 0!==a&&void 0!==i)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=n;if(void 0!==i){const{errorPath:a,dataPathArr:o,opts:u}=n;c(l.let("data",e._`${n.data}${(0,e.getProperty)(i)}`,!0)),r.errorPath=e.str`${a}${(0,t.getErrorPath)(i,s,u.jsPropertySyntax)}`,r.parentDataProperty=e._`${i}`,r.dataPathArr=[...o,r.parentDataProperty]}function c(e){r.data=e,r.dataLevel=n.dataLevel+1,r.dataTypes=[],n.definedProperties=new Set,r.parentData=n.data,r.dataNames=[...n.dataNames,e]}void 0!==a&&(c(a instanceof e.Name?a:l.let("data",a,!0)),void 0!==u&&(r.propertyName=u)),o&&(r.dataTypes=o)},Cz.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r},Cz}(),o=iz(),u=cz(),l=wz,c=sz,p=pz();function d({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,o._`${u.default.data}, ${u.default.valCxt}`,n.$async,(()=>{e.code(o._`"use strict"; ${h(r,i)}`),function(e,t){e.if(u.default.valCxt,(()=>{e.var(u.default.instancePath,o._`${u.default.valCxt}.${u.default.instancePath}`),e.var(u.default.parentData,o._`${u.default.valCxt}.${u.default.parentData}`),e.var(u.default.parentDataProperty,o._`${u.default.valCxt}.${u.default.parentDataProperty}`),e.var(u.default.rootData,o._`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&e.var(u.default.dynamicAnchors,o._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{e.var(u.default.instancePath,o._`""`),e.var(u.default.parentData,o._`undefined`),e.var(u.default.parentDataProperty,o._`undefined`),e.var(u.default.rootData,u.default.data),t.dynamicRef&&e.var(u.default.dynamicAnchors,o._`{}`)}))}(e,i),e.code(s)})):e.func(t,o._`${u.default.data}, ${function(e){return o._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${e.dynamicRef?o._`, ${u.default.dynamicAnchors}={}`:o.nil}}={}`}(i)}`,n.$async,(()=>e.code(h(r,i)).code(s)))}function h(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?o._`/*# sourceURL=${r} */`:o.nil}function f(t,r){y(t)&&(g(t),m(t))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&b(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",u.default.errors);x(e,s),n.var(t,o._`${s} === ${u.default.errors}`)}(t,r):(0,e.boolOrEmptySchema)(t,r)}function m({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,c.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function x(e,r){if(e.opts.jtd)return S(e,[],!1,r);const n=(0,t.getSchemaTypes)(e.schema);S(e,n,!(0,t.coerceAndCheckDataType)(e,n),r)}function b({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const s=r.$comment;if(!0===i.$comment)e.code(o._`${u.default.self}.logger.log(${s})`);else if("function"==typeof i.$comment){const r=o.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(o._`${u.default.self}.opts.$comment(${s}, ${r}, ${i}.schema)`)}}function S(e,t,i,s){const{gen:a,schema:l,data:p,allErrors:d,opts:h,self:f}=e,{RULES:m}=f;function y(c){(0,r.shouldUseGroup)(l,c)&&(c.type?(a.if((0,n.checkDataType)(c.type,p,h.strictNumbers)),T(e,c),1===t.length&&t[0]===c.type&&i&&(a.else(),(0,n.reportTypeError)(e)),a.endIf()):T(e,c),d||a.if(o._`${u.default.errors} === ${s||0}`))}!l.$ref||!h.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(l,m)?(h.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{v(e.dataTypes,t)||P(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)v(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&P(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const i in n){const s=n[i];if("object"==typeof s&&(0,r.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some((e=>E(t,e)))&&P(e,`missing type "${r.join(",")}" for keyword "${i}"`)}}}(e,e.dataTypes)}(e,t),a.block((()=>{for(const e of m.rules)y(e);y(m.post)}))):a.block((()=>D(e,"$ref",m.all.$ref.definition)))}function T(e,t){const{gen:n,schema:s,opts:{useDefaults:a}}=e;a&&(0,i.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,r.shouldUseRule)(s,n)&&D(e,n.keyword,n.definition,t.type)}))}function E(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function v(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function P(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,c.checkStrictMode)(e,t,e.opts.strictTypes)}HH.validateFunctionCode=function(t){y(t)&&(g(t),m(t))?function(e){const{schema:t,opts:r,gen:n}=e;d(e,(()=>{r.$comment&&t.$comment&&b(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,c.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(u.default.vErrors,null),n.let(u.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",o._`${r}.evaluated`),t.if(o._`${e.evaluated}.dynamicProps`,(()=>t.assign(o._`${e.evaluated}.props`,o._`undefined`))),t.if(o._`${e.evaluated}.dynamicItems`,(()=>t.assign(o._`${e.evaluated}.items`,o._`undefined`)))}(e),x(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if(o._`${u.default.errors} === 0`,(()=>t.return(u.default.data)),(()=>t.throw(o._`new ${i}(${u.default.vErrors})`))):(t.assign(o._`${n}.errors`,u.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof o.Name&&e.assign(o._`${t}.props`,r);n instanceof o.Name&&e.assign(o._`${t}.items`,n)}(e),t.return(o._`${u.default.errors} === 0`))}(e)}))}(t):d(t,(()=>(0,e.topBoolOrEmptySchema)(t)))};class A{constructor(e,t,r){if((0,s.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",k(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",u.default.errors))}result(e,t,r){this.failResult((0,o.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,o.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(o._`${t} !== undefined && (${(0,o.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?p.reportExtraError:p.reportError)(this,this.def.error,t)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=o.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=o.nil,t=o.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:s}=this;r.if((0,o.or)(o._`${n} === undefined`,t)),e!==o.nil&&r.assign(e,!0),(i.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==o.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:i,it:s}=this;return(0,o.or)(function(){if(r.length){if(!(t instanceof o.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return o._`${(0,n.checkDataTypes)(e,t,s.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}(),function(){if(i.validateSchema){const r=e.scopeValue("validate$data",{ref:i.validateSchema});return o._`!${r}(${t})`}return o.nil}())}subschema(e,t){const r=(0,a.getSubschema)(this.it,e);(0,a.extendSubschemaData)(r,this.it,e),(0,a.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return f(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=c.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=c.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,o.Name))),!0}}function D(e,t,r,n){const i=new A(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,s.funcKeywordCode)(i,r):"macro"in r?(0,s.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,s.funcKeywordCode)(i,r)}HH.KeywordCxt=A;const C=/^\/(?:[^~]|~0|~1)*$/,w=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function k(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(""===e)return u.default.rootData;if("/"===e[0]){if(!C.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,s=u.default.rootData}else{const a=w.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const o=+a[1];if(i=a[2],"#"===i){if(o>=t)throw new Error(p("property/index",o));return n[t-o]}if(o>t)throw new Error(p("data",o));if(s=r[t-o],!i)return s}let a=s;const l=i.split("/");for(const e of l)e&&(s=o._`${s}${(0,o.getProperty)((0,c.unescapeJsonPointer)(e))}`,a=o._`${a} && ${s}`);return a;function p(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}return HH.getData=k,HH}wz.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,i=Kz(e[r]||t),s={"":i},a=$z(n,i,!1),o={},u=new Set;return Mz(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const p=a+t;let d=s[i];function h(t){const r=this.opts.uriResolver.resolve;if(t=Kz(d?r(d,t):t),u.has(t))throw c(t);u.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?l(e,n.schema,t):t!==Kz(p)&&("#"===t[0]?(l(e,o[t],t),o[t]=e):this.refs[t]=p),t}function f(e){if("string"==typeof e){if(!Jz.test(e))throw new Error(`invalid anchor "${e}"`);h.call(this,`#${e}`)}}"string"==typeof e[r]&&(d=h.call(this,e[r])),f.call(this,e.$anchor),f.call(this,e.$dynamicAnchor),s[t]=d})),o;function l(e,t,r){if(void 0!==t&&!Lz(e,t))throw c(r)}function c(e){return new Error(`reference "${e}" resolves to more than one schema`)}};var Hz,zz={};function Gz(){if(Hz)return zz;Hz=1,Object.defineProperty(zz,"__esModule",{value:!0});class e extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}return zz.default=e,zz}var Yz,Qz={};function Zz(){if(Yz)return Qz;Yz=1,Object.defineProperty(Qz,"__esModule",{value:!0});const e=wz;class t extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,e.resolveUrl)(t,r,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}}return Qz.default=t,Qz}var eG={};Object.defineProperty(eG,"__esModule",{value:!0}),eG.resolveSchema=eG.getCompilingSchema=eG.resolveRef=eG.compileSchema=eG.SchemaEnv=void 0;const tG=iz(),rG=Gz(),nG=cz(),iG=wz,sG=sz,aG=Xz();class oG{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,iG.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function uG(e){const t=cG.call(this,e);if(t)return t;const r=(0,iG.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new tG.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s});let o;e.$async&&(o=a.scopeValue("Error",{ref:rG.default,code:tG._`require("ajv/dist/runtime/validation_error").default`}));const u=a.scopeName("validate");e.validateName=u;const l={gen:a,allErrors:this.opts.allErrors,data:nG.default.data,parentData:nG.default.parentData,parentDataProperty:nG.default.parentDataProperty,dataNames:[nG.default.data],dataPathArr:[tG.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,tG.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:o,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:tG.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:tG._`""`,opts:this.opts,self:this};let c;try{this._compilations.add(e),(0,aG.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);const t=a.toString();c=`${a.scopeRefs(nG.default.scope)}return ${t}`,this.opts.code.process&&(c=this.opts.code.process(c,e));const r=new Function(`${nG.default.self}`,`${nG.default.scope}`,c)(this,this.scope.get());if(this.scope.value(u,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:u,validateCode:t,scopeValues:a._values}),this.opts.unevaluated){const{props:e,items:t}=l;r.evaluated={props:e instanceof tG.Name?void 0:e,items:t instanceof tG.Name?void 0:t,dynamicProps:e instanceof tG.Name,dynamicItems:t instanceof tG.Name},r.source&&(r.source.evaluated=(0,tG.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,c&&this.logger.error("Error compiling schema, function code:",c),t}finally{this._compilations.delete(e)}}function lG(e){return(0,iG.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:uG.call(this,e)}function cG(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function pG(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||dG.call(this,e,t)}function dG(e,t){const r=this.opts.uriResolver.parse(t),n=(0,iG._getFullPath)(this.opts.uriResolver,r);let i=(0,iG.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return fG.call(this,r,e);const s=(0,iG.normalizeId)(n),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=dG.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return fG.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||uG.call(this,a),s===(0,iG.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,iG.resolveUrl)(this.opts.uriResolver,i,n)),new oG({schema:t,schemaId:r,root:e,baseId:i})}return fG.call(this,r,a)}}eG.SchemaEnv=oG,eG.compileSchema=uG,eG.resolveRef=function(e,t,r){var n;r=(0,iG.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let s=pG.call(this,e,r);if(void 0===s){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:a}=this.opts;i&&(s=new oG({schema:i,schemaId:a,root:e,baseId:t}))}return void 0!==s?e.refs[r]=lG.call(this,s):void 0},eG.getCompilingSchema=cG,eG.resolveSchema=dG;const hG=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function fG(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,sG.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!hG.has(n)&&i&&(t=(0,iG.resolveUrl)(this.opts.uriResolver,t,i))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,sG.schemaHasRulesButRef)(r,this.RULES)){const e=(0,iG.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=dG.call(this,n,e)}const{schemaId:a}=this.opts;return s=s||new oG({schema:r,schemaId:a,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}var mG={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},yG={},gG={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function s(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function a(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function o(e){var n="[A-Za-z]",i="[0-9]",s=t(i,"[A-Fa-f]"),a=r(r("%[EFef]"+s+"%"+s+s+"%"+s+s)+"|"+r("%[89A-Fa-f]"+s+"%"+s+s)+"|"+r("%"+s+s)),o="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",u=t("[\\:\\/\\?\\#\\[\\]\\@]",o),l=e?"[\\uE000-\\uF8FF]":"[]",c=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,i,"[\\+\\-\\.]")+"*"),r(r(a+"|"+t(c,o,"[\\:]"))+"*");var p=r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i),d=r(p+"\\."+p+"\\."+p+"\\."+p),h=r(s+"{1,4}"),f=r(r(h+"\\:"+h)+"|"+d),m=r(r(h+"\\:")+"{6}"+f),y=r("\\:\\:"+r(h+"\\:")+"{5}"+f),g=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+f),x=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+f),b=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+f),S=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+f),T=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+f),E=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),v=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),P=r([m,y,g,x,b,S,T,E,v].join("|")),A=r(r(c+"|"+a)+"+");r("[vV]"+s+"+\\."+t(c,o,"[\\:]")+"+"),r(r(a+"|"+t(c,o))+"*");var D=r(a+"|"+t(c,o,"[\\:\\@]"));return r(r(a+"|"+t(c,o,"[\\@]"))+"+"),r(r(D+"|"+t("[\\/\\?]",l))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",c,o),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",c,o),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",c,o),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",c,o),"g"),NOT_QUERY:new RegExp(t("[^\\%]",c,o,"[\\:\\@\\/\\?]",l),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",c,o,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",c,o),"g"),UNRESERVED:new RegExp(c,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",c,u),"g"),PCT_ENCODED:new RegExp(a,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+P+")"+r(r("\\%25|\\%(?!"+s+"{2})")+"("+A+")")+"?\\]?$")}}var u=o(!1),l=o(!0),c=function(){function e(e,t){var r=[],n=!0,i=!1,s=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,s=e}finally{try{!n&&o.return&&o.return()}finally{if(i)throw s}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},d=2147483647,h=36,f=1,m=26,y=38,g=700,x=72,b=128,S="-",T=/^xn--/,E=/[^\0-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=h-f,D=Math.floor,C=String.fromCharCode;function w(e){throw new RangeError(P[e])}function k(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function I(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+k((e=e.replace(v,".")).split("."),t).join(".")}function N(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var s=e.charCodeAt(r++);56320==(64512&s)?t.push(((1023&i)<<10)+(1023&s)+65536):(t.push(i),r--)}else t.push(i)}return t}var F=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h},_=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},O=function(e,t,r){var n=0;for(e=r?D(e/g):e>>1,e+=D(e/t);e>A*m>>1;n+=h)e=D(e/A);return D(n+(A+1)*e/(e+y))},L=function(e){var t=[],r=e.length,n=0,i=b,s=x,a=e.lastIndexOf(S);a<0&&(a=0);for(var o=0;o<a;++o)e.charCodeAt(o)>=128&&w("not-basic"),t.push(e.charCodeAt(o));for(var u=a>0?a+1:0;u<r;){for(var l=n,c=1,p=h;;p+=h){u>=r&&w("invalid-input");var y=F(e.charCodeAt(u++));(y>=h||y>D((d-n)/c))&&w("overflow"),n+=y*c;var g=p<=s?f:p>=s+m?m:p-s;if(y<g)break;var T=h-g;c>D(d/T)&&w("overflow"),c*=T}var E=t.length+1;s=O(n-l,E,0==l),D(n/E)>d-i&&w("overflow"),i+=D(n/E),n%=E,t.splice(n++,0,i)}return String.fromCodePoint.apply(String,t)},M=function(e){var t=[],r=(e=N(e)).length,n=b,i=0,s=x,a=!0,o=!1,u=void 0;try{for(var l,c=e[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var p=l.value;p<128&&t.push(C(p))}}catch(e){o=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(o)throw u}}var y=t.length,g=y;for(y&&t.push(S);g<r;){var T=d,E=!0,v=!1,P=void 0;try{for(var A,k=e[Symbol.iterator]();!(E=(A=k.next()).done);E=!0){var I=A.value;I>=n&&I<T&&(T=I)}}catch(e){v=!0,P=e}finally{try{!E&&k.return&&k.return()}finally{if(v)throw P}}var F=g+1;T-n>D((d-i)/F)&&w("overflow"),i+=(T-n)*F,n=T;var L=!0,M=!1,B=void 0;try{for(var j,R=e[Symbol.iterator]();!(L=(j=R.next()).done);L=!0){var U=j.value;if(U<n&&++i>d&&w("overflow"),U==n){for(var $=i,V=h;;V+=h){var q=V<=s?f:V>=s+m?m:V-s;if($<q)break;var K=$-q,J=h-q;t.push(C(_(q+K%J,0))),$=D(K/J)}t.push(C(_($,0))),s=O(i,F,g==y),i=0,++g}}}catch(e){M=!0,B=e}finally{try{!L&&R.return&&R.return()}finally{if(M)throw B}}++i,++n}return t.join("")},B=function(e){return I(e,(function(e){return T.test(e)?L(e.slice(4).toLowerCase()):e}))},j=function(e){return I(e,(function(e){return E.test(e)?"xn--"+M(e):e}))},R={version:"2.1.0",ucs2:{decode:N,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:L,encode:M,toASCII:j,toUnicode:B},U={};function $(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function V(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&s)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var a=parseInt(e.substr(r+4,2),16),o=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&o)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function q(e,t){function r(e){var r=V(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,$).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,$).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,$).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,$).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,$).replace(t.PCT_ENCODED,i)),e}function K(e){return e.replace(/^0*(.*)/,"$1")||"0"}function J(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=c(r,2)[1];return n?n.split(".").map(K).join("."):e}function W(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=c(r,3),i=n[1],s=n[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),o=c(a,2),u=o[0],l=o[1],p=l?l.split(":").map(K):[],d=u.split(":").map(K),h=t.IPV4ADDRESS.test(d[d.length-1]),f=h?7:8,m=d.length-f,y=Array(f),g=0;g<f;++g)y[g]=p[g]||d[m+g]||"";h&&(y[f-1]=J(y[f-1],t));var x=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),b=x.sort((function(e,t){return t.length-e.length}))[0],S=void 0;if(b&&b.length>1){var T=y.slice(0,b.index),E=y.slice(b.index+b.length);S=T.join(":")+"::"+E.join(":")}else S=y.join(":");return s&&(S+="%"+s),S}return e}var X=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,H=void 0==="".match(/(){0}/)[1];function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?l:u;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(X);if(i){H?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=W(J(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var s=U[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)q(r,n);else{if(r.host&&(t.domainHost||s&&s.domainHost))try{r.host=R.toASCII(r.host.replace(n.PCT_ENCODED,V).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}q(r,u)}s&&s.parse&&s.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function G(e,t){var r=!1!==t.iri?l:u,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(W(J(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Y=/^\.\.?\//,Q=/^\/\.(\/|$)/,Z=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Y))e=e.replace(Y,"");else if(e.match(Q))e=e.replace(Q,"/");else if(e.match(Z))e=e.replace(Z,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?l:u,n=[],i=U[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?R.toUnicode(e.host):R.toASCII(e.host.replace(r.PCT_ENCODED,V).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}q(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var s=G(e,t);if(void 0!==s&&("suffix"!==t.reference&&n.push("//"),n.push(s),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||i&&i.absolutePath||(a=te(a)),void 0===s&&(a=a.replace(/^\/\//,"/%2F")),n.push(a)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=z(re(e,r),r),t=z(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function ie(e,t,r){var n=a({scheme:"null"},r);return re(ne(z(e,n),z(t,n),n,!0),n)}function se(e,t){return"string"==typeof e?e=re(z(e,t),t):"object"===n(e)&&(e=z(re(e,t),t)),e}function ae(e,t,r){return"string"==typeof e?e=re(z(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(z(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function oe(e,t){return e&&e.toString().replace(t&&t.iri?l.ESCAPE:u.ESCAPE,$)}function ue(e,t){return e&&e.toString().replace(t&&t.iri?l.PCT_ENCODED:u.PCT_ENCODED,V)}var le={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ce={scheme:"https",domainHost:le.domainHost,parse:le.parse,serialize:le.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var de={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=pe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=c(r,2),i=n[0],s=n[1];e.path=i&&"/"!==i?i:void 0,e.query=s,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:de.domainHost,parse:de.parse,serialize:de.serialize},fe={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),xe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Se="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Te=new RegExp(me,"g"),Ee=new RegExp(ge,"g"),ve=new RegExp(t("[^]",xe,"[\\.]",'[\\"]',be),"g"),Pe=new RegExp(t("[^]",me,Se),"g"),Ae=Pe;function De(e){var t=V(e);return t.match(Te)?t:e}var Ce={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,s={},a=r.query.split("&"),o=0,u=a.length;o<u;++o){var l=a[o].split("=");switch(l[0]){case"to":for(var c=l[1].split(","),p=0,d=c.length;p<d;++p)n.push(c[p]);break;case"subject":r.subject=ue(l[1],t);break;case"body":r.body=ue(l[1],t);break;default:i=!0,s[ue(l[0],t)]=ue(l[1],t)}}i&&(r.headers=s)}r.query=void 0;for(var h=0,f=n.length;h<f;++h){var m=n[h].split("@");if(m[0]=ue(m[0]),t.unicodeSupport)m[1]=ue(m[1],t).toLowerCase();else try{m[1]=R.toASCII(ue(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=m.join("@")}return r},serialize:function(e,t){var r=e,n=s(e.to);if(n){for(var a=0,o=n.length;a<o;++a){var u=String(n[a]),l=u.lastIndexOf("@"),c=u.slice(0,l).replace(Ee,De).replace(Ee,i).replace(ve,$),p=u.slice(l+1);try{p=t.iri?R.toUnicode(p):R.toASCII(ue(p,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[a]=c+"@"+p}r.path=n.join(",")}var d=e.headers=e.headers||{};e.subject&&(d.subject=e.subject),e.body&&(d.body=e.body);var h=[];for(var f in d)d[f]!==fe[f]&&h.push(f.replace(Ee,De).replace(Ee,i).replace(Pe,$)+"="+d[f].replace(Ee,De).replace(Ee,i).replace(Ae,$));return h.length&&(r.query=h.join("&")),r}},we=/^([^\:]+)\:(.*)/,ke={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(we),n=e;if(r){var i=t.scheme||n.scheme||"urn",s=r[1].toLowerCase(),a=r[2],o=i+":"+(t.nid||s),u=U[o];n.nid=s,n.nss=a,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),s=U[i];s&&(e=s.serialize(e,t));var a=e,o=e.nss;return a.path=(n||t.nid)+":"+o,a}},Ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ne={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Ie)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};U[le.scheme]=le,U[ce.scheme]=ce,U[de.scheme]=de,U[he.scheme]=he,U[Ce.scheme]=Ce,U[ke.scheme]=ke,U[Ne.scheme]=Ne,e.SCHEMES=U,e.pctEncChar=$,e.pctDecChars=V,e.parse=z,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=ie,e.normalize=se,e.equal=ae,e.escapeComponent=oe,e.unescapeComponent=ue,Object.defineProperty(e,"__esModule",{value:!0})}(gG.exports);var xG=gG.exports;Object.defineProperty(yG,"__esModule",{value:!0});const bG=xG;bG.code='require("ajv/dist/runtime/uri").default',yG.default=bG,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Xz();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=iz();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Gz(),i=Zz(),s=hz,a=eG,o=iz(),u=wz,l=dz,c=sz,p=mG,d=yG,h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const f=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function x(e){var t,r,n,i,s,a,o,u,l,c,p,f,m,y,g,x,b,S,T,E,v,P,A,D,C;const w=e.strict,k=null===(t=e.code)||void 0===t?void 0:t.optimize,I=!0===k||void 0===k?1:k||0,N=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,F=null!==(i=e.uriResolver)&&void 0!==i?i:d.default;return{strictSchema:null===(a=null!==(s=e.strictSchema)&&void 0!==s?s:w)||void 0===a||a,strictNumbers:null===(u=null!==(o=e.strictNumbers)&&void 0!==o?o:w)||void 0===u||u,strictTypes:null!==(c=null!==(l=e.strictTypes)&&void 0!==l?l:w)&&void 0!==c?c:"log",strictTuples:null!==(f=null!==(p=e.strictTuples)&&void 0!==p?p:w)&&void 0!==f?f:"log",strictRequired:null!==(y=null!==(m=e.strictRequired)&&void 0!==m?m:w)&&void 0!==y&&y,code:e.code?{...e.code,optimize:I,regExp:N}:{optimize:I,regExp:N},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(x=e.loopEnum)&&void 0!==x?x:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(S=e.messages)||void 0===S||S,inlineRefs:null===(T=e.inlineRefs)||void 0===T||T,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===(v=e.addUsedSchema)||void 0===v||v,validateSchema:null===(P=e.validateSchema)||void 0===P||P,validateFormats:null===(A=e.validateFormats)||void 0===A||A,unicodeRegExp:null===(D=e.unicodeRegExp)||void 0===D||D,int32range:null===(C=e.int32range)||void 0===C||C,uriResolver:F}}class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...x(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return D;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),S.call(this,y,e,"NOT SUPPORTED"),S.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=A.call(this),e.formats&&v.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&P.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;"id"===r&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return o.call(this,t),await u.call(this,t.missingSchema),a.call(this,e)}}function o({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function u(e){const r=await l.call(this,e);this.refs[e]||await s.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=T.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new a.SchemaEnv({schema:{},schemaId:r});if(t=a.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=T.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(w.call(this,r,t),!t)return(0,c.eachItem)(r,(e=>k.call(this,e))),this;N.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,c.eachItem)(r,0===n.type.length?e=>k.call(this,e,n):e=>n.type.forEach((t=>k.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=i[e];n&&s&&(i[e]=_(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(void 0!==l)return l;r=(0,u.normalizeId)(s||r);const c=u.getSchemaRefs.call(this,e,r);return l=new a.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:c}),this._cache.set(l.schema,l),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=l),n&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}}function S(e,t,r,n="error"){for(const i in e){const s=i;s in t&&this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function T(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function v(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function P(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function A(){const e={...this.opts};for(const t of f)delete e[t];return e}e.default=b,b.ValidationError=n.default,b.MissingRefError=i.default;const D={log(){},warn(){},error(){}};const C=/^[a-z_$][a-z0-9_$:-]*$/i;function w(e,t){const{RULES:r}=this;if((0,c.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!C.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function k(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let a=i?s.post:s.rules.find((({type:e})=>e===r));if(a||(a={type:r,rules:[]},s.rules.push(a)),s.keywords[e]=!0,!t)return;const o={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,o,t.before):a.rules.push(o),s.all[e]=o,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function I(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=_(t)),e.validateSchema=this.compile(t,!0))}const F={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _(e){return{anyOf:[e,F]}}}(XH);var SG={},TG={},EG={};Object.defineProperty(EG,"__esModule",{value:!0});const vG={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};EG.default=vG;var PG={};Object.defineProperty(PG,"__esModule",{value:!0}),PG.callRef=PG.getValidate=void 0;const AG=Zz(),DG=Pz(),CG=iz(),wG=cz(),kG=eG,IG=sz,NG={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:a,opts:o,self:u}=n,{root:l}=s;if(("#"===r||"#/"===r)&&i===l.baseId)return function(){if(s===l)return _G(e,a,s,s.$async);const r=t.scopeValue("root",{ref:l});return _G(e,CG._`${r}.validate`,l,l.$async)}();const c=kG.resolveRef.call(u,l,i,r);if(void 0===c)throw new AG.default(n.opts.uriResolver,i,r);return c instanceof kG.SchemaEnv?function(t){const r=FG(e,t);_G(e,r,t,t.$async)}(c):function(n){const i=t.scopeValue("schema",!0===o.code.source?{ref:n,code:(0,CG.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:CG.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(c)}};function FG(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):CG._`${r.scopeValue("wrapper",{ref:t})}.validate`}function _G(e,t,r,n){const{gen:i,it:s}=e,{allErrors:a,schemaEnv:o,opts:u}=s,l=u.passContext?wG.default.this:CG.nil;function c(e){const t=CG._`${e}.errors`;i.assign(wG.default.vErrors,CG._`${wG.default.vErrors} === null ? ${t} : ${wG.default.vErrors}.concat(${t})`),i.assign(wG.default.errors,CG._`${wG.default.vErrors}.length`)}function p(e){var t;if(!s.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==s.props)if(n&&!n.dynamicProps)void 0!==n.props&&(s.props=IG.mergeEvaluated.props(i,n.props,s.props));else{const t=i.var("props",CG._`${e}.evaluated.props`);s.props=IG.mergeEvaluated.props(i,t,s.props,CG.Name)}if(!0!==s.items)if(n&&!n.dynamicItems)void 0!==n.items&&(s.items=IG.mergeEvaluated.items(i,n.items,s.items));else{const t=i.var("items",CG._`${e}.evaluated.items`);s.items=IG.mergeEvaluated.items(i,t,s.items,CG.Name)}}n?function(){if(!o.$async)throw new Error("async schema referenced by sync schema");const r=i.let("valid");i.try((()=>{i.code(CG._`await ${(0,DG.callValidateCode)(e,t,l)}`),p(t),a||i.assign(r,!0)}),(e=>{i.if(CG._`!(${e} instanceof ${s.ValidationError})`,(()=>i.throw(e))),c(e),a||i.assign(r,!1)})),e.ok(r)}():e.result((0,DG.callValidateCode)(e,t,l),(()=>p(t)),(()=>c(t)))}PG.getValidate=FG,PG.callRef=_G,PG.default=NG,Object.defineProperty(TG,"__esModule",{value:!0});const OG=PG,LG=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",EG.default,OG.default];TG.default=LG;var MG={},BG={};Object.defineProperty(BG,"__esModule",{value:!0});const jG=iz(),RG=jG.operators,UG={maximum:{okStr:"<=",ok:RG.LTE,fail:RG.GT},minimum:{okStr:">=",ok:RG.GTE,fail:RG.LT},exclusiveMaximum:{okStr:"<",ok:RG.LT,fail:RG.GTE},exclusiveMinimum:{okStr:">",ok:RG.GT,fail:RG.LTE}},$G={message:({keyword:e,schemaCode:t})=>jG.str`must be ${UG[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>jG._`{comparison: ${UG[e].okStr}, limit: ${t}}`},VG={keyword:Object.keys(UG),type:"number",schemaType:"number",$data:!0,error:$G,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(jG._`${r} ${UG[t].fail} ${n} || isNaN(${r})`)}};BG.default=VG;var qG={};Object.defineProperty(qG,"__esModule",{value:!0});const KG=iz(),JG={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>KG.str`must be multiple of ${e}`,params:({schemaCode:e})=>KG._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),o=s?KG._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:KG._`${a} !== parseInt(${a})`;e.fail$data(KG._`(${n} === 0 || (${a} = ${r}/${n}, ${o}))`)}};qG.default=JG;var WG={},XG={};function HG(e){const t=e.length;let r,n=0,i=0;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),56320==(64512&r)&&i++);return n}Object.defineProperty(XG,"__esModule",{value:!0}),XG.default=HG,HG.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(WG,"__esModule",{value:!0});const zG=iz(),GG=sz,YG=XG,QG={message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return zG.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>zG._`{limit: ${e}}`},ZG={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:QG,code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,s="maxLength"===t?zG.operators.GT:zG.operators.LT,a=!1===i.opts.unicode?zG._`${r}.length`:zG._`${(0,GG.useFunc)(e.gen,YG.default)}(${r})`;e.fail$data(zG._`${a} ${s} ${n}`)}};WG.default=ZG;var eY={};Object.defineProperty(eY,"__esModule",{value:!0});const tY=Pz(),rY=iz(),nY={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>rY.str`must match pattern "${e}"`,params:({schemaCode:e})=>rY._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"",o=r?rY._`(new RegExp(${i}, ${a}))`:(0,tY.usePattern)(e,n);e.fail$data(rY._`!${o}.test(${t})`)}};eY.default=nY;var iY={};Object.defineProperty(iY,"__esModule",{value:!0});const sY=iz(),aY={message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return sY.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>sY._`{limit: ${e}}`},oY={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:aY,code(e){const{keyword:t,data:r,schemaCode:n}=e,i="maxProperties"===t?sY.operators.GT:sY.operators.LT;e.fail$data(sY._`Object.keys(${r}).length ${i} ${n}`)}};iY.default=oY;var uY={};Object.defineProperty(uY,"__esModule",{value:!0});const lY=Pz(),cY=iz(),pY=sz,dY={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>cY.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>cY._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:a}=e,{opts:o}=a;if(!s&&0===r.length)return;const u=r.length>=o.loopRequired;if(a.allErrors?function(){if(u||s)e.block$data(cY.nil,l);else for(const t of r)(0,lY.checkReportMissingProp)(e,t)}():function(){const a=t.let("missing");if(u||s){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,s){e.setParams({missingProperty:r}),t.forOf(r,n,(()=>{t.assign(s,(0,lY.propertyInData)(t,i,r,o.ownProperties)),t.if((0,cY.not)(s),(()=>{e.error(),t.break()}))}),cY.nil)}(a,r))),e.ok(r)}else t.if((0,lY.checkMissingProp)(e,r,a)),(0,lY.reportMissingProp)(e,a),t.else()}(),o.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${a.schemaEnv.baseId+a.errSchemaPath}" (strictRequired)`;(0,pY.checkStrictMode)(a,t,a.opts.strictRequired)}}function l(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,lY.noPropertyInData)(t,i,r,o.ownProperties),(()=>e.error()))}))}}};uY.default=dY;var hY={};Object.defineProperty(hY,"__esModule",{value:!0});const fY=iz(),mY={message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return fY.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>fY._`{limit: ${e}}`},yY={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:mY,code(e){const{keyword:t,data:r,schemaCode:n}=e,i="maxItems"===t?fY.operators.GT:fY.operators.LT;e.fail$data(fY._`${r}.length ${i} ${n}`)}};hY.default=yY;var gY={},xY={};Object.defineProperty(xY,"__esModule",{value:!0});const bY=kz;bY.code='require("ajv/dist/runtime/equal").default',xY.default=bY,Object.defineProperty(gY,"__esModule",{value:!0});const SY=dz,TY=iz(),EY=sz,vY=xY,PY={message:({params:{i:e,j:t}})=>TY.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>TY._`{i: ${e}, j: ${t}}`},AY={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:PY,code(e){const{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:a,it:o}=e;if(!n&&!i)return;const u=t.let("valid"),l=s.items?(0,SY.getSchemaTypes)(s.items):[];function c(n,i){const s=t.name("item"),a=(0,SY.checkDataTypes)(l,s,o.opts.strictNumbers,SY.DataType.Wrong),c=t.const("indices",TY._`{}`);t.for(TY._`;${n}--;`,(()=>{t.let(s,TY._`${r}[${n}]`),t.if(a,TY._`continue`),l.length>1&&t.if(TY._`typeof ${s} == "string"`,TY._`${s} += "_"`),t.if(TY._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(i,TY._`${c}[${s}]`),e.error(),t.assign(u,!1).break()})).code(TY._`${c}[${s}] = ${n}`)}))}function p(n,i){const s=(0,EY.useFunc)(t,vY.default),a=t.name("outer");t.label(a).for(TY._`;${n}--;`,(()=>t.for(TY._`${i} = ${n}; ${i}--;`,(()=>t.if(TY._`${s}(${r}[${n}], ${r}[${i}])`,(()=>{e.error(),t.assign(u,!1).break(a)}))))))}e.block$data(u,(function(){const n=t.let("i",TY._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(u,!0),t.if(TY._`${n} > 1`,(()=>(l.length>0&&!l.some((e=>"object"===e||"array"===e))?c:p)(n,i)))}),TY._`${a} === false`),e.ok(u)}};gY.default=AY;var DY={};Object.defineProperty(DY,"__esModule",{value:!0});const CY=iz(),wY=sz,kY=xY,IY={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>CY._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&"object"==typeof s?e.fail$data(CY._`!${(0,wY.useFunc)(t,kY.default)}(${r}, ${i})`):e.fail(CY._`${s} !== ${r}`)}};DY.default=IY;var NY={};Object.defineProperty(NY,"__esModule",{value:!0});const FY=iz(),_Y=sz,OY=xY,LY={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>FY._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:a}=e;if(!n&&0===i.length)throw new Error("enum must have non-empty array");const o=i.length>=a.opts.loopEnum;let u;const l=()=>null!=u?u:u=(0,_Y.useFunc)(t,OY.default);let c;if(o||n)c=t.let("valid"),e.block$data(c,(function(){t.assign(c,!1),t.forOf("v",s,(e=>t.if(FY._`${l()}(${r}, ${e})`,(()=>t.assign(c,!0).break()))))}));else{if(!Array.isArray(i))throw new Error("ajv implementation error");const e=t.const("vSchema",s);c=(0,FY.or)(...i.map(((t,n)=>function(e,t){const n=i[t];return"object"==typeof n&&null!==n?FY._`${l()}(${r}, ${e}[${t}])`:FY._`${r} === ${n}`}(e,n))))}e.pass(c)}};NY.default=LY,Object.defineProperty(MG,"__esModule",{value:!0});const MY=qG,BY=WG,jY=eY,RY=iY,UY=uY,$Y=hY,VY=gY,qY=DY,KY=NY,JY=[BG.default,MY.default,BY.default,jY.default,RY.default,UY.default,$Y.default,VY.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},qY.default,KY.default];MG.default=JY;var WY={},XY={};Object.defineProperty(XY,"__esModule",{value:!0}),XY.validateAdditionalItems=void 0;const HY=iz(),zY=sz,GY={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>HY.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>HY._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?YY(e,n):(0,zY.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function YY(e,t){const{gen:r,schema:n,data:i,keyword:s,it:a}=e;a.items=!0;const o=r.const("len",HY._`${i}.length`);if(!1===n)e.setParams({len:t.length}),e.pass(HY._`${o} <= ${t.length}`);else if("object"==typeof n&&!(0,zY.alwaysValidSchema)(a,n)){const n=r.var("valid",HY._`${o} <= ${t.length}`);r.if((0,HY.not)(n),(()=>function(n){r.forRange("i",t.length,o,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:zY.Type.Num},n),a.allErrors||r.if((0,HY.not)(n),(()=>r.break()))}))}(n))),e.ok(n)}}XY.validateAdditionalItems=YY,XY.default=GY;var QY={},ZY={};Object.defineProperty(ZY,"__esModule",{value:!0}),ZY.validateTuple=void 0;const eQ=iz(),tQ=sz,rQ=Pz(),nQ={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return iQ(e,"additionalItems",t);r.items=!0,(0,tQ.alwaysValidSchema)(r,t)||e.ok((0,rQ.validateArray)(e))}};function iQ(e,t,r=e.schema){const{gen:n,parentSchema:i,data:s,keyword:a,it:o}=e;!function(e){const{opts:n,errSchemaPath:i}=o,s=r.length,u=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!u){const e=`"${a}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,tQ.checkStrictMode)(o,e,n.strictTuples)}}(i),o.opts.unevaluated&&r.length&&!0!==o.items&&(o.items=tQ.mergeEvaluated.items(n,r.length,o.items));const u=n.name("valid"),l=n.const("len",eQ._`${s}.length`);r.forEach(((t,r)=>{(0,tQ.alwaysValidSchema)(o,t)||(n.if(eQ._`${l} > ${r}`,(()=>e.subschema({keyword:a,schemaProp:r,dataProp:r},u))),e.ok(u))}))}ZY.validateTuple=iQ,ZY.default=nQ,Object.defineProperty(QY,"__esModule",{value:!0});const sQ=ZY,aQ={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,sQ.validateTuple)(e,"items")};QY.default=aQ;var oQ={};Object.defineProperty(oQ,"__esModule",{value:!0});const uQ=iz(),lQ=sz,cQ=Pz(),pQ=XY,dQ={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>uQ.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>uQ._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,(0,lQ.alwaysValidSchema)(n,t)||(i?(0,pQ.validateAdditionalItems)(e,i):e.ok((0,cQ.validateArray)(e)))}};oQ.default=dQ;var hQ={};Object.defineProperty(hQ,"__esModule",{value:!0});const fQ=iz(),mQ=sz,yQ={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?fQ.str`must contain at least ${e} valid item(s)`:fQ.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?fQ._`{minContains: ${e}}`:fQ._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;let a,o;const{minContains:u,maxContains:l}=n;s.opts.next?(a=void 0===u?1:u,o=l):a=1;const c=t.const("len",fQ._`${i}.length`);if(e.setParams({min:a,max:o}),void 0===o&&0===a)return void(0,mQ.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&a>o)return(0,mQ.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,mQ.alwaysValidSchema)(s,r)){let t=fQ._`${c} >= ${a}`;return void 0!==o&&(t=fQ._`${t} && ${c} <= ${o}`),void e.pass(t)}s.items=!0;const p=t.name("valid");function d(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(fQ._`${e}++`),void 0===o?t.if(fQ._`${e} >= ${a}`,(()=>t.assign(p,!0).break())):(t.if(fQ._`${e} > ${o}`,(()=>t.assign(p,!1).break())),1===a?t.assign(p,!0):t.if(fQ._`${e} >= ${a}`,(()=>t.assign(p,!0))))}(r)))))}function h(r,n){t.forRange("i",0,c,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:mQ.Type.Num,compositeRule:!0},r),n()}))}void 0===o&&1===a?h(p,(()=>t.if(p,(()=>t.break())))):0===a?(t.let(p,!0),void 0!==o&&t.if(fQ._`${i}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,(()=>e.reset()))}};hQ.default=yQ;var gQ={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=iz(),r=sz,n=Pz();e.error={message:({params:{property:e,depsCount:r,deps:n}})=>{const i=1===r?"property":"properties";return t.str`must have ${i} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:r,deps:n,missingProperty:i}})=>t._`{property: ${e},
|
|
5
5
|
missingProperty: ${i},
|
|
6
6
|
depsCount: ${r},
|
|
7
|
-
deps: ${n}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);s(e,t),a(e,r)}};function s(e,r=e.schema){const{gen:i,data:s,it:a}=e;if(0===Object.keys(r).length)return;const o=i.let("missing");for(const u in r){const l=r[u];if(0===l.length)continue;const c=(0,n.propertyInData)(i,s,u,a.opts.ownProperties);e.setParams({property:u,depsCount:l.length,deps:l.join(", ")}),a.allErrors?i.if(c,(()=>{for(const t of l)(0,n.checkReportMissingProp)(e,t)})):(i.if(t._`${c} && (${(0,n.checkMissingProp)(e,l,o)})`),(0,n.reportMissingProp)(e,o),i.else())}}function a(e,t=e.schema){const{gen:i,data:s,keyword:a,it:o}=e,u=i.name("valid");for(const l in t)(0,r.alwaysValidSchema)(o,t[l])||(i.if((0,n.propertyInData)(i,s,l,o.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:l},u);e.mergeValidEvaluated(t,u)}),(()=>i.var(u,!0))),e.ok(u))}e.validatePropertyDeps=s,e.validateSchemaDeps=a,e.default=i}(gQ);var xQ={};Object.defineProperty(xQ,"__esModule",{value:!0});const bQ=iz(),SQ=sz,TQ={message:"property name must be valid",params:({params:e})=>bQ._`{propertyName: ${e.propertyName}}`},EQ={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:TQ,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,SQ.alwaysValidSchema)(i,r))return;const s=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,bQ.not)(s),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(s)}};xQ.default=EQ;var vQ={};Object.defineProperty(vQ,"__esModule",{value:!0});const PQ=Pz(),AQ=iz(),DQ=cz(),CQ=sz,wQ={message:"must NOT have additional properties",params:({params:e})=>AQ._`{additionalProperty: ${e.additionalProperty}}`},kQ={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:wQ,code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:a}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:o,opts:u}=a;if(a.props=!0,"all"!==u.removeAdditional&&(0,CQ.alwaysValidSchema)(a,r))return;const l=(0,PQ.allSchemaProperties)(n.properties),c=(0,PQ.allSchemaProperties)(n.patternProperties);function p(e){t.code(AQ._`delete ${i}[${e}]`)}function d(n){if("all"===u.removeAdditional||u.removeAdditional&&!1===r)p(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(o||t.break());if("object"==typeof r&&!(0,CQ.alwaysValidSchema)(a,r)){const r=t.name("valid");"failing"===u.removeAdditional?(h(n,r,!1),t.if((0,AQ.not)(r),(()=>{e.reset(),p(n)}))):(h(n,r),o||t.if((0,AQ.not)(r),(()=>t.break())))}}}function h(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:CQ.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",i,(r=>{l.length||c.length?t.if(function(r){let i;if(l.length>8){const e=(0,CQ.schemaRefOrVal)(a,n.properties,"properties");i=(0,PQ.isOwnProperty)(t,e,r)}else i=l.length?(0,AQ.or)(...l.map((e=>AQ._`${r} === ${e}`))):AQ.nil;return c.length&&(i=(0,AQ.or)(i,...c.map((t=>AQ._`${(0,PQ.usePattern)(e,t)}.test(${r})`)))),(0,AQ.not)(i)}(r),(()=>d(r))):d(r)})),e.ok(AQ._`${s} === ${DQ.default.errors}`)}};vQ.default=kQ;var IQ={};Object.defineProperty(IQ,"__esModule",{value:!0});const NQ=Xz(),FQ=Pz(),_Q=sz,OQ=vQ,LQ={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;"all"===s.opts.removeAdditional&&void 0===n.additionalProperties&&OQ.default.code(new NQ.KeywordCxt(s,OQ.default,"additionalProperties"));const a=(0,FQ.allSchemaProperties)(r);for(const e of a)s.definedProperties.add(e);s.opts.unevaluated&&a.length&&!0!==s.props&&(s.props=_Q.mergeEvaluated.props(t,(0,_Q.toHash)(a),s.props));const o=a.filter((e=>!(0,_Q.alwaysValidSchema)(s,r[e])));if(0===o.length)return;const u=t.name("valid");for(const r of o)l(r)?c(r):(t.if((0,FQ.propertyInData)(t,i,r,s.opts.ownProperties)),c(r),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(u);function l(e){return s.opts.useDefaults&&!s.compositeRule&&void 0!==r[e].default}function c(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}};IQ.default=LQ;var MQ={};Object.defineProperty(MQ,"__esModule",{value:!0});const BQ=Pz(),jQ=iz(),RQ=sz,UQ=sz,$Q={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:a}=s,o=(0,BQ.allSchemaProperties)(r),u=o.filter((e=>(0,RQ.alwaysValidSchema)(s,r[e])));if(0===o.length||u.length===o.length&&(!s.opts.unevaluated||!0===s.props))return;const l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,c=t.name("valid");!0===s.props||s.props instanceof jQ.Name||(s.props=(0,UQ.evaluatedPropsToName)(t,s.props));const{props:p}=s;function d(e){for(const t in l)new RegExp(e).test(t)&&(0,RQ.checkStrictMode)(s,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function h(r){t.forIn("key",n,(n=>{t.if(jQ._`${(0,BQ.usePattern)(e,r)}.test(${n})`,(()=>{const i=u.includes(r);i||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:UQ.Type.Str},c),s.opts.unevaluated&&!0!==p?t.assign(jQ._`${p}[${n}]`,!0):i||s.allErrors||t.if((0,jQ.not)(c),(()=>t.break()))}))}))}!function(){for(const e of o)l&&d(e),s.allErrors?h(e):(t.var(c,!0),h(e),t.if(c))}()}};MQ.default=$Q;var VQ={};Object.defineProperty(VQ,"__esModule",{value:!0});const qQ=sz,KQ={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,qQ.alwaysValidSchema)(n,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};VQ.default=KQ;var JQ={};Object.defineProperty(JQ,"__esModule",{value:!0});const WQ={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Pz().validateUnion,error:{message:"must match a schema in anyOf"}};JQ.default=WQ;var XQ={};Object.defineProperty(XQ,"__esModule",{value:!0});const HQ=iz(),zQ=sz,GQ={message:"must match exactly one schema in oneOf",params:({params:e})=>HQ._`{passingSchemas: ${e.passing}}`},YQ={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:GQ,code(e){const{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const s=r,a=t.let("valid",!1),o=t.let("passing",null),u=t.name("_valid");e.setParams({passing:o}),t.block((function(){s.forEach(((r,n)=>{let s;(0,zQ.alwaysValidSchema)(i,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},u),n>0&&t.if(HQ._`${u} && ${a}`).assign(a,!1).assign(o,HQ._`[${o}, ${n}]`).else(),t.if(u,(()=>{t.assign(a,!0),t.assign(o,n),s&&e.mergeEvaluated(s,HQ.Name)}))}))})),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}};XQ.default=YQ;var QQ={};Object.defineProperty(QQ,"__esModule",{value:!0});const ZQ=sz,eZ={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,ZQ.alwaysValidSchema)(n,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};QQ.default=eZ;var tZ={};Object.defineProperty(tZ,"__esModule",{value:!0});const rZ=iz(),nZ=sz,iZ={message:({params:e})=>rZ.str`must match "${e.ifClause}" schema`,params:({params:e})=>rZ._`{failingKeyword: ${e.ifClause}}`},sZ={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:iZ,code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,nZ.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=aZ(n,"then"),s=aZ(n,"else");if(!i&&!s)return;const a=t.let("valid",!0),o=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(t)}(),e.reset(),i&&s){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(o,u("then",r),u("else",r))}else i?t.if(o,u("then")):t.if((0,rZ.not)(o),u("else"));function u(r,n){return()=>{const i=e.subschema({keyword:r},o);t.assign(a,o),e.mergeValidEvaluated(i,a),n?t.assign(n,rZ._`${r}`):e.setParams({ifClause:r})}}e.pass(a,(()=>e.error(!0)))}};function aZ(e,t){const r=e.schema[t];return void 0!==r&&!(0,nZ.alwaysValidSchema)(e,r)}tZ.default=sZ;var oZ={};Object.defineProperty(oZ,"__esModule",{value:!0});const uZ=sz,lZ={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,uZ.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};oZ.default=lZ,Object.defineProperty(WY,"__esModule",{value:!0});const cZ=XY,pZ=QY,dZ=ZY,hZ=oQ,fZ=hQ,mZ=gQ,yZ=xQ,gZ=vQ,xZ=IQ,bZ=MQ,SZ=VQ,TZ=JQ,EZ=XQ,vZ=QQ,PZ=tZ,AZ=oZ;WY.default=function(e=!1){const t=[SZ.default,TZ.default,EZ.default,vZ.default,PZ.default,AZ.default,yZ.default,gZ.default,mZ.default,xZ.default,bZ.default];return e?t.push(pZ.default,hZ.default):t.push(cZ.default,dZ.default),t.push(fZ.default),t};var DZ={},CZ={};Object.defineProperty(CZ,"__esModule",{value:!0});const wZ=iz(),kZ={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>wZ.str`must match format "${e}"`,params:({schemaCode:e})=>wZ._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:i,schema:s,schemaCode:a,it:o}=e,{opts:u,errSchemaPath:l,schemaEnv:c,self:p}=o;u.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),s=r.const("fDef",wZ._`${i}[${a}]`),o=r.let("fType"),l=r.let("format");r.if(wZ._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(o,wZ._`${s}.type || "string"`).assign(l,wZ._`${s}.validate`)),(()=>r.assign(o,wZ._`"string"`).assign(l,s))),e.fail$data((0,wZ.or)(!1===u.strictSchema?wZ.nil:wZ._`${a} && !${l}`,function(){const e=c.$async?wZ._`(${s}.async ? await ${l}(${n}) : ${l}(${n}))`:wZ._`${l}(${n})`,r=wZ._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return wZ._`${l} && ${l} !== true && ${o} === ${t} && !${r}`}()))}():function(){const i=p.formats[s];if(!i)return void function(){if(!1===u.strictSchema)return void p.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}}();if(!0===i)return;const[a,o,d]=function(e){const t=e instanceof RegExp?(0,wZ.regexpCode)(e):u.code.formats?wZ._`${u.code.formats}${(0,wZ.getProperty)(s)}`:void 0,n=r.scopeValue("formats",{key:s,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,wZ._`${n}.validate`];return["string",e,n]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!c.$async)throw new Error("async format in sync schema");return wZ._`await ${d}(${n})`}return"function"==typeof o?wZ._`${d}(${n})`:wZ._`${d}.test(${n})`}())}())}};CZ.default=kZ,Object.defineProperty(DZ,"__esModule",{value:!0});const IZ=[CZ.default];DZ.default=IZ;var NZ={};Object.defineProperty(NZ,"__esModule",{value:!0}),NZ.contentVocabulary=NZ.metadataVocabulary=void 0,NZ.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],NZ.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(SG,"__esModule",{value:!0});const FZ=MG,_Z=WY,OZ=DZ,LZ=NZ,MZ=[TG.default,FZ.default,(0,_Z.default)(),OZ.default,LZ.metadataVocabulary,LZ.contentVocabulary];SG.default=MZ;var BZ,jZ,RZ={},UZ={};BZ=UZ,Object.defineProperty(BZ,"__esModule",{value:!0}),BZ.DiscrError=void 0,(jZ=BZ.DiscrError||(BZ.DiscrError={})).Tag="tag",jZ.Mapping="mapping",Object.defineProperty(RZ,"__esModule",{value:!0});const $Z=iz(),VZ=UZ,qZ=eG,KZ=sz,JZ={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===VZ.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>$Z._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=n.propertyName;if("string"!=typeof o)throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),l=t.const("tag",$Z._`${r}${(0,$Z.getProperty)(o)}`);function c(r){const n=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(i,$Z.Name),n}t.if($Z._`typeof ${l} == "string"`,(()=>function(){const r=function(){var e;const t={},r=u(i);let n=!0;for(let t=0;t<a.length;t++){let i=a[t];(null==i?void 0:i.$ref)&&!(0,KZ.schemaHasRulesButRef)(i,s.self.RULES)&&(i=qZ.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,null==i?void 0:i.$ref),i instanceof qZ.SchemaEnv&&(i=i.schema));const c=null===(e=null==i?void 0:i.properties)||void 0===e?void 0:e[o];if("object"!=typeof c)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);n=n&&(r||u(i)),l(c,t)}if(!n)throw new Error(`discriminator: "${o}" must be required`);return t;function u({required:e}){return Array.isArray(e)&&e.includes(o)}function l(e,t){if(e.const)c(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`);for(const r of e.enum)c(r,t)}}function c(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${o}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf($Z._`${l} === ${e}`),t.assign(u,c(r[e]));t.else(),e.error(!1,{discrError:VZ.DiscrError.Mapping,tag:l,tagName:o}),t.endIf()}()),(()=>e.error(!1,{discrError:VZ.DiscrError.Tag,tag:l,tagName:o}))),e.ok(u)}};RZ.default=JZ;var WZ={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=XH,n=SG,i=RZ,s=WZ,a=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var l=Xz();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=iz();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var p=Gz();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=Zz();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(WH,WH.exports);const XZ={$schema:"http://json-schema.org/draft-07/schema#",type:"object",additionalProperties:!1,definitions:{rule:{oneOf:[{$ref:"#/definitions/ruleToggle"},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"object"}],minItems:2,additionalItems:!1},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"string"},{type:"object"}],minItems:3,additionalItems:!1},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"string"}],minItems:2,additionalItems:!1}]},rules:{description:"🐊Putout comes with a large number of rules. You can modify which rules your project uses.",type:"object",patternProperties:{"^.*$":{$ref:"#/definitions/rule"}}},ruleToggle:{oneOf:[{description:'🐊Putout rule\n\n"off" means rule is off\n"on" means it is a on\n',enum:["on","off"]},{enum:[!0,!1]}]},processorToggle:{type:"array",items:[{type:"string"},{description:'🐊Putout processor\n\n"off" means rule is off\n"on" means it is a on\n',enum:["on","off"]}],minItems:2,maxItems:2}},properties:{parser:{description:"Tell 🐊Putout which parser to use",type:"string"},printer:{description:"Tell 🐊Putout which printer to use",type:"string"},formatter:{description:"Choose the way to show information about errors found",type:["string","array"]},processors:{description:"Tell 🐊Putout which processors to use to support file types other then JavaScript",type:"array",uniqueItems:!0,items:{oneOf:[{$ref:"#/definitions/processorToggle"},{type:"string"}]}},ignore:{description:"Tell 🐊Putout to ignore specific files and directories.",type:"array",uniqueItems:!0,items:{type:"string"}},match:{description:"Allows to match rules for files and folders, specified by glob patterns.",type:"object",patternProperties:{"^.*$":{$ref:"#/definitions/rules"}}},plugins:{description:"Tell 🐊Putout which plugins to load",type:"array",uniqueItems:!0},rules:{$ref:"#/definitions/rules"}}};new(0,WH.exports)({strict:!0,allowUnionTypes:!0}).compile(XZ);const{homedir:HZ}=r,{readdirSync:zZ}=n,{dirname:GZ,join:YZ}=s,QZ=Oo,ZZ=Co,e0=HZ(),t0=e=>"."!==e[0]&&!/(^not-rule-.*|^node_modules$)/.test(e);QZ((()=>{const e=YZ(e0,".putout.json"),[,t={}]=ZZ(UM,e);return t})),QZ((()=>function(e,t){if(!t)return{};let r=YZ(e,t);r.startsWith("/")||(r=YZ(process.cwd(),t));const[n,i]=ZZ(zZ,r);if(n)return{};const s=[];for(const e of i.filter(t0)){const t=UM(YZ(r,e)),n=e.replace("putout-plugin-","");s.push([n,t])}return{plugins:s}}(e0,".putout"))),process.cwd();var r0={},n0={};const{isIdentifier:i0,isObjectExpression:s0,isObjectPattern:a0,isTemplateLiteral:o0,isAssignmentPattern:u0}=$X().types,l0=({use:e,declare:t})=>{const r=h0({use:e});return e=>{for(const n of e){if(n.isRestElement())continue;const{key:e,value:i}=n.node,s=n.get("value");switch(i.type){case"Identifier":t(n,i.name);break;case"AssignmentPattern":n.node.shorthand?t(n,e.name):t(n,s.node.left.name),r(s)}}}};n0.traverseObjectPattern=l0;const c0=({use:e,declare:t})=>r=>{for(const n of r){const{key:r,value:i,computed:s}=n.node;if(s&&i0(r)&&e(n,r.name),i0(i))t(n,i.name);else if(a0(i)){c0({use:e,declare:t})(n.get("value.properties"))}else if(u0(i)){h0({use:e})(n.get("value.right"));const r=n.get("value.left");if("Identifier"===r.type){t(n,r.node.name);continue}}}};n0.processObjectPattern=c0;const p0=e=>{const t=d0(e);return r=>{for(const n of r){const{node:r}=n,{key:i,value:s,computed:a}=r;if(a&&i0(i)&&e(n,i.name),i0(s))e(n,s.name);else if(o0(s))t(n,s.expressions);else if(s0(s)){p0(e)(n.get("value.properties"))}else;}}};n0.traverseObjectExpression=p0;n0.traverseArrayExpression=e=>{const t=p0(e);return e=>{for(const r of e){const{node:e}=r;s0(e)&&t(r.get("properties"))}}};n0.traverseAssignmentExpression=({use:e,declare:t})=>{const r=l0({use:e,declare:t});return n=>{const i=n.get("left"),s=n.get("right");if(i.isIdentifier()){const{parentPath:e}=i.parentPath,{name:r}=i.node;e.isObjectProperty()&&t(e,r),e.isFunction()&&t(i.parentPath,r)}s.isIdentifier()&&e(s,s.node.name),i.isObjectPattern()&&r(i.get("properties"))}};const d0=e=>(t,r)=>{for(const n of r)i0(n)&&e(t,n.name)};n0.traverseTemplateLiteral=d0;const h0=({use:e})=>t=>{const{node:r}=t,{right:n}=r;i0(r)&&e(t.parentPath,r.name),i0(n)&&e(t,n.name)};n0.traverseAssignmentPattern=h0;const{types:f0}=$X(),{isIdentifier:m0,isJSXIdentifier:y0}=f0;const{types:g0}=$X(),{isIdentifier:x0}=g0;const{types:b0}=$X(),{isIdentifier:S0,isTSModuleDeclaration:T0}=b0;const{isAssignmentPattern:E0,isClassDeclaration:v0,isIdentifier:P0,isSpreadElement:A0,isObjectPattern:D0,isObjectExpression:C0,isFunctionDeclaration:w0,isArrayExpression:k0,isVariableDeclaration:I0,isRestElement:N0}=$X().types,{traverseObjectExpression:F0,processObjectPattern:_0,traverseArrayExpression:O0,traverseAssignmentExpression:L0,traverseTemplateLiteral:M0}=n0,B0=e=>({JSXOpeningElement(t){const{node:r}=t,{name:n}=r;/^[A-Z]/.test(n.name)&&e(t,n.name),e(t,"React")},JSXFragment(t){e(t,"React")},JSXSpreadAttribute(t){const r=t.get("argument");if(r.isIdentifier())return e(t,r.node.name)},JSXMemberExpression(t){const{node:r}=t,{object:n}=r;y0(n)&&e(t,n.name)},JSXExpressionContainer(t){const{node:r}=t,{expression:n}=r;m0(n)&&e(t,n.name)}}),j0=({use:e,declare:t})=>({GenericTypeAnnotation(t){const{node:r}=t,{id:n}=r;x0(n)&&e(t,n.name)},QualifiedTypeIdentifier(t){const{qualification:r}=t.node,{type:n}=r;if("Identifier"===n)return e(t,r.name)},InterfaceDeclaration(e){t(e,e.node.id.name)}}),R0=({use:e,declare:t})=>({TSExpressionWithTypeArguments(t){const{expression:r}=t.node,{type:n}=r;if("Identifier"===n)e(t,r.name)},TSFunctionType(r){const{node:n}=r,{params:i}=n;for(const n of i){const{type:i}=n;switch(i){case"Identifier":t(r,n.name),e(r,n.name);break;case"RestElement":S0(n.argument)&&(t(r,n.argument.name),e(r,n.argument.name))}}},TSTypeReference(t){const{node:r}=t,{typeName:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSTypeAliasDeclaration(e){const{node:r}=e,{id:n}=r,{type:i}=n;if("Identifier"===i)t(e,n.name)},TSTypeQuery(t){const{node:r}=t,{exprName:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSAsExpression(t){const{node:r}=t,{expression:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSQualifiedName(t){const{node:r}=t,{left:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSInterfaceDeclaration(r){t(r,r.node.id.name),r.findParent(T0)&&e(r,r.node.id.name)},TSMethodSignature(r){const n=r.get("params");for(const r of n){if(r.isIdentifier()){t(r,r.node.name),e(r,r.node.name);continue}const{type:n}=r;"RestElement"!==n||(t(r,r.node.argument.name),e(r,r.node.argument.name))}},TSDeclareFunction(t){if(!t.get("params").length)return;const[r]=t.get("params");r.isRestElement()&&e(r,r.node.argument.name)}}),{assign:U0}=Object;const $0=e=>{const{remove:t}=e;return()=>{const r=e.node,{elements:n}=e.parentPath.node,i=n.length-1;if(n.indexOf(r)===i)return t.call(e)}};var V0={};const{types:q0}=$X(),{isIdentifier:K0,isObjectPattern:J0,isRestElement:W0}=q0;function X0(e,t,r){const{length:n}=r,i=r[n-1];if(W0(i))for(let i=0;i<n-1;i++){const{value:n}=r[i],{type:s}=n;"Identifier"!==s||e(t,n.name)}}V0.usePropertiesBeforeRest=({use:e})=>({path:t,params:r})=>{for(const n of r)J0(n)&&X0(e,t,n.properties)},V0.useParamsBeforeLastUsed=({use:e,isUsed:t})=>({path:r,params:n})=>{let i=n.length;for(;--i>0;){const e=n[i];if(H0(t,r,e))break}for(;--i>=0;)K0(n[i])&&e(r,n[i].name);return{path:r,params:n}};const H0=(e,t,r)=>{const{type:n}=r;switch(n){case"Identifier":return e(t,r.name);case"ObjectPattern":return G0(e,t,r);case"AssignmentPattern":return z0(e,t,r)}},z0=(e,t,r)=>{const{left:n}=r,{type:i}=n;switch(i){case"Identifier":return e(t,n.name);case"ObjectPattern":return G0(e,t,n)}},G0=(e,t,r)=>{for(const{value:n}of r.properties)if(K0(n)){if(e(t,n.name))return!0}else;return!1},{types:Y0}=$X(),Q0=({use:e,declare:t,addParams:r})=>{const n=F0(e),i=_0({use:e,declare:t}),s=L0({use:e,declare:t}),a=M0(e),o=O0(e);return{"ObjectExpression|RecordExpression"(e){n(e.get("properties"))},SequenceExpression(t){for(const r of t.get("expressions"))r.isIdentifier()&&e(r,r.node.name)},"AwaitExpression|YieldExpression|SpreadElement"(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},CatchClause(r){const n=r.get("param");if(!n.isIdentifier())return;const{name:i}=n.node;t(n,i);r.scope.getOwnBinding(i).referenced&&e(n,i)},Decorator(t){const r=t.get("expression");if(!r.isIdentifier())return;const{name:n}=r.node;e(r,n)},RestElement(e){const{argument:r}=e.node;P0(r)&&t(e,r.name)},VariableDeclarator(r){const{node:n}=r,{init:a}=n,u=r.get("id"),l=r.parentPath.parentPath.isForInStatement();if(P0(n.id))t(r,n.id.name),l&&e(r,n.id.name);else if(D0(n.id))u.traverse({ObjectProperty(i){if(E0(i.node.value)&&s(i.get("value")),i.node.computed&&P0(i.node.key)&&e(i.get("key"),i.node.key.name),!P0(i.node.value))return;const{properties:a}=n.id,o=1===a.length?r:i,{name:u}=i.node.value;t(o,u),N0(i.parentPath.node.properties.at(-1))&&e(o,u)}});else if(u.isArrayPattern()){const r=u.get("elements");for(const n of r)if(n.isObjectPattern())i(n.get("properties"));else{if(n.isAssignmentPattern()){const r=n.get("left"),i=n.get("right");t(r,n.node.left.name),e(i,n.node.right.name),U0(r,{remove:$0(n)})}n.isIdentifier()&&(U0(n,{remove:$0(n)}),t(n,n.node.name))}}const c=r.get("init");P0(a)?e(r,a.name):k0(a)&&o(c.get("elements"))},ClassProperty(t){const r=t.get("value");r.isIdentifier()&&e(r,r.node.name)},"ClassDeclaration|ClassExpression"(r){const{node:n}=r,{id:i,superClass:s}=n;s&&e(r,s.name),i&&t(r,i.name),i&&r.isClassExpression()&&e(r,i.name)},AssignmentExpression(t){const r=t.get("left"),n=t.get("right");r.isIdentifier()&&e(r,r.node.name),n.isIdentifier()&&e(n,n.node.name)},"ArrayExpression|TupleExpression"(t){const{elements:r}=t.node;for(const n of r)P0(n)?e(t,n.name):A0(n)&&e(t,n.argument.name)},ConditionalExpression(t){const{test:r,consequent:n,alternate:i}=t.node,s=t.get("alternate"),a=t.get("consequent");P0(r)&&e(t,r.name),P0(n)&&e(t,n.name),P0(i)&&e(t,i.name),s.isFunction()&&i.id&&e(s,i.id.name),a.isFunction()&&n.id&&e(a,n.id.name)},DoWhileStatement(t){const r=t.get("test");r.isIdentifier()&&e(r,r.node.name)},TemplateLiteral(e){a(e,e.node.expressions)},LogicalExpression(t){const{left:r,right:n}=t.node;P0(r)&&e(t,r.name),P0(n)&&e(t,n.name)},MemberExpression(t){const{property:r,object:n,computed:i}=t.node;P0(n)&&e(t,n.name),i&&P0(r)&&e(t,r.name)},OptionalMemberExpression(t){const{object:r,property:n,computed:i}=t.node;P0(r)&&e(t,r.name),i&&P0(n)&&e(t,n.name)},NewExpression(t){const r=t.get("callee"),{node:n}=t;r.isIdentifier()?e(t,n.callee.name):r.isFunction()&&e(r,r.node.id.name);const i=t.get("arguments");for(const{node:r}of i)P0(r)&&e(t,r.name)},TaggedTemplateExpression(t){const{tag:r}=t.node;P0(r)&&e(t,r.name)},UnaryExpression(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},UpdateExpression(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},ThrowStatement(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},IfStatement(t){const{node:r}=t,{test:n}=r;if(P0(n))return e(t,n.name)},ForInStatement(t){const{node:r}=t,{left:n,right:i}=r;P0(n)&&e(t,n.name),P0(i)&&e(t,i.name)},ForOfStatement(r){const{node:n}=r,{left:i,right:s}=n;P0(s)&&e(r,s.name),P0(i)?e(r,i.name):r.get("left").traverse({Identifier(e){t(r,e.node.name)}}),r.get("left").traverse({Identifier(t){e(t,t.node.name)}})},ExpressionStatement(t){const{node:r}=t;P0(r.expression)&&e(t,r.expression.name)},SwitchStatement(t){const{node:r}=t;P0(r.discriminant)&&e(t,r.discriminant.name);for(const{test:n}of r.cases)P0(n)&&e(t,n.name)},ReturnStatement(t){const{node:r}=t,{argument:n}=r,i=t.get("argument");return i.isIdentifier()?e(t,n.name):i.isFunction()&&n.id?e(i,n.id.name):void 0},ObjectMethod(e){const{params:n}=e.node,i=e.get("params");for(const e of i){const{node:r}=e;P0(r)&&t(e,r.name)}r({path:e,params:n})},"CallExpression|OptionalCallExpression"(t){const{node:r}=t,{callee:n}=r;P0(n)&&e(t,r.callee.name),t.traverse({SpreadElement(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},Identifier(t){r.arguments.includes(t.node)&&e(t,t.node.name)}})},BinaryExpression(t){const{left:r,right:n}=t.node;P0(r)&&e(t,r.name),P0(n)&&e(t,n.name)},ImportDeclaration(e){const r=e.get("specifiers");for(const e of r){const{local:r}=e.node;P0(r)&&t(e,r.name)}},ExportDefaultDeclaration(t){const r=t.get("declaration"),{declaration:i}=t.node,{id:s}=i;s&&w0(i)?e(t,i.id.name):P0(i)?e(t,i.name):s&&v0(i)?e(t,i.id.name):C0(i)&&n(r.get("properties"))},ExportNamedDeclaration(t){const r=t.get("declaration"),{declaration:n,specifiers:i}=t.node;if(r.isFunctionDeclaration())return e(t,n.id.name);if(r.isClassDeclaration())return e(t,n.id.name);if(r.isTSInterfaceDeclaration())return e(t,n.id.name);if(r.isTSTypeAliasDeclaration())return e(t,n.id.name);if(r.isInterfaceDeclaration())return e(t,n.id.name);if(I0(n)){const{declarations:r}=n;for(const{id:n}of r)P0(n)&&e(t,n.name)}else for(const{local:r}of i)P0(r)&&e(t,r.name)},Function(n){const{node:a,parentPath:o}=n,{id:u,body:l,params:c}=a,p=n.get("params");u&&(t(n,a.id.name),o.isBlock()||o.isProgram()||e(n,a.id.name));for(const e of p){const{node:r}=e;P0(r)?t(e,r.name):E0(r)?s(e):D0(r)&&i(e.get("properties"))}P0(l)&&e(n,l.name),r({path:n,params:c})},...B0(e),...j0({use:e,declare:t}),...R0({use:e,declare:t})}},{useParamsBeforeLastUsed:Z0,usePropertiesBeforeRest:e1}=V0,{isClassDeclaration:t1,isFunctionDeclaration:r1}=Y0;const n1=e=>({path:t,params:r})=>{e.push({path:t,params:r})};function i1({name:e,scope:t}){if(t.hasOwnBinding(e))return t.uid;for(;t.parent;)if((t=t.parent).hasOwnBinding(e))return t.uid;return t.uid}const s1=({vars:e})=>(t,r)=>{const{scope:n}=t,i=i1({name:r,scope:n}),s=e[i],{used:a}=s[r];return a};const a1=({vars:e,setPath:t})=>(r,n)=>{const i=function(e){const{node:t,scope:r}=e;return r1(t)||t1(t)?e.parentPath.scope:r}(r),s=i1({name:n,scope:i});e[s]||(e[s]={});const a=e[s];a[n]?a[n].declared=!0:a[n]={declared:!0,used:!1},t&&(a[n].path=r)},o1=({vars:e})=>(t,r)=>{const{scope:n}=t,i=i1({name:r,scope:n});e[i]||(e[i]={});const s=e[i];s[r]?s[r].used=!0:s[r]={declared:!1,used:!0}};function u1([e,t]){return{name:e,...t}}const l1=({declared:e,used:t})=>e&&!t;const{operator:c1}=$X(),p1=(e,t)=>{const r={},n=[],{setPath:i,traverse:s}=t,a=o1({vars:r}),o=a1({vars:r,setPath:i}),u=s1({vars:r}),l=n1(n);return s(e,Q0({use:a,declare:o,addParams:l})),n.map(Z0({use:a,isUsed:u})).map(e1({use:a})),Object.values(r)},d1=e=>{const t=[];for(const r of e){const e=Object.entries(r);for(const r of e)t.push(u1(r))}return t},h1=e=>e.filter(l1),{replaceWith:f1,compare:m1,remove:y1}=c1;r0.report=({name:e})=>`'${e}' is defined but never used`,r0.fix=({path:e})=>m1(e,"const __a = __b = __c")?f1(e.parentPath,e.node.init):function({parentPath:e}){return!!e.isImportDeclaration()&&1===e.node.specifiers.length}(e)?y1(e.parentPath):void y1(e),r0.find=(e,{traverse:t})=>{const r=p1(e,{setPath:!0,traverse:t}),n=d1(r);return h1(n)};var g1,x1,b1=Object.create,S1=Object.defineProperty,T1=Object.getOwnPropertyDescriptor,E1=Object.getOwnPropertyNames,v1=Object.getPrototypeOf,P1=Object.prototype.hasOwnProperty,A1=(e,t)=>()=>(e&&(t=e(e=0)),t),D1=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),C1=(e,t)=>{for(var r in t)S1(e,r,{get:t[r],enumerable:!0})},w1=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of E1(t))!P1.call(e,i)&&i!==r&&S1(e,i,{get:()=>t[i],enumerable:!(n=T1(t,i))||n.enumerable});return e},k1=(e,t,r)=>(r=null!=e?b1(v1(e)):{},w1(!t&&e&&e.__esModule?r:S1(r,"default",{value:e,enumerable:!0}),e)),I1=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},N1=(e,t,r)=>(((e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)})(e,t,"access private method"),r),F1=D1((e=>{function t(){}function r(e,t,r,n,i){for(var s=0,a=t.length,o=0,u=0;s<a;s++){var l=t[s];if(l.removed){if(l.value=e.join(n.slice(u,u+l.count)),u+=l.count,s&&t[s-1].added){var c=t[s-1];t[s-1]=t[s],t[s]=c}}else{if(!l.added&&i){var p=r.slice(o,o+l.count);p=p.map((function(e,t){var r=n[u+t];return r.length>e.length?r:e})),l.value=e.join(p)}else l.value=e.join(r.slice(o,o+l.count));o+=l.count,l.added||(u+=l.count)}}var d=t[a-1];return a>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[a-2].value+=d.value,t.pop()),t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=t,t.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var s=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var o=(t=this.removeEmpty(this.tokenize(t))).length,u=e.length,l=1,c=o+u;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=o&&d+1>=u)return a([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*l;n<=l;n+=2){var i=void 0,c=p[n-1],d=p[n+1],h=(d?d.newPos:0)-n;c&&(p[n-1]=void 0);var f=c&&c.newPos+1<o,m=d&&0<=h&&h<u;if(f||m){if(!f||m&&c.newPos<d.newPos?(i={newPos:(y=d).newPos,components:y.components.slice(0)},s.pushComponent(i.components,void 0,!0)):((i=c).newPos++,s.pushComponent(i.components,!0,void 0)),h=s.extractCommon(i,t,e,n),i.newPos+1>=o&&h+1>=u)return a(r(s,i.components,t,e,s.useLongestToken));p[n]=i}else p[n]=void 0}var y;l++}if(i)!function e(){setTimeout((function(){if(l>c)return i();h()||e()}),0)}();else for(;l<=c;){var f=h();if(f)return f}},pushComponent:function(e,t,r){var n=e[e.length-1];n&&n.added===t&&n.removed===r?e[e.length-1]={count:n.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,n){for(var i=t.length,s=r.length,a=e.newPos,o=a-n,u=0;a+1<i&&o+1<s&&this.equals(t[a+1],r[o+1]);)a++,o++,u++;return u&&e.components.push({count:u}),e.newPos=a,o},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}})),_1=D1((e=>{var t;Object.defineProperty(e,"__esModule",{value:!0}),e.diffArrays=function(e,t,n){return r.diff(e,t,n)},e.arrayDiff=void 0;var r=new(((t=F1())&&t.__esModule?t:{default:t}).default);e.arrayDiff=r,r.tokenize=function(e){return e.slice()},r.join=r.removeEmpty=function(e){return e}})),O1=A1((()=>{(g1=e=>e).grey=g1,g1.red=g1,g1.bold=g1,g1.yellow=g1,g1.blue=g1,g1.default=g1,x1=g1})),L1={};C1(L1,{getChalk:()=>B1,shouldHighlight:()=>M1});var M1,B1,j1=A1((()=>{O1(),M1=()=>!1,B1=()=>x1})),R1=D1((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=s,e.default=function(e,t,r,i={}){if(!n){n=!0;let e="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";new Error(e).name="DeprecationWarning",console.warn(new Error(e))}return r=Math.max(r,0),s(e,{start:{column:r,line:t}},i)};var t,r=(j1(),t=L1,w1(S1({},"__esModule",{value:!0}),t)),n=!1;var i=/\r\n|[\n\r\u2028\u2029]/;function s(e,t,n={}){let s=(n.highlightCode||n.forceColor)&&(0,r.shouldHighlight)(n),a=(0,r.getChalk)(n),o=function(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}(a),u=(e,t)=>s?e(t):t,l=e.split(i),{start:c,end:p,markerLines:d}=function(e,t,r){let n=Object.assign({column:0,line:-1},e.start),i=Object.assign({},n,e.end),{linesAbove:s=2,linesBelow:a=3}=r||{},o=n.line,u=n.column,l=i.line,c=i.column,p=Math.max(o-(s+1),0),d=Math.min(t.length,l+a);-1===o&&(p=0),-1===l&&(d=t.length);let h=l-o,f={};if(h)for(let e=0;e<=h;e++){let r=e+o;if(u)if(0===e){let e=t[r-1].length;f[r]=[u,e-u+1]}else if(e===h)f[r]=[0,c];else{let n=t[r-e].length;f[r]=[0,n]}else f[r]=!0}else f[o]=u===c?!u||[u,0]:[u,c-u];return{start:p,end:d,markerLines:f}}(t,l,n),h=t.start&&"number"==typeof t.start.column,f=String(p).length,m=(s?(0,r.default)(e,n):e).split(i,p).slice(c,p).map(((e,t)=>{let r=c+1+t,i=` ${` ${r}`.slice(-f)} |`,s=d[r],a=!d[r+1];if(s){let t="";if(Array.isArray(s)){let r=e.slice(0,Math.max(s[0]-1,0)).replace(/[^\t]/g," "),l=s[1]||1;t=["\n ",u(o.gutter,i.replace(/\d/g," "))," ",r,u(o.marker,"^").repeat(l)].join(""),a&&n.message&&(t+=" "+u(o.message,n.message))}return[u(o.marker,">"),u(o.gutter,i),e.length>0?` ${e}`:"",t].join("")}return` ${u(o.gutter,i)}${e.length>0?` ${e}`:""}`})).join("\n");return n.message&&!h&&(m=`${" ".repeat(f+1)}${n.message}\n${m}`),s?a.reset(m):m}}));C1({},{__debug:()=>k5,check:()=>C5,doc:()=>b5,format:()=>D5,formatWithCursor:()=>A5,getSupportInfo:()=>w5,util:()=>s5,version:()=>v5});var U1=(e,t,r,n)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},$1=k1(_1(),1),V1="string",q1="array",K1="cursor",J1="indent",W1="align",X1="trim",H1="group",z1="fill",G1="if-break",Y1="indent-if-break",Q1="line-suffix",Z1="line-suffix-boundary",e2="line",t2="label",r2="break-parent",n2=new Set([K1,J1,W1,X1,H1,z1,G1,Y1,Q1,Z1,e2,t2,r2]);var i2=function(e){if("string"==typeof e)return V1;if(Array.isArray(e))return q1;if(!e)return;let{type:t}=e;return n2.has(t)?t:void 0};function s2(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(i2(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if("[object Object]"!==r)return`Unexpected doc '${r}'.`;let n=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...n2].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var a2=class extends Error{name="InvalidDocError";constructor(e){super(s2(e)),this.doc=e}},o2=a2,u2={};var l2=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===u2){r(i.pop());continue}r&&i.push(e,u2);let s=i2(e);if(!s)throw new o2(e);if(!1!==(null==t?void 0:t(e)))switch(s){case q1:case z1:{let t=s===q1?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case G1:i.push(e.flatContents,e.breakContents);break;case H1:if(n&&e.expandedStates)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);break;case W1:case J1:case Y1:case t2:case Q1:i.push(e.contents);break;case V1:case K1:case X1:case Z1:case e2:case r2:break;default:throw new o2(e)}}},c2=()=>{};function p2(e){return{type:J1,contents:e}}function d2(e,t){return{type:W1,contents:t,n:e}}function h2(e,t={}){return c2(t.expandedStates),{type:H1,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function f2(e){return{type:z1,parts:e}}function m2(e){return{type:Q1,contents:e}}var y2={type:Z1},g2={type:r2},x2={type:X1},b2={type:e2,hard:!0},S2={type:e2,hard:!0,literal:!0},T2={type:e2},E2={type:e2,soft:!0},v2=[b2,g2],P2=[S2,g2],A2={type:K1};function D2(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function C2(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=p2(n);n=d2(t%r,n),n=d2(Number.NEGATIVE_INFINITY,n)}return n}var w2=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)};function k2(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}function I2(e,t){let r;switch(t){case"\n":r=/\n/g;break;case"\r":r=/\r/g;break;case"\r\n":r=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}var N2={eastAsianWidth(e){var t=e.charCodeAt(0),r=2==e.length?e.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=r&&r<=57343&&(n=(t&=1023)<<10|(r&=1023),n+=65536),12288==n||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":"N"}},F2=/[^\x20-\x7F]/;var _2=function(e){if(!e)return 0;if(!F2.test(e))return e.length;e=e.replace(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g," ");let t=0;for(let r of e){let e=r.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=768&&e<=879)continue;let n=N2.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t},O2=e=>{if(Array.isArray(e))return e;if(e.type!==z1)throw new Error(`Expect doc to be 'array' or '${z1}'.`);return e.parts};function L2(e,t){if("string"==typeof e)return t(e);let r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);let i=function(e){switch(i2(e)){case q1:return t(e.map(n));case z1:return t({...e,parts:e.parts.map(n)});case G1:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case H1:{let{expandedStates:r,contents:i}=e;return r?(r=r.map(n),i=r[0]):i=n(i),t({...e,contents:i,expandedStates:r})}case W1:case J1:case Y1:case t2:case Q1:return t({...e,contents:n(e.contents)});case V1:case K1:case X1:case Z1:case e2:case r2:return t(e);default:throw new o2(e)}}(e);return r.set(e,i),i}}function M2(e,t,r){let n=r,i=!1;return l2(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function B2(e){if(e.type===H1&&e.break||e.type===e2&&e.hard||e.type===r2)return!0}function j2(e){if(e.length>0){let t=w2(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function R2(e){return e.type!==e2||e.hard?e.type===G1?e.flatContents:e:e.soft?"":" "}function U2(e){for(e=[...e];e.length>=2&&w2(!1,e,-2).type===e2&&w2(!1,e,-1).type===r2;)e.length-=2;if(e.length>0){let t=$2(w2(!1,e,-1));e[e.length-1]=t}return e}function $2(e){switch(i2(e)){case W1:case J1:case Y1:case H1:case Q1:case t2:{let t=$2(e.contents);return{...e,contents:t}}case G1:return{...e,breakContents:$2(e.breakContents),flatContents:$2(e.flatContents)};case z1:return{...e,parts:U2(e.parts)};case q1:return U2(e);case V1:return e.replace(/[\n\r]*$/,"");case K1:case X1:case Z1:case e2:case r2:break;default:throw new o2(e)}return e}function V2(e){return $2(function(e){return L2(e,(e=>function(e){switch(i2(e)){case z1:if(e.parts.every((e=>""===e)))return"";break;case H1:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===H1&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case W1:case J1:case Y1:case Q1:if(!e.contents)return"";break;case G1:if(!e.flatContents&&!e.breakContents)return"";break;case q1:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof w2(!1,t,-1)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:t}case V1:case K1:case X1:case Z1:case e2:case t2:case r2:break;default:throw new o2(e)}return e}(e)))}(e))}function q2(e){if(e.type===e2)return!0}function K2(e,t){return e.type===t2?{...e,contents:t(e.contents)}:t(e)}var J2=Symbol("MODE_BREAK"),W2=Symbol("MODE_FLAT"),X2=Symbol("cursor");function H2(e,t){return G2(e,{type:"indent"},t)}function z2(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?G2(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:G2(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function G2(e,t,r){let n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,a=0,o=0;for(let e of n)switch(e.type){case"indent":c(),r.useTabs?u(1):l(r.tabWidth);break;case"stringAlign":c(),i+=e.n,s+=e.n.length;break;case"numberAlign":a+=1,o+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),{...e,value:i,length:s,queue:n};function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function l(e){i+=" ".repeat(e),s+=e}function c(){r.useTabs?(a>0&&u(a),d()):p()}function p(){o>0&&l(o),d()}function d(){a=0,o=0}}function Y2(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==X2)for(let r=i.length-1;r>=0;r--){let s=i[r];if(" "!==s&&"\t"!==s){e[n]=i.slice(0,r+1);break e}t++}else r++}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(X2);return t}function Q2(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=[e],u=[];for(;r>=0;){if(0===o.length){if(0===a)return!0;o.push(t[--a]);continue}let{mode:e,doc:l}=o.pop();switch(i2(l)){case V1:u.push(l),r-=_2(l);break;case q1:case z1:{let t=O2(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case J1:case W1:case Y1:case t2:o.push({mode:e,doc:l.contents});break;case X1:r+=Y2(u);break;case H1:{if(s&&l.break)return!1;let t=l.break?J2:e,r=l.expandedStates&&t===J2?w2(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case G1:{let t=(l.groupId?i[l.groupId]||W2:e)===J2?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case e2:if(e===J2||l.hard)return!0;l.soft||(u.push(" "),r--);break;case Q1:n=!0;break;case Z1:if(n)return!1}}return!1}function Z2(e,t){let r={},n=t.printWidth,i=k2(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:J2,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];l2(e,(function(e){if(e.type===r2&&j2(r),e.type===H1){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===H1&&r.pop().break&&j2(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(i2(d)){case V1:{let e="\n"!==i?U1(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=_2(e));break}case q1:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case K1:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(X2),c++;break;case J1:a.push({ind:H2(e,t),mode:p,doc:d.contents});break;case W1:a.push({ind:z2(e,d.n,t),mode:p,doc:d.contents});break;case X1:s-=Y2(o);break;case H1:switch(p){case W2:if(!u){a.push({ind:e,mode:d.break?J2:W2,doc:d.contents});break}case J2:{u=!1;let t={ind:e,mode:W2,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&Q2(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=w2(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:J2,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:J2,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:W2,doc:t};if(Q2(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:J2,doc:d.contents});break}}d.id&&(r[d.id]=w2(!1,a,-1).mode);break;case z1:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:W2,doc:o},h={ind:e,mode:J2,doc:o},f=Q2(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:W2,doc:u},y={ind:e,mode:J2,doc:u};if(2===i.length){f?a.push(m,c):a.push(y,h);break}i.splice(0,2);let g={ind:e,mode:p,doc:f2(i)},x=i[0];Q2({ind:e,mode:W2,doc:[o,u,x]},[],t,l.length>0,r,!0)?a.push(g,m,c):f?a.push(g,y,c):a.push(g,y,h);break}case G1:case Y1:{let t=d.groupId?r[d.groupId]:p;if(t===J2){let t=d.type===G1?d.breakContents:d.negate?d.contents:p2(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===W2){let t=d.type===G1?d.flatContents:d.negate?p2(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case Q1:l.push({ind:e,mode:p,doc:d.contents});break;case Z1:l.length>0&&a.push({ind:e,mode:p,doc:b2});break;case e2:switch(p){case W2:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case J2:if(l.length>0){a.push({ind:e,mode:p,doc:d},...l.reverse()),l.length=0;break}d.literal?e.root?(o.push(i,e.root.value),s=e.root.length):(o.push(i),s=0):(s-=Y2(o),o.push(i+e.value),s=e.length)}break;case t2:a.push({ind:e,mode:p,doc:d.contents});break;case r2:break;default:throw new o2(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(X2);if(-1!==p){let e=o.indexOf(X2,p+1),t=o.slice(0,p).join(""),r=o.slice(p+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}function e3(e){var t;if(!e)return"";if(Array.isArray(e)){let t=[];for(let r of e)if(Array.isArray(r))t.push(...e3(r));else{let e=e3(r);""!==e&&t.push(e)}return t}return e.type===G1?{...e,breakContents:e3(e.breakContents),flatContents:e3(e.flatContents)}:e.type===H1?{...e,contents:e3(e.contents),expandedStates:null==(t=e.expandedStates)?void 0:t.map(e3)}:e.type===z1?{type:"fill",parts:e.parts.map(e3)}:e.contents?{...e,contents:e3(e.contents)}:e}var t3=function(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n},r3=class extends Error{name="ConfigError"},n3=class extends Error{name="UndefinedParserError"},i3={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.\nThis option cannot be used with --range-start and --range-end.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:"Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)"}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:"Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.\nThis option cannot be used with --cursor-offset.",cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:"Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.\nThis option cannot be used with --cursor-offset.",cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment\nin order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function s3({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap((e=>e.languages??[])),n=[];for(let i of function(e){let t=[];for(let[r,n]of Object.entries(e)){let e={name:r,...n};Array.isArray(e.default)&&(e.default=w2(!1,e.default,-1).value),t.push(e)}return t}(Object.assign({},...e.map((({options:e})=>e)),i3)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter((e=>!e.deprecated))),"parser"===i.name&&(i.choices=[...i.choices,...a3(i.choices,r,e)])),i.pluginDefaults=Object.fromEntries(e.filter((e=>{var t;return void 0!==(null==(t=e.defaultOptions)?void 0:t[i.name])})).map((e=>[e.name,e.defaultOptions[i.name]]))),n.push(i));return{languages:r,options:n}}function*a3(e,t,r){let n=new Set(e.map((e=>e.value)));for(let e of t)if(e.parsers)for(let t of e.parsers)if(!n.has(t)){n.add(t);let i=r.find((e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t))),s=e.name;null!=i&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:t,description:s}}}var o3=e=>e.split(/[/\\]/).pop();function u3(e,t){if(!t)return;let r=o3(t).toLowerCase();return e.find((e=>{var t,n;return(null==(t=e.extensions)?void 0:t.some((e=>r.endsWith(e))))||(null==(n=e.filenames)?void 0:n.some((e=>e.toLowerCase()===r)))}))}var l3=function(e,t){let r=e.plugins.flatMap((e=>e.languages??[])),n=function(e,t){if(t)return e.find((({name:e})=>e.toLowerCase()===t))??e.find((({aliases:e})=>null==e?void 0:e.includes(t)))??e.find((({extensions:e})=>null==e?void 0:e.includes(`.${t}`)))}(r,t.language)??u3(r,t.physicalFile)??u3(r,t.file)??void t.physicalFile;return null==n?void 0:n.parsers[0]},c3={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map((e=>c3.value(e))).join(", ")}]`;let t=Object.keys(e);return 0===t.length?"{}":`{ ${t.map((t=>`${c3.key(t)}: ${c3.value(e[t])}`)).join(", ")} }`},pair:({key:e,value:t})=>c3.value({[e]:t})};O1();O1();var p3=Symbol.for("vnopts.VALUE_NOT_EXIST"),d3=Symbol.for("vnopts.VALUE_UNCHANGED"),h3=" ".repeat(2);function f3(e,t,r,n){return[`Invalid ${x1.red(n.key(e))} value.`,`Expected ${x1.blue(r)},`,`but received ${t===p3?x1.gray("nothing"):x1.red(n.value(t))}.`].join(" ")}function m3({text:e,list:t},r){let n=[];return e&&n.push(`- ${x1.blue(e)}`),t&&n.push([`- ${x1.blue(t.title)}:`].concat(t.values.map((e=>m3(e,r-h3.length).replace(/^|\n/g,`$&${h3}`)))).join("\n")),y3(n,r)}function y3(e,t){if(1===e.length)return e[0];let[r,n]=e,[i,s]=e.map((e=>e.split("\n",1)[0].length));return i>t&&i>s?n:r}O1();var g3=[],x3=[];var b3=(e,t,{descriptor:r,logger:n,schemas:i})=>{let s=[`Ignored unknown option ${x1.yellow(r.pair({key:e,value:t}))}.`],a=Object.keys(i).sort().find((t=>function(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,i=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-i);)n--,i--;let s=0;for(;s<n&&e.charCodeAt(s)===t.charCodeAt(s);)s++;if(n-=s,i-=s,0===n)return i;let a,o,u,l,c=0,p=0;for(;c<n;)x3[c]=e.charCodeAt(s+c),g3[c]=++c;for(;p<i;)for(a=t.charCodeAt(s+p),u=p++,o=p,c=0;c<n;c++)l=a===x3[c]?u:u+1,u=g3[c],o=g3[c]=u>o?l>o?o+1:l:l>u?u+1:l;return o}(e,t)<3));a&&s.push(`Did you mean ${x1.blue(r.key(a))}?`),n.warn(s.join(" "))},S3=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];var T3=class{static create(e){return function(e,t){let r=new e(t),n=Object.create(r);for(let e of S3)e in t&&(n[e]=E3(t[e],r,T3.prototype[e].length));return n}(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,r){return e}preprocess(e,t){return e}postprocess(e,t){return d3}};function E3(e,t,r){return"function"==typeof e?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var v3=class extends T3{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},P3=class extends T3{expected(){return"anything"}validate(){return!0}},A3=class extends T3{constructor({valueSchema:e,name:t=e.name,...r}){super({...r,name:t}),this._valueSchema=e}expected(e){let{text:t,list:r}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:r&&{title:"an array of the following values",values:[{list:r}]}}}validate(e,t){if(!Array.isArray(e))return!1;let r=[];for(let n of e){let e=t.normalizeValidateResult(this._valueSchema.validate(n,t),n);!0!==e&&r.push(e.value)}return 0===r.length||{value:r}}deprecated(e,t){let r=[];for(let n of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(n,t),n);!1!==e&&r.push(...e.map((({value:e})=>({value:[e]}))))}return r}forward(e,t){let r=[];for(let n of e){let e=t.normalizeForwardResult(this._valueSchema.forward(n,t),n);r.push(...e.map(D3))}return r}redirect(e,t){let r=[],n=[];for(let i of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);"remain"in e&&r.push(e.remain),n.push(...e.redirect.map(D3))}return 0===r.length?{redirect:n}:{redirect:n,remain:r}}overlap(e,t){return e.concat(t)}};function D3({from:e,to:t}){return{from:[e],to:t}}var C3=class extends T3{expected(){return"true or false"}validate(e){return"boolean"==typeof e}};function w3(e,t){let r=Object.create(null);for(let n of e){let e=n[t];if(r[e])throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);r[e]=n}return r}function k3(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,i=["undefined","object","boolean","number","string"];return r!==n?i.indexOf(r)-i.indexOf(n):"string"!==r?Number(e)-Number(t):e.localeCompare(t)}function I3(e){return void 0===e?{}:e}function N3(e){if("string"==typeof e)return{text:e};let{text:t,list:r}=e;return function(e,t){if(!e)throw new Error(t)}(void 0!==(t||r),"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(N3)}}:{text:t}}function F3(e,t){return!0===e||(!1===e?{value:t}:e)}function _3(e,t,r=!1){return!1!==e&&(!0===e?!!r||[{value:t}]:"value"in e?[e]:0!==e.length&&e)}function O3(e,t){return"string"==typeof e||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function L3(e,t){return void 0===e?[]:Array.isArray(e)?e.map((e=>O3(e,t))):[O3(e,t)]}function M3(e,t){let r=L3("object"==typeof e&&"redirect"in e?e.redirect:e,t);return 0===r.length?{remain:t,redirect:r}:"object"==typeof e&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}var B3,j3=class extends T3{constructor(e){super(e),this._choices=function(e,t){let r=new Map;for(let n of e){let e=n[t];if(r.has(e))throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);r.set(e,n)}return r}(e.choices.map((e=>e&&"object"==typeof e?e:{value:e})),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map((e=>this._choices.get(e))).filter((({hidden:e})=>!e)).map((e=>e.value)).sort(k3).map(e.value),r=t.slice(0,-2),n=t.slice(-2);return{text:r.concat(n.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return!(!t||!t.deprecated)&&{value:e}}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},R3=class extends T3{expected(){return"a number"}validate(e,t){return"number"==typeof e}},U3=class extends R3{expected(){return"an integer"}validate(e,t){return!0===t.normalizeValidateResult(super.validate(e,t),e)&&(r=e)===Math.floor(r);var r}},$3=class extends T3{expected(){return"a string"}validate(e){return"string"==typeof e}},V3=c3,q3=b3,K3=(e,t,r)=>{let{text:n,list:i}=r.normalizeExpectedResult(r.schemas[e].expected(r)),s=[];return n&&s.push(f3(e,t,n,r.descriptor)),i&&s.push([f3(e,t,i.title,r.descriptor)].concat(i.values.map((e=>m3(e,r.loggerPrintWidth)))).join("\n")),y3(s,r.loggerPrintWidth)},J3=(e,t,{descriptor:r})=>{let n=[`${x1.yellow("string"==typeof e?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${x1.blue("string"==typeof t?r.key(t):r.pair(t))}`),n.join("; ")+"."};function W3(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let i,{name:s}=e,a={name:s},o={};switch(e.type){case"int":i=U3,t&&(a.preprocess=Number);break;case"string":case"path":i=$3;break;case"choice":i=j3,a.choices=e.choices.map((t=>null!=t&&t.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t));break;case"boolean":i=C3;break;case"flag":i=n,a.flags=r.flatMap((e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean)));break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?a.validate=(t,r,n)=>e.exception(t)||r.validate(t,n):a.validate=(e,t,r)=>void 0===e||t.validate(e,r),e.redirect&&(o.redirect=t=>t?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(o.deprecated=!0),t&&!e.array){let e=a.preprocess||(e=>e);a.preprocess=(t,r,n)=>r.preprocess(e(Array.isArray(t)?w2(!1,t,-1):t),n)}return e.array?A3.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...o,valueSchema:i.create(a)}):i.create({...a,...o})}var X3=function(e,t,{logger:r=!1,isCLI:n=!1,passThrough:i=!1,FlagSchema:s,descriptor:a}={}){if(n){if(!s)throw new Error("'FlagSchema' option is required.");if(!a)throw new Error("'descriptor' option is required.")}else a=c3;let o=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,r)=>{let{_:n,...i}=r.schemas;return b3(e,t,{...r,schemas:i})},u=function(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(P3.create({name:"_"}));for(let i of e)n.push(W3(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(v3.create({name:i.alias,sourceName:i.name}));return n}(t,{isCLI:n,FlagSchema:s}),l=new class{constructor(e,t){let{logger:r=console,loggerPrintWidth:n=80,descriptor:i=V3,unknown:s=q3,invalid:a=K3,deprecated:o=J3,missing:u=(()=>!1),required:l=(()=>!1),preprocess:c=(e=>e),postprocess:p=(()=>d3)}=t||{};var d;this._utils={descriptor:i,logger:r||{warn:()=>{}},loggerPrintWidth:n,schemas:w3(e,"name"),normalizeDefaultResult:I3,normalizeExpectedResult:N3,normalizeDeprecatedResult:_3,normalizeForwardResult:L3,normalizeRedirectResult:M3,normalizeValidateResult:F3},this._unknownHandler=s,this._invalidHandler=(d=a,(...e)=>{let t=d(...e);return"string"==typeof t?new Error(t):t}),this._deprecatedHandler=o,this._identifyMissing=(e,t)=>!(e in t)||u(e,t),this._identifyRequired=l,this._preprocess=c,this._postprocess=p,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=function(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return!!e[r]||(e[r]=!0,!1)}}()}normalize(e){let t={},r=[this._preprocess(e,this._utils)],n=()=>{for(;0!==r.length;){let e=r.shift(),n=this._applyNormalization(e,t);r.push(...n)}};n();for(let e of Object.keys(this._utils.schemas)){let n=this._utils.schemas[e];if(!(e in t)){let t=I3(n.default(this._utils));"value"in t&&r.push({[e]:t.value})}}n();for(let e of Object.keys(this._utils.schemas)){if(!(e in t))continue;let r=this._utils.schemas[e],n=t[e],i=r.postprocess(n,this._utils);i!==d3&&(this._applyValidation(i,e,r),t[e]=i)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let r=[],{knownKeys:n,unknownKeys:i}=this._partitionOptionKeys(e);for(let i of n){let n=this._utils.schemas[i],s=n.preprocess(e[i],this._utils);this._applyValidation(s,i,n);let a=({from:e,to:t})=>{r.push("string"==typeof t?{[t]:e}:{[t.key]:t.value})},o=({value:e,redirectTo:t})=>{let r=_3(n.deprecated(e,this._utils),s,!0);if(!1!==r)if(!0===r)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,t,this._utils));else for(let{value:e}of r){let r={key:i,value:e};if(!this._hasDeprecationWarned(r)){let n="string"==typeof t?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(r,n,this._utils))}}};L3(n.forward(s,this._utils),s).forEach(a);let u=M3(n.redirect(s,this._utils),s);if(u.redirect.forEach(a),"remain"in u){let e=u.remain;t[i]=i in t?n.overlap(t[i],e,this._utils):e,o({value:e})}for(let{from:e,to:t}of u.redirect)o({value:e,redirectTo:t})}for(let n of i){let i=e[n];this._applyUnknownHandler(n,i,t,((e,t)=>{r.push({[e]:t})}))}return r}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,p3,this._utils)}_partitionOptionKeys(e){let[t,r]=function(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}(Object.keys(e).filter((t=>!this._identifyMissing(t,e))),(e=>e in this._utils.schemas));return{knownKeys:t,unknownKeys:r}}_applyValidation(e,t,r){let n=F3(r.validate(e,this._utils),e);if(!0!==n)throw this._invalidHandler(t,n.value,this._utils)}_applyUnknownHandler(e,t,r,n){let i=this._unknownHandler(e,t,this._utils);if(i)for(let e of Object.keys(i)){if(this._identifyMissing(e,i))continue;let t=i[e];e in this._utils.schemas?n(e,t):r[e]=t}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==d3){if(t.delete)for(let r of t.delete)delete e[r];if(t.override){let{knownKeys:r,unknownKeys:n}=this._partitionOptionKeys(t.override);for(let n of r){let r=t.override[n];this._applyValidation(r,n,this._utils.schemas[n]),e[n]=r}for(let r of n){let n=t.override[r];this._applyUnknownHandler(r,n,e,((t,r)=>{let n=this._utils.schemas[t];this._applyValidation(r,t,n),e[t]=r}))}}}}}(u,{logger:r,unknown:o,descriptor:a}),c=!1!==r;c&&B3&&(l._hasDeprecationWarned=B3);let p=l.normalize(e);return c&&(B3=l._hasDeprecationWarned),p};function H3(e,t){if(!t)throw new Error("parserName is required.");for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.parsers&&Object.prototype.hasOwnProperty.call(n.parsers,t))return n}let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new r3(r)}function z3({plugins:e,parser:t}){return G3(H3(e,t),t)}function G3(e,t){let r=e.parsers[t];return"function"==typeof r?r():r}var Y3={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};var Q3=async function(e,t={}){var r;let n={...e};if(!n.parser){if(!n.filepath)throw new n3("No parser and no file path given, couldn't infer a parser.");if(n.parser=l3(n,{physicalFile:n.filepath}),!n.parser)throw new n3(`No parser could be inferred for file "${n.filepath}".`)}let i=s3({plugins:e.plugins,showDeprecated:!0}).options,s={...Y3,...Object.fromEntries(i.filter((e=>void 0!==e.default)).map((e=>[e.name,e.default])))},a=H3(n.plugins,n.parser),o=await G3(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let u=null!=(r=a.printers)&&r[o.astFormat]?a:function(e,t){if(!t)throw new Error("astFormat is required.");for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.printers&&Object.prototype.hasOwnProperty.call(n.printers,t))return n}let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new r3(r)}(n.plugins,o.astFormat),l=await function(e,t){let r=e.printers[t];return"function"==typeof r?r():r}(u,o.astFormat);n.printer=l;let c={...s,...u.defaultOptions?Object.fromEntries(Object.entries(u.defaultOptions).filter((([,e])=>void 0!==e))):{}};for(let[e,t]of Object.entries(c))(null===n[e]||void 0===n[e])&&(n[e]=t);return"json"===n.parser&&(n.trailingComma="none"),X3(n,i,{passThrough:Object.keys(Y3),...t})},Z3=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),e4=e=>Object.keys(e).filter((e=>!Z3.has(e)));var t4=function(e){return e?t=>e(t,Z3):e4};var r4=function(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=t4(n),s=r.ignoredProperties??new Set;return function e(t,n){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map((t=>e(t,n))).filter(Boolean);let a={},o=new Set(i(t));for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||s.has(r)||(o.has(r)?a[r]=e(t[r],t):a[r]=t[r]);let u=r(t,a,n);if(null!==u)return u??a}(e)},n4=k1(R1(),1);var i4,s4,a4,o4,u4=async function(e,t){let r,n=await z3(t),i=n.preprocess?n.preprocess(e,t):e;t.originalText=i;try{r=await n.parse(i,t,t)}catch(t){!function(e,t){let{loc:r}=e;if(r){let n=(0,n4.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+="\n"+n,e.codeFrame=n,e}throw e}(t,e)}return{text:i,ast:r}};i4=new WeakSet,s4=function(e){let{stack:t}=this;for(let r=t.length-1;r>=0;r-=2)if(!Array.isArray(t[r])&&--e<0)return r;return-1},a4=new WeakSet,o4=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let r=e[t];Array.isArray(r)||(yield r)}};var l4=class{constructor(e){I1(this,i4),I1(this,a4),this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return w2(!1,e,null===t?-2:-4)??null}get index(){return null===this.siblings?null:w2(!1,this.stack,-2)}get node(){return w2(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return null!==this.siblings}get siblings(){let{stack:e}=this,t=w2(!1,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return null===e?null:e[this.index+1]}get previous(){let{siblings:e}=this;return null===e?null:e[this.index-1]}get isFirst(){return 0===this.index}get isLast(){let{siblings:e,index:t}=this;return null!==e&&t===e.length-1}get isRoot(){return 1===this.stack.length}get root(){return this.stack[0]}get ancestors(){return[...N1(this,a4,o4).call(this)]}getName(){let{stack:e}=this,{length:t}=e;return t>1?w2(!1,e,-2):null}getValue(){return w2(!1,this.stack,-1)}getNode(e=0){let t=N1(this,i4,s4).call(this,e);return-1===t?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}call(e,...t){let{stack:r}=this,{length:n}=r,i=w2(!1,r,-1);for(let e of t)i=i[e],r.push(e,i);try{return e(this)}finally{r.length=n}}callParent(e,t=0){let r=N1(this,i4,s4).call(this,t+1),n=this.stack.splice(r+1);try{return e(this)}finally{this.stack.push(...n)}}each(e,...t){let{stack:r}=this,{length:n}=r,i=w2(!1,r,-1);for(let e of t)i=i[e],r.push(e,i);try{for(let t=0;t<i.length;++t)r.push(t,i[t]),e(this,t,i),r.length-=2}finally{r.length=n}}map(e,...t){let r=[];return this.each(((t,n,i)=>{r[n]=e(t,n,i)}),...t),r}match(...e){let t=this.stack.length-1,r=null,n=this.stack[t--];for(let i of e){if(void 0===n)return!1;let e=null;if("number"==typeof r&&(e=r,r=this.stack[t--],n=this.stack[t--]),i&&!i(n,r,e))return!1;r=this.stack[t--],n=this.stack[t--]}return!0}findAncestor(e){for(let t of N1(this,a4,o4).call(this))if(e(t))return t}hasAncestor(e){for(let t of N1(this,a4,o4).call(this))if(e(t))return!0;return!1}},c4=()=>{};c4.ok=c4,c4.strictEqual=c4;var p4=c4;function d4(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var h4=d4(/\s/),f4=d4(" \t"),m4=d4(",; \t"),y4=d4(/[^\n\r]/);var g4=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};var x4=function(e,t,r={}){let n=f4(e,r.backwards?t-1:t,r);return n!==g4(e,n,r)};var b4=function(e){return Array.isArray(e)&&e.length>0};var S4=function(e){return null!==e&&"object"==typeof e};function*T4(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>S4(e)&&n(e);for(let t of r(e)){let r=e[t];if(Array.isArray(r))for(let e of r)i(e)&&(yield e);else i(r)&&(yield r)}}function E4(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}(e)}function v4(e,t){t.leading=!0,t.trailing=!1,E4(e,t)}function P4(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),E4(e,t)}function A4(e,t){t.leading=!1,t.trailing=!0,E4(e,t)}var D4=new WeakMap;function C4(e,t){if(D4.has(e))return D4.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:i},locStart:s,locEnd:a}=t;if(!n)return[];let o=((null==r?void 0:r(e,t))??[...T4(e,{getVisitorKeys:t4(i)})]).flatMap((e=>n(e)?[e]:C4(e,t)));return o.sort(((e,t)=>s(e)-s(t)||a(e)-a(t))),D4.set(e,o),o}function w4(e,t,r,n){let i,s,{locStart:a,locEnd:o}=r,u=a(t),l=o(t),c=C4(e,r),p=0,d=c.length;for(;p<d;){let e=p+d>>1,n=c[e],h=a(n),f=o(n);if(h<=u&&l<=f)return w4(n,t,r,n);if(f<=u)i=n,p=e+1;else{if(!(l<=h))throw new Error("Comment location overlaps with node location");s=n,d=e}}if("TemplateLiteral"===(null==n?void 0:n.type)){let{quasis:e}=n,a=O4(e,t,r);i&&O4(e,i,r)!==a&&(i=null),s&&O4(e,s,r)!==a&&(s=null)}return{enclosingNode:n,precedingNode:i,followingNode:s}}var k4=()=>!1;var I4=e=>!/[\S\n\u2028\u2029]/.test(e);function N4(e,t,r,n){let{comment:i,precedingNode:s}=r[n],{locStart:a,locEnd:o}=t,u=a(i);if(s)for(let t=n-1;t>=0;t--){let{comment:n,precedingNode:i}=r[t];if(i!==s||!I4(e.slice(o(n),u)))break;u=a(n)}return x4(e,u,{backwards:!0})}function F4(e,t,r,n){let{comment:i,followingNode:s}=r[n],{locStart:a,locEnd:o}=t,u=o(i);if(s)for(let t=n+1;t<r.length;t++){let{comment:n,followingNode:i}=r[t];if(i!==s||!I4(e.slice(u,a(n))))break;u=o(n)}return x4(e,u)}function _4(e,t){var r,n;let i=e.length;if(0===i)return;let s,{precedingNode:a,followingNode:o}=e[0],u=t.locStart(o);for(s=i;s>0;--s){let{comment:i,precedingNode:l,followingNode:c}=e[s-1];p4.strictEqual(l,a),p4.strictEqual(c,o);let p=t.originalText.slice(t.locEnd(i),u);if(!((null==(n=(r=t.printer).isGap)?void 0:n.call(r,p,t))??/^[\s(]*$/.test(p)))break;u=t.locStart(i)}for(let[t,{comment:r}]of e.entries())t<s?A4(a,r):v4(o,r);for(let e of[a,o])e.comments&&e.comments.length>1&&e.comments.sort(((e,r)=>t.locStart(e)-t.locStart(r)));e.length=0}function O4(e,t,r){let n=r.locStart(t)-1;for(let t=1;t<e.length;++t)if(n<r.locStart(e[t]))return t-1;return 0}var L4=function(e,t){let r=t-1;return r=f4(e,r,{backwards:!0}),r=g4(e,r,{backwards:!0}),r=f4(e,r,{backwards:!0}),r!==g4(e,r,{backwards:!0})};function M4(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function B4(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if(0===(r.comments||[]).filter((e=>!n.has(e))).length)return{leading:"",trailing:""};let i,s=[],a=[];return e.each((()=>{let r=e.node;if(null!=n&&n.has(r))return;let{leading:o,trailing:u}=r;o?s.push(function(e,t){var r;let n=e.node,i=[M4(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=x4(a,u(n))?x4(a,o(n),{backwards:!0})?v2:T2:" ";i.push(e)}else i.push(v2);let l=g4(a,f4(a,u(n)));return!1!==l&&x4(a,l)&&i.push(v2),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=M4(e,t),{printer:a,originalText:o,locStart:u}=t,l=null==(n=a.isBlockComment)?void 0:n.call(a,i);if(null!=r&&r.hasLineSuffix&&(null==r||!r.isBlock)||x4(o,u(i),{backwards:!0})){let e=L4(o,u(i));return{doc:m2([v2,e?v2:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[m2([" ",s]),g2],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}async function j4(e,t,r,n,i){let{embeddedLanguageFormatting:s,printer:{embed:a,hasPrettierIgnore:o=(()=>!1),getVisitorKeys:u}}=r;if(!a||"auto"!==s)return;if(a.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let l=t4(a.getVisitorKeys??u),c=[];!function t(){let{node:n}=e;if(null===n||"object"!=typeof n||o(e))return;for(let r of l(n))Array.isArray(n[r])?e.each(t,r):e.call(t,r);let s=a(e,r);if(s){if("function"==typeof s)return void c.push({print:s,node:n,pathStack:[...e.stack]});i.set(n,s)}}();let p=e.stack;for(let{print:n,node:s,pathStack:a}of c)try{e.stack=a;let o=await n(d,t,e,r);o&&i.set(s,o)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}function d(e,t){return async function(e,t,r,n){let i=await Q3({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await u4(e,i),a=await n(s,i);return V2(a)}(e,t,r,n)}e.stack=p}var R4=function(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:a}=t,{node:o}=e,u=i(o),l=s(o);for(let e of n)i(e)>=u&&s(e)<=l&&a.add(e);return r.slice(u,l)};async function U4(e,t){({ast:e}=await V4(e,t));let r=new Map,n=new l4(e),i=new Map;await j4(n,a,t,U4,i);let s=await $4(n,t,a,void 0,i);return function(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let e of t){if(!e.printed&&!r.has(e))throw new Error('Comment "'+e.value.trim()+'" was not printed. Please report this error!');delete e.printed}}(t),s;function a(e,t){return void 0===e||e===n?o(t):Array.isArray(e)?n.call((()=>o(t)),...e):n.call((()=>o(t)),e)}function o(e){let s=n.node;if(null==s)return"";let o=s&&"object"==typeof s&&void 0===e;if(o&&r.has(s))return r.get(s);let u=$4(n,t,a,e,i);return o&&r.set(s,u),u}}function $4(e,t,r,n,i){var s;let a,{node:o}=e,{printer:u}=t;return a=null!=(s=u.hasPrettierIgnore)&&s.call(u,e)?R4(e,t):i.has(o)?i.get(o):u.print(e,t,r,n),o===t.cursorNode&&(a=K2(a,(e=>[A2,e,A2]))),u.printComment&&(!u.willPrintOwnComments||!u.willPrintOwnComments(e,t))&&(a=function(e,t,r){let{leading:n,trailing:i}=B4(e,r);return n||i?K2(t,(e=>[n,e,i])):t}(e,a,t)),a}async function V4(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,function(e,t){let{comments:r}=e;if(delete e.comments,!b4(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:a=!1}={},handleComments:o={}},originalText:u}=t,{ownLine:l=k4,endOfLine:c=k4,remaining:p=k4}=o,d=r.map(((n,i)=>({...w4(e,n,t),comment:n,text:u,options:t,ast:e,isLastComment:r.length-1===i})));for(let[e,t]of d.entries()){let r,{comment:o,precedingNode:u,enclosingNode:h,followingNode:f,text:m,options:y,ast:g,isLastComment:x}=t;if("json"===y.parser||"json5"===y.parser||"__js_expression"===y.parser||"__ts_expression"===y.parser||"__vue_expression"===y.parser||"__vue_ts_expression"===y.parser){if(i(o)-i(g)<=0){v4(g,o);continue}if(s(o)-s(g)>=0){A4(g,o);continue}}if(a?r=[t]:(o.enclosingNode=h,o.precedingNode=u,o.followingNode=f,r=[o,m,y,g,x]),N4(m,y,d,e))o.placement="ownLine",l(...r)||(f?v4(f,o):u?A4(u,o):P4(h||g,o));else if(F4(m,y,d,e))o.placement="endOfLine",c(...r)||(u?A4(u,o):f?v4(f,o):P4(h||g,o));else if(o.placement="remaining",!p(...r))if(u&&f){let e=n.length;e>0&&n[e-1].followingNode!==f&&_4(n,y),n.push(t)}else u?A4(u,o):f?v4(f,o):P4(h||g,o)}if(_4(n,t),!a)for(let e of r)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}(e,t);let{printer:{preprocess:n}}=t;return{ast:e=n?await n(e,t):e,comments:r}}var q4=({parser:e})=>"json"===e||"json5"===e||"json-stringify"===e;function K4(e){let t=e.length-1;for(;;){let r=e[t];if("Program"!==(null==r?void 0:r.type)&&"File"!==(null==r?void 0:r.type))break;t--}return e.slice(0,t+1)}function J4(e,t,r,n,i=[],s){let{locStart:a,locEnd:o}=r,u=a(e),l=o(e);if(!(t>l||t<u||"rangeEnd"===s&&t===u||"rangeStart"===s&&t===l)){for(let a of C4(e,r)){let o=J4(a,t,r,n,[e,...i],s);if(o)return o}if(!n||n(e,i[0]))return{node:e,parentNodes:i}}}var W4=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),X4=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function H4(e,t,r){if(!t)return!1;switch(e.parser){case"flow":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"__babel_estree":return function(e,t){return"DeclareExportDeclaration"!==t&&"TypeParameterDeclaration"!==e&&("Directive"===e||"TypeAlias"===e||"TSExportAssignment"===e||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}(t.type,null==r?void 0:r.type);case"json":case"json5":case"json-stringify":return W4.has(t.type);case"graphql":return X4.has(t.kind);case"vue":return"root"!==t.tag}return!1}function z4(e,t,r){let{rangeStart:n,rangeEnd:i,locStart:s,locEnd:a}=t;p4.ok(i>n);let o=e.slice(n,i).search(/\S/),u=-1===o;if(!u)for(n+=o;i>n&&!/\S/.test(e[i-1]);--i);let l,c,p=J4(r,n,t,((e,r)=>H4(t,e,r)),[],"rangeStart"),d=u?p:J4(r,i,t,(e=>H4(t,e)),[],"rangeEnd");if(!p||!d)return{rangeStart:0,rangeEnd:0};if(q4(t)){let e=function(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find((e=>W4.has(e.type)&&n.has(e)))}(p,d);l=e,c=e}else({startNode:l,endNode:c}=function(e,t,{locStart:r,locEnd:n}){let i=e.node,s=t.node;if(i===s)return{startNode:i,endNode:s};let a=r(e.node);for(let e of K4(t.parentNodes)){if(!(r(e)>=a))break;s=e}let o=n(t.node);for(let t of K4(e.parentNodes)){if(!(n(t)<=o))break;if(i=t,i===s)break}return{startNode:i,endNode:s}}(p,d,t));return{rangeStart:Math.min(s(l),s(c)),rangeEnd:Math.max(a(l),a(c))}}var G4=function(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=t4(t.printer.getVisitorKeys),a=e=>n(e)<=r&&i(e)>=r,o=e;for(let t of function*(e,t){let r=[e];for(let e=0;e<r.length;e++){let n=r[e];for(let e of T4(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:s,filter:a}))o=t;return o},Y4="\ufeff",Q4=Symbol("cursor");async function Z4(e,t,r=0){if(!e||0===e.trim().length)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await u4(e,t);t.cursorOffset>=0&&(t.cursorNode=G4(n,t));let s=await U4(n,t);r>0&&(s=C2([v2,s],r,t.tabWidth));let a=Z2(s,t);if(r>0){let e=a.formatted.trim();void 0!==a.cursorNodeStart&&(a.cursorNodeStart-=a.formatted.indexOf(e)),a.formatted=e+k2(t.endOfLine)}let o=t[Symbol.for("comments")];if(t.cursorOffset>=0){let e,r,n,s,u;if(t.cursorNode&&a.cursorNodeText?(e=t.locStart(t.cursorNode),r=i.slice(e,t.locEnd(t.cursorNode)),n=t.cursorOffset-e,s=a.cursorNodeStart,u=a.cursorNodeText):(e=0,r=i,n=t.cursorOffset,s=0,u=a.formatted),r===u)return{formatted:a.formatted,cursorOffset:s+n,comments:o};let l=r.split("");l.splice(n,0,Q4);let c=u.split(""),p=(0,$1.diffArrays)(l,c),d=s;for(let e of p)if(e.removed){if(e.value.includes(Q4))break}else d+=e.count;return{formatted:a.formatted,cursorOffset:d,comments:o}}return{formatted:a.formatted,cursorOffset:-1,comments:o}}function e5(e,t,r){return"number"!=typeof t||Number.isNaN(t)||t<0||t>e.length?r:t}function t5(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=e5(e,r,-1),n=e5(e,n,0),i=e5(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function r5(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=t5(e,t),a=e.charAt(0)===Y4;if(a&&(e=e.slice(1),r--,n--,i--),"auto"===s&&(s=function(e){let t=e.indexOf("\r");return t>=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"}(e)),e.includes("\r")){let t=t=>I2(e.slice(0,Math.max(t,0)),"\r\n");r-=t(r),n-=t(n),i-=t(i),e=function(e){return U1(!1,e,/\r\n?/g,"\n")}(e)}return{hasBOM:a,text:e,options:t5(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function n5(e,t){let r=await z3(t);return!r.hasPragma||r.hasPragma(e)}async function i5(e,t){let r,{hasBOM:n,text:i,options:s}=r5(e,await Q3(t));return s.rangeStart>=s.rangeEnd&&""!==i||s.requirePragma&&!await n5(i,s)?{formatted:e,cursorOffset:t.cursorOffset,comments:[]}:(s.rangeStart>0||s.rangeEnd<i.length?r=await async function(e,t){let{ast:r,text:n}=await u4(e,t),{rangeStart:i,rangeEnd:s}=z4(n,t,r),a=n.slice(i,s),o=Math.min(i,n.lastIndexOf("\n",i)+1),u=n.slice(o,i).match(/^\s*/)[0],l=t3(u,t.tabWidth),c=await Z4(a,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},l),p=c.formatted.trimEnd(),{cursorOffset:d}=t;d>s?d+=p.length-a.length:c.cursorOffset>=0&&(d=c.cursorOffset+i);let h=n.slice(0,i)+p+n.slice(s);if("lf"!==t.endOfLine){let e=k2(t.endOfLine);d>=0&&"\r\n"===e&&(d+=I2(h.slice(0,d),"\n")),h=U1(!1,h,"\n",e)}return{formatted:h,cursorOffset:d,comments:c.comments}}(i,s):(!s.requirePragma&&s.insertPragma&&s.printer.insertPragma&&!await n5(i,s)&&(i=s.printer.insertPragma(i)),r=await Z4(i,s)),n&&(r.formatted=Y4+r.formatted,r.cursorOffset>=0&&r.cursorOffset++),r)}var s5={};C1(s5,{addDanglingComment:()=>P4,addLeadingComment:()=>v4,addTrailingComment:()=>A4,getAlignmentSize:()=>t3,getIndentSize:()=>p5,getMaxContinuousCount:()=>c5,getNextNonSpaceNonCommentCharacter:()=>f5,getNextNonSpaceNonCommentCharacterIndex:()=>y5,getStringWidth:()=>_2,hasNewline:()=>x4,hasNewlineInRange:()=>d5,hasSpaces:()=>h5,isNextLineEmpty:()=>x5,isNextLineEmptyAfterIndex:()=>l5,isPreviousLineEmpty:()=>g5,makeString:()=>m5,skip:()=>d4,skipEverythingButNewLine:()=>y4,skipInlineComment:()=>a5,skipNewline:()=>g4,skipSpaces:()=>f4,skipToLineEnd:()=>m4,skipTrailingComment:()=>o5,skipWhitespace:()=>h4});var a5=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var o5=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?y4(e,t):t)};var u5=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=f4(e,n),n=a5(e,n),n=o5(e,n),n=g4(e,n);return n};var l5=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=m4(e,n),n=a5(e,n),n=f4(e,n);return n=o5(e,n),n=g4(e,n),!1!==n&&x4(e,n)};var c5=function(e,t){let r=e.match(new RegExp(`(${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(t)})+`,"g"));return null===r?0:r.reduce(((e,r)=>Math.max(e,r.length/t.length)),0)};var p5=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:t3(e.slice(r+1).match(/^[\t ]*/)[0],t)};var d5=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};var h5=function(e,t,r={}){return f4(e,r.backwards?t-1:t,r)!==t};var f5=function(e,t){let r=u5(e,t);return!1===r?"":e.charAt(r)};var m5=function(e,t,r){let n='"'===t?"'":'"',i=U1(!1,e,/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t};function y5(e,t){return 2===arguments.length||"number"==typeof t?u5(e,t):function(e,t,r){return u5(e,r(t))}(...arguments)}function g5(e,t){return 2===arguments.length||"number"==typeof t?L4(e,t):function(e,t,r){return L4(e,r(t))}(...arguments)}function x5(e,t){return 2===arguments.length||"number"==typeof t?l5(e,t):function(e,t,r){return l5(e,r(t))}(...arguments)}var b5={};C1(b5,{builders:()=>S5,printer:()=>T5,utils:()=>E5});var S5={join:D2,line:T2,softline:E2,hardline:v2,literalline:P2,group:h2,conditionalGroup:function(e,t){return h2(e[0],{...t,expandedStates:e})},fill:f2,lineSuffix:m2,lineSuffixBoundary:y2,cursor:A2,breakParent:g2,ifBreak:function(e,t="",r={}){return{type:G1,breakContents:e,flatContents:t,groupId:r.groupId}},trim:x2,indent:p2,indentIfBreak:function(e,t){return{type:Y1,contents:e,groupId:t.groupId,negate:t.negate}},align:d2,addAlignmentToDoc:C2,markAsRoot:function(e){return d2({type:"root"},e)},dedentToRoot:function(e){return d2(Number.NEGATIVE_INFINITY,e)},dedent:function(e){return d2(-1,e)},hardlineWithoutBreakParent:b2,literallineWithoutBreakParent:S2,label:function(e,t){return e?{type:t2,label:e,contents:t}:t},concat:e=>e},T5={printDocToString:Z2},E5={willBreak:function(e){return M2(e,B2,!1)},traverseDoc:l2,findInDoc:M2,mapDoc:L2,removeLines:function(e){return L2(e,R2)},stripTrailingHardline:V2,replaceEndOfLine:function(e,t=P2){return L2(e,(e=>"string"==typeof e?D2(t,e.split("\n")):e))},canBreak:function(e){return M2(e,q2,!1)}},v5="3.0.1";function P5(e,t=1){return async(...r)=>{let n=r[t]??{},i=n.plugins??[];return r[t]={...n,plugins:Array.isArray(i)?i:Object.values(i)},e(...r)}}var A5=P5(i5);async function D5(e,t){let{formatted:r}=await A5(e,{...t,cursorOffset:-1});return r}async function C5(e,t){return await D5(e,t)===e}var w5=P5(s3,0),k5={parse:P5((async function(e,t,r){let{text:n,options:i}=r5(e,await Q3(t)),s=await u4(n,i);return r&&(r.preprocessForPrint&&(s.ast=await V4(s.ast,i)),r.massage&&(s.ast=r4(s.ast,i))),s})),formatAST:P5((async function(e,t){return t=await Q3(t),Z2(await U4(e,t),t)})),formatDoc:P5((async function(e,t){let r=function(e){let t=Object.create(null),r=new Set;return function e(t,r,i){var s,a;if("string"==typeof t)return JSON.stringify(t);if(Array.isArray(t)){let r=t.map(e).filter(Boolean);return 1===r.length?r[0]:`[${r.join(", ")}]`}if(t.type===e2){let e=(null==(s=null==i?void 0:i[r+1])?void 0:s.type)===r2;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if(t.type===r2)return(null==(a=null==i?void 0:i[r-1])?void 0:a.type)===e2&&i[r-1].hard?void 0:"breakParent";if(t.type===X1)return"trim";if(t.type===J1)return"indent("+e(t.contents)+")";if(t.type===W1)return t.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+e(t.contents)+")":t.n<0?"dedent("+e(t.contents)+")":"root"===t.n.type?"markAsRoot("+e(t.contents)+")":"align("+JSON.stringify(t.n)+", "+e(t.contents)+")";if(t.type===G1)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${n(t.groupId)} }`:"")+")";if(t.type===Y1){let r=[];t.negate&&r.push("negate: true"),t.groupId&&r.push(`groupId: ${n(t.groupId)}`);let i=r.length>0?`, { ${r.join(", ")} }`:"";return`indentIfBreak(${e(t.contents)}${i})`}if(t.type===H1){let r=[];t.break&&"propagated"!==t.break&&r.push("shouldBreak: true"),t.id&&r.push(`id: ${n(t.id)}`);let i=r.length>0?`, { ${r.join(", ")} }`:"";return t.expandedStates?`conditionalGroup([${t.expandedStates.map((t=>e(t))).join(",")}]${i})`:`group(${e(t.contents)}${i})`}if(t.type===z1)return`fill([${t.parts.map((t=>e(t))).join(", ")}])`;if(t.type===Q1)return"lineSuffix("+e(t.contents)+")";if(t.type===Z1)return"lineSuffixBoundary";if(t.type===t2)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;throw new Error("Unknown doc type "+t.type)}(e3(e));function n(e){if("symbol"!=typeof e)return JSON.stringify(String(e));if(e in t)return t[e];let n=e.description||"symbol";for(let i=0;;i++){let s=n+(i>0?` #${i}`:"");if(!r.has(s))return r.add(s),t[e]=`Symbol.for(${JSON.stringify(s)})`}}}(e),{formatted:n}=await i5(r,{...t,parser:"__js_expression"});return n})),printToDoc:P5((async function(e,t){t=await Q3(t);let{ast:r}=await u4(e,t);return U4(r,t)})),printDocToString:P5((async function(e,t){return Z2(e,await Q3(t))}))},I5=Object.create,N5=Object.defineProperty,F5=Object.getOwnPropertyDescriptor,_5=Object.getOwnPropertyNames,O5=Object.getPrototypeOf,L5=Object.prototype.hasOwnProperty,M5=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),B5=(e,t,r)=>(r=null!=e?I5(O5(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of _5(t))!L5.call(e,i)&&i!==r&&N5(e,i,{get:()=>t[i],enumerable:!(n=F5(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:N5(r,"default",{value:e,enumerable:!0}),e)),j5=M5((e=>{function t(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],!(t.indexOf(r)>=0)&&(i[r]=e[r]);return i}Object.defineProperty(e,"__esModule",{value:!0});var r=class{constructor(e,t,r){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=r}},n=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function i(e,t){let{line:n,column:i,index:s}=e;return new r(n,i+t,s+t)}var s="BABEL_PARSER_SYNTAX_ERROR",a="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",o=(e,t=e.length-1)=>({get(){return e.reduce(((e,t)=>e[t]),this)},set(r){e.reduce(((e,n,i)=>i===t?e[n]=r:e[n]),this)}}),u=(e,t,r)=>Object.keys(r).map((e=>[e,r[e]])).filter((([,e])=>!!e)).map((([e,t])=>[e,"function"==typeof t?{value:t,enumerable:!1}:"string"==typeof t.reflect?Object.assign({},t,o(t.reflect.split("."))):t])).reduce(((e,[t,r])=>Object.defineProperty(e,t,Object.assign({configurable:!0},r))),Object.assign(new e,t)),l={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:a},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:a}},c={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},p=({type:e,prefix:t})=>"UpdateExpression"===e?c.UpdateExpression[String(t)]:c[e],d={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${"ForInStatement"===e?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:e})=>`\`import()\` requires exactly ${1===e?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${p(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${p(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},h=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),f={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${p({type:e})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},m=["toMessage"],y=["message"];function g(e){let{toMessage:n}=e,i=t(e,m);return function e({loc:t,details:s}){return u(SyntaxError,Object.assign({},i,{loc:t}),{clone(t={}){let n=t.loc||{};return e({loc:new r("line"in n?n.line:this.loc.line,"column"in n?n.column:this.loc.column,"index"in n?n.index:this.loc.index),details:Object.assign({},this.details,t.details)})},details:{value:s,enumerable:!1},message:{get(){return`${n(this.details)} (${this.loc.line}:${this.loc.column})`},set(e){Object.defineProperty(this,"message",{value:e})}},pos:{reflect:"loc.index",enumerable:!0},missingPlugin:"missingPlugin"in s&&{reflect:"details.missingPlugin",enumerable:!0}})}}function x(e,r){if(Array.isArray(e))return t=>x(t,e[0]);let n={};for(let i of Object.keys(e)){let a=e[i],o="string"==typeof a?{message:()=>a}:"function"==typeof a?{message:a}:a,{message:u}=o,l=t(o,y),c="string"==typeof u?()=>u:u;n[i]=g(Object.assign({code:s,reasonCode:i,toMessage:c},r?{syntaxPlugin:r}:{},l))}return n}var b=Object.assign({},x(l),x(d),x({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."}),x`pipelineOperator`(f)),{defineProperty:S}=Object,T=(e,t)=>S(e,t,{enumerable:!1,value:e[t]});function E(e){return e.loc.start&&T(e.loc.start,"index"),e.loc.end&&T(e.loc.end,"index"),e}var v=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}},P={brace:new v("{"),j_oTag:new v("<tag"),j_cTag:new v("</tag"),j_expr:new v("<tag>...</tag>",!0)};P.template=new v("`",!0);var A=!0,D=!0,C=!0,w=!0,k=!0,I=class{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}},N=new Map;function F(e,t={}){t.keyword=e;let r=$(e,t);return N.set(e,r),r}function _(e,t){return $(e,{beforeExpr:A,binop:t})}var O=-1,L=[],M=[],B=[],j=[],R=[],U=[];function $(e,t={}){var r,n,i,s;return++O,M.push(e),B.push(null!=(r=t.binop)?r:-1),j.push(null!=(n=t.beforeExpr)&&n),R.push(null!=(i=t.startsExpr)&&i),U.push(null!=(s=t.prefix)&&s),L.push(new I(e,t)),O}function V(e,t={}){var r,n,i,s;return++O,N.set(e,O),M.push(e),B.push(null!=(r=t.binop)?r:-1),j.push(null!=(n=t.beforeExpr)&&n),R.push(null!=(i=t.startsExpr)&&i),U.push(null!=(s=t.prefix)&&s),L.push(new I("name",t)),O}var q={bracketL:$("[",{beforeExpr:A,startsExpr:D}),bracketHashL:$("#[",{beforeExpr:A,startsExpr:D}),bracketBarL:$("[|",{beforeExpr:A,startsExpr:D}),bracketR:$("]"),bracketBarR:$("|]"),braceL:$("{",{beforeExpr:A,startsExpr:D}),braceBarL:$("{|",{beforeExpr:A,startsExpr:D}),braceHashL:$("#{",{beforeExpr:A,startsExpr:D}),braceR:$("}"),braceBarR:$("|}"),parenL:$("(",{beforeExpr:A,startsExpr:D}),parenR:$(")"),comma:$(",",{beforeExpr:A}),semi:$(";",{beforeExpr:A}),colon:$(":",{beforeExpr:A}),doubleColon:$("::",{beforeExpr:A}),dot:$("."),question:$("?",{beforeExpr:A}),questionDot:$("?."),arrow:$("=>",{beforeExpr:A}),template:$("template"),ellipsis:$("...",{beforeExpr:A}),backQuote:$("`",{startsExpr:D}),dollarBraceL:$("${",{beforeExpr:A,startsExpr:D}),templateTail:$("...`",{startsExpr:D}),templateNonTail:$("...${",{beforeExpr:A,startsExpr:D}),at:$("@"),hash:$("#",{startsExpr:D}),interpreterDirective:$("#!..."),eq:$("=",{beforeExpr:A,isAssign:w}),assign:$("_=",{beforeExpr:A,isAssign:w}),slashAssign:$("_=",{beforeExpr:A,isAssign:w}),xorAssign:$("_=",{beforeExpr:A,isAssign:w}),moduloAssign:$("_=",{beforeExpr:A,isAssign:w}),incDec:$("++/--",{prefix:k,postfix:!0,startsExpr:D}),bang:$("!",{beforeExpr:A,prefix:k,startsExpr:D}),tilde:$("~",{beforeExpr:A,prefix:k,startsExpr:D}),doubleCaret:$("^^",{startsExpr:D}),doubleAt:$("@@",{startsExpr:D}),pipeline:_("|>",0),nullishCoalescing:_("??",1),logicalOR:_("||",1),logicalAND:_("&&",2),bitwiseOR:_("|",3),bitwiseXOR:_("^",4),bitwiseAND:_("&",5),equality:_("==/!=/===/!==",6),lt:_("</>/<=/>=",7),gt:_("</>/<=/>=",7),relational:_("</>/<=/>=",7),bitShift:_("<</>>/>>>",8),bitShiftL:_("<</>>/>>>",8),bitShiftR:_("<</>>/>>>",8),plusMin:$("+/-",{beforeExpr:A,binop:9,prefix:k,startsExpr:D}),modulo:$("%",{binop:10,startsExpr:D}),star:$("*",{binop:10}),slash:_("/",10),exponent:$("**",{beforeExpr:A,binop:11,rightAssociative:!0}),_in:F("in",{beforeExpr:A,binop:7}),_instanceof:F("instanceof",{beforeExpr:A,binop:7}),_break:F("break"),_case:F("case",{beforeExpr:A}),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",{beforeExpr:A}),_else:F("else",{beforeExpr:A}),_finally:F("finally"),_function:F("function",{startsExpr:D}),_if:F("if"),_return:F("return",{beforeExpr:A}),_switch:F("switch"),_throw:F("throw",{beforeExpr:A,prefix:k,startsExpr:D}),_try:F("try"),_var:F("var"),_const:F("const"),_with:F("with"),_new:F("new",{beforeExpr:A,startsExpr:D}),_this:F("this",{startsExpr:D}),_super:F("super",{startsExpr:D}),_class:F("class",{startsExpr:D}),_extends:F("extends",{beforeExpr:A}),_export:F("export"),_import:F("import",{startsExpr:D}),_null:F("null",{startsExpr:D}),_true:F("true",{startsExpr:D}),_false:F("false",{startsExpr:D}),_typeof:F("typeof",{beforeExpr:A,prefix:k,startsExpr:D}),_void:F("void",{beforeExpr:A,prefix:k,startsExpr:D}),_delete:F("delete",{beforeExpr:A,prefix:k,startsExpr:D}),_do:F("do",{isLoop:C,beforeExpr:A}),_for:F("for",{isLoop:C}),_while:F("while",{isLoop:C}),_as:V("as",{startsExpr:D}),_assert:V("assert",{startsExpr:D}),_async:V("async",{startsExpr:D}),_await:V("await",{startsExpr:D}),_from:V("from",{startsExpr:D}),_get:V("get",{startsExpr:D}),_let:V("let",{startsExpr:D}),_meta:V("meta",{startsExpr:D}),_of:V("of",{startsExpr:D}),_sent:V("sent",{startsExpr:D}),_set:V("set",{startsExpr:D}),_static:V("static",{startsExpr:D}),_using:V("using",{startsExpr:D}),_yield:V("yield",{startsExpr:D}),_asserts:V("asserts",{startsExpr:D}),_checks:V("checks",{startsExpr:D}),_exports:V("exports",{startsExpr:D}),_global:V("global",{startsExpr:D}),_implements:V("implements",{startsExpr:D}),_intrinsic:V("intrinsic",{startsExpr:D}),_infer:V("infer",{startsExpr:D}),_is:V("is",{startsExpr:D}),_mixins:V("mixins",{startsExpr:D}),_proto:V("proto",{startsExpr:D}),_require:V("require",{startsExpr:D}),_satisfies:V("satisfies",{startsExpr:D}),_keyof:V("keyof",{startsExpr:D}),_readonly:V("readonly",{startsExpr:D}),_unique:V("unique",{startsExpr:D}),_abstract:V("abstract",{startsExpr:D}),_declare:V("declare",{startsExpr:D}),_enum:V("enum",{startsExpr:D}),_module:V("module",{startsExpr:D}),_namespace:V("namespace",{startsExpr:D}),_interface:V("interface",{startsExpr:D}),_type:V("type",{startsExpr:D}),_opaque:V("opaque",{startsExpr:D}),name:$("name",{startsExpr:D}),string:$("string",{startsExpr:D}),num:$("num",{startsExpr:D}),bigint:$("bigint",{startsExpr:D}),decimal:$("decimal",{startsExpr:D}),regexp:$("regexp",{startsExpr:D}),privateName:$("#name",{startsExpr:D}),eof:$("eof"),jsxName:$("jsxName"),jsxText:$("jsxText",{beforeExpr:!0}),jsxTagStart:$("jsxTagStart",{startsExpr:!0}),jsxTagEnd:$("jsxTagEnd"),placeholder:$("%%",{startsExpr:!0})};function K(e){return e>=93&&e<=130}function J(e){return e>=58&&e<=130}function W(e){return e>=58&&e<=134}function X(e){return R[e]}function H(e){return e>=127&&e<=129}function z(e){return e>=58&&e<=92}function G(e){return M[e]}function Y(e){return B[e]}function Q(e){return e>=24&&e<=25}function Z(e){return L[e]}L[8].updateContext=e=>{e.pop()},L[5].updateContext=L[7].updateContext=L[23].updateContext=e=>{e.push(P.brace)},L[22].updateContext=e=>{e[e.length-1]===P.template?e.pop():e.push(P.template)},L[140].updateContext=e=>{e.push(P.j_expr,P.j_oTag)};var ee="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",te="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",re=new RegExp("["+ee+"]"),ne=new RegExp("["+ee+te+"]");ee=te=null;var ie=[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,3104,541,1507,4938,6,4191],se=[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];function ae(e,t){let r=65536;for(let n=0,i=t.length;n<i;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function oe(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&re.test(String.fromCharCode(e)):ae(e,ie)))}function ue(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ne.test(String.fromCharCode(e)):ae(e,ie)||ae(e,se))))}var le=["implements","interface","let","package","private","protected","public","static","yield"],ce=["eval","arguments"],pe=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),de=new Set(le),he=new Set(ce);function fe(e,t){return t&&"await"===e||"enum"===e}function me(e,t){return fe(e,t)||de.has(e)}function ye(e){return he.has(e)}function ge(e,t){return me(e,t)||ye(e)}var xe=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);var be=64,Se=128,Te=256,Ee=387,ve=128,Pe=1024,Ae=2048,De=4096,Ce=8192,we=8201,ke=64,Ie=class{constructor(e){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=e}},Ne=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get inClass(){return(this.currentThisScopeFlags()&be)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&be)>0&&0==(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&Se)return!0;if(451&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Ie(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,r){let n=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(n,e,t,r),16&t?n.functions.add(e):n.lexical.add(e),8&t&&this.maybeExportDefined(n,e);else if(4&t)for(let i=this.scopeStack.length-1;i>=0&&(n=this.scopeStack[i],this.checkRedeclarationInScope(n,e,t,r),n.var.add(e),this.maybeExportDefined(n,e),!(n.flags&Ee));--i);this.parser.inModule&&1&n.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,r,n){this.isRedeclaredInScope(e,t,r)&&this.parser.raise(b.VarRedeclaration,{at:n,identifierName:t})}isRedeclaredInScope(e,t,r){return!!(1&r)&&(8&r?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):16&r?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(8&e.flags&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t))}checkLocalExport(e){let{name:t}=e,r=this.scopeStack[0];!r.lexical.has(t)&&!r.var.has(t)&&!r.functions.has(t)&&this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&Ee)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(451&t&&!(4&t))return t}}},Fe=class extends Ie{constructor(...e){super(...e),this.declareFunctions=new Set}},_e=class extends Ne{createScope(e){return new Fe(e)}declareName(e,t,r){let n=this.currentScope();if(t&Ae)return this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e),void n.declareFunctions.add(e);super.declareName(e,t,r)}isRedeclaredInScope(e,t,r){return!!super.isRedeclaredInScope(e,t,r)||!!(r&Ae)&&(!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t)))}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},Oe=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{let[t,r]=e;if(!this.hasPlugin(t))return!1;let n=this.plugins.get(t);for(let e of Object.keys(r))if((null==n?void 0:n[e])!==r[e])return!1;return!0}}getPluginOption(e,t){var r;return null==(r=this.plugins.get(e))?void 0:r[t]}};function Le(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Me(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function Be(e,t,r){let n=null,i=t.length;for(;null===n&&i>0;)n=t[--i];null===n||n.start>r.start?Me(e,r.comments):Le(n,r.comments)}var je=class extends Oe{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.comments.push(e)}processComment(e){let{commentStack:t}=this.state,r=t.length;if(0===r)return;let n=r-1,i=t[n];i.start===e.end&&(i.leadingNode=e,n--);let{start:s}=e;for(;n>=0;n--){let r=t[n],i=r.end;if(!(i>s)){i===s&&(r.trailingNode=e);break}r.containingNode=e,this.finalizeComment(r),t.splice(n,1)}}finalizeComment(e){let{comments:t}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Le(e.leadingNode,t),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,t);else{let{containingNode:r,start:n}=e;if(44===this.input.charCodeAt(n-1))switch(r.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Be(r,r.properties,e);break;case"CallExpression":case"OptionalCallExpression":Be(r,r.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Be(r,r.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Be(r,r.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Be(r,r.specifiers,e);break;default:Me(r,t)}else Me(r,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:r}=t;if(0===r)return;let n=t[r-1];n.leadingNode===e&&(n.leadingNode=null)}resetPreviousIdentifierLeadingComments(e){let{commentStack:t}=this.state,{length:r}=t;0!==r&&(t[r-1].trailingNode===e?t[r-1].trailingNode=null:r>=2&&t[r-2].trailingNode===e&&(t[r-2].trailingNode=null))}takeSurroundingComments(e,t,r){let{commentStack:n}=this.state,i=n.length;if(0===i)return;let s=i-1;for(;s>=0;s--){let i=n[s],a=i.end;if(i.start===r)i.leadingNode=e;else if(a===t)i.trailingNode=e;else if(a<t)break}}},Re=/\r\n?|[\n\u2028\u2029]/,Ue=new RegExp(Re.source,"g");function $e(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var Ve=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,qe=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g,Ke=new RegExp("(?=("+qe.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y");function Je(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var We=function(e){return e>=48&&e<=57},Xe={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},He={bin:e=>48===e||49===e,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function ze(e,t,r,n,i,s){let a=r,o=n,u=i,l="",c=null,p=r,{length:d}=t;for(;;){if(r>=d){s.unterminated(a,o,u),l+=t.slice(p,r);break}let h=t.charCodeAt(r);if(Ge(e,h,t,r)){l+=t.slice(p,r);break}if(92===h){l+=t.slice(p,r);let a=Ye(t,r,n,i,"template"===e,s);null!==a.ch||c?l+=a.ch:c={pos:r,lineStart:n,curLine:i},({pos:r,lineStart:n,curLine:i}=a),p=r}else 8232===h||8233===h?(++i,n=++r):10===h||13===h?"template"===e?(l+=t.slice(p,r)+"\n",++r,13===h&&10===t.charCodeAt(r)&&++r,++i,p=n=r):s.unterminated(a,o,u):++r}return{pos:r,str:l,firstInvalidLoc:c,lineStart:n,curLine:i,containsInvalid:!!c}}function Ge(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function Ye(e,t,r,n,i,s){let a=!i;t++;let o=e=>({pos:t,ch:e,lineStart:r,curLine:n}),u=e.charCodeAt(t++);switch(u){case 110:return o("\n");case 114:return o("\r");case 120:{let i;return({code:i,pos:t}=Qe(e,t,r,n,2,!1,a,s)),o(null===i?null:String.fromCharCode(i))}case 117:{let i;return({code:i,pos:t}=et(e,t,r,n,a,s)),o(null===i?null:String.fromCodePoint(i))}case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);s.strictNumericEscape(t-1,r,n);default:if(u>=48&&u<=55){let a=t-1,u=e.slice(a,t+2).match(/^[0-7]+/)[0],l=parseInt(u,8);l>255&&(u=u.slice(0,-1),l=parseInt(u,8)),t+=u.length-1;let c=e.charCodeAt(t);if("0"!==u||56===c||57===c){if(i)return o(null);s.strictNumericEscape(a,r,n)}return o(String.fromCharCode(l))}return o(String.fromCharCode(u))}}function Qe(e,t,r,n,i,s,a,o){let u,l=t;return({n:u,pos:t}=Ze(e,t,r,n,16,i,s,!1,o,!a)),null===u&&(a?o.invalidEscapeSequence(l,r,n):t=l-1),{code:u,pos:t}}function Ze(e,t,r,n,i,s,a,o,u,l){let c=t,p=16===i?Xe.hex:Xe.decBinOct,d=16===i?He.hex:10===i?He.dec:8===i?He.oct:He.bin,h=!1,f=0;for(let c=0,m=s??1/0;c<m;++c){let s,c=e.charCodeAt(t);if(95!==c||"bail"===o){if(s=c>=97?c-97+10:c>=65?c-65+10:We(c)?c-48:1/0,s>=i){if(s<=9&&l)return{n:null,pos:t};if(s<=9&&u.invalidDigit(t,r,n,i))s=0;else{if(!a)break;s=0,h=!0}}++t,f=f*i+s}else{let i=e.charCodeAt(t-1),s=e.charCodeAt(t+1);if(o){if(Number.isNaN(s)||!d(s)||p.has(i)||p.has(s)){if(l)return{n:null,pos:t};u.unexpectedNumericSeparator(t,r,n)}}else{if(l)return{n:null,pos:t};u.numericSeparatorInEscapeSequence(t,r,n)}++t}}return t===c||null!=s&&t-c!==s||h?{n:null,pos:t}:{n:f,pos:t}}function et(e,t,r,n,i,s){let a;if(123===e.charCodeAt(t)){if(++t,({code:a,pos:t}=Qe(e,t,r,n,e.indexOf("}",t)-t,!0,i,s)),++t,null!==a&&a>1114111){if(!i)return{code:null,pos:t};s.invalidCodePoint(t,r,n)}}else({code:a,pos:t}=Qe(e,t,r,n,4,!1,i,s));return{code:a,pos:t}}var tt=["at"],rt=["at"];function nt(e,t,n){return new r(n,e-t,e)}var it=new Set([103,109,115,105,121,117,100,118]),st=class{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new n(e.startLoc,e.endLoc)}},at=class extends je{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,r,n)=>!!this.options.errorRecovery&&(this.raise(b.InvalidDigit,{at:nt(e,t,r),radix:n}),!0),numericSeparatorInEscapeSequence:this.errorBuilder(b.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(b.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(b.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(b.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,r)=>{this.recordStrictModeErrors(b.StrictNumericEscape,{at:nt(e,t,r)})},unterminated:(e,t,r)=>{throw this.raise(b.UnterminatedString,{at:nt(e-1,t,r)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(b.StrictNumericEscape),unterminated:(e,t,r)=>{throw this.raise(b.UnterminatedTemplate,{at:nt(e,t,r)})}}),this.state=new class e{constructor(){this.strict=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inDisallowConditionalTypesContext=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.comments=[],this.commentStack=[],this.pos=0,this.type=137,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.context=[P.brace],this.canStartJSXElement=!0,this.containsEsc=!1,this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}init({strictMode:e,sourceType:t,startLine:n,startColumn:i}){this.strict=!1!==e&&(!0===e||"module"===t),this.curLine=n,this.lineStart=-i,this.startLoc=this.endLoc=new r(n,i,0)}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos)}clone(t){let r=new e,n=Object.keys(this);for(let e=0,i=n.length;e<i;e++){let i=n[e],s=this[i];!t&&Array.isArray(s)&&(s=s.slice()),r[i]=s}return r}},this.state.init(e),this.input=t,this.length=t.length,this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new st(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ve.lastIndex=e,Ve.test(this.input)?Ve.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return qe.lastIndex=e,qe.test(this.input)?qe.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){let r=this.input.charCodeAt(e);56320==(64512&r)&&(t=65536+((1023&t)<<10)+(1023&r))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach((([e,t])=>this.raise(e,{at:t}))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(137):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let r=this.state.pos,i=this.input.indexOf(e,r+2);if(-1===i)throw this.raise(b.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=i+e.length,Ue.lastIndex=r+2;Ue.test(this.input)&&Ue.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Ue.lastIndex;if(this.isLookahead)return;let s={type:"CommentBlock",value:this.input.slice(r+2,i),start:r,end:i+e.length,loc:new n(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(s),s}skipLineComment(e){let t,r=this.state.pos;this.isLookahead||(t=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!$e(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let s=this.state.pos,a={type:"CommentLine",value:this.input.slice(r+e,s),start:r,end:s,loc:new n(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){let e=this.state.pos,t=[];e:for(;this.state.pos<this.length;){let r=this.input.charCodeAt(this.state.pos);switch(r){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}case 47:{let e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}default:break e}break;default:if(Je(r))++this.state.pos;else if(45===r&&!this.inModule&&this.options.annexB){let r=this.state.pos;if(45!==this.input.charCodeAt(r+1)||62!==this.input.charCodeAt(r+2)||!(0===e||this.state.lineStart>e))break e;{let e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}else{if(60!==r||this.inModule||!this.options.annexB)break e;{let e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{let e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}}}}if(t.length>0){let r={start:e,end:this.state.pos,comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let r=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(r)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(b.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===t?b.RecordExpressionHashIncorrectStartSyntaxType:b.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,123===t?this.finishToken(7):this.finishToken(1)}else oe(t)?(++this.state.pos,this.finishToken(136,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(136,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;let t=this.state.pos;for(this.state.pos+=1;!$e(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let r=this.input.slice(t+2,this.state.pos);return this.finishToken(28,r),!0}readToken_mult_modulo(e){let t=42===e?55:54,r=1,n=this.input.charCodeAt(this.state.pos+1);42===e&&42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=57),61===n&&!this.state.inType&&(r++,t=37===e?33:30),this.finishOp(t,r)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t!==e){if(124===e){if(62===t)return void this.finishOp(39,2);if(this.hasPlugin("recordAndTuple")&&125===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(b.RecordExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(b.TupleExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(4)}}61!==t?this.finishOp(124===e?43:45,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===e?41:42,2)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);61!==e||this.state.inType?94===e&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),94===this.input.codePointAt(this.state.pos)&&this.unexpected()):this.finishOp(44,1):this.finishOp(32,2)}readToken_atSign(){64===this.input.charCodeAt(this.state.pos+1)&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(30,2):this.finishOp(53,1):this.finishOp(34,2)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(30,3):void this.finishOp(51,2);61!==t?this.finishOp(47,1):this.finishOp(49,2)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){let t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(30,t+1):void this.finishOp(52,t)}61!==t?this.finishOp(48,1):this.finishOp(49,2)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===e?29:35,1);this.finishOp(46,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(30,3):this.finishOp(40,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(b.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(b.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(36,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(oe(e))return void this.readWord(e)}throw this.raise(b.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(e)})}finishOp(e,t){let r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,r)}readRegexp(){let e,t,r=this.state.startLoc,n=this.state.start+1,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(b.UnterminatedRegExp,{at:i(r,1)});let n=this.input.charCodeAt(s);if($e(n))throw this.raise(b.UnterminatedRegExp,{at:i(r,1)});if(e)e=!1;else{if(91===n)t=!0;else if(93===n&&t)t=!1;else if(47===n&&!t)break;e=92===n}}let a=this.input.slice(n,s);++s;let o="",u=()=>i(r,s+2-n);for(;s<this.length;){let e=this.codePointAtPos(s),t=String.fromCharCode(e);if(it.has(e))118===e?o.includes("u")&&this.raise(b.IncompatibleRegExpUVFlags,{at:u()}):117===e&&o.includes("v")&&this.raise(b.IncompatibleRegExpUVFlags,{at:u()}),o.includes(t)&&this.raise(b.DuplicateRegExpFlags,{at:u()});else{if(!ue(e)&&92!==e)break;this.raise(b.MalformedRegExpFlags,{at:u()})}++s,o+=t}this.state.pos=s,this.finishToken(135,{pattern:a,flags:o})}readInt(e,t,r=!1,n=!0){let{n:i,pos:s}=Ze(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,r,n,this.errorHandlers_readInt,!1);return this.state.pos=s,i}readRadixNumber(e){let t=this.state.curPosition(),r=!1;this.state.pos+=2;let n=this.readInt(e);null==n&&this.raise(b.InvalidDigit,{at:i(t,2),radix:e});let s=this.input.charCodeAt(this.state.pos);if(110===s)++this.state.pos,r=!0;else if(109===s)throw this.raise(b.InvalidDecimal,{at:t});if(oe(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,{at:this.state.curPosition()});if(r){let e=this.input.slice(t.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(133,e)}else this.finishToken(132,n)}readNumber(e){let t=this.state.pos,r=this.state.curPosition(),n=!1,s=!1,a=!1,o=!1,u=!1;!e&&null===this.readInt(10)&&this.raise(b.InvalidNumber,{at:this.state.curPosition()});let l=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(l){let e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(b.StrictOctalLiteral,{at:r}),!this.state.strict){let t=e.indexOf("_");t>0&&this.raise(b.ZeroDigitNumericSeparator,{at:i(r,t)})}u=l&&!/[89]/.test(e)}let c=this.input.charCodeAt(this.state.pos);if(46===c&&!u&&(++this.state.pos,this.readInt(10),n=!0,c=this.input.charCodeAt(this.state.pos)),(69===c||101===c)&&!u&&(c=this.input.charCodeAt(++this.state.pos),(43===c||45===c)&&++this.state.pos,null===this.readInt(10)&&this.raise(b.InvalidOrMissingExponent,{at:r}),n=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),110===c&&((n||l)&&this.raise(b.InvalidBigIntLiteral,{at:r}),++this.state.pos,s=!0),109===c&&(this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(b.InvalidDecimal,{at:r}),++this.state.pos,a=!0),oe(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,{at:this.state.curPosition()});let p=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(s)return void this.finishToken(133,p);if(a)return void this.finishToken(134,p);let d=u?parseInt(p,8):parseFloat(p);this.finishToken(132,d)}readCodePoint(e){let{code:t,pos:r}=et(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=r,t}readString(e){let{str:t,pos:r,curLine:n,lineStart:i}=ze(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=r+1,this.state.lineStart=i,this.state.curLine=n,this.finishToken(131,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:n,pos:i,curLine:s,lineStart:a}=ze("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=a,this.state.curLine=s,n&&(this.state.firstInvalidTemplateEscapePos=new r(n.curLine,n.pos-n.lineStart,n.pos)),96===this.input.codePointAt(i)?this.finishToken(24,n?null:e+t+"`"):(this.state.pos++,this.finishToken(25,n?null:e+t+"${"))}recordStrictModeErrors(e,{at:t}){let r=t.index;this.state.strict&&!this.state.strictErrors.has(r)?this.raise(e,{at:t}):this.state.strictErrors.set(r,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",r=this.state.pos,n=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let e=this.codePointAtPos(this.state.pos);if(ue(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(n,this.state.pos);let e=this.state.curPosition(),i=this.state.pos===r?oe:ue;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(b.MissingUnicodeEscape,{at:this.state.curPosition()}),n=this.state.pos-1;continue}++this.state.pos;let s=this.readCodePoint(!0);null!==s&&(i(s)||this.raise(b.EscapedCharNotAnIdentifier,{at:e}),t+=String.fromCodePoint(s)),n=this.state.pos}}}return t+this.input.slice(n,this.state.pos)}readWord(e){let t=this.readWord1(e),r=N.get(t);void 0!==r?this.finishToken(r,G(r)):this.finishToken(130,t)}checkKeywordEscapes(){let{type:e}=this.state;z(e)&&this.state.containsEsc&&this.raise(b.InvalidEscapedReservedWord,{at:this.state.startLoc,reservedWord:G(e)})}raise(e,n){let{at:i}=n,s=t(n,tt),a=e({loc:i instanceof r?i:i.loc.start,details:s});if(!this.options.errorRecovery)throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,n){let{at:i}=n,s=t(n,rt),a=i instanceof r?i:i.loc.start,o=a.index,u=this.state.errors;for(let t=u.length-1;t>=0;t--){let r=u[t];if(r.loc.index===o)return u[t]=e({loc:a,details:s});if(r.loc.index<o)break}return this.raise(e,n)}updateContext(e){}unexpected(e,t){throw this.raise(b.UnexpectedToken,{expected:t?G(t):null,at:e??this.state.startLoc})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(b.MissingPlugin,{at:t??this.state.startLoc,missingPlugin:[e]})}expectOnePlugin(e){if(!e.some((e=>this.hasPlugin(e))))throw this.raise(b.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:e})}errorBuilder(e){return(t,r,n)=>{this.raise(e,{at:nt(t,r,n)})}}},ot=class{constructor(e=0){this.type=void 0,this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}},ut=class extends ot{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,{at:t}){let r=t.index;this.declarationErrors.set(r,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}};function lt(){return new ot}function ct(e,t){return(e?2:0)|(t?1:0)}var pt=class extends at{addExtra(e,t,r,n=!0){if(!e)return;let i=e.extra=e.extra||{};n?i[t]=r:Object.defineProperty(i,t,{enumerable:n,value:r})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){let r=e+t.length;if(this.input.slice(e,r)===t){let e=this.input.charCodeAt(r);return!(ue(e)||55296==(64512&e))}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,{at:this.state.startLoc});this.unexpected(null,e)}}canInsertSemicolon(){return this.match(137)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Re.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Ke.lastIndex=this.state.end,Ke.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(b.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let r={node:null};try{let n=e(((e=null)=>{throw r.node=e,r}));if(this.state.errors.length>t.errors.length){let e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:n,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){let n=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:n};if(e===r)return{node:r.node,error:null,thrown:!1,aborted:!0,failState:n};throw e}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:r,doubleProtoLoc:n,privateKeyLoc:i,optionalParametersLoc:s}=e;if(!t)return!!(r||n||s||i);null!=r&&this.raise(b.InvalidCoverInitializedName,{at:r}),null!=n&&this.raise(b.DuplicateProto,{at:n}),null!=i&&this.raise(b.UnexpectedPrivateField,{at:i}),null!=s&&this.unexpected(s)}isLiteralPropertyName(){return W(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){let t=this.state.labels;this.state.labels=[];let r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let n=this.inModule;this.inModule=e;let i=this.scope,s=this.getScopeHandler();this.scope=new s(this,e);let a=this.prodParam;this.prodParam=new class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}};let o=this.classScope;this.classScope=new class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}})}exit(){let e=this.stack.pop(),t=this.current();for(let[r,n]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(r)||t.undefinedPrivateNames.set(r,n):this.parser.raise(b.InvalidPrivateFieldResolution,{at:n,identifierName:r})}declarePrivateName(e,t,r){let{privateNames:n,loneAccessors:i,undefinedPrivateNames:s}=this.current(),a=n.has(e);if(3&t){let r=a&&i.get(e);r?(a=(3&r)==(3&t)||(4&r)!=(4&t),a||i.delete(e)):a||i.set(e,t)}a&&this.parser.raise(b.PrivateNameRedeclaration,{at:r,identifierName:e}),n.add(e),s.delete(e)}usePrivateName(e,t){let r;for(r of this.stack)if(r.privateNames.has(e))return;r?r.undefinedPrivateNames.set(e,t):this.parser.raise(b.InvalidPrivateFieldResolution,{at:t,identifierName:e})}}(this);let u=this.expressionScope;return this.expressionScope=new class{constructor(e){this.parser=void 0,this.stack=[new ot],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,{at:t}){let r={at:t.loc.start},{stack:n}=this,i=n.length-1,s=n[i];for(;!s.isCertainlyParameterDeclaration();){if(!s.canBeArrowParameterDeclaration())return;s.recordDeclarationError(e,r),s=n[--i]}this.parser.raise(e,r)}recordArrowParameterBindingError(e,{at:t}){let{stack:r}=this,n=r[r.length-1],i={at:t.loc.start};if(n.isCertainlyParameterDeclaration())this.parser.raise(e,i);else{if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,i)}}recordAsyncArrowParametersError({at:e}){let{stack:t}=this,r=t.length-1,n=t[r];for(;n.canBeArrowParameterDeclaration();)2===n.type&&n.recordDeclarationError(b.AwaitBindingIdentifier,{at:e}),n=t[--r]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((([t,r])=>{this.parser.raise(t,{at:r});let n=e.length-2,i=e[n];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(r.index),i=e[--n]}))}}(this),()=>{this.state.labels=t,this.exportedIdentifiers=r,this.inModule=n,this.scope=i,this.prodParam=a,this.classScope=o,this.expressionScope=u}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}},dt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ht=class{constructor(e,t,r){this.type="",this.start=t,this.end=0,this.loc=new n(r),null!=e&&e.options.ranges&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}},ft=ht.prototype;function mt(e){let{type:t,start:r,end:n,loc:i,range:s,extra:a,name:o}=e,u=Object.create(ft);return u.type=t,u.start=r,u.end=n,u.loc=i,u.range=s,u.extra=a,u.name=o,"Placeholder"===t&&(u.expectedNode=e.expectedNode),u}function yt(e){let{type:t,start:r,end:n,loc:i,range:s,extra:a}=e;if("Placeholder"===t)return function(e){return mt(e)}(e);let o=Object.create(ft);return o.type=t,o.start=r,o.end=n,o.loc=i,o.range=s,void 0!==e.raw?o.raw=e.raw:o.extra=a,o.value=e.value,o}ft.__clone=function(){let e=new ht(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){let n=t[r];"leadingComments"!==n&&"trailingComments"!==n&&"innerComments"!==n&&(e[n]=this[n])}return e};var gt=class extends pt{startNode(){return new ht(this,this.state.start,this.state.startLoc)}startNodeAt(e){return new ht(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,r){return e.type=t,e.end=r.index,e.loc.end=r,this.options.ranges&&(e.range[1]=r.index),this.options.attachComment&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.options.ranges&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.options.ranges&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}},xt=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),bt=x`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitailized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function St(e){return"type"===e.importKind||"typeof"===e.importKind}var Tt={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var Et=/\*?\s*@((?:no)?flow)\b/,vt=x`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Pt(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function At(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return At(e.object)+"."+At(e.property);throw new Error("Node had unexpected type: "+e.type)}var Dt=class extends Ie{constructor(...e){super(...e),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}},Ct=class extends Ne{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new Dt(e)}enter(e){e==Te&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e==Te&&this.importsStack.pop(),e}hasImport(e,t){let r=this.importsStack.length;if(this.importsStack[r-1].has(e))return!0;if(!t&&r>1)for(let t=0;t<r-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,r){if(t&De)return this.hasImport(e,!0)&&this.parser.raise(b.VarRedeclaration,{at:r,identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);let n=this.currentScope();if(t&Pe)return this.maybeExportDefined(n,e),void n.exportOnlyBindings.add(e);super.declareName(e,t,r),2&t&&(1&t||(this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e)),n.types.add(e)),256&t&&n.enums.add(e),512&t&&n.constEnums.add(e),t&ve&&n.classes.add(e)}isRedeclaredInScope(e,t,r){if(e.enums.has(t)){if(256&r){return!!(512&r)!==e.constEnums.has(t)}return!0}return r&ve&&e.classes.has(t)?!!e.lexical.has(t)&&!!(1&r):!!(2&r&&e.types.has(t))||super.isRedeclaredInScope(e,t,r)}checkLocalExport(e){let{name:t}=e;if(!this.hasImport(t)){for(let e=this.scopeStack.length-1;e>=0;e--){let r=this.scopeStack[e];if(r.types.has(t)||r.exportOnlyBindings.has(t))return}super.checkLocalExport(e)}}},wt=e=>"ParenthesizedExpression"===e.type?wt(e.expression):e,kt=class extends gt{toAssignable(e,t=!1){var r,n;let i;switch(("ParenthesizedExpression"===e.type||null!=(r=e.extra)&&r.parenthesized)&&(i=wt(e),t?"Identifier"===i.type?this.expressionScope.recordArrowParameterBindingError(b.InvalidParenthesizedAssignment,{at:e}):"MemberExpression"!==i.type&&this.raise(b.InvalidParenthesizedAssignment,{at:e}):this.raise(b.InvalidParenthesizedAssignment,{at:e})),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let r=0,n=e.properties.length,i=n-1;r<n;r++){var s;let n=e.properties[r],a=r===i;this.toAssignableObjectExpressionProp(n,a,t),a&&"RestElement"===n.type&&null!=(s=e.extra)&&s.trailingCommaLoc&&this.raise(b.RestTrailingComma,{at:e.extra.trailingCommaLoc})}break;case"ObjectProperty":{let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,null==(n=e.extra)?void 0:n.trailingCommaLoc,t);break;case"AssignmentExpression":"="!==e.operator&&this.raise(b.MissingEqInAssignment,{at:e.left.loc.end}),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(i,t)}}toAssignableObjectExpressionProp(e,t,r){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?b.PatternHasAccessor:b.PatternHasMethod,{at:e.key});else if("SpreadElement"===e.type){e.type="RestElement";let n=e.argument;this.checkToRestConversion(n,!1),this.toAssignable(n,r),t||this.raise(b.RestTrailingComma,{at:e})}else this.toAssignable(e,r)}toAssignableList(e,t,r){let n=e.length-1;for(let i=0;i<=n;i++){let s=e[i];if(s){if("SpreadElement"===s.type){s.type="RestElement";let e=s.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,r)}else this.toAssignable(s,r);"RestElement"===s.type&&(i<n?this.raise(b.RestTrailingComma,{at:s}):t&&this.raise(b.RestTrailingComma,{at:t}))}}}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let t=e.properties.length-1;return e.properties.every(((e,r)=>"ObjectMethod"!==e.type&&(r===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let t of e)"ArrayExpression"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,t,r){let n=1&r,i=[],s=!0;for(;!this.eat(e);)if(s?s=!1:this.expect(12),n&&this.match(12))i.push(null);else{if(this.eat(e))break;if(this.match(21)){if(i.push(this.parseAssignableListItemTypes(this.parseRestBinding(),r)),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let e=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(b.UnsupportedParameterDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());i.push(this.parseAssignableListItem(r,e))}}return i}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let e=this.startNode(),{type:t,startLoc:r}=this.state;return 21===t?this.parseBindingRestProperty(e):(136===t?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),e.key=this.parsePrivateName()):this.parsePropertyName(e),e.method=!1,this.parseObjPropValue(e,r,!1,!1,!0,!1))}parseAssignableListItem(e,t){let r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r,e);let n=this.parseMaybeDefault(r.loc.start,r);return t.length&&(r.decorators=t),n}parseAssignableListItemTypes(e,t){return e}parseMaybeDefault(e,t){var r;if(null!=e||(e=this.state.startLoc),t=null!=(r=t)?r:this.parseBindingAtom(),!this.eat(29))return t;let n=this.startNodeAt(e);return n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(e,t,r){return((e,t)=>Object.hasOwnProperty.call(e,t)&&e[t])({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},e)}checkLVal(e,{in:t,binding:r=ke,checkClashes:n=!1,strictModeChanged:i=!1,hasParenthesizedAncestor:s=!1}){var a;let o=e.type;if(this.isObjectMethod(e))return;if("MemberExpression"===o)return void(r!==ke&&this.raise(b.InvalidPropertyBindingPattern,{at:e}));if("Identifier"===o){this.checkIdentifier(e,r,i);let{name:t}=e;return void(n&&(n.has(t)?this.raise(b.ParamDupe,{at:e}):n.add(t)))}let u=this.isValidLVal(o,!(s||null!=(a=e.extra)&&a.parenthesized)&&"AssignmentExpression"===t.type,r);if(!0===u)return;if(!1===u){let n=r===ke?b.InvalidLhs:b.InvalidLhsBinding;return void this.raise(n,{at:e,ancestor:t})}let[l,c]=Array.isArray(u)?u:[u,"ParenthesizedExpression"===o],p="ArrayPattern"===o||"ObjectPattern"===o||"ParenthesizedExpression"===o?{type:o}:t;for(let t of[].concat(e[l]))t&&this.checkLVal(t,{in:p,binding:r,checkClashes:n,strictModeChanged:i,hasParenthesizedAncestor:c})}checkIdentifier(e,t,r=!1){this.state.strict&&(r?ge(e.name,this.inModule):ye(e.name))&&(t===ke?this.raise(b.StrictEvalArguments,{at:e,referenceName:e.name}):this.raise(b.StrictEvalArgumentsBinding,{at:e,bindingName:e.name})),t&Ce&&"let"===e.name&&this.raise(b.LetInLexicalBinding,{at:e}),t&ke||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(b.InvalidRestAssignmentPattern,{at:e})}}checkCommaAfterRest(e){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===e?b.RestTrailingComma:b.ElementAfterRest,{at:this.state.startLoc}),!0)}};function It(e){if(!e)throw new Error("Assert fail")}var Nt=x`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function Ft(e){return"private"===e||"public"===e||"protected"===e}function _t(e){return"in"===e||"out"===e}function Ot(e){if("MemberExpression"!==e.type)return!1;let{computed:t,property:r}=e;return(!t||"StringLiteral"===r.type||!("TemplateLiteral"!==r.type||r.expressions.length>0))&&Bt(e.object)}function Lt(e,t){var r;let{type:n}=e;if(null!=(r=e.extra)&&r.parenthesized)return!1;if(t){if("Literal"===n){let{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===n||"BooleanLiteral"===n)return!0;return!!(Mt(e,t)||function(e,t){if("UnaryExpression"===e.type){let{operator:r,argument:n}=e;if("-"===r&&Mt(n,t))return!0}return!1}(e,t)||"TemplateLiteral"===n&&0===e.expressions.length||Ot(e))}function Mt(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function Bt(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&Bt(e.object)}var jt=x`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});function Rt(e,t){let[r,n]="string"==typeof t?[t,{}]:t,i=Object.keys(n),s=0===i.length;return e.some((e=>{if("string"==typeof e)return s&&e===r;{let[t,s]=e;if(t!==r)return!1;for(let e of i)if(s[e]!==n[e])return!1;return!0}}))}function Ut(e,t,r){let n=e.find((e=>Array.isArray(e)?e[0]===t:e===t));return n&&Array.isArray(n)&&n.length>1?n[1][r]:null}var $t=["minimal","fsharp","hack","smart"],Vt=["^^","@@","^","%","#"],qt=["hash","bar"];var Kt={estree:e=>class extends e{parse(){let e=E(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(E)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch{}let n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:t},n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){let t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let t=e.value;delete e.value,t.type="Literal",t.raw=t.extra.raw,t.value=t.extra.expressionValue;let r=e;return r.type="ExpressionStatement",r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}parseBlockBody(e,t,r,n,i){super.parseBlockBody(e,t,r,n,i);let s=e.directives.map((e=>this.directiveToStmt(e)));e.body=s.concat(e.body),delete e.directives}pushClassMethod(e,t,r,n,i,s){this.parseMethod(t,r,n,i,s,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return delete e.id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,r,n,i,s,a=!1){let o=this.startNode();return o.kind=e.kind,o=super.parseMethod(o,t,r,n,i,s,a),o.type="FunctionExpression",delete o.kind,e.value=o,"ClassPrivateMethod"===s&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition"),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition",t.computed=!1),t}parseObjectMethod(e,t,r,n,i){let s=super.parseObjectMethod(e,t,r,n,i);return s&&(s.type="Property","method"===s.kind&&(s.kind="init"),s.shorthand=!1),s}parseObjectProperty(e,t,r,n){let i=super.parseObjectProperty(e,t,r,n);return i&&(i.kind="init",i.type="Property"),i}isValidLVal(e,t,r){return"Property"===e?"value":super.isValidLVal(e,t,r)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){"get"===e.kind||"set"===e.kind?this.raise(b.PatternHasAccessor,{at:e.key}):e.method?this.raise(b.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,t,r)}finishCallExpression(e,t){let r=super.finishCallExpression(e,t);if("Import"===r.callee.type){var n;if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))r.attributes=null!=(n=r.arguments[1])?n:null;delete r.arguments,delete r.callee}return r}toReferencedArguments(e){"ImportExpression"!==e.type&&super.toReferencedArguments(e)}parseExport(e,t){let r=this.state.lastTokStartLoc,n=super.parseExport(e,t);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":1===n.specifiers.length&&"ExportNamespaceSpecifier"===n.specifiers[0].type&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var i;let{declaration:e}=n;"ClassDeclaration"===(null==e?void 0:e.type)&&(null==(i=e.decorators)?void 0:i.length)>0&&e.start===n.start&&this.resetStartLocation(n,r)}}return n}parseSubscript(e,t,r,n){let i=super.parseSubscript(e,t,r,n);if(n.optionalChainMember){if(("OptionalMemberExpression"===i.type||"OptionalCallExpression"===i.type)&&(i.type=i.type.substring(8)),n.stop){let e=this.startNodeAtNode(i);return e.expression=i,this.finishNode(e,"ChainExpression")}}else("MemberExpression"===i.type||"CallExpression"===i.type)&&(i.optional=!1);return i}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return e.method||"get"===e.kind||"set"===e.kind}finishNodeAt(e,t,r){return E(super.finishNodeAt(e,t,r))}resetStartLocation(e,t){super.resetStartLocation(e,t),E(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),E(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(vt.UnterminatedJsxContent,{at:this.state.startLoc});let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?void(60===r&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(140)):super.getTokenFromCode(r)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(139,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:$e(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t,r=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===r&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(r),++this.state.curLine,this.state.lineStart=this.state.pos,t}jsxReadString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(b.UnterminatedString,{at:this.state.startLoc});let n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):$e(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}t+=this.input.slice(r,this.state.pos++),this.finishToken(131,t)}jsxReadEntity(){let e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);let t=this.readInt(e,void 0,!1,"bail");if(null!==t&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,r=!1;for(;t++<10&&this.state.pos<this.length&&!(r=59==this.codePointAtPos(this.state.pos));)++this.state.pos;if(r){this.input.slice(e,this.state.pos),++this.state.pos}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(ue(e)||45===e);this.finishToken(138,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(138)?e.name=this.state.value:z(this.state.type)?e.name=G(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let r=this.startNodeAt(e);return r.namespace=t,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(16);){let r=this.startNodeAt(e);r.object=t,r.property=this.jsxParseIdentifier(),t=this.finishNode(r,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(P.brace),this.next(),e=this.jsxParseExpressionContainer(e,P.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(vt.AttributeIsEmpty,{at:e}),e;case 140:case 131:return this.parseExprAtom();default:throw this.raise(vt.UnsupportedJsxValue,{at:this.state.startLoc})}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(P.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let t=this.parseExpression();e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(P.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(P.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(141);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(141),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(141),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){let t=this.startNodeAt(e),r=[],n=this.jsxParseOpeningElementAt(e),i=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 140:if(e=this.state.startLoc,this.next(),this.eat(56)){i=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 139:r.push(this.parseExprAtom());break;case 5:{let e=this.startNode();this.setContext(P.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(e)):r.push(this.jsxParseExpressionContainer(e,P.j_expr));break}default:this.unexpected()}Pt(n)&&!Pt(i)&&null!==i?this.raise(vt.MissingClosingTagFragment,{at:i}):(!Pt(n)&&Pt(i)||!Pt(n)&&!Pt(i)&&At(i.name)!==At(n.name))&&this.raise(vt.MissingClosingTagElement,{at:i,openingTagName:At(n.name)})}if(Pt(n)?(t.openingFragment=n,t.closingFragment=i):(t.openingElement=n,t.closingElement=i),t.children=r,this.match(47))throw this.raise(vt.UnwrappedAdjacentJSXElements,{at:this.state.startLoc});return Pt(n)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(139)?this.parseLiteral(this.state.value,"JSXText"):this.match(140)?this.jsxParseElement():this.match(47)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(140),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t!==P.j_expr){if(t===P.j_oTag||t===P.j_cTag){if(oe(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(141);if((34===e||39===e)&&t===P.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(140);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){let{context:t,type:r}=this.state;if(56===r&&140===e)t.splice(-2,2,P.j_cTag),this.state.canStartJSXElement=!1;else if(140===r)t.push(P.j_oTag);else if(141===r){let r=t[t.length-1];r===P.j_oTag&&56===e||r===P.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===P.j_expr):(this.setContext(P.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=function(e){return j[e]}(r)}},flow:e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return _e}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){131!==e&&13!==e&&28!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){let t=Et.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(108),this.state.lastTokStart>t.index+1&&this.raise(bt.UnexpectedSpaceBetweenModuloChecks,{at:t}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);let i=this.flowParseFunctionTypeParams();return r.params=i.params,r.rest=i.rest,r.this=i._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){return this.match(80)?this.flowParseDeclareClass(e):this.match(68)?this.flowParseDeclareFunction(e):this.match(74)?this.flowParseDeclareVariable(e):this.eatContextual(125)?this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(bt.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e)):this.isContextual(128)?this.flowParseDeclareTypeAlias(e):this.isContextual(129)?this.flowParseDeclareOpaqueType(e):this.isContextual(127)?this.flowParseDeclareInterface(e):this.match(82)?this.flowParseDeclareExportDeclaration(e,t):void this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(131)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),r=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),!this.isContextual(128)&&!this.match(87)&&this.raise(bt.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(e)):(this.expectContextual(123,bt.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),r.push(e)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let n=null,i=!1;return r.forEach((e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(i&&this.raise(bt.DuplicateDeclareModuleExports,{at:e}),"ES"===n&&this.raise(bt.AmbiguousDeclareModuleKind,{at:e}),n="CommonJS",i=!0):("CommonJS"===n&&this.raise(bt.AmbiguousDeclareModuleKind,{at:e}),n="ES")})),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(128)||this.isContextual(127))&&!t){let e=this.state.value;throw this.raise(bt.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:e,suggestion:Tt[e]})}return this.match(74)||this.match(68)||this.match(80)||this.isContextual(129)?(e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration")):this.match(55)||this.match(5)||this.isContextual(127)||this.isContextual(128)||this.isContextual(129)?("ExportNamedDeclaration"===(e=this.parseExport(e,null)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e):void this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(109),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:we,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(115))do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(111))do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(bt.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,t,r){xt.has(e)&&this.raise(r?bt.AssignReservedType:bt.UnexpectedReservedType,{at:t,reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,we,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(128),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,we,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let t=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return r.name=i.name,r.variance=n,r.bound=i.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(bt.MissingTypeParamDefault,{at:t}),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(140)?this.next():this.unexpected();let r=!1;do{let e=this.flowParseTypeParameter(r);t.params.push(e),e.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(127),e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(132)||this.match(131)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,r){return e.static=t,14===this.lookahead().type?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){let r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:n,allowInexact:i}){let s=this.state.inType;this.state.inType=!0;let a=this.startNode();a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[];let o,u,l=!1;for(t&&this.match(6)?(this.expect(6),o=9,u=!0):(this.expect(5),o=8,u=!1),a.exact=u;!this.match(o);){let t=!1,s=null,o=null,c=this.startNode();if(n&&this.isContextual(116)){let t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),s=this.state.startLoc,e=!1)}if(e&&this.isContextual(104)){let e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),t=!0)}let p=this.flowParseVariance();if(this.eat(0))null!=s&&this.unexpected(s),this.eat(0)?(p&&this.unexpected(p.loc.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(c,t))):a.indexers.push(this.flowParseObjectTypeIndexer(c,t,p));else if(this.match(10)||this.match(47))null!=s&&this.unexpected(s),p&&this.unexpected(p.loc.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(c,t));else{let e="init";if(this.isContextual(98)||this.isContextual(103)){W(this.lookahead().type)&&(e=this.state.value,this.next())}let n=this.flowParseObjectTypeProperty(c,t,s,p,e,r,i??!u);null===n?(l=!0,o=this.state.lastTokStartLoc):a.properties.push(n)}this.flowObjectTypeSemicolon(),o&&!this.match(8)&&!this.match(9)&&this.raise(bt.UnexpectedExplicitInexactInObject,{at:o})}this.expect(o),r&&(a.inexact=l);let c=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=s,c}flowParseObjectTypeProperty(e,t,r,n,i,s,a){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(s?a||this.raise(bt.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(bt.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),n&&this.raise(bt.InexactVariance,{at:n}),null):(s||this.raise(bt.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),null!=r&&this.unexpected(r),n&&this.raise(bt.SpreadVariance,{at:n}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=r,e.kind=i;let a=!1;return this.match(47)||this.match(10)?(e.method=!0,null!=r&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),("get"===i||"set"===i)&&this.flowCheckGetterSetterParams(e),!s&&"constructor"===e.key.name&&e.value.this&&this.raise(bt.ThisParamBannedInConstructor,{at:e.value.this})):("init"!==i&&this.unexpected(),e.method=!1,this.eat(17)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let t="get"===e.kind?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise("get"===e.kind?bt.GetterMayNotHaveThisParam:bt.SetterMayNotHaveThisParam,{at:e.value.this}),r!==t&&this.raise("get"===e.kind?b.BadGetterArity:b.BadSetterArity,{at:e}),"set"===e.kind&&e.value.rest&&this.raise(b.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){null!=e||(e=this.state.startLoc);let r=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let t=this.startNodeAt(e);t.qualification=r,t.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(t,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,t){let r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,r=!1,n=null,i=this.startNode(),s=this.lookahead(),a=78===this.state.type;return 14===s.type||17===s.type?(a&&!e&&this.raise(bt.ThisParamMustBeFirst,{at:i}),t=this.parseIdentifier(a),this.eat(17)&&(r=!0,a&&this.raise(bt.ThisParamMayNotBeOptional,{at:i})),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),i.name=t,i.optional=r,i.typeAnnotation=n,this.finishNode(i,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:r}}flowIdentToTypeAnnotation(e,t,r){switch(r.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){let e,t,r=this.state.startLoc,n=this.startNode(),i=!1,s=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,t=this.flowParseTupleType(),this.state.noAnonFunctionType=s,t;case 47:return n.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),e=this.flowParseFunctionTypeParams(),n.params=e.params,n.rest=e.rest,n.this=e._this,this.expect(11),this.expect(19),n.returnType=this.flowParseType(),this.finishNode(n,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(K(this.state.type)||this.match(78)){let e=this.lookahead().type;i=17!==e&&14!==e}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,t=this.flowParseType(),this.state.noAnonFunctionType=s,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),t;this.eat(12)}return e=t?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(t)]):this.flowParseFunctionTypeParams(),n.params=e.params,n.rest=e.rest,n.this=e._this,this.expect(11),this.expect(19),n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation");case 131:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(132))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(133))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(bt.UnexpectedSubtractionOperand,{at:this.state.startLoc})}return void this.unexpected();case 132:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(z(this.state.type)){let e=G(this.state.type);return this.next(),super.createIdentifier(n,e)}if(K(this.state.type))return this.isContextual(127)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let n=this.startNodeAt(e),i=this.eat(18);r=r||i,this.expect(0),!i&&this.match(3)?(n.elementType=t,this.next(),t=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=t,n.indexType=this.flowParseType(),this.expect(3),r?(n.optional=i,t=this.finishNode(n,"OptionalIndexedAccessType")):t=this.finishNode(n,"IndexedAccessType"))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(130===this.state.type&&"_"===this.state.value){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,r=!1){t?this.forwardNoArrowParamsConversionAt(e,(()=>super.parseFunctionBody(e,!0,r))):super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!1){if(this.match(14)){let t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(127)){if(J(this.lookahead().type)){let e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}let t=super.parseStatementLike(e);return void 0===this.flowPragma&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,r){if("Identifier"===t.type)if("declare"===t.name){if(this.match(80)||K(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(K(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){let{type:e}=this.state;return H(e)||this.shouldParseEnums()&&124===e?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return H(e)||this.shouldParseEnums()&&124===e?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(r),e}this.expect(17);let n=this.state.clone(),i=this.state.noArrowAt,s=this.startNodeAt(t),{consequent:a,failed:o}=this.tryParseConditionalConsequent(),[u,l]=this.getArrowLikeExpressions(a);if(o||l.length>0){let e=[...i];if(l.length>0){this.state=n,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:a,failed:o}=this.tryParseConditionalConsequent()),[u,l]=this.getArrowLikeExpressions(a)}o&&u.length>1&&this.raise(bt.AmbiguousConditionalArrow,{at:n.startLoc}),o&&1===u.length&&(this.state=n,e.push(u[0].start),this.state.noArrowAt=e,({consequent:a,failed:o}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(a,!0),this.state.noArrowAt=i,this.expect(14),s.test=e,s.consequent=a,s.alternate=this.forwardNoArrowParamsConversionAt(s,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(s,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let r=[e],n=[];for(;0!==r.length;){let e=r.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):n.push(e),r.push(e.body)):"ConditionalExpression"===e.type&&(r.push(e.consequent),r.push(e.alternate))}return t?(n.forEach((e=>this.finishArrowValidation(e))),[n,[]]):function(e,t){let r=[],n=[];for(let i=0;i<e.length;i++)(t(e[i],i,e)?r:n).push(e[i]);return[r,n]}(n,(e=>e.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let r;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(128)){e.exportKind="type";let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(129)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(127)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual(124)){e.exportKind="value";let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(128)||55!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&"type"===e.exportKind&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){let{startLoc:n}=this.state;if(this.isContextual(123)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(bt.DeclareClassElement,{at:n}):t.value&&this.raise(bt.DeclareClassFieldInitializer,{at:t.value}))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(b.InvalidIdentifier,{at:this.state.curPosition(),identifierName:t}),this.finishToken(130,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(6,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(18,2):this.finishOp(17,1):function(e,t,r){return 64===e&&64===t&&oe(r)}(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(62===e?48:47,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&"AssignmentExpression"===e.type&&"TypeCastExpression"===e.left.type&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){let r=e[t];"TypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let n=0;n<e.length;n++){var r;let i=e[n];i&&"TypeCastExpression"===i.type&&(null==(r=i.extra)||!r.parenthesized)&&(e.length>1||!t)&&this.raise(bt.TypeCastInPattern,{at:i.typeAnnotation})}return e}parseArrayLike(e,t,r,n){let i=super.parseArrayLike(e,t,r,n);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(e,t,r){return"TypeCastExpression"===e||super.isValidLVal(e,t,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,n,i,s){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,n,i,s),t.params&&i){let e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(bt.ThisParamBannedInConstructor,{at:t})}else if("MethodDefinition"===t.type&&i&&t.value.params){let e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(bt.ThisParamBannedInConstructor,{at:t})}}pushClassPrivateMethod(e,t,r,n){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(111)){this.next();let t=e.implements=[];do{let e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let r=t[0];this.isThisParam(r)&&"get"===e.kind?this.raise(bt.GetterMayNotHaveThisParam,{at:r}):this.isThisParam(r)&&this.raise(bt.SetterMayNotHaveThisParam,{at:r})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,n,i,s,a){let o;e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&!s&&(o=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(e,t,r,n,i,s,a);return o&&((u.value||u).typeParameters=o),u}parseAssignableListItemTypes(e){return this.eat(17)&&("Identifier"!==e.type&&this.raise(bt.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(bt.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(bt.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(bt.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(bt.TypeBeforeInitializer,{at:r.typeAnnotation}),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(bt.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}parseImportSpecifierLocal(e,t,r){t.local=St(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(128)){if(!e)return!0;let t=this.lookaheadCharCode();return 123===t||42===t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){if(super.applyImportPhase(e,t,r,n),t){if(!r&&this.match(65))return;e.exportKind="type"===r?r:"value"}else"type"===r&&this.match(55)&&this.unexpected(),e.importKind="type"===r||"typeof"===r?r:"value"}parseImportSpecifier(e,t,r,n,i){let s=e.imported,a=null;"Identifier"===s.type&&("type"===s.name?a="type":"typeof"===s.name&&(a="typeof"));let o=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let t=this.parseIdentifier(!0);null===a||J(this.state.type)?(e.imported=s,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=a,e.local=mt(t))}else{if(null!==a&&J(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=a;else{if(t)throw this.raise(b.ImportBindingIsString,{at:e,importName:s.value});e.imported=s,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(o=!0,e.local=mt(e.imported))}let u=St(e);return r&&u&&this.raise(bt.ImportTypeShorthandOnlyInPureImport,{at:e}),(r||u)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),o&&!r&&!u&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){let r=e.kind;"get"!==r&&"set"!==r&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let n,i=null;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(i=this.state.clone(),n=this.tryParse((()=>super.parseMaybeAssign(e,t)),i),!n.error)return n.node;let{context:r}=this.state,s=r[r.length-1];(s===P.j_oTag||s===P.j_expr)&&r.pop()}if(null!=(r=n)&&r.error||this.match(47)){var s,a;i=i||this.state.clone();let r,o=this.tryParse((n=>{var i;r=this.flowParseTypeParameterDeclaration();let s=this.forwardNoArrowParamsConversionAt(r,(()=>{let n=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(n,r),n}));null!=(i=s.extra)&&i.parenthesized&&n();let a=this.maybeUnwrapTypeCastExpression(s);return"ArrowFunctionExpression"!==a.type&&n(),a.typeParameters=r,this.resetStartLocationFromNode(a,r),s}),i),u=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(bt.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:r}),o.node;u=o.node}if(null!=(s=n)&&s.node)return this.state=n.failState,n.node;if(u)return this.state=o.failState,u;throw null!=(a=n)&&a.thrown?n.error:o.thrown?o.error:this.raise(bt.UnexpectedTokenAfterTypeParameter,{at:r})}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse((()=>{let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,r,n=!0){if(!r||-1===this.state.noArrowParamsConversionAt.indexOf(e.start)){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(bt.ThisParamMustBeFirst,{at:e.params[t]});super.checkParams(e,t,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(e,t,r){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(t.index)){this.next();let r=this.startNodeAt(t);r.callee=e,r.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(r,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(47)){let n=this.state.clone(),i=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t)||e()),n);if(!i.error&&!i.aborted)return i.node;let s=this.tryParse((()=>super.parseSubscripts(e,t,r)),n);if(s.node&&!s.error)return s.node;if(i.node)return this.state=i.failState,i.node;if(s.node)return this.state=s.failState,s.node;throw i.error||s.error}return super.parseSubscripts(e,t,r)}parseSubscript(e,t,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();let i=this.startNodeAt(t);return i.callee=e,i.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),i.arguments=this.parseCallExpressionArguments(11,!1),i.optional=!0,this.finishCallExpression(i,!0)}if(!r&&this.shouldParseTypes()&&this.match(47)){let r=this.startNodeAt(t);r.callee=e;let i=this.tryParse((()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),r.arguments=super.parseCallExpressionArguments(11,!1),n.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,n.optionalChainMember))));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(9,2)}parseTopLevel(e,t){let r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(bt.UnterminatedFlowComment,{at:this.state.curPosition()}),r}skipBlockComment(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/");{if(this.state.hasFlowComment)throw this.raise(bt.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let r=this.input.charCodeAt(t+e),n=this.input.charCodeAt(t+e+1);return 58===r&&58===n?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===r&&58!==n&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(b.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(bt.EnumBooleanMemberNotInitialized,{at:e,memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?bt.EnumInvalidMemberInitializerSymbolType:bt.EnumInvalidMemberInitializerPrimaryType:bt.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},t))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(bt.EnumNumberMemberNotInitialized,{at:e,enumName:t,memberName:r})}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(bt.EnumStringMemberInconsistentlyInitailized,{at:e,enumName:t})}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 132:{let r=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 131:{let r=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{let r=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,r){let{explicitType:n}=t;null!==n&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}let s=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),u=a.name;if(""===u)continue;/^[a-z]/.test(u)&&this.raise(bt.EnumInvalidMemberName,{at:a,memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:e}),r.has(u)&&this.raise(bt.EnumDuplicateMemberName,{at:a,memberName:u,enumName:e}),r.add(u);let l={enumName:e,explicitType:t,memberName:u};switch(s.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"boolean"),s.init=o.value,n.booleanMembers.push(this.finishNode(s,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"number"),s.init=o.value,n.numberMembers.push(this.finishNode(s,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"string"),s.init=o.value,n.stringMembers.push(this.finishNode(s,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.loc,l);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,l);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,l);break;default:n.defaultedMembers.push(this.finishNode(s,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:i}}flowEnumStringMembers(e,t,{enumName:r}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(let t of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:r});return t}for(let e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:r});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(101))return null;if(!K(this.state.type))throw this.raise(bt.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e});let{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(bt.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let r=t.name,n=t.loc.start,i=this.flowEnumParseExplicitType({enumName:r});this.expect(5);let{members:s,hasUnknownMembers:a}=this.flowEnumMembers({enumName:r,explicitType:i});switch(e.hasUnknownMembers=a,i){case"boolean":return e.explicitType=!0,e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=s.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let t=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let i=s.booleanMembers.length,a=s.numberMembers.length,o=s.stringMembers.length,u=s.defaultedMembers.length;if(!(i||a||o||u))return t();if(!i&&!a)return e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!a&&!o&&i>=u){for(let e of s.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}if(!i&&!o&&a>=u){for(let e of s.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}return this.raise(bt.EnumInconsistentMemberValues,{at:n,enumName:r}),t()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){let t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:Nt.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:Nt.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:Nt.InvalidModifierOnTypeParameter})}getScopeHandler(){return Ct}tsIsIdentifier(){return K(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(136)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,t){if(!K(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;let r=this.state.value;if(-1!==e.indexOf(r)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:r,errorTemplate:n=Nt.InvalidModifierOnTypeMember},i){let s=(e,t,r,n)=>{t===r&&i[n]&&this.raise(Nt.InvalidModifiersOrder,{at:e,orderedModifiers:[r,n]})},a=(e,t,r,n)=>{(i[r]&&t===n||i[n]&&t===r)&&this.raise(Nt.IncompatibleModifiers,{at:e,modifiers:[r,n]})};for(;;){let{startLoc:o}=this.state,u=this.tsParseModifier(e.concat(t??[]),r);if(!u)break;Ft(u)?i.accessibility?this.raise(Nt.DuplicateAccessibilityModifier,{at:o,modifier:u}):(s(o,u,u,"override"),s(o,u,u,"static"),s(o,u,u,"readonly"),i.accessibility=u):_t(u)?(i[u]&&this.raise(Nt.DuplicateModifier,{at:o,modifier:u}),i[u]=!0,s(o,u,"in","out")):(Object.hasOwnProperty.call(i,u)?this.raise(Nt.DuplicateModifier,{at:o,modifier:u}):(s(o,u,"static","readonly"),s(o,u,"static","override"),s(o,u,"override","readonly"),s(o,u,"abstract","override"),a(o,u,"declare","override"),a(o,u,"static","abstract")),i[u]=!0),null!=t&&t.includes(u)&&this.raise(n,{at:o,modifier:u})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,t){let r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t,r){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,r))}tsParseDelimitedListWorker(e,t,r,n){let i=[],s=-1;for(;!this.tsIsListTerminator(e);){s=-1;let n=t();if(null==n)return;if(i.push(n),!this.eat(12)){if(this.tsIsListTerminator(e))break;return void(r&&this.expect(12))}s=this.state.lastTokStart}return n&&(n.value=s),i}tsParseBracketedList(e,t,r,n,i){n||(r?this.expect(0):this.expect(47));let s=this.tsParseDelimitedList(e,t,i);return r?this.expect(3):this.expect(48),s}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(131)||this.raise(Nt.UnsupportedImportTypeArgument,{at:this.state.startLoc}),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){let r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(e),t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(140)?this.next():this.unexpected();let r={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),0===t.params.length&&this.raise(Nt.EmptyTypeParameters,{at:t}),-1!==r.value&&this.addExtra(t,"trailingComma",r.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let r=19===e,n="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(r||this.match(e))&&(t[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:e}=t;("AssignmentPattern"===e||"TSParameterProperty"===e)&&this.raise(Nt.UnsupportedSignatureParameterKind,{at:t,type:e})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!K(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let r=e;if(this.match(10)||this.match(47)){t&&this.raise(Nt.ReadonlyForMethodSignature,{at:e});let n=r;n.kind&&this.match(47)&&this.raise(Nt.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();let i="parameters",s="typeAnnotation";if("get"===n.kind)n[i].length>0&&(this.raise(b.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(n[i][0])&&this.raise(Nt.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if("set"===n.kind){if(1!==n[i].length)this.raise(b.BadSetterArity,{at:this.state.curPosition()});else{let e=n[i][0];this.isThisParam(e)&&this.raise(Nt.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),"Identifier"===e.type&&e.optional&&this.raise(Nt.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),"RestElement"===e.type&&this.raise(Nt.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}n[s]&&this.raise(Nt.SetAccesorCannotHaveReturnType,{at:n[s]})}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}{let e=r;t&&(e.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e),this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(120):(this.isContextual(120)&&this.next(),!(!this.match(0)||(this.next(),!this.tsIsIdentifier()))&&(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(120)):this.eatContextual(120)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1,r=null;return e.elementTypes.forEach((e=>{let{type:n}=e;t&&"TSRestType"!==n&&"TSOptionalType"!==n&&!("TSNamedTupleMember"===n&&e.optional)&&this.raise(Nt.OptionalTypeBeforeRequired,{at:e}),t||(t="TSNamedTupleMember"===n&&e.optional||"TSOptionalType"===n);let i=n;"TSRestType"===n&&(i=(e=e.typeAnnotation).type);let s="TSNamedTupleMember"===i;null!=r||(r=s),r!==s&&this.raise(Nt.MixedLabeledAndUnlabeledElements,{at:e})})),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let e,t,r,n,{startLoc:i}=this.state,s=this.eat(21),a=J(this.state.type)?this.lookaheadCharCode():null;if(58===a)e=!0,r=!1,t=this.parseIdentifier(!0),this.expect(14),n=this.tsParseType();else if(63===a){r=!0;let i=this.state.startLoc,s=this.state.value,a=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(e=!0,t=this.createIdentifier(this.startNodeAt(i),s),this.expect(17),this.expect(14),n=this.tsParseType()):(e=!1,n=a,this.expect(17))}else n=this.tsParseType(),r=this.eat(17),e=this.eat(14);if(e){let e;t?(e=this.startNodeAtNode(t),e.optional=r,e.label=t,e.elementType=n,this.eat(17)&&(e.optional=!0,this.raise(Nt.TupleOptionalAfterType,{at:this.state.lastTokStartLoc}))):(e=this.startNodeAtNode(n),e.optional=r,this.raise(Nt.InvalidTupleMemberLabel,{at:n}),e.label=n,e.elementType=this.tsParseType()),n=this.finishNode(e,"TSNamedTupleMember")}else if(r){let e=this.startNodeAtNode(n);e.typeAnnotation=n,n=this.finishNode(e,"TSOptionalType")}if(s){let e=this.startNodeAt(i);e.typeAnnotation=n,n=this.finishNode(e,"TSRestType")}return n}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let r=this.startNode();return"TSConstructorType"===e&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(19,r))),this.finishNode(r,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 132:case 133:case 131:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(114)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 131:case 132:case 133:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){let e=this.startNode(),t=this.lookahead();return 132!==t.type&&133!==t.type&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(K(e)||88===e||84===e){let t=88===e?"TSVoidKeyword":84===e?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{let t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Nt.UnexpectedReadonly,{at:e})}}tsParseInferType(){let e=this.startNode();this.expectContextual(113);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return function(e){return e>=119&&e<=121}(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(113)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(e,t,r){let n=this.startNode(),i=this.eat(r),s=[];do{s.push(t())}while(this.eat(r));return 1!==s.length||i?(n.types=s,this.finishNode(n,e)):s[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return!!this.match(47)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(K(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{let t=this.startNode();this.expect(e);let r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(r.parameterName=e,r.asserts=!0,r.typeAnnotation=null,e=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(e,r),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}let i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);let s=this.tsParseTypeAnnotation(!1);return r.parameterName=i,r.typeAnnotation=s,r.asserts=n,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(114)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(107!==this.state.type)return!1;let e=this.state.containsEsc;return this.next(),!(!K(this.state.type)&&!this.match(78))&&(e&&this.raise(b.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){It(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType())),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(122)&&77===this.lookahead().type}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Nt.ReservedTypeAssertion,{at:this.state.startLoc});let e=this.startNode();return e.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()))),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let t=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",(()=>{let e=this.startNode();return e.expression=this.tsParseEntityName(),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}));return r.length||this.raise(Nt.EmptyHeritageClauseType,{at:t,token:e}),r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(127),t.declare&&(e.declare=!0),K(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(Nt.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType((()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(112)&&16!==this.lookahead().type){let e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType((()=>(this.expect(e),this.tsParseType())))}tsNextThenParseType(){return this.tsInType((()=>(this.next(),this.tsParseType())))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(131)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(124),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(Te),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(110)?(e.global=!0,e.id=this.parseIdentifier()):this.match(131)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(Te),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,r){e.isExport=r||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,De),this.expect(29);let n=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==n.type&&this.raise(Nt.ImportAliasHasImportType,{at:n}),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(117)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(117),this.expect(10),this.match(131)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){let t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),r=e();if(void 0!==r&&!1!==r)return r;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t,r=this.state.type;return this.isContextual(99)&&(r=74,t="let"),this.tsInAmbientContext((()=>{switch(r){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 124:return this.tsParseEnumDeclaration(e,{declare:!0});case 110:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,t||this.state.value,!0));case 127:{let t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(K(r))return this.tsParseDeclaration(e,this.state.value,!0,null)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,r){switch(t.name){case"declare":{let t=this.tsTryParseDeclare(e);return t&&(t.declare=!0),t}case"global":if(this.match(5)){this.scope.enter(Te),this.prodParam.enter(0);let r=e;return r.global=!0,r.id=t,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,r)}}tsParseDeclaration(e,t,r,n){switch(t){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||K(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(131))return this.tsParseAmbientExternalModuleDeclaration(e);if(K(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&K(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&K(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let r=this.tsTryParseAndCatch((()=>{let t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t}));return this.state.maybeInArrowParameters=t,r?super.parseArrowExpression(r,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length?this.raise(Nt.EmptyTypeArguments,{at:e}):!this.state.inType&&this.curContext()===P.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return function(e){return e>=122&&e<=128}(this.state.type)}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let r=this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);let i=n.accessibility,s=n.override,a=n.readonly;!(4&e)&&(i||a||s)&&this.raise(Nt.UnexpectedParameterModifier,{at:r});let o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o,e);let u=this.parseMaybeDefault(o.loc.start,o);if(i||a||s){let e=this.startNodeAt(r);return t.length&&(e.decorators=t),i&&(e.accessibility=i),a&&(e.readonly=a),s&&(e.override=s),"Identifier"!==u.type&&"AssignmentPattern"!==u.type&&this.raise(Nt.UnsupportedParameterPropertyKind,{at:e}),e.parameter=u,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),u}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(Nt.PatternIsOptional,{at:t})}setArrowFunctionParameters(e,t,r){super.setArrowFunctionParameters(e,t,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let n="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):"TSDeclareFunction"===n&&this.state.isAmbientContext&&(this.raise(Nt.DeclareFunctionHasImplementation,{at:e}),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===(null==e?void 0:e.type)&&this.raise(Nt.UnexpectedTypeAnnotation,{at:e.typeAnnotation})}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,r,n){let i=super.parseArrayLike(e,t,r,n);return"ArrayExpression"===i.type&&this.tsCheckForInvalidTypeCasts(i.elements),i}parseSubscript(e,t,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let r=this.startNodeAt(t);return r.expression=e,this.finishNode(r,"TSNonNullExpression")}let i=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(r)return n.stop=!0,e;n.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let s,a=this.tsTryParseAndCatch((()=>{if(!r&&this.atPossibleAsyncArrow(e)){let e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return e}let a=this.tsParseTypeArgumentsInExpression();if(!a)return;if(i&&!this.match(10))return void(s=this.state.curPosition());if(Q(this.state.type)){let r=super.parseTaggedTemplateExpression(e,t,n);return r.typeParameters=a,r}if(!r&&this.eat(10)){let r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(r.arguments),r.typeParameters=a,n.optionalChainMember&&(r.optional=i),this.finishCallExpression(r,n.optionalChainMember)}let o=this.state.type;if(48===o||52===o||10!==o&&X(o)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=a,this.finishNode(u,"TSInstantiationExpression")}));if(s&&this.unexpected(s,10),a)return"TSInstantiationExpression"===a.type&&(this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(Nt.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),a}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:r}=e;"TSInstantiationExpression"===r.type&&(null==(t=r.extra)||!t.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,t,r){let n;if(Y(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(118)))){let i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?(n&&this.raise(b.UnexpectedKeyword,{at:this.state.startLoc,keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()))),this.finishNode(i,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,t,r)}return super.parseExprOp(e,t,r)}checkReservedWord(e,t,r,n){this.state.isAmbientContext||super.checkReservedWord(e,t,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(Nt.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(128)){let t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){super.applyImportPhase(e,t,r,n),t?e.exportKind="type"===r?"type":"value":e.importKind="type"===r||"typeof"===r?r:"value"}parseImport(e){if(this.match(131))return e.importKind="value",super.parseImport(e);let t;if(K(this.state.type)&&61===this.lookaheadCharCode())return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(128)){let r=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(e,r);t=super.parseImportSpecifiersAndAfter(e,r)}else t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(Nt.TypeImportCannotSpecifyDefaultAndNamed,{at:t}),t}parseExport(e,t){if(this.match(83)){this.next();let t=null;return this.isContextual(128)&&this.isPotentialImportPhase(!1)?t=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,t,!0)}if(this.eat(29)){let t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(93)){let t=e;return this.expectContextual(126),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(122)&&80===this.lookahead().type}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(127)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,r=!1){let{isAmbientContext:n}=this.state,i=super.parseVarStatement(e,t,r||n);if(!n)return i;for(let{id:e,init:r}of i.declarations)r&&("const"!==t||e.typeAnnotation?this.raise(Nt.InitializerNotAllowedInAmbientContext,{at:r}):Lt(r,this.hasPlugin("estree"))||this.raise(Nt.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:r}));return i}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}if(this.isContextual(124))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(127)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>Ft(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual(104)&&123===this.lookaheadCharCode()}parseClassMember(e,t,r){let n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:Nt.InvalidModifierOnTypeParameterPositions},t);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,n)&&this.raise(Nt.StaticBlockCannotHaveModifier,{at:this.state.curPosition()}),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,!!t.static)};t.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(e,t,r,n){let i=this.tsTryParseIndexSignature(t);if(i)return e.body.push(i),t.abstract&&this.raise(Nt.IndexSignatureHasAbstract,{at:t}),t.accessibility&&this.raise(Nt.IndexSignatureHasAccessibility,{at:t,modifier:t.accessibility}),t.declare&&this.raise(Nt.IndexSignatureHasDeclare,{at:t}),void(t.override&&this.raise(Nt.IndexSignatureHasOverride,{at:t}));!this.state.inAbstractClass&&t.abstract&&this.raise(Nt.NonAbstractClassHasAbstractMethod,{at:t}),t.override&&(r.hadSuperClass||this.raise(Nt.OverrideNotInSubClass,{at:t})),super.parseClassMemberWithIsStatic(e,t,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(Nt.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(Nt.ClassMethodHasDeclare,{at:e})}parseExpressionStatement(e,t,r){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t,r):void 0)||super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,r);let n=this.tryParse((()=>super.parseConditional(e,t)));return n.node?(n.error&&(this.state=n.failState),n.node):(n.error&&super.setOptionalParametersError(r,n.error),e)}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(123))return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)));let t=this.state.startLoc,r=this.eatContextual(123);if(r&&(this.isContextual(123)||!this.shouldParseExportDeclaration()))throw this.raise(Nt.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});let n=K(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?(("TSInterfaceDeclaration"===n.type||"TSTypeAliasDeclaration"===n.type||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(n,t),n.declare=!0),n):null}parseClassId(e,t,r,n){if((!t||r)&&this.isContextual(111))return;super.parseClassId(e,t,r,e.declare?1024:8331);let i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(e.typeParameters=i)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(Nt.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){let{key:t}=e;this.raise(Nt.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(t.start,t.end)}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(Nt.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(Nt.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(Nt.AccessorCannotBeOptional,{at:e}),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,r,n,i,s){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&i&&this.raise(Nt.ConstructorHasTypeParameters,{at:a});let{declare:o=!1,kind:u}=t;o&&("get"===u||"set"===u)&&this.raise(Nt.DeclareAccessor,{at:t,kind:u}),a&&(t.typeParameters=a),super.pushClassMethod(e,t,r,n,i,s)}pushClassPrivateMethod(e,t,r,n){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,r,n)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"===e.type&&!e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(111)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,r,n,i,s,a){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);return o&&(e.typeParameters=o),super.parseObjPropValue(e,t,r,n,i,s,a)}parseFunctionParams(e,t){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var r,n,i,s,a;let o,u,l;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(o=this.state.clone(),u=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!u.error)return u.node;let{context:r}=this.state,n=r[r.length-1];(n===P.j_oTag||n===P.j_expr)&&r.pop()}if(!(null!=(r=u)&&r.error||this.match(47)))return super.parseMaybeAssign(e,t);(!o||o===this.state)&&(o=this.state.clone());let c,p=this.tryParse((r=>{var n,i;c=this.tsParseTypeParameters(this.tsParseConstModifier);let s=super.parseMaybeAssign(e,t);return("ArrowFunctionExpression"!==s.type||null!=(n=s.extra)&&n.parenthesized)&&r(),0!==(null==(i=c)?void 0:i.params.length)&&this.resetStartLocationFromNode(s,c),s.typeParameters=c,s}),o);if(!p.error&&!p.aborted)return c&&this.reportReservedArrowTypeParam(c),p.node;if(!u&&(It(!this.hasPlugin("jsx")),l=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!l.error))return l.node;if(null!=(n=u)&&n.node)return this.state=u.failState,u.node;if(p.node)return this.state=p.failState,c&&this.reportReservedArrowTypeParam(c),p.node;if(null!=(i=l)&&i.node)return this.state=l.failState,l.node;throw(null==(s=u)?void 0:s.error)||p.error||(null==(a=l)?void 0:a.error)}reportReservedArrowTypeParam(e){var t;1===e.params.length&&!e.params[0].constraint&&(null==(t=e.extra)||!t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Nt.ReservedArrowTypeParam,{at:e})}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse((e=>{let t=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,t){if(!(2&t))return e;this.eat(17)&&(e.optional=!0);let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(Nt.UnexpectedTypeCastInParameter,{at:e}):this.raise(Nt.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,t);break;case"AssignmentExpression":!t&&"TSTypeCastExpression"===e.left.type&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,r){return((e,t)=>Object.hasOwnProperty.call(e,t)&&e[t])({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(r!==ke||!t)&&["expression",!0],TSSatisfiesExpression:(r!==ke||!t)&&["expression",!0],TSTypeAssertion:(r!==ke||!t)&&["expression",!0]},e)||super.isValidLVal(e,t,r)}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=t,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(Nt.TypeAnnotationAfterAssign,{at:r.typeAnnotation}),r}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(48,1);if(60===e)return void this.finishOp(47,1)}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){let r=e[t];"TSTypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every((e=>this.isAssignable(e,!0))):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let t=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,t,r){let n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(127)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(Nt.NonClassMethodPropertyHasAbstractModifer,{at:e}),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,r,n,i,s,a){let o=super.parseMethod(e,t,r,n,i,s,a);if(o.abstract&&(this.hasPlugin("estree")?o.value.body:o.body)){let{key:e}=o;this.raise(Nt.AbstractMethodHasImplementation,{at:o,methodName:"Identifier"!==e.type||o.computed?`[${this.input.slice(e.start,e.end)}]`:e.name})}return o}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,r,n){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,r,n))}parseImportSpecifier(e,t,r,n,i){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,r,n,r?4098:De))}parseTypeOnlyImportExportSpecifier(e,t,r){let n,i=t?"imported":"local",s=t?"local":"exported",a=e[i],o=!1,u=!0,l=a.loc.start;if(this.isContextual(93)){let e=this.parseIdentifier();if(this.isContextual(93)){let r=this.parseIdentifier();J(this.state.type)?(o=!0,a=e,n=t?this.parseIdentifier():this.parseModuleExportName(),u=!1):(n=r,u=!1)}else J(this.state.type)?(u=!1,n=t?this.parseIdentifier():this.parseModuleExportName()):(o=!0,a=e)}else J(this.state.type)&&(o=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());o&&r&&this.raise(t?Nt.TypeModifierIsUsedInTypeImports:Nt.TypeModifierIsUsedInTypeExports,{at:l}),e[i]=a,e[s]=n,e[t?"importKind":"exportKind"]=o?"type":"value",u&&this.eatContextual(93)&&(e[s]=t?this.parseIdentifier():this.parseModuleExportName()),e[s]||(e[s]=mt(e[i])),t&&this.checkIdentifier(e[s],o?4098:De)}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),K(this.state.type)){let e=this.parseIdentifierName(),r=this.createIdentifier(t,e);if(r.type="V8IntrinsicIdentifier",this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(142)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(142),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let r=!(!e.expectedNode||"Placeholder"!==e.type);return e.expectedNode=t,r?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(142,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,r,n){void 0!==e&&super.checkReservedWord(e,t,r,n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,r){return"Placeholder"===e||super.isValidLVal(e,t,r)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!(!super.chStartsBindingIdentifier(e,t)&&142!==this.lookahead().type)}verifyBreakContinue(e,t){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){if("Placeholder"!==t.type||t.extra&&t.extra.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let r=e;return r.label=this.finishPlaceholder(t,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,t,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,r){let n=t?"ClassDeclaration":"ClassExpression";this.next();let i=this.state.strict,s=this.parsePlaceholder("Identifier");if(s){if(!(this.match(81)||this.match(142)||this.match(5))){if(r||!t)return e.id=null,e.body=this.finishPlaceholder(s,"ClassBody"),this.finishNode(e,n);throw this.raise(jt.ClassNameIsRequired,{at:this.state.startLoc})}e.id=s}else this.parseClassId(e,t,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,i),this.finishNode(e,n)}parseExport(e,t){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,t);if(!this.isContextual(97)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let n=this.startNode();return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(e,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(G(142),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var r;return!(null==(r=e.specifiers)||!r.length)||super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>"Placeholder"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(97)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(97),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(jt.UnexpectedSpace,{at:this.state.lastTokEndLoc})}}},Jt=Object.keys(Kt),Wt={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};var Xt=class extends kt{checkProto(e,t,r,n){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return;let i=e.key;if("__proto__"===("Identifier"===i.type?i.name:i.value)){if(t)return void this.raise(b.RecordNoProto,{at:i});r.used&&(n?null===n.doubleProtoLoc&&(n.doubleProtoLoc=i.loc.start):this.raise(b.DuplicateProto,{at:i})),r.used=!0}}shouldExitDescending(e,t){return"ArrowFunctionExpression"===e.type&&e.start===t}getExpression(){this.enterInitialScopes(),this.nextToken();let e=this.parseExpression();return this.match(137)||this.unexpected(),this.finalizeRemainingComments(),e.comments=this.state.comments,e.errors=this.state.errors,this.options.tokens&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){let t=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(12)){let n=this.startNodeAt(t);for(n.expressions=[r];this.eat(12);)n.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(n.expressions),this.finishNode(n,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e,t){var r;e.optionalParametersLoc=null!=(r=null==t?void 0:t.loc)?r:this.state.startLoc}parseMaybeAssign(e,t){let r,n=this.state.startLoc;if(this.isContextual(106)&&this.prodParam.hasYield){let e=this.parseYield();return t&&(e=t.call(this,e,n)),e}e?r=!1:(e=new dt,r=!0);let{type:i}=this.state;(10===i||K(i))&&(this.state.potentialArrowAt=this.state.start);let s=this.parseMaybeConditional(e);if(t&&(s=t.call(this,s,n)),(a=this.state.type)>=29&&a<=33){let t=this.startNodeAt(n),r=this.state.value;if(t.operator=r,this.match(29)){this.toAssignable(s,!0),t.left=s;let r=n.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=r&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=r&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=r&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else t.left=s;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(s,{in:this.finishNode(t,"AssignmentExpression")}),t}var a;return r&&this.checkExpressionErrors(e,!0),s}parseMaybeConditional(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprOps(e);return this.shouldExitDescending(n,r)?n:this.parseConditional(n,t,e)}parseConditional(e,t,r){if(this.eat(17)){let r=this.startNodeAt(t);return r.test=e,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(136)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(n,r)?n:this.parseExprOp(n,t,-1)}parseExprOp(e,t,r){if(this.isPrivateName(e)){let t=this.getPrivateNameSV(e);(r>=Y(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(b.PrivateInExpectedIn,{at:e,identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}let n=this.state.type;if((i=n)>=39&&i<=59&&(this.prodParam.hasIn||!this.match(58))){let i=Y(n);if(i>r){if(39===n){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let s=this.startNodeAt(t);s.left=e,s.operator=this.state.value;let a=41===n||42===n,o=40===n;if(o&&(i=Y(42)),this.next(),39===n&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(b.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});s.right=this.parseExprOpRightExpr(n,i);let u=this.finishNode(s,a||o?"LogicalExpression":"BinaryExpression"),l=this.state.type;if(o&&(41===l||42===l)||a&&40===l)throw this.raise(b.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(u,t,r)}}var i;return e}parseExprOpRightExpr(e,t){let r=this.state.startLoc;if(39===e)switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"smart":return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(106))throw this.raise(b.PipeBodyIsTighter,{at:this.state.startLoc});return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),r)}));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){let r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,57===e?t-1:t)}parseHackPipeBody(){var e;let{startLoc:t}=this.state,r=this.parseMaybeAssign();return h.has(r.type)&&!(null!=(e=r.extra)&&e.parenthesized)&&this.raise(b.PipeUnparenthesizedBody,{at:t,type:r.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipeTopicUnused,{at:t}),r}checkExponentialAfterUnary(e){this.match(57)&&this.raise(b.UnexpectedTokenUnaryExponentiation,{at:e.argument})}parseMaybeUnary(e,t){let r=this.state.startLoc,n=this.isContextual(96);if(n&&this.isAwaitAllowed()){this.next();let e=this.parseAwait(r);return t||this.checkExponentialAfterUnary(e),e}let i=this.match(34),s=this.startNode();if(a=this.state.type,U[a]){s.operator=this.state.value,s.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let r=this.match(89);if(this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&r){let e=s.argument;"Identifier"===e.type?this.raise(b.StrictDelete,{at:s}):this.hasPropertyAsPrivateName(e)&&this.raise(b.DeletePrivateField,{at:s})}if(!i)return t||this.checkExponentialAfterUnary(s),this.finishNode(s,"UnaryExpression")}var a;let o=this.parseUpdate(s,i,e);if(n){let{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?X(e):X(e)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(b.AwaitNotInAsyncContext,{at:r}),this.parseAwait(r)}return o}parseUpdate(e,t,r){if(t){let t=e;return this.checkLVal(t.argument,{in:this.finishNode(t,"UpdateExpression")}),e}let n=this.state.startLoc,i=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return i;for(;34===this.state.type&&!this.canInsertSemicolon();){let e=this.startNodeAt(n);e.operator=this.state.value,e.prefix=!1,e.argument=i,this.next(),this.checkLVal(i,{in:i=this.finishNode(e,"UpdateExpression")})}return i}parseExprSubscripts(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprAtom(e);return this.shouldExitDescending(n,r)?n:this.parseSubscripts(n,t)}parseSubscripts(e,t,r){let n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,r,n),n.maybeAsyncArrow=!1}while(!n.stop);return e}parseSubscript(e,t,r,n){let{type:i}=this.state;if(!r&&15===i)return this.parseBind(e,t,r,n);if(Q(i))return this.parseTaggedTemplateExpression(e,t,n);let s=!1;if(18===i){if(r&&(this.raise(b.OptionalChainingNoNew,{at:this.state.startLoc}),40===this.lookaheadCharCode()))return n.stop=!0,e;n.optionalChainMember=s=!0,this.next()}if(!r&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,n,s);{let r=this.eat(0);return r||s||this.eat(16)?this.parseMember(e,t,n,r,s):(n.stop=!0,e)}}parseMember(e,t,r,n,i){let s=this.startNodeAt(t);return s.object=e,s.computed=n,n?(s.property=this.parseExpression(),this.expect(3)):this.match(136)?("Super"===e.type&&this.raise(b.SuperPrivateField,{at:t}),this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),r.optionalChainMember?(s.optional=i,this.finishNode(s,"OptionalMemberExpression")):this.finishNode(s,"MemberExpression")}parseBind(e,t,r,n){let i=this.startNodeAt(t);return i.object=e,this.next(),i.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r)}parseCoverCallAndAsyncArrowHead(e,t,r,n){let i=this.state.maybeInArrowParameters,s=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(t);a.callee=e;let{maybeAsyncArrow:o,optionalChainMember:u}=r;o&&(this.expressionScope.enter(new ut(2)),s=new dt),u&&(a.optional=n),a.arguments=n?this.parseCallExpressionArguments(11):this.parseCallExpressionArguments(11,"Import"===e.type,"Super"!==e.type,a,s);let l=this.finishCallExpression(a,u);return o&&this.shouldParseAsyncArrow()&&!n?(r.stop=!0,this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(o&&(this.checkExpressionErrors(s,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=i,l}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r){let n=this.startNodeAt(t);return n.tag=e,n.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(b.OptionalChainingNoTemplate,{at:t}),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&e.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(e,t){if("Import"===e.callee.type)if(2===e.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),0===e.arguments.length||e.arguments.length>2)this.raise(b.ImportCallArity,{at:e,maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let t of e.arguments)"SpreadElement"===t.type&&this.raise(b.ImportCallSpreadArgument,{at:t});return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r,n,i){let s=[],a=!0,o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){t&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(b.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),n&&this.addTrailingCommaExtraToNode(n),this.next();break}s.push(this.parseExprListItem(!1,i,r))}return this.state.inFSharpPipelineDirectBody=o,s}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,null==(r=t.extra)?void 0:r.trailingCommaLoc),t.innerComments&&Me(e,t.innerComments),t.callee.trailingComments&&Me(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,r=null,{type:n}=this.state;switch(n){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(t):(this.match(10)||this.raise(b.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 132:return this.parseNumericLiteral(this.state.value);case 133:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseDecimalLiteral(this.state.value);case 131:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 2:case 1:return this.parseArrayLike(2===this.state.type?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,e);case 6:case 7:return this.parseObjectLike(6===this.state.type?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:r=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(r,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let e=t.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(b.UnsupportedBind,{at:e})}case 136:return this.raise(b.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.parseTopicReference(e);this.unexpected();break}case 47:{let e=this.input.codePointAt(this.nextTokenStart());oe(e)||62===e?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(K(n)){if(this.isContextual(125)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();let e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&"async"===r.name&&!this.canInsertSemicolon()){let{type:e}=this.state;if(68===e)return this.resetPreviousNodeTrailingComments(r),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(r));if(K(e))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(r)):r;if(90===e)return this.resetPreviousNodeTrailingComments(r),this.parseDo(this.startNodeAtNode(r),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(r),[r],!1)):r}this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(r);this.unexpected()}parseTopicReference(e){let t=this.startNode(),r=this.state.startLoc,n=this.state.type;return this.next(),this.finishTopicReference(t,r,e,n)}finishTopicReference(e,t,r,n){if(this.testTopicReferenceConfiguration(r,t,n)){let n="smart"===r?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise("smart"===r?b.PrimaryTopicNotAllowed:b.PipeTopicUnbound,{at:t}),this.registerTopicReference(),this.finishNode(e,n)}throw this.raise(b.PipeTopicUnconfiguredToken,{at:t,token:G(n)})}testTopicReferenceConfiguration(e,t,r){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:G(r)}]);case"smart":return 27===r;default:throw this.raise(b.PipeTopicRequiresHackPipes,{at:t})}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(ct(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(b.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let r=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=r,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(b.UnexpectedSuper,{at:e}):this.raise(b.SuperNotAllowed,{at:e}),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(b.UnsupportedSuper,{at:e}),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(i(this.state.startLoc,1)),r=this.state.value;return this.next(),e.id=this.createIdentifier(t,r),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(102)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;let n=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||n)&&this.raise(b.UnsupportedMetaProperty,{at:e.property,target:t.name,onlyValidPropertyName:r}),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){let t=this.createIdentifier(this.startNodeAtNode(e),"import");return this.next(),this.isContextual(100)&&(this.inModule||this.raise(b.ImportMetaOutsideModule,{at:t}),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}parseLiteralAtNode(e,t,r){return this.addExtra(r,"rawValue",e),this.addExtra(r,"raw",this.input.slice(r.start,this.state.end)),r.value=e,this.next(),this.finishNode(r,t)}parseLiteral(e,t){let r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let t=this.parseLiteral(e.value,"RegExpLiteral");return t.pattern=e.pattern,t.flags=e.flags,t}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t,r=this.state.startLoc;this.next(),this.expressionScope.enter(new ut(1));let n=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let s,a,o=this.state.startLoc,u=[],l=new dt,c=!0;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,null===l.optionalParametersLoc?null:l.optionalParametersLoc),this.match(11)){a=this.state.startLoc;break}if(this.match(21)){let e=this.state.startLoc;if(s=this.state.startLoc,u.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else u.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let p=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=i;let d=this.startNodeAt(r);return e&&this.shouldParseArrow(u)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,u,!1),d):(this.expressionScope.exit(),u.length||this.unexpected(this.state.lastTokStartLoc),a&&this.unexpected(a),s&&this.unexpected(s),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(u,!0),u.length>1?(t=this.startNodeAt(o),t.expressions=u,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,p)):t=u[0],this.wrapParenthesis(r,t))}wrapParenthesis(e,t){if(!this.options.createParenthesizedExpressions)return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let r=this.startNodeAt(e);return r.expression=t,this.finishNode(r,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let r=this.parseMetaProperty(e,t,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(b.UnexpectedNewTarget,{at:r}),r}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){e.callee=this.parseNoCallExpr(),"Import"===e.callee.type&&this.raise(b.ImportCallNotNewExpression,{at:e.callee})}parseTemplateElement(e){let{start:t,startLoc:r,end:n,value:s}=this.state,a=t+1,o=this.startNodeAt(i(r,1));null===s&&(e||this.raise(b.InvalidEscapeSequenceTemplate,{at:i(this.state.firstInvalidTemplateEscapePos,1)}));let u=this.match(24),l=u?-1:-2,c=n+l;o.value={raw:this.input.slice(a,c).replace(/\r\n?/g,"\n"),cooked:null===s?null:s.slice(1,l)},o.tail=u,this.next();let p=this.finishNode(o,"TemplateElement");return this.resetEndLocation(p,i(this.state.lastTokEndLoc,l)),p}parseTemplate(e){let t=this.startNode();t.expressions=[];let r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)t.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),t.quasis.push(r=this.parseTemplateElement(e));return this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=Object.create(null),a=!0,o=this.startNode();for(o.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(o);break}let i;t?i=this.parseBindingProperty():(i=this.parsePropertyDefinition(n),this.checkProto(i,r,s,n)),r&&!this.isObjectProperty(i)&&"SpreadElement"!==i.type&&this.raise(b.InvalidRecordProperty,{at:i}),i.shorthand&&this.addExtra(i,"shorthand",!0),o.properties.push(i)}this.next(),this.state.inFSharpPipelineDirectBody=i;let u="ObjectExpression";return t?u="ObjectPattern":r&&(u="RecordExpression"),this.finishNode(o,u)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStart),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(b.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)t.push(this.parseDecorator());let r,n=this.startNode(),i=!1,s=!1;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,e&&(r=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let o=this.state.containsEsc,u=this.parsePropertyName(n,e);if(!a&&!o&&this.maybeAsyncOrAccessorProp(n)){let e=u.name;"async"===e&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),("get"===e||"set"===e)&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=e,this.match(55)&&(a=!0,this.raise(b.AccessorIsGenerator,{at:this.state.curPosition(),kind:e}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,r,a,i,!1,s,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;let r=this.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e);n.length!==r&&this.raise("get"===e.kind?b.BadGetterArity:b.BadSetterArity,{at:e}),"set"===e.kind&&"RestElement"===(null==(t=n[n.length-1])?void 0:t.type)&&this.raise(b.BadSetterRestParameter,{at:e})}parseObjectMethod(e,t,r,n,i){if(i){let r=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(r),r}if(r||t||this.match(10))return n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,r,n){if(e.shorthand=!1,this.eat(14))return e.value=r?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(n),this.finishNode(e,"ObjectProperty");if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),r)e.value=this.parseMaybeDefault(t,mt(e.key));else if(this.match(29)){let r=this.state.startLoc;null!=n?null===n.shorthandAssignLoc&&(n.shorthandAssignLoc=r):this.raise(b.InvalidCoverInitializedName,{at:r}),e.value=this.parseMaybeDefault(t,mt(e.key))}else e.value=mt(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,t,r,n,i,s,a){let o=this.parseObjectMethod(e,r,n,i,s)||this.parseObjectProperty(e,t,i,a);return o||this.unexpected(),o}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let r,{type:n,value:i}=this.state;if(J(n))r=this.parseIdentifier(!0);else switch(n){case 132:r=this.parseNumericLiteral(i);break;case 131:r=this.parseStringLiteral(i);break;case 133:r=this.parseBigIntLiteral(i);break;case 134:r=this.parseDecimalLiteral(i);break;case 136:{let e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(b.UnexpectedPrivateField,{at:e}),r=this.parsePrivateName();break}default:this.unexpected()}e.key=r,136!==n&&(e.computed=!1)}return e.key}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,r,n,i,s,a=!1){this.initFunction(e,r),e.generator=t,this.scope.enter(18|(a?be:0)|(i?32:0)),this.prodParam.enter(ct(r,e.generator)),this.parseFunctionParams(e,n);let o=this.parseFunctionBodyAndFinish(e,s,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!r,n,s),this.state.inFSharpPipelineDirectBody=i,this.finishNode(s,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,n){this.scope.enter(6);let i=ct(r,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,r);let s=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=s,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){this.toAssignableList(t,r,!1),e.params=t}parseFunctionBodyAndFinish(e,t,r=!1){return this.parseFunctionBody(e,!1,r),this.finishNode(e,t)}parseFunctionBody(e,t,r=!1){let n=t&&!this.match(5);if(this.expressionScope.enter(lt()),n)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let n=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(i=>{let s=!this.isSimpleParamList(e.params);i&&s&&this.raise(b.IllegalLanguageModeDirective,{at:"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:e.key.loc.end});let a=!n&&this.state.strict;this.checkParams(e,!(this.state.strict||t||r||s),t,a),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,a)})),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,r=e.length;t<r;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,r,n=!0){let i=!t&&new Set,s={type:"FormalParameters"};for(let t of e.params)this.checkLVal(t,{in:s,binding:5,checkClashes:i,strictModeChanged:n})}parseExprList(e,t,r,n){let i=[],s=!0;for(;!this.eat(e);){if(s)s=!1;else if(this.expect(12),this.match(e)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}i.push(this.parseExprListItem(t,r))}return i}parseExprListItem(e,t,r){let n;if(this.match(12))e||this.raise(b.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),n=null;else if(this.match(21)){let e=this.state.startLoc;n=this.parseParenItem(this.parseSpread(t),e)}else if(this.match(17)){this.expectPlugin("partialApplication"),r||this.raise(b.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});let e=this.startNode();this.next(),n=this.finishNode(e,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return n}parseIdentifier(e){let t=this.startNode(),r=this.parseIdentifierName(e);return this.createIdentifier(t,r)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}parseIdentifierName(e){let t,{startLoc:r,type:n}=this.state;J(n)?t=this.state.value:this.unexpected();let i=n<=92;return e?i&&this.replaceToken(130):this.checkReservedWord(t,r,i,!1),this.next(),t}checkReservedWord(e,t,r,n){var i;if(!(e.length>10)&&(i=e,xe.has(i)))if(r&&function(e){return pe.has(e)}(e))this.raise(b.UnexpectedKeyword,{at:t,keyword:e});else if((this.state.strict?n?ge:me:fe)(e,this.inModule))this.raise(b.UnexpectedReservedWord,{at:t,reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(b.YieldBindingIdentifier,{at:t})}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(b.AwaitBindingIdentifier,{at:t});if(this.scope.inStaticBlock)return void this.raise(b.AwaitBindingIdentifierInStaticBlock,{at:t});this.expressionScope.recordAsyncArrowParametersError({at:t})}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(b.ArgumentsInClass,{at:t})}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(b.AwaitExpressionFormalParameter,{at:t}),this.eat(55)&&this.raise(b.ObsoleteAwaitStar,{at:t}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return 53===e||10===e||0===e||Q(e)||101===e&&!this.state.containsEsc||135===e||56===e||this.hasPlugin("v8intrinsic")&&54===e}parseYield(){let e=this.startNode();this.expressionScope.recordParameterInitializerError(b.YieldInParameter,{at:e}),this.next();let t=!1,r=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(55),this.state.type){case 13:case 137:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:r=this.parseMaybeAssign()}return e.delegate=t,e.argument=r,this.finishNode(e,"YieldExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===e.type&&this.raise(b.PipelineHeadSequenceExpression,{at:t})}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let r=this.startNodeAt(t);return r.callee=e,this.finishNode(r,"PipelineBareFunction")}{let r=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=e,this.finishNode(r,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(b.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipelineTopicUnused,{at:e})}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return e();{let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=r,n}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let r=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{r()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}},Ht={kind:"loop"},zt={kind:"switch"},Gt=/[\uD800-\uDFFF]/u,Yt=/in(?:stanceof)?/y;var Qt=class extends Xt{parseTopLevel(e,t){return e.program=this.parseProgram(t),e.comments=this.state.comments,this.options.tokens&&(e.tokens=function(e,t){for(let r=0;r<e.length;r++){let n=e[r],{type:s}=n;if("number"==typeof s){if(136===s){let{loc:t,start:s,value:a,end:o}=n,u=s+1,l=i(t.start,1);e.splice(r,1,new st({type:Z(27),value:"#",start:s,end:u,startLoc:t.start,endLoc:l}),new st({type:Z(130),value:a,start:u,end:o,startLoc:l,endLoc:t.end})),r++;continue}if(Q(s)){let a,o,u,l,c,{loc:p,start:d,value:h,end:f}=n,m=d+1,y=i(p.start,1);a=96===t.charCodeAt(d)?new st({type:Z(22),value:"`",start:d,end:m,startLoc:p.start,endLoc:y}):new st({type:Z(8),value:"}",start:d,end:m,startLoc:p.start,endLoc:y}),24===s?(u=f-1,l=i(p.end,-1),o=null===h?null:h.slice(1,-1),c=new st({type:Z(22),value:"`",start:u,end:f,startLoc:l,endLoc:p.end})):(u=f-2,l=i(p.end,-2),o=null===h?null:h.slice(1,-2),c=new st({type:Z(23),value:"${",start:u,end:f,startLoc:l,endLoc:p.end})),e.splice(r,1,a,new st({type:Z(20),value:o,start:m,end:u,startLoc:y,endLoc:l}),c),r+=2;continue}n.type=Z(s)}}return e}(this.tokens,this.input)),this.finishNode(e,"File")}parseProgram(e,t=137,r=this.options.sourceType){if(e.sourceType=r,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[e,t]of Array.from(this.scope.undefinedExports))this.raise(b.ModuleExportUndefined,{at:t,localName:e});let n;return n=137===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",i(this.state.startLoc,-1)),n}stmtToDirective(e){let t=e;t.type="Directive",t.value=t.expression,delete t.expression;let r=t.value,n=r.value,i=this.input.slice(r.start,r.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),this.addExtra(r,"expressionValue",n),r.type="DirectiveLiteral",t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(99)&&this.hasFollowingBindingAtom()}chStartsBindingIdentifier(e,t){if(oe(e)){if(Yt.lastIndex=t,Yt.test(this.input)){let e=this.codePointAtPos(Yt.lastIndex);if(!ue(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifier(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}startsUsingForOf(){let{type:e,containsEsc:t}=this.lookahead();return!(101===e&&!t)&&(K(e)&&!this.hasFollowingLineBreak()?(this.expectPlugin("explicitResourceManagement"),!0):void 0)}startsAwaitUsing(){let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let r=this.state.type,n=this.startNode(),i=!!(2&e),s=!!(4&e),a=1&e;switch(r){case 60:return this.parseBreakContinueStatement(n,!0);case 63:return this.parseBreakContinueStatement(n,!1);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoWhileStatement(n);case 91:return this.parseForStatement(n);case 68:if(46===this.lookaheadCharCode())break;return s||this.raise(this.state.strict?b.StrictFunction:this.options.annexB?b.SloppyFunctionAnnexB:b.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(n,!1,!i&&s);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,n),!0);case 69:return this.parseIfStatement(n);case 70:return this.parseReturnStatement(n);case 71:return this.parseSwitchStatement(n);case 72:return this.parseThrowStatement(n);case 73:return this.parseTryStatement(n);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?i||this.raise(b.UnexpectedLexicalDeclaration,{at:n}):this.raise(b.AwaitUsingNotInAsyncContext,{at:n}),this.next(),this.parseVarStatement(n,"await using");break;case 105:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(b.UnexpectedUsingDeclaration,{at:this.state.startLoc}):i||this.raise(b.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(n,"using");case 99:{if(this.state.containsEsc)break;let e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(t,e)&&123!==t))break}case 75:i||this.raise(b.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let e=this.state.value;return this.parseVarStatement(n,e)}case 92:return this.parseWhileStatement(n);case 76:return this.parseWithStatement(n);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(n);case 83:{let e=this.lookaheadCharCode();if(40===e||46===e)break}case 82:{let e;return!this.options.allowImportExportEverywhere&&!a&&this.raise(b.UnexpectedImportExport,{at:this.state.startLoc}),this.next(),83===r?(e=this.parseImport(n),"ImportDeclaration"===e.type&&(!e.importKind||"value"===e.importKind)&&(this.sawUnambiguousESM=!0)):(e=this.parseExport(n,t),("ExportNamedDeclaration"===e.type&&(!e.exportKind||"value"===e.exportKind)||"ExportAllDeclaration"===e.type&&(!e.exportKind||"value"===e.exportKind)||"ExportDefaultDeclaration"===e.type)&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return i||this.raise(b.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(n,!0,!i&&s)}let o=this.state.value,u=this.parseExpression();return K(r)&&"Identifier"===u.type&&this.eat(14)?this.parseLabeledStatement(n,o,u,e):this.parseExpressionStatement(n,u,t)}assertModuleNodeAllowed(e){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(b.ImportOutsideModule,{at:e})}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(e,t,r){return e&&(t.decorators&&t.decorators.length>0?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(b.DecoratorsBeforeAfterExport,{at:t.decorators[0]}),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),r&&this.resetStartLocationFromNode(r,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do{t.push(this.parseDecorator())}while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(b.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(b.UnexpectedLeadingDecorator,{at:this.state.startLoc});return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t,r=this.state.startLoc;if(this.match(10)){let r=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(r,t);let n=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(t),!1===this.getPluginOption("decorators","allowCallParenthesized")&&e.expression!==t&&this.raise(b.DecoratorArgumentsOutsideParentheses,{at:n})}else{for(t=this.parseIdentifier(!1);this.eat(16);){let e=this.startNodeAt(r);e.object=t,this.match(136)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,t=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e){if(this.eat(10)){let t=this.startNodeAtNode(e);return t.callee=e,t.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(t.arguments),this.finishNode(t,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let r;for(r=0;r<this.state.labels.length;++r){let n=this.state.labels[r];if((null==e.label||n.name===e.label.name)&&(null!=n.kind&&(t||"loop"===n.kind)||e.label&&t))break}if(r===this.state.labels.length){let r=t?"BreakStatement":"ContinueStatement";this.raise(b.IllegalBreakContinue,{at:e,type:r})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(Ht),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Ht);let t=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(t=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return null!==t&&this.unexpected(t),this.parseFor(e,null);let r=this.isContextual(99);{let n=this.isContextual(96)&&this.startsAwaitUsing(),i=n||this.isContextual(105)&&this.startsUsingForOf(),s=r&&this.hasFollowingBindingAtom()||i;if(this.match(74)||this.match(75)||s){let r,s=this.startNode();n?(r="await using",this.isAwaitAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,{at:this.state.startLoc}),this.next()):r=this.state.value,this.next(),this.parseVar(s,!0,r);let a=this.finishNode(s,"VariableDeclaration"),o=this.match(58);return o&&i&&this.raise(b.ForInUsing,{at:a}),(o||this.isContextual(101))&&1===a.declarations.length?this.parseForIn(e,a,t):(null!==t&&this.unexpected(t),this.parseFor(e,a))}}let n=this.isContextual(95),i=new dt,s=this.parseExpression(!0,i),a=this.isContextual(101);if(a&&(r&&this.raise(b.ForOfLet,{at:s}),null===t&&n&&"Identifier"===s.type&&this.raise(b.ForOfAsync,{at:s})),a||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(s,!0);let r=a?"ForOfStatement":"ForInStatement";return this.checkLVal(s,{in:{type:r}}),this.parseForIn(e,s,t)}return this.checkExpressionErrors(i,!0),null!==t&&this.unexpected(t),this.parseFor(e,s)}parseFunctionStatement(e,t,r){return this.next(),this.parseFunction(e,1|(r?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(b.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t,r=e.cases=[];this.expect(5),this.state.labels.push(zt),this.scope.enter(0);for(let e;!this.match(8);)if(this.match(61)||this.match(65)){let n=this.match(61);t&&this.finishNode(t,"SwitchCase"),r.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(e&&this.raise(b.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),e=!0,t.test=null),this.expect(14)}else t?t.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(b.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{in:{type:"CatchClause"},binding:9}),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(b.NoCatchOrFinally,{at:e}),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,r=!1){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Ht),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(b.StrictWith,{at:this.state.startLoc}),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,r,n){for(let e of this.state.labels)e.name===t&&this.raise(b.LabelRedeclaration,{at:r,labelName:t});let i=(s=this.state.type)>=90&&s<=92?"loop":this.match(71)?"switch":null;var s;for(let t=this.state.labels.length-1;t>=0;t--){let r=this.state.labels[t];if(r.statementStart!==e.start)break;r.statementStart=this.state.start,r.kind=i}return this.state.labels.push({name:t,kind:i,statementStart:this.state.start}),e.body=8&n?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,r){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,r){let n=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,8,r),t&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,n,i){let s=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(s,t?a:void 0,r,n,i)}parseBlockOrModuleBlockBody(e,t,r,n,i){let s=this.state.strict,a=!1,o=!1;for(;!this.match(n);){let n=r?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(n)){let e=this.stmtToDirective(n);t.push(e),!a&&"use strict"===e.value.value&&(a=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(n)}null==i||i.call(this,a),s||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,r){let n=this.match(58);return this.next(),n?null!==r&&this.unexpected(r):e.await=null!==r,"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||!this.options.annexB||this.state.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(b.ForInOfLoopInitializer,{at:t,type:n?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(b.InvalidLhs,{at:t,ancestor:{type:"ForStatement"}}),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")}parseVar(e,t,r,n=!1){let i=e.declarations=[];for(e.kind=r;;){let e=this.startNode();if(this.parseVarId(e,r),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null===e.init&&!n&&("Identifier"===e.id.type||t&&(this.match(58)||this.isContextual(101))?"const"===r&&!(this.match(58)||this.isContextual(101))&&this.raise(b.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"}):this.raise(b.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"})),i.push(this.finishNode(e,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){let r=this.parseBindingAtom();this.checkLVal(r,{in:{type:"VariableDeclarator"},binding:"var"===t?5:we}),e.id=r}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let r=2&t,n=!!(1&t),i=n&&!(4&t),s=!!(8&t);this.initFunction(e,s),this.match(55)&&(r&&this.raise(b.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),e.generator=!0),n&&(e.id=this.parseFunctionId(i));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ct(s,e.generator)),n||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,n?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),n&&!r&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=a,e}parseFunctionId(e){return e||K(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(new ot(3)),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:we:17,e.id.loc.start)}parseClass(e,t,r){this.next();let n=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,r),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,n),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)}parseClassBody(e,t){this.classScope.enter();let r={hadConstructor:!1,hadSuperClass:e},n=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(8);){if(this.eat(13)){if(n.length>0)throw this.raise(b.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){n.push(this.parseDecorator());continue}let e=this.startNode();n.length&&(e.decorators=n,this.resetStartLocationFromNode(e,n[0]),n=[]),this.parseClassMember(i,e,r),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(b.DecoratorConstructor,{at:e})}})),this.state.strict=t,this.next(),n.length)throw this.raise(b.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(e,t){let r=this.parseIdentifier(!0);if(this.isClassMethod()){let n=t;return n.kind="method",n.computed=!1,n.key=r,n.static=!1,this.pushClassMethod(e,n,!1,!1,!1,!1),!0}if(this.isClassProperty()){let n=t;return n.computed=!1,n.key=r,n.static=!1,e.body.push(this.parseClassProperty(n)),!0}return this.resetPreviousNodeTrailingComments(r),!1}parseClassMember(e,t,r){let n=this.isContextual(104);if(n){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,r,n)}parseClassMemberWithIsStatic(e,t,r,n){let i=t,s=t,a=t,o=t,u=t,l=i,c=i;if(t.static=n,this.parsePropertyNamePrefixOperator(t),this.eat(55)){l.kind="method";let t=this.match(136);return this.parseClassElementName(l),t?void this.pushClassPrivateMethod(e,s,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsGenerator,{at:i.key}),void this.pushClassMethod(e,i,!0,!1,!1,!1))}let p=K(this.state.type)&&!this.state.containsEsc,d=this.match(136),h=this.parseClassElementName(t),f=this.state.startLoc;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(l.kind="method",d)return void this.pushClassPrivateMethod(e,s,!1,!1);let n=this.isNonstaticConstructor(i),a=!1;n&&(i.kind="constructor",r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(b.DuplicateConstructor,{at:h}),n&&this.hasPlugin("typescript")&&t.override&&this.raise(b.OverrideOnConstructor,{at:h}),r.hadConstructor=!0,a=r.hadSuperClass),this.pushClassMethod(e,i,!1,!1,n,a)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a);else if(p&&"async"===h.name&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(h);let t=this.eat(55);c.optional&&this.unexpected(f),l.kind="method";let r=this.match(136);this.parseClassElementName(l),this.parsePostMemberNameModifiers(c),r?this.pushClassPrivateMethod(e,s,t,!0):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAsync,{at:i.key}),this.pushClassMethod(e,i,t,!0,!1,!1))}else if(!p||"get"!==h.name&&"set"!==h.name||this.match(55)&&this.isLineTerminator())if(p&&"accessor"===h.name&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(h);let t=this.match(136);this.parseClassElementName(a),this.pushClassAccessorProperty(e,u,t)}else this.isLineTerminator()?d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a):this.unexpected();else{this.resetPreviousNodeTrailingComments(h),l.kind=h.name;let t=this.match(136);this.parseClassElementName(i),t?this.pushClassPrivateMethod(e,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAccessor,{at:i.key}),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}}parseClassElementName(e){let{type:t,value:r}=this.state;if((130===t||131===t)&&e.static&&"prototype"===r&&this.raise(b.StaticPrototype,{at:this.state.startLoc}),136===t){"constructor"===r&&this.raise(b.ConstructorClassPrivateField,{at:this.state.startLoc});let t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e)}parseClassStaticBlock(e,t){var r;this.scope.enter(208);let n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,e.body.push(this.finishNode(t,"StaticBlock")),null!=(r=t.decorators)&&r.length&&this.raise(b.DecoratorStaticBlock,{at:t})}pushClassProperty(e,t){!t.computed&&("constructor"===t.key.name||"constructor"===t.key.value)&&this.raise(b.ConstructorClassField,{at:t.key}),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let r=this.parseClassPrivateProperty(t);e.body.push(r),this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassAccessorProperty(e,t,r){if(!r&&!t.computed){let e=t.key;("constructor"===e.name||"constructor"===e.value)&&this.raise(b.ConstructorClassField,{at:e})}let n=this.parseClassAccessorProperty(t);e.body.push(n),r&&this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassMethod(e,t,r,n,i,s){e.body.push(this.parseMethod(t,r,n,i,s,"ClassMethod",!0))}pushClassPrivateMethod(e,t,r,n){let i=this.parseMethod(t,r,n,!1,!1,"ClassPrivateMethod",!0);e.body.push(i);let s="get"===i.kind?i.static?6:2:"set"===i.kind?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,s)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(lt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,r,n=8331){if(K(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,n);else{if(!r&&t)throw this.raise(b.MissingClassName,{at:this.state.startLoc});e.id=null}}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let r=this.parseMaybeImportPhase(e,!0),n=this.maybeParseExportDefaultSpecifier(e,r),i=!n||this.eat(12),s=i&&this.eatExportStar(e),a=s&&this.maybeParseExportNamespaceSpecifier(e),o=i&&(!a||this.eat(12)),u=n||s;if(s&&!a){if(n&&this.unexpected(),t)throw this.raise(b.UnsupportedDecoratorExport,{at:e});return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}let l,c=this.maybeParseExportNamedSpecifiers(e);if(n&&i&&!s&&!c&&this.unexpected(null,5),a&&o&&this.unexpected(null,97),u||c){if(l=!1,t)throw this.raise(b.UnsupportedDecoratorExport,{at:e});this.parseExportFrom(e,u)}else l=this.maybeParseExportDeclaration(e);if(u||c||l){var p;let r=e;if(this.checkExport(r,!0,!1,!!r.source),"ClassDeclaration"===(null==(p=r.declaration)?void 0:p.type))this.maybeTakeDecorators(t,r.declaration,r);else if(t)throw this.raise(b.UnsupportedDecoratorExport,{at:e});return this.finishNode(r,"ExportNamedDeclaration")}if(this.eat(65)){let r=e,n=this.parseExportDefaultExpression();if(r.declaration=n,"ClassDeclaration"===n.type)this.maybeTakeDecorators(t,n,r);else if(t)throw this.raise(b.UnsupportedDecoratorExport,{at:e});return this.checkExport(r,!0,!0),this.finishNode(r,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==t?void 0:t.loc.start);let r=t||this.parseIdentifier(!0),n=this.startNodeAtNode(r);return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){e.specifiers||(e.specifiers=[]);let t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){e.specifiers||(e.specifiers=[]);let t="type"===e.exportKind;return e.specifiers.push(...this.parseExportSpecifiers(t)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(b.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(b.UnsupportedDefaultExport,{at:this.state.startLoc});let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(K(e)){if(95===e&&!this.state.containsEsc||99===e)return!1;if((128===e||127===e)&&!this.state.containsEsc){let{type:e}=this.lookahead();if(K(e)&&97!==e||5===e)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),r=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||K(this.state.type)&&r)return!0;if(this.match(65)&&r){let e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){this.eatContextual(97)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return 26===e&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(b.DecoratorBeforeExport,{at:this.state.startLoc}),!0):74===e||75===e||68===e||80===e||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,n){if(t)if(r){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var i;let t=e.declaration;"Identifier"===t.type&&"from"===t.name&&t.end-t.start==4&&(null==(i=t.extra)||!i.parenthesized)&&this.raise(b.ExportDefaultFromAsIdentifier,{at:t})}}else if(e.specifiers&&e.specifiers.length)for(let t of e.specifiers){let{exported:e}=t,r="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,r),!n&&t.local){let{local:e}=t;"Identifier"!==e.type?this.raise(b.ExportBindingIsString,{at:t,localName:e.value,exportName:r}):(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type){let t=e.declaration.id;if(!t)throw new Error("Assertion failure");this.checkDuplicateExports(e,t.name)}else if("VariableDeclaration"===e.declaration.type)for(let t of e.declaration.declarations)this.checkDeclaration(t.id)}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(let t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(let t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(b.DuplicateDefaultExport,{at:e}):this.raise(b.DuplicateExport,{at:e,exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else if(this.expect(12),this.eat(8))break;let n=this.isContextual(128),i=this.match(131),s=this.startNode();s.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(s,i,e,n))}return t}parseExportSpecifier(e,t,r,n){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=yt(e.local):e.exported||(e.exported=mt(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){let e=this.parseStringLiteral(this.state.value),t=e.value.match(Gt);return t&&this.raise(b.ModuleExportNameHasLoneSurrogate,{at:e,surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return null!=e.assertions&&e.assertions.some((({key:e,value:t})=>"json"===t.value&&("Identifier"===e.type?"type"===e.name:"type"===e.value)))}checkImportReflection(e){var t;e.module&&((1!==e.specifiers.length||"ImportDefaultSpecifier"!==e.specifiers[0].type)&&this.raise(b.ImportReflectionNotBinding,{at:e.specifiers[0].loc.start}),(null==(t=e.assertions)?void 0:t.length)>0&&this.raise(b.ImportReflectionHasAssertion,{at:e.specifiers[0].loc.start}))}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&"ExportAllDeclaration"!==e.type){let{specifiers:t}=e;if(null!=t){let e=t.find((e=>{let t;if("ExportSpecifier"===e.type?t=e.local:"ImportSpecifier"===e.type&&(t=e.imported),void 0!==t)return"Identifier"===t.type?"default"!==t.name:"default"!==t.value}));void 0!==e&&this.raise(b.ImportJSONBindingNotDefault,{at:e.loc.start})}}}isPotentialImportPhase(e){return!e&&this.isContextual(125)}applyImportPhase(e,t,r,n){t||("module"===r?(this.expectPlugin("importReflection",n),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let r=this.parseIdentifier(!0),{type:n}=this.state;return(J(n)?97!==n||102===this.lookaheadCharCode():12!==n)?(this.resetPreviousIdentifierLeadingComments(r),this.applyImportPhase(e,t,r.name,r.loc.start),null):(this.applyImportPhase(e,t,null),r)}isPrecedingIdImportPhase(e){let{type:t}=this.state;return K(t)?97!==t||102===this.lookaheadCharCode():12!==t}parseImport(e){return this.match(131)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let r=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(e);return r&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual(97),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return null!=e.specifiers||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,r){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(e,t,r=we){return this.checkLVal(e.local,{in:{type:t},binding:r}),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let r=this.startNode(),n=this.state.value;if(t.has(n)&&this.raise(b.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:n}),t.add(n),this.match(131)?r.key=this.parseStringLiteral(n):r.key=this.parseIdentifier(!0),this.expect(14),!this.match(131))throw this.raise(b.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let r=this.startNode();if(r.key=this.parseIdentifier(!0),"type"!==r.key.name&&this.raise(b.ModuleAttributeDifferentFromType,{at:r.key}),t.has(r.key.name)&&this.raise(b.ModuleAttributesWithDuplicateKeys,{at:r.key,key:r.key.name}),t.add(r.key.name),this.expect(14),!this.match(131))throw this.raise(b.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t,r=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?t=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),t=this.parseImportAttributes()),r=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(!0!==this.getPluginOption("importAttributes","deprecatedAssertSyntax")&&this.raise(b.ImportAttributesUseAssert,{at:this.state.startLoc}),this.addExtra(e,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),t=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))t=[];else{if(!this.hasPlugin("moduleAttributes"))return;t=[]}!r&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishImportSpecifier(r,"ImportDefaultSpecifier")),!0}return!!J(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(b.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let r=this.startNode(),n=this.match(131),i=this.isContextual(128);r.imported=this.parseModuleExportName();let s=this.parseImportSpecifier(r,n,"type"===e.importKind||"typeof"===e.importKind,i,void 0);e.specifiers.push(s)}}parseImportSpecifier(e,t,r,n,i){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:r}=e;if(t)throw this.raise(b.ImportBindingIsString,{at:e,importName:r.value});this.checkReservedWord(r.name,e.loc.start,!0,!0),e.local||(e.local=mt(r))}return this.finishImportSpecifier(e,"ImportSpecifier",i)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}},Zt=class extends Qt{constructor(e,t){e=function(e){if(e&&null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let r of Object.keys(Wt))t[r]=e&&null!=e[r]?e[r]:Wt[r];return t}(e),super(e,t),this.options=e,this.initializeScopes(),this.plugins=function(e){let t=new Map;for(let r of e){let[e,n]=Array.isArray(r)?r:[r,{}];t.has(e)||t.set(e,n||{})}return t}(this.options.plugins),this.filename=e.sourceFilename}getScopeHandler(){return Ne}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e}};var er=function(e){let t={};for(let r of Object.keys(e))t[r]=Z(e[r]);return t}(q);function tr(e,t){let r=Zt;return null!=e&&e.plugins&&(function(e){if(Rt(e,"decorators")){if(Rt(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=Ut(e,"decorators","decoratorsBeforeExport");if(null!=t&&"boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let r=Ut(e,"decorators","allowCallParenthesized");if(null!=r&&"boolean"!=typeof r)throw new Error("'allowCallParenthesized' must be a boolean.")}if(Rt(e,"flow")&&Rt(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Rt(e,"placeholders")&&Rt(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Rt(e,"pipelineOperator")){let t=Ut(e,"pipelineOperator","proposal");if(!$t.includes(t)){let e=$t.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}let r=Rt(e,["recordAndTuple",{syntaxType:"hash"}]);if("hack"===t){if(Rt(e,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Rt(e,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let t=Ut(e,"pipelineOperator","topicToken");if(!Vt.includes(t)){let e=Vt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}if("#"===t&&r)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if("smart"===t&&r)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(Rt(e,"moduleAttributes")){if(Rt(e,"importAssertions")||Rt(e,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if("may-2020"!==Ut(e,"moduleAttributes","version"))throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Rt(e,"importAssertions")&&Rt(e,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Rt(e,"recordAndTuple")&&null!=Ut(e,"recordAndTuple","syntaxType")&&!qt.includes(Ut(e,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+qt.map((e=>`'${e}'`)).join(", "));if(Rt(e,"asyncDoExpressions")&&!Rt(e,"doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}}(e.plugins),r=function(e){let t=Jt.filter((t=>Rt(e,t))),r=t.join("/"),n=rr[r];if(!n){n=Zt;for(let e of t)n=Kt[e](n);rr[r]=n}return n}(e.plugins)),new r(e,t)}var rr={};e.parse=function(e,t){var r;if("unambiguous"!==(null==(r=t)?void 0:r.sourceType))return tr(t,e).parse();t=Object.assign({},t);try{t.sourceType="module";let r=tr(t,e),n=r.parse();if(r.sawUnambiguousESM)return n;if(r.ambiguousScriptDifferentAst)try{return t.sourceType="script",tr(t,e).parse()}catch{}else n.program.sourceType="script";return n}catch(r){try{return t.sourceType="script",tr(t,e).parse()}catch{}throw r}},e.parseExpression=function(e,t){let r=tr(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()},e.tokTypes=er})),R5=M5((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(e){let t=e.match(n);return t?t[0].trimLeft():""},e.parse=function(e){return c(e).pragmas},e.parseWithComments=c,e.print=function({comments:e="",pragmas:t={}}){let r="\n",n=" *",i=Object.keys(t),s=i.map((e=>p(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n} ${e}${r}`)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){let e=t[i[0]];return`/** ${p(i[0],e)[0]} */`}}let a=e.split(r).map((e=>`${n} ${e}`)).join(r)+r;return"/**\n"+(e?a:"")+(e&&i.length?n+r:"")+s+" */"},e.strip=function(e){let t=e.match(n);return t&&t[0]?e.substring(t[0].length):e};var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,a=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,o=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,u=/(\r?\n|^) *\* ?/g,l=[];function c(e){e=e.replace(r,"").replace(t,"").replace(u,"$1");let n="";for(;n!==e;)n=e,e=e.replace(a,"\n$1 $2\n");e=e.replace(s,"").trimRight();let c,p=Object.create(null),d=e.replace(o,"").replace(s,"").trimRight();for(;c=o.exec(e);){let e=c[2].replace(i,"");"string"==typeof p[c[1]]||Array.isArray(p[c[1]])?p[c[1]]=l.concat(p[c[1]],e):p[c[1]]=e}return{comments:d,pragmas:p}}function p(e,t){return l.concat(t).map((t=>`@${e} ${t}`.trim()))}})),U5={};((e,t)=>{for(var r in t)N5(e,r,{get:t[r],enumerable:!0})})(U5,{parsers:()=>R8});var $5=B5(j5(),1);var V5=function(e){let t=[];for(let r of e)try{return r()}catch(e){t.push(e)}throw Object.assign(new Error("All combinations failed"),{errors:t})};var q5=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};var K5=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var J5=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};function W5(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var X5=W5(" \t"),H5=W5(/[^\n\r]/);var z5=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?H5(e,t):t)};var G5=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=X5(e,n),n=K5(e,n),n=z5(e,n),n=J5(e,n);return n},Y5=B5(R5(),1);function Q5(e){let{pragmas:t}=function(e){let t=q5(e);t&&(e=e.slice(t.length+1));let r=(0,Y5.extract)(e),{pragmas:n,comments:i}=(0,Y5.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}var Z5=function(e){return Array.isArray(e)&&e.length>0};function e8(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return Z5(n)?Math.min(e8(n[0]),r):r}function t8(e){return e.range?e.range[1]:e.end}var r8=function(e){return e="function"==typeof e?{parse:e}:e,{astFormat:"estree",hasPragma:Q5,locStart:e8,locEnd:t8,...e}};var n8=function(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)};var i8=function(e){let{message:t,loc:r}=e;return n8(t.replace(/ \(.*\)$/,""),{loc:{start:{line:r?r.line:0,column:r?r.column+1:0}},cause:e})},s8=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)};var a8=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)}(["Block","CommentBlock","MultiLine"]);var o8=function(e){return a8(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};var u8=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))},l8=null;function c8(e){if(null!==l8&&(l8.property,1)){let e=l8;return l8=c8.prototype=null,e}return l8=c8.prototype=e??Object.create(null),new c8}for(let e=0;e<=10;e++)c8();var p8=function(e,t="type"){return function(e){c8(e)}(e),function(r){let n=r[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}}({ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[]});var d8=function e(t,r){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t)){for(let n=0;n<t.length;n++)t[n]=e(t[n],r);return t}let n=p8(t);for(let i=0;i<n.length;i++)t[n[i]]=e(t[n[i]],r);return r(t)||t};function h8(e){return"LogicalExpression"===e.type&&"LogicalExpression"===e.right.type&&e.operator===e.right.operator}function f8(e){return h8(e)?f8({type:"LogicalExpression",operator:e.operator,left:f8({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[e8(e.left),t8(e.right.left)]}),right:e.right.right,range:[e8(e),t8(e)]}):e}var m8=function(e,t){let{parser:r,text:n}=t;if("File"===e.type&&e.program.interpreter){let{program:{interpreter:t},comments:r}=e;delete e.program.interpreter,r.unshift(t)}if("babel"===r){let t=new Set;e=d8(e,(e=>{var r;null!=(r=e.leadingComments)&&r.some(o8)&&t.add(e8(e))})),e=d8(e,(e=>{if("ParenthesizedExpression"===e.type){let{expression:r}=e;if("TypeCastExpression"===r.type)return r.range=e.range,r;let n=e8(e);if(!t.has(n))return r.extra={...r.extra,parenthesized:!0},r}}))}if(e=d8(e,(t=>{switch(t.type){case"LogicalExpression":if(h8(t))return f8(t);break;case"VariableDeclaration":{let e=s8(!1,t.declarations,-1);null!=e&&e.init&&function(e,t){";"!==n[t8(t)]&&(e.range=[e8(e),t8(t)])}(t,e);break}case"TSParenthesizedType":return t.typeAnnotation;case"TSTypeParameter":if("string"==typeof t.name){let e=e8(t);t.name={type:"Identifier",name:t.name,range:[e,e+t.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:e}=t;if("meriyah"===r&&"Identifier"===(null==e?void 0:e.type)){let r=n.slice(e8(e),t8(e));(r.startsWith('"')||r.startsWith("'"))&&(t.exported={...t.exported,type:"Literal",value:t.exported.name,raw:r})}break}case"TSUnionType":case"TSIntersectionType":if(1===t.types.length)return t.types[0]}})),Z5(e.comments)){let t=s8(!1,e.comments,-1);for(let r=e.comments.length-2;r>=0;r--){let n=e.comments[r];t8(n)===e8(t)&&a8(n)&&a8(t)&&u8(n)&&u8(t)&&(e.comments.splice(r+1,1),n.value+="*//*"+t.value,n.range=[e8(n),t8(t)]),t=n}}return"Program"===e.type&&(e.range=[0,n.length]),e};var y8=function(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}};var g8=function(e,t){let{type:r="JsExpressionRoot",rootMarker:n,text:i}=t,{tokens:s,comments:a}=e;return delete e.tokens,delete e.comments,{tokens:s,comments:a,type:r,node:e,range:[0,i.length],rootMarker:n}},x8=e=>r8(function({isExpression:e=!1,optionsCombinations:t}){return(r,n={})=>{if(("babel"===n.parser||"__babel_estree"===n.parser)&&function(e,t){var r;if(null!=(r=t.filepath)&&r.endsWith(".js.flow"))return!0;let n=q5(e);n&&(e=e.slice(n.length));let i=G5(e,0);return!1!==i&&(e=e.slice(0,i)),P8.test(e)}(r,n))return n.parser="babel-flow",N8.parse(r,n);let i=t;"script"===(n.__babelSourceType??y8(n))&&(i=i.map((e=>({...e,sourceType:"script"})))),/#[[{]/.test(r)&&(i=i.map((e=>v8([S8],e))));let s=/%[A-Z]/.test(r);r.includes("|>")?i=(s?[...E8,T8]:E8).flatMap((e=>i.map((t=>v8([e],t))))):s&&(i=i.map((e=>v8([T8],e))));let a,o=e?$5.parseExpression:$5.parse;try{a=V5(i.map((e=>()=>function(e,t,r){let n=e(t,r),i=n.errors.find((e=>!A8.has(e.reasonCode)));if(i)throw i;return n}(o,r,e))))}catch({errors:[e]}){throw i8(e)}return e&&(a=g8(a,{text:r,rootMarker:n.rootMarker})),m8(a,{parser:"babel",text:r})}}(e)),b8={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}]],tokens:!0,ranges:!0},S8=["recordAndTuple",{syntaxType:"hash"}],T8="v8intrinsic",E8=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],v8=(e,t=b8)=>({...t,plugins:[...t.plugins,...e]}),P8=/@(?:no)?flow\b/;var A8=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","MixedLabeledAndUnlabeledElements","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),D8=[v8(["jsx"])],C8=x8({optionsCombinations:D8}),w8=x8({optionsCombinations:[v8(["jsx","typescript"]),v8(["typescript"])]}),k8=x8({isExpression:!0,optionsCombinations:[v8(["jsx"])]}),I8=x8({isExpression:!0,optionsCombinations:[v8(["typescript"])]}),N8=x8({optionsCombinations:[v8(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),F8=x8({optionsCombinations:D8.map((e=>v8(["estree"],e)))}),_8={babel:C8,"babel-flow":N8,"babel-ts":w8,__js_expression:k8,__ts_expression:I8,__vue_expression:k8,__vue_ts_expression:I8,__vue_event_binding:C8,__vue_ts_event_binding:w8,__babel_estree:F8},O8=B5(j5(),1);function L8(e={}){let{allowComments:t=!0}=e;return function(e){let r;try{r=(0,O8.parseExpression)(e,{tokens:!0,ranges:!0})}catch(e){throw"MissingPlugin"===(null==e?void 0:e.reasonCode)||"MissingOneOfPlugins"===(null==e?void 0:e.reasonCode)?i8({message:"Unexpected token",loc:e.loc}):i8(e)}if(!t&&Z5(r.comments))throw M8(r.comments[0],"Comment");return B8(r),g8(r,{type:"JsonRoot",text:e})}}function M8(e,t){let[r,n]=[e.loc.start,e.loc.end].map((({line:e,column:t})=>({line:e,column:t+1})));return n8(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function B8(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)null!==t&&B8(t);return;case"ObjectExpression":for(let t of e.properties)B8(t);return;case"ObjectProperty":if(e.computed)throw M8(e.key,"Computed key");if(e.shorthand)throw M8(e.key,"Shorthand property");return"Identifier"!==e.key.type&&B8(e.key),void B8(e.value);case"UnaryExpression":{let{operator:t,argument:r}=e;if("+"!==t&&"-"!==t)throw M8(e,`Operator '${e.operator}'`);if("NumericLiteral"===r.type||"Identifier"===r.type&&("Infinity"===r.name||"NaN"===r.name))return;throw M8(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if("Infinity"!==e.name&&"NaN"!==e.name&&"undefined"!==e.name)throw M8(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(Z5(e.expressions))throw M8(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)B8(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw M8(e,`'${e.type}'`)}}var j8=L8(),R8={..._8,...{json:r8({parse:j8,hasPragma:()=>!0}),json5:r8(j8),"json-stringify":r8({parse:L8({allowComments:!1}),astFormat:"estree-json"})}},U8=U5,$8=Object.freeze({__proto__:null,default:U8,parsers:R8}),V8=Object.create,q8=Object.defineProperty,K8=Object.getOwnPropertyDescriptor,J8=Object.getOwnPropertyNames,W8=Object.getPrototypeOf,X8=Object.prototype.hasOwnProperty,H8=(e,t)=>{for(var r in t)q8(e,r,{get:t[r],enumerable:!0})},z8=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},G8=(e,t,r)=>(z8(e,t,"read from private field"),r?r.call(e):t.get(e)),Y8=((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(e){let t=e.match(n);return t?t[0].trimLeft():""},e.parse=function(e){return c(e).pragmas},e.parseWithComments=c,e.print=function({comments:e="",pragmas:t={}}){let r="\n",n=" *",i=Object.keys(t),s=i.map((e=>p(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n} ${e}${r}`)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){let e=t[i[0]];return`/** ${p(i[0],e)[0]} */`}}let a=e.split(r).map((e=>`${n} ${e}`)).join(r)+r;return"/**\n"+(e?a:"")+(e&&i.length?n+r:"")+s+" */"},e.strip=function(e){let t=e.match(n);return t&&t[0]?e.substring(t[0].length):e};var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,a=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,o=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,u=/(\r?\n|^) *\* ?/g,l=[];function c(e){e=e.replace(r,"").replace(t,"").replace(u,"$1");let n="";for(;n!==e;)n=e,e=e.replace(a,"\n$1 $2\n");e=e.replace(s,"").trimRight();let c,p=Object.create(null),d=e.replace(o,"").replace(s,"").trimRight();for(;c=o.exec(e);){let e=c[2].replace(i,"");"string"==typeof p[c[1]]||Array.isArray(p[c[1]])?p[c[1]]=l.concat(p[c[1]],e):p[c[1]]=e}return{comments:d,pragmas:p}}function p(e,t){return l.concat(t).map((t=>`@${e} ${t}`.trim()))}})),Q8={};H8(Q8,{languages:()=>Wie,options:()=>Kie,printers:()=>Jie});var Z8={};H8(Z8,{canAttachComment:()=>rte,embed:()=>Eie,experimentalFeatures:()=>Iie,getCommentChildNodes:()=>nte,getVisitorKeys:()=>D9,handleComments:()=>aee,insertPragma:()=>kie,isBlockComment:()=>w9,isGap:()=>ste,massageAstNode:()=>Die,print:()=>sie,printComment:()=>ete,willPrintOwnComments:()=>ite});var e6=function(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:a}=t,{node:o}=e,u=i(o),l=s(o);for(let e of n)i(e)>=u&&s(e)<=l&&a.add(e);return r.slice(u,l)},t6="string",r6="array",n6="cursor",i6="indent",s6="align",a6="trim",o6="group",u6="fill",l6="if-break",c6="indent-if-break",p6="line-suffix",d6="line-suffix-boundary",h6="line",f6="label",m6="break-parent",y6=new Set([n6,i6,s6,a6,o6,u6,l6,c6,p6,d6,h6,f6,m6]);var g6=function(e){if("string"==typeof e)return t6;if(Array.isArray(e))return r6;if(!e)return;let{type:t}=e;return y6.has(t)?t:void 0};function x6(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(g6(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if("[object Object]"!==r)return`Unexpected doc '${r}'.`;let n=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...y6].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var b6=class extends Error{name="InvalidDocError";constructor(e){super(x6(e)),this.doc=e}},S6={};var T6=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===S6){r(i.pop());continue}r&&i.push(e,S6);let s=g6(e);if(!s)throw new b6(e);if(!1!==(null==t?void 0:t(e)))switch(s){case r6:case u6:{let t=s===r6?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case l6:i.push(e.flatContents,e.breakContents);break;case o6:if(n&&e.expandedStates)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);break;case s6:case i6:case c6:case f6:case p6:i.push(e.contents);break;case t6:case n6:case a6:case d6:case h6:case m6:break;default:throw new b6(e)}}},E6=()=>{};function v6(e){return{type:i6,contents:e}}function P6(e,t){return{type:s6,contents:t,n:e}}function A6(e,t={}){return E6(t.expandedStates),{type:o6,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function D6(e){return P6(Number.NEGATIVE_INFINITY,e)}function C6(e,t){return A6(e[0],{...t,expandedStates:e})}function w6(e){return{type:u6,parts:e}}function k6(e,t="",r={}){return{type:l6,breakContents:e,flatContents:t,groupId:r.groupId}}function I6(e,t){return{type:c6,contents:e,groupId:t.groupId,negate:t.negate}}function N6(e){return{type:p6,contents:e}}var F6={type:d6},_6={type:m6},O6={type:h6,hard:!0},L6={type:h6},M6={type:h6,soft:!0},B6=[O6,_6],j6=[{type:h6,hard:!0,literal:!0},_6],R6={type:n6};function U6(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function $6(e,t){return e?{type:f6,label:e,contents:t}:t}var V6=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)},q6=e=>{if(Array.isArray(e))return e;if(e.type!==u6)throw new Error(`Expect doc to be 'array' or '${u6}'.`);return e.parts};function K6(e,t){if("string"==typeof e)return t(e);let r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);let i=function(e){switch(g6(e)){case r6:return t(e.map(n));case u6:return t({...e,parts:e.parts.map(n)});case l6:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case o6:{let{expandedStates:r,contents:i}=e;return r?(r=r.map(n),i=r[0]):i=n(i),t({...e,contents:i,expandedStates:r})}case s6:case i6:case c6:case f6:case p6:return t({...e,contents:n(e.contents)});case t6:case n6:case a6:case d6:case h6:case m6:return t(e);default:throw new b6(e)}}(e);return r.set(e,i),i}}function J6(e,t,r){let n=r,i=!1;return T6(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function W6(e){if(e.type===o6&&e.break||e.type===h6&&e.hard||e.type===m6)return!0}function X6(e){return J6(e,W6,!1)}function H6(e){if(e.length>0){let t=V6(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function z6(e){return e.type!==h6||e.hard?e.type===l6?e.flatContents:e:e.soft?"":" "}function G6(e){return K6(e,z6)}function Y6(e){return K6(e,(e=>function(e){switch(g6(e)){case u6:if(e.parts.every((e=>""===e)))return"";break;case o6:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===o6&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case s6:case i6:case c6:case p6:if(!e.contents)return"";break;case l6:if(!e.flatContents&&!e.breakContents)return"";break;case r6:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof V6(!1,t,-1)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:t}case t6:case n6:case a6:case d6:case h6:case f6:case m6:break;default:throw new b6(e)}return e}(e)))}function Q6(e,t=j6){return K6(e,(e=>"string"==typeof e?U6(t,e.split("\n")):e))}function Z6(e){if(e.type===h6)return!0}function e9(e,t){return e.type===f6?{...e,contents:t(e.contents)}:t(e)}var t9=function(e){return Array.isArray(e)&&e.length>0},r9=/^[\$A-Z_a-z\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\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\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,n9=e=>r9.test(e);var i9=function(e){return null!==e&&"object"==typeof e};function*s9(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>i9(e)&&n(e);for(let t of r(e)){let r=e[t];if(Array.isArray(r))for(let e of r)i(e)&&(yield e);else i(r)&&(yield r)}}function a9(e,{getVisitorKeys:t,predicate:r}){for(let n of function*(e,t){let r=[e];for(let e=0;e<r.length;e++){let n=r[e];for(let e of s9(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}function o9(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var u9=o9(" \t"),l9=o9(",; \t"),c9=o9(/[^\n\r]/);var p9=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};var d9=function(e,t,r={}){let n=u9(e,r.backwards?t-1:t,r);return n!==p9(e,n,r)};var h9=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var f9=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?c9(e,t):t)};var m9=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=l9(e,n),n=h9(e,n),n=u9(e,n);return n=f9(e,n),n=p9(e,n),!1!==n&&d9(e,n)},y9={eastAsianWidth(e){var t=e.charCodeAt(0),r=2==e.length?e.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=r&&r<=57343&&(n=(t&=1023)<<10|(r&=1023),n+=65536),12288==n||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":"N"}},g9=/[^\x20-\x7F]/;var x9=function(e){if(!e)return 0;if(!g9.test(e))return e.length;e=e.replace(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g," ");let t=0;for(let r of e){let e=r.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=768&&e<=879)continue;let n=y9.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t};function b9(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return t9(n)?Math.min(b9(n[0]),r):r}function S9(e){return e.range?e.range[1]:e.end}function T9(e,t){let r=b9(e);return Number.isInteger(r)&&r===b9(t)}function E9(e,t){return T9(e,t)&&function(e,t){let r=S9(e);return Number.isInteger(r)&&r===S9(t)}(e,t)}var v9=null;function P9(e){if(null!==v9&&(v9.property,1)){let e=v9;return v9=P9.prototype=null,e}return v9=P9.prototype=e??Object.create(null),new P9}for(let e=0;e<=10;e++)P9();var A9=function(e,t="type"){return function(e){P9(e)}(e),function(r){let n=r[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}},D9=A9({ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[]});var C9=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)},w9=C9(["Block","CommentBlock","MultiLine"]);var k9=function(e,t){return t.some((t=>function(e,t){let r=t.split(".");for(let t=r.length-1;t>=0;t--){let n=r[t];if(0===t)return"Identifier"===e.type&&e.name===n;if("MemberExpression"!==e.type||e.optional||e.computed||"Identifier"!==e.property.type||e.property.name!==n)return!1;e=e.object}}(e,t)))},I9=C9(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]);var N9=function({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")};function F9(e,t){return t(e)||a9(e,{getVisitorKeys:D9,predicate:t})}function _9(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||n7(e)||i7(e)||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||$7(e)||"TSNonNullExpression"===e.type||"ChainExpression"===e.type}function O9(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function L9(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var M9=C9(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),B9=C9(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),j9=C9(["ArrayExpression","TupleExpression"]),R9=C9(["ObjectExpression","RecordExpression"]);function U9(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function $9(e){return"UnaryExpression"===e.type&&("+"===e.operator||"-"===e.operator)&&U9(e.argument)}function V9(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function q9(e){return"RegExpLiteral"===e.type||"Literal"===e.type&&!!e.regex}var K9=C9(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),J9=C9(["FunctionExpression","ArrowFunctionExpression"]);function W9(e){return n7(e)&&"Identifier"===e.callee.type&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var X9=C9(["JSXElement","JSXFragment"]);function H9(e){return"get"===e.kind||"set"===e.kind}function z9(e){return H9(e)||T9(e,e.value)}function G9(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||z9(e))}var Y9=C9(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Q9(e){return i7(e)||"BindExpression"===e.type&&!!e.object}var Z9=C9(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function e7(e){return N9(e)||I9(e)||Z9(e)||("GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)&&!e.typeParameters}var t7=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function r7(e,t){if("CallExpression"!==e.type)return!1;if(1===e.arguments.length){if(W9(e)&&t&&r7(t))return J9(e.arguments[0]);if(function(e){return"Identifier"===e.callee.type&&1===e.arguments.length&&/^(?:before|after)(?:Each|All)$/.test(e.callee.name)}(e))return W9(e.arguments[0])}else if((2===e.arguments.length||3===e.arguments.length)&&("TemplateLiteral"===e.arguments[0].type||V9(e.arguments[0]))&&function(e){return k9(e,t7)}(e.callee))return!(e.arguments[2]&&!U9(e.arguments[2]))&&((2===e.arguments.length?J9(e.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(e.arguments[1])&&D7(e.arguments[1]).length<=1)||W9(e.arguments[1]));return!1}var n7=C9(["CallExpression","OptionalCallExpression"]),i7=C9(["MemberExpression","OptionalMemberExpression"]);function s7(e,t){return X9(t)?F7(t):L7(t,_7.Leading,(t=>d9(e,S9(t))))}function a7(e,t){return"json"!==t.parser&&V9(e.key)&&f7(e.key).slice(1,-1)===e.key.value&&(n9(e.key.value)&&!("babel-ts"===t.parser&&"ClassProperty"===e.type||"typescript"===t.parser&&"PropertyDefinition"===e.type)||o7(e.key.value)&&String(Number(e.key.value))===e.key.value&&("babel"===t.parser||"acorn"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser))}function o7(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function u7(e){return e.quasis.some((e=>e.value.raw.includes("\n")))}function l7(e,t){return("TemplateLiteral"===e.type&&u7(e)||"TaggedTemplateExpression"===e.type&&u7(e.quasi))&&!d9(t,b9(e),{backwards:!0})}function c7(e){if(!L7(e))return!1;let t=V6(!1,M7(e,_7.Dangling),-1);return t&&!w9(t)}function p7(e){let{node:t,parent:r,key:n}=e;return"callee"===n&&n7(t)&&n7(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var d7=new Set(["!","-","+","~"]);function h7(e,t=2){if(t<=0)return!1;let r=e=>h7(e,t-1);if(q9(e))return x9(e.pattern??e.regex.pattern)<=5;if("Literal"===e.type||"BigIntLiteral"===e.type||"DecimalLiteral"===e.type||"BooleanLiteral"===e.type||"NullLiteral"===e.type||"NumericLiteral"===e.type||"StringLiteral"===e.type||"Identifier"===e.type||"ThisExpression"===e.type||"Super"===e.type||"PrivateName"===e.type||"PrivateIdentifier"===e.type||"ArgumentPlaceholder"===e.type||"Import"===e.type)return!0;if("TemplateLiteral"===e.type)return e.quasis.every((e=>!e.value.raw.includes("\n")))&&e.expressions.every(r);if(R9(e))return e.properties.every((e=>!e.computed&&(e.shorthand||e.value&&r(e.value))));if(j9(e))return e.elements.every((e=>null===e||r(e)));if(j7(e)){if("ImportExpression"===e.type||h7(e.callee,t)){let n=w7(e);return n.length<=t&&n.every(r)}return!1}return i7(e)?h7(e.object,t)&&h7(e.property,t):"UnaryExpression"===e.type&&d7.has(e.operator)||"UpdateExpression"===e.type?h7(e.argument,t):"TSNonNullExpression"===e.type&&h7(e.expression,t)}function f7(e){var t;return(null==(t=e.extra)?void 0:t.raw)??e.raw}function m7(e){return e}function y7(e,t="es5"){return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)}function g7(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return g7(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return g7(e.object,t);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&g7(e.tag,t);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==e.callee.type&&g7(e.callee,t);case"ConditionalExpression":return g7(e.test,t);case"UpdateExpression":return!e.prefix&&g7(e.argument,t);case"BindExpression":return e.object&&g7(e.object,t);case"SequenceExpression":return g7(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":return g7(e.expression,t);default:return t(e)}}var x7={"==":!0,"!=":!0,"===":!0,"!==":!0},b7={"*":!0,"/":!0,"%":!0},S7={">>":!0,">>>":!0,"<<":!0};function T7(e,t){return!(v7(t)!==v7(e)||"**"===e||x7[e]&&x7[t]||"%"===t&&b7[e]||"%"===e&&b7[t]||t!==e&&b7[t]&&b7[e]||S7[e]&&S7[t])}var E7=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap(((e,t)=>e.map((e=>[e,t])))));function v7(e){return E7.get(e)}function P7(e){var t;if(e.rest)return!0;let r=D7(e);return"RestElement"===(null==(t=V6(!1,r,-1))?void 0:t.type)}var A7=new WeakMap;function D7(e){if(A7.has(e))return A7.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),A7.set(e,t),t}var C7=new WeakMap;function w7(e){if(C7.has(e))return C7.get(e);let t=e.arguments;return"ImportExpression"===e.type&&(t=[e.source],e.attributes&&t.push(e.attributes)),C7.set(e,t),t}function k7(e,t){let{node:r}=e;"ImportExpression"===r.type?(e.call((e=>t(e,0)),"source"),r.attributes&&e.call((e=>t(e,1)),"attributes")):e.each(t,"arguments")}function I7(e,t){if("ImportExpression"===e.type){if(0===t||t===(e.attributes?-2:-1))return"source";if(e.attributes&&(1===t||-1===t))return"attributes";throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return["arguments",t]}function N7(e){return"prettier-ignore"===e.value.trim()&&!e.unignore}function F7(e){return(null==e?void 0:e.prettierIgnore)||L7(e,_7.PrettierIgnore)}var _7={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},O7=(e,t)=>{if("function"==typeof e&&(t=e,e=0),e||t)return(r,n,i)=>!(e&_7.Leading&&!r.leading||e&_7.Trailing&&!r.trailing||e&_7.Dangling&&(r.leading||r.trailing)||e&_7.Block&&!w9(r)||e&_7.Line&&!M9(r)||e&_7.First&&0!==n||e&_7.Last&&n!==i.length-1||e&_7.PrettierIgnore&&!N7(r)||t&&!t(r))};function L7(e,t,r){if(!t9(null==e?void 0:e.comments))return!1;let n=O7(t,r);return!n||e.comments.some(n)}function M7(e,t,r){if(!Array.isArray(null==e?void 0:e.comments))return[];let n=O7(t,r);return n?e.comments.filter(n):e.comments}var B7=(e,{originalText:t})=>m9(t,S9(e));function j7(e){return n7(e)||"NewExpression"===e.type||"ImportExpression"===e.type}function R7(e){return e&&("ObjectProperty"===e.type||"Property"===e.type&&!e.method&&"init"===e.kind)}var U7=Symbol("ifWithoutBlockAndSameLineComment"),$7=C9(["TSAsExpression","TSSatisfiesExpression"]);function V7(e,t){var r,n,i,s,a,o,u;if(e.isRoot)return!1;let{node:l,key:c,parent:p}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&function(e){return R9(e)}(l)&&K7(e))return!0;if(q7(l))return!1;if("Identifier"===l.type){if(null!=(r=l.extra)&&r.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(l.name)||"left"===c&&("async"===l.name&&!p.await||"let"===l.name)&&"ForOfStatement"===p.type)return!0;if("let"===l.name){let t=null==(n=e.findAncestor((e=>"ForOfStatement"===e.type)))?void 0:n.left;if(t&&g7(t,(e=>e===l)))return!0}if("object"===c&&"let"===l.name&&"MemberExpression"===p.type&&p.computed&&!p.optional){let t=e.findAncestor((e=>"ExpressionStatement"===e.type||"ForStatement"===e.type||"ForInStatement"===e.type)),r=t?"ExpressionStatement"===t.type?t.expression:"ForStatement"===t.type?t.init:t.left:void 0;if(r&&g7(r,(e=>e===l)))return!0}return!1}if("ObjectExpression"===l.type||"FunctionExpression"===l.type||"ClassExpression"===l.type||"DoExpression"===l.type){let t=null==(i=e.findAncestor((e=>"ExpressionStatement"===e.type)))?void 0:i.expression;if(t&&g7(t,(e=>e===l)))return!0}if("ObjectExpression"===l.type){let t=null==(s=e.findAncestor((e=>"ArrowFunctionExpression"===e.type)))?void 0:s.body;if(t&&"SequenceExpression"!==t.type&&"AssignmentExpression"!==t.type&&g7(t,(e=>e===l)))return!0}switch(p.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if("superClass"===c&&("ArrowFunctionExpression"===l.type||"AssignmentExpression"===l.type||"AwaitExpression"===l.type||"BinaryExpression"===l.type||"ConditionalExpression"===l.type||"LogicalExpression"===l.type||"NewExpression"===l.type||"ObjectExpression"===l.type||"SequenceExpression"===l.type||"TaggedTemplateExpression"===l.type||"UnaryExpression"===l.type||"UpdateExpression"===l.type||"YieldExpression"===l.type||"TSNonNullExpression"===l.type||"ClassExpression"===l.type&&t9(l.decorators)))return!0;break;case"ExportDefaultDeclaration":return J7(e,t)||"SequenceExpression"===l.type;case"Decorator":if("expression"===c){if(i7(l)&&l.computed)return!0;let e=!1,r=!1,n=l;for(;n;)switch(n.type){case"MemberExpression":r=!0,n=n.object;break;case"CallExpression":if(r||e)return"typescript"!==t.parser;e=!0,n=n.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return"typescript"!==t.parser;default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type))&&function(e){return F9(e,(e=>"ObjectTypeAnnotation"===e.type&&F9(e,(e=>"FunctionTypeAnnotation"===e.type))))}(l))return!0}switch(l.type){case"UpdateExpression":if("UnaryExpression"===p.type)return l.prefix&&("++"===l.operator&&"+"===p.operator||"--"===l.operator&&"-"===p.operator);case"UnaryExpression":switch(p.type){case"UnaryExpression":return l.operator===p.operator&&("+"===l.operator||"-"===l.operator);case"BindExpression":case"TaggedTemplateExpression":case"TSNonNullExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"BinaryExpression":return"left"===c&&"**"===p.operator;default:return!1}case"BinaryExpression":if("UpdateExpression"===p.type||"in"===l.operator&&function(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if("ForStatement"===(null==n?void 0:n.type)&&n.init===r)return!0;r=n}return!1}(e))return!0;if("|>"===l.operator&&null!=(a=l.extra)&&a.parenthesized){let t=e.grandparent;if("BinaryExpression"===t.type&&"|>"===t.operator)return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"LogicalExpression":switch(p.type){case"TSAsExpression":case"TSSatisfiesExpression":return!$7(l);case"ConditionalExpression":return $7(l);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return"callee"===c;case"ClassExpression":case"ClassDeclaration":return"superClass"===c;case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"AssignmentExpression":case"AssignmentPattern":return"left"===c&&("TSTypeAssertion"===l.type||$7(l));case"LogicalExpression":if("LogicalExpression"===l.type)return p.operator!==l.operator;case"BinaryExpression":{let{operator:e,type:t}=l;if(!e&&"TSTypeAssertion"!==t)return!0;let r=v7(e),n=p.operator,i=v7(n);return i>r||"right"===c&&i===r||i===r&&!T7(n,e)||(i<r&&"%"===e?"+"===n||"-"===n:!!function(e){return!!S7[e]||"|"===e||"^"===e||"&"===e}(n))}default:return!1}case"SequenceExpression":switch(p.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==c;case"ArrowFunctionExpression":return"body"!==c;default:return!0}case"YieldExpression":if("AwaitExpression"===p.type)return!0;case"AwaitExpression":switch(p.type){case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"SpreadElement":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"ConditionalExpression":return"test"===c;case"BinaryExpression":return!(!l.argument&&"|>"===p.operator);default:return!1}case"TSFunctionType":if(e.match((e=>"TSFunctionType"===e.type),((e,t)=>"typeAnnotation"===t&&"TSTypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type)))return!0;case"TSConditionalType":case"TSConstructorType":if("extendsType"===c&&"TSConditionalType"===p.type){if("TSConditionalType"===l.type)return!0;let{typeAnnotation:e}=l.returnType||l.typeAnnotation;if("TSTypePredicate"===e.type&&e.typeAnnotation&&(e=e.typeAnnotation.typeAnnotation),"TSInferType"===e.type&&e.typeParameter.constraint)return!0}if("checkType"===c&&"TSConditionalType"===p.type)return!0;case"TSUnionType":case"TSIntersectionType":if(("TSUnionType"===p.type||"TSIntersectionType"===p.type)&&p.types.length>1&&(!l.types||l.types.length>1))return!0;case"TSInferType":if("TSInferType"===l.type&&"TSRestType"===p.type)return!1;case"TSTypeOperator":return"TSArrayType"===p.type||"TSOptionalType"===p.type||"TSRestType"===p.type||"objectType"===c&&"TSIndexedAccessType"===p.type||"TSTypeOperator"===p.type||"TSTypeAnnotation"===p.type&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return"objectType"===c&&"TSIndexedAccessType"===p.type||"elementType"===c&&"TSArrayType"===p.type;case"TypeofTypeAnnotation":return"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type)||"elementType"===c&&"ArrayTypeAnnotation"===p.type;case"ArrayTypeAnnotation":return"NullableTypeAnnotation"===p.type;case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"ArrayTypeAnnotation"===p.type||"NullableTypeAnnotation"===p.type||"IntersectionTypeAnnotation"===p.type||"UnionTypeAnnotation"===p.type||"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type);case"InferTypeAnnotation":case"NullableTypeAnnotation":return"ArrayTypeAnnotation"===p.type||"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type);case"FunctionTypeAnnotation":{if(e.match(void 0,((e,t)=>"typeAnnotation"===t&&"TypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type))||e.match(void 0,((e,t)=>"typeAnnotation"===t&&"TypePredicate"===e.type),((e,t)=>"typeAnnotation"===t&&"TypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type)))return!0;let t="NullableTypeAnnotation"===p.type?e.grandparent:p;return"UnionTypeAnnotation"===t.type||"IntersectionTypeAnnotation"===t.type||"ArrayTypeAnnotation"===t.type||"objectType"===c&&("IndexedAccessType"===t.type||"OptionalIndexedAccessType"===t.type)||"checkType"===c&&"ConditionalTypeAnnotation"===p.type||"extendsType"===c&&"ConditionalTypeAnnotation"===p.type&&"InferTypeAnnotation"===l.returnType.type&&l.returnType.typeParameter.bound||"NullableTypeAnnotation"===t.type||"FunctionTypeParam"===p.type&&null===p.name&&D7(l).some((e=>{var t;return"NullableTypeAnnotation"===(null==(t=e.typeAnnotation)?void 0:t.type)}))}case"ConditionalTypeAnnotation":if("extendsType"===c&&"ConditionalTypeAnnotation"===p.type&&"ConditionalTypeAnnotation"===l.type||"checkType"===c&&"ConditionalTypeAnnotation"===p.type)return!0;case"OptionalIndexedAccessType":return"objectType"===c&&"IndexedAccessType"===p.type;case"StringLiteral":case"NumericLiteral":case"Literal":if("string"==typeof l.value&&"ExpressionStatement"===p.type&&!p.directive){let t=e.grandparent;return"Program"===t.type||"BlockStatement"===t.type}return"object"===c&&"MemberExpression"===p.type&&"number"==typeof l.value;case"AssignmentExpression":{let t=e.grandparent;return"body"===c&&"ArrowFunctionExpression"===p.type||("key"!==c||"ClassProperty"!==p.type&&"PropertyDefinition"!==p.type||!p.computed)&&("init"!==c&&"update"!==c||"ForStatement"!==p.type)&&("ExpressionStatement"===p.type?"ObjectPattern"===l.left.type:!("key"===c&&"TSPropertySignature"===p.type||"AssignmentExpression"===p.type||"SequenceExpression"===p.type&&"ForStatement"===t.type&&(t.init===p||t.update===p)||"value"===c&&"Property"===p.type&&"ObjectPattern"===t.type&&t.properties.includes(p)||"NGChainedExpression"===p.type))}case"ConditionalExpression":switch(p.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"ConditionalExpression":return"test"===c;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;default:return!1}case"FunctionExpression":switch(p.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(p.type){case"BinaryExpression":return"|>"!==p.operator||(null==(o=l.extra)?void 0:o.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return"test"===c;default:return!1}case"ClassExpression":return"NewExpression"===p.type&&"callee"===c;case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(function(e){let{node:t,parent:r,grandparent:n,key:i}=e;return!!(("OptionalMemberExpression"===t.type||"OptionalCallExpression"===t.type)&&("object"===i&&"MemberExpression"===r.type||"callee"===i&&("CallExpression"===r.type||"NewExpression"===r.type)||"TSNonNullExpression"===r.type&&"MemberExpression"===n.type&&n.object===r)||e.match((()=>"CallExpression"===t.type||"MemberExpression"===t.type),((e,t)=>"expression"===t&&"ChainExpression"===e.type))&&(e.match(void 0,void 0,((e,t)=>"callee"===t&&("CallExpression"===e.type&&!e.optional||"NewExpression"===e.type)||"object"===t&&"MemberExpression"===e.type&&!e.optional))||e.match(void 0,void 0,((e,t)=>"expression"===t&&"TSNonNullExpression"===e.type),((e,t)=>"object"===t&&"MemberExpression"===e.type)))||e.match((()=>"CallExpression"===t.type||"MemberExpression"===t.type),((e,t)=>"expression"===t&&"TSNonNullExpression"===e.type),((e,t)=>"expression"===t&&"ChainExpression"===e.type),((e,t)=>"object"===t&&"MemberExpression"===e.type)))}(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if("callee"===c&&("BindExpression"===p.type||"NewExpression"===p.type)){let e=l;for(;e;)switch(e.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":e=e.object;break;case"TaggedTemplateExpression":e=e.tag;break;case"TSNonNullExpression":e=e.expression;break;default:return!1}}return!1;case"BindExpression":return"callee"===c&&("BindExpression"===p.type||"NewExpression"===p.type)||"object"===c&&i7(p);case"NGPipeExpression":return!("NGRoot"===p.type||"NGMicrosyntaxExpression"===p.type||"ObjectProperty"===p.type&&(null==(u=l.extra)||!u.parenthesized)||j9(p)||"arguments"===c&&n7(p)||"right"===c&&"NGPipeExpression"===p.type||"property"===c&&"MemberExpression"===p.type||"AssignmentExpression"===p.type);case"JSXFragment":case"JSXElement":return"callee"===c||"left"===c&&"BinaryExpression"===p.type&&"<"===p.operator||!j9(p)&&"ArrowFunctionExpression"!==p.type&&"AssignmentExpression"!==p.type&&"AssignmentPattern"!==p.type&&"BinaryExpression"!==p.type&&"NewExpression"!==p.type&&"ConditionalExpression"!==p.type&&"ExpressionStatement"!==p.type&&"JsExpressionRoot"!==p.type&&"JSXAttribute"!==p.type&&"JSXElement"!==p.type&&"JSXExpressionContainer"!==p.type&&"JSXFragment"!==p.type&&"LogicalExpression"!==p.type&&!n7(p)&&!R7(p)&&"ReturnStatement"!==p.type&&"ThrowStatement"!==p.type&&"TypeCastExpression"!==p.type&&"VariableDeclarator"!==p.type&&"YieldExpression"!==p.type;case"TSInstantiationExpression":return"object"===c&&i7(p)}return!1}var q7=C9(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function K7(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if("arguments"===r&&e.isLast)return e.callParent(K7);break;case"ObjectProperty":if("value"===r)return e.callParent((()=>"properties"===e.key&&e.isLast));break;case"BinaryExpression":case"LogicalExpression":if("right"===r)return e.callParent(K7);break;case"ConditionalExpression":if("alternate"===r)return e.callParent(K7);break;case"UnaryExpression":if(t.prefix)return e.callParent(K7)}return!1}function J7(e,t){let{node:r,parent:n}=e;return"FunctionExpression"===r.type||"ClassExpression"===r.type?"ExportDefaultDeclaration"===n.type||!V7(e,t):!(!_9(r)||"ExportDefaultDeclaration"!==n.type&&V7(e,t))&&e.call((()=>J7(e,t)),...L9(r))}var W7=V7,X7=(e,t,r,n)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)};var H7=function(e,t){let r=t-1;return r=u9(e,r,{backwards:!0}),r=p9(e,r,{backwards:!0}),r=u9(e,r,{backwards:!0}),r!==p9(e,r,{backwards:!0})},z7=()=>!0;function G7(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function Y7(e,t,r={}){let{node:n}=e;if(!t9(null==n?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:a=z7}=r,o=[];if(e.each((({node:r})=>{r.leading||r.trailing||r.marker!==s||!a(r)||o.push(G7(e,t))}),"comments"),0===o.length)return"";let u=U6(B6,o);return i?v6([B6,u]):u}function Q7(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if(0===(r.comments||[]).filter((e=>!n.has(e))).length)return{leading:"",trailing:""};let i,s=[],a=[];return e.each((()=>{let r=e.node;if(null!=n&&n.has(r))return;let{leading:o,trailing:u}=r;o?s.push(function(e,t){var r;let n=e.node,i=[G7(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=d9(a,u(n))?d9(a,o(n),{backwards:!0})?B6:L6:" ";i.push(e)}else i.push(B6);let l=p9(a,u9(a,u(n)));return!1!==l&&d9(a,l)&&i.push(B6),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=G7(e,t),{printer:a,originalText:o,locStart:u}=t,l=null==(n=a.isBlockComment)?void 0:n.call(a,i);if(null!=r&&r.hasLineSuffix&&(null==r||!r.isBlock)||d9(o,u(i),{backwards:!0})){let e=H7(o,u(i));return{doc:N6([B6,e?B6:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[N6([" ",s]),_6],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}function Z7(e,t,r){let{leading:n,trailing:i}=Q7(e,r);return n||i?e9(t,(e=>[n,e,i])):t}var eee=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},tee=eee,ree="'";var nee=function(e,t){let r=!0===t||t===ree?ree:'"',n=r===ree?'"':ree,i=0,s=0;for(let t of e)t===r?i++:t===n&&s++;return i>s?n:r};var iee;iee=new WeakMap;var see=class{constructor(e){((e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)})(this,iee,void 0),((e,t,r,n)=>{z8(e,t,"write to private field"),n?n.call(e,r):t.set(e,r)})(this,iee,new Set(e))}getLeadingWhitespaceCount(e){let t=G8(this,iee),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=G8(this,iee),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return G8(this,iee).has(e.charAt(0))}hasTrailingWhitespace(e){return G8(this,iee).has(V6(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}([...G8(this,iee)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=G8(this,iee);return Array.prototype.some.call(e,(e=>t.has(e)))}hasNonWhitespaceCharacter(e){let t=G8(this,iee);return Array.prototype.some.call(e,(e=>!t.has(e)))}isWhitespaceOnly(e){let t=G8(this,iee);return Array.prototype.every.call(e,(e=>t.has(e)))}},aee={};H8(aee,{endOfLine:()=>yee,ownLine:()=>mee,remaining:()=>gee});var oee=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=u9(e,n),n=h9(e,n),n=f9(e,n),n=p9(e,n);return n};var uee=function(e,t){let r=oee(e,t);return!1===r?"":e.charAt(r)};var lee=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};function cee(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}(e)}function pee(e,t){t.leading=!0,t.trailing=!1,cee(e,t)}function dee(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),cee(e,t)}function hee(e,t){t.leading=!1,t.trailing=!0,cee(e,t)}var fee=function(e){return w9(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};function mee(e){return[zee,Lee,Pee,Tee,Eee,vee,wee,Vee,Ree,$ee,qee,Kee,Iee,Mee,Bee].some((t=>t(e)))}function yee(e){return[See,Lee,Aee,qee,Tee,Eee,vee,wee,Mee,jee,Uee,$ee,Xee,Bee,Yee].some((t=>t(e)))}function gee(e){return[zee,Tee,Eee,Dee,Oee,Iee,$ee,_ee,Fee,Gee,Bee,Hee].some((t=>t(e)))}function xee(e,t){let r=(e.body||e.properties).find((({type:e})=>"EmptyStatement"!==e));r?pee(r,t):dee(e,t)}function bee(e,t){"BlockStatement"===e.type?xee(e,t):pee(e,t)}function See({comment:e,followingNode:t}){return!(!t||!fee(e))&&(pee(t,e),!0)}function Tee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("IfStatement"!==(null==r?void 0:r.type)||!n)return!1;if(")"===uee(i,S9(e)))return hee(t,e),!0;if(t===r.consequent&&n===r.alternate){if("BlockStatement"===t.type)hee(t,e);else{let n="SingleLine"===e.type||e.loc.start.line===e.loc.end.line,i=e.loc.start.line===t.loc.start.line;n&&i?dee(t,e,"ExpressionStatement"===t.type?U7:void 0):dee(r,e)}return!0}return"BlockStatement"===n.type?(xee(n,e),!0):"IfStatement"===n.type?(bee(n.consequent,e),!0):r.consequent===n&&(pee(n,e),!0)}function Eee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return!("WhileStatement"!==(null==r?void 0:r.type)||!n)&&(")"===uee(i,S9(e))?(hee(t,e),!0):"BlockStatement"===n.type?(xee(n,e),!0):r.body===n&&(pee(n,e),!0))}function vee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return!("TryStatement"!==(null==r?void 0:r.type)&&"CatchClause"!==(null==r?void 0:r.type)||!n)&&("CatchClause"===r.type&&t?(hee(t,e),!0):"BlockStatement"===n.type?(xee(n,e),!0):"TryStatement"===n.type?(bee(n.finalizer,e),!0):"CatchClause"===n.type&&(bee(n.body,e),!0))}function Pee({comment:e,enclosingNode:t,followingNode:r}){return!(!i7(t)||"Identifier"!==(null==r?void 0:r.type))&&(pee(t,e),!0)}function Aee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){let s=t&&!lee(i,S9(t),b9(e));return!(t&&s||"ConditionalExpression"!==(null==r?void 0:r.type)&&"TSConditionalType"!==(null==r?void 0:r.type)||!n)&&(pee(n,e),!0)}function Dee({comment:e,precedingNode:t,enclosingNode:r}){return!(!R7(r)||!r.shorthand||r.key!==t||"AssignmentPattern"!==r.value.type)&&(hee(r.value.left,e),!0)}var Cee=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function wee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(Cee.has(null==r?void 0:r.type)){if(t9(r.decorators)&&"Decorator"!==(null==n?void 0:n.type))return hee(V6(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return xee(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return hee(t,e),!0;for(let i of["implements","extends","mixins"])if(r[i]&&n===r[i][0])return!t||t!==r.id&&t!==r.typeParameters&&t!==r.superClass?dee(r,e,i):hee(t,e),!0}}return!1}var kee=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Iee({comment:e,precedingNode:t,enclosingNode:r,text:n}){return(r&&t&&"("===uee(n,S9(e))&&("Property"===r.type||"TSDeclareMethod"===r.type||"TSAbstractMethodDefinition"===r.type)&&"Identifier"===t.type&&r.key===t&&":"!==uee(n,S9(t))||!("Decorator"!==(null==t?void 0:t.type)||!kee.has(null==r?void 0:r.type)))&&(hee(t,e),!0)}var Nee=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function Fee({comment:e,precedingNode:t,enclosingNode:r,text:n}){return"("===uee(n,S9(e))&&(!(!t||!Nee.has(null==r?void 0:r.type))&&(hee(t,e),!0))}function _ee({comment:e,enclosingNode:t,text:r}){if("ArrowFunctionExpression"!==(null==t?void 0:t.type))return!1;let n=oee(r,S9(e));return!1!==n&&"=>"===r.slice(n,n+2)&&(dee(t,e),!0)}function Oee({comment:e,enclosingNode:t,text:r}){return")"===uee(r,S9(e))&&(t&&(Qee(t)&&0===D7(t).length||j7(t)&&0===w7(t).length)?(dee(t,e),!0):("MethodDefinition"===(null==t?void 0:t.type)||"TSAbstractMethodDefinition"===(null==t?void 0:t.type))&&0===D7(t.value).length&&(dee(t.value,e),!0))}function Lee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("FunctionTypeParam"===(null==t?void 0:t.type)&&"FunctionTypeAnnotation"===(null==r?void 0:r.type)&&"FunctionTypeParam"!==(null==n?void 0:n.type))return hee(t,e),!0;if(("Identifier"===(null==t?void 0:t.type)||"AssignmentPattern"===(null==t?void 0:t.type)||"ObjectPattern"===(null==t?void 0:t.type)||"ArrayPattern"===(null==t?void 0:t.type)||"RestElement"===(null==t?void 0:t.type))&&r&&Qee(r)&&")"===uee(i,S9(e)))return hee(t,e),!0;if("FunctionDeclaration"===(null==r?void 0:r.type)&&"BlockStatement"===(null==n?void 0:n.type)){let t=(()=>{let e=D7(r);if(e.length>0)return oee(i,S9(V6(!1,e,-1)));let t=oee(i,S9(r.id));return!1!==t&&oee(i,t+1)})();if(b9(e)>t)return xee(n,e),!0}return!1}function Mee({comment:e,enclosingNode:t}){return"LabeledStatement"===(null==t?void 0:t.type)&&(pee(t,e),!0)}function Bee({comment:e,enclosingNode:t}){return!("ContinueStatement"!==(null==t?void 0:t.type)&&"BreakStatement"!==(null==t?void 0:t.type)||t.label)&&(hee(t,e),!0)}function jee({comment:e,precedingNode:t,enclosingNode:r}){return!!(n7(r)&&t&&r.callee===t&&r.arguments.length>0)&&(pee(r.arguments[0],e),!0)}function Ree({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"UnionTypeAnnotation"===(null==r?void 0:r.type)||"TSUnionType"===(null==r?void 0:r.type)?(N7(e)&&(n.prettierIgnore=!0,e.unignore=!0),!!t&&(hee(t,e),!0)):(("UnionTypeAnnotation"===(null==n?void 0:n.type)||"TSUnionType"===(null==n?void 0:n.type))&&N7(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Uee({comment:e,enclosingNode:t}){return!!R7(t)&&(pee(t,e),!0)}function $ee({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:i}){var s;return 0===(null==(s=null==n?void 0:n.body)?void 0:s.length)?(i?dee(n,e):pee(n,e),!0):"Program"!==(null==t?void 0:t.type)||0!==t.body.length||t9(t.directives)?"Program"===(null==r?void 0:r.type)&&0===r.body.length&&"ModuleExpression"===(null==t?void 0:t.type)&&(dee(r,e),!0):(i?dee(t,e):pee(t,e),!0)}function Vee({comment:e,enclosingNode:t}){return("ForInStatement"===(null==t?void 0:t.type)||"ForOfStatement"===(null==t?void 0:t.type))&&(pee(t,e),!0)}function qee({comment:e,precedingNode:t,enclosingNode:r,text:n}){if("ImportSpecifier"===(null==r?void 0:r.type)||"ExportSpecifier"===(null==r?void 0:r.type))return pee(r,e),!0;let i="ImportSpecifier"===(null==t?void 0:t.type)&&"ImportDeclaration"===(null==r?void 0:r.type),s="ExportSpecifier"===(null==t?void 0:t.type)&&"ExportNamedDeclaration"===(null==r?void 0:r.type);return!(!i&&!s||!d9(n,S9(e)))&&(hee(t,e),!0)}function Kee({comment:e,enclosingNode:t}){return"AssignmentPattern"===(null==t?void 0:t.type)&&(pee(t,e),!0)}var Jee=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),Wee=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function Xee({comment:e,enclosingNode:t,followingNode:r}){return!(!Jee.has(null==t?void 0:t.type)||!r||!Wee.has(r.type)&&!w9(e))&&(pee(r,e),!0)}function Hee({comment:e,enclosingNode:t,followingNode:r,text:n}){return!(r||"TSMethodSignature"!==(null==t?void 0:t.type)&&"TSDeclareFunction"!==(null==t?void 0:t.type)&&"TSAbstractMethodDefinition"!==(null==t?void 0:t.type)||";"!==uee(n,S9(e)))&&(hee(t,e),!0)}function zee({comment:e,enclosingNode:t,followingNode:r}){if(N7(e)&&"TSMappedType"===(null==t?void 0:t.type)&&"TSTypeParameter"===(null==r?void 0:r.type)&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function Gee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"TSMappedType"===(null==r?void 0:r.type)&&("TSTypeParameter"===(null==n?void 0:n.type)&&n.name?(pee(n.name,e),!0):!("TSTypeParameter"!==(null==t?void 0:t.type)||!t.constraint)&&(hee(t.constraint,e),!0))}function Yee({comment:e,enclosingNode:t,followingNode:r}){return!(!t||"SwitchCase"!==t.type||t.test||!r||r!==t.consequent[0])&&("BlockStatement"===r.type&&M9(e)?xee(r,e):dee(t,e),!0)}var Qee=C9(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);var Zee=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))};function ete(e,t){let r=e.node;if(M9(r))return t.originalText.slice(b9(r),S9(r)).trimEnd();if(w9(r))return Zee(r)?function(e){let t=e.value.split("\n");return["/*",U6(B6,t.map(((e,r)=>0===r?e.trimEnd():" "+(r<t.length-1?e.trim():e.trimStart())))),"*/"]}(r):["/*",Q6(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}var tte=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function rte(e){return!tte.has(e.type)}function nte(e,t){var r;if(("typescript"===t.parser||"flow"===t.parser||"acorn"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser)&&"MethodDefinition"===e.type&&"FunctionExpression"===(null==(r=e.value)?void 0:r.type)&&0===D7(e.value).length&&!e.value.returnType&&!t9(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function ite(e){let{node:t,parent:r}=e;return(X9(t)||r&&("JSXSpreadAttribute"===r.type||"JSXSpreadChild"===r.type||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type||("ClassDeclaration"===r.type||"ClassExpression"===r.type)&&r.superClass===t))&&(!F7(t)||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)}function ste(e,{parser:t}){if("flow"===t||"babel-flow"===t)return""===(e=X7(!1,e,/[\s(]/g,""))||"/*"===e||"/*::"===e}var ate=new see(" \n\r\t"),ote=e=>""===e||e===L6||e===B6||e===M6;function ute(e,t,r){var n,i,s;let{node:a}=e;if("JSXElement"===a.type&&function(e){if(0===e.children.length)return!0;if(e.children.length>1)return!1;let t=e.children[0];return"JSXText"===t.type&&!mte(t)}(a))return[r("openingElement"),r("closingElement")];let o="JSXElement"===a.type?r("openingElement"):r("openingFragment"),u="JSXElement"===a.type?r("closingElement"):r("closingFragment");if(1===a.children.length&&"JSXExpressionContainer"===a.children[0].type&&("TemplateLiteral"===a.children[0].expression.type||"TaggedTemplateExpression"===a.children[0].expression.type))return[o,...e.map(r,"children"),u];a.children=a.children.map((e=>function(e){return"JSXExpressionContainer"===e.type&&V9(e.expression)&&" "===e.expression.value&&!L7(e.expression)}(e)?{type:"JSXText",value:" ",raw:" "}:e));let l=a.children.some(X9),c=a.children.filter((e=>"JSXExpressionContainer"===e.type)).length>1,p="JSXElement"===a.type&&a.openingElement.attributes.length>1,d=X6(o)||l||p||c,h="mdx"===e.parent.rootMarker,f=t.singleQuote?"{' '}":'{" "}',m=h?" ":k6([f,M6]," "),y=function(e,t,r,n,i){let s=[];return e.each((({node:e,next:t})=>{if("JSXText"===e.type){let r=f7(e);if(mte(e)){let a,o=ate.split(r,!0);if(""===o[0]&&(s.push(""),o.shift(),/\n/.test(o[0])?s.push(cte(i,o[1],e,t)):s.push(n),o.shift()),""===V6(!1,o,-1)&&(o.pop(),a=o.pop()),0===o.length)return;for(let[e,t]of o.entries())e%2==1?s.push(L6):s.push(t);void 0!==a?/\n/.test(a)?s.push(cte(i,V6(!1,s,-1),e,t)):s.push(n):s.push(lte(i,V6(!1,s,-1),e,t))}else/\n/.test(r)?r.match(/\n/g).length>1&&s.push("",B6):s.push("",n)}else{let n=r();if(s.push(n),t&&mte(t)){let r=ate.trim(f7(t)),[n]=ate.split(r);s.push(lte(i,n,e,t))}else s.push(B6)}}),"children"),s}(e,0,r,m,"fbt"===(null==(i=null==(n=a.openingElement)?void 0:n.name)?void 0:i.name)),g=a.children.some((e=>mte(e)));for(let e=y.length-2;e>=0;e--){let t=""===y[e]&&""===y[e+1],r=y[e]===B6&&""===y[e+1]&&y[e+2]===B6,n=(y[e]===M6||y[e]===B6)&&""===y[e+1]&&y[e+2]===m,i=y[e]===m&&""===y[e+1]&&(y[e+2]===M6||y[e+2]===B6),s=y[e]===m&&""===y[e+1]&&y[e+2]===m,a=y[e]===M6&&""===y[e+1]&&y[e+2]===B6||y[e]===B6&&""===y[e+1]&&y[e+2]===M6;r&&g||t||n||s||a?y.splice(e,2):i&&y.splice(e+1,2)}for(;y.length>0&&ote(V6(!1,y,-1));)y.pop();for(;y.length>1&&ote(y[0])&&ote(y[1]);)y.shift(),y.shift();let x=[];for(let[e,t]of y.entries()){if(t===m){if(1===e&&""===y[e-1]){if(2===y.length){x.push(f);continue}x.push([f,B6]);continue}if(e===y.length-1){x.push(f);continue}if(""===y[e-1]&&y[e-2]===B6){x.push(f);continue}}x.push(t),X6(t)&&(d=!0)}let b=g?w6(x):A6(x,{shouldBreak:!0});if("JSXText"===(null==(s=t.cursorNode)?void 0:s.type)&&a.children.includes(t.cursorNode)&&(b=[R6,b,R6]),h)return b;let S=A6([o,v6([B6,b]),B6,u]);return d?S:C6([A6([o,...y,u]),S])}function lte(e,t,r,n){return e?"":"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?1===t.length?M6:B6:M6}function cte(e,t,r,n){return e?B6:1===t.length?"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?B6:M6:B6}var pte=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function dte(e,t,r){return e.selfClosing?[L6,"/>"]:function(e,t,r){let n=e.attributes.length>0&&L7(V6(!1,e.attributes,-1),_7.Trailing);return 0===e.attributes.length&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}(e,t,r)?[">"]:[M6,">"]}function hte(e,t,r){return function(e,t,r){let{parent:n}=e;if(pte.has(n.type))return t;let i=e.match(void 0,(e=>"ArrowFunctionExpression"===e.type),n7,(e=>"JSXExpressionContainer"===e.type)),s=W7(e,r);return A6([s?"":k6("("),v6([M6,t]),M6,s?"":k6(")")],{shouldBreak:i})}(e,Z7(e,ute(e,t,r),t),t)}function fte(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return function(e,t,r){let{node:n}=e,i=[];if(i.push(r("name")),n.value){let s;if(V9(n.value)){let r=f7(n.value),i=X7(!1,X7(!1,r.slice(1,-1),"'","'"),""",'"'),a=nee(i,t.jsxSingleQuote);i='"'===a?X7(!1,i,'"',"""):X7(!1,i,"'","'"),s=e.call((()=>Z7(e,Q6(a+i+a),t)),"value")}else s=r("value");i.push("=",s)}return i}(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return U6(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return U6(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return function(e,t,r){let{node:n}=e;return["{",e.call((({node:n})=>{let i=["...",r()];return L7(n)&&ite(e)?[v6([M6,Z7(e,i,t)]),M6]:i}),"JSXSpreadAttribute"===n.type?"argument":"expression"),"}"]}(e,t,r);case"JSXExpressionContainer":return function(e,t,r){let{node:n}=e,i=(e,t)=>"JSXEmptyExpression"===e.type||!L7(e)&&(j9(e)||R9(e)||"ArrowFunctionExpression"===e.type||"AwaitExpression"===e.type&&(i(e.argument,e)||"JSXElement"===e.argument.type)||n7(e)||"ChainExpression"===e.type&&n7(e.expression)||"FunctionExpression"===e.type||"TemplateLiteral"===e.type||"TaggedTemplateExpression"===e.type||"DoExpression"===e.type||X9(t)&&("ConditionalExpression"===e.type||Y9(e)));return i(n.expression,e.parent)?A6(["{",r("expression"),F6,"}"]):A6(["{",v6([M6,r("expression")]),M6,F6,"}"])}(e,0,r);case"JSXFragment":case"JSXElement":return hte(e,t,r);case"JSXOpeningElement":return function(e,t,r){var n,i;let{node:s}=e,a=L7(s.name)||L7(s.typeParameters);if(s.selfClosing&&0===s.attributes.length&&!a)return["<",r("name"),r("typeParameters")," />"];if(1===(null==(n=s.attributes)?void 0:n.length)&&s.attributes[0].value&&V9(s.attributes[0].value)&&!s.attributes[0].value.value.includes("\n")&&!a&&!L7(s.attributes[0]))return A6(["<",r("name"),r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let o=null==(i=s.attributes)?void 0:i.some((e=>e.value&&V9(e.value)&&e.value.value.includes("\n"))),u=t.singleAttributePerLine&&s.attributes.length>1?B6:L6;return A6(["<",r("name"),r("typeParameters"),v6(e.map((()=>[u,r()]),"attributes")),...dte(s,t,a)],{shouldBreak:o})}(e,t,r);case"JSXClosingElement":return function(e,t,r){let{node:n}=e,i=[];i.push("</");let s=r("name");return L7(n.name,_7.Leading|_7.Line)?i.push(v6([B6,s]),B6):L7(n.name,_7.Leading|_7.Block)?i.push(" ",s):i.push(s),i.push(">"),i}(e,0,r);case"JSXOpeningFragment":case"JSXClosingFragment":return function(e,t){let{node:r}=e,n=L7(r),i=L7(r,_7.Line),s="JSXOpeningFragment"===r.type;return[s?"<":"</",v6([i?B6:n&&!s?" ":"",Y7(e,t)]),i?B6:"",">"]}(e,t);case"JSXEmptyExpression":return function(e,t){let{node:r}=e,n=L7(r,_7.Line);return[Y7(e,t,{indent:n}),n?B6:""]}(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new tee(n,"JSX")}}function mte(e){return"JSXText"===e.type&&(ate.hasNonWhitespaceCharacter(f7(e))||!/\n/.test(f7(e)))}var yte=function(e){return F7(e.node)||function(e){let{node:t,parent:r}=e;if(!X9(t)||!X9(r))return!1;let n,{index:i,siblings:s}=e;for(let e=i;e>0;e--){let t=s[e-1];if("JSXText"!==t.type||mte(t)){n=t;break}}return"JSXExpressionContainer"===(null==n?void 0:n.type)&&"JSXEmptyExpression"===n.expression.type&&F7(n.expression)}(e)},gte=0;function xte(e,t,r){var n;let{node:i,parent:s,grandparent:a,key:o}=e,u="body"!==o&&("IfStatement"===s.type||"WhileStatement"===s.type||"SwitchStatement"===s.type||"DoWhileStatement"===s.type),l="|>"===i.operator&&(null==(n=e.root.extra)?void 0:n.__isUsingHackPipeline),c=bte(e,r,t,!1,u);if(u)return c;if(l)return A6(c);if(n7(s)&&s.callee===i||"UnaryExpression"===s.type||i7(s)&&!s.computed)return A6([v6([M6,...c]),M6]);let p="ReturnStatement"===s.type||"ThrowStatement"===s.type||"JSXExpressionContainer"===s.type&&"JSXAttribute"===a.type||"|"!==i.operator&&"JsExpressionRoot"===s.type||"NGPipeExpression"!==i.type&&("NGRoot"===s.type&&"__ng_binding"===t.parser||"NGMicrosyntaxExpression"===s.type&&"NGMicrosyntax"===a.type&&1===a.body.length)||i===s.body&&"ArrowFunctionExpression"===s.type||i!==s.body&&"ForStatement"===s.type||"ConditionalExpression"===s.type&&"ReturnStatement"!==a.type&&"ThrowStatement"!==a.type&&!n7(a)||"TemplateLiteral"===s.type,d="AssignmentExpression"===s.type||"VariableDeclarator"===s.type||"ClassProperty"===s.type||"PropertyDefinition"===s.type||"TSAbstractPropertyDefinition"===s.type||"ClassPrivateProperty"===s.type||R7(s),h=Y9(i.left)&&T7(i.operator,i.left.operator);if(p||Ste(i)&&!h||!Ste(i)&&d)return A6(c);if(0===c.length)return"";let f=X9(i.right),m=c.findIndex((e=>"string"!=typeof e&&!Array.isArray(e)&&e.type===o6)),y=c.slice(0,-1===m?1:m+1),g=c.slice(y.length,f?-1:void 0),x=Symbol("logicalChain-"+ ++gte),b=A6([...y,v6(g)],{id:x});return f?A6([b,I6(V6(!1,c,-1),{groupId:x})]):b}function bte(e,t,r,n,i){var s;let{node:a}=e;if(!Y9(a))return[A6(t())];let o=[];T7(a.operator,a.left.operator)?o=e.call((e=>bte(e,t,r,!0,i)),"left"):o.push(A6(t("left")));let u,l=Ste(a),c=("|>"===a.operator||"NGPipeExpression"===a.type||function(e,t){return("__vue_expression"===t.parser||"__vue_ts_expression"===t.parser)&&Tte(e.node)&&!e.hasAncestor((e=>!Tte(e)&&"JsExpressionRoot"!==e.type))}(e,r))&&!s7(r.originalText,a.right),p="NGPipeExpression"===a.type?"|":a.operator,d="NGPipeExpression"===a.type&&a.arguments.length>0?A6(v6([M6,": ",U6([L6,": "],e.map((()=>P6(2,A6(t()))),"arguments"))])):"";if(l)u=[p," ",t("right"),d];else{let n="|>"===p&&(null==(s=e.root.extra)?void 0:s.__isUsingHackPipeline)?e.call((e=>bte(e,t,r,!0,i)),"right"):t("right");u=[c?L6:"",p,c?" ":L6,n,d]}let{parent:h}=e,f=L7(a.left,_7.Trailing|_7.Line),m=f||!(i&&"LogicalExpression"===a.type)&&h.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type;if(o.push(c?"":" ",m?A6(u,{shouldBreak:f}):u),n&&L7(a)){let t=Y6(Z7(e,o,r));return Array.isArray(t)||t.type===u6?q6(t):[t]}return o}function Ste(e){return"LogicalExpression"===e.type&&!!(R9(e.right)&&e.right.properties.length>0||j9(e.right)&&e.right.elements.length>0||X9(e.right))}var Tte=e=>"BinaryExpression"===e.type&&"|"===e.operator;var Ete=class extends Error{name="ArgExpansionBailout"};function vte(e,t,r){let{node:n}=e,i=[],s="TupleExpression"===n.type?"#[":"[",a="TupleTypeAnnotation"===n.type&&n.types?"types":"TSTupleType"===n.type||"TupleTypeAnnotation"===n.type?"elementTypes":"elements",o=n[a];if(0===o.length)i.push(function(e,t,r,n){let{node:i}=e;return L7(i,_7.Dangling)?A6([r,Y7(e,t,{indent:!0}),M6,n]):[r,n]}(e,t,s,"]"));else{let u=V6(!1,o,-1),l="RestElement"!==(null==u?void 0:u.type),c=null===u,p=Symbol("array"),d=!t.__inJestEach&&o.length>1&&o.every(((e,t,r)=>{let n=null==e?void 0:e.type;if(!j9(e)&&!R9(e))return!1;let i=r[t+1];if(i&&n!==i.type)return!1;let s=j9(e)?"elements":"properties";return e[s]&&e[s].length>1})),h=Pte(n,t),f=l?c?",":y7(t)?h?k6(",","",{groupId:p}):k6(","):"":"";i.push(A6([s,v6([M6,h?Cte(e,t,r,f):[Dte(e,t,a,r),f],Y7(e,t)]),M6,"]"],{shouldBreak:d,id:p}))}return i.push(yre(e),cre(e,r)),i}function Pte(e,t){return j9(e)&&e.elements.length>1&&e.elements.every((e=>e&&(U9(e)||$9(e)&&!L7(e.argument))&&!L7(e,_7.Trailing|_7.Line,(e=>!d9(t.originalText,b9(e),{backwards:!0})))))}function Ate({node:e},{originalText:t}){let r=e=>","===t[e]?e:r((e=>h9(t,f9(t,e)))(e+1));return m9(t,r(S9(e)))}function Dte(e,t,r,n){let i=[];return e.each((({node:r,isLast:s})=>{i.push(r?A6(n()):""),s||i.push([",",L6,r&&Ate(e,t)?M6:""])}),r),i}function Cte(e,t,r,n){let i=[];return e.each((({isLast:s,next:a})=>{i.push([r(),s?n:","]),s||i.push(Ate(e,t)?[B6,B6]:L7(a,_7.Leading|_7.Line)?B6:L6)}),"elements"),w6(i)}function wte(e,t=!1){return R9(e)&&(e.properties.length>0||L7(e))||j9(e)&&(e.elements.length>0||L7(e))||"TSTypeAssertion"===e.type&&wte(e.expression)||$7(e)&&wte(e.expression)||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&(!e.returnType||!e.returnType.typeAnnotation||"TSTypeReference"!==e.returnType.typeAnnotation.type||function(e){return"BlockStatement"===e.type&&(e.body.some((e=>"EmptyStatement"!==e.type))||L7(e,_7.Dangling))}(e.body))&&("BlockStatement"===e.body.type||"ArrowFunctionExpression"===e.body.type&&wte(e.body,!0)||R9(e.body)||j9(e.body)||!t&&(n7(e.body)||"ConditionalExpression"===e.body.type)||X9(e.body))||"DoExpression"===e.type||"ModuleExpression"===e.type}function kte(e){var t;if("ParenthesizedExpression"===e.type)return kte(e.expression);if($7(e)||"TypeCastExpression"===e.type){let{typeAnnotation:r}=e;return"TypeAnnotation"===r.type&&(r=r.typeAnnotation),"TSArrayType"===r.type&&(r=r.elementType,"TSArrayType"===r.type&&(r=r.elementType)),("GenericTypeAnnotation"===r.type||"TSTypeReference"===r.type)&&1===(null==(t=r.typeParameters)?void 0:t.params.length)&&(r=r.typeParameters.params[0]),e7(r)&&h7(e.expression,1)}return!(j7(e)&&w7(e).length>1)&&(Y9(e)?h7(e.left,1)&&h7(e.right,1):q9(e)||h7(e))}var Ite=function(e,t,r){let{node:n}=e,i=w7(n);if(0===i.length)return["(",Y7(e,t),")"];if(function(e){return 2===e.length&&"ArrowFunctionExpression"===e[0].type&&0===D7(e[0]).length&&"BlockStatement"===e[0].body.type&&"ArrayExpression"===e[1].type&&!e.some((e=>L7(e)))}(i))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let s=!1,a=i.length-1,o=[];k7(e,(({node:e},n)=>{let i=r();n===a||(B7(e,t)?(s=!0,i=[i,",",B6,B6]):i=[i,",",L6]),o.push(i)}));let u="ImportExpression"!==n.type&&"Import"!==n.callee.type&&y7(t,"all")?",":"";function l(){return A6(["(",v6([L6,...o]),u,L6,")"],{shouldBreak:!0})}if(s||"Decorator"!==e.parent.type&&function(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(J9(r)){if(t+=1,t>1)return!0}else if(n7(r))for(let e of r.arguments)if(J9(e))return!0;return!1}(i))return l();if(function(e){if(2!==e.length)return!1;let[t,r]=e;return!("ModuleExpression"!==t.type||!function(e){return"ObjectExpression"===e.type&&1===e.properties.length&&R7(e.properties[0])&&"Identifier"===e.properties[0].key.type&&"type"===e.properties[0].key.name&&V9(e.properties[0].value)&&"module"===e.properties[0].value.value}(r))||!L7(t)&&("FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"===t.body.type)&&"FunctionExpression"!==r.type&&"ArrowFunctionExpression"!==r.type&&"ConditionalExpression"!==r.type&&kte(r)&&!wte(r)}(i)){let e,t=o.slice(1);if(t.some(X6))return l();try{e=r(I7(n,0),{expandFirstArg:!0})}catch(e){if(e instanceof Ete)return l();throw e}return X6(e)?[_6,C6([["(",A6(e,{shouldBreak:!0}),", ",...t,")"],l()])]:C6([["(",e,", ",...t,")"],["(",A6(e,{shouldBreak:!0}),", ",...t,")"],l()])}if(function(e,t,r){var n,i;let s=V6(!1,e,-1);if(1===e.length){let e=V6(!1,t,-1);if(null!=(n=e.label)&&n.embed&&!1!==(null==(i=e.label)?void 0:i.hug))return!0}let a=V6(!1,e,-2);return!L7(s,_7.Leading)&&!L7(s,_7.Trailing)&&wte(s)&&(!a||a.type!==s.type)&&(2!==e.length||"ArrowFunctionExpression"!==a.type||!j9(s))&&!(e.length>1&&Pte(s,r))}(i,o,t)){let e,t=o.slice(0,-1);if(t.some(X6))return l();try{e=r(I7(n,-1),{expandLastArg:!0})}catch(e){if(e instanceof Ete)return l();throw e}return X6(e)?[_6,C6([["(",...t,A6(e,{shouldBreak:!0}),")"],l()])]:C6([["(",...t,e,")"],["(",...t,A6(e,{shouldBreak:!0}),")"],l()])}let c=["(",v6([M6,...o]),k6(u),M6,")"];return p7(e)?c:A6(c,{shouldBreak:o.some(X6)||s})};function Nte(e,t,r){let n=r("property"),{node:i}=e,s=yre(e);return i.computed?!i.property||U9(i.property)?[s,"[",n,"]"]:A6([s,"[",v6([M6,n]),M6,"]"]):[s,".",n]}var Fte=function(e,t,r){let{parent:n}=e,i=!n||"ExpressionStatement"===n.type,s=[];function a(e){let{originalText:r}=t,n=oee(r,S9(e));return")"===r.charAt(n)?!1!==n&&m9(r,n+1):B7(e,t)}function o(e){let{node:n}=e;n7(n)&&(Q9(n.callee)||n7(n.callee))?(s.unshift({node:n,printed:[Z7(e,[yre(e),Ere(e,t,r),Ite(e,t,r)],t),a(n)?B6:""]}),e.call((e=>o(e)),"callee")):Q9(n)?(s.unshift({node:n,needsParens:W7(e,t),printed:Z7(e,i7(n)?Nte(e,0,r):vre(e,t,r),t)}),e.call((e=>o(e)),"object")):"TSNonNullExpression"===n.type?(s.unshift({node:n,printed:Z7(e,"!",t)}),e.call((e=>o(e)),"expression")):s.unshift({node:n,printed:r()})}let{node:u}=e;s.unshift({node:u,printed:[yre(e),Ere(e,t,r),Ite(e,t,r)]}),u.callee&&e.call((e=>o(e)),"callee");let l=[],c=[s[0]],p=1;for(;p<s.length&&("TSNonNullExpression"===s[p].node.type||n7(s[p].node)||i7(s[p].node)&&s[p].node.computed&&U9(s[p].node.property));++p)c.push(s[p]);if(!n7(s[0].node))for(;p+1<s.length&&Q9(s[p].node)&&Q9(s[p+1].node);++p)c.push(s[p]);l.push(c),c=[];let d=!1;for(;p<s.length;++p){if(d&&Q9(s[p].node)){if(s[p].node.computed&&U9(s[p].node.property)){c.push(s[p]);continue}l.push(c),c=[],d=!1}(n7(s[p].node)||"ImportExpression"===s[p].node.type)&&(d=!0),c.push(s[p]),L7(s[p].node,_7.Trailing)&&(l.push(c),c=[],d=!1)}function h(e){return/^[A-Z]|^[$_]+$/.test(e)}c.length>0&&l.push(c);let f=l.length>=2&&!L7(l[1][0].node)&&function(e){var r;let n=null==(r=e[1][0])?void 0:r.node.computed;if(1===e[0].length){let r=e[0][0].node;return"ThisExpression"===r.type||"Identifier"===r.type&&(h(r.name)||i&&function(e){return e.length<=t.tabWidth}(r.name)||n)}let s=V6(!1,e[0],-1).node;return i7(s)&&"Identifier"===s.property.type&&(h(s.property.name)||n)}(l);function m(e){let t=e.map((e=>e.printed));return e.length>0&&V6(!1,e,-1).needsParens?["(",...t,")"]:t}let y=l.map(m),g=y,x=f?3:2,b=l.flat(),S=b.slice(1,-1).some((e=>L7(e.node,_7.Leading)))||b.slice(0,-1).some((e=>L7(e.node,_7.Trailing)))||l[x]&&L7(l[x][0].node,_7.Leading);if(l.length<=x&&!S)return p7(e)?g:A6(g);let T,E=V6(!1,l[f?1:0],-1).node,v=!n7(E)&&a(E),P=[m(l[0]),f?l.slice(1,2).map(m):"",v?B6:"",function(e){return 0===e.length?"":v6(A6([B6,U6(B6,e.map(m))]))}(l.slice(f?2:1))],A=s.map((({node:e})=>e)).filter(n7);return T=S||A.length>2&&A.some((e=>!e.arguments.every((e=>h7(e)))))||y.slice(0,-1).some(X6)||function(){let e=V6(!1,V6(!1,l,-1),-1).node,t=V6(!1,y,-1);return n7(e)&&X6(t)&&A.slice(0,-1).some((e=>e.arguments.some(J9)))}()?A6(P):[X6(g)||v?_6:"",C6([g,P])],$6({memberChain:!0},T)};function _te(e,t,r){var n;let{node:i,parent:s}=e,a="NewExpression"===i.type,o="ImportExpression"===i.type,u=yre(e),l=w7(i),c=1===l.length&&l7(l[0],t.originalText);if(c||l.length>0&&!a&&!o&&(function(e,t){if("Identifier"!==e.callee.type)return!1;if("require"===e.callee.name)return!0;if("define"===e.callee.name){let r=w7(e);return"ExpressionStatement"===t.type&&(1===r.length||2===r.length&&"ArrayExpression"===r[0].type||3===r.length&&V9(r[0])&&"ArrayExpression"===r[1].type)}return!1}(i,s)||r7(i,s))){let i=[];if(k7(e,(()=>{i.push(r())})),!c||null==(n=i[0].label)||!n.embed)return[a?"new ":"",r("callee"),u,Ere(e,t,r),"(",U6(", ",i),")"]}if(!o&&!a&&Q9(i.callee)&&!e.call((e=>W7(e,t)),"callee"))return Fte(e,t,r);let p=[a?"new ":"",o?"import":r("callee"),u,Ere(e,t,r),Ite(e,t,r)];return o||n7(i.callee)?A6(p):p}var Ote=function(e,t,r){let n='"'===t?"'":'"',i=X7(!1,e,/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t};var Lte=function(e,t){let r=e.slice(1,-1),n="json"===t.parser||"json5"===t.parser&&"preserve"===t.quoteProps&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":nee(r,t.singleQuote);return Ote(r,n,!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.__embeddedInHtml))};var Mte=function(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")};function Bte(e){return e.toLowerCase()}function jte({pattern:e,flags:t}){return`/${e}/${t=[...t].sort().join("")}`}function Rte(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}var Ute=C9(["Literal","BigIntLiteral","BooleanLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]);function $te(e,t,r,n,i,s){let a=function(e,t,r,n,i){let{node:s}=e,a=s[i];if(!a)return"only-left";let o=!Vte(a);if(e.match(Vte,qte,(e=>!o||"ExpressionStatement"!==e.type&&"VariableDeclaration"!==e.type)))return o?"ArrowFunctionExpression"===a.type&&"ArrowFunctionExpression"===a.body.type?"chain-tail-arrow-chain":"chain-tail":"chain";if(!o&&Vte(a.right)||s7(t.originalText,a))return"break-after-operator";if("CallExpression"===a.type&&"require"===a.callee.name||"json5"===t.parser||"json"===t.parser)return"never-break-after-operator";if(function(e){if(qte(e)){let t=e.left||e.id;return"ObjectPattern"===t.type&&t.properties.length>2&&t.properties.some((e=>{var t;return R7(e)&&(!e.shorthand||"AssignmentPattern"===(null==(t=e.value)?void 0:t.type))}))}return!1}(s)||function(e){let t=function(e){var t;if(Kte(e))return null==(t=e.typeParameters)?void 0:t.params}(e);if(t9(t)){let r="TSTypeAliasDeclaration"===e.type?"constraint":"bound";if(t.length>1&&t.some((e=>e[r]||e.default)))return!0}return!1}(s)||function(e){if("VariableDeclarator"!==e.type)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=Xte(t.typeAnnotation);return t9(r)&&r.length>1&&r.some((e=>t9(Xte(e))||"TSConditionalType"===e.type))}(s)||Jte(s)&&function(e){return J6(e,Z6,!1)}(n))return"break-lhs";let u=function(e,t,r){if(!R7(e))return!1;t=Y6(t);let n=3;return"string"==typeof t&&x9(t)<r.tabWidth+n}(s,n,t);return e.call((()=>function(e,t,r,n){let i=e.node;if(Y9(i)&&!Ste(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"ConditionalExpression":{let{test:e}=i;return Y9(e)&&!Ste(e)}case"ClassExpression":return t9(i.decorators)}if(n)return!1;let s=i,a=[];for(;;)if("UnaryExpression"===s.type)s=s.argument,a.push("argument");else{if("TSNonNullExpression"!==s.type)break;s=s.expression,a.push("expression")}return!(!V9(s)&&!e.call((()=>Hte(e,t,r)),...a))}(e,t,r,u)),i)?"break-after-operator":u||"TemplateLiteral"===a.type||"TaggedTemplateExpression"===a.type||"BooleanLiteral"===a.type||U9(a)||"ClassExpression"===a.type?"never-break-after-operator":"fluid"}(e,t,r,n,s),o=s?r(s,{assignmentLayout:a}):"";switch(a){case"break-after-operator":return A6([A6(n),i,A6(v6([L6,o]))]);case"never-break-after-operator":return A6([A6(n),i," ",o]);case"fluid":{let e=Symbol("assignment");return A6([A6(n),i,A6(v6(L6),{id:e}),F6,I6(o,{groupId:e})])}case"break-lhs":return A6([n,i," ",A6(o)]);case"chain":return[A6(n),i,L6,o];case"chain-tail":return[A6(n),i,v6([L6,o])];case"chain-tail-arrow-chain":return[A6(n),i,o];case"only-left":return n}}function Vte(e){return"AssignmentExpression"===e.type}function qte(e){return Vte(e)||"VariableDeclarator"===e.type}var Kte=C9(["TSTypeAliasDeclaration","TypeAlias"]);function Jte(e){var t;return"VariableDeclarator"===e.type&&"ArrowFunctionExpression"===(null==(t=e.init)?void 0:t.type)}var Wte=C9(["TSTypeReference","GenericTypeAnnotation"]);function Xte(e){var t;if(Wte(e))return null==(t=e.typeParameters)?void 0:t.params}function Hte(e,t,r,n=!1){var i;let{node:s}=e,a=()=>Hte(e,t,r,!0);if("ChainExpression"===s.type||"TSNonNullExpression"===s.type)return e.call(a,"expression");if(n7(s)){if(null!=(i=_te(e,t,r).label)&&i.memberChain)return!1;let n=w7(s);return!(!(0===n.length||1===n.length&&function(e,{printWidth:t}){if(L7(e))return!1;let r=t*zte;if("ThisExpression"===e.type||"Identifier"===e.type&&e.name.length<=r||$9(e)&&!L7(e.argument))return!0;let n="Literal"===e.type&&"regex"in e&&e.regex.pattern||"RegExpLiteral"===e.type&&e.pattern;return n?n.length<=r:V9(e)?f7(e).length<=r:"TemplateLiteral"===e.type?0===e.expressions.length&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes("\n"):Ute(e)}(n[0],t))||function(e,t){let r=function(e){var t;return null==(t=e.typeParameters??e.typeArguments)?void 0:t.params}(e);if(t9(r)){if(r.length>1)return!0;if(1===r.length){let e=r[0];if("TSUnionType"===e.type||"UnionTypeAnnotation"===e.type||"TSIntersectionType"===e.type||"IntersectionTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"ObjectTypeAnnotation"===e.type)return!0}if(X6(t(e.typeParameters?"typeParameters":"typeArguments")))return!0}return!1}(s,r))&&e.call(a,"callee")}return i7(s)?e.call(a,"object"):n&&("Identifier"===s.type||"ThisExpression"===s.type)}var zte=.25;function Gte(e,t,r,n,i){let s=e.node,a=D7(s),o=i?Ere(e,r,t):"";if(0===a.length)return[o,"(",Y7(e,r,{filter:e=>")"===uee(r.originalText,S9(e))}),")"];let{parent:u}=e,l=r7(u),c=Yte(s),p=[];if(function(e,t){let{node:r}=e,n=0,i=e=>t(e,n++);r.this&&e.call(i,"this"),Array.isArray(r.parameters)?e.each(i,"parameters"):Array.isArray(r.params)&&e.each(i,"params"),r.rest&&e.call(i,"rest")}(e,((e,n)=>{let i=n===a.length-1;i&&s.rest&&p.push("..."),p.push(t()),!i&&(p.push(","),l||c?p.push(" "):B7(a[n],r)?p.push(B6,B6):p.push(L6))})),n&&!function(e){return e.match((e=>"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type),((e,t)=>{if("CallExpression"===e.type&&"arguments"===t&&1===e.arguments.length&&"CallExpression"===e.callee.type){let t=e.callee.callee;return"Identifier"===t.type||"MemberExpression"===t.type&&!t.computed&&"Identifier"===t.object.type&&"Identifier"===t.property.type}return!1}),((e,t)=>"VariableDeclarator"===e.type&&"init"===t||"ExportDefaultDeclaration"===e.type&&"declaration"===t||"TSExportAssignment"===e.type&&"expression"===t||"AssignmentExpression"===e.type&&"right"===t&&"MemberExpression"===e.left.type&&"Identifier"===e.left.object.type&&"module"===e.left.object.name&&"Identifier"===e.left.property.type&&"exports"===e.left.property.name),(e=>"VariableDeclaration"!==e.type||"const"===e.kind&&1===e.declarations.length))}(e)){if(X6(o)||X6(p))throw new Ete;return A6([G6(o),"(",G6(p),")"])}let d=a.every((e=>!t9(e.decorators)));return c&&d||l?[o,"(",...p,")"]:(G9(u)||function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||T9(e,e.typeAnnotation))}(u)||"TypeAlias"===u.type||"UnionTypeAnnotation"===u.type||"TSUnionType"===u.type||"IntersectionTypeAnnotation"===u.type||"FunctionTypeAnnotation"===u.type&&u.returnType===s)&&1===a.length&&null===a[0].name&&s.this!==a[0]&&a[0].typeAnnotation&&null===s.typeParameters&&e7(a[0].typeAnnotation)&&!s.rest?"always"===r.arrowParens?["(",...p,")"]:p:[o,"(",v6([M6,...p]),k6(!P7(s)&&y7(r,"all")?",":""),M6,")"]}function Yte(e){if(!e)return!1;let t=D7(e);if(1!==t.length)return!1;let[r]=t;return!L7(r)&&("ObjectPattern"===r.type||"ArrayPattern"===r.type||"Identifier"===r.type&&r.typeAnnotation&&("TypeAnnotation"===r.typeAnnotation.type||"TSTypeAnnotation"===r.typeAnnotation.type)&&K9(r.typeAnnotation.typeAnnotation)||"FunctionTypeParam"===r.type&&K9(r.typeAnnotation)&&r!==e.rest||"AssignmentPattern"===r.type&&("ObjectPattern"===r.left.type||"ArrayPattern"===r.left.type)&&("Identifier"===r.right.type||R9(r.right)&&0===r.right.properties.length||j9(r.right)&&0===r.right.elements.length))}function Qte(e,t){var r;let n=function(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}(e);if(!n)return!1;let i=null==(r=e.typeParameters)?void 0:r.params;if(i){if(i.length>1)return!1;if(1===i.length){let e=i[0];if(e.constraint||e.default)return!1}}return 1===D7(e).length&&(K9(n)||X6(t))}function Zte(e){if(e7(e)||K9(e))return!0;if("UnionTypeAnnotation"===e.type||"TSUnionType"===e.type){let t=e.types.filter((e=>"VoidTypeAnnotation"===e.type||"TSVoidKeyword"===e.type||"NullLiteralTypeAnnotation"===e.type||"TSNullKeyword"===e.type)).length,r=e.types.some((e=>"ObjectTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)),n=e.types.some((e=>L7(e)));if(e.types.length-1===t&&r&&!n)return!0}return!1}function ere(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[bre(e)];return s.push("type ",r("id"),r("typeParameters")),[$te(e,t,r,s," =","TSTypeAliasDeclaration"===i.type?"typeAnnotation":"right"),n]}function tre(e,t,r){let n=!1;return A6(e.map((({isFirst:e,previous:t,node:i,index:s})=>{let a=r();if(e)return a;let o=K9(i),u=K9(t);return u&&o?[" & ",n?v6(a):a]:u||o?(s>1&&(n=!0),[" & ",s>1?v6(a):a]):v6([" &",L6,a])}),"types"))}function rre(e,t,r){let{node:n}=e,{parent:i}=e,s=!("TypeParameterInstantiation"===i.type||"TSTypeParameterInstantiation"===i.type||"GenericTypeAnnotation"===i.type||"TSTypeReference"===i.type||"TSTypeAssertion"===i.type||"TupleTypeAnnotation"===i.type||"TSTupleType"===i.type||"FunctionTypeParam"===i.type&&!i.name&&e.grandparent.this!==i||("TypeAlias"===i.type||"VariableDeclarator"===i.type||"TSTypeAliasDeclaration"===i.type)&&s7(t.originalText,n)),a=Zte(n),o=e.map((e=>{let n=r();return a||(n=P6(2,n)),Z7(e,n,t)}),"types");if(a)return U6(" | ",o);let u=[k6([s&&!s7(t.originalText,n)?L6:"","| "]),U6([L6,"| "],o)];return W7(e,t)?A6([v6(u),M6]):("TupleTypeAnnotation"===i.type||"TSTupleType"===i.type)&&i["TupleTypeAnnotation"===i.type&&i.types?"types":"elementTypes"].length>1?A6([v6([k6(["(",M6]),u]),M6,k6(")")]):A6(s?v6(u):u)}function nre(e,t,r){let{node:n}=e,i=[Tre(e)];("TSConstructorType"===n.type||"TSConstructSignatureDeclaration"===n.type)&&i.push("new ");let s=Gte(e,r,t,!1,!0),a=[];return"FunctionTypeAnnotation"===n.type?a.push(function(e){var t;let{node:r,parent:n}=e;return"FunctionTypeAnnotation"===r.type&&(G9(n)||!(("ObjectTypeProperty"===n.type||"ObjectTypeInternalSlot"===n.type)&&!n.variance&&!n.optional&&T9(n,r)||"ObjectTypeCallProperty"===n.type||"DeclareFunction"===(null==(t=e.getParentNode(2))?void 0:t.type)))}(e)?" => ":": ",r("returnType")):a.push(cre(e,r,n.returnType?"returnType":"typeAnnotation")),Qte(n,a)&&(s=A6(s)),i.push(s,a),A6(i)}function ire(e,t,r){return[r("objectType"),yre(e),"[",r("indexType"),"]"]}function sre(e,t,r){return["infer ",r("typeParameter")]}function are(e,t,r){let{node:n}=e;return[n.postfix?"":r,cre(e,t),n.postfix?r:""]}function ore(e,t,r){let{node:n}=e;return["...",..."TupleTypeSpreadElement"===n.type&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function ure(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var lre=new WeakSet;function cre(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let i=!1;if("TSTypeAnnotation"===n.type||"TypeAnnotation"===n.type){let t=e.call(pre,r);("=>"===t||":"===t&&L7(n,_7.Leading))&&(i=!0),lre.add(n)}return i?[" ",t(r)]:t(r)}var pre=e=>e.match((e=>"TSTypeAnnotation"===e.type),((e,t)=>!("returnType"!==t&&"typeAnnotation"!==t||"TSFunctionType"!==e.type&&"TSConstructorType"!==e.type)))?"=>":e.match((e=>"TSTypeAnnotation"===e.type),((e,t)=>"typeAnnotation"===t&&("TSJSDocNullableType"===e.type||"TSJSDocNonNullableType"===e.type||"TSTypePredicate"===e.type)))||e.match((e=>"TypeAnnotation"===e.type),((e,t)=>"typeAnnotation"===t&&"Identifier"===e.type),((e,t)=>"id"===t&&"DeclareFunction"===e.type))||e.match((e=>"TypeAnnotation"===e.type),((e,t)=>"bound"===t&&"TypeParameter"===e.type&&e.usesExtendsBound))?"":":";function dre(e,t,r){let n=pre(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function hre(e){return[e("elementType"),"[]"]}function fre({node:e},t){return["typeof ",..."TSTypeQuery"===e.type?[t("exprName"),t("typeParameters")]:[t("argument")]]}function mre(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",cre(e,t)]:""]}function yre(e){let{node:t}=e;return!t.optional||"Identifier"===t.type&&t===e.parent.key?"":n7(t)||i7(t)&&t.computed||"OptionalIndexedAccessType"===t.type?"?.":"?"}function gre(e){return e.node.definite||e.match(void 0,((e,t)=>"id"===t&&"VariableDeclarator"===e.type&&e.definite))?"!":""}var xre=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function bre(e){let{node:t}=e;return t.declare||xre.has(t.type)&&"DeclareExportDeclaration"!==e.parent.type?"declare ":""}var Sre=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Tre({node:e}){return e.abstract||Sre.has(e.type)?"abstract ":""}function Ere(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function vre(e,t,r){return["::",r("callee")]}function Pre(e,t,r){return"EmptyStatement"===e.type?";":"BlockStatement"===e.type||r?[" ",t]:v6([L6,t])}function Are(e,t){return["...",t("argument"),cre(e,t)]}function Dre(e){return e.accessibility?e.accessibility+" ":""}function Cre(e,t,r){let{node:n}=e;return A6([U6(L6,e.map(r,"decorators")),kre(n,t)?B6:L6])}function wre(e,t,r){return Ire(e.node)?[U6(B6,e.map(r,"declaration","decorators")),B6]:""}function kre(e,t){return e.decorators.some((e=>d9(t.originalText,S9(e))))}function Ire(e){var t;if("ExportDefaultDeclaration"!==e.type&&"ExportNamedDeclaration"!==e.type&&"DeclareExportDeclaration"!==e.type)return!1;let r=null==(t=e.declaration)?void 0:t.decorators;return t9(r)&&T9(e,r[0])}var Nre=e=>"ExportDefaultDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&e.default;function Fre(e,t,r){let{node:n}=e,i=[wre(e,0,r),bre(e),"export",Nre(n)?" default":""],{declaration:s,exported:a}=n;return L7(n,_7.Dangling)&&(i.push(" ",Y7(e,t)),c7(n)&&i.push(B6)),s?i.push(" ",r("declaration")):(i.push(function(e){return Ore(e.exportKind)}(n)),"ExportAllDeclaration"===n.type||"DeclareExportAllDeclaration"===n.type?(i.push(" *"),a&&i.push(" as ",r("exported"))):i.push(Bre(e,t,r)),i.push(Mre(e,t,r),Rre(e,t,r))),i.push(function(e,t){return t.semi&&(!e.declaration||Nre(e)&&!_re(e.declaration))?";":""}(n,t)),i}var _re=C9(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function Ore(e,t=!0){return e&&"value"!==e?`${t?" ":""}${e}${t?"":" "}`:""}function Lre(e,t){return Ore(e.importKind,t)}function Mre(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return jre(n,t)||i.push(" from"),i.push(" ",r("source")),i}function Bre(e,t,r){let{node:n}=e;if(jre(n,t))return"";let i=[" "];if(t9(n.specifiers)){let s=[],a=[];e.each((()=>{let t=e.node.type;if("ExportNamespaceSpecifier"===t||"ExportDefaultSpecifier"===t||"ImportNamespaceSpecifier"===t||"ImportDefaultSpecifier"===t)s.push(r());else{if("ExportSpecifier"!==t&&"ImportSpecifier"!==t)throw new tee(n,"specifier");a.push(r())}}),"specifiers"),i.push(U6(", ",s)),a.length>0&&(s.length>0&&i.push(", "),a.length>1||s.length>0||n.specifiers.some((e=>L7(e)))?i.push(A6(["{",v6([t.bracketSpacing?L6:M6,U6([",",L6],a)]),k6(y7(t)?",":""),t.bracketSpacing?L6:M6,"}"])):i.push(["{",t.bracketSpacing?" ":"",...a,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function jre(e,t){let{type:r,importKind:n,source:i,specifiers:s}=e;return"ImportDeclaration"===r&&!t9(s)&&"type"!==n&&!/{\s*}/.test(t.originalText.slice(b9(e),b9(i)))}function Rre(e,t,r){var n;let{node:i}=e,s=t9(i.attributes)?"attributes":t9(i.assertions)?"assertions":void 0;return s?[` ${"assertions"===s||null!=(n=i.extra)&&n.deprecatedAssertSyntax?"assert":"with"} {`,t.bracketSpacing?" ":"",U6(", ",e.map(r,s)),t.bracketSpacing?" ":"","}"]:""}function Ure(e,t,r){let{node:n}=e,{type:i}=n,s=i.startsWith("Import"),a=s?"imported":"local",o=s?"local":"exported",u=n[a],l=n[o],c="",p="";return"ExportNamespaceSpecifier"===i||"ImportNamespaceSpecifier"===i?c="*":u&&(c=r(a)),l&&!function(e){if("ImportSpecifier"!==e.type&&"ExportSpecifier"!==e.type)return!1;let{local:t,["ImportSpecifier"===e.type?"imported":"exported"]:r}=e;if(t.type!==r.type||!E9(t,r))return!1;if(V9(t))return t.value===r.value&&f7(t)===f7(r);if("Identifier"===t.type)return t.name===r.name;return!1}(n)&&(p=r(o)),[Ore("ImportSpecifier"===i?n.importKind:n.exportKind,!1),c,c&&p?" as ":"",p]}function $re(e,t,r){let{node:n}=e,i="ConditionalExpression"===n.type,s=i?"alternate":"falseType",{parent:a}=e,o=i?r("test"):[r("checkType")," ","extends"," ",r("extendsType")];return a.type===n.type&&a[s]===n?P6(2,o):o}var Vre=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"]]);function qre(e,t,r){let n,i,{node:s}=e,a="ConditionalExpression"===s.type,o=a?"consequent":"trueType",u=a?"alternate":"falseType",l=a?["test"]:["checkType","extendsType"],c=s[o],p=s[u],d=[],h=!1,{parent:f}=e,m=f.type===s.type&&l.some((e=>f[e]===s)),y=f.type===s.type&&!m,g=0;do{i=n||s,n=e.getParentNode(g),g++}while(n&&n.type===s.type&&l.every((e=>n[e]!==i)));let x=n||f,b=i;if(a&&(X9(s[l[0]])||X9(c)||X9(p)||function(e){let t=[e];for(let e=0;e<t.length;e++){let r=t[e];for(let e of["test","consequent","alternate"]){let n=r[e];if(X9(n))return!0;"ConditionalExpression"===n.type&&t.push(n)}}return!1}(b))){h=!0,y=!0;let e=e=>[k6("("),v6([M6,e]),M6,k6(")")],t=e=>"NullLiteral"===e.type||"Literal"===e.type&&null===e.value||"Identifier"===e.type&&"undefined"===e.name;d.push(" ? ",t(c)?r(o):e(r(o))," : ",p.type===s.type||t(p)?r(u):e(r(u)))}else{let e=[L6,"? ",c.type===s.type?k6("","("):"",P6(2,r(o)),c.type===s.type?k6("",")"):"",L6,": ",p.type===s.type?r(u):P6(2,r(u))];d.push(f.type!==s.type||f[u]===s||m?e:t.useTabs?function(e){return P6(-1,e)}(v6(e)):P6(Math.max(0,t.tabWidth-2),e))}let S=[o,u,...l].some((e=>L7(s[e],(e=>w9(e)&&lee(t.originalText,b9(e),S9(e)))))),T=!h&&(i7(f)||"NGPipeExpression"===f.type&&f.left===s)&&!f.computed,E=function(e){let{node:t}=e;if("ConditionalExpression"!==t.type)return!1;let r,n=t;for(let t=0;!r;t++){let i=e.getParentNode(t);"ChainExpression"===i.type&&i.expression===n||n7(i)&&i.callee===n||i7(i)&&i.object===n||"TSNonNullExpression"===i.type&&i.expression===n?n=i:"NewExpression"===i.type&&i.callee===n||$7(i)&&i.expression===n?(r=e.getParentNode(t+1),n=i):r=i}return n!==t&&r[Vre.get(r.type)]===n}(e),v=(e=>f===x?A6(e,{shouldBreak:S}):S?[e,_6]:e)([$re(e,0,r),y?d:v6(d),a&&T&&!E?M6:""]);return m||E?A6([v6([M6,v]),M6]):v}var Kre=function(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n};var Jre=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:Kre(e.slice(r+1).match(/^[\t ]*/)[0],t)};var Wre=Symbol("MODE_BREAK"),Xre=Symbol("MODE_FLAT"),Hre=Symbol("cursor");function zre(e,t){return Yre(e,{type:"indent"},t)}function Gre(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?Yre(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:Yre(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function Yre(e,t,r){let n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,a=0,o=0;for(let e of n)switch(e.type){case"indent":c(),r.useTabs?u(1):l(r.tabWidth);break;case"stringAlign":c(),i+=e.n,s+=e.n.length;break;case"numberAlign":a+=1,o+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),{...e,value:i,length:s,queue:n};function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function l(e){i+=" ".repeat(e),s+=e}function c(){r.useTabs?(a>0&&u(a),d()):p()}function p(){o>0&&l(o),d()}function d(){a=0,o=0}}function Qre(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==Hre)for(let r=i.length-1;r>=0;r--){let s=i[r];if(" "!==s&&"\t"!==s){e[n]=i.slice(0,r+1);break e}t++}else r++}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Hre);return t}function Zre(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=[e],u=[];for(;r>=0;){if(0===o.length){if(0===a)return!0;o.push(t[--a]);continue}let{mode:e,doc:l}=o.pop();switch(g6(l)){case t6:u.push(l),r-=x9(l);break;case r6:case u6:{let t=q6(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case i6:case s6:case c6:case f6:o.push({mode:e,doc:l.contents});break;case a6:r+=Qre(u);break;case o6:{if(s&&l.break)return!1;let t=l.break?Wre:e,r=l.expandedStates&&t===Wre?V6(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case l6:{let t=(l.groupId?i[l.groupId]||Xre:e)===Wre?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case h6:if(e===Wre||l.hard)return!0;l.soft||(u.push(" "),r--);break;case p6:n=!0;break;case d6:if(n)return!1}}return!1}function ene(e,t){let r={},n=t.printWidth,i=function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:Wre,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];T6(e,(function(e){if(e.type===m6&&H6(r),e.type===o6){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===o6&&r.pop().break&&H6(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(g6(d)){case t6:{let e="\n"!==i?X7(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=x9(e));break}case r6:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case n6:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(Hre),c++;break;case i6:a.push({ind:zre(e,t),mode:p,doc:d.contents});break;case s6:a.push({ind:Gre(e,d.n,t),mode:p,doc:d.contents});break;case a6:s-=Qre(o);break;case o6:switch(p){case Xre:if(!u){a.push({ind:e,mode:d.break?Wre:Xre,doc:d.contents});break}case Wre:{u=!1;let t={ind:e,mode:Xre,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&Zre(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=V6(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:Wre,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:Wre,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:Xre,doc:t};if(Zre(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:Wre,doc:d.contents});break}}d.id&&(r[d.id]=V6(!1,a,-1).mode);break;case u6:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:Xre,doc:o},h={ind:e,mode:Wre,doc:o},f=Zre(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:Xre,doc:u},y={ind:e,mode:Wre,doc:u};if(2===i.length){f?a.push(m,c):a.push(y,h);break}i.splice(0,2);let g={ind:e,mode:p,doc:w6(i)},x=i[0];Zre({ind:e,mode:Xre,doc:[o,u,x]},[],t,l.length>0,r,!0)?a.push(g,m,c):f?a.push(g,y,c):a.push(g,y,h);break}case l6:case c6:{let t=d.groupId?r[d.groupId]:p;if(t===Wre){let t=d.type===l6?d.breakContents:d.negate?d.contents:v6(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===Xre){let t=d.type===l6?d.flatContents:d.negate?v6(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case p6:l.push({ind:e,mode:p,doc:d.contents});break;case d6:l.length>0&&a.push({ind:e,mode:p,doc:O6});break;case h6:switch(p){case Xre:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case Wre:if(l.length>0){a.push({ind:e,mode:p,doc:d},...l.reverse()),l.length=0;break}d.literal?e.root?(o.push(i,e.root.value),s=e.root.length):(o.push(i),s=0):(s-=Qre(o),o.push(i+e.value),s=e.length)}break;case f6:a.push({ind:e,mode:p,doc:d.contents});break;case m6:break;default:throw new b6(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(Hre);if(-1!==p){let e=o.indexOf(Hre,p+1),t=o.slice(0,p).join(""),r=o.slice(p+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}function tne(e,t,r){let{node:n}=e;if("TemplateLiteral"===n.type&&function({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return"TaggedTemplateExpression"===t.type&&t.quasi===e&&"MemberExpression"===t.tag.type&&"Identifier"===t.tag.property.type&&"each"===t.tag.property.name&&("Identifier"===t.tag.object.type&&r.test(t.tag.object.name)||"MemberExpression"===t.tag.object.type&&"Identifier"===t.tag.object.property.type&&("only"===t.tag.object.property.name||"skip"===t.tag.object.property.name)&&"Identifier"===t.tag.object.object.type&&r.test(t.tag.object.object.name))}(e)){let n=function(e,t,r){let{node:n}=e,i=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(i.length>1||i.some((e=>e.length>0))){t.__inJestEach=!0;let s=e.map(r,"expressions");t.__inJestEach=!1;let a=[],o=s.map((e=>"${"+ene(e,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}")),u=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<n.quasis.length;e++){let t=V6(!1,u,-1),r=o[e-1];t.cells.push(r),r.includes("\n")&&(t.hasLineBreak=!0),n.quasis[e].value.raw.includes("\n")&&u.push({hasLineBreak:!1,cells:[]})}let l=Math.max(i.length,...u.map((e=>e.cells.length))),c=Array.from({length:l}).fill(0),p=[{cells:i},...u.filter((e=>e.cells.length>0))];for(let{cells:e}of p.filter((e=>!e.hasLineBreak)))for(let[t,r]of e.entries())c[t]=Math.max(c[t],x9(r));return a.push(F6,"`",v6([B6,U6(B6,p.map((e=>U6(" | ",e.cells.map(((t,r)=>e.hasLineBreak?t:t+" ".repeat(c[r]-x9(t))))))))]),B6,"`"),a}}(e,r,t);if(n)return n}let i="expressions";"TSTemplateLiteralType"===n.type&&(i="types");let s=[],a=e.map(t,i),o=function(e){let t="expressions";"TSTemplateLiteralType"===e.type&&(t="types");let r=e[t];return 0!==r.length&&r.every((e=>{if(L7(e))return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if("ChainExpression"===e.type&&(e=e.expression),i7(e)){let t=e;for(;i7(t);)if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type||(t=t.object,L7(t)))return!1;return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))}(n);o&&(a=a.map((e=>ene(e,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted))),s.push(F6,"`");let u=0;return e.each((({index:e,node:l})=>{if(s.push(t()),l.tail)return;let{tabWidth:c}=r,p=l.value.raw,d=p.includes("\n")?Jre(p,c):u;u=d;let h=a[e];if(!o){let t=n[i][e];(L7(t)||i7(t)||"ConditionalExpression"===t.type||"SequenceExpression"===t.type||$7(t)||Y9(t))&&(h=[v6([M6,h]),M6])}let f=0===d&&p.endsWith("\n")?P6(Number.NEGATIVE_INFINITY,h):function(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=v6(n);n=P6(t%r,n),n=P6(Number.NEGATIVE_INFINITY,n)}return n}(h,d,c);s.push(A6(["${",f,F6,"}"]))}),"quasis"),s.push("`"),s}function rne(e,t){return e.map((e=>function(e,t){let{node:r}=e,n=t();return L7(r)&&(n=A6([v6([M6,n]),M6])),["${",n,F6,"}"]}(e,t)),"expressions")}function nne(e,t){return K6(e,(e=>"string"==typeof e?t?X7(!1,e,/(\\*)`/g,"$1$1\\`"):ine(e):e))}function ine(e){return X7(!1,e,/([\\`]|\${)/g,"\\$1")}var sne=function(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}};function ane(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function one(e,t){return"+"===e||"-"===e?e+t:t}var une=sne("typeParameters");function lne(e,t,r,n){let{node:i}=e;if(!i[n])return"";if(!Array.isArray(i[n]))return r(n);let s=e.getNode(2),a=s&&r7(s),o=e.match((e=>!(1===e[n].length&&K9(e[n][0]))),void 0,((e,t)=>"typeAnnotation"===t),(e=>"Identifier"===e.type),Jte);if(0===i[n].length||!o&&(a||1===i[n].length&&("NullableTypeAnnotation"===i[n][0].type||Zte(i[n][0]))))return["<",U6(", ",e.map(r,n)),cne(e,t),">"];let u="TSTypeParameterInstantiation"===i.type?"":function(e,t,r){let{node:n}=e;return 1===D7(n).length&&n.type.startsWith("TS")&&!n[r][0].constraint&&"ArrowFunctionExpression"===e.parent.type&&!(t.filepath&&/\.ts$/.test(t.filepath))}(e,t,n)?",":y7(t)?k6(","):"";return A6(["<",v6([M6,U6([",",L6],e.map(r,n))]),u,M6,">"],{id:une(i)})}function cne(e,t){let{node:r}=e;if(!L7(r,_7.Dangling))return"";let n=!L7(r,_7.Line),i=Y7(e,t,{indent:!n});return n?i:[i,B6]}function pne(e,t,r){let{node:n,parent:i}=e,s=["TSTypeParameter"===n.type&&n.const?"const ":""],a="TSTypeParameter"===n.type?r("name"):n.name;if("TSMappedType"===i.type)return i.readonly&&s.push(one(i.readonly,"readonly")," "),s.push("[",a),n.constraint&&s.push(" in ",r("constraint")),i.nameType&&s.push(" as ",e.callParent((()=>r("nameType")))),s.push("]"),s;if(n.variance&&s.push(r("variance")),n.in&&s.push("in "),n.out&&s.push("out "),s.push(a),n.bound&&(n.usesExtendsBound&&s.push(" extends "),s.push(cre(e,r,"bound"))),n.constraint){let e=Symbol("constraint");s.push(" extends",A6(v6(L6),{id:e}),F6,I6(r("constraint"),{groupId:e}))}return n.default&&s.push(" = ",r("default")),A6(s)}var dne=()=>{};dne.ok=dne,dne.strictEqual=dne;var hne=dne,fne=new WeakMap;function mne(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if("consistent"===t.quoteProps&&!fne.has(i)){let e=(i.properties||i.body||i.members).some((e=>!e.computed&&e.key&&V9(e.key)&&!a7(e,t)));fne.set(i,e)}if(("Identifier"===s.type||U9(s)&&o7(Mte(f7(s)))&&String(s.value)===Mte(f7(s))&&"typescript"!==t.parser&&"babel-ts"!==t.parser)&&("json"===t.parser||"consistent"===t.quoteProps&&fne.get(i))){let r=Lte(JSON.stringify("Identifier"===s.type?s.name:s.value.toString()),t);return e.call((e=>Z7(e,r,t)),"key")}return a7(n,t)&&("as-needed"===t.quoteProps||"consistent"===t.quoteProps&&!fne.get(i))?e.call((e=>Z7(e,/^\d/.test(s.value)?Mte(s.value):s.value,t)),"key"):r("key")}var yne=e=>"FunctionExpression"===e.node.type&&"value"===e.key&&(e=>"ObjectMethod"===e.type||"ClassMethod"===e.type||"ClassPrivateMethod"===e.type||"MethodDefinition"===e.type||"TSAbstractMethodDefinition"===e.type||"TSDeclareMethod"===e.type||("Property"===e.type||"ObjectProperty"===e.type)&&(e.method||"get"===e.kind||"set"===e.kind))(e.parent);function gne(e,t,r,n){if(yne(e))return bne(e,r,t);let{node:i}=e,s=!1;if(("FunctionDeclaration"===i.type||"FunctionExpression"===i.type)&&null!=n&&n.expandLastArg){let{parent:t}=e;n7(t)&&(w7(t).length>1||D7(i).every((e=>"Identifier"===e.type&&!e.typeAnnotation)))&&(s=!0)}let a=[bre(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],o=Gte(e,t,r,s),u=Tne(e,t),l=Qte(i,u);return a.push(Ere(e,0,t),A6([l?A6(o):o,u]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&a.push(";"),a}function xne(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,a=[];return i&&"init"!==i&&"method"!==i&&"constructor"!==i?(hne.ok("get"===i||"set"===i),a.push(i," ")):s.async&&a.push("async "),s.generator&&a.push("*"),a.push(mne(e,t,r),n.optional||n.key.optional?"?":"",n===s?bne(e,t,r):r("value")),a}function bne(e,t,r){let{node:n}=e,i=Gte(e,r,t),s=Tne(e,r),a=function(e){let t=D7(e);return t.length>1&&t.some((e=>"TSParameterProperty"===e.type))}(n),o=Qte(n,s),u=[Ere(e,0,r),A6([a?A6(i,{shouldBreak:!0}):o?A6(i):i,s])];return n.body?u.push(" ",r("body")):u.push(t.semi?";":""),u}function Sne(e,t){if("always"===t.arrowParens)return!1;if("avoid"===t.arrowParens){let{node:t}=e;return function(e){let t=D7(e);return!(1!==t.length||e.typeParameters||L7(e,_7.Dangling)||"Identifier"!==t[0].type||t[0].typeAnnotation||L7(t[0])||t[0].optional||e.predicate||e.returnType)}(t)}return!1}function Tne(e,t){let{node:r}=e,n=[cre(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function Ene(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let e=r("argument");!function(e,t){if(s7(e.originalText,t)||L7(t,_7.Leading,(t=>lee(e.originalText,b9(t),S9(t))))&&!X9(t))return!0;if(_9(t)){let r,n=t;for(;r=O9(n);)if(n=r,s7(e.originalText,n))return!0}return!1}(t,n.argument)?(Y9(n.argument)||"SequenceExpression"===n.argument.type)&&(e=A6([k6("("),v6([M6,e]),M6,k6(")")])):e=["(",v6([B6,e]),B6,")"],s.push(" ",e)}let a=L7(n,_7.Dangling),o=i&&a&&L7(n,_7.Last|_7.Line);return o&&s.push(i),a&&s.push(" ",Y7(e,t)),o||s.push(i),s}var vne=C9(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Pne(e,t,r){let{node:n}=e,i=[bre(e),Tre(e),"class"],s=L7(n.id,_7.Trailing)||L7(n.typeParameters,_7.Trailing)||L7(n.superClass)||t9(n.extends)||t9(n.mixins)||t9(n.implements),a=[],o=[];if(n.id&&a.push(" ",r("id")),a.push(r("typeParameters")),n.superClass){let n=[kne(e,t,r),r("superTypeParameters")],i=e.call((e=>["extends ",Z7(e,n,t)]),"superClass");s?o.push(L6,A6(i)):o.push(" ",i)}else o.push(wne(e,t,r,"extends"));if(o.push(wne(e,t,r,"mixins"),wne(e,t,r,"implements")),s){let e;e=Cne(n)?[...a,v6(o)]:v6([...a,o]),i.push(A6(e,{id:Ane(n)}))}else i.push(...a,...o);return i.push(" ",r("body")),i}var Ane=sne("heritageGroup");function Dne(e){return k6(B6,"",{groupId:Ane(e)})}function Cne(e){return e.typeParameters&&!L7(e.typeParameters,_7.Trailing|_7.Line)&&!function(e){return["extends","mixins","implements"].reduce(((t,r)=>t+(Array.isArray(e[r])?e[r].length:0)),e.superClass?1:0)>1}(e)}function wne(e,t,r,n){let{node:i}=e;if(!t9(i[n]))return"";let s=Y7(e,t,{marker:n});return[Cne(i)?k6(" ",L6,{groupId:une(i.typeParameters)}):L6,s,s&&B6,n,A6(v6([L6,U6([",",L6],e.map(r,n))]))]}function kne(e,t,r){let n=r("superClass"),{parent:i}=e;return"AssignmentExpression"===i.type?A6(k6(["(",v6([M6,n]),M6,")"],n)):n}function Ine(e,t,r){let{node:n}=e,i=[];return t9(n.decorators)&&i.push(Cre(e,t,r)),i.push(Dre(n)),n.static&&i.push("static "),i.push(Tre(e)),n.override&&i.push("override "),i.push(xne(e,t,r)),i}function Nne(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";return t9(n.decorators)&&i.push(Cre(e,t,r)),i.push(Dre(n),bre(e)),n.static&&i.push("static "),i.push(Tre(e)),n.override&&i.push("override "),n.readonly&&i.push("readonly "),n.variance&&i.push(r("variance")),("ClassAccessorProperty"===n.type||"AccessorProperty"===n.type||"TSAbstractAccessorProperty"===n.type)&&i.push("accessor "),i.push(mne(e,t,r),yre(e),gre(e),cre(e,r)),[$te(e,t,r,i," =","TSAbstractPropertyDefinition"===n.type||"TSAbstractAccessorProperty"===n.type?void 0:"value"),s]}function Fne(e,t,r){let{node:n}=e,i=[];return e.each((({node:e,next:n,isLast:s})=>{i.push(r()),!t.semi&&vne(e)&&function(e,t){var r;let{type:n,name:i}=e.key;if(!(e.computed||"Identifier"!==n||"static"!==i&&"get"!==i&&"set"!==i||e.value||e.typeAnnotation))return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let e=null==(r=t.key)?void 0:r.name;if("in"===e||"instanceof"===e)return!0}if(vne(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||"get"===t.kind||"set"===t.kind)return!1;let e=t.value?t.value.generator:t.generator;return!(!t.computed&&!e)}case"TSIndexSignature":return!0}return!1}(e,n)&&i.push(";"),s||(i.push(B6),B7(e,t)&&i.push(B6))}),"body"),L7(n,_7.Dangling)&&i.push(Y7(e,t)),[t9(n.body)?Dne(e.parent):"","{",i.length>0?[v6([B6,i]),B6]:"","}"]}function _ne(e,t,r){var n;let i=t.semi?";":"",{node:s}=e,a="ObjectTypeAnnotation"===s.type,o="TSEnumDeclaration"===s.type||"EnumBooleanBody"===s.type||"EnumNumberBody"===s.type||"EnumStringBody"===s.type||"EnumSymbolBody"===s.type,u=["TSTypeLiteral"===s.type||o?"members":"TSInterfaceBody"===s.type?"body":"properties"];a&&u.push("indexers","callProperties","internalSlots");let l=u.flatMap((t=>e.map((({node:e})=>({node:e,printed:r(),loc:b9(e)})),t)));u.length>1&&l.sort(((e,t)=>e.loc-t.loc));let{parent:c,key:p}=e,d=a&&"body"===p&&("InterfaceDeclaration"===c.type||"DeclareInterface"===c.type||"DeclareClass"===c.type),h="TSInterfaceBody"===s.type||o||d||"ObjectPattern"===s.type&&"FunctionDeclaration"!==c.type&&"FunctionExpression"!==c.type&&"ArrowFunctionExpression"!==c.type&&"ObjectMethod"!==c.type&&"ClassMethod"!==c.type&&"ClassPrivateMethod"!==c.type&&"AssignmentPattern"!==c.type&&"CatchClause"!==c.type&&s.properties.some((e=>e.value&&("ObjectPattern"===e.value.type||"ArrayPattern"===e.value.type)))||"ObjectPattern"!==s.type&&l.length>0&&lee(t.originalText,b9(s),l[0].loc),f=d?";":"TSInterfaceBody"===s.type||"TSTypeLiteral"===s.type?k6(i,";"):",",m="RecordExpression"===s.type?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",g=[],x=l.map((e=>{let r=[...g,A6(e.printed)];return g=[f,L6],("TSPropertySignature"===e.node.type||"TSMethodSignature"===e.node.type||"TSConstructSignatureDeclaration"===e.node.type||"TSCallSignatureDeclaration"===e.node.type)&&L7(e.node,_7.PrettierIgnore)&&g.shift(),B7(e.node,t)&&g.push(B6),r}));if(s.inexact||s.hasUnknownMembers){let r;if(L7(s,_7.Dangling)){let n=L7(s,_7.Line);r=[Y7(e,t),n||d9(t.originalText,S9(V6(!1,M7(s),-1)))?B6:L6,"..."]}else r=["..."];x.push([...g,...r])}let b,S=null==(n=V6(!1,l,-1))?void 0:n.node,T=!(s.inexact||s.hasUnknownMembers||S&&("RestElement"===S.type||("TSPropertySignature"===S.type||"TSCallSignatureDeclaration"===S.type||"TSMethodSignature"===S.type||"TSConstructSignatureDeclaration"===S.type)&&L7(S,_7.PrettierIgnore)));if(0===x.length){if(!L7(s,_7.Dangling))return[m,y,cre(e,r)];b=A6([m,Y7(e,t,{indent:!0}),M6,y,yre(e),cre(e,r)])}else b=[d&&t9(s.properties)?Dne(c):"",m,v6([t.bracketSpacing?L6:M6,...x]),k6(T&&(","!==f||y7(t))?f:""),t.bracketSpacing?L6:M6,y,yre(e),cre(e,r)];return e.match((e=>"ObjectPattern"===e.type&&!t9(e.decorators)),One)||K9(s)&&(e.match(void 0,((e,t)=>"typeAnnotation"===t),((e,t)=>"typeAnnotation"===t),One)||e.match(void 0,((e,t)=>"FunctionTypeParam"===e.type&&"typeAnnotation"===t),One))||!h&&e.match((e=>"ObjectPattern"===e.type),(e=>"AssignmentExpression"===e.type||"VariableDeclarator"===e.type))?b:A6(b,{shouldBreak:h})}function One(e,t){return("params"===t||"parameters"===t||"this"===t||"rest"===t)&&Yte(e)}var Lne=new WeakMap;function Mne(e){return Lne.has(e)||Lne.set(e,"ConditionalExpression"===e.type&&!g7(e,(e=>"ObjectExpression"===e.type))),Lne.get(e)}var Bne=e=>"SequenceExpression"===e.type;function jne(e,t,r,n={}){let i,s,a=[],o=[],u=!1,l=!n.expandLastArg&&"ArrowFunctionExpression"===e.node.body.type;!function c(){let{node:p}=e,d=function(e,t,r,n){let{node:i}=e,s=[];if(i.async&&s.push("async "),Sne(e,t))s.push(r(["params",0]));else{let i=n.expandLastArg||n.expandFirstArg,a=Tne(e,r);if(i){if(X6(a))throw new Ete;a=A6(G6(a))}s.push(A6([Gte(e,r,t,i,!0),a]))}let a=Y7(e,t,{filter(e){let r=oee(t.originalText,S9(e));return!1!==r&&"=>"===t.originalText.slice(r,r+2)}});return a&&s.push(" ",a),s}(e,t,r,n);if(0===a.length)a.push(d);else{let{leading:r,trailing:n}=Q7(e,t);a.push([r,d]),o.unshift(n)}l&&(u||(u=p.returnType&&D7(p).length>0||p.typeParameters||D7(p).some((e=>"Identifier"!==e.type)))),l&&"ArrowFunctionExpression"===p.body.type?e.call(c,"body"):(i=r("body",n),s=p.body)}();let c,p=!s7(t.originalText,s)&&(Bne(s)||function(e,t,r){var n,i;return j9(e)||R9(e)||"ArrowFunctionExpression"===e.type||"DoExpression"===e.type||"BlockStatement"===e.type||X9(e)||!1!==(null==(n=t.label)?void 0:n.hug)&&((null==(i=t.label)?void 0:i.embed)||l7(e,r.originalText))}(s,i,t)||!u&&Mne(s)),d="callee"===e.key&&j7(e.parent),h=Symbol("arrow-chain"),f=function(e,t,{signatureDocs:r,shouldBreak:n}){if(1===r.length)return r[0];let{parent:i,key:s}=e;return"callee"!==s&&j7(i)||Y9(i)?A6([r[0]," =>",v6([L6,U6([" =>",L6],r.slice(1))])],{shouldBreak:n}):"callee"===s&&j7(i)||t.assignmentLayout?A6(U6([" =>",L6],r),{shouldBreak:n}):A6(v6(U6([" =>",L6],r)),{shouldBreak:n})}(e,n,{signatureDocs:a,shouldBreak:u}),m=!1;return l&&(d||n.assignmentLayout)&&(m=!0,c="chain-tail-arrow-chain"===n.assignmentLayout||d&&!p),i=function(e,t,r,{bodyDoc:n,bodyComments:i,functionBody:s,shouldPutBodyOnSameLine:a}){let{node:o,parent:u}=e,l=r.expandLastArg&&y7(t,"all")?k6(","):"",c=!r.expandLastArg&&"JSXExpressionContainer"!==u.type||L7(o)?"":M6;return a&&Mne(s)?[" ",A6([k6("","("),v6([M6,n]),k6("",")"),l,c]),i]:(Bne(s)&&(n=A6(["(",v6([M6,n]),M6,")"])),a?[" ",n,i]:[v6([L6,n,i]),l,c])}(e,t,n,{bodyDoc:i,bodyComments:o,functionBody:s,shouldPutBodyOnSameLine:p}),A6([A6(m?v6([M6,f]):f,{shouldBreak:c,id:h})," =>",l?I6(i,{groupId:h}):A6(i),l&&d?k6(M6,"",{groupId:h}):""])}function Rne(e,t,r,n){let{node:i}=e,s=[],a=function(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if("EmptyStatement"!==r.type)return r}}(i[n]);return e.each((({node:e})=>{"EmptyStatement"!==e.type&&(s.push(r()),e!==a&&(s.push(B6),B7(e,t)&&s.push(B6)))}),n),s}function Une(e,t,r){let{node:n}=e,i=[];"StaticBlock"===n.type&&i.push("static "),i.push("{");let s=$ne(e,t,r);if(s)i.push(v6([B6,s]),B6);else{let{parent:t}=e,r=e.grandparent;"ArrowFunctionExpression"===t.type||"FunctionExpression"===t.type||"FunctionDeclaration"===t.type||"ObjectMethod"===t.type||"ClassMethod"===t.type||"ClassPrivateMethod"===t.type||"ForStatement"===t.type||"WhileStatement"===t.type||"DoWhileStatement"===t.type||"DoExpression"===t.type||"CatchClause"===t.type&&!r.finalizer||"TSModuleDeclaration"===t.type||"TSDeclareFunction"===t.type||"StaticBlock"===n.type||i.push(B6)}return i.push("}"),i}function $ne(e,t,r){var n;let{node:i}=e,s=t9(i.directives),a=i.body.some((e=>"EmptyStatement"!==e.type)),o=L7(i,_7.Dangling);if(!s&&!a&&!o)return"";let u=[];return s&&(u.push(Rne(e,t,r,"directives")),(a||o)&&(u.push(B6),B7(V6(!1,i.directives,-1),t)&&u.push(B6))),a&&u.push(Rne(e,t,r,"body")),o&&u.push(Y7(e,t)),"Program"===i.type&&"ModuleExpression"!==(null==(n=e.parent)?void 0:n.type)&&u.push(B6),u}function Vne(e,t){if(t.semi||Kne(e,t)||Wne(e,t))return!1;let{node:r,key:n,parent:i}=e;return!("ExpressionStatement"!==r.type||("body"!==n||"Program"!==i.type&&"BlockStatement"!==i.type&&"StaticBlock"!==i.type&&"TSModuleBlock"!==i.type)&&("consequent"!==n||"SwitchCase"!==i.type)||!e.call((()=>qne(e,t)),"expression"))}function qne(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!Sne(e,t))return!0;break;case"UnaryExpression":{let{prefix:e,operator:t}=r;if(e&&("+"===t||"-"===t))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(X9(r))return!0}return!!W7(e,t)||!!_9(r)&&e.call((()=>qne(e,t)),...L9(r))}function Kne({node:e,parent:t},r){return("markdown"===r.parentParser||"mdx"===r.parentParser)&&"ExpressionStatement"===e.type&&X9(e.expression)&&"Program"===t.type&&1===t.body.length}function Jne(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return Jne(e.object)}return!1;case"Identifier":return!0;default:return!1}}function Wne({node:e,parent:t},r){return("__vue_event_binding"===r.parser||"__vue_ts_event_binding"===r.parser)&&"ExpressionStatement"===e.type&&"Program"===t.type&&1===t.body.length}function Xne(e,t,r){let n=[r("expression")];return Wne(e,t)?Jne(e.node.expression)&&n.push(";"):Kne(e,t)||t.semi&&n.push(";"),L7(e.node,_7.Dangling,(({marker:e})=>e===U7))&&n.push(" ",Y7(e,t,{marker:U7})),n}function Hne(e,t,r,n){let{node:i}=e;if(Ute(i))return function(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return jte(r);case"BigIntLiteral":return Bte(r.extra.raw);case"NumericLiteral":return Mte(r.extra.raw);case"StringLiteral":return Q6(Lte(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Mte(r.value)+"m";case"DirectiveLiteral":return Rte(r.extra.raw,t);case"Literal":{if(r.regex)return jte(r.regex);if(r.bigint)return Bte(r.raw);if(r.decimal)return Mte(r.decimal)+"m";let{value:n}=r;return"number"==typeof n?Mte(r.raw):"string"==typeof n?function(e){if("expression"!==e.key)return;let{parent:t}=e;return"ExpressionStatement"===t.type&&t.directive}(e)?Rte(r.raw,t):Q6(Lte(r.raw,t)):String(n)}}}(e,t);let s=t.semi?";":"",a=[];switch(i.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),B6];case"File":return function(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(1===n.length)return n[0];let i=U6([",",L6],n);return t.__isVueForBindingLeft?["(",v6([M6,A6(i)]),M6,")"]:i}if(t.__isEmbeddedTypescriptGenericParameters){let t=e.map(r,"program","body",0,"typeParameters","params");return U6([",",L6],t)}}(e,t,r)??r("program");case"Program":return $ne(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return Xne(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return L7(i.expression)||!R9(i.expression)&&!j9(i.expression)?A6(["(",v6([M6,r("expression")]),M6,")"]):["(",r("expression"),")"];case"AssignmentExpression":return function(e,t,r){let{node:n}=e;return $te(e,t,r,r("left"),[" ",n.operator],"right")}(e,t,r);case"VariableDeclarator":return function(e,t,r){return $te(e,t,r,r("id")," =","init")}(e,t,r);case"BinaryExpression":case"LogicalExpression":return xte(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return function(e,t,r){var n;let i=r("object"),s=Nte(e,0,r),{node:a,parent:o}=e,u=e.findAncestor((e=>!(i7(e)||"TSNonNullExpression"===e.type))),l=u&&("NewExpression"===u.type||"BindExpression"===u.type||"AssignmentExpression"===u.type&&"Identifier"!==u.left.type)||a.computed||"Identifier"===a.object.type&&"Identifier"===a.property.type&&!i7(o)||("AssignmentExpression"===o.type||"VariableDeclarator"===o.type)&&(n7(a.object)&&a.object.arguments.length>0||"TSNonNullExpression"===a.object.type&&n7(a.object.expression)&&a.object.expression.arguments.length>0||(null==(n=i.label)?void 0:n.memberChain));return $6(i.label,[i,l?s:A6(v6([M6,s]))])}(e,0,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&a.push(r("object")),a.push(A6(v6([M6,vre(0,0,r)]))),a;case"Identifier":return[i.name,yre(e),gre(e),cre(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return Are(e,r);case"FunctionDeclaration":case"FunctionExpression":return gne(e,r,t,n);case"ArrowFunctionExpression":return jne(e,t,r,n);case"YieldExpression":return a.push("yield"),i.delegate&&a.push("*"),i.argument&&a.push(" ",r("argument")),a;case"AwaitExpression":if(a.push("await"),i.argument){a.push(" ",r("argument"));let{parent:t}=e;if(n7(t)&&t.callee===i||i7(t)&&t.object===i){a=[v6([M6,...a]),M6];let t=e.findAncestor((e=>"AwaitExpression"===e.type||"BlockStatement"===e.type));if("AwaitExpression"!==(null==t?void 0:t.type)||!g7(t.argument,(e=>e===i)))return A6(a)}}return a;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return Fre(e,t,r);case"ImportDeclaration":return function(e,t,r){let{node:n}=e;return["import",n.module?" module":"",Lre(n),Bre(e,t,r),Mre(e,t,r),Rre(e,t,r),t.semi?";":""]}(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Ure(e,0,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return Une(e,t,r);case"ClassBody":return Fne(e,t,r);case"ThrowStatement":return function(e,t,r){return["throw",Ene(e,t,r)]}(e,t,r);case"ReturnStatement":return function(e,t,r){return["return",Ene(e,t,r)]}(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return _te(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return _ne(e,t,r);case"ObjectProperty":case"Property":return i.method||"get"===i.kind||"set"===i.kind?xne(e,t,r):function(e,t,r){let{node:n}=e;return n.shorthand?r("value"):$te(e,t,r,mne(e,t,r),":","value")}(e,t,r);case"ObjectMethod":return xne(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return vte(e,t,r);case"SequenceExpression":{let{parent:t}=e;if("ExpressionStatement"===t.type||"ForStatement"===t.type){let t=[];return e.each((({isFirst:e})=>{e?t.push(r()):t.push(",",v6([L6,r()]))}),"expressions"),A6(t)}return A6(U6([",",L6],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),s];case"UnaryExpression":return a.push(i.operator),/[a-z]$/.test(i.operator)&&a.push(" "),L7(i.argument)?a.push(A6(["(",v6([M6,r("argument")]),M6,")"])):a.push(r("argument")),a;case"UpdateExpression":return a.push(r("argument"),i.operator),i.prefix&&a.reverse(),a;case"ConditionalExpression":return qre(e,t,r);case"VariableDeclaration":{let t,n=e.map(r,"declarations"),o=e.parent,u="ForStatement"===o.type||"ForInStatement"===o.type||"ForOfStatement"===o.type,l=i.declarations.some((e=>e.init));return 1!==n.length||L7(i.declarations[0])?n.length>0&&(t=v6(n[0])):t=n[0],a=[bre(e),i.kind,t?[" ",t]:"",v6(n.slice(1).map((e=>[",",l&&!u?B6:L6,e])))],u&&o.body!==i||a.push(s),A6(a)}case"WithStatement":return A6(["with (",r("object"),")",Pre(i.body,r("body"))]);case"IfStatement":{let n=Pre(i.consequent,r("consequent")),s=A6(["if (",A6([v6([M6,r("test")]),M6]),")",n]);if(a.push(s),i.alternate){let n=L7(i.consequent,_7.Trailing|_7.Line)||c7(i),s="BlockStatement"===i.consequent.type&&!n;a.push(s?" ":B6),L7(i,_7.Dangling)&&a.push(Y7(e,t),n?B6:" "),a.push("else",A6(Pre(i.alternate,r("alternate"),"IfStatement"===i.alternate.type)))}return a}case"ForStatement":{let n=Pre(i.body,r("body")),s=Y7(e,t),a=s?[s,M6]:"";return i.init||i.test||i.update?[a,A6(["for (",A6([v6([M6,r("init"),";",L6,r("test"),";",L6,r("update")]),M6]),")",n])]:[a,A6(["for (;;)",n])]}case"WhileStatement":return A6(["while (",A6([v6([M6,r("test")]),M6]),")",Pre(i.body,r("body"))]);case"ForInStatement":return A6(["for (",r("left")," in ",r("right"),")",Pre(i.body,r("body"))]);case"ForOfStatement":return A6(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",Pre(i.body,r("body"))]);case"DoWhileStatement":return a=[A6(["do",Pre(i.body,r("body"))])],"BlockStatement"===i.body.type?a.push(" "):a.push(B6),a.push("while (",A6([v6([M6,r("test")]),M6]),")",s),a;case"DoExpression":return[i.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return a.push("BreakStatement"===i.type?"break":"continue"),i.label&&a.push(" ",r("label")),a.push(s),a;case"LabeledStatement":return"EmptyStatement"===i.body.type?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),i.handler?[" ",r("handler")]:"",i.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(i.param){let e=L7(i.param,(e=>!w9(e)||e.leading&&d9(t.originalText,S9(e))||e.trailing&&d9(t.originalText,b9(e),{backwards:!0}))),n=r("param");return["catch ",e?["(",v6([M6,n]),M6,") "]:["(",n,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[A6(["switch (",v6([M6,r("discriminant")]),M6,")"])," {",i.cases.length>0?v6([B6,U6(B6,e.map((({node:e,isLast:n})=>[r(),!n&&B7(e,t)?B6:""]),"cases"))]):"",B6,"}"];case"SwitchCase":{i.test?a.push("case ",r("test"),":"):a.push("default:"),L7(i,_7.Dangling)&&a.push(" ",Y7(e,t));let n=i.consequent.filter((e=>"EmptyStatement"!==e.type));if(n.length>0){let i=Rne(e,t,r,"consequent");a.push(1===n.length&&"BlockStatement"===n[0].type?[" ",i]:v6([B6,i]))}return a}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return Pne(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return Ine(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return Nne(e,t,r);case"TemplateElement":return Q6(i.value.raw);case"TemplateLiteral":return tne(e,r,t);case"TaggedTemplateExpression":return function(e){let t=e("quasi");return $6(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),F6,t])}(r);case"PrivateIdentifier":return["#",i.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{a.push("module {");let e=r("body");return e&&a.push(v6([B6,e]),B6),a.push("}"),a}default:throw new tee(i,"ESTree")}}function zne(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),L7(n.node)?" //"+M7(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return xte(e,t,r);case"NGChainedExpression":return A6(U6([";",L6],e.map((()=>function({node:e}){return F9(e,Yne)}(e)?r():["(",r(),")"]),"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map((()=>[e.isFirst?"":Gne(e)?" ":[";",L6],r()]),"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),null===n.alias?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:t,parent:i}=e,s=Gne(e)||(1===t&&("then"===n.key.name||"else"===n.key.name)||2===t&&"else"===n.key.name&&"NGMicrosyntaxKeyedExpression"===i.body[t-1].type&&"then"===i.body[t-1].key.name)&&"NGMicrosyntaxExpression"===i.body[0].type;return[r("key"),s?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),null===n.value?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new tee(n,"Angular")}}function Gne({node:e,index:t,parent:r}){return"NGMicrosyntaxKeyedExpression"===e.type&&"of"===e.key.name&&1===t&&"NGMicrosyntaxLet"===r.body[0].type&&null===r.body[0].value}var Yne=C9(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function Qne(e,t,r){let{node:n}=e,i=[bre(e),"interface"],s=[],a=[];"InterfaceTypeAnnotation"!==n.type&&s.push(" ",r("id"),r("typeParameters"));let o=n.typeParameters&&!L7(n.typeParameters,_7.Trailing|_7.Line);return t9(n.extends)&&a.push(o?k6(" ",L6,{groupId:une(n.typeParameters)}):L6,"extends ",(1===n.extends.length?m7:v6)(U6([",",L6],e.map(r,"extends")))),L7(n.id,_7.Trailing)||t9(n.extends)?o?i.push(A6([...s,v6(a)])):i.push(A6(v6([...s,...a]))):i.push(...s,...a),i.push(" ",r("body")),A6(i)}function Zne(e,t,r){return _ne(e,r,t)}function eie(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let i="";return r.initializer&&(i=t("initializer")),r.init&&(i=t("init")),i?[n," = ",i]:n}function tie(e,t,r){let{node:n}=e;return[bre(e),n.const?"const ":"","enum ",t("id")," ","TSEnumDeclaration"===n.type?Zne(e,t,r):t("body")]}function rie(e,t,r){let{node:n}=e;if(I9(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"DeclareClass":return Pne(e,t,r);case"DeclareFunction":return[bre(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",cre(e,r),i];case"DeclareVariable":return[bre(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return Fre(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return function(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[bre(e),"opaque type ",r("id"),r("typeParameters")];return i.supertype&&s.push(": ",r("supertype")),i.impltype&&s.push(" = ",r("impltype")),s.push(n),s}(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return ere(e,t,r);case"IntersectionTypeAnnotation":return tre(e,0,r);case"UnionTypeAnnotation":return rre(e,t,r);case"ConditionalTypeAnnotation":return qre(e,t,r);case"InferTypeAnnotation":return sre(0,0,r);case"FunctionTypeAnnotation":return nre(e,t,r);case"TupleTypeAnnotation":return vte(e,t,r);case"TupleTypeLabeledElement":return ure(e,0,r);case"TupleTypeSpreadElement":return ore(e,0,r);case"GenericTypeAnnotation":return[r("id"),lne(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return ire(e,0,r);case"TypeAnnotation":return dre(e,0,r);case"TypeParameter":return pne(e,0,r);case"TypeofTypeAnnotation":return fre(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return hre(r);case"DeclareEnum":case"EnumDeclaration":return tie(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return function(e,t,r){let n,{node:i}=e;if("EnumSymbolBody"===i.type||i.explicitType)switch(i.type){case"EnumBooleanBody":n="boolean";break;case"EnumNumberBody":n="number";break;case"EnumStringBody":n="string";break;case"EnumSymbolBody":n="symbol"}return[n?`of ${n} `:"",Zne(e,t,r)]}(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return eie(e,r);case"FunctionTypeParam":{let t=n.name?r("name"):e.parent.this===n?"this":"";return[t,yre(e),t?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return Qne(e,0,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:e}=n;return hne.ok("plus"===e||"minus"===e),"plus"===e?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return function(e,t,r){let{node:n}=e;return A6([n.variance?r("variance"):"","[",v6([r("keyTparam")," in ",r("sourceType")]),"]",ane(n.optional),": ",r("propType")])}(e,0,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let i="";return n.proto?i="proto ":n.static&&(i="static "),[i,H9(n)?n.kind+" ":"",n.variance?r("variance"):"",mne(e,t,r),yre(e),z9(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return _ne(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",yre(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return Are(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return Q6(Lte(f7(n),t));case"NumberLiteralTypeAnnotation":return Mte(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return Bte(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),cre(e,r),")"];case"TypePredicate":return mre(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return lne(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return["predicate"!==e.key||"DeclareFunction"===e.parent.type||e.parent.returnType?" ":": ","%checks",..."DeclaredPredicate"===n.type?["(",r("value"),")"]:[]]}}function nie(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if(N9(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",a=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let e=!(j9(i.expression)||R9(i.expression)),t=A6(["<",v6([M6,r("typeAnnotation")]),M6,">"]),n=[k6("("),v6([M6,r("expression")]),M6,k6(")")];return e?C6([[t,r("expression")],[t,A6(n,{shouldBreak:!0})],[t,r("expression")]]):A6([t,r("expression")])}case"TSDeclareFunction":return gne(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Une(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return _ne(e,t,r);case"TSTypeAliasDeclaration":return ere(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Ine(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Nne(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return tne(e,r,t);case"TSNamedTupleMember":return ure(e,0,r);case"TSRestType":return ore(e,0,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return Qne(e,0,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return lne(e,t,r,"params");case"TSTypeParameter":return pne(e,0,r);case"TSAsExpression":case"TSSatisfiesExpression":{let t="TSAsExpression"===i.type?"as":"satisfies";a.push(r("expression"),` ${t} `,r("typeAnnotation"));let{parent:n}=e;return n7(n)&&n.callee===i||i7(n)&&n.object===i?A6([v6([M6,...a]),M6]):a}case"TSArrayType":return hre(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",mne(e,t,r),yre(e),cre(e,r)];case"TSParameterProperty":return[Dre(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return fre(e,r);case"TSIndexSignature":{let n=i.parameters.length>1?k6(y7(t)?",":""):"",a=A6([v6([M6,U6([", ",M6],e.map(r,"parameters"))]),n,M6]),o="ClassBody"===e.parent.type&&"body"===e.key;return[o&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?a:"","]",cre(e,r),o?s:""]}case"TSTypePredicate":return mre(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r("argument"),")",i.qualifier?[".",r("qualifier")]:"",lne(e,t,r,i.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return ire(e,0,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return function(e,t,r){let{node:n}=e,i=lee(t.originalText,b9(n),b9(n.typeParameter));return A6(["{",v6([t.bracketSpacing?L6:M6,A6([r("typeParameter"),n.optional?one(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?k6(";"):""]),Y7(e,t),t.bracketSpacing?L6:M6,"}"],{shouldBreak:i})}(e,t,r);case"TSMethodSignature":{let n=i.kind&&"method"!==i.kind?`${i.kind} `:"";a.push(Dre(i),n,i.computed?"[":"",r("key"),i.computed?"]":"",yre(e));let s=Gte(e,r,t,!1,!0),o=i.returnType?"returnType":"typeAnnotation",u=i[o],l=u?cre(e,r,o):"",c=Qte(i,l);return a.push(c?A6(s):s),u&&a.push(A6(l)),A6(a)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return tie(e,r,t);case"TSEnumMember":return eie(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",Lre(i,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:o}=e,u="TSModuleDeclaration"===o.type,l="TSModuleDeclaration"===(null==(n=i.body)?void 0:n.type);if(u)a.push(".");else if(a.push(bre(e)),"global"!==i.kind&&!i.global){let e=i.kind??(V9(i.id)||/(?:^|\s)module(?:\s|$)/.test(t.originalText.slice(b9(i),b9(i.id)))?"module":"namespace");a.push(e," ")}return a.push(r("id")),l?a.push(r("body")):i.body?a.push(" ",A6(r("body"))):a.push(s),a}case"TSConditionalType":return qre(e,t,r);case"TSInferType":return sre(0,0,r);case"TSIntersectionType":return tre(e,0,r);case"TSUnionType":return rre(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return nre(e,t,r);case"TSTupleType":return vte(e,t,r);case"TSTypeReference":return[r("typeName"),lne(e,t,r,"typeParameters")];case"TSTypeAnnotation":return dre(e,0,r);case"TSEmptyBodyFunctionExpression":return bne(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return are(e,r,"?");case"TSJSDocNonNullableType":return are(e,r,"!");default:throw new tee(i,"TypeScript")}}var iie=C9(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);var sie=function(e,t,r,n){var i;e.isRoot&&(null==(i=t.__onHtmlBindingRoot)||i.call(t,e.node,t));let s=function(e,t,r,n){if(yte(e))return e6(e,t);for(let i of[zne,fte,rie,nie,Hne]){let s=i(e,t,r,n);if(void 0!==s)return s}}(e,t,r,n);if(!s)return"";let{node:a}=e;if(iie(a))return s;let o=t9(a.decorators),u=function(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!t9(s)||Ire(i)||yte(e))return"";let a="ClassExpression"===n.type||"ClassDeclaration"===n.type||kre(n,t);return["declaration"===e.key&&B9(i)?B6:a?_6:"",U6(L6,e.map(r,"decorators")),L6]}(e,t,r),l="ClassExpression"===a.type;if(o&&!l)return e9(s,(e=>A6([u,e])));let c=W7(e,t),p=Vne(e,t);return u||c||p?e9(s,(e=>[p?";":"",c?"(":"",c&&l&&o?[v6([L6,u,e]),L6]:[u,e],c?")":""])):s},aie=[(e,t)=>"ObjectExpression"===e.type&&"properties"===t,(e,t)=>"CallExpression"===e.type&&"Identifier"===e.callee.type&&"Component"===e.callee.name&&"arguments"===t,(e,t)=>"Decorator"===e.type&&"expression"===t];function oie(e,t){return L7(e,_7.Block|_7.Leading,(({value:e})=>e===` ${t} `))}async function uie(e,t,r){let{node:n}=r,i=n.quasis.map((e=>e.value.raw)),s=0,a=i.reduce(((e,t,r)=>0===r?t:e+"@prettier-placeholder-"+s+++"-id"+t),""),o=function(e,t){if(!t9(t))return e;let r=0,n=K6(Y6(e),(e=>"string"==typeof e&&e.includes("@prettier-placeholder")?e.split(/@prettier-placeholder-(\d+)-id/).map(((e,n)=>n%2==0?Q6(e):(r++,t[e]))):e));return t.length===r?n:null}(await e(a,{parser:"scss"}),rne(r,t));if(!o)throw new Error("Couldn't insert all the expressions");return["`",v6([B6,o]),M6,"`"]}function lie(e){return"Identifier"===e.type&&"styled"===e.name}function cie(e){return/^[A-Z]/.test(e.object.name)&&"extend"===e.property.name}var pie=function(e){if(function({node:e,parent:t,grandparent:r}){return r&&e.quasis&&"JSXExpressionContainer"===t.type&&"JSXElement"===r.type&&"style"===r.openingElement.name.name&&r.openingElement.attributes.some((e=>"jsx"===e.name.name))||"TaggedTemplateExpression"===(null==t?void 0:t.type)&&"Identifier"===t.tag.type&&"css"===t.tag.name||"TaggedTemplateExpression"===(null==t?void 0:t.type)&&"MemberExpression"===t.tag.type&&"css"===t.tag.object.name&&("global"===t.tag.property.name||"resolve"===t.tag.property.name)}(e)||function({parent:e}){if(!e||"TaggedTemplateExpression"!==e.type)return!1;let t="ParenthesizedExpression"===e.tag.type?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return lie(t.object)||cie(t);case"CallExpression":return lie(t.callee)||"MemberExpression"===t.callee.type&&("MemberExpression"===t.callee.object.type&&(lie(t.callee.object.object)||cie(t.callee.object))||"CallExpression"===t.callee.object.type&&lie(t.callee.object.callee));case"Identifier":return"css"===t.name;default:return!1}}(e)||function({parent:e,grandparent:t}){return"JSXAttribute"===(null==t?void 0:t.type)&&"JSXExpressionContainer"===e.type&&"JSXIdentifier"===t.name.type&&"css"===t.name.name}(e)||function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>j9(e)&&"elements"===t),((e,t)=>R7(e)&&"Identifier"===e.key.type&&"styles"===e.key.name&&"value"===t),...aie)}(e))return uie};async function die(e,t,r){let{node:n}=r,i=n.quasis.length,s=rne(r,t),a=[];for(let t=0;t<i;t++){let r=0===t,o=t===i-1,u=n.quasis[t].value.cooked,l=u.split("\n"),c=l.length,p=s[t],d=c>2&&""===l[0].trim()&&""===l[1].trim(),h=c>2&&""===l[c-1].trim()&&""===l[c-2].trim(),f=l.every((e=>/^\s*(?:#[^\n\r]*)?$/.test(e)));if(!o&&/#[^\n\r]*$/.test(l[c-1]))return null;let m=null;m=f?hie(l):await e(u,{parser:"graphql"}),m?(m=nne(m,!1),!r&&d&&a.push(""),a.push(m),!o&&h&&a.push("")):!r&&!o&&d&&a.push(""),p&&a.push(p)}return["`",v6([B6,U6(B6,a)]),B6,"`"]}function hie(e){let t=[],r=!1,n=e.map((e=>e.trim()));for(let[e,i]of n.entries())""!==i&&(""===n[e-1]&&r?t.push([B6,i]):t.push(i),r=!0);return 0===t.length?null:U6(B6,t)}var fie=function(e){if(function({node:e,parent:t}){return oie(e,"GraphQL")||t&&("TaggedTemplateExpression"===t.type&&("MemberExpression"===t.tag.type&&"graphql"===t.tag.object.name&&"experimental"===t.tag.property.name||"Identifier"===t.tag.type&&("gql"===t.tag.name||"graphql"===t.tag.name))||"CallExpression"===t.type&&"Identifier"===t.callee.type&&"graphql"===t.callee.name)}(e))return die},mie=0;async function yie(e,t,r,n,i){let{node:s}=n,a=mie;mie=mie+1>>>0;let o=e=>`PRETTIER_HTML_PLACEHOLDER_${e}_${a}_IN_JS`,u=s.quasis.map(((e,t,r)=>t===r.length-1?e.value.cooked:e.value.cooked+o(t))).join(""),l=rne(n,r),c=new RegExp(o("(\\d+)"),"g"),p=0,d=await t(u,{parser:e,__onHtmlRoot(e){p=e.children.length}}),h=K6(d,(e=>{if("string"!=typeof e)return e;let t=[],r=e.split(c);for(let e=0;e<r.length;e++){let n=r[e];if(e%2==0){n&&(n=ine(n),i.__embeddedInHtml&&(n=X7(!1,n,/<\/(?=script\b)/gi,"<\\/")),t.push(n));continue}let s=Number(n);t.push(l[s])}return t})),f=/^\s/.test(u)?" ":"",m=/\s$/.test(u)?" ":"",y="ignore"===i.htmlWhitespaceSensitivity?B6:f&&m?L6:null;return y?A6(["`",v6([y,A6(h)]),y,"`"]):$6({hug:!1},A6(["`",f,p>1?v6(A6(h)):A6(h),m,"`"]))}var gie=yie.bind(void 0,"html"),xie=yie.bind(void 0,"angular");var bie=function(e){return function(e){return oie(e.node,"HTML")||e.match((e=>"TemplateLiteral"===e.type),((e,t)=>"TaggedTemplateExpression"===e.type&&"Identifier"===e.tag.type&&"html"===e.tag.name&&"quasi"===t))}(e)?gie:function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>R7(e)&&"Identifier"===e.key.type&&"template"===e.key.name&&"value"===t),...aie)}(e)?xie:void 0};async function Sie(e,t,r){let{node:n}=r,i=X7(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,((e,t)=>"\\".repeat(t.length/2)+"`")),s=function(e){let t=e.match(/^([^\S\n]*)\S/m);return null===t?"":t[1]}(i),a=""!==s;a&&(i=X7(!1,i,new RegExp(`^${s}`,"gm"),""));let o=nne(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",a?v6([M6,o]):[j6,D6(o)],M6,"`"]}var Tie=function(e){if(function({node:e,parent:t}){return"TaggedTemplateExpression"===(null==t?void 0:t.type)&&1===e.quasis.length&&"Identifier"===t.tag.type&&("md"===t.tag.name||"markdown"===t.tag.name)}(e))return Sie};var Eie=function(e){let t,{node:r}=e;if("TemplateLiteral"===r.type&&!function({quasis:e}){return e.some((({value:{cooked:e}})=>null===e))}(r))for(let n of[pie,fie,bie,Tie])if(t=n(e),t)return 1===r.quasis.length&&""===r.quasis[0].value.raw.trim()?"``":async(...e)=>{let r=await t(...e);return r&&$6({embed:!0,...r.label},r)}},vie=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Pie=e=>{for(let t of e.quasis)delete t.value};function Aie(e,t,r){var n,i;if("Program"===e.type&&delete t.sourceType,("BigIntLiteral"===e.type||"BigIntLiteralTypeAnnotation"===e.type)&&t.value&&(t.value=t.value.toLowerCase()),("BigIntLiteral"===e.type||"Literal"===e.type)&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),"DecimalLiteral"===e.type&&(t.value=Number(t.value)),"Literal"===e.type&&t.decimal&&(t.decimal=Number(t.decimal)),"EmptyStatement"===e.type||"JSXText"===e.type||"JSXExpressionContainer"===e.type&&("Literal"===e.expression.type||"StringLiteral"===e.expression.type)&&" "===e.expression.value)return null;if(("Property"===e.type||"ObjectProperty"===e.type||"MethodDefinition"===e.type||"ClassProperty"===e.type||"ClassMethod"===e.type||"PropertyDefinition"===e.type||"TSDeclareMethod"===e.type||"TSPropertySignature"===e.type||"ObjectTypeProperty"===e.type)&&"object"==typeof e.key&&e.key&&("Literal"===e.key.type||"NumericLiteral"===e.key.type||"StringLiteral"===e.key.type||"Identifier"===e.key.type)&&delete t.key,"JSXElement"===e.type&&"style"===e.openingElement.name.name&&e.openingElement.attributes.some((e=>"JSXAttribute"===e.type&&"jsx"===e.name.name)))for(let{type:e,expression:r}of t.children)"JSXExpressionContainer"===e&&"TemplateLiteral"===r.type&&Pie(r);"JSXAttribute"===e.type&&"css"===e.name.name&&"JSXExpressionContainer"===e.value.type&&"TemplateLiteral"===e.value.expression.type&&Pie(t.value.expression),"JSXAttribute"===e.type&&"Literal"===(null==(n=e.value)?void 0:n.type)&&/["']|"|'/.test(e.value.value)&&(t.value.value=X7(!1,t.value.value,/["']|"|'/g,'"'));let s=e.expression||e.callee;if("Decorator"===e.type&&"CallExpression"===s.type&&"Component"===s.callee.name&&1===s.arguments.length){let r=e.expression.arguments[0].properties;for(let[e,n]of t.expression.arguments[0].properties.entries())switch(r[e].key.name){case"styles":j9(n.value)&&Pie(n.value.elements[0]);break;case"template":"TemplateLiteral"===n.value.type&&Pie(n.value)}}if("TaggedTemplateExpression"===e.type&&("MemberExpression"===e.tag.type||"Identifier"===e.tag.type&&("gql"===e.tag.name||"graphql"===e.tag.name||"css"===e.tag.name||"md"===e.tag.name||"markdown"===e.tag.name||"html"===e.tag.name)||"CallExpression"===e.tag.type)&&Pie(t.quasi),"TemplateLiteral"===e.type&&(null!=(i=e.leadingComments)&&i.some((e=>w9(e)&&["GraphQL","HTML"].some((t=>e.value===` ${t} `))))||"CallExpression"===r.type&&"graphql"===r.callee.name||!e.leadingComments)&&Pie(t),("TSIntersectionType"===e.type||"TSUnionType"===e.type)&&1===e.types.length)return t.types[0];"ChainExpression"===e.type&&"TSNonNullExpression"===e.expression.type&&([t.type,t.expression.type]=[t.expression.type,t.type])}Aie.ignoredProperties=vie;var Die=Aie,Cie=((e,t,r)=>(r=null!=e?V8(W8(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of J8(t))!X8.call(e,i)&&i!==r&&q8(e,i,{get:()=>t[i],enumerable:!(n=K8(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:q8(r,"default",{value:e,enumerable:!0}),e)))(Y8(),1);var wie=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};function kie(e){let{shebang:t,text:r,pragmas:n,comments:i}=function(e){let t=wie(e);t&&(e=e.slice(t.length+1));let r=(0,Cie.extract)(e),{pragmas:n,comments:i}=(0,Cie.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e),s=(0,Cie.strip)(r);return(t?`${t}\n`:"")+(0,Cie.print)({pragmas:{format:"",...n},comments:i.trimStart()})+(s.startsWith("\n")?"\n":"\n\n")+s}var Iie={avoidAstMutation:!0},Nie={};H8(Nie,{getVisitorKeys:()=>Fie,massageAstNode:()=>Mie,print:()=>_ie});var Fie=A9({JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]});function _ie(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),B6];case"ArrayExpression":{if(0===n.elements.length)return"[]";let t=e.map((()=>null===e.node?"null":r()),"elements");return["[",v6([B6,U6([",",B6],t)]),B6,"]"]}case"ObjectExpression":return 0===n.properties.length?"{}":["{",v6([B6,U6([",",B6],e.map(r,"properties"))]),B6,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return["+"===n.operator?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return Oie(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return Oie(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new tee(n,"JSON")}}function Oie(e){return"key"===e.key&&"ObjectProperty"===e.parent.type}var Lie=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function Mie(e,t){let{type:r}=e;if("ObjectProperty"!==r){if("UnaryExpression"===r&&"+"===e.operator)return t.argument;if("ArrayExpression"!==r)return"TemplateLiteral"===r?{type:"StringLiteral",value:e.quasis[0].value.cooked}:void 0;for(let[r,n]of e.elements.entries())null===n&&t.elements.splice(r,0,{type:"NullLiteral"})}else{let{key:r}=e;"Identifier"===r.type?t.key={type:"StringLiteral",value:r.name}:"NumericLiteral"===r.type&&(t.key={type:"StringLiteral",value:String(r.value)})}}Mie.ignoredProperties=Lie;var Bie,jie,Rie,Uie,$ie,Vie={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},qie="JavaScript",Kie={arrowParens:{category:qie,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Vie.bracketSameLine,bracketSpacing:Vie.bracketSpacing,jsxBracketSameLine:{category:qie,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:qie,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},singleQuote:Vie.singleQuote,jsxSingleQuote:{category:qie,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:qie,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:qie,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Vie.singleAttributePerLine},Jie={estree:Z8,"estree-json":Nie},Wie=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]},{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","devcontainer.json","jsconfig.json","language-configuration.json","tsconfig.json","tslint.json",".eslintrc"],parsers:["json"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],Xie=Q8,Hie=Object.freeze({__proto__:null,default:Xie,languages:Wie,options:Kie,printers:Jie});function zie(e,t={}){return D5(function(...e){return VX(...e)}(e,{isJSX:Boolean(t.filepath?.match(/\.[jt]sx$/)),isTS:!0,printer:"recast",plugins:[["remove-unused-variables",r0]]}).code,{parser:"babel-ts",plugins:[$8,Hie]})}function Gie(e,t={}){return e=e.replaceAll("import.meta","BATI_META"),e=`var BATI_META = ${JSON.stringify(t)};(${e})`,(0,eval)(e)}function Yie(e,t,r={}){const n=function(e,t){return f.visit(e,{visitJSXAttribute(e){const r=e.value.comments?.[0];r&&r.value.includes("import.meta.BATI_")&&(Gie(r.value.replace("# ",""),t)?e.get("comments").prune():e.prune()),this.traverse(e)},visitImportDeclaration(e){f.namedTypes.ImportDeclaration.check(e.value)&&e.value.comments&&e.value.comments.some((e=>e.value.includes("import.meta.BATI_")))&&(Gie(e.value.comments.find((e=>e.value.includes("import.meta.BATI_"))).value.replace("# ",""),t)?e.value.comments=[]:e.prune()),this.traverse(e)},visitIdentifier(e){if("BATI_REMOVE"===e.value.name){if(!e.parent)throw new Error("BATI_REMOVE cannot appear at top level");if(!f.namedTypes.ArrayExpression.check(e.parent?.parent?.value))throw new Error("BATI_REMOVE can only be an array element for now");return e.parent.prune(),void this.traverse(e)}this.traverse(e)},visitConditionalExpression(e){this.visitIfStatement(e)},visitIfStatement(e){let r=!1;if(this.traverse(e.get("test"),{visitMemberExpression(e){yo(e.value).code.startsWith("import.meta.BATI_")&&(r=!0),this.traverse(e)}}),this.traverse(e),r)if(Gie(yo(e.value.test).code,t)){let t=e;f.namedTypes.ConditionalExpression.check(e.value)&&f.namedTypes.JSXExpressionContainer.check(e.parent.value)&&(t=e.parent),f.namedTypes.BlockStatement.check(e.value.consequent)?t.replace(...e.value.consequent.body):t.replace(e.value.consequent)}else e.value.alternate?f.namedTypes.BlockStatement.check(e.value.alternate)?e.replace(...e.value.alternate.body):e.replace(e.value.alternate):e.prune()}}),e}(e,t);return zie(yo(n).code,r)}function Qie(e,t){if(!e)throw new Error(t)}async function Zie(e){const t=await(e?.());return Qie("string"==typeof t,"Unable to load previous JSON module"),JSON.parse(t)}async function ese(e){const t=await(e?.());return Qie("string"==typeof t,"Unable to load previous module"),fo(t)}async function tse(e,t){const r=o(t.url),n=u(r);return go(l(n,e))}function rse(e){return"function-call"===e.$type?e.$args[0]:e}function nse(e,t){const r=function(e){return rse(e.exports.default)}(e);return"identifier"===r.$type?function(e,t){const{config:r,declaration:n}=function(e){if("identifier"!==e.exports.default.$type)throw new Wa(`Not supported: Cannot modify this kind of default export (${e.exports.default.$type})`);const t=e.exports.default.$name;for(const r of e.$ast.body)if("VariableDeclaration"===r.type)for(const e of r.declarations)if("Identifier"===e.id.type&&e.id.name===t&&e.init)return{declaration:e,config:rse(mo(yo(e.init).code))};throw new Wa("Couldn't find config declaration")}(e);ise(t,r),n.init&&("ObjectExpression"===n.init.type?n.init=yo(r).code:"CallExpression"===n.init.type&&"Identifier"===n.init.callee.type&&(n.init=yo(bo.functionCall(n.init.callee.name,r)).code))}(e,t):ise(t,r),e.imports.$add({from:t.from,local:t.constructor,imported:t.imported||"default"}),!0}function ise(e,t){const r=e.index??t.plugins?.length??0;t.plugins||(t.plugins=[]),t.plugins.splice(r,0,e.options?bo.functionCall(e.constructor,e.options):bo.functionCall(e.constructor))}function*sse(e,t){for(const r of t){const t=e.get(r);if(!t)throw new Error(`key '${t}' not found in package.json`);yield[r,t]}}function ase(e,t,r){e.devDependencies??(e.devDependencies={}),e.dependencies??(e.dependencies={});const n=new Map(function*(e){if(e.devDependencies)for(const t in e.devDependencies)yield[t,e.devDependencies[t]];if(e.dependencies)for(const t in e.dependencies)yield[t,e.dependencies[t]]}(t));for(const[t,i]of sse(n,r.devDependencies??[]))t in e.dependencies||(e.devDependencies[t]=i);for(const[t,i]of sse(n,r.dependencies??[]))t in e.devDependencies&&delete e.devDependencies[t],e.dependencies[t]=i;return e}$ie="win32"===process.platform||d.TESTING_WINDOWS?function(){if(jie)return Bie;jie=1,Bie=r,r.sync=function(r,n){return t(e.statSync(r),r,n)};var e=n;function t(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,r)}function r(r,n,i){e.stat(r,(function(e,s){i(e,!e&&t(s,r,n))}))}return Bie}():function(){if(Uie)return Rie;Uie=1,Rie=t,t.sync=function(t,n){return r(e.statSync(t),n)};var e=n;function t(t,n,i){e.stat(t,(function(e,t){i(e,!e&&r(t,n))}))}function r(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,i=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),a=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),o=parseInt("100",8),u=parseInt("010",8);return r&parseInt("001",8)||r&u&&i===a||r&o&&n===s||r&(o|u)&&0===s}(e,t)}return Rie}();var ose=use;function use(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){use(e,t||{},(function(e,t){e?n(e):r(t)}))}))}$ie(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}use.sync=function(e,t){try{return $ie.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}};const lse=ose,{join:cse,delimiter:pse,sep:dse,posix:hse}=s,fse="win32"===process.platform,mse=new RegExp(`[${hse.sep}${dse===hse.sep?"":dse}]`.replace(/(\\)/g,"\\$1")),yse=new RegExp(`^\\.${mse.source}`),gse=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),xse=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=pse})=>{const i=e.match(mse)?[""]:[...fse?[process.cwd()]:[],...(t||"").split(n)];if(fse){const t=r||[".EXE",".CMD",".BAT",".COM"].join(n),s=t.split(n).reduce(((e,t)=>(e.push(t),e.push(t.toLowerCase()),e)),[]);return e.includes(".")&&""!==s[0]&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:t}}return{pathEnv:i,pathExt:[""]}},bse=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&yse.test(t)?t.slice(0,2):"")+cse(r,t)},Sse=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=xse(e,t),s=[];for(const a of r){const r=bse(a,e);for(const e of n){const n=r+e;if(await lse(n,{pathExt:i,ignoreErrors:!0})){if(!t.all)return n;s.push(n)}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw gse(e)};var Tse=Sse;Sse.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=xse(e,t),s=[];for(const a of r){const r=bse(a,e);for(const e of n){const n=r+e;if(lse.sync(n,{pathExt:i,ignoreErrors:!0})){if(!t.all)return n;s.push(n)}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw gse(e)};var Ese=h(Tse);function vse(e,t,r=0){const n=`${" ".repeat(2*r)}${t?t(e):e}`;return e=>`${n} ${e}`}export{ase as addDependency,nse as addVitePlugin,c as features,p as flags,yo as generateCode,Zie as loadAsJson,ese as loadAsMagicast,go as loadFile,tse as loadRelativeFileAsMagicast,fo as parseModule,Yie as transformAndGenerate,Ese as which,vse as withIcon};
|
|
7
|
+
deps: ${n}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);s(e,t),a(e,r)}};function s(e,r=e.schema){const{gen:i,data:s,it:a}=e;if(0===Object.keys(r).length)return;const o=i.let("missing");for(const u in r){const l=r[u];if(0===l.length)continue;const c=(0,n.propertyInData)(i,s,u,a.opts.ownProperties);e.setParams({property:u,depsCount:l.length,deps:l.join(", ")}),a.allErrors?i.if(c,(()=>{for(const t of l)(0,n.checkReportMissingProp)(e,t)})):(i.if(t._`${c} && (${(0,n.checkMissingProp)(e,l,o)})`),(0,n.reportMissingProp)(e,o),i.else())}}function a(e,t=e.schema){const{gen:i,data:s,keyword:a,it:o}=e,u=i.name("valid");for(const l in t)(0,r.alwaysValidSchema)(o,t[l])||(i.if((0,n.propertyInData)(i,s,l,o.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:l},u);e.mergeValidEvaluated(t,u)}),(()=>i.var(u,!0))),e.ok(u))}e.validatePropertyDeps=s,e.validateSchemaDeps=a,e.default=i}(gQ);var xQ={};Object.defineProperty(xQ,"__esModule",{value:!0});const bQ=iz(),SQ=sz,TQ={message:"property name must be valid",params:({params:e})=>bQ._`{propertyName: ${e.propertyName}}`},EQ={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:TQ,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,SQ.alwaysValidSchema)(i,r))return;const s=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,bQ.not)(s),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(s)}};xQ.default=EQ;var vQ={};Object.defineProperty(vQ,"__esModule",{value:!0});const PQ=Pz(),AQ=iz(),DQ=cz(),CQ=sz,wQ={message:"must NOT have additional properties",params:({params:e})=>AQ._`{additionalProperty: ${e.additionalProperty}}`},kQ={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:wQ,code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:a}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:o,opts:u}=a;if(a.props=!0,"all"!==u.removeAdditional&&(0,CQ.alwaysValidSchema)(a,r))return;const l=(0,PQ.allSchemaProperties)(n.properties),c=(0,PQ.allSchemaProperties)(n.patternProperties);function p(e){t.code(AQ._`delete ${i}[${e}]`)}function d(n){if("all"===u.removeAdditional||u.removeAdditional&&!1===r)p(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(o||t.break());if("object"==typeof r&&!(0,CQ.alwaysValidSchema)(a,r)){const r=t.name("valid");"failing"===u.removeAdditional?(h(n,r,!1),t.if((0,AQ.not)(r),(()=>{e.reset(),p(n)}))):(h(n,r),o||t.if((0,AQ.not)(r),(()=>t.break())))}}}function h(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:CQ.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",i,(r=>{l.length||c.length?t.if(function(r){let i;if(l.length>8){const e=(0,CQ.schemaRefOrVal)(a,n.properties,"properties");i=(0,PQ.isOwnProperty)(t,e,r)}else i=l.length?(0,AQ.or)(...l.map((e=>AQ._`${r} === ${e}`))):AQ.nil;return c.length&&(i=(0,AQ.or)(i,...c.map((t=>AQ._`${(0,PQ.usePattern)(e,t)}.test(${r})`)))),(0,AQ.not)(i)}(r),(()=>d(r))):d(r)})),e.ok(AQ._`${s} === ${DQ.default.errors}`)}};vQ.default=kQ;var IQ={};Object.defineProperty(IQ,"__esModule",{value:!0});const NQ=Xz(),FQ=Pz(),_Q=sz,OQ=vQ,LQ={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;"all"===s.opts.removeAdditional&&void 0===n.additionalProperties&&OQ.default.code(new NQ.KeywordCxt(s,OQ.default,"additionalProperties"));const a=(0,FQ.allSchemaProperties)(r);for(const e of a)s.definedProperties.add(e);s.opts.unevaluated&&a.length&&!0!==s.props&&(s.props=_Q.mergeEvaluated.props(t,(0,_Q.toHash)(a),s.props));const o=a.filter((e=>!(0,_Q.alwaysValidSchema)(s,r[e])));if(0===o.length)return;const u=t.name("valid");for(const r of o)l(r)?c(r):(t.if((0,FQ.propertyInData)(t,i,r,s.opts.ownProperties)),c(r),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(u);function l(e){return s.opts.useDefaults&&!s.compositeRule&&void 0!==r[e].default}function c(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}};IQ.default=LQ;var MQ={};Object.defineProperty(MQ,"__esModule",{value:!0});const BQ=Pz(),jQ=iz(),RQ=sz,UQ=sz,$Q={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:a}=s,o=(0,BQ.allSchemaProperties)(r),u=o.filter((e=>(0,RQ.alwaysValidSchema)(s,r[e])));if(0===o.length||u.length===o.length&&(!s.opts.unevaluated||!0===s.props))return;const l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,c=t.name("valid");!0===s.props||s.props instanceof jQ.Name||(s.props=(0,UQ.evaluatedPropsToName)(t,s.props));const{props:p}=s;function d(e){for(const t in l)new RegExp(e).test(t)&&(0,RQ.checkStrictMode)(s,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function h(r){t.forIn("key",n,(n=>{t.if(jQ._`${(0,BQ.usePattern)(e,r)}.test(${n})`,(()=>{const i=u.includes(r);i||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:UQ.Type.Str},c),s.opts.unevaluated&&!0!==p?t.assign(jQ._`${p}[${n}]`,!0):i||s.allErrors||t.if((0,jQ.not)(c),(()=>t.break()))}))}))}!function(){for(const e of o)l&&d(e),s.allErrors?h(e):(t.var(c,!0),h(e),t.if(c))}()}};MQ.default=$Q;var VQ={};Object.defineProperty(VQ,"__esModule",{value:!0});const qQ=sz,KQ={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,qQ.alwaysValidSchema)(n,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};VQ.default=KQ;var JQ={};Object.defineProperty(JQ,"__esModule",{value:!0});const WQ={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Pz().validateUnion,error:{message:"must match a schema in anyOf"}};JQ.default=WQ;var XQ={};Object.defineProperty(XQ,"__esModule",{value:!0});const HQ=iz(),zQ=sz,GQ={message:"must match exactly one schema in oneOf",params:({params:e})=>HQ._`{passingSchemas: ${e.passing}}`},YQ={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:GQ,code(e){const{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const s=r,a=t.let("valid",!1),o=t.let("passing",null),u=t.name("_valid");e.setParams({passing:o}),t.block((function(){s.forEach(((r,n)=>{let s;(0,zQ.alwaysValidSchema)(i,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},u),n>0&&t.if(HQ._`${u} && ${a}`).assign(a,!1).assign(o,HQ._`[${o}, ${n}]`).else(),t.if(u,(()=>{t.assign(a,!0),t.assign(o,n),s&&e.mergeEvaluated(s,HQ.Name)}))}))})),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}};XQ.default=YQ;var QQ={};Object.defineProperty(QQ,"__esModule",{value:!0});const ZQ=sz,eZ={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,ZQ.alwaysValidSchema)(n,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};QQ.default=eZ;var tZ={};Object.defineProperty(tZ,"__esModule",{value:!0});const rZ=iz(),nZ=sz,iZ={message:({params:e})=>rZ.str`must match "${e.ifClause}" schema`,params:({params:e})=>rZ._`{failingKeyword: ${e.ifClause}}`},sZ={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:iZ,code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,nZ.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=aZ(n,"then"),s=aZ(n,"else");if(!i&&!s)return;const a=t.let("valid",!0),o=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(t)}(),e.reset(),i&&s){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(o,u("then",r),u("else",r))}else i?t.if(o,u("then")):t.if((0,rZ.not)(o),u("else"));function u(r,n){return()=>{const i=e.subschema({keyword:r},o);t.assign(a,o),e.mergeValidEvaluated(i,a),n?t.assign(n,rZ._`${r}`):e.setParams({ifClause:r})}}e.pass(a,(()=>e.error(!0)))}};function aZ(e,t){const r=e.schema[t];return void 0!==r&&!(0,nZ.alwaysValidSchema)(e,r)}tZ.default=sZ;var oZ={};Object.defineProperty(oZ,"__esModule",{value:!0});const uZ=sz,lZ={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,uZ.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};oZ.default=lZ,Object.defineProperty(WY,"__esModule",{value:!0});const cZ=XY,pZ=QY,dZ=ZY,hZ=oQ,fZ=hQ,mZ=gQ,yZ=xQ,gZ=vQ,xZ=IQ,bZ=MQ,SZ=VQ,TZ=JQ,EZ=XQ,vZ=QQ,PZ=tZ,AZ=oZ;WY.default=function(e=!1){const t=[SZ.default,TZ.default,EZ.default,vZ.default,PZ.default,AZ.default,yZ.default,gZ.default,mZ.default,xZ.default,bZ.default];return e?t.push(pZ.default,hZ.default):t.push(cZ.default,dZ.default),t.push(fZ.default),t};var DZ={},CZ={};Object.defineProperty(CZ,"__esModule",{value:!0});const wZ=iz(),kZ={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>wZ.str`must match format "${e}"`,params:({schemaCode:e})=>wZ._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:i,schema:s,schemaCode:a,it:o}=e,{opts:u,errSchemaPath:l,schemaEnv:c,self:p}=o;u.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),s=r.const("fDef",wZ._`${i}[${a}]`),o=r.let("fType"),l=r.let("format");r.if(wZ._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(o,wZ._`${s}.type || "string"`).assign(l,wZ._`${s}.validate`)),(()=>r.assign(o,wZ._`"string"`).assign(l,s))),e.fail$data((0,wZ.or)(!1===u.strictSchema?wZ.nil:wZ._`${a} && !${l}`,function(){const e=c.$async?wZ._`(${s}.async ? await ${l}(${n}) : ${l}(${n}))`:wZ._`${l}(${n})`,r=wZ._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return wZ._`${l} && ${l} !== true && ${o} === ${t} && !${r}`}()))}():function(){const i=p.formats[s];if(!i)return void function(){if(!1===u.strictSchema)return void p.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}}();if(!0===i)return;const[a,o,d]=function(e){const t=e instanceof RegExp?(0,wZ.regexpCode)(e):u.code.formats?wZ._`${u.code.formats}${(0,wZ.getProperty)(s)}`:void 0,n=r.scopeValue("formats",{key:s,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,wZ._`${n}.validate`];return["string",e,n]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!c.$async)throw new Error("async format in sync schema");return wZ._`await ${d}(${n})`}return"function"==typeof o?wZ._`${d}(${n})`:wZ._`${d}.test(${n})`}())}())}};CZ.default=kZ,Object.defineProperty(DZ,"__esModule",{value:!0});const IZ=[CZ.default];DZ.default=IZ;var NZ={};Object.defineProperty(NZ,"__esModule",{value:!0}),NZ.contentVocabulary=NZ.metadataVocabulary=void 0,NZ.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],NZ.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(SG,"__esModule",{value:!0});const FZ=MG,_Z=WY,OZ=DZ,LZ=NZ,MZ=[TG.default,FZ.default,(0,_Z.default)(),OZ.default,LZ.metadataVocabulary,LZ.contentVocabulary];SG.default=MZ;var BZ,jZ,RZ={},UZ={};BZ=UZ,Object.defineProperty(BZ,"__esModule",{value:!0}),BZ.DiscrError=void 0,(jZ=BZ.DiscrError||(BZ.DiscrError={})).Tag="tag",jZ.Mapping="mapping",Object.defineProperty(RZ,"__esModule",{value:!0});const $Z=iz(),VZ=UZ,qZ=eG,KZ=sz,JZ={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===VZ.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>$Z._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=n.propertyName;if("string"!=typeof o)throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),l=t.const("tag",$Z._`${r}${(0,$Z.getProperty)(o)}`);function c(r){const n=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(i,$Z.Name),n}t.if($Z._`typeof ${l} == "string"`,(()=>function(){const r=function(){var e;const t={},r=u(i);let n=!0;for(let t=0;t<a.length;t++){let i=a[t];(null==i?void 0:i.$ref)&&!(0,KZ.schemaHasRulesButRef)(i,s.self.RULES)&&(i=qZ.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,null==i?void 0:i.$ref),i instanceof qZ.SchemaEnv&&(i=i.schema));const c=null===(e=null==i?void 0:i.properties)||void 0===e?void 0:e[o];if("object"!=typeof c)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);n=n&&(r||u(i)),l(c,t)}if(!n)throw new Error(`discriminator: "${o}" must be required`);return t;function u({required:e}){return Array.isArray(e)&&e.includes(o)}function l(e,t){if(e.const)c(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`);for(const r of e.enum)c(r,t)}}function c(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${o}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf($Z._`${l} === ${e}`),t.assign(u,c(r[e]));t.else(),e.error(!1,{discrError:VZ.DiscrError.Mapping,tag:l,tagName:o}),t.endIf()}()),(()=>e.error(!1,{discrError:VZ.DiscrError.Tag,tag:l,tagName:o}))),e.ok(u)}};RZ.default=JZ;var WZ={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=XH,n=SG,i=RZ,s=WZ,a=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var l=Xz();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=iz();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var p=Gz();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=Zz();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(WH,WH.exports);const XZ={$schema:"http://json-schema.org/draft-07/schema#",type:"object",additionalProperties:!1,definitions:{rule:{oneOf:[{$ref:"#/definitions/ruleToggle"},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"object"}],minItems:2,additionalItems:!1},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"string"},{type:"object"}],minItems:3,additionalItems:!1},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"string"}],minItems:2,additionalItems:!1}]},rules:{description:"🐊Putout comes with a large number of rules. You can modify which rules your project uses.",type:"object",patternProperties:{"^.*$":{$ref:"#/definitions/rule"}}},ruleToggle:{oneOf:[{description:'🐊Putout rule\n\n"off" means rule is off\n"on" means it is a on\n',enum:["on","off"]},{enum:[!0,!1]}]},processorToggle:{type:"array",items:[{type:"string"},{description:'🐊Putout processor\n\n"off" means rule is off\n"on" means it is a on\n',enum:["on","off"]}],minItems:2,maxItems:2}},properties:{parser:{description:"Tell 🐊Putout which parser to use",type:"string"},printer:{oneOf:[{description:"Tell 🐊Putout which printer to use",type:"string"},{type:"array",minItems:2,maxItems:2,items:[{type:"string"},{type:"object"}]}]},formatter:{description:"Choose the way to show information about errors found",type:["string","array"]},processors:{description:"Tell 🐊Putout which processors to use to support file types other then JavaScript",type:"array",uniqueItems:!0,items:{oneOf:[{$ref:"#/definitions/processorToggle"},{type:"string"}]}},ignore:{description:"Tell 🐊Putout to ignore specific files and directories.",type:"array",uniqueItems:!0,items:{type:"string"}},match:{description:"Allows to match rules for files and folders, specified by glob patterns.",type:"object",patternProperties:{"^.*$":{$ref:"#/definitions/rules"}}},plugins:{description:"Tell 🐊Putout which plugins to load",type:"array",uniqueItems:!0},rules:{$ref:"#/definitions/rules"}}};new(0,WH.exports)({strict:!0,allowUnionTypes:!0}).compile(XZ);const{homedir:HZ}=r,{readdirSync:zZ}=n,{dirname:GZ,join:YZ}=s,QZ=Oo,ZZ=Co,e0=HZ(),t0=e=>"."!==e[0]&&!/(^not-rule-.*|^node_modules$)/.test(e);QZ((()=>{const e=YZ(e0,".putout.json"),[,t={}]=ZZ(UM,e);return t})),QZ((()=>function(e,t){if(!t)return{};let r=YZ(e,t);r.startsWith("/")||(r=YZ(process.cwd(),t));const[n,i]=ZZ(zZ,r);if(n)return{};const s=[];for(const e of i.filter(t0)){const t=UM(YZ(r,e)),n=e.replace("putout-plugin-","");s.push([n,t])}return{plugins:s}}(e0,".putout"))),process.cwd();var r0={},n0={};const{isIdentifier:i0,isObjectExpression:s0,isObjectPattern:a0,isTemplateLiteral:o0,isAssignmentPattern:u0}=$X().types,l0=({use:e,declare:t})=>{const r=h0({use:e});return e=>{for(const n of e){if(n.isRestElement())continue;const{key:e,value:i}=n.node,s=n.get("value");switch(i.type){case"Identifier":t(n,i.name);break;case"AssignmentPattern":n.node.shorthand?t(n,e.name):t(n,s.node.left.name),r(s)}}}};n0.traverseObjectPattern=l0;const c0=({use:e,declare:t})=>r=>{for(const n of r){const{key:r,value:i,computed:s}=n.node;if(s&&i0(r)&&e(n,r.name),i0(i))t(n,i.name);else if(a0(i)){c0({use:e,declare:t})(n.get("value.properties"))}else if(u0(i)){h0({use:e})(n.get("value.right"));const r=n.get("value.left");if("Identifier"===r.type){t(n,r.node.name);continue}}}};n0.processObjectPattern=c0;const p0=e=>{const t=d0(e);return r=>{for(const n of r){const{node:r}=n,{key:i,value:s,computed:a}=r;if(a&&i0(i)&&e(n,i.name),i0(s))e(n,s.name);else if(o0(s))t(n,s.expressions);else if(s0(s)){p0(e)(n.get("value.properties"))}else;}}};n0.traverseObjectExpression=p0;n0.traverseArrayExpression=e=>{const t=p0(e);return e=>{for(const r of e){const{node:e}=r;s0(e)&&t(r.get("properties"))}}};n0.traverseAssignmentExpression=({use:e,declare:t})=>{const r=l0({use:e,declare:t});return n=>{const i=n.get("left"),s=n.get("right");if(i.isIdentifier()){const{parentPath:e}=i.parentPath,{name:r}=i.node;e.isObjectProperty()&&t(e,r),e.isFunction()&&t(i.parentPath,r)}s.isIdentifier()&&e(s,s.node.name),i.isObjectPattern()&&r(i.get("properties"))}};const d0=e=>(t,r)=>{for(const n of r)i0(n)&&e(t,n.name)};n0.traverseTemplateLiteral=d0;const h0=({use:e})=>t=>{const{node:r}=t,{right:n}=r;i0(r)&&e(t.parentPath,r.name),i0(n)&&e(t,n.name)};n0.traverseAssignmentPattern=h0;const{types:f0}=$X(),{isIdentifier:m0,isJSXIdentifier:y0}=f0;const{types:g0}=$X(),{isIdentifier:x0}=g0;const{types:b0}=$X(),{isIdentifier:S0,isTSModuleDeclaration:T0}=b0;const{isAssignmentPattern:E0,isClassDeclaration:v0,isIdentifier:P0,isSpreadElement:A0,isObjectPattern:D0,isObjectExpression:C0,isFunctionDeclaration:w0,isArrayExpression:k0,isVariableDeclaration:I0,isRestElement:N0}=$X().types,{traverseObjectExpression:F0,processObjectPattern:_0,traverseArrayExpression:O0,traverseAssignmentExpression:L0,traverseTemplateLiteral:M0}=n0,B0=e=>({JSXOpeningElement(t){const{node:r}=t,{name:n}=r;/^[A-Z]/.test(n.name)&&e(t,n.name),e(t,"React")},JSXFragment(t){e(t,"React")},JSXSpreadAttribute(t){const r=t.get("argument");if(r.isIdentifier())return e(t,r.node.name)},JSXMemberExpression(t){const{node:r}=t,{object:n}=r;y0(n)&&e(t,n.name)},JSXExpressionContainer(t){const{node:r}=t,{expression:n}=r;m0(n)&&e(t,n.name)}}),j0=({use:e,declare:t})=>({GenericTypeAnnotation(t){const{node:r}=t,{id:n}=r;x0(n)&&e(t,n.name)},QualifiedTypeIdentifier(t){const{qualification:r}=t.node,{type:n}=r;if("Identifier"===n)return e(t,r.name)},InterfaceDeclaration(e){t(e,e.node.id.name)}}),R0=({use:e,declare:t})=>({TSExpressionWithTypeArguments(t){const{expression:r}=t.node,{type:n}=r;if("Identifier"===n)e(t,r.name)},TSFunctionType(r){const{node:n}=r,{params:i}=n;for(const n of i){const{type:i}=n;switch(i){case"Identifier":t(r,n.name),e(r,n.name);break;case"RestElement":S0(n.argument)&&(t(r,n.argument.name),e(r,n.argument.name))}}},TSTypeReference(t){const{node:r}=t,{typeName:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSTypeAliasDeclaration(e){const{node:r}=e,{id:n}=r,{type:i}=n;if("Identifier"===i)t(e,n.name)},TSTypeQuery(t){const{node:r}=t,{exprName:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSAsExpression(t){const{node:r}=t,{expression:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSQualifiedName(t){const{node:r}=t,{left:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSInterfaceDeclaration(r){t(r,r.node.id.name),r.findParent(T0)&&e(r,r.node.id.name)},TSMethodSignature(r){const n=r.get("params");for(const r of n){if(r.isIdentifier()){t(r,r.node.name),e(r,r.node.name);continue}const{type:n}=r;"RestElement"!==n||(t(r,r.node.argument.name),e(r,r.node.argument.name))}},TSDeclareFunction(t){if(!t.get("params").length)return;const[r]=t.get("params");r.isRestElement()&&e(r,r.node.argument.name)}}),{assign:U0}=Object;const $0=e=>{const{remove:t}=e;return()=>{const r=e.node,{elements:n}=e.parentPath.node,i=n.length-1;if(n.indexOf(r)===i)return t.call(e)}};var V0={};const{types:q0}=$X(),{isIdentifier:K0,isObjectPattern:J0,isRestElement:W0}=q0;function X0(e,t,r){const{length:n}=r,i=r[n-1];if(W0(i))for(let i=0;i<n-1;i++){const{value:n}=r[i],{type:s}=n;"Identifier"!==s||e(t,n.name)}}V0.usePropertiesBeforeRest=({use:e})=>({path:t,params:r})=>{for(const n of r)J0(n)&&X0(e,t,n.properties)},V0.useParamsBeforeLastUsed=({use:e,isUsed:t})=>({path:r,params:n})=>{let i=n.length;for(;--i>0;){const e=n[i];if(H0(t,r,e))break}for(;--i>=0;)K0(n[i])&&e(r,n[i].name);return{path:r,params:n}};const H0=(e,t,r)=>{const{type:n}=r;switch(n){case"Identifier":return e(t,r.name);case"ObjectPattern":return G0(e,t,r);case"AssignmentPattern":return z0(e,t,r)}},z0=(e,t,r)=>{const{left:n}=r,{type:i}=n;switch(i){case"Identifier":return e(t,n.name);case"ObjectPattern":return G0(e,t,n)}},G0=(e,t,r)=>{for(const{value:n}of r.properties)if(K0(n)){if(e(t,n.name))return!0}else;return!1},{types:Y0}=$X(),Q0=({use:e,declare:t,addParams:r})=>{const n=F0(e),i=_0({use:e,declare:t}),s=L0({use:e,declare:t}),a=M0(e),o=O0(e);return{"ObjectExpression|RecordExpression"(e){n(e.get("properties"))},SequenceExpression(t){for(const r of t.get("expressions"))r.isIdentifier()&&e(r,r.node.name)},"AwaitExpression|YieldExpression|SpreadElement"(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},CatchClause(r){const n=r.get("param");if(!n.isIdentifier())return;const{name:i}=n.node;t(n,i);r.scope.getOwnBinding(i).referenced&&e(n,i)},Decorator(t){const r=t.get("expression");if(!r.isIdentifier())return;const{name:n}=r.node;e(r,n)},RestElement(e){const{argument:r}=e.node;P0(r)&&t(e,r.name)},VariableDeclarator(r){const{node:n}=r,{init:a}=n,u=r.get("id"),l=r.parentPath.parentPath.isForInStatement();if(P0(n.id))t(r,n.id.name),l&&e(r,n.id.name);else if(D0(n.id))u.traverse({ObjectProperty(i){if(E0(i.node.value)&&s(i.get("value")),i.node.computed&&P0(i.node.key)&&e(i.get("key"),i.node.key.name),!P0(i.node.value))return;const{properties:a}=n.id,o=1===a.length?r:i,{name:u}=i.node.value;t(o,u),N0(i.parentPath.node.properties.at(-1))&&e(o,u)}});else if(u.isArrayPattern()){const r=u.get("elements");for(const n of r)if(n.isObjectPattern())i(n.get("properties"));else{if(n.isAssignmentPattern()){const r=n.get("left"),i=n.get("right");t(r,n.node.left.name),e(i,n.node.right.name),U0(r,{remove:$0(n)})}n.isIdentifier()&&(U0(n,{remove:$0(n)}),t(n,n.node.name))}}const c=r.get("init");P0(a)?e(r,a.name):k0(a)&&o(c.get("elements"))},ClassProperty(t){const r=t.get("value");r.isIdentifier()&&e(r,r.node.name)},"ClassDeclaration|ClassExpression"(r){const{node:n}=r,{id:i,superClass:s}=n;s&&e(r,s.name),i&&t(r,i.name),i&&r.isClassExpression()&&e(r,i.name)},AssignmentExpression(t){const r=t.get("left"),n=t.get("right");r.isIdentifier()&&e(r,r.node.name),n.isIdentifier()&&e(n,n.node.name)},"ArrayExpression|TupleExpression"(t){const{elements:r}=t.node;for(const n of r)P0(n)?e(t,n.name):A0(n)&&e(t,n.argument.name)},ConditionalExpression(t){const{test:r,consequent:n,alternate:i}=t.node,s=t.get("alternate"),a=t.get("consequent");P0(r)&&e(t,r.name),P0(n)&&e(t,n.name),P0(i)&&e(t,i.name),s.isFunction()&&i.id&&e(s,i.id.name),a.isFunction()&&n.id&&e(a,n.id.name)},DoWhileStatement(t){const r=t.get("test");r.isIdentifier()&&e(r,r.node.name)},TemplateLiteral(e){a(e,e.node.expressions)},LogicalExpression(t){const{left:r,right:n}=t.node;P0(r)&&e(t,r.name),P0(n)&&e(t,n.name)},MemberExpression(t){const{property:r,object:n,computed:i}=t.node;P0(n)&&e(t,n.name),i&&P0(r)&&e(t,r.name)},OptionalMemberExpression(t){const{object:r,property:n,computed:i}=t.node;P0(r)&&e(t,r.name),i&&P0(n)&&e(t,n.name)},NewExpression(t){const r=t.get("callee"),{node:n}=t;r.isIdentifier()?e(t,n.callee.name):r.isFunction()&&e(r,r.node.id.name);const i=t.get("arguments");for(const{node:r}of i)P0(r)&&e(t,r.name)},TaggedTemplateExpression(t){const{tag:r}=t.node;P0(r)&&e(t,r.name)},UnaryExpression(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},UpdateExpression(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},ThrowStatement(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},IfStatement(t){const{node:r}=t,{test:n}=r;if(P0(n))return e(t,n.name)},ForInStatement(t){const{node:r}=t,{left:n,right:i}=r;P0(n)&&e(t,n.name),P0(i)&&e(t,i.name)},ForOfStatement(r){const{node:n}=r,{left:i,right:s}=n;P0(s)&&e(r,s.name),P0(i)?e(r,i.name):r.get("left").traverse({Identifier(e){t(r,e.node.name)}}),r.get("left").traverse({Identifier(t){e(t,t.node.name)}})},ExpressionStatement(t){const{node:r}=t;P0(r.expression)&&e(t,r.expression.name)},SwitchStatement(t){const{node:r}=t;P0(r.discriminant)&&e(t,r.discriminant.name);for(const{test:n}of r.cases)P0(n)&&e(t,n.name)},ReturnStatement(t){const{node:r}=t,{argument:n}=r,i=t.get("argument");return i.isIdentifier()?e(t,n.name):i.isFunction()&&n.id?e(i,n.id.name):void 0},ObjectMethod(e){const{params:n}=e.node,i=e.get("params");for(const e of i){const{node:r}=e;P0(r)&&t(e,r.name)}r({path:e,params:n})},"CallExpression|OptionalCallExpression"(t){const{node:r}=t,{callee:n}=r;P0(n)&&e(t,r.callee.name),t.traverse({SpreadElement(t){const{argument:r}=t.node;P0(r)&&e(t,r.name)},Identifier(t){r.arguments.includes(t.node)&&e(t,t.node.name)}})},BinaryExpression(t){const{left:r,right:n}=t.node;P0(r)&&e(t,r.name),P0(n)&&e(t,n.name)},ImportDeclaration(e){const r=e.get("specifiers");for(const e of r){const{local:r}=e.node;P0(r)&&t(e,r.name)}},ExportDefaultDeclaration(t){const r=t.get("declaration"),{declaration:i}=t.node,{id:s}=i;s&&w0(i)?e(t,i.id.name):P0(i)?e(t,i.name):s&&v0(i)?e(t,i.id.name):C0(i)&&n(r.get("properties"))},ExportNamedDeclaration(t){const r=t.get("declaration"),{declaration:n,specifiers:i}=t.node;if(r.isFunctionDeclaration())return e(t,n.id.name);if(r.isClassDeclaration())return e(t,n.id.name);if(r.isTSInterfaceDeclaration())return e(t,n.id.name);if(r.isTSTypeAliasDeclaration())return e(t,n.id.name);if(r.isInterfaceDeclaration())return e(t,n.id.name);if(I0(n)){const{declarations:r}=n;for(const{id:n}of r)P0(n)&&e(t,n.name)}else for(const{local:r}of i)P0(r)&&e(t,r.name)},Function(n){const{node:a,parentPath:o}=n,{id:u,body:l,params:c}=a,p=n.get("params");u&&(t(n,a.id.name),o.isBlock()||o.isProgram()||e(n,a.id.name));for(const e of p){const{node:r}=e;P0(r)?t(e,r.name):E0(r)?s(e):D0(r)&&i(e.get("properties"))}P0(l)&&e(n,l.name),r({path:n,params:c})},...B0(e),...j0({use:e,declare:t}),...R0({use:e,declare:t})}},{useParamsBeforeLastUsed:Z0,usePropertiesBeforeRest:e1}=V0,{isClassDeclaration:t1,isFunctionDeclaration:r1}=Y0;const n1=e=>({path:t,params:r})=>{e.push({path:t,params:r})};function i1({name:e,scope:t}){if(t.hasOwnBinding(e))return t.uid;for(;t.parent;)if((t=t.parent).hasOwnBinding(e))return t.uid;return t.uid}const s1=({vars:e})=>(t,r)=>{const{scope:n}=t,i=i1({name:r,scope:n}),s=e[i],{used:a}=s[r];return a};const a1=({vars:e,setPath:t})=>(r,n)=>{const i=function(e){const{node:t,scope:r}=e;return r1(t)||t1(t)?e.parentPath.scope:r}(r),s=i1({name:n,scope:i});e[s]||(e[s]={});const a=e[s];a[n]?a[n].declared=!0:a[n]={declared:!0,used:!1},t&&(a[n].path=r)},o1=({vars:e})=>(t,r)=>{const{scope:n}=t,i=i1({name:r,scope:n});e[i]||(e[i]={});const s=e[i];s[r]?s[r].used=!0:s[r]={declared:!1,used:!0}};function u1([e,t]){return{name:e,...t}}const l1=({declared:e,used:t})=>e&&!t;const{operator:c1}=$X(),p1=(e,t)=>{const r={},n=[],{setPath:i,traverse:s}=t,a=o1({vars:r}),o=a1({vars:r,setPath:i}),u=s1({vars:r}),l=n1(n);return s(e,Q0({use:a,declare:o,addParams:l})),n.map(Z0({use:a,isUsed:u})).map(e1({use:a})),Object.values(r)},d1=e=>{const t=[];for(const r of e){const e=Object.entries(r);for(const r of e)t.push(u1(r))}return t},h1=e=>e.filter(l1),{replaceWith:f1,compare:m1,remove:y1}=c1;r0.report=({name:e})=>`'${e}' is defined but never used`,r0.fix=({path:e})=>m1(e,"const __a = __b = __c")?f1(e.parentPath,e.node.init):function({parentPath:e}){return!!e.isImportDeclaration()&&1===e.node.specifiers.length}(e)?y1(e.parentPath):void y1(e),r0.find=(e,{traverse:t})=>{const r=p1(e,{setPath:!0,traverse:t}),n=d1(r);return h1(n)};var g1=Object.create,x1=Object.defineProperty,b1=Object.getOwnPropertyDescriptor,S1=Object.getOwnPropertyNames,T1=Object.getPrototypeOf,E1=Object.prototype.hasOwnProperty,v1=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),P1=(e,t)=>{for(var r in t)x1(e,r,{get:t[r],enumerable:!0})},A1=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of S1(t))!E1.call(e,i)&&i!==r&&x1(e,i,{get:()=>t[i],enumerable:!(n=b1(t,i))||n.enumerable});return e},D1=(e,t,r)=>(r=null!=e?g1(T1(e)):{},A1(!t&&e&&e.__esModule?r:x1(r,"default",{value:e,enumerable:!0}),e)),C1=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},w1=(e,t,r)=>(((e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)})(e,t,"access private method"),r),k1=v1((e=>{function t(){}function r(e,t,r,n,i){for(var s=0,a=t.length,o=0,u=0;s<a;s++){var l=t[s];if(l.removed){if(l.value=e.join(n.slice(u,u+l.count)),u+=l.count,s&&t[s-1].added){var c=t[s-1];t[s-1]=t[s],t[s]=c}}else{if(!l.added&&i){var p=r.slice(o,o+l.count);p=p.map((function(e,t){var r=n[u+t];return r.length>e.length?r:e})),l.value=e.join(p)}else l.value=e.join(r.slice(o,o+l.count));o+=l.count,l.added||(u+=l.count)}}var d=t[a-1];return a>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[a-2].value+=d.value,t.pop()),t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=t,t.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var s=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var o=(t=this.removeEmpty(this.tokenize(t))).length,u=e.length,l=1,c=o+u;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=o&&d+1>=u)return a([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*l;n<=l;n+=2){var i=void 0,c=p[n-1],d=p[n+1],h=(d?d.newPos:0)-n;c&&(p[n-1]=void 0);var f=c&&c.newPos+1<o,m=d&&0<=h&&h<u;if(f||m){if(!f||m&&c.newPos<d.newPos?(i={newPos:(y=d).newPos,components:y.components.slice(0)},s.pushComponent(i.components,void 0,!0)):((i=c).newPos++,s.pushComponent(i.components,!0,void 0)),h=s.extractCommon(i,t,e,n),i.newPos+1>=o&&h+1>=u)return a(r(s,i.components,t,e,s.useLongestToken));p[n]=i}else p[n]=void 0}var y;l++}if(i)!function e(){setTimeout((function(){if(l>c)return i();h()||e()}),0)}();else for(;l<=c;){var f=h();if(f)return f}},pushComponent:function(e,t,r){var n=e[e.length-1];n&&n.added===t&&n.removed===r?e[e.length-1]={count:n.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,n){for(var i=t.length,s=r.length,a=e.newPos,o=a-n,u=0;a+1<i&&o+1<s&&this.equals(t[a+1],r[o+1]);)a++,o++,u++;return u&&e.components.push({count:u}),e.newPos=a,o},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}})),I1=v1((e=>{var t;Object.defineProperty(e,"__esModule",{value:!0}),e.diffArrays=function(e,t,n){return r.diff(e,t,n)},e.arrayDiff=void 0;var r=new(((t=k1())&&t.__esModule?t:{default:t}).default);e.arrayDiff=r,r.tokenize=function(e){return e.slice()},r.join=r.removeEmpty=function(e){return e}})),N1=v1(((e,t)=>{var r=new Proxy(String,{get:()=>r});t.exports=r})),F1={};P1(F1,{default:()=>O1,shouldHighlight:()=>_1});var _1,O1,L1=((e,t)=>()=>(e&&(t=e(e=0)),t))((()=>{_1=()=>!1,O1=String})),M1=v1((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=o,e.default=function(e,t,r,n={}){if(!s){s=!0;let e="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";new Error(e).name="DeprecationWarning",console.warn(new Error(e))}return r=Math.max(r,0),o(e,{start:{column:r,line:t}},n)};var t,r,n=(L1(),r=F1,A1(x1({},"__esModule",{value:!0}),r)),i=N1();var s=!1;var a=/\r\n|[\n\r\u2028\u2029]/;function o(e,r,s={}){let o=(s.highlightCode||s.forceColor)&&(0,n.shouldHighlight)(s),u=function(e){return e?(null!=t||(t=new i.constructor({enabled:!0,level:1})),t):i}(s.forceColor),l=function(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}(u),c=(e,t)=>o?e(t):t,p=e.split(a),{start:d,end:h,markerLines:f}=function(e,t,r){let n=Object.assign({column:0,line:-1},e.start),i=Object.assign({},n,e.end),{linesAbove:s=2,linesBelow:a=3}=r||{},o=n.line,u=n.column,l=i.line,c=i.column,p=Math.max(o-(s+1),0),d=Math.min(t.length,l+a);-1===o&&(p=0),-1===l&&(d=t.length);let h=l-o,f={};if(h)for(let e=0;e<=h;e++){let r=e+o;if(u)if(0===e){let e=t[r-1].length;f[r]=[u,e-u+1]}else if(e===h)f[r]=[0,c];else{let n=t[r-e].length;f[r]=[0,n]}else f[r]=!0}else f[o]=u===c?!u||[u,0]:[u,c-u];return{start:p,end:d,markerLines:f}}(r,p,s),m=r.start&&"number"==typeof r.start.column,y=String(h).length,g=(o?(0,n.default)(e,s):e).split(a,h).slice(d,h).map(((e,t)=>{let r=d+1+t,n=` ${` ${r}`.slice(-y)} |`,i=f[r],a=!f[r+1];if(i){let t="";if(Array.isArray(i)){let r=e.slice(0,Math.max(i[0]-1,0)).replace(/[^\t]/g," "),o=i[1]||1;t=["\n ",c(l.gutter,n.replace(/\d/g," "))," ",r,c(l.marker,"^").repeat(o)].join(""),a&&s.message&&(t+=" "+c(l.message,s.message))}return[c(l.marker,">"),c(l.gutter,n),e.length>0?` ${e}`:"",t].join("")}return` ${c(l.gutter,n)}${e.length>0?` ${e}`:""}`})).join("\n");return s.message&&!m&&(g=`${" ".repeat(y+1)}${s.message}\n${g}`),o?u.reset(g):g}}));P1({},{__debug:()=>k5,check:()=>C5,doc:()=>b5,format:()=>D5,formatWithCursor:()=>A5,getSupportInfo:()=>w5,util:()=>s5,version:()=>v5});var B1=(e,t,r,n)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},j1=D1(I1(),1),R1="string",U1="array",$1="cursor",V1="indent",q1="align",K1="trim",J1="group",W1="fill",X1="if-break",H1="indent-if-break",z1="line-suffix",G1="line-suffix-boundary",Y1="line",Q1="label",Z1="break-parent",e2=new Set([$1,V1,q1,K1,J1,W1,X1,H1,z1,G1,Y1,Q1,Z1]);var t2=function(e){if("string"==typeof e)return R1;if(Array.isArray(e))return U1;if(!e)return;let{type:t}=e;return e2.has(t)?t:void 0};function r2(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(t2(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if("[object Object]"!==r)return`Unexpected doc '${r}'.`;let n=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...e2].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var n2=class extends Error{name="InvalidDocError";constructor(e){super(r2(e)),this.doc=e}},i2=n2,s2={};var a2=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===s2){r(i.pop());continue}r&&i.push(e,s2);let s=t2(e);if(!s)throw new i2(e);if(!1!==(null==t?void 0:t(e)))switch(s){case U1:case W1:{let t=s===U1?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case X1:i.push(e.flatContents,e.breakContents);break;case J1:if(n&&e.expandedStates)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);break;case q1:case V1:case H1:case Q1:case z1:i.push(e.contents);break;case R1:case $1:case K1:case G1:case Y1:case Z1:break;default:throw new i2(e)}}},o2=()=>{};function u2(e){return{type:V1,contents:e}}function l2(e,t){return{type:q1,contents:t,n:e}}function c2(e,t={}){return o2(t.expandedStates),{type:J1,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function p2(e){return{type:W1,parts:e}}function d2(e){return{type:z1,contents:e}}var h2={type:G1},f2={type:Z1},m2={type:K1},y2={type:Y1,hard:!0},g2={type:Y1,hard:!0,literal:!0},x2={type:Y1},b2={type:Y1,soft:!0},S2=[y2,f2],T2=[g2,f2],E2={type:$1};function v2(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function P2(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=u2(n);n=l2(t%r,n),n=l2(Number.NEGATIVE_INFINITY,n)}return n}var A2=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)};function D2(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}function C2(e,t){let r;switch(t){case"\n":r=/\n/g;break;case"\r":r=/\r/g;break;case"\r\n":r=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}var w2={eastAsianWidth(e){var t=e.charCodeAt(0),r=2==e.length?e.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=r&&r<=57343&&(n=(t&=1023)<<10|(r&=1023),n+=65536),12288==n||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":"N"}},k2=/[^\x20-\x7F]/;var I2=function(e){if(!e)return 0;if(!k2.test(e))return e.length;e=e.replace(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g," ");let t=0;for(let r of e){let e=r.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=768&&e<=879)continue;let n=w2.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t},N2=e=>{if(Array.isArray(e))return e;if(e.type!==W1)throw new Error(`Expect doc to be 'array' or '${W1}'.`);return e.parts};function F2(e,t){if("string"==typeof e)return t(e);let r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);let i=function(e){switch(t2(e)){case U1:return t(e.map(n));case W1:return t({...e,parts:e.parts.map(n)});case X1:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case J1:{let{expandedStates:r,contents:i}=e;return r?(r=r.map(n),i=r[0]):i=n(i),t({...e,contents:i,expandedStates:r})}case q1:case V1:case H1:case Q1:case z1:return t({...e,contents:n(e.contents)});case R1:case $1:case K1:case G1:case Y1:case Z1:return t(e);default:throw new i2(e)}}(e);return r.set(e,i),i}}function _2(e,t,r){let n=r,i=!1;return a2(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function O2(e){if(e.type===J1&&e.break||e.type===Y1&&e.hard||e.type===Z1)return!0}function L2(e){if(e.length>0){let t=A2(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function M2(e){return e.type!==Y1||e.hard?e.type===X1?e.flatContents:e:e.soft?"":" "}function B2(e){for(e=[...e];e.length>=2&&A2(!1,e,-2).type===Y1&&A2(!1,e,-1).type===Z1;)e.length-=2;if(e.length>0){let t=j2(A2(!1,e,-1));e[e.length-1]=t}return e}function j2(e){switch(t2(e)){case q1:case V1:case H1:case J1:case z1:case Q1:{let t=j2(e.contents);return{...e,contents:t}}case X1:return{...e,breakContents:j2(e.breakContents),flatContents:j2(e.flatContents)};case W1:return{...e,parts:B2(e.parts)};case U1:return B2(e);case R1:return e.replace(/[\n\r]*$/,"");case $1:case K1:case G1:case Y1:case Z1:break;default:throw new i2(e)}return e}function R2(e){return j2(function(e){return F2(e,(e=>function(e){switch(t2(e)){case W1:if(e.parts.every((e=>""===e)))return"";break;case J1:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===J1&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case q1:case V1:case H1:case z1:if(!e.contents)return"";break;case X1:if(!e.flatContents&&!e.breakContents)return"";break;case U1:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof A2(!1,t,-1)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:t}case R1:case $1:case K1:case G1:case Y1:case Q1:case Z1:break;default:throw new i2(e)}return e}(e)))}(e))}function U2(e){if(e.type===Y1)return!0}function $2(e,t){return e.type===Q1?{...e,contents:t(e.contents)}:t(e)}var V2=Symbol("MODE_BREAK"),q2=Symbol("MODE_FLAT"),K2=Symbol("cursor");function J2(e,t){return X2(e,{type:"indent"},t)}function W2(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?X2(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:X2(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function X2(e,t,r){let n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,a=0,o=0;for(let e of n)switch(e.type){case"indent":c(),r.useTabs?u(1):l(r.tabWidth);break;case"stringAlign":c(),i+=e.n,s+=e.n.length;break;case"numberAlign":a+=1,o+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),{...e,value:i,length:s,queue:n};function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function l(e){i+=" ".repeat(e),s+=e}function c(){r.useTabs?(a>0&&u(a),d()):p()}function p(){o>0&&l(o),d()}function d(){a=0,o=0}}function H2(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==K2)for(let r=i.length-1;r>=0;r--){let s=i[r];if(" "!==s&&"\t"!==s){e[n]=i.slice(0,r+1);break e}t++}else r++}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(K2);return t}function z2(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=[e],u=[];for(;r>=0;){if(0===o.length){if(0===a)return!0;o.push(t[--a]);continue}let{mode:e,doc:l}=o.pop();switch(t2(l)){case R1:u.push(l),r-=I2(l);break;case U1:case W1:{let t=N2(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case V1:case q1:case H1:case Q1:o.push({mode:e,doc:l.contents});break;case K1:r+=H2(u);break;case J1:{if(s&&l.break)return!1;let t=l.break?V2:e,r=l.expandedStates&&t===V2?A2(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case X1:{let t=(l.groupId?i[l.groupId]||q2:e)===V2?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case Y1:if(e===V2||l.hard)return!0;l.soft||(u.push(" "),r--);break;case z1:n=!0;break;case G1:if(n)return!1}}return!1}function G2(e,t){let r={},n=t.printWidth,i=D2(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:V2,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];a2(e,(function(e){if(e.type===Z1&&L2(r),e.type===J1){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===J1&&r.pop().break&&L2(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(t2(d)){case R1:{let e="\n"!==i?B1(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=I2(e));break}case U1:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case $1:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(K2),c++;break;case V1:a.push({ind:J2(e,t),mode:p,doc:d.contents});break;case q1:a.push({ind:W2(e,d.n,t),mode:p,doc:d.contents});break;case K1:s-=H2(o);break;case J1:switch(p){case q2:if(!u){a.push({ind:e,mode:d.break?V2:q2,doc:d.contents});break}case V2:{u=!1;let t={ind:e,mode:q2,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&z2(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=A2(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:V2,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:V2,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:q2,doc:t};if(z2(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:V2,doc:d.contents});break}}d.id&&(r[d.id]=A2(!1,a,-1).mode);break;case W1:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:q2,doc:o},h={ind:e,mode:V2,doc:o},f=z2(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:q2,doc:u},y={ind:e,mode:V2,doc:u};if(2===i.length){f?a.push(m,c):a.push(y,h);break}i.splice(0,2);let g={ind:e,mode:p,doc:p2(i)},x=i[0];z2({ind:e,mode:q2,doc:[o,u,x]},[],t,l.length>0,r,!0)?a.push(g,m,c):f?a.push(g,y,c):a.push(g,y,h);break}case X1:case H1:{let t=d.groupId?r[d.groupId]:p;if(t===V2){let t=d.type===X1?d.breakContents:d.negate?d.contents:u2(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===q2){let t=d.type===X1?d.flatContents:d.negate?u2(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case z1:l.push({ind:e,mode:p,doc:d.contents});break;case G1:l.length>0&&a.push({ind:e,mode:p,doc:y2});break;case Y1:switch(p){case q2:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case V2:if(l.length>0){a.push({ind:e,mode:p,doc:d},...l.reverse()),l.length=0;break}d.literal?e.root?(o.push(i,e.root.value),s=e.root.length):(o.push(i),s=0):(s-=H2(o),o.push(i+e.value),s=e.length)}break;case Q1:a.push({ind:e,mode:p,doc:d.contents});break;case Z1:break;default:throw new i2(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(K2);if(-1!==p){let e=o.indexOf(K2,p+1),t=o.slice(0,p).join(""),r=o.slice(p+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}function Y2(e){var t;if(!e)return"";if(Array.isArray(e)){let t=[];for(let r of e)if(Array.isArray(r))t.push(...Y2(r));else{let e=Y2(r);""!==e&&t.push(e)}return t}return e.type===X1?{...e,breakContents:Y2(e.breakContents),flatContents:Y2(e.flatContents)}:e.type===J1?{...e,contents:Y2(e.contents),expandedStates:null==(t=e.expandedStates)?void 0:t.map(Y2)}:e.type===W1?{type:"fill",parts:e.parts.map(Y2)}:e.contents?{...e,contents:Y2(e.contents)}:e}var Q2=function(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n},Z2=class extends Error{name="ConfigError"},e3=class extends Error{name="UndefinedParserError"},t3={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.\nThis option cannot be used with --range-start and --range-end.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:"Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)"}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:"Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.\nThis option cannot be used with --cursor-offset.",cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:"Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.\nThis option cannot be used with --cursor-offset.",cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment\nin order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function r3({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap((e=>e.languages??[])),n=[];for(let i of function(e){let t=[];for(let[r,n]of Object.entries(e)){let e={name:r,...n};Array.isArray(e.default)&&(e.default=A2(!1,e.default,-1).value),t.push(e)}return t}(Object.assign({},...e.map((({options:e})=>e)),t3)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter((e=>!e.deprecated))),"parser"===i.name&&(i.choices=[...i.choices,...n3(i.choices,r,e)])),i.pluginDefaults=Object.fromEntries(e.filter((e=>{var t;return void 0!==(null==(t=e.defaultOptions)?void 0:t[i.name])})).map((e=>[e.name,e.defaultOptions[i.name]]))),n.push(i));return{languages:r,options:n}}function*n3(e,t,r){let n=new Set(e.map((e=>e.value)));for(let e of t)if(e.parsers)for(let t of e.parsers)if(!n.has(t)){n.add(t);let i=r.find((e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t))),s=e.name;null!=i&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:t,description:s}}}var i3=e=>e.split(/[/\\]/).pop();function s3(e,t){if(!t)return;let r=i3(t).toLowerCase();return e.find((e=>{var t,n;return(null==(t=e.extensions)?void 0:t.some((e=>r.endsWith(e))))||(null==(n=e.filenames)?void 0:n.some((e=>e.toLowerCase()===r)))}))}var a3=function(e,t){let r=e.plugins.flatMap((e=>e.languages??[])),n=function(e,t){if(t)return e.find((({name:e})=>e.toLowerCase()===t))??e.find((({aliases:e})=>null==e?void 0:e.includes(t)))??e.find((({extensions:e})=>null==e?void 0:e.includes(`.${t}`)))}(r,t.language)??s3(r,t.physicalFile)??s3(r,t.file)??void t.physicalFile;return null==n?void 0:n.parsers[0]},o3={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map((e=>o3.value(e))).join(", ")}]`;let t=Object.keys(e);return 0===t.length?"{}":`{ ${t.map((t=>`${o3.key(t)}: ${o3.value(e[t])}`)).join(", ")} }`},pair:({key:e,value:t})=>o3.value({[e]:t})},u3=D1(N1(),1),l3=D1(N1(),1),c3=Symbol.for("vnopts.VALUE_NOT_EXIST"),p3=Symbol.for("vnopts.VALUE_UNCHANGED"),d3=" ".repeat(2);function h3(e,t,r,n){return[`Invalid ${l3.default.red(n.key(e))} value.`,`Expected ${l3.default.blue(r)},`,`but received ${t===c3?l3.default.gray("nothing"):l3.default.red(n.value(t))}.`].join(" ")}function f3({text:e,list:t},r){let n=[];return e&&n.push(`- ${l3.default.blue(e)}`),t&&n.push([`- ${l3.default.blue(t.title)}:`].concat(t.values.map((e=>f3(e,r-d3.length).replace(/^|\n/g,`$&${d3}`)))).join("\n")),m3(n,r)}function m3(e,t){if(1===e.length)return e[0];let[r,n]=e,[i,s]=e.map((e=>e.split("\n",1)[0].length));return i>t&&i>s?n:r}var y3=D1(N1(),1),g3=[],x3=[];var b3=(e,t,{descriptor:r,logger:n,schemas:i})=>{let s=[`Ignored unknown option ${y3.default.yellow(r.pair({key:e,value:t}))}.`],a=Object.keys(i).sort().find((t=>function(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,i=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-i);)n--,i--;let s=0;for(;s<n&&e.charCodeAt(s)===t.charCodeAt(s);)s++;if(n-=s,i-=s,0===n)return i;let a,o,u,l,c=0,p=0;for(;c<n;)x3[c]=e.charCodeAt(s+c),g3[c]=++c;for(;p<i;)for(a=t.charCodeAt(s+p),u=p++,o=p,c=0;c<n;c++)l=a===x3[c]?u:u+1,u=g3[c],o=g3[c]=u>o?l>o?o+1:l:l>u?u+1:l;return o}(e,t)<3));a&&s.push(`Did you mean ${y3.default.blue(r.key(a))}?`),n.warn(s.join(" "))},S3=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];var T3=class{static create(e){return function(e,t){let r=new e(t),n=Object.create(r);for(let e of S3)e in t&&(n[e]=E3(t[e],r,T3.prototype[e].length));return n}(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,r){return e}preprocess(e,t){return e}postprocess(e,t){return p3}};function E3(e,t,r){return"function"==typeof e?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var v3=class extends T3{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},P3=class extends T3{expected(){return"anything"}validate(){return!0}},A3=class extends T3{constructor({valueSchema:e,name:t=e.name,...r}){super({...r,name:t}),this._valueSchema=e}expected(e){let{text:t,list:r}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:r&&{title:"an array of the following values",values:[{list:r}]}}}validate(e,t){if(!Array.isArray(e))return!1;let r=[];for(let n of e){let e=t.normalizeValidateResult(this._valueSchema.validate(n,t),n);!0!==e&&r.push(e.value)}return 0===r.length||{value:r}}deprecated(e,t){let r=[];for(let n of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(n,t),n);!1!==e&&r.push(...e.map((({value:e})=>({value:[e]}))))}return r}forward(e,t){let r=[];for(let n of e){let e=t.normalizeForwardResult(this._valueSchema.forward(n,t),n);r.push(...e.map(D3))}return r}redirect(e,t){let r=[],n=[];for(let i of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);"remain"in e&&r.push(e.remain),n.push(...e.redirect.map(D3))}return 0===r.length?{redirect:n}:{redirect:n,remain:r}}overlap(e,t){return e.concat(t)}};function D3({from:e,to:t}){return{from:[e],to:t}}var C3=class extends T3{expected(){return"true or false"}validate(e){return"boolean"==typeof e}};function w3(e,t){let r=Object.create(null);for(let n of e){let e=n[t];if(r[e])throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);r[e]=n}return r}function k3(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,i=["undefined","object","boolean","number","string"];return r!==n?i.indexOf(r)-i.indexOf(n):"string"!==r?Number(e)-Number(t):e.localeCompare(t)}function I3(e){return void 0===e?{}:e}function N3(e){if("string"==typeof e)return{text:e};let{text:t,list:r}=e;return function(e,t){if(!e)throw new Error(t)}(void 0!==(t||r),"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(N3)}}:{text:t}}function F3(e,t){return!0===e||(!1===e?{value:t}:e)}function _3(e,t,r=!1){return!1!==e&&(!0===e?!!r||[{value:t}]:"value"in e?[e]:0!==e.length&&e)}function O3(e,t){return"string"==typeof e||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function L3(e,t){return void 0===e?[]:Array.isArray(e)?e.map((e=>O3(e,t))):[O3(e,t)]}function M3(e,t){let r=L3("object"==typeof e&&"redirect"in e?e.redirect:e,t);return 0===r.length?{remain:t,redirect:r}:"object"==typeof e&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}var B3,j3=class extends T3{constructor(e){super(e),this._choices=function(e,t){let r=new Map;for(let n of e){let e=n[t];if(r.has(e))throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);r.set(e,n)}return r}(e.choices.map((e=>e&&"object"==typeof e?e:{value:e})),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map((e=>this._choices.get(e))).filter((({hidden:e})=>!e)).map((e=>e.value)).sort(k3).map(e.value),r=t.slice(0,-2),n=t.slice(-2);return{text:r.concat(n.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return!(!t||!t.deprecated)&&{value:e}}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},R3=class extends T3{expected(){return"a number"}validate(e,t){return"number"==typeof e}},U3=class extends R3{expected(){return"an integer"}validate(e,t){return!0===t.normalizeValidateResult(super.validate(e,t),e)&&(r=e)===Math.floor(r);var r}},$3=class extends T3{expected(){return"a string"}validate(e){return"string"==typeof e}},V3=o3,q3=b3,K3=(e,t,r)=>{let{text:n,list:i}=r.normalizeExpectedResult(r.schemas[e].expected(r)),s=[];return n&&s.push(h3(e,t,n,r.descriptor)),i&&s.push([h3(e,t,i.title,r.descriptor)].concat(i.values.map((e=>f3(e,r.loggerPrintWidth)))).join("\n")),m3(s,r.loggerPrintWidth)},J3=(e,t,{descriptor:r})=>{let n=[`${u3.default.yellow("string"==typeof e?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${u3.default.blue("string"==typeof t?r.key(t):r.pair(t))}`),n.join("; ")+"."};function W3(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let i,{name:s}=e,a={name:s},o={};switch(e.type){case"int":i=U3,t&&(a.preprocess=Number);break;case"string":case"path":i=$3;break;case"choice":i=j3,a.choices=e.choices.map((t=>null!=t&&t.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t));break;case"boolean":i=C3;break;case"flag":i=n,a.flags=r.flatMap((e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean)));break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?a.validate=(t,r,n)=>e.exception(t)||r.validate(t,n):a.validate=(e,t,r)=>void 0===e||t.validate(e,r),e.redirect&&(o.redirect=t=>t?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(o.deprecated=!0),t&&!e.array){let e=a.preprocess||(e=>e);a.preprocess=(t,r,n)=>r.preprocess(e(Array.isArray(t)?A2(!1,t,-1):t),n)}return e.array?A3.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...o,valueSchema:i.create(a)}):i.create({...a,...o})}var X3=function(e,t,{logger:r=!1,isCLI:n=!1,passThrough:i=!1,FlagSchema:s,descriptor:a}={}){if(n){if(!s)throw new Error("'FlagSchema' option is required.");if(!a)throw new Error("'descriptor' option is required.")}else a=o3;let o=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,r)=>{let{_:n,...i}=r.schemas;return b3(e,t,{...r,schemas:i})},u=function(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(P3.create({name:"_"}));for(let i of e)n.push(W3(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(v3.create({name:i.alias,sourceName:i.name}));return n}(t,{isCLI:n,FlagSchema:s}),l=new class{constructor(e,t){let{logger:r=console,loggerPrintWidth:n=80,descriptor:i=V3,unknown:s=q3,invalid:a=K3,deprecated:o=J3,missing:u=(()=>!1),required:l=(()=>!1),preprocess:c=(e=>e),postprocess:p=(()=>p3)}=t||{};var d;this._utils={descriptor:i,logger:r||{warn:()=>{}},loggerPrintWidth:n,schemas:w3(e,"name"),normalizeDefaultResult:I3,normalizeExpectedResult:N3,normalizeDeprecatedResult:_3,normalizeForwardResult:L3,normalizeRedirectResult:M3,normalizeValidateResult:F3},this._unknownHandler=s,this._invalidHandler=(d=a,(...e)=>{let t=d(...e);return"string"==typeof t?new Error(t):t}),this._deprecatedHandler=o,this._identifyMissing=(e,t)=>!(e in t)||u(e,t),this._identifyRequired=l,this._preprocess=c,this._postprocess=p,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=function(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return!!e[r]||(e[r]=!0,!1)}}()}normalize(e){let t={},r=[this._preprocess(e,this._utils)],n=()=>{for(;0!==r.length;){let e=r.shift(),n=this._applyNormalization(e,t);r.push(...n)}};n();for(let e of Object.keys(this._utils.schemas)){let n=this._utils.schemas[e];if(!(e in t)){let t=I3(n.default(this._utils));"value"in t&&r.push({[e]:t.value})}}n();for(let e of Object.keys(this._utils.schemas)){if(!(e in t))continue;let r=this._utils.schemas[e],n=t[e],i=r.postprocess(n,this._utils);i!==p3&&(this._applyValidation(i,e,r),t[e]=i)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let r=[],{knownKeys:n,unknownKeys:i}=this._partitionOptionKeys(e);for(let i of n){let n=this._utils.schemas[i],s=n.preprocess(e[i],this._utils);this._applyValidation(s,i,n);let a=({from:e,to:t})=>{r.push("string"==typeof t?{[t]:e}:{[t.key]:t.value})},o=({value:e,redirectTo:t})=>{let r=_3(n.deprecated(e,this._utils),s,!0);if(!1!==r)if(!0===r)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,t,this._utils));else for(let{value:e}of r){let r={key:i,value:e};if(!this._hasDeprecationWarned(r)){let n="string"==typeof t?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(r,n,this._utils))}}};L3(n.forward(s,this._utils),s).forEach(a);let u=M3(n.redirect(s,this._utils),s);if(u.redirect.forEach(a),"remain"in u){let e=u.remain;t[i]=i in t?n.overlap(t[i],e,this._utils):e,o({value:e})}for(let{from:e,to:t}of u.redirect)o({value:e,redirectTo:t})}for(let n of i){let i=e[n];this._applyUnknownHandler(n,i,t,((e,t)=>{r.push({[e]:t})}))}return r}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,c3,this._utils)}_partitionOptionKeys(e){let[t,r]=function(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}(Object.keys(e).filter((t=>!this._identifyMissing(t,e))),(e=>e in this._utils.schemas));return{knownKeys:t,unknownKeys:r}}_applyValidation(e,t,r){let n=F3(r.validate(e,this._utils),e);if(!0!==n)throw this._invalidHandler(t,n.value,this._utils)}_applyUnknownHandler(e,t,r,n){let i=this._unknownHandler(e,t,this._utils);if(i)for(let e of Object.keys(i)){if(this._identifyMissing(e,i))continue;let t=i[e];e in this._utils.schemas?n(e,t):r[e]=t}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==p3){if(t.delete)for(let r of t.delete)delete e[r];if(t.override){let{knownKeys:r,unknownKeys:n}=this._partitionOptionKeys(t.override);for(let n of r){let r=t.override[n];this._applyValidation(r,n,this._utils.schemas[n]),e[n]=r}for(let r of n){let n=t.override[r];this._applyUnknownHandler(r,n,e,((t,r)=>{let n=this._utils.schemas[t];this._applyValidation(r,t,n),e[t]=r}))}}}}}(u,{logger:r,unknown:o,descriptor:a}),c=!1!==r;c&&B3&&(l._hasDeprecationWarned=B3);let p=l.normalize(e);return c&&(B3=l._hasDeprecationWarned),p};function H3(e,t){if(!t)throw new Error("parserName is required.");for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.parsers&&Object.prototype.hasOwnProperty.call(n.parsers,t))return n}let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Z2(r)}function z3({plugins:e,parser:t}){return G3(H3(e,t),t)}function G3(e,t){let r=e.parsers[t];return"function"==typeof r?r():r}var Y3={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};var Q3=async function(e,t={}){var r;let n={...e};if(!n.parser){if(!n.filepath)throw new e3("No parser and no file path given, couldn't infer a parser.");if(n.parser=a3(n,{physicalFile:n.filepath}),!n.parser)throw new e3(`No parser could be inferred for file "${n.filepath}".`)}let i=r3({plugins:e.plugins,showDeprecated:!0}).options,s={...Y3,...Object.fromEntries(i.filter((e=>void 0!==e.default)).map((e=>[e.name,e.default])))},a=H3(n.plugins,n.parser),o=await G3(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let u=null!=(r=a.printers)&&r[o.astFormat]?a:function(e,t){if(!t)throw new Error("astFormat is required.");for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.printers&&Object.prototype.hasOwnProperty.call(n.printers,t))return n}let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Z2(r)}(n.plugins,o.astFormat),l=await function(e,t){let r=e.printers[t];return"function"==typeof r?r():r}(u,o.astFormat);n.printer=l;let c={...s,...u.defaultOptions?Object.fromEntries(Object.entries(u.defaultOptions).filter((([,e])=>void 0!==e))):{}};for(let[e,t]of Object.entries(c))(null===n[e]||void 0===n[e])&&(n[e]=t);return"json"===n.parser&&(n.trailingComma="none"),X3(n,i,{passThrough:Object.keys(Y3),...t})},Z3=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),e4=e=>Object.keys(e).filter((e=>!Z3.has(e)));var t4=function(e){return e?t=>e(t,Z3):e4};var r4=function(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=t4(n),s=r.ignoredProperties??new Set;return function e(t,n){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map((t=>e(t,n))).filter(Boolean);let a={},o=new Set(i(t));for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||s.has(r)||(o.has(r)?a[r]=e(t[r],t):a[r]=t[r]);let u=r(t,a,n);if(null!==u)return u??a}(e)},n4=D1(M1(),1);var i4,s4,a4,o4,u4=async function(e,t){let r,n=await z3(t),i=n.preprocess?n.preprocess(e,t):e;t.originalText=i;try{r=await n.parse(i,t,t)}catch(t){!function(e,t){let{loc:r}=e;if(r){let n=(0,n4.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+="\n"+n,e.codeFrame=n,e}throw e}(t,e)}return{text:i,ast:r}};i4=new WeakSet,s4=function(e){let{stack:t}=this;for(let r=t.length-1;r>=0;r-=2)if(!Array.isArray(t[r])&&--e<0)return r;return-1},a4=new WeakSet,o4=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let r=e[t];Array.isArray(r)||(yield r)}};var l4=class{constructor(e){C1(this,i4),C1(this,a4),this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return A2(!1,e,null===t?-2:-4)??null}get index(){return null===this.siblings?null:A2(!1,this.stack,-2)}get node(){return A2(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return null!==this.siblings}get siblings(){let{stack:e}=this,t=A2(!1,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return null===e?null:e[this.index+1]}get previous(){let{siblings:e}=this;return null===e?null:e[this.index-1]}get isFirst(){return 0===this.index}get isLast(){let{siblings:e,index:t}=this;return null!==e&&t===e.length-1}get isRoot(){return 1===this.stack.length}get root(){return this.stack[0]}get ancestors(){return[...w1(this,a4,o4).call(this)]}getName(){let{stack:e}=this,{length:t}=e;return t>1?A2(!1,e,-2):null}getValue(){return A2(!1,this.stack,-1)}getNode(e=0){let t=w1(this,i4,s4).call(this,e);return-1===t?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}call(e,...t){let{stack:r}=this,{length:n}=r,i=A2(!1,r,-1);for(let e of t)i=i[e],r.push(e,i);try{return e(this)}finally{r.length=n}}callParent(e,t=0){let r=w1(this,i4,s4).call(this,t+1),n=this.stack.splice(r+1);try{return e(this)}finally{this.stack.push(...n)}}each(e,...t){let{stack:r}=this,{length:n}=r,i=A2(!1,r,-1);for(let e of t)i=i[e],r.push(e,i);try{for(let t=0;t<i.length;++t)r.push(t,i[t]),e(this,t,i),r.length-=2}finally{r.length=n}}map(e,...t){let r=[];return this.each(((t,n,i)=>{r[n]=e(t,n,i)}),...t),r}match(...e){let t=this.stack.length-1,r=null,n=this.stack[t--];for(let i of e){if(void 0===n)return!1;let e=null;if("number"==typeof r&&(e=r,r=this.stack[t--],n=this.stack[t--]),i&&!i(n,r,e))return!1;r=this.stack[t--],n=this.stack[t--]}return!0}findAncestor(e){for(let t of w1(this,a4,o4).call(this))if(e(t))return t}hasAncestor(e){for(let t of w1(this,a4,o4).call(this))if(e(t))return!0;return!1}},c4=new Proxy((()=>{}),{get:()=>c4}),p4=c4;function d4(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var h4=d4(/\s/),f4=d4(" \t"),m4=d4(",; \t"),y4=d4(/[^\n\r]/);var g4=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};var x4=function(e,t,r={}){let n=f4(e,r.backwards?t-1:t,r);return n!==g4(e,n,r)};var b4=function(e){return Array.isArray(e)&&e.length>0};var S4=function(e){return null!==e&&"object"==typeof e};function*T4(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>S4(e)&&n(e);for(let t of r(e)){let r=e[t];if(Array.isArray(r))for(let e of r)i(e)&&(yield e);else i(r)&&(yield r)}}function E4(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}(e)}function v4(e,t){t.leading=!0,t.trailing=!1,E4(e,t)}function P4(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),E4(e,t)}function A4(e,t){t.leading=!1,t.trailing=!0,E4(e,t)}var D4=new WeakMap;function C4(e,t){if(D4.has(e))return D4.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:i},locStart:s,locEnd:a}=t;if(!n)return[];let o=((null==r?void 0:r(e,t))??[...T4(e,{getVisitorKeys:t4(i)})]).flatMap((e=>n(e)?[e]:C4(e,t)));return o.sort(((e,t)=>s(e)-s(t)||a(e)-a(t))),D4.set(e,o),o}function w4(e,t,r,n){let i,s,{locStart:a,locEnd:o}=r,u=a(t),l=o(t),c=C4(e,r),p=0,d=c.length;for(;p<d;){let e=p+d>>1,n=c[e],h=a(n),f=o(n);if(h<=u&&l<=f)return w4(n,t,r,n);if(f<=u)i=n,p=e+1;else{if(!(l<=h))throw new Error("Comment location overlaps with node location");s=n,d=e}}if("TemplateLiteral"===(null==n?void 0:n.type)){let{quasis:e}=n,a=O4(e,t,r);i&&O4(e,i,r)!==a&&(i=null),s&&O4(e,s,r)!==a&&(s=null)}return{enclosingNode:n,precedingNode:i,followingNode:s}}var k4=()=>!1;var I4=e=>!/[\S\n\u2028\u2029]/.test(e);function N4(e,t,r,n){let{comment:i,precedingNode:s}=r[n],{locStart:a,locEnd:o}=t,u=a(i);if(s)for(let t=n-1;t>=0;t--){let{comment:n,precedingNode:i}=r[t];if(i!==s||!I4(e.slice(o(n),u)))break;u=a(n)}return x4(e,u,{backwards:!0})}function F4(e,t,r,n){let{comment:i,followingNode:s}=r[n],{locStart:a,locEnd:o}=t,u=o(i);if(s)for(let t=n+1;t<r.length;t++){let{comment:n,followingNode:i}=r[t];if(i!==s||!I4(e.slice(u,a(n))))break;u=o(n)}return x4(e,u)}function _4(e,t){var r,n;let i=e.length;if(0===i)return;let s,{precedingNode:a,followingNode:o}=e[0],u=t.locStart(o);for(s=i;s>0;--s){let{comment:i,precedingNode:l,followingNode:c}=e[s-1];p4.strictEqual(l,a),p4.strictEqual(c,o);let p=t.originalText.slice(t.locEnd(i),u);if(!((null==(n=(r=t.printer).isGap)?void 0:n.call(r,p,t))??/^[\s(]*$/.test(p)))break;u=t.locStart(i)}for(let[t,{comment:r}]of e.entries())t<s?A4(a,r):v4(o,r);for(let e of[a,o])e.comments&&e.comments.length>1&&e.comments.sort(((e,r)=>t.locStart(e)-t.locStart(r)));e.length=0}function O4(e,t,r){let n=r.locStart(t)-1;for(let t=1;t<e.length;++t)if(n<r.locStart(e[t]))return t-1;return 0}var L4=function(e,t){let r=t-1;return r=f4(e,r,{backwards:!0}),r=g4(e,r,{backwards:!0}),r=f4(e,r,{backwards:!0}),r!==g4(e,r,{backwards:!0})};function M4(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function B4(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if(0===(r.comments||[]).filter((e=>!n.has(e))).length)return{leading:"",trailing:""};let i,s=[],a=[];return e.each((()=>{let r=e.node;if(null!=n&&n.has(r))return;let{leading:o,trailing:u}=r;o?s.push(function(e,t){var r;let n=e.node,i=[M4(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=x4(a,u(n))?x4(a,o(n),{backwards:!0})?S2:x2:" ";i.push(e)}else i.push(S2);let l=g4(a,f4(a,u(n)));return!1!==l&&x4(a,l)&&i.push(S2),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=M4(e,t),{printer:a,originalText:o,locStart:u}=t,l=null==(n=a.isBlockComment)?void 0:n.call(a,i);if(null!=r&&r.hasLineSuffix&&(null==r||!r.isBlock)||x4(o,u(i),{backwards:!0})){let e=L4(o,u(i));return{doc:d2([S2,e?S2:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[d2([" ",s]),f2],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}async function j4(e,t,r,n,i){let{embeddedLanguageFormatting:s,printer:{embed:a,hasPrettierIgnore:o=(()=>!1),getVisitorKeys:u}}=r;if(!a||"auto"!==s)return;if(a.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let l=t4(a.getVisitorKeys??u),c=[];!function t(){let{node:n}=e;if(null===n||"object"!=typeof n||o(e))return;for(let r of l(n))Array.isArray(n[r])?e.each(t,r):e.call(t,r);let s=a(e,r);if(s){if("function"==typeof s)return void c.push({print:s,node:n,pathStack:[...e.stack]});i.set(n,s)}}();let p=e.stack;for(let{print:n,node:s,pathStack:a}of c)try{e.stack=a;let o=await n(d,t,e,r);o&&i.set(s,o)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}function d(e,t){return async function(e,t,r,n){let i=await Q3({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await u4(e,i),a=await n(s,i);return R2(a)}(e,t,r,n)}e.stack=p}var R4=function(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:a}=t,{node:o}=e,u=i(o),l=s(o);for(let e of n)i(e)>=u&&s(e)<=l&&a.add(e);return r.slice(u,l)};async function U4(e,t){({ast:e}=await V4(e,t));let r=new Map,n=new l4(e),i=new Map;await j4(n,a,t,U4,i);let s=await $4(n,t,a,void 0,i);return function(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let e of t){if(!e.printed&&!r.has(e))throw new Error('Comment "'+e.value.trim()+'" was not printed. Please report this error!');delete e.printed}}(t),s;function a(e,t){return void 0===e||e===n?o(t):Array.isArray(e)?n.call((()=>o(t)),...e):n.call((()=>o(t)),e)}function o(e){let s=n.node;if(null==s)return"";let o=s&&"object"==typeof s&&void 0===e;if(o&&r.has(s))return r.get(s);let u=$4(n,t,a,e,i);return o&&r.set(s,u),u}}function $4(e,t,r,n,i){var s;let a,{node:o}=e,{printer:u}=t;return a=null!=(s=u.hasPrettierIgnore)&&s.call(u,e)?R4(e,t):i.has(o)?i.get(o):u.print(e,t,r,n),o===t.cursorNode&&(a=$2(a,(e=>[E2,e,E2]))),u.printComment&&(!u.willPrintOwnComments||!u.willPrintOwnComments(e,t))&&(a=function(e,t,r){let{leading:n,trailing:i}=B4(e,r);return n||i?$2(t,(e=>[n,e,i])):t}(e,a,t)),a}async function V4(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,function(e,t){let{comments:r}=e;if(delete e.comments,!b4(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:a=!1}={},handleComments:o={}},originalText:u}=t,{ownLine:l=k4,endOfLine:c=k4,remaining:p=k4}=o,d=r.map(((n,i)=>({...w4(e,n,t),comment:n,text:u,options:t,ast:e,isLastComment:r.length-1===i})));for(let[e,t]of d.entries()){let r,{comment:o,precedingNode:u,enclosingNode:h,followingNode:f,text:m,options:y,ast:g,isLastComment:x}=t;if("json"===y.parser||"json5"===y.parser||"__js_expression"===y.parser||"__ts_expression"===y.parser||"__vue_expression"===y.parser||"__vue_ts_expression"===y.parser){if(i(o)-i(g)<=0){v4(g,o);continue}if(s(o)-s(g)>=0){A4(g,o);continue}}if(a?r=[t]:(o.enclosingNode=h,o.precedingNode=u,o.followingNode=f,r=[o,m,y,g,x]),N4(m,y,d,e))o.placement="ownLine",l(...r)||(f?v4(f,o):u?A4(u,o):P4(h||g,o));else if(F4(m,y,d,e))o.placement="endOfLine",c(...r)||(u?A4(u,o):f?v4(f,o):P4(h||g,o));else if(o.placement="remaining",!p(...r))if(u&&f){let e=n.length;e>0&&n[e-1].followingNode!==f&&_4(n,y),n.push(t)}else u?A4(u,o):f?v4(f,o):P4(h||g,o)}if(_4(n,t),!a)for(let e of r)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}(e,t);let{printer:{preprocess:n}}=t;return{ast:e=n?await n(e,t):e,comments:r}}var q4=({parser:e})=>"json"===e||"json5"===e||"json-stringify"===e;function K4(e){let t=e.length-1;for(;;){let r=e[t];if("Program"!==(null==r?void 0:r.type)&&"File"!==(null==r?void 0:r.type))break;t--}return e.slice(0,t+1)}function J4(e,t,r,n,i=[],s){let{locStart:a,locEnd:o}=r,u=a(e),l=o(e);if(!(t>l||t<u||"rangeEnd"===s&&t===u||"rangeStart"===s&&t===l)){for(let a of C4(e,r)){let o=J4(a,t,r,n,[e,...i],s);if(o)return o}if(!n||n(e,i[0]))return{node:e,parentNodes:i}}}var W4=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),X4=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function H4(e,t,r){if(!t)return!1;switch(e.parser){case"flow":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"__babel_estree":return function(e,t){return"DeclareExportDeclaration"!==t&&"TypeParameterDeclaration"!==e&&("Directive"===e||"TypeAlias"===e||"TSExportAssignment"===e||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}(t.type,null==r?void 0:r.type);case"json":case"json5":case"json-stringify":return W4.has(t.type);case"graphql":return X4.has(t.kind);case"vue":return"root"!==t.tag}return!1}function z4(e,t,r){let{rangeStart:n,rangeEnd:i,locStart:s,locEnd:a}=t;p4.ok(i>n);let o=e.slice(n,i).search(/\S/),u=-1===o;if(!u)for(n+=o;i>n&&!/\S/.test(e[i-1]);--i);let l,c,p=J4(r,n,t,((e,r)=>H4(t,e,r)),[],"rangeStart"),d=u?p:J4(r,i,t,(e=>H4(t,e)),[],"rangeEnd");if(!p||!d)return{rangeStart:0,rangeEnd:0};if(q4(t)){let e=function(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find((e=>W4.has(e.type)&&n.has(e)))}(p,d);l=e,c=e}else({startNode:l,endNode:c}=function(e,t,{locStart:r,locEnd:n}){let i=e.node,s=t.node;if(i===s)return{startNode:i,endNode:s};let a=r(e.node);for(let e of K4(t.parentNodes)){if(!(r(e)>=a))break;s=e}let o=n(t.node);for(let t of K4(e.parentNodes)){if(!(n(t)<=o))break;if(i=t,i===s)break}return{startNode:i,endNode:s}}(p,d,t));return{rangeStart:Math.min(s(l),s(c)),rangeEnd:Math.max(a(l),a(c))}}var G4=function(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=t4(t.printer.getVisitorKeys),a=e=>n(e)<=r&&i(e)>=r,o=e;for(let t of function*(e,t){let r=[e];for(let e=0;e<r.length;e++){let n=r[e];for(let e of T4(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:s,filter:a}))o=t;return o},Y4="\ufeff",Q4=Symbol("cursor");async function Z4(e,t,r=0){if(!e||0===e.trim().length)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await u4(e,t);t.cursorOffset>=0&&(t.cursorNode=G4(n,t));let s=await U4(n,t);r>0&&(s=P2([S2,s],r,t.tabWidth));let a=G2(s,t);if(r>0){let e=a.formatted.trim();void 0!==a.cursorNodeStart&&(a.cursorNodeStart-=a.formatted.indexOf(e)),a.formatted=e+D2(t.endOfLine)}let o=t[Symbol.for("comments")];if(t.cursorOffset>=0){let e,r,n,s,u;if(t.cursorNode&&a.cursorNodeText?(e=t.locStart(t.cursorNode),r=i.slice(e,t.locEnd(t.cursorNode)),n=t.cursorOffset-e,s=a.cursorNodeStart,u=a.cursorNodeText):(e=0,r=i,n=t.cursorOffset,s=0,u=a.formatted),r===u)return{formatted:a.formatted,cursorOffset:s+n,comments:o};let l=r.split("");l.splice(n,0,Q4);let c=u.split(""),p=(0,j1.diffArrays)(l,c),d=s;for(let e of p)if(e.removed){if(e.value.includes(Q4))break}else d+=e.count;return{formatted:a.formatted,cursorOffset:d,comments:o}}return{formatted:a.formatted,cursorOffset:-1,comments:o}}function e5(e,t,r){return"number"!=typeof t||Number.isNaN(t)||t<0||t>e.length?r:t}function t5(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=e5(e,r,-1),n=e5(e,n,0),i=e5(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function r5(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=t5(e,t),a=e.charAt(0)===Y4;if(a&&(e=e.slice(1),r--,n--,i--),"auto"===s&&(s=function(e){let t=e.indexOf("\r");return t>=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"}(e)),e.includes("\r")){let t=t=>C2(e.slice(0,Math.max(t,0)),"\r\n");r-=t(r),n-=t(n),i-=t(i),e=function(e){return B1(!1,e,/\r\n?/g,"\n")}(e)}return{hasBOM:a,text:e,options:t5(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function n5(e,t){let r=await z3(t);return!r.hasPragma||r.hasPragma(e)}async function i5(e,t){let r,{hasBOM:n,text:i,options:s}=r5(e,await Q3(t));return s.rangeStart>=s.rangeEnd&&""!==i||s.requirePragma&&!await n5(i,s)?{formatted:e,cursorOffset:t.cursorOffset,comments:[]}:(s.rangeStart>0||s.rangeEnd<i.length?r=await async function(e,t){let{ast:r,text:n}=await u4(e,t),{rangeStart:i,rangeEnd:s}=z4(n,t,r),a=n.slice(i,s),o=Math.min(i,n.lastIndexOf("\n",i)+1),u=n.slice(o,i).match(/^\s*/)[0],l=Q2(u,t.tabWidth),c=await Z4(a,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},l),p=c.formatted.trimEnd(),{cursorOffset:d}=t;d>s?d+=p.length-a.length:c.cursorOffset>=0&&(d=c.cursorOffset+i);let h=n.slice(0,i)+p+n.slice(s);if("lf"!==t.endOfLine){let e=D2(t.endOfLine);d>=0&&"\r\n"===e&&(d+=C2(h.slice(0,d),"\n")),h=B1(!1,h,"\n",e)}return{formatted:h,cursorOffset:d,comments:c.comments}}(i,s):(!s.requirePragma&&s.insertPragma&&s.printer.insertPragma&&!await n5(i,s)&&(i=s.printer.insertPragma(i)),r=await Z4(i,s)),n&&(r.formatted=Y4+r.formatted,r.cursorOffset>=0&&r.cursorOffset++),r)}var s5={};P1(s5,{addDanglingComment:()=>P4,addLeadingComment:()=>v4,addTrailingComment:()=>A4,getAlignmentSize:()=>Q2,getIndentSize:()=>p5,getMaxContinuousCount:()=>c5,getNextNonSpaceNonCommentCharacter:()=>f5,getNextNonSpaceNonCommentCharacterIndex:()=>y5,getStringWidth:()=>I2,hasNewline:()=>x4,hasNewlineInRange:()=>d5,hasSpaces:()=>h5,isNextLineEmpty:()=>x5,isNextLineEmptyAfterIndex:()=>l5,isPreviousLineEmpty:()=>g5,makeString:()=>m5,skip:()=>d4,skipEverythingButNewLine:()=>y4,skipInlineComment:()=>a5,skipNewline:()=>g4,skipSpaces:()=>f4,skipToLineEnd:()=>m4,skipTrailingComment:()=>o5,skipWhitespace:()=>h4});var a5=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var o5=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?y4(e,t):t)};var u5=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=f4(e,n),n=a5(e,n),n=o5(e,n),n=g4(e,n);return n};var l5=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=m4(e,n),n=a5(e,n),n=f4(e,n);return n=o5(e,n),n=g4(e,n),!1!==n&&x4(e,n)};var c5=function(e,t){let r=e.match(new RegExp(`(${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(t)})+`,"g"));return null===r?0:r.reduce(((e,r)=>Math.max(e,r.length/t.length)),0)};var p5=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:Q2(e.slice(r+1).match(/^[\t ]*/)[0],t)};var d5=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};var h5=function(e,t,r={}){return f4(e,r.backwards?t-1:t,r)!==t};var f5=function(e,t){let r=u5(e,t);return!1===r?"":e.charAt(r)};var m5=function(e,t,r){let n='"'===t?"'":'"',i=B1(!1,e,/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t};function y5(e,t){return 2===arguments.length||"number"==typeof t?u5(e,t):function(e,t,r){return u5(e,r(t))}(...arguments)}function g5(e,t){return 2===arguments.length||"number"==typeof t?L4(e,t):function(e,t,r){return L4(e,r(t))}(...arguments)}function x5(e,t){return 2===arguments.length||"number"==typeof t?l5(e,t):function(e,t,r){return l5(e,r(t))}(...arguments)}var b5={};P1(b5,{builders:()=>S5,printer:()=>T5,utils:()=>E5});var S5={join:v2,line:x2,softline:b2,hardline:S2,literalline:T2,group:c2,conditionalGroup:function(e,t){return c2(e[0],{...t,expandedStates:e})},fill:p2,lineSuffix:d2,lineSuffixBoundary:h2,cursor:E2,breakParent:f2,ifBreak:function(e,t="",r={}){return{type:X1,breakContents:e,flatContents:t,groupId:r.groupId}},trim:m2,indent:u2,indentIfBreak:function(e,t){return{type:H1,contents:e,groupId:t.groupId,negate:t.negate}},align:l2,addAlignmentToDoc:P2,markAsRoot:function(e){return l2({type:"root"},e)},dedentToRoot:function(e){return l2(Number.NEGATIVE_INFINITY,e)},dedent:function(e){return l2(-1,e)},hardlineWithoutBreakParent:y2,literallineWithoutBreakParent:g2,label:function(e,t){return e?{type:Q1,label:e,contents:t}:t},concat:e=>e},T5={printDocToString:G2},E5={willBreak:function(e){return _2(e,O2,!1)},traverseDoc:a2,findInDoc:_2,mapDoc:F2,removeLines:function(e){return F2(e,M2)},stripTrailingHardline:R2,replaceEndOfLine:function(e,t=T2){return F2(e,(e=>"string"==typeof e?v2(t,e.split("\n")):e))},canBreak:function(e){return _2(e,U2,!1)}},v5="3.0.2";function P5(e,t=1){return async(...r)=>{let n=r[t]??{},i=n.plugins??[];return r[t]={...n,plugins:Array.isArray(i)?i:Object.values(i)},e(...r)}}var A5=P5(i5);async function D5(e,t){let{formatted:r}=await A5(e,{...t,cursorOffset:-1});return r}async function C5(e,t){return await D5(e,t)===e}var w5=P5(r3,0),k5={parse:P5((async function(e,t,r){let{text:n,options:i}=r5(e,await Q3(t)),s=await u4(n,i);return r&&(r.preprocessForPrint&&(s.ast=await V4(s.ast,i)),r.massage&&(s.ast=r4(s.ast,i))),s})),formatAST:P5((async function(e,t){return t=await Q3(t),G2(await U4(e,t),t)})),formatDoc:P5((async function(e,t){let r=function(e){let t=Object.create(null),r=new Set;return function e(t,r,i){var s,a;if("string"==typeof t)return JSON.stringify(t);if(Array.isArray(t)){let r=t.map(e).filter(Boolean);return 1===r.length?r[0]:`[${r.join(", ")}]`}if(t.type===Y1){let e=(null==(s=null==i?void 0:i[r+1])?void 0:s.type)===Z1;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if(t.type===Z1)return(null==(a=null==i?void 0:i[r-1])?void 0:a.type)===Y1&&i[r-1].hard?void 0:"breakParent";if(t.type===K1)return"trim";if(t.type===V1)return"indent("+e(t.contents)+")";if(t.type===q1)return t.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+e(t.contents)+")":t.n<0?"dedent("+e(t.contents)+")":"root"===t.n.type?"markAsRoot("+e(t.contents)+")":"align("+JSON.stringify(t.n)+", "+e(t.contents)+")";if(t.type===X1)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${n(t.groupId)} }`:"")+")";if(t.type===H1){let r=[];t.negate&&r.push("negate: true"),t.groupId&&r.push(`groupId: ${n(t.groupId)}`);let i=r.length>0?`, { ${r.join(", ")} }`:"";return`indentIfBreak(${e(t.contents)}${i})`}if(t.type===J1){let r=[];t.break&&"propagated"!==t.break&&r.push("shouldBreak: true"),t.id&&r.push(`id: ${n(t.id)}`);let i=r.length>0?`, { ${r.join(", ")} }`:"";return t.expandedStates?`conditionalGroup([${t.expandedStates.map((t=>e(t))).join(",")}]${i})`:`group(${e(t.contents)}${i})`}if(t.type===W1)return`fill([${t.parts.map((t=>e(t))).join(", ")}])`;if(t.type===z1)return"lineSuffix("+e(t.contents)+")";if(t.type===G1)return"lineSuffixBoundary";if(t.type===Q1)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;throw new Error("Unknown doc type "+t.type)}(Y2(e));function n(e){if("symbol"!=typeof e)return JSON.stringify(String(e));if(e in t)return t[e];let n=e.description||"symbol";for(let i=0;;i++){let s=n+(i>0?` #${i}`:"");if(!r.has(s))return r.add(s),t[e]=`Symbol.for(${JSON.stringify(s)})`}}}(e),{formatted:n}=await i5(r,{...t,parser:"__js_expression"});return n})),printToDoc:P5((async function(e,t){t=await Q3(t);let{ast:r}=await u4(e,t);return U4(r,t)})),printDocToString:P5((async function(e,t){return G2(e,await Q3(t))}))},I5=Object.create,N5=Object.defineProperty,F5=Object.getOwnPropertyDescriptor,_5=Object.getOwnPropertyNames,O5=Object.getPrototypeOf,L5=Object.prototype.hasOwnProperty,M5=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),B5=(e,t,r)=>(r=null!=e?I5(O5(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of _5(t))!L5.call(e,i)&&i!==r&&N5(e,i,{get:()=>t[i],enumerable:!(n=F5(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:N5(r,"default",{value:e,enumerable:!0}),e)),j5=M5((e=>{function t(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],!(t.indexOf(r)>=0)&&(i[r]=e[r]);return i}Object.defineProperty(e,"__esModule",{value:!0});var r=class{constructor(e,t,r){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=r}},n=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function i(e,t){let{line:n,column:i,index:s}=e;return new r(n,i+t,s+t)}var s="BABEL_PARSER_SYNTAX_ERROR",a="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",o=(e,t=e.length-1)=>({get(){return e.reduce(((e,t)=>e[t]),this)},set(r){e.reduce(((e,n,i)=>i===t?e[n]=r:e[n]),this)}}),u=(e,t,r)=>Object.keys(r).map((e=>[e,r[e]])).filter((([,e])=>!!e)).map((([e,t])=>[e,"function"==typeof t?{value:t,enumerable:!1}:"string"==typeof t.reflect?Object.assign({},t,o(t.reflect.split("."))):t])).reduce(((e,[t,r])=>Object.defineProperty(e,t,Object.assign({configurable:!0},r))),Object.assign(new e,t)),l={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:a},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:a}},c={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},p=({type:e,prefix:t})=>"UpdateExpression"===e?c.UpdateExpression[String(t)]:c[e],d={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${"ForInStatement"===e?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:e})=>`\`import()\` requires exactly ${1===e?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${p(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${p(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},h=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),f={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${p({type:e})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},m=["toMessage"],y=["message"];function g(e){let{toMessage:n}=e,i=t(e,m);return function e({loc:t,details:s}){return u(SyntaxError,Object.assign({},i,{loc:t}),{clone(t={}){let n=t.loc||{};return e({loc:new r("line"in n?n.line:this.loc.line,"column"in n?n.column:this.loc.column,"index"in n?n.index:this.loc.index),details:Object.assign({},this.details,t.details)})},details:{value:s,enumerable:!1},message:{get(){return`${n(this.details)} (${this.loc.line}:${this.loc.column})`},set(e){Object.defineProperty(this,"message",{value:e})}},pos:{reflect:"loc.index",enumerable:!0},missingPlugin:"missingPlugin"in s&&{reflect:"details.missingPlugin",enumerable:!0}})}}function x(e,r){if(Array.isArray(e))return t=>x(t,e[0]);let n={};for(let i of Object.keys(e)){let a=e[i],o="string"==typeof a?{message:()=>a}:"function"==typeof a?{message:a}:a,{message:u}=o,l=t(o,y),c="string"==typeof u?()=>u:u;n[i]=g(Object.assign({code:s,reasonCode:i,toMessage:c},r?{syntaxPlugin:r}:{},l))}return n}var b=Object.assign({},x(l),x(d),x({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."}),x`pipelineOperator`(f)),{defineProperty:S}=Object,T=(e,t)=>S(e,t,{enumerable:!1,value:e[t]});function E(e){return e.loc.start&&T(e.loc.start,"index"),e.loc.end&&T(e.loc.end,"index"),e}var v=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}},P={brace:new v("{"),j_oTag:new v("<tag"),j_cTag:new v("</tag"),j_expr:new v("<tag>...</tag>",!0)};P.template=new v("`",!0);var A=!0,D=!0,C=!0,w=!0,k=!0,I=class{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}},N=new Map;function F(e,t={}){t.keyword=e;let r=$(e,t);return N.set(e,r),r}function _(e,t){return $(e,{beforeExpr:A,binop:t})}var O=-1,L=[],M=[],B=[],j=[],R=[],U=[];function $(e,t={}){var r,n,i,s;return++O,M.push(e),B.push(null!=(r=t.binop)?r:-1),j.push(null!=(n=t.beforeExpr)&&n),R.push(null!=(i=t.startsExpr)&&i),U.push(null!=(s=t.prefix)&&s),L.push(new I(e,t)),O}function V(e,t={}){var r,n,i,s;return++O,N.set(e,O),M.push(e),B.push(null!=(r=t.binop)?r:-1),j.push(null!=(n=t.beforeExpr)&&n),R.push(null!=(i=t.startsExpr)&&i),U.push(null!=(s=t.prefix)&&s),L.push(new I("name",t)),O}var q={bracketL:$("[",{beforeExpr:A,startsExpr:D}),bracketHashL:$("#[",{beforeExpr:A,startsExpr:D}),bracketBarL:$("[|",{beforeExpr:A,startsExpr:D}),bracketR:$("]"),bracketBarR:$("|]"),braceL:$("{",{beforeExpr:A,startsExpr:D}),braceBarL:$("{|",{beforeExpr:A,startsExpr:D}),braceHashL:$("#{",{beforeExpr:A,startsExpr:D}),braceR:$("}"),braceBarR:$("|}"),parenL:$("(",{beforeExpr:A,startsExpr:D}),parenR:$(")"),comma:$(",",{beforeExpr:A}),semi:$(";",{beforeExpr:A}),colon:$(":",{beforeExpr:A}),doubleColon:$("::",{beforeExpr:A}),dot:$("."),question:$("?",{beforeExpr:A}),questionDot:$("?."),arrow:$("=>",{beforeExpr:A}),template:$("template"),ellipsis:$("...",{beforeExpr:A}),backQuote:$("`",{startsExpr:D}),dollarBraceL:$("${",{beforeExpr:A,startsExpr:D}),templateTail:$("...`",{startsExpr:D}),templateNonTail:$("...${",{beforeExpr:A,startsExpr:D}),at:$("@"),hash:$("#",{startsExpr:D}),interpreterDirective:$("#!..."),eq:$("=",{beforeExpr:A,isAssign:w}),assign:$("_=",{beforeExpr:A,isAssign:w}),slashAssign:$("_=",{beforeExpr:A,isAssign:w}),xorAssign:$("_=",{beforeExpr:A,isAssign:w}),moduloAssign:$("_=",{beforeExpr:A,isAssign:w}),incDec:$("++/--",{prefix:k,postfix:!0,startsExpr:D}),bang:$("!",{beforeExpr:A,prefix:k,startsExpr:D}),tilde:$("~",{beforeExpr:A,prefix:k,startsExpr:D}),doubleCaret:$("^^",{startsExpr:D}),doubleAt:$("@@",{startsExpr:D}),pipeline:_("|>",0),nullishCoalescing:_("??",1),logicalOR:_("||",1),logicalAND:_("&&",2),bitwiseOR:_("|",3),bitwiseXOR:_("^",4),bitwiseAND:_("&",5),equality:_("==/!=/===/!==",6),lt:_("</>/<=/>=",7),gt:_("</>/<=/>=",7),relational:_("</>/<=/>=",7),bitShift:_("<</>>/>>>",8),bitShiftL:_("<</>>/>>>",8),bitShiftR:_("<</>>/>>>",8),plusMin:$("+/-",{beforeExpr:A,binop:9,prefix:k,startsExpr:D}),modulo:$("%",{binop:10,startsExpr:D}),star:$("*",{binop:10}),slash:_("/",10),exponent:$("**",{beforeExpr:A,binop:11,rightAssociative:!0}),_in:F("in",{beforeExpr:A,binop:7}),_instanceof:F("instanceof",{beforeExpr:A,binop:7}),_break:F("break"),_case:F("case",{beforeExpr:A}),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",{beforeExpr:A}),_else:F("else",{beforeExpr:A}),_finally:F("finally"),_function:F("function",{startsExpr:D}),_if:F("if"),_return:F("return",{beforeExpr:A}),_switch:F("switch"),_throw:F("throw",{beforeExpr:A,prefix:k,startsExpr:D}),_try:F("try"),_var:F("var"),_const:F("const"),_with:F("with"),_new:F("new",{beforeExpr:A,startsExpr:D}),_this:F("this",{startsExpr:D}),_super:F("super",{startsExpr:D}),_class:F("class",{startsExpr:D}),_extends:F("extends",{beforeExpr:A}),_export:F("export"),_import:F("import",{startsExpr:D}),_null:F("null",{startsExpr:D}),_true:F("true",{startsExpr:D}),_false:F("false",{startsExpr:D}),_typeof:F("typeof",{beforeExpr:A,prefix:k,startsExpr:D}),_void:F("void",{beforeExpr:A,prefix:k,startsExpr:D}),_delete:F("delete",{beforeExpr:A,prefix:k,startsExpr:D}),_do:F("do",{isLoop:C,beforeExpr:A}),_for:F("for",{isLoop:C}),_while:F("while",{isLoop:C}),_as:V("as",{startsExpr:D}),_assert:V("assert",{startsExpr:D}),_async:V("async",{startsExpr:D}),_await:V("await",{startsExpr:D}),_from:V("from",{startsExpr:D}),_get:V("get",{startsExpr:D}),_let:V("let",{startsExpr:D}),_meta:V("meta",{startsExpr:D}),_of:V("of",{startsExpr:D}),_sent:V("sent",{startsExpr:D}),_set:V("set",{startsExpr:D}),_static:V("static",{startsExpr:D}),_using:V("using",{startsExpr:D}),_yield:V("yield",{startsExpr:D}),_asserts:V("asserts",{startsExpr:D}),_checks:V("checks",{startsExpr:D}),_exports:V("exports",{startsExpr:D}),_global:V("global",{startsExpr:D}),_implements:V("implements",{startsExpr:D}),_intrinsic:V("intrinsic",{startsExpr:D}),_infer:V("infer",{startsExpr:D}),_is:V("is",{startsExpr:D}),_mixins:V("mixins",{startsExpr:D}),_proto:V("proto",{startsExpr:D}),_require:V("require",{startsExpr:D}),_satisfies:V("satisfies",{startsExpr:D}),_keyof:V("keyof",{startsExpr:D}),_readonly:V("readonly",{startsExpr:D}),_unique:V("unique",{startsExpr:D}),_abstract:V("abstract",{startsExpr:D}),_declare:V("declare",{startsExpr:D}),_enum:V("enum",{startsExpr:D}),_module:V("module",{startsExpr:D}),_namespace:V("namespace",{startsExpr:D}),_interface:V("interface",{startsExpr:D}),_type:V("type",{startsExpr:D}),_opaque:V("opaque",{startsExpr:D}),name:$("name",{startsExpr:D}),string:$("string",{startsExpr:D}),num:$("num",{startsExpr:D}),bigint:$("bigint",{startsExpr:D}),decimal:$("decimal",{startsExpr:D}),regexp:$("regexp",{startsExpr:D}),privateName:$("#name",{startsExpr:D}),eof:$("eof"),jsxName:$("jsxName"),jsxText:$("jsxText",{beforeExpr:!0}),jsxTagStart:$("jsxTagStart",{startsExpr:!0}),jsxTagEnd:$("jsxTagEnd"),placeholder:$("%%",{startsExpr:!0})};function K(e){return e>=93&&e<=130}function J(e){return e>=58&&e<=130}function W(e){return e>=58&&e<=134}function X(e){return R[e]}function H(e){return e>=127&&e<=129}function z(e){return e>=58&&e<=92}function G(e){return M[e]}function Y(e){return B[e]}function Q(e){return e>=24&&e<=25}function Z(e){return L[e]}L[8].updateContext=e=>{e.pop()},L[5].updateContext=L[7].updateContext=L[23].updateContext=e=>{e.push(P.brace)},L[22].updateContext=e=>{e[e.length-1]===P.template?e.pop():e.push(P.template)},L[140].updateContext=e=>{e.push(P.j_expr,P.j_oTag)};var ee="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",te="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",re=new RegExp("["+ee+"]"),ne=new RegExp("["+ee+te+"]");ee=te=null;var ie=[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,3104,541,1507,4938,6,4191],se=[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];function ae(e,t){let r=65536;for(let n=0,i=t.length;n<i;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function oe(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&re.test(String.fromCharCode(e)):ae(e,ie)))}function ue(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ne.test(String.fromCharCode(e)):ae(e,ie)||ae(e,se))))}var le=["implements","interface","let","package","private","protected","public","static","yield"],ce=["eval","arguments"],pe=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),de=new Set(le),he=new Set(ce);function fe(e,t){return t&&"await"===e||"enum"===e}function me(e,t){return fe(e,t)||de.has(e)}function ye(e){return he.has(e)}function ge(e,t){return me(e,t)||ye(e)}var xe=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);var be=class{constructor(e){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=e}},Se=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(64&e)>0&&0==(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(128&t)return!0;if(451&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new be(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,r){let n=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(n,e,t,r),16&t?n.functions.add(e):n.lexical.add(e),8&t&&this.maybeExportDefined(n,e);else if(4&t)for(let i=this.scopeStack.length-1;i>=0&&(n=this.scopeStack[i],this.checkRedeclarationInScope(n,e,t,r),n.var.add(e),this.maybeExportDefined(n,e),!(387&n.flags));--i);this.parser.inModule&&1&n.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,r,n){this.isRedeclaredInScope(e,t,r)&&this.parser.raise(b.VarRedeclaration,{at:n,identifierName:t})}isRedeclaredInScope(e,t,r){return!!(1&r)&&(8&r?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):16&r?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(8&e.flags&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t))}checkLocalExport(e){let{name:t}=e,r=this.scopeStack[0];!r.lexical.has(t)&&!r.var.has(t)&&!r.functions.has(t)&&this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(387&t)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(451&t&&!(4&t))return t}}},Te=class extends be{constructor(...e){super(...e),this.declareFunctions=new Set}},Ee=class extends Se{createScope(e){return new Te(e)}declareName(e,t,r){let n=this.currentScope();if(2048&t)return this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e),void n.declareFunctions.add(e);super.declareName(e,t,r)}isRedeclaredInScope(e,t,r){return!!super.isRedeclaredInScope(e,t,r)||!!(2048&r)&&(!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t)))}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},ve=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{let[t,r]=e;if(!this.hasPlugin(t))return!1;let n=this.plugins.get(t);for(let e of Object.keys(r))if((null==n?void 0:n[e])!==r[e])return!1;return!0}}getPluginOption(e,t){var r;return null==(r=this.plugins.get(e))?void 0:r[t]}};function Pe(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Ae(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function De(e,t,r){let n=null,i=t.length;for(;null===n&&i>0;)n=t[--i];null===n||n.start>r.start?Ae(e,r.comments):Pe(n,r.comments)}var Ce=class extends ve{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.comments.push(e)}processComment(e){let{commentStack:t}=this.state,r=t.length;if(0===r)return;let n=r-1,i=t[n];i.start===e.end&&(i.leadingNode=e,n--);let{start:s}=e;for(;n>=0;n--){let r=t[n],i=r.end;if(!(i>s)){i===s&&(r.trailingNode=e);break}r.containingNode=e,this.finalizeComment(r),t.splice(n,1)}}finalizeComment(e){let{comments:t}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Pe(e.leadingNode,t),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,t);else{let{containingNode:r,start:n}=e;if(44===this.input.charCodeAt(n-1))switch(r.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":De(r,r.properties,e);break;case"CallExpression":case"OptionalCallExpression":De(r,r.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":De(r,r.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":De(r,r.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":De(r,r.specifiers,e);break;default:Ae(r,t)}else Ae(r,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:r}=t;if(0===r)return;let n=t[r-1];n.leadingNode===e&&(n.leadingNode=null)}resetPreviousIdentifierLeadingComments(e){let{commentStack:t}=this.state,{length:r}=t;0!==r&&(t[r-1].trailingNode===e?t[r-1].trailingNode=null:r>=2&&t[r-2].trailingNode===e&&(t[r-2].trailingNode=null))}takeSurroundingComments(e,t,r){let{commentStack:n}=this.state,i=n.length;if(0===i)return;let s=i-1;for(;s>=0;s--){let i=n[s],a=i.end;if(i.start===r)i.leadingNode=e;else if(a===t)i.trailingNode=e;else if(a<t)break}}},we=/\r\n?|[\n\u2028\u2029]/,ke=new RegExp(we.source,"g");function Ie(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var Ne=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Fe=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g,_e=new RegExp("(?=("+Fe.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y");function Oe(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var Le=function(e){return e>=48&&e<=57},Me={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Be={bin:e=>48===e||49===e,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function je(e,t,r,n,i,s){let a=r,o=n,u=i,l="",c=null,p=r,{length:d}=t;for(;;){if(r>=d){s.unterminated(a,o,u),l+=t.slice(p,r);break}let h=t.charCodeAt(r);if(Re(e,h,t,r)){l+=t.slice(p,r);break}if(92===h){l+=t.slice(p,r);let a=Ue(t,r,n,i,"template"===e,s);null!==a.ch||c?l+=a.ch:c={pos:r,lineStart:n,curLine:i},({pos:r,lineStart:n,curLine:i}=a),p=r}else 8232===h||8233===h?(++i,n=++r):10===h||13===h?"template"===e?(l+=t.slice(p,r)+"\n",++r,13===h&&10===t.charCodeAt(r)&&++r,++i,p=n=r):s.unterminated(a,o,u):++r}return{pos:r,str:l,firstInvalidLoc:c,lineStart:n,curLine:i,containsInvalid:!!c}}function Re(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function Ue(e,t,r,n,i,s){let a=!i;t++;let o=e=>({pos:t,ch:e,lineStart:r,curLine:n}),u=e.charCodeAt(t++);switch(u){case 110:return o("\n");case 114:return o("\r");case 120:{let i;return({code:i,pos:t}=$e(e,t,r,n,2,!1,a,s)),o(null===i?null:String.fromCharCode(i))}case 117:{let i;return({code:i,pos:t}=qe(e,t,r,n,a,s)),o(null===i?null:String.fromCodePoint(i))}case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);s.strictNumericEscape(t-1,r,n);default:if(u>=48&&u<=55){let a=t-1,u=e.slice(a,t+2).match(/^[0-7]+/)[0],l=parseInt(u,8);l>255&&(u=u.slice(0,-1),l=parseInt(u,8)),t+=u.length-1;let c=e.charCodeAt(t);if("0"!==u||56===c||57===c){if(i)return o(null);s.strictNumericEscape(a,r,n)}return o(String.fromCharCode(l))}return o(String.fromCharCode(u))}}function $e(e,t,r,n,i,s,a,o){let u,l=t;return({n:u,pos:t}=Ve(e,t,r,n,16,i,s,!1,o,!a)),null===u&&(a?o.invalidEscapeSequence(l,r,n):t=l-1),{code:u,pos:t}}function Ve(e,t,r,n,i,s,a,o,u,l){let c=t,p=16===i?Me.hex:Me.decBinOct,d=16===i?Be.hex:10===i?Be.dec:8===i?Be.oct:Be.bin,h=!1,f=0;for(let c=0,m=s??1/0;c<m;++c){let s,c=e.charCodeAt(t);if(95!==c||"bail"===o){if(s=c>=97?c-97+10:c>=65?c-65+10:Le(c)?c-48:1/0,s>=i){if(s<=9&&l)return{n:null,pos:t};if(s<=9&&u.invalidDigit(t,r,n,i))s=0;else{if(!a)break;s=0,h=!0}}++t,f=f*i+s}else{let i=e.charCodeAt(t-1),s=e.charCodeAt(t+1);if(o){if(Number.isNaN(s)||!d(s)||p.has(i)||p.has(s)){if(l)return{n:null,pos:t};u.unexpectedNumericSeparator(t,r,n)}}else{if(l)return{n:null,pos:t};u.numericSeparatorInEscapeSequence(t,r,n)}++t}}return t===c||null!=s&&t-c!==s||h?{n:null,pos:t}:{n:f,pos:t}}function qe(e,t,r,n,i,s){let a;if(123===e.charCodeAt(t)){if(++t,({code:a,pos:t}=$e(e,t,r,n,e.indexOf("}",t)-t,!0,i,s)),++t,null!==a&&a>1114111){if(!i)return{code:null,pos:t};s.invalidCodePoint(t,r,n)}}else({code:a,pos:t}=$e(e,t,r,n,4,!1,i,s));return{code:a,pos:t}}var Ke=["at"],Je=["at"];function We(e,t,n){return new r(n,e-t,e)}var Xe=new Set([103,109,115,105,121,117,100,118]),He=class{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new n(e.startLoc,e.endLoc)}},ze=class extends Ce{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,r,n)=>!!this.options.errorRecovery&&(this.raise(b.InvalidDigit,{at:We(e,t,r),radix:n}),!0),numericSeparatorInEscapeSequence:this.errorBuilder(b.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(b.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(b.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(b.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,r)=>{this.recordStrictModeErrors(b.StrictNumericEscape,{at:We(e,t,r)})},unterminated:(e,t,r)=>{throw this.raise(b.UnterminatedString,{at:We(e-1,t,r)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(b.StrictNumericEscape),unterminated:(e,t,r)=>{throw this.raise(b.UnterminatedTemplate,{at:We(e,t,r)})}}),this.state=new class e{constructor(){this.strict=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inDisallowConditionalTypesContext=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.comments=[],this.commentStack=[],this.pos=0,this.type=137,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.context=[P.brace],this.canStartJSXElement=!0,this.containsEsc=!1,this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}init({strictMode:e,sourceType:t,startLine:n,startColumn:i}){this.strict=!1!==e&&(!0===e||"module"===t),this.curLine=n,this.lineStart=-i,this.startLoc=this.endLoc=new r(n,i,0)}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos)}clone(t){let r=new e,n=Object.keys(this);for(let e=0,i=n.length;e<i;e++){let i=n[e],s=this[i];!t&&Array.isArray(s)&&(s=s.slice()),r[i]=s}return r}},this.state.init(e),this.input=t,this.length=t.length,this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new He(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ne.lastIndex=e,Ne.test(this.input)?Ne.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Fe.lastIndex=e,Fe.test(this.input)?Fe.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){let r=this.input.charCodeAt(e);56320==(64512&r)&&(t=65536+((1023&t)<<10)+(1023&r))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach((([e,t])=>this.raise(e,{at:t}))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(137):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let r=this.state.pos,i=this.input.indexOf(e,r+2);if(-1===i)throw this.raise(b.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=i+e.length,ke.lastIndex=r+2;ke.test(this.input)&&ke.lastIndex<=i;)++this.state.curLine,this.state.lineStart=ke.lastIndex;if(this.isLookahead)return;let s={type:"CommentBlock",value:this.input.slice(r+2,i),start:r,end:i+e.length,loc:new n(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(s),s}skipLineComment(e){let t,r=this.state.pos;this.isLookahead||(t=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Ie(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let s=this.state.pos,a={type:"CommentLine",value:this.input.slice(r+e,s),start:r,end:s,loc:new n(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){let e=this.state.pos,t=[];e:for(;this.state.pos<this.length;){let r=this.input.charCodeAt(this.state.pos);switch(r){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}case 47:{let e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}default:break e}break;default:if(Oe(r))++this.state.pos;else if(45===r&&!this.inModule&&this.options.annexB){let r=this.state.pos;if(45!==this.input.charCodeAt(r+1)||62!==this.input.charCodeAt(r+2)||!(0===e||this.state.lineStart>e))break e;{let e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}else{if(60!==r||this.inModule||!this.options.annexB)break e;{let e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{let e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}}}}if(t.length>0){let r={start:e,end:this.state.pos,comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let r=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(r)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(b.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===t?b.RecordExpressionHashIncorrectStartSyntaxType:b.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,123===t?this.finishToken(7):this.finishToken(1)}else oe(t)?(++this.state.pos,this.finishToken(136,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(136,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;let t=this.state.pos;for(this.state.pos+=1;!Ie(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let r=this.input.slice(t+2,this.state.pos);return this.finishToken(28,r),!0}readToken_mult_modulo(e){let t=42===e?55:54,r=1,n=this.input.charCodeAt(this.state.pos+1);42===e&&42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=57),61===n&&!this.state.inType&&(r++,t=37===e?33:30),this.finishOp(t,r)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t!==e){if(124===e){if(62===t)return void this.finishOp(39,2);if(this.hasPlugin("recordAndTuple")&&125===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(b.RecordExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(b.TupleExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(4)}}61!==t?this.finishOp(124===e?43:45,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===e?41:42,2)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);61!==e||this.state.inType?94===e&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),94===this.input.codePointAt(this.state.pos)&&this.unexpected()):this.finishOp(44,1):this.finishOp(32,2)}readToken_atSign(){64===this.input.charCodeAt(this.state.pos+1)&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(30,2):this.finishOp(53,1):this.finishOp(34,2)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(30,3):void this.finishOp(51,2);61!==t?this.finishOp(47,1):this.finishOp(49,2)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){let t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(30,t+1):void this.finishOp(52,t)}61!==t?this.finishOp(48,1):this.finishOp(49,2)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===e?29:35,1);this.finishOp(46,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(30,3):this.finishOp(40,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(b.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(b.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(36,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(oe(e))return void this.readWord(e)}throw this.raise(b.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(e)})}finishOp(e,t){let r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,r)}readRegexp(){let e,t,r=this.state.startLoc,n=this.state.start+1,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(b.UnterminatedRegExp,{at:i(r,1)});let n=this.input.charCodeAt(s);if(Ie(n))throw this.raise(b.UnterminatedRegExp,{at:i(r,1)});if(e)e=!1;else{if(91===n)t=!0;else if(93===n&&t)t=!1;else if(47===n&&!t)break;e=92===n}}let a=this.input.slice(n,s);++s;let o="",u=()=>i(r,s+2-n);for(;s<this.length;){let e=this.codePointAtPos(s),t=String.fromCharCode(e);if(Xe.has(e))118===e?o.includes("u")&&this.raise(b.IncompatibleRegExpUVFlags,{at:u()}):117===e&&o.includes("v")&&this.raise(b.IncompatibleRegExpUVFlags,{at:u()}),o.includes(t)&&this.raise(b.DuplicateRegExpFlags,{at:u()});else{if(!ue(e)&&92!==e)break;this.raise(b.MalformedRegExpFlags,{at:u()})}++s,o+=t}this.state.pos=s,this.finishToken(135,{pattern:a,flags:o})}readInt(e,t,r=!1,n=!0){let{n:i,pos:s}=Ve(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,r,n,this.errorHandlers_readInt,!1);return this.state.pos=s,i}readRadixNumber(e){let t=this.state.curPosition(),r=!1;this.state.pos+=2;let n=this.readInt(e);null==n&&this.raise(b.InvalidDigit,{at:i(t,2),radix:e});let s=this.input.charCodeAt(this.state.pos);if(110===s)++this.state.pos,r=!0;else if(109===s)throw this.raise(b.InvalidDecimal,{at:t});if(oe(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,{at:this.state.curPosition()});if(r){let e=this.input.slice(t.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(133,e)}else this.finishToken(132,n)}readNumber(e){let t=this.state.pos,r=this.state.curPosition(),n=!1,s=!1,a=!1,o=!1,u=!1;!e&&null===this.readInt(10)&&this.raise(b.InvalidNumber,{at:this.state.curPosition()});let l=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(l){let e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(b.StrictOctalLiteral,{at:r}),!this.state.strict){let t=e.indexOf("_");t>0&&this.raise(b.ZeroDigitNumericSeparator,{at:i(r,t)})}u=l&&!/[89]/.test(e)}let c=this.input.charCodeAt(this.state.pos);if(46===c&&!u&&(++this.state.pos,this.readInt(10),n=!0,c=this.input.charCodeAt(this.state.pos)),(69===c||101===c)&&!u&&(c=this.input.charCodeAt(++this.state.pos),(43===c||45===c)&&++this.state.pos,null===this.readInt(10)&&this.raise(b.InvalidOrMissingExponent,{at:r}),n=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),110===c&&((n||l)&&this.raise(b.InvalidBigIntLiteral,{at:r}),++this.state.pos,s=!0),109===c&&(this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(b.InvalidDecimal,{at:r}),++this.state.pos,a=!0),oe(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,{at:this.state.curPosition()});let p=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(s)return void this.finishToken(133,p);if(a)return void this.finishToken(134,p);let d=u?parseInt(p,8):parseFloat(p);this.finishToken(132,d)}readCodePoint(e){let{code:t,pos:r}=qe(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=r,t}readString(e){let{str:t,pos:r,curLine:n,lineStart:i}=je(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=r+1,this.state.lineStart=i,this.state.curLine=n,this.finishToken(131,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:n,pos:i,curLine:s,lineStart:a}=je("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=a,this.state.curLine=s,n&&(this.state.firstInvalidTemplateEscapePos=new r(n.curLine,n.pos-n.lineStart,n.pos)),96===this.input.codePointAt(i)?this.finishToken(24,n?null:e+t+"`"):(this.state.pos++,this.finishToken(25,n?null:e+t+"${"))}recordStrictModeErrors(e,{at:t}){let r=t.index;this.state.strict&&!this.state.strictErrors.has(r)?this.raise(e,{at:t}):this.state.strictErrors.set(r,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",r=this.state.pos,n=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let e=this.codePointAtPos(this.state.pos);if(ue(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(n,this.state.pos);let e=this.state.curPosition(),i=this.state.pos===r?oe:ue;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(b.MissingUnicodeEscape,{at:this.state.curPosition()}),n=this.state.pos-1;continue}++this.state.pos;let s=this.readCodePoint(!0);null!==s&&(i(s)||this.raise(b.EscapedCharNotAnIdentifier,{at:e}),t+=String.fromCodePoint(s)),n=this.state.pos}}}return t+this.input.slice(n,this.state.pos)}readWord(e){let t=this.readWord1(e),r=N.get(t);void 0!==r?this.finishToken(r,G(r)):this.finishToken(130,t)}checkKeywordEscapes(){let{type:e}=this.state;z(e)&&this.state.containsEsc&&this.raise(b.InvalidEscapedReservedWord,{at:this.state.startLoc,reservedWord:G(e)})}raise(e,n){let{at:i}=n,s=t(n,Ke),a=e({loc:i instanceof r?i:i.loc.start,details:s});if(!this.options.errorRecovery)throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,n){let{at:i}=n,s=t(n,Je),a=i instanceof r?i:i.loc.start,o=a.index,u=this.state.errors;for(let t=u.length-1;t>=0;t--){let r=u[t];if(r.loc.index===o)return u[t]=e({loc:a,details:s});if(r.loc.index<o)break}return this.raise(e,n)}updateContext(e){}unexpected(e,t){throw this.raise(b.UnexpectedToken,{expected:t?G(t):null,at:e??this.state.startLoc})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(b.MissingPlugin,{at:t??this.state.startLoc,missingPlugin:[e]})}expectOnePlugin(e){if(!e.some((e=>this.hasPlugin(e))))throw this.raise(b.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:e})}errorBuilder(e){return(t,r,n)=>{this.raise(e,{at:We(t,r,n)})}}},Ge=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}},Ye=class extends Ge{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,{at:t}){let r=t.index;this.declarationErrors.set(r,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}};function Qe(){return new Ge}function Ze(e,t){return(e?2:0)|(t?1:0)}var et=class extends ze{addExtra(e,t,r,n=!0){if(!e)return;let i=e.extra=e.extra||{};n?i[t]=r:Object.defineProperty(i,t,{enumerable:n,value:r})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){let r=e+t.length;if(this.input.slice(e,r)===t){let e=this.input.charCodeAt(r);return!(ue(e)||55296==(64512&e))}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,{at:this.state.startLoc});this.unexpected(null,e)}}canInsertSemicolon(){return this.match(137)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return we.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return _e.lastIndex=this.state.end,_e.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(b.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let r={node:null};try{let n=e(((e=null)=>{throw r.node=e,r}));if(this.state.errors.length>t.errors.length){let e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:n,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){let n=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:n};if(e===r)return{node:r.node,error:null,thrown:!1,aborted:!0,failState:n};throw e}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:r,doubleProtoLoc:n,privateKeyLoc:i,optionalParametersLoc:s}=e;if(!t)return!!(r||n||s||i);null!=r&&this.raise(b.InvalidCoverInitializedName,{at:r}),null!=n&&this.raise(b.DuplicateProto,{at:n}),null!=i&&this.raise(b.UnexpectedPrivateField,{at:i}),null!=s&&this.unexpected(s)}isLiteralPropertyName(){return W(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){let t=this.state.labels;this.state.labels=[];let r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let n=this.inModule;this.inModule=e;let i=this.scope,s=this.getScopeHandler();this.scope=new s(this,e);let a=this.prodParam;this.prodParam=new class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}};let o=this.classScope;this.classScope=new class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}})}exit(){let e=this.stack.pop(),t=this.current();for(let[r,n]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(r)||t.undefinedPrivateNames.set(r,n):this.parser.raise(b.InvalidPrivateFieldResolution,{at:n,identifierName:r})}declarePrivateName(e,t,r){let{privateNames:n,loneAccessors:i,undefinedPrivateNames:s}=this.current(),a=n.has(e);if(3&t){let r=a&&i.get(e);r?(a=(3&r)==(3&t)||(4&r)!=(4&t),a||i.delete(e)):a||i.set(e,t)}a&&this.parser.raise(b.PrivateNameRedeclaration,{at:r,identifierName:e}),n.add(e),s.delete(e)}usePrivateName(e,t){let r;for(r of this.stack)if(r.privateNames.has(e))return;r?r.undefinedPrivateNames.set(e,t):this.parser.raise(b.InvalidPrivateFieldResolution,{at:t,identifierName:e})}}(this);let u=this.expressionScope;return this.expressionScope=new class{constructor(e){this.parser=void 0,this.stack=[new Ge],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,{at:t}){let r={at:t.loc.start},{stack:n}=this,i=n.length-1,s=n[i];for(;!s.isCertainlyParameterDeclaration();){if(!s.canBeArrowParameterDeclaration())return;s.recordDeclarationError(e,r),s=n[--i]}this.parser.raise(e,r)}recordArrowParameterBindingError(e,{at:t}){let{stack:r}=this,n=r[r.length-1],i={at:t.loc.start};if(n.isCertainlyParameterDeclaration())this.parser.raise(e,i);else{if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,i)}}recordAsyncArrowParametersError({at:e}){let{stack:t}=this,r=t.length-1,n=t[r];for(;n.canBeArrowParameterDeclaration();)2===n.type&&n.recordDeclarationError(b.AwaitBindingIdentifier,{at:e}),n=t[--r]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((([t,r])=>{this.parser.raise(t,{at:r});let n=e.length-2,i=e[n];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(r.index),i=e[--n]}))}}(this),()=>{this.state.labels=t,this.exportedIdentifiers=r,this.inModule=n,this.scope=i,this.prodParam=a,this.classScope=o,this.expressionScope=u}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}},tt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},rt=class{constructor(e,t,r){this.type="",this.start=t,this.end=0,this.loc=new n(r),null!=e&&e.options.ranges&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}},nt=rt.prototype;function it(e){let{type:t,start:r,end:n,loc:i,range:s,extra:a,name:o}=e,u=Object.create(nt);return u.type=t,u.start=r,u.end=n,u.loc=i,u.range=s,u.extra=a,u.name=o,"Placeholder"===t&&(u.expectedNode=e.expectedNode),u}function st(e){let{type:t,start:r,end:n,loc:i,range:s,extra:a}=e;if("Placeholder"===t)return function(e){return it(e)}(e);let o=Object.create(nt);return o.type=t,o.start=r,o.end=n,o.loc=i,o.range=s,void 0!==e.raw?o.raw=e.raw:o.extra=a,o.value=e.value,o}nt.__clone=function(){let e=new rt(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){let n=t[r];"leadingComments"!==n&&"trailingComments"!==n&&"innerComments"!==n&&(e[n]=this[n])}return e};var at=class extends et{startNode(){return new rt(this,this.state.start,this.state.startLoc)}startNodeAt(e){return new rt(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,r){return e.type=t,e.end=r.index,e.loc.end=r,this.options.ranges&&(e.range[1]=r.index),this.options.attachComment&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.options.ranges&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.options.ranges&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}},ot=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),ut=x`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitailized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function lt(e){return"type"===e.importKind||"typeof"===e.importKind}var ct={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var pt=/\*?\s*@((?:no)?flow)\b/,dt=x`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function ht(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function ft(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return ft(e.object)+"."+ft(e.property);throw new Error("Node had unexpected type: "+e.type)}var mt=class extends be{constructor(...e){super(...e),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}},yt=class extends Se{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new mt(e)}enter(e){256==e&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return 256==e&&this.importsStack.pop(),e}hasImport(e,t){let r=this.importsStack.length;if(this.importsStack[r-1].has(e))return!0;if(!t&&r>1)for(let t=0;t<r-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,r){if(4096&t)return this.hasImport(e,!0)&&this.parser.raise(b.VarRedeclaration,{at:r,identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);let n=this.currentScope();if(1024&t)return this.maybeExportDefined(n,e),void n.exportOnlyBindings.add(e);super.declareName(e,t,r),2&t&&(1&t||(this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e)),n.types.add(e)),256&t&&n.enums.add(e),512&t&&n.constEnums.add(e),128&t&&n.classes.add(e)}isRedeclaredInScope(e,t,r){if(e.enums.has(t)){if(256&r){return!!(512&r)!==e.constEnums.has(t)}return!0}return 128&r&&e.classes.has(t)?!!e.lexical.has(t)&&!!(1&r):!!(2&r&&e.types.has(t))||super.isRedeclaredInScope(e,t,r)}checkLocalExport(e){let{name:t}=e;if(!this.hasImport(t)){for(let e=this.scopeStack.length-1;e>=0;e--){let r=this.scopeStack[e];if(r.types.has(t)||r.exportOnlyBindings.has(t))return}super.checkLocalExport(e)}}},gt=e=>"ParenthesizedExpression"===e.type?gt(e.expression):e,xt=class extends at{toAssignable(e,t=!1){var r,n;let i;switch(("ParenthesizedExpression"===e.type||null!=(r=e.extra)&&r.parenthesized)&&(i=gt(e),t?"Identifier"===i.type?this.expressionScope.recordArrowParameterBindingError(b.InvalidParenthesizedAssignment,{at:e}):"MemberExpression"!==i.type&&this.raise(b.InvalidParenthesizedAssignment,{at:e}):this.raise(b.InvalidParenthesizedAssignment,{at:e})),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let r=0,n=e.properties.length,i=n-1;r<n;r++){var s;let n=e.properties[r],a=r===i;this.toAssignableObjectExpressionProp(n,a,t),a&&"RestElement"===n.type&&null!=(s=e.extra)&&s.trailingCommaLoc&&this.raise(b.RestTrailingComma,{at:e.extra.trailingCommaLoc})}break;case"ObjectProperty":{let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,null==(n=e.extra)?void 0:n.trailingCommaLoc,t);break;case"AssignmentExpression":"="!==e.operator&&this.raise(b.MissingEqInAssignment,{at:e.left.loc.end}),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(i,t)}}toAssignableObjectExpressionProp(e,t,r){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?b.PatternHasAccessor:b.PatternHasMethod,{at:e.key});else if("SpreadElement"===e.type){e.type="RestElement";let n=e.argument;this.checkToRestConversion(n,!1),this.toAssignable(n,r),t||this.raise(b.RestTrailingComma,{at:e})}else this.toAssignable(e,r)}toAssignableList(e,t,r){let n=e.length-1;for(let i=0;i<=n;i++){let s=e[i];if(s){if("SpreadElement"===s.type){s.type="RestElement";let e=s.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,r)}else this.toAssignable(s,r);"RestElement"===s.type&&(i<n?this.raise(b.RestTrailingComma,{at:s}):t&&this.raise(b.RestTrailingComma,{at:t}))}}}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let t=e.properties.length-1;return e.properties.every(((e,r)=>"ObjectMethod"!==e.type&&(r===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let t of e)"ArrayExpression"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,t,r){let n=1&r,i=[],s=!0;for(;!this.eat(e);)if(s?s=!1:this.expect(12),n&&this.match(12))i.push(null);else{if(this.eat(e))break;if(this.match(21)){if(i.push(this.parseAssignableListItemTypes(this.parseRestBinding(),r)),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let e=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(b.UnsupportedParameterDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());i.push(this.parseAssignableListItem(r,e))}}return i}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let e=this.startNode(),{type:t,startLoc:r}=this.state;return 21===t?this.parseBindingRestProperty(e):(136===t?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),e.key=this.parsePrivateName()):this.parsePropertyName(e),e.method=!1,this.parseObjPropValue(e,r,!1,!1,!0,!1))}parseAssignableListItem(e,t){let r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r,e);let n=this.parseMaybeDefault(r.loc.start,r);return t.length&&(r.decorators=t),n}parseAssignableListItemTypes(e,t){return e}parseMaybeDefault(e,t){var r;if(null!=e||(e=this.state.startLoc),t=null!=(r=t)?r:this.parseBindingAtom(),!this.eat(29))return t;let n=this.startNodeAt(e);return n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(e,t,r){return((e,t)=>Object.hasOwnProperty.call(e,t)&&e[t])({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},e)}checkLVal(e,{in:t,binding:r=64,checkClashes:n=!1,strictModeChanged:i=!1,hasParenthesizedAncestor:s=!1}){var a;let o=e.type;if(this.isObjectMethod(e))return;if("MemberExpression"===o)return void(64!==r&&this.raise(b.InvalidPropertyBindingPattern,{at:e}));if("Identifier"===o){this.checkIdentifier(e,r,i);let{name:t}=e;return void(n&&(n.has(t)?this.raise(b.ParamDupe,{at:e}):n.add(t)))}let u=this.isValidLVal(o,!(s||null!=(a=e.extra)&&a.parenthesized)&&"AssignmentExpression"===t.type,r);if(!0===u)return;if(!1===u){let n=64===r?b.InvalidLhs:b.InvalidLhsBinding;return void this.raise(n,{at:e,ancestor:t})}let[l,c]=Array.isArray(u)?u:[u,"ParenthesizedExpression"===o],p="ArrayPattern"===o||"ObjectPattern"===o||"ParenthesizedExpression"===o?{type:o}:t;for(let t of[].concat(e[l]))t&&this.checkLVal(t,{in:p,binding:r,checkClashes:n,strictModeChanged:i,hasParenthesizedAncestor:c})}checkIdentifier(e,t,r=!1){this.state.strict&&(r?ge(e.name,this.inModule):ye(e.name))&&(64===t?this.raise(b.StrictEvalArguments,{at:e,referenceName:e.name}):this.raise(b.StrictEvalArgumentsBinding,{at:e,bindingName:e.name})),8192&t&&"let"===e.name&&this.raise(b.LetInLexicalBinding,{at:e}),64&t||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(b.InvalidRestAssignmentPattern,{at:e})}}checkCommaAfterRest(e){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===e?b.RestTrailingComma:b.ElementAfterRest,{at:this.state.startLoc}),!0)}};function bt(e){if(!e)throw new Error("Assert fail")}var St=x`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function Tt(e){return"private"===e||"public"===e||"protected"===e}function Et(e){return"in"===e||"out"===e}function vt(e){if("MemberExpression"!==e.type)return!1;let{computed:t,property:r}=e;return(!t||"StringLiteral"===r.type||!("TemplateLiteral"!==r.type||r.expressions.length>0))&&Dt(e.object)}function Pt(e,t){var r;let{type:n}=e;if(null!=(r=e.extra)&&r.parenthesized)return!1;if(t){if("Literal"===n){let{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===n||"BooleanLiteral"===n)return!0;return!!(At(e,t)||function(e,t){if("UnaryExpression"===e.type){let{operator:r,argument:n}=e;if("-"===r&&At(n,t))return!0}return!1}(e,t)||"TemplateLiteral"===n&&0===e.expressions.length||vt(e))}function At(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function Dt(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&Dt(e.object)}var Ct=x`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});function wt(e,t){let[r,n]="string"==typeof t?[t,{}]:t,i=Object.keys(n),s=0===i.length;return e.some((e=>{if("string"==typeof e)return s&&e===r;{let[t,s]=e;if(t!==r)return!1;for(let e of i)if(s[e]!==n[e])return!1;return!0}}))}function kt(e,t,r){let n=e.find((e=>Array.isArray(e)?e[0]===t:e===t));return n&&Array.isArray(n)&&n.length>1?n[1][r]:null}var It=["minimal","fsharp","hack","smart"],Nt=["^^","@@","^","%","#"],Ft=["hash","bar"];var _t={estree:e=>class extends e{parse(){let e=E(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(E)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch{}let n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:t},n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){let t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let t=e.value;delete e.value,t.type="Literal",t.raw=t.extra.raw,t.value=t.extra.expressionValue;let r=e;return r.type="ExpressionStatement",r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}parseBlockBody(e,t,r,n,i){super.parseBlockBody(e,t,r,n,i);let s=e.directives.map((e=>this.directiveToStmt(e)));e.body=s.concat(e.body),delete e.directives}pushClassMethod(e,t,r,n,i,s){this.parseMethod(t,r,n,i,s,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return delete e.id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,r,n,i,s,a=!1){let o=this.startNode();return o.kind=e.kind,o=super.parseMethod(o,t,r,n,i,s,a),o.type="FunctionExpression",delete o.kind,e.value=o,"ClassPrivateMethod"===s&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition"),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition",t.computed=!1),t}parseObjectMethod(e,t,r,n,i){let s=super.parseObjectMethod(e,t,r,n,i);return s&&(s.type="Property","method"===s.kind&&(s.kind="init"),s.shorthand=!1),s}parseObjectProperty(e,t,r,n){let i=super.parseObjectProperty(e,t,r,n);return i&&(i.kind="init",i.type="Property"),i}isValidLVal(e,t,r){return"Property"===e?"value":super.isValidLVal(e,t,r)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){"get"===e.kind||"set"===e.kind?this.raise(b.PatternHasAccessor,{at:e.key}):e.method?this.raise(b.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,t,r)}finishCallExpression(e,t){let r=super.finishCallExpression(e,t);if("Import"===r.callee.type){var n;if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))r.attributes=null!=(n=r.arguments[1])?n:null;delete r.arguments,delete r.callee}return r}toReferencedArguments(e){"ImportExpression"!==e.type&&super.toReferencedArguments(e)}parseExport(e,t){let r=this.state.lastTokStartLoc,n=super.parseExport(e,t);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":1===n.specifiers.length&&"ExportNamespaceSpecifier"===n.specifiers[0].type&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var i;let{declaration:e}=n;"ClassDeclaration"===(null==e?void 0:e.type)&&(null==(i=e.decorators)?void 0:i.length)>0&&e.start===n.start&&this.resetStartLocation(n,r)}}return n}parseSubscript(e,t,r,n){let i=super.parseSubscript(e,t,r,n);if(n.optionalChainMember){if(("OptionalMemberExpression"===i.type||"OptionalCallExpression"===i.type)&&(i.type=i.type.substring(8)),n.stop){let e=this.startNodeAtNode(i);return e.expression=i,this.finishNode(e,"ChainExpression")}}else("MemberExpression"===i.type||"CallExpression"===i.type)&&(i.optional=!1);return i}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return e.method||"get"===e.kind||"set"===e.kind}finishNodeAt(e,t,r){return E(super.finishNodeAt(e,t,r))}resetStartLocation(e,t){super.resetStartLocation(e,t),E(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),E(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(dt.UnterminatedJsxContent,{at:this.state.startLoc});let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?void(60===r&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(140)):super.getTokenFromCode(r)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(139,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:Ie(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t,r=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===r&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(r),++this.state.curLine,this.state.lineStart=this.state.pos,t}jsxReadString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(b.UnterminatedString,{at:this.state.startLoc});let n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):Ie(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}t+=this.input.slice(r,this.state.pos++),this.finishToken(131,t)}jsxReadEntity(){let e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);let t=this.readInt(e,void 0,!1,"bail");if(null!==t&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,r=!1;for(;t++<10&&this.state.pos<this.length&&!(r=59==this.codePointAtPos(this.state.pos));)++this.state.pos;if(r){this.input.slice(e,this.state.pos),++this.state.pos}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(ue(e)||45===e);this.finishToken(138,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(138)?e.name=this.state.value:z(this.state.type)?e.name=G(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let r=this.startNodeAt(e);return r.namespace=t,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(16);){let r=this.startNodeAt(e);r.object=t,r.property=this.jsxParseIdentifier(),t=this.finishNode(r,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(P.brace),this.next(),e=this.jsxParseExpressionContainer(e,P.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(dt.AttributeIsEmpty,{at:e}),e;case 140:case 131:return this.parseExprAtom();default:throw this.raise(dt.UnsupportedJsxValue,{at:this.state.startLoc})}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(P.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let t=this.parseExpression();e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(P.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(P.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(141);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(141),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(141),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){let t=this.startNodeAt(e),r=[],n=this.jsxParseOpeningElementAt(e),i=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 140:if(e=this.state.startLoc,this.next(),this.eat(56)){i=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 139:r.push(this.parseExprAtom());break;case 5:{let e=this.startNode();this.setContext(P.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(e)):r.push(this.jsxParseExpressionContainer(e,P.j_expr));break}default:this.unexpected()}ht(n)&&!ht(i)&&null!==i?this.raise(dt.MissingClosingTagFragment,{at:i}):(!ht(n)&&ht(i)||!ht(n)&&!ht(i)&&ft(i.name)!==ft(n.name))&&this.raise(dt.MissingClosingTagElement,{at:i,openingTagName:ft(n.name)})}if(ht(n)?(t.openingFragment=n,t.closingFragment=i):(t.openingElement=n,t.closingElement=i),t.children=r,this.match(47))throw this.raise(dt.UnwrappedAdjacentJSXElements,{at:this.state.startLoc});return ht(n)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(139)?this.parseLiteral(this.state.value,"JSXText"):this.match(140)?this.jsxParseElement():this.match(47)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(140),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t!==P.j_expr){if(t===P.j_oTag||t===P.j_cTag){if(oe(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(141);if((34===e||39===e)&&t===P.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(140);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){let{context:t,type:r}=this.state;if(56===r&&140===e)t.splice(-2,2,P.j_cTag),this.state.canStartJSXElement=!1;else if(140===r)t.push(P.j_oTag);else if(141===r){let r=t[t.length-1];r===P.j_oTag&&56===e||r===P.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===P.j_expr):(this.setContext(P.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=function(e){return j[e]}(r)}},flow:e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Ee}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){131!==e&&13!==e&&28!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){let t=pt.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(108),this.state.lastTokStart>t.index+1&&this.raise(ut.UnexpectedSpaceBetweenModuloChecks,{at:t}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);let i=this.flowParseFunctionTypeParams();return r.params=i.params,r.rest=i.rest,r.this=i._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){return this.match(80)?this.flowParseDeclareClass(e):this.match(68)?this.flowParseDeclareFunction(e):this.match(74)?this.flowParseDeclareVariable(e):this.eatContextual(125)?this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(ut.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e)):this.isContextual(128)?this.flowParseDeclareTypeAlias(e):this.isContextual(129)?this.flowParseDeclareOpaqueType(e):this.isContextual(127)?this.flowParseDeclareInterface(e):this.match(82)?this.flowParseDeclareExportDeclaration(e,t):void this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(131)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),r=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),!this.isContextual(128)&&!this.match(87)&&this.raise(ut.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(e)):(this.expectContextual(123,ut.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),r.push(e)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let n=null,i=!1;return r.forEach((e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(i&&this.raise(ut.DuplicateDeclareModuleExports,{at:e}),"ES"===n&&this.raise(ut.AmbiguousDeclareModuleKind,{at:e}),n="CommonJS",i=!0):("CommonJS"===n&&this.raise(ut.AmbiguousDeclareModuleKind,{at:e}),n="ES")})),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(128)||this.isContextual(127))&&!t){let e=this.state.value;throw this.raise(ut.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:e,suggestion:ct[e]})}return this.match(74)||this.match(68)||this.match(80)||this.isContextual(129)?(e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration")):this.match(55)||this.match(5)||this.isContextual(127)||this.isContextual(128)||this.isContextual(129)?("ExportNamedDeclaration"===(e=this.parseExport(e,null)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e):void this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(109),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(115))do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(111))do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(ut.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,t,r){ot.has(e)&&this.raise(r?ut.AssignReservedType:ut.UnexpectedReservedType,{at:t,reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(128),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let t=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return r.name=i.name,r.variance=n,r.bound=i.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(ut.MissingTypeParamDefault,{at:t}),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(140)?this.next():this.unexpected();let r=!1;do{let e=this.flowParseTypeParameter(r);t.params.push(e),e.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(127),e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(132)||this.match(131)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,r){return e.static=t,14===this.lookahead().type?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){let r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:n,allowInexact:i}){let s=this.state.inType;this.state.inType=!0;let a=this.startNode();a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[];let o,u,l=!1;for(t&&this.match(6)?(this.expect(6),o=9,u=!0):(this.expect(5),o=8,u=!1),a.exact=u;!this.match(o);){let t=!1,s=null,o=null,c=this.startNode();if(n&&this.isContextual(116)){let t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),s=this.state.startLoc,e=!1)}if(e&&this.isContextual(104)){let e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),t=!0)}let p=this.flowParseVariance();if(this.eat(0))null!=s&&this.unexpected(s),this.eat(0)?(p&&this.unexpected(p.loc.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(c,t))):a.indexers.push(this.flowParseObjectTypeIndexer(c,t,p));else if(this.match(10)||this.match(47))null!=s&&this.unexpected(s),p&&this.unexpected(p.loc.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(c,t));else{let e="init";if(this.isContextual(98)||this.isContextual(103)){W(this.lookahead().type)&&(e=this.state.value,this.next())}let n=this.flowParseObjectTypeProperty(c,t,s,p,e,r,i??!u);null===n?(l=!0,o=this.state.lastTokStartLoc):a.properties.push(n)}this.flowObjectTypeSemicolon(),o&&!this.match(8)&&!this.match(9)&&this.raise(ut.UnexpectedExplicitInexactInObject,{at:o})}this.expect(o),r&&(a.inexact=l);let c=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=s,c}flowParseObjectTypeProperty(e,t,r,n,i,s,a){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(s?a||this.raise(ut.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(ut.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),n&&this.raise(ut.InexactVariance,{at:n}),null):(s||this.raise(ut.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),null!=r&&this.unexpected(r),n&&this.raise(ut.SpreadVariance,{at:n}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=r,e.kind=i;let a=!1;return this.match(47)||this.match(10)?(e.method=!0,null!=r&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),("get"===i||"set"===i)&&this.flowCheckGetterSetterParams(e),!s&&"constructor"===e.key.name&&e.value.this&&this.raise(ut.ThisParamBannedInConstructor,{at:e.value.this})):("init"!==i&&this.unexpected(),e.method=!1,this.eat(17)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let t="get"===e.kind?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise("get"===e.kind?ut.GetterMayNotHaveThisParam:ut.SetterMayNotHaveThisParam,{at:e.value.this}),r!==t&&this.raise("get"===e.kind?b.BadGetterArity:b.BadSetterArity,{at:e}),"set"===e.kind&&e.value.rest&&this.raise(b.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){null!=e||(e=this.state.startLoc);let r=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let t=this.startNodeAt(e);t.qualification=r,t.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(t,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,t){let r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,r=!1,n=null,i=this.startNode(),s=this.lookahead(),a=78===this.state.type;return 14===s.type||17===s.type?(a&&!e&&this.raise(ut.ThisParamMustBeFirst,{at:i}),t=this.parseIdentifier(a),this.eat(17)&&(r=!0,a&&this.raise(ut.ThisParamMayNotBeOptional,{at:i})),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),i.name=t,i.optional=r,i.typeAnnotation=n,this.finishNode(i,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:r}}flowIdentToTypeAnnotation(e,t,r){switch(r.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){let e,t,r=this.state.startLoc,n=this.startNode(),i=!1,s=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,t=this.flowParseTupleType(),this.state.noAnonFunctionType=s,t;case 47:return n.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),e=this.flowParseFunctionTypeParams(),n.params=e.params,n.rest=e.rest,n.this=e._this,this.expect(11),this.expect(19),n.returnType=this.flowParseType(),this.finishNode(n,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(K(this.state.type)||this.match(78)){let e=this.lookahead().type;i=17!==e&&14!==e}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,t=this.flowParseType(),this.state.noAnonFunctionType=s,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),t;this.eat(12)}return e=t?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(t)]):this.flowParseFunctionTypeParams(),n.params=e.params,n.rest=e.rest,n.this=e._this,this.expect(11),this.expect(19),n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation");case 131:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(132))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(133))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(ut.UnexpectedSubtractionOperand,{at:this.state.startLoc})}return void this.unexpected();case 132:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(z(this.state.type)){let e=G(this.state.type);return this.next(),super.createIdentifier(n,e)}if(K(this.state.type))return this.isContextual(127)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let n=this.startNodeAt(e),i=this.eat(18);r=r||i,this.expect(0),!i&&this.match(3)?(n.elementType=t,this.next(),t=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=t,n.indexType=this.flowParseType(),this.expect(3),r?(n.optional=i,t=this.finishNode(n,"OptionalIndexedAccessType")):t=this.finishNode(n,"IndexedAccessType"))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(130===this.state.type&&"_"===this.state.value){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,r=!1){t?this.forwardNoArrowParamsConversionAt(e,(()=>super.parseFunctionBody(e,!0,r))):super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!1){if(this.match(14)){let t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(127)){if(J(this.lookahead().type)){let e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}let t=super.parseStatementLike(e);return void 0===this.flowPragma&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,r){if("Identifier"===t.type)if("declare"===t.name){if(this.match(80)||K(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(K(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){let{type:e}=this.state;return H(e)||this.shouldParseEnums()&&124===e?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return H(e)||this.shouldParseEnums()&&124===e?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(r),e}this.expect(17);let n=this.state.clone(),i=this.state.noArrowAt,s=this.startNodeAt(t),{consequent:a,failed:o}=this.tryParseConditionalConsequent(),[u,l]=this.getArrowLikeExpressions(a);if(o||l.length>0){let e=[...i];if(l.length>0){this.state=n,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:a,failed:o}=this.tryParseConditionalConsequent()),[u,l]=this.getArrowLikeExpressions(a)}o&&u.length>1&&this.raise(ut.AmbiguousConditionalArrow,{at:n.startLoc}),o&&1===u.length&&(this.state=n,e.push(u[0].start),this.state.noArrowAt=e,({consequent:a,failed:o}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(a,!0),this.state.noArrowAt=i,this.expect(14),s.test=e,s.consequent=a,s.alternate=this.forwardNoArrowParamsConversionAt(s,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(s,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let r=[e],n=[];for(;0!==r.length;){let e=r.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):n.push(e),r.push(e.body)):"ConditionalExpression"===e.type&&(r.push(e.consequent),r.push(e.alternate))}return t?(n.forEach((e=>this.finishArrowValidation(e))),[n,[]]):function(e,t){let r=[],n=[];for(let i=0;i<e.length;i++)(t(e[i],i,e)?r:n).push(e[i]);return[r,n]}(n,(e=>e.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let r;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(128)){e.exportKind="type";let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(129)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(127)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual(124)){e.exportKind="value";let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(128)||55!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&"type"===e.exportKind&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){let{startLoc:n}=this.state;if(this.isContextual(123)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(ut.DeclareClassElement,{at:n}):t.value&&this.raise(ut.DeclareClassFieldInitializer,{at:t.value}))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(b.InvalidIdentifier,{at:this.state.curPosition(),identifierName:t}),this.finishToken(130,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(6,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(18,2):this.finishOp(17,1):function(e,t,r){return 64===e&&64===t&&oe(r)}(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(62===e?48:47,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&"AssignmentExpression"===e.type&&"TypeCastExpression"===e.left.type&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){let r=e[t];"TypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let n=0;n<e.length;n++){var r;let i=e[n];i&&"TypeCastExpression"===i.type&&(null==(r=i.extra)||!r.parenthesized)&&(e.length>1||!t)&&this.raise(ut.TypeCastInPattern,{at:i.typeAnnotation})}return e}parseArrayLike(e,t,r,n){let i=super.parseArrayLike(e,t,r,n);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(e,t,r){return"TypeCastExpression"===e||super.isValidLVal(e,t,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,n,i,s){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,n,i,s),t.params&&i){let e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(ut.ThisParamBannedInConstructor,{at:t})}else if("MethodDefinition"===t.type&&i&&t.value.params){let e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(ut.ThisParamBannedInConstructor,{at:t})}}pushClassPrivateMethod(e,t,r,n){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(111)){this.next();let t=e.implements=[];do{let e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let r=t[0];this.isThisParam(r)&&"get"===e.kind?this.raise(ut.GetterMayNotHaveThisParam,{at:r}):this.isThisParam(r)&&this.raise(ut.SetterMayNotHaveThisParam,{at:r})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,n,i,s,a){let o;e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&!s&&(o=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(e,t,r,n,i,s,a);return o&&((u.value||u).typeParameters=o),u}parseAssignableListItemTypes(e){return this.eat(17)&&("Identifier"!==e.type&&this.raise(ut.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(ut.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(ut.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(ut.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(ut.TypeBeforeInitializer,{at:r.typeAnnotation}),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(ut.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}parseImportSpecifierLocal(e,t,r){t.local=lt(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(128)){if(!e)return!0;let t=this.lookaheadCharCode();return 123===t||42===t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){if(super.applyImportPhase(e,t,r,n),t){if(!r&&this.match(65))return;e.exportKind="type"===r?r:"value"}else"type"===r&&this.match(55)&&this.unexpected(),e.importKind="type"===r||"typeof"===r?r:"value"}parseImportSpecifier(e,t,r,n,i){let s=e.imported,a=null;"Identifier"===s.type&&("type"===s.name?a="type":"typeof"===s.name&&(a="typeof"));let o=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let t=this.parseIdentifier(!0);null===a||J(this.state.type)?(e.imported=s,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=a,e.local=it(t))}else{if(null!==a&&J(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=a;else{if(t)throw this.raise(b.ImportBindingIsString,{at:e,importName:s.value});e.imported=s,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(o=!0,e.local=it(e.imported))}let u=lt(e);return r&&u&&this.raise(ut.ImportTypeShorthandOnlyInPureImport,{at:e}),(r||u)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),o&&!r&&!u&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){let r=e.kind;"get"!==r&&"set"!==r&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let n,i=null;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(i=this.state.clone(),n=this.tryParse((()=>super.parseMaybeAssign(e,t)),i),!n.error)return n.node;let{context:r}=this.state,s=r[r.length-1];(s===P.j_oTag||s===P.j_expr)&&r.pop()}if(null!=(r=n)&&r.error||this.match(47)){var s,a;i=i||this.state.clone();let r,o=this.tryParse((n=>{var i;r=this.flowParseTypeParameterDeclaration();let s=this.forwardNoArrowParamsConversionAt(r,(()=>{let n=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(n,r),n}));null!=(i=s.extra)&&i.parenthesized&&n();let a=this.maybeUnwrapTypeCastExpression(s);return"ArrowFunctionExpression"!==a.type&&n(),a.typeParameters=r,this.resetStartLocationFromNode(a,r),s}),i),u=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(ut.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:r}),o.node;u=o.node}if(null!=(s=n)&&s.node)return this.state=n.failState,n.node;if(u)return this.state=o.failState,u;throw null!=(a=n)&&a.thrown?n.error:o.thrown?o.error:this.raise(ut.UnexpectedTokenAfterTypeParameter,{at:r})}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse((()=>{let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,r,n=!0){if(!r||-1===this.state.noArrowParamsConversionAt.indexOf(e.start)){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(ut.ThisParamMustBeFirst,{at:e.params[t]});super.checkParams(e,t,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(e,t,r){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(t.index)){this.next();let r=this.startNodeAt(t);r.callee=e,r.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(r,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(47)){let n=this.state.clone(),i=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t)||e()),n);if(!i.error&&!i.aborted)return i.node;let s=this.tryParse((()=>super.parseSubscripts(e,t,r)),n);if(s.node&&!s.error)return s.node;if(i.node)return this.state=i.failState,i.node;if(s.node)return this.state=s.failState,s.node;throw i.error||s.error}return super.parseSubscripts(e,t,r)}parseSubscript(e,t,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();let i=this.startNodeAt(t);return i.callee=e,i.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),i.arguments=this.parseCallExpressionArguments(11,!1),i.optional=!0,this.finishCallExpression(i,!0)}if(!r&&this.shouldParseTypes()&&this.match(47)){let r=this.startNodeAt(t);r.callee=e;let i=this.tryParse((()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),r.arguments=super.parseCallExpressionArguments(11,!1),n.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,n.optionalChainMember))));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(9,2)}parseTopLevel(e,t){let r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(ut.UnterminatedFlowComment,{at:this.state.curPosition()}),r}skipBlockComment(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/");{if(this.state.hasFlowComment)throw this.raise(ut.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let r=this.input.charCodeAt(t+e),n=this.input.charCodeAt(t+e+1);return 58===r&&58===n?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===r&&58!==n&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(b.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(ut.EnumBooleanMemberNotInitialized,{at:e,memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?ut.EnumInvalidMemberInitializerSymbolType:ut.EnumInvalidMemberInitializerPrimaryType:ut.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},t))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(ut.EnumNumberMemberNotInitialized,{at:e,enumName:t,memberName:r})}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(ut.EnumStringMemberInconsistentlyInitailized,{at:e,enumName:t})}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 132:{let r=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 131:{let r=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{let r=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,r){let{explicitType:n}=t;null!==n&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}let s=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),u=a.name;if(""===u)continue;/^[a-z]/.test(u)&&this.raise(ut.EnumInvalidMemberName,{at:a,memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:e}),r.has(u)&&this.raise(ut.EnumDuplicateMemberName,{at:a,memberName:u,enumName:e}),r.add(u);let l={enumName:e,explicitType:t,memberName:u};switch(s.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"boolean"),s.init=o.value,n.booleanMembers.push(this.finishNode(s,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"number"),s.init=o.value,n.numberMembers.push(this.finishNode(s,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"string"),s.init=o.value,n.stringMembers.push(this.finishNode(s,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.loc,l);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,l);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,l);break;default:n.defaultedMembers.push(this.finishNode(s,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:i}}flowEnumStringMembers(e,t,{enumName:r}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(let t of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:r});return t}for(let e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:r});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(101))return null;if(!K(this.state.type))throw this.raise(ut.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e});let{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(ut.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let r=t.name,n=t.loc.start,i=this.flowEnumParseExplicitType({enumName:r});this.expect(5);let{members:s,hasUnknownMembers:a}=this.flowEnumMembers({enumName:r,explicitType:i});switch(e.hasUnknownMembers=a,i){case"boolean":return e.explicitType=!0,e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=s.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let t=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let i=s.booleanMembers.length,a=s.numberMembers.length,o=s.stringMembers.length,u=s.defaultedMembers.length;if(!(i||a||o||u))return t();if(!i&&!a)return e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!a&&!o&&i>=u){for(let e of s.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}if(!i&&!o&&a>=u){for(let e of s.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}return this.raise(ut.EnumInconsistentMemberValues,{at:n,enumName:r}),t()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){let t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:St.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:St.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:St.InvalidModifierOnTypeParameter})}getScopeHandler(){return yt}tsIsIdentifier(){return K(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(136)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,t){if(!K(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;let r=this.state.value;if(-1!==e.indexOf(r)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:r,errorTemplate:n=St.InvalidModifierOnTypeMember},i){let s=(e,t,r,n)=>{t===r&&i[n]&&this.raise(St.InvalidModifiersOrder,{at:e,orderedModifiers:[r,n]})},a=(e,t,r,n)=>{(i[r]&&t===n||i[n]&&t===r)&&this.raise(St.IncompatibleModifiers,{at:e,modifiers:[r,n]})};for(;;){let{startLoc:o}=this.state,u=this.tsParseModifier(e.concat(t??[]),r);if(!u)break;Tt(u)?i.accessibility?this.raise(St.DuplicateAccessibilityModifier,{at:o,modifier:u}):(s(o,u,u,"override"),s(o,u,u,"static"),s(o,u,u,"readonly"),i.accessibility=u):Et(u)?(i[u]&&this.raise(St.DuplicateModifier,{at:o,modifier:u}),i[u]=!0,s(o,u,"in","out")):(Object.hasOwnProperty.call(i,u)?this.raise(St.DuplicateModifier,{at:o,modifier:u}):(s(o,u,"static","readonly"),s(o,u,"static","override"),s(o,u,"override","readonly"),s(o,u,"abstract","override"),a(o,u,"declare","override"),a(o,u,"static","abstract")),i[u]=!0),null!=t&&t.includes(u)&&this.raise(n,{at:o,modifier:u})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,t){let r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t,r){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,r))}tsParseDelimitedListWorker(e,t,r,n){let i=[],s=-1;for(;!this.tsIsListTerminator(e);){s=-1;let n=t();if(null==n)return;if(i.push(n),!this.eat(12)){if(this.tsIsListTerminator(e))break;return void(r&&this.expect(12))}s=this.state.lastTokStart}return n&&(n.value=s),i}tsParseBracketedList(e,t,r,n,i){n||(r?this.expect(0):this.expect(47));let s=this.tsParseDelimitedList(e,t,i);return r?this.expect(3):this.expect(48),s}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(131)||this.raise(St.UnsupportedImportTypeArgument,{at:this.state.startLoc}),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){let r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(e),t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(140)?this.next():this.unexpected();let r={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),0===t.params.length&&this.raise(St.EmptyTypeParameters,{at:t}),-1!==r.value&&this.addExtra(t,"trailingComma",r.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let r=19===e,n="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(r||this.match(e))&&(t[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:e}=t;("AssignmentPattern"===e||"TSParameterProperty"===e)&&this.raise(St.UnsupportedSignatureParameterKind,{at:t,type:e})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!K(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let r=e;if(this.match(10)||this.match(47)){t&&this.raise(St.ReadonlyForMethodSignature,{at:e});let n=r;n.kind&&this.match(47)&&this.raise(St.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();let i="parameters",s="typeAnnotation";if("get"===n.kind)n[i].length>0&&(this.raise(b.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(n[i][0])&&this.raise(St.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if("set"===n.kind){if(1!==n[i].length)this.raise(b.BadSetterArity,{at:this.state.curPosition()});else{let e=n[i][0];this.isThisParam(e)&&this.raise(St.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),"Identifier"===e.type&&e.optional&&this.raise(St.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),"RestElement"===e.type&&this.raise(St.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}n[s]&&this.raise(St.SetAccesorCannotHaveReturnType,{at:n[s]})}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}{let e=r;t&&(e.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e),this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(120):(this.isContextual(120)&&this.next(),!(!this.match(0)||(this.next(),!this.tsIsIdentifier()))&&(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(120)):this.eatContextual(120)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1,r=null;return e.elementTypes.forEach((e=>{let{type:n}=e;t&&"TSRestType"!==n&&"TSOptionalType"!==n&&!("TSNamedTupleMember"===n&&e.optional)&&this.raise(St.OptionalTypeBeforeRequired,{at:e}),t||(t="TSNamedTupleMember"===n&&e.optional||"TSOptionalType"===n);let i=n;"TSRestType"===n&&(i=(e=e.typeAnnotation).type);let s="TSNamedTupleMember"===i;null!=r||(r=s),r!==s&&this.raise(St.MixedLabeledAndUnlabeledElements,{at:e})})),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let e,t,r,n,{startLoc:i}=this.state,s=this.eat(21),a=J(this.state.type)?this.lookaheadCharCode():null;if(58===a)e=!0,r=!1,t=this.parseIdentifier(!0),this.expect(14),n=this.tsParseType();else if(63===a){r=!0;let i=this.state.startLoc,s=this.state.value,a=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(e=!0,t=this.createIdentifier(this.startNodeAt(i),s),this.expect(17),this.expect(14),n=this.tsParseType()):(e=!1,n=a,this.expect(17))}else n=this.tsParseType(),r=this.eat(17),e=this.eat(14);if(e){let e;t?(e=this.startNodeAtNode(t),e.optional=r,e.label=t,e.elementType=n,this.eat(17)&&(e.optional=!0,this.raise(St.TupleOptionalAfterType,{at:this.state.lastTokStartLoc}))):(e=this.startNodeAtNode(n),e.optional=r,this.raise(St.InvalidTupleMemberLabel,{at:n}),e.label=n,e.elementType=this.tsParseType()),n=this.finishNode(e,"TSNamedTupleMember")}else if(r){let e=this.startNodeAtNode(n);e.typeAnnotation=n,n=this.finishNode(e,"TSOptionalType")}if(s){let e=this.startNodeAt(i);e.typeAnnotation=n,n=this.finishNode(e,"TSRestType")}return n}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let r=this.startNode();return"TSConstructorType"===e&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(19,r))),this.finishNode(r,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 132:case 133:case 131:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(114)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 131:case 132:case 133:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){let e=this.startNode(),t=this.lookahead();return 132!==t.type&&133!==t.type&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(K(e)||88===e||84===e){let t=88===e?"TSVoidKeyword":84===e?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{let t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(St.UnexpectedReadonly,{at:e})}}tsParseInferType(){let e=this.startNode();this.expectContextual(113);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return function(e){return e>=119&&e<=121}(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(113)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(e,t,r){let n=this.startNode(),i=this.eat(r),s=[];do{s.push(t())}while(this.eat(r));return 1!==s.length||i?(n.types=s,this.finishNode(n,e)):s[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return!!this.match(47)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(K(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{let t=this.startNode();this.expect(e);let r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(r.parameterName=e,r.asserts=!0,r.typeAnnotation=null,e=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(e,r),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}let i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);let s=this.tsParseTypeAnnotation(!1);return r.parameterName=i,r.typeAnnotation=s,r.asserts=n,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(114)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(107!==this.state.type)return!1;let e=this.state.containsEsc;return this.next(),!(!K(this.state.type)&&!this.match(78))&&(e&&this.raise(b.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){bt(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType())),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(122)&&77===this.lookahead().type}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(St.ReservedTypeAssertion,{at:this.state.startLoc});let e=this.startNode();return e.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()))),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let t=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",(()=>{let e=this.startNode();return e.expression=this.tsParseEntityName(),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}));return r.length||this.raise(St.EmptyHeritageClauseType,{at:t,token:e}),r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(127),t.declare&&(e.declare=!0),K(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(St.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType((()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(112)&&16!==this.lookahead().type){let e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType((()=>(this.expect(e),this.tsParseType())))}tsNextThenParseType(){return this.tsInType((()=>(this.next(),this.tsParseType())))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(131)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(124),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(110)?(e.global=!0,e.id=this.parseIdentifier()):this.match(131)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,r){e.isExport=r||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let n=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==n.type&&this.raise(St.ImportAliasHasImportType,{at:n}),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(117)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(117),this.expect(10),this.match(131)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){let t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),r=e();if(void 0!==r&&!1!==r)return r;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t,r=this.state.type;return this.isContextual(99)&&(r=74,t="let"),this.tsInAmbientContext((()=>{switch(r){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 124:return this.tsParseEnumDeclaration(e,{declare:!0});case 110:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,t||this.state.value,!0));case 127:{let t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(K(r))return this.tsParseDeclaration(e,this.state.value,!0,null)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,r){switch(t.name){case"declare":{let t=this.tsTryParseDeclare(e);return t&&(t.declare=!0),t}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let r=e;return r.global=!0,r.id=t,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,r)}}tsParseDeclaration(e,t,r,n){switch(t){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||K(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(131))return this.tsParseAmbientExternalModuleDeclaration(e);if(K(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&K(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&K(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let r=this.tsTryParseAndCatch((()=>{let t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t}));return this.state.maybeInArrowParameters=t,r?super.parseArrowExpression(r,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length?this.raise(St.EmptyTypeArguments,{at:e}):!this.state.inType&&this.curContext()===P.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return function(e){return e>=122&&e<=128}(this.state.type)}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let r=this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);let i=n.accessibility,s=n.override,a=n.readonly;!(4&e)&&(i||a||s)&&this.raise(St.UnexpectedParameterModifier,{at:r});let o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o,e);let u=this.parseMaybeDefault(o.loc.start,o);if(i||a||s){let e=this.startNodeAt(r);return t.length&&(e.decorators=t),i&&(e.accessibility=i),a&&(e.readonly=a),s&&(e.override=s),"Identifier"!==u.type&&"AssignmentPattern"!==u.type&&this.raise(St.UnsupportedParameterPropertyKind,{at:e}),e.parameter=u,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),u}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(St.PatternIsOptional,{at:t})}setArrowFunctionParameters(e,t,r){super.setArrowFunctionParameters(e,t,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let n="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):"TSDeclareFunction"===n&&this.state.isAmbientContext&&(this.raise(St.DeclareFunctionHasImplementation,{at:e}),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===(null==e?void 0:e.type)&&this.raise(St.UnexpectedTypeAnnotation,{at:e.typeAnnotation})}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,r,n){let i=super.parseArrayLike(e,t,r,n);return"ArrayExpression"===i.type&&this.tsCheckForInvalidTypeCasts(i.elements),i}parseSubscript(e,t,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let r=this.startNodeAt(t);return r.expression=e,this.finishNode(r,"TSNonNullExpression")}let i=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(r)return n.stop=!0,e;n.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let s,a=this.tsTryParseAndCatch((()=>{if(!r&&this.atPossibleAsyncArrow(e)){let e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return e}let a=this.tsParseTypeArgumentsInExpression();if(!a)return;if(i&&!this.match(10))return void(s=this.state.curPosition());if(Q(this.state.type)){let r=super.parseTaggedTemplateExpression(e,t,n);return r.typeParameters=a,r}if(!r&&this.eat(10)){let r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(r.arguments),r.typeParameters=a,n.optionalChainMember&&(r.optional=i),this.finishCallExpression(r,n.optionalChainMember)}let o=this.state.type;if(48===o||52===o||10!==o&&X(o)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=a,this.finishNode(u,"TSInstantiationExpression")}));if(s&&this.unexpected(s,10),a)return"TSInstantiationExpression"===a.type&&(this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(St.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),a}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:r}=e;"TSInstantiationExpression"===r.type&&(null==(t=r.extra)||!t.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,t,r){let n;if(Y(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(118)))){let i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?(n&&this.raise(b.UnexpectedKeyword,{at:this.state.startLoc,keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()))),this.finishNode(i,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,t,r)}return super.parseExprOp(e,t,r)}checkReservedWord(e,t,r,n){this.state.isAmbientContext||super.checkReservedWord(e,t,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(St.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(128)){let t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){super.applyImportPhase(e,t,r,n),t?e.exportKind="type"===r?"type":"value":e.importKind="type"===r||"typeof"===r?r:"value"}parseImport(e){if(this.match(131))return e.importKind="value",super.parseImport(e);let t;if(K(this.state.type)&&61===this.lookaheadCharCode())return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(128)){let r=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(e,r);t=super.parseImportSpecifiersAndAfter(e,r)}else t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(St.TypeImportCannotSpecifyDefaultAndNamed,{at:t}),t}parseExport(e,t){if(this.match(83)){this.next();let t=null;return this.isContextual(128)&&this.isPotentialImportPhase(!1)?t=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,t,!0)}if(this.eat(29)){let t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(93)){let t=e;return this.expectContextual(126),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(122)&&80===this.lookahead().type}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(127)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,r=!1){let{isAmbientContext:n}=this.state,i=super.parseVarStatement(e,t,r||n);if(!n)return i;for(let{id:e,init:r}of i.declarations)r&&("const"!==t||e.typeAnnotation?this.raise(St.InitializerNotAllowedInAmbientContext,{at:r}):Pt(r,this.hasPlugin("estree"))||this.raise(St.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:r}));return i}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}if(this.isContextual(124))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(127)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>Tt(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual(104)&&123===this.lookaheadCharCode()}parseClassMember(e,t,r){let n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:St.InvalidModifierOnTypeParameterPositions},t);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,n)&&this.raise(St.StaticBlockCannotHaveModifier,{at:this.state.curPosition()}),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,!!t.static)};t.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(e,t,r,n){let i=this.tsTryParseIndexSignature(t);if(i)return e.body.push(i),t.abstract&&this.raise(St.IndexSignatureHasAbstract,{at:t}),t.accessibility&&this.raise(St.IndexSignatureHasAccessibility,{at:t,modifier:t.accessibility}),t.declare&&this.raise(St.IndexSignatureHasDeclare,{at:t}),void(t.override&&this.raise(St.IndexSignatureHasOverride,{at:t}));!this.state.inAbstractClass&&t.abstract&&this.raise(St.NonAbstractClassHasAbstractMethod,{at:t}),t.override&&(r.hadSuperClass||this.raise(St.OverrideNotInSubClass,{at:t})),super.parseClassMemberWithIsStatic(e,t,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(St.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(St.ClassMethodHasDeclare,{at:e})}parseExpressionStatement(e,t,r){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t,r):void 0)||super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,r);let n=this.tryParse((()=>super.parseConditional(e,t)));return n.node?(n.error&&(this.state=n.failState),n.node):(n.error&&super.setOptionalParametersError(r,n.error),e)}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(123))return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)));let t=this.state.startLoc,r=this.eatContextual(123);if(r&&(this.isContextual(123)||!this.shouldParseExportDeclaration()))throw this.raise(St.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});let n=K(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?(("TSInterfaceDeclaration"===n.type||"TSTypeAliasDeclaration"===n.type||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(n,t),n.declare=!0),n):null}parseClassId(e,t,r,n){if((!t||r)&&this.isContextual(111))return;super.parseClassId(e,t,r,e.declare?1024:8331);let i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(e.typeParameters=i)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(St.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){let{key:t}=e;this.raise(St.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(t.start,t.end)}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(St.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(St.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(St.AccessorCannotBeOptional,{at:e}),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,r,n,i,s){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&i&&this.raise(St.ConstructorHasTypeParameters,{at:a});let{declare:o=!1,kind:u}=t;o&&("get"===u||"set"===u)&&this.raise(St.DeclareAccessor,{at:t,kind:u}),a&&(t.typeParameters=a),super.pushClassMethod(e,t,r,n,i,s)}pushClassPrivateMethod(e,t,r,n){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,r,n)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"===e.type&&!e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(111)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,r,n,i,s,a){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);return o&&(e.typeParameters=o),super.parseObjPropValue(e,t,r,n,i,s,a)}parseFunctionParams(e,t){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var r,n,i,s,a;let o,u,l;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(o=this.state.clone(),u=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!u.error)return u.node;let{context:r}=this.state,n=r[r.length-1];(n===P.j_oTag||n===P.j_expr)&&r.pop()}if(!(null!=(r=u)&&r.error||this.match(47)))return super.parseMaybeAssign(e,t);(!o||o===this.state)&&(o=this.state.clone());let c,p=this.tryParse((r=>{var n,i;c=this.tsParseTypeParameters(this.tsParseConstModifier);let s=super.parseMaybeAssign(e,t);return("ArrowFunctionExpression"!==s.type||null!=(n=s.extra)&&n.parenthesized)&&r(),0!==(null==(i=c)?void 0:i.params.length)&&this.resetStartLocationFromNode(s,c),s.typeParameters=c,s}),o);if(!p.error&&!p.aborted)return c&&this.reportReservedArrowTypeParam(c),p.node;if(!u&&(bt(!this.hasPlugin("jsx")),l=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!l.error))return l.node;if(null!=(n=u)&&n.node)return this.state=u.failState,u.node;if(p.node)return this.state=p.failState,c&&this.reportReservedArrowTypeParam(c),p.node;if(null!=(i=l)&&i.node)return this.state=l.failState,l.node;throw(null==(s=u)?void 0:s.error)||p.error||(null==(a=l)?void 0:a.error)}reportReservedArrowTypeParam(e){var t;1===e.params.length&&!e.params[0].constraint&&(null==(t=e.extra)||!t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(St.ReservedArrowTypeParam,{at:e})}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse((e=>{let t=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,t){if(!(2&t))return e;this.eat(17)&&(e.optional=!0);let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(St.UnexpectedTypeCastInParameter,{at:e}):this.raise(St.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,t);break;case"AssignmentExpression":!t&&"TSTypeCastExpression"===e.left.type&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,r){return((e,t)=>Object.hasOwnProperty.call(e,t)&&e[t])({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(64!==r||!t)&&["expression",!0],TSSatisfiesExpression:(64!==r||!t)&&["expression",!0],TSTypeAssertion:(64!==r||!t)&&["expression",!0]},e)||super.isValidLVal(e,t,r)}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=t,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(St.TypeAnnotationAfterAssign,{at:r.typeAnnotation}),r}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(48,1);if(60===e)return void this.finishOp(47,1)}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){let r=e[t];"TSTypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every((e=>this.isAssignable(e,!0))):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let t=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,t,r){let n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(127)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(St.NonClassMethodPropertyHasAbstractModifer,{at:e}),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,r,n,i,s,a){let o=super.parseMethod(e,t,r,n,i,s,a);if(o.abstract&&(this.hasPlugin("estree")?o.value.body:o.body)){let{key:e}=o;this.raise(St.AbstractMethodHasImplementation,{at:o,methodName:"Identifier"!==e.type||o.computed?`[${this.input.slice(e.start,e.end)}]`:e.name})}return o}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,r,n){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,r,n))}parseImportSpecifier(e,t,r,n,i){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,r,n,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,r){let n,i=t?"imported":"local",s=t?"local":"exported",a=e[i],o=!1,u=!0,l=a.loc.start;if(this.isContextual(93)){let e=this.parseIdentifier();if(this.isContextual(93)){let r=this.parseIdentifier();J(this.state.type)?(o=!0,a=e,n=t?this.parseIdentifier():this.parseModuleExportName(),u=!1):(n=r,u=!1)}else J(this.state.type)?(u=!1,n=t?this.parseIdentifier():this.parseModuleExportName()):(o=!0,a=e)}else J(this.state.type)&&(o=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());o&&r&&this.raise(t?St.TypeModifierIsUsedInTypeImports:St.TypeModifierIsUsedInTypeExports,{at:l}),e[i]=a,e[s]=n,e[t?"importKind":"exportKind"]=o?"type":"value",u&&this.eatContextual(93)&&(e[s]=t?this.parseIdentifier():this.parseModuleExportName()),e[s]||(e[s]=it(e[i])),t&&this.checkIdentifier(e[s],o?4098:4096)}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),K(this.state.type)){let e=this.parseIdentifierName(),r=this.createIdentifier(t,e);if(r.type="V8IntrinsicIdentifier",this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(142)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(142),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let r=!(!e.expectedNode||"Placeholder"!==e.type);return e.expectedNode=t,r?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(142,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,r,n){void 0!==e&&super.checkReservedWord(e,t,r,n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,r){return"Placeholder"===e||super.isValidLVal(e,t,r)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!(!super.chStartsBindingIdentifier(e,t)&&142!==this.lookahead().type)}verifyBreakContinue(e,t){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var r;if("Placeholder"!==t.type||null!=(r=t.extra)&&r.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let r=e;return r.label=this.finishPlaceholder(t,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,t,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,r){let n=t?"ClassDeclaration":"ClassExpression";this.next();let i=this.state.strict,s=this.parsePlaceholder("Identifier");if(s){if(!(this.match(81)||this.match(142)||this.match(5))){if(r||!t)return e.id=null,e.body=this.finishPlaceholder(s,"ClassBody"),this.finishNode(e,n);throw this.raise(Ct.ClassNameIsRequired,{at:this.state.startLoc})}e.id=s}else this.parseClassId(e,t,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,i),this.finishNode(e,n)}parseExport(e,t){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,t);if(!this.isContextual(97)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let n=this.startNode();return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(e,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(G(142),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var r;return!(null==(r=e.specifiers)||!r.length)||super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>"Placeholder"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(97)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(97),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(Ct.UnexpectedSpace,{at:this.state.lastTokEndLoc})}}},Ot=Object.keys(_t),Lt={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};var Mt=class extends xt{checkProto(e,t,r,n){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return;let i=e.key;if("__proto__"===("Identifier"===i.type?i.name:i.value)){if(t)return void this.raise(b.RecordNoProto,{at:i});r.used&&(n?null===n.doubleProtoLoc&&(n.doubleProtoLoc=i.loc.start):this.raise(b.DuplicateProto,{at:i})),r.used=!0}}shouldExitDescending(e,t){return"ArrowFunctionExpression"===e.type&&e.start===t}getExpression(){this.enterInitialScopes(),this.nextToken();let e=this.parseExpression();return this.match(137)||this.unexpected(),this.finalizeRemainingComments(),e.comments=this.state.comments,e.errors=this.state.errors,this.options.tokens&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){let t=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(12)){let n=this.startNodeAt(t);for(n.expressions=[r];this.eat(12);)n.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(n.expressions),this.finishNode(n,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e,t){var r;e.optionalParametersLoc=null!=(r=null==t?void 0:t.loc)?r:this.state.startLoc}parseMaybeAssign(e,t){let r,n=this.state.startLoc;if(this.isContextual(106)&&this.prodParam.hasYield){let e=this.parseYield();return t&&(e=t.call(this,e,n)),e}e?r=!1:(e=new tt,r=!0);let{type:i}=this.state;(10===i||K(i))&&(this.state.potentialArrowAt=this.state.start);let s=this.parseMaybeConditional(e);if(t&&(s=t.call(this,s,n)),(a=this.state.type)>=29&&a<=33){let t=this.startNodeAt(n),r=this.state.value;if(t.operator=r,this.match(29)){this.toAssignable(s,!0),t.left=s;let r=n.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=r&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=r&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=r&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else t.left=s;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(s,{in:this.finishNode(t,"AssignmentExpression")}),t}var a;return r&&this.checkExpressionErrors(e,!0),s}parseMaybeConditional(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprOps(e);return this.shouldExitDescending(n,r)?n:this.parseConditional(n,t,e)}parseConditional(e,t,r){if(this.eat(17)){let r=this.startNodeAt(t);return r.test=e,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(136)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(n,r)?n:this.parseExprOp(n,t,-1)}parseExprOp(e,t,r){if(this.isPrivateName(e)){let t=this.getPrivateNameSV(e);(r>=Y(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(b.PrivateInExpectedIn,{at:e,identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}let n=this.state.type;if((i=n)>=39&&i<=59&&(this.prodParam.hasIn||!this.match(58))){let i=Y(n);if(i>r){if(39===n){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let s=this.startNodeAt(t);s.left=e,s.operator=this.state.value;let a=41===n||42===n,o=40===n;if(o&&(i=Y(42)),this.next(),39===n&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(b.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});s.right=this.parseExprOpRightExpr(n,i);let u=this.finishNode(s,a||o?"LogicalExpression":"BinaryExpression"),l=this.state.type;if(o&&(41===l||42===l)||a&&40===l)throw this.raise(b.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(u,t,r)}}var i;return e}parseExprOpRightExpr(e,t){let r=this.state.startLoc;if(39===e)switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"smart":return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(106))throw this.raise(b.PipeBodyIsTighter,{at:this.state.startLoc});return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),r)}));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){let r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,57===e?t-1:t)}parseHackPipeBody(){var e;let{startLoc:t}=this.state,r=this.parseMaybeAssign();return h.has(r.type)&&!(null!=(e=r.extra)&&e.parenthesized)&&this.raise(b.PipeUnparenthesizedBody,{at:t,type:r.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipeTopicUnused,{at:t}),r}checkExponentialAfterUnary(e){this.match(57)&&this.raise(b.UnexpectedTokenUnaryExponentiation,{at:e.argument})}parseMaybeUnary(e,t){let r=this.state.startLoc,n=this.isContextual(96);if(n&&this.isAwaitAllowed()){this.next();let e=this.parseAwait(r);return t||this.checkExponentialAfterUnary(e),e}let i=this.match(34),s=this.startNode();if(a=this.state.type,U[a]){s.operator=this.state.value,s.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let r=this.match(89);if(this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&r){let e=s.argument;"Identifier"===e.type?this.raise(b.StrictDelete,{at:s}):this.hasPropertyAsPrivateName(e)&&this.raise(b.DeletePrivateField,{at:s})}if(!i)return t||this.checkExponentialAfterUnary(s),this.finishNode(s,"UnaryExpression")}var a;let o=this.parseUpdate(s,i,e);if(n){let{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?X(e):X(e)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(b.AwaitNotInAsyncContext,{at:r}),this.parseAwait(r)}return o}parseUpdate(e,t,r){if(t){let t=e;return this.checkLVal(t.argument,{in:this.finishNode(t,"UpdateExpression")}),e}let n=this.state.startLoc,i=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return i;for(;34===this.state.type&&!this.canInsertSemicolon();){let e=this.startNodeAt(n);e.operator=this.state.value,e.prefix=!1,e.argument=i,this.next(),this.checkLVal(i,{in:i=this.finishNode(e,"UpdateExpression")})}return i}parseExprSubscripts(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprAtom(e);return this.shouldExitDescending(n,r)?n:this.parseSubscripts(n,t)}parseSubscripts(e,t,r){let n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,r,n),n.maybeAsyncArrow=!1}while(!n.stop);return e}parseSubscript(e,t,r,n){let{type:i}=this.state;if(!r&&15===i)return this.parseBind(e,t,r,n);if(Q(i))return this.parseTaggedTemplateExpression(e,t,n);let s=!1;if(18===i){if(r&&(this.raise(b.OptionalChainingNoNew,{at:this.state.startLoc}),40===this.lookaheadCharCode()))return n.stop=!0,e;n.optionalChainMember=s=!0,this.next()}if(!r&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,n,s);{let r=this.eat(0);return r||s||this.eat(16)?this.parseMember(e,t,n,r,s):(n.stop=!0,e)}}parseMember(e,t,r,n,i){let s=this.startNodeAt(t);return s.object=e,s.computed=n,n?(s.property=this.parseExpression(),this.expect(3)):this.match(136)?("Super"===e.type&&this.raise(b.SuperPrivateField,{at:t}),this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),r.optionalChainMember?(s.optional=i,this.finishNode(s,"OptionalMemberExpression")):this.finishNode(s,"MemberExpression")}parseBind(e,t,r,n){let i=this.startNodeAt(t);return i.object=e,this.next(),i.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r)}parseCoverCallAndAsyncArrowHead(e,t,r,n){let i=this.state.maybeInArrowParameters,s=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(t);a.callee=e;let{maybeAsyncArrow:o,optionalChainMember:u}=r;o&&(this.expressionScope.enter(new Ye(2)),s=new tt),u&&(a.optional=n),a.arguments=n?this.parseCallExpressionArguments(11):this.parseCallExpressionArguments(11,"Import"===e.type,"Super"!==e.type,a,s);let l=this.finishCallExpression(a,u);return o&&this.shouldParseAsyncArrow()&&!n?(r.stop=!0,this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(o&&(this.checkExpressionErrors(s,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=i,l}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r){let n=this.startNodeAt(t);return n.tag=e,n.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(b.OptionalChainingNoTemplate,{at:t}),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&e.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(e,t){if("Import"===e.callee.type)if(2===e.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),0===e.arguments.length||e.arguments.length>2)this.raise(b.ImportCallArity,{at:e,maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let t of e.arguments)"SpreadElement"===t.type&&this.raise(b.ImportCallSpreadArgument,{at:t});return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r,n,i){let s=[],a=!0,o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){t&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(b.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),n&&this.addTrailingCommaExtraToNode(n),this.next();break}s.push(this.parseExprListItem(!1,i,r))}return this.state.inFSharpPipelineDirectBody=o,s}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,null==(r=t.extra)?void 0:r.trailingCommaLoc),t.innerComments&&Ae(e,t.innerComments),t.callee.trailingComments&&Ae(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,r=null,{type:n}=this.state;switch(n){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(t):(this.match(10)||this.raise(b.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 132:return this.parseNumericLiteral(this.state.value);case 133:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseDecimalLiteral(this.state.value);case 131:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 2:case 1:return this.parseArrayLike(2===this.state.type?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,e);case 6:case 7:return this.parseObjectLike(6===this.state.type?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:r=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(r,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let e=t.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(b.UnsupportedBind,{at:e})}case 136:return this.raise(b.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.parseTopicReference(e);this.unexpected();break}case 47:{let e=this.input.codePointAt(this.nextTokenStart());oe(e)||62===e?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(K(n)){if(this.isContextual(125)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();let e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&"async"===r.name&&!this.canInsertSemicolon()){let{type:e}=this.state;if(68===e)return this.resetPreviousNodeTrailingComments(r),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(r));if(K(e))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(r)):r;if(90===e)return this.resetPreviousNodeTrailingComments(r),this.parseDo(this.startNodeAtNode(r),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(r),[r],!1)):r}this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(r);this.unexpected()}parseTopicReference(e){let t=this.startNode(),r=this.state.startLoc,n=this.state.type;return this.next(),this.finishTopicReference(t,r,e,n)}finishTopicReference(e,t,r,n){if(this.testTopicReferenceConfiguration(r,t,n)){let n="smart"===r?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise("smart"===r?b.PrimaryTopicNotAllowed:b.PipeTopicUnbound,{at:t}),this.registerTopicReference(),this.finishNode(e,n)}throw this.raise(b.PipeTopicUnconfiguredToken,{at:t,token:G(n)})}testTopicReferenceConfiguration(e,t,r){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:G(r)}]);case"smart":return 27===r;default:throw this.raise(b.PipeTopicRequiresHackPipes,{at:t})}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Ze(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(b.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let r=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=r,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(b.UnexpectedSuper,{at:e}):this.raise(b.SuperNotAllowed,{at:e}),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(b.UnsupportedSuper,{at:e}),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(i(this.state.startLoc,1)),r=this.state.value;return this.next(),e.id=this.createIdentifier(t,r),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(102)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;let n=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||n)&&this.raise(b.UnsupportedMetaProperty,{at:e.property,target:t.name,onlyValidPropertyName:r}),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){let t=this.createIdentifier(this.startNodeAtNode(e),"import");return this.next(),this.isContextual(100)&&(this.inModule||this.raise(b.ImportMetaOutsideModule,{at:t}),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}parseLiteralAtNode(e,t,r){return this.addExtra(r,"rawValue",e),this.addExtra(r,"raw",this.input.slice(r.start,this.state.end)),r.value=e,this.next(),this.finishNode(r,t)}parseLiteral(e,t){let r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let t=this.parseLiteral(e.value,"RegExpLiteral");return t.pattern=e.pattern,t.flags=e.flags,t}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t,r=this.state.startLoc;this.next(),this.expressionScope.enter(new Ye(1));let n=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let s,a,o=this.state.startLoc,u=[],l=new tt,c=!0;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,null===l.optionalParametersLoc?null:l.optionalParametersLoc),this.match(11)){a=this.state.startLoc;break}if(this.match(21)){let e=this.state.startLoc;if(s=this.state.startLoc,u.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else u.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let p=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=i;let d=this.startNodeAt(r);return e&&this.shouldParseArrow(u)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,u,!1),d):(this.expressionScope.exit(),u.length||this.unexpected(this.state.lastTokStartLoc),a&&this.unexpected(a),s&&this.unexpected(s),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(u,!0),u.length>1?(t=this.startNodeAt(o),t.expressions=u,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,p)):t=u[0],this.wrapParenthesis(r,t))}wrapParenthesis(e,t){if(!this.options.createParenthesizedExpressions)return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let r=this.startNodeAt(e);return r.expression=t,this.finishNode(r,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let r=this.parseMetaProperty(e,t,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(b.UnexpectedNewTarget,{at:r}),r}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){e.callee=this.parseNoCallExpr(),"Import"===e.callee.type&&this.raise(b.ImportCallNotNewExpression,{at:e.callee})}parseTemplateElement(e){let{start:t,startLoc:r,end:n,value:s}=this.state,a=t+1,o=this.startNodeAt(i(r,1));null===s&&(e||this.raise(b.InvalidEscapeSequenceTemplate,{at:i(this.state.firstInvalidTemplateEscapePos,1)}));let u=this.match(24),l=u?-1:-2,c=n+l;o.value={raw:this.input.slice(a,c).replace(/\r\n?/g,"\n"),cooked:null===s?null:s.slice(1,l)},o.tail=u,this.next();let p=this.finishNode(o,"TemplateElement");return this.resetEndLocation(p,i(this.state.lastTokEndLoc,l)),p}parseTemplate(e){let t=this.startNode();t.expressions=[];let r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)t.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),t.quasis.push(r=this.parseTemplateElement(e));return this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=Object.create(null),a=!0,o=this.startNode();for(o.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(o);break}let i;t?i=this.parseBindingProperty():(i=this.parsePropertyDefinition(n),this.checkProto(i,r,s,n)),r&&!this.isObjectProperty(i)&&"SpreadElement"!==i.type&&this.raise(b.InvalidRecordProperty,{at:i}),i.shorthand&&this.addExtra(i,"shorthand",!0),o.properties.push(i)}this.next(),this.state.inFSharpPipelineDirectBody=i;let u="ObjectExpression";return t?u="ObjectPattern":r&&(u="RecordExpression"),this.finishNode(o,u)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStart),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(b.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)t.push(this.parseDecorator());let r,n=this.startNode(),i=!1,s=!1;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,e&&(r=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let o=this.state.containsEsc,u=this.parsePropertyName(n,e);if(!a&&!o&&this.maybeAsyncOrAccessorProp(n)){let e=u.name;"async"===e&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),("get"===e||"set"===e)&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=e,this.match(55)&&(a=!0,this.raise(b.AccessorIsGenerator,{at:this.state.curPosition(),kind:e}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,r,a,i,!1,s,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;let r=this.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e);n.length!==r&&this.raise("get"===e.kind?b.BadGetterArity:b.BadSetterArity,{at:e}),"set"===e.kind&&"RestElement"===(null==(t=n[n.length-1])?void 0:t.type)&&this.raise(b.BadSetterRestParameter,{at:e})}parseObjectMethod(e,t,r,n,i){if(i){let r=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(r),r}if(r||t||this.match(10))return n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,r,n){if(e.shorthand=!1,this.eat(14))return e.value=r?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(n),this.finishNode(e,"ObjectProperty");if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),r)e.value=this.parseMaybeDefault(t,it(e.key));else if(this.match(29)){let r=this.state.startLoc;null!=n?null===n.shorthandAssignLoc&&(n.shorthandAssignLoc=r):this.raise(b.InvalidCoverInitializedName,{at:r}),e.value=this.parseMaybeDefault(t,it(e.key))}else e.value=it(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,t,r,n,i,s,a){let o=this.parseObjectMethod(e,r,n,i,s)||this.parseObjectProperty(e,t,i,a);return o||this.unexpected(),o}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let r,{type:n,value:i}=this.state;if(J(n))r=this.parseIdentifier(!0);else switch(n){case 132:r=this.parseNumericLiteral(i);break;case 131:r=this.parseStringLiteral(i);break;case 133:r=this.parseBigIntLiteral(i);break;case 134:r=this.parseDecimalLiteral(i);break;case 136:{let e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(b.UnexpectedPrivateField,{at:e}),r=this.parsePrivateName();break}default:this.unexpected()}e.key=r,136!==n&&(e.computed=!1)}return e.key}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,r,n,i,s,a=!1){this.initFunction(e,r),e.generator=t,this.scope.enter(18|(a?64:0)|(i?32:0)),this.prodParam.enter(Ze(r,e.generator)),this.parseFunctionParams(e,n);let o=this.parseFunctionBodyAndFinish(e,s,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!r,n,s),this.state.inFSharpPipelineDirectBody=i,this.finishNode(s,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,n){this.scope.enter(6);let i=Ze(r,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,r);let s=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=s,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){this.toAssignableList(t,r,!1),e.params=t}parseFunctionBodyAndFinish(e,t,r=!1){return this.parseFunctionBody(e,!1,r),this.finishNode(e,t)}parseFunctionBody(e,t,r=!1){let n=t&&!this.match(5);if(this.expressionScope.enter(Qe()),n)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let n=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(i=>{let s=!this.isSimpleParamList(e.params);i&&s&&this.raise(b.IllegalLanguageModeDirective,{at:"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:e.key.loc.end});let a=!n&&this.state.strict;this.checkParams(e,!(this.state.strict||t||r||s),t,a),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,a)})),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,r=e.length;t<r;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,r,n=!0){let i=!t&&new Set,s={type:"FormalParameters"};for(let t of e.params)this.checkLVal(t,{in:s,binding:5,checkClashes:i,strictModeChanged:n})}parseExprList(e,t,r,n){let i=[],s=!0;for(;!this.eat(e);){if(s)s=!1;else if(this.expect(12),this.match(e)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}i.push(this.parseExprListItem(t,r))}return i}parseExprListItem(e,t,r){let n;if(this.match(12))e||this.raise(b.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),n=null;else if(this.match(21)){let e=this.state.startLoc;n=this.parseParenItem(this.parseSpread(t),e)}else if(this.match(17)){this.expectPlugin("partialApplication"),r||this.raise(b.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});let e=this.startNode();this.next(),n=this.finishNode(e,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return n}parseIdentifier(e){let t=this.startNode(),r=this.parseIdentifierName(e);return this.createIdentifier(t,r)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}parseIdentifierName(e){let t,{startLoc:r,type:n}=this.state;J(n)?t=this.state.value:this.unexpected();let i=n<=92;return e?i&&this.replaceToken(130):this.checkReservedWord(t,r,i,!1),this.next(),t}checkReservedWord(e,t,r,n){var i;if(!(e.length>10)&&(i=e,xe.has(i)))if(r&&function(e){return pe.has(e)}(e))this.raise(b.UnexpectedKeyword,{at:t,keyword:e});else if((this.state.strict?n?ge:me:fe)(e,this.inModule))this.raise(b.UnexpectedReservedWord,{at:t,reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(b.YieldBindingIdentifier,{at:t})}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(b.AwaitBindingIdentifier,{at:t});if(this.scope.inStaticBlock)return void this.raise(b.AwaitBindingIdentifierInStaticBlock,{at:t});this.expressionScope.recordAsyncArrowParametersError({at:t})}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(b.ArgumentsInClass,{at:t})}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(b.AwaitExpressionFormalParameter,{at:t}),this.eat(55)&&this.raise(b.ObsoleteAwaitStar,{at:t}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return 53===e||10===e||0===e||Q(e)||101===e&&!this.state.containsEsc||135===e||56===e||this.hasPlugin("v8intrinsic")&&54===e}parseYield(){let e=this.startNode();this.expressionScope.recordParameterInitializerError(b.YieldInParameter,{at:e}),this.next();let t=!1,r=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(55),this.state.type){case 13:case 137:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:r=this.parseMaybeAssign()}return e.delegate=t,e.argument=r,this.finishNode(e,"YieldExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===e.type&&this.raise(b.PipelineHeadSequenceExpression,{at:t})}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let r=this.startNodeAt(t);return r.callee=e,this.finishNode(r,"PipelineBareFunction")}{let r=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=e,this.finishNode(r,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(b.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipelineTopicUnused,{at:e})}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return e();{let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=r,n}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let r=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{r()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}},Bt={kind:"loop"},jt={kind:"switch"},Rt=/[\uD800-\uDFFF]/u,Ut=/in(?:stanceof)?/y;var $t=class extends Mt{parseTopLevel(e,t){return e.program=this.parseProgram(t),e.comments=this.state.comments,this.options.tokens&&(e.tokens=function(e,t){for(let r=0;r<e.length;r++){let n=e[r],{type:s}=n;if("number"==typeof s){if(136===s){let{loc:t,start:s,value:a,end:o}=n,u=s+1,l=i(t.start,1);e.splice(r,1,new He({type:Z(27),value:"#",start:s,end:u,startLoc:t.start,endLoc:l}),new He({type:Z(130),value:a,start:u,end:o,startLoc:l,endLoc:t.end})),r++;continue}if(Q(s)){let a,o,u,l,c,{loc:p,start:d,value:h,end:f}=n,m=d+1,y=i(p.start,1);a=96===t.charCodeAt(d)?new He({type:Z(22),value:"`",start:d,end:m,startLoc:p.start,endLoc:y}):new He({type:Z(8),value:"}",start:d,end:m,startLoc:p.start,endLoc:y}),24===s?(u=f-1,l=i(p.end,-1),o=null===h?null:h.slice(1,-1),c=new He({type:Z(22),value:"`",start:u,end:f,startLoc:l,endLoc:p.end})):(u=f-2,l=i(p.end,-2),o=null===h?null:h.slice(1,-2),c=new He({type:Z(23),value:"${",start:u,end:f,startLoc:l,endLoc:p.end})),e.splice(r,1,a,new He({type:Z(20),value:o,start:m,end:u,startLoc:y,endLoc:l}),c),r+=2;continue}n.type=Z(s)}}return e}(this.tokens,this.input)),this.finishNode(e,"File")}parseProgram(e,t=137,r=this.options.sourceType){if(e.sourceType=r,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[e,t]of Array.from(this.scope.undefinedExports))this.raise(b.ModuleExportUndefined,{at:t,localName:e});let n;return n=137===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",i(this.state.startLoc,-1)),n}stmtToDirective(e){let t=e;t.type="Directive",t.value=t.expression,delete t.expression;let r=t.value,n=r.value,i=this.input.slice(r.start,r.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),this.addExtra(r,"expressionValue",n),r.type="DirectiveLiteral",t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(99)&&this.hasFollowingBindingAtom()}chStartsBindingIdentifier(e,t){if(oe(e)){if(Ut.lastIndex=t,Ut.test(this.input)){let e=this.codePointAtPos(Ut.lastIndex);if(!ue(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifier(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}startsUsingForOf(){let{type:e,containsEsc:t}=this.lookahead();return!(101===e&&!t)&&(K(e)&&!this.hasFollowingLineBreak()?(this.expectPlugin("explicitResourceManagement"),!0):void 0)}startsAwaitUsing(){let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let r=this.state.type,n=this.startNode(),i=!!(2&e),s=!!(4&e),a=1&e;switch(r){case 60:return this.parseBreakContinueStatement(n,!0);case 63:return this.parseBreakContinueStatement(n,!1);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoWhileStatement(n);case 91:return this.parseForStatement(n);case 68:if(46===this.lookaheadCharCode())break;return s||this.raise(this.state.strict?b.StrictFunction:this.options.annexB?b.SloppyFunctionAnnexB:b.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(n,!1,!i&&s);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,n),!0);case 69:return this.parseIfStatement(n);case 70:return this.parseReturnStatement(n);case 71:return this.parseSwitchStatement(n);case 72:return this.parseThrowStatement(n);case 73:return this.parseTryStatement(n);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?i||this.raise(b.UnexpectedLexicalDeclaration,{at:n}):this.raise(b.AwaitUsingNotInAsyncContext,{at:n}),this.next(),this.parseVarStatement(n,"await using");break;case 105:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(b.UnexpectedUsingDeclaration,{at:this.state.startLoc}):i||this.raise(b.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(n,"using");case 99:{if(this.state.containsEsc)break;let e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(t,e)&&123!==t))break}case 75:i||this.raise(b.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let e=this.state.value;return this.parseVarStatement(n,e)}case 92:return this.parseWhileStatement(n);case 76:return this.parseWithStatement(n);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(n);case 83:{let e=this.lookaheadCharCode();if(40===e||46===e)break}case 82:{let e;return!this.options.allowImportExportEverywhere&&!a&&this.raise(b.UnexpectedImportExport,{at:this.state.startLoc}),this.next(),83===r?(e=this.parseImport(n),"ImportDeclaration"===e.type&&(!e.importKind||"value"===e.importKind)&&(this.sawUnambiguousESM=!0)):(e=this.parseExport(n,t),("ExportNamedDeclaration"===e.type&&(!e.exportKind||"value"===e.exportKind)||"ExportAllDeclaration"===e.type&&(!e.exportKind||"value"===e.exportKind)||"ExportDefaultDeclaration"===e.type)&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return i||this.raise(b.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(n,!0,!i&&s)}let o=this.state.value,u=this.parseExpression();return K(r)&&"Identifier"===u.type&&this.eat(14)?this.parseLabeledStatement(n,o,u,e):this.parseExpressionStatement(n,u,t)}assertModuleNodeAllowed(e){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(b.ImportOutsideModule,{at:e})}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(e,t,r){return e&&(t.decorators&&t.decorators.length>0?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(b.DecoratorsBeforeAfterExport,{at:t.decorators[0]}),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),r&&this.resetStartLocationFromNode(r,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do{t.push(this.parseDecorator())}while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(b.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(b.UnexpectedLeadingDecorator,{at:this.state.startLoc});return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t,r=this.state.startLoc;if(this.match(10)){let r=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(r,t);let n=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(t),!1===this.getPluginOption("decorators","allowCallParenthesized")&&e.expression!==t&&this.raise(b.DecoratorArgumentsOutsideParentheses,{at:n})}else{for(t=this.parseIdentifier(!1);this.eat(16);){let e=this.startNodeAt(r);e.object=t,this.match(136)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,t=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e){if(this.eat(10)){let t=this.startNodeAtNode(e);return t.callee=e,t.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(t.arguments),this.finishNode(t,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let r;for(r=0;r<this.state.labels.length;++r){let n=this.state.labels[r];if((null==e.label||n.name===e.label.name)&&(null!=n.kind&&(t||"loop"===n.kind)||e.label&&t))break}if(r===this.state.labels.length){let r=t?"BreakStatement":"ContinueStatement";this.raise(b.IllegalBreakContinue,{at:e,type:r})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(Bt),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Bt);let t=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(t=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return null!==t&&this.unexpected(t),this.parseFor(e,null);let r=this.isContextual(99);{let n=this.isContextual(96)&&this.startsAwaitUsing(),i=n||this.isContextual(105)&&this.startsUsingForOf(),s=r&&this.hasFollowingBindingAtom()||i;if(this.match(74)||this.match(75)||s){let r,s=this.startNode();n?(r="await using",this.isAwaitAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,{at:this.state.startLoc}),this.next()):r=this.state.value,this.next(),this.parseVar(s,!0,r);let a=this.finishNode(s,"VariableDeclaration"),o=this.match(58);return o&&i&&this.raise(b.ForInUsing,{at:a}),(o||this.isContextual(101))&&1===a.declarations.length?this.parseForIn(e,a,t):(null!==t&&this.unexpected(t),this.parseFor(e,a))}}let n=this.isContextual(95),i=new tt,s=this.parseExpression(!0,i),a=this.isContextual(101);if(a&&(r&&this.raise(b.ForOfLet,{at:s}),null===t&&n&&"Identifier"===s.type&&this.raise(b.ForOfAsync,{at:s})),a||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(s,!0);let r=a?"ForOfStatement":"ForInStatement";return this.checkLVal(s,{in:{type:r}}),this.parseForIn(e,s,t)}return this.checkExpressionErrors(i,!0),null!==t&&this.unexpected(t),this.parseFor(e,s)}parseFunctionStatement(e,t,r){return this.next(),this.parseFunction(e,1|(r?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(b.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t,r=e.cases=[];this.expect(5),this.state.labels.push(jt),this.scope.enter(0);for(let e;!this.match(8);)if(this.match(61)||this.match(65)){let n=this.match(61);t&&this.finishNode(t,"SwitchCase"),r.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(e&&this.raise(b.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),e=!0,t.test=null),this.expect(14)}else t?t.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(b.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{in:{type:"CatchClause"},binding:9}),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(b.NoCatchOrFinally,{at:e}),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,r=!1){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Bt),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(b.StrictWith,{at:this.state.startLoc}),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,r,n){for(let e of this.state.labels)e.name===t&&this.raise(b.LabelRedeclaration,{at:r,labelName:t});let i=(s=this.state.type)>=90&&s<=92?"loop":this.match(71)?"switch":null;var s;for(let t=this.state.labels.length-1;t>=0;t--){let r=this.state.labels[t];if(r.statementStart!==e.start)break;r.statementStart=this.state.start,r.kind=i}return this.state.labels.push({name:t,kind:i,statementStart:this.state.start}),e.body=8&n?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,r){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,r){let n=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,8,r),t&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,n,i){let s=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(s,t?a:void 0,r,n,i)}parseBlockOrModuleBlockBody(e,t,r,n,i){let s=this.state.strict,a=!1,o=!1;for(;!this.match(n);){let n=r?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(n)){let e=this.stmtToDirective(n);t.push(e),!a&&"use strict"===e.value.value&&(a=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(n)}null==i||i.call(this,a),s||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,r){let n=this.match(58);return this.next(),n?null!==r&&this.unexpected(r):e.await=null!==r,"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||!this.options.annexB||this.state.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(b.ForInOfLoopInitializer,{at:t,type:n?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(b.InvalidLhs,{at:t,ancestor:{type:"ForStatement"}}),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")}parseVar(e,t,r,n=!1){let i=e.declarations=[];for(e.kind=r;;){let e=this.startNode();if(this.parseVarId(e,r),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null===e.init&&!n&&("Identifier"===e.id.type||t&&(this.match(58)||this.isContextual(101))?"const"===r&&!(this.match(58)||this.isContextual(101))&&this.raise(b.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"}):this.raise(b.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"})),i.push(this.finishNode(e,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){let r=this.parseBindingAtom();this.checkLVal(r,{in:{type:"VariableDeclarator"},binding:"var"===t?5:8201}),e.id=r}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let r=2&t,n=!!(1&t),i=n&&!(4&t),s=!!(8&t);this.initFunction(e,s),this.match(55)&&(r&&this.raise(b.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),e.generator=!0),n&&(e.id=this.parseFunctionId(i));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Ze(s,e.generator)),n||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,n?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),n&&!r&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=a,e}parseFunctionId(e){return e||K(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(new Ge(3)),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,t,r){this.next();let n=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,r),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,n),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)}parseClassBody(e,t){this.classScope.enter();let r={hadConstructor:!1,hadSuperClass:e},n=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(8);){if(this.eat(13)){if(n.length>0)throw this.raise(b.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){n.push(this.parseDecorator());continue}let e=this.startNode();n.length&&(e.decorators=n,this.resetStartLocationFromNode(e,n[0]),n=[]),this.parseClassMember(i,e,r),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(b.DecoratorConstructor,{at:e})}})),this.state.strict=t,this.next(),n.length)throw this.raise(b.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(e,t){let r=this.parseIdentifier(!0);if(this.isClassMethod()){let n=t;return n.kind="method",n.computed=!1,n.key=r,n.static=!1,this.pushClassMethod(e,n,!1,!1,!1,!1),!0}if(this.isClassProperty()){let n=t;return n.computed=!1,n.key=r,n.static=!1,e.body.push(this.parseClassProperty(n)),!0}return this.resetPreviousNodeTrailingComments(r),!1}parseClassMember(e,t,r){let n=this.isContextual(104);if(n){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,r,n)}parseClassMemberWithIsStatic(e,t,r,n){let i=t,s=t,a=t,o=t,u=t,l=i,c=i;if(t.static=n,this.parsePropertyNamePrefixOperator(t),this.eat(55)){l.kind="method";let t=this.match(136);return this.parseClassElementName(l),t?void this.pushClassPrivateMethod(e,s,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsGenerator,{at:i.key}),void this.pushClassMethod(e,i,!0,!1,!1,!1))}let p=K(this.state.type)&&!this.state.containsEsc,d=this.match(136),h=this.parseClassElementName(t),f=this.state.startLoc;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(l.kind="method",d)return void this.pushClassPrivateMethod(e,s,!1,!1);let n=this.isNonstaticConstructor(i),a=!1;n&&(i.kind="constructor",r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(b.DuplicateConstructor,{at:h}),n&&this.hasPlugin("typescript")&&t.override&&this.raise(b.OverrideOnConstructor,{at:h}),r.hadConstructor=!0,a=r.hadSuperClass),this.pushClassMethod(e,i,!1,!1,n,a)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a);else if(p&&"async"===h.name&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(h);let t=this.eat(55);c.optional&&this.unexpected(f),l.kind="method";let r=this.match(136);this.parseClassElementName(l),this.parsePostMemberNameModifiers(c),r?this.pushClassPrivateMethod(e,s,t,!0):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAsync,{at:i.key}),this.pushClassMethod(e,i,t,!0,!1,!1))}else if(!p||"get"!==h.name&&"set"!==h.name||this.match(55)&&this.isLineTerminator())if(p&&"accessor"===h.name&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(h);let t=this.match(136);this.parseClassElementName(a),this.pushClassAccessorProperty(e,u,t)}else this.isLineTerminator()?d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a):this.unexpected();else{this.resetPreviousNodeTrailingComments(h),l.kind=h.name;let t=this.match(136);this.parseClassElementName(i),t?this.pushClassPrivateMethod(e,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAccessor,{at:i.key}),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}}parseClassElementName(e){let{type:t,value:r}=this.state;if((130===t||131===t)&&e.static&&"prototype"===r&&this.raise(b.StaticPrototype,{at:this.state.startLoc}),136===t){"constructor"===r&&this.raise(b.ConstructorClassPrivateField,{at:this.state.startLoc});let t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e)}parseClassStaticBlock(e,t){var r;this.scope.enter(208);let n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,e.body.push(this.finishNode(t,"StaticBlock")),null!=(r=t.decorators)&&r.length&&this.raise(b.DecoratorStaticBlock,{at:t})}pushClassProperty(e,t){!t.computed&&("constructor"===t.key.name||"constructor"===t.key.value)&&this.raise(b.ConstructorClassField,{at:t.key}),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let r=this.parseClassPrivateProperty(t);e.body.push(r),this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassAccessorProperty(e,t,r){if(!r&&!t.computed){let e=t.key;("constructor"===e.name||"constructor"===e.value)&&this.raise(b.ConstructorClassField,{at:e})}let n=this.parseClassAccessorProperty(t);e.body.push(n),r&&this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassMethod(e,t,r,n,i,s){e.body.push(this.parseMethod(t,r,n,i,s,"ClassMethod",!0))}pushClassPrivateMethod(e,t,r,n){let i=this.parseMethod(t,r,n,!1,!1,"ClassPrivateMethod",!0);e.body.push(i);let s="get"===i.kind?i.static?6:2:"set"===i.kind?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,s)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(Qe()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,r,n=8331){if(K(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,n);else{if(!r&&t)throw this.raise(b.MissingClassName,{at:this.state.startLoc});e.id=null}}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let r=this.parseMaybeImportPhase(e,!0),n=this.maybeParseExportDefaultSpecifier(e,r),i=!n||this.eat(12),s=i&&this.eatExportStar(e),a=s&&this.maybeParseExportNamespaceSpecifier(e),o=i&&(!a||this.eat(12)),u=n||s;if(s&&!a){if(n&&this.unexpected(),t)throw this.raise(b.UnsupportedDecoratorExport,{at:e});return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}let l,c=this.maybeParseExportNamedSpecifiers(e);if(n&&i&&!s&&!c&&this.unexpected(null,5),a&&o&&this.unexpected(null,97),u||c){if(l=!1,t)throw this.raise(b.UnsupportedDecoratorExport,{at:e});this.parseExportFrom(e,u)}else l=this.maybeParseExportDeclaration(e);if(u||c||l){var p;let r=e;if(this.checkExport(r,!0,!1,!!r.source),"ClassDeclaration"===(null==(p=r.declaration)?void 0:p.type))this.maybeTakeDecorators(t,r.declaration,r);else if(t)throw this.raise(b.UnsupportedDecoratorExport,{at:e});return this.finishNode(r,"ExportNamedDeclaration")}if(this.eat(65)){let r=e,n=this.parseExportDefaultExpression();if(r.declaration=n,"ClassDeclaration"===n.type)this.maybeTakeDecorators(t,n,r);else if(t)throw this.raise(b.UnsupportedDecoratorExport,{at:e});return this.checkExport(r,!0,!0),this.finishNode(r,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==t?void 0:t.loc.start);let r=t||this.parseIdentifier(!0),n=this.startNodeAtNode(r);return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){e.specifiers||(e.specifiers=[]);let t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){e.specifiers||(e.specifiers=[]);let t="type"===e.exportKind;return e.specifiers.push(...this.parseExportSpecifiers(t)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(b.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(b.UnsupportedDefaultExport,{at:this.state.startLoc});let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(K(e)){if(95===e&&!this.state.containsEsc||99===e)return!1;if((128===e||127===e)&&!this.state.containsEsc){let{type:e}=this.lookahead();if(K(e)&&97!==e||5===e)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),r=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||K(this.state.type)&&r)return!0;if(this.match(65)&&r){let e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){this.eatContextual(97)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return 26===e&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(b.DecoratorBeforeExport,{at:this.state.startLoc}),!0):74===e||75===e||68===e||80===e||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,n){var i;if(t)if(r){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var s;let t=e.declaration;"Identifier"===t.type&&"from"===t.name&&t.end-t.start==4&&(null==(s=t.extra)||!s.parenthesized)&&this.raise(b.ExportDefaultFromAsIdentifier,{at:t})}}else if(null!=(i=e.specifiers)&&i.length)for(let t of e.specifiers){let{exported:e}=t,r="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,r),!n&&t.local){let{local:e}=t;"Identifier"!==e.type?this.raise(b.ExportBindingIsString,{at:t,localName:e.value,exportName:r}):(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type){let t=e.declaration.id;if(!t)throw new Error("Assertion failure");this.checkDuplicateExports(e,t.name)}else if("VariableDeclaration"===e.declaration.type)for(let t of e.declaration.declarations)this.checkDeclaration(t.id)}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(let t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(let t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(b.DuplicateDefaultExport,{at:e}):this.raise(b.DuplicateExport,{at:e,exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else if(this.expect(12),this.eat(8))break;let n=this.isContextual(128),i=this.match(131),s=this.startNode();s.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(s,i,e,n))}return t}parseExportSpecifier(e,t,r,n){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=st(e.local):e.exported||(e.exported=it(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){let e=this.parseStringLiteral(this.state.value),t=e.value.match(Rt);return t&&this.raise(b.ModuleExportNameHasLoneSurrogate,{at:e,surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return null!=e.assertions&&e.assertions.some((({key:e,value:t})=>"json"===t.value&&("Identifier"===e.type?"type"===e.name:"type"===e.value)))}checkImportReflection(e){var t;e.module&&((1!==e.specifiers.length||"ImportDefaultSpecifier"!==e.specifiers[0].type)&&this.raise(b.ImportReflectionNotBinding,{at:e.specifiers[0].loc.start}),(null==(t=e.assertions)?void 0:t.length)>0&&this.raise(b.ImportReflectionHasAssertion,{at:e.specifiers[0].loc.start}))}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&"ExportAllDeclaration"!==e.type){let{specifiers:t}=e;if(null!=t){let e=t.find((e=>{let t;if("ExportSpecifier"===e.type?t=e.local:"ImportSpecifier"===e.type&&(t=e.imported),void 0!==t)return"Identifier"===t.type?"default"!==t.name:"default"!==t.value}));void 0!==e&&this.raise(b.ImportJSONBindingNotDefault,{at:e.loc.start})}}}isPotentialImportPhase(e){return!e&&this.isContextual(125)}applyImportPhase(e,t,r,n){t||("module"===r?(this.expectPlugin("importReflection",n),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let r=this.parseIdentifier(!0),{type:n}=this.state;return(J(n)?97!==n||102===this.lookaheadCharCode():12!==n)?(this.resetPreviousIdentifierLeadingComments(r),this.applyImportPhase(e,t,r.name,r.loc.start),null):(this.applyImportPhase(e,t,null),r)}isPrecedingIdImportPhase(e){let{type:t}=this.state;return K(t)?97!==t||102===this.lookaheadCharCode():12!==t}parseImport(e){return this.match(131)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let r=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(e);return r&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual(97),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return null!=e.specifiers||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,r){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(e,t,r=8201){return this.checkLVal(e.local,{in:{type:t},binding:r}),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let r=this.startNode(),n=this.state.value;if(t.has(n)&&this.raise(b.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:n}),t.add(n),this.match(131)?r.key=this.parseStringLiteral(n):r.key=this.parseIdentifier(!0),this.expect(14),!this.match(131))throw this.raise(b.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let r=this.startNode();if(r.key=this.parseIdentifier(!0),"type"!==r.key.name&&this.raise(b.ModuleAttributeDifferentFromType,{at:r.key}),t.has(r.key.name)&&this.raise(b.ModuleAttributesWithDuplicateKeys,{at:r.key,key:r.key.name}),t.add(r.key.name),this.expect(14),!this.match(131))throw this.raise(b.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t,r=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?t=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),t=this.parseImportAttributes()),r=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(!0!==this.getPluginOption("importAttributes","deprecatedAssertSyntax")&&this.raise(b.ImportAttributesUseAssert,{at:this.state.startLoc}),this.addExtra(e,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),t=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))t=[];else{if(!this.hasPlugin("moduleAttributes"))return;t=[]}!r&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishImportSpecifier(r,"ImportDefaultSpecifier")),!0}return!!J(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(b.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let r=this.startNode(),n=this.match(131),i=this.isContextual(128);r.imported=this.parseModuleExportName();let s=this.parseImportSpecifier(r,n,"type"===e.importKind||"typeof"===e.importKind,i,void 0);e.specifiers.push(s)}}parseImportSpecifier(e,t,r,n,i){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:r}=e;if(t)throw this.raise(b.ImportBindingIsString,{at:e,importName:r.value});this.checkReservedWord(r.name,e.loc.start,!0,!0),e.local||(e.local=it(r))}return this.finishImportSpecifier(e,"ImportSpecifier",i)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}},Vt=class extends $t{constructor(e,t){e=function(e){if(null==e)return Object.assign({},Lt);if(null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let n of Object.keys(Lt)){var r;t[n]=null!=(r=e[n])?r:Lt[n]}return t}(e),super(e,t),this.options=e,this.initializeScopes(),this.plugins=function(e){let t=new Map;for(let r of e){let[e,n]=Array.isArray(r)?r:[r,{}];t.has(e)||t.set(e,n||{})}return t}(this.options.plugins),this.filename=e.sourceFilename}getScopeHandler(){return Se}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e}};var qt=function(e){let t={};for(let r of Object.keys(e))t[r]=Z(e[r]);return t}(q);function Kt(e,t){let r=Vt;return null!=e&&e.plugins&&(function(e){if(wt(e,"decorators")){if(wt(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=kt(e,"decorators","decoratorsBeforeExport");if(null!=t&&"boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let r=kt(e,"decorators","allowCallParenthesized");if(null!=r&&"boolean"!=typeof r)throw new Error("'allowCallParenthesized' must be a boolean.")}if(wt(e,"flow")&&wt(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(wt(e,"placeholders")&&wt(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(wt(e,"pipelineOperator")){let t=kt(e,"pipelineOperator","proposal");if(!It.includes(t)){let e=It.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}let r=wt(e,["recordAndTuple",{syntaxType:"hash"}]);if("hack"===t){if(wt(e,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(wt(e,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let t=kt(e,"pipelineOperator","topicToken");if(!Nt.includes(t)){let e=Nt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}if("#"===t&&r)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if("smart"===t&&r)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(wt(e,"moduleAttributes")){if(wt(e,"importAssertions")||wt(e,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if("may-2020"!==kt(e,"moduleAttributes","version"))throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(wt(e,"importAssertions")&&wt(e,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(wt(e,"recordAndTuple")&&null!=kt(e,"recordAndTuple","syntaxType")&&!Ft.includes(kt(e,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Ft.map((e=>`'${e}'`)).join(", "));if(wt(e,"asyncDoExpressions")&&!wt(e,"doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}}(e.plugins),r=function(e){let t=Ot.filter((t=>wt(e,t))),r=t.join("/"),n=Jt[r];if(!n){n=Vt;for(let e of t)n=_t[e](n);Jt[r]=n}return n}(e.plugins)),new r(e,t)}var Jt={};e.parse=function(e,t){var r;if("unambiguous"!==(null==(r=t)?void 0:r.sourceType))return Kt(t,e).parse();t=Object.assign({},t);try{t.sourceType="module";let r=Kt(t,e),n=r.parse();if(r.sawUnambiguousESM)return n;if(r.ambiguousScriptDifferentAst)try{return t.sourceType="script",Kt(t,e).parse()}catch{}else n.program.sourceType="script";return n}catch(r){try{return t.sourceType="script",Kt(t,e).parse()}catch{}throw r}},e.parseExpression=function(e,t){let r=Kt(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()},e.tokTypes=qt})),R5=M5((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(e){let t=e.match(n);return t?t[0].trimLeft():""},e.parse=function(e){return c(e).pragmas},e.parseWithComments=c,e.print=function({comments:e="",pragmas:t={}}){let r="\n",n=" *",i=Object.keys(t),s=i.map((e=>p(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n} ${e}${r}`)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){let e=t[i[0]];return`/** ${p(i[0],e)[0]} */`}}let a=e.split(r).map((e=>`${n} ${e}`)).join(r)+r;return"/**\n"+(e?a:"")+(e&&i.length?n+r:"")+s+" */"},e.strip=function(e){let t=e.match(n);return t&&t[0]?e.substring(t[0].length):e};var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,a=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,o=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,u=/(\r?\n|^) *\* ?/g,l=[];function c(e){e=e.replace(r,"").replace(t,"").replace(u,"$1");let n="";for(;n!==e;)n=e,e=e.replace(a,"\n$1 $2\n");e=e.replace(s,"").trimRight();let c,p=Object.create(null),d=e.replace(o,"").replace(s,"").trimRight();for(;c=o.exec(e);){let e=c[2].replace(i,"");"string"==typeof p[c[1]]||Array.isArray(p[c[1]])?p[c[1]]=l.concat(p[c[1]],e):p[c[1]]=e}return{comments:d,pragmas:p}}function p(e,t){return l.concat(t).map((t=>`@${e} ${t}`.trim()))}})),U5={};((e,t)=>{for(var r in t)N5(e,r,{get:t[r],enumerable:!0})})(U5,{parsers:()=>R8});var $5=B5(j5(),1);var V5=function(e){let t=[];for(let r of e)try{return r()}catch(e){t.push(e)}throw Object.assign(new Error("All combinations failed"),{errors:t})};var q5=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};var K5=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var J5=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};function W5(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var X5=W5(" \t"),H5=W5(/[^\n\r]/);var z5=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?H5(e,t):t)};var G5=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=X5(e,n),n=K5(e,n),n=z5(e,n),n=J5(e,n);return n},Y5=B5(R5(),1);function Q5(e){let{pragmas:t}=function(e){let t=q5(e);t&&(e=e.slice(t.length+1));let r=(0,Y5.extract)(e),{pragmas:n,comments:i}=(0,Y5.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}var Z5=function(e){return Array.isArray(e)&&e.length>0};function e8(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return Z5(n)?Math.min(e8(n[0]),r):r}function t8(e){return e.range?e.range[1]:e.end}var r8=function(e){return e="function"==typeof e?{parse:e}:e,{astFormat:"estree",hasPragma:Q5,locStart:e8,locEnd:t8,...e}};var n8=function(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)};var i8=function(e){let{message:t,loc:r}=e;return n8(t.replace(/ \(.*\)$/,""),{loc:{start:{line:r?r.line:0,column:r?r.column+1:0}},cause:e})},s8=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)};var a8=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)}(["Block","CommentBlock","MultiLine"]);var o8=function(e){return a8(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};var u8=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))},l8=null;function c8(e){if(null!==l8&&(l8.property,1)){let e=l8;return l8=c8.prototype=null,e}return l8=c8.prototype=e??Object.create(null),new c8}for(let e=0;e<=10;e++)c8();var p8=function(e,t="type"){return function(e){c8(e)}(e),function(r){let n=r[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}}({ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[]});var d8=function e(t,r){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t)){for(let n=0;n<t.length;n++)t[n]=e(t[n],r);return t}let n=p8(t);for(let i=0;i<n.length;i++)t[n[i]]=e(t[n[i]],r);return r(t)||t};function h8(e){return"LogicalExpression"===e.type&&"LogicalExpression"===e.right.type&&e.operator===e.right.operator}function f8(e){return h8(e)?f8({type:"LogicalExpression",operator:e.operator,left:f8({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[e8(e.left),t8(e.right.left)]}),right:e.right.right,range:[e8(e),t8(e)]}):e}var m8=function(e,t){let{parser:r,text:n}=t;if("File"===e.type&&e.program.interpreter){let{program:{interpreter:t},comments:r}=e;delete e.program.interpreter,r.unshift(t)}if("babel"===r){let t=new Set;e=d8(e,(e=>{var r;null!=(r=e.leadingComments)&&r.some(o8)&&t.add(e8(e))})),e=d8(e,(e=>{if("ParenthesizedExpression"===e.type){let{expression:r}=e;if("TypeCastExpression"===r.type)return r.range=e.range,r;let n=e8(e);if(!t.has(n))return r.extra={...r.extra,parenthesized:!0},r}}))}if(e=d8(e,(t=>{switch(t.type){case"LogicalExpression":if(h8(t))return f8(t);break;case"VariableDeclaration":{let e=s8(!1,t.declarations,-1);null!=e&&e.init&&function(e,t){";"!==n[t8(t)]&&(e.range=[e8(e),t8(t)])}(t,e);break}case"TSParenthesizedType":return t.typeAnnotation;case"TSTypeParameter":if("string"==typeof t.name){let e=e8(t);t.name={type:"Identifier",name:t.name,range:[e,e+t.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:e}=t;if("meriyah"===r&&"Identifier"===(null==e?void 0:e.type)){let r=n.slice(e8(e),t8(e));(r.startsWith('"')||r.startsWith("'"))&&(t.exported={...t.exported,type:"Literal",value:t.exported.name,raw:r})}break}case"TSUnionType":case"TSIntersectionType":if(1===t.types.length)return t.types[0]}})),Z5(e.comments)){let t=s8(!1,e.comments,-1);for(let r=e.comments.length-2;r>=0;r--){let n=e.comments[r];t8(n)===e8(t)&&a8(n)&&a8(t)&&u8(n)&&u8(t)&&(e.comments.splice(r+1,1),n.value+="*//*"+t.value,n.range=[e8(n),t8(t)]),t=n}}return"Program"===e.type&&(e.range=[0,n.length]),e};var y8=function(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}};var g8=function(e,t){let{type:r="JsExpressionRoot",rootMarker:n,text:i}=t,{tokens:s,comments:a}=e;return delete e.tokens,delete e.comments,{tokens:s,comments:a,type:r,node:e,range:[0,i.length],rootMarker:n}},x8=e=>r8(function({isExpression:e=!1,optionsCombinations:t}){return(r,n={})=>{if(("babel"===n.parser||"__babel_estree"===n.parser)&&function(e,t){var r;if(null!=(r=t.filepath)&&r.endsWith(".js.flow"))return!0;let n=q5(e);n&&(e=e.slice(n.length));let i=G5(e,0);return!1!==i&&(e=e.slice(0,i)),P8.test(e)}(r,n))return n.parser="babel-flow",N8.parse(r,n);let i=t;"script"===(n.__babelSourceType??y8(n))&&(i=i.map((e=>({...e,sourceType:"script"})))),/#[[{]/.test(r)&&(i=i.map((e=>v8([S8],e))));let s=/%[A-Z]/.test(r);r.includes("|>")?i=(s?[...E8,T8]:E8).flatMap((e=>i.map((t=>v8([e],t))))):s&&(i=i.map((e=>v8([T8],e))));let a,o=e?$5.parseExpression:$5.parse;try{a=V5(i.map((e=>()=>function(e,t,r){let n=e(t,r),i=n.errors.find((e=>!A8.has(e.reasonCode)));if(i)throw i;return n}(o,r,e))))}catch({errors:[e]}){throw i8(e)}return e&&(a=g8(a,{text:r,rootMarker:n.rootMarker})),m8(a,{parser:"babel",text:r})}}(e)),b8={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}]],tokens:!0,ranges:!0},S8=["recordAndTuple",{syntaxType:"hash"}],T8="v8intrinsic",E8=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],v8=(e,t=b8)=>({...t,plugins:[...t.plugins,...e]}),P8=/@(?:no)?flow\b/;var A8=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","MixedLabeledAndUnlabeledElements","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),D8=[v8(["jsx"])],C8=x8({optionsCombinations:D8}),w8=x8({optionsCombinations:[v8(["jsx","typescript"]),v8(["typescript"])]}),k8=x8({isExpression:!0,optionsCombinations:[v8(["jsx"])]}),I8=x8({isExpression:!0,optionsCombinations:[v8(["typescript"])]}),N8=x8({optionsCombinations:[v8(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),F8=x8({optionsCombinations:D8.map((e=>v8(["estree"],e)))}),_8={babel:C8,"babel-flow":N8,"babel-ts":w8,__js_expression:k8,__ts_expression:I8,__vue_expression:k8,__vue_ts_expression:I8,__vue_event_binding:C8,__vue_ts_event_binding:w8,__babel_estree:F8},O8=B5(j5(),1);function L8(e={}){let{allowComments:t=!0}=e;return function(e){let r;try{r=(0,O8.parseExpression)(e,{tokens:!0,ranges:!0})}catch(e){throw"MissingPlugin"===(null==e?void 0:e.reasonCode)||"MissingOneOfPlugins"===(null==e?void 0:e.reasonCode)?i8({message:"Unexpected token",loc:e.loc}):i8(e)}if(!t&&Z5(r.comments))throw M8(r.comments[0],"Comment");return B8(r),g8(r,{type:"JsonRoot",text:e})}}function M8(e,t){let[r,n]=[e.loc.start,e.loc.end].map((({line:e,column:t})=>({line:e,column:t+1})));return n8(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function B8(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)null!==t&&B8(t);return;case"ObjectExpression":for(let t of e.properties)B8(t);return;case"ObjectProperty":if(e.computed)throw M8(e.key,"Computed key");if(e.shorthand)throw M8(e.key,"Shorthand property");return"Identifier"!==e.key.type&&B8(e.key),void B8(e.value);case"UnaryExpression":{let{operator:t,argument:r}=e;if("+"!==t&&"-"!==t)throw M8(e,`Operator '${e.operator}'`);if("NumericLiteral"===r.type||"Identifier"===r.type&&("Infinity"===r.name||"NaN"===r.name))return;throw M8(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if("Infinity"!==e.name&&"NaN"!==e.name&&"undefined"!==e.name)throw M8(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(Z5(e.expressions))throw M8(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)B8(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw M8(e,`'${e.type}'`)}}var j8=L8(),R8={..._8,...{json:r8({parse:j8,hasPragma:()=>!0}),json5:r8(j8),"json-stringify":r8({parse:L8({allowComments:!1}),astFormat:"estree-json"})}},U8=U5,$8=Object.freeze({__proto__:null,default:U8,parsers:R8}),V8=Object.create,q8=Object.defineProperty,K8=Object.getOwnPropertyDescriptor,J8=Object.getOwnPropertyNames,W8=Object.getPrototypeOf,X8=Object.prototype.hasOwnProperty,H8=(e,t)=>{for(var r in t)q8(e,r,{get:t[r],enumerable:!0})},z8=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},G8=(e,t,r)=>(z8(e,t,"read from private field"),r?r.call(e):t.get(e)),Y8=((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(e){let t=e.match(n);return t?t[0].trimLeft():""},e.parse=function(e){return c(e).pragmas},e.parseWithComments=c,e.print=function({comments:e="",pragmas:t={}}){let r="\n",n=" *",i=Object.keys(t),s=i.map((e=>p(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n} ${e}${r}`)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){let e=t[i[0]];return`/** ${p(i[0],e)[0]} */`}}let a=e.split(r).map((e=>`${n} ${e}`)).join(r)+r;return"/**\n"+(e?a:"")+(e&&i.length?n+r:"")+s+" */"},e.strip=function(e){let t=e.match(n);return t&&t[0]?e.substring(t[0].length):e};var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,a=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,o=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,u=/(\r?\n|^) *\* ?/g,l=[];function c(e){e=e.replace(r,"").replace(t,"").replace(u,"$1");let n="";for(;n!==e;)n=e,e=e.replace(a,"\n$1 $2\n");e=e.replace(s,"").trimRight();let c,p=Object.create(null),d=e.replace(o,"").replace(s,"").trimRight();for(;c=o.exec(e);){let e=c[2].replace(i,"");"string"==typeof p[c[1]]||Array.isArray(p[c[1]])?p[c[1]]=l.concat(p[c[1]],e):p[c[1]]=e}return{comments:d,pragmas:p}}function p(e,t){return l.concat(t).map((t=>`@${e} ${t}`.trim()))}})),Q8={};H8(Q8,{languages:()=>Wie,options:()=>Kie,printers:()=>Jie});var Z8={};H8(Z8,{canAttachComment:()=>rte,embed:()=>Eie,experimentalFeatures:()=>Iie,getCommentChildNodes:()=>nte,getVisitorKeys:()=>D9,handleComments:()=>aee,insertPragma:()=>kie,isBlockComment:()=>w9,isGap:()=>ste,massageAstNode:()=>Die,print:()=>sie,printComment:()=>ete,willPrintOwnComments:()=>ite});var e6=function(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:a}=t,{node:o}=e,u=i(o),l=s(o);for(let e of n)i(e)>=u&&s(e)<=l&&a.add(e);return r.slice(u,l)},t6="string",r6="array",n6="cursor",i6="indent",s6="align",a6="trim",o6="group",u6="fill",l6="if-break",c6="indent-if-break",p6="line-suffix",d6="line-suffix-boundary",h6="line",f6="label",m6="break-parent",y6=new Set([n6,i6,s6,a6,o6,u6,l6,c6,p6,d6,h6,f6,m6]);var g6=function(e){if("string"==typeof e)return t6;if(Array.isArray(e))return r6;if(!e)return;let{type:t}=e;return y6.has(t)?t:void 0};function x6(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(g6(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if("[object Object]"!==r)return`Unexpected doc '${r}'.`;let n=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...y6].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var b6=class extends Error{name="InvalidDocError";constructor(e){super(x6(e)),this.doc=e}},S6={};var T6=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===S6){r(i.pop());continue}r&&i.push(e,S6);let s=g6(e);if(!s)throw new b6(e);if(!1!==(null==t?void 0:t(e)))switch(s){case r6:case u6:{let t=s===r6?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case l6:i.push(e.flatContents,e.breakContents);break;case o6:if(n&&e.expandedStates)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);break;case s6:case i6:case c6:case f6:case p6:i.push(e.contents);break;case t6:case n6:case a6:case d6:case h6:case m6:break;default:throw new b6(e)}}},E6=()=>{};function v6(e){return{type:i6,contents:e}}function P6(e,t){return{type:s6,contents:t,n:e}}function A6(e,t={}){return E6(t.expandedStates),{type:o6,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function D6(e){return P6(Number.NEGATIVE_INFINITY,e)}function C6(e,t){return A6(e[0],{...t,expandedStates:e})}function w6(e){return{type:u6,parts:e}}function k6(e,t="",r={}){return{type:l6,breakContents:e,flatContents:t,groupId:r.groupId}}function I6(e,t){return{type:c6,contents:e,groupId:t.groupId,negate:t.negate}}function N6(e){return{type:p6,contents:e}}var F6={type:d6},_6={type:m6},O6={type:h6,hard:!0},L6={type:h6},M6={type:h6,soft:!0},B6=[O6,_6],j6=[{type:h6,hard:!0,literal:!0},_6],R6={type:n6};function U6(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function $6(e,t){return e?{type:f6,label:e,contents:t}:t}var V6=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)},q6=e=>{if(Array.isArray(e))return e;if(e.type!==u6)throw new Error(`Expect doc to be 'array' or '${u6}'.`);return e.parts};function K6(e,t){if("string"==typeof e)return t(e);let r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);let i=function(e){switch(g6(e)){case r6:return t(e.map(n));case u6:return t({...e,parts:e.parts.map(n)});case l6:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case o6:{let{expandedStates:r,contents:i}=e;return r?(r=r.map(n),i=r[0]):i=n(i),t({...e,contents:i,expandedStates:r})}case s6:case i6:case c6:case f6:case p6:return t({...e,contents:n(e.contents)});case t6:case n6:case a6:case d6:case h6:case m6:return t(e);default:throw new b6(e)}}(e);return r.set(e,i),i}}function J6(e,t,r){let n=r,i=!1;return T6(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function W6(e){if(e.type===o6&&e.break||e.type===h6&&e.hard||e.type===m6)return!0}function X6(e){return J6(e,W6,!1)}function H6(e){if(e.length>0){let t=V6(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function z6(e){return e.type!==h6||e.hard?e.type===l6?e.flatContents:e:e.soft?"":" "}function G6(e){return K6(e,z6)}function Y6(e){return K6(e,(e=>function(e){switch(g6(e)){case u6:if(e.parts.every((e=>""===e)))return"";break;case o6:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===o6&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case s6:case i6:case c6:case p6:if(!e.contents)return"";break;case l6:if(!e.flatContents&&!e.breakContents)return"";break;case r6:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof V6(!1,t,-1)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:t}case t6:case n6:case a6:case d6:case h6:case f6:case m6:break;default:throw new b6(e)}return e}(e)))}function Q6(e,t=j6){return K6(e,(e=>"string"==typeof e?U6(t,e.split("\n")):e))}function Z6(e){if(e.type===h6)return!0}function e9(e,t){return e.type===f6?{...e,contents:t(e.contents)}:t(e)}var t9=function(e){return Array.isArray(e)&&e.length>0},r9=/^[\$A-Z_a-z\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\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\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,n9=e=>r9.test(e);var i9=function(e){return null!==e&&"object"==typeof e};function*s9(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>i9(e)&&n(e);for(let t of r(e)){let r=e[t];if(Array.isArray(r))for(let e of r)i(e)&&(yield e);else i(r)&&(yield r)}}function a9(e,{getVisitorKeys:t,predicate:r}){for(let n of function*(e,t){let r=[e];for(let e=0;e<r.length;e++){let n=r[e];for(let e of s9(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}function o9(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var u9=o9(" \t"),l9=o9(",; \t"),c9=o9(/[^\n\r]/);var p9=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};var d9=function(e,t,r={}){let n=u9(e,r.backwards?t-1:t,r);return n!==p9(e,n,r)};var h9=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var f9=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?c9(e,t):t)};var m9=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=l9(e,n),n=h9(e,n),n=u9(e,n);return n=f9(e,n),n=p9(e,n),!1!==n&&d9(e,n)},y9={eastAsianWidth(e){var t=e.charCodeAt(0),r=2==e.length?e.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=r&&r<=57343&&(n=(t&=1023)<<10|(r&=1023),n+=65536),12288==n||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":"N"}},g9=/[^\x20-\x7F]/;var x9=function(e){if(!e)return 0;if(!g9.test(e))return e.length;e=e.replace(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g," ");let t=0;for(let r of e){let e=r.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=768&&e<=879)continue;let n=y9.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t};function b9(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return t9(n)?Math.min(b9(n[0]),r):r}function S9(e){return e.range?e.range[1]:e.end}function T9(e,t){let r=b9(e);return Number.isInteger(r)&&r===b9(t)}function E9(e,t){return T9(e,t)&&function(e,t){let r=S9(e);return Number.isInteger(r)&&r===S9(t)}(e,t)}var v9=null;function P9(e){if(null!==v9&&(v9.property,1)){let e=v9;return v9=P9.prototype=null,e}return v9=P9.prototype=e??Object.create(null),new P9}for(let e=0;e<=10;e++)P9();var A9=function(e,t="type"){return function(e){P9(e)}(e),function(r){let n=r[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}},D9=A9({ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[]});var C9=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)},w9=C9(["Block","CommentBlock","MultiLine"]);var k9=function(e,t){return t.some((t=>function(e,t){let r=t.split(".");for(let t=r.length-1;t>=0;t--){let n=r[t];if(0===t)return"Identifier"===e.type&&e.name===n;if("MemberExpression"!==e.type||e.optional||e.computed||"Identifier"!==e.property.type||e.property.name!==n)return!1;e=e.object}}(e,t)))},I9=C9(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]);var N9=function({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")};function F9(e,t){return t(e)||a9(e,{getVisitorKeys:D9,predicate:t})}function _9(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||n7(e)||i7(e)||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||$7(e)||"TSNonNullExpression"===e.type||"ChainExpression"===e.type}function O9(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function L9(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var M9=C9(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),B9=C9(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),j9=C9(["ArrayExpression","TupleExpression"]),R9=C9(["ObjectExpression","RecordExpression"]);function U9(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function $9(e){return"UnaryExpression"===e.type&&("+"===e.operator||"-"===e.operator)&&U9(e.argument)}function V9(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function q9(e){return"RegExpLiteral"===e.type||"Literal"===e.type&&!!e.regex}var K9=C9(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),J9=C9(["FunctionExpression","ArrowFunctionExpression"]);function W9(e){return n7(e)&&"Identifier"===e.callee.type&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var X9=C9(["JSXElement","JSXFragment"]);function H9(e){return"get"===e.kind||"set"===e.kind}function z9(e){return H9(e)||T9(e,e.value)}function G9(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||z9(e))}var Y9=C9(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Q9(e){return i7(e)||"BindExpression"===e.type&&!!e.object}var Z9=C9(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function e7(e){return N9(e)||I9(e)||Z9(e)||("GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)&&!e.typeParameters}var t7=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function r7(e,t){if("CallExpression"!==e.type)return!1;if(1===e.arguments.length){if(W9(e)&&t&&r7(t))return J9(e.arguments[0]);if(function(e){return"Identifier"===e.callee.type&&1===e.arguments.length&&/^(?:before|after)(?:Each|All)$/.test(e.callee.name)}(e))return W9(e.arguments[0])}else if((2===e.arguments.length||3===e.arguments.length)&&("TemplateLiteral"===e.arguments[0].type||V9(e.arguments[0]))&&function(e){return k9(e,t7)}(e.callee))return!(e.arguments[2]&&!U9(e.arguments[2]))&&((2===e.arguments.length?J9(e.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(e.arguments[1])&&D7(e.arguments[1]).length<=1)||W9(e.arguments[1]));return!1}var n7=C9(["CallExpression","OptionalCallExpression"]),i7=C9(["MemberExpression","OptionalMemberExpression"]);function s7(e,t){return X9(t)?F7(t):L7(t,_7.Leading,(t=>d9(e,S9(t))))}function a7(e,t){return"json"!==t.parser&&V9(e.key)&&f7(e.key).slice(1,-1)===e.key.value&&(n9(e.key.value)&&!("babel-ts"===t.parser&&"ClassProperty"===e.type||"typescript"===t.parser&&"PropertyDefinition"===e.type)||o7(e.key.value)&&String(Number(e.key.value))===e.key.value&&("babel"===t.parser||"acorn"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser))}function o7(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function u7(e){return e.quasis.some((e=>e.value.raw.includes("\n")))}function l7(e,t){return("TemplateLiteral"===e.type&&u7(e)||"TaggedTemplateExpression"===e.type&&u7(e.quasi))&&!d9(t,b9(e),{backwards:!0})}function c7(e){if(!L7(e))return!1;let t=V6(!1,M7(e,_7.Dangling),-1);return t&&!w9(t)}function p7(e){let{node:t,parent:r,key:n}=e;return"callee"===n&&n7(t)&&n7(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var d7=new Set(["!","-","+","~"]);function h7(e,t=2){if(t<=0)return!1;let r=e=>h7(e,t-1);if(q9(e))return x9(e.pattern??e.regex.pattern)<=5;if("Literal"===e.type||"BigIntLiteral"===e.type||"DecimalLiteral"===e.type||"BooleanLiteral"===e.type||"NullLiteral"===e.type||"NumericLiteral"===e.type||"StringLiteral"===e.type||"Identifier"===e.type||"ThisExpression"===e.type||"Super"===e.type||"PrivateName"===e.type||"PrivateIdentifier"===e.type||"ArgumentPlaceholder"===e.type||"Import"===e.type)return!0;if("TemplateLiteral"===e.type)return e.quasis.every((e=>!e.value.raw.includes("\n")))&&e.expressions.every(r);if(R9(e))return e.properties.every((e=>!e.computed&&(e.shorthand||e.value&&r(e.value))));if(j9(e))return e.elements.every((e=>null===e||r(e)));if(j7(e)){if("ImportExpression"===e.type||h7(e.callee,t)){let n=w7(e);return n.length<=t&&n.every(r)}return!1}return i7(e)?h7(e.object,t)&&h7(e.property,t):"UnaryExpression"===e.type&&d7.has(e.operator)||"UpdateExpression"===e.type?h7(e.argument,t):"TSNonNullExpression"===e.type&&h7(e.expression,t)}function f7(e){var t;return(null==(t=e.extra)?void 0:t.raw)??e.raw}function m7(e){return e}function y7(e,t="es5"){return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)}function g7(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return g7(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return g7(e.object,t);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&g7(e.tag,t);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==e.callee.type&&g7(e.callee,t);case"ConditionalExpression":return g7(e.test,t);case"UpdateExpression":return!e.prefix&&g7(e.argument,t);case"BindExpression":return e.object&&g7(e.object,t);case"SequenceExpression":return g7(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":return g7(e.expression,t);default:return t(e)}}var x7={"==":!0,"!=":!0,"===":!0,"!==":!0},b7={"*":!0,"/":!0,"%":!0},S7={">>":!0,">>>":!0,"<<":!0};function T7(e,t){return!(v7(t)!==v7(e)||"**"===e||x7[e]&&x7[t]||"%"===t&&b7[e]||"%"===e&&b7[t]||t!==e&&b7[t]&&b7[e]||S7[e]&&S7[t])}var E7=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap(((e,t)=>e.map((e=>[e,t])))));function v7(e){return E7.get(e)}function P7(e){var t;if(e.rest)return!0;let r=D7(e);return"RestElement"===(null==(t=V6(!1,r,-1))?void 0:t.type)}var A7=new WeakMap;function D7(e){if(A7.has(e))return A7.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),A7.set(e,t),t}var C7=new WeakMap;function w7(e){if(C7.has(e))return C7.get(e);let t=e.arguments;return"ImportExpression"===e.type&&(t=[e.source],e.attributes&&t.push(e.attributes)),C7.set(e,t),t}function k7(e,t){let{node:r}=e;"ImportExpression"===r.type?(e.call((e=>t(e,0)),"source"),r.attributes&&e.call((e=>t(e,1)),"attributes")):e.each(t,"arguments")}function I7(e,t){if("ImportExpression"===e.type){if(0===t||t===(e.attributes?-2:-1))return"source";if(e.attributes&&(1===t||-1===t))return"attributes";throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return["arguments",t]}function N7(e){return"prettier-ignore"===e.value.trim()&&!e.unignore}function F7(e){return(null==e?void 0:e.prettierIgnore)||L7(e,_7.PrettierIgnore)}var _7={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},O7=(e,t)=>{if("function"==typeof e&&(t=e,e=0),e||t)return(r,n,i)=>!(e&_7.Leading&&!r.leading||e&_7.Trailing&&!r.trailing||e&_7.Dangling&&(r.leading||r.trailing)||e&_7.Block&&!w9(r)||e&_7.Line&&!M9(r)||e&_7.First&&0!==n||e&_7.Last&&n!==i.length-1||e&_7.PrettierIgnore&&!N7(r)||t&&!t(r))};function L7(e,t,r){if(!t9(null==e?void 0:e.comments))return!1;let n=O7(t,r);return!n||e.comments.some(n)}function M7(e,t,r){if(!Array.isArray(null==e?void 0:e.comments))return[];let n=O7(t,r);return n?e.comments.filter(n):e.comments}var B7=(e,{originalText:t})=>m9(t,S9(e));function j7(e){return n7(e)||"NewExpression"===e.type||"ImportExpression"===e.type}function R7(e){return e&&("ObjectProperty"===e.type||"Property"===e.type&&!e.method&&"init"===e.kind)}var U7=Symbol("ifWithoutBlockAndSameLineComment"),$7=C9(["TSAsExpression","TSSatisfiesExpression"]);function V7(e,t){var r,n,i,s,a,o,u;if(e.isRoot)return!1;let{node:l,key:c,parent:p}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&function(e){return R9(e)}(l)&&K7(e))return!0;if(q7(l))return!1;if("Identifier"===l.type){if(null!=(r=l.extra)&&r.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(l.name)||"left"===c&&("async"===l.name&&!p.await||"let"===l.name)&&"ForOfStatement"===p.type)return!0;if("let"===l.name){let t=null==(n=e.findAncestor((e=>"ForOfStatement"===e.type)))?void 0:n.left;if(t&&g7(t,(e=>e===l)))return!0}if("object"===c&&"let"===l.name&&"MemberExpression"===p.type&&p.computed&&!p.optional){let t=e.findAncestor((e=>"ExpressionStatement"===e.type||"ForStatement"===e.type||"ForInStatement"===e.type)),r=t?"ExpressionStatement"===t.type?t.expression:"ForStatement"===t.type?t.init:t.left:void 0;if(r&&g7(r,(e=>e===l)))return!0}return!1}if("ObjectExpression"===l.type||"FunctionExpression"===l.type||"ClassExpression"===l.type||"DoExpression"===l.type){let t=null==(i=e.findAncestor((e=>"ExpressionStatement"===e.type)))?void 0:i.expression;if(t&&g7(t,(e=>e===l)))return!0}if("ObjectExpression"===l.type){let t=null==(s=e.findAncestor((e=>"ArrowFunctionExpression"===e.type)))?void 0:s.body;if(t&&"SequenceExpression"!==t.type&&"AssignmentExpression"!==t.type&&g7(t,(e=>e===l)))return!0}switch(p.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if("superClass"===c&&("ArrowFunctionExpression"===l.type||"AssignmentExpression"===l.type||"AwaitExpression"===l.type||"BinaryExpression"===l.type||"ConditionalExpression"===l.type||"LogicalExpression"===l.type||"NewExpression"===l.type||"ObjectExpression"===l.type||"SequenceExpression"===l.type||"TaggedTemplateExpression"===l.type||"UnaryExpression"===l.type||"UpdateExpression"===l.type||"YieldExpression"===l.type||"TSNonNullExpression"===l.type||"ClassExpression"===l.type&&t9(l.decorators)))return!0;break;case"ExportDefaultDeclaration":return J7(e,t)||"SequenceExpression"===l.type;case"Decorator":if("expression"===c){if(i7(l)&&l.computed)return!0;let e=!1,r=!1,n=l;for(;n;)switch(n.type){case"MemberExpression":r=!0,n=n.object;break;case"CallExpression":if(r||e)return"typescript"!==t.parser;e=!0,n=n.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return"typescript"!==t.parser;default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type))&&function(e){return F9(e,(e=>"ObjectTypeAnnotation"===e.type&&F9(e,(e=>"FunctionTypeAnnotation"===e.type))))}(l))return!0}switch(l.type){case"UpdateExpression":if("UnaryExpression"===p.type)return l.prefix&&("++"===l.operator&&"+"===p.operator||"--"===l.operator&&"-"===p.operator);case"UnaryExpression":switch(p.type){case"UnaryExpression":return l.operator===p.operator&&("+"===l.operator||"-"===l.operator);case"BindExpression":case"TaggedTemplateExpression":case"TSNonNullExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"BinaryExpression":return"left"===c&&"**"===p.operator;default:return!1}case"BinaryExpression":if("UpdateExpression"===p.type||"in"===l.operator&&function(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if("ForStatement"===(null==n?void 0:n.type)&&n.init===r)return!0;r=n}return!1}(e))return!0;if("|>"===l.operator&&null!=(a=l.extra)&&a.parenthesized){let t=e.grandparent;if("BinaryExpression"===t.type&&"|>"===t.operator)return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"LogicalExpression":switch(p.type){case"TSAsExpression":case"TSSatisfiesExpression":return!$7(l);case"ConditionalExpression":return $7(l);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return"callee"===c;case"ClassExpression":case"ClassDeclaration":return"superClass"===c;case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"AssignmentExpression":case"AssignmentPattern":return"left"===c&&("TSTypeAssertion"===l.type||$7(l));case"LogicalExpression":if("LogicalExpression"===l.type)return p.operator!==l.operator;case"BinaryExpression":{let{operator:e,type:t}=l;if(!e&&"TSTypeAssertion"!==t)return!0;let r=v7(e),n=p.operator,i=v7(n);return i>r||"right"===c&&i===r||i===r&&!T7(n,e)||(i<r&&"%"===e?"+"===n||"-"===n:!!function(e){return!!S7[e]||"|"===e||"^"===e||"&"===e}(n))}default:return!1}case"SequenceExpression":switch(p.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==c;case"ArrowFunctionExpression":return"body"!==c;default:return!0}case"YieldExpression":if("AwaitExpression"===p.type)return!0;case"AwaitExpression":switch(p.type){case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"SpreadElement":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"ConditionalExpression":return"test"===c;case"BinaryExpression":return!(!l.argument&&"|>"===p.operator);default:return!1}case"TSFunctionType":if(e.match((e=>"TSFunctionType"===e.type),((e,t)=>"typeAnnotation"===t&&"TSTypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type)))return!0;case"TSConditionalType":case"TSConstructorType":if("extendsType"===c&&"TSConditionalType"===p.type){if("TSConditionalType"===l.type)return!0;let{typeAnnotation:e}=l.returnType||l.typeAnnotation;if("TSTypePredicate"===e.type&&e.typeAnnotation&&(e=e.typeAnnotation.typeAnnotation),"TSInferType"===e.type&&e.typeParameter.constraint)return!0}if("checkType"===c&&"TSConditionalType"===p.type)return!0;case"TSUnionType":case"TSIntersectionType":if(("TSUnionType"===p.type||"TSIntersectionType"===p.type)&&p.types.length>1&&(!l.types||l.types.length>1))return!0;case"TSInferType":if("TSInferType"===l.type&&"TSRestType"===p.type)return!1;case"TSTypeOperator":return"TSArrayType"===p.type||"TSOptionalType"===p.type||"TSRestType"===p.type||"objectType"===c&&"TSIndexedAccessType"===p.type||"TSTypeOperator"===p.type||"TSTypeAnnotation"===p.type&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return"objectType"===c&&"TSIndexedAccessType"===p.type||"elementType"===c&&"TSArrayType"===p.type;case"TypeofTypeAnnotation":return"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type)||"elementType"===c&&"ArrayTypeAnnotation"===p.type;case"ArrayTypeAnnotation":return"NullableTypeAnnotation"===p.type;case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"ArrayTypeAnnotation"===p.type||"NullableTypeAnnotation"===p.type||"IntersectionTypeAnnotation"===p.type||"UnionTypeAnnotation"===p.type||"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type);case"InferTypeAnnotation":case"NullableTypeAnnotation":return"ArrayTypeAnnotation"===p.type||"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type);case"FunctionTypeAnnotation":{if(e.match(void 0,((e,t)=>"typeAnnotation"===t&&"TypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type))||e.match(void 0,((e,t)=>"typeAnnotation"===t&&"TypePredicate"===e.type),((e,t)=>"typeAnnotation"===t&&"TypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type)))return!0;let t="NullableTypeAnnotation"===p.type?e.grandparent:p;return"UnionTypeAnnotation"===t.type||"IntersectionTypeAnnotation"===t.type||"ArrayTypeAnnotation"===t.type||"objectType"===c&&("IndexedAccessType"===t.type||"OptionalIndexedAccessType"===t.type)||"checkType"===c&&"ConditionalTypeAnnotation"===p.type||"extendsType"===c&&"ConditionalTypeAnnotation"===p.type&&"InferTypeAnnotation"===l.returnType.type&&l.returnType.typeParameter.bound||"NullableTypeAnnotation"===t.type||"FunctionTypeParam"===p.type&&null===p.name&&D7(l).some((e=>{var t;return"NullableTypeAnnotation"===(null==(t=e.typeAnnotation)?void 0:t.type)}))}case"ConditionalTypeAnnotation":if("extendsType"===c&&"ConditionalTypeAnnotation"===p.type&&"ConditionalTypeAnnotation"===l.type||"checkType"===c&&"ConditionalTypeAnnotation"===p.type)return!0;case"OptionalIndexedAccessType":return"objectType"===c&&"IndexedAccessType"===p.type;case"StringLiteral":case"NumericLiteral":case"Literal":if("string"==typeof l.value&&"ExpressionStatement"===p.type&&!p.directive){let t=e.grandparent;return"Program"===t.type||"BlockStatement"===t.type}return"object"===c&&"MemberExpression"===p.type&&"number"==typeof l.value;case"AssignmentExpression":{let t=e.grandparent;return"body"===c&&"ArrowFunctionExpression"===p.type||("key"!==c||"ClassProperty"!==p.type&&"PropertyDefinition"!==p.type||!p.computed)&&("init"!==c&&"update"!==c||"ForStatement"!==p.type)&&("ExpressionStatement"===p.type?"ObjectPattern"===l.left.type:!("key"===c&&"TSPropertySignature"===p.type||"AssignmentExpression"===p.type||"SequenceExpression"===p.type&&"ForStatement"===t.type&&(t.init===p||t.update===p)||"value"===c&&"Property"===p.type&&"ObjectPattern"===t.type&&t.properties.includes(p)||"NGChainedExpression"===p.type))}case"ConditionalExpression":switch(p.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"ConditionalExpression":return"test"===c;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;default:return!1}case"FunctionExpression":switch(p.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(p.type){case"BinaryExpression":return"|>"!==p.operator||(null==(o=l.extra)?void 0:o.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return"test"===c;default:return!1}case"ClassExpression":return"NewExpression"===p.type&&"callee"===c;case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(function(e){let{node:t,parent:r,grandparent:n,key:i}=e;return!!(("OptionalMemberExpression"===t.type||"OptionalCallExpression"===t.type)&&("object"===i&&"MemberExpression"===r.type||"callee"===i&&("CallExpression"===r.type||"NewExpression"===r.type)||"TSNonNullExpression"===r.type&&"MemberExpression"===n.type&&n.object===r)||e.match((()=>"CallExpression"===t.type||"MemberExpression"===t.type),((e,t)=>"expression"===t&&"ChainExpression"===e.type))&&(e.match(void 0,void 0,((e,t)=>"callee"===t&&("CallExpression"===e.type&&!e.optional||"NewExpression"===e.type)||"object"===t&&"MemberExpression"===e.type&&!e.optional))||e.match(void 0,void 0,((e,t)=>"expression"===t&&"TSNonNullExpression"===e.type),((e,t)=>"object"===t&&"MemberExpression"===e.type)))||e.match((()=>"CallExpression"===t.type||"MemberExpression"===t.type),((e,t)=>"expression"===t&&"TSNonNullExpression"===e.type),((e,t)=>"expression"===t&&"ChainExpression"===e.type),((e,t)=>"object"===t&&"MemberExpression"===e.type)))}(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if("callee"===c&&("BindExpression"===p.type||"NewExpression"===p.type)){let e=l;for(;e;)switch(e.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":e=e.object;break;case"TaggedTemplateExpression":e=e.tag;break;case"TSNonNullExpression":e=e.expression;break;default:return!1}}return!1;case"BindExpression":return"callee"===c&&("BindExpression"===p.type||"NewExpression"===p.type)||"object"===c&&i7(p);case"NGPipeExpression":return!("NGRoot"===p.type||"NGMicrosyntaxExpression"===p.type||"ObjectProperty"===p.type&&(null==(u=l.extra)||!u.parenthesized)||j9(p)||"arguments"===c&&n7(p)||"right"===c&&"NGPipeExpression"===p.type||"property"===c&&"MemberExpression"===p.type||"AssignmentExpression"===p.type);case"JSXFragment":case"JSXElement":return"callee"===c||"left"===c&&"BinaryExpression"===p.type&&"<"===p.operator||!j9(p)&&"ArrowFunctionExpression"!==p.type&&"AssignmentExpression"!==p.type&&"AssignmentPattern"!==p.type&&"BinaryExpression"!==p.type&&"NewExpression"!==p.type&&"ConditionalExpression"!==p.type&&"ExpressionStatement"!==p.type&&"JsExpressionRoot"!==p.type&&"JSXAttribute"!==p.type&&"JSXElement"!==p.type&&"JSXExpressionContainer"!==p.type&&"JSXFragment"!==p.type&&"LogicalExpression"!==p.type&&!n7(p)&&!R7(p)&&"ReturnStatement"!==p.type&&"ThrowStatement"!==p.type&&"TypeCastExpression"!==p.type&&"VariableDeclarator"!==p.type&&"YieldExpression"!==p.type;case"TSInstantiationExpression":return"object"===c&&i7(p)}return!1}var q7=C9(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function K7(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if("arguments"===r&&e.isLast)return e.callParent(K7);break;case"ObjectProperty":if("value"===r)return e.callParent((()=>"properties"===e.key&&e.isLast));break;case"BinaryExpression":case"LogicalExpression":if("right"===r)return e.callParent(K7);break;case"ConditionalExpression":if("alternate"===r)return e.callParent(K7);break;case"UnaryExpression":if(t.prefix)return e.callParent(K7)}return!1}function J7(e,t){let{node:r,parent:n}=e;return"FunctionExpression"===r.type||"ClassExpression"===r.type?"ExportDefaultDeclaration"===n.type||!V7(e,t):!(!_9(r)||"ExportDefaultDeclaration"!==n.type&&V7(e,t))&&e.call((()=>J7(e,t)),...L9(r))}var W7=V7,X7=(e,t,r,n)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)};var H7=function(e,t){let r=t-1;return r=u9(e,r,{backwards:!0}),r=p9(e,r,{backwards:!0}),r=u9(e,r,{backwards:!0}),r!==p9(e,r,{backwards:!0})},z7=()=>!0;function G7(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function Y7(e,t,r={}){let{node:n}=e;if(!t9(null==n?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:a=z7}=r,o=[];if(e.each((({node:r})=>{r.leading||r.trailing||r.marker!==s||!a(r)||o.push(G7(e,t))}),"comments"),0===o.length)return"";let u=U6(B6,o);return i?v6([B6,u]):u}function Q7(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if(0===(r.comments||[]).filter((e=>!n.has(e))).length)return{leading:"",trailing:""};let i,s=[],a=[];return e.each((()=>{let r=e.node;if(null!=n&&n.has(r))return;let{leading:o,trailing:u}=r;o?s.push(function(e,t){var r;let n=e.node,i=[G7(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=d9(a,u(n))?d9(a,o(n),{backwards:!0})?B6:L6:" ";i.push(e)}else i.push(B6);let l=p9(a,u9(a,u(n)));return!1!==l&&d9(a,l)&&i.push(B6),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=G7(e,t),{printer:a,originalText:o,locStart:u}=t,l=null==(n=a.isBlockComment)?void 0:n.call(a,i);if(null!=r&&r.hasLineSuffix&&(null==r||!r.isBlock)||d9(o,u(i),{backwards:!0})){let e=H7(o,u(i));return{doc:N6([B6,e?B6:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[N6([" ",s]),_6],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}function Z7(e,t,r){let{leading:n,trailing:i}=Q7(e,r);return n||i?e9(t,(e=>[n,e,i])):t}var eee=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},tee=eee,ree="'";var nee=function(e,t){let r=!0===t||t===ree?ree:'"',n=r===ree?'"':ree,i=0,s=0;for(let t of e)t===r?i++:t===n&&s++;return i>s?n:r};var iee;iee=new WeakMap;var see=class{constructor(e){((e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)})(this,iee,void 0),((e,t,r,n)=>{z8(e,t,"write to private field"),n?n.call(e,r):t.set(e,r)})(this,iee,new Set(e))}getLeadingWhitespaceCount(e){let t=G8(this,iee),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=G8(this,iee),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return G8(this,iee).has(e.charAt(0))}hasTrailingWhitespace(e){return G8(this,iee).has(V6(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}([...G8(this,iee)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=G8(this,iee);return Array.prototype.some.call(e,(e=>t.has(e)))}hasNonWhitespaceCharacter(e){let t=G8(this,iee);return Array.prototype.some.call(e,(e=>!t.has(e)))}isWhitespaceOnly(e){let t=G8(this,iee);return Array.prototype.every.call(e,(e=>t.has(e)))}},aee={};H8(aee,{endOfLine:()=>yee,ownLine:()=>mee,remaining:()=>gee});var oee=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=u9(e,n),n=h9(e,n),n=f9(e,n),n=p9(e,n);return n};var uee=function(e,t){let r=oee(e,t);return!1===r?"":e.charAt(r)};var lee=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};function cee(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}(e)}function pee(e,t){t.leading=!0,t.trailing=!1,cee(e,t)}function dee(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),cee(e,t)}function hee(e,t){t.leading=!1,t.trailing=!0,cee(e,t)}var fee=function(e){return w9(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};function mee(e){return[zee,Lee,Pee,Tee,Eee,vee,wee,Vee,Ree,$ee,qee,Kee,Iee,Mee,Bee].some((t=>t(e)))}function yee(e){return[See,Lee,Aee,qee,Tee,Eee,vee,wee,Mee,jee,Uee,$ee,Xee,Bee,Yee].some((t=>t(e)))}function gee(e){return[zee,Tee,Eee,Dee,Oee,Iee,$ee,_ee,Fee,Gee,Bee,Hee].some((t=>t(e)))}function xee(e,t){let r=(e.body||e.properties).find((({type:e})=>"EmptyStatement"!==e));r?pee(r,t):dee(e,t)}function bee(e,t){"BlockStatement"===e.type?xee(e,t):pee(e,t)}function See({comment:e,followingNode:t}){return!(!t||!fee(e))&&(pee(t,e),!0)}function Tee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("IfStatement"!==(null==r?void 0:r.type)||!n)return!1;if(")"===uee(i,S9(e)))return hee(t,e),!0;if(t===r.consequent&&n===r.alternate){if("BlockStatement"===t.type)hee(t,e);else{let n="SingleLine"===e.type||e.loc.start.line===e.loc.end.line,i=e.loc.start.line===t.loc.start.line;n&&i?dee(t,e,"ExpressionStatement"===t.type?U7:void 0):dee(r,e)}return!0}return"BlockStatement"===n.type?(xee(n,e),!0):"IfStatement"===n.type?(bee(n.consequent,e),!0):r.consequent===n&&(pee(n,e),!0)}function Eee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return!("WhileStatement"!==(null==r?void 0:r.type)||!n)&&(")"===uee(i,S9(e))?(hee(t,e),!0):"BlockStatement"===n.type?(xee(n,e),!0):r.body===n&&(pee(n,e),!0))}function vee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return!("TryStatement"!==(null==r?void 0:r.type)&&"CatchClause"!==(null==r?void 0:r.type)||!n)&&("CatchClause"===r.type&&t?(hee(t,e),!0):"BlockStatement"===n.type?(xee(n,e),!0):"TryStatement"===n.type?(bee(n.finalizer,e),!0):"CatchClause"===n.type&&(bee(n.body,e),!0))}function Pee({comment:e,enclosingNode:t,followingNode:r}){return!(!i7(t)||"Identifier"!==(null==r?void 0:r.type))&&(pee(t,e),!0)}function Aee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){let s=t&&!lee(i,S9(t),b9(e));return!(t&&s||"ConditionalExpression"!==(null==r?void 0:r.type)&&"TSConditionalType"!==(null==r?void 0:r.type)||!n)&&(pee(n,e),!0)}function Dee({comment:e,precedingNode:t,enclosingNode:r}){return!(!R7(r)||!r.shorthand||r.key!==t||"AssignmentPattern"!==r.value.type)&&(hee(r.value.left,e),!0)}var Cee=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function wee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(Cee.has(null==r?void 0:r.type)){if(t9(r.decorators)&&"Decorator"!==(null==n?void 0:n.type))return hee(V6(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return xee(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return hee(t,e),!0;for(let i of["implements","extends","mixins"])if(r[i]&&n===r[i][0])return!t||t!==r.id&&t!==r.typeParameters&&t!==r.superClass?dee(r,e,i):hee(t,e),!0}}return!1}var kee=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Iee({comment:e,precedingNode:t,enclosingNode:r,text:n}){return(r&&t&&"("===uee(n,S9(e))&&("Property"===r.type||"TSDeclareMethod"===r.type||"TSAbstractMethodDefinition"===r.type)&&"Identifier"===t.type&&r.key===t&&":"!==uee(n,S9(t))||!("Decorator"!==(null==t?void 0:t.type)||!kee.has(null==r?void 0:r.type)))&&(hee(t,e),!0)}var Nee=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function Fee({comment:e,precedingNode:t,enclosingNode:r,text:n}){return"("===uee(n,S9(e))&&(!(!t||!Nee.has(null==r?void 0:r.type))&&(hee(t,e),!0))}function _ee({comment:e,enclosingNode:t,text:r}){if("ArrowFunctionExpression"!==(null==t?void 0:t.type))return!1;let n=oee(r,S9(e));return!1!==n&&"=>"===r.slice(n,n+2)&&(dee(t,e),!0)}function Oee({comment:e,enclosingNode:t,text:r}){return")"===uee(r,S9(e))&&(t&&(Qee(t)&&0===D7(t).length||j7(t)&&0===w7(t).length)?(dee(t,e),!0):("MethodDefinition"===(null==t?void 0:t.type)||"TSAbstractMethodDefinition"===(null==t?void 0:t.type))&&0===D7(t.value).length&&(dee(t.value,e),!0))}function Lee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("FunctionTypeParam"===(null==t?void 0:t.type)&&"FunctionTypeAnnotation"===(null==r?void 0:r.type)&&"FunctionTypeParam"!==(null==n?void 0:n.type))return hee(t,e),!0;if(("Identifier"===(null==t?void 0:t.type)||"AssignmentPattern"===(null==t?void 0:t.type)||"ObjectPattern"===(null==t?void 0:t.type)||"ArrayPattern"===(null==t?void 0:t.type)||"RestElement"===(null==t?void 0:t.type))&&r&&Qee(r)&&")"===uee(i,S9(e)))return hee(t,e),!0;if("FunctionDeclaration"===(null==r?void 0:r.type)&&"BlockStatement"===(null==n?void 0:n.type)){let t=(()=>{let e=D7(r);if(e.length>0)return oee(i,S9(V6(!1,e,-1)));let t=oee(i,S9(r.id));return!1!==t&&oee(i,t+1)})();if(b9(e)>t)return xee(n,e),!0}return!1}function Mee({comment:e,enclosingNode:t}){return"LabeledStatement"===(null==t?void 0:t.type)&&(pee(t,e),!0)}function Bee({comment:e,enclosingNode:t}){return!("ContinueStatement"!==(null==t?void 0:t.type)&&"BreakStatement"!==(null==t?void 0:t.type)||t.label)&&(hee(t,e),!0)}function jee({comment:e,precedingNode:t,enclosingNode:r}){return!!(n7(r)&&t&&r.callee===t&&r.arguments.length>0)&&(pee(r.arguments[0],e),!0)}function Ree({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"UnionTypeAnnotation"===(null==r?void 0:r.type)||"TSUnionType"===(null==r?void 0:r.type)?(N7(e)&&(n.prettierIgnore=!0,e.unignore=!0),!!t&&(hee(t,e),!0)):(("UnionTypeAnnotation"===(null==n?void 0:n.type)||"TSUnionType"===(null==n?void 0:n.type))&&N7(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Uee({comment:e,enclosingNode:t}){return!!R7(t)&&(pee(t,e),!0)}function $ee({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:i}){var s;return 0===(null==(s=null==n?void 0:n.body)?void 0:s.length)?(i?dee(n,e):pee(n,e),!0):"Program"!==(null==t?void 0:t.type)||0!==t.body.length||t9(t.directives)?"Program"===(null==r?void 0:r.type)&&0===r.body.length&&"ModuleExpression"===(null==t?void 0:t.type)&&(dee(r,e),!0):(i?dee(t,e):pee(t,e),!0)}function Vee({comment:e,enclosingNode:t}){return("ForInStatement"===(null==t?void 0:t.type)||"ForOfStatement"===(null==t?void 0:t.type))&&(pee(t,e),!0)}function qee({comment:e,precedingNode:t,enclosingNode:r,text:n}){if("ImportSpecifier"===(null==r?void 0:r.type)||"ExportSpecifier"===(null==r?void 0:r.type))return pee(r,e),!0;let i="ImportSpecifier"===(null==t?void 0:t.type)&&"ImportDeclaration"===(null==r?void 0:r.type),s="ExportSpecifier"===(null==t?void 0:t.type)&&"ExportNamedDeclaration"===(null==r?void 0:r.type);return!(!i&&!s||!d9(n,S9(e)))&&(hee(t,e),!0)}function Kee({comment:e,enclosingNode:t}){return"AssignmentPattern"===(null==t?void 0:t.type)&&(pee(t,e),!0)}var Jee=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),Wee=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function Xee({comment:e,enclosingNode:t,followingNode:r}){return!(!Jee.has(null==t?void 0:t.type)||!r||!Wee.has(r.type)&&!w9(e))&&(pee(r,e),!0)}function Hee({comment:e,enclosingNode:t,followingNode:r,text:n}){return!(r||"TSMethodSignature"!==(null==t?void 0:t.type)&&"TSDeclareFunction"!==(null==t?void 0:t.type)&&"TSAbstractMethodDefinition"!==(null==t?void 0:t.type)||";"!==uee(n,S9(e)))&&(hee(t,e),!0)}function zee({comment:e,enclosingNode:t,followingNode:r}){if(N7(e)&&"TSMappedType"===(null==t?void 0:t.type)&&"TSTypeParameter"===(null==r?void 0:r.type)&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function Gee({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"TSMappedType"===(null==r?void 0:r.type)&&("TSTypeParameter"===(null==n?void 0:n.type)&&n.name?(pee(n.name,e),!0):!("TSTypeParameter"!==(null==t?void 0:t.type)||!t.constraint)&&(hee(t.constraint,e),!0))}function Yee({comment:e,enclosingNode:t,followingNode:r}){return!(!t||"SwitchCase"!==t.type||t.test||!r||r!==t.consequent[0])&&("BlockStatement"===r.type&&M9(e)?xee(r,e):dee(t,e),!0)}var Qee=C9(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);var Zee=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))};function ete(e,t){let r=e.node;if(M9(r))return t.originalText.slice(b9(r),S9(r)).trimEnd();if(w9(r))return Zee(r)?function(e){let t=e.value.split("\n");return["/*",U6(B6,t.map(((e,r)=>0===r?e.trimEnd():" "+(r<t.length-1?e.trim():e.trimStart())))),"*/"]}(r):["/*",Q6(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}var tte=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function rte(e){return!tte.has(e.type)}function nte(e,t){var r;if(("typescript"===t.parser||"flow"===t.parser||"acorn"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser)&&"MethodDefinition"===e.type&&"FunctionExpression"===(null==(r=e.value)?void 0:r.type)&&0===D7(e.value).length&&!e.value.returnType&&!t9(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function ite(e){let{node:t,parent:r}=e;return(X9(t)||r&&("JSXSpreadAttribute"===r.type||"JSXSpreadChild"===r.type||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type||("ClassDeclaration"===r.type||"ClassExpression"===r.type)&&r.superClass===t))&&(!F7(t)||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)}function ste(e,{parser:t}){if("flow"===t||"babel-flow"===t)return""===(e=X7(!1,e,/[\s(]/g,""))||"/*"===e||"/*::"===e}var ate=new see(" \n\r\t"),ote=e=>""===e||e===L6||e===B6||e===M6;function ute(e,t,r){var n,i,s;let{node:a}=e;if("JSXElement"===a.type&&function(e){if(0===e.children.length)return!0;if(e.children.length>1)return!1;let t=e.children[0];return"JSXText"===t.type&&!mte(t)}(a))return[r("openingElement"),r("closingElement")];let o="JSXElement"===a.type?r("openingElement"):r("openingFragment"),u="JSXElement"===a.type?r("closingElement"):r("closingFragment");if(1===a.children.length&&"JSXExpressionContainer"===a.children[0].type&&("TemplateLiteral"===a.children[0].expression.type||"TaggedTemplateExpression"===a.children[0].expression.type))return[o,...e.map(r,"children"),u];a.children=a.children.map((e=>function(e){return"JSXExpressionContainer"===e.type&&V9(e.expression)&&" "===e.expression.value&&!L7(e.expression)}(e)?{type:"JSXText",value:" ",raw:" "}:e));let l=a.children.some(X9),c=a.children.filter((e=>"JSXExpressionContainer"===e.type)).length>1,p="JSXElement"===a.type&&a.openingElement.attributes.length>1,d=X6(o)||l||p||c,h="mdx"===e.parent.rootMarker,f=t.singleQuote?"{' '}":'{" "}',m=h?" ":k6([f,M6]," "),y=function(e,t,r,n,i){let s=[];return e.each((({node:e,next:t})=>{if("JSXText"===e.type){let r=f7(e);if(mte(e)){let a,o=ate.split(r,!0);if(""===o[0]&&(s.push(""),o.shift(),/\n/.test(o[0])?s.push(cte(i,o[1],e,t)):s.push(n),o.shift()),""===V6(!1,o,-1)&&(o.pop(),a=o.pop()),0===o.length)return;for(let[e,t]of o.entries())e%2==1?s.push(L6):s.push(t);void 0!==a?/\n/.test(a)?s.push(cte(i,V6(!1,s,-1),e,t)):s.push(n):s.push(lte(i,V6(!1,s,-1),e,t))}else/\n/.test(r)?r.match(/\n/g).length>1&&s.push("",B6):s.push("",n)}else{let n=r();if(s.push(n),t&&mte(t)){let r=ate.trim(f7(t)),[n]=ate.split(r);s.push(lte(i,n,e,t))}else s.push(B6)}}),"children"),s}(e,0,r,m,"fbt"===(null==(i=null==(n=a.openingElement)?void 0:n.name)?void 0:i.name)),g=a.children.some((e=>mte(e)));for(let e=y.length-2;e>=0;e--){let t=""===y[e]&&""===y[e+1],r=y[e]===B6&&""===y[e+1]&&y[e+2]===B6,n=(y[e]===M6||y[e]===B6)&&""===y[e+1]&&y[e+2]===m,i=y[e]===m&&""===y[e+1]&&(y[e+2]===M6||y[e+2]===B6),s=y[e]===m&&""===y[e+1]&&y[e+2]===m,a=y[e]===M6&&""===y[e+1]&&y[e+2]===B6||y[e]===B6&&""===y[e+1]&&y[e+2]===M6;r&&g||t||n||s||a?y.splice(e,2):i&&y.splice(e+1,2)}for(;y.length>0&&ote(V6(!1,y,-1));)y.pop();for(;y.length>1&&ote(y[0])&&ote(y[1]);)y.shift(),y.shift();let x=[];for(let[e,t]of y.entries()){if(t===m){if(1===e&&""===y[e-1]){if(2===y.length){x.push(f);continue}x.push([f,B6]);continue}if(e===y.length-1){x.push(f);continue}if(""===y[e-1]&&y[e-2]===B6){x.push(f);continue}}x.push(t),X6(t)&&(d=!0)}let b=g?w6(x):A6(x,{shouldBreak:!0});if("JSXText"===(null==(s=t.cursorNode)?void 0:s.type)&&a.children.includes(t.cursorNode)&&(b=[R6,b,R6]),h)return b;let S=A6([o,v6([B6,b]),B6,u]);return d?S:C6([A6([o,...y,u]),S])}function lte(e,t,r,n){return e?"":"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?1===t.length?M6:B6:M6}function cte(e,t,r,n){return e?B6:1===t.length?"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?B6:M6:B6}var pte=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function dte(e,t,r){return e.selfClosing?[L6,"/>"]:function(e,t,r){let n=e.attributes.length>0&&L7(V6(!1,e.attributes,-1),_7.Trailing);return 0===e.attributes.length&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}(e,t,r)?[">"]:[M6,">"]}function hte(e,t,r){return function(e,t,r){let{parent:n}=e;if(pte.has(n.type))return t;let i=e.match(void 0,(e=>"ArrowFunctionExpression"===e.type),n7,(e=>"JSXExpressionContainer"===e.type)),s=W7(e,r);return A6([s?"":k6("("),v6([M6,t]),M6,s?"":k6(")")],{shouldBreak:i})}(e,Z7(e,ute(e,t,r),t),t)}function fte(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return function(e,t,r){let{node:n}=e,i=[];if(i.push(r("name")),n.value){let s;if(V9(n.value)){let r=f7(n.value),i=X7(!1,X7(!1,r.slice(1,-1),"'","'"),""",'"'),a=nee(i,t.jsxSingleQuote);i='"'===a?X7(!1,i,'"',"""):X7(!1,i,"'","'"),s=e.call((()=>Z7(e,Q6(a+i+a),t)),"value")}else s=r("value");i.push("=",s)}return i}(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return U6(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return U6(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return function(e,t,r){let{node:n}=e;return["{",e.call((({node:n})=>{let i=["...",r()];return L7(n)&&ite(e)?[v6([M6,Z7(e,i,t)]),M6]:i}),"JSXSpreadAttribute"===n.type?"argument":"expression"),"}"]}(e,t,r);case"JSXExpressionContainer":return function(e,t,r){let{node:n}=e,i=(e,t)=>"JSXEmptyExpression"===e.type||!L7(e)&&(j9(e)||R9(e)||"ArrowFunctionExpression"===e.type||"AwaitExpression"===e.type&&(i(e.argument,e)||"JSXElement"===e.argument.type)||n7(e)||"ChainExpression"===e.type&&n7(e.expression)||"FunctionExpression"===e.type||"TemplateLiteral"===e.type||"TaggedTemplateExpression"===e.type||"DoExpression"===e.type||X9(t)&&("ConditionalExpression"===e.type||Y9(e)));return i(n.expression,e.parent)?A6(["{",r("expression"),F6,"}"]):A6(["{",v6([M6,r("expression")]),M6,F6,"}"])}(e,0,r);case"JSXFragment":case"JSXElement":return hte(e,t,r);case"JSXOpeningElement":return function(e,t,r){var n,i;let{node:s}=e,a=L7(s.name)||L7(s.typeParameters);if(s.selfClosing&&0===s.attributes.length&&!a)return["<",r("name"),r("typeParameters")," />"];if(1===(null==(n=s.attributes)?void 0:n.length)&&s.attributes[0].value&&V9(s.attributes[0].value)&&!s.attributes[0].value.value.includes("\n")&&!a&&!L7(s.attributes[0]))return A6(["<",r("name"),r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let o=null==(i=s.attributes)?void 0:i.some((e=>e.value&&V9(e.value)&&e.value.value.includes("\n"))),u=t.singleAttributePerLine&&s.attributes.length>1?B6:L6;return A6(["<",r("name"),r("typeParameters"),v6(e.map((()=>[u,r()]),"attributes")),...dte(s,t,a)],{shouldBreak:o})}(e,t,r);case"JSXClosingElement":return function(e,t,r){let{node:n}=e,i=[];i.push("</");let s=r("name");return L7(n.name,_7.Leading|_7.Line)?i.push(v6([B6,s]),B6):L7(n.name,_7.Leading|_7.Block)?i.push(" ",s):i.push(s),i.push(">"),i}(e,0,r);case"JSXOpeningFragment":case"JSXClosingFragment":return function(e,t){let{node:r}=e,n=L7(r),i=L7(r,_7.Line),s="JSXOpeningFragment"===r.type;return[s?"<":"</",v6([i?B6:n&&!s?" ":"",Y7(e,t)]),i?B6:"",">"]}(e,t);case"JSXEmptyExpression":return function(e,t){let{node:r}=e,n=L7(r,_7.Line);return[Y7(e,t,{indent:n}),n?B6:""]}(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new tee(n,"JSX")}}function mte(e){return"JSXText"===e.type&&(ate.hasNonWhitespaceCharacter(f7(e))||!/\n/.test(f7(e)))}var yte=function(e){return F7(e.node)||function(e){let{node:t,parent:r}=e;if(!X9(t)||!X9(r))return!1;let n,{index:i,siblings:s}=e;for(let e=i;e>0;e--){let t=s[e-1];if("JSXText"!==t.type||mte(t)){n=t;break}}return"JSXExpressionContainer"===(null==n?void 0:n.type)&&"JSXEmptyExpression"===n.expression.type&&F7(n.expression)}(e)},gte=0;function xte(e,t,r){var n;let{node:i,parent:s,grandparent:a,key:o}=e,u="body"!==o&&("IfStatement"===s.type||"WhileStatement"===s.type||"SwitchStatement"===s.type||"DoWhileStatement"===s.type),l="|>"===i.operator&&(null==(n=e.root.extra)?void 0:n.__isUsingHackPipeline),c=bte(e,r,t,!1,u);if(u)return c;if(l)return A6(c);if(n7(s)&&s.callee===i||"UnaryExpression"===s.type||i7(s)&&!s.computed)return A6([v6([M6,...c]),M6]);let p="ReturnStatement"===s.type||"ThrowStatement"===s.type||"JSXExpressionContainer"===s.type&&"JSXAttribute"===a.type||"|"!==i.operator&&"JsExpressionRoot"===s.type||"NGPipeExpression"!==i.type&&("NGRoot"===s.type&&"__ng_binding"===t.parser||"NGMicrosyntaxExpression"===s.type&&"NGMicrosyntax"===a.type&&1===a.body.length)||i===s.body&&"ArrowFunctionExpression"===s.type||i!==s.body&&"ForStatement"===s.type||"ConditionalExpression"===s.type&&"ReturnStatement"!==a.type&&"ThrowStatement"!==a.type&&!n7(a)||"TemplateLiteral"===s.type,d="AssignmentExpression"===s.type||"VariableDeclarator"===s.type||"ClassProperty"===s.type||"PropertyDefinition"===s.type||"TSAbstractPropertyDefinition"===s.type||"ClassPrivateProperty"===s.type||R7(s),h=Y9(i.left)&&T7(i.operator,i.left.operator);if(p||Ste(i)&&!h||!Ste(i)&&d)return A6(c);if(0===c.length)return"";let f=X9(i.right),m=c.findIndex((e=>"string"!=typeof e&&!Array.isArray(e)&&e.type===o6)),y=c.slice(0,-1===m?1:m+1),g=c.slice(y.length,f?-1:void 0),x=Symbol("logicalChain-"+ ++gte),b=A6([...y,v6(g)],{id:x});return f?A6([b,I6(V6(!1,c,-1),{groupId:x})]):b}function bte(e,t,r,n,i){var s;let{node:a}=e;if(!Y9(a))return[A6(t())];let o=[];T7(a.operator,a.left.operator)?o=e.call((e=>bte(e,t,r,!0,i)),"left"):o.push(A6(t("left")));let u,l=Ste(a),c=("|>"===a.operator||"NGPipeExpression"===a.type||function(e,t){return("__vue_expression"===t.parser||"__vue_ts_expression"===t.parser)&&Tte(e.node)&&!e.hasAncestor((e=>!Tte(e)&&"JsExpressionRoot"!==e.type))}(e,r))&&!s7(r.originalText,a.right),p="NGPipeExpression"===a.type?"|":a.operator,d="NGPipeExpression"===a.type&&a.arguments.length>0?A6(v6([M6,": ",U6([L6,": "],e.map((()=>P6(2,A6(t()))),"arguments"))])):"";if(l)u=[p," ",t("right"),d];else{let n="|>"===p&&(null==(s=e.root.extra)?void 0:s.__isUsingHackPipeline)?e.call((e=>bte(e,t,r,!0,i)),"right"):t("right");u=[c?L6:"",p,c?" ":L6,n,d]}let{parent:h}=e,f=L7(a.left,_7.Trailing|_7.Line),m=f||!(i&&"LogicalExpression"===a.type)&&h.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type;if(o.push(c?"":" ",m?A6(u,{shouldBreak:f}):u),n&&L7(a)){let t=Y6(Z7(e,o,r));return Array.isArray(t)||t.type===u6?q6(t):[t]}return o}function Ste(e){return"LogicalExpression"===e.type&&!!(R9(e.right)&&e.right.properties.length>0||j9(e.right)&&e.right.elements.length>0||X9(e.right))}var Tte=e=>"BinaryExpression"===e.type&&"|"===e.operator;var Ete=class extends Error{name="ArgExpansionBailout"};function vte(e,t,r){let{node:n}=e,i=[],s="TupleExpression"===n.type?"#[":"[",a="TupleTypeAnnotation"===n.type&&n.types?"types":"TSTupleType"===n.type||"TupleTypeAnnotation"===n.type?"elementTypes":"elements",o=n[a];if(0===o.length)i.push(function(e,t,r,n){let{node:i}=e;return L7(i,_7.Dangling)?A6([r,Y7(e,t,{indent:!0}),M6,n]):[r,n]}(e,t,s,"]"));else{let u=V6(!1,o,-1),l="RestElement"!==(null==u?void 0:u.type),c=null===u,p=Symbol("array"),d=!t.__inJestEach&&o.length>1&&o.every(((e,t,r)=>{let n=null==e?void 0:e.type;if(!j9(e)&&!R9(e))return!1;let i=r[t+1];if(i&&n!==i.type)return!1;let s=j9(e)?"elements":"properties";return e[s]&&e[s].length>1})),h=Pte(n,t),f=l?c?",":y7(t)?h?k6(",","",{groupId:p}):k6(","):"":"";i.push(A6([s,v6([M6,h?Cte(e,t,r,f):[Dte(e,t,a,r),f],Y7(e,t)]),M6,"]"],{shouldBreak:d,id:p}))}return i.push(yre(e),cre(e,r)),i}function Pte(e,t){return j9(e)&&e.elements.length>1&&e.elements.every((e=>e&&(U9(e)||$9(e)&&!L7(e.argument))&&!L7(e,_7.Trailing|_7.Line,(e=>!d9(t.originalText,b9(e),{backwards:!0})))))}function Ate({node:e},{originalText:t}){let r=e=>","===t[e]?e:r((e=>h9(t,f9(t,e)))(e+1));return m9(t,r(S9(e)))}function Dte(e,t,r,n){let i=[];return e.each((({node:r,isLast:s})=>{i.push(r?A6(n()):""),s||i.push([",",L6,r&&Ate(e,t)?M6:""])}),r),i}function Cte(e,t,r,n){let i=[];return e.each((({isLast:s,next:a})=>{i.push([r(),s?n:","]),s||i.push(Ate(e,t)?[B6,B6]:L7(a,_7.Leading|_7.Line)?B6:L6)}),"elements"),w6(i)}function wte(e,t=!1){return R9(e)&&(e.properties.length>0||L7(e))||j9(e)&&(e.elements.length>0||L7(e))||"TSTypeAssertion"===e.type&&wte(e.expression)||$7(e)&&wte(e.expression)||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&(!e.returnType||!e.returnType.typeAnnotation||"TSTypeReference"!==e.returnType.typeAnnotation.type||function(e){return"BlockStatement"===e.type&&(e.body.some((e=>"EmptyStatement"!==e.type))||L7(e,_7.Dangling))}(e.body))&&("BlockStatement"===e.body.type||"ArrowFunctionExpression"===e.body.type&&wte(e.body,!0)||R9(e.body)||j9(e.body)||!t&&(n7(e.body)||"ConditionalExpression"===e.body.type)||X9(e.body))||"DoExpression"===e.type||"ModuleExpression"===e.type}function kte(e){var t;if("ParenthesizedExpression"===e.type)return kte(e.expression);if($7(e)||"TypeCastExpression"===e.type){let{typeAnnotation:r}=e;return"TypeAnnotation"===r.type&&(r=r.typeAnnotation),"TSArrayType"===r.type&&(r=r.elementType,"TSArrayType"===r.type&&(r=r.elementType)),("GenericTypeAnnotation"===r.type||"TSTypeReference"===r.type)&&1===(null==(t=r.typeParameters)?void 0:t.params.length)&&(r=r.typeParameters.params[0]),e7(r)&&h7(e.expression,1)}return!(j7(e)&&w7(e).length>1)&&(Y9(e)?h7(e.left,1)&&h7(e.right,1):q9(e)||h7(e))}var Ite=function(e,t,r){let{node:n}=e,i=w7(n);if(0===i.length)return["(",Y7(e,t),")"];if(function(e){return 2===e.length&&"ArrowFunctionExpression"===e[0].type&&0===D7(e[0]).length&&"BlockStatement"===e[0].body.type&&"ArrayExpression"===e[1].type&&!e.some((e=>L7(e)))}(i))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let s=!1,a=i.length-1,o=[];k7(e,(({node:e},n)=>{let i=r();n===a||(B7(e,t)?(s=!0,i=[i,",",B6,B6]):i=[i,",",L6]),o.push(i)}));let u="ImportExpression"!==n.type&&"Import"!==n.callee.type&&y7(t,"all")?",":"";function l(){return A6(["(",v6([L6,...o]),u,L6,")"],{shouldBreak:!0})}if(s||"Decorator"!==e.parent.type&&function(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(J9(r)){if(t+=1,t>1)return!0}else if(n7(r))for(let e of r.arguments)if(J9(e))return!0;return!1}(i))return l();if(function(e){if(2!==e.length)return!1;let[t,r]=e;return!("ModuleExpression"!==t.type||!function(e){return"ObjectExpression"===e.type&&1===e.properties.length&&R7(e.properties[0])&&"Identifier"===e.properties[0].key.type&&"type"===e.properties[0].key.name&&V9(e.properties[0].value)&&"module"===e.properties[0].value.value}(r))||!L7(t)&&("FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"===t.body.type)&&"FunctionExpression"!==r.type&&"ArrowFunctionExpression"!==r.type&&"ConditionalExpression"!==r.type&&kte(r)&&!wte(r)}(i)){let e,t=o.slice(1);if(t.some(X6))return l();try{e=r(I7(n,0),{expandFirstArg:!0})}catch(e){if(e instanceof Ete)return l();throw e}return X6(e)?[_6,C6([["(",A6(e,{shouldBreak:!0}),", ",...t,")"],l()])]:C6([["(",e,", ",...t,")"],["(",A6(e,{shouldBreak:!0}),", ",...t,")"],l()])}if(function(e,t,r){var n,i;let s=V6(!1,e,-1);if(1===e.length){let e=V6(!1,t,-1);if(null!=(n=e.label)&&n.embed&&!1!==(null==(i=e.label)?void 0:i.hug))return!0}let a=V6(!1,e,-2);return!L7(s,_7.Leading)&&!L7(s,_7.Trailing)&&wte(s)&&(!a||a.type!==s.type)&&(2!==e.length||"ArrowFunctionExpression"!==a.type||!j9(s))&&!(e.length>1&&Pte(s,r))}(i,o,t)){let e,t=o.slice(0,-1);if(t.some(X6))return l();try{e=r(I7(n,-1),{expandLastArg:!0})}catch(e){if(e instanceof Ete)return l();throw e}return X6(e)?[_6,C6([["(",...t,A6(e,{shouldBreak:!0}),")"],l()])]:C6([["(",...t,e,")"],["(",...t,A6(e,{shouldBreak:!0}),")"],l()])}let c=["(",v6([M6,...o]),k6(u),M6,")"];return p7(e)?c:A6(c,{shouldBreak:o.some(X6)||s})};function Nte(e,t,r){let n=r("property"),{node:i}=e,s=yre(e);return i.computed?!i.property||U9(i.property)?[s,"[",n,"]"]:A6([s,"[",v6([M6,n]),M6,"]"]):[s,".",n]}var Fte=function(e,t,r){let{parent:n}=e,i=!n||"ExpressionStatement"===n.type,s=[];function a(e){let{originalText:r}=t,n=oee(r,S9(e));return")"===r.charAt(n)?!1!==n&&m9(r,n+1):B7(e,t)}function o(e){let{node:n}=e;n7(n)&&(Q9(n.callee)||n7(n.callee))?(s.unshift({node:n,printed:[Z7(e,[yre(e),Ere(e,t,r),Ite(e,t,r)],t),a(n)?B6:""]}),e.call((e=>o(e)),"callee")):Q9(n)?(s.unshift({node:n,needsParens:W7(e,t),printed:Z7(e,i7(n)?Nte(e,0,r):vre(e,t,r),t)}),e.call((e=>o(e)),"object")):"TSNonNullExpression"===n.type?(s.unshift({node:n,printed:Z7(e,"!",t)}),e.call((e=>o(e)),"expression")):s.unshift({node:n,printed:r()})}let{node:u}=e;s.unshift({node:u,printed:[yre(e),Ere(e,t,r),Ite(e,t,r)]}),u.callee&&e.call((e=>o(e)),"callee");let l=[],c=[s[0]],p=1;for(;p<s.length&&("TSNonNullExpression"===s[p].node.type||n7(s[p].node)||i7(s[p].node)&&s[p].node.computed&&U9(s[p].node.property));++p)c.push(s[p]);if(!n7(s[0].node))for(;p+1<s.length&&Q9(s[p].node)&&Q9(s[p+1].node);++p)c.push(s[p]);l.push(c),c=[];let d=!1;for(;p<s.length;++p){if(d&&Q9(s[p].node)){if(s[p].node.computed&&U9(s[p].node.property)){c.push(s[p]);continue}l.push(c),c=[],d=!1}(n7(s[p].node)||"ImportExpression"===s[p].node.type)&&(d=!0),c.push(s[p]),L7(s[p].node,_7.Trailing)&&(l.push(c),c=[],d=!1)}function h(e){return/^[A-Z]|^[$_]+$/.test(e)}c.length>0&&l.push(c);let f=l.length>=2&&!L7(l[1][0].node)&&function(e){var r;let n=null==(r=e[1][0])?void 0:r.node.computed;if(1===e[0].length){let r=e[0][0].node;return"ThisExpression"===r.type||"Identifier"===r.type&&(h(r.name)||i&&function(e){return e.length<=t.tabWidth}(r.name)||n)}let s=V6(!1,e[0],-1).node;return i7(s)&&"Identifier"===s.property.type&&(h(s.property.name)||n)}(l);function m(e){let t=e.map((e=>e.printed));return e.length>0&&V6(!1,e,-1).needsParens?["(",...t,")"]:t}let y=l.map(m),g=y,x=f?3:2,b=l.flat(),S=b.slice(1,-1).some((e=>L7(e.node,_7.Leading)))||b.slice(0,-1).some((e=>L7(e.node,_7.Trailing)))||l[x]&&L7(l[x][0].node,_7.Leading);if(l.length<=x&&!S)return p7(e)?g:A6(g);let T,E=V6(!1,l[f?1:0],-1).node,v=!n7(E)&&a(E),P=[m(l[0]),f?l.slice(1,2).map(m):"",v?B6:"",function(e){return 0===e.length?"":v6(A6([B6,U6(B6,e.map(m))]))}(l.slice(f?2:1))],A=s.map((({node:e})=>e)).filter(n7);return T=S||A.length>2&&A.some((e=>!e.arguments.every((e=>h7(e)))))||y.slice(0,-1).some(X6)||function(){let e=V6(!1,V6(!1,l,-1),-1).node,t=V6(!1,y,-1);return n7(e)&&X6(t)&&A.slice(0,-1).some((e=>e.arguments.some(J9)))}()?A6(P):[X6(g)||v?_6:"",C6([g,P])],$6({memberChain:!0},T)};function _te(e,t,r){var n;let{node:i,parent:s}=e,a="NewExpression"===i.type,o="ImportExpression"===i.type,u=yre(e),l=w7(i),c=1===l.length&&l7(l[0],t.originalText);if(c||l.length>0&&!a&&!o&&(function(e,t){if("Identifier"!==e.callee.type)return!1;if("require"===e.callee.name)return!0;if("define"===e.callee.name){let r=w7(e);return"ExpressionStatement"===t.type&&(1===r.length||2===r.length&&"ArrayExpression"===r[0].type||3===r.length&&V9(r[0])&&"ArrayExpression"===r[1].type)}return!1}(i,s)||r7(i,s))){let i=[];if(k7(e,(()=>{i.push(r())})),!c||null==(n=i[0].label)||!n.embed)return[a?"new ":"",r("callee"),u,Ere(e,t,r),"(",U6(", ",i),")"]}if(!o&&!a&&Q9(i.callee)&&!e.call((e=>W7(e,t)),"callee"))return Fte(e,t,r);let p=[a?"new ":"",o?"import":r("callee"),u,Ere(e,t,r),Ite(e,t,r)];return o||n7(i.callee)?A6(p):p}var Ote=function(e,t,r){let n='"'===t?"'":'"',i=X7(!1,e,/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t};var Lte=function(e,t){let r=e.slice(1,-1),n="json"===t.parser||"json5"===t.parser&&"preserve"===t.quoteProps&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":nee(r,t.singleQuote);return Ote(r,n,!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.__embeddedInHtml))};var Mte=function(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")};function Bte(e){return e.toLowerCase()}function jte({pattern:e,flags:t}){return`/${e}/${t=[...t].sort().join("")}`}function Rte(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}var Ute=C9(["Literal","BigIntLiteral","BooleanLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]);function $te(e,t,r,n,i,s){let a=function(e,t,r,n,i){let{node:s}=e,a=s[i];if(!a)return"only-left";let o=!Vte(a);if(e.match(Vte,qte,(e=>!o||"ExpressionStatement"!==e.type&&"VariableDeclaration"!==e.type)))return o?"ArrowFunctionExpression"===a.type&&"ArrowFunctionExpression"===a.body.type?"chain-tail-arrow-chain":"chain-tail":"chain";if(!o&&Vte(a.right)||s7(t.originalText,a))return"break-after-operator";if("CallExpression"===a.type&&"require"===a.callee.name||"json5"===t.parser||"json"===t.parser)return"never-break-after-operator";if(function(e){if(qte(e)){let t=e.left||e.id;return"ObjectPattern"===t.type&&t.properties.length>2&&t.properties.some((e=>{var t;return R7(e)&&(!e.shorthand||"AssignmentPattern"===(null==(t=e.value)?void 0:t.type))}))}return!1}(s)||function(e){let t=function(e){var t;if(Kte(e))return null==(t=e.typeParameters)?void 0:t.params}(e);if(t9(t)){let r="TSTypeAliasDeclaration"===e.type?"constraint":"bound";if(t.length>1&&t.some((e=>e[r]||e.default)))return!0}return!1}(s)||function(e){if("VariableDeclarator"!==e.type)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=Xte(t.typeAnnotation);return t9(r)&&r.length>1&&r.some((e=>t9(Xte(e))||"TSConditionalType"===e.type))}(s)||Jte(s)&&function(e){return J6(e,Z6,!1)}(n))return"break-lhs";let u=function(e,t,r){if(!R7(e))return!1;t=Y6(t);let n=3;return"string"==typeof t&&x9(t)<r.tabWidth+n}(s,n,t);return e.call((()=>function(e,t,r,n){let i=e.node;if(Y9(i)&&!Ste(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"ConditionalExpression":{let{test:e}=i;return Y9(e)&&!Ste(e)}case"ClassExpression":return t9(i.decorators)}if(n)return!1;let s=i,a=[];for(;;)if("UnaryExpression"===s.type||"AwaitExpression"===s.type||"YieldExpression"===s.type&&null!==s.argument)s=s.argument,a.push("argument");else{if("TSNonNullExpression"!==s.type)break;s=s.expression,a.push("expression")}return!(!V9(s)&&!e.call((()=>Hte(e,t,r)),...a))}(e,t,r,u)),i)?"break-after-operator":u||"TemplateLiteral"===a.type||"TaggedTemplateExpression"===a.type||"BooleanLiteral"===a.type||U9(a)||"ClassExpression"===a.type?"never-break-after-operator":"fluid"}(e,t,r,n,s),o=s?r(s,{assignmentLayout:a}):"";switch(a){case"break-after-operator":return A6([A6(n),i,A6(v6([L6,o]))]);case"never-break-after-operator":return A6([A6(n),i," ",o]);case"fluid":{let e=Symbol("assignment");return A6([A6(n),i,A6(v6(L6),{id:e}),F6,I6(o,{groupId:e})])}case"break-lhs":return A6([n,i," ",A6(o)]);case"chain":return[A6(n),i,L6,o];case"chain-tail":return[A6(n),i,v6([L6,o])];case"chain-tail-arrow-chain":return[A6(n),i,o];case"only-left":return n}}function Vte(e){return"AssignmentExpression"===e.type}function qte(e){return Vte(e)||"VariableDeclarator"===e.type}var Kte=C9(["TSTypeAliasDeclaration","TypeAlias"]);function Jte(e){var t;return"VariableDeclarator"===e.type&&"ArrowFunctionExpression"===(null==(t=e.init)?void 0:t.type)}var Wte=C9(["TSTypeReference","GenericTypeAnnotation"]);function Xte(e){var t;if(Wte(e))return null==(t=e.typeParameters)?void 0:t.params}function Hte(e,t,r,n=!1){var i;let{node:s}=e,a=()=>Hte(e,t,r,!0);if("ChainExpression"===s.type||"TSNonNullExpression"===s.type)return e.call(a,"expression");if(n7(s)){if(null!=(i=_te(e,t,r).label)&&i.memberChain)return!1;let n=w7(s);return!(!(0===n.length||1===n.length&&function(e,{printWidth:t}){if(L7(e))return!1;let r=t*zte;if("ThisExpression"===e.type||"Identifier"===e.type&&e.name.length<=r||$9(e)&&!L7(e.argument))return!0;let n="Literal"===e.type&&"regex"in e&&e.regex.pattern||"RegExpLiteral"===e.type&&e.pattern;return n?n.length<=r:V9(e)?f7(e).length<=r:"TemplateLiteral"===e.type?0===e.expressions.length&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes("\n"):Ute(e)}(n[0],t))||function(e,t){let r=function(e){var t;return null==(t=e.typeParameters??e.typeArguments)?void 0:t.params}(e);if(t9(r)){if(r.length>1)return!0;if(1===r.length){let e=r[0];if("TSUnionType"===e.type||"UnionTypeAnnotation"===e.type||"TSIntersectionType"===e.type||"IntersectionTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"ObjectTypeAnnotation"===e.type)return!0}if(X6(t(e.typeParameters?"typeParameters":"typeArguments")))return!0}return!1}(s,r))&&e.call(a,"callee")}return i7(s)?e.call(a,"object"):n&&("Identifier"===s.type||"ThisExpression"===s.type)}var zte=.25;function Gte(e,t,r,n,i){let s=e.node,a=D7(s),o=i?Ere(e,r,t):"";if(0===a.length)return[o,"(",Y7(e,r,{filter:e=>")"===uee(r.originalText,S9(e))}),")"];let{parent:u}=e,l=r7(u),c=Yte(s),p=[];if(function(e,t){let{node:r}=e,n=0,i=e=>t(e,n++);r.this&&e.call(i,"this"),Array.isArray(r.parameters)?e.each(i,"parameters"):Array.isArray(r.params)&&e.each(i,"params"),r.rest&&e.call(i,"rest")}(e,((e,n)=>{let i=n===a.length-1;i&&s.rest&&p.push("..."),p.push(t()),!i&&(p.push(","),l||c?p.push(" "):B7(a[n],r)?p.push(B6,B6):p.push(L6))})),n&&!function(e){return e.match((e=>"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type),((e,t)=>{if("CallExpression"===e.type&&"arguments"===t&&1===e.arguments.length&&"CallExpression"===e.callee.type){let t=e.callee.callee;return"Identifier"===t.type||"MemberExpression"===t.type&&!t.computed&&"Identifier"===t.object.type&&"Identifier"===t.property.type}return!1}),((e,t)=>"VariableDeclarator"===e.type&&"init"===t||"ExportDefaultDeclaration"===e.type&&"declaration"===t||"TSExportAssignment"===e.type&&"expression"===t||"AssignmentExpression"===e.type&&"right"===t&&"MemberExpression"===e.left.type&&"Identifier"===e.left.object.type&&"module"===e.left.object.name&&"Identifier"===e.left.property.type&&"exports"===e.left.property.name),(e=>"VariableDeclaration"!==e.type||"const"===e.kind&&1===e.declarations.length))}(e)){if(X6(o)||X6(p))throw new Ete;return A6([G6(o),"(",G6(p),")"])}let d=a.every((e=>!t9(e.decorators)));return c&&d||l?[o,"(",...p,")"]:(G9(u)||function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||T9(e,e.typeAnnotation))}(u)||"TypeAlias"===u.type||"UnionTypeAnnotation"===u.type||"TSUnionType"===u.type||"IntersectionTypeAnnotation"===u.type||"FunctionTypeAnnotation"===u.type&&u.returnType===s)&&1===a.length&&null===a[0].name&&s.this!==a[0]&&a[0].typeAnnotation&&null===s.typeParameters&&e7(a[0].typeAnnotation)&&!s.rest?"always"===r.arrowParens?["(",...p,")"]:p:[o,"(",v6([M6,...p]),k6(!P7(s)&&y7(r,"all")?",":""),M6,")"]}function Yte(e){if(!e)return!1;let t=D7(e);if(1!==t.length)return!1;let[r]=t;return!L7(r)&&("ObjectPattern"===r.type||"ArrayPattern"===r.type||"Identifier"===r.type&&r.typeAnnotation&&("TypeAnnotation"===r.typeAnnotation.type||"TSTypeAnnotation"===r.typeAnnotation.type)&&K9(r.typeAnnotation.typeAnnotation)||"FunctionTypeParam"===r.type&&K9(r.typeAnnotation)&&r!==e.rest||"AssignmentPattern"===r.type&&("ObjectPattern"===r.left.type||"ArrayPattern"===r.left.type)&&("Identifier"===r.right.type||R9(r.right)&&0===r.right.properties.length||j9(r.right)&&0===r.right.elements.length))}function Qte(e,t){var r;let n=function(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}(e);if(!n)return!1;let i=null==(r=e.typeParameters)?void 0:r.params;if(i){if(i.length>1)return!1;if(1===i.length){let e=i[0];if(e.constraint||e.default)return!1}}return 1===D7(e).length&&(K9(n)||X6(t))}function Zte(e){if(e7(e)||K9(e))return!0;if("UnionTypeAnnotation"===e.type||"TSUnionType"===e.type){let t=e.types.filter((e=>"VoidTypeAnnotation"===e.type||"TSVoidKeyword"===e.type||"NullLiteralTypeAnnotation"===e.type||"TSNullKeyword"===e.type)).length,r=e.types.some((e=>"ObjectTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)),n=e.types.some((e=>L7(e)));if(e.types.length-1===t&&r&&!n)return!0}return!1}function ere(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[bre(e)];return s.push("type ",r("id"),r("typeParameters")),[$te(e,t,r,s," =","TSTypeAliasDeclaration"===i.type?"typeAnnotation":"right"),n]}function tre(e,t,r){let n=!1;return A6(e.map((({isFirst:e,previous:t,node:i,index:s})=>{let a=r();if(e)return a;let o=K9(i),u=K9(t);return u&&o?[" & ",n?v6(a):a]:u||o?(s>1&&(n=!0),[" & ",s>1?v6(a):a]):v6([" &",L6,a])}),"types"))}function rre(e,t,r){let{node:n}=e,{parent:i}=e,s=!("TypeParameterInstantiation"===i.type||"TSTypeParameterInstantiation"===i.type||"GenericTypeAnnotation"===i.type||"TSTypeReference"===i.type||"TSTypeAssertion"===i.type||"TupleTypeAnnotation"===i.type||"TSTupleType"===i.type||"FunctionTypeParam"===i.type&&!i.name&&e.grandparent.this!==i||("TypeAlias"===i.type||"VariableDeclarator"===i.type||"TSTypeAliasDeclaration"===i.type)&&s7(t.originalText,n)),a=Zte(n),o=e.map((e=>{let n=r();return a||(n=P6(2,n)),Z7(e,n,t)}),"types");if(a)return U6(" | ",o);let u=[k6([s&&!s7(t.originalText,n)?L6:"","| "]),U6([L6,"| "],o)];return W7(e,t)?A6([v6(u),M6]):("TupleTypeAnnotation"===i.type||"TSTupleType"===i.type)&&i["TupleTypeAnnotation"===i.type&&i.types?"types":"elementTypes"].length>1?A6([v6([k6(["(",M6]),u]),M6,k6(")")]):A6(s?v6(u):u)}function nre(e,t,r){let{node:n}=e,i=[Tre(e)];("TSConstructorType"===n.type||"TSConstructSignatureDeclaration"===n.type)&&i.push("new ");let s=Gte(e,r,t,!1,!0),a=[];return"FunctionTypeAnnotation"===n.type?a.push(function(e){var t;let{node:r,parent:n}=e;return"FunctionTypeAnnotation"===r.type&&(G9(n)||!(("ObjectTypeProperty"===n.type||"ObjectTypeInternalSlot"===n.type)&&!n.variance&&!n.optional&&T9(n,r)||"ObjectTypeCallProperty"===n.type||"DeclareFunction"===(null==(t=e.getParentNode(2))?void 0:t.type)))}(e)?" => ":": ",r("returnType")):a.push(cre(e,r,n.returnType?"returnType":"typeAnnotation")),Qte(n,a)&&(s=A6(s)),i.push(s,a),A6(i)}function ire(e,t,r){return[r("objectType"),yre(e),"[",r("indexType"),"]"]}function sre(e,t,r){return["infer ",r("typeParameter")]}function are(e,t,r){let{node:n}=e;return[n.postfix?"":r,cre(e,t),n.postfix?r:""]}function ore(e,t,r){let{node:n}=e;return["...",..."TupleTypeSpreadElement"===n.type&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function ure(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var lre=new WeakSet;function cre(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let i=!1;if("TSTypeAnnotation"===n.type||"TypeAnnotation"===n.type){let t=e.call(pre,r);("=>"===t||":"===t&&L7(n,_7.Leading))&&(i=!0),lre.add(n)}return i?[" ",t(r)]:t(r)}var pre=e=>e.match((e=>"TSTypeAnnotation"===e.type),((e,t)=>!("returnType"!==t&&"typeAnnotation"!==t||"TSFunctionType"!==e.type&&"TSConstructorType"!==e.type)))?"=>":e.match((e=>"TSTypeAnnotation"===e.type),((e,t)=>"typeAnnotation"===t&&("TSJSDocNullableType"===e.type||"TSJSDocNonNullableType"===e.type||"TSTypePredicate"===e.type)))||e.match((e=>"TypeAnnotation"===e.type),((e,t)=>"typeAnnotation"===t&&"Identifier"===e.type),((e,t)=>"id"===t&&"DeclareFunction"===e.type))||e.match((e=>"TypeAnnotation"===e.type),((e,t)=>"bound"===t&&"TypeParameter"===e.type&&e.usesExtendsBound))?"":":";function dre(e,t,r){let n=pre(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function hre(e){return[e("elementType"),"[]"]}function fre({node:e},t){return["typeof ",..."TSTypeQuery"===e.type?[t("exprName"),t("typeParameters")]:[t("argument")]]}function mre(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",cre(e,t)]:""]}function yre(e){let{node:t}=e;return!t.optional||"Identifier"===t.type&&t===e.parent.key?"":n7(t)||i7(t)&&t.computed||"OptionalIndexedAccessType"===t.type?"?.":"?"}function gre(e){return e.node.definite||e.match(void 0,((e,t)=>"id"===t&&"VariableDeclarator"===e.type&&e.definite))?"!":""}var xre=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function bre(e){let{node:t}=e;return t.declare||xre.has(t.type)&&"DeclareExportDeclaration"!==e.parent.type?"declare ":""}var Sre=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Tre({node:e}){return e.abstract||Sre.has(e.type)?"abstract ":""}function Ere(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function vre(e,t,r){return["::",r("callee")]}function Pre(e,t,r){return"EmptyStatement"===e.type?";":"BlockStatement"===e.type||r?[" ",t]:v6([L6,t])}function Are(e,t){return["...",t("argument"),cre(e,t)]}function Dre(e){return e.accessibility?e.accessibility+" ":""}function Cre(e,t,r){let{node:n}=e;return A6([U6(L6,e.map(r,"decorators")),kre(n,t)?B6:L6])}function wre(e,t,r){return Ire(e.node)?[U6(B6,e.map(r,"declaration","decorators")),B6]:""}function kre(e,t){return e.decorators.some((e=>d9(t.originalText,S9(e))))}function Ire(e){var t;if("ExportDefaultDeclaration"!==e.type&&"ExportNamedDeclaration"!==e.type&&"DeclareExportDeclaration"!==e.type)return!1;let r=null==(t=e.declaration)?void 0:t.decorators;return t9(r)&&T9(e,r[0])}var Nre=e=>"ExportDefaultDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&e.default;function Fre(e,t,r){let{node:n}=e,i=[wre(e,0,r),bre(e),"export",Nre(n)?" default":""],{declaration:s,exported:a}=n;return L7(n,_7.Dangling)&&(i.push(" ",Y7(e,t)),c7(n)&&i.push(B6)),s?i.push(" ",r("declaration")):(i.push(function(e){return Ore(e.exportKind)}(n)),"ExportAllDeclaration"===n.type||"DeclareExportAllDeclaration"===n.type?(i.push(" *"),a&&i.push(" as ",r("exported"))):i.push(Bre(e,t,r)),i.push(Mre(e,t,r),Rre(e,t,r))),i.push(function(e,t){return t.semi&&(!e.declaration||Nre(e)&&!_re(e.declaration))?";":""}(n,t)),i}var _re=C9(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function Ore(e,t=!0){return e&&"value"!==e?`${t?" ":""}${e}${t?"":" "}`:""}function Lre(e,t){return Ore(e.importKind,t)}function Mre(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return jre(n,t)||i.push(" from"),i.push(" ",r("source")),i}function Bre(e,t,r){let{node:n}=e;if(jre(n,t))return"";let i=[" "];if(t9(n.specifiers)){let s=[],a=[];e.each((()=>{let t=e.node.type;if("ExportNamespaceSpecifier"===t||"ExportDefaultSpecifier"===t||"ImportNamespaceSpecifier"===t||"ImportDefaultSpecifier"===t)s.push(r());else{if("ExportSpecifier"!==t&&"ImportSpecifier"!==t)throw new tee(n,"specifier");a.push(r())}}),"specifiers"),i.push(U6(", ",s)),a.length>0&&(s.length>0&&i.push(", "),a.length>1||s.length>0||n.specifiers.some((e=>L7(e)))?i.push(A6(["{",v6([t.bracketSpacing?L6:M6,U6([",",L6],a)]),k6(y7(t)?",":""),t.bracketSpacing?L6:M6,"}"])):i.push(["{",t.bracketSpacing?" ":"",...a,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function jre(e,t){let{type:r,importKind:n,source:i,specifiers:s}=e;return"ImportDeclaration"===r&&!t9(s)&&"type"!==n&&!/{\s*}/.test(t.originalText.slice(b9(e),b9(i)))}function Rre(e,t,r){var n;let{node:i}=e,s=t9(i.attributes)?"attributes":t9(i.assertions)?"assertions":void 0;return s?[` ${"assertions"===s||null!=(n=i.extra)&&n.deprecatedAssertSyntax?"assert":"with"} {`,t.bracketSpacing?" ":"",U6(", ",e.map(r,s)),t.bracketSpacing?" ":"","}"]:""}function Ure(e,t,r){let{node:n}=e,{type:i}=n,s=i.startsWith("Import"),a=s?"imported":"local",o=s?"local":"exported",u=n[a],l=n[o],c="",p="";return"ExportNamespaceSpecifier"===i||"ImportNamespaceSpecifier"===i?c="*":u&&(c=r(a)),l&&!function(e){if("ImportSpecifier"!==e.type&&"ExportSpecifier"!==e.type)return!1;let{local:t,["ImportSpecifier"===e.type?"imported":"exported"]:r}=e;if(t.type!==r.type||!E9(t,r))return!1;if(V9(t))return t.value===r.value&&f7(t)===f7(r);if("Identifier"===t.type)return t.name===r.name;return!1}(n)&&(p=r(o)),[Ore("ImportSpecifier"===i?n.importKind:n.exportKind,!1),c,c&&p?" as ":"",p]}function $re(e,t,r){let{node:n}=e,i="ConditionalExpression"===n.type,s=i?"alternate":"falseType",{parent:a}=e,o=i?r("test"):[r("checkType")," ","extends"," ",r("extendsType")];return a.type===n.type&&a[s]===n?P6(2,o):o}var Vre=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"]]);function qre(e,t,r){let n,i,{node:s}=e,a="ConditionalExpression"===s.type,o=a?"consequent":"trueType",u=a?"alternate":"falseType",l=a?["test"]:["checkType","extendsType"],c=s[o],p=s[u],d=[],h=!1,{parent:f}=e,m=f.type===s.type&&l.some((e=>f[e]===s)),y=f.type===s.type&&!m,g=0;do{i=n||s,n=e.getParentNode(g),g++}while(n&&n.type===s.type&&l.every((e=>n[e]!==i)));let x=n||f,b=i;if(a&&(X9(s[l[0]])||X9(c)||X9(p)||function(e){let t=[e];for(let e=0;e<t.length;e++){let r=t[e];for(let e of["test","consequent","alternate"]){let n=r[e];if(X9(n))return!0;"ConditionalExpression"===n.type&&t.push(n)}}return!1}(b))){h=!0,y=!0;let e=e=>[k6("("),v6([M6,e]),M6,k6(")")],t=e=>"NullLiteral"===e.type||"Literal"===e.type&&null===e.value||"Identifier"===e.type&&"undefined"===e.name;d.push(" ? ",t(c)?r(o):e(r(o))," : ",p.type===s.type||t(p)?r(u):e(r(u)))}else{let e=[L6,"? ",c.type===s.type?k6("","("):"",P6(2,r(o)),c.type===s.type?k6("",")"):"",L6,": ",p.type===s.type?r(u):P6(2,r(u))];d.push(f.type!==s.type||f[u]===s||m?e:t.useTabs?function(e){return P6(-1,e)}(v6(e)):P6(Math.max(0,t.tabWidth-2),e))}let S=[o,u,...l].some((e=>L7(s[e],(e=>w9(e)&&lee(t.originalText,b9(e),S9(e)))))),T=!h&&(i7(f)||"NGPipeExpression"===f.type&&f.left===s)&&!f.computed,E=function(e){let{node:t}=e;if("ConditionalExpression"!==t.type)return!1;let r,n=t;for(let t=0;!r;t++){let i=e.getParentNode(t);"ChainExpression"===i.type&&i.expression===n||n7(i)&&i.callee===n||i7(i)&&i.object===n||"TSNonNullExpression"===i.type&&i.expression===n?n=i:"NewExpression"===i.type&&i.callee===n||$7(i)&&i.expression===n?(r=e.getParentNode(t+1),n=i):r=i}return n!==t&&r[Vre.get(r.type)]===n}(e),v=(e=>f===x?A6(e,{shouldBreak:S}):S?[e,_6]:e)([$re(e,0,r),y?d:v6(d),a&&T&&!E?M6:""]);return m||E?A6([v6([M6,v]),M6]):v}var Kre=function(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n};var Jre=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:Kre(e.slice(r+1).match(/^[\t ]*/)[0],t)};var Wre=Symbol("MODE_BREAK"),Xre=Symbol("MODE_FLAT"),Hre=Symbol("cursor");function zre(e,t){return Yre(e,{type:"indent"},t)}function Gre(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?Yre(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:Yre(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function Yre(e,t,r){let n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,a=0,o=0;for(let e of n)switch(e.type){case"indent":c(),r.useTabs?u(1):l(r.tabWidth);break;case"stringAlign":c(),i+=e.n,s+=e.n.length;break;case"numberAlign":a+=1,o+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),{...e,value:i,length:s,queue:n};function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function l(e){i+=" ".repeat(e),s+=e}function c(){r.useTabs?(a>0&&u(a),d()):p()}function p(){o>0&&l(o),d()}function d(){a=0,o=0}}function Qre(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==Hre)for(let r=i.length-1;r>=0;r--){let s=i[r];if(" "!==s&&"\t"!==s){e[n]=i.slice(0,r+1);break e}t++}else r++}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Hre);return t}function Zre(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=[e],u=[];for(;r>=0;){if(0===o.length){if(0===a)return!0;o.push(t[--a]);continue}let{mode:e,doc:l}=o.pop();switch(g6(l)){case t6:u.push(l),r-=x9(l);break;case r6:case u6:{let t=q6(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case i6:case s6:case c6:case f6:o.push({mode:e,doc:l.contents});break;case a6:r+=Qre(u);break;case o6:{if(s&&l.break)return!1;let t=l.break?Wre:e,r=l.expandedStates&&t===Wre?V6(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case l6:{let t=(l.groupId?i[l.groupId]||Xre:e)===Wre?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case h6:if(e===Wre||l.hard)return!0;l.soft||(u.push(" "),r--);break;case p6:n=!0;break;case d6:if(n)return!1}}return!1}function ene(e,t){let r={},n=t.printWidth,i=function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:Wre,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];T6(e,(function(e){if(e.type===m6&&H6(r),e.type===o6){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===o6&&r.pop().break&&H6(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(g6(d)){case t6:{let e="\n"!==i?X7(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=x9(e));break}case r6:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case n6:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(Hre),c++;break;case i6:a.push({ind:zre(e,t),mode:p,doc:d.contents});break;case s6:a.push({ind:Gre(e,d.n,t),mode:p,doc:d.contents});break;case a6:s-=Qre(o);break;case o6:switch(p){case Xre:if(!u){a.push({ind:e,mode:d.break?Wre:Xre,doc:d.contents});break}case Wre:{u=!1;let t={ind:e,mode:Xre,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&Zre(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=V6(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:Wre,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:Wre,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:Xre,doc:t};if(Zre(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:Wre,doc:d.contents});break}}d.id&&(r[d.id]=V6(!1,a,-1).mode);break;case u6:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:Xre,doc:o},h={ind:e,mode:Wre,doc:o},f=Zre(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:Xre,doc:u},y={ind:e,mode:Wre,doc:u};if(2===i.length){f?a.push(m,c):a.push(y,h);break}i.splice(0,2);let g={ind:e,mode:p,doc:w6(i)},x=i[0];Zre({ind:e,mode:Xre,doc:[o,u,x]},[],t,l.length>0,r,!0)?a.push(g,m,c):f?a.push(g,y,c):a.push(g,y,h);break}case l6:case c6:{let t=d.groupId?r[d.groupId]:p;if(t===Wre){let t=d.type===l6?d.breakContents:d.negate?d.contents:v6(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===Xre){let t=d.type===l6?d.flatContents:d.negate?v6(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case p6:l.push({ind:e,mode:p,doc:d.contents});break;case d6:l.length>0&&a.push({ind:e,mode:p,doc:O6});break;case h6:switch(p){case Xre:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case Wre:if(l.length>0){a.push({ind:e,mode:p,doc:d},...l.reverse()),l.length=0;break}d.literal?e.root?(o.push(i,e.root.value),s=e.root.length):(o.push(i),s=0):(s-=Qre(o),o.push(i+e.value),s=e.length)}break;case f6:a.push({ind:e,mode:p,doc:d.contents});break;case m6:break;default:throw new b6(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(Hre);if(-1!==p){let e=o.indexOf(Hre,p+1),t=o.slice(0,p).join(""),r=o.slice(p+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}function tne(e,t,r){let{node:n}=e;if("TemplateLiteral"===n.type&&function({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return"TaggedTemplateExpression"===t.type&&t.quasi===e&&"MemberExpression"===t.tag.type&&"Identifier"===t.tag.property.type&&"each"===t.tag.property.name&&("Identifier"===t.tag.object.type&&r.test(t.tag.object.name)||"MemberExpression"===t.tag.object.type&&"Identifier"===t.tag.object.property.type&&("only"===t.tag.object.property.name||"skip"===t.tag.object.property.name)&&"Identifier"===t.tag.object.object.type&&r.test(t.tag.object.object.name))}(e)){let n=function(e,t,r){let{node:n}=e,i=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(i.length>1||i.some((e=>e.length>0))){t.__inJestEach=!0;let s=e.map(r,"expressions");t.__inJestEach=!1;let a=[],o=s.map((e=>"${"+ene(e,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}")),u=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<n.quasis.length;e++){let t=V6(!1,u,-1),r=o[e-1];t.cells.push(r),r.includes("\n")&&(t.hasLineBreak=!0),n.quasis[e].value.raw.includes("\n")&&u.push({hasLineBreak:!1,cells:[]})}let l=Math.max(i.length,...u.map((e=>e.cells.length))),c=Array.from({length:l}).fill(0),p=[{cells:i},...u.filter((e=>e.cells.length>0))];for(let{cells:e}of p.filter((e=>!e.hasLineBreak)))for(let[t,r]of e.entries())c[t]=Math.max(c[t],x9(r));return a.push(F6,"`",v6([B6,U6(B6,p.map((e=>U6(" | ",e.cells.map(((t,r)=>e.hasLineBreak?t:t+" ".repeat(c[r]-x9(t))))))))]),B6,"`"),a}}(e,r,t);if(n)return n}let i="expressions";"TSTemplateLiteralType"===n.type&&(i="types");let s=[],a=e.map(t,i),o=function(e){let t="expressions";"TSTemplateLiteralType"===e.type&&(t="types");let r=e[t];return 0!==r.length&&r.every((e=>{if(L7(e))return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if("ChainExpression"===e.type&&(e=e.expression),i7(e)){let t=e;for(;i7(t);)if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type||(t=t.object,L7(t)))return!1;return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))}(n);o&&(a=a.map((e=>ene(e,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted))),s.push(F6,"`");let u=0;return e.each((({index:e,node:l})=>{if(s.push(t()),l.tail)return;let{tabWidth:c}=r,p=l.value.raw,d=p.includes("\n")?Jre(p,c):u;u=d;let h=a[e];if(!o){let t=n[i][e];(L7(t)||i7(t)||"ConditionalExpression"===t.type||"SequenceExpression"===t.type||$7(t)||Y9(t))&&(h=[v6([M6,h]),M6])}let f=0===d&&p.endsWith("\n")?P6(Number.NEGATIVE_INFINITY,h):function(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=v6(n);n=P6(t%r,n),n=P6(Number.NEGATIVE_INFINITY,n)}return n}(h,d,c);s.push(A6(["${",f,F6,"}"]))}),"quasis"),s.push("`"),s}function rne(e,t){return e.map((e=>function(e,t){let{node:r}=e,n=t();return L7(r)&&(n=A6([v6([M6,n]),M6])),["${",n,F6,"}"]}(e,t)),"expressions")}function nne(e,t){return K6(e,(e=>"string"==typeof e?t?X7(!1,e,/(\\*)`/g,"$1$1\\`"):ine(e):e))}function ine(e){return X7(!1,e,/([\\`]|\${)/g,"\\$1")}var sne=function(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}};function ane(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function one(e,t){return"+"===e||"-"===e?e+t:t}var une=sne("typeParameters");function lne(e,t,r,n){let{node:i}=e;if(!i[n])return"";if(!Array.isArray(i[n]))return r(n);let s=e.getNode(2),a=s&&r7(s),o=e.match((e=>!(1===e[n].length&&K9(e[n][0]))),void 0,((e,t)=>"typeAnnotation"===t),(e=>"Identifier"===e.type),Jte);if(0===i[n].length||!o&&(a||1===i[n].length&&("NullableTypeAnnotation"===i[n][0].type||Zte(i[n][0]))))return["<",U6(", ",e.map(r,n)),cne(e,t),">"];let u="TSTypeParameterInstantiation"===i.type?"":function(e,t,r){let{node:n}=e;return 1===D7(n).length&&n.type.startsWith("TS")&&!n[r][0].constraint&&"ArrowFunctionExpression"===e.parent.type&&!(t.filepath&&/\.ts$/.test(t.filepath))}(e,t,n)?",":y7(t)?k6(","):"";return A6(["<",v6([M6,U6([",",L6],e.map(r,n))]),u,M6,">"],{id:une(i)})}function cne(e,t){let{node:r}=e;if(!L7(r,_7.Dangling))return"";let n=!L7(r,_7.Line),i=Y7(e,t,{indent:!n});return n?i:[i,B6]}function pne(e,t,r){let{node:n,parent:i}=e,s=["TSTypeParameter"===n.type&&n.const?"const ":""],a="TSTypeParameter"===n.type?r("name"):n.name;if("TSMappedType"===i.type)return i.readonly&&s.push(one(i.readonly,"readonly")," "),s.push("[",a),n.constraint&&s.push(" in ",r("constraint")),i.nameType&&s.push(" as ",e.callParent((()=>r("nameType")))),s.push("]"),s;if(n.variance&&s.push(r("variance")),n.in&&s.push("in "),n.out&&s.push("out "),s.push(a),n.bound&&(n.usesExtendsBound&&s.push(" extends "),s.push(cre(e,r,"bound"))),n.constraint){let e=Symbol("constraint");s.push(" extends",A6(v6(L6),{id:e}),F6,I6(r("constraint"),{groupId:e}))}return n.default&&s.push(" = ",r("default")),A6(s)}var dne=new Proxy((()=>{}),{get:()=>dne}),hne=dne,fne=new WeakMap;function mne(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if("consistent"===t.quoteProps&&!fne.has(i)){let e=(i.properties||i.body||i.members).some((e=>!e.computed&&e.key&&V9(e.key)&&!a7(e,t)));fne.set(i,e)}if(("Identifier"===s.type||U9(s)&&o7(Mte(f7(s)))&&String(s.value)===Mte(f7(s))&&"typescript"!==t.parser&&"babel-ts"!==t.parser)&&("json"===t.parser||"consistent"===t.quoteProps&&fne.get(i))){let r=Lte(JSON.stringify("Identifier"===s.type?s.name:s.value.toString()),t);return e.call((e=>Z7(e,r,t)),"key")}return a7(n,t)&&("as-needed"===t.quoteProps||"consistent"===t.quoteProps&&!fne.get(i))?e.call((e=>Z7(e,/^\d/.test(s.value)?Mte(s.value):s.value,t)),"key"):r("key")}var yne=e=>"FunctionExpression"===e.node.type&&"value"===e.key&&(e=>"ObjectMethod"===e.type||"ClassMethod"===e.type||"ClassPrivateMethod"===e.type||"MethodDefinition"===e.type||"TSAbstractMethodDefinition"===e.type||"TSDeclareMethod"===e.type||("Property"===e.type||"ObjectProperty"===e.type)&&(e.method||"get"===e.kind||"set"===e.kind))(e.parent);function gne(e,t,r,n){if(yne(e))return bne(e,r,t);let{node:i}=e,s=!1;if(("FunctionDeclaration"===i.type||"FunctionExpression"===i.type)&&null!=n&&n.expandLastArg){let{parent:t}=e;n7(t)&&(w7(t).length>1||D7(i).every((e=>"Identifier"===e.type&&!e.typeAnnotation)))&&(s=!0)}let a=[bre(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],o=Gte(e,t,r,s),u=Tne(e,t),l=Qte(i,u);return a.push(Ere(e,0,t),A6([l?A6(o):o,u]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&a.push(";"),a}function xne(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,a=[];return i&&"init"!==i&&"method"!==i&&"constructor"!==i?(hne.ok("get"===i||"set"===i),a.push(i," ")):s.async&&a.push("async "),s.generator&&a.push("*"),a.push(mne(e,t,r),n.optional||n.key.optional?"?":"",n===s?bne(e,t,r):r("value")),a}function bne(e,t,r){let{node:n}=e,i=Gte(e,r,t),s=Tne(e,r),a=function(e){let t=D7(e);return t.length>1&&t.some((e=>"TSParameterProperty"===e.type))}(n),o=Qte(n,s),u=[Ere(e,0,r),A6([a?A6(i,{shouldBreak:!0}):o?A6(i):i,s])];return n.body?u.push(" ",r("body")):u.push(t.semi?";":""),u}function Sne(e,t){if("always"===t.arrowParens)return!1;if("avoid"===t.arrowParens){let{node:t}=e;return function(e){let t=D7(e);return!(1!==t.length||e.typeParameters||L7(e,_7.Dangling)||"Identifier"!==t[0].type||t[0].typeAnnotation||L7(t[0])||t[0].optional||e.predicate||e.returnType)}(t)}return!1}function Tne(e,t){let{node:r}=e,n=[cre(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function Ene(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let e=r("argument");!function(e,t){if(s7(e.originalText,t)||L7(t,_7.Leading,(t=>lee(e.originalText,b9(t),S9(t))))&&!X9(t))return!0;if(_9(t)){let r,n=t;for(;r=O9(n);)if(n=r,s7(e.originalText,n))return!0}return!1}(t,n.argument)?(Y9(n.argument)||"SequenceExpression"===n.argument.type)&&(e=A6([k6("("),v6([M6,e]),M6,k6(")")])):e=["(",v6([B6,e]),B6,")"],s.push(" ",e)}let a=L7(n,_7.Dangling),o=i&&a&&L7(n,_7.Last|_7.Line);return o&&s.push(i),a&&s.push(" ",Y7(e,t)),o||s.push(i),s}var vne=C9(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Pne(e,t,r){let{node:n}=e,i=[bre(e),Tre(e),"class"],s=L7(n.id,_7.Trailing)||L7(n.typeParameters,_7.Trailing)||L7(n.superClass)||t9(n.extends)||t9(n.mixins)||t9(n.implements),a=[],o=[];if(n.id&&a.push(" ",r("id")),a.push(r("typeParameters")),n.superClass){let n=[kne(e,t,r),r("superTypeParameters")],i=e.call((e=>["extends ",Z7(e,n,t)]),"superClass");s?o.push(L6,A6(i)):o.push(" ",i)}else o.push(wne(e,t,r,"extends"));if(o.push(wne(e,t,r,"mixins"),wne(e,t,r,"implements")),s){let e;e=Cne(n)?[...a,v6(o)]:v6([...a,o]),i.push(A6(e,{id:Ane(n)}))}else i.push(...a,...o);return i.push(" ",r("body")),i}var Ane=sne("heritageGroup");function Dne(e){return k6(B6,"",{groupId:Ane(e)})}function Cne(e){return e.typeParameters&&!L7(e.typeParameters,_7.Trailing|_7.Line)&&!function(e){return["extends","mixins","implements"].reduce(((t,r)=>t+(Array.isArray(e[r])?e[r].length:0)),e.superClass?1:0)>1}(e)}function wne(e,t,r,n){let{node:i}=e;if(!t9(i[n]))return"";let s=Y7(e,t,{marker:n});return[Cne(i)?k6(" ",L6,{groupId:une(i.typeParameters)}):L6,s,s&&B6,n,A6(v6([L6,U6([",",L6],e.map(r,n))]))]}function kne(e,t,r){let n=r("superClass"),{parent:i}=e;return"AssignmentExpression"===i.type?A6(k6(["(",v6([M6,n]),M6,")"],n)):n}function Ine(e,t,r){let{node:n}=e,i=[];return t9(n.decorators)&&i.push(Cre(e,t,r)),i.push(Dre(n)),n.static&&i.push("static "),i.push(Tre(e)),n.override&&i.push("override "),i.push(xne(e,t,r)),i}function Nne(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";return t9(n.decorators)&&i.push(Cre(e,t,r)),i.push(Dre(n),bre(e)),n.static&&i.push("static "),i.push(Tre(e)),n.override&&i.push("override "),n.readonly&&i.push("readonly "),n.variance&&i.push(r("variance")),("ClassAccessorProperty"===n.type||"AccessorProperty"===n.type||"TSAbstractAccessorProperty"===n.type)&&i.push("accessor "),i.push(mne(e,t,r),yre(e),gre(e),cre(e,r)),[$te(e,t,r,i," =","TSAbstractPropertyDefinition"===n.type||"TSAbstractAccessorProperty"===n.type?void 0:"value"),s]}function Fne(e,t,r){let{node:n}=e,i=[];return e.each((({node:e,next:n,isLast:s})=>{i.push(r()),!t.semi&&vne(e)&&function(e,t){var r;let{type:n,name:i}=e.key;if(!(e.computed||"Identifier"!==n||"static"!==i&&"get"!==i&&"set"!==i||e.value||e.typeAnnotation))return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let e=null==(r=t.key)?void 0:r.name;if("in"===e||"instanceof"===e)return!0}if(vne(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||"get"===t.kind||"set"===t.kind)return!1;let e=t.value?t.value.generator:t.generator;return!(!t.computed&&!e)}case"TSIndexSignature":return!0}return!1}(e,n)&&i.push(";"),s||(i.push(B6),B7(e,t)&&i.push(B6))}),"body"),L7(n,_7.Dangling)&&i.push(Y7(e,t)),[t9(n.body)?Dne(e.parent):"","{",i.length>0?[v6([B6,i]),B6]:"","}"]}function _ne(e,t,r){var n;let i=t.semi?";":"",{node:s}=e,a="ObjectTypeAnnotation"===s.type,o="TSEnumDeclaration"===s.type||"EnumBooleanBody"===s.type||"EnumNumberBody"===s.type||"EnumStringBody"===s.type||"EnumSymbolBody"===s.type,u=["TSTypeLiteral"===s.type||o?"members":"TSInterfaceBody"===s.type?"body":"properties"];a&&u.push("indexers","callProperties","internalSlots");let l=u.flatMap((t=>e.map((({node:e})=>({node:e,printed:r(),loc:b9(e)})),t)));u.length>1&&l.sort(((e,t)=>e.loc-t.loc));let{parent:c,key:p}=e,d=a&&"body"===p&&("InterfaceDeclaration"===c.type||"DeclareInterface"===c.type||"DeclareClass"===c.type),h="TSInterfaceBody"===s.type||o||d||"ObjectPattern"===s.type&&"FunctionDeclaration"!==c.type&&"FunctionExpression"!==c.type&&"ArrowFunctionExpression"!==c.type&&"ObjectMethod"!==c.type&&"ClassMethod"!==c.type&&"ClassPrivateMethod"!==c.type&&"AssignmentPattern"!==c.type&&"CatchClause"!==c.type&&s.properties.some((e=>e.value&&("ObjectPattern"===e.value.type||"ArrayPattern"===e.value.type)))||"ObjectPattern"!==s.type&&l.length>0&&lee(t.originalText,b9(s),l[0].loc),f=d?";":"TSInterfaceBody"===s.type||"TSTypeLiteral"===s.type?k6(i,";"):",",m="RecordExpression"===s.type?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",g=[],x=l.map((e=>{let r=[...g,A6(e.printed)];return g=[f,L6],("TSPropertySignature"===e.node.type||"TSMethodSignature"===e.node.type||"TSConstructSignatureDeclaration"===e.node.type||"TSCallSignatureDeclaration"===e.node.type)&&L7(e.node,_7.PrettierIgnore)&&g.shift(),B7(e.node,t)&&g.push(B6),r}));if(s.inexact||s.hasUnknownMembers){let r;if(L7(s,_7.Dangling)){let n=L7(s,_7.Line);r=[Y7(e,t),n||d9(t.originalText,S9(V6(!1,M7(s),-1)))?B6:L6,"..."]}else r=["..."];x.push([...g,...r])}let b,S=null==(n=V6(!1,l,-1))?void 0:n.node,T=!(s.inexact||s.hasUnknownMembers||S&&("RestElement"===S.type||("TSPropertySignature"===S.type||"TSCallSignatureDeclaration"===S.type||"TSMethodSignature"===S.type||"TSConstructSignatureDeclaration"===S.type)&&L7(S,_7.PrettierIgnore)));if(0===x.length){if(!L7(s,_7.Dangling))return[m,y,cre(e,r)];b=A6([m,Y7(e,t,{indent:!0}),M6,y,yre(e),cre(e,r)])}else b=[d&&t9(s.properties)?Dne(c):"",m,v6([t.bracketSpacing?L6:M6,...x]),k6(T&&(","!==f||y7(t))?f:""),t.bracketSpacing?L6:M6,y,yre(e),cre(e,r)];return e.match((e=>"ObjectPattern"===e.type&&!t9(e.decorators)),One)||K9(s)&&(e.match(void 0,((e,t)=>"typeAnnotation"===t),((e,t)=>"typeAnnotation"===t),One)||e.match(void 0,((e,t)=>"FunctionTypeParam"===e.type&&"typeAnnotation"===t),One))||!h&&e.match((e=>"ObjectPattern"===e.type),(e=>"AssignmentExpression"===e.type||"VariableDeclarator"===e.type))?b:A6(b,{shouldBreak:h})}function One(e,t){return("params"===t||"parameters"===t||"this"===t||"rest"===t)&&Yte(e)}var Lne=new WeakMap;function Mne(e){return Lne.has(e)||Lne.set(e,"ConditionalExpression"===e.type&&!g7(e,(e=>"ObjectExpression"===e.type))),Lne.get(e)}var Bne=e=>"SequenceExpression"===e.type;function jne(e,t,r,n={}){let i,s,a=[],o=[],u=!1,l=!n.expandLastArg&&"ArrowFunctionExpression"===e.node.body.type;!function c(){let{node:p}=e,d=function(e,t,r,n){let{node:i}=e,s=[];if(i.async&&s.push("async "),Sne(e,t))s.push(r(["params",0]));else{let i=n.expandLastArg||n.expandFirstArg,a=Tne(e,r);if(i){if(X6(a))throw new Ete;a=A6(G6(a))}s.push(A6([Gte(e,r,t,i,!0),a]))}let a=Y7(e,t,{filter(e){let r=oee(t.originalText,S9(e));return!1!==r&&"=>"===t.originalText.slice(r,r+2)}});return a&&s.push(" ",a),s}(e,t,r,n);if(0===a.length)a.push(d);else{let{leading:r,trailing:n}=Q7(e,t);a.push([r,d]),o.unshift(n)}l&&(u||(u=p.returnType&&D7(p).length>0||p.typeParameters||D7(p).some((e=>"Identifier"!==e.type)))),l&&"ArrowFunctionExpression"===p.body.type?e.call(c,"body"):(i=r("body",n),s=p.body)}();let c,p=!s7(t.originalText,s)&&(Bne(s)||function(e,t,r){var n,i;return j9(e)||R9(e)||"ArrowFunctionExpression"===e.type||"DoExpression"===e.type||"BlockStatement"===e.type||X9(e)||!1!==(null==(n=t.label)?void 0:n.hug)&&((null==(i=t.label)?void 0:i.embed)||l7(e,r.originalText))}(s,i,t)||!u&&Mne(s)),d="callee"===e.key&&j7(e.parent),h=Symbol("arrow-chain"),f=function(e,t,{signatureDocs:r,shouldBreak:n}){if(1===r.length)return r[0];let{parent:i,key:s}=e;return"callee"!==s&&j7(i)||Y9(i)?A6([r[0]," =>",v6([L6,U6([" =>",L6],r.slice(1))])],{shouldBreak:n}):"callee"===s&&j7(i)||t.assignmentLayout?A6(U6([" =>",L6],r),{shouldBreak:n}):A6(v6(U6([" =>",L6],r)),{shouldBreak:n})}(e,n,{signatureDocs:a,shouldBreak:u}),m=!1;return l&&(d||n.assignmentLayout)&&(m=!0,c="chain-tail-arrow-chain"===n.assignmentLayout||d&&!p),i=function(e,t,r,{bodyDoc:n,bodyComments:i,functionBody:s,shouldPutBodyOnSameLine:a}){let{node:o,parent:u}=e,l=r.expandLastArg&&y7(t,"all")?k6(","):"",c=!r.expandLastArg&&"JSXExpressionContainer"!==u.type||L7(o)?"":M6;return a&&Mne(s)?[" ",A6([k6("","("),v6([M6,n]),k6("",")"),l,c]),i]:(Bne(s)&&(n=A6(["(",v6([M6,n]),M6,")"])),a?[" ",n,i]:[v6([L6,n,i]),l,c])}(e,t,n,{bodyDoc:i,bodyComments:o,functionBody:s,shouldPutBodyOnSameLine:p}),A6([A6(m?v6([M6,f]):f,{shouldBreak:c,id:h})," =>",l?I6(i,{groupId:h}):A6(i),l&&d?k6(M6,"",{groupId:h}):""])}function Rne(e,t,r,n){let{node:i}=e,s=[],a=function(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if("EmptyStatement"!==r.type)return r}}(i[n]);return e.each((({node:e})=>{"EmptyStatement"!==e.type&&(s.push(r()),e!==a&&(s.push(B6),B7(e,t)&&s.push(B6)))}),n),s}function Une(e,t,r){let{node:n}=e,i=[];"StaticBlock"===n.type&&i.push("static "),i.push("{");let s=$ne(e,t,r);if(s)i.push(v6([B6,s]),B6);else{let{parent:t}=e,r=e.grandparent;"ArrowFunctionExpression"===t.type||"FunctionExpression"===t.type||"FunctionDeclaration"===t.type||"ObjectMethod"===t.type||"ClassMethod"===t.type||"ClassPrivateMethod"===t.type||"ForStatement"===t.type||"WhileStatement"===t.type||"DoWhileStatement"===t.type||"DoExpression"===t.type||"CatchClause"===t.type&&!r.finalizer||"TSModuleDeclaration"===t.type||"TSDeclareFunction"===t.type||"StaticBlock"===n.type||i.push(B6)}return i.push("}"),i}function $ne(e,t,r){var n;let{node:i}=e,s=t9(i.directives),a=i.body.some((e=>"EmptyStatement"!==e.type)),o=L7(i,_7.Dangling);if(!s&&!a&&!o)return"";let u=[];return s&&(u.push(Rne(e,t,r,"directives")),(a||o)&&(u.push(B6),B7(V6(!1,i.directives,-1),t)&&u.push(B6))),a&&u.push(Rne(e,t,r,"body")),o&&u.push(Y7(e,t)),"Program"===i.type&&"ModuleExpression"!==(null==(n=e.parent)?void 0:n.type)&&u.push(B6),u}function Vne(e,t){if(t.semi||Kne(e,t)||Wne(e,t))return!1;let{node:r,key:n,parent:i}=e;return!("ExpressionStatement"!==r.type||("body"!==n||"Program"!==i.type&&"BlockStatement"!==i.type&&"StaticBlock"!==i.type&&"TSModuleBlock"!==i.type)&&("consequent"!==n||"SwitchCase"!==i.type)||!e.call((()=>qne(e,t)),"expression"))}function qne(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!Sne(e,t))return!0;break;case"UnaryExpression":{let{prefix:e,operator:t}=r;if(e&&("+"===t||"-"===t))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(X9(r))return!0}return!!W7(e,t)||!!_9(r)&&e.call((()=>qne(e,t)),...L9(r))}function Kne({node:e,parent:t},r){return("markdown"===r.parentParser||"mdx"===r.parentParser)&&"ExpressionStatement"===e.type&&X9(e.expression)&&"Program"===t.type&&1===t.body.length}function Jne(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return Jne(e.object)}return!1;case"Identifier":return!0;default:return!1}}function Wne({node:e,parent:t},r){return("__vue_event_binding"===r.parser||"__vue_ts_event_binding"===r.parser)&&"ExpressionStatement"===e.type&&"Program"===t.type&&1===t.body.length}function Xne(e,t,r){let n=[r("expression")];return Wne(e,t)?Jne(e.node.expression)&&n.push(";"):Kne(e,t)||t.semi&&n.push(";"),L7(e.node,_7.Dangling,(({marker:e})=>e===U7))&&n.push(" ",Y7(e,t,{marker:U7})),n}function Hne(e,t,r,n){let{node:i}=e;if(Ute(i))return function(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return jte(r);case"BigIntLiteral":return Bte(r.extra.raw);case"NumericLiteral":return Mte(r.extra.raw);case"StringLiteral":return Q6(Lte(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Mte(r.value)+"m";case"DirectiveLiteral":return Rte(r.extra.raw,t);case"Literal":{if(r.regex)return jte(r.regex);if(r.bigint)return Bte(r.raw);if(r.decimal)return Mte(r.decimal)+"m";let{value:n}=r;return"number"==typeof n?Mte(r.raw):"string"==typeof n?function(e){if("expression"!==e.key)return;let{parent:t}=e;return"ExpressionStatement"===t.type&&t.directive}(e)?Rte(r.raw,t):Q6(Lte(r.raw,t)):String(n)}}}(e,t);let s=t.semi?";":"",a=[];switch(i.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),B6];case"File":return function(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(1===n.length)return n[0];let i=U6([",",L6],n);return t.__isVueForBindingLeft?["(",v6([M6,A6(i)]),M6,")"]:i}if(t.__isEmbeddedTypescriptGenericParameters){let t=e.map(r,"program","body",0,"typeParameters","params");return U6([",",L6],t)}}(e,t,r)??r("program");case"Program":return $ne(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return Xne(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return L7(i.expression)||!R9(i.expression)&&!j9(i.expression)?A6(["(",v6([M6,r("expression")]),M6,")"]):["(",r("expression"),")"];case"AssignmentExpression":return function(e,t,r){let{node:n}=e;return $te(e,t,r,r("left"),[" ",n.operator],"right")}(e,t,r);case"VariableDeclarator":return function(e,t,r){return $te(e,t,r,r("id")," =","init")}(e,t,r);case"BinaryExpression":case"LogicalExpression":return xte(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return function(e,t,r){var n;let i=r("object"),s=Nte(e,0,r),{node:a,parent:o}=e,u=e.findAncestor((e=>!(i7(e)||"TSNonNullExpression"===e.type))),l=u&&("NewExpression"===u.type||"BindExpression"===u.type||"AssignmentExpression"===u.type&&"Identifier"!==u.left.type)||a.computed||"Identifier"===a.object.type&&"Identifier"===a.property.type&&!i7(o)||("AssignmentExpression"===o.type||"VariableDeclarator"===o.type)&&(n7(a.object)&&a.object.arguments.length>0||"TSNonNullExpression"===a.object.type&&n7(a.object.expression)&&a.object.expression.arguments.length>0||(null==(n=i.label)?void 0:n.memberChain));return $6(i.label,[i,l?s:A6(v6([M6,s]))])}(e,0,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&a.push(r("object")),a.push(A6(v6([M6,vre(0,0,r)]))),a;case"Identifier":return[i.name,yre(e),gre(e),cre(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return Are(e,r);case"FunctionDeclaration":case"FunctionExpression":return gne(e,r,t,n);case"ArrowFunctionExpression":return jne(e,t,r,n);case"YieldExpression":return a.push("yield"),i.delegate&&a.push("*"),i.argument&&a.push(" ",r("argument")),a;case"AwaitExpression":if(a.push("await"),i.argument){a.push(" ",r("argument"));let{parent:t}=e;if(n7(t)&&t.callee===i||i7(t)&&t.object===i){a=[v6([M6,...a]),M6];let t=e.findAncestor((e=>"AwaitExpression"===e.type||"BlockStatement"===e.type));if("AwaitExpression"!==(null==t?void 0:t.type)||!g7(t.argument,(e=>e===i)))return A6(a)}}return a;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return Fre(e,t,r);case"ImportDeclaration":return function(e,t,r){let{node:n}=e;return["import",n.module?" module":"",Lre(n),Bre(e,t,r),Mre(e,t,r),Rre(e,t,r),t.semi?";":""]}(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Ure(e,0,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return Une(e,t,r);case"ClassBody":return Fne(e,t,r);case"ThrowStatement":return function(e,t,r){return["throw",Ene(e,t,r)]}(e,t,r);case"ReturnStatement":return function(e,t,r){return["return",Ene(e,t,r)]}(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return _te(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return _ne(e,t,r);case"ObjectProperty":case"Property":return i.method||"get"===i.kind||"set"===i.kind?xne(e,t,r):function(e,t,r){let{node:n}=e;return n.shorthand?r("value"):$te(e,t,r,mne(e,t,r),":","value")}(e,t,r);case"ObjectMethod":return xne(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return vte(e,t,r);case"SequenceExpression":{let{parent:t}=e;if("ExpressionStatement"===t.type||"ForStatement"===t.type){let t=[];return e.each((({isFirst:e})=>{e?t.push(r()):t.push(",",v6([L6,r()]))}),"expressions"),A6(t)}return A6(U6([",",L6],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),s];case"UnaryExpression":return a.push(i.operator),/[a-z]$/.test(i.operator)&&a.push(" "),L7(i.argument)?a.push(A6(["(",v6([M6,r("argument")]),M6,")"])):a.push(r("argument")),a;case"UpdateExpression":return a.push(r("argument"),i.operator),i.prefix&&a.reverse(),a;case"ConditionalExpression":return qre(e,t,r);case"VariableDeclaration":{let t,n=e.map(r,"declarations"),o=e.parent,u="ForStatement"===o.type||"ForInStatement"===o.type||"ForOfStatement"===o.type,l=i.declarations.some((e=>e.init));return 1!==n.length||L7(i.declarations[0])?n.length>0&&(t=v6(n[0])):t=n[0],a=[bre(e),i.kind,t?[" ",t]:"",v6(n.slice(1).map((e=>[",",l&&!u?B6:L6,e])))],u&&o.body!==i||a.push(s),A6(a)}case"WithStatement":return A6(["with (",r("object"),")",Pre(i.body,r("body"))]);case"IfStatement":{let n=Pre(i.consequent,r("consequent")),s=A6(["if (",A6([v6([M6,r("test")]),M6]),")",n]);if(a.push(s),i.alternate){let n=L7(i.consequent,_7.Trailing|_7.Line)||c7(i),s="BlockStatement"===i.consequent.type&&!n;a.push(s?" ":B6),L7(i,_7.Dangling)&&a.push(Y7(e,t),n?B6:" "),a.push("else",A6(Pre(i.alternate,r("alternate"),"IfStatement"===i.alternate.type)))}return a}case"ForStatement":{let n=Pre(i.body,r("body")),s=Y7(e,t),a=s?[s,M6]:"";return i.init||i.test||i.update?[a,A6(["for (",A6([v6([M6,r("init"),";",L6,r("test"),";",L6,r("update")]),M6]),")",n])]:[a,A6(["for (;;)",n])]}case"WhileStatement":return A6(["while (",A6([v6([M6,r("test")]),M6]),")",Pre(i.body,r("body"))]);case"ForInStatement":return A6(["for (",r("left")," in ",r("right"),")",Pre(i.body,r("body"))]);case"ForOfStatement":return A6(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",Pre(i.body,r("body"))]);case"DoWhileStatement":return a=[A6(["do",Pre(i.body,r("body"))])],"BlockStatement"===i.body.type?a.push(" "):a.push(B6),a.push("while (",A6([v6([M6,r("test")]),M6]),")",s),a;case"DoExpression":return[i.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return a.push("BreakStatement"===i.type?"break":"continue"),i.label&&a.push(" ",r("label")),a.push(s),a;case"LabeledStatement":return"EmptyStatement"===i.body.type?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),i.handler?[" ",r("handler")]:"",i.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(i.param){let e=L7(i.param,(e=>!w9(e)||e.leading&&d9(t.originalText,S9(e))||e.trailing&&d9(t.originalText,b9(e),{backwards:!0}))),n=r("param");return["catch ",e?["(",v6([M6,n]),M6,") "]:["(",n,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[A6(["switch (",v6([M6,r("discriminant")]),M6,")"])," {",i.cases.length>0?v6([B6,U6(B6,e.map((({node:e,isLast:n})=>[r(),!n&&B7(e,t)?B6:""]),"cases"))]):"",B6,"}"];case"SwitchCase":{i.test?a.push("case ",r("test"),":"):a.push("default:"),L7(i,_7.Dangling)&&a.push(" ",Y7(e,t));let n=i.consequent.filter((e=>"EmptyStatement"!==e.type));if(n.length>0){let i=Rne(e,t,r,"consequent");a.push(1===n.length&&"BlockStatement"===n[0].type?[" ",i]:v6([B6,i]))}return a}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return Pne(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return Ine(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return Nne(e,t,r);case"TemplateElement":return Q6(i.value.raw);case"TemplateLiteral":return tne(e,r,t);case"TaggedTemplateExpression":return function(e){let t=e("quasi");return $6(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),F6,t])}(r);case"PrivateIdentifier":return["#",i.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{a.push("module {");let e=r("body");return e&&a.push(v6([B6,e]),B6),a.push("}"),a}default:throw new tee(i,"ESTree")}}function zne(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),L7(n.node)?" //"+M7(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return xte(e,t,r);case"NGChainedExpression":return A6(U6([";",L6],e.map((()=>function({node:e}){return F9(e,Yne)}(e)?r():["(",r(),")"]),"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map((()=>[e.isFirst?"":Gne(e)?" ":[";",L6],r()]),"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),null===n.alias?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:t,parent:i}=e,s=Gne(e)||(1===t&&("then"===n.key.name||"else"===n.key.name)||2===t&&"else"===n.key.name&&"NGMicrosyntaxKeyedExpression"===i.body[t-1].type&&"then"===i.body[t-1].key.name)&&"NGMicrosyntaxExpression"===i.body[0].type;return[r("key"),s?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),null===n.value?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new tee(n,"Angular")}}function Gne({node:e,index:t,parent:r}){return"NGMicrosyntaxKeyedExpression"===e.type&&"of"===e.key.name&&1===t&&"NGMicrosyntaxLet"===r.body[0].type&&null===r.body[0].value}var Yne=C9(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function Qne(e,t,r){let{node:n}=e,i=[bre(e),"interface"],s=[],a=[];"InterfaceTypeAnnotation"!==n.type&&s.push(" ",r("id"),r("typeParameters"));let o=n.typeParameters&&!L7(n.typeParameters,_7.Trailing|_7.Line);return t9(n.extends)&&a.push(o?k6(" ",L6,{groupId:une(n.typeParameters)}):L6,"extends ",(1===n.extends.length?m7:v6)(U6([",",L6],e.map(r,"extends")))),L7(n.id,_7.Trailing)||t9(n.extends)?o?i.push(A6([...s,v6(a)])):i.push(A6(v6([...s,...a]))):i.push(...s,...a),i.push(" ",r("body")),A6(i)}function Zne(e,t,r){return _ne(e,r,t)}function eie(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let i="";return r.initializer&&(i=t("initializer")),r.init&&(i=t("init")),i?[n," = ",i]:n}function tie(e,t,r){let{node:n}=e;return[bre(e),n.const?"const ":"","enum ",t("id")," ","TSEnumDeclaration"===n.type?Zne(e,t,r):t("body")]}function rie(e,t,r){let{node:n}=e;if(I9(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"DeclareClass":return Pne(e,t,r);case"DeclareFunction":return[bre(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",cre(e,r),i];case"DeclareVariable":return[bre(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return Fre(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return function(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[bre(e),"opaque type ",r("id"),r("typeParameters")];return i.supertype&&s.push(": ",r("supertype")),i.impltype&&s.push(" = ",r("impltype")),s.push(n),s}(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return ere(e,t,r);case"IntersectionTypeAnnotation":return tre(e,0,r);case"UnionTypeAnnotation":return rre(e,t,r);case"ConditionalTypeAnnotation":return qre(e,t,r);case"InferTypeAnnotation":return sre(0,0,r);case"FunctionTypeAnnotation":return nre(e,t,r);case"TupleTypeAnnotation":return vte(e,t,r);case"TupleTypeLabeledElement":return ure(e,0,r);case"TupleTypeSpreadElement":return ore(e,0,r);case"GenericTypeAnnotation":return[r("id"),lne(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return ire(e,0,r);case"TypeAnnotation":return dre(e,0,r);case"TypeParameter":return pne(e,0,r);case"TypeofTypeAnnotation":return fre(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return hre(r);case"DeclareEnum":case"EnumDeclaration":return tie(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return function(e,t,r){let n,{node:i}=e;if("EnumSymbolBody"===i.type||i.explicitType)switch(i.type){case"EnumBooleanBody":n="boolean";break;case"EnumNumberBody":n="number";break;case"EnumStringBody":n="string";break;case"EnumSymbolBody":n="symbol"}return[n?`of ${n} `:"",Zne(e,t,r)]}(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return eie(e,r);case"FunctionTypeParam":{let t=n.name?r("name"):e.parent.this===n?"this":"";return[t,yre(e),t?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return Qne(e,0,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:e}=n;return hne.ok("plus"===e||"minus"===e),"plus"===e?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return function(e,t,r){let{node:n}=e;return A6([n.variance?r("variance"):"","[",v6([r("keyTparam")," in ",r("sourceType")]),"]",ane(n.optional),": ",r("propType")])}(e,0,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let i="";return n.proto?i="proto ":n.static&&(i="static "),[i,H9(n)?n.kind+" ":"",n.variance?r("variance"):"",mne(e,t,r),yre(e),z9(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return _ne(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",yre(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return Are(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return Q6(Lte(f7(n),t));case"NumberLiteralTypeAnnotation":return Mte(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return Bte(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),cre(e,r),")"];case"TypePredicate":return mre(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return lne(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return["predicate"!==e.key||"DeclareFunction"===e.parent.type||e.parent.returnType?" ":": ","%checks",..."DeclaredPredicate"===n.type?["(",r("value"),")"]:[]]}}function nie(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if(N9(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",a=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let e=!(j9(i.expression)||R9(i.expression)),t=A6(["<",v6([M6,r("typeAnnotation")]),M6,">"]),n=[k6("("),v6([M6,r("expression")]),M6,k6(")")];return e?C6([[t,r("expression")],[t,A6(n,{shouldBreak:!0})],[t,r("expression")]]):A6([t,r("expression")])}case"TSDeclareFunction":return gne(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Une(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return _ne(e,t,r);case"TSTypeAliasDeclaration":return ere(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Ine(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Nne(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return tne(e,r,t);case"TSNamedTupleMember":return ure(e,0,r);case"TSRestType":return ore(e,0,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return Qne(e,0,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return lne(e,t,r,"params");case"TSTypeParameter":return pne(e,0,r);case"TSAsExpression":case"TSSatisfiesExpression":{let t="TSAsExpression"===i.type?"as":"satisfies";a.push(r("expression"),` ${t} `,r("typeAnnotation"));let{parent:n}=e;return n7(n)&&n.callee===i||i7(n)&&n.object===i?A6([v6([M6,...a]),M6]):a}case"TSArrayType":return hre(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",mne(e,t,r),yre(e),cre(e,r)];case"TSParameterProperty":return[Dre(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return fre(e,r);case"TSIndexSignature":{let n=i.parameters.length>1?k6(y7(t)?",":""):"",a=A6([v6([M6,U6([", ",M6],e.map(r,"parameters"))]),n,M6]),o="ClassBody"===e.parent.type&&"body"===e.key;return[o&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?a:"","]",cre(e,r),o?s:""]}case"TSTypePredicate":return mre(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r("argument"),")",i.qualifier?[".",r("qualifier")]:"",lne(e,t,r,i.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return ire(e,0,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return function(e,t,r){let{node:n}=e,i=lee(t.originalText,b9(n),b9(n.typeParameter));return A6(["{",v6([t.bracketSpacing?L6:M6,A6([r("typeParameter"),n.optional?one(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?k6(";"):""]),Y7(e,t),t.bracketSpacing?L6:M6,"}"],{shouldBreak:i})}(e,t,r);case"TSMethodSignature":{let n=i.kind&&"method"!==i.kind?`${i.kind} `:"";a.push(Dre(i),n,i.computed?"[":"",r("key"),i.computed?"]":"",yre(e));let s=Gte(e,r,t,!1,!0),o=i.returnType?"returnType":"typeAnnotation",u=i[o],l=u?cre(e,r,o):"",c=Qte(i,l);return a.push(c?A6(s):s),u&&a.push(A6(l)),A6(a)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return tie(e,r,t);case"TSEnumMember":return eie(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",Lre(i,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:o}=e,u="TSModuleDeclaration"===o.type,l="TSModuleDeclaration"===(null==(n=i.body)?void 0:n.type);if(u)a.push(".");else if(a.push(bre(e)),"global"!==i.kind&&!i.global){let e=i.kind??(V9(i.id)||/(?:^|\s)module(?:\s|$)/.test(t.originalText.slice(b9(i),b9(i.id)))?"module":"namespace");a.push(e," ")}return a.push(r("id")),l?a.push(r("body")):i.body?a.push(" ",A6(r("body"))):a.push(s),a}case"TSConditionalType":return qre(e,t,r);case"TSInferType":return sre(0,0,r);case"TSIntersectionType":return tre(e,0,r);case"TSUnionType":return rre(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return nre(e,t,r);case"TSTupleType":return vte(e,t,r);case"TSTypeReference":return[r("typeName"),lne(e,t,r,"typeParameters")];case"TSTypeAnnotation":return dre(e,0,r);case"TSEmptyBodyFunctionExpression":return bne(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return are(e,r,"?");case"TSJSDocNonNullableType":return are(e,r,"!");default:throw new tee(i,"TypeScript")}}var iie=C9(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);var sie=function(e,t,r,n){var i;e.isRoot&&(null==(i=t.__onHtmlBindingRoot)||i.call(t,e.node,t));let s=function(e,t,r,n){if(yte(e))return e6(e,t);for(let i of[zne,fte,rie,nie,Hne]){let s=i(e,t,r,n);if(void 0!==s)return s}}(e,t,r,n);if(!s)return"";let{node:a}=e;if(iie(a))return s;let o=t9(a.decorators),u=function(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!t9(s)||Ire(i)||yte(e))return"";let a="ClassExpression"===n.type||"ClassDeclaration"===n.type||kre(n,t);return["declaration"===e.key&&B9(i)?B6:a?_6:"",U6(L6,e.map(r,"decorators")),L6]}(e,t,r),l="ClassExpression"===a.type;if(o&&!l)return e9(s,(e=>A6([u,e])));let c=W7(e,t),p=Vne(e,t);return u||c||p?e9(s,(e=>[p?";":"",c?"(":"",c&&l&&o?[v6([L6,u,e]),L6]:[u,e],c?")":""])):s},aie=[(e,t)=>"ObjectExpression"===e.type&&"properties"===t,(e,t)=>"CallExpression"===e.type&&"Identifier"===e.callee.type&&"Component"===e.callee.name&&"arguments"===t,(e,t)=>"Decorator"===e.type&&"expression"===t];function oie(e,t){return L7(e,_7.Block|_7.Leading,(({value:e})=>e===` ${t} `))}async function uie(e,t,r){let{node:n}=r,i=n.quasis.map((e=>e.value.raw)),s=0,a=i.reduce(((e,t,r)=>0===r?t:e+"@prettier-placeholder-"+s+++"-id"+t),""),o=function(e,t){if(!t9(t))return e;let r=0,n=K6(Y6(e),(e=>"string"==typeof e&&e.includes("@prettier-placeholder")?e.split(/@prettier-placeholder-(\d+)-id/).map(((e,n)=>n%2==0?Q6(e):(r++,t[e]))):e));return t.length===r?n:null}(await e(a,{parser:"scss"}),rne(r,t));if(!o)throw new Error("Couldn't insert all the expressions");return["`",v6([B6,o]),M6,"`"]}function lie(e){return"Identifier"===e.type&&"styled"===e.name}function cie(e){return/^[A-Z]/.test(e.object.name)&&"extend"===e.property.name}var pie=function(e){if(function({node:e,parent:t,grandparent:r}){return r&&e.quasis&&"JSXExpressionContainer"===t.type&&"JSXElement"===r.type&&"style"===r.openingElement.name.name&&r.openingElement.attributes.some((e=>"jsx"===e.name.name))||"TaggedTemplateExpression"===(null==t?void 0:t.type)&&"Identifier"===t.tag.type&&"css"===t.tag.name||"TaggedTemplateExpression"===(null==t?void 0:t.type)&&"MemberExpression"===t.tag.type&&"css"===t.tag.object.name&&("global"===t.tag.property.name||"resolve"===t.tag.property.name)}(e)||function({parent:e}){if(!e||"TaggedTemplateExpression"!==e.type)return!1;let t="ParenthesizedExpression"===e.tag.type?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return lie(t.object)||cie(t);case"CallExpression":return lie(t.callee)||"MemberExpression"===t.callee.type&&("MemberExpression"===t.callee.object.type&&(lie(t.callee.object.object)||cie(t.callee.object))||"CallExpression"===t.callee.object.type&&lie(t.callee.object.callee));case"Identifier":return"css"===t.name;default:return!1}}(e)||function({parent:e,grandparent:t}){return"JSXAttribute"===(null==t?void 0:t.type)&&"JSXExpressionContainer"===e.type&&"JSXIdentifier"===t.name.type&&"css"===t.name.name}(e)||function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>j9(e)&&"elements"===t),((e,t)=>R7(e)&&"Identifier"===e.key.type&&"styles"===e.key.name&&"value"===t),...aie)}(e))return uie};async function die(e,t,r){let{node:n}=r,i=n.quasis.length,s=rne(r,t),a=[];for(let t=0;t<i;t++){let r=0===t,o=t===i-1,u=n.quasis[t].value.cooked,l=u.split("\n"),c=l.length,p=s[t],d=c>2&&""===l[0].trim()&&""===l[1].trim(),h=c>2&&""===l[c-1].trim()&&""===l[c-2].trim(),f=l.every((e=>/^\s*(?:#[^\n\r]*)?$/.test(e)));if(!o&&/#[^\n\r]*$/.test(l[c-1]))return null;let m=null;m=f?hie(l):await e(u,{parser:"graphql"}),m?(m=nne(m,!1),!r&&d&&a.push(""),a.push(m),!o&&h&&a.push("")):!r&&!o&&d&&a.push(""),p&&a.push(p)}return["`",v6([B6,U6(B6,a)]),B6,"`"]}function hie(e){let t=[],r=!1,n=e.map((e=>e.trim()));for(let[e,i]of n.entries())""!==i&&(""===n[e-1]&&r?t.push([B6,i]):t.push(i),r=!0);return 0===t.length?null:U6(B6,t)}var fie=function(e){if(function({node:e,parent:t}){return oie(e,"GraphQL")||t&&("TaggedTemplateExpression"===t.type&&("MemberExpression"===t.tag.type&&"graphql"===t.tag.object.name&&"experimental"===t.tag.property.name||"Identifier"===t.tag.type&&("gql"===t.tag.name||"graphql"===t.tag.name))||"CallExpression"===t.type&&"Identifier"===t.callee.type&&"graphql"===t.callee.name)}(e))return die},mie=0;async function yie(e,t,r,n,i){let{node:s}=n,a=mie;mie=mie+1>>>0;let o=e=>`PRETTIER_HTML_PLACEHOLDER_${e}_${a}_IN_JS`,u=s.quasis.map(((e,t,r)=>t===r.length-1?e.value.cooked:e.value.cooked+o(t))).join(""),l=rne(n,r),c=new RegExp(o("(\\d+)"),"g"),p=0,d=await t(u,{parser:e,__onHtmlRoot(e){p=e.children.length}}),h=K6(d,(e=>{if("string"!=typeof e)return e;let t=[],r=e.split(c);for(let e=0;e<r.length;e++){let n=r[e];if(e%2==0){n&&(n=ine(n),i.__embeddedInHtml&&(n=X7(!1,n,/<\/(?=script\b)/gi,"<\\/")),t.push(n));continue}let s=Number(n);t.push(l[s])}return t})),f=/^\s/.test(u)?" ":"",m=/\s$/.test(u)?" ":"",y="ignore"===i.htmlWhitespaceSensitivity?B6:f&&m?L6:null;return y?A6(["`",v6([y,A6(h)]),y,"`"]):$6({hug:!1},A6(["`",f,p>1?v6(A6(h)):A6(h),m,"`"]))}var gie=yie.bind(void 0,"html"),xie=yie.bind(void 0,"angular");var bie=function(e){return function(e){return oie(e.node,"HTML")||e.match((e=>"TemplateLiteral"===e.type),((e,t)=>"TaggedTemplateExpression"===e.type&&"Identifier"===e.tag.type&&"html"===e.tag.name&&"quasi"===t))}(e)?gie:function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>R7(e)&&"Identifier"===e.key.type&&"template"===e.key.name&&"value"===t),...aie)}(e)?xie:void 0};async function Sie(e,t,r){let{node:n}=r,i=X7(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,((e,t)=>"\\".repeat(t.length/2)+"`")),s=function(e){let t=e.match(/^([^\S\n]*)\S/m);return null===t?"":t[1]}(i),a=""!==s;a&&(i=X7(!1,i,new RegExp(`^${s}`,"gm"),""));let o=nne(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",a?v6([M6,o]):[j6,D6(o)],M6,"`"]}var Tie=function(e){if(function({node:e,parent:t}){return"TaggedTemplateExpression"===(null==t?void 0:t.type)&&1===e.quasis.length&&"Identifier"===t.tag.type&&("md"===t.tag.name||"markdown"===t.tag.name)}(e))return Sie};var Eie=function(e){let t,{node:r}=e;if("TemplateLiteral"===r.type&&!function({quasis:e}){return e.some((({value:{cooked:e}})=>null===e))}(r))for(let n of[pie,fie,bie,Tie])if(t=n(e),t)return 1===r.quasis.length&&""===r.quasis[0].value.raw.trim()?"``":async(...e)=>{let r=await t(...e);return r&&$6({embed:!0,...r.label},r)}},vie=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Pie=e=>{for(let t of e.quasis)delete t.value};function Aie(e,t,r){var n,i;if("Program"===e.type&&delete t.sourceType,("BigIntLiteral"===e.type||"BigIntLiteralTypeAnnotation"===e.type)&&t.value&&(t.value=t.value.toLowerCase()),("BigIntLiteral"===e.type||"Literal"===e.type)&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),"DecimalLiteral"===e.type&&(t.value=Number(t.value)),"Literal"===e.type&&t.decimal&&(t.decimal=Number(t.decimal)),"EmptyStatement"===e.type||"JSXText"===e.type||"JSXExpressionContainer"===e.type&&("Literal"===e.expression.type||"StringLiteral"===e.expression.type)&&" "===e.expression.value)return null;if(("Property"===e.type||"ObjectProperty"===e.type||"MethodDefinition"===e.type||"ClassProperty"===e.type||"ClassMethod"===e.type||"PropertyDefinition"===e.type||"TSDeclareMethod"===e.type||"TSPropertySignature"===e.type||"ObjectTypeProperty"===e.type)&&"object"==typeof e.key&&e.key&&("Literal"===e.key.type||"NumericLiteral"===e.key.type||"StringLiteral"===e.key.type||"Identifier"===e.key.type)&&delete t.key,"JSXElement"===e.type&&"style"===e.openingElement.name.name&&e.openingElement.attributes.some((e=>"JSXAttribute"===e.type&&"jsx"===e.name.name)))for(let{type:e,expression:r}of t.children)"JSXExpressionContainer"===e&&"TemplateLiteral"===r.type&&Pie(r);"JSXAttribute"===e.type&&"css"===e.name.name&&"JSXExpressionContainer"===e.value.type&&"TemplateLiteral"===e.value.expression.type&&Pie(t.value.expression),"JSXAttribute"===e.type&&"Literal"===(null==(n=e.value)?void 0:n.type)&&/["']|"|'/.test(e.value.value)&&(t.value.value=X7(!1,t.value.value,/["']|"|'/g,'"'));let s=e.expression||e.callee;if("Decorator"===e.type&&"CallExpression"===s.type&&"Component"===s.callee.name&&1===s.arguments.length){let r=e.expression.arguments[0].properties;for(let[e,n]of t.expression.arguments[0].properties.entries())switch(r[e].key.name){case"styles":j9(n.value)&&Pie(n.value.elements[0]);break;case"template":"TemplateLiteral"===n.value.type&&Pie(n.value)}}if("TaggedTemplateExpression"===e.type&&("MemberExpression"===e.tag.type||"Identifier"===e.tag.type&&("gql"===e.tag.name||"graphql"===e.tag.name||"css"===e.tag.name||"md"===e.tag.name||"markdown"===e.tag.name||"html"===e.tag.name)||"CallExpression"===e.tag.type)&&Pie(t.quasi),"TemplateLiteral"===e.type&&(null!=(i=e.leadingComments)&&i.some((e=>w9(e)&&["GraphQL","HTML"].some((t=>e.value===` ${t} `))))||"CallExpression"===r.type&&"graphql"===r.callee.name||!e.leadingComments)&&Pie(t),("TSIntersectionType"===e.type||"TSUnionType"===e.type)&&1===e.types.length)return t.types[0];"ChainExpression"===e.type&&"TSNonNullExpression"===e.expression.type&&([t.type,t.expression.type]=[t.expression.type,t.type])}Aie.ignoredProperties=vie;var Die=Aie,Cie=((e,t,r)=>(r=null!=e?V8(W8(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of J8(t))!X8.call(e,i)&&i!==r&&q8(e,i,{get:()=>t[i],enumerable:!(n=K8(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:q8(r,"default",{value:e,enumerable:!0}),e)))(Y8(),1);var wie=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};function kie(e){let{shebang:t,text:r,pragmas:n,comments:i}=function(e){let t=wie(e);t&&(e=e.slice(t.length+1));let r=(0,Cie.extract)(e),{pragmas:n,comments:i}=(0,Cie.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e),s=(0,Cie.strip)(r);return(t?`${t}\n`:"")+(0,Cie.print)({pragmas:{format:"",...n},comments:i.trimStart()})+(s.startsWith("\n")?"\n":"\n\n")+s}var Iie={avoidAstMutation:!0},Nie={};H8(Nie,{getVisitorKeys:()=>Fie,massageAstNode:()=>Mie,print:()=>_ie});var Fie=A9({JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]});function _ie(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),B6];case"ArrayExpression":{if(0===n.elements.length)return"[]";let t=e.map((()=>null===e.node?"null":r()),"elements");return["[",v6([B6,U6([",",B6],t)]),B6,"]"]}case"ObjectExpression":return 0===n.properties.length?"{}":["{",v6([B6,U6([",",B6],e.map(r,"properties"))]),B6,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return["+"===n.operator?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return Oie(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return Oie(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new tee(n,"JSON")}}function Oie(e){return"key"===e.key&&"ObjectProperty"===e.parent.type}var Lie=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function Mie(e,t){let{type:r}=e;if("ObjectProperty"!==r){if("UnaryExpression"===r&&"+"===e.operator)return t.argument;if("ArrayExpression"!==r)return"TemplateLiteral"===r?{type:"StringLiteral",value:e.quasis[0].value.cooked}:void 0;for(let[r,n]of e.elements.entries())null===n&&t.elements.splice(r,0,{type:"NullLiteral"})}else{let{key:r}=e;"Identifier"===r.type?t.key={type:"StringLiteral",value:r.name}:"NumericLiteral"===r.type&&(t.key={type:"StringLiteral",value:String(r.value)})}}Mie.ignoredProperties=Lie;var Bie,jie,Rie,Uie,$ie,Vie={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},qie="JavaScript",Kie={arrowParens:{category:qie,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Vie.bracketSameLine,bracketSpacing:Vie.bracketSpacing,jsxBracketSameLine:{category:qie,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:qie,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},singleQuote:Vie.singleQuote,jsxSingleQuote:{category:qie,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:qie,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:qie,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Vie.singleAttributePerLine},Jie={estree:Z8,"estree-json":Nie},Wie=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]},{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","devcontainer.json","jsconfig.json","language-configuration.json","tsconfig.json","tslint.json",".eslintrc"],parsers:["json"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],Xie=Q8,Hie=Object.freeze({__proto__:null,default:Xie,languages:Wie,options:Kie,printers:Jie});function zie(e,t={}){return D5(function(...e){return VX(...e)}(e,{isJSX:Boolean(t.filepath?.match(/\.[jt]sx$/)),isTS:!0,printer:"recast",plugins:[["remove-unused-variables",r0]]}).code,{parser:"babel-ts",plugins:[$8,Hie]})}function Gie(e,t={}){return e=e.replaceAll("import.meta","BATI_META"),e=`var BATI_META = ${JSON.stringify(t)};(${e})`,(0,eval)(e)}function Yie(e,t,r={}){const n=function(e,t){return f.visit(e,{visitJSXAttribute(e){const r=e.value.comments?.[0];r&&r.value.includes("import.meta.BATI_")&&(Gie(r.value.replace("# ",""),t)?e.get("comments").prune():e.prune()),this.traverse(e)},visitImportDeclaration(e){f.namedTypes.ImportDeclaration.check(e.value)&&e.value.comments&&e.value.comments.some((e=>e.value.includes("import.meta.BATI_")))&&(Gie(e.value.comments.find((e=>e.value.includes("import.meta.BATI_"))).value.replace("# ",""),t)?e.value.comments=[]:e.prune()),this.traverse(e)},visitIdentifier(e){if("BATI_REMOVE"===e.value.name){if(!e.parent)throw new Error("BATI_REMOVE cannot appear at top level");if(!f.namedTypes.ArrayExpression.check(e.parent?.parent?.value))throw new Error("BATI_REMOVE can only be an array element for now");return e.parent.prune(),void this.traverse(e)}this.traverse(e)},visitConditionalExpression(e){this.visitIfStatement(e)},visitIfStatement(e){let r=!1;if(this.traverse(e.get("test"),{visitMemberExpression(e){yo(e.value).code.startsWith("import.meta.BATI_")&&(r=!0),this.traverse(e)}}),this.traverse(e),r)if(Gie(yo(e.value.test).code,t)){let t=e;f.namedTypes.ConditionalExpression.check(e.value)&&f.namedTypes.JSXExpressionContainer.check(e.parent.value)&&(t=e.parent),f.namedTypes.BlockStatement.check(e.value.consequent)?t.replace(...e.value.consequent.body):t.replace(e.value.consequent)}else e.value.alternate?f.namedTypes.BlockStatement.check(e.value.alternate)?e.replace(...e.value.alternate.body):e.replace(e.value.alternate):e.prune()}}),e}(e,t);return zie(yo(n).code,r)}function Qie(e,t){if(!e)throw new Error(t)}async function Zie(e){const t=await(e?.());return Qie("string"==typeof t,"Unable to load previous JSON module"),JSON.parse(t)}async function ese(e){const t=await(e?.());return Qie("string"==typeof t,"Unable to load previous module"),fo(t)}async function tse(e,t){const r=o(t.url),n=u(r);return go(l(n,e))}function rse(e){return"function-call"===e.$type?e.$args[0]:e}function nse(e,t){const r=function(e){return rse(e.exports.default)}(e);return"identifier"===r.$type?function(e,t){const{config:r,declaration:n}=function(e){if("identifier"!==e.exports.default.$type)throw new Wa(`Not supported: Cannot modify this kind of default export (${e.exports.default.$type})`);const t=e.exports.default.$name;for(const r of e.$ast.body)if("VariableDeclaration"===r.type)for(const e of r.declarations)if("Identifier"===e.id.type&&e.id.name===t&&e.init)return{declaration:e,config:rse(mo(yo(e.init).code))};throw new Wa("Couldn't find config declaration")}(e);ise(t,r),n.init&&("ObjectExpression"===n.init.type?n.init=yo(r).code:"CallExpression"===n.init.type&&"Identifier"===n.init.callee.type&&(n.init=yo(bo.functionCall(n.init.callee.name,r)).code))}(e,t):ise(t,r),e.imports.$add({from:t.from,local:t.constructor,imported:t.imported||"default"}),!0}function ise(e,t){const r=e.index??t.plugins?.length??0;t.plugins||(t.plugins=[]),t.plugins.splice(r,0,e.options?bo.functionCall(e.constructor,e.options):bo.functionCall(e.constructor))}function*sse(e,t){for(const r of t){const t=e.get(r);if(!t)throw new Error(`key '${t}' not found in package.json`);yield[r,t]}}function ase(e,t,r){e.devDependencies??(e.devDependencies={}),e.dependencies??(e.dependencies={});const n=new Map(function*(e){if(e.devDependencies)for(const t in e.devDependencies)yield[t,e.devDependencies[t]];if(e.dependencies)for(const t in e.dependencies)yield[t,e.dependencies[t]]}(t));for(const[t,i]of sse(n,r.devDependencies??[]))t in e.dependencies||(e.devDependencies[t]=i);for(const[t,i]of sse(n,r.dependencies??[]))t in e.devDependencies&&delete e.devDependencies[t],e.dependencies[t]=i;return e}$ie="win32"===process.platform||d.TESTING_WINDOWS?function(){if(jie)return Bie;jie=1,Bie=r,r.sync=function(r,n){return t(e.statSync(r),r,n)};var e=n;function t(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,r)}function r(r,n,i){e.stat(r,(function(e,s){i(e,!e&&t(s,r,n))}))}return Bie}():function(){if(Uie)return Rie;Uie=1,Rie=t,t.sync=function(t,n){return r(e.statSync(t),n)};var e=n;function t(t,n,i){e.stat(t,(function(e,t){i(e,!e&&r(t,n))}))}function r(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,i=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),a=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),o=parseInt("100",8),u=parseInt("010",8);return r&parseInt("001",8)||r&u&&i===a||r&o&&n===s||r&(o|u)&&0===s}(e,t)}return Rie}();var ose=use;function use(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){use(e,t||{},(function(e,t){e?n(e):r(t)}))}))}$ie(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}use.sync=function(e,t){try{return $ie.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}};const lse=ose,{join:cse,delimiter:pse,sep:dse,posix:hse}=s,fse="win32"===process.platform,mse=new RegExp(`[${hse.sep}${dse===hse.sep?"":dse}]`.replace(/(\\)/g,"\\$1")),yse=new RegExp(`^\\.${mse.source}`),gse=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),xse=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=pse})=>{const i=e.match(mse)?[""]:[...fse?[process.cwd()]:[],...(t||"").split(n)];if(fse){const t=r||[".EXE",".CMD",".BAT",".COM"].join(n),s=t.split(n).reduce(((e,t)=>(e.push(t),e.push(t.toLowerCase()),e)),[]);return e.includes(".")&&""!==s[0]&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:t}}return{pathEnv:i,pathExt:[""]}},bse=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&yse.test(t)?t.slice(0,2):"")+cse(r,t)},Sse=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=xse(e,t),s=[];for(const a of r){const r=bse(a,e);for(const e of n){const n=r+e;if(await lse(n,{pathExt:i,ignoreErrors:!0})){if(!t.all)return n;s.push(n)}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw gse(e)};var Tse=Sse;Sse.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=xse(e,t),s=[];for(const a of r){const r=bse(a,e);for(const e of n){const n=r+e;if(lse.sync(n,{pathExt:i,ignoreErrors:!0})){if(!t.all)return n;s.push(n)}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw gse(e)};var Ese=h(Tse);function vse(e,t,r=0){const n=`${" ".repeat(2*r)}${t?t(e):e}`;return e=>`${n} ${e}`}export{ase as addDependency,nse as addVitePlugin,c as features,p as flags,yo as generateCode,Zie as loadAsJson,ese as loadAsMagicast,go as loadFile,tse as loadRelativeFileAsMagicast,fo as parseModule,Yie as transformAndGenerate,Ese as which,vse as withIcon};
|