@modern-js/module-tools 2.20.0 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/bin/modern.js +0 -1
  3. package/compiled/postcss-flexbugs-fixes/index.js +1 -1
  4. package/compiled/postcss-font-variant/index.js +1 -1
  5. package/compiled/postcss-initial/index.js +1 -1
  6. package/compiled/postcss-media-minmax/index.js +1 -1
  7. package/compiled/postcss-nesting/index.js +1 -1
  8. package/compiled/postcss-page-break/index.js +1 -1
  9. package/compiled/rollup-plugin-dts/index.js +1 -1
  10. package/dist/cli.js +7 -2
  11. package/dist/cli.js.map +1 -1
  12. package/dist/config/defineConfig.d.ts +0 -1
  13. package/dist/config/transformLegacyConfig.d.ts +0 -2
  14. package/dist/constants/buildPresets.d.ts +8 -8
  15. package/dist/plugins.d.ts +1 -1
  16. package/dist/types/config/index.d.ts +0 -1
  17. package/dist/types/legacyConfig/output.d.ts +1 -5
  18. package/dist/types/legacyConfig/source.d.ts +0 -1
  19. package/dist/types/legacyConfig/tools.d.ts +0 -4
  20. package/dist/types/utils.d.ts +0 -2
  21. package/dist/utils/dts.js.map +1 -1
  22. package/dist/utils/tspathsTransform.js +4 -4
  23. package/dist/utils/tspathsTransform.js.map +1 -1
  24. package/package.json +21 -15
  25. package/compiled/@babel/code-frame/index.d.ts +0 -1
  26. package/compiled/@babel/code-frame/index.js +0 -1
  27. package/compiled/@babel/code-frame/license +0 -22
  28. package/compiled/@babel/code-frame/package.json +0 -1
  29. package/compiled/@babel/generator/index.d.ts +0 -1
  30. package/compiled/@babel/generator/index.js +0 -1
  31. package/compiled/@babel/generator/license +0 -22
  32. package/compiled/@babel/generator/package.json +0 -1
  33. package/compiled/@babel/helper-validator-identifier/index.d.ts +0 -1
  34. package/compiled/@babel/helper-validator-identifier/index.js +0 -1
  35. package/compiled/@babel/helper-validator-identifier/license +0 -22
  36. package/compiled/@babel/helper-validator-identifier/package.json +0 -1
  37. package/compiled/@babel/highlight/index.d.ts +0 -1
  38. package/compiled/@babel/highlight/index.js +0 -1
  39. package/compiled/@babel/highlight/license +0 -22
  40. package/compiled/@babel/highlight/package.json +0 -1
  41. package/compiled/@babel/parser/@babel/types/lib/index-legacy.d.ts +0 -2742
  42. package/compiled/@babel/parser/index.js +0 -1
  43. package/compiled/@babel/parser/license +0 -19
  44. package/compiled/@babel/parser/package.json +0 -1
  45. package/compiled/@babel/parser/typings/babel-parser.d.ts +0 -214
  46. package/compiled/@babel/template/index.d.ts +0 -1
  47. package/compiled/@babel/template/index.js +0 -1
  48. package/compiled/@babel/template/license +0 -22
  49. package/compiled/@babel/template/package.json +0 -1
  50. package/compiled/@babel/traverse/index.d.ts +0 -1199
  51. package/compiled/@babel/traverse/index.js +0 -1
  52. package/compiled/@babel/traverse/license +0 -22
  53. package/compiled/@babel/traverse/package.json +0 -1
  54. package/compiled/@babel/types/index.js +0 -1
  55. package/compiled/@babel/types/lib/index-legacy.d.ts +0 -2732
  56. package/compiled/@babel/types/license +0 -22
  57. package/compiled/@babel/types/package.json +0 -1
package/dist/plugins.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import type { CliPlugin } from '@modern-js/core';
2
- export declare const getPlugins: (runningCmd: string) => CliPlugin<{}, {}, {}, {}>[];
2
+ export declare const getPlugins: (runningCmd: string) => CliPlugin[];
@@ -88,7 +88,6 @@ export interface StyleConfig {
88
88
  * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
89
89
  * @requires `tailwindcss` plugin
90
90
  */
91
-
92
91
  tailwindcss?: TailwindCSSConfig;
93
92
  }
94
93
  export interface StorybookBuildConfig {
@@ -16,9 +16,7 @@ export type LegacyBundleOptions = {
16
16
  export type LegacyBundlelessOptions = {
17
17
  sourceDir?: string;
18
18
  style?: {
19
- compileMode?: 'all' | 'only-compiled-code' |
20
- /* may be will be deprecated */
21
- 'only-source-code' | false;
19
+ compileMode?: 'all' | 'only-compiled-code' | /* may be will be deprecated */'only-source-code' | false;
22
20
  path?: string;
23
21
  };
24
22
  static?: {
@@ -52,10 +50,8 @@ export type OutputLegacyUserConfig = {
52
50
  }>;
53
51
  disableTsChecker?: boolean;
54
52
  /** @deprecated Use the `buildConfig.bundlelessOptions.static.path` instead . */
55
-
56
53
  assetsPath?: string;
57
54
  /** @deprecated Use the `buildConfig.sourceMap` instead */
58
-
59
55
  disableSourceMap?: boolean;
60
56
  buildPreset?: LegacyBuildPreset;
61
57
  buildConfig?: LegacyBuildConfig;
@@ -9,6 +9,5 @@ export type SourceLegacyUserConfig = {
9
9
  * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
10
10
  * @requires `tailwindcss` plugin
11
11
  */
12
-
13
12
  designSystem?: Record<string, any>;
14
13
  };
@@ -18,17 +18,14 @@ export type PostCSSLoaderOptions = {
18
18
  /**
19
19
  * By default generation of source maps depends on the devtool option. All values enable source map generation except eval and false value.
20
20
  */
21
-
22
21
  sourceMap?: boolean;
23
22
  /**
24
23
  * The special implementation option determines which implementation of PostCSS to use.
25
24
  */
26
-
27
25
  implementation?: unknown;
28
26
  /**
29
27
  * Allows to set PostCSS options and plugins.
30
28
  */
31
-
32
29
  postcssOptions?: PostCSSOptions;
33
30
  };
34
31
  export type PostCSSConfigUtils = {
@@ -50,7 +47,6 @@ export type ToolsLegacyUserConfig = {
50
47
  * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
51
48
  * @requires `tailwindcss` plugin
52
49
  */
53
-
54
50
  tailwindcss?: Record<string, any> | ((options: Record<string, any>) => Record<string, any> | void);
55
51
  jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
56
52
  };
@@ -1,7 +1,5 @@
1
1
  export type DeepPartial<T> = T extends Function ? T : T extends Array<infer U> ? DeepPartialArray<U> : T extends object ? DeepPartialObject<T> : T | undefined;
2
2
  /** @private */
3
-
4
3
  export type DeepPartialArray<T> = Array<DeepPartial<T>>;
5
4
  /** @private */
6
-
7
5
  export type DeepPartialObject<T> = { [P in keyof T]?: DeepPartial<T[P]> };
@@ -1 +1 @@
1
- {"version":3,"file":null,"mappings":";;;;;;;;;;;;EAaaA,mBAAiB,MAAjBA;EAmDAC,eAAa,MAAbA;EA0BAC,cAAY,MAAZA;EA6EAC,oBAAkB,MAAlBA;EAuBAC,uBAAqB,MAArBA;;;;iEA9LI;AAaV,MAAMJ,oBAAoB,OAC/BK,WACG;AACH,QAAM,EAAEC,IAAIC,OAAM,IAAK,MAAM,iFAAO;AACpC,QAAM,EAAEC,iBAAgB,IAAK,MAAM,iFAAO;AAE1C,QAAM,EAAEC,cAAcC,WAAWC,cAAcC,aAAY,IAAKP;AAChE,QAAMQ,sBAAsBC,cAAKC,KAC/BN,cACA,GAAGD,oBAAoBD,UAAU;AAEnC,QAAMS,oBAAoBF,cAAKC,KAC7BF,qBACAC,cAAKG,SAASR,cAAcE;AAG9B,QAAMO,mBAAmBJ,cAAKC,KAC5BF,qBACAC,cAAKK,SAASP;AAEhBN,KAAGc,eAAeF;AAElB,QAAMG,cAAcP,cAAKC,KACvBD,cAAKG,SAASH,cAAKQ,QAAQJ,mBAAmBJ,cAAKQ,QAAQV,gBAC3DE,cAAKK,SAASD;AAGhB,QAAMK,cAAyB;IAC7BC,SAASH;IACTI,iBAAiB;;MAEfC,aAAa;MACbC,qBAAqB;;;;;;MAMrBC,gBAAgBZ;IAClB;EACF;AAEAV,KAAGuB,cAAcX,kBAAkBK;AAEnC,SAAO;IACLL;IACAL;IACAiB,oBAAoBd;EACtB;AACF;AAEO,MAAMf,gBAAgB,OAAOQ,iBAAyB;AAC3D,QAAM,EAAEH,GAAE,IAAK,MAAM,iFAAO;AAC5B,QAAM,EAAEyB,SAASC,QAAQC,QAAQC,WAAU,IAAK,MAAM,iFACpD;AAEF,QAAMC,aAAa,MAAMH,OACvB,OAAOI,cAAsB;AAC3B,UAAMC,iBAAiBvB,cAAKC,KAAKqB,WAAW;AAC5C,UAAME,gBAAgB,MAAMJ,WAAWG;AACvC,QAAIC,eAAe;AACjB,aAAOD;IACT;AACA,WAAOE;EACT,GACA;IAAEC,KAAK/B;EAAa;AAGtB,MAAI,CAAC0B,cAAc,CAAC7B,GAAGmC,WAAWN,aAAa;AAC7C,UAAM,IAAIO,MACR;EAEJ;AAEA,SAAOP;AACT;AAEO,MAAMjC,eAAe,OAC1BG,QACAsC,SAMAC,iBAA2B,OACxB;MAaMC;AAZT,QAAM,EAAEA,cAAcf,oBAAoBjB,oBAAmB,IAAK8B;AAClE,QAAM,EAAEG,QAAQxC,GAAE,IAAK,MAAM,iFAAO;AACpC,QAAM,EAAEyC,kBAAiB,IAAK,MAAM,iFAAO;AAC3C,QAAM,EAAEC,YAAW,IAAK3C;AACxB,QAAM4C,cAAc,GAAGnB;AACvB,QAAMoB,eACJN,eAAeO,SAAS,IACpBP,iBACAE,OAAOM,KAAKH,aAAa;IAAEI,UAAU;EAAK;MAIvCR;AAHT,QAAMS,SAASP,kBAAkB;IAC/BQ,WAAWL;IACXM,SAAS3C;IACT4C,QAAOZ,oFAAapB,qBAAe,QAA5BoB,kFAA8BY,WAAK,QAAnCZ,uFAAuC,CAAC;EACjD;AACA,aAAWa,KAAKJ,QAAQ;AACtBhD,OAAGqD,cAAcD,EAAE5C,MAAM4C,EAAEE,OAAO;EACpC;AAEA,QAAMtD,GAAGuD,KAAK/B,oBAAoBkB;AACpC;AAgDO,MAAM7C,qBAAqB,OAChCE,QACAsC,YACG;AACH,QAAM,EAAEmB,oBAAmB,IAAK,MAAM,iFAAO;AAG7C,MACE,OAAOnB,QAAQoB,aAAa,YAC5BpB,QAAQoB,aAAaD,qBACrB;QAKMzD;AAJNA,WAAO2D,MAAM;MACXC,MAAM;MACNC,UAAU;MACVC,cAAc;MACd,IAAI9D,qBAAO2D,SAAG,QAAV3D,uCAAc,CAAC;MACnBO,cAAc+B,QAAQoB;IACxB;EACF;AAEA,SAAO1D;AACT;AAEO,MAAMD,wBAAwB,OACnCgE,OACAzB,YACG;AACH,QAAM,EAAE0B,QAAQC,MAAK,IAAK,MAAM,iFAAO;AACvC,QAAM,EAAEC,iBAAgB,IAAK,MAAM,iFAAO;AAC1C,QAAMC,QAAQ,MAAM,iFAAO;AAC3B,QAAM,EAAEL,cAAcM,UAAS,IAAK9B,mDAAW,CAAC;AAChD,MAAIyB,iBAAiB1B,OAAO;AAC1B,QAAIyB,cAAc;AAChB,YAAM,IAAII,iBAAiBH,OAAO;QAChCK;MACF;IACF,OAAO;AACLJ,aAAOK,KACLJ,MAAMK,eACJH,MAAMI,KAAKC,EAAEL,MAAMM,WAAWC,MAAMf,IAAIG,YAAY;AAGxDE,aAAOD,MACL,IAAIG,iBAAiBH,OAAO;QAC1BK;MACF;IAEJ;EACF;AACF;","names":["generatorTsConfig","getTscBinPath","resolveAlias","assignTsConfigPath","printOrThrowDtsErrors","config","fs","nanoid","dtsTempDirectory","appDirectory","sourceDir","absSourceDir","tsconfigPath","tempDistAbsRootPath","path","join","tempDistAbsOurDir","relative","tempTsconfigPath","basename","ensureFileSync","extendsPath","dirname","resetConfig","extends","compilerOptions","declaration","emitDeclarationOnly","declarationDir","writeJSONSync","tempDistAbsSrcPath","default","findUp","exists","pathExists","tscBinFile","directory","targetFilePath","hasTscBinFile","undefined","cwd","existsSync","Error","options","watchFilenames","userTsconfig","globby","transformDtsAlias","distAbsPath","dtsDistPath","dtsFilenames","length","sync","absolute","result","filenames","baseUrl","paths","r","writeFileSync","content","copy","defaultTsConfigPath","tsconfig","dts","only","distPath","abortOnError","error","logger","chalk","InternalDTSError","local","buildType","warn","bgYellowBright","i18n","t","localeKeys","warns"],"sources":["../../src/utils/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/utils/dts.ts"],"sourcesContent":["import path from 'path';\n// import type { NodePath } from '../../compiled/@babel/traverse';\n// import type * as tt from '../../compiled/@babel/types';\n// import t from '../../compiled/@babel/types';\nimport type {\n ITsconfig,\n BundlelessGeneratorDtsConfig,\n BuildCommandOptions,\n BaseBuildConfig,\n BuildType,\n // AliasOption,\n} from '../types';\n\nexport const generatorTsConfig = async (\n config: BundlelessGeneratorDtsConfig,\n) => {\n const { fs, nanoid } = await import('@modern-js/utils');\n const { dtsTempDirectory } = await import('../constants/dts');\n\n const { appDirectory, sourceDir: absSourceDir, tsconfigPath } = config;\n const tempDistAbsRootPath = path.join(\n appDirectory,\n `${dtsTempDirectory}/${nanoid()}`,\n );\n const tempDistAbsOurDir = path.join(\n tempDistAbsRootPath,\n path.relative(appDirectory, absSourceDir),\n );\n\n const tempTsconfigPath = path.join(\n tempDistAbsRootPath,\n path.basename(tsconfigPath),\n );\n fs.ensureFileSync(tempTsconfigPath);\n\n const extendsPath = path.join(\n path.relative(path.dirname(tempTsconfigPath), path.dirname(tsconfigPath)),\n path.basename(tempTsconfigPath),\n );\n\n const resetConfig: ITsconfig = {\n extends: extendsPath,\n compilerOptions: {\n // Ensure that .d.ts files are created by tsc, but not .js files\n declaration: true,\n emitDeclarationOnly: true,\n // when `outDir` is './dist', `declarationDir` is `./types`\n // tsc will emit:\n // - ./dist/index.js\n // - ./types/index.d.ts\n // we only want to emit declarations\n declarationDir: tempDistAbsOurDir,\n },\n };\n\n fs.writeJSONSync(tempTsconfigPath, resetConfig);\n\n return {\n tempTsconfigPath,\n tempDistAbsRootPath,\n tempDistAbsSrcPath: tempDistAbsOurDir,\n };\n};\n\nexport const getTscBinPath = async (appDirectory: string) => {\n const { fs } = await import('@modern-js/utils');\n const { default: findUp, exists: pathExists } = await import(\n '../../compiled/find-up'\n );\n const tscBinFile = await findUp(\n async (directory: string) => {\n const targetFilePath = path.join(directory, './node_modules/.bin/tsc');\n const hasTscBinFile = await pathExists(targetFilePath);\n if (hasTscBinFile) {\n return targetFilePath;\n }\n return undefined;\n },\n { cwd: appDirectory },\n );\n\n if (!tscBinFile || !fs.existsSync(tscBinFile)) {\n throw new Error(\n 'Failed to excute the `tsc` command, please check if `typescript` is installed correctly in the current directory.',\n );\n }\n\n return tscBinFile;\n};\n\nexport const resolveAlias = async (\n config: BundlelessGeneratorDtsConfig,\n options: {\n userTsconfig: ITsconfig;\n tempTsconfigPath: string;\n tempDistAbsRootPath: string;\n tempDistAbsSrcPath: string;\n },\n watchFilenames: string[] = [],\n) => {\n const { userTsconfig, tempDistAbsSrcPath, tempDistAbsRootPath } = options;\n const { globby, fs } = await import('@modern-js/utils');\n const { transformDtsAlias } = await import('./tspathsTransform');\n const { distAbsPath } = config;\n const dtsDistPath = `${tempDistAbsSrcPath}/**/*.d.ts`;\n const dtsFilenames =\n watchFilenames.length > 0\n ? watchFilenames\n : globby.sync(dtsDistPath, { absolute: true });\n const result = transformDtsAlias({\n filenames: dtsFilenames,\n baseUrl: tempDistAbsRootPath,\n paths: userTsconfig.compilerOptions?.paths ?? {},\n });\n for (const r of result) {\n fs.writeFileSync(r.path, r.content);\n }\n\n await fs.copy(tempDistAbsSrcPath, distAbsPath);\n};\n\n// export const matchesPattern = (calleePath: NodePath, pattern: string) => {\n// const { node } = calleePath;\n\n// if (t.isMemberExpression(node)) {\n// return calleePath.matchesPattern(pattern);\n// }\n\n// if (!t.isIdentifier(node) || pattern.includes('.')) {\n// return false;\n// }\n\n// const name = pattern.split('.')[0];\n\n// return node.name === name;\n// };\n\n// export const isImportCall = (calleePath: NodePath<tt.CallExpression>) => {\n// return t.isImport(calleePath.node.callee);\n// };\n\n// export const verifyTsConfigPaths = async (\n// tsconfigAbsPath: string,\n// userAliases?: AliasOption,\n// ) => {\n// const { readTsConfigByFile, chalk } = await import('@modern-js/utils');\n// if (!userAliases) {\n// return;\n// }\n\n// const paths = Object.keys(\n// readTsConfigByFile(tsconfigAbsPath).compilerOptions?.paths || {},\n// ).map(key => key.replace(/\\/\\*$/, ''));\n\n// Object.keys(userAliases).forEach(name => {\n// if (paths.includes(name)) {\n// throw new Error(\n// chalk.red(\n// `It looks like you have configured the alias ${chalk.bold(\n// name,\n// )} in both the modern.config file and tsconfig.json.\\n Please remove the configuration in modern.config file and just keep the configuration in tsconfig.json.`,\n// ),\n// );\n// }\n// });\n// };\n\nexport const assignTsConfigPath = async (\n config: BaseBuildConfig,\n options: BuildCommandOptions,\n) => {\n const { defaultTsConfigPath } = await import('../constants/dts');\n\n // user run `build --tsconfig './tsconfig.build.json'`\n if (\n typeof options.tsconfig === 'string' &&\n options.tsconfig !== defaultTsConfigPath\n ) {\n config.dts = {\n only: false,\n distPath: './',\n abortOnError: true,\n ...(config.dts ?? {}),\n tsconfigPath: options.tsconfig,\n };\n }\n\n return config;\n};\n\nexport const printOrThrowDtsErrors = async (\n error: unknown,\n options: { abortOnError?: boolean; buildType: BuildType },\n) => {\n const { logger, chalk } = await import('@modern-js/utils');\n const { InternalDTSError } = await import('../error');\n const local = await import('../locale');\n const { abortOnError, buildType } = options ?? {};\n if (error instanceof Error) {\n if (abortOnError) {\n throw new InternalDTSError(error, {\n buildType,\n });\n } else {\n logger.warn(\n chalk.bgYellowBright(\n local.i18n.t(local.localeKeys.warns.dts.abortOnError),\n ),\n );\n logger.error(\n new InternalDTSError(error, {\n buildType,\n }),\n );\n }\n }\n};\n"]}
1
+ {"version":3,"file":null,"mappings":";;;;;;;;;;;;EAUaA,mBAAiB,MAAjBA;EAmDAC,eAAa,MAAbA;EA0BAC,cAAY,MAAZA;EA6EAC,oBAAkB,MAAlBA;EAuBAC,uBAAqB,MAArBA;;;;iEA3LI;AAUV,MAAMJ,oBAAoB,OAC/BK,WACG;AACH,QAAM,EAAEC,IAAIC,OAAM,IAAK,MAAM,iFAAO;AACpC,QAAM,EAAEC,iBAAgB,IAAK,MAAM,iFAAO;AAE1C,QAAM,EAAEC,cAAcC,WAAWC,cAAcC,aAAY,IAAKP;AAChE,QAAMQ,sBAAsBC,cAAKC,KAC/BN,cACA,GAAGD,oBAAoBD,UAAU;AAEnC,QAAMS,oBAAoBF,cAAKC,KAC7BF,qBACAC,cAAKG,SAASR,cAAcE;AAG9B,QAAMO,mBAAmBJ,cAAKC,KAC5BF,qBACAC,cAAKK,SAASP;AAEhBN,KAAGc,eAAeF;AAElB,QAAMG,cAAcP,cAAKC,KACvBD,cAAKG,SAASH,cAAKQ,QAAQJ,mBAAmBJ,cAAKQ,QAAQV,gBAC3DE,cAAKK,SAASD;AAGhB,QAAMK,cAAyB;IAC7BC,SAASH;IACTI,iBAAiB;;MAEfC,aAAa;MACbC,qBAAqB;;;;;;MAMrBC,gBAAgBZ;IAClB;EACF;AAEAV,KAAGuB,cAAcX,kBAAkBK;AAEnC,SAAO;IACLL;IACAL;IACAiB,oBAAoBd;EACtB;AACF;AAEO,MAAMf,gBAAgB,OAAOQ,iBAAyB;AAC3D,QAAM,EAAEH,GAAE,IAAK,MAAM,iFAAO;AAC5B,QAAM,EAAEyB,SAASC,QAAQC,QAAQC,WAAU,IAAK,MAAM,iFACpD;AAEF,QAAMC,aAAa,MAAMH,OACvB,OAAOI,cAAsB;AAC3B,UAAMC,iBAAiBvB,cAAKC,KAAKqB,WAAW;AAC5C,UAAME,gBAAgB,MAAMJ,WAAWG;AACvC,QAAIC,eAAe;AACjB,aAAOD;IACT;AACA,WAAOE;EACT,GACA;IAAEC,KAAK/B;EAAa;AAGtB,MAAI,CAAC0B,cAAc,CAAC7B,GAAGmC,WAAWN,aAAa;AAC7C,UAAM,IAAIO,MACR;EAEJ;AAEA,SAAOP;AACT;AAEO,MAAMjC,eAAe,OAC1BG,QACAsC,SAMAC,iBAA2B,OACxB;MAaMC;AAZT,QAAM,EAAEA,cAAcf,oBAAoBjB,oBAAmB,IAAK8B;AAClE,QAAM,EAAEG,QAAQxC,GAAE,IAAK,MAAM,iFAAO;AACpC,QAAM,EAAEyC,kBAAiB,IAAK,MAAM,iFAAO;AAC3C,QAAM,EAAEC,YAAW,IAAK3C;AACxB,QAAM4C,cAAc,GAAGnB;AACvB,QAAMoB,eACJN,eAAeO,SAAS,IACpBP,iBACAE,OAAOM,KAAKH,aAAa;IAAEI,UAAU;EAAK;MAIvCR;AAHT,QAAMS,SAASP,kBAAkB;IAC/BQ,WAAWL;IACXM,SAAS3C;IACT4C,QAAOZ,oFAAapB,qBAAe,QAA5BoB,kFAA8BY,WAAK,QAAnCZ,uFAAuC,CAAC;EACjD;AACA,aAAWa,KAAKJ,QAAQ;AACtBhD,OAAGqD,cAAcD,EAAE5C,MAAM4C,EAAEE,OAAO;EACpC;AAEA,QAAMtD,GAAGuD,KAAK/B,oBAAoBkB;AACpC;AAgDO,MAAM7C,qBAAqB,OAChCE,QACAsC,YACG;AACH,QAAM,EAAEmB,oBAAmB,IAAK,MAAM,iFAAO;AAG7C,MACE,OAAOnB,QAAQoB,aAAa,YAC5BpB,QAAQoB,aAAaD,qBACrB;QAKMzD;AAJNA,WAAO2D,MAAM;MACXC,MAAM;MACNC,UAAU;MACVC,cAAc;MACd,IAAI9D,qBAAO2D,SAAG,QAAV3D,uCAAc,CAAC;MACnBO,cAAc+B,QAAQoB;IACxB;EACF;AAEA,SAAO1D;AACT;AAEO,MAAMD,wBAAwB,OACnCgE,OACAzB,YACG;AACH,QAAM,EAAE0B,QAAQC,MAAK,IAAK,MAAM,iFAAO;AACvC,QAAM,EAAEC,iBAAgB,IAAK,MAAM,iFAAO;AAC1C,QAAMC,QAAQ,MAAM,iFAAO;AAC3B,QAAM,EAAEL,cAAcM,UAAS,IAAK9B,mDAAW,CAAC;AAChD,MAAIyB,iBAAiB1B,OAAO;AAC1B,QAAIyB,cAAc;AAChB,YAAM,IAAII,iBAAiBH,OAAO;QAChCK;MACF;IACF,OAAO;AACLJ,aAAOK,KACLJ,MAAMK,eACJH,MAAMI,KAAKC,EAAEL,MAAMM,WAAWC,MAAMf,IAAIG,YAAY;AAGxDE,aAAOD,MACL,IAAIG,iBAAiBH,OAAO;QAC1BK;MACF;IAEJ;EACF;AACF;","names":["generatorTsConfig","getTscBinPath","resolveAlias","assignTsConfigPath","printOrThrowDtsErrors","config","fs","nanoid","dtsTempDirectory","appDirectory","sourceDir","absSourceDir","tsconfigPath","tempDistAbsRootPath","path","join","tempDistAbsOurDir","relative","tempTsconfigPath","basename","ensureFileSync","extendsPath","dirname","resetConfig","extends","compilerOptions","declaration","emitDeclarationOnly","declarationDir","writeJSONSync","tempDistAbsSrcPath","default","findUp","exists","pathExists","tscBinFile","directory","targetFilePath","hasTscBinFile","undefined","cwd","existsSync","Error","options","watchFilenames","userTsconfig","globby","transformDtsAlias","distAbsPath","dtsDistPath","dtsFilenames","length","sync","absolute","result","filenames","baseUrl","paths","r","writeFileSync","content","copy","defaultTsConfigPath","tsconfig","dts","only","distPath","abortOnError","error","logger","chalk","InternalDTSError","local","buildType","warn","bgYellowBright","i18n","t","localeKeys","warns"],"sources":["../../src/utils/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/utils/dts.ts"],"sourcesContent":["import path from 'path';\nimport type {\n ITsconfig,\n BundlelessGeneratorDtsConfig,\n BuildCommandOptions,\n BaseBuildConfig,\n BuildType,\n // AliasOption,\n} from '../types';\n\nexport const generatorTsConfig = async (\n config: BundlelessGeneratorDtsConfig,\n) => {\n const { fs, nanoid } = await import('@modern-js/utils');\n const { dtsTempDirectory } = await import('../constants/dts');\n\n const { appDirectory, sourceDir: absSourceDir, tsconfigPath } = config;\n const tempDistAbsRootPath = path.join(\n appDirectory,\n `${dtsTempDirectory}/${nanoid()}`,\n );\n const tempDistAbsOurDir = path.join(\n tempDistAbsRootPath,\n path.relative(appDirectory, absSourceDir),\n );\n\n const tempTsconfigPath = path.join(\n tempDistAbsRootPath,\n path.basename(tsconfigPath),\n );\n fs.ensureFileSync(tempTsconfigPath);\n\n const extendsPath = path.join(\n path.relative(path.dirname(tempTsconfigPath), path.dirname(tsconfigPath)),\n path.basename(tempTsconfigPath),\n );\n\n const resetConfig: ITsconfig = {\n extends: extendsPath,\n compilerOptions: {\n // Ensure that .d.ts files are created by tsc, but not .js files\n declaration: true,\n emitDeclarationOnly: true,\n // when `outDir` is './dist', `declarationDir` is `./types`\n // tsc will emit:\n // - ./dist/index.js\n // - ./types/index.d.ts\n // we only want to emit declarations\n declarationDir: tempDistAbsOurDir,\n },\n };\n\n fs.writeJSONSync(tempTsconfigPath, resetConfig);\n\n return {\n tempTsconfigPath,\n tempDistAbsRootPath,\n tempDistAbsSrcPath: tempDistAbsOurDir,\n };\n};\n\nexport const getTscBinPath = async (appDirectory: string) => {\n const { fs } = await import('@modern-js/utils');\n const { default: findUp, exists: pathExists } = await import(\n '../../compiled/find-up'\n );\n const tscBinFile = await findUp(\n async (directory: string) => {\n const targetFilePath = path.join(directory, './node_modules/.bin/tsc');\n const hasTscBinFile = await pathExists(targetFilePath);\n if (hasTscBinFile) {\n return targetFilePath;\n }\n return undefined;\n },\n { cwd: appDirectory },\n );\n\n if (!tscBinFile || !fs.existsSync(tscBinFile)) {\n throw new Error(\n 'Failed to excute the `tsc` command, please check if `typescript` is installed correctly in the current directory.',\n );\n }\n\n return tscBinFile;\n};\n\nexport const resolveAlias = async (\n config: BundlelessGeneratorDtsConfig,\n options: {\n userTsconfig: ITsconfig;\n tempTsconfigPath: string;\n tempDistAbsRootPath: string;\n tempDistAbsSrcPath: string;\n },\n watchFilenames: string[] = [],\n) => {\n const { userTsconfig, tempDistAbsSrcPath, tempDistAbsRootPath } = options;\n const { globby, fs } = await import('@modern-js/utils');\n const { transformDtsAlias } = await import('./tspathsTransform');\n const { distAbsPath } = config;\n const dtsDistPath = `${tempDistAbsSrcPath}/**/*.d.ts`;\n const dtsFilenames =\n watchFilenames.length > 0\n ? watchFilenames\n : globby.sync(dtsDistPath, { absolute: true });\n const result = transformDtsAlias({\n filenames: dtsFilenames,\n baseUrl: tempDistAbsRootPath,\n paths: userTsconfig.compilerOptions?.paths ?? {},\n });\n for (const r of result) {\n fs.writeFileSync(r.path, r.content);\n }\n\n await fs.copy(tempDistAbsSrcPath, distAbsPath);\n};\n\n// export const matchesPattern = (calleePath: NodePath, pattern: string) => {\n// const { node } = calleePath;\n\n// if (t.isMemberExpression(node)) {\n// return calleePath.matchesPattern(pattern);\n// }\n\n// if (!t.isIdentifier(node) || pattern.includes('.')) {\n// return false;\n// }\n\n// const name = pattern.split('.')[0];\n\n// return node.name === name;\n// };\n\n// export const isImportCall = (calleePath: NodePath<tt.CallExpression>) => {\n// return t.isImport(calleePath.node.callee);\n// };\n\n// export const verifyTsConfigPaths = async (\n// tsconfigAbsPath: string,\n// userAliases?: AliasOption,\n// ) => {\n// const { readTsConfigByFile, chalk } = await import('@modern-js/utils');\n// if (!userAliases) {\n// return;\n// }\n\n// const paths = Object.keys(\n// readTsConfigByFile(tsconfigAbsPath).compilerOptions?.paths || {},\n// ).map(key => key.replace(/\\/\\*$/, ''));\n\n// Object.keys(userAliases).forEach(name => {\n// if (paths.includes(name)) {\n// throw new Error(\n// chalk.red(\n// `It looks like you have configured the alias ${chalk.bold(\n// name,\n// )} in both the modern.config file and tsconfig.json.\\n Please remove the configuration in modern.config file and just keep the configuration in tsconfig.json.`,\n// ),\n// );\n// }\n// });\n// };\n\nexport const assignTsConfigPath = async (\n config: BaseBuildConfig,\n options: BuildCommandOptions,\n) => {\n const { defaultTsConfigPath } = await import('../constants/dts');\n\n // user run `build --tsconfig './tsconfig.build.json'`\n if (\n typeof options.tsconfig === 'string' &&\n options.tsconfig !== defaultTsConfigPath\n ) {\n config.dts = {\n only: false,\n distPath: './',\n abortOnError: true,\n ...(config.dts ?? {}),\n tsconfigPath: options.tsconfig,\n };\n }\n\n return config;\n};\n\nexport const printOrThrowDtsErrors = async (\n error: unknown,\n options: { abortOnError?: boolean; buildType: BuildType },\n) => {\n const { logger, chalk } = await import('@modern-js/utils');\n const { InternalDTSError } = await import('../error');\n const local = await import('../locale');\n const { abortOnError, buildType } = options ?? {};\n if (error instanceof Error) {\n if (abortOnError) {\n throw new InternalDTSError(error, {\n buildType,\n });\n } else {\n logger.warn(\n chalk.bgYellowBright(\n local.i18n.t(local.localeKeys.warns.dts.abortOnError),\n ),\n );\n logger.error(\n new InternalDTSError(error, {\n buildType,\n }),\n );\n }\n }\n};\n"]}
@@ -11,10 +11,10 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
11
11
  const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
12
12
  const _tsconfigpaths = require("@modern-js/utils/tsconfig-paths");
13
13
  const _utils = require("@modern-js/utils");
14
- const _parser = /* @__PURE__ */ _interop_require_wildcard._(require("../../compiled/@babel/parser"));
15
- const _generator = /* @__PURE__ */ _interop_require_default._(require("../../compiled/@babel/generator"));
16
- const _types = /* @__PURE__ */ _interop_require_wildcard._(require("../../compiled/@babel/types"));
17
- const _traverse = /* @__PURE__ */ _interop_require_default._(require("../../compiled/@babel/traverse"));
14
+ const _parser = /* @__PURE__ */ _interop_require_wildcard._(require("@babel/parser"));
15
+ const _generator = /* @__PURE__ */ _interop_require_default._(require("@babel/generator"));
16
+ const _types = /* @__PURE__ */ _interop_require_wildcard._(require("@babel/types"));
17
+ const _traverse = /* @__PURE__ */ _interop_require_default._(require("@babel/traverse"));
18
18
  const _file = require("../constants/file");
19
19
  function mapPathString(nodePath, { filename, baseUrl, paths }) {
20
20
  if (!_types.isStringLiteral(nodePath)) {
@@ -1 +1 @@
1
- {"version":3,"file":null,"mappings":";;;;+BAmHaA;;aAAAA;;;;kEAnHS;+BACU;uBACb;oEACK;sEACF;mEACH;qEACgB;sBACN;AAU7B,SAASC,cACPC,UACA,EAAEC,UAAUC,SAASC,MAAK,GAC1B;AACA,MAAI,CAACC,OAAEC,gBAAgBL,WAAW;AAChC;EACF;AAEA,QAAMM,aAAaN,SAASO,KAAKC;AACjC,QAAMC,cAAcR;AACpB,QAAMS,aAAYC,mCAChBT,SACAC,OACA;IAAC;GAAQ;AAEX,QAAMS,SAASF,UACbJ,YACAO,qBAAmB;AACjB,QAAI,CAACC,UAAGC,WAAWF,kBAAkB;AACnC,aAAOG;IACT;AACA,WAAOF,UAAGG,aAAaJ;EACzB,GACAK,cAAYJ,UAAGC,WAAWG,WAC1BC,kBAAY;AAEd,MAAIP,QAAQ;AACV,UAAMQ,eAAeC,MAAKC,SACxBD,MAAKE,QAAQd,cACbY,MAAKE,QAAQX;AAEf,UAAMY,WAAWH,MAAKI,SAASb;AAE/B,UAAMM,WAAWG,MAAKK,UACpB,GAAGN,aAAaO,WAAW,IAAI,MAAMP,gBAAgBI,UAAU;AAEjE,UAAMI,gBAAgBV,SAASW,WAAW,OAAOX,WAAW,KAAKA;AACjElB,aAAS8B,YAAY1B,OAAE2B,cAAcH;EACvC;AACF;AAgBA,MAAMI,kBACJ,CAACC,WAA4B,CAACjC,aAA4C;AACxED,gBAAcC,SAASkC,IAAI,WAAWD;AACxC;AAEF,MAAME,kBACJ,CAACF,WAA4B,CAACjC,aAA4C;AACxED,gBAAcC,SAASkC,IAAI,WAAwCD;AACrE;AAEF,MAAMG,2BAA2B,CAAC,EAChCnC,UACAC,SACAC,MAAK,MACgB;AACrB,QAAMkC,aAAavB,UAAGwB,aAAarC,UAAU;AAC7C,QAAMsC,MAAMC,QAAOC,MAAMJ,YAAY;IACnCK,YAAY;IACZC,eAAe;IACfC,SAAS;MAAC;;EACZ;AACAC,yBAASN,KAAK;;;IAGZO,mBAAmBd,gBAAgB;MACjC/B;MACAC;MACAC;IACF;IACA4C,mBAAmBZ,gBAAgB;MACjClC;MACAC;MACAC;IACF;EACF;AACA,UAAO6C,uBAAUT,KAAKU;AACxB;AAOO,MAAMnD,oBAAoB,CAACmC,WAAoC;AACpE,QAAM,EAAEiB,YAAY,IAAIhD,SAASC,MAAK,IAAK8B;AAC3C,QAAMkB,kBAAuD;AAC7D,aAAWlD,YAAYiD,WAAW;AAChCC,oBAAgBC,KAAK;MACnB/B,MAAMpB;MACNoD,SAASjB,yBAAyB;QAAEnC;QAAUC;QAASC;MAAM;IAC/D;EACF;AACA,SAAOgD;AACT;","names":["transformDtsAlias","mapPathString","nodePath","filename","baseUrl","paths","t","isStringLiteral","sourcePath","node","value","currentFile","matchPath","createMatchPath","result","packageJsonPath","fs","existsSync","undefined","readJSONSync","filePath","dtsAliasExts","relativePath","path","relative","dirname","fileName","basename","normalize","length","replaceString","startsWith","replaceWith","stringLiteral","transformImport","option","get","transformExport","transformSingleFileAlias","sourceCode","readFileSync","ast","parser","parse","sourceType","errorRecovery","plugins","traverse","ImportDeclaration","ExportDeclaration","generator","code","filenames","transformResult","push","content"],"sources":["../../src/utils/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/utils/tspathsTransform.ts"],"sourcesContent":["import * as path from 'path';\nimport { createMatchPath } from '@modern-js/utils/tsconfig-paths';\nimport { fs } from '@modern-js/utils';\nimport * as parser from '../../compiled/@babel/parser';\nimport generator from '../../compiled/@babel/generator';\nimport * as t from '../../compiled/@babel/types';\nimport traverse, { NodePath } from '../../compiled/@babel/traverse';\nimport { dtsAliasExts } from '../constants/file';\n// import { defaultTransformedFunctions } from '../constants/dts';\n// import { matchesPattern, isImportCall } from './dts';\n\nexport interface TransformOption {\n filename: string;\n baseUrl: string;\n paths: Record<string, string[] | string>;\n}\n\nfunction mapPathString(\n nodePath: NodePath<t.StringLiteral>,\n { filename, baseUrl, paths }: TransformOption,\n) {\n if (!t.isStringLiteral(nodePath)) {\n return;\n }\n\n const sourcePath = nodePath.node.value;\n const currentFile = filename;\n const matchPath = createMatchPath(\n baseUrl,\n paths as { [key: string]: Array<string> },\n ['index'],\n );\n const result = matchPath(\n sourcePath,\n packageJsonPath => {\n if (!fs.existsSync(packageJsonPath)) {\n return undefined;\n }\n return fs.readJSONSync(packageJsonPath);\n },\n filePath => fs.existsSync(filePath),\n dtsAliasExts,\n );\n if (result) {\n const relativePath = path.relative(\n path.dirname(currentFile),\n path.dirname(result),\n );\n const fileName = path.basename(result);\n // 如果是同级文件,则返回的是 ''\n const filePath = path.normalize(\n `${relativePath.length === 0 ? '.' : relativePath}/${fileName}`,\n );\n const replaceString = filePath.startsWith('.') ? filePath : `./${filePath}`;\n nodePath.replaceWith(t.stringLiteral(replaceString));\n }\n}\n\n// const transformCall =\n// (option: TransformOption) => (nodePath: NodePath<t.CallExpression>) => {\n// const calleePath = nodePath.get('callee') as NodePath;\n// const isNormalCall = defaultTransformedFunctions.some(pattern =>\n// matchesPattern(calleePath, pattern),\n// );\n// if (isNormalCall || isImportCall(nodePath)) {\n// mapPathString(\n// nodePath.get('arguments.0') as NodePath<t.StringLiteral>,\n// option,\n// );\n// }\n// };\n\nconst transformImport =\n (option: TransformOption) => (nodePath: NodePath<t.ImportDeclaration>) => {\n mapPathString(nodePath.get('source'), option);\n };\n\nconst transformExport =\n (option: TransformOption) => (nodePath: NodePath<t.ExportDeclaration>) => {\n mapPathString(nodePath.get('source') as NodePath<t.StringLiteral>, option);\n };\n\nconst transformSingleFileAlias = ({\n filename,\n baseUrl,\n paths,\n}: TransformOption) => {\n const sourceCode = fs.readFileSync(filename, 'utf-8');\n const ast = parser.parse(sourceCode, {\n sourceType: 'module',\n errorRecovery: true, // 防止typescript不支持的语法出现而报错\n plugins: ['typescript'],\n });\n traverse(ast, {\n // d.ts file content not have callExpression which can be parsed;\n // CallExpression: transformCall({ filename, baseUrl, paths }) as any,\n ImportDeclaration: transformImport({\n filename,\n baseUrl,\n paths,\n }) as any,\n ExportDeclaration: transformExport({\n filename,\n baseUrl,\n paths,\n }) as any,\n });\n return generator(ast).code;\n};\n\ninterface TransformDtsAliasOption {\n filenames?: string[];\n baseUrl: string;\n paths: Record<string, string[] | string>;\n}\nexport const transformDtsAlias = (option: TransformDtsAliasOption) => {\n const { filenames = [], baseUrl, paths } = option;\n const transformResult: { path: string; content: string }[] = [];\n for (const filename of filenames) {\n transformResult.push({\n path: filename,\n content: transformSingleFileAlias({ filename, baseUrl, paths }),\n });\n }\n return transformResult;\n};\n"]}
1
+ {"version":3,"file":null,"mappings":";;;;+BAmHaA;;aAAAA;;;;kEAnHS;+BACU;uBACb;oEACK;sEACF;mEACH;qEACgB;sBACN;AAU7B,SAASC,cACPC,UACA,EAAEC,UAAUC,SAASC,MAAK,GAC1B;AACA,MAAI,CAACC,OAAEC,gBAAgBL,WAAW;AAChC;EACF;AAEA,QAAMM,aAAaN,SAASO,KAAKC;AACjC,QAAMC,cAAcR;AACpB,QAAMS,aAAYC,mCAChBT,SACAC,OACA;IAAC;GAAQ;AAEX,QAAMS,SAASF,UACbJ,YACAO,qBAAmB;AACjB,QAAI,CAACC,UAAGC,WAAWF,kBAAkB;AACnC,aAAOG;IACT;AACA,WAAOF,UAAGG,aAAaJ;EACzB,GACAK,cAAYJ,UAAGC,WAAWG,WAC1BC,kBAAY;AAEd,MAAIP,QAAQ;AACV,UAAMQ,eAAeC,MAAKC,SACxBD,MAAKE,QAAQd,cACbY,MAAKE,QAAQX;AAEf,UAAMY,WAAWH,MAAKI,SAASb;AAE/B,UAAMM,WAAWG,MAAKK,UACpB,GAAGN,aAAaO,WAAW,IAAI,MAAMP,gBAAgBI,UAAU;AAEjE,UAAMI,gBAAgBV,SAASW,WAAW,OAAOX,WAAW,KAAKA;AACjElB,aAAS8B,YAAY1B,OAAE2B,cAAcH;EACvC;AACF;AAgBA,MAAMI,kBACJ,CAACC,WAA4B,CAACjC,aAA4C;AACxED,gBAAcC,SAASkC,IAAI,WAAWD;AACxC;AAEF,MAAME,kBACJ,CAACF,WAA4B,CAACjC,aAA4C;AACxED,gBAAcC,SAASkC,IAAI,WAAwCD;AACrE;AAEF,MAAMG,2BAA2B,CAAC,EAChCnC,UACAC,SACAC,MAAK,MACgB;AACrB,QAAMkC,aAAavB,UAAGwB,aAAarC,UAAU;AAC7C,QAAMsC,MAAMC,QAAOC,MAAMJ,YAAY;IACnCK,YAAY;IACZC,eAAe;IACfC,SAAS;MAAC;;EACZ;AACAC,yBAASN,KAAK;;;IAGZO,mBAAmBd,gBAAgB;MACjC/B;MACAC;MACAC;IACF;IACA4C,mBAAmBZ,gBAAgB;MACjClC;MACAC;MACAC;IACF;EACF;AACA,UAAO6C,uBAAUT,KAAKU;AACxB;AAOO,MAAMnD,oBAAoB,CAACmC,WAAoC;AACpE,QAAM,EAAEiB,YAAY,IAAIhD,SAASC,MAAK,IAAK8B;AAC3C,QAAMkB,kBAAuD;AAC7D,aAAWlD,YAAYiD,WAAW;AAChCC,oBAAgBC,KAAK;MACnB/B,MAAMpB;MACNoD,SAASjB,yBAAyB;QAAEnC;QAAUC;QAASC;MAAM;IAC/D;EACF;AACA,SAAOgD;AACT;","names":["transformDtsAlias","mapPathString","nodePath","filename","baseUrl","paths","t","isStringLiteral","sourcePath","node","value","currentFile","matchPath","createMatchPath","result","packageJsonPath","fs","existsSync","undefined","readJSONSync","filePath","dtsAliasExts","relativePath","path","relative","dirname","fileName","basename","normalize","length","replaceString","startsWith","replaceWith","stringLiteral","transformImport","option","get","transformExport","transformSingleFileAlias","sourceCode","readFileSync","ast","parser","parse","sourceType","errorRecovery","plugins","traverse","ImportDeclaration","ExportDeclaration","generator","code","filenames","transformResult","push","content"],"sources":["../../src/utils/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/utils/tspathsTransform.ts"],"sourcesContent":["import * as path from 'path';\nimport { createMatchPath } from '@modern-js/utils/tsconfig-paths';\nimport { fs } from '@modern-js/utils';\nimport * as parser from '@babel/parser';\nimport generator from '@babel/generator';\nimport * as t from '@babel/types';\nimport traverse, { NodePath } from '@babel/traverse';\nimport { dtsAliasExts } from '../constants/file';\n// import { defaultTransformedFunctions } from '../constants/dts';\n// import { matchesPattern, isImportCall } from './dts';\n\nexport interface TransformOption {\n filename: string;\n baseUrl: string;\n paths: Record<string, string[] | string>;\n}\n\nfunction mapPathString(\n nodePath: NodePath<t.StringLiteral>,\n { filename, baseUrl, paths }: TransformOption,\n) {\n if (!t.isStringLiteral(nodePath)) {\n return;\n }\n\n const sourcePath = nodePath.node.value;\n const currentFile = filename;\n const matchPath = createMatchPath(\n baseUrl,\n paths as { [key: string]: Array<string> },\n ['index'],\n );\n const result = matchPath(\n sourcePath,\n packageJsonPath => {\n if (!fs.existsSync(packageJsonPath)) {\n return undefined;\n }\n return fs.readJSONSync(packageJsonPath);\n },\n filePath => fs.existsSync(filePath),\n dtsAliasExts,\n );\n if (result) {\n const relativePath = path.relative(\n path.dirname(currentFile),\n path.dirname(result),\n );\n const fileName = path.basename(result);\n // 如果是同级文件,则返回的是 ''\n const filePath = path.normalize(\n `${relativePath.length === 0 ? '.' : relativePath}/${fileName}`,\n );\n const replaceString = filePath.startsWith('.') ? filePath : `./${filePath}`;\n nodePath.replaceWith(t.stringLiteral(replaceString));\n }\n}\n\n// const transformCall =\n// (option: TransformOption) => (nodePath: NodePath<t.CallExpression>) => {\n// const calleePath = nodePath.get('callee') as NodePath;\n// const isNormalCall = defaultTransformedFunctions.some(pattern =>\n// matchesPattern(calleePath, pattern),\n// );\n// if (isNormalCall || isImportCall(nodePath)) {\n// mapPathString(\n// nodePath.get('arguments.0') as NodePath<t.StringLiteral>,\n// option,\n// );\n// }\n// };\n\nconst transformImport =\n (option: TransformOption) => (nodePath: NodePath<t.ImportDeclaration>) => {\n mapPathString(nodePath.get('source'), option);\n };\n\nconst transformExport =\n (option: TransformOption) => (nodePath: NodePath<t.ExportDeclaration>) => {\n mapPathString(nodePath.get('source') as NodePath<t.StringLiteral>, option);\n };\n\nconst transformSingleFileAlias = ({\n filename,\n baseUrl,\n paths,\n}: TransformOption) => {\n const sourceCode = fs.readFileSync(filename, 'utf-8');\n const ast = parser.parse(sourceCode, {\n sourceType: 'module',\n errorRecovery: true, // 防止typescript不支持的语法出现而报错\n plugins: ['typescript'],\n });\n traverse(ast, {\n // d.ts file content not have callExpression which can be parsed;\n // CallExpression: transformCall({ filename, baseUrl, paths }) as any,\n ImportDeclaration: transformImport({\n filename,\n baseUrl,\n paths,\n }) as any,\n ExportDeclaration: transformExport({\n filename,\n baseUrl,\n paths,\n }) as any,\n });\n return generator(ast).code;\n};\n\ninterface TransformDtsAliasOption {\n filenames?: string[];\n baseUrl: string;\n paths: Record<string, string[] | string>;\n}\nexport const transformDtsAlias = (option: TransformDtsAliasOption) => {\n const { filenames = [], baseUrl, paths } = option;\n const transformResult: { path: string; content: string }[] = [];\n for (const filename of filenames) {\n transformResult.push({\n path: filename,\n content: transformSingleFileAlias({ filename, baseUrl, paths }),\n });\n }\n return transformResult;\n};\n"]}
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "module-tools",
16
16
  "lib-tools"
17
17
  ],
18
- "version": "2.20.0",
18
+ "version": "2.21.0",
19
19
  "bin": {
20
20
  "modern": "./bin/modern.js",
21
21
  "modern-module": "./bin/modern.js"
@@ -40,21 +40,27 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
+ "@babel/parser": "^7.21.8",
44
+ "@babel/generator": "^7.21.5",
45
+ "@babel/types": "^7.21.5",
46
+ "@babel/traverse": "^7.21.5",
43
47
  "@modern-js/libuild": "0.12.2",
44
48
  "@modern-js/libuild-plugin-svgr": "0.12.2",
45
49
  "@modern-js/libuild-plugin-swc": "0.12.2",
46
50
  "postcss": "8.4.6",
47
51
  "@swc/helpers": "0.5.1",
48
- "@modern-js/core": "2.20.0",
49
- "@modern-js/new-action": "2.20.0",
50
- "@modern-js/plugin": "2.20.0",
51
- "@modern-js/plugin-changeset": "2.20.0",
52
- "@modern-js/plugin-i18n": "2.20.0",
53
- "@modern-js/plugin-lint": "2.20.0",
54
- "@modern-js/upgrade": "2.20.0",
55
- "@modern-js/utils": "2.20.0"
52
+ "@modern-js/core": "2.21.0",
53
+ "@modern-js/new-action": "2.21.0",
54
+ "@modern-js/plugin": "2.21.0",
55
+ "@modern-js/plugin-changeset": "2.21.0",
56
+ "@modern-js/plugin-i18n": "2.21.0",
57
+ "@modern-js/plugin-lint": "2.21.0",
58
+ "@modern-js/upgrade": "2.21.0",
59
+ "@modern-js/utils": "2.21.0"
56
60
  },
57
61
  "devDependencies": {
62
+ "@types/babel__generator": "7.6.4",
63
+ "@types/babel__traverse": "7.18.5",
58
64
  "@types/fs-extra": "9.0.13",
59
65
  "@types/jest": "^29",
60
66
  "@types/node": "^14",
@@ -64,11 +70,11 @@
64
70
  "path-browserify": "1.0.1",
65
71
  "postcss-alias": "2.0.0",
66
72
  "react": "17",
67
- "typescript": "^4",
68
- "@modern-js/builder-webpack-provider": "2.20.0",
69
- "@modern-js/self": "npm:@modern-js/module-tools@2.20.0",
70
- "@scripts/build": "2.20.0",
71
- "@scripts/jest-config": "2.20.0"
73
+ "typescript": "^5",
74
+ "@modern-js/builder-webpack-provider": "2.21.0",
75
+ "@modern-js/self": "npm:@modern-js/module-tools@2.21.0",
76
+ "@scripts/jest-config": "2.21.0",
77
+ "@scripts/build": "2.21.0"
72
78
  },
73
79
  "publishConfig": {
74
80
  "registry": "https://registry.npmjs.org/",
@@ -80,7 +86,7 @@
80
86
  }
81
87
  },
82
88
  "peerDependencies": {
83
- "typescript": "^4"
89
+ "typescript": "^4 || ^5"
84
90
  },
85
91
  "scripts": {
86
92
  "build": "modern-lib build",
@@ -1 +0,0 @@
1
- export = any;
@@ -1 +0,0 @@
1
- (()=>{"use strict";var e={367:e=>{e.exports=require("../highlight")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var s=t[r]={exports:{}};var o=true;try{e[r](s,s.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.codeFrameColumns=codeFrameColumns;e["default"]=_default;var t=__nccwpck_require__(367);let n=false;function getDefs(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}const s=/\r\n|[\n\r\u2028\u2029]/;function getMarkerLines(e,t,r){const n=Object.assign({column:0,line:-1},e.start);const s=Object.assign({},n,e.end);const{linesAbove:o=2,linesBelow:a=3}=r||{};const i=n.line;const l=n.column;const c=s.line;const u=s.column;let f=Math.max(i-(o+1),0);let m=Math.min(t.length,c+a);if(i===-1){f=0}if(c===-1){m=t.length}const g=c-i;const d={};if(g){for(let e=0;e<=g;e++){const r=e+i;if(!l){d[r]=true}else if(e===0){const e=t[r-1].length;d[r]=[l,e-l+1]}else if(e===g){d[r]=[0,u]}else{const n=t[r-e].length;d[r]=[0,n]}}}else{if(l===u){if(l){d[i]=[l,0]}else{d[i]=true}}else{d[i]=[l,u-l]}}return{start:f,end:m,markerLines:d}}function codeFrameColumns(e,r,n={}){const o=(n.highlightCode||n.forceColor)&&(0,t.shouldHighlight)(n);const a=(0,t.getChalk)(n);const i=getDefs(a);const maybeHighlight=(e,t)=>o?e(t):t;const l=e.split(s);const{start:c,end:u,markerLines:f}=getMarkerLines(r,l,n);const m=r.start&&typeof r.start.column==="number";const g=String(u).length;const d=o?(0,t.default)(e,n):e;let _=d.split(s,u).slice(c,u).map(((e,t)=>{const r=c+1+t;const s=` ${r}`.slice(-g);const o=` ${s} |`;const a=f[r];const l=!f[r+1];if(a){let t="";if(Array.isArray(a)){const r=e.slice(0,Math.max(a[0]-1,0)).replace(/[^\t]/g," ");const s=a[1]||1;t=["\n ",maybeHighlight(i.gutter,o.replace(/\d/g," "))," ",r,maybeHighlight(i.marker,"^").repeat(s)].join("");if(l&&n.message){t+=" "+maybeHighlight(i.message,n.message)}}return[maybeHighlight(i.marker,">"),maybeHighlight(i.gutter,o),e.length>0?` ${e}`:"",t].join("")}else{return` ${maybeHighlight(i.gutter,o)}${e.length>0?` ${e}`:""}`}})).join("\n");if(n.message&&!m){_=`${" ".repeat(g+1)}${n.message}\n${_}`}if(o){return a.reset(_)}else{return _}}function _default(e,t,r,s={}){if(!n){n=true;const e="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning){process.emitWarning(e,"DeprecationWarning")}else{const t=new Error(e);t.name="DeprecationWarning";console.warn(new Error(e))}}r=Math.max(r,0);const o={start:{column:r,line:t}};return codeFrameColumns(e,o,s)}})();module.exports=r})();
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2014-present Sebastian McKenzie and other contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +0,0 @@
1
- {"name":"@babel/code-frame","author":"The Babel Team (https://babel.dev/team)","version":"7.16.7","license":"MIT","types":"index.d.ts"}
@@ -1 +0,0 @@
1
- export = any;
@@ -1 +0,0 @@
1
- (()=>{var t={90:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;function SourcePos(){return{identifierName:undefined,line:undefined,column:undefined,filename:undefined}}const n=/^[ \t]+$/;class Buffer{constructor(t){this._map=null;this._buf="";this._last=0;this._queue=[];this._position={line:1,column:0};this._sourcePosition=SourcePos();this._disallowedPop=null;this._map=t}get(){this._flush();const t=this._map;const e={code:this._buf.trimRight(),decodedMap:t==null?void 0:t.getDecoded(),get map(){return e.map=t?t.get():null},set map(t){Object.defineProperty(e,"map",{value:t,writable:true})},get rawMappings(){return e.rawMappings=t==null?void 0:t.getRawMappings()},set rawMappings(t){Object.defineProperty(e,"rawMappings",{value:t,writable:true})}};return e}append(t){this._flush();const{line:e,column:n,filename:i,identifierName:s}=this._sourcePosition;this._append(t,e,n,s,i)}queue(t){if(t==="\n"){while(this._queue.length>0&&n.test(this._queue[0][0])){this._queue.shift()}}const{line:e,column:i,filename:s,identifierName:r}=this._sourcePosition;this._queue.unshift([t,e,i,r,s])}queueIndentation(t){this._queue.unshift([t,undefined,undefined,undefined,undefined])}_flush(){let t;while(t=this._queue.pop()){this._append(...t)}}_append(t,e,n,i,s){this._buf+=t;this._last=t.charCodeAt(t.length-1);let r=t.indexOf("\n");let o=0;if(r!==0){this._mark(e,n,i,s)}while(r!==-1){this._position.line++;this._position.column=0;o=r+1;if(o<t.length){this._mark(++e,0,i,s)}r=t.indexOf("\n",o)}this._position.column+=t.length-o}_mark(t,e,n,i){var s;(s=this._map)==null?void 0:s.mark(this._position,t,e,n,i)}removeTrailingNewline(){if(this._queue.length>0&&this._queue[0][0]==="\n"){this._queue.shift()}}removeLastSemicolon(){if(this._queue.length>0&&this._queue[0][0]===";"){this._queue.shift()}}getLastChar(){let t;if(this._queue.length>0){const e=this._queue[0][0];t=e.charCodeAt(0)}else{t=this._last}return t}endsWithCharAndNewline(){const t=this._queue;if(t.length>0){const e=t[0][0];const n=e.charCodeAt(0);if(n!==10)return;if(t.length>1){const e=t[1][0];return e.charCodeAt(0)}else{return this._last}}}hasContent(){return this._queue.length>0||!!this._last}exactSource(t,e){this.source("start",t);e();this.source("end",t);this._disallowPop("start",t)}source(t,e){if(t&&!e)return;this._normalizePosition(t,e,this._sourcePosition)}withSource(t,e,n){if(!this._map)return n();const i=this._sourcePosition.line;const s=this._sourcePosition.column;const r=this._sourcePosition.filename;const o=this._sourcePosition.identifierName;this.source(t,e);n();if(!this._disallowedPop||this._disallowedPop.line!==i||this._disallowedPop.column!==s||this._disallowedPop.filename!==r){this._sourcePosition.line=i;this._sourcePosition.column=s;this._sourcePosition.filename=r;this._sourcePosition.identifierName=o;this._disallowedPop=null}}_disallowPop(t,e){if(t&&!e)return;this._disallowedPop=this._normalizePosition(t,e,SourcePos())}_normalizePosition(t,e,n){const i=e?e[t]:null;n.identifierName=t==="start"&&(e==null?void 0:e.identifierName)||undefined;n.line=i==null?void 0:i.line;n.column=i==null?void 0:i.column;n.filename=e==null?void 0:e.filename;return n}getCurrentColumn(){const t=this._queue.reduce(((t,e)=>e[0]+t),"");const e=t.lastIndexOf("\n");return e===-1?this._position.column+t.length:t.length-1-e}getCurrentLine(){const t=this._queue.reduce(((t,e)=>e[0]+t),"");let e=0;for(let n=0;n<t.length;n++){if(t[n]==="\n")e++}return this._position.line+e}}e["default"]=Buffer},712:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.BlockStatement=BlockStatement;e.Directive=Directive;e.DirectiveLiteral=DirectiveLiteral;e.File=File;e.InterpreterDirective=InterpreterDirective;e.Placeholder=Placeholder;e.Program=Program;function File(t){if(t.program){this.print(t.program.interpreter,t)}this.print(t.program,t)}function Program(t){this.printInnerComments(t,false);this.printSequence(t.directives,t);if(t.directives&&t.directives.length)this.newline();this.printSequence(t.body,t)}function BlockStatement(t){var e;this.token("{");this.printInnerComments(t);const n=(e=t.directives)==null?void 0:e.length;if(t.body.length||n){this.newline();this.printSequence(t.directives,t,{indent:true});if(n)this.newline();this.printSequence(t.body,t,{indent:true});this.removeTrailingNewline();this.source("end",t.loc);if(!this.endsWith(10))this.newline();this.rightBrace()}else{this.source("end",t.loc);this.token("}")}}function Directive(t){this.print(t.value,t);this.semicolon()}const n=/(?:^|[^\\])(?:\\\\)*'/;const i=/(?:^|[^\\])(?:\\\\)*"/;function DirectiveLiteral(t){const e=this.getPossibleRaw(t);if(!this.format.minified&&e!=null){this.token(e);return}const{value:s}=t;if(!i.test(s)){this.token(`"${s}"`)}else if(!n.test(s)){this.token(`'${s}'`)}else{throw new Error("Malformed AST: it is not possible to print a directive containing"+" both unescaped single and double quotes.")}}function InterpreterDirective(t){this.token(`#!${t.value}\n`)}function Placeholder(t){this.token("%%");this.print(t.name);this.token("%%");if(t.expectedNode==="Statement"){this.semicolon()}}},640:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ClassAccessorProperty=ClassAccessorProperty;e.ClassBody=ClassBody;e.ClassExpression=e.ClassDeclaration=ClassDeclaration;e.ClassMethod=ClassMethod;e.ClassPrivateMethod=ClassPrivateMethod;e.ClassPrivateProperty=ClassPrivateProperty;e.ClassProperty=ClassProperty;e.StaticBlock=StaticBlock;e._classMethodHead=_classMethodHead;var i=n(740);const{isExportDefaultDeclaration:s,isExportNamedDeclaration:r}=i;function ClassDeclaration(t,e){if(!this.format.decoratorsBeforeExport||!s(e)&&!r(e)){this.printJoin(t.decorators,t)}if(t.declare){this.word("declare");this.space()}if(t.abstract){this.word("abstract");this.space()}this.word("class");this.printInnerComments(t);if(t.id){this.space();this.print(t.id,t)}this.print(t.typeParameters,t);if(t.superClass){this.space();this.word("extends");this.space();this.print(t.superClass,t);this.print(t.superTypeParameters,t)}if(t.implements){this.space();this.word("implements");this.space();this.printList(t.implements,t)}this.space();this.print(t.body,t)}function ClassBody(t){this.token("{");this.printInnerComments(t);if(t.body.length===0){this.token("}")}else{this.newline();this.indent();this.printSequence(t.body,t);this.dedent();if(!this.endsWith(10))this.newline();this.rightBrace()}}function ClassProperty(t){this.printJoin(t.decorators,t);this.source("end",t.key.loc);this.tsPrintClassMemberModifiers(t,true);if(t.computed){this.token("[");this.print(t.key,t);this.token("]")}else{this._variance(t);this.print(t.key,t)}if(t.optional){this.token("?")}if(t.definite){this.token("!")}this.print(t.typeAnnotation,t);if(t.value){this.space();this.token("=");this.space();this.print(t.value,t)}this.semicolon()}function ClassAccessorProperty(t){this.printJoin(t.decorators,t);this.source("end",t.key.loc);this.tsPrintClassMemberModifiers(t,true);this.word("accessor");this.printInnerComments(t);this.space();if(t.computed){this.token("[");this.print(t.key,t);this.token("]")}else{this._variance(t);this.print(t.key,t)}if(t.optional){this.token("?")}if(t.definite){this.token("!")}this.print(t.typeAnnotation,t);if(t.value){this.space();this.token("=");this.space();this.print(t.value,t)}this.semicolon()}function ClassPrivateProperty(t){this.printJoin(t.decorators,t);if(t.static){this.word("static");this.space()}this.print(t.key,t);this.print(t.typeAnnotation,t);if(t.value){this.space();this.token("=");this.space();this.print(t.value,t)}this.semicolon()}function ClassMethod(t){this._classMethodHead(t);this.space();this.print(t.body,t)}function ClassPrivateMethod(t){this._classMethodHead(t);this.space();this.print(t.body,t)}function _classMethodHead(t){this.printJoin(t.decorators,t);this.source("end",t.key.loc);this.tsPrintClassMemberModifiers(t,false);this._methodHead(t)}function StaticBlock(t){this.word("static");this.space();this.token("{");if(t.body.length===0){this.token("}")}else{this.newline();this.printSequence(t.body,t,{indent:true});this.rightBrace()}}},774:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LogicalExpression=e.BinaryExpression=e.AssignmentExpression=AssignmentExpression;e.AssignmentPattern=AssignmentPattern;e.AwaitExpression=void 0;e.BindExpression=BindExpression;e.CallExpression=CallExpression;e.ConditionalExpression=ConditionalExpression;e.Decorator=Decorator;e.DoExpression=DoExpression;e.EmptyStatement=EmptyStatement;e.ExpressionStatement=ExpressionStatement;e.Import=Import;e.MemberExpression=MemberExpression;e.MetaProperty=MetaProperty;e.ModuleExpression=ModuleExpression;e.NewExpression=NewExpression;e.OptionalCallExpression=OptionalCallExpression;e.OptionalMemberExpression=OptionalMemberExpression;e.ParenthesizedExpression=ParenthesizedExpression;e.PrivateName=PrivateName;e.SequenceExpression=SequenceExpression;e.Super=Super;e.ThisExpression=ThisExpression;e.UnaryExpression=UnaryExpression;e.UpdateExpression=UpdateExpression;e.V8IntrinsicIdentifier=V8IntrinsicIdentifier;e.YieldExpression=void 0;var i=n(740);var s=n(458);const{isCallExpression:r,isLiteral:o,isMemberExpression:a,isNewExpression:c}=i;function UnaryExpression(t){if(t.operator==="void"||t.operator==="delete"||t.operator==="typeof"||t.operator==="throw"){this.word(t.operator);this.space()}else{this.token(t.operator)}this.print(t.argument,t)}function DoExpression(t){if(t.async){this.word("async");this.space()}this.word("do");this.space();this.print(t.body,t)}function ParenthesizedExpression(t){this.token("(");this.print(t.expression,t);this.token(")")}function UpdateExpression(t){if(t.prefix){this.token(t.operator);this.print(t.argument,t)}else{this.startTerminatorless(true);this.print(t.argument,t);this.endTerminatorless();this.token(t.operator)}}function ConditionalExpression(t){this.print(t.test,t);this.space();this.token("?");this.space();this.print(t.consequent,t);this.space();this.token(":");this.space();this.print(t.alternate,t)}function NewExpression(t,e){this.word("new");this.space();this.print(t.callee,t);if(this.format.minified&&t.arguments.length===0&&!t.optional&&!r(e,{callee:t})&&!a(e)&&!c(e)){return}this.print(t.typeArguments,t);this.print(t.typeParameters,t);if(t.optional){this.token("?.")}this.token("(");this.printList(t.arguments,t);this.token(")")}function SequenceExpression(t){this.printList(t.expressions,t)}function ThisExpression(){this.word("this")}function Super(){this.word("super")}function isDecoratorMemberExpression(t){switch(t.type){case"Identifier":return true;case"MemberExpression":return!t.computed&&t.property.type==="Identifier"&&isDecoratorMemberExpression(t.object);default:return false}}function shouldParenthesizeDecoratorExpression(t){if(t.type==="CallExpression"){t=t.callee}if(t.type==="ParenthesizedExpression"){return false}return!isDecoratorMemberExpression(t)}function Decorator(t){this.token("@");const{expression:e}=t;if(shouldParenthesizeDecoratorExpression(e)){this.token("(");this.print(e,t);this.token(")")}else{this.print(e,t)}this.newline()}function OptionalMemberExpression(t){this.print(t.object,t);if(!t.computed&&a(t.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}let e=t.computed;if(o(t.property)&&typeof t.property.value==="number"){e=true}if(t.optional){this.token("?.")}if(e){this.token("[");this.print(t.property,t);this.token("]")}else{if(!t.optional){this.token(".")}this.print(t.property,t)}}function OptionalCallExpression(t){this.print(t.callee,t);this.print(t.typeArguments,t);this.print(t.typeParameters,t);if(t.optional){this.token("?.")}this.token("(");this.printList(t.arguments,t);this.token(")")}function CallExpression(t){this.print(t.callee,t);this.print(t.typeArguments,t);this.print(t.typeParameters,t);this.token("(");this.printList(t.arguments,t);this.token(")")}function Import(){this.word("import")}function buildYieldAwait(t){return function(e){this.word(t);if(e.delegate){this.token("*")}if(e.argument){this.space();const t=this.startTerminatorless();this.print(e.argument,e);this.endTerminatorless(t)}}}const p=buildYieldAwait("yield");e.YieldExpression=p;const l=buildYieldAwait("await");e.AwaitExpression=l;function EmptyStatement(){this.semicolon(true)}function ExpressionStatement(t){this.print(t.expression,t);this.semicolon()}function AssignmentPattern(t){this.print(t.left,t);if(t.left.optional)this.token("?");this.print(t.left.typeAnnotation,t);this.space();this.token("=");this.space();this.print(t.right,t)}function AssignmentExpression(t,e){const n=this.inForStatementInitCounter&&t.operator==="in"&&!s.needsParens(t,e);if(n){this.token("(")}this.print(t.left,t);this.space();if(t.operator==="in"||t.operator==="instanceof"){this.word(t.operator)}else{this.token(t.operator)}this.space();this.print(t.right,t);if(n){this.token(")")}}function BindExpression(t){this.print(t.object,t);this.token("::");this.print(t.callee,t)}function MemberExpression(t){this.print(t.object,t);if(!t.computed&&a(t.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}let e=t.computed;if(o(t.property)&&typeof t.property.value==="number"){e=true}if(e){this.token("[");this.print(t.property,t);this.token("]")}else{this.token(".");this.print(t.property,t)}}function MetaProperty(t){this.print(t.meta,t);this.token(".");this.print(t.property,t)}function PrivateName(t){this.token("#");this.print(t.id,t)}function V8IntrinsicIdentifier(t){this.token("%");this.word(t.name)}function ModuleExpression(t){this.word("module");this.space();this.token("{");if(t.body.body.length===0){this.token("}")}else{this.newline();this.printSequence(t.body.body,t,{indent:true});this.rightBrace()}}},818:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AnyTypeAnnotation=AnyTypeAnnotation;e.ArrayTypeAnnotation=ArrayTypeAnnotation;e.BooleanLiteralTypeAnnotation=BooleanLiteralTypeAnnotation;e.BooleanTypeAnnotation=BooleanTypeAnnotation;e.DeclareClass=DeclareClass;e.DeclareExportAllDeclaration=DeclareExportAllDeclaration;e.DeclareExportDeclaration=DeclareExportDeclaration;e.DeclareFunction=DeclareFunction;e.DeclareInterface=DeclareInterface;e.DeclareModule=DeclareModule;e.DeclareModuleExports=DeclareModuleExports;e.DeclareOpaqueType=DeclareOpaqueType;e.DeclareTypeAlias=DeclareTypeAlias;e.DeclareVariable=DeclareVariable;e.DeclaredPredicate=DeclaredPredicate;e.EmptyTypeAnnotation=EmptyTypeAnnotation;e.EnumBooleanBody=EnumBooleanBody;e.EnumBooleanMember=EnumBooleanMember;e.EnumDeclaration=EnumDeclaration;e.EnumDefaultedMember=EnumDefaultedMember;e.EnumNumberBody=EnumNumberBody;e.EnumNumberMember=EnumNumberMember;e.EnumStringBody=EnumStringBody;e.EnumStringMember=EnumStringMember;e.EnumSymbolBody=EnumSymbolBody;e.ExistsTypeAnnotation=ExistsTypeAnnotation;e.FunctionTypeAnnotation=FunctionTypeAnnotation;e.FunctionTypeParam=FunctionTypeParam;e.IndexedAccessType=IndexedAccessType;e.InferredPredicate=InferredPredicate;e.InterfaceDeclaration=InterfaceDeclaration;e.GenericTypeAnnotation=e.ClassImplements=e.InterfaceExtends=InterfaceExtends;e.InterfaceTypeAnnotation=InterfaceTypeAnnotation;e.IntersectionTypeAnnotation=IntersectionTypeAnnotation;e.MixedTypeAnnotation=MixedTypeAnnotation;e.NullLiteralTypeAnnotation=NullLiteralTypeAnnotation;e.NullableTypeAnnotation=NullableTypeAnnotation;Object.defineProperty(e,"NumberLiteralTypeAnnotation",{enumerable:true,get:function(){return r.NumericLiteral}});e.NumberTypeAnnotation=NumberTypeAnnotation;e.ObjectTypeAnnotation=ObjectTypeAnnotation;e.ObjectTypeCallProperty=ObjectTypeCallProperty;e.ObjectTypeIndexer=ObjectTypeIndexer;e.ObjectTypeInternalSlot=ObjectTypeInternalSlot;e.ObjectTypeProperty=ObjectTypeProperty;e.ObjectTypeSpreadProperty=ObjectTypeSpreadProperty;e.OpaqueType=OpaqueType;e.OptionalIndexedAccessType=OptionalIndexedAccessType;e.QualifiedTypeIdentifier=QualifiedTypeIdentifier;Object.defineProperty(e,"StringLiteralTypeAnnotation",{enumerable:true,get:function(){return r.StringLiteral}});e.StringTypeAnnotation=StringTypeAnnotation;e.SymbolTypeAnnotation=SymbolTypeAnnotation;e.ThisTypeAnnotation=ThisTypeAnnotation;e.TupleTypeAnnotation=TupleTypeAnnotation;e.TypeAlias=TypeAlias;e.TypeAnnotation=TypeAnnotation;e.TypeCastExpression=TypeCastExpression;e.TypeParameter=TypeParameter;e.TypeParameterDeclaration=e.TypeParameterInstantiation=TypeParameterInstantiation;e.TypeofTypeAnnotation=TypeofTypeAnnotation;e.UnionTypeAnnotation=UnionTypeAnnotation;e.Variance=Variance;e.VoidTypeAnnotation=VoidTypeAnnotation;e._interfaceish=_interfaceish;e._variance=_variance;var i=n(740);var s=n(330);var r=n(446);const{isDeclareExportDeclaration:o,isStatement:a}=i;function AnyTypeAnnotation(){this.word("any")}function ArrayTypeAnnotation(t){this.print(t.elementType,t);this.token("[");this.token("]")}function BooleanTypeAnnotation(){this.word("boolean")}function BooleanLiteralTypeAnnotation(t){this.word(t.value?"true":"false")}function NullLiteralTypeAnnotation(){this.word("null")}function DeclareClass(t,e){if(!o(e)){this.word("declare");this.space()}this.word("class");this.space();this._interfaceish(t)}function DeclareFunction(t,e){if(!o(e)){this.word("declare");this.space()}this.word("function");this.space();this.print(t.id,t);this.print(t.id.typeAnnotation.typeAnnotation,t);if(t.predicate){this.space();this.print(t.predicate,t)}this.semicolon()}function InferredPredicate(){this.token("%");this.word("checks")}function DeclaredPredicate(t){this.token("%");this.word("checks");this.token("(");this.print(t.value,t);this.token(")")}function DeclareInterface(t){this.word("declare");this.space();this.InterfaceDeclaration(t)}function DeclareModule(t){this.word("declare");this.space();this.word("module");this.space();this.print(t.id,t);this.space();this.print(t.body,t)}function DeclareModuleExports(t){this.word("declare");this.space();this.word("module");this.token(".");this.word("exports");this.print(t.typeAnnotation,t)}function DeclareTypeAlias(t){this.word("declare");this.space();this.TypeAlias(t)}function DeclareOpaqueType(t,e){if(!o(e)){this.word("declare");this.space()}this.OpaqueType(t)}function DeclareVariable(t,e){if(!o(e)){this.word("declare");this.space()}this.word("var");this.space();this.print(t.id,t);this.print(t.id.typeAnnotation,t);this.semicolon()}function DeclareExportDeclaration(t){this.word("declare");this.space();this.word("export");this.space();if(t.default){this.word("default");this.space()}FlowExportDeclaration.apply(this,arguments)}function DeclareExportAllDeclaration(){this.word("declare");this.space();s.ExportAllDeclaration.apply(this,arguments)}function EnumDeclaration(t){const{id:e,body:n}=t;this.word("enum");this.space();this.print(e,t);this.print(n,t)}function enumExplicitType(t,e,n){if(n){t.space();t.word("of");t.space();t.word(e)}t.space()}function enumBody(t,e){const{members:n}=e;t.token("{");t.indent();t.newline();for(const i of n){t.print(i,e);t.newline()}if(e.hasUnknownMembers){t.token("...");t.newline()}t.dedent();t.token("}")}function EnumBooleanBody(t){const{explicitType:e}=t;enumExplicitType(this,"boolean",e);enumBody(this,t)}function EnumNumberBody(t){const{explicitType:e}=t;enumExplicitType(this,"number",e);enumBody(this,t)}function EnumStringBody(t){const{explicitType:e}=t;enumExplicitType(this,"string",e);enumBody(this,t)}function EnumSymbolBody(t){enumExplicitType(this,"symbol",true);enumBody(this,t)}function EnumDefaultedMember(t){const{id:e}=t;this.print(e,t);this.token(",")}function enumInitializedMember(t,e){const{id:n,init:i}=e;t.print(n,e);t.space();t.token("=");t.space();t.print(i,e);t.token(",")}function EnumBooleanMember(t){enumInitializedMember(this,t)}function EnumNumberMember(t){enumInitializedMember(this,t)}function EnumStringMember(t){enumInitializedMember(this,t)}function FlowExportDeclaration(t){if(t.declaration){const e=t.declaration;this.print(e,t);if(!a(e))this.semicolon()}else{this.token("{");if(t.specifiers.length){this.space();this.printList(t.specifiers,t);this.space()}this.token("}");if(t.source){this.space();this.word("from");this.space();this.print(t.source,t)}this.semicolon()}}function ExistsTypeAnnotation(){this.token("*")}function FunctionTypeAnnotation(t,e){this.print(t.typeParameters,t);this.token("(");if(t.this){this.word("this");this.token(":");this.space();this.print(t.this.typeAnnotation,t);if(t.params.length||t.rest){this.token(",");this.space()}}this.printList(t.params,t);if(t.rest){if(t.params.length){this.token(",");this.space()}this.token("...");this.print(t.rest,t)}this.token(")");if(e&&(e.type==="ObjectTypeCallProperty"||e.type==="DeclareFunction"||e.type==="ObjectTypeProperty"&&e.method)){this.token(":")}else{this.space();this.token("=>")}this.space();this.print(t.returnType,t)}function FunctionTypeParam(t){this.print(t.name,t);if(t.optional)this.token("?");if(t.name){this.token(":");this.space()}this.print(t.typeAnnotation,t)}function InterfaceExtends(t){this.print(t.id,t);this.print(t.typeParameters,t)}function _interfaceish(t){var e;this.print(t.id,t);this.print(t.typeParameters,t);if((e=t.extends)!=null&&e.length){this.space();this.word("extends");this.space();this.printList(t.extends,t)}if(t.mixins&&t.mixins.length){this.space();this.word("mixins");this.space();this.printList(t.mixins,t)}if(t.implements&&t.implements.length){this.space();this.word("implements");this.space();this.printList(t.implements,t)}this.space();this.print(t.body,t)}function _variance(t){if(t.variance){if(t.variance.kind==="plus"){this.token("+")}else if(t.variance.kind==="minus"){this.token("-")}}}function InterfaceDeclaration(t){this.word("interface");this.space();this._interfaceish(t)}function andSeparator(){this.space();this.token("&");this.space()}function InterfaceTypeAnnotation(t){this.word("interface");if(t.extends&&t.extends.length){this.space();this.word("extends");this.space();this.printList(t.extends,t)}this.space();this.print(t.body,t)}function IntersectionTypeAnnotation(t){this.printJoin(t.types,t,{separator:andSeparator})}function MixedTypeAnnotation(){this.word("mixed")}function EmptyTypeAnnotation(){this.word("empty")}function NullableTypeAnnotation(t){this.token("?");this.print(t.typeAnnotation,t)}function NumberTypeAnnotation(){this.word("number")}function StringTypeAnnotation(){this.word("string")}function ThisTypeAnnotation(){this.word("this")}function TupleTypeAnnotation(t){this.token("[");this.printList(t.types,t);this.token("]")}function TypeofTypeAnnotation(t){this.word("typeof");this.space();this.print(t.argument,t)}function TypeAlias(t){this.word("type");this.space();this.print(t.id,t);this.print(t.typeParameters,t);this.space();this.token("=");this.space();this.print(t.right,t);this.semicolon()}function TypeAnnotation(t){this.token(":");this.space();if(t.optional)this.token("?");this.print(t.typeAnnotation,t)}function TypeParameterInstantiation(t){this.token("<");this.printList(t.params,t,{});this.token(">")}function TypeParameter(t){this._variance(t);this.word(t.name);if(t.bound){this.print(t.bound,t)}if(t.default){this.space();this.token("=");this.space();this.print(t.default,t)}}function OpaqueType(t){this.word("opaque");this.space();this.word("type");this.space();this.print(t.id,t);this.print(t.typeParameters,t);if(t.supertype){this.token(":");this.space();this.print(t.supertype,t)}if(t.impltype){this.space();this.token("=");this.space();this.print(t.impltype,t)}this.semicolon()}function ObjectTypeAnnotation(t){if(t.exact){this.token("{|")}else{this.token("{")}const e=[...t.properties,...t.callProperties||[],...t.indexers||[],...t.internalSlots||[]];if(e.length){this.space();this.printJoin(e,t,{addNewlines(t){if(t&&!e[0])return 1},indent:true,statement:true,iterator:()=>{if(e.length!==1||t.inexact){this.token(",");this.space()}}});this.space()}if(t.inexact){this.indent();this.token("...");if(e.length){this.newline()}this.dedent()}if(t.exact){this.token("|}")}else{this.token("}")}}function ObjectTypeInternalSlot(t){if(t.static){this.word("static");this.space()}this.token("[");this.token("[");this.print(t.id,t);this.token("]");this.token("]");if(t.optional)this.token("?");if(!t.method){this.token(":");this.space()}this.print(t.value,t)}function ObjectTypeCallProperty(t){if(t.static){this.word("static");this.space()}this.print(t.value,t)}function ObjectTypeIndexer(t){if(t.static){this.word("static");this.space()}this._variance(t);this.token("[");if(t.id){this.print(t.id,t);this.token(":");this.space()}this.print(t.key,t);this.token("]");this.token(":");this.space();this.print(t.value,t)}function ObjectTypeProperty(t){if(t.proto){this.word("proto");this.space()}if(t.static){this.word("static");this.space()}if(t.kind==="get"||t.kind==="set"){this.word(t.kind);this.space()}this._variance(t);this.print(t.key,t);if(t.optional)this.token("?");if(!t.method){this.token(":");this.space()}this.print(t.value,t)}function ObjectTypeSpreadProperty(t){this.token("...");this.print(t.argument,t)}function QualifiedTypeIdentifier(t){this.print(t.qualification,t);this.token(".");this.print(t.id,t)}function SymbolTypeAnnotation(){this.word("symbol")}function orSeparator(){this.space();this.token("|");this.space()}function UnionTypeAnnotation(t){this.printJoin(t.types,t,{separator:orSeparator})}function TypeCastExpression(t){this.token("(");this.print(t.expression,t);this.print(t.typeAnnotation,t);this.token(")")}function Variance(t){if(t.kind==="plus"){this.token("+")}else{this.token("-")}}function VoidTypeAnnotation(){this.word("void")}function IndexedAccessType(t){this.print(t.objectType,t);this.token("[");this.print(t.indexType,t);this.token("]")}function OptionalIndexedAccessType(t){this.print(t.objectType,t);if(t.optional){this.token("?.")}this.token("[");this.print(t.indexType,t);this.token("]")}},561:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});var i=n(117);Object.keys(i).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===i[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return i[t]}})}));var s=n(774);Object.keys(s).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===s[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return s[t]}})}));var r=n(996);Object.keys(r).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===r[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return r[t]}})}));var o=n(640);Object.keys(o).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===o[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return o[t]}})}));var a=n(872);Object.keys(a).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===a[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return a[t]}})}));var c=n(330);Object.keys(c).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===c[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return c[t]}})}));var p=n(446);Object.keys(p).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===p[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return p[t]}})}));var l=n(818);Object.keys(l).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===l[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return l[t]}})}));var h=n(712);Object.keys(h).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===h[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return h[t]}})}));var u=n(206);Object.keys(u).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===u[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return u[t]}})}));var f=n(816);Object.keys(f).forEach((function(t){if(t==="default"||t==="__esModule")return;if(t in e&&e[t]===f[t])return;Object.defineProperty(e,t,{enumerable:true,get:function(){return f[t]}})}))},206:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.JSXAttribute=JSXAttribute;e.JSXClosingElement=JSXClosingElement;e.JSXClosingFragment=JSXClosingFragment;e.JSXElement=JSXElement;e.JSXEmptyExpression=JSXEmptyExpression;e.JSXExpressionContainer=JSXExpressionContainer;e.JSXFragment=JSXFragment;e.JSXIdentifier=JSXIdentifier;e.JSXMemberExpression=JSXMemberExpression;e.JSXNamespacedName=JSXNamespacedName;e.JSXOpeningElement=JSXOpeningElement;e.JSXOpeningFragment=JSXOpeningFragment;e.JSXSpreadAttribute=JSXSpreadAttribute;e.JSXSpreadChild=JSXSpreadChild;e.JSXText=JSXText;function JSXAttribute(t){this.print(t.name,t);if(t.value){this.token("=");this.print(t.value,t)}}function JSXIdentifier(t){this.word(t.name)}function JSXNamespacedName(t){this.print(t.namespace,t);this.token(":");this.print(t.name,t)}function JSXMemberExpression(t){this.print(t.object,t);this.token(".");this.print(t.property,t)}function JSXSpreadAttribute(t){this.token("{");this.token("...");this.print(t.argument,t);this.token("}")}function JSXExpressionContainer(t){this.token("{");this.print(t.expression,t);this.token("}")}function JSXSpreadChild(t){this.token("{");this.token("...");this.print(t.expression,t);this.token("}")}function JSXText(t){const e=this.getPossibleRaw(t);if(e!=null){this.token(e)}else{this.token(t.value)}}function JSXElement(t){const e=t.openingElement;this.print(e,t);if(e.selfClosing)return;this.indent();for(const e of t.children){this.print(e,t)}this.dedent();this.print(t.closingElement,t)}function spaceSeparator(){this.space()}function JSXOpeningElement(t){this.token("<");this.print(t.name,t);this.print(t.typeParameters,t);if(t.attributes.length>0){this.space();this.printJoin(t.attributes,t,{separator:spaceSeparator})}if(t.selfClosing){this.space();this.token("/>")}else{this.token(">")}}function JSXClosingElement(t){this.token("</");this.print(t.name,t);this.token(">")}function JSXEmptyExpression(t){this.printInnerComments(t)}function JSXFragment(t){this.print(t.openingFragment,t);this.indent();for(const e of t.children){this.print(e,t)}this.dedent();this.print(t.closingFragment,t)}function JSXOpeningFragment(){this.token("<");this.token(">")}function JSXClosingFragment(){this.token("</");this.token(">")}},872:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ArrowFunctionExpression=ArrowFunctionExpression;e.FunctionDeclaration=e.FunctionExpression=FunctionExpression;e._functionHead=_functionHead;e._methodHead=_methodHead;e._param=_param;e._parameters=_parameters;e._params=_params;e._predicate=_predicate;var i=n(740);const{isIdentifier:s}=i;function _params(t){this.print(t.typeParameters,t);this.token("(");this._parameters(t.params,t);this.token(")");this.print(t.returnType,t)}function _parameters(t,e){for(let n=0;n<t.length;n++){this._param(t[n],e);if(n<t.length-1){this.token(",");this.space()}}}function _param(t,e){this.printJoin(t.decorators,t);this.print(t,e);if(t.optional)this.token("?");this.print(t.typeAnnotation,t)}function _methodHead(t){const e=t.kind;const n=t.key;if(e==="get"||e==="set"){this.word(e);this.space()}if(t.async){this._catchUp("start",n.loc);this.word("async");this.space()}if(e==="method"||e==="init"){if(t.generator){this.token("*")}}if(t.computed){this.token("[");this.print(n,t);this.token("]")}else{this.print(n,t)}if(t.optional){this.token("?")}this._params(t)}function _predicate(t){if(t.predicate){if(!t.returnType){this.token(":")}this.space();this.print(t.predicate,t)}}function _functionHead(t){if(t.async){this.word("async");this.space()}this.word("function");if(t.generator)this.token("*");this.printInnerComments(t);this.space();if(t.id){this.print(t.id,t)}this._params(t);this._predicate(t)}function FunctionExpression(t){this._functionHead(t);this.space();this.print(t.body,t)}function ArrowFunctionExpression(t){if(t.async){this.word("async");this.space()}const e=t.params[0];if(!this.format.retainLines&&!this.format.auxiliaryCommentBefore&&!this.format.auxiliaryCommentAfter&&t.params.length===1&&s(e)&&!hasTypesOrComments(t,e)){this.print(e,t)}else{this._params(t)}this._predicate(t);this.space();this.token("=>");this.space();this.print(t.body,t)}function hasTypesOrComments(t,e){var n,i;return!!(t.typeParameters||t.returnType||t.predicate||e.typeAnnotation||e.optional||(n=e.leadingComments)!=null&&n.length||(i=e.trailingComments)!=null&&i.length)}},330:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ExportAllDeclaration=ExportAllDeclaration;e.ExportDefaultDeclaration=ExportDefaultDeclaration;e.ExportDefaultSpecifier=ExportDefaultSpecifier;e.ExportNamedDeclaration=ExportNamedDeclaration;e.ExportNamespaceSpecifier=ExportNamespaceSpecifier;e.ExportSpecifier=ExportSpecifier;e.ImportAttribute=ImportAttribute;e.ImportDeclaration=ImportDeclaration;e.ImportDefaultSpecifier=ImportDefaultSpecifier;e.ImportNamespaceSpecifier=ImportNamespaceSpecifier;e.ImportSpecifier=ImportSpecifier;var i=n(740);const{isClassDeclaration:s,isExportDefaultSpecifier:r,isExportNamespaceSpecifier:o,isImportDefaultSpecifier:a,isImportNamespaceSpecifier:c,isStatement:p}=i;function ImportSpecifier(t){if(t.importKind==="type"||t.importKind==="typeof"){this.word(t.importKind);this.space()}this.print(t.imported,t);if(t.local&&t.local.name!==t.imported.name){this.space();this.word("as");this.space();this.print(t.local,t)}}function ImportDefaultSpecifier(t){this.print(t.local,t)}function ExportDefaultSpecifier(t){this.print(t.exported,t)}function ExportSpecifier(t){if(t.exportKind==="type"){this.word("type");this.space()}this.print(t.local,t);if(t.exported&&t.local.name!==t.exported.name){this.space();this.word("as");this.space();this.print(t.exported,t)}}function ExportNamespaceSpecifier(t){this.token("*");this.space();this.word("as");this.space();this.print(t.exported,t)}function ExportAllDeclaration(t){this.word("export");this.space();if(t.exportKind==="type"){this.word("type");this.space()}this.token("*");this.space();this.word("from");this.space();this.print(t.source,t);this.printAssertions(t);this.semicolon()}function ExportNamedDeclaration(t){if(this.format.decoratorsBeforeExport&&s(t.declaration)){this.printJoin(t.declaration.decorators,t)}this.word("export");this.space();ExportDeclaration.apply(this,arguments)}function ExportDefaultDeclaration(t){if(this.format.decoratorsBeforeExport&&s(t.declaration)){this.printJoin(t.declaration.decorators,t)}this.word("export");this.space();this.word("default");this.space();ExportDeclaration.apply(this,arguments)}function ExportDeclaration(t){if(t.declaration){const e=t.declaration;this.print(e,t);if(!p(e))this.semicolon()}else{if(t.exportKind==="type"){this.word("type");this.space()}const e=t.specifiers.slice(0);let n=false;for(;;){const i=e[0];if(r(i)||o(i)){n=true;this.print(e.shift(),t);if(e.length){this.token(",");this.space()}}else{break}}if(e.length||!e.length&&!n){this.token("{");if(e.length){this.space();this.printList(e,t);this.space()}this.token("}")}if(t.source){this.space();this.word("from");this.space();this.print(t.source,t);this.printAssertions(t)}this.semicolon()}}function ImportDeclaration(t){this.word("import");this.space();const e=t.importKind==="type"||t.importKind==="typeof";if(e){this.word(t.importKind);this.space()}const n=t.specifiers.slice(0);const i=!!n.length;while(i){const e=n[0];if(a(e)||c(e)){this.print(n.shift(),t);if(n.length){this.token(",");this.space()}}else{break}}if(n.length){this.token("{");this.space();this.printList(n,t);this.space();this.token("}")}else if(e&&!i){this.token("{");this.token("}")}if(i||e){this.space();this.word("from");this.space()}this.print(t.source,t);this.printAssertions(t);{var s;if((s=t.attributes)!=null&&s.length){this.space();this.word("with");this.space();this.printList(t.attributes,t)}}this.semicolon()}function ImportAttribute(t){this.print(t.key);this.token(":");this.space();this.print(t.value)}function ImportNamespaceSpecifier(t){this.token("*");this.space();this.word("as");this.space();this.print(t.local,t)}},996:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.BreakStatement=void 0;e.CatchClause=CatchClause;e.ContinueStatement=void 0;e.DebuggerStatement=DebuggerStatement;e.DoWhileStatement=DoWhileStatement;e.ForOfStatement=e.ForInStatement=void 0;e.ForStatement=ForStatement;e.IfStatement=IfStatement;e.LabeledStatement=LabeledStatement;e.ReturnStatement=void 0;e.SwitchCase=SwitchCase;e.SwitchStatement=SwitchStatement;e.ThrowStatement=void 0;e.TryStatement=TryStatement;e.VariableDeclaration=VariableDeclaration;e.VariableDeclarator=VariableDeclarator;e.WhileStatement=WhileStatement;e.WithStatement=WithStatement;var i=n(740);const{isFor:s,isForStatement:r,isIfStatement:o,isStatement:a}=i;function WithStatement(t){this.word("with");this.space();this.token("(");this.print(t.object,t);this.token(")");this.printBlock(t)}function IfStatement(t){this.word("if");this.space();this.token("(");this.print(t.test,t);this.token(")");this.space();const e=t.alternate&&o(getLastStatement(t.consequent));if(e){this.token("{");this.newline();this.indent()}this.printAndIndentOnComments(t.consequent,t);if(e){this.dedent();this.newline();this.token("}")}if(t.alternate){if(this.endsWith(125))this.space();this.word("else");this.space();this.printAndIndentOnComments(t.alternate,t)}}function getLastStatement(t){if(!a(t.body))return t;return getLastStatement(t.body)}function ForStatement(t){this.word("for");this.space();this.token("(");this.inForStatementInitCounter++;this.print(t.init,t);this.inForStatementInitCounter--;this.token(";");if(t.test){this.space();this.print(t.test,t)}this.token(";");if(t.update){this.space();this.print(t.update,t)}this.token(")");this.printBlock(t)}function WhileStatement(t){this.word("while");this.space();this.token("(");this.print(t.test,t);this.token(")");this.printBlock(t)}const buildForXStatement=function(t){return function(e){this.word("for");this.space();if(t==="of"&&e.await){this.word("await");this.space()}this.token("(");this.print(e.left,e);this.space();this.word(t);this.space();this.print(e.right,e);this.token(")");this.printBlock(e)}};const c=buildForXStatement("in");e.ForInStatement=c;const p=buildForXStatement("of");e.ForOfStatement=p;function DoWhileStatement(t){this.word("do");this.space();this.print(t.body,t);this.space();this.word("while");this.space();this.token("(");this.print(t.test,t);this.token(")");this.semicolon()}function buildLabelStatement(t,e="label"){return function(n){this.word(t);const i=n[e];if(i){this.space();const t=e=="label";const s=this.startTerminatorless(t);this.print(i,n);this.endTerminatorless(s)}this.semicolon()}}const l=buildLabelStatement("continue");e.ContinueStatement=l;const h=buildLabelStatement("return","argument");e.ReturnStatement=h;const u=buildLabelStatement("break");e.BreakStatement=u;const f=buildLabelStatement("throw","argument");e.ThrowStatement=f;function LabeledStatement(t){this.print(t.label,t);this.token(":");this.space();this.print(t.body,t)}function TryStatement(t){this.word("try");this.space();this.print(t.block,t);this.space();if(t.handlers){this.print(t.handlers[0],t)}else{this.print(t.handler,t)}if(t.finalizer){this.space();this.word("finally");this.space();this.print(t.finalizer,t)}}function CatchClause(t){this.word("catch");this.space();if(t.param){this.token("(");this.print(t.param,t);this.print(t.param.typeAnnotation,t);this.token(")");this.space()}this.print(t.body,t)}function SwitchStatement(t){this.word("switch");this.space();this.token("(");this.print(t.discriminant,t);this.token(")");this.space();this.token("{");this.printSequence(t.cases,t,{indent:true,addNewlines(e,n){if(!e&&t.cases[t.cases.length-1]===n)return-1}});this.token("}")}function SwitchCase(t){if(t.test){this.word("case");this.space();this.print(t.test,t);this.token(":")}else{this.word("default");this.token(":")}if(t.consequent.length){this.newline();this.printSequence(t.consequent,t,{indent:true})}}function DebuggerStatement(){this.word("debugger");this.semicolon()}function variableDeclarationIndent(){this.token(",");this.newline();if(this.endsWith(10)){for(let t=0;t<4;t++)this.space(true)}}function constDeclarationIndent(){this.token(",");this.newline();if(this.endsWith(10)){for(let t=0;t<6;t++)this.space(true)}}function VariableDeclaration(t,e){if(t.declare){this.word("declare");this.space()}this.word(t.kind);this.space();let n=false;if(!s(e)){for(const e of t.declarations){if(e.init){n=true}}}let i;if(n){i=t.kind==="const"?constDeclarationIndent:variableDeclarationIndent}this.printList(t.declarations,t,{separator:i});if(s(e)){if(r(e)){if(e.init===t)return}else{if(e.left===t)return}}this.semicolon()}function VariableDeclarator(t){this.print(t.id,t);if(t.definite)this.token("!");this.print(t.id.typeAnnotation,t);if(t.init){this.space();this.token("=");this.space();this.print(t.init,t)}}},117:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.TaggedTemplateExpression=TaggedTemplateExpression;e.TemplateElement=TemplateElement;e.TemplateLiteral=TemplateLiteral;function TaggedTemplateExpression(t){this.print(t.tag,t);this.print(t.typeParameters,t);this.print(t.quasi,t)}function TemplateElement(t,e){const n=e.quasis[0]===t;const i=e.quasis[e.quasis.length-1]===t;const s=(n?"`":"}")+t.value.raw+(i?"`":"${");this.token(s)}function TemplateLiteral(t){const e=t.quasis;for(let n=0;n<e.length;n++){this.print(e[n],t);if(n+1<e.length){this.print(t.expressions[n],t)}}}},446:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ArgumentPlaceholder=ArgumentPlaceholder;e.ArrayPattern=e.ArrayExpression=ArrayExpression;e.BigIntLiteral=BigIntLiteral;e.BooleanLiteral=BooleanLiteral;e.DecimalLiteral=DecimalLiteral;e.Identifier=Identifier;e.NullLiteral=NullLiteral;e.NumericLiteral=NumericLiteral;e.ObjectPattern=e.ObjectExpression=ObjectExpression;e.ObjectMethod=ObjectMethod;e.ObjectProperty=ObjectProperty;e.PipelineBareFunction=PipelineBareFunction;e.PipelinePrimaryTopicReference=PipelinePrimaryTopicReference;e.PipelineTopicExpression=PipelineTopicExpression;e.RecordExpression=RecordExpression;e.RegExpLiteral=RegExpLiteral;e.SpreadElement=e.RestElement=RestElement;e.StringLiteral=StringLiteral;e.TopicReference=TopicReference;e.TupleExpression=TupleExpression;var i=n(740);var s=n(95);const{isAssignmentPattern:r,isIdentifier:o}=i;function Identifier(t){this.exactSource(t.loc,(()=>{this.word(t.name)}))}function ArgumentPlaceholder(){this.token("?")}function RestElement(t){this.token("...");this.print(t.argument,t)}function ObjectExpression(t){const e=t.properties;this.token("{");this.printInnerComments(t);if(e.length){this.space();this.printList(e,t,{indent:true,statement:true});this.space()}this.token("}")}function ObjectMethod(t){this.printJoin(t.decorators,t);this._methodHead(t);this.space();this.print(t.body,t)}function ObjectProperty(t){this.printJoin(t.decorators,t);if(t.computed){this.token("[");this.print(t.key,t);this.token("]")}else{if(r(t.value)&&o(t.key)&&t.key.name===t.value.left.name){this.print(t.value,t);return}this.print(t.key,t);if(t.shorthand&&o(t.key)&&o(t.value)&&t.key.name===t.value.name){return}}this.token(":");this.space();this.print(t.value,t)}function ArrayExpression(t){const e=t.elements;const n=e.length;this.token("[");this.printInnerComments(t);for(let i=0;i<e.length;i++){const s=e[i];if(s){if(i>0)this.space();this.print(s,t);if(i<n-1)this.token(",")}else{this.token(",")}}this.token("]")}function RecordExpression(t){const e=t.properties;let n;let i;if(this.format.recordAndTupleSyntaxType==="bar"){n="{|";i="|}"}else if(this.format.recordAndTupleSyntaxType==="hash"){n="#{";i="}"}else{throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`)}this.token(n);this.printInnerComments(t);if(e.length){this.space();this.printList(e,t,{indent:true,statement:true});this.space()}this.token(i)}function TupleExpression(t){const e=t.elements;const n=e.length;let i;let s;if(this.format.recordAndTupleSyntaxType==="bar"){i="[|";s="|]"}else if(this.format.recordAndTupleSyntaxType==="hash"){i="#[";s="]"}else{throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`)}this.token(i);this.printInnerComments(t);for(let i=0;i<e.length;i++){const s=e[i];if(s){if(i>0)this.space();this.print(s,t);if(i<n-1)this.token(",")}}this.token(s)}function RegExpLiteral(t){this.word(`/${t.pattern}/${t.flags}`)}function BooleanLiteral(t){this.word(t.value?"true":"false")}function NullLiteral(){this.word("null")}function NumericLiteral(t){const e=this.getPossibleRaw(t);const n=this.format.jsescOption;const i=t.value+"";if(n.numbers){this.number(s(t.value,n))}else if(e==null){this.number(i)}else if(this.format.minified){this.number(e.length<i.length?e:i)}else{this.number(e)}}function StringLiteral(t){const e=this.getPossibleRaw(t);if(!this.format.minified&&e!=null){this.token(e);return}const n=s(t.value,Object.assign(this.format.jsescOption,this.format.jsonCompatibleStrings&&{json:true}));return this.token(n)}function BigIntLiteral(t){const e=this.getPossibleRaw(t);if(!this.format.minified&&e!=null){this.word(e);return}this.word(t.value+"n")}function DecimalLiteral(t){const e=this.getPossibleRaw(t);if(!this.format.minified&&e!=null){this.word(e);return}this.word(t.value+"m")}const a=new Set(["^^","@@","^","%","#"]);function TopicReference(){const{topicToken:t}=this.format;if(a.has(t)){this.token(t)}else{const e=JSON.stringify(t);const n=Array.from(a,(t=>JSON.stringify(t)));throw new Error(`The "topicToken" generator option must be one of `+`${n.join(", ")} (${e} received instead).`)}}function PipelineTopicExpression(t){this.print(t.expression,t)}function PipelineBareFunction(t){this.print(t.callee,t)}function PipelinePrimaryTopicReference(){this.token("#")}},816:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.TSAnyKeyword=TSAnyKeyword;e.TSArrayType=TSArrayType;e.TSAsExpression=TSAsExpression;e.TSBigIntKeyword=TSBigIntKeyword;e.TSBooleanKeyword=TSBooleanKeyword;e.TSCallSignatureDeclaration=TSCallSignatureDeclaration;e.TSConditionalType=TSConditionalType;e.TSConstructSignatureDeclaration=TSConstructSignatureDeclaration;e.TSConstructorType=TSConstructorType;e.TSDeclareFunction=TSDeclareFunction;e.TSDeclareMethod=TSDeclareMethod;e.TSEnumDeclaration=TSEnumDeclaration;e.TSEnumMember=TSEnumMember;e.TSExportAssignment=TSExportAssignment;e.TSExpressionWithTypeArguments=TSExpressionWithTypeArguments;e.TSExternalModuleReference=TSExternalModuleReference;e.TSFunctionType=TSFunctionType;e.TSImportEqualsDeclaration=TSImportEqualsDeclaration;e.TSImportType=TSImportType;e.TSIndexSignature=TSIndexSignature;e.TSIndexedAccessType=TSIndexedAccessType;e.TSInferType=TSInferType;e.TSInstantiationExpression=TSInstantiationExpression;e.TSInterfaceBody=TSInterfaceBody;e.TSInterfaceDeclaration=TSInterfaceDeclaration;e.TSIntersectionType=TSIntersectionType;e.TSIntrinsicKeyword=TSIntrinsicKeyword;e.TSLiteralType=TSLiteralType;e.TSMappedType=TSMappedType;e.TSMethodSignature=TSMethodSignature;e.TSModuleBlock=TSModuleBlock;e.TSModuleDeclaration=TSModuleDeclaration;e.TSNamedTupleMember=TSNamedTupleMember;e.TSNamespaceExportDeclaration=TSNamespaceExportDeclaration;e.TSNeverKeyword=TSNeverKeyword;e.TSNonNullExpression=TSNonNullExpression;e.TSNullKeyword=TSNullKeyword;e.TSNumberKeyword=TSNumberKeyword;e.TSObjectKeyword=TSObjectKeyword;e.TSOptionalType=TSOptionalType;e.TSParameterProperty=TSParameterProperty;e.TSParenthesizedType=TSParenthesizedType;e.TSPropertySignature=TSPropertySignature;e.TSQualifiedName=TSQualifiedName;e.TSRestType=TSRestType;e.TSStringKeyword=TSStringKeyword;e.TSSymbolKeyword=TSSymbolKeyword;e.TSThisType=TSThisType;e.TSTupleType=TSTupleType;e.TSTypeAliasDeclaration=TSTypeAliasDeclaration;e.TSTypeAnnotation=TSTypeAnnotation;e.TSTypeAssertion=TSTypeAssertion;e.TSTypeLiteral=TSTypeLiteral;e.TSTypeOperator=TSTypeOperator;e.TSTypeParameter=TSTypeParameter;e.TSTypeParameterDeclaration=e.TSTypeParameterInstantiation=TSTypeParameterInstantiation;e.TSTypePredicate=TSTypePredicate;e.TSTypeQuery=TSTypeQuery;e.TSTypeReference=TSTypeReference;e.TSUndefinedKeyword=TSUndefinedKeyword;e.TSUnionType=TSUnionType;e.TSUnknownKeyword=TSUnknownKeyword;e.TSVoidKeyword=TSVoidKeyword;e.tsPrintBraced=tsPrintBraced;e.tsPrintClassMemberModifiers=tsPrintClassMemberModifiers;e.tsPrintFunctionOrConstructorType=tsPrintFunctionOrConstructorType;e.tsPrintPropertyOrMethodName=tsPrintPropertyOrMethodName;e.tsPrintSignatureDeclarationBase=tsPrintSignatureDeclarationBase;e.tsPrintTypeLiteralOrInterfaceBody=tsPrintTypeLiteralOrInterfaceBody;e.tsPrintUnionOrIntersectionType=tsPrintUnionOrIntersectionType;function TSTypeAnnotation(t){this.token(":");this.space();if(t.optional)this.token("?");this.print(t.typeAnnotation,t)}function TSTypeParameterInstantiation(t,e){this.token("<");this.printList(t.params,t,{});if(e.type==="ArrowFunctionExpression"&&t.params.length===1){this.token(",")}this.token(">")}function TSTypeParameter(t){if(t.in){this.word("in");this.space()}if(t.out){this.word("out");this.space()}this.word(t.name);if(t.constraint){this.space();this.word("extends");this.space();this.print(t.constraint,t)}if(t.default){this.space();this.token("=");this.space();this.print(t.default,t)}}function TSParameterProperty(t){if(t.accessibility){this.word(t.accessibility);this.space()}if(t.readonly){this.word("readonly");this.space()}this._param(t.parameter)}function TSDeclareFunction(t){if(t.declare){this.word("declare");this.space()}this._functionHead(t);this.token(";")}function TSDeclareMethod(t){this._classMethodHead(t);this.token(";")}function TSQualifiedName(t){this.print(t.left,t);this.token(".");this.print(t.right,t)}function TSCallSignatureDeclaration(t){this.tsPrintSignatureDeclarationBase(t);this.token(";")}function TSConstructSignatureDeclaration(t){this.word("new");this.space();this.tsPrintSignatureDeclarationBase(t);this.token(";")}function TSPropertySignature(t){const{readonly:e,initializer:n}=t;if(e){this.word("readonly");this.space()}this.tsPrintPropertyOrMethodName(t);this.print(t.typeAnnotation,t);if(n){this.space();this.token("=");this.space();this.print(n,t)}this.token(";")}function tsPrintPropertyOrMethodName(t){if(t.computed){this.token("[")}this.print(t.key,t);if(t.computed){this.token("]")}if(t.optional){this.token("?")}}function TSMethodSignature(t){const{kind:e}=t;if(e==="set"||e==="get"){this.word(e);this.space()}this.tsPrintPropertyOrMethodName(t);this.tsPrintSignatureDeclarationBase(t);this.token(";")}function TSIndexSignature(t){const{readonly:e,static:n}=t;if(n){this.word("static");this.space()}if(e){this.word("readonly");this.space()}this.token("[");this._parameters(t.parameters,t);this.token("]");this.print(t.typeAnnotation,t);this.token(";")}function TSAnyKeyword(){this.word("any")}function TSBigIntKeyword(){this.word("bigint")}function TSUnknownKeyword(){this.word("unknown")}function TSNumberKeyword(){this.word("number")}function TSObjectKeyword(){this.word("object")}function TSBooleanKeyword(){this.word("boolean")}function TSStringKeyword(){this.word("string")}function TSSymbolKeyword(){this.word("symbol")}function TSVoidKeyword(){this.word("void")}function TSUndefinedKeyword(){this.word("undefined")}function TSNullKeyword(){this.word("null")}function TSNeverKeyword(){this.word("never")}function TSIntrinsicKeyword(){this.word("intrinsic")}function TSThisType(){this.word("this")}function TSFunctionType(t){this.tsPrintFunctionOrConstructorType(t)}function TSConstructorType(t){if(t.abstract){this.word("abstract");this.space()}this.word("new");this.space();this.tsPrintFunctionOrConstructorType(t)}function tsPrintFunctionOrConstructorType(t){const{typeParameters:e}=t;const n=t.parameters;this.print(e,t);this.token("(");this._parameters(n,t);this.token(")");this.space();this.token("=>");this.space();const i=t.typeAnnotation;this.print(i.typeAnnotation,t)}function TSTypeReference(t){this.print(t.typeName,t);this.print(t.typeParameters,t)}function TSTypePredicate(t){if(t.asserts){this.word("asserts");this.space()}this.print(t.parameterName);if(t.typeAnnotation){this.space();this.word("is");this.space();this.print(t.typeAnnotation.typeAnnotation)}}function TSTypeQuery(t){this.word("typeof");this.space();this.print(t.exprName);if(t.typeParameters){this.print(t.typeParameters,t)}}function TSTypeLiteral(t){this.tsPrintTypeLiteralOrInterfaceBody(t.members,t)}function tsPrintTypeLiteralOrInterfaceBody(t,e){this.tsPrintBraced(t,e)}function tsPrintBraced(t,e){this.token("{");if(t.length){this.indent();this.newline();for(const n of t){this.print(n,e);this.newline()}this.dedent();this.rightBrace()}else{this.token("}")}}function TSArrayType(t){this.print(t.elementType,t);this.token("[]")}function TSTupleType(t){this.token("[");this.printList(t.elementTypes,t);this.token("]")}function TSOptionalType(t){this.print(t.typeAnnotation,t);this.token("?")}function TSRestType(t){this.token("...");this.print(t.typeAnnotation,t)}function TSNamedTupleMember(t){this.print(t.label,t);if(t.optional)this.token("?");this.token(":");this.space();this.print(t.elementType,t)}function TSUnionType(t){this.tsPrintUnionOrIntersectionType(t,"|")}function TSIntersectionType(t){this.tsPrintUnionOrIntersectionType(t,"&")}function tsPrintUnionOrIntersectionType(t,e){this.printJoin(t.types,t,{separator(){this.space();this.token(e);this.space()}})}function TSConditionalType(t){this.print(t.checkType);this.space();this.word("extends");this.space();this.print(t.extendsType);this.space();this.token("?");this.space();this.print(t.trueType);this.space();this.token(":");this.space();this.print(t.falseType)}function TSInferType(t){this.token("infer");this.space();this.print(t.typeParameter)}function TSParenthesizedType(t){this.token("(");this.print(t.typeAnnotation,t);this.token(")")}function TSTypeOperator(t){this.word(t.operator);this.space();this.print(t.typeAnnotation,t)}function TSIndexedAccessType(t){this.print(t.objectType,t);this.token("[");this.print(t.indexType,t);this.token("]")}function TSMappedType(t){const{nameType:e,optional:n,readonly:i,typeParameter:s}=t;this.token("{");this.space();if(i){tokenIfPlusMinus(this,i);this.word("readonly");this.space()}this.token("[");this.word(s.name);this.space();this.word("in");this.space();this.print(s.constraint,s);if(e){this.space();this.word("as");this.space();this.print(e,t)}this.token("]");if(n){tokenIfPlusMinus(this,n);this.token("?")}this.token(":");this.space();this.print(t.typeAnnotation,t);this.space();this.token("}")}function tokenIfPlusMinus(t,e){if(e!==true){t.token(e)}}function TSLiteralType(t){this.print(t.literal,t)}function TSExpressionWithTypeArguments(t){this.print(t.expression,t);this.print(t.typeParameters,t)}function TSInterfaceDeclaration(t){const{declare:e,id:n,typeParameters:i,extends:s,body:r}=t;if(e){this.word("declare");this.space()}this.word("interface");this.space();this.print(n,t);this.print(i,t);if(s!=null&&s.length){this.space();this.word("extends");this.space();this.printList(s,t)}this.space();this.print(r,t)}function TSInterfaceBody(t){this.tsPrintTypeLiteralOrInterfaceBody(t.body,t)}function TSTypeAliasDeclaration(t){const{declare:e,id:n,typeParameters:i,typeAnnotation:s}=t;if(e){this.word("declare");this.space()}this.word("type");this.space();this.print(n,t);this.print(i,t);this.space();this.token("=");this.space();this.print(s,t);this.token(";")}function TSAsExpression(t){const{expression:e,typeAnnotation:n}=t;this.print(e,t);this.space();this.word("as");this.space();this.print(n,t)}function TSTypeAssertion(t){const{typeAnnotation:e,expression:n}=t;this.token("<");this.print(e,t);this.token(">");this.space();this.print(n,t)}function TSInstantiationExpression(t){this.print(t.expression,t);this.print(t.typeParameters,t)}function TSEnumDeclaration(t){const{declare:e,const:n,id:i,members:s}=t;if(e){this.word("declare");this.space()}if(n){this.word("const");this.space()}this.word("enum");this.space();this.print(i,t);this.space();this.tsPrintBraced(s,t)}function TSEnumMember(t){const{id:e,initializer:n}=t;this.print(e,t);if(n){this.space();this.token("=");this.space();this.print(n,t)}this.token(",")}function TSModuleDeclaration(t){const{declare:e,id:n}=t;if(e){this.word("declare");this.space()}if(!t.global){this.word(n.type==="Identifier"?"namespace":"module");this.space()}this.print(n,t);if(!t.body){this.token(";");return}let i=t.body;while(i.type==="TSModuleDeclaration"){this.token(".");this.print(i.id,i);i=i.body}this.space();this.print(i,t)}function TSModuleBlock(t){this.tsPrintBraced(t.body,t)}function TSImportType(t){const{argument:e,qualifier:n,typeParameters:i}=t;this.word("import");this.token("(");this.print(e,t);this.token(")");if(n){this.token(".");this.print(n,t)}if(i){this.print(i,t)}}function TSImportEqualsDeclaration(t){const{isExport:e,id:n,moduleReference:i}=t;if(e){this.word("export");this.space()}this.word("import");this.space();this.print(n,t);this.space();this.token("=");this.space();this.print(i,t);this.token(";")}function TSExternalModuleReference(t){this.token("require(");this.print(t.expression,t);this.token(")")}function TSNonNullExpression(t){this.print(t.expression,t);this.token("!")}function TSExportAssignment(t){this.word("export");this.space();this.token("=");this.space();this.print(t.expression,t);this.token(";")}function TSNamespaceExportDeclaration(t){this.word("export");this.space();this.word("as");this.space();this.word("namespace");this.space();this.print(t.id,t)}function tsPrintSignatureDeclarationBase(t){const{typeParameters:e}=t;const n=t.parameters;this.print(e,t);this.token("(");this._parameters(n,t);this.token(")");const i=t.typeAnnotation;this.print(i,t)}function tsPrintClassMemberModifiers(t,e){if(e&&t.declare){this.word("declare");this.space()}if(t.accessibility){this.word(t.accessibility);this.space()}if(t.static){this.word("static");this.space()}if(t.override){this.word("override");this.space()}if(t.abstract){this.word("abstract");this.space()}if(e&&t.readonly){this.word("readonly");this.space()}}},458:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.needsParens=needsParens;e.needsWhitespace=needsWhitespace;e.needsWhitespaceAfter=needsWhitespaceAfter;e.needsWhitespaceBefore=needsWhitespaceBefore;var i=n(946);var s=n(554);var r=n(740);const{FLIPPED_ALIAS_KEYS:o,isCallExpression:a,isExpressionStatement:c,isMemberExpression:p,isNewExpression:l}=r;function expandAliases(t){const e={};function add(t,n){const i=e[t];e[t]=i?function(t,e,s){const r=i(t,e,s);return r==null?n(t,e,s):r}:n}for(const e of Object.keys(t)){const n=o[e];if(n){for(const i of n){add(i,t[e])}}else{add(e,t[e])}}return e}const h=expandAliases(s);const u=expandAliases(i.nodes);const f=expandAliases(i.list);function find(t,e,n,i){const s=t[e.type];return s?s(e,n,i):null}function isOrHasCallExpression(t){if(a(t)){return true}return p(t)&&isOrHasCallExpression(t.object)}function needsWhitespace(t,e,n){if(!t)return 0;if(c(t)){t=t.expression}let i=find(u,t,e);if(!i){const s=find(f,t,e);if(s){for(let e=0;e<s.length;e++){i=needsWhitespace(s[e],t,n);if(i)break}}}if(typeof i==="object"&&i!==null){return i[n]||0}return 0}function needsWhitespaceBefore(t,e){return needsWhitespace(t,e,"before")}function needsWhitespaceAfter(t,e){return needsWhitespace(t,e,"after")}function needsParens(t,e,n){if(!e)return false;if(l(e)&&e.callee===t){if(isOrHasCallExpression(t))return true}return find(h,t,e,n)}},554:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ArrowFunctionExpression=ArrowFunctionExpression;e.AssignmentExpression=AssignmentExpression;e.Binary=Binary;e.BinaryExpression=BinaryExpression;e.ClassExpression=ClassExpression;e.ConditionalExpression=ConditionalExpression;e.DoExpression=DoExpression;e.FunctionExpression=FunctionExpression;e.FunctionTypeAnnotation=FunctionTypeAnnotation;e.Identifier=Identifier;e.LogicalExpression=LogicalExpression;e.NullableTypeAnnotation=NullableTypeAnnotation;e.ObjectExpression=ObjectExpression;e.OptionalIndexedAccessType=OptionalIndexedAccessType;e.OptionalCallExpression=e.OptionalMemberExpression=OptionalMemberExpression;e.SequenceExpression=SequenceExpression;e.TSAsExpression=TSAsExpression;e.TSInferType=TSInferType;e.TSInstantiationExpression=TSInstantiationExpression;e.TSTypeAssertion=TSTypeAssertion;e.TSIntersectionType=e.TSUnionType=TSUnionType;e.UnaryLike=UnaryLike;e.IntersectionTypeAnnotation=e.UnionTypeAnnotation=UnionTypeAnnotation;e.UpdateExpression=UpdateExpression;e.AwaitExpression=e.YieldExpression=YieldExpression;var i=n(740);const{isArrayTypeAnnotation:s,isArrowFunctionExpression:r,isAssignmentExpression:o,isAwaitExpression:a,isBinary:c,isBinaryExpression:p,isUpdateExpression:l,isCallExpression:h,isClassDeclaration:u,isClassExpression:f,isConditional:d,isConditionalExpression:m,isExportDeclaration:y,isExportDefaultDeclaration:T,isExpressionStatement:S,isFor:g,isForInStatement:x,isForOfStatement:b,isForStatement:_,isFunctionExpression:w,isIfStatement:k,isIndexedAccessType:E,isIntersectionTypeAnnotation:A,isLogicalExpression:P,isMemberExpression:C,isNewExpression:v,isNullableTypeAnnotation:M,isObjectPattern:I,isOptionalCallExpression:O,isOptionalMemberExpression:D,isReturnStatement:N,isSequenceExpression:L,isSwitchStatement:j,isTSArrayType:B,isTSAsExpression:F,isTSInstantiationExpression:q,isTSIntersectionType:U,isTSNonNullExpression:J,isTSOptionalType:W,isTSRestType:R,isTSTypeAssertion:K,isTSUnionType:X,isTaggedTemplateExpression:H,isThrowStatement:z,isTypeAnnotation:V,isUnaryLike:$,isUnionTypeAnnotation:G,isVariableDeclarator:Y,isWhileStatement:Q,isYieldExpression:Z}=i;const tt={"||":0,"??":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};const isClassExtendsClause=(t,e)=>(u(e)||f(e))&&e.superClass===t;const hasPostfixPart=(t,e)=>(C(e)||D(e))&&e.object===t||(h(e)||O(e)||v(e))&&e.callee===t||H(e)&&e.tag===t||J(e);function NullableTypeAnnotation(t,e){return s(e)}function FunctionTypeAnnotation(t,e,n){return G(e)||A(e)||s(e)||V(e)&&r(n[n.length-3])}function UpdateExpression(t,e){return hasPostfixPart(t,e)||isClassExtendsClause(t,e)}function ObjectExpression(t,e,n){return isFirstInContext(n,{expressionStatement:true,arrowBody:true})}function DoExpression(t,e,n){return!t.async&&isFirstInContext(n,{expressionStatement:true})}function Binary(t,e){if(t.operator==="**"&&p(e,{operator:"**"})){return e.left===t}if(isClassExtendsClause(t,e)){return true}if(hasPostfixPart(t,e)||$(e)||a(e)){return true}if(c(e)){const n=e.operator;const i=tt[n];const s=t.operator;const r=tt[s];if(i===r&&e.right===t&&!P(e)||i>r){return true}}}function UnionTypeAnnotation(t,e){return s(e)||M(e)||A(e)||G(e)}function OptionalIndexedAccessType(t,e){return E(e,{objectType:t})}function TSAsExpression(){return true}function TSTypeAssertion(){return true}function TSUnionType(t,e){return B(e)||W(e)||U(e)||X(e)||R(e)}function TSInferType(t,e){return B(e)||W(e)}function TSInstantiationExpression(t,e){return(h(e)||O(e)||v(e)||q(e))&&!!e.typeParameters}function BinaryExpression(t,e){return t.operator==="in"&&(Y(e)||g(e))}function SequenceExpression(t,e){if(_(e)||z(e)||N(e)||k(e)&&e.test===t||Q(e)&&e.test===t||x(e)&&e.right===t||j(e)&&e.discriminant===t||S(e)&&e.expression===t){return false}return true}function YieldExpression(t,e){return c(e)||$(e)||hasPostfixPart(t,e)||a(e)&&Z(t)||m(e)&&t===e.test||isClassExtendsClause(t,e)}function ClassExpression(t,e,n){return isFirstInContext(n,{expressionStatement:true,exportDefault:true})}function UnaryLike(t,e){return hasPostfixPart(t,e)||p(e,{operator:"**",left:t})||isClassExtendsClause(t,e)}function FunctionExpression(t,e,n){return isFirstInContext(n,{expressionStatement:true,exportDefault:true})}function ArrowFunctionExpression(t,e){return y(e)||ConditionalExpression(t,e)}function ConditionalExpression(t,e){if($(e)||c(e)||m(e,{test:t})||a(e)||K(e)||F(e)){return true}return UnaryLike(t,e)}function OptionalMemberExpression(t,e){return h(e,{callee:t})||C(e,{object:t})}function AssignmentExpression(t,e){if(I(t.left)){return true}else{return ConditionalExpression(t,e)}}function LogicalExpression(t,e){switch(t.operator){case"||":if(!P(e))return false;return e.operator==="??"||e.operator==="&&";case"&&":return P(e,{operator:"??"});case"??":return P(e)&&e.operator!=="??"}}function Identifier(t,e,n){var i;if((i=t.extra)!=null&&i.parenthesized&&o(e,{left:t})&&(w(e.right)||f(e.right))&&e.right.id==null){return true}if(t.name==="let"){const i=C(e,{object:t,computed:true})||D(e,{object:t,computed:true,optional:false});return isFirstInContext(n,{expressionStatement:i,forHead:i,forInHead:i,forOfHead:true})}return t.name==="async"&&b(e)&&t===e.left}function isFirstInContext(t,{expressionStatement:e=false,arrowBody:n=false,exportDefault:i=false,forHead:s=false,forInHead:a=false,forOfHead:p=false}){let h=t.length-1;let u=t[h];h--;let f=t[h];while(h>=0){if(e&&S(f,{expression:u})||i&&T(f,{declaration:u})||n&&r(f,{body:u})||s&&_(f,{init:u})||a&&x(f,{left:u})||p&&b(f,{left:u})){return true}if(hasPostfixPart(u,f)&&!v(f)||L(f)&&f.expressions[0]===u||l(f)&&!f.prefix||d(f,{test:u})||c(f,{left:u})||o(f,{left:u})){u=f;h--;f=t[h]}else{return false}}return false}},946:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.nodes=e.list=void 0;var i=n(740);const{FLIPPED_ALIAS_KEYS:s,isArrayExpression:r,isAssignmentExpression:o,isBinary:a,isBlockStatement:c,isCallExpression:p,isFunction:l,isIdentifier:h,isLiteral:u,isMemberExpression:f,isObjectExpression:d,isOptionalCallExpression:m,isOptionalMemberExpression:y,isStringLiteral:T}=i;function crawl(t,e={}){if(f(t)||y(t)){crawl(t.object,e);if(t.computed)crawl(t.property,e)}else if(a(t)||o(t)){crawl(t.left,e);crawl(t.right,e)}else if(p(t)||m(t)){e.hasCall=true;crawl(t.callee,e)}else if(l(t)){e.hasFunction=true}else if(h(t)){e.hasHelper=e.hasHelper||isHelper(t.callee)}return e}function isHelper(t){if(f(t)){return isHelper(t.object)||isHelper(t.property)}else if(h(t)){return t.name==="require"||t.name[0]==="_"}else if(p(t)){return isHelper(t.callee)}else if(a(t)||o(t)){return h(t.left)&&isHelper(t.left)||isHelper(t.right)}else{return false}}function isType(t){return u(t)||d(t)||r(t)||h(t)||f(t)}const S={AssignmentExpression(t){const e=crawl(t.right);if(e.hasCall&&e.hasHelper||e.hasFunction){return{before:e.hasFunction,after:true}}},SwitchCase(t,e){return{before:!!t.consequent.length||e.cases[0]===t,after:!t.consequent.length&&e.cases[e.cases.length-1]===t}},LogicalExpression(t){if(l(t.left)||l(t.right)){return{after:true}}},Literal(t){if(T(t)&&t.value==="use strict"){return{after:true}}},CallExpression(t){if(l(t.callee)||isHelper(t)){return{before:true,after:true}}},OptionalCallExpression(t){if(l(t.callee)){return{before:true,after:true}}},VariableDeclaration(t){for(let e=0;e<t.declarations.length;e++){const n=t.declarations[e];let i=isHelper(n.id)&&!isType(n.init);if(!i){const t=crawl(n.init);i=isHelper(n.init)&&t.hasCall||t.hasFunction}if(i){return{before:true,after:true}}}},IfStatement(t){if(c(t.consequent)){return{before:true,after:true}}}};e.nodes=S;S.ObjectProperty=S.ObjectTypeProperty=S.ObjectMethod=function(t,e){if(e.properties[0]===t){return{before:true}}};S.ObjectTypeCallProperty=function(t,e){var n;if(e.callProperties[0]===t&&!((n=e.properties)!=null&&n.length)){return{before:true}}};S.ObjectTypeIndexer=function(t,e){var n,i;if(e.indexers[0]===t&&!((n=e.properties)!=null&&n.length)&&!((i=e.callProperties)!=null&&i.length)){return{before:true}}};S.ObjectTypeInternalSlot=function(t,e){var n,i,s;if(e.internalSlots[0]===t&&!((n=e.properties)!=null&&n.length)&&!((i=e.callProperties)!=null&&i.length)&&!((s=e.indexers)!=null&&s.length)){return{before:true}}};const g={VariableDeclaration(t){return t.declarations.map((t=>t.init))},ArrayExpression(t){return t.elements},ObjectExpression(t){return t.properties}};e.list=g;[["Function",true],["Class",true],["Loop",true],["LabeledStatement",true],["SwitchStatement",true],["TryStatement",true]].forEach((function([t,e]){if(typeof e==="boolean"){e={after:e,before:e}}[t].concat(s[t]||[]).forEach((function(t){S[t]=function(){return e}}))}))},754:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=n(90);var s=n(458);var r=n(740);var o=n(561);const{isProgram:a,isFile:c,isEmptyStatement:p}=r;const l=/e/i;const h=/\.0+$/;const u=/^0[box]/;const f=/^\s*[@#]__PURE__\s*$/;const{needsParens:d,needsWhitespaceAfter:m,needsWhitespaceBefore:y}=s;class Printer{constructor(t,e){this.inForStatementInitCounter=0;this._printStack=[];this._indent=0;this._insideAux=false;this._parenPushNewlineState=null;this._noLineTerminator=false;this._printAuxAfterOnNextUserNode=false;this._printedComments=new WeakSet;this._endsWithInteger=false;this._endsWithWord=false;this.format=t;this._buf=new i.default(e)}generate(t){this.print(t);this._maybeAddAuxComment();return this._buf.get()}indent(){if(this.format.compact||this.format.concise)return;this._indent++}dedent(){if(this.format.compact||this.format.concise)return;this._indent--}semicolon(t=false){this._maybeAddAuxComment();this._append(";",!t)}rightBrace(){if(this.format.minified){this._buf.removeLastSemicolon()}this.token("}")}space(t=false){if(this.format.compact)return;if(t){this._space()}else if(this._buf.hasContent()){const t=this.getLastChar();if(t!==32&&t!==10){this._space()}}}word(t){if(this._endsWithWord||this.endsWith(47)&&t.charCodeAt(0)===47){this._space()}this._maybeAddAuxComment();this._append(t);this._endsWithWord=true}number(t){this.word(t);this._endsWithInteger=Number.isInteger(+t)&&!u.test(t)&&!l.test(t)&&!h.test(t)&&t.charCodeAt(t.length-1)!==46}token(t){const e=this.getLastChar();const n=t.charCodeAt(0);if(t==="--"&&e===33||n===43&&e===43||n===45&&e===45||n===46&&this._endsWithInteger){this._space()}this._maybeAddAuxComment();this._append(t)}newline(t=1){if(this.format.retainLines||this.format.compact)return;if(this.format.concise){this.space();return}const e=this.endsWithCharAndNewline();if(e===10)return;if(e===123||e===58){t--}if(t<=0)return;for(let e=0;e<t;e++){this._newline()}}endsWith(t){return this.getLastChar()===t}getLastChar(){return this._buf.getLastChar()}endsWithCharAndNewline(){return this._buf.endsWithCharAndNewline()}removeTrailingNewline(){this._buf.removeTrailingNewline()}exactSource(t,e){this._catchUp("start",t);this._buf.exactSource(t,e)}source(t,e){this._catchUp(t,e);this._buf.source(t,e)}withSource(t,e,n){this._catchUp(t,e);this._buf.withSource(t,e,n)}_space(){this._append(" ",true)}_newline(){this._append("\n",true)}_append(t,e=false){this._maybeAddParen(t);this._maybeIndent(t);if(e)this._buf.queue(t);else this._buf.append(t);this._endsWithWord=false;this._endsWithInteger=false}_maybeIndent(t){if(this._indent&&this.endsWith(10)&&t.charCodeAt(0)!==10){this._buf.queueIndentation(this._getIndent())}}_maybeAddParen(t){const e=this._parenPushNewlineState;if(!e)return;let n;for(n=0;n<t.length&&t[n]===" ";n++)continue;if(n===t.length){return}const i=t[n];if(i!=="\n"){if(i!=="/"||n+1===t.length){this._parenPushNewlineState=null;return}const e=t[n+1];if(e==="*"){if(f.test(t.slice(n+2,t.length-2))){return}}else if(e!=="/"){this._parenPushNewlineState=null;return}}this.token("(");this.indent();e.printed=true}_catchUp(t,e){if(!this.format.retainLines)return;const n=e?e[t]:null;if((n==null?void 0:n.line)!=null){const t=n.line-this._buf.getCurrentLine();for(let e=0;e<t;e++){this._newline()}}}_getIndent(){return this.format.indent.style.repeat(this._indent)}startTerminatorless(t=false){if(t){this._noLineTerminator=true;return null}else{return this._parenPushNewlineState={printed:false}}}endTerminatorless(t){this._noLineTerminator=false;if(t!=null&&t.printed){this.dedent();this.newline();this.token(")")}}print(t,e){if(!t)return;const n=this.format.concise;if(t._compact){this.format.concise=true}const i=this[t.type];if(!i){throw new ReferenceError(`unknown node of type ${JSON.stringify(t.type)} with constructor ${JSON.stringify(t==null?void 0:t.constructor.name)}`)}this._printStack.push(t);const s=this._insideAux;this._insideAux=!t.loc;this._maybeAddAuxComment(this._insideAux&&!s);let r=d(t,e,this._printStack);if(this.format.retainFunctionParens&&t.type==="FunctionExpression"&&t.extra&&t.extra.parenthesized){r=true}if(r)this.token("(");this._printLeadingComments(t);const o=a(t)||c(t)?null:t.loc;this.withSource("start",o,(()=>{i.call(this,t,e)}));this._printTrailingComments(t);if(r)this.token(")");this._printStack.pop();this.format.concise=n;this._insideAux=s}_maybeAddAuxComment(t){if(t)this._printAuxBeforeComment();if(!this._insideAux)this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=true;const t=this.format.auxiliaryCommentBefore;if(t){this._printComment({type:"CommentBlock",value:t})}}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=false;const t=this.format.auxiliaryCommentAfter;if(t){this._printComment({type:"CommentBlock",value:t})}}getPossibleRaw(t){const e=t.extra;if(e&&e.raw!=null&&e.rawValue!=null&&t.value===e.rawValue){return e.raw}}printJoin(t,e,n={}){if(!(t!=null&&t.length))return;if(n.indent)this.indent();const i={addNewlines:n.addNewlines};for(let s=0;s<t.length;s++){const r=t[s];if(!r)continue;if(n.statement)this._printNewline(true,r,e,i);this.print(r,e);if(n.iterator){n.iterator(r,s)}if(n.separator&&s<t.length-1){n.separator.call(this)}if(n.statement)this._printNewline(false,r,e,i)}if(n.indent)this.dedent()}printAndIndentOnComments(t,e){const n=t.leadingComments&&t.leadingComments.length>0;if(n)this.indent();this.print(t,e);if(n)this.dedent()}printBlock(t){const e=t.body;if(!p(e)){this.space()}this.print(e,t)}_printTrailingComments(t){this._printComments(this._getComments(false,t))}_printLeadingComments(t){this._printComments(this._getComments(true,t),true)}printInnerComments(t,e=true){var n;if(!((n=t.innerComments)!=null&&n.length))return;if(e)this.indent();this._printComments(t.innerComments);if(e)this.dedent()}printSequence(t,e,n={}){n.statement=true;return this.printJoin(t,e,n)}printList(t,e,n={}){if(n.separator==null){n.separator=commaSeparator}return this.printJoin(t,e,n)}_printNewline(t,e,n,i){if(this.format.retainLines||this.format.compact)return;if(this.format.concise){this.space();return}let s=0;if(this._buf.hasContent()){if(!t)s++;if(i.addNewlines)s+=i.addNewlines(t,e)||0;const r=t?y:m;if(r(e,n))s++}this.newline(Math.min(2,s))}_getComments(t,e){return e&&(t?e.leadingComments:e.trailingComments)||[]}_printComment(t,e){if(!this.format.shouldPrintComment(t.value))return;if(t.ignore)return;if(this._printedComments.has(t))return;this._printedComments.add(t);const n=t.type==="CommentBlock";const i=n&&!e&&!this._noLineTerminator;if(i&&this._buf.hasContent())this.newline(1);const s=this.getLastChar();if(s!==91&&s!==123){this.space()}let r=!n&&!this._noLineTerminator?`//${t.value}\n`:`/*${t.value}*/`;if(n&&this.format.indent.adjustMultilineComment){var o;const e=(o=t.loc)==null?void 0:o.start.column;if(e){const t=new RegExp("\\n\\s{1,"+e+"}","g");r=r.replace(t,"\n")}const n=Math.max(this._getIndent().length,this.format.retainLines?0:this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,`\n${" ".repeat(n)}`)}if(this.endsWith(47))this._space();this.withSource("start",t.loc,(()=>{this._append(r)}));if(i)this.newline(1)}_printComments(t,e){if(!(t!=null&&t.length))return;if(e&&t.length===1&&f.test(t[0].value)){this._printComment(t[0],this._buf.hasContent()&&!this.endsWith(10))}else{for(const e of t){this._printComment(e)}}}printAssertions(t){var e;if((e=t.assertions)!=null&&e.length){this.space();this.word("assert");this.space();this.token("{");this.space();this.printList(t.assertions,t);this.space();this.token("}")}}}Object.assign(Printer.prototype,o);{Printer.prototype.Noop=function Noop(){}}var T=Printer;e["default"]=T;function commaSeparator(){this.token(",");this.space()}},47:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=n(937);class SourceMap{constructor(t,e){var n;this._map=void 0;this._rawMappings=void 0;this._sourceFileName=void 0;this._lastGenLine=0;this._lastSourceLine=0;this._lastSourceColumn=0;const s=this._map=new i.GenMapping({sourceRoot:t.sourceRoot});this._sourceFileName=(n=t.sourceFileName)==null?void 0:n.replace(/\\/g,"/");this._rawMappings=undefined;if(typeof e==="string"){(0,i.setSourceContent)(s,this._sourceFileName,e)}else if(typeof e==="object"){Object.keys(e).forEach((t=>{(0,i.setSourceContent)(s,t.replace(/\\/g,"/"),e[t])}))}}get(){return(0,i.toEncodedMap)(this._map)}getDecoded(){return(0,i.toDecodedMap)(this._map)}getRawMappings(){return this._rawMappings||(this._rawMappings=(0,i.allMappings)(this._map))}mark(t,e,n,s,r){this._rawMappings=undefined;(0,i.maybeAddMapping)(this._map,{name:s,generated:t,source:e==null?undefined:(r==null?void 0:r.replace(/\\/g,"/"))||this._sourceFileName,original:e==null?undefined:{line:e,column:n}})}}e["default"]=SourceMap},937:function(t,e,n){(function(t,i){true?i(e,n(465),n(248),n(474)):0})(this,(function(t,e,n,i){"use strict";const s=0;const r=1;const o=2;const a=3;const c=4;const p=-1;t.addSegment=void 0;t.addMapping=void 0;t.maybeAddSegment=void 0;t.maybeAddMapping=void 0;t.setSourceContent=void 0;t.toDecodedMap=void 0;t.toEncodedMap=void 0;t.fromMap=void 0;t.allMappings=void 0;let l;class GenMapping{constructor({file:t,sourceRoot:n}={}){this._names=new e.SetArray;this._sources=new e.SetArray;this._sourcesContent=[];this._mappings=[];this.file=t;this.sourceRoot=n}}(()=>{t.addSegment=(t,e,n,i,s,r,o,a)=>l(false,t,e,n,i,s,r,o,a);t.maybeAddSegment=(t,e,n,i,s,r,o,a)=>l(true,t,e,n,i,s,r,o,a);t.addMapping=(t,e)=>addMappingInternal(false,t,e);t.maybeAddMapping=(t,e)=>addMappingInternal(true,t,e);t.setSourceContent=(t,n,i)=>{const{_sources:s,_sourcesContent:r}=t;r[e.put(s,n)]=i};t.toDecodedMap=t=>{const{file:e,sourceRoot:n,_mappings:i,_sources:s,_sourcesContent:r,_names:o}=t;removeEmptyFinalLines(i);return{version:3,file:e||undefined,names:o.array,sourceRoot:n||undefined,sources:s.array,sourcesContent:r,mappings:i}};t.toEncodedMap=e=>{const i=t.toDecodedMap(e);return Object.assign(Object.assign({},i),{mappings:n.encode(i.mappings)})};t.allMappings=t=>{const e=[];const{_mappings:n,_sources:i,_names:p}=t;for(let t=0;t<n.length;t++){const l=n[t];for(let n=0;n<l.length;n++){const h=l[n];const u={line:t+1,column:h[s]};let f=undefined;let d=undefined;let m=undefined;if(h.length!==1){f=i.array[h[r]];d={line:h[o]+1,column:h[a]};if(h.length===5)m=p.array[h[c]]}e.push({generated:u,source:f,original:d,name:m})}}return e};t.fromMap=t=>{const e=new i.TraceMap(t);const n=new GenMapping({file:e.file,sourceRoot:e.sourceRoot});putAll(n._names,e.names);putAll(n._sources,e.sources);n._sourcesContent=e.sourcesContent||e.sources.map((()=>null));n._mappings=i.decodedMappings(e);return n};l=(t,n,i,s,r,o,a,c,l)=>{const{_mappings:h,_sources:u,_sourcesContent:f,_names:d}=n;const m=getLine(h,i);const y=getColumnIndex(m,s);if(!r){if(t&&skipSourceless(m,y))return;return insert(m,y,[s])}const T=e.put(u,r);const S=c?e.put(d,c):p;if(T===f.length)f[T]=l!==null&&l!==void 0?l:null;if(t&&skipSource(m,y,T,o,a,S)){return}return insert(m,y,c?[s,T,o,a,S]:[s,T,o,a])}})();function getLine(t,e){for(let n=t.length;n<=e;n++){t[n]=[]}return t[e]}function getColumnIndex(t,e){let n=t.length;for(let i=n-1;i>=0;n=i--){const n=t[i];if(e>=n[s])break}return n}function insert(t,e,n){for(let n=t.length;n>e;n--){t[n]=t[n-1]}t[e]=n}function removeEmptyFinalLines(t){const{length:e}=t;let n=e;for(let e=n-1;e>=0;n=e,e--){if(t[e].length>0)break}if(n<e)t.length=n}function putAll(t,n){for(let i=0;i<n.length;i++)e.put(t,n[i])}function skipSourceless(t,e){if(e===0)return true;const n=t[e-1];return n.length===1}function skipSource(t,e,n,i,s,l){if(e===0)return false;const h=t[e-1];if(h.length===1)return false;return n===h[r]&&i===h[o]&&s===h[a]&&l===(h.length===5?h[c]:p)}function addMappingInternal(t,e,n){const{generated:i,source:s,original:r,name:o,content:a}=n;if(!s){return l(t,e,i.line-1,i.column,null,null,null,null,null)}const c=s;return l(t,e,i.line-1,i.column,c,r.line-1,r.column,o,a)}t.GenMapping=GenMapping;Object.defineProperty(t,"__esModule",{value:true})}))},778:function(t){(function(e,n){true?t.exports=n():0})(this,(function(){"use strict";const t=/^[\w+.-]+:\/\//;const e=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?/;const n=/^file:(?:\/\/((?![a-z]:)[^/]*)?)?(\/?.*)/i;function isAbsoluteUrl(e){return t.test(e)}function isSchemeRelativeUrl(t){return t.startsWith("//")}function isAbsolutePath(t){return t.startsWith("/")}function isFileUrl(t){return t.startsWith("file:")}function parseAbsoluteUrl(t){const n=e.exec(t);return makeUrl(n[1],n[2]||"",n[3],n[4]||"",n[5]||"/")}function parseFileUrl(t){const e=n.exec(t);const i=e[2];return makeUrl("file:","",e[1]||"","",isAbsolutePath(i)?i:"/"+i)}function makeUrl(t,e,n,i,s){return{scheme:t,user:e,host:n,port:i,path:s,relativePath:false}}function parseUrl(t){if(isSchemeRelativeUrl(t)){const e=parseAbsoluteUrl("http:"+t);e.scheme="";return e}if(isAbsolutePath(t)){const e=parseAbsoluteUrl("http://foo.com"+t);e.scheme="";e.host="";return e}if(isFileUrl(t))return parseFileUrl(t);if(isAbsoluteUrl(t))return parseAbsoluteUrl(t);const e=parseAbsoluteUrl("http://foo.com/"+t);e.scheme="";e.host="";e.relativePath=true;return e}function stripPathFilename(t){if(t.endsWith("/.."))return t;const e=t.lastIndexOf("/");return t.slice(0,e+1)}function mergePaths(t,e){if(!t.relativePath)return;normalizePath(e);if(t.path==="/"){t.path=e.path}else{t.path=stripPathFilename(e.path)+t.path}t.relativePath=e.relativePath}function normalizePath(t){const{relativePath:e}=t;const n=t.path.split("/");let i=1;let s=0;let r=false;for(let t=1;t<n.length;t++){const o=n[t];if(!o){r=true;continue}r=false;if(o===".")continue;if(o===".."){if(s){r=true;s--;i--}else if(e){n[i++]=o}continue}n[i++]=o;s++}let o="";for(let t=1;t<i;t++){o+="/"+n[t]}if(!o||r&&!o.endsWith("/..")){o+="/"}t.path=o}function resolve(t,e){if(!t&&!e)return"";const n=parseUrl(t);if(e&&!n.scheme){const t=parseUrl(e);n.scheme=t.scheme;if(!n.host){n.user=t.user;n.host=t.host;n.port=t.port}mergePaths(n,t)}normalizePath(n);if(n.relativePath){const i=n.path.slice(1);if(!i)return".";const s=(e||t).startsWith(".");return!s||i.startsWith(".")?i:"./"+i}if(!n.scheme&&!n.host)return n.path;return`${n.scheme}//${n.user}${n.host}${n.port}${n.path}`}return resolve}))},465:function(t,e){(function(t,n){true?n(e):0})(this,(function(t){"use strict";t.get=void 0;t.put=void 0;t.pop=void 0;class SetArray{constructor(){this._indexes={__proto__:null};this.array=[]}}(()=>{t.get=(t,e)=>t._indexes[e];t.put=(e,n)=>{const i=t.get(e,n);if(i!==undefined)return i;const{array:s,_indexes:r}=e;return r[n]=s.push(n)-1};t.pop=t=>{const{array:e,_indexes:n}=t;if(e.length===0)return;const i=e.pop();n[i]=undefined}})();t.SetArray=SetArray;Object.defineProperty(t,"__esModule",{value:true})}))},248:function(t,e){(function(t,n){true?n(e):0})(this,(function(t){"use strict";const e=",".charCodeAt(0);const n=";".charCodeAt(0);const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const s=new Uint8Array(64);const r=new Uint8Array(128);for(let t=0;t<i.length;t++){const e=i.charCodeAt(t);s[t]=e;r[e]=t}const o=typeof TextDecoder!=="undefined"?new TextDecoder:typeof Buffer!=="undefined"?{decode(t){const e=Buffer.from(t.buffer,t.byteOffset,t.byteLength);return e.toString()}}:{decode(t){let e="";for(let n=0;n<t.length;n++){e+=String.fromCharCode(t[n])}return e}};function decode(t){const e=new Int32Array(5);const n=[];let i=0;do{const s=indexOf(t,i);const r=[];let o=true;let a=0;e[0]=0;for(let n=i;n<s;n++){let i;n=decodeInteger(t,n,e,0);const c=e[0];if(c<a)o=false;a=c;if(hasMoreVlq(t,n,s)){n=decodeInteger(t,n,e,1);n=decodeInteger(t,n,e,2);n=decodeInteger(t,n,e,3);if(hasMoreVlq(t,n,s)){n=decodeInteger(t,n,e,4);i=[c,e[1],e[2],e[3],e[4]]}else{i=[c,e[1],e[2],e[3]]}}else{i=[c]}r.push(i)}if(!o)sort(r);n.push(r);i=s+1}while(i<=t.length);return n}function indexOf(t,e){const n=t.indexOf(";",e);return n===-1?t.length:n}function decodeInteger(t,e,n,i){let s=0;let o=0;let a=0;do{const n=t.charCodeAt(e++);a=r[n];s|=(a&31)<<o;o+=5}while(a&32);const c=s&1;s>>>=1;if(c){s=-2147483648|-s}n[i]+=s;return e}function hasMoreVlq(t,n,i){if(n>=i)return false;return t.charCodeAt(n)!==e}function sort(t){t.sort(sortComparator)}function sortComparator(t,e){return t[0]-e[0]}function encode(t){const i=new Int32Array(5);const s=1024*16;const r=s-36;const a=new Uint8Array(s);const c=a.subarray(0,r);let p=0;let l="";for(let h=0;h<t.length;h++){const u=t[h];if(h>0){if(p===s){l+=o.decode(a);p=0}a[p++]=n}if(u.length===0)continue;i[0]=0;for(let t=0;t<u.length;t++){const n=u[t];if(p>r){l+=o.decode(c);a.copyWithin(0,r,p);p-=r}if(t>0)a[p++]=e;p=encodeInteger(a,p,i,n,0);if(n.length===1)continue;p=encodeInteger(a,p,i,n,1);p=encodeInteger(a,p,i,n,2);p=encodeInteger(a,p,i,n,3);if(n.length===4)continue;p=encodeInteger(a,p,i,n,4)}}return l+o.decode(a.subarray(0,p))}function encodeInteger(t,e,n,i,r){const o=i[r];let a=o-n[r];n[r]=o;a=a<0?-a<<1|1:a<<1;do{let n=a&31;a>>>=5;if(a>0)n|=32;t[e++]=s[n]}while(a>0);return e}t.decode=decode;t.encode=encode;Object.defineProperty(t,"__esModule",{value:true})}))},474:function(t,e,n){(function(t,i){true?i(e,n(248),n(778)):0})(this,(function(t,e,n){"use strict";function _interopDefaultLegacy(t){return t&&typeof t==="object"&&"default"in t?t:{default:t}}var i=_interopDefaultLegacy(n);function resolve(t,e){if(e&&!e.endsWith("/"))e+="/";return i["default"](t,e)}function stripFilename(t){if(!t)return"";const e=t.lastIndexOf("/");return t.slice(0,e+1)}const s=0;const r=1;const o=2;const a=3;const c=4;const p=1;const l=2;function maybeSort(t,e){const n=nextUnsortedSegmentLine(t,0);if(n===t.length)return t;if(!e)t=t.slice();for(let i=n;i<t.length;i=nextUnsortedSegmentLine(t,i+1)){t[i]=sortSegments(t[i],e)}return t}function nextUnsortedSegmentLine(t,e){for(let n=e;n<t.length;n++){if(!isSorted(t[n]))return n}return t.length}function isSorted(t){for(let e=1;e<t.length;e++){if(t[e][s]<t[e-1][s]){return false}}return true}function sortSegments(t,e){if(!e)t=t.slice();return t.sort(sortComparator)}function sortComparator(t,e){return t[s]-e[s]}let h=false;function binarySearch(t,e,n,i){while(n<=i){const r=n+(i-n>>1);const o=t[r][s]-e;if(o===0){h=true;return r}if(o<0){n=r+1}else{i=r-1}}h=false;return n-1}function upperBound(t,e,n){for(let i=n+1;i<t.length;n=i++){if(t[i][s]!==e)break}return n}function lowerBound(t,e,n){for(let i=n-1;i>=0;n=i--){if(t[i][s]!==e)break}return n}function memoizedState(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function memoizedBinarySearch(t,e,n,i){const{lastKey:r,lastNeedle:o,lastIndex:a}=n;let c=0;let p=t.length-1;if(i===r){if(e===o){h=a!==-1&&t[a][s]===e;return a}if(e>=o){c=a===-1?0:a}else{p=a}}n.lastKey=i;n.lastNeedle=e;return n.lastIndex=binarySearch(t,e,c,p)}function buildBySources(t,e){const n=e.map(buildNullArray);for(let i=0;i<t.length;i++){const c=t[i];for(let t=0;t<c.length;t++){const p=c[t];if(p.length===1)continue;const l=p[r];const h=p[o];const u=p[a];const f=n[l];const d=f[h]||(f[h]=[]);const m=e[l];const y=upperBound(d,u,memoizedBinarySearch(d,u,m,h));insert(d,m.lastIndex=y+1,[u,i,p[s]])}}return n}function insert(t,e,n){for(let n=t.length;n>e;n--){t[n]=t[n-1]}t[e]=n}function buildNullArray(){return{__proto__:null}}const AnyMap=function(e,n){const i=typeof e==="string"?JSON.parse(e):e;if(!("sections"in i))return new TraceMap(i,n);const s=[];const r=[];const o=[];const a=[];recurse(i,n,s,r,o,a,0,0,Infinity,Infinity);const c={version:3,file:i.file,names:a,sources:r,sourcesContent:o,mappings:s};return t.presortedDecodedMap(c)};function recurse(t,e,n,i,s,r,o,a,c,p){const{sections:l}=t;for(let t=0;t<l.length;t++){const{map:h,offset:u}=l[t];let f=c;let d=p;if(t+1<l.length){const e=l[t+1].offset;f=Math.min(c,o+e.line);if(f===c){d=Math.min(p,a+e.column)}else if(f<c){d=a+e.column}}addSection(h,e,n,i,s,r,o+u.line,a+u.column,f,d)}}function addSection(e,n,i,p,l,h,u,f,d,m){if("sections"in e)return recurse(...arguments);const y=new TraceMap(e,n);const T=p.length;const S=h.length;const g=t.decodedMappings(y);const{resolvedSources:x,sourcesContent:b}=y;append(p,x);append(h,y.names);if(b)append(l,b);else for(let t=0;t<x.length;t++)l.push(null);for(let t=0;t<g.length;t++){const e=u+t;if(e>d)return;const n=getLine(i,e);const p=t===0?f:0;const l=g[t];for(let t=0;t<l.length;t++){const i=l[t];const h=p+i[s];if(e===d&&h>=m)return;if(i.length===1){n.push([h]);continue}const u=T+i[r];const f=i[o];const y=i[a];n.push(i.length===4?[h,u,f,y]:[h,u,f,y,S+i[c]])}}}function append(t,e){for(let n=0;n<e.length;n++)t.push(e[n])}function getLine(t,e){for(let n=t.length;n<=e;n++)t[n]=[];return t[e]}const u="`line` must be greater than 0 (lines start at line 1)";const f="`column` must be greater than or equal to 0 (columns start at column 0)";const d=-1;const m=1;t.encodedMappings=void 0;t.decodedMappings=void 0;t.traceSegment=void 0;t.originalPositionFor=void 0;t.generatedPositionFor=void 0;t.eachMapping=void 0;t.sourceContentFor=void 0;t.presortedDecodedMap=void 0;t.decodedMap=void 0;t.encodedMap=void 0;class TraceMap{constructor(t,e){this._decodedMemo=memoizedState();this._bySources=undefined;this._bySourceMemos=undefined;const n=typeof t==="string";if(!n&&t._decodedMemo)return t;const i=n?JSON.parse(t):t;const{version:s,file:r,names:o,sourceRoot:a,sources:c,sourcesContent:p}=i;this.version=s;this.file=r;this.names=o;this.sourceRoot=a;this.sources=c;this.sourcesContent=p;const l=resolve(a||"",stripFilename(e));this.resolvedSources=c.map((t=>resolve(t||"",l)));const{mappings:h}=i;if(typeof h==="string"){this._encoded=h;this._decoded=undefined}else{this._encoded=undefined;this._decoded=maybeSort(h,n)}}}(()=>{t.encodedMappings=t=>{var n;return(n=t._encoded)!==null&&n!==void 0?n:t._encoded=e.encode(t._decoded)};t.decodedMappings=t=>t._decoded||(t._decoded=e.decode(t._encoded));t.traceSegment=(e,n,i)=>{const s=t.decodedMappings(e);if(n>=s.length)return null;return traceSegmentInternal(s[n],e._decodedMemo,n,i,m)};t.originalPositionFor=(e,{line:n,column:i,bias:s})=>{n--;if(n<0)throw new Error(u);if(i<0)throw new Error(f);const p=t.decodedMappings(e);if(n>=p.length)return OMapping(null,null,null,null);const l=traceSegmentInternal(p[n],e._decodedMemo,n,i,s||m);if(l==null)return OMapping(null,null,null,null);if(l.length==1)return OMapping(null,null,null,null);const{names:h,resolvedSources:d}=e;return OMapping(d[l[r]],l[o]+1,l[a],l.length===5?h[l[c]]:null)};t.generatedPositionFor=(e,{source:n,line:i,column:s,bias:r})=>{i--;if(i<0)throw new Error(u);if(s<0)throw new Error(f);const{sources:o,resolvedSources:a}=e;let c=o.indexOf(n);if(c===-1)c=a.indexOf(n);if(c===-1)return GMapping(null,null);const h=e._bySources||(e._bySources=buildBySources(t.decodedMappings(e),e._bySourceMemos=o.map(memoizedState)));const d=e._bySourceMemos;const y=h[c][i];if(y==null)return GMapping(null,null);const T=traceSegmentInternal(y,d[c],i,s,r||m);if(T==null)return GMapping(null,null);return GMapping(T[p]+1,T[l])};t.eachMapping=(e,n)=>{const i=t.decodedMappings(e);const{names:s,resolvedSources:r}=e;for(let t=0;t<i.length;t++){const e=i[t];for(let i=0;i<e.length;i++){const o=e[i];const a=t+1;const c=o[0];let p=null;let l=null;let h=null;let u=null;if(o.length!==1){p=r[o[1]];l=o[2]+1;h=o[3]}if(o.length===5)u=s[o[4]];n({generatedLine:a,generatedColumn:c,source:p,originalLine:l,originalColumn:h,name:u})}}};t.sourceContentFor=(t,e)=>{const{sources:n,resolvedSources:i,sourcesContent:s}=t;if(s==null)return null;let r=n.indexOf(e);if(r===-1)r=i.indexOf(e);return r===-1?null:s[r]};t.presortedDecodedMap=(t,e)=>{const n=Object.assign({},t);n.mappings=[];const i=new TraceMap(n,e);i._decoded=t.mappings;return i};t.decodedMap=e=>({version:3,file:e.file,names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,mappings:t.decodedMappings(e)});t.encodedMap=e=>({version:3,file:e.file,names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,mappings:t.encodedMappings(e)})})();function OMapping(t,e,n,i){return{source:t,line:e,column:n,name:i}}function GMapping(t,e){return{line:t,column:e}}function traceSegmentInternal(t,e,n,i,s){let r=memoizedBinarySearch(t,i,e,n);if(h){r=(s===d?upperBound:lowerBound)(t,i,r)}else if(s===d)r++;if(r===-1||r===t.length)return null;return t[r]}t.AnyMap=AnyMap;t.GREATEST_LOWER_BOUND=m;t.LEAST_UPPER_BOUND=d;t.TraceMap=TraceMap;Object.defineProperty(t,"__esModule",{value:true})}))},95:t=>{"use strict";const e={};const n=e.hasOwnProperty;const forOwn=(t,e)=>{for(const i in t){if(n.call(t,i)){e(i,t[i])}}};const extend=(t,e)=>{if(!e){return t}forOwn(e,((e,n)=>{t[e]=n}));return t};const forEach=(t,e)=>{const n=t.length;let i=-1;while(++i<n){e(t[i])}};const i=e.toString;const s=Array.isArray;const r=Buffer.isBuffer;const isObject=t=>i.call(t)=="[object Object]";const isString=t=>typeof t=="string"||i.call(t)=="[object String]";const isNumber=t=>typeof t=="number"||i.call(t)=="[object Number]";const isFunction=t=>typeof t=="function";const isMap=t=>i.call(t)=="[object Map]";const isSet=t=>i.call(t)=="[object Set]";const o={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"};const a=/["'\\\b\f\n\r\t]/;const c=/[0-9]/;const p=/[ !#-&\(-\[\]-_a-~]/;const jsesc=(t,e)=>{const increaseIndentation=()=>{d=f;++e.indentLevel;f=e.indent.repeat(e.indentLevel)};const n={escapeEverything:false,minimal:false,isScriptContext:false,quotes:"single",wrap:false,es6:false,json:false,compact:true,lowercaseHex:false,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:false,__inline2__:false};const i=e&&e.json;if(i){n.quotes="double";n.wrap=true}e=extend(n,e);if(e.quotes!="single"&&e.quotes!="double"&&e.quotes!="backtick"){e.quotes="single"}const l=e.quotes=="double"?'"':e.quotes=="backtick"?"`":"'";const h=e.compact;const u=e.lowercaseHex;let f=e.indent.repeat(e.indentLevel);let d="";const m=e.__inline1__;const y=e.__inline2__;const T=h?"":"\n";let S;let g=true;const x=e.numbers=="binary";const b=e.numbers=="octal";const _=e.numbers=="decimal";const w=e.numbers=="hexadecimal";if(i&&t&&isFunction(t.toJSON)){t=t.toJSON()}if(!isString(t)){if(isMap(t)){if(t.size==0){return"new Map()"}if(!h){e.__inline1__=true;e.__inline2__=false}return"new Map("+jsesc(Array.from(t),e)+")"}if(isSet(t)){if(t.size==0){return"new Set()"}return"new Set("+jsesc(Array.from(t),e)+")"}if(r(t)){if(t.length==0){return"Buffer.from([])"}return"Buffer.from("+jsesc(Array.from(t),e)+")"}if(s(t)){S=[];e.wrap=true;if(m){e.__inline1__=false;e.__inline2__=true}if(!y){increaseIndentation()}forEach(t,(t=>{g=false;if(y){e.__inline2__=false}S.push((h||y?"":f)+jsesc(t,e))}));if(g){return"[]"}if(y){return"["+S.join(", ")+"]"}return"["+T+S.join(","+T)+T+(h?"":d)+"]"}else if(isNumber(t)){if(i){return JSON.stringify(t)}if(_){return String(t)}if(w){let e=t.toString(16);if(!u){e=e.toUpperCase()}return"0x"+e}if(x){return"0b"+t.toString(2)}if(b){return"0o"+t.toString(8)}}else if(!isObject(t)){if(i){return JSON.stringify(t)||"null"}return String(t)}else{S=[];e.wrap=true;increaseIndentation();forOwn(t,((t,n)=>{g=false;S.push((h?"":f)+jsesc(t,e)+":"+(h?"":" ")+jsesc(n,e))}));if(g){return"{}"}return"{"+T+S.join(","+T)+T+(h?"":d)+"}"}}const k=t;let E=-1;const A=k.length;S="";while(++E<A){const t=k.charAt(E);if(e.es6){const t=k.charCodeAt(E);if(t>=55296&&t<=56319&&A>E+1){const e=k.charCodeAt(E+1);if(e>=56320&&e<=57343){const n=(t-55296)*1024+e-56320+65536;let i=n.toString(16);if(!u){i=i.toUpperCase()}S+="\\u{"+i+"}";++E;continue}}}if(!e.escapeEverything){if(p.test(t)){S+=t;continue}if(t=='"'){S+=l==t?'\\"':t;continue}if(t=="`"){S+=l==t?"\\`":t;continue}if(t=="'"){S+=l==t?"\\'":t;continue}}if(t=="\0"&&!i&&!c.test(k.charAt(E+1))){S+="\\0";continue}if(a.test(t)){S+=o[t];continue}const n=t.charCodeAt(0);if(e.minimal&&n!=8232&&n!=8233){S+=t;continue}let s=n.toString(16);if(!u){s=s.toUpperCase()}const r=s.length>2||i;const h="\\"+(r?"u":"x")+("0000"+s).slice(r?-4:-2);S+=h;continue}if(e.wrap){S=l+S+l}if(l=="`"){S=S.replace(/\$\{/g,"\\${")}if(e.isScriptContext){return S.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,i?"\\u003C!--":"\\x3C!--")}return S};jsesc.version="2.5.2";t.exports=jsesc},740:t=>{"use strict";t.exports=require("../types")}};var e={};function __nccwpck_require__(n){var i=e[n];if(i!==undefined){return i.exports}var s=e[n]={exports:{}};var r=true;try{t[n].call(s.exports,s,s.exports,__nccwpck_require__);r=false}finally{if(r)delete e[n]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{"use strict";var t=n;Object.defineProperty(t,"__esModule",{value:true});t.CodeGenerator=void 0;t["default"]=generate;var e=__nccwpck_require__(47);var i=__nccwpck_require__(754);class Generator extends i.default{constructor(t,n={},i){const s=normalizeOptions(i,n);const r=n.sourceMaps?new e.default(n,i):null;super(s,r);this.ast=void 0;this.ast=t}generate(){return super.generate(this.ast)}}function normalizeOptions(t,e){const n={auxiliaryCommentBefore:e.auxiliaryCommentBefore,auxiliaryCommentAfter:e.auxiliaryCommentAfter,shouldPrintComment:e.shouldPrintComment,retainLines:e.retainLines,retainFunctionParens:e.retainFunctionParens,comments:e.comments==null||e.comments,compact:e.compact,minified:e.minified,concise:e.concise,indent:{adjustMultilineComment:true,style:" ",base:0},decoratorsBeforeExport:!!e.decoratorsBeforeExport,jsescOption:Object.assign({quotes:"double",wrap:true,minimal:false},e.jsescOption),recordAndTupleSyntaxType:e.recordAndTupleSyntaxType,topicToken:e.topicToken};{n.jsonCompatibleStrings=e.jsonCompatibleStrings}if(n.minified){n.compact=true;n.shouldPrintComment=n.shouldPrintComment||(()=>n.comments)}else{n.shouldPrintComment=n.shouldPrintComment||(t=>n.comments||t.indexOf("@license")>=0||t.indexOf("@preserve")>=0)}if(n.compact==="auto"){n.compact=t.length>5e5;if(n.compact){console.error("[BABEL] Note: The code generator has deoptimised the styling of "+`${e.filename} as it exceeds the max of ${"500KB"}.`)}}if(n.compact){n.indent.adjustMultilineComment=false}return n}class CodeGenerator{constructor(t,e,n){this._generator=void 0;this._generator=new Generator(t,e,n)}generate(){return this._generator.generate()}}t.CodeGenerator=CodeGenerator;function generate(t,e,n){const i=new Generator(t,e,n);return i.generate()}})();module.exports=n})();
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2014-present Sebastian McKenzie and other contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +0,0 @@
1
- {"name":"@babel/generator","author":"The Babel Team (https://babel.dev/team)","version":"7.18.2","license":"MIT","types":"index.d.ts"}
@@ -1 +0,0 @@
1
- export = any;