@rc-component/dialog 1.6.2 → 1.7.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 (108) hide show
  1. package/dist/common-async.js +2518 -0
  2. package/dist/common-async.js.map +1 -0
  3. package/dist/demos-async.css +396 -0
  4. package/dist/demos-async.css.map +1 -0
  5. package/dist/demos-async.js +1242 -0
  6. package/dist/demos-async.js.map +1 -0
  7. package/dist/docs_changelog_md-async.js +2141 -0
  8. package/dist/docs_changelog_md-async.js.map +1 -0
  9. package/dist/docs_demo_ant-design_md-async.js +101 -0
  10. package/dist/docs_demo_ant-design_md-async.js.map +1 -0
  11. package/dist/docs_demo_bootstrap_md-async.js +101 -0
  12. package/dist/docs_demo_bootstrap_md-async.js.map +1 -0
  13. package/dist/docs_demo_draggable_md-async.js +101 -0
  14. package/dist/docs_demo_draggable_md-async.js.map +1 -0
  15. package/dist/docs_demo_multiple-Portal_md-async.js +147 -0
  16. package/dist/docs_demo_multiple-Portal_md-async.js.map +1 -0
  17. package/dist/docs_demo_pure_md-async.js +101 -0
  18. package/dist/docs_demo_pure_md-async.js.map +1 -0
  19. package/dist/docs_index_md-async.js +1754 -0
  20. package/dist/docs_index_md-async.js.map +1 -0
  21. package/dist/dumi__tmp__dumi__theme__ContextWrapper-async.js +201 -0
  22. package/dist/dumi__tmp__dumi__theme__ContextWrapper-async.js.map +1 -0
  23. package/dist/meta__docs-async.css +396 -0
  24. package/dist/meta__docs-async.css.map +1 -0
  25. package/dist/meta__docs-async.js +1048 -0
  26. package/dist/meta__docs-async.js.map +1 -0
  27. package/dist/nm__dumi__dist__client__pages__404-async.js +69 -0
  28. package/dist/nm__dumi__dist__client__pages__404-async.js.map +1 -0
  29. package/dist/nm__dumi__dist__client__pages__Demo__index-async.js +63 -0
  30. package/dist/{9f7aa744-async.3e863897.js.map → nm__dumi__dist__client__pages__Demo__index-async.js.map} +1 -1
  31. package/dist/node_modules_dumi_dist_client_misc_reactDemoCompiler_js-async.js +368 -0
  32. package/dist/node_modules_dumi_dist_client_misc_reactDemoCompiler_js-async.js.map +1 -0
  33. package/dist/node_modules_dumi_theme-default_layouts_DocLayout_index_js-async.js +1077 -0
  34. package/dist/node_modules_dumi_theme-default_layouts_DocLayout_index_js-async.js.map +1 -0
  35. package/dist/node_modules_react-dom_server_browser_js-async.js +18 -0
  36. package/dist/{f410dd15-async.4aeedec3.js.map → node_modules_react-dom_server_browser_js-async.js.map} +1 -1
  37. package/dist/umi.css +1317 -0
  38. package/dist/umi.css.map +1 -0
  39. package/dist/umi.js +83003 -0
  40. package/dist/umi.js.map +1 -0
  41. package/dist/vendors-async.css +26259 -0
  42. package/dist/vendors-async.css.map +1 -0
  43. package/dist/vendors-async.js +56792 -0
  44. package/dist/vendors-async.js.map +1 -0
  45. package/es/Dialog/index.js +0 -12
  46. package/es/DialogWrap.js +14 -1
  47. package/es/IDialogPropTypes.d.ts +1 -1
  48. package/lib/Dialog/index.js +0 -12
  49. package/lib/DialogWrap.js +14 -1
  50. package/lib/IDialogPropTypes.d.ts +1 -1
  51. package/package.json +5 -5
  52. package/dist/00feb83c-async.b2b13c3a.js +0 -2
  53. package/dist/00feb83c-async.b2b13c3a.js.map +0 -1
  54. package/dist/12e34244-async.042e069f.js +0 -2
  55. package/dist/12e34244-async.042e069f.js.map +0 -1
  56. package/dist/1476aea7-async.5924d48b.js +0 -2
  57. package/dist/1476aea7-async.5924d48b.js.map +0 -1
  58. package/dist/267f1112-async.b1c4e09d.js +0 -2
  59. package/dist/267f1112-async.b1c4e09d.js.map +0 -1
  60. package/dist/3daea961-async.dfa8a2b7.js +0 -2
  61. package/dist/3daea961-async.dfa8a2b7.js.map +0 -1
  62. package/dist/404.html +0 -15
  63. package/dist/42e76558-async.f2db19d4.js +0 -2
  64. package/dist/42e76558-async.f2db19d4.js.map +0 -1
  65. package/dist/58f5abb1-async.f36f6f5a.js +0 -2
  66. package/dist/58f5abb1-async.f36f6f5a.js.map +0 -1
  67. package/dist/779f92e1-async.d95373de.js +0 -124
  68. package/dist/779f92e1-async.d95373de.js.map +0 -1
  69. package/dist/9e8e2db3-async.7488f9f0.css +0 -2
  70. package/dist/9e8e2db3-async.7488f9f0.css.map +0 -1
  71. package/dist/9e8e2db3-async.82b5afee.js +0 -8
  72. package/dist/9e8e2db3-async.82b5afee.js.map +0 -1
  73. package/dist/9f7aa744-async.3e863897.js +0 -2
  74. package/dist/bd24602e-async.050c580d.js +0 -2
  75. package/dist/bd24602e-async.050c580d.js.map +0 -1
  76. package/dist/cd8d7381-async.a336cd94.js +0 -2
  77. package/dist/cd8d7381-async.a336cd94.js.map +0 -1
  78. package/dist/changelog/index.html +0 -15
  79. package/dist/common-async.d12bbb31.js +0 -2
  80. package/dist/common-async.d12bbb31.js.map +0 -1
  81. package/dist/demo/ant-design/index.html +0 -15
  82. package/dist/demo/bootstrap/index.html +0 -15
  83. package/dist/demo/draggable/index.html +0 -15
  84. package/dist/demo/multiple--portal/index.html +0 -15
  85. package/dist/demo/pure/index.html +0 -15
  86. package/dist/f2210531-async.0ea798a7.js +0 -2
  87. package/dist/f2210531-async.0ea798a7.js.map +0 -1
  88. package/dist/f410dd15-async.4aeedec3.js +0 -2
  89. package/dist/fff33d9f-async.4061bf6f.js +0 -2
  90. package/dist/fff33d9f-async.4061bf6f.js.map +0 -1
  91. package/dist/fff33d9f-async.f200d0df.css +0 -2
  92. package/dist/fff33d9f-async.f200d0df.css.map +0 -1
  93. package/dist/index.html +0 -15
  94. package/dist/preload_helper.fdfc8d07.js +0 -1
  95. package/dist/umi.ebc6765d.js +0 -9
  96. package/dist/umi.ebc6765d.js.map +0 -1
  97. package/dist/umi.ed582539.css +0 -2
  98. package/dist/umi.ed582539.css.map +0 -1
  99. package/dist/vendors-async.53ad541e.css +0 -2
  100. package/dist/vendors-async.53ad541e.css.map +0 -1
  101. package/dist/vendors-async.af87bf96.js +0 -44
  102. package/dist/vendors-async.af87bf96.js.map +0 -1
  103. package/dist/~demos/:id/index.html +0 -15
  104. package/dist/~demos/docs-demo-ant-design-demo-ant-design/index.html +0 -15
  105. package/dist/~demos/docs-demo-bootstrap-demo-bootstrap/index.html +0 -15
  106. package/dist/~demos/docs-demo-draggable-demo-draggable/index.html +0 -15
  107. package/dist/~demos/docs-demo-multiple-portal-demo-multiple-portal/index.html +0 -15
  108. package/dist/~demos/docs-demo-pure-demo-pure/index.html +0 -15
@@ -1,124 +0,0 @@
1
- (("undefined"!=typeof globalThis?globalThis:self)["makoChunk_@rc-component/dialog"]=("undefined"!=typeof globalThis?globalThis:self)["makoChunk_@rc-component/dialog"]||[]).push([["779f92e1"],{"779f92e1":function(e,t,n){n.d(t,"__esModule",{value:!0}),n.e(t,{default:function(){return eg;}});var o,s,r=n("777fffbe"),i=n("852bbaa9"),a=n("3e1bb741"),h=n("f9cb2545"),p=n("3be0319e"),c=n("12204c3d"),l=r._(c),k=n("39dbef0b");class T{__init(){this.nonTypeIdentifiers=new Set;}__init2(){this.importInfoByPath=new Map;}__init3(){this.importsToReplace=new Map;}__init4(){this.identifierReplacements=new Map;}__init5(){this.exportBindingsByLocalName=new Map;}constructor(e,t,n,o,s,r,i){this.nameManager=e,this.tokens=t,this.enableLegacyTypeScriptModuleInterop=n,this.options=o,this.isTypeScriptTransformEnabled=s,this.keepUnusedImports=r,this.helperManager=i,T.prototype.__init.call(this),T.prototype.__init2.call(this),T.prototype.__init3.call(this),T.prototype.__init4.call(this),T.prototype.__init5.call(this);}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,p.TokenType._import)&&!this.tokens.matches3AtIndex(e,p.TokenType._import,p.TokenType.name,p.TokenType.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,p.TokenType._export)&&!this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements();}pruneTypeOnlyImports(){for(let[e,t]of(this.nonTypeIdentifiers=(0,k.getNonTypeIdentifiers)(this.tokens,this.options),this.importInfoByPath.entries()))!(!t.hasBareImport&&!t.hasStarExport&&!(t.exportStarNames.length>0)&&!(t.namedExports.length>0)&&[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.shouldAutomaticallyElideImportedName(e)))||this.importsToReplace.set(e,"");}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e);}generateImportReplacements(){for(let[e,t]of this.importInfoByPath.entries()){let n;let{defaultNames:o,wildcardNames:s,namedImports:r,namedExports:i,exportStarNames:a,hasStarExport:h}=t;if(0===o.length&&0===s.length&&0===r.length&&0===i.length&&0===a.length&&!h){this.importsToReplace.set(e,`require('${e}');`);continue;}let p=this.getFreeIdentifierForPath(e);n=this.enableLegacyTypeScriptModuleInterop?p:s.length>0?s[0]:this.getFreeIdentifierForPath(e);let c=`var ${p} = require('${e}');`;if(s.length>0)for(let e of s){let t=this.enableLegacyTypeScriptModuleInterop?p:`${this.helperManager.getHelperName("interopRequireWildcard")}(${p})`;c+=` var ${e} = ${t};`;}else a.length>0&&n!==p?c+=` var ${n} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${p});`:o.length>0&&n!==p&&(c+=` var ${n} = ${this.helperManager.getHelperName("interopRequireDefault")}(${p});`);for(let{importedName:e,localName:t}of i)c+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${p}, '${t}', '${e}');`;for(let e of a)c+=` exports.${e} = ${n};`;for(let t of(h&&(c+=` ${this.helperManager.getHelperName("createStarExport")}(${p});`),this.importsToReplace.set(e,c),o))this.identifierReplacements.set(t,`${n}.default`);for(let{importedName:e,localName:t}of r)this.identifierReplacements.set(t,`${p}.${e}`);}}getFreeIdentifierForPath(e){let t=e.split("/"),n=t[t.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${n}`);}preprocessImportAtIndex(e){let t=[],n=[],o=[];if(e++,(this.tokens.matchesContextualAtIndex(e,h.ContextualKeyword._type)||this.tokens.matches1AtIndex(e,p.TokenType._typeof))&&!this.tokens.matches1AtIndex(e+1,p.TokenType.comma)&&!this.tokens.matchesContextualAtIndex(e+1,h.ContextualKeyword._from)||this.tokens.matches1AtIndex(e,p.TokenType.parenL))return;if(this.tokens.matches1AtIndex(e,p.TokenType.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,p.TokenType.comma)&&e++),this.tokens.matches1AtIndex(e,p.TokenType.star)&&(e+=2,n.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,p.TokenType.braceL)){let n=this.getNamedImports(e+1);for(let s of(e=n.newIndex,n.namedImports))"default"===s.importedName?t.push(s.localName):o.push(s);}if(this.tokens.matchesContextualAtIndex(e,h.ContextualKeyword._from)&&e++,!this.tokens.matches1AtIndex(e,p.TokenType.string))throw Error("Expected string token at the end of import statement.");let s=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(s);r.defaultNames.push(...t),r.wildcardNames.push(...n),r.namedImports.push(...o),0===t.length&&0===n.length&&0===o.length&&(r.hasBareImport=!0);}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._var)||this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._let)||this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._function)||this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType._class)){let t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t);}else if(this.tokens.matches3AtIndex(e,p.TokenType._export,p.TokenType.name,p.TokenType._function)){let t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t);}else this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,p.TokenType._export,p.TokenType.star)&&this.preprocessExportStarAtIndex(e);}preprocessVarExportAtIndex(e){let t=0;for(let n=e+2;;n++)if(this.tokens.matches1AtIndex(n,p.TokenType.braceL)||this.tokens.matches1AtIndex(n,p.TokenType.dollarBraceL)||this.tokens.matches1AtIndex(n,p.TokenType.bracketL))t++;else if(this.tokens.matches1AtIndex(n,p.TokenType.braceR)||this.tokens.matches1AtIndex(n,p.TokenType.bracketR))t--;else if(0!==t||this.tokens.matches1AtIndex(n,p.TokenType.name)){if(this.tokens.matches1AtIndex(1,p.TokenType.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw Error("Expected = token with an end index.");n=e-1;}else{let e=this.tokens.tokens[n];if((0,a.isDeclaration)(e)){let e=this.tokens.identifierNameAtIndex(n);this.identifierReplacements.set(e,`exports.${e}`);}}}else break;}preprocessNamedExportAtIndex(e){e+=2;let{newIndex:t,namedImports:n}=this.getNamedImports(e);if(e=t,this.tokens.matchesContextualAtIndex(e,h.ContextualKeyword._from))e++;else{for(let{importedName:e,localName:t}of n)this.addExportBinding(e,t);return;}if(!this.tokens.matches1AtIndex(e,p.TokenType.string))throw Error("Expected string token at the end of import statement.");let o=this.tokens.stringValueAtIndex(e);this.getImportInfo(o).namedExports.push(...n);}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,p.TokenType._export,p.TokenType.star,p.TokenType._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,p.TokenType.string))throw Error("Expected string token at the end of star export statement.");let n=this.tokens.stringValueAtIndex(e),o=this.getImportInfo(n);null!==t?o.exportStarNames.push(t):o.hasStarExport=!0;}getNamedImports(e){let t=[];for(;;){if(this.tokens.matches1AtIndex(e,p.TokenType.braceR)){e++;break;}let n=(0,l.default)(this.tokens,e);if(e=n.endIndex,n.isType||t.push({importedName:n.leftName,localName:n.rightName}),this.tokens.matches2AtIndex(e,p.TokenType.comma,p.TokenType.braceR)){e+=2;break;}if(this.tokens.matches1AtIndex(e,p.TokenType.braceR)){e++;break;}if(this.tokens.matches1AtIndex(e,p.TokenType.comma))e++;else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`);}return{newIndex:e,namedImports:t};}getImportInfo(e){let t=this.importInfoByPath.get(e);if(t)return t;let n={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,n),n;}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t);}claimImportCode(e){let t=this.importsToReplace.get(e);return this.importsToReplace.set(e,""),t||"";}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null;}resolveExportBinding(e){let t=this.exportBindingsByLocalName.get(e);return t&&0!==t.length?t.map(e=>`exports.${e}`).join(" = "):null;}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()]);}}let d=n("5cdb5ce7").Buffer;var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=new Uint8Array(64),f=new Uint8Array(128);for(let e=0;e<m.length;e++){let t=m.charCodeAt(e);u[e]=t,f[t]=e;}function y(e,t,n){let o=t-n;o=o<0?-o<<1|1:o<<1;do{let t=31&o;(o>>>=5)>0&&(t|=32),e.write(u[t]);}while(o>0)return t;}var x="undefined"!=typeof TextDecoder?new TextDecoder:void 0!==d?{decode:e=>d.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t;}},I=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384);}write(e){let{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=x.decode(t),this.pos=0);}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+x.decode(e.subarray(0,n)):t;}},g=n("6e4a787b");r._(g);var _=class{constructor(){this._indexes={__proto__:null},this.array=[];}};function E(e,t){let n=e._indexes[t];if(void 0!==n)return n;let{array:o,_indexes:s}=e,r=o.push(t);return s[t]=r-1;}var v=class{constructor({file:e,sourceRoot:t}={}){this._names=new _,this._sources=new _,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new _;}},b=(e,t,n,o,s,r,i,a)=>(function(e,t,n,o,s,r,i,a,h){let{_mappings:p,_sources:c,_sourcesContent:l,_names:k}=t,T=function(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t];}(p,n),d=function(e,t){let n=e.length;for(let o=n-1;o>=0&&!(t>=e[o][0]);n=o--);return n;}(T,o);if(!s){if(e&&(0===d||1===T[d-1].length))return;return N(T,d,[o]);}C(r),C(i);let m=E(c,s),u=a?E(k,a):-1;if(m===l.length&&(l[m]=null!=h?h:null),!(e&&function(e,t,n,o,s,r){if(0===t)return!1;let i=e[t-1];return 1!==i.length&&n===i[1]&&o===i[2]&&s===i[3]&&r===(5===i.length?i[4]:-1);}(T,d,m,r,i,u)))return N(T,d,a?[o,m,r,i,u]:[o,m,r,i]);})(!0,e,t,n,o,s,r,i,a);function C(e){}function N(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n;}var A=n("b3514fe0");let w={require:`
2
- import {createRequire as CREATE_REQUIRE_NAME} from "module";
3
- const require = CREATE_REQUIRE_NAME(import.meta.url);
4
- `,interopRequireWildcard:`
5
- function interopRequireWildcard(obj) {
6
- if (obj && obj.__esModule) {
7
- return obj;
8
- } else {
9
- var newObj = {};
10
- if (obj != null) {
11
- for (var key in obj) {
12
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
13
- newObj[key] = obj[key];
14
- }
15
- }
16
- }
17
- newObj.default = obj;
18
- return newObj;
19
- }
20
- }
21
- `,interopRequireDefault:`
22
- function interopRequireDefault(obj) {
23
- return obj && obj.__esModule ? obj : { default: obj };
24
- }
25
- `,createNamedExportFrom:`
26
- function createNamedExportFrom(obj, localName, importedName) {
27
- Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});
28
- }
29
- `,createStarExport:`
30
- function createStarExport(obj) {
31
- Object.keys(obj)
32
- .filter((key) => key !== "default" && key !== "__esModule")
33
- .forEach((key) => {
34
- if (exports.hasOwnProperty(key)) {
35
- return;
36
- }
37
- Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});
38
- });
39
- }
40
- `,nullishCoalesce:`
41
- function nullishCoalesce(lhs, rhsFn) {
42
- if (lhs != null) {
43
- return lhs;
44
- } else {
45
- return rhsFn();
46
- }
47
- }
48
- `,asyncNullishCoalesce:`
49
- async function asyncNullishCoalesce(lhs, rhsFn) {
50
- if (lhs != null) {
51
- return lhs;
52
- } else {
53
- return await rhsFn();
54
- }
55
- }
56
- `,optionalChain:`
57
- function optionalChain(ops) {
58
- let lastAccessLHS = undefined;
59
- let value = ops[0];
60
- let i = 1;
61
- while (i < ops.length) {
62
- const op = ops[i];
63
- const fn = ops[i + 1];
64
- i += 2;
65
- if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
66
- return undefined;
67
- }
68
- if (op === 'access' || op === 'optionalAccess') {
69
- lastAccessLHS = value;
70
- value = fn(value);
71
- } else if (op === 'call' || op === 'optionalCall') {
72
- value = fn((...args) => value.call(lastAccessLHS, ...args));
73
- lastAccessLHS = undefined;
74
- }
75
- }
76
- return value;
77
- }
78
- `,asyncOptionalChain:`
79
- async function asyncOptionalChain(ops) {
80
- let lastAccessLHS = undefined;
81
- let value = ops[0];
82
- let i = 1;
83
- while (i < ops.length) {
84
- const op = ops[i];
85
- const fn = ops[i + 1];
86
- i += 2;
87
- if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
88
- return undefined;
89
- }
90
- if (op === 'access' || op === 'optionalAccess') {
91
- lastAccessLHS = value;
92
- value = await fn(value);
93
- } else if (op === 'call' || op === 'optionalCall') {
94
- value = await fn((...args) => value.call(lastAccessLHS, ...args));
95
- lastAccessLHS = undefined;
96
- }
97
- }
98
- return value;
99
- }
100
- `,optionalChainDelete:`
101
- function optionalChainDelete(ops) {
102
- const result = OPTIONAL_CHAIN_NAME(ops);
103
- return result == null ? true : result;
104
- }
105
- `,asyncOptionalChainDelete:`
106
- async function asyncOptionalChainDelete(ops) {
107
- const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
108
- return result == null ? true : result;
109
- }
110
- `};class L{__init(){this.helperNames={};}__init2(){this.createRequireName=null;}constructor(e){this.nameManager=e,L.prototype.__init.call(this),L.prototype.__init2.call(this);}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t),t;}emitHelpers(){let e="";for(let[t,n]of(this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain"),Object.entries(w))){let o=this.helperNames[t],s=n;"optionalChainDelete"===t?s=s.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):"asyncOptionalChainDelete"===t?s=s.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):"require"===t&&(null===this.createRequireName&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),s=s.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),o&&(e+=" "+s.replace(t,o).replace(/\s+/g," ").trim());}return e;}}function R(e,t,n){(function(e,t){for(let n of e.tokens)if(n.type===p.TokenType.name&&!n.isType&&(0,a.isNonTopLevelDeclaration)(n)&&t.has(e.identifierNameForToken(n)))return!0;return!1;})(e,n)&&function(e,t,n){let o=[],s=t.length-1;for(let r=e.tokens.length-1;;r--){for(;o.length>0&&o[o.length-1].startTokenIndex===r+1;)o.pop();for(;s>=0&&t[s].endTokenIndex===r+1;)o.push(t[s]),s--;if(r<0)break;let i=e.tokens[r],h=e.identifierNameForToken(i);if(o.length>1&&!i.isType&&i.type===p.TokenType.name&&n.has(h)){if((0,a.isBlockScopedDeclaration)(i))$(o[o.length-1],e,h);else if((0,a.isFunctionScopedDeclaration)(i)){let t=o.length-1;for(;t>0&&!o[t].isFunctionScope;)t--;if(t<0)throw Error("Did not find parent function scope.");$(o[t],e,h);}}}if(o.length>0)throw Error("Expected empty scope stack after processing file.");}(e,t,n);}function $(e,t,n){for(let o=e.startTokenIndex;o<e.endTokenIndex;o++){let e=t.tokens[o];(e.type===p.TokenType.name||e.type===p.TokenType.jsxName)&&t.identifierNameForToken(e)===n&&(e.shadowsGlobal=!0);}}class S{__init(){this.usedNames=new Set;}constructor(e,t){S.prototype.__init.call(this),this.usedNames=new Set(function(e,t){let n=[];for(let o of t)o.type===p.TokenType.name&&n.push(e.slice(o.start,o.end));return n;}(e,t));}claimFreeName(e){let t=this.findFreeName(e);return this.usedNames.add(t),t;}findFreeName(e){if(!this.usedNames.has(e))return e;let t=2;for(;this.usedNames.has(e+String(t));)t++;return e+String(t);}}var M=n("eb08a04a"),P=i._(M);let D=P.union(P.lit("jsx"),P.lit("typescript"),P.lit("flow"),P.lit("imports"),P.lit("react-hot-loader"),P.lit("jest")),F=P.iface([],{compiledFilename:"string"}),O=P.iface([],{transforms:P.array("Transform"),disableESTransforms:P.opt("boolean"),jsxRuntime:P.opt(P.union(P.lit("classic"),P.lit("automatic"),P.lit("preserve"))),production:P.opt("boolean"),jsxImportSource:P.opt("string"),jsxPragma:P.opt("string"),jsxFragmentPragma:P.opt("string"),keepUnusedImports:P.opt("boolean"),preserveDynamicImport:P.opt("boolean"),injectCreateRequireForImportRequire:P.opt("boolean"),enableLegacyTypeScriptModuleInterop:P.opt("boolean"),enableLegacyBabel5ModuleInterop:P.opt("boolean"),sourceMapOptions:P.opt("SourceMapOptions"),filePath:P.opt("string")}),{Options:j}=(0,P.createCheckers)({Transform:D,SourceMapOptions:F,Options:O});var q=n("85f5ce1a");class B{__init(){this.resultCode="";}__init2(){this.resultMappings=Array(this.tokens.length);}__init3(){this.tokenIndex=0;}constructor(e,t,n,o,s){this.code=e,this.tokens=t,this.isFlowEnabled=n,this.disableESTransforms=o,this.helperManager=s,B.prototype.__init.call(this),B.prototype.__init2.call(this),B.prototype.__init3.call(this);}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex};}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex;}dangerouslyGetAndRemoveCodeSinceSnapshot(e){let t=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,t;}reset(){this.resultCode="",this.resultMappings=Array(this.tokens.length),this.tokenIndex=0;}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,p.TokenType.name)&&this.tokens[e].contextualKeyword===t;}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e]);}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e));}identifierName(){return this.identifierNameForToken(this.currentToken());}identifierNameForToken(e){return this.code.slice(e.start,e.end);}rawCodeForToken(e){return this.code.slice(e.start,e.end);}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e]);}stringValue(){return this.stringValueForToken(this.currentToken());}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1);}matches1AtIndex(e,t){return this.tokens[e].type===t;}matches2AtIndex(e,t,n){return this.tokens[e].type===t&&this.tokens[e+1].type===n;}matches3AtIndex(e,t,n,o){return this.tokens[e].type===t&&this.tokens[e+1].type===n&&this.tokens[e+2].type===o;}matches1(e){return this.tokens[this.tokenIndex].type===e;}matches2(e,t){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t;}matches3(e,t,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n;}matches4(e,t,n,o){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===o;}matches5(e,t,n,o,s){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===o&&this.tokens[this.tokenIndex+4].type===s;}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e);}matchesContextIdAndLabel(e,t){return this.matches1(e)&&this.currentToken().contextId===t;}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,"")),e;}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++;}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++;}removeInitialToken(){this.replaceToken("");}removeToken(){this.replaceTokenTrimmingLeftWhitespace("");}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(p.TokenType.braceL))e++;else if(this.matches1(p.TokenType.braceR)){if(0===e)return;e--;}this.removeToken();}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw Error(`Expected token ${e}`);this.copyToken();}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++;}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++;}appendTokenPrefix(){let e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=function(e){let t=e.currentIndex(),n=0,o=e.currentToken();do{let s=e.tokens[t];if(s.isOptionalChainStart&&n++,s.isOptionalChainEnd&&n--,n+=s.numNullishCoalesceStarts,n-=s.numNullishCoalesceEnds,s.contextualKeyword===h.ContextualKeyword._await&&null==s.identifierRole&&s.scopeDepth===o.scopeDepth)return!0;t+=1;}while(n>0&&t<e.tokens.length)return!1;}(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let t=0;t<e.numNullishCoalesceStarts;t++)e.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===p.TokenType._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([");}}appendTokenSuffix(){let e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t<e.numNullishCoalesceEnds;t++)this.resultCode+="))";}appendCode(e){this.resultCode+=e;}currentToken(){return this.tokens[this.tokenIndex];}currentTokenCode(){let e=this.currentToken();return this.code.slice(e.start,e.end);}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e];}currentIndex(){return this.tokenIndex;}nextToken(){if(this.tokenIndex===this.tokens.length)throw Error("Unexpectedly reached end of input.");this.tokenIndex++;}previousToken(){this.tokenIndex--;}finish(){if(this.tokenIndex!==this.tokens.length)throw Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings};}isAtEnd(){return this.tokenIndex===this.tokens.length;}}function H(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;K(e.tokenAtRelativeIndex(-1));)e.previousToken();}function W(e){let t=[];e.nextToken();let n=e.currentToken().contextId;if(null==n)throw Error("Expected context ID on open-paren starting constructor params.");for(;!e.matchesContextIdAndLabel(p.TokenType.parenR,n);)if(e.currentToken().contextId===n){if(e.nextToken(),K(e.currentToken())){for(e.nextToken();K(e.currentToken());)e.nextToken();let n=e.currentToken();if(n.type!==p.TokenType.name)throw Error("Expected identifier after access modifiers in constructor arg.");let o=e.identifierNameForToken(n);t.push(`this.${o} = ${o}`);}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let o=e.currentIndex(),s=!1;for(;!e.matchesContextIdAndLabel(p.TokenType.braceR,n);){if(!s&&e.matches2(p.TokenType._super,p.TokenType.parenL)){e.nextToken();let t=e.currentToken().contextId;if(null==t)throw Error("Expected a context ID on the super call");for(;!e.matchesContextIdAndLabel(p.TokenType.parenR,t);)e.nextToken();o=e.currentIndex(),s=!0;}e.nextToken();}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:o};}function K(e){return[p.TokenType._async,p.TokenType._get,p.TokenType._set,p.TokenType.plus,p.TokenType.minus,p.TokenType._readonly,p.TokenType._static,p.TokenType._public,p.TokenType._private,p.TokenType._protected,p.TokenType._override,p.TokenType._abstract,p.TokenType.star,p.TokenType._declare,p.TokenType.hash].includes(e.type);}function U(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(p.TokenType.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(p.TokenType.dot);)e.removeToken(),e.removeToken();}let V={typeDeclarations:new Set,valueDeclarations:new Set};function G(e){let t=new Set,n=new Set;for(let o=0;o<e.tokens.length;o++){let s=e.tokens[o];s.type===p.TokenType.name&&(0,a.isTopLevelDeclaration)(s)&&(s.isType?t.add(e.identifierNameForToken(s)):n.add(e.identifierNameForToken(s)));}return{typeDeclarations:t,valueDeclarations:n};}function z(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,p.TokenType.braceR);)t++;return e.matchesContextualAtIndex(t+1,h.ContextualKeyword._from)&&e.matches1AtIndex(t+2,p.TokenType.string);}function J(e){(e.matches2(p.TokenType._with,p.TokenType.braceL)||e.matches2(p.TokenType.name,p.TokenType.braceL)&&e.matchesContextual(h.ContextualKeyword._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken());}function Y(e,t,n,o){if(!e||t)return!1;let s=n.currentToken();if(null==s.rhsEndIndex)throw Error("Expected non-null rhsEndIndex on export token.");let r=s.rhsEndIndex-n.currentIndex();if(3!==r&&!(4===r&&n.matches1AtIndex(s.rhsEndIndex-1,p.TokenType.semi)))return!1;let i=n.tokenAtRelativeIndex(2);if(i.type!==p.TokenType.name)return!1;let a=n.identifierNameForToken(i);return o.typeDeclarations.has(a)&&!o.valueDeclarations.has(a);}var Q=n("5fffb517"),X=r._(Q);class Z extends X.default{__init(){this.hadExport=!1;}__init2(){this.hadNamedExport=!1;}__init3(){this.hadDefaultExport=!1;}constructor(e,t,n,o,s,r,i,a,h,p,c,l){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.nameManager=o,this.helperManager=s,this.reactHotLoaderTransformer=r,this.enableLegacyBabel5ModuleInterop=i,this.enableLegacyTypeScriptModuleInterop=a,this.isTypeScriptTransformEnabled=h,this.isFlowTransformEnabled=p,this.preserveDynamicImport=c,this.keepUnusedImports=l,Z.prototype.__init.call(this),Z.prototype.__init2.call(this),Z.prototype.__init3.call(this),this.declarationInfo=h?G(t):V;}getPrefixCode(){let e="";return this.hadExport&&(e+='Object.defineProperty(exports, "__esModule", {value: true});'),e;}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?"\nmodule.exports = exports.default;\n":"";}process(){return this.tokens.matches3(p.TokenType._import,p.TokenType.name,p.TokenType.eq)?this.processImportEquals():this.tokens.matches1(p.TokenType._import)?(this.processImport(),!0):this.tokens.matches2(p.TokenType._export,p.TokenType.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(p.TokenType._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):!!(this.tokens.matches2(p.TokenType.name,p.TokenType.postIncDec)&&this.processPostIncDec())||(this.tokens.matches1(p.TokenType.name)||this.tokens.matches1(p.TokenType.jsxName)?this.processIdentifier():this.tokens.matches1(p.TokenType.eq)?this.processAssignment():this.tokens.matches1(p.TokenType.assign)?this.processComplexAssignment():!!this.tokens.matches1(p.TokenType.preIncDec)&&this.processPreIncDec());}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?U(this.tokens):this.tokens.replaceToken("const"),!0;}processImport(){if(this.tokens.matches2(p.TokenType._import,p.TokenType.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return;}let e=this.enableLegacyTypeScriptModuleInterop?"":`${this.helperManager.getHelperName("interopRequireWildcard")}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${e}require`);let t=this.tokens.currentToken().contextId;if(null==t)throw Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(p.TokenType.parenR,t);)this.rootTransformer.processToken();this.tokens.replaceToken(e?")))":"))");return;}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e));}J(this.tokens),this.tokens.matches1(p.TokenType.semi)&&this.tokens.removeToken();}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(h.ContextualKeyword._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,p.TokenType.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,h.ContextualKeyword._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(p.TokenType.name)||this.tokens.matches1(p.TokenType.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(p.TokenType.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(p.TokenType.string);)(!e&&this.tokens.matches1(p.TokenType.braceL)||this.tokens.matches1(p.TokenType.comma))&&(this.tokens.removeToken(),this.tokens.matches1(p.TokenType.braceR)||(t=!0),(this.tokens.matches2(p.TokenType.name,p.TokenType.comma)||this.tokens.matches2(p.TokenType.name,p.TokenType.braceR)||this.tokens.matches4(p.TokenType.name,p.TokenType.name,p.TokenType.name,p.TokenType.comma)||this.tokens.matches4(p.TokenType.name,p.TokenType.name,p.TokenType.name,p.TokenType.braceR))&&(e=!0)),this.tokens.removeToken();return!this.keepUnusedImports&&(this.isTypeScriptTransformEnabled?!e:!!this.isFlowTransformEnabled&&t&&!e);}removeRemainingImport(){for(;!this.tokens.matches1(p.TokenType.string);)this.tokens.removeToken();}processIdentifier(){let e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===a.IdentifierRole.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==a.IdentifierRole.Access)return!1;let t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let n=this.tokens.currentIndex()+1;for(;n<this.tokens.tokens.length&&this.tokens.tokens[n].type===p.TokenType.parenR;)n++;return this.tokens.tokens[n].type===p.TokenType.parenL?this.tokens.tokenAtRelativeIndex(1).type===p.TokenType.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==p.TokenType._new?(this.tokens.replaceToken(`${t}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(p.TokenType.parenR)):this.tokens.replaceToken(`(0, ${t})`):this.tokens.replaceToken(t),!0;}processObjectShorthand(){let e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return!!t&&(this.tokens.replaceToken(`${e}: ${t}`),!0);}processExport(){if(this.tokens.matches2(p.TokenType._export,p.TokenType._enum)||this.tokens.matches3(p.TokenType._export,p.TokenType._const,p.TokenType._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(p.TokenType._export,p.TokenType._default))return this.tokens.matches3(p.TokenType._export,p.TokenType._default,p.TokenType._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(p.TokenType._export,p.TokenType.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(p.TokenType._export,p.TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,h.ContextualKeyword._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(p.TokenType.braceL)){for(;!this.tokens.matches1(p.TokenType.braceR);)this.tokens.removeToken();this.tokens.removeToken();}else this.tokens.removeToken(),this.tokens.matches1(p.TokenType._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(h.ContextualKeyword._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,p.TokenType.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),J(this.tokens)),!0;}if(this.hadNamedExport=!0,this.tokens.matches2(p.TokenType._export,p.TokenType._var)||this.tokens.matches2(p.TokenType._export,p.TokenType._let)||this.tokens.matches2(p.TokenType._export,p.TokenType._const))return this.processExportVar(),!0;if(this.tokens.matches2(p.TokenType._export,p.TokenType._function)||this.tokens.matches3(p.TokenType._export,p.TokenType.name,p.TokenType._function))return this.processExportFunction(),!0;if(this.tokens.matches2(p.TokenType._export,p.TokenType._class)||this.tokens.matches3(p.TokenType._export,p.TokenType._abstract,p.TokenType._class)||this.tokens.matches2(p.TokenType._export,p.TokenType.at))return this.processExportClass(),!0;if(this.tokens.matches2(p.TokenType._export,p.TokenType.star))return this.processExportStar(),!0;throw Error("Unrecognized export syntax.");}processAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==p.TokenType.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,p.TokenType.dot)||e>=2&&[p.TokenType._var,p.TokenType._let,p.TokenType._const].includes(this.tokens.tokens[e-2].type))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!n&&(this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),!0);}processComplexAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==p.TokenType.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,p.TokenType.dot))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!n&&(this.tokens.appendCode(` = ${n}`),this.tokens.copyToken(),!0);}processPreIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==p.TokenType.name||t.shadowsGlobal||e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,p.TokenType.dot)||this.tokens.matches1AtIndex(e+2,p.TokenType.bracketL)||this.tokens.matches1AtIndex(e+2,p.TokenType.parenL)))return!1;let n=this.tokens.identifierNameForToken(t),o=this.importProcessor.resolveExportBinding(n);return!!o&&(this.tokens.appendCode(`${o} = `),this.tokens.copyToken(),!0);}processPostIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e],n=this.tokens.tokens[e+1];if(t.type!==p.TokenType.name||t.shadowsGlobal||e>=1&&this.tokens.matches1AtIndex(e-1,p.TokenType.dot))return!1;let o=this.tokens.identifierNameForToken(t),s=this.importProcessor.resolveExportBinding(o);if(!s)return!1;let r=this.tokens.rawCodeForToken(n),i=this.importProcessor.getIdentifierReplacement(o)||o;if("++"===r)this.tokens.replaceToken(`(${i} = ${s} = ${i} + 1, ${i} - 1)`);else if("--"===r)this.tokens.replaceToken(`(${i} = ${s} = ${i} - 1, ${i} + 1)`);else throw Error(`Unexpected operator: ${r}`);return this.tokens.removeToken(),!0;}processExportDefault(){let e=!0;if(this.tokens.matches4(p.TokenType._export,p.TokenType._default,p.TokenType._function,p.TokenType.name)||this.tokens.matches5(p.TokenType._export,p.TokenType._default,p.TokenType.name,p.TokenType._function,p.TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,h.ContextualKeyword._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`);}else if(this.tokens.matches4(p.TokenType._export,p.TokenType._default,p.TokenType._class,p.TokenType.name)||this.tokens.matches5(p.TokenType._export,p.TokenType._default,p.TokenType._abstract,p.TokenType._class,p.TokenType.name)||this.tokens.matches3(p.TokenType._export,p.TokenType._default,p.TokenType.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(p.TokenType._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`);}else if(Y(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e);}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =");e&&(this.hadDefaultExport=!0);}copyDecorators(){for(;this.tokens.matches1(p.TokenType.at);)if(this.tokens.copyToken(),this.tokens.matches1(p.TokenType.parenL))this.tokens.copyExpectedToken(p.TokenType.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(p.TokenType.parenR);else{for(this.tokens.copyExpectedToken(p.TokenType.name);this.tokens.matches1(p.TokenType.dot);)this.tokens.copyExpectedToken(p.TokenType.dot),this.tokens.copyExpectedToken(p.TokenType.name);this.tokens.matches1(p.TokenType.parenL)&&(this.tokens.copyExpectedToken(p.TokenType.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(p.TokenType.parenR));}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar();}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,p.TokenType.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,p.TokenType.eq);}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();let e=this.tokens.identifierName();for(;!this.tokens.matches1(p.TokenType.eq);)this.rootTransformer.processToken();let t=this.tokens.currentToken().rhsEndIndex;if(null==t)throw Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`);}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.matches1(p.TokenType.braceL);e&&this.tokens.appendCode("(");let t=0;for(;;)if(this.tokens.matches1(p.TokenType.braceL)||this.tokens.matches1(p.TokenType.dollarBraceL)||this.tokens.matches1(p.TokenType.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(p.TokenType.braceR)||this.tokens.matches1(p.TokenType.bracketR))t--,this.tokens.copyToken();else if(0!==t||this.tokens.matches1(p.TokenType.name)||this.tokens.currentToken().isType){if(this.tokens.matches1(p.TokenType.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();}else{let e=this.tokens.currentToken();if((0,a.isDeclaration)(e)){let t=this.tokens.identifierName(),n=this.importProcessor.getIdentifierReplacement(t);if(null===n)throw Error(`Expected a replacement for ${t} in \`export var\` syntax.`);(0,a.isObjectShorthandDeclaration)(e)&&(n=`${t}: ${n}`),this.tokens.replaceToken(n);}else this.rootTransformer.processToken();}}else break;if(e){let e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(")");}}processExportFunction(){this.tokens.replaceToken("");let e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`);}processNamedFunction(){if(this.tokens.matches1(p.TokenType._function))this.tokens.copyToken();else if(this.tokens.matches2(p.TokenType.name,p.TokenType._function)){if(!this.tokens.matchesContextual(h.ContextualKeyword._async))throw Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken();}if(this.tokens.matches1(p.TokenType.star)&&this.tokens.copyToken(),!this.tokens.matches1(p.TokenType.name))throw Error("Expected identifier for exported function name.");let e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(p.TokenType.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(p.TokenType.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(p.TokenType.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(p.TokenType.braceR),e;}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(p.TokenType._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`);}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=z(this.tokens),t=[];for(;;){if(this.tokens.matches1(p.TokenType.braceR)){this.tokens.removeToken();break;}let n=(0,l.default)(this.tokens);for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();if(!(n.isType||!e&&this.shouldElideExportedIdentifier(n.leftName))){let e=n.rightName;"default"===e?this.hadDefaultExport=!0:this.hadNamedExport=!0;let o=n.leftName,s=this.importProcessor.getIdentifierReplacement(o);t.push(`exports.${e} = ${s||o};`);}if(this.tokens.matches1(p.TokenType.braceR)){this.tokens.removeToken();break;}if(this.tokens.matches2(p.TokenType.comma,p.TokenType.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break;}if(this.tokens.matches1(p.TokenType.comma))this.tokens.removeToken();else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`);}if(this.tokens.matchesContextual(h.ContextualKeyword._from)){this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),J(this.tokens);}else this.tokens.appendCode(t.join(" "));this.tokens.matches1(p.TokenType.semi)&&this.tokens.removeToken();}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(p.TokenType.string);)this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),J(this.tokens),this.tokens.matches1(p.TokenType.semi)&&this.tokens.removeToken();}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e);}}class ee extends X.default{constructor(e,t,n,o,s,r,i,a){super(),this.tokens=e,this.nameManager=t,this.helperManager=n,this.reactHotLoaderTransformer=o,this.isTypeScriptTransformEnabled=s,this.isFlowTransformEnabled=r,this.keepUnusedImports=i,this.nonTypeIdentifiers=s&&!i?(0,k.getNonTypeIdentifiers)(e,a):new Set,this.declarationInfo=s&&!i?G(e):V,this.injectCreateRequireForImportRequire=!!a.injectCreateRequireForImportRequire;}process(){if(this.tokens.matches3(p.TokenType._import,p.TokenType.name,p.TokenType.eq))return this.processImportEquals();if(this.tokens.matches4(p.TokenType._import,p.TokenType.name,p.TokenType.name,p.TokenType.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,h.ContextualKeyword._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0;}if(this.tokens.matches2(p.TokenType._export,p.TokenType.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(p.TokenType._export,p.TokenType._import,p.TokenType.name,p.TokenType.name,p.TokenType.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,h.ContextualKeyword._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0;}if(this.tokens.matches1(p.TokenType._import))return this.processImport();if(this.tokens.matches2(p.TokenType._export,p.TokenType._default))return this.processExportDefault();if(this.tokens.matches2(p.TokenType._export,p.TokenType.braceL))return this.processNamedExports();if(this.tokens.matches2(p.TokenType._export,p.TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,h.ContextualKeyword._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(p.TokenType.braceL)){for(;!this.tokens.matches1(p.TokenType.braceR);)this.tokens.removeToken();this.tokens.removeToken();}else this.tokens.removeToken(),this.tokens.matches1(p.TokenType._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(h.ContextualKeyword._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,p.TokenType.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),J(this.tokens)),!0;}return!1;}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?U(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0;}processImport(){if(this.tokens.matches2(p.TokenType._import,p.TokenType.parenL))return!1;let e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(p.TokenType.string);)this.tokens.removeToken();this.tokens.removeToken(),J(this.tokens),this.tokens.matches1(p.TokenType.semi)&&this.tokens.removeToken();}return!0;}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(p.TokenType._import),this.tokens.matchesContextual(h.ContextualKeyword._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,p.TokenType.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,h.ContextualKeyword._from))return!0;if(this.tokens.matches1(p.TokenType.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(h.ContextualKeyword._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,h.ContextualKeyword._from)&&this.tokens.copyToken();let e=!1,t=!1,n=!1;if(this.tokens.matches1(p.TokenType.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(p.TokenType.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(p.TokenType.comma)&&(n=!0,this.tokens.removeToken()))),this.tokens.matches1(p.TokenType.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(n&&this.tokens.appendCode(","),e=!0,this.tokens.copyExpectedToken(p.TokenType.star),this.tokens.copyExpectedToken(p.TokenType.name),this.tokens.copyExpectedToken(p.TokenType.name));else if(this.tokens.matches1(p.TokenType.braceL)){for(n&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(p.TokenType.braceR);){t=!0;let n=(0,l.default)(this.tokens);if(n.isType||this.shouldAutomaticallyElideImportedName(n.rightName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(p.TokenType.comma)&&this.tokens.removeToken();}else{for(e=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(p.TokenType.comma)&&this.tokens.copyToken();}}this.tokens.copyExpectedToken(p.TokenType.braceR);}return!this.keepUnusedImports&&(this.isTypeScriptTransformEnabled?!e:!!this.isFlowTransformEnabled&&t&&!e);}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e);}processExportDefault(){if(Y(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(p.TokenType._export,p.TokenType._default,p.TokenType._function,p.TokenType.name)||this.tokens.matches5(p.TokenType._export,p.TokenType._default,p.TokenType.name,p.TokenType._function,p.TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,h.ContextualKeyword._async)||this.tokens.matches4(p.TokenType._export,p.TokenType._default,p.TokenType._class,p.TokenType.name)||this.tokens.matches5(p.TokenType._export,p.TokenType._default,p.TokenType._abstract,p.TokenType._class,p.TokenType.name))&&this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${e}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e),!0;}return!1;}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(p.TokenType._export),this.tokens.copyExpectedToken(p.TokenType.braceL);let e=z(this.tokens),t=!1;for(;!this.tokens.matches1(p.TokenType.braceR);){let n=(0,l.default)(this.tokens);if(n.isType||!e&&this.shouldElideExportedName(n.leftName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(p.TokenType.comma)&&this.tokens.removeToken();}else{for(t=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(p.TokenType.comma)&&this.tokens.copyToken();}}return this.tokens.copyExpectedToken(p.TokenType.braceR),this.keepUnusedImports||!e||t||(this.tokens.removeToken(),this.tokens.removeToken(),J(this.tokens)),!0;}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e);}}class et extends X.default{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n;}process(){return!!(this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange())||(this.tokens.matches1(p.TokenType._enum)?(this.processEnum(),!0):this.tokens.matches2(p.TokenType._export,p.TokenType._enum)?(this.processNamedExportEnum(),!0):!!this.tokens.matches3(p.TokenType._export,p.TokenType._default,p.TokenType._enum)&&(this.processDefaultExportEnum(),!0));}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`);}else this.tokens.copyToken(),this.processEnum();}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`);}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(p.TokenType.name);let e=!1;this.tokens.matchesContextual(h.ContextualKeyword._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(h.ContextualKeyword._symbol),this.tokens.removeToken());let t=this.tokens.matches3(p.TokenType.braceL,p.TokenType.name,p.TokenType.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');let n=!e&&!t;for(this.tokens.replaceTokenTrimmingLeftWhitespace(n?".Mirrored([":"({");!this.tokens.matches1(p.TokenType.braceR);){if(this.tokens.matches1(p.TokenType.ellipsis)){this.tokens.removeToken();break;}this.processEnumElement(e,t),this.tokens.matches1(p.TokenType.comma)&&this.tokens.copyToken();}this.tokens.replaceToken(n?"]);":"});");}processEnumElement(e,t){if(e){let e=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${e}")`);}else t?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`);}}let en="jest",eo=["mock","unmock","enableAutomock","disableAutomock"];class es extends X.default{__init(){this.hoistedFunctionNames=[];}constructor(e,t,n,o){super(),this.rootTransformer=e,this.tokens=t,this.nameManager=n,this.importProcessor=o,es.prototype.__init.call(this);}process(){return!!(0===this.tokens.currentToken().scopeDepth&&this.tokens.matches4(p.TokenType.name,p.TokenType.dot,p.TokenType.name,p.TokenType.parenL))&&this.tokens.identifierName()===en&&!function(e){let t;let n=e[0],o=1;for(;o<e.length;){let s=e[o],r=e[o+1];if(o+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=r(n)):("call"===s||"optionalCall"===s)&&(n=r((...e)=>n.call(t,...e)),t=void 0);}return n;}([this,"access",e=>e.importProcessor,"optionalAccess",e=>e.getGlobalNames,"call",e=>e(),"optionalAccess",e=>e.has,"call",e=>e(en)])&&this.extractHoistedCalls();}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(""):"";}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(p.TokenType.dot,p.TokenType.name,p.TokenType.parenL);){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(eo.includes(t)){let t=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${en}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(p.TokenType.parenR),this.tokens.appendCode(";}"),e=!1;}else e?this.tokens.copyToken():this.tokens.replaceToken(`${en}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(p.TokenType.parenR),e=!0;}return!0;}}var er=n("590e192f"),ei=r._(er);class ea extends X.default{constructor(e){super(),this.tokens=e;}process(){if(this.tokens.matches1(p.TokenType.num)){let e=this.tokens.currentTokenCode();if(e.includes("_"))return this.tokens.replaceToken(e.replace(/_/g,"")),!0;}return!1;}}class eh extends X.default{constructor(e,t){super(),this.tokens=e,this.nameManager=t;}process(){return!!this.tokens.matches2(p.TokenType._catch,p.TokenType.braceL)&&(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0);}}class ep extends X.default{constructor(e,t){super(),this.tokens=e,this.nameManager=t;}process(){if(this.tokens.matches1(p.TokenType.nullishCoalescing)){let e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0;}if(this.tokens.matches1(p.TokenType._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;let e=this.tokens.currentToken().subscriptStartIndex;if(null!=e&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==p.TokenType._super){let t;let n=this.nameManager.claimFreeName("_");if(t=e>0&&this.tokens.matches1AtIndex(e-1,p.TokenType._delete)&&this.isLastSubscriptInChain()?`${n} => delete ${n}`:`${n} => ${n}`,this.tokens.tokens[e].isAsyncOperation&&(t=`async ${t}`),this.tokens.matches2(p.TokenType.questionDot,p.TokenType.parenL)||this.tokens.matches2(p.TokenType.questionDot,p.TokenType.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${t}`);else if(this.tokens.matches2(p.TokenType.questionDot,p.TokenType.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${t}`);else if(this.tokens.matches1(p.TokenType.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${t}.`);else if(this.tokens.matches1(p.TokenType.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${t}.`);else if(this.tokens.matches1(p.TokenType.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${t}[`);else if(this.tokens.matches1(p.TokenType.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${t}(`);else throw Error("Unexpected subscript operator in optional chain.");return!0;}return!1;}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(0===e&&null!=this.tokens.tokens[t].subscriptStartIndex)return!1;}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(0===e&&null!=this.tokens.tokens[t].subscriptStartIndex)return this.tokens.tokens[t-1].type===p.TokenType._super;t--;}}}class ec extends X.default{constructor(e,t,n,o){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.options=o;}process(){let e=this.tokens.currentIndex();if("createReactClass"===this.tokens.identifierName()){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0;}if(this.tokens.matches3(p.TokenType.name,p.TokenType.dot,p.TokenType.name)&&"React"===this.tokens.identifierName()&&"createClass"===this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return t?this.tokens.replaceToken(t):this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0;}return!1;}tryProcessCreateClassCall(e){let t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(p.TokenType.parenL),this.tokens.copyExpectedToken(p.TokenType.braceL),this.tokens.appendCode(`displayName: '${t}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(p.TokenType.braceR),this.tokens.copyExpectedToken(p.TokenType.parenR));}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,p.TokenType.name,p.TokenType.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===a.IdentifierRole.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,p.TokenType._export,p.TokenType._default)?this.getDisplayNameFromFilename():null;}getDisplayNameFromFilename(){let e=(this.options.filePath||"unknown").split("/"),t=e[e.length-1],n=t.lastIndexOf("."),o=-1===n?t:t.slice(0,n);return"index"===o&&e[e.length-2]?e[e.length-2]:o;}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(p.TokenType.parenL,p.TokenType.braceL))return!1;let t=e+1,n=this.tokens.tokens[t].contextId;if(null==n)throw Error("Expected non-null context ID on object open-brace.");for(;e<this.tokens.tokens.length;e++){let t=this.tokens.tokens[e];if(t.type===p.TokenType.braceR&&t.contextId===n){e++;break;}if("displayName"===this.tokens.identifierNameAtIndex(e)&&this.tokens.tokens[e].identifierRole===a.IdentifierRole.ObjectKey&&t.contextId===n)return!1;}if(e===this.tokens.tokens.length)throw Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(e,p.TokenType.parenR)||this.tokens.matches2AtIndex(e,p.TokenType.comma,p.TokenType.parenR);}}class el extends X.default{__init(){this.extractedDefaultExportName=null;}constructor(e,t){super(),this.tokens=e,this.filePath=t,el.prototype.__init.call(this);}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e;}getPrefixCode(){return`
111
- (function () {
112
- var enterModule = require('react-hot-loader').enterModule;
113
- enterModule && enterModule(module);
114
- })();`.replace(/\s+/g," ").trim();}getSuffixCode(){let e=new Set;for(let t of this.tokens.tokens)!t.isType&&(0,a.isTopLevelDeclaration)(t)&&t.identifierRole!==a.IdentifierRole.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));let t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`
115
- ;(function () {
116
- var reactHotLoader = require('react-hot-loader').default;
117
- var leaveModule = require('react-hot-loader').leaveModule;
118
- if (!reactHotLoader) {
119
- return;
120
- }
121
- ${t.map(({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||"")});`).join("\n")}
122
- leaveModule(module);
123
- })();`;}process(){return!1;}}var ek=n("47796fa1");let eT=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function ed(e){if(0===e.length||!ek.IS_IDENTIFIER_START[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!ek.IS_IDENTIFIER_CHAR[e.charCodeAt(t)])return!1;return!eT.has(e);}class em extends X.default{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n;}process(){return!!(this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange())||(this.tokens.matches1(p.TokenType._public)||this.tokens.matches1(p.TokenType._protected)||this.tokens.matches1(p.TokenType._private)||this.tokens.matches1(p.TokenType._abstract)||this.tokens.matches1(p.TokenType._readonly)||this.tokens.matches1(p.TokenType._override)||this.tokens.matches1(p.TokenType.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(p.TokenType._enum)||this.tokens.matches2(p.TokenType._const,p.TokenType._enum)?(this.processEnum(),!0):!!(this.tokens.matches2(p.TokenType._export,p.TokenType._enum)||this.tokens.matches3(p.TokenType._export,p.TokenType._const,p.TokenType._enum))&&(this.processEnum(!0),!0));}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(p.TokenType._const)||this.tokens.matches1(p.TokenType._enum);)this.tokens.removeToken();let t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${t}; (function (${t})`),this.tokens.copyExpectedToken(p.TokenType.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(p.TokenType.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${t} || (exports.${t} = ${t} = {}));`):this.tokens.appendCode(`)(${t} || (${t} = {}));`);}processEnumBody(e){let t=null;for(;!this.tokens.matches1(p.TokenType.braceR);){let{nameStringCode:n,variableName:o}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(p.TokenType.eq,p.TokenType.string,p.TokenType.comma)||this.tokens.matches3(p.TokenType.eq,p.TokenType.string,p.TokenType.braceR)?this.processStringLiteralEnumMember(e,n,o):this.tokens.matches1(p.TokenType.eq)?this.processExplicitValueEnumMember(e,n,o):this.processImplicitValueEnumMember(e,n,o,t),this.tokens.matches1(p.TokenType.comma)&&this.tokens.removeToken(),t=null!=o?o:`${e}[${n}]`;}}extractEnumKeyInfo(e){if(e.type===p.TokenType.name){let t=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${t}"`,variableName:ed(t)?t:null};}if(e.type===p.TokenType.string){let t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:ed(t)?t:null};}throw Error("Expected name or string at beginning of enum element.");}processStringLiteralEnumMember(e,t,n){null!=n?(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${t}] = ${n};`)):(this.tokens.appendCode(`${e}[${t}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"));}processExplicitValueEnumMember(e,t,n){let o=this.tokens.currentToken().rhsEndIndex;if(null==o)throw Error("Expected rhsEndIndex on enum assign.");if(null!=n){for(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken();this.tokens.currentIndex()<o;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${t}] = ${n}] = ${t};`);}else{for(this.tokens.appendCode(`${e}[${e}[${t}]`),this.tokens.copyToken();this.tokens.currentIndex()<o;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${t};`);}}processImplicitValueEnumMember(e,t,n,o){let s=null!=o?`${o} + 1`:"0";null!=n&&(this.tokens.appendCode(`const ${n} = ${s}; `),s=n),this.tokens.appendCode(`${e}[${e}[${t}] = ${s}] = ${t};`);}}class eu{__init(){this.transformers=[];}__init2(){this.generatedVariables=[];}constructor(e,t,n,o){eu.prototype.__init.call(this),eu.prototype.__init2.call(this),this.nameManager=e.nameManager,this.helperManager=e.helperManager;let{tokenProcessor:s,importProcessor:r}=e;this.tokens=s,this.isImportsTransformEnabled=t.includes("imports"),this.isReactHotLoaderTransformEnabled=t.includes("react-hot-loader"),this.disableESTransforms=!!o.disableESTransforms,o.disableESTransforms||(this.transformers.push(new ep(s,this.nameManager)),this.transformers.push(new ea(s)),this.transformers.push(new eh(s,this.nameManager))),t.includes("jsx")&&("preserve"!==o.jsxRuntime&&this.transformers.push(new ei.default(this,s,r,this.nameManager,o)),this.transformers.push(new ec(this,s,r,o)));let i=null;if(t.includes("react-hot-loader")){if(!o.filePath)throw Error("filePath is required when using the react-hot-loader transform.");i=new el(s,o.filePath),this.transformers.push(i);}if(t.includes("imports")){if(null===r)throw Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new Z(this,s,r,this.nameManager,this.helperManager,i,n,!!o.enableLegacyTypeScriptModuleInterop,t.includes("typescript"),t.includes("flow"),!!o.preserveDynamicImport,!!o.keepUnusedImports));}else this.transformers.push(new ee(s,this.nameManager,this.helperManager,i,t.includes("typescript"),t.includes("flow"),!!o.keepUnusedImports,o));t.includes("flow")&&this.transformers.push(new et(this,s,t.includes("imports"))),t.includes("typescript")&&this.transformers.push(new em(this,s,t.includes("imports"))),t.includes("jest")&&this.transformers.push(new es(this,s,this.nameManager,r));}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?'"use strict";':"";for(let t of this.transformers)e+=t.getPrefixCode();for(let t of(e+=this.helperManager.emitHelpers()+this.generatedVariables.map(e=>` var ${e};`).join(""),this.transformers))e+=t.getHoistedCode();let t="";for(let e of this.transformers)t+=e.getSuffixCode();let n=this.tokens.finish(),{code:o}=n;if(!o.startsWith("#!"))return{code:e+o+t,mappings:this.shiftMappings(n.mappings,e.length)};{let s=o.indexOf("\n");return -1===s&&(s=o.length,o+="\n"),{code:o.slice(0,s+1)+e+o.slice(s+1)+t,mappings:this.shiftMappings(n.mappings,e.length)};}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(p.TokenType.braceL)||this.tokens.matches1(p.TokenType.dollarBraceL))e++;else if(this.tokens.matches1(p.TokenType.braceR)){if(0===e)return;e--;}if(this.tokens.matches1(p.TokenType.parenL))t++;else if(this.tokens.matches1(p.TokenType.parenR)){if(0===t)return;t--;}this.processToken();}}processToken(){if(this.tokens.matches1(p.TokenType._class)){this.processClass();return;}for(let e of this.transformers)if(e.process())return;this.tokens.copyToken();}processNamedClass(){if(!this.tokens.matches2(p.TokenType._class,p.TokenType.name))throw Error("Expected identifier for exported class name.");let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e;}processClass(){let e=function(e,t,n,o){let s=t.snapshot(),r=function(e){let t=e.currentToken(),n=t.contextId;if(null==n)throw Error("Expected context ID on class token.");let o=t.isExpression;if(null==o)throw Error("Expected isExpression on class token.");let s=null,r=!1;for(e.nextToken(),e.matches1(p.TokenType.name)&&(s=e.identifierName());!e.matchesContextIdAndLabel(p.TokenType.braceL,n);)e.matches1(p.TokenType._extends)&&!e.currentToken().isType&&(r=!0),e.nextToken();return{isExpression:o,className:s,hasSuperclass:r};}(t),i=[],a=[],c=[],l=null,k=[],T=[],d=t.currentToken().contextId;if(null==d)throw Error("Expected non-null class context ID on class open-brace.");for(t.nextToken();!t.matchesContextIdAndLabel(p.TokenType.braceR,d);)if(t.matchesContextual(h.ContextualKeyword._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:i,constructorInsertPos:l}=W(t));else if(t.matches1(p.TokenType.semi))o||T.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{let s=t.currentIndex(),r=!1,m=!1,u=!1;for(;K(t.currentToken());)t.matches1(p.TokenType._static)&&(r=!0),t.matches1(p.TokenType.hash)&&(m=!0),(t.matches1(p.TokenType._declare)||t.matches1(p.TokenType._abstract))&&(u=!0),t.nextToken();if(r&&t.matches1(p.TokenType.braceL)||m){H(t,d);continue;}if(t.matchesContextual(h.ContextualKeyword._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:i,constructorInsertPos:l}=W(t));continue;}let f=t.currentIndex();if(function(e){if(e.matches1(p.TokenType.bracketL)){let t=e.currentToken().contextId;if(null==t)throw Error("Expected class context ID on computed name open bracket.");for(;!e.matchesContextIdAndLabel(p.TokenType.bracketR,t);)e.nextToken();e.nextToken();}else e.nextToken();}(t),t.matches1(p.TokenType.lessThan)||t.matches1(p.TokenType.parenL)){H(t,d);continue;}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(p.TokenType.eq)){let o;let s=t.currentIndex(),i=t.currentToken().rhsEndIndex;if(null==i)throw Error("Expected rhsEndIndex on class field assignment.");for(t.nextToken();t.currentIndex()<i;)e.processToken();r?(o=n.claimFreeName("__initStatic"),c.push(o)):(o=n.claimFreeName("__init"),a.push(o)),k.push({initializerName:o,equalsIndex:s,start:f,end:t.currentIndex()});}else(!o||u)&&T.push({start:s,end:t.currentIndex()});}return(t.restoreToSnapshot(s),o)?{headerInfo:r,constructorInitializerStatements:i,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:l,fields:[],rangesToRemove:T}:{headerInfo:r,constructorInitializerStatements:i,instanceInitializerNames:a,staticInitializerNames:c,constructorInsertPos:l,fields:k,rangesToRemove:T};}(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0,n=e.headerInfo.className;t&&(n=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(n),this.tokens.appendCode(` (${n} =`));let o=this.tokens.currentToken().contextId;if(null==o)throw Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(p.TokenType._class);!this.tokens.matchesContextIdAndLabel(p.TokenType.braceL,o);)this.processToken();this.processClassBody(e,n);let s=e.staticInitializerNames.map(e=>`${n}.${e}()`);t?this.tokens.appendCode(`, ${s.map(e=>`${e}, `).join("")}${n})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${s.map(e=>`${e};`).join(" ")}`);}processClassBody(e,t){let{headerInfo:n,constructorInsertPos:o,constructorInitializerStatements:s,fields:r,instanceInitializerNames:i,rangesToRemove:a}=e,h=0,c=0,l=this.tokens.currentToken().contextId;if(null==l)throw Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(p.TokenType.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");let k=s.length+i.length>0;if(null===o&&k){let e=this.makeConstructorInitCode(s,i,t);if(n.hasSuperclass){let t=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`);}else this.tokens.appendCode(`constructor() { ${e}; }`);}for(;!this.tokens.matchesContextIdAndLabel(p.TokenType.braceR,l);)if(h<r.length&&this.tokens.currentIndex()===r[h].start){let e=!1;for(this.tokens.matches1(p.TokenType.bracketL)?this.tokens.copyTokenWithPrefix(`${r[h].initializerName}() {this`):this.tokens.matches1(p.TokenType.string)||this.tokens.matches1(p.TokenType.num)?(this.tokens.copyTokenWithPrefix(`${r[h].initializerName}() {this[`),e=!0):this.tokens.copyTokenWithPrefix(`${r[h].initializerName}() {this.`);this.tokens.currentIndex()<r[h].end;)e&&this.tokens.currentIndex()===r[h].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),h++;}else if(c<a.length&&this.tokens.currentIndex()>=a[c].start){for(this.tokens.currentIndex()<a[c].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<a[c].end;)this.tokens.removeToken();c++;}else this.tokens.currentIndex()===o&&(this.tokens.copyToken(),k&&this.tokens.appendCode(`;${this.makeConstructorInitCode(s,i,t)};`)),this.processToken();this.tokens.copyExpectedToken(p.TokenType.braceR);}makeConstructorInitCode(e,t,n){return[...e,...t.map(e=>`${n}.prototype.${e}.call(this)`)].join(";");}processPossibleArrowParamEnd(){if(this.tokens.matches2(p.TokenType.parenR,p.TokenType.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,p.TokenType.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0;}}return!1;}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(h.ContextualKeyword._async)&&!this.tokens.matches1(p.TokenType._async))return!1;let e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==p.TokenType.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,p.TokenType.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0;}return!1;}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0;}return!1;}shiftMappings(e,t){for(let n=0;n<e.length;n++){let o=e[n];void 0!==o&&(e[n]=o+t);}return e;}}var ef=n("c4650bc8");function ey(e){return(ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e;}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e;})(e);}function ex(){"use strict";ex=function(){return e;};var e={},t=Object.prototype,n=t.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value;},s="function"==typeof Symbol?Symbol:{},r=s.iterator||"@@iterator",i=s.asyncIterator||"@@asyncIterator",a=s.toStringTag||"@@toStringTag";function h(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t];}try{h({},"");}catch(e){h=function(e,t,n){return e[t]=n;};}function p(e,t,n,s){var r,i,a=Object.create((t&&t.prototype instanceof k?t:k).prototype);return o(a,"_invoke",{value:(r=new E(s||[]),i="suspendedStart",function(t,o){if("executing"===i)throw Error("Generator is already running");if("completed"===i){if("throw"===t)throw o;return b();}for(r.method=t,r.arg=o;;){var s=r.delegate;if(s){var a=function e(t,n){var o=n.method,s=t.iterator[o];if(void 0===s)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+o+"' method")),l;var r=c(s,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,l;var i=r.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,l):i:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,l);}(s,r);if(a){if(a===l)continue;return a;}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===i)throw i="completed",r.arg;r.dispatchException(r.arg);}else"return"===r.method&&r.abrupt("return",r.arg);i="executing";var h=c(e,n,r);if("normal"===h.type){if(i=r.done?"completed":"suspendedYield",h.arg===l)continue;return{value:h.arg,done:r.done};}"throw"===h.type&&(i="completed",r.method="throw",r.arg=h.arg);}})}),a;}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)};}catch(e){return{type:"throw",arg:e};}}e.wrap=p;var l={};function k(){}function T(){}function d(){}var m={};h(m,r,function(){return this;});var u=Object.getPrototypeOf,f=u&&u(u(v([])));f&&f!==t&&n.call(f,r)&&(m=f);var y=d.prototype=k.prototype=Object.create(m);function x(e){["next","throw","return"].forEach(function(t){h(e,t,function(e){return this._invoke(t,e);});});}function I(e,t){var s;o(this,"_invoke",{value:function(o,r){function i(){return new t(function(s,i){!function o(s,r,i,a){var h=c(e[s],e,r);if("throw"!==h.type){var p=h.arg,l=p.value;return l&&"object"==ey(l)&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){o("next",e,i,a);},function(e){o("throw",e,i,a);}):t.resolve(l).then(function(e){p.value=e,i(p);},function(e){return o("throw",e,i,a);});}a(h.arg);}(o,r,s,i);});}return s=s?s.then(i,i):i();}});}function g(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t);}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t;}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(g,this),this.reset(!0);}function v(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function t(){for(;++o<e.length;)if(n.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=void 0,t.done=!0,t;};return s.next=s;}}return{next:b};}function b(){return{value:void 0,done:!0};}return T.prototype=d,o(y,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:T,configurable:!0}),T.displayName=h(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name));},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,h(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e;},e.awrap=function(e){return{__await:e};},x(I.prototype),h(I.prototype,i,function(){return this;}),e.AsyncIterator=I,e.async=function(t,n,o,s,r){void 0===r&&(r=Promise);var i=new I(p(t,n,o,s),r);return e.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next();});},x(y),h(y,a,"Generator"),h(y,r,function(){return this;}),h(y,"toString",function(){return"[object Generator]";}),e.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e;}return e.done=!0,e;};},e.values=v,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0);},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval;},dispatchException:function(e){if(this.done)throw e;var t=this;function o(n,o){return i.type="throw",i.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o;}for(var s=this.tryEntries.length-1;s>=0;--s){var r=this.tryEntries[s],i=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var a=n.call(r,"catchLoc"),h=n.call(r,"finallyLoc");if(a&&h){if(this.prev<r.catchLoc)return o(r.catchLoc,!0);if(this.prev<r.finallyLoc)return o(r.finallyLoc);}else if(a){if(this.prev<r.catchLoc)return o(r.catchLoc,!0);}else{if(!h)throw Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return o(r.finallyLoc);}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o];if(s.tryLoc<=this.prev&&n.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var r=s;break;}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var i=r?r.completion:{};return i.type=e,i.arg=t,r?(this.method="next",this.next=r.finallyLoc,l):this.complete(i);},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l;},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),l;}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var s=o.arg;_(n);}return s;}}throw Error("illegal catch attempt");},delegateYield:function(e,t,n){return this.delegate={iterator:v(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l;}},e;}function eI(e,t,n,o,s,r,i){try{var a=e[r](i),h=a.value;}catch(e){n(e);return;}a.done?t(h):Promise.resolve(h).then(o,s);}r._(ef);var eg=(o=ex().mark(function e(t){return ex().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",function(e,t){j.strictCheck(t);try{let n=function(e,t){let n=t.transforms.includes("jsx"),o=t.transforms.includes("typescript"),s=t.transforms.includes("flow"),r=!0===t.disableESTransforms,i=(0,q.parse)(e,n,o,s),a=i.tokens,h=i.scopes,c=new S(e,a),k=new L(c),d=new B(e,a,s,r,k),m=!!t.enableLegacyTypeScriptModuleInterop,u=null;return t.transforms.includes("imports")?((u=new T(c,d,m,t,t.transforms.includes("typescript"),!!t.keepUnusedImports,k)).preprocessTokens(),R(d,h,u.getGlobalNames()),t.transforms.includes("typescript")&&!t.keepUnusedImports&&u.pruneTypeOnlyImports()):t.transforms.includes("typescript")&&!t.keepUnusedImports&&R(d,h,function(e){let t=new Set;for(let o=0;o<e.tokens.length;o++){var n;e.matches1AtIndex(o,p.TokenType._import)&&!e.matches3AtIndex(o,p.TokenType._import,p.TokenType.name,p.TokenType.eq)&&(n=o,n++,!e.matches1AtIndex(n,p.TokenType.parenL)&&(e.matches1AtIndex(n,p.TokenType.name)&&(t.add(e.identifierNameAtIndex(n)),n++,e.matches1AtIndex(n,p.TokenType.comma)&&n++),e.matches1AtIndex(n,p.TokenType.star)&&(n+=2,t.add(e.identifierNameAtIndex(n)),n++),e.matches1AtIndex(n,p.TokenType.braceL)&&function(e,t,n){for(;;){if(e.matches1AtIndex(t,p.TokenType.braceR))return;let o=(0,l.default)(e,t);if(t=o.endIndex,o.isType||n.add(o.rightName),e.matches2AtIndex(t,p.TokenType.comma,p.TokenType.braceR)||e.matches1AtIndex(t,p.TokenType.braceR))return;if(e.matches1AtIndex(t,p.TokenType.comma))t++;else throw Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`);}}(e,++n,t)));}return t;}(d)),{tokenProcessor:d,scopes:h,nameManager:c,importProcessor:u,helperManager:k};}(e,t),o=new eu(n,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform(),s={code:o.code};if(t.sourceMapOptions){if(!t.filePath)throw Error("filePath must be specified when generating a source map.");s={...s,sourceMap:function({code:e,mappings:t},n,o,s,r){let i=function(e,t){let n=Array(t.length),o=0,s=t[0].start,r=0;for(let i=0;i<e.length;i++)i===s&&(n[o]=s-r,s=t[++o].start),e.charCodeAt(i)===A.charCodes.lineFeed&&(r=i+1);return n;}(s,r),a=new v({file:o.compiledFilename}),h=0,p=t[0];for(;void 0===p&&h<t.length-1;)p=t[++h];let c=0,l=0;0!==p&&b(a,c,0,n,c,0);for(let o=0;o<e.length;o++){if(o===p)for(b(a,c,p-l,n,c,i[h]);(p===o||void 0===p)&&h<t.length-1;)p=t[++h];e.charCodeAt(o)===A.charCodes.lineFeed&&(c++,p!==(l=o+1)&&b(a,c,0,n,c,0));}let{sourceRoot:k,sourcesContent:T,...d}=function(e){let t=function(e){let{_mappings:t,_sources:n,_sourcesContent:o,_names:s,_ignoreList:r}=e;return function(e){let{length:t}=e,n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);n<t&&(e.length=n);}(t),{version:3,file:e.file||void 0,names:s.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:o,mappings:t,ignoreList:r.array};}(e);return Object.assign({},t,{mappings:function(e){let t=new I,n=0,o=0,s=0,r=0;for(let i=0;i<e.length;i++){let a=e[i];if(i>0&&t.write(59),0===a.length)continue;let h=0;for(let e=0;e<a.length;e++){let i=a[e];e>0&&t.write(44),h=y(t,i[0],h),1!==i.length&&(n=y(t,i[1],n),o=y(t,i[2],o),s=y(t,i[3],s),4!==i.length&&(r=y(t,i[4],r)));}}return t.flush();}(t.mappings)});}(a);return d;}(o,t.filePath,t.sourceMapOptions,e,n.tokenProcessor.tokens)};}return s;}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e;}}(t,{transforms:["typescript","jsx","imports"]}).code);case 1:case"end":return e.stop();}},e);}),s=function(){var e=this,t=arguments;return new Promise(function(n,s){var r=o.apply(e,t);function i(e){eI(r,n,s,i,a,"next",e);}function a(e){eI(r,n,s,i,a,"throw",e);}i(void 0);});},function(e){return s.apply(this,arguments);});}}]);
124
- //# sourceMappingURL=779f92e1-async.d95373de.js.map