UNPKG

prettier-plugin-tailwindcss

Version:
7 lines 4.55 MB
import {createRequire as __global__createRequire__} from 'module' import {dirname as __global__dirname__} from 'path' import {fileURLToPath as __global__fileURLToPath__} from 'url' const require=__global__createRequire__(import.meta.url) const __filename=__global__fileURLToPath__(import.meta.url) const __dirname=__global__dirname__(__filename) var NB=Object.create;var Qh=Object.defineProperty;var FB=Object.getOwnPropertyDescriptor;var jB=Object.getOwnPropertyNames;var LB=Object.getPrototypeOf,RB=Object.prototype.hasOwnProperty;var hr=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(r,s)=>(typeof require<"u"?require:r)[s]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var MB=(t,r)=>()=>(t&&(r=t(t=0)),r);var ct=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),Ow=(t,r)=>{for(var s in r)Qh(t,s,{get:r[s],enumerable:!0})},Nw=(t,r,s,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of jB(r))!RB.call(t,u)&&u!==s&&Qh(t,u,{get:()=>r[u],enumerable:!(a=FB(r,u))||a.enumerable});return t};var yo=(t,r,s)=>(s=t!=null?NB(LB(t)):{},Nw(r||!t||!t.__esModule?Qh(s,"default",{value:t,enumerable:!0}):s,t)),wi=t=>Nw(Qh({},"__esModule",{value:!0}),t);var bi={};Ow(bi,{__addDisposableResource:()=>i_,__assign:()=>Zh,__asyncDelegator:()=>Xw,__asyncGenerator:()=>Jw,__asyncValues:()=>Yw,__await:()=>gc,__awaiter:()=>qw,__classPrivateFieldGet:()=>t_,__classPrivateFieldIn:()=>n_,__classPrivateFieldSet:()=>r_,__createBinding:()=>tf,__decorate:()=>Lw,__disposeResources:()=>s_,__esDecorate:()=>Mw,__exportStar:()=>Kw,__extends:()=>Fw,__generator:()=>Ww,__importDefault:()=>e_,__importStar:()=>Zw,__makeTemplateObject:()=>Qw,__metadata:()=>Vw,__param:()=>Rw,__propKey:()=>Uw,__read:()=>Gb,__rest:()=>jw,__rewriteRelativeImportExtension:()=>a_,__runInitializers:()=>Bw,__setFunctionName:()=>$w,__spread:()=>zw,__spreadArray:()=>Gw,__spreadArrays:()=>Hw,__values:()=>ef,default:()=>$B});function Fw(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");zb(t,r);function s(){this.constructor=t}t.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}function jw(t,r){var s={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(s[a]=t[a]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,a=Object.getOwnPropertySymbols(t);u<a.length;u++)r.indexOf(a[u])<0&&Object.prototype.propertyIsEnumerable.call(t,a[u])&&(s[a[u]]=t[a[u]]);return s}function Lw(t,r,s,a){var u=arguments.length,e=u<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,s):a,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(t,r,s,a);else for(var n=t.length-1;n>=0;n--)(l=t[n])&&(e=(u<3?l(e):u>3?l(r,s,e):l(r,s))||e);return u>3&&e&&Object.defineProperty(r,s,e),e}function Rw(t,r){return function(s,a){r(s,a,t)}}function Mw(t,r,s,a,u,e){function l(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var n=a.kind,c=n==="getter"?"get":n==="setter"?"set":"value",p=!r&&t?a.static?t:t.prototype:null,i=r||(p?Object.getOwnPropertyDescriptor(p,a.name):{}),o,h=!1,d=s.length-1;d>=0;d--){var f={};for(var b in a)f[b]=b==="access"?{}:a[b];for(var b in a.access)f.access[b]=a.access[b];f.addInitializer=function(y){if(h)throw new TypeError("Cannot add initializers after decoration has completed");e.push(l(y||null))};var m=(0,s[d])(n==="accessor"?{get:i.get,set:i.set}:i[c],f);if(n==="accessor"){if(m===void 0)continue;if(m===null||typeof m!="object")throw new TypeError("Object expected");(o=l(m.get))&&(i.get=o),(o=l(m.set))&&(i.set=o),(o=l(m.init))&&u.unshift(o)}else(o=l(m))&&(n==="field"?u.unshift(o):i[c]=o)}p&&Object.defineProperty(p,a.name,i),h=!0}function Bw(t,r,s){for(var a=arguments.length>2,u=0;u<r.length;u++)s=a?r[u].call(t,s):r[u].call(t);return a?s:void 0}function Uw(t){return typeof t=="symbol"?t:"".concat(t)}function $w(t,r,s){return typeof r=="symbol"&&(r=r.description?"[".concat(r.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:s?"".concat(s," ",r):r})}function Vw(t,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,r)}function qw(t,r,s,a){function u(e){return e instanceof s?e:new s(function(l){l(e)})}return new(s||(s=Promise))(function(e,l){function n(i){try{p(a.next(i))}catch(o){l(o)}}function c(i){try{p(a.throw(i))}catch(o){l(o)}}function p(i){i.done?e(i.value):u(i.value).then(n,c)}p((a=a.apply(t,r||[])).next())})}function Ww(t,r){var s={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},a,u,e,l=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return l.next=n(0),l.throw=n(1),l.return=n(2),typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function n(p){return function(i){return c([p,i])}}function c(p){if(a)throw new TypeError("Generator is already executing.");for(;l&&(l=0,p[0]&&(s=0)),s;)try{if(a=1,u&&(e=p[0]&2?u.return:p[0]?u.throw||((e=u.return)&&e.call(u),0):u.next)&&!(e=e.call(u,p[1])).done)return e;switch(u=0,e&&(p=[p[0]&2,e.value]),p[0]){case 0:case 1:e=p;break;case 4:return s.label++,{value:p[1],done:!1};case 5:s.label++,u=p[1],p=[0];continue;case 7:p=s.ops.pop(),s.trys.pop();continue;default:if(e=s.trys,!(e=e.length>0&&e[e.length-1])&&(p[0]===6||p[0]===2)){s=0;continue}if(p[0]===3&&(!e||p[1]>e[0]&&p[1]<e[3])){s.label=p[1];break}if(p[0]===6&&s.label<e[1]){s.label=e[1],e=p;break}if(e&&s.label<e[2]){s.label=e[2],s.ops.push(p);break}e[2]&&s.ops.pop(),s.trys.pop();continue}p=r.call(t,s)}catch(i){p=[6,i],u=0}finally{a=e=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}function Kw(t,r){for(var s in t)s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&tf(r,t,s)}function ef(t){var r=typeof Symbol=="function"&&Symbol.iterator,s=r&&t[r],a=0;if(s)return s.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gb(t,r){var s=typeof Symbol=="function"&&t[Symbol.iterator];if(!s)return t;var a=s.call(t),u,e=[],l;try{for(;(r===void 0||r-- >0)&&!(u=a.next()).done;)e.push(u.value)}catch(n){l={error:n}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(l)throw l.error}}return e}function zw(){for(var t=[],r=0;r<arguments.length;r++)t=t.concat(Gb(arguments[r]));return t}function Hw(){for(var t=0,r=0,s=arguments.length;r<s;r++)t+=arguments[r].length;for(var a=Array(t),u=0,r=0;r<s;r++)for(var e=arguments[r],l=0,n=e.length;l<n;l++,u++)a[u]=e[l];return a}function Gw(t,r,s){if(s||arguments.length===2)for(var a=0,u=r.length,e;a<u;a++)(e||!(a in r))&&(e||(e=Array.prototype.slice.call(r,0,a)),e[a]=r[a]);return t.concat(e||Array.prototype.slice.call(r))}function gc(t){return this instanceof gc?(this.v=t,this):new gc(t)}function Jw(t,r,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=s.apply(t,r||[]),u,e=[];return u=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),n("next"),n("throw"),n("return",l),u[Symbol.asyncIterator]=function(){return this},u;function l(d){return function(f){return Promise.resolve(f).then(d,o)}}function n(d,f){a[d]&&(u[d]=function(b){return new Promise(function(m,y){e.push([d,b,m,y])>1||c(d,b)})},f&&(u[d]=f(u[d])))}function c(d,f){try{p(a[d](f))}catch(b){h(e[0][3],b)}}function p(d){d.value instanceof gc?Promise.resolve(d.value.v).then(i,o):h(e[0][2],d)}function i(d){c("next",d)}function o(d){c("throw",d)}function h(d,f){d(f),e.shift(),e.length&&c(e[0][0],e[0][1])}}function Xw(t){var r,s;return r={},a("next"),a("throw",function(u){throw u}),a("return"),r[Symbol.iterator]=function(){return this},r;function a(u,e){r[u]=t[u]?function(l){return(s=!s)?{value:gc(t[u](l)),done:!1}:e?e(l):l}:e}}function Yw(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t[Symbol.asyncIterator],s;return r?r.call(t):(t=typeof ef=="function"?ef(t):t[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(e){s[e]=t[e]&&function(l){return new Promise(function(n,c){l=t[e](l),u(n,c,l.done,l.value)})}}function u(e,l,n,c){Promise.resolve(c).then(function(p){e({value:p,done:n})},l)}}function Qw(t,r){return Object.defineProperty?Object.defineProperty(t,"raw",{value:r}):t.raw=r,t}function Zw(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var s=Hb(t),a=0;a<s.length;a++)s[a]!=="default"&&tf(r,t,s[a]);return BB(r,t),r}function e_(t){return t&&t.__esModule?t:{default:t}}function t_(t,r,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?t!==r||!a:!r.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(t):a?a.value:r.get(t)}function r_(t,r,s,a,u){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!u)throw new TypeError("Private accessor was defined without a setter");if(typeof r=="function"?t!==r||!u:!r.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?u.call(t,s):u?u.value=s:r.set(t,s),s}function n_(t,r){if(r===null||typeof r!="object"&&typeof r!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?r===t:t.has(r)}function i_(t,r,s){if(r!=null){if(typeof r!="object"&&typeof r!="function")throw new TypeError("Object expected.");var a,u;if(s){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");a=r[Symbol.asyncDispose]}if(a===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");a=r[Symbol.dispose],s&&(u=a)}if(typeof a!="function")throw new TypeError("Object not disposable.");u&&(a=function(){try{u.call(this)}catch(e){return Promise.reject(e)}}),t.stack.push({value:r,dispose:a,async:s})}else s&&t.stack.push({async:!0});return r}function s_(t){function r(e){t.error=t.hasError?new UB(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var s,a=0;function u(){for(;s=t.stack.pop();)try{if(!s.async&&a===1)return a=0,t.stack.push(s),Promise.resolve().then(u);if(s.dispose){var e=s.dispose.call(s.value);if(s.async)return a|=2,Promise.resolve(e).then(u,function(l){return r(l),u()})}else a|=1}catch(l){r(l)}if(a===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return u()}function a_(t,r){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(s,a,u,e,l){return a?r?".jsx":".js":u&&(!e||!l)?s:u+e+"."+l.toLowerCase()+"js"}):t}var zb,Zh,tf,BB,Hb,UB,$B,gi=MB(()=>{zb=function(t,r){return zb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(s[u]=a[u])},zb(t,r)};Zh=function(){return Zh=Object.assign||function(r){for(var s,a=1,u=arguments.length;a<u;a++){s=arguments[a];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(r[e]=s[e])}return r},Zh.apply(this,arguments)};tf=Object.create?(function(t,r,s,a){a===void 0&&(a=s);var u=Object.getOwnPropertyDescriptor(r,s);(!u||("get"in u?!r.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return r[s]}}),Object.defineProperty(t,a,u)}):(function(t,r,s,a){a===void 0&&(a=s),t[a]=r[s]});BB=Object.create?(function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}):function(t,r){t.default=r},Hb=function(t){return Hb=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},Hb(t)};UB=typeof SuppressedError=="function"?SuppressedError:function(t,r,s){var a=new Error(s);return a.name="SuppressedError",a.error=t,a.suppressed=r,a};$B={__extends:Fw,__assign:Zh,__rest:jw,__decorate:Lw,__param:Rw,__esDecorate:Mw,__runInitializers:Bw,__propKey:Uw,__setFunctionName:$w,__metadata:Vw,__awaiter:qw,__generator:Ww,__createBinding:tf,__exportStar:Kw,__values:ef,__read:Gb,__spread:zw,__spreadArrays:Hw,__spreadArray:Gw,__await:gc,__asyncGenerator:Jw,__asyncDelegator:Xw,__asyncValues:Yw,__makeTemplateObject:Qw,__importStar:Zw,__importDefault:e_,__classPrivateFieldGet:t_,__classPrivateFieldSet:r_,__classPrivateFieldIn:n_,__addDisposableResource:i_,__disposeResources:s_,__rewriteRelativeImportExtension:a_}});var Ts=ct(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.Def=void 0;var vc=(gi(),wi(bi)),p_=Object.prototype,sf=p_.toString,Ya=p_.hasOwnProperty,$p=(function(){function t(){}return t.prototype.assert=function(r,s){if(!this.check(r,s)){var a=Xb(r);throw new Error(a+" does not match type "+this)}return!0},t.prototype.arrayOf=function(){var r=this;return new Jb(r)},t})(),Jb=(function(t){vc.__extends(r,t);function r(s){var a=t.call(this)||this;return a.elemType=s,a.kind="ArrayType",a}return r.prototype.toString=function(){return"["+this.elemType+"]"},r.prototype.check=function(s,a){var u=this;return Array.isArray(s)&&s.every(function(e){return u.elemType.check(e,a)})},r})($p),o_=(function(t){vc.__extends(r,t);function r(s){var a=t.call(this)||this;return a.value=s,a.kind="IdentityType",a}return r.prototype.toString=function(){return String(this.value)},r.prototype.check=function(s,a){var u=s===this.value;return!u&&typeof a=="function"&&a(this,s),u},r})($p),l_=(function(t){vc.__extends(r,t);function r(s){var a=t.call(this)||this;return a.fields=s,a.kind="ObjectType",a}return r.prototype.toString=function(){return"{ "+this.fields.join(", ")+" }"},r.prototype.check=function(s,a){return sf.call(s)===sf.call({})&&this.fields.every(function(u){return u.type.check(s[u.name],a)})},r})($p),u_=(function(t){vc.__extends(r,t);function r(s){var a=t.call(this)||this;return a.types=s,a.kind="OrType",a}return r.prototype.toString=function(){return this.types.join(" | ")},r.prototype.check=function(s,a){return this.types.some(function(u){return u.check(s,a)})},r})($p),rf=(function(t){vc.__extends(r,t);function r(s,a){var u=t.call(this)||this;return u.name=s,u.predicate=a,u.kind="PredicateType",u}return r.prototype.toString=function(){return this.name},r.prototype.check=function(s,a){var u=this.predicate(s,a);return!u&&typeof a=="function"&&a(this,s),u},r})($p),nf=(function(){function t(r,s){this.type=r,this.typeName=s,this.baseNames=[],this.ownFields=Object.create(null),this.allSupertypes=Object.create(null),this.supertypeList=[],this.allFields=Object.create(null),this.fieldNames=[],this.finalized=!1,this.buildable=!1,this.buildParams=[]}return t.prototype.isSupertypeOf=function(r){if(r instanceof t){if(this.finalized!==!0||r.finalized!==!0)throw new Error("");return Ya.call(r.allSupertypes,this.typeName)}else throw new Error(r+" is not a Def")},t.prototype.checkAllFields=function(r,s){var a=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function u(e){var l=a[e],n=l.type,c=l.getValue(r);return n.check(c,s)}return r!==null&&typeof r=="object"&&Object.keys(a).every(u)},t.prototype.bases=function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];var a=this.baseNames;if(this.finalized){if(r.length!==a.length)throw new Error("");for(var u=0;u<r.length;u++)if(r[u]!==a[u])throw new Error("");return this}return r.forEach(function(e){a.indexOf(e)<0&&a.push(e)}),this},t})();Vp.Def=nf;var c_=(function(){function t(r,s,a,u){this.name=r,this.type=s,this.defaultFn=a,this.hidden=!!u}return t.prototype.toString=function(){return JSON.stringify(this.name)+": "+this.type},t.prototype.getValue=function(r){var s=r[this.name];return typeof s<"u"||typeof this.defaultFn=="function"&&(s=this.defaultFn.call(r)),s},t})();function Xb(t){return Array.isArray(t)?"["+t.map(Xb).join(", ")+"]":t&&typeof t=="object"?"{ "+Object.keys(t).map(function(r){return r+": "+t[r]}).join(", ")+" }":JSON.stringify(t)}function VB(t){var r={or:function(){for(var q=[],K=0;K<arguments.length;K++)q[K]=arguments[K];return new u_(q.map(function($){return r.from($)}))},from:function(q,K){if(q instanceof Jb||q instanceof o_||q instanceof l_||q instanceof u_||q instanceof rf)return q;if(q instanceof nf)return q.type;if(n.check(q)){if(q.length!==1)throw new Error("only one element type is permitted for typed arrays");return new Jb(r.from(q[0]))}if(c.check(q))return new l_(Object.keys(q).map(function(W){return new c_(W,r.from(q[W],W))}));if(typeof q=="function"){var $=s.indexOf(q);if($>=0)return a[$];if(typeof K!="string")throw new Error("missing name");return new rf(K,q)}return new o_(q)},def:function(q){return Ya.call(m,q)?m[q]:m[q]=new x(q)},hasDef:function(q){return Ya.call(m,q)}},s=[],a=[];function u(q,K){var $=sf.call(K),W=new rf(q,function(Z){return sf.call(Z)===$});return K&&typeof K.constructor=="function"&&(s.push(K.constructor),a.push(W)),W}var e=u("string","truthy"),l=u("function",function(){}),n=u("array",[]),c=u("object",{}),p=u("RegExp",/./),i=u("Date",new Date),o=u("number",3),h=u("boolean",!0),d=u("null",null),f=u("undefined",void 0),b={string:e,function:l,array:n,object:c,RegExp:p,Date:i,number:o,boolean:h,null:d,undefined:f},m=Object.create(null);function y(q){if(q&&typeof q=="object"){var K=q.type;if(typeof K=="string"&&Ya.call(m,K)){var $=m[K];if($.finalized)return $}}return null}var x=(function(q){vc.__extends(K,q);function K($){var W=q.call(this,new rf($,function(Z,Q){return W.check(Z,Q)}),$)||this;return W}return K.prototype.check=function($,W){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if($===null||typeof $!="object")return!1;var Z=y($);return Z?W&&Z===this?this.checkAllFields($,W):this.isSupertypeOf(Z)?W?Z.checkAllFields($,W)&&this.checkAllFields($,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields($,W):!1},K.prototype.build=function(){for(var $=this,W=[],Z=0;Z<arguments.length;Z++)W[Z]=arguments[Z];if(this.buildParams=W,this.buildable)return this;this.field("type",String,function(){return $.typeName}),this.buildable=!0;var Q=function(ie,oe,be,Ne){if(!Ya.call(ie,oe)){var Pe=$.allFields;if(!Ya.call(Pe,oe))throw new Error(""+oe);var Ke=Pe[oe],We=Ke.type,Oe;if(Ne)Oe=be;else if(Ke.defaultFn)Oe=Ke.defaultFn.call(ie);else{var de="no value or default function given for field "+JSON.stringify(oe)+" of "+$.typeName+"("+$.buildParams.map(function(xe){return Pe[xe]}).join(", ")+")";throw new Error(de)}if(!We.check(Oe))throw new Error(Xb(Oe)+" does not match field "+Ke+" of type "+$.typeName);ie[oe]=Oe}},X=function(){for(var ie=[],oe=0;oe<arguments.length;oe++)ie[oe]=arguments[oe];var be=ie.length;if(!$.finalized)throw new Error("attempting to instantiate unfinalized type "+$.typeName);var Ne=Object.create(_);if($.buildParams.forEach(function(Pe,Ke){Ke<be?Q(Ne,Pe,ie[Ke],!0):Q(Ne,Pe,null,!1)}),Object.keys($.allFields).forEach(function(Pe){Q(Ne,Pe,null,!1)}),Ne.type!==$.typeName)throw new Error("");return Ne};return X.from=function(ie){if(!$.finalized)throw new Error("attempting to instantiate unfinalized type "+$.typeName);var oe=Object.create(_);if(Object.keys($.allFields).forEach(function(be){Ya.call(ie,be)?Q(oe,be,ie[be],!0):Q(oe,be,null,!1)}),oe.type!==$.typeName)throw new Error("");return oe},Object.defineProperty(S,L(this.typeName),{enumerable:!0,value:X}),this},K.prototype.field=function($,W,Z,Q){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify($)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[$]=new c_($,r.from(W),Z,Q),this)},K.prototype.finalize=function(){var $=this;if(!this.finalized){var W=this.allFields,Z=this.allSupertypes;this.baseNames.forEach(function(X){var ie=m[X];if(ie instanceof nf)ie.finalize(),V(W,ie.allFields),V(Z,ie.allSupertypes);else{var oe="unknown supertype name "+JSON.stringify(X)+" for subtype "+JSON.stringify($.typeName);throw new Error(oe)}}),V(W,this.ownFields),Z[this.typeName]=this,this.fieldNames.length=0;for(var Q in W)Ya.call(W,Q)&&!W[Q].hidden&&this.fieldNames.push(Q);Object.defineProperty(F,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,G(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&R(this.typeName)}},K})(nf);function v(q){if(!Ya.call(m,q))throw new Error("");var K=m[q];if(K.finalized!==!0)throw new Error("");return K.supertypeList.slice(1)}function E(q){for(var K={},$=Object.keys(m),W=$.length,Z=0;Z<W;++Z){var Q=$[Z],X=m[Q];if(X.finalized!==!0)throw new Error(""+Q);for(var ie=0;ie<X.supertypeList.length;++ie){var oe=X.supertypeList[ie];if(Ya.call(q,oe)){K[Q]=oe;break}}}return K}var S=Object.create(null),_={};function A(q,K){var $=_[q];return f.check(K)?delete _[q]:(l.assert(K),Object.defineProperty(_,q,{enumerable:!0,configurable:!0,value:K})),$}function L(q){return q.replace(/^[A-Z]+/,function(K){var $=K.length;switch($){case 0:return"";case 1:return K.toLowerCase();default:return K.slice(0,$-1).toLowerCase()+K.charAt($-1)}})}function j(q){return q=L(q),q.replace(/(Expression)?$/,"Statement")}var F={};function k(q){var K=y(q);if(K)return K.fieldNames.slice(0);if("type"in q)throw new Error("did not recognize object of type "+JSON.stringify(q.type));return Object.keys(q)}function U(q,K){var $=y(q);if($){var W=$.allFields[K];if(W)return W.getValue(q)}return q&&q[K]}function z(q,K,$){k(q).forEach(function(W){K.call(this,W,U(q,W))},$)}function C(q,K,$){return k(q).some(function(W){return K.call(this,W,U(q,W))},$)}function R(q){var K=j(q);if(!S[K]){var $=S[L(q)];if($){var W=function(){for(var Z=[],Q=0;Q<arguments.length;Q++)Z[Q]=arguments[Q];return S.expressionStatement($.apply(S,Z))};W.from=function(){for(var Z=[],Q=0;Q<arguments.length;Q++)Z[Q]=arguments[Q];return S.expressionStatement($.from.apply(S,Z))},S[K]=W}}}function G(q,K){K.length=0,K.push(q);for(var $=Object.create(null),W=0;W<K.length;++W){q=K[W];var Z=m[q];if(Z.finalized!==!0)throw new Error("");Ya.call($,q)&&delete K[$[q]],$[q]=W,K.push.apply(K,Z.baseNames)}for(var Q=0,X=Q,ie=K.length;X<ie;++X)Ya.call(K,X)&&(K[Q++]=K[X]);K.length=Q}function V(q,K){return Object.keys(K).forEach(function($){q[$]=K[$]}),q}function B(){Object.keys(m).forEach(function(q){m[q].finalize()})}return{Type:r,builtInTypes:b,getSupertypeNames:v,computeSupertypeLookupTable:E,builders:S,defineMethod:A,getBuilderName:L,getStatementBuilderName:j,namedTypes:F,getFieldNames:k,getFieldValue:U,eachField:z,someField:C,finalize:B}}Vp.default=VB});var Yb=ct((of,d_)=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var qB=(gi(),wi(bi)),WB=qB.__importDefault(Ts()),KB=Object.prototype,af=KB.hasOwnProperty;function zB(t){var r=t.use(WB.default),s=r.builtInTypes.array,a=r.builtInTypes.number,u=function o(h,d,f){if(!(this instanceof o))throw new Error("Path constructor cannot be invoked without 'new'");if(d){if(!(d instanceof o))throw new Error("")}else d=null,f=null;this.value=h,this.parentPath=d,this.name=f,this.__childCache=null},e=u.prototype;function l(o){return o.__childCache||(o.__childCache=Object.create(null))}function n(o,h){var d=l(o),f=o.getValueProperty(h),b=d[h];return(!af.call(d,h)||b.value!==f)&&(b=d[h]=new o.constructor(f,o,h)),b}e.getValueProperty=function(h){return this.value[h]},e.get=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];for(var f=this,b=h.length,m=0;m<b;++m)f=n(f,h[m]);return f},e.each=function(h,d){for(var f=[],b=this.value.length,m=0,m=0;m<b;++m)af.call(this.value,m)&&(f[m]=this.get(m));for(d=d||this,m=0;m<b;++m)af.call(f,m)&&h.call(d,f[m])},e.map=function(h,d){var f=[];return this.each(function(b){f.push(h.call(this,b))},d),f},e.filter=function(h,d){var f=[];return this.each(function(b){h.call(this,b)&&f.push(b)},d),f};function c(){}function p(o,h,d,f){if(s.assert(o.value),h===0)return c;var b=o.value.length;if(b<1)return c;var m=arguments.length;m===2?(d=0,f=b):m===3?(d=Math.max(d,0),f=b):(d=Math.max(d,0),f=Math.min(f,b)),a.assert(d),a.assert(f);for(var y=Object.create(null),x=l(o),v=d;v<f;++v)if(af.call(o.value,v)){var E=o.get(v);if(E.name!==v)throw new Error("");var S=v+h;E.name=S,y[S]=E,delete x[v]}return delete x.length,function(){for(var _ in y){var A=y[_];if(A.name!==+_)throw new Error("");x[_]=A,o.value[_]=A.value}}}e.shift=function(){var h=p(this,-1),d=this.value.shift();return h(),d},e.unshift=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];var f=p(this,h.length),b=this.value.unshift.apply(this.value,h);return f(),b},e.push=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];return s.assert(this.value),delete l(this).length,this.value.push.apply(this.value,h)},e.pop=function(){s.assert(this.value);var h=l(this);return delete h[this.value.length-1],delete h.length,this.value.pop()},e.insertAt=function(h){var d=arguments.length,f=p(this,d-1,h);if(f===c&&d<=1)return this;h=Math.max(h,0);for(var b=1;b<d;++b)this.value[h+b-1]=arguments[b];return f(),this},e.insertBefore=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];for(var f=this.parentPath,b=h.length,m=[this.name],y=0;y<b;++y)m.push(h[y]);return f.insertAt.apply(f,m)},e.insertAfter=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];for(var f=this.parentPath,b=h.length,m=[this.name+1],y=0;y<b;++y)m.push(h[y]);return f.insertAt.apply(f,m)};function i(o){if(!(o instanceof u))throw new Error("");var h=o.parentPath;if(!h)return o;var d=h.value,f=l(h);if(d[o.name]===o.value)f[o.name]=o;else if(s.check(d)){var b=d.indexOf(o.value);b>=0&&(f[o.name=b]=o)}else d[o.name]=o.value,f[o.name]=o;if(d[o.name]!==o.value)throw new Error("");if(o.parentPath.get(o.name)!==o)throw new Error("");return o}return e.replace=function(h){var d=[],f=this.parentPath.value,b=l(this.parentPath),m=arguments.length;if(i(this),s.check(f)){for(var y=f.length,x=p(this.parentPath,m-1,this.name+1),v=[this.name,1],E=0;E<m;++E)v.push(arguments[E]);var S=f.splice.apply(f,v);if(S[0]!==this.value)throw new Error("");if(f.length!==y-1+m)throw new Error("");if(x(),m===0)delete this.value,delete b[this.name],this.__childCache=null;else{if(f[this.name]!==h)throw new Error("");for(this.value!==h&&(this.value=h,this.__childCache=null),E=0;E<m;++E)d.push(this.parentPath.get(this.name+E));if(d[0]!==this)throw new Error("")}}else if(m===1)this.value!==h&&(this.__childCache=null),this.value=f[this.name]=h,d.push(this);else if(m===0)delete f[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return d},u}of.default=zB;d_.exports=of.default});var f_=ct((lf,h_)=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var HB=(gi(),wi(bi)),GB=HB.__importDefault(Ts()),qp=Object.prototype.hasOwnProperty;function JB(t){var r=t.use(GB.default),s=r.Type,a=r.namedTypes,u=a.Node,e=a.Expression,l=r.builtInTypes.array,n=r.builders,c=function x(v,E){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");i.assert(v.value);var S;if(E){if(!(E instanceof x))throw new Error("");S=E.depth+1}else E=null,S=0;Object.defineProperties(this,{path:{value:v},node:{value:v.value},isGlobal:{value:!E,enumerable:!0},depth:{value:S},parent:{value:E},bindings:{value:{}},types:{value:{}}})},p=[a.Program,a.Function,a.CatchClause],i=s.or.apply(s,p);c.isEstablishedBy=function(x){return i.check(x)};var o=c.prototype;o.didScan=!1,o.declares=function(x){return this.scan(),qp.call(this.bindings,x)},o.declaresType=function(x){return this.scan(),qp.call(this.types,x)},o.declareTemporary=function(x){if(x){if(!/^[a-z$_]/i.test(x))throw new Error("")}else x="t$";x+=this.depth.toString(36)+"$",this.scan();for(var v=0;this.declares(x+v);)++v;var E=x+v;return this.bindings[E]=r.builders.identifier(E)},o.injectTemporary=function(x,v){x||(x=this.declareTemporary());var E=this.path.get("body");return a.BlockStatement.check(E.value)&&(E=E.get("body")),E.unshift(n.variableDeclaration("var",[n.variableDeclarator(x,v||null)])),x},o.scan=function(x){if(x||!this.didScan){for(var v in this.bindings)delete this.bindings[v];h(this.path,this.bindings,this.types),this.didScan=!0}},o.getBindings=function(){return this.scan(),this.bindings},o.getTypes=function(){return this.scan(),this.types};function h(x,v,E){var S=x.value;if(i.assert(S),a.CatchClause.check(S)){var _=x.get("param");_.value&&m(_,v)}else d(x,v,E)}function d(x,v,E){var S=x.value;x.parent&&a.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&m(x.parent.get("id"),v),S&&(l.check(S)?x.each(function(_){b(_,v,E)}):a.Function.check(S)?(x.get("params").each(function(_){m(_,v)}),b(x.get("body"),v,E)):a.TypeAlias&&a.TypeAlias.check(S)||a.InterfaceDeclaration&&a.InterfaceDeclaration.check(S)||a.TSTypeAliasDeclaration&&a.TSTypeAliasDeclaration.check(S)||a.TSInterfaceDeclaration&&a.TSInterfaceDeclaration.check(S)?y(x.get("id"),E):a.VariableDeclarator.check(S)?(m(x.get("id"),v),b(x.get("init"),v,E)):S.type==="ImportSpecifier"||S.type==="ImportNamespaceSpecifier"||S.type==="ImportDefaultSpecifier"?m(x.get(S.local?"local":S.name?"name":"id"),v):u.check(S)&&!e.check(S)&&r.eachField(S,function(_,A){var L=x.get(_);if(!f(L,A))throw new Error("");b(L,v,E)}))}function f(x,v){return!!(x.value===v||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(v)&&v.length===0)}function b(x,v,E){var S=x.value;if(!(!S||e.check(S)))if(a.FunctionDeclaration.check(S)&&S.id!==null)m(x.get("id"),v);else if(a.ClassDeclaration&&a.ClassDeclaration.check(S))m(x.get("id"),v);else if(i.check(S)){if(a.CatchClause.check(S)&&a.Identifier.check(S.param)){var _=S.param.name,A=qp.call(v,_);d(x.get("body"),v,E),A||delete v[_]}}else d(x,v,E)}function m(x,v){var E=x.value;a.Pattern.assert(E),a.Identifier.check(E)?qp.call(v,E.name)?v[E.name].push(x):v[E.name]=[x]:a.AssignmentPattern&&a.AssignmentPattern.check(E)?m(x.get("left"),v):a.ObjectPattern&&a.ObjectPattern.check(E)?x.get("properties").each(function(S){var _=S.value;a.Pattern.check(_)?m(S,v):a.Property.check(_)?m(S.get("value"),v):a.SpreadProperty&&a.SpreadProperty.check(_)&&m(S.get("argument"),v)}):a.ArrayPattern&&a.ArrayPattern.check(E)?x.get("elements").each(function(S){var _=S.value;a.Pattern.check(_)?m(S,v):a.SpreadElement&&a.SpreadElement.check(_)&&m(S.get("argument"),v)}):a.PropertyPattern&&a.PropertyPattern.check(E)?m(x.get("pattern"),v):(a.SpreadElementPattern&&a.SpreadElementPattern.check(E)||a.RestElement&&a.RestElement.check(E)||a.SpreadPropertyPattern&&a.SpreadPropertyPattern.check(E))&&m(x.get("argument"),v)}function y(x,v){var E=x.value;a.Pattern.assert(E),a.Identifier.check(E)&&(qp.call(v,E.name)?v[E.name].push(x):v[E.name]=[x])}return o.lookup=function(x){for(var v=this;v&&!v.declares(x);v=v.parent);return v},o.lookupType=function(x){for(var v=this;v&&!v.declaresType(x);v=v.parent);return v},o.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},c}lf.default=JB;h_.exports=lf.default});var Zb=ct((uf,m_)=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var Qb=(gi(),wi(bi)),XB=Qb.__importDefault(Ts()),YB=Qb.__importDefault(Yb()),QB=Qb.__importDefault(f_());function ZB(t){var r=t.use(XB.default),s=r.namedTypes,a=r.builders,u=r.builtInTypes.number,e=r.builtInTypes.array,l=t.use(YB.default),n=t.use(QB.default),c=function y(x,v,E){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");l.call(this,x,v,E)},p=c.prototype=Object.create(l.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(p,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),p.replace=function(){return delete this.node,delete this.parent,delete this.scope,l.prototype.replace.apply(this,arguments)},p.prune=function(){var y=this.parent;return this.replace(),b(y)},p._computeNode=function(){var y=this.value;if(s.Node.check(y))return y;var x=this.parentPath;return x&&x.node||null},p._computeParent=function(){var y=this.value,x=this.parentPath;if(!s.Node.check(y)){for(;x&&!s.Node.check(x.value);)x=x.parentPath;x&&(x=x.parentPath)}for(;x&&!s.Node.check(x.value);)x=x.parentPath;return x||null},p._computeScope=function(){var y=this.value,x=this.parentPath,v=x&&x.scope;return s.Node.check(y)&&n.isEstablishedBy(y)&&(v=new n(this,v)),v||null},p.getValueProperty=function(y){return r.getFieldValue(this.value,y)},p.needsParens=function(y){var x=this.parentPath;if(!x)return!1;var v=this.value;if(!s.Expression.check(v)||v.type==="Identifier")return!1;for(;!s.Node.check(x.value);)if(x=x.parentPath,!x)return!1;var E=x.value;switch(v.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return E.type==="MemberExpression"&&this.name==="object"&&E.object===v;case"BinaryExpression":case"LogicalExpression":switch(E.type){case"CallExpression":return this.name==="callee"&&E.callee===v;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&E.object===v;case"BinaryExpression":case"LogicalExpression":{var S=v,_=E.operator,A=h[_],L=S.operator,j=h[L];if(A>j)return!0;if(A===j&&this.name==="right"){if(E.right!==S)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(E.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(E.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return E.type==="MemberExpression"&&u.check(v.value)&&this.name==="object"&&E.object===v;case"AssignmentExpression":case"ConditionalExpression":switch(E.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&E.callee===v;case"ConditionalExpression":return this.name==="test"&&E.test===v;case"MemberExpression":return this.name==="object"&&E.object===v;default:return!1}default:if(E.type==="NewExpression"&&this.name==="callee"&&E.callee===v)return d(v)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function i(y){return s.BinaryExpression.check(y)||s.LogicalExpression.check(y)}function o(y){return s.UnaryExpression.check(y)||s.SpreadElement&&s.SpreadElement.check(y)||s.SpreadProperty&&s.SpreadProperty.check(y)}var h={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(y,x){y.forEach(function(v){h[v]=x})});function d(y){return s.CallExpression.check(y)?!0:e.check(y)?y.some(d):s.Node.check(y)?r.someField(y,function(x,v){return d(v)}):!1}p.canBeFirstInStatement=function(){var y=this.node;return!s.FunctionExpression.check(y)&&!s.ObjectExpression.check(y)},p.firstInStatement=function(){return f(this)};function f(y){for(var x,v;y.parent;y=y.parent){if(x=y.node,v=y.parent.node,s.BlockStatement.check(v)&&y.parent.name==="body"&&y.name===0){if(v.body[0]!==x)throw new Error("Nodes must be equal");return!0}if(s.ExpressionStatement.check(v)&&y.name==="expression"){if(v.expression!==x)throw new Error("Nodes must be equal");return!0}if(s.SequenceExpression.check(v)&&y.parent.name==="expressions"&&y.name===0){if(v.expressions[0]!==x)throw new Error("Nodes must be equal");continue}if(s.CallExpression.check(v)&&y.name==="callee"){if(v.callee!==x)throw new Error("Nodes must be equal");continue}if(s.MemberExpression.check(v)&&y.name==="object"){if(v.object!==x)throw new Error("Nodes must be equal");continue}if(s.ConditionalExpression.check(v)&&y.name==="test"){if(v.test!==x)throw new Error("Nodes must be equal");continue}if(i(v)&&y.name==="left"){if(v.left!==x)throw new Error("Nodes must be equal");continue}if(s.UnaryExpression.check(v)&&!v.prefix&&y.name==="argument"){if(v.argument!==x)throw new Error("Nodes must be equal");continue}return!1}return!0}function b(y){if(s.VariableDeclaration.check(y.node)){var x=y.get("declarations").value;if(!x||x.length===0)return y.prune()}else if(s.ExpressionStatement.check(y.node)){if(!y.get("expression").value)return y.prune()}else s.IfStatement.check(y.node)&&m(y);return y}function m(y){var x=y.get("test").value,v=y.get("alternate").value,E=y.get("consequent").value;if(!E&&!v){var S=a.expressionStatement(x);y.replace(S)}else if(!E&&v){var _=a.unaryExpression("!",x,!0);s.UnaryExpression.check(x)&&x.operator==="!"&&(_=x.argument),y.get("test").replace(_),y.get("consequent").replace(v),y.get("alternate").replace()}}return c}uf.default=ZB;m_.exports=uf.default});var g_=ct((pf,b_)=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var y_=(gi(),wi(bi)),e4=y_.__importDefault(Ts()),t4=y_.__importDefault(Zb()),cf=Object.prototype.hasOwnProperty;function r4(t){var r=t.use(e4.default),s=t.use(t4.default),a=r.builtInTypes.array,u=r.builtInTypes.object,e=r.builtInTypes.function,l,n=function f(){if(!(this instanceof f))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=c(this),this._shouldVisitComments=cf.call(this._methodNameTable,"Block")||cf.call(this._methodNameTable,"Line"),this.Context=h(this),this._visiting=!1,this._changeReported=!1};function c(f){var b=Object.create(null);for(var m in f)/^visit[A-Z]/.test(m)&&(b[m.slice(5)]=!0);for(var y=r.computeSupertypeLookupTable(b),x=Object.create(null),v=Object.keys(y),E=v.length,S=0;S<E;++S){var _=v[S];m="visit"+y[_],e.check(f[m])&&(x[_]=m)}return x}n.fromMethodsObject=function(b){if(b instanceof n)return b;if(!u.check(b))return new n;var m=function x(){if(!(this instanceof x))throw new Error("Visitor constructor cannot be invoked without 'new'");n.call(this)},y=m.prototype=Object.create(i);return y.constructor=m,p(y,b),p(m,n),e.assert(m.fromMethodsObject),e.assert(m.visit),new m};function p(f,b){for(var m in b)cf.call(b,m)&&(f[m]=b[m]);return f}n.visit=function(b,m){return n.fromMethodsObject(m).visit(b)};var i=n.prototype;i.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var f=arguments.length,b=new Array(f),m=0;m<f;++m)b[m]=arguments[m];b[0]instanceof s||(b[0]=new s({root:b[0]}).get("root")),this.reset.apply(this,b);var y;try{var x=this.visitWithoutReset(b[0]);y=!0}finally{if(this._visiting=!1,!y&&this._abortRequested)return b[0].value}return x},i.AbortRequest=function(){},i.abort=function(){var f=this;f._abortRequested=!0;var b=new f.AbortRequest;throw b.cancel=function(){f._abortRequested=!1},b},i.reset=function(f){},i.visitWithoutReset=function(f){if(this instanceof this.Context)return this.visitor.visitWithoutReset(f);if(!(f instanceof s))throw new Error("");var b=f.value,m=b&&typeof b=="object"&&typeof b.type=="string"&&this._methodNameTable[b.type];if(m){var y=this.acquireContext(f);try{return y.invokeVisitorMethod(m)}finally{this.releaseContext(y)}}else return o(f,this)};function o(f,b){if(!(f instanceof s))throw new Error("");if(!(b instanceof n))throw new Error("");var m=f.value;if(a.check(m))f.each(b.visitWithoutReset,b);else if(u.check(m)){var y=r.getFieldNames(m);b._shouldVisitComments&&m.comments&&y.indexOf("comments")<0&&y.push("comments");for(var x=y.length,v=[],E=0;E<x;++E){var S=y[E];cf.call(m,S)||(m[S]=r.getFieldValue(m,S)),v.push(f.get(S))}for(var E=0;E<x;++E)b.visitWithoutReset(v[E])}return f.value}i.acquireContext=function(f){return this._reusableContextStack.length===0?new this.Context(f):this._reusableContextStack.pop().reset(f)},i.releaseContext=function(f){if(!(f instanceof this.Context))throw new Error("");this._reusableContextStack.push(f),f.currentPath=null},i.reportChanged=function(){this._changeReported=!0},i.wasChangeReported=function(){return this._changeReported};function h(f){function b(y){if(!(this instanceof b))throw new Error("");if(!(this instanceof n))throw new Error("");if(!(y instanceof s))throw new Error("");Object.defineProperty(this,"visitor",{value:f,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=y,this.needToCallTraverse=!0,Object.seal(this)}if(!(f instanceof n))throw new Error("");var m=b.prototype=Object.create(f);return m.constructor=b,p(m,d),b}var d=Object.create(null);return d.reset=function(b){if(!(this instanceof this.Context))throw new Error("");if(!(b instanceof s))throw new Error("");return this.currentPath=b,this.needToCallTraverse=!0,this},d.invokeVisitorMethod=function(b){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof s))throw new Error("");var m=this.visitor[b].call(this,this.currentPath);if(m===!1?this.needToCallTraverse=!1:m!==l&&(this.currentPath=this.currentPath.replace(m)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+b);var y=this.currentPath;return y&&y.value},d.traverse=function(b,m){if(!(this instanceof this.Context))throw new Error("");if(!(b instanceof s))throw new Error("");if(!(this.currentPath instanceof s))throw new Error("");return this.needToCallTraverse=!1,o(b,n.fromMethodsObject(m||this.visitor))},d.visit=function(b,m){if(!(this instanceof this.Context))throw new Error("");if(!(b instanceof s))throw new Error("");if(!(this.currentPath instanceof s))throw new Error("");return this.needToCallTraverse=!1,n.fromMethodsObject(m||this.visitor).visitWithoutReset(b)},d.reportChanged=function(){this.visitor.reportChanged()},d.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},n}pf.default=r4;b_.exports=pf.default});var x_=ct((df,v_)=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var n4=(gi(),wi(bi)),i4=n4.__importDefault(Ts());function s4(t){var r=t.use(i4.default),s=r.getFieldNames,a=r.getFieldValue,u=r.builtInTypes.array,e=r.builtInTypes.object,l=r.builtInTypes.Date,n=r.builtInTypes.RegExp,c=Object.prototype.hasOwnProperty;function p(f,b,m){return u.check(m)?m.length=0:m=null,o(f,b,m)}p.assert=function(f,b){var m=[];if(!p(f,b,m))if(m.length===0){if(f!==b)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+m.map(i).join(""))};function i(f){return/[_$a-z][_$a-z0-9]*/i.test(f)?"."+f:"["+JSON.stringify(f)+"]"}function o(f,b,m){return f===b?!0:u.check(f)?h(f,b,m):e.check(f)?d(f,b,m):l.check(f)?l.check(b)&&+f==+b:n.check(f)?n.check(b)&&f.source===b.source&&f.global===b.global&&f.multiline===b.multiline&&f.ignoreCase===b.ignoreCase:f==b}function h(f,b,m){u.assert(f);var y=f.length;if(!u.check(b)||b.length!==y)return m&&m.push("length"),!1;for(var x=0;x<y;++x){if(m&&m.push(x),x in f!=x in b||!o(f[x],b[x],m))return!1;if(m){var v=m.pop();if(v!==x)throw new Error(""+v)}}return!0}function d(f,b,m){if(e.assert(f),!e.check(b))return!1;if(f.type!==b.type)return m&&m.push("type"),!1;var y=s(f),x=y.length,v=s(b),E=v.length;if(x===E){for(var S=0;S<x;++S){var _=y[S],A=a(f,_),L=a(b,_);if(m&&m.push(_),!o(A,L,m))return!1;if(m){var j=m.pop();if(j!==_)throw new Error(""+j)}}return!0}if(!m)return!1;var F=Object.create(null);for(S=0;S<x;++S)F[y[S]]=!0;for(S=0;S<E;++S){if(_=v[S],!c.call(F,_))return m.push(_),!1;delete F[_]}for(_ in F){m.push(_);break}return!1}return p}df.default=s4;v_.exports=df.default});var E_=ct((hf,T_)=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var Wp=(gi(),wi(bi)),a4=Wp.__importDefault(Ts()),o4=Wp.__importDefault(g_()),l4=Wp.__importDefault(x_()),u4=Wp.__importDefault(Yb()),c4=Wp.__importDefault(Zb());function p4(t){var r=d4(),s=r.use(a4.default);t.forEach(r.use),s.finalize();var a=r.use(o4.default);return{Type:s.Type,builtInTypes:s.builtInTypes,namedTypes:s.namedTypes,builders:s.builders,defineMethod:s.defineMethod,getFieldNames:s.getFieldNames,getFieldValue:s.getFieldValue,eachField:s.eachField,someField:s.someField,getSupertypeNames:s.getSupertypeNames,getBuilderName:s.getBuilderName,astNodesAreEquivalent:r.use(l4.default),finalize:s.finalize,Path:r.use(u4.default),NodePath:r.use(c4.default),PathVisitor:a,use:r.use,visit:a.visit}}hf.default=p4;function d4(){var t=[],r=[];function s(u){var e=t.indexOf(u);return e===-1&&(e=t.length,t.push(u),r[e]=u(a)),r[e]}var a={use:s};return a}T_.exports=hf.default});var ff=ct(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.LogicalOperators=Bl.AssignmentOperators=Bl.BinaryOperators=void 0;Bl.BinaryOperators=["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"];Bl.AssignmentOperators=["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="];Bl.LogicalOperators=["||","&&"]});var Ca=ct((mf,S_)=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var h4=(gi(),wi(bi)),f4=h4.__importDefault(Ts());function m4(t){var r=t.use(f4.default),s=r.Type,a=r.builtInTypes,u=a.number;function e(p){return s.from(function(i){return u.check(i)&&i>=p},u+" >= "+p)}var l={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}},n=s.or(a.string,a.number,a.boolean,a.null,a.undefined),c=s.from(function(p){if(p===null)return!0;var i=typeof p;return!(i==="object"||i==="function")},n.toString());return{geq:e,defaults:l,isPrimitive:c}}mf.default=m4;S_.exports=mf.default});var tg=ct((yf,__)=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var w_=(gi(),wi(bi)),eg=ff(),y4=w_.__importDefault(Ts()),b4=w_.__importDefault(Ca());function g4(t){var r=t.use(y4.default),s=r.Type,a=s.def,u=s.or,e=t.use(b4.default),l=e.defaults,n=e.geq;a("Printable").field("loc",u(a("SourceLocation"),null),l.null,!0),a("Node").bases("Printable").field("type",String).field("comments",u([a("Comment")],null),l.null,!0),a("SourceLocation").field("start",a("Position")).field("end",a("Position")).field("source",u(String,null),l.null),a("Position").field("line",n(1)).field("column",n(0)),a("File").bases("Node").build("program","name").field("program",a("Program")).field("name",u(String,null),l.null),a("Program").bases("Node").build("body").field("body",[a("Statement")]),a("Function").bases("Node").field("id",u(a("Identifier"),null),l.null).field("params",[a("Pattern")]).field("body",a("BlockStatement")).field("generator",Boolean,l.false).field("async",Boolean,l.false),a("Statement").bases("Node"),a("EmptyStatement").bases("Statement").build(),a("BlockStatement").bases("Statement").build("body").field("body",[a("Statement")]),a("ExpressionStatement").bases("Statement").build("expression").field("expression",a("Expression")),a("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",a("Expression")).field("consequent",a("Statement")).field("alternate",u(a("Statement"),null),l.null),a("LabeledStatement").bases("Statement").build("label","body").field("label",a("Identifier")).field("body",a("Statement")),a("BreakStatement").bases("Statement").build("label").field("label",u(a("Identifier"),null),l.null),a("ContinueStatement").bases("Statement").build("label").field("label",u(a("Identifier"),null),l.null),a("WithStatement").bases("Statement").build("object","body").field("object",a("Expression")).field("body",a("Statement")),a("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",a("Expression")).field("cases",[a("SwitchCase")]).field("lexical",Boolean,l.false),a("ReturnStatement").bases("Statement").build("argument").field("argument",u(a("Expression"),null)),a("ThrowStatement").bases("Statement").build("argument").field("argument",a("Expression")),a("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",a("BlockStatement")).field("handler",u(a("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[a("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[a("CatchClause")],l.emptyArray).field("finalizer",u(a("BlockStatement"),null),l.null),a("CatchClause").bases("Node").build("param","guard","body").field("param",a("Pattern")).field("guard",u(a("Expression"),null),l.null).field("body",a("BlockStatement")),a("WhileStatement").bases("Statement").build("test","body").field("test",a("Expression")).field("body",a("Statement")),a("DoWhileStatement").bases("Statement").build("body","test").field("body",a("Statement")).field("test",a("Expression")),a("ForStatement").bases("Statement").build("init","test","update","body").field("init",u(a("VariableDeclaration"),a("Expression"),null)).field("test",u(a("Expression"),null)).field("update",u(a("Expression"),null)).field("body",a("Statement")),a("ForInStatement").bases("Statement").build("left","right","body").field("left",u(a("VariableDeclaration"),a("Expression"))).field("right",a("Expression")).field("body",a("Statement")),a("DebuggerStatement").bases("Statement").build(),a("Declaration").bases("Statement"),a("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",a("Identifier")),a("FunctionExpression").bases("Function","Expression").build("id","params","body"),a("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",u("var","let","const")).field("declarations",[a("VariableDeclarator")]),a("VariableDeclarator").bases("Node").build("id","init").field("id",a("Pattern")).fi