This repository has been archived by the owner on Sep 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathout.js
8887 lines (7004 loc) · 460 KB
/
out.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(async () => {
const log = (_region, ...args) => {
const modColor = '253, 218, 13'; // New blurple
const regionColor = '114, 137, 218'; // Old blurple
const fromStr = (str) => str.replace('rgb(', '').replace(')', '').split(', ');
const toStr = ([r, g, b]) => `rgb(${r}, ${g}, ${b})`;
const light = (str, val) => toStr(fromStr(str).map((x) => x * val));
const makeRegionStyle = (color) => `background-color: rgb(${color}); color: white; border-radius: 4px; border: 2px solid ${light(color, 0.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`;
const regions = _region.split('.');
const regionStrings = regions.map(x => `%c${x}%c`);
const regionStyling = regions.reduce((res) => res.concat(makeRegionStyle(regionColor), ''), []);
console.log(`%ctopaz%c ${regionStrings.join(' ')}`,
makeRegionStyle(modColor).replace('white', 'black'),
'',
...regionStyling,
...args
);
};
if (console.context) window.console = console.context(); // Resets console to normal, removing custom methods patched by various things (Sentry, React DevTools) as it's annoying for stack traces
if (window.topaz && topaz.purge) { // live reload handling
topaz.__reloading = true;
topaz.purge(); // fully remove topaz (plugins, css, etc)
// setTimeout(() => updateOpenSettings(), 1000);
}
window.topaz = {
version: 'alpha 11.2',
debug: window.topaz?.debug ?? false,
log
};
const Storage = await eval(`(async () => {
const startTime = performance.now();
const dbReq = indexedDB.open('topaz');
const makeTrans = () => db.transaction([ 'store' ], 'readwrite').objectStore('store');
const debounce = (handler, timeout) => {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => handler(...args), timeout);
};
};
const save = debounce(() => makeTrans().put(store, 'store').onsuccess = e => topaz.log('storage', 'db saved'), 200);
let db;
const store = await new Promise(res => {
dbReq.onerror = e => console.error('topaz failed to open idb db', e);
dbReq.onsuccess = e => {
db = e.target.result;
try {
makeTrans().get('store').onsuccess = e => {
res(e.target.result);
};
} catch (e) {
console.error('failed to read from db', e);
}
};
dbReq.onupgradeneeded = e => {
db = e.target.result;
const objectStore = db.createObjectStore('store');
const store = {};
objectStore.add(store, 'store');
topaz.log('storage', 'inited db', store);
res(store);
};
});
const Storage = {
set: (key, value) => {
store[key] = value;
save();
},
get: (key, def) => {
return store[key] ?? def;
},
delete: (key) => {
delete store[key];
save();
},
keys: () => Object.keys(store),
store
};
// local storage compat
Storage.setItem = Storage.set;
Storage.getItem = Storage.get;
Storage.removeItem = Storage.delete;
topaz.log('storage', \`loaded \${Object.keys(store).length} keys in \${(performance.now() - startTime).toFixed(2)}ms\`);
return Storage; // eval export
})(); //# sourceURL=TopazStorage`);
const openChangelog = async () => eval(`const sleep = x => new Promise(res => setTimeout(res, x));
let body = \`
__Autopatcher__
- **Added Autopatcher.** The new autopatcher can now try to fix plugins broken by recent common breakages from Discord updates.
__Performance__
- **Installing plugins and themes after the first time is now significantly faster.** The final output of bundling is now cached so bundling each install is no longer needed.
- **Added more caching throughout.** Essentially everything fetched for plugins/themes should be cached now, helping increase perf and decreasing network usage.
__Bundler__
- **Partially rewrote CSS bundler to work with more complex PC themes.** Now use separated main and index roots.
__Onyx__
- Added ESM default export support
- Rewrote sourceURL to add increment to fix Chromium DevTools bug
__Storage__
- Changed saving debounce to 200ms from 1s
__Manager__
- **Added more redundancy.** Information for plugins now no longer soley relies on it's manifest, it also now uses information like constructor name and GitHub username.
- Use plugin's class name if no manifest name
- Use GitHub username if no manifest author and plugin is from GitHub
- Wrap plugin calls in try catch to avoid failing to disable/enable completely
__Backup__
- Fixed restoring sometimes not working
__AliucordRN__
- **Initial AliucordRN plugin support.** A few AliucordRN (React Native) plugins are now supported, very early/WIP.
__BetterDiscord__
- ZeresLib: Only run Webpack listeners when modules are added
__Powercord__
- Added \\\`powercord\\\` builtin wrapper
- Added ContextMenu component
- Added tree support for getting settings
- Fixed opening modals erroring
- Added pluginManager.get stub for self
\`;
let bodySplit = body.split('\\n');
let categoryAssign = {
'added': [ 'Added', 'add', 'Rewrote' ],
// 'progress': [],
// 'improved': [],
'fixed': [ 'Fixed' ]
};
let changelog = {
image: '',
version: topaz.version[0].toUpperCase() + topaz.version.slice(1).split('.')[0],
date: '2022-08-14',
body: bodySplit.reduce((acc, x, i) => {
if (x[0] === '_') {
const items = bodySplit.slice(i + 1, bodySplit.indexOf(bodySplit.find((y, j) => j > i && y[0] === '_')) - 1);
const cat = items.reduce((acc, y) => {
for (const cat in categoryAssign) {
if (categoryAssign[cat].some(z => y.includes(z))) {
if (cat === 'added') return acc += 1;
if (cat === 'fixed') return acc -= 1;
}
}
return acc;
}, 0) >= 0 ? 'added' : 'fixed';
acc += (i === 0 ? '' : '\\n') + x.replaceAll('__', '') + \` {\${cat}\${i === -1 ? ' marginTop' : ''}}\\n======================\\n\\n\`;
} else if (x) {
acc += \`* \${x.slice(2)}\\n\`;
}
return acc;
}, '')
};
let showAdvanced = topaz.storage.get('changelog_advanced', false);
const show = async () => {
goosemod.changelog.resetChangelog();
goosemod.changelog.setChangelog(changelog);
goosemod.changelog.showChangelog();
await sleep(100);
setTimeout(() => goosemod.changelog.resetChangelog(), 500);
const customTweaks = () => {
document.querySelector('.modal-3Hrb0S [data-text-variant="heading-lg/medium"]').textContent = \`Topaz | \${changelog.version}\`; // Set changelog modal title
document.querySelector('.modal-3Hrb0S .footer-31IekZ')?.remove?.(); // Remove footer of modal with social media
document.querySelector('.title-2ftWWc:first-child').style.marginTop = '0px';
const hideAdvanced = () => {
const els = [...document.querySelectorAll('.content-FDHp32 li')];
if (showAdvanced) {
els.concat([...document.querySelectorAll('.content-FDHp32 h1')]).forEach(x => x.style.display = '');
} else {
els.forEach(x => x.textContent.endsWith('.') ? x.style.display = '' : x.style.display = 'none');
const children = [...document.querySelectorAll('.content-FDHp32 > div > *')];
document.querySelectorAll('.content-FDHp32 h1').forEach(x => {
if ([...children[children.indexOf(x) + 1].children].every(y => !y.textContent.endsWith('.'))) x.style.display = 'none';
});
}
};
hideAdvanced();
if (!document.querySelector('#topaz-changelog-advanced')) {
const container = document.createElement('div');
document.querySelector('.modal-3Hrb0S [data-text-variant="heading-lg/medium"]').appendChild(container);
const { React, ReactDOM } = goosemod.webpackModules.common;
class AdvancedToggle extends React.PureComponent {
render() {
return React.createElement(goosemod.webpackModules.findByDisplayName('SwitchItem'), {
className: 'topaz-changelog-advanced',
value: showAdvanced,
onChange: x => {
showAdvanced = x;
this.forceUpdate();
hideAdvanced();
topaz.storage.set('changelog_advanced', showAdvanced);
}
}, 'Advanced');
}
}
ReactDOM.render(React.createElement(AdvancedToggle), container);
}
};
// Tweak again since opening it right at beginning of injection / Discord load (eg: GooseMod update) often fails to do after first wait
setTimeout(customTweaks, 200);
customTweaks();
};
show()`);
const lastVersion = Storage.get('last_version');
if (!lastVersion || lastVersion !== topaz.version) {
if (lastVersion?.split('.')[0] !== topaz.version.split('.')[0]) setTimeout(openChangelog, 2000);
Storage.delete('cache_final'); // delete final cache
}
// if (lastVersion && lastVersion !== topaz.version) setTimeout(openChangelog, 5000);
Storage.set('last_version', topaz.version);
let pluginsToInstall = JSON.parse(Storage.get('plugins') ?? '{}');
const initStartTime = performance.now();
const sucrase = eval(`const sucrase=function(e){"use strict";var t,n,s;function o(e){switch(e){case n.num:return"num";case n.bigint:return"bigint";case n.decimal:return"decimal";case n.regexp:return"regexp";case n.string:return"string";case n.name:return"name";case n.eof:return"eof";case n.bracketL:return"[";case n.bracketR:return"]";case n.braceL:return"{";case n.braceBarL:return"{|";case n.braceR:return"}";case n.braceBarR:return"|}";case n.parenL:return"(";case n.parenR:return")";case n.comma:return",";case n.semi:return";";case n.colon:return":";case n.doubleColon:return"::";case n.dot:return".";case n.question:return"?";case n.questionDot:return"?.";case n.arrow:return"=>";case n.template:return"template";case n.ellipsis:return"...";case n.backQuote:return"\`";case n.dollarBraceL:return"\${";case n.at:return"@";case n.hash:return"#";case n.eq:return"=";case n.assign:return"_=";case n.preIncDec:case n.postIncDec:return"++/--";case n.bang:return"!";case n.tilde:return"~";case n.pipeline:return"|>";case n.nullishCoalescing:return"??";case n.logicalOR:return"||";case n.logicalAND:return"&&";case n.bitwiseOR:return"|";case n.bitwiseXOR:return"^";case n.bitwiseAND:return"&";case n.equality:return"==/!=";case n.lessThan:return"<";case n.greaterThan:return">";case n.relationalOrEqual:return"<=/>=";case n.bitShift:return"<</>>";case n.plus:return"+";case n.minus:return"-";case n.modulo:return"%";case n.star:return"*";case n.slash:return"/";case n.exponent:return"**";case n.jsxName:return"jsxName";case n.jsxText:return"jsxText";case n.jsxTagStart:return"jsxTagStart";case n.jsxTagEnd:return"jsxTagEnd";case n.typeParameterStart:return"typeParameterStart";case n.nonNullAssertion:return"nonNullAssertion";case n._break:return"break";case n._case:return"case";case n._catch:return"catch";case n._continue:return"continue";case n._debugger:return"debugger";case n._default:return"default";case n._do:return"do";case n._else:return"else";case n._finally:return"finally";case n._for:return"for";case n._function:return"function";case n._if:return"if";case n._return:return"return";case n._switch:return"switch";case n._throw:return"throw";case n._try:return"try";case n._var:return"var";case n._let:return"let";case n._const:return"const";case n._while:return"while";case n._with:return"with";case n._new:return"new";case n._this:return"this";case n._super:return"super";case n._class:return"class";case n._extends:return"extends";case n._export:return"export";case n._import:return"import";case n._yield:return"yield";case n._null:return"null";case n._true:return"true";case n._false:return"false";case n._in:return"in";case n._instanceof:return"instanceof";case n._typeof:return"typeof";case n._void:return"void";case n._delete:return"delete";case n._async:return"async";case n._get:return"get";case n._set:return"set";case n._declare:return"declare";case n._readonly:return"readonly";case n._abstract:return"abstract";case n._static:return"static";case n._public:return"public";case n._private:return"private";case n._protected:return"protected";case n._override:return"override";case n._as:return"as";case n._enum:return"enum";case n._type:return"type";case n._implements:return"implements";default:return""}}!function(e){e[e.NONE=0]="NONE";e[e._abstract=1]="_abstract";e[e._as=2]="_as";e[e._asserts=3]="_asserts";e[e._async=4]="_async";e[e._await=5]="_await";e[e._checks=6]="_checks";e[e._constructor=7]="_constructor";e[e._declare=8]="_declare";e[e._enum=9]="_enum";e[e._exports=10]="_exports";e[e._from=11]="_from";e[e._get=12]="_get";e[e._global=13]="_global";e[e._implements=14]="_implements";e[e._infer=15]="_infer";e[e._interface=16]="_interface";e[e._is=17]="_is";e[e._keyof=18]="_keyof";e[e._mixins=19]="_mixins";e[e._module=20]="_module";e[e._namespace=21]="_namespace";e[e._of=22]="_of";e[e._opaque=23]="_opaque";e[e._override=24]="_override";e[e._private=25]="_private";e[e._protected=26]="_protected";e[e._proto=27]="_proto";e[e._public=28]="_public";e[e._readonly=29]="_readonly";e[e._require=30]="_require";e[e._set=31]="_set";e[e._static=32]="_static";e[e._type=33]="_type";e[e._unique=34]="_unique"}(t||(t={})),function(e){e[e.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";e[e.IS_KEYWORD=16]="IS_KEYWORD";e[e.IS_ASSIGN=32]="IS_ASSIGN";e[e.IS_RIGHT_ASSOCIATIVE=64]="IS_RIGHT_ASSOCIATIVE";e[e.IS_PREFIX=128]="IS_PREFIX";e[e.IS_POSTFIX=256]="IS_POSTFIX";e[e.num=0]="num";e[e.bigint=512]="bigint";e[e.decimal=1024]="decimal";e[e.regexp=1536]="regexp";e[e.string=2048]="string";e[e.name=2560]="name";e[e.eof=3072]="eof";e[e.bracketL=3584]="bracketL";e[e.bracketR=4096]="bracketR";e[e.braceL=4608]="braceL";e[e.braceBarL=5120]="braceBarL";e[e.braceR=5632]="braceR";e[e.braceBarR=6144]="braceBarR";e[e.parenL=6656]="parenL";e[e.parenR=7168]="parenR";e[e.comma=7680]="comma";e[e.semi=8192]="semi";e[e.colon=8704]="colon";e[e.doubleColon=9216]="doubleColon";e[e.dot=9728]="dot";e[e.question=10240]="question";e[e.questionDot=10752]="questionDot";e[e.arrow=11264]="arrow";e[e.template=11776]="template";e[e.ellipsis=12288]="ellipsis";e[e.backQuote=12800]="backQuote";e[e.dollarBraceL=13312]="dollarBraceL";e[e.at=13824]="at";e[e.hash=14336]="hash";e[e.eq=14880]="eq";e[e.assign=15392]="assign";e[e.preIncDec=16256]="preIncDec";e[e.postIncDec=16768]="postIncDec";e[e.bang=17024]="bang";e[e.tilde=17536]="tilde";e[e.pipeline=17921]="pipeline";e[e.nullishCoalescing=18434]="nullishCoalescing";e[e.logicalOR=18946]="logicalOR";e[e.logicalAND=19459]="logicalAND";e[e.bitwiseOR=19972]="bitwiseOR";e[e.bitwiseXOR=20485]="bitwiseXOR";e[e.bitwiseAND=20998]="bitwiseAND";e[e.equality=21511]="equality";e[e.lessThan=22024]="lessThan";e[e.greaterThan=22536]="greaterThan";e[e.relationalOrEqual=23048]="relationalOrEqual";e[e.bitShift=23561]="bitShift";e[e.plus=24202]="plus";e[e.minus=24714]="minus";e[e.modulo=25099]="modulo";e[e.star=25611]="star";e[e.slash=26123]="slash";e[e.exponent=26700]="exponent";e[e.jsxName=27136]="jsxName";e[e.jsxText=27648]="jsxText";e[e.jsxTagStart=28160]="jsxTagStart";e[e.jsxTagEnd=28672]="jsxTagEnd";e[e.typeParameterStart=29184]="typeParameterStart";e[e.nonNullAssertion=29696]="nonNullAssertion";e[e._break=30224]="_break";e[e._case=30736]="_case";e[e._catch=31248]="_catch";e[e._continue=31760]="_continue";e[e._debugger=32272]="_debugger";e[e._default=32784]="_default";e[e._do=33296]="_do";e[e._else=33808]="_else";e[e._finally=34320]="_finally";e[e._for=34832]="_for";e[e._function=35344]="_function";e[e._if=35856]="_if";e[e._return=36368]="_return";e[e._switch=36880]="_switch";e[e._throw=37520]="_throw";e[e._try=37904]="_try";e[e._var=38416]="_var";e[e._let=38928]="_let";e[e._const=39440]="_const";e[e._while=39952]="_while";e[e._with=40464]="_with";e[e._new=40976]="_new";e[e._this=41488]="_this";e[e._super=42e3]="_super";e[e._class=42512]="_class";e[e._extends=43024]="_extends";e[e._export=43536]="_export";e[e._import=44048]="_import";e[e._yield=44560]="_yield";e[e._null=45072]="_null";e[e._true=45584]="_true";e[e._false=46096]="_false";e[e._in=46616]="_in";e[e._instanceof=47128]="_instanceof";e[e._typeof=47760]="_typeof";e[e._void=48272]="_void";e[e._delete=48784]="_delete";e[e._async=49168]="_async";e[e._get=49680]="_get";e[e._set=50192]="_set";e[e._declare=50704]="_declare";e[e._readonly=51216]="_readonly";e[e._abstract=51728]="_abstract";e[e._static=52240]="_static";e[e._public=52752]="_public";e[e._private=53264]="_private";e[e._protected=53776]="_protected";e[e._override=54288]="_override";e[e._as=54800]="_as";e[e._enum=55312]="_enum";e[e._type=55824]="_type";e[e._implements=56336]="_implements"}(n||(n={}));class r{constructor(e,t,n){this.startTokenIndex=e,this.endTokenIndex=t,this.isFunctionScope=n}}class i{constructor(e,t,n,s,o,r,i,a,c,h,l,p){this.potentialArrowAt=e,this.noAnonFunctionType=t,this.tokensLength=n,this.scopesLength=s,this.pos=o,this.type=r,this.contextualKeyword=i,this.start=a,this.end=c,this.isType=h,this.scopeDepth=l,this.error=p}}class a{constructor(){a.prototype.__init.call(this),a.prototype.__init2.call(this),a.prototype.__init3.call(this),a.prototype.__init4.call(this),a.prototype.__init5.call(this),a.prototype.__init6.call(this),a.prototype.__init7.call(this),a.prototype.__init8.call(this),a.prototype.__init9.call(this),a.prototype.__init10.call(this),a.prototype.__init11.call(this),a.prototype.__init12.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.tokens=[]}__init4(){this.scopes=[]}__init5(){this.pos=0}__init6(){this.type=n.eof}__init7(){this.contextualKeyword=t.NONE}__init8(){this.start=0}__init9(){this.end=0}__init10(){this.isType=!1}__init11(){this.scopeDepth=0}__init12(){this.error=null}snapshot(){return new i(this.potentialArrowAt,this.noAnonFunctionType,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}}let c,h,l,p,u,f;function d(){return f++}function m(e){if("pos"in e){const t=function(e){let t=1,n=1;for(let o=0;o<e;o++)u.charCodeAt(o)===s.lineFeed?(t++,n=1):n++;return new k(t,n)}(e.pos);e.message+=\` (\${t.line}:\${t.column})\`,e.loc=t}return e}!function(e){e[e.backSpace=8]="backSpace";e[e.lineFeed=10]="lineFeed";e[e.carriageReturn=13]="carriageReturn";e[e.shiftOut=14]="shiftOut";e[e.space=32]="space";e[e.exclamationMark=33]="exclamationMark";e[e.quotationMark=34]="quotationMark";e[e.numberSign=35]="numberSign";e[e.dollarSign=36]="dollarSign";e[e.percentSign=37]="percentSign";e[e.ampersand=38]="ampersand";e[e.apostrophe=39]="apostrophe";e[e.leftParenthesis=40]="leftParenthesis";e[e.rightParenthesis=41]="rightParenthesis";e[e.asterisk=42]="asterisk";e[e.plusSign=43]="plusSign";e[e.comma=44]="comma";e[e.dash=45]="dash";e[e.dot=46]="dot";e[e.slash=47]="slash";e[e.digit0=48]="digit0";e[e.digit1=49]="digit1";e[e.digit2=50]="digit2";e[e.digit3=51]="digit3";e[e.digit4=52]="digit4";e[e.digit5=53]="digit5";e[e.digit6=54]="digit6";e[e.digit7=55]="digit7";e[e.digit8=56]="digit8";e[e.digit9=57]="digit9";e[e.colon=58]="colon";e[e.semicolon=59]="semicolon";e[e.lessThan=60]="lessThan";e[e.equalsTo=61]="equalsTo";e[e.greaterThan=62]="greaterThan";e[e.questionMark=63]="questionMark";e[e.atSign=64]="atSign";e[e.uppercaseA=65]="uppercaseA";e[e.uppercaseB=66]="uppercaseB";e[e.uppercaseC=67]="uppercaseC";e[e.uppercaseD=68]="uppercaseD";e[e.uppercaseE=69]="uppercaseE";e[e.uppercaseF=70]="uppercaseF";e[e.uppercaseG=71]="uppercaseG";e[e.uppercaseH=72]="uppercaseH";e[e.uppercaseI=73]="uppercaseI";e[e.uppercaseJ=74]="uppercaseJ";e[e.uppercaseK=75]="uppercaseK";e[e.uppercaseL=76]="uppercaseL";e[e.uppercaseM=77]="uppercaseM";e[e.uppercaseN=78]="uppercaseN";e[e.uppercaseO=79]="uppercaseO";e[e.uppercaseP=80]="uppercaseP";e[e.uppercaseQ=81]="uppercaseQ";e[e.uppercaseR=82]="uppercaseR";e[e.uppercaseS=83]="uppercaseS";e[e.uppercaseT=84]="uppercaseT";e[e.uppercaseU=85]="uppercaseU";e[e.uppercaseV=86]="uppercaseV";e[e.uppercaseW=87]="uppercaseW";e[e.uppercaseX=88]="uppercaseX";e[e.uppercaseY=89]="uppercaseY";e[e.uppercaseZ=90]="uppercaseZ";e[e.leftSquareBracket=91]="leftSquareBracket";e[e.backslash=92]="backslash";e[e.rightSquareBracket=93]="rightSquareBracket";e[e.caret=94]="caret";e[e.underscore=95]="underscore";e[e.graveAccent=96]="graveAccent";e[e.lowercaseA=97]="lowercaseA";e[e.lowercaseB=98]="lowercaseB";e[e.lowercaseC=99]="lowercaseC";e[e.lowercaseD=100]="lowercaseD";e[e.lowercaseE=101]="lowercaseE";e[e.lowercaseF=102]="lowercaseF";e[e.lowercaseG=103]="lowercaseG";e[e.lowercaseH=104]="lowercaseH";e[e.lowercaseI=105]="lowercaseI";e[e.lowercaseJ=106]="lowercaseJ";e[e.lowercaseK=107]="lowercaseK";e[e.lowercaseL=108]="lowercaseL";e[e.lowercaseM=109]="lowercaseM";e[e.lowercaseN=110]="lowercaseN";e[e.lowercaseO=111]="lowercaseO";e[e.lowercaseP=112]="lowercaseP";e[e.lowercaseQ=113]="lowercaseQ";e[e.lowercaseR=114]="lowercaseR";e[e.lowercaseS=115]="lowercaseS";e[e.lowercaseT=116]="lowercaseT";e[e.lowercaseU=117]="lowercaseU";e[e.lowercaseV=118]="lowercaseV";e[e.lowercaseW=119]="lowercaseW";e[e.lowercaseX=120]="lowercaseX";e[e.lowercaseY=121]="lowercaseY";e[e.lowercaseZ=122]="lowercaseZ";e[e.leftCurlyBrace=123]="leftCurlyBrace";e[e.verticalBar=124]="verticalBar";e[e.rightCurlyBrace=125]="rightCurlyBrace";e[e.tilde=126]="tilde";e[e.nonBreakingSpace=160]="nonBreakingSpace";e[e.oghamSpaceMark=5760]="oghamSpaceMark";e[e.lineSeparator=8232]="lineSeparator";e[e.paragraphSeparator=8233]="paragraphSeparator"}(s||(s={}));class k{constructor(e,t){this.line=e,this.column=t}}function _(e,t,n,s){u=e,p=new a,f=1,c=t,h=n,l=s}function g(e){return p.contextualKeyword===e}function y(e){const t=Z();return t.type===n.name&&t.contextualKeyword===e}function T(e){return p.contextualKeyword===e&&X(n.name)}function x(e){T(e)||A()}function b(){return J(n.eof)||J(n.braceR)||I()}function I(){const e=p.tokens[p.tokens.length-1];for(let t=e?e.end:0;t<p.start;t++){const e=u.charCodeAt(t);if(e===s.lineFeed||e===s.carriageReturn||8232===e||8233===e)return!0}return!1}function v(){return X(n.semi)||b()}function w(){v()||A('Unexpected token, expected ";"')}function C(e){X(e)||A(\`Unexpected token, expected "\${o(e)}"\`)}function A(e="Unexpected token",t=p.start){if(p.error)return;const s=new SyntaxError(e);s.pos=t,p.error=s,p.pos=u.length,ae(n.eof)}const E=[9,11,12,s.space,s.nonBreakingSpace,s.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],S=/(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g,N=new Uint8Array(65536);for(const e of E)N[e]=1;function L(e){if(e<48)return 36===e;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return 95===e;if(e<123)return!0;if(e<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const R=new Uint8Array(65536);for(let e=0;e<128;e++)R[e]=L(e)?1:0;for(let e=128;e<65536;e++)R[e]=1;for(const e of E)R[e]=0;R[8232]=0,R[8233]=0;const O=R.slice();for(let e=s.digit0;e<=s.digit9;e++)O[e]=0;const P=new Int32Array([-1,27,594,729,1566,2187,2673,3294,-1,3510,-1,4428,4563,4644,4941,5319,5697,-1,6237,6696,7155,7587,7749,7911,-1,8127,-1,-1,-1,54,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-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,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8181,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(n._yield<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);var j;function D(e){const t=e.identifierRole;return t===j.TopLevelDeclaration||t===j.FunctionScopedDeclaration||t===j.BlockScopedDeclaration||t===j.ObjectShorthandTopLevelDeclaration||t===j.ObjectShorthandFunctionScopedDeclaration||t===j.ObjectShorthandBlockScopedDeclaration}function q(e){const t=e.identifierRole;return t===j.FunctionScopedDeclaration||t===j.BlockScopedDeclaration||t===j.ObjectShorthandFunctionScopedDeclaration||t===j.ObjectShorthandBlockScopedDeclaration}function F(e){const t=e.identifierRole;return t===j.TopLevelDeclaration||t===j.ObjectShorthandTopLevelDeclaration||t===j.ImportDeclaration}function B(e){const t=e.identifierRole;return t===j.TopLevelDeclaration||t===j.BlockScopedDeclaration||t===j.ObjectShorthandTopLevelDeclaration||t===j.ObjectShorthandBlockScopedDeclaration}function \$(e){const t=e.identifierRole;return t===j.FunctionScopedDeclaration||t===j.ObjectShorthandFunctionScopedDeclaration}function M(e){return e.identifierRole===j.ObjectShorthandTopLevelDeclaration||e.identifierRole===j.ObjectShorthandBlockScopedDeclaration||e.identifierRole===j.ObjectShorthandFunctionScopedDeclaration}!function(e){e[e.Access=0]="Access";e[e.ExportAccess=1]="ExportAccess";e[e.TopLevelDeclaration=2]="TopLevelDeclaration";e[e.FunctionScopedDeclaration=3]="FunctionScopedDeclaration";e[e.BlockScopedDeclaration=4]="BlockScopedDeclaration";e[e.ObjectShorthandTopLevelDeclaration=5]="ObjectShorthandTopLevelDeclaration";e[e.ObjectShorthandFunctionScopedDeclaration=6]="ObjectShorthandFunctionScopedDeclaration";e[e.ObjectShorthandBlockScopedDeclaration=7]="ObjectShorthandBlockScopedDeclaration";e[e.ObjectShorthand=8]="ObjectShorthand";e[e.ImportDeclaration=9]="ImportDeclaration";e[e.ObjectKey=10]="ObjectKey";e[e.ImportAccess=11]="ImportAccess"}(j||(j={}));class K{constructor(){this.type=p.type,this.contextualKeyword=p.contextualKeyword,this.start=p.start,this.end=p.end,this.scopeDepth=p.scopeDepth,this.isType=p.isType,this.identifierRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}}function V(){p.tokens.push(new K),se()}function H(){p.tokens.push(new K),p.start=p.pos,function(){for(;;){if(p.pos>=u.length)return void A("Unterminated template");const e=u.charCodeAt(p.pos);if(e===s.graveAccent||e===s.dollarSign&&u.charCodeAt(p.pos+1)===s.leftCurlyBrace)return p.pos===p.start&&J(n.template)?e===s.dollarSign?(p.pos+=2,void ae(n.dollarBraceL)):(++p.pos,void ae(n.backQuote)):void ae(n.template);e===s.backslash&&p.pos++,p.pos++}}()}function U(){p.type===n.assign&&--p.pos,function(){const e=p.pos;let t=!1,o=!1;for(;;){if(p.pos>=u.length)return void A("Unterminated regular expression",e);const n=u.charCodeAt(p.pos);if(t)t=!1;else{if(n===s.leftSquareBracket)o=!0;else if(n===s.rightSquareBracket&&o)o=!1;else if(n===s.slash&&!o)break;t=n===s.backslash}++p.pos}++p.pos,function(){for(;p.pos<u.length;){const e=u.charCodeAt(p.pos);if(R[e])p.pos++;else{if(e!==s.backslash)break;if(p.pos+=2,u.charCodeAt(p.pos)===s.leftCurlyBrace){for(;p.pos<u.length&&u.charCodeAt(p.pos)!==s.rightCurlyBrace;)p.pos++;p.pos++}}}}(),ae(n.regexp)}()}function W(e){for(let t=p.tokens.length-e;t<p.tokens.length;t++)p.tokens[t].isType=!0;const t=p.isType;return p.isType=!0,t}function z(e){p.isType=e}function X(e){return!!J(e)&&(V(),!0)}function G(e){const t=p.isType;p.isType=!0,X(e),p.isType=t}function J(e){return p.type===e}function Y(){const e=p.snapshot();V();const t=p.type;return p.restoreFromSnapshot(e),t}class Q{constructor(e,t){this.type=e,this.contextualKeyword=t}}function Z(){const e=p.snapshot();V();const t=p.type,n=p.contextualKeyword;return p.restoreFromSnapshot(e),new Q(t,n)}function ee(){return te(p.pos)}function te(e){S.lastIndex=e;return e+S.exec(u)[0].length}function ne(){return u.charCodeAt(ee())}function se(){if(ie(),p.start=p.pos,p.pos>=u.length){const e=p.tokens;return e.length>=2&&e[e.length-1].start>=u.length&&e[e.length-2].start>=u.length&&A("Unexpectedly reached the end of input."),void ae(n.eof)}var e;e=u.charCodeAt(p.pos),O[e]||e===s.backslash||e===s.atSign&&u.charCodeAt(p.pos+1)===s.atSign?function(){let e=0,t=0,o=p.pos;for(;o<u.length&&(t=u.charCodeAt(o),!(t<s.lowercaseA||t>s.lowercaseZ));){const n=P[e+(t-s.lowercaseA)+1];if(-1===n)break;e=n,o++}const r=P[e];if(r>-1&&!R[t])return p.pos=o,void(1&r?ae(r>>>1):ae(n.name,r>>>1));for(;o<u.length;){const e=u.charCodeAt(o);if(R[e])o++;else if(e===s.backslash){if(o+=2,u.charCodeAt(o)===s.leftCurlyBrace){for(;o<u.length&&u.charCodeAt(o)!==s.rightCurlyBrace;)o++;o++}}else{if(e!==s.atSign||u.charCodeAt(o+1)!==s.atSign)break;o+=2}}p.pos=o,ae(n.name)}():ce(e)}function oe(){for(;u.charCodeAt(p.pos)!==s.asterisk||u.charCodeAt(p.pos+1)!==s.slash;)if(p.pos++,p.pos>u.length)return void A("Unterminated comment",p.pos-2);p.pos+=2}function re(e){let t=u.charCodeAt(p.pos+=e);if(p.pos<u.length)for(;t!==s.lineFeed&&t!==s.carriageReturn&&t!==s.lineSeparator&&t!==s.paragraphSeparator&&++p.pos<u.length;)t=u.charCodeAt(p.pos)}function ie(){for(;p.pos<u.length;){const e=u.charCodeAt(p.pos);switch(e){case s.carriageReturn:u.charCodeAt(p.pos+1)===s.lineFeed&&++p.pos;case s.lineFeed:case s.lineSeparator:case s.paragraphSeparator:++p.pos;break;case s.slash:switch(u.charCodeAt(p.pos+1)){case s.asterisk:p.pos+=2,oe();break;case s.slash:re(2);break;default:return}break;default:if(!N[e])return;++p.pos}}}function ae(e,n=t.NONE){p.end=p.pos,p.type=e,p.contextualKeyword=n}function ce(e){switch(e){case s.numberSign:return++p.pos,void ae(n.hash);case s.dot:return void function(){const e=u.charCodeAt(p.pos+1);e>=s.digit0&&e<=s.digit9?pe(!0):e===s.dot&&u.charCodeAt(p.pos+2)===s.dot?(p.pos+=3,ae(n.ellipsis)):(++p.pos,ae(n.dot))}();case s.leftParenthesis:return++p.pos,void ae(n.parenL);case s.rightParenthesis:return++p.pos,void ae(n.parenR);case s.semicolon:return++p.pos,void ae(n.semi);case s.comma:return++p.pos,void ae(n.comma);case s.leftSquareBracket:return++p.pos,void ae(n.bracketL);case s.rightSquareBracket:return++p.pos,void ae(n.bracketR);case s.leftCurlyBrace:return void(l&&u.charCodeAt(p.pos+1)===s.verticalBar?he(n.braceBarL,2):(++p.pos,ae(n.braceL)));case s.rightCurlyBrace:return++p.pos,void ae(n.braceR);case s.colon:return void(u.charCodeAt(p.pos+1)===s.colon?he(n.doubleColon,2):(++p.pos,ae(n.colon)));case s.questionMark:return void function(){const e=u.charCodeAt(p.pos+1),t=u.charCodeAt(p.pos+2);e!==s.questionMark||p.isType?e!==s.dot||t>=s.digit0&&t<=s.digit9?(++p.pos,ae(n.question)):(p.pos+=2,ae(n.questionDot)):t===s.equalsTo?he(n.assign,3):he(n.nullishCoalescing,2)}();case s.atSign:return++p.pos,void ae(n.at);case s.graveAccent:return++p.pos,void ae(n.backQuote);case s.digit0:{const e=u.charCodeAt(p.pos+1);if(e===s.lowercaseX||e===s.uppercaseX||e===s.lowercaseO||e===s.uppercaseO||e===s.lowercaseB||e===s.uppercaseB)return void function(){let e=!1;const t=p.pos;p.pos+=2,le();const o=u.charCodeAt(p.pos);o===s.lowercaseN?(++p.pos,e=!0):o===s.lowercaseM&&A("Invalid decimal",t);if(e)return void ae(n.bigint);ae(n.num)}()}case s.digit1:case s.digit2:case s.digit3:case s.digit4:case s.digit5:case s.digit6:case s.digit7:case s.digit8:case s.digit9:return void pe(!1);case s.quotationMark:case s.apostrophe:return void function(e){for(p.pos++;;){if(p.pos>=u.length)return void A("Unterminated string constant");const t=u.charCodeAt(p.pos);if(t===s.backslash)p.pos++;else if(t===e)break;p.pos++}p.pos++,ae(n.string)}(e);case s.slash:return void(u.charCodeAt(p.pos+1)===s.equalsTo?he(n.assign,2):he(n.slash,1));case s.percentSign:case s.asterisk:return void function(e){let t=e===s.asterisk?n.star:n.modulo,o=1,r=u.charCodeAt(p.pos+1);e===s.asterisk&&r===s.asterisk&&(o++,r=u.charCodeAt(p.pos+2),t=n.exponent),r===s.equalsTo&&u.charCodeAt(p.pos+2)!==s.greaterThan&&(o++,t=n.assign),he(t,o)}(e);case s.verticalBar:case s.ampersand:return void function(e){const t=u.charCodeAt(p.pos+1);if(t!==e){if(e===s.verticalBar){if(t===s.greaterThan)return void he(n.pipeline,2);if(t===s.rightCurlyBrace&&l)return void he(n.braceBarR,2)}t!==s.equalsTo?he(e===s.verticalBar?n.bitwiseOR:n.bitwiseAND,1):he(n.assign,2)}else u.charCodeAt(p.pos+2)===s.equalsTo?he(n.assign,3):he(e===s.verticalBar?n.logicalOR:n.logicalAND,2)}(e);case s.caret:return void(u.charCodeAt(p.pos+1)===s.equalsTo?he(n.assign,2):he(n.bitwiseXOR,1));case s.plusSign:case s.dash:return void function(e){const t=u.charCodeAt(p.pos+1);t!==e?t===s.equalsTo?he(n.assign,2):e===s.plusSign?he(n.plus,1):he(n.minus,1):he(n.preIncDec,2)}(e);case s.lessThan:case s.greaterThan:return void function(e){const t=u.charCodeAt(p.pos+1);if(t===e){const t=e===s.greaterThan&&u.charCodeAt(p.pos+2)===s.greaterThan?3:2;return u.charCodeAt(p.pos+t)===s.equalsTo?void he(n.assign,t+1):e===s.greaterThan&&p.isType?void he(n.greaterThan,1):void he(n.bitShift,t)}t===s.equalsTo?he(n.relationalOrEqual,2):e===s.lessThan?he(n.lessThan,1):he(n.greaterThan,1)}(e);case s.equalsTo:case s.exclamationMark:return void function(e){const t=u.charCodeAt(p.pos+1);if(t!==s.equalsTo)return e===s.equalsTo&&t===s.greaterThan?(p.pos+=2,void ae(n.arrow)):void he(e===s.equalsTo?n.eq:n.bang,1);he(n.equality,u.charCodeAt(p.pos+2)===s.equalsTo?3:2)}(e);case s.tilde:return void he(n.tilde,1)}A(\`Unexpected character '\${String.fromCharCode(e)}'\`,p.pos)}function he(e,t){p.pos+=t,ae(e)}function le(){for(;;){const e=u.charCodeAt(p.pos);if(!(e>=s.digit0&&e<=s.digit9||e>=s.lowercaseA&&e<=s.lowercaseF||e>=s.uppercaseA&&e<=s.uppercaseF||e===s.underscore))break;p.pos++}}function pe(e){let t=!1,o=!1;e||le();let r=u.charCodeAt(p.pos);r===s.dot&&(++p.pos,le(),r=u.charCodeAt(p.pos)),r!==s.uppercaseE&&r!==s.lowercaseE||(r=u.charCodeAt(++p.pos),r!==s.plusSign&&r!==s.dash||++p.pos,le(),r=u.charCodeAt(p.pos)),r===s.lowercaseN?(++p.pos,t=!0):r===s.lowercaseM&&(++p.pos,o=!0),ae(t?n.bigint:o?n.decimal:n.num)}const ue={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};function fe(e){const[t,n]=de(e.jsxPragma||"React.createElement"),[s,o]=de(e.jsxFragmentPragma||"React.Fragment");return{base:t,suffix:n,fragmentBase:s,fragmentSuffix:o}}function de(e){let t=e.indexOf(".");return-1===t&&(t=e.length),[e.slice(0,t),e.slice(t)]}class me{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}const ke=/^[\\da-fA-F]+\$/,_e=/^\\d+\$/;class ge extends me{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}constructor(e,t,n,s,o){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.nameManager=s,this.options=o,ge.prototype.__init.call(this),ge.prototype.__init2.call(this),ge.prototype.__init3.call(this),this.jsxPragmaInfo=fe(o)}process(){return!!this.tokens.matches1(n.jsxTagStart)&&(this.processJSXTag(),!0)}getPrefixCode(){return this.filenameVarName?\`const \${this.filenameVarName} = \${JSON.stringify(this.options.filePath||"")};\`:""}getLineNumberForIndex(e){const t=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<t.length;)"\\n"===t[this.lastIndex]&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}processProps(e){const t=this.getLineNumberForIndex(e),s=this.options.production?"":\`__self: this, __source: {fileName: \${this.getFilenameVarName()}, lineNumber: \${t}}\`;if(this.tokens.matches1(n.jsxName)||this.tokens.matches1(n.braceL)){for(this.tokens.appendCode(", {");;){if(this.tokens.matches2(n.jsxName,n.eq))this.processPropKeyName(),this.tokens.replaceToken(": "),this.tokens.matches1(n.braceL)?(this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")):this.tokens.matches1(n.jsxTagStart)?this.processJSXTag():this.processStringPropValue();else if(this.tokens.matches1(n.jsxName))this.processPropKeyName(),this.tokens.appendCode(": true");else{if(!this.tokens.matches1(n.braceL))break;this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")}this.tokens.appendCode(",")}s?this.tokens.appendCode(\` \${s}}\`):this.tokens.appendCode("}")}else s?this.tokens.appendCode(\`, {\${s}}\`):this.tokens.appendCode(", null")}processPropKeyName(){const e=this.tokens.identifierName();e.includes("-")?this.tokens.replaceToken(\`'\${e}'\`):this.tokens.copyToken()}processStringPropValue(){const e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start+1,e.end-1),n=Te(t),s=function(e){let t="";for(let n=0;n<e.length;n++){const s=e[n];if("\\n"===s)if(/\\s/.test(e[n+1]))for(t+=" ";n<e.length&&/\\s/.test(e[n+1]);)n++;else t+="\\n";else if("&"===s){const{entity:s,newI:o}=xe(e,n+1);t+=s,n=o-1}else t+=s}return JSON.stringify(t)}(t);this.tokens.replaceToken(s+n)}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,n.jsxName,n.jsxName)&&!this.tokens.matches2AtIndex(e-1,n.greaterThan,n.jsxName)&&!this.tokens.matches1AtIndex(e,n.braceL)&&!this.tokens.matches1AtIndex(e,n.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,n.slash,n.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){const e=this.tokens.identifierName();ye(e)&&this.tokens.replaceToken(\`'\${e}'\`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processChildren(){for(;;){if(this.tokens.matches2(n.jsxTagStart,n.slash))return;if(this.tokens.matches1(n.braceL))this.tokens.matches2(n.braceL,n.braceR)?(this.tokens.replaceToken(""),this.tokens.replaceToken("")):(this.tokens.replaceToken(", "),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(""));else if(this.tokens.matches1(n.jsxTagStart))this.tokens.appendCode(", "),this.processJSXTag();else{if(!this.tokens.matches1(n.jsxText))throw new Error("Unexpected token when processing JSX children.");this.processChildTextElement()}}}processChildTextElement(){const e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start,e.end),n=Te(t),s=function(e){let t="",n="",s=!1,o=!1;for(let r=0;r<e.length;r++){const i=e[r];if(" "===i||"\\t"===i||"\\r"===i)s||(n+=i);else if("\\n"===i)n="",s=!0;else{if(o&&s&&(t+=" "),t+=n,n="","&"===i){const{entity:n,newI:s}=xe(e,r+1);r=s-1,t+=n}else t+=i;o=!0,s=!1}}s||(t+=n);return JSON.stringify(t)}(t);'""'===s?this.tokens.replaceToken(n):this.tokens.replaceToken(\`, \${s}\${n}\`)}processJSXTag(){const{jsxPragmaInfo:e}=this,t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base,s=this.tokens.currentToken().start;if(this.tokens.replaceToken(\`\${t}\${e.suffix}(\`),this.tokens.matches1(n.jsxTagEnd)){const t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase;for(this.tokens.replaceToken(\`\${t}\${e.fragmentSuffix}, null\`),this.processChildren();!this.tokens.matches1(n.jsxTagEnd);)this.tokens.replaceToken("");this.tokens.replaceToken(")")}else if(this.processTagIntro(),this.processProps(s),this.tokens.matches2(n.slash,n.jsxTagEnd))this.tokens.replaceToken(""),this.tokens.replaceToken(")");else{if(!this.tokens.matches1(n.jsxTagEnd))throw new Error("Expected either /> or > at the end of the tag.");for(this.tokens.replaceToken(""),this.processChildren();!this.tokens.matches1(n.jsxTagEnd);)this.tokens.replaceToken("");this.tokens.replaceToken(")")}}}function ye(e){const t=e.charCodeAt(0);return t>=s.lowercaseA&&t<=s.lowercaseZ}function Te(e){let t=0,n=0;for(const s of e)"\\n"===s?(t++,n=0):" "===s&&n++;return"\\n".repeat(t)+" ".repeat(n)}function xe(e,t){let n,s="",o=0,r=t;for(;r<e.length&&o++<10;){const t=e[r];if(r++,";"===t){"#"===s[0]?"x"===s[1]?(s=s.substr(2),ke.test(s)&&(n=String.fromCodePoint(parseInt(s,16)))):(s=s.substr(1),_e.test(s)&&(n=String.fromCodePoint(parseInt(s,10)))):n=ue[s];break}s+=t}return n?{entity:n,newI:r}:{entity:"&",newI:t}}function be(e,t){const s=fe(t),o=new Set;for(let t=0;t<e.tokens.length;t++){const r=e.tokens[t];if(r.type!==n.name||r.isType||r.identifierRole!==j.Access&&r.identifierRole!==j.ObjectShorthand&&r.identifierRole!==j.ExportAccess||r.shadowsGlobal||o.add(e.identifierNameForToken(r)),r.type===n.jsxTagStart&&o.add(s.base),r.type===n.jsxTagStart&&t+1<e.tokens.length&&e.tokens[t+1].type===n.jsxTagEnd&&(o.add(s.base),o.add(s.fragmentBase)),r.type===n.jsxName&&r.identifierRole===j.Access){ye(e.identifierNameForToken(r))&&e.tokens[t+1].type!==n.dot||o.add(e.identifierNameForToken(r))}}return o}class Ie{__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,s,o,r){this.nameManager=e,this.tokens=t,this.enableLegacyTypeScriptModuleInterop=n,this.options=s,this.isTypeScriptTransformEnabled=o,this.helperManager=r,Ie.prototype.__init.call(this),Ie.prototype.__init2.call(this),Ie.prototype.__init3.call(this),Ie.prototype.__init4.call(this),Ie.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,n._import)&&!this.tokens.matches3AtIndex(e,n._import,n.name,n.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,n._export)&&!this.tokens.matches2AtIndex(e,n._export,n.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=be(this.tokens,this.options);for(const[e,t]of this.importInfoByPath.entries()){if(t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0)continue;[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.isTypeName(e))&&this.importsToReplace.set(e,"")}}isTypeName(e){return this.isTypeScriptTransformEnabled&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(const[e,t]of this.importInfoByPath.entries()){const{defaultNames:n,wildcardNames:s,namedImports:o,namedExports:r,exportStarNames:i,hasStarExport:a}=t;if(0===n.length&&0===s.length&&0===o.length&&0===r.length&&0===i.length&&!a){this.importsToReplace.set(e,\`require('\${e}');\`);continue}const c=this.getFreeIdentifierForPath(e);let h;h=this.enableLegacyTypeScriptModuleInterop?c:s.length>0?s[0]:this.getFreeIdentifierForPath(e);let l=\`var \${c} = require('\${e}');\`;if(s.length>0)for(const e of s){l+=\` var \${e} = \${this.enableLegacyTypeScriptModuleInterop?c:\`\${this.helperManager.getHelperName("interopRequireWildcard")}(\${c})\`};\`}else i.length>0&&h!==c?l+=\` var \${h} = \${this.helperManager.getHelperName("interopRequireWildcard")}(\${c});\`:n.length>0&&h!==c&&(l+=\` var \${h} = \${this.helperManager.getHelperName("interopRequireDefault")}(\${c});\`);for(const{importedName:e,localName:t}of r)l+=\` \${this.helperManager.getHelperName("createNamedExportFrom")}(\${c}, '\${t}', '\${e}');\`;for(const e of i)l+=\` exports.\${e} = \${h};\`;a&&(l+=\` \${this.helperManager.getHelperName("createStarExport")}(\${c});\`),this.importsToReplace.set(e,l);for(const e of n)this.identifierReplacements.set(e,h+".default");for(const{importedName:e,localName:t}of o)this.identifierReplacements.set(t,\`\${c}.\${e}\`)}}getFreeIdentifierForPath(e){const t=e.split("/"),n=t[t.length-1].replace(/\\W/g,"");return this.nameManager.claimFreeName("_"+n)}preprocessImportAtIndex(e){const s=[],o=[],r=[];if(e++,(this.tokens.matchesContextualAtIndex(e,t._type)||this.tokens.matches1AtIndex(e,n._typeof))&&!this.tokens.matches1AtIndex(e+1,n.comma)&&!this.tokens.matchesContextualAtIndex(e+1,t._from))return;if(this.tokens.matches1AtIndex(e,n.parenL))return;if(this.tokens.matches1AtIndex(e,n.name)&&(s.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,n.comma)&&e++),this.tokens.matches1AtIndex(e,n.star)&&(e+=2,o.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,n.braceL)){const t=this.getNamedImports(e+1);e=t.newIndex;for(const e of t.namedImports)"default"===e.importedName?s.push(e.localName):r.push(e)}if(this.tokens.matchesContextualAtIndex(e,t._from)&&e++,!this.tokens.matches1AtIndex(e,n.string))throw new Error("Expected string token at the end of import statement.");const i=this.tokens.stringValueAtIndex(e),a=this.getImportInfo(i);a.defaultNames.push(...s),a.wildcardNames.push(...o),a.namedImports.push(...r),0===s.length&&0===o.length&&0===r.length&&(a.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,n._export,n._var)||this.tokens.matches2AtIndex(e,n._export,n._let)||this.tokens.matches2AtIndex(e,n._export,n._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,n._export,n._function)||this.tokens.matches2AtIndex(e,n._export,n._class)){const t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,n._export,n.name,n._function)){const t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,n._export,n.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,n._export,n.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let s=e+2;;s++)if(this.tokens.matches1AtIndex(s,n.braceL)||this.tokens.matches1AtIndex(s,n.dollarBraceL)||this.tokens.matches1AtIndex(s,n.bracketL))t++;else if(this.tokens.matches1AtIndex(s,n.braceR)||this.tokens.matches1AtIndex(s,n.bracketR))t--;else{if(0===t&&!this.tokens.matches1AtIndex(s,n.name))break;if(this.tokens.matches1AtIndex(1,n.eq)){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");s=e-1}else{if(D(this.tokens.tokens[s])){const e=this.tokens.identifierNameAtIndex(s);this.identifierReplacements.set(e,"exports."+e)}}}}preprocessNamedExportAtIndex(e){e+=2;const{newIndex:s,namedImports:o}=this.getNamedImports(e);if(e=s,!this.tokens.matchesContextualAtIndex(e,t._from)){for(const{importedName:e,localName:t}of o)this.addExportBinding(e,t);return}if(e++,!this.tokens.matches1AtIndex(e,n.string))throw new Error("Expected string token at the end of import statement.");const r=this.tokens.stringValueAtIndex(e);this.getImportInfo(r).namedExports.push(...o)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,n._export,n.star,n._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,n.string))throw new Error("Expected string token at the end of star export statement.");const s=this.tokens.stringValueAtIndex(e),o=this.getImportInfo(s);null!==t?o.exportStarNames.push(t):o.hasStarExport=!0}getNamedImports(e){const s=[];for(;;){if(this.tokens.matches1AtIndex(e,n.braceR)){e++;break}let o=!1;(this.tokens.matchesContextualAtIndex(e,t._type)||this.tokens.matches1AtIndex(e,n._typeof))&&this.tokens.matches1AtIndex(e+1,n.name)&&!this.tokens.matchesContextualAtIndex(e+1,t._as)&&(o=!0,e++);const r=this.tokens.identifierNameAtIndex(e);let i;if(e++,this.tokens.matchesContextualAtIndex(e,t._as)?(e++,i=this.tokens.identifierNameAtIndex(e),e++):i=r,o||s.push({importedName:r,localName:i}),this.tokens.matches2AtIndex(e,n.comma,n.braceR)){e+=2;break}if(this.tokens.matches1AtIndex(e,n.braceR)){e++;break}if(!this.tokens.matches1AtIndex(e,n.comma))throw new Error("Unexpected token: "+JSON.stringify(this.tokens.tokens[e]));e++}return{newIndex:e,namedImports:s}}getImportInfo(e){const t=this.importInfoByPath.get(e);if(t)return t;const 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){const t=this.importsToReplace.get(e);return this.importsToReplace.set(e,""),t||""}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){const 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()])}}function ve(e,t,{compiledFilename:n}){let o="AAAA";for(let t=0;t<e.length;t++)e.charCodeAt(t)===s.lineFeed&&(o+=";AACA");return{version:3,file:n||"",sources:[t],mappings:o,names:[]}}const we={interopRequireWildcard:"\\n function interopRequireWildcard(obj) {\\n if (obj && obj.__esModule) {\\n return obj;\\n } else {\\n var newObj = {};\\n if (obj != null) {\\n for (var key in obj) {\\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\\n newObj[key] = obj[key];\\n }\\n }\\n }\\n newObj.default = obj;\\n return newObj;\\n }\\n }\\n ",interopRequireDefault:"\\n function interopRequireDefault(obj) {\\n return obj && obj.__esModule ? obj : { default: obj };\\n }\\n ",createNamedExportFrom:"\\n function createNamedExportFrom(obj, localName, importedName) {\\n Object.defineProperty(exports, localName, {enumerable: true, get: () => obj[importedName]});\\n }\\n ",createStarExport:'\\n function createStarExport(obj) {\\n Object.keys(obj)\\n .filter((key) => key !== "default" && key !== "__esModule")\\n .forEach((key) => {\\n if (exports.hasOwnProperty(key)) {\\n return;\\n }\\n Object.defineProperty(exports, key, {enumerable: true, get: () => obj[key]});\\n });\\n }\\n ',nullishCoalesce:"\\n function nullishCoalesce(lhs, rhsFn) {\\n if (lhs != null) {\\n return lhs;\\n } else {\\n return rhsFn();\\n }\\n }\\n ",asyncNullishCoalesce:"\\n async function asyncNullishCoalesce(lhs, rhsFn) {\\n if (lhs != null) {\\n return lhs;\\n } else {\\n return await rhsFn();\\n }\\n }\\n ",optionalChain:"\\n function optionalChain(ops) {\\n let lastAccessLHS = undefined;\\n let value = ops[0];\\n let i = 1;\\n while (i < ops.length) {\\n const op = ops[i];\\n const fn = ops[i + 1];\\n i += 2;\\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\\n return undefined;\\n }\\n if (op === 'access' || op === 'optionalAccess') {\\n lastAccessLHS = value;\\n value = fn(value);\\n } else if (op === 'call' || op === 'optionalCall') {\\n value = fn((...args) => value.call(lastAccessLHS, ...args));\\n lastAccessLHS = undefined;\\n }\\n }\\n return value;\\n }\\n ",asyncOptionalChain:"\\n async function asyncOptionalChain(ops) {\\n let lastAccessLHS = undefined;\\n let value = ops[0];\\n let i = 1;\\n while (i < ops.length) {\\n const op = ops[i];\\n const fn = ops[i + 1];\\n i += 2;\\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\\n return undefined;\\n }\\n if (op === 'access' || op === 'optionalAccess') {\\n lastAccessLHS = value;\\n value = await fn(value);\\n } else if (op === 'call' || op === 'optionalCall') {\\n value = await fn((...args) => value.call(lastAccessLHS, ...args));\\n lastAccessLHS = undefined;\\n }\\n }\\n return value;\\n }\\n ",optionalChainDelete:"\\n function optionalChainDelete(ops) {\\n const result = OPTIONAL_CHAIN_NAME(ops);\\n return result == null ? true : result;\\n }\\n ",asyncOptionalChainDelete:"\\n async function asyncOptionalChainDelete(ops) {\\n const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\\n return result == null ? true : result;\\n }\\n "};class Ce{__init(){this.helperNames={}}constructor(e){this.nameManager=e,Ce.prototype.__init.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName("_"+e),this.helperNames[e]=t,t)}emitHelpers(){let e="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[t,n]of Object.entries(we)){const s=this.helperNames[t];let o=n;"optionalChainDelete"===t?o=o.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):"asyncOptionalChainDelete"===t&&(o=o.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain)),s&&(e+=" ",e+=o.replace(t,s).replace(/\\s+/g," ").trim())}return e}}function Ae(e,t,s){(function(e,t){for(const s of e.tokens)if(s.type===n.name&&q(s)&&t.has(e.identifierNameForToken(s)))return!0;return!1})(e,s)&&function(e,t,s){const o=[];let r=t.length-1;for(let i=e.tokens.length-1;;i--){for(;o.length>0&&o[o.length-1].startTokenIndex===i+1;)o.pop();for(;r>=0&&t[r].endTokenIndex===i+1;)o.push(t[r]),r--;if(i<0)break;const a=e.tokens[i],c=e.identifierNameForToken(a);if(o.length>1&&a.type===n.name&&s.has(c))if(B(a))Ee(o[o.length-1],e,c);else if(\$(a)){let t=o.length-1;for(;t>0&&!o[t].isFunctionScope;)t--;if(t<0)throw new Error("Did not find parent function scope.");Ee(o[t],e,c)}}if(o.length>0)throw new Error("Expected empty scope stack after processing file.")}(e,t,s)}function Ee(e,t,s){for(let o=e.startTokenIndex;o<e.endTokenIndex;o++){const e=t.tokens[o];e.type!==n.name&&e.type!==n.jsxName||t.identifierNameForToken(e)!==s||(e.shadowsGlobal=!0)}}class Se{__init(){this.usedNames=new Set}constructor(e,t){Se.prototype.__init.call(this),this.usedNames=new Set(function(e,t){const s=[];for(const o of t)o.type===n.name&&s.push(e.slice(o.start,o.end));return s}(e,t))}claimFreeName(e){const 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 Ne="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Le(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Re(e,t){return e(t={exports:{}},t.exports),t.exports}var Oe=Re((function(e,t){var n,s=Ne&&Ne.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function s(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)});Object.defineProperty(t,"__esModule",{value:!0}),t.DetailContext=t.NoopContext=t.VError=void 0;var o=function(e){function t(n,s){var o=e.call(this,s)||this;return o.path=n,Object.setPrototypeOf(o,t.prototype),o}return s(t,e),t}(Error);t.VError=o;var r=function(){function e(){}return e.prototype.fail=function(e,t,n){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();t.NoopContext=r;var i=function(){function e(){this._propNames=[""],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,n){return this._propNames.push(e),this._messages.push(t),this._score+=n,!1},e.prototype.unionResolver=function(){return new a},e.prototype.resolveUnion=function(e){for(var t,n,s=null,o=0,r=e.contexts;o<r.length;o++){var i=r[o];(!s||i._score>=s._score)&&(s=i)}s&&s._score>0&&((t=this._propNames).push.apply(t,s._propNames),(n=this._messages).push.apply(n,s._messages))},e.prototype.getError=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var s=this._propNames[n];e+="number"==typeof s?"["+s+"]":s?"."+s:"";var r=this._messages[n];r&&t.push(e+" "+r)}return new o(e,t.join("; "))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var s=this._propNames[n];e+="number"==typeof s?"["+s+"]":s?"."+s:"";var o=this._messages[n];o&&t.push({path:e,message:o})}var r=null;for(n=t.length-1;n>=0;n--)r&&(t[n].nested=[r]),r=t[n];return r},e}();t.DetailContext=i;var a=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new i;return this.contexts.push(e),e},e}()}));Le(Oe),Oe.DetailContext,Oe.NoopContext,Oe.VError;var Pe=Re((function(e,t){var n,s=Ne&&Ne.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function s(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)});Object.defineProperty(t,"__esModule",{value:!0}),t.basicTypes=t.BasicType=t.TParamList=t.TParam=t.param=t.TFunc=t.func=t.TProp=t.TOptional=t.opt=t.TIface=t.iface=t.TEnumLiteral=t.enumlit=t.TEnumType=t.enumtype=t.TIntersection=t.intersection=t.TUnion=t.union=t.TTuple=t.tuple=t.TArray=t.array=t.TLiteral=t.lit=t.TName=t.name=t.TType=void 0;var o=function(){};function r(e){return"string"==typeof e?a(e):e}function i(e,t){var n=e[t];if(!n)throw new Error("Unknown type "+t);return n}function a(e){return new c(e)}t.TType=o,t.name=a;var c=function(e){function t(t){var n=e.call(this)||this;return n.name=t,n._failMsg="is not a "+t,n}return s(t,e),t.prototype.getChecker=function(e,n,s){var o=this,r=i(e,this.name),a=r.getChecker(e,n,s);return r instanceof I||r instanceof t?a:function(e,t){return!!a(e,t)||t.fail(null,o._failMsg,0)}},t}(o);t.TName=c,t.lit=function(e){return new h(e)};var h=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n.name=JSON.stringify(t),n._failMsg="is not "+n.name,n}return s(t,e),t.prototype.getChecker=function(e,t){var n=this;return function(e,t){return e===n.value||t.fail(null,n._failMsg,-1)}},t}(o);t.TLiteral=h,t.array=function(e){return new l(r(e))};var l=function(e){function t(t){var n=e.call(this)||this;return n.ttype=t,n}return s(t,e),t.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var s=0;s<e.length;s++){if(!n(e[s],t))return t.fail(s,null,1)}return!0}},t}(o);t.TArray=l,t.tuple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new p(e.map((function(e){return r(e)})))};var p=function(e){function t(t){var n=e.call(this)||this;return n.ttypes=t,n}return s(t,e),t.prototype.getChecker=function(e,t){var n=this.ttypes.map((function(n){return n.getChecker(e,t)})),s=function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var s=0;s<n.length;s++){if(!n[s](e[s],t))return t.fail(s,null,1)}return!0};return t?function(e,t){return!!s(e,t)&&(e.length<=n.length||t.fail(n.length,"is extraneous",2))}:s},t}(o);t.TTuple=p,t.union=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new u(e.map((function(e){return r(e)})))};var u=function(e){function t(t){var n=e.call(this)||this;n.ttypes=t;var s=t.map((function(e){return e instanceof c||e instanceof h?e.name:null})).filter((function(e){return e})),o=t.length-s.length;return s.length?(o>0&&s.push(o+" more"),n._failMsg="is none of "+s.join(", ")):n._failMsg="is none of "+o+" types",n}return s(t,e),t.prototype.getChecker=function(e,t){var n=this,s=this.ttypes.map((function(n){return n.getChecker(e,t)}));return function(e,t){for(var o=t.unionResolver(),r=0;r<s.length;r++){if(s[r](e,o.createContext()))return!0}return t.resolveUnion(o),t.fail(null,n._failMsg,0)}},t}(o);t.TUnion=u,t.intersection=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new f(e.map((function(e){return r(e)})))};var f=function(e){function t(t){var n=e.call(this)||this;return n.ttypes=t,n}return s(t,e),t.prototype.getChecker=function(e,t){var n=new Set,s=this.ttypes.map((function(s){return s.getChecker(e,t,n)}));return function(e,t){return!!s.every((function(n){return n(e,t)}))||t.fail(null,null,0)}},t}(o);t.TIntersection=f,t.enumtype=function(e){return new d(e)};var d=function(e){function t(t){var n=e.call(this)||this;return n.members=t,n.validValues=new Set,n._failMsg="is not a valid enum value",n.validValues=new Set(Object.keys(t).map((function(e){return t[e]}))),n}return s(t,e),t.prototype.getChecker=function(e,t){var n=this;return function(e,t){return!!n.validValues.has(e)||t.fail(null,n._failMsg,0)}},t}(o);t.TEnumType=d,t.enumlit=function(e,t){return new m(e,t)};var m=function(e){function t(t,n){var s=e.call(this)||this;return s.enumName=t,s.prop=n,s._failMsg="is not "+t+"."+n,s}return s(t,e),t.prototype.getChecker=function(e,t){var n=this,s=i(e,this.enumName);if(!(s instanceof d))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var o=s.members[this.prop];if(!s.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(e,t){return e===o||t.fail(null,n._failMsg,-1)}},t}(o);function k(e){return Object.keys(e).map((function(t){return function(e,t){return t instanceof g?new y(e,t.ttype,!0):new y(e,r(t),!1)}(t,e[t])}))}t.TEnumLiteral=m,t.iface=function(e,t){return new _(e,k(t))};var _=function(e){function t(t,n){var s=e.call(this)||this;return s.bases=t,s.props=n,s.propSet=new Set(n.map((function(e){return e.name}))),s}return s(t,e),t.prototype.getChecker=function(e,t,n){var s=this,o=this.bases.map((function(n){return i(e,n).getChecker(e,t)})),r=this.props.map((function(n){return n.ttype.getChecker(e,t)})),a=new Oe.NoopContext,c=this.props.map((function(e,t){return!e.isOpt&&!r[t](void 0,a)})),h=function(e,t){if("object"!=typeof e||null===e)return t.fail(null,"is not an object",0);for(var n=0;n<o.length;n++)if(!o[n](e,t))return!1;for(n=0;n<r.length;n++){var i=s.props[n].name,a=e[i];if(void 0===a){if(c[n])return t.fail(i,"is missing",1)}else if(!r[n](a,t))return t.fail(i,null,1)}return!0};if(!t)return h;var l=this.propSet;return n&&(this.propSet.forEach((function(e){return n.add(e)})),l=n),function(e,t){if(!h(e,t))return!1;for(var n in e)if(!l.has(n))return t.fail(n,"is extraneous",2);return!0}},t}(o);t.TIface=_,t.opt=function(e){return new g(r(e))};var g=function(e){function t(t){var n=e.call(this)||this;return n.ttype=t,n}return s(t,e),t.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){return void 0===e||n(e,t)}},t}(o);t.TOptional=g;var y=function(e,t,n){this.name=e,this.ttype=t,this.isOpt=n};t.TProp=y,t.func=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new T(new b(t),r(e))};var T=function(e){function t(t,n){var s=e.call(this)||this;return s.paramList=t,s.result=n,s}return s(t,e),t.prototype.getChecker=function(e,t){return function(e,t){return"function"==typeof e||t.fail(null,"is not a function",0)}},t}(o);t.TFunc=T,t.param=function(e,t,n){return new x(e,r(t),Boolean(n))};var x=function(e,t,n){this.name=e,this.ttype=t,this.isOpt=n};t.TParam=x;var b=function(e){function t(t){var n=e.call(this)||this;return n.params=t,n}return s(t,e),t.prototype.getChecker=function(e,t){var n=this,s=this.params.map((function(n){return n.ttype.getChecker(e,t)})),o=new Oe.NoopContext,r=this.params.map((function(e,t){return!e.isOpt&&!s[t](void 0,o)})),i=function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var o=0;o<s.length;o++){var i=n.params[o];if(void 0===e[o]){if(r[o])return t.fail(i.name,"is missing",1)}else if(!s[o](e[o],t))return t.fail(i.name,null,1)}return!0};return t?function(e,t){return!!i(e,t)&&(e.length<=s.length||t.fail(s.length,"is extraneous",2))}:i},t}(o);t.TParamList=b;var I=function(e){function t(t,n){var s=e.call(this)||this;return s.validator=t,s.message=n,s}return s(t,e),t.prototype.getChecker=function(e,t){var n=this;return function(e,t){return!!n.validator(e)||t.fail(null,n.message,0)}},t}(o);t.BasicType=I,t.basicTypes={any:new I((function(e){return!0}),"is invalid"),number:new I((function(e){return"number"==typeof e}),"is not a number"),object:new I((function(e){return"object"==typeof e&&e}),"is not an object"),boolean:new I((function(e){return"boolean"==typeof e}),"is not a boolean"),string:new I((function(e){return"string"==typeof e}),"is not a string"),symbol:new I((function(e){return"symbol"==typeof e}),"is not a symbol"),void:new I((function(e){return null==e}),"is not void"),undefined:new I((function(e){return void 0===e}),"is not undefined"),null:new I((function(e){return null===e}),"is not null"),never:new I((function(e){return!1}),"is unexpected"),Date:new I(w("[object Date]"),"is not a Date"),RegExp:new I(w("[object RegExp]"),"is not a RegExp")};var v=Object.prototype.toString;function w(e){return function(t){return"object"==typeof t&&t&&v.call(t)===e}}"undefined"!=typeof Buffer&&(t.basicTypes.Buffer=new I((function(e){return Buffer.isBuffer(e)}),"is not a Buffer"));for(var C=function(e){t.basicTypes[e.name]=new I((function(t){return t instanceof e}),"is not a "+e.name)},A=0,E=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];A<E.length;A++){C(E[A])}}));Le(Pe),Pe.basicTypes,Pe.BasicType,Pe.TParamList,Pe.TParam,Pe.param,Pe.TFunc,Pe.func,Pe.TProp,Pe.TOptional,Pe.opt,Pe.TIface,Pe.iface,Pe.TEnumLiteral,Pe.enumlit,Pe.TEnumType,Pe.enumtype,Pe.TIntersection,Pe.intersection,Pe.TUnion,Pe.union,Pe.TTuple,Pe.tuple,Pe.TArray,Pe.array,Pe.TLiteral,Pe.lit,Pe.TName,Pe.name,Pe.TType;var je=Re((function(e,t){var n=Ne&&Ne.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var s=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],i=0,a=r.length;i<a;i++,o++)s[o]=r[i];return s};Object.defineProperty(t,"__esModule",{value:!0}),t.Checker=t.createCheckers=void 0;var s=Pe;Object.defineProperty(t,"TArray",{enumerable:!0,get:function(){return s.TArray}}),Object.defineProperty(t,"TEnumType",{enumerable:!0,get:function(){return s.TEnumType}}),Object.defineProperty(t,"TEnumLiteral",{enumerable:!0,get:function(){return s.TEnumLiteral}}),Object.defineProperty(t,"TFunc",{enumerable:!0,get:function(){return s.TFunc}}),Object.defineProperty(t,"TIface",{enumerable:!0,get:function(){return s.TIface}}),Object.defineProperty(t,"TLiteral",{enumerable:!0,get:function(){return s.TLiteral}}),Object.defineProperty(t,"TName",{enumerable:!0,get:function(){return s.TName}}),Object.defineProperty(t,"TOptional",{enumerable:!0,get:function(){return s.TOptional}}),Object.defineProperty(t,"TParam",{enumerable:!0,get:function(){return s.TParam}}),Object.defineProperty(t,"TParamList",{enumerable:!0,get:function(){return s.TParamList}}),Object.defineProperty(t,"TProp",{enumerable:!0,get:function(){return s.TProp}}),Object.defineProperty(t,"TTuple",{enumerable:!0,get:function(){return s.TTuple}}),Object.defineProperty(t,"TType",{enumerable:!0,get:function(){return s.TType}}),Object.defineProperty(t,"TUnion",{enumerable:!0,get:function(){return s.TUnion}}),Object.defineProperty(t,"TIntersection",{enumerable:!0,get:function(){return s.TIntersection}}),Object.defineProperty(t,"array",{enumerable:!0,get:function(){return s.array}}),Object.defineProperty(t,"enumlit",{enumerable:!0,get:function(){return s.enumlit}}),Object.defineProperty(t,"enumtype",{enumerable:!0,get:function(){return s.enumtype}}),Object.defineProperty(t,"func",{enumerable:!0,get:function(){return s.func}}),Object.defineProperty(t,"iface",{enumerable:!0,get:function(){return s.iface}}),Object.defineProperty(t,"lit",{enumerable:!0,get:function(){return s.lit}}),Object.defineProperty(t,"name",{enumerable:!0,get:function(){return s.name}}),Object.defineProperty(t,"opt",{enumerable:!0,get:function(){return s.opt}}),Object.defineProperty(t,"param",{enumerable:!0,get:function(){return s.param}}),Object.defineProperty(t,"tuple",{enumerable:!0,get:function(){return s.tuple}}),Object.defineProperty(t,"union",{enumerable:!0,get:function(){return s.union}}),Object.defineProperty(t,"intersection",{enumerable:!0,get:function(){return s.intersection}}),Object.defineProperty(t,"BasicType",{enumerable:!0,get:function(){return s.BasicType}});var o=Oe;Object.defineProperty(t,"VError",{enumerable:!0,get:function(){return o.VError}}),t.createCheckers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var s=Object.assign.apply(Object,n([{},Pe.basicTypes],e)),o={},i=0,a=e;i<a.length;i++)for(var c=a[i],h=0,l=Object.keys(c);h<l.length;h++){var p=l[h];o[p]=new r(s,c[p])}return o};var r=function(){function e(e,t,n){if(void 0===n&&(n="value"),this.suite=e,this.ttype=t,this._path=n,this.props=new Map,t instanceof Pe.TIface)for(var s=0,o=t.props;s<o.length;s++){var r=o[s];this.props.set(r.name,r.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new Oe.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new Oe.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var n=this.props.get(t);if(!n)throw new Error("Type has no property "+t);return new e(this.suite,n,this._path+"."+t)},e.prototype.methodArgs=function(t){var n=this._getMethod(t);return new e(this.suite,n.paramList)},e.prototype.methodResult=function(t){var n=this._getMethod(t);return new e(this.suite,n.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof Pe.TFunc))throw new Error("getArgs() applied to non-function");return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof Pe.TFunc))throw new Error("getResult() applied to non-function");return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new Oe.NoopContext)){var n=new Oe.DetailContext;throw e(t,n),n.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new Oe.NoopContext))return null;var n=new Oe.DetailContext;return e(t,n),n.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw new Error("Type has no property "+e);if(!(t instanceof Pe.TFunc))throw new Error("Property "+e+" is not a method");return t},e}();t.Checker=r}));Le(je),je.Checker;var De=je.createCheckers;je.TArray,je.TEnumType,je.TEnumLiteral,je.TFunc,je.TIface,je.TLiteral,je.TName,je.TOptional,je.TParam,je.TParamList,je.TProp,je.TTuple,je.TType,je.TUnion,je.TIntersection;var qe=je.array;je.enumlit,je.enumtype,je.func;var Fe=je.iface,Be=je.lit;je.name;var \$e=je.opt;je.param,je.tuple;var Me=je.union;je.intersection,je.BasicType,je.VError;const Ke={Transform:Me(Be("jsx"),Be("typescript"),Be("flow"),Be("imports"),Be("react-hot-loader"),Be("jest")),SourceMapOptions:Fe([],{compiledFilename:"string"}),Options:Fe([],{transforms:qe("Transform"),jsxPragma:\$e("string"),jsxFragmentPragma:\$e("string"),enableLegacyTypeScriptModuleInterop:\$e("boolean"),enableLegacyBabel5ModuleInterop:\$e("boolean"),sourceMapOptions:\$e("SourceMapOptions"),filePath:\$e("string"),production:\$e("boolean"),disableESTransforms:\$e("boolean")})},{Options:Ve}=De(Ke);function He(){V(),nn(!1)}function Ue(e){V(),Ge(e)}function We(e){Rn(),Xe(e)}function ze(){Rn(),p.tokens[p.tokens.length-1].identifierRole=j.ImportDeclaration}function Xe(e){let t;t=0===p.scopeDepth?j.TopLevelDeclaration:e?j.BlockScopedDeclaration:j.FunctionScopedDeclaration,p.tokens[p.tokens.length-1].identifierRole=t}function Ge(e){switch(p.type){case n._this:{const e=W(0);return V(),void z(e)}case n._yield:case n.name:return p.type=n.name,void We(e);case n.bracketL:return V(),void Je(n.bracketR,e,!0);case n.braceL:return void bn(!0,e);default:A()}}function Je(e,t,s=!1,o=!1,r=0){let i=!0,a=!1;const c=p.tokens.length;for(;!X(e)&&!p.error;)if(i?i=!1:(C(n.comma),p.tokens[p.tokens.length-1].contextId=r,!a&&p.tokens[c].isType&&(p.tokens[p.tokens.length-1].isType=!0,a=!0)),s&&J(n.comma));else{if(X(e))break;if(J(n.ellipsis)){Ue(t),Qe(),X(n.comma),C(e);break}Ye(o,t)}}function Ye(e,n){e&&nt([t._public,t._protected,t._private,t._readonly,t._override]),Ze(n),Qe(),Ze(n,!0)}function Qe(){l?function(){const e=W(0);X(n.question),J(n.colon)&&os();z(e)}():h&&function(){const e=W(0);X(n.question),wt(),z(e)}()}function Ze(e,t=!1){if(t||Ge(e),!X(n.eq))return;const s=p.tokens.length-1;nn(),p.tokens[s].rhsEndIndex=p.tokens.length}function et(){return J(n.name)}function tt(){const e=p.snapshot();V();return!!((J(n.bracketL)||J(n.braceL)||J(n.star)||J(n.ellipsis)||J(n.hash)||J(n.name)||Boolean(p.type&n.IS_KEYWORD)||J(n.string)||J(n.num)||J(n.bigint)||J(n.decimal))&&!I())||(p.restoreFromSnapshot(e),!1)}function nt(e){for(;;){if(null===st(e))break}}function st(e){if(!J(n.name))return null;const s=p.contextualKeyword;if(-1!==e.indexOf(s)&&tt()){switch(s){case t._readonly:p.tokens[p.tokens.length-1].type=n._readonly;break;case t._abstract:p.tokens[p.tokens.length-1].type=n._abstract;break;case t._static:p.tokens[p.tokens.length-1].type=n._static;break;case t._public:p.tokens[p.tokens.length-1].type=n._public;break;case t._private:p.tokens[p.tokens.length-1].type=n._private;break;case t._protected:p.tokens[p.tokens.length-1].type=n._protected;break;case t._override:p.tokens[p.tokens.length-1].type=n._override;break;case t._declare:p.tokens[p.tokens.length-1].type=n._declare}return s}return null}function ot(){for(Rn();X(n.dot);)Rn()}function rt(){C(n._import),C(n.parenL),C(n.string),C(n.parenR),X(n.dot)&&ot(),J(n.lessThan)&&Kt()}function it(){J(n.lessThan)&&at()}function at(){const e=W(0);for(J(n.lessThan)||J(n.typeParameterStart)?V():A();!X(n.greaterThan)&&!p.error;)Rn(),X(n._extends)&&At(),X(n.eq)&&At(),X(n.comma);z(e)}function ct(e){const t=e===n.arrow;var s;it(),C(n.parenL),p.scopeDepth++,s=!1,Je(n.parenR,s),p.scopeDepth--,(t||J(e))&&vt(e)}function ht(){X(n.comma)||w()}function lt(){ct(n.colon),ht()}function pt(){if(!J(n.bracketL)||!function(){const e=p.snapshot();V();const t=X(n.name)&&J(n.colon);return p.restoreFromSnapshot(e),t}())return!1;const e=W(0);return C(n.bracketL),Rn(),Ct(),C(n.bracketR),wt(),ht(),z(e),!0}function ut(e){X(n.question),e||!J(n.parenL)&&!J(n.lessThan)?(wt(),ht()):(ct(n.colon),ht())}function ft(){if(J(n.parenL)||J(n.lessThan))return void lt();if(J(n._new))return V(),void(J(n.parenL)||J(n.lessThan)?lt():ut(!1));const e=!!st([t._readonly]);pt()||((g(t._get)||g(t._set))&&tt(),wn(-1),ut(e))}function dt(){for(C(n.braceL);!X(n.braceR)&&!p.error;)ft()}function mt(){const e=p.snapshot(),s=function(){if(V(),X(n.plus)||X(n.minus))return g(t._readonly);g(t._readonly)&&V();if(!J(n.bracketL))return!1;if(V(),!et())return!1;return V(),J(n._in)}();return p.restoreFromSnapshot(e),s}function kt(){C(n.braceL),J(n.plus)||J(n.minus)?(V(),x(t._readonly)):T(t._readonly),C(n.bracketL),Rn(),C(n._in),At(),T(t._as)&&At(),C(n.bracketR),J(n.plus)||J(n.minus)?(V(),C(n.question)):X(n.question),X(n.colon)&&At(),w(),C(n.braceR)}function _t(){X(n.ellipsis)?At():(At(),X(n.question)),X(n.colon)&&At()}var gt;function yt(e){e===gt.TSAbstractConstructorType&&x(t._abstract),e!==gt.TSConstructorType&&e!==gt.TSAbstractConstructorType||C(n._new),ct(n.arrow)}function Tt(){switch(p.type){case n.name:return ot(),void(!I()&&J(n.lessThan)&&Kt());case n._void:case n._null:return void V();case n.string:case n.num:case n.bigint:case n.decimal:case n._true:case n._false:return void _n();case n.minus:return V(),void _n();case n._this:return V(),void(g(t._is)&&!I()&&(V(),Ct()));case n._typeof:return C(n._typeof),void(J(n._import)?rt():ot());case n._import:return void rt();case n.braceL:return void(mt()?kt():dt());case n.bracketL:return void function(){for(C(n.bracketL);!X(n.bracketR)&&!p.error;)_t(),X(n.comma)}();case n.parenL:return C(n.parenL),At(),void C(n.parenR);case n.backQuote:return void function(){for(H(),H();!J(n.backQuote)&&!p.error;)C(n.dollarBraceL),At(),H(),H();V()}();default:if(p.type&n.IS_KEYWORD)return V(),void(p.tokens[p.tokens.length-1].type=n.name)}A()}function xt(){g(t._keyof)||g(t._unique)||g(t._readonly)?(V(),xt()):g(t._infer)?(x(t._infer),Rn()):function(){for(Tt();!I()&&X(n.bracketL);)X(n.bracketR)||(At(),C(n.bracketR))}()}function bt(){if(X(n.bitwiseAND),xt(),J(n.bitwiseAND))for(;X(n.bitwiseAND);)xt()}function It(){return!!J(n.lessThan)||J(n.parenL)&&function(){const e=p.snapshot(),t=function(){if(V(),J(n.parenR)||J(n.ellipsis))return!0;if(function(){if(J(n.name)||J(n._this))return V(),!0;if(J(n.braceL)||J(n.bracketL)){let e=1;for(V();e>0&&!p.error;)J(n.braceL)||J(n.bracketL)?e++:(J(n.braceR)||J(n.bracketR))&&e--,V();return!0}return!1}()){if(J(n.colon)||J(n.comma)||J(n.question)||J(n.eq))return!0;if(J(n.parenR)&&(V(),J(n.arrow)))return!0}return!1}();return p.restoreFromSnapshot(e),t}()}function vt(e){const s=W(0);C(e);(function(){const e=p.snapshot();if(g(t._asserts)&&!I())return V(),T(t._is)?(At(),!0):et()||J(n._this)?(V(),T(t._is)&&At(),!0):(p.restoreFromSnapshot(e),!1);if(et()||J(n._this))return V(),g(t._is)&&!I()?(V(),At(),!0):(p.restoreFromSnapshot(e),!1);return!1})()||At(),z(s)}function wt(){J(n.colon)&&Ct()}function Ct(){const e=W(0);C(n.colon),At(),z(e)}function At(){Et(),!I()&&X(n._extends)&&(Et(),C(n.question),At(),C(n.colon),At())}function Et(){It()?yt(gt.TSFunctionType):J(n._new)?yt(gt.TSConstructorType):g(t._abstract)&&Y()===n._new?yt(gt.TSAbstractConstructorType):function(){if(X(n.bitwiseOR),bt(),J(n.bitwiseOR))for(;X(n.bitwiseOR);)bt()}()}function St(){for(;!J(n.braceL)&&!p.error;)Nt(),X(n.comma)}function Nt(){ot(),J(n.lessThan)&&Kt()}function Lt(){if(J(n.string)?_n():Rn(),X(n.eq)){const e=p.tokens.length-1;nn(),p.tokens[e].rhsEndIndex=p.tokens.length}}function Rt(){for(We(!1),C(n.braceL);!X(n.braceR)&&!p.error;)Lt(),X(n.comma)}function Ot(){C(n.braceL),ds(n.braceR)}function Pt(){We(!1),X(n.dot)?Pt():Ot()}function jt(){g(t._global)?Rn():J(n.string)?mn():A(),J(n.braceL)?Ot():w()}function Dt(){ze(),C(n.eq),g(t._require)&&Y()===n.parenL?(x(t._require),C(n.parenL),J(n.string)||A(),_n(),C(n.parenR)):ot(),w()}function qt(){return Bt(p.contextualKeyword,!0)}function Ft(e){switch(e){case t._declare:{const e=p.tokens.length-1;if(function(){if(v())return!1;switch(p.type){case n._function:{const e=W(1);V();return ys(p.start,!0),z(e),!0}case n._class:{const e=W(1);return xs(!0,!1),z(e),!0}case n._const:if(J(n._const)&&y(t._enum)){const e=W(1);return C(n._const),x(t._enum),p.tokens[p.tokens.length-1].type=n._enum,Rt(),z(e),!0}case n._var:case n._let:{const e=W(1);return us(p.type),z(e),!0}case n.name:{const e=W(1),n=p.contextualKeyword;let s=!1;return n===t._global?(jt(),s=!0):s=Bt(n,!0),z(e),s}default:return!1}}())return p.tokens[e].type=n._declare,!0;break}case t._global:if(J(n.braceL))return Ot(),!0;break;default:return Bt(e,!1)}return!1}function Bt(e,s){switch(e){case t._abstract:if(\$t(s)&&J(n._class))return p.tokens[p.tokens.length-1].type=n._abstract,xs(!0,!1),!0;break;case t._enum:if(\$t(s)&&J(n.name))return p.tokens[p.tokens.length-1].type=n._enum,Rt(),!0;break;case t._interface:if(\$t(s)&&J(n.name)){const e=W(s?2:1);return We(!1),it(),X(n._extends)&&St(),dt(),z(e),!0}break;case t._module:if(\$t(s)){if(J(n.string)){const e=W(s?2:1);return jt(),z(e),!0}if(J(n.name)){const e=W(s?2:1);return Pt(),z(e),!0}}break;case t._namespace:if(\$t(s)&&J(n.name)){const e=W(s?2:1);return Pt(),z(e),!0}break;case t._type:if(\$t(s)&&J(n.name)){const e=W(s?2:1);return We(!1),it(),C(n.eq),At(),w(),z(e),!0}}return!1}function \$t(e){return e?(V(),!0):!v()}function Mt(){const e=p.snapshot();return at(),Ts(),J(n.colon)&&vt(n.colon),C(n.arrow),p.error?(p.restoreFromSnapshot(e),!1):(Sn(!0),!0)}function Kt(){const e=W(0);for(C(n.lessThan);!X(n.greaterThan)&&!p.error;)At(),X(n.comma);z(e)}function Vt(){if(J(n.name))switch(p.contextualKeyword){case t._abstract:case t._declare:case t._enum:case t._interface:case t._module:case t._namespace:case t._type:return!0}return!1}function Ht(e,t){return c?function(e,t){if(!J(n.lessThan))return sn(e,t);const s=p.snapshot();let o=sn(e,t);if(!p.error)return o;p.restoreFromSnapshot(s);p.type=n.typeParameterStart,at(),o=sn(e,t),o||A();return o}(e,t):function(e,t){if(!J(n.lessThan))return sn(e,t);const s=p.snapshot();at();const o=sn(e,t);o||A();if(!p.error)return o;p.restoreFromSnapshot(s);return sn(e,t)}(e,t)}function Ut(){Qt()}function Wt(e){Ut(),X(n.colon)?Ut():p.tokens[p.tokens.length-1].identifierRole=e}function zt(){for(Wt(j.Access);J(n.dot);)Qt(),Ut()}function Xt(){J(n.braceR)||tn()}function Gt(){if(X(n.braceL))return C(n.ellipsis),nn(),void Qt();Wt(j.ObjectKey),J(n.eq)&&(Qt(),function(){switch(p.type){case n.braceL:return V(),Xt(),void Qt();case n.jsxTagStart:return Yt(),void Qt();case n.string:return void Qt();default:A("JSX value should be either an expression or a quoted JSX text")}}())}function Jt(){if(J(n.jsxTagEnd))return!1;for(zt(),h&&function(){if(X(n.jsxTagStart)){p.tokens[p.tokens.length-1].type=n.typeParameterStart;const e=W(1);for(;!J(n.greaterThan)&&!p.error;)At(),X(n.comma);Qt(),z(e)}}();!J(n.slash)&&!J(n.jsxTagEnd)&&!p.error;)Gt();const e=J(n.slash);return e&&Qt(),e}function Yt(){Qt(),function e(){if(!Jt())for(Zt();;)switch(p.type){case n.jsxTagStart:if(Qt(),J(n.slash))return Qt(),void(J(n.jsxTagEnd)||zt());e(),Zt();break;case n.jsxText:Zt();break;case n.braceL:V(),J(n.ellipsis)?(C(n.ellipsis),tn(),Zt()):(Xt(),Zt());break;default:return void A()}}()}function Qt(){p.tokens.push(new K),ie(),p.start=p.pos;const e=u.charCodeAt(p.pos);if(O[e])!function(){let e;do{if(p.pos>u.length)return void A("Unexpectedly reached the end of input.");e=u.charCodeAt(++p.pos)}while(R[e]||e===s.dash);ae(n.jsxName)}();else if(e===s.quotationMark||e===s.apostrophe)!function(e){for(p.pos++;;){if(p.pos>=u.length)return void A("Unterminated string constant");if(u.charCodeAt(p.pos)===e){p.pos++;break}p.pos++}ae(n.string)}(e);else switch(++p.pos,e){case s.greaterThan:ae(n.jsxTagEnd);break;case s.lessThan:ae(n.jsxTagStart);break;case s.slash:ae(n.slash);break;case s.equalsTo:ae(n.eq);break;case s.leftCurlyBrace:ae(n.braceL);break;case s.dot:ae(n.dot);break;case s.colon:ae(n.colon);break;default:A()}}function Zt(){p.tokens.push(new K),p.start=p.pos,function(){for(;;){if(p.pos>=u.length)return void A("Unterminated JSX contents");const e=u.charCodeAt(p.pos);switch(e){case s.lessThan:case s.leftCurlyBrace:return p.pos===p.start?e===s.lessThan?(p.pos++,void ae(n.jsxTagStart)):void ce(e):void ae(n.jsxText);default:p.pos++}}}()}!function(e){e[e.TSFunctionType=0]="TSFunctionType";e[e.TSConstructorType=1]="TSConstructorType";e[e.TSAbstractConstructorType=2]="TSAbstractConstructorType"}(gt||(gt={}));class en{constructor(e){this.stop=e}}function tn(e=!1){if(nn(e),J(n.comma))for(;X(n.comma);)nn(e)}function nn(e=!1,t=!1){return h?Ht(e,t):l?function(e,t){if(J(n.lessThan)){const s=p.snapshot();let o=sn(e,t);if(!p.error)return o;p.restoreFromSnapshot(s),p.type=n.typeParameterStart;const r=W(0);if(Vn(),z(r),o=sn(e,t),o)return!0;A()}return sn(e,t)}(e,t):sn(e,t)}function sn(e,s){if(J(n._yield))return V(),J(n.semi)||b()||(X(n.star),nn()),!1;(J(n.parenL)||J(n.name)||J(n._yield))&&(p.potentialArrowAt=p.start);const o=function(e){if(function(e){const s=p.tokens.length;if(rn())return!0;return function e(s,o,r){if(h&&(n._in&n.PRECEDENCE_MASK)>o&&!I()&&T(t._as)){p.tokens[p.tokens.length-1].type=n._as;const t=W(1);return At(),z(t),void e(s,o,r)}const i=p.type&n.PRECEDENCE_MASK;if(i>0&&(!r||!J(n._in))&&i>o){const t=p.type;V(),t===n.nullishCoalescing&&(p.tokens[p.tokens.length-1].nullishStartIndex=s);const a=p.tokens.length;rn(),e(a,t&n.IS_RIGHT_ASSOCIATIVE?i-1:i,r),t===n.nullishCoalescing&&(p.tokens[s].numNullishCoalesceStarts++,p.tokens[p.tokens.length-1].numNullishCoalesceEnds++),e(s,o,r)}}(s,-1,e),!1}(e))return!0;return function(e){h||l?function(e){if(J(n.question)){const e=Y();if(e===n.colon||e===n.comma||e===n.parenR)return}on(e)}(e):on(e)}(e),!1}(e);return s&&Tn(),p.type&n.IS_ASSIGN?(V(),nn(e),!1):o}function on(e){X(n.question)&&(nn(),C(n.colon),nn(e))}function rn(){if(h&&!c&&X(n.lessThan))return function(){const e=W(1);At(),C(n.greaterThan),z(e),rn()}(),!1;if(g(t._module)&&ne()===s.leftCurlyBrace&&!function(){const e=ee();for(let t=p.end;t<e;t++){const e=u.charCodeAt(t);if(e===s.lineFeed||e===s.carriageReturn||8232===e||8233===e)return!0}return!1}())return x(t._module),C(n.braceL),ds(n.braceR),!1;if(p.type&n.IS_PREFIX)return V(),rn(),!1;if(an())return!0;for(;p.type&n.IS_POSTFIX&&!b();)p.type===n.preIncDec&&(p.type=n.postIncDec),V();return!1}function an(){const e=p.tokens.length;return!!mn()||(cn(e),p.tokens.length>e&&p.tokens[e].isOptionalChainStart&&(p.tokens[p.tokens.length-1].isOptionalChainEnd=!0),!1)}function cn(e,s=!1){l?function(e,s=!1){if(p.tokens[p.tokens.length-1].contextualKeyword===t._async&&J(n.lessThan)){const e=p.snapshot();if(function(){p.scopeDepth++;const e=p.tokens.length;if(Ts(),!yn())return!1;return An(e),!0}()&&!p.error)return;p.restoreFromSnapshot(e)}hn(e,s)}(e,s):hn(e,s)}function hn(e,t=!1){const n=new en(!1);do{ln(e,t,n)}while(!n.stop&&!p.error)}function ln(e,t,s){h?function(e,t,s){if(I()||!X(n.bang)){if(J(n.lessThan)){const s=p.snapshot();if(!t&&un()){if(Mt())return}if(Kt(),!t&&X(n.parenL)?(p.tokens[p.tokens.length-1].subscriptStartIndex=e,fn()):J(n.backQuote)?xn():A(),!p.error)return;p.restoreFromSnapshot(s)}else!t&&J(n.questionDot)&&Y()===n.lessThan&&(V(),p.tokens[e].isOptionalChainStart=!0,p.tokens[p.tokens.length-1].subscriptStartIndex=e,Kt(),C(n.parenL),fn());pn(e,t,s)}else p.tokens[p.tokens.length-1].type=n.nonNullAssertion}(e,t,s):l?function(e,t,s){if(J(n.questionDot)&&Y()===n.lessThan)return t?void(s.stop=!0):(V(),Hn(),C(n.parenL),void fn());if(!t&&J(n.lessThan)){const e=p.snapshot();if(Hn(),C(n.parenL),fn(),!p.error)return;p.restoreFromSnapshot(e)}pn(e,t,s)}(e,t,s):pn(e,t,s)}function pn(e,t,s){if(!t&&X(n.doubleColon))dn(),s.stop=!0,cn(e,t);else if(J(n.questionDot)){if(p.tokens[e].isOptionalChainStart=!0,t&&Y()===n.parenL)return void(s.stop=!0);V(),p.tokens[p.tokens.length-1].subscriptStartIndex=e,X(n.bracketL)?(tn(),C(n.bracketR)):X(n.parenL)?fn():kn()}else if(X(n.dot))p.tokens[p.tokens.length-1].subscriptStartIndex=e,kn();else if(X(n.bracketL))p.tokens[p.tokens.length-1].subscriptStartIndex=e,tn(),C(n.bracketR);else if(!t&&J(n.parenL))if(un()){const t=p.snapshot(),o=p.tokens.length;V(),p.tokens[p.tokens.length-1].subscriptStartIndex=e;const r=d();p.tokens[p.tokens.length-1].contextId=r,fn(),p.tokens[p.tokens.length-1].contextId=r,(J(n.colon)||J(n.arrow))&&(p.restoreFromSnapshot(t),s.stop=!0,p.scopeDepth++,Ts(),function(e){h?J(n.colon)&&Ct():l&&function(){if(J(n.colon)){const e=p.noAnonFunctionType;p.noAnonFunctionType=!0,os(),p.noAnonFunctionType=e}}();C(n.arrow),An(e)}(o))}else{V(),p.tokens[p.tokens.length-1].subscriptStartIndex=e;const t=d();p.tokens[p.tokens.length-1].contextId=t,fn(),p.tokens[p.tokens.length-1].contextId=t}else J(n.backQuote)?xn():s.stop=!0}function un(){return p.tokens[p.tokens.length-1].contextualKeyword===t._async&&!b()}function fn(){let e=!0;for(;!X(n.parenR)&&!p.error;){if(e)e=!1;else if(C(n.comma),X(n.parenR))break;Ln(!1)}}function dn(){const e=p.tokens.length;mn(),cn(e,!0)}function mn(){if(X(n.modulo))return Rn(),!1;if(J(n.jsxText))return _n(),!1;if(J(n.lessThan)&&c)return p.type=n.jsxTagStart,Yt(),V(),!1;const e=p.potentialArrowAt===p.start;switch(p.type){case n.slash:case n.assign:U();case n._super:case n._this:case n.regexp:case n.num:case n.bigint:case n.decimal:case n.string:case n._null:case n._true:case n._false:return V(),!1;case n._import:return V(),J(n.dot)&&(p.tokens[p.tokens.length-1].type=n.name,V(),Rn()),!1;case n.name:{const s=p.tokens.length,o=p.start,r=p.contextualKeyword;return Rn(),r===t._await?(rn(),!1):r===t._async&&J(n._function)&&!b()?(V(),ys(o,!1),!1):e&&r===t._async&&!b()&&J(n.name)?(p.scopeDepth++,We(!1),C(n.arrow),An(s),!0):J(n._do)&&!b()?(V(),fs(),!1):e&&!b()&&J(n.arrow)?(p.scopeDepth++,Xe(!1),C(n.arrow),An(s),!0):(p.tokens[p.tokens.length-1].identifierRole=j.Access,!1)}case n._do:return V(),fs(),!1;case n.parenL:return function(e){const t=p.snapshot(),s=p.tokens.length;C(n.parenL);let o=!0;for(;!J(n.parenR)&&!p.error;){if(o)o=!1;else if(C(n.comma),J(n.parenR))break;if(J(n.ellipsis)){Ue(!1),Tn();break}nn(!1,!0)}if(C(n.parenR),e&&function(){return J(n.colon)||!b()}()){if(yn())return p.restoreFromSnapshot(t),p.scopeDepth++,Ts(),yn(),An(s),!0}return!1}(e);case n.bracketL:return V(),Nn(n.bracketR,!0),!1;case n.braceL:return bn(!1,!1),!1;case n._function:return function(){const e=p.start;Rn(),X(n.dot)&&Rn();ys(e,!1)}(),!1;case n.at:hs();case n._class:return xs(!1),!1;case n._new:return function(){if(C(n._new),X(n.dot))return void Rn();dn(),X(n.questionDot),function(){h?function(){if(J(n.lessThan)){const e=p.snapshot();p.type=n.typeParameterStart,Kt(),J(n.parenL)||A(),p.error&&p.restoreFromSnapshot(e)}}():l&&function(){if(J(n.lessThan)){const e=p.snapshot();Hn(),p.error&&p.restoreFromSnapshot(e)}}();X(n.parenL)&&Nn(n.parenR)}()}(),!1;case n.backQuote:return xn(),!1;case n.doubleColon:return V(),dn(),!1;case n.hash:{const e=ne();return O[e]||e===s.backslash?kn():V(),!1}default:return A(),!1}}function kn(){X(n.hash),Rn()}function _n(){V()}function gn(){C(n.parenL),tn(),C(n.parenR)}function yn(){return h?function(){if(J(n.colon)){const e=p.snapshot();vt(n.colon),b()&&A(),J(n.arrow)||A(),p.error&&p.restoreFromSnapshot(e)}return X(n.arrow)}():l?function(){if(J(n.colon)){const e=W(0),t=p.snapshot(),s=p.noAnonFunctionType;p.noAnonFunctionType=!0,jn(),p.noAnonFunctionType=s,b()&&A(),J(n.arrow)||A(),p.error&&p.restoreFromSnapshot(t),z(e)}return X(n.arrow)}():X(n.arrow)}function Tn(){(h||l)&&(G(n.question),J(n.colon)&&(h?Ct():l&&os()))}function xn(){for(H(),H();!J(n.backQuote)&&!p.error;)C(n.dollarBraceL),tn(),H(),H();V()}function bn(e,s){const o=d();let r=!0;for(V(),p.tokens[p.tokens.length-1].contextId=o;!X(n.braceR)&&!p.error;){if(r)r=!1;else if(C(n.comma),X(n.braceR))break;let i=!1;if(J(n.ellipsis)){const t=p.tokens.length;if(He(),e&&(p.tokens.length===t+2&&Xe(s),X(n.braceR)))break}else e||(i=X(n.star)),!e&&g(t._async)?(i&&A(),Rn(),J(n.colon)||J(n.parenL)||J(n.braceR)||J(n.eq)||J(n.comma)||(J(n.star)&&(V(),i=!0),wn(o))):wn(o),vn(e,s,o)}p.tokens[p.tokens.length-1].contextId=o}function In(e,t){const s=p.start;return J(n.parenL)?(e&&A(),Cn(s,!1),!0):!!function(e){return!e&&(J(n.string)||J(n.num)||J(n.bracketL)||J(n.name)||!!(p.type&n.IS_KEYWORD))}(e)&&(wn(t),Cn(s,!1),!0)}function vn(e,t,s){h?it():l&&J(n.lessThan)&&(Vn(),J(n.parenL)||A());In(e,s)||function(e,t){if(X(n.colon))return void(e?Ze(t):nn(!1));let s;s=e?0===p.scopeDepth?j.ObjectShorthandTopLevelDeclaration:t?j.ObjectShorthandBlockScopedDeclaration:j.ObjectShorthandFunctionScopedDeclaration:j.ObjectShorthand,p.tokens[p.tokens.length-1].identifierRole=s,Ze(t,!0)}(e,t)}function wn(e){l&&is(),X(n.bracketL)?(p.tokens[p.tokens.length-1].contextId=e,nn(),C(n.bracketR),p.tokens[p.tokens.length-1].contextId=e):(J(n.num)||J(n.string)||J(n.bigint)||J(n.decimal)?mn():kn(),p.tokens[p.tokens.length-1].identifierRole=j.ObjectKey,p.tokens[p.tokens.length-1].contextId=e)}function Cn(e,t){const n=d();p.scopeDepth++;const s=p.tokens.length;Ts(t,n),En(e,n);const o=p.tokens.length;p.scopes.push(new r(s,o,!0)),p.scopeDepth--}function An(e){Sn(!0);const t=p.tokens.length;p.scopes.push(new r(e,t,!0)),p.scopeDepth--}function En(e,t=0){h?function(e,t){if(J(n.colon)&&vt(n.colon),J(n.braceL)||!v())Sn(!1,t);else{let t=p.tokens.length-1;for(;t>=0&&(p.tokens[t].start>=e||p.tokens[t].type===n._default||p.tokens[t].type===n._export);)p.tokens[t].isType=!0,t--}}(e,t):l?function(e){J(n.colon)&&jn();Sn(!1,e)}(t):Sn(!1,t)}function Sn(e,t=0){e&&!J(n.braceL)?nn():fs(!0,t)}function Nn(e,t=!1){let s=!0;for(;!X(e)&&!p.error;){if(s)s=!1;else if(C(n.comma),X(e))break;Ln(t)}}function Ln(e){e&&J(n.comma)||(J(n.ellipsis)?(He(),Tn()):J(n.question)?V():nn(!1,!0))}function Rn(){V(),p.tokens[p.tokens.length-1].type=n.name}function On(e){const t=W(0);C(e||n.colon),ss(),z(t)}function Pn(){C(n.modulo),x(t._checks),X(n.parenL)&&(tn(),C(n.parenR))}function jn(){const e=W(0);C(n.colon),J(n.modulo)?Pn():(ss(),J(n.modulo)&&Pn()),z(e)}function Dn(){J(n._class)?(V(),qn(!0)):J(n._function)?(V(),Rn(),J(n.lessThan)&&Vn(),C(n.parenL),Qn(),C(n.parenR),jn(),w()):J(n._var)?(V(),rs(),w()):T(t._module)?X(n.dot)?(x(t._exports),os(),w()):function(){J(n.string)?mn():Rn();C(n.braceL);for(;!J(n.braceR)&&!p.error;)J(n._import)?(V(),Ps()):A();C(n.braceR)}():g(t._type)?(V(),Mn()):g(t._opaque)?(V(),Kn(!0)):g(t._interface)?(V(),qn()):J(n._export)?(C(n._export),X(n._default)?J(n._function)||J(n._class)?Dn():(ss(),w()):J(n._var)||J(n._function)||J(n._class)||g(t._opaque)?Dn():J(n.star)||J(n.braceL)||g(t._interface)||g(t._type)||g(t._opaque)?Ss():A()):A()}function qn(e=!1){if(\$n(),J(n.lessThan)&&Vn(),X(n._extends))do{Fn()}while(!e&&X(n.comma));if(g(t._mixins)){V();do{Fn()}while(X(n.comma))}if(g(t._implements)){V();do{Fn()}while(X(n.comma))}zn(e,!1,e)}function Fn(){Jn(!1),J(n.lessThan)&&Hn()}function Bn(){qn()}function \$n(){Rn()}function Mn(){\$n(),J(n.lessThan)&&Vn(),On(n.eq),w()}function Kn(e){x(t._type),\$n(),J(n.lessThan)&&Vn(),J(n.colon)&&On(n.colon),e||On(n.eq),w()}function Vn(){const e=W(0);J(n.lessThan)||J(n.typeParameterStart)?V():A();do{is(),rs(),X(n.eq)&&ss(),J(n.greaterThan)||C(n.comma)}while(!J(n.greaterThan)&&!p.error);C(n.greaterThan),z(e)}function Hn(){const e=W(0);for(C(n.lessThan);!J(n.greaterThan)&&!p.error;)ss(),J(n.greaterThan)||C(n.comma);C(n.greaterThan),z(e)}function Un(){J(n.num)||J(n.string)?mn():Rn()}function Wn(){for(J(n.lessThan)&&Vn(),C(n.parenL);!J(n.parenR)&&!J(n.ellipsis)&&!p.error;)Yn(),J(n.parenR)||C(n.comma);X(n.ellipsis)&&Yn(),C(n.parenR),On()}function zn(e,s,o){let r;for(s&&J(n.braceBarL)?(C(n.braceBarL),r=n.braceBarR):(C(n.braceL),r=n.braceR);!J(r)&&!p.error;){if(o&&g(t._proto)){const t=Y();t!==n.colon&&t!==n.question&&(V(),e=!1)}if(e&&g(t._static)){const e=Y();e!==n.colon&&e!==n.question&&V()}if(is(),X(n.bracketL))X(n.bracketL)?(Un(),C(n.bracketR),C(n.bracketR),J(n.lessThan)||J(n.parenL)?Wn():(X(n.question),On())):(Y()===n.colon?(Un(),On()):ss(),C(n.bracketR),On());else if(J(n.parenL)||J(n.lessThan))Wn();else{if(g(t._get)||g(t._set)){const e=Y();e!==n.name&&e!==n.string&&e!==n.num||V()}Xn()}Gn()}C(r)}function Xn(){if(J(n.ellipsis)){if(C(n.ellipsis),X(n.comma)||X(n.semi),J(n.braceR))return;ss()}else Un(),J(n.lessThan)||J(n.parenL)?Wn():(X(n.question),On())}function Gn(){X(n.semi)||X(n.comma)||J(n.braceR)||J(n.braceBarR)||A()}function Jn(e){for(e||Rn();X(n.dot);)Rn()}function Yn(){const e=Y();e===n.colon||e===n.question?(Rn(),X(n.question),On()):ss()}function Qn(){for(;!J(n.parenR)&&!J(n.ellipsis)&&!p.error;)Yn(),J(n.parenR)||C(n.comma);X(n.ellipsis)&&Yn()}function Zn(){let e=!1;const s=p.noAnonFunctionType;switch(p.type){case n.name:return g(t._interface)?void function(){if(x(t._interface),X(n._extends))do{Fn()}while(X(n.comma));zn(!1,!1,!1)}():(Rn(),Jn(!0),void(J(n.lessThan)&&Hn()));case n.braceL:return void zn(!1,!1,!1);case n.braceBarL:return void zn(!1,!0,!1);case n.bracketL:return void function(){for(C(n.bracketL);p.pos<u.length&&!J(n.bracketR)&&(ss(),!J(n.bracketR));)C(n.comma);C(n.bracketR)}();case n.lessThan:return Vn(),C(n.parenL),Qn(),C(n.parenR),C(n.arrow),void ss();case n.parenL:if(V(),!J(n.parenR)&&!J(n.ellipsis))if(J(n.name)){const t=Y();e=t!==n.question&&t!==n.colon}else e=!0;if(e){if(p.noAnonFunctionType=!1,ss(),p.noAnonFunctionType=s,p.noAnonFunctionType||!(J(n.comma)||J(n.parenR)&&Y()===n.arrow))return void C(n.parenR);X(n.comma)}return Qn(),C(n.parenR),C(n.arrow),void ss();case n.minus:return V(),void _n();case n.string:case n.num:case n._true:case n._false:case n._null:case n._this:case n._void:case n.star:return void V();default:if(p.type===n._typeof)return C(n._typeof),void Zn();if(p.type&n.IS_KEYWORD)return V(),void(p.tokens[p.tokens.length-1].type=n.name)}A()}function es(){X(n.question)?es():function(){for(Zn();!b()&&(J(n.bracketL)||J(n.questionDot));)X(n.questionDot),C(n.bracketL),X(n.bracketR)||(ss(),C(n.bracketR))}()}function ts(){es(),!p.noAnonFunctionType&&X(n.arrow)&&ss()}function ns(){for(X(n.bitwiseAND),ts();X(n.bitwiseAND);)ts()}function ss(){!function(){for(X(n.bitwiseOR),ns();X(n.bitwiseOR);)ns()}()}function os(){On()}function rs(){Rn(),J(n.colon)&&os()}function is(){(J(n.plus)||J(n.minus))&&(V(),p.tokens[p.tokens.length-1].isType=!0)}function as(){if(J(n._typeof)||g(t._type)){const s=Z();(((e=s).type===n.name||e.type&n.IS_KEYWORD)&&e.contextualKeyword!==t._from||s.type===n.braceL||s.type===n.star)&&V()}var e}function cs(e){l&&function(){if(J(n.name)&&p.contextualKeyword===t._interface){const e=W(0);return V(),Bn(),z(e),!0}return!1}()||(J(n.at)&&hs(),function(e){if(h&&function(){if(p.type===n._const){const e=Z();if(e.type===n.name&&e.contextualKeyword===t._enum)return C(n._const),x(t._enum),p.tokens[p.tokens.length-1].type=n._enum,Rt(),!0}return!1}())return;const s=p.type;switch(s){case n._break:case n._continue:return V(),void(v()||(Rn(),w()));case n._debugger:return V(),void w();case n._do:return V(),cs(!1),C(n._while),gn(),void X(n.semi);case n._for:return void function(){p.scopeDepth++;const e=p.tokens.length;!function(){V();let e=!1;g(t._await)&&(e=!0,V());if(C(n.parenL),J(n.semi))return e&&A(),void ms();if(J(n._var)||J(n._let)||J(n._const)){const s=p.type;return V(),_s(!0,s),J(n._in)||g(t._of)?void ks(e):void ms()}if(tn(!0),J(n._in)||g(t._of))return void ks(e);e&&A();ms()}();const s=p.tokens.length;p.scopes.push(new r(e,s,!1)),p.scopeDepth--}();case n._function:if(Y()===n.dot)break;return e||A(),void function(){const e=p.start;V(),ys(e,!0)}();case n._class:return e||A(),void xs(!0);case n._if:return V(),gn(),cs(!1),void(X(n._else)&&cs(!1));case n._return:return V(),void(v()||(tn(),w()));case n._switch:return void function(){V(),gn(),p.scopeDepth++;const e=p.tokens.length;C(n.braceL);for(;!J(n.braceR)&&!p.error;)if(J(n._case)||J(n._default)){const e=J(n._case);V(),e&&tn(),C(n.colon)}else cs(!0);V();const t=p.tokens.length;p.scopes.push(new r(e,t,!1)),p.scopeDepth--}();case n._throw:return V(),tn(),void w();case n._try:return void function(){if(V(),fs(),J(n._catch)){V();let e=null;if(J(n.parenL)&&(p.scopeDepth++,e=p.tokens.length,C(n.parenL),Ge(!0),h&&wt(),C(n.parenR)),fs(),null!=e){const t=p.tokens.length;p.scopes.push(new r(e,t,!1)),p.scopeDepth--}}X(n._finally)&&fs()}();case n._let:case n._const:e||A();case n._var:return void us(s);case n._while:return V(),gn(),void cs(!1);case n.braceL:return void fs();case n.semi:return void V();case n._export:case n._import:{const e=Y();if(e===n.parenL||e===n.dot)break;return V(),void(s===n._import?Ps():Ss())}case n.name:if(p.contextualKeyword===t._async){const e=p.start,t=p.snapshot();if(V(),J(n._function)&&!b())return C(n._function),void ys(e,!0);p.restoreFromSnapshot(t)}}const o=p.tokens.length;tn();let i=null;if(p.tokens.length===o+1){const e=p.tokens[p.tokens.length-1];e.type===n.name&&(i=e.contextualKeyword)}if(null==i)return void w();X(n.colon)?cs(!0):(a=i,h?function(e){Ft(e)||w()}(a):l?function(e){if(e===t._declare){if(J(n._class)||J(n.name)||J(n._function)||J(n._var)||J(n._export)){const e=W(1);Dn(),z(e)}}else if(J(n.name))if(e===t._interface){const e=W(1);Bn(),z(e)}else if(e===t._type){const e=W(1);Mn(),z(e)}else if(e===t._opaque){const e=W(1);Kn(!1),z(e)}w()}(a):w());var a}(e))}function hs(){for(;J(n.at);)ls()}function ls(){if(V(),X(n.parenL))tn(),C(n.parenR);else for(Rn();X(n.dot);)Rn();h?(J(n.lessThan)&&Kt(),ps()):ps()}function ps(){X(n.parenL)&&fn()}function us(e){V(),_s(!1,e),w()}function fs(e=!1,t=0){const s=p.tokens.length;p.scopeDepth++,C(n.braceL),t&&(p.tokens[p.tokens.length-1].contextId=t),ds(n.braceR),t&&(p.tokens[p.tokens.length-1].contextId=t);const o=p.tokens.length;p.scopes.push(new r(s,o,e)),p.scopeDepth--}function ds(e){for(;!X(e)&&!p.error;)cs(!0)}function ms(){C(n.semi),J(n.semi)||tn(),C(n.semi),J(n.parenR)||tn(),C(n.parenR),cs(!1)}function ks(e){e?T(t._of):V(),tn(),C(n.parenR),cs(!1)}function _s(e,t){for(;;){if(gs(t===n._const||t===n._let),X(n.eq)){const t=p.tokens.length-1;nn(e),p.tokens[t].rhsEndIndex=p.tokens.length}if(!X(n.comma))break}}function gs(e){Ge(e),h?function(){const e=W(0);X(n.bang),wt(),z(e)}():l&&J(n.colon)&&os()}function ys(e,t,s=!1){J(n.star)&&V(),!t||s||J(n.name)||J(n._yield)||A();let o=null;J(n.name)&&(t||(o=p.tokens.length,p.scopeDepth++),We(!1));const i=p.tokens.length;p.scopeDepth++,Ts(),En(e);const a=p.tokens.length;p.scopes.push(new r(i,a,!0)),p.scopeDepth--,null!==o&&(p.scopes.push(new r(o,a,!0)),p.scopeDepth--)}function Ts(e=!1,t=0){h?it():l&&function(){if(J(n.lessThan)){const e=W(0);Vn(),z(e)}}(),C(n.parenL),t&&(p.tokens[p.tokens.length-1].contextId=t),Je(n.parenR,!1,!1,e,t),t&&(p.tokens[p.tokens.length-1].contextId=t)}function xs(e,s=!1){const o=d();V(),p.tokens[p.tokens.length-1].contextId=o,p.tokens[p.tokens.length-1].isExpression=!e;let i=null;e||(i=p.tokens.length,p.scopeDepth++),function(e,s=!1){if(h&&(!e||s)&&g(t._implements))return;J(n.name)&&We(!0);h?it():l&&J(n.lessThan)&&Vn()}(e,s),function(){let e=!1;X(n._extends)?(an(),e=!0):e=!1;h?function(e){if(e&&J(n.lessThan)&&Kt(),T(t._implements)){p.tokens[p.tokens.length-1].type=n._implements;const e=W(1);St(),z(e)}}(e):l&&function(e){if(e&&J(n.lessThan)&&Hn(),g(t._implements)){const e=W(0);V(),p.tokens[p.tokens.length-1].type=n._implements;do{\$n(),J(n.lessThan)&&Hn()}while(X(n.comma));z(e)}}(e)}();const a=p.tokens.length;if(function(e){C(n.braceL);for(;!X(n.braceR)&&!p.error;){if(X(n.semi))continue;if(J(n.at)){ls();continue}vs(p.start,e)}}(o),!p.error&&(p.tokens[a].contextId=o,p.tokens[p.tokens.length-1].contextId=o,null!==i)){const e=p.tokens.length;p.scopes.push(new r(i,e,!1)),p.scopeDepth--}}function bs(){return J(n.eq)||J(n.semi)||J(n.braceR)||J(n.bang)||J(n.colon)}function Is(){return J(n.parenL)||J(n.lessThan)}function vs(e,s){h&&nt([t._declare,t._public,t._protected,t._private,t._override]);let o=!1;if(J(n.name)&&p.contextualKeyword===t._static){if(Rn(),Is())return void ws(e,!1);if(bs())return void Es();if(p.tokens[p.tokens.length-1].type=n._static,o=!0,J(n.braceL))return p.tokens[p.tokens.length-1].contextId=s,void fs()}!function(e,s,o){if(h&&function(e){const n=p.tokens.length;nt([t._abstract,t._readonly,t._declare,t._static,t._override]);const s=p.tokens.length;if(pt()){for(let t=e?n-1:n;t<s;t++)p.tokens[t].isType=!0;return!0}return!1}(s))return;if(X(n.star))return Cs(o),void ws(e,!1);Cs(o);let r=!1;const i=p.tokens[p.tokens.length-1];i.contextualKeyword===t._constructor&&(r=!0);if(As(),Is())ws(e,r);else if(bs())Es();else if(i.contextualKeyword!==t._async||v())i.contextualKeyword!==t._get&&i.contextualKeyword!==t._set||v()&&J(n.star)?v()?Es():A():(i.contextualKeyword===t._get?p.tokens[p.tokens.length-1].type=n._get:p.tokens[p.tokens.length-1].type=n._set,Cs(o),ws(e,!1));else{p.tokens[p.tokens.length-1].type=n._async;J(n.star)&&V(),Cs(o),As(),ws(e,!1)}}(e,o,s)}function ws(e,t){h?it():l&&J(n.lessThan)&&Vn(),Cn(e,t)}function Cs(e){wn(e)}function As(){if(h){const e=W(0);X(n.question),z(e)}}function Es(){if(h?(G(n.bang),wt()):l&&J(n.colon)&&os(),J(n.eq)){const e=p.tokens.length;V(),nn(),p.tokens[e].rhsEndIndex=p.tokens.length}w()}function Ss(){const e=p.tokens.length-1;h&&(X(n._import)?(g(t._type)&&Y()!==n.eq&&x(t._type),Dt(),1):X(n.eq)?(tn(),w(),1):T(t._as)?(x(t._namespace),Rn(),w(),1):(g(t._type)&&Y()===n.braceL&&V(),0))||((l?J(n.star)||g(t._type)&&Y()===n.star:J(n.star))?l?function(){if(T(t._type)){const e=W(2);Rs(),z(e)}else Rs()}():Rs():function(){if(h&&Vt())return!1;if(l&&J(n.name)&&(p.contextualKeyword===t._type||p.contextualKeyword===t._interface||p.contextualKeyword===t._opaque))return!1;if(J(n.name))return p.contextualKeyword!==t._async;if(!J(n._default))return!1;const e=ee(),o=Z(),r=o.type===n.name&&o.contextualKeyword===t._from;if(o.type===n.comma)return!0;if(r){const t=u.charCodeAt(te(e+4));return t===s.quotationMark||t===s.apostrophe}return!1}()?(Rn(),J(n.comma)&&Y()===n.star?(C(n.comma),C(n.star),x(t._as),Rn()):Ns(),Ls()):X(n._default)?function(){if(h&&function(){if(g(t._abstract)&&Y()===n._class)return p.type=n._abstract,V(),xs(!0,!0),!0;if(g(t._interface)){const e=W(2);return Bt(t._interface,!0),z(e),!0}return!1}())return;const e=p.start;X(n._function)?ys(e,!0,!0):g(t._async)&&Y()===n._function?(T(t._async),X(n._function),ys(e,!0,!0)):J(n._class)?xs(!0,!0):J(n.at)?(hs(),xs(!0,!0)):(nn(),w())}():h&&Vt()||l&&(g(t._type)||g(t._interface)||g(t._opaque))||p.type===n._var||p.type===n._const||p.type===n._let||p.type===n._function||p.type===n._class||g(t._async)||J(n.at)?h?function(){const e=T(t._declare);e&&(p.tokens[p.tokens.length-1].type=n._declare);let s=!1;if(J(n.name))if(e){const e=W(2);s=qt(),z(e)}else s=qt();if(!s)if(e){const e=W(2);cs(!0),z(e)}else cs(!0)}():l?function(){if(g(t._type)){const e=W(1);V(),J(n.braceL)?(Os(),Ls()):Mn(),z(e)}else if(g(t._opaque)){const e=W(1);V(),Kn(!1),z(e)}else if(g(t._interface)){const e=W(1);V(),Bn(),z(e)}else cs(!0)}():cs(!0):(Os(),Ls()),p.tokens[e].rhsEndIndex=p.tokens.length)}function Ns(){X(n.comma)&&Os()}function Ls(){T(t._from)&&mn(),w()}function Rs(){C(n.star),g(t._as)?(V(),p.tokens[p.tokens.length-1].type=n._as,Rn(),Ns(),Ls()):Ls()}function Os(){let e=!0;for(C(n.braceL);!X(n.braceR)&&!p.error;){if(e)e=!1;else if(C(n.comma),X(n.braceR))break;Rn(),p.tokens[p.tokens.length-1].identifierRole=j.ExportAccess,T(t._as)&&Rn()}}function Ps(){if(h&&J(n.name)&&Y()===n.eq)Dt();else{if(h&&g(t._type)){const e=Y();if(e===n.name){if(x(t._type),Y()===n.eq)return void Dt()}else e!==n.star&&e!==n.braceL||x(t._type)}J(n.string)||(function(){l&&as();let e=!0;if(J(n.name)&&(js(),!X(n.comma)))return;if(J(n.star))return V(),x(t._as),void js();C(n.braceL);for(;!X(n.braceR)&&!p.error;){if(e)e=!1;else if(X(n.colon)&&A("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),C(n.comma),X(n.braceR))break;Ds()}}(),x(t._from)),mn(),w()}}function js(){ze()}function Ds(){l?function(){const e=p.contextualKeyword===t._type||p.type===n._typeof;e?V():Rn(),g(t._as)&&!y(t._as)?(Rn(),(!e||J(n.name)||p.type&n.IS_KEYWORD)&&Rn()):e&&(J(n.name)||p.type&n.IS_KEYWORD)&&(Rn(),T(t._as)&&Rn())}():(ze(),g(t._as)&&(p.tokens[p.tokens.length-1].identifierRole=j.ImportAccess,V(),ze()))}function qs(){return 0===p.pos&&u.charCodeAt(0)===s.numberSign&&u.charCodeAt(1)===s.exclamationMark&&re(2),se(),function(){if(ds(n.eof),p.scopes.push(new r(0,p.tokens.length,!0)),0!==p.scopeDepth)throw new Error("Invalid scope depth at end of file: "+p.scopeDepth);return new Fs(p.tokens,p.scopes)}()}class Fs{constructor(e,t){this.tokens=e,this.scopes=t}}class Bs{__init(){this.resultCode=""}__init2(){this.tokenIndex=0}constructor(e,t,n,s,o){this.code=e,this.tokens=t,this.isFlowEnabled=n,this.disableESTransforms=s,this.helperManager=o,Bs.prototype.__init.call(this),Bs.prototype.__init2.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}getResultCodeIndex(){return this.resultCode.length}reset(){this.resultCode="",this.tokenIndex=0}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,n.name)&&this.tokens[e].contextualKeyword===t}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[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,s){return this.tokens[e].type===t&&this.tokens[e+1].type===n&&this.tokens[e+2].type===s}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,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===s}matches5(e,t,n,s,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===s&&this.tokens[this.tokenIndex+4].type===o}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.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\\r\\n]/g,""),this.appendTokenPrefix(),this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw new Error("Expected token "+e);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),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.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=function(e){let n=e.currentIndex(),s=0;const o=e.currentToken();do{const r=e.tokens[n];if(r.isOptionalChainStart&&s++,r.isOptionalChainEnd&&s--,s+=r.numNullishCoalesceStarts,s-=r.numNullishCoalesceEnds,r.contextualKeyword===t._await&&null==r.identifierRole&&r.scopeDepth===o.scopeDepth)return!0;n+=1}while(s>0&&n<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===n._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(){const 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(){const 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 new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),this.resultCode}isAtEnd(){return this.tokenIndex===this.tokens.length}}function \$s(e,s,o,r){const i=s.snapshot(),a=function(e){const t=e.currentToken(),s=t.contextId;if(null==s)throw new Error("Expected context ID on class token.");const o=t.isExpression;if(null==o)throw new Error("Expected isExpression on class token.");let r=null,i=!1;e.nextToken(),e.matches1(n.name)&&(r=e.identifierName());for(;!e.matchesContextIdAndLabel(n.braceL,s);)e.matches1(n._extends)&&!e.currentToken().isType&&(i=!0),e.nextToken();return{isExpression:o,className:r,hasSuperclass:i}}(s);let c=[];const h=[],l=[];let p=null;const u=[],f=[],d=s.currentToken().contextId;if(null==d)throw new Error("Expected non-null class context ID on class open-brace.");for(s.nextToken();!s.matchesContextIdAndLabel(n.braceR,d);)if(s.matchesContextual(t._constructor)&&!s.currentToken().isType)({constructorInitializerStatements:c,constructorInsertPos:p}=Ks(s));else if(s.matches1(n.semi))r||f.push({start:s.currentIndex(),end:s.currentIndex()+1}),s.nextToken();else if(s.currentToken().isType)s.nextToken();else{const i=s.currentIndex();let a=!1,m=!1,k=!1;for(;Vs(s.currentToken());)s.matches1(n._static)&&(a=!0),s.matches1(n.hash)&&(m=!0),s.matches1(n._declare)&&(k=!0),s.nextToken();if(a&&s.matches1(n.braceL)){Ms(s,d);continue}if(m){Ms(s,d);continue}if(s.matchesContextual(t._constructor)&&!s.currentToken().isType){({constructorInitializerStatements:c,constructorInsertPos:p}=Ks(s));continue}const _=s.currentIndex();if(Hs(s),s.matches1(n.lessThan)||s.matches1(n.parenL)){Ms(s,d);continue}for(;s.currentToken().isType;)s.nextToken();if(s.matches1(n.eq)){const t=s.currentIndex(),n=s.currentToken().rhsEndIndex;if(null==n)throw new Error("Expected rhsEndIndex on class field assignment.");for(s.nextToken();s.currentIndex()<n;)e.processToken();let r;a?(r=o.claimFreeName("__initStatic"),l.push(r)):(r=o.claimFreeName("__init"),h.push(r)),u.push({initializerName:r,equalsIndex:t,start:_,end:s.currentIndex()})}else r&&!k||f.push({start:i,end:s.currentIndex()})}return s.restoreToSnapshot(i),r?{headerInfo:a,constructorInitializerStatements:c,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:p,fields:[],rangesToRemove:f}:{headerInfo:a,constructorInitializerStatements:c,instanceInitializerNames:h,staticInitializerNames:l,constructorInsertPos:p,fields:u,rangesToRemove:f}}function Ms(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;Vs(e.tokenAtRelativeIndex(-1));)e.previousToken()}function Ks(e){const t=[];e.nextToken();const s=e.currentToken().contextId;if(null==s)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!e.matchesContextIdAndLabel(n.parenR,s);)if(e.currentToken().contextId===s){if(e.nextToken(),Vs(e.currentToken())){for(e.nextToken();Vs(e.currentToken());)e.nextToken();const s=e.currentToken();if(s.type!==n.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const o=e.identifierNameForToken(s);t.push(\`this.\${o} = \${o}\`)}}else e.nextToken();e.nextToken();let o=e.currentIndex(),r=!1;for(;!e.matchesContextIdAndLabel(n.braceR,s);){if(!r&&e.matches2(n._super,n.parenL)){e.nextToken();const t=e.currentToken().contextId;if(null==t)throw new Error("Expected a context ID on the super call");for(;!e.matchesContextIdAndLabel(n.parenR,t);)e.nextToken();o=e.currentIndex(),r=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:o}}function Vs(e){return[n._async,n._get,n._set,n.plus,n.minus,n._readonly,n._static,n._public,n._private,n._protected,n._override,n._abstract,n.star,n._declare,n.hash].includes(e.type)}function Hs(e){if(e.matches1(n.bracketL)){const t=e.currentToken().contextId;if(null==t)throw new Error("Expected class context ID on computed name open bracket.");for(;!e.matchesContextIdAndLabel(n.bracketR,t);)e.nextToken();e.nextToken()}else e.nextToken()}function Us(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(n.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(n.dot);)e.removeToken(),e.removeToken()}const Ws={typeDeclarations:new Set,valueDeclarations:new Set};function zs(e){const t=new Set,s=new Set;for(let o=0;o<e.tokens.length;o++){const r=e.tokens[o];r.type===n.name&&F(r)&&(r.isType?t.add(e.identifierNameForToken(r)):s.add(e.identifierNameForToken(r)))}return{typeDeclarations:t,valueDeclarations:s}}function Xs(e,t,s){if(!e)return!1;const o=t.currentToken();if(null==o.rhsEndIndex)throw new Error("Expected non-null rhsEndIndex on export token.");const r=o.rhsEndIndex-t.currentIndex();if(3!==r&&(4!==r||!t.matches1AtIndex(o.rhsEndIndex-1,n.semi)))return!1;const i=t.tokenAtRelativeIndex(2);if(i.type!==n.name)return!1;const a=t.identifierNameForToken(i);return s.typeDeclarations.has(a)&&!s.valueDeclarations.has(a)}class Gs extends me{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(e,t,n,s,o,r,i){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.nameManager=s,this.reactHotLoaderTransformer=o,this.enableLegacyBabel5ModuleInterop=r,this.isTypeScriptTransformEnabled=i,Gs.prototype.__init.call(this),Gs.prototype.__init2.call(this),Gs.prototype.__init3.call(this),this.declarationInfo=i?zs(t):Ws}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(n._import,n.name,n.eq)?this.processImportEquals():this.tokens.matches1(n._import)?(this.processImport(),!0):this.tokens.matches2(n._export,n.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(n._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):!(!this.tokens.matches2(n.name,n.postIncDec)||!this.processPostIncDec())||(this.tokens.matches1(n.name)||this.tokens.matches1(n.jsxName)?this.processIdentifier():this.tokens.matches1(n.eq)?this.processAssignment():this.tokens.matches1(n.assign)?this.processComplexAssignment():!!this.tokens.matches1(n.preIncDec)&&this.processPreIncDec())}processImportEquals(){const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.isTypeName(e)?Us(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(n._import,n.parenL)){this.tokens.replaceToken("Promise.resolve().then(() => require");const e=this.tokens.currentToken().contextId;if(null==e)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(n.parenR,e);)this.rootTransformer.processToken();return void this.tokens.replaceToken("))")}if(this.removeImportAndDetectIfType())this.tokens.removeToken();else{const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}this.tokens.matches1(n.semi)&&this.tokens.removeToken()}removeImportAndDetectIfType(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(t._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,t._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(n.name)||this.tokens.matches1(n.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(n.string))return!1;let e=!1;for(;!this.tokens.matches1(n.string);)(!e&&this.tokens.matches1(n.braceL)||this.tokens.matches1(n.comma))&&(this.tokens.removeToken(),(this.tokens.matches2(n.name,n.comma)||this.tokens.matches2(n.name,n.braceR)||this.tokens.matches4(n.name,n.name,n.name,n.comma)||this.tokens.matches4(n.name,n.name,n.name,n.braceR))&&(e=!0)),this.tokens.removeToken();return!e}removeRemainingImport(){for(;!this.tokens.matches1(n.string);)this.tokens.removeToken()}processIdentifier(){const e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===j.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==j.Access)return!1;const t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let s=this.tokens.currentIndex()+1;for(;s<this.tokens.tokens.length&&this.tokens.tokens[s].type===n.parenR;)s++;return this.tokens.tokens[s].type===n.parenL?this.tokens.tokenAtRelativeIndex(1).type===n.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==n._new?(this.tokens.replaceToken(t+".call(void 0, "),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR)):this.tokens.replaceToken(\`(0, \${t})\`):this.tokens.replaceToken(t),!0}processObjectShorthand(){const e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return!!t&&(this.tokens.replaceToken(\`\${e}: \${t}\`),!0)}processExport(){if(this.tokens.matches2(n._export,n._enum)||this.tokens.matches3(n._export,n._const,n._enum))return!1;if(this.tokens.matches2(n._export,n._default))return this.processExportDefault(),this.hadDefaultExport=!0,!0;if(this.hadNamedExport=!0,this.tokens.matches2(n._export,n._var)||this.tokens.matches2(n._export,n._let)||this.tokens.matches2(n._export,n._const))return this.processExportVar(),!0;if(this.tokens.matches2(n._export,n._function)||this.tokens.matches3(n._export,n.name,n._function))return this.processExportFunction(),!0;if(this.tokens.matches2(n._export,n._class)||this.tokens.matches3(n._export,n._abstract,n._class))return this.processExportClass(),!0;if(this.tokens.matches2(n._export,n.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(n._export,n.star))return this.processExportStar(),!0;if(this.tokens.matches3(n._export,n.name,n.braceL)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,t._type)){for(this.tokens.removeInitialToken();!this.tokens.matches1(n.braceR);)this.tokens.removeToken();return this.tokens.removeToken(),this.tokens.matchesContextual(t._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.string)&&(this.tokens.removeToken(),this.tokens.removeToken()),!0}throw new Error("Unrecognized export syntax.")}processAssignment(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==n.name)return!1;if(t.shadowsGlobal)return!1;if(e>=2&&this.tokens.matches1AtIndex(e-2,n.dot))return!1;if(e>=2&&[n._var,n._let,n._const].includes(this.tokens.tokens[e-2].type))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!s&&(this.tokens.copyToken(),this.tokens.appendCode(\` \${s} =\`),!0)}processComplexAssignment(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==n.name)return!1;if(t.shadowsGlobal)return!1;if(e>=2&&this.tokens.matches1AtIndex(e-2,n.dot))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!s&&(this.tokens.appendCode(" = "+s),this.tokens.copyToken(),!0)}processPreIncDec(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==n.name)return!1;if(t.shadowsGlobal)return!1;if(e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,n.dot)||this.tokens.matches1AtIndex(e+2,n.bracketL)||this.tokens.matches1AtIndex(e+2,n.parenL)))return!1;const s=this.tokens.identifierNameForToken(t),o=this.importProcessor.resolveExportBinding(s);return!!o&&(this.tokens.appendCode(o+" = "),this.tokens.copyToken(),!0)}processPostIncDec(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e],s=this.tokens.tokens[e+1];if(t.type!==n.name)return!1;if(t.shadowsGlobal)return!1;if(e>=1&&this.tokens.matches1AtIndex(e-1,n.dot))return!1;const o=this.tokens.identifierNameForToken(t),r=this.importProcessor.resolveExportBinding(o);if(!r)return!1;const i=this.tokens.rawCodeForToken(s),a=this.importProcessor.getIdentifierReplacement(o)||o;if("++"===i)this.tokens.replaceToken(\`(\${a} = \${r} = \${a} + 1, \${a} - 1)\`);else{if("--"!==i)throw new Error("Unexpected operator: "+i);this.tokens.replaceToken(\`(\${a} = \${r} = \${a} - 1, \${a} + 1)\`)}return this.tokens.removeToken(),!0}processExportDefault(){if(this.tokens.matches4(n._export,n._default,n._function,n.name)||this.tokens.matches5(n._export,n._default,n.name,n._function,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,t._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.processNamedFunction();this.tokens.appendCode(\` exports.default = \${e};\`)}else if(this.tokens.matches4(n._export,n._default,n._class,n.name)||this.tokens.matches5(n._export,n._default,n._abstract,n._class,n.name)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(n._abstract)&&this.tokens.removeToken();const e=this.rootTransformer.processNamedClass();this.tokens.appendCode(\` exports.default = \${e};\`)}else{if(this.tokens.matches3(n._export,n._default,n.at))throw new Error("Export default statements with decorators are not yet supported.");if(Xs(this.isTypeScriptTransformEnabled,this.tokens,this.declarationInfo))this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const 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(" =")}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,n.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,n.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();const e=this.tokens.identifierName();for(;!this.tokens.matches1(n.eq);)this.rootTransformer.processToken();const t=this.tokens.currentToken().rhsEndIndex;if(null==t)throw new 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();const e=this.tokens.matches1(n.braceL);e&&this.tokens.appendCode("(");let t=0;for(;;)if(this.tokens.matches1(n.braceL)||this.tokens.matches1(n.dollarBraceL)||this.tokens.matches1(n.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(n.braceR)||this.tokens.matches1(n.bracketR))t--,this.tokens.copyToken();else{if(0===t&&!this.tokens.matches1(n.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(n.eq)){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}else{const e=this.tokens.currentToken();if(D(e)){const t=this.tokens.identifierName();let n=this.importProcessor.getIdentifierReplacement(t);if(null===n)throw new Error(\`Expected a replacement for \${t} in \\\`export var\\\` syntax.\`);M(e)&&(n=\`\${t}: \${n}\`),this.tokens.replaceToken(n)}else this.rootTransformer.processToken()}}if(e){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");const e=this.processNamedFunction();this.tokens.appendCode(\` exports.\${e} = \${e};\`)}processNamedFunction(){if(this.tokens.matches1(n._function))this.tokens.copyToken();else if(this.tokens.matches2(n.name,n._function)){if(!this.tokens.matchesContextual(t._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(n.star)&&this.tokens.copyToken(),!this.tokens.matches1(n.name))throw new Error("Expected identifier for exported function name.");const 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(n.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(n.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.tokens.matches1(n._abstract)&&this.tokens.removeToken();const e=this.rootTransformer.processNamedClass();this.tokens.appendCode(\` exports.\${e} = \${e};\`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=[];for(;;){if(this.tokens.matches1(n.braceR)){this.tokens.removeToken();break}const s=this.tokens.identifierName();let o;if(this.tokens.removeToken(),this.tokens.matchesContextual(t._as)?(this.tokens.removeToken(),o=this.tokens.identifierName(),this.tokens.removeToken()):o=s,!this.shouldElideExportedIdentifier(s)){const t=this.importProcessor.getIdentifierReplacement(s);e.push(\`exports.\${o} = \${t||s};\`)}if(this.tokens.matches1(n.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(n.comma,n.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}if(!this.tokens.matches1(n.comma))throw new Error("Unexpected token: "+JSON.stringify(this.tokens.currentToken()));this.tokens.removeToken()}if(this.tokens.matchesContextual(t._from)){this.tokens.removeToken();const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e))}else this.tokens.appendCode(e.join(" "));this.tokens.matches1(n.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(n.string);)this.tokens.removeToken();const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.matches1(n.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.declarationInfo.valueDeclarations.has(e)}}class Js extends me{constructor(e,t,n,s,o){super(),this.tokens=e,this.nameManager=t,this.reactHotLoaderTransformer=n,this.isTypeScriptTransformEnabled=s,this.nonTypeIdentifiers=s?be(e,o):new Set,this.declarationInfo=s?zs(e):Ws}process(){if(this.tokens.matches3(n._import,n.name,n.eq))return this.processImportEquals();if(this.tokens.matches4(n._import,n.name,n.name,n.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,t._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(n._export,n.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(n._export,n._import,n.name,n.name,n.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,t._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(n._import))return this.processImport();if(this.tokens.matches2(n._export,n._default))return this.processExportDefault();if(this.tokens.matches2(n._export,n.braceL))return this.processNamedExports();if(this.tokens.matches3(n._export,n.name,n.braceL)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,t._type)){for(this.tokens.removeInitialToken();!this.tokens.matches1(n.braceR);)this.tokens.removeToken();return this.tokens.removeToken(),this.tokens.matchesContextual(t._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.string)&&(this.tokens.removeToken(),this.tokens.removeToken()),!0}return!1}processImportEquals(){const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.isTypeName(e)?Us(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(n._import,n.parenL))return!1;const e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(n.string);)this.tokens.removeToken();this.tokens.removeToken(),this.tokens.matches1(n.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(n._import),this.tokens.matchesContextual(t._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,n.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,t._from))return!0;if(this.tokens.matches1(n.string))return this.tokens.copyToken(),!1;let e=!1;if(this.tokens.matches1(n.name)&&(this.isTypeName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(n.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(n.comma)&&this.tokens.copyToken())),this.tokens.matches1(n.star))this.isTypeName(this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(e=!0,this.tokens.copyExpectedToken(n.star),this.tokens.copyExpectedToken(n.name),this.tokens.copyExpectedToken(n.name));else if(this.tokens.matches1(n.braceL)){for(this.tokens.copyToken();!this.tokens.matches1(n.braceR);)if(this.tokens.matches3(n.name,n.name,n.comma)||this.tokens.matches3(n.name,n.name,n.braceR))this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.matches1(n.comma)&&this.tokens.removeToken();else if(this.tokens.matches5(n.name,n.name,n.name,n.name,n.comma)||this.tokens.matches5(n.name,n.name,n.name,n.name,n.braceR))this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.matches1(n.comma)&&this.tokens.removeToken();else if(this.tokens.matches2(n.name,n.comma)||this.tokens.matches2(n.name,n.braceR))this.isTypeName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(n.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(n.comma)&&this.tokens.copyToken());else{if(!this.tokens.matches4(n.name,n.name,n.name,n.comma)&&!this.tokens.matches4(n.name,n.name,n.name,n.braceR))throw new Error("Unexpected import form.");this.isTypeName(this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.matches1(n.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.matches1(n.comma)&&this.tokens.copyToken())}this.tokens.copyExpectedToken(n.braceR)}return!e}isTypeName(e){return this.isTypeScriptTransformEnabled&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(Xs(this.isTypeScriptTransformEnabled,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(n._export,n._default,n._function,n.name)||this.tokens.matches5(n._export,n._default,n.name,n._function,n.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,t._async)||this.tokens.matches4(n._export,n._default,n._class,n.name)||this.tokens.matches5(n._export,n._default,n._abstract,n._class,n.name))&&this.reactHotLoaderTransformer){const 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;for(this.tokens.copyExpectedToken(n._export),this.tokens.copyExpectedToken(n.braceL);!this.tokens.matches1(n.braceR);){if(!this.tokens.matches1(n.name))throw new Error("Expected identifier at the start of named export.");if(this.shouldElideExportedName(this.tokens.identifierName())){for(;!this.tokens.matches1(n.comma)&&!this.tokens.matches1(n.braceR)&&!this.tokens.isAtEnd();)this.tokens.removeToken();this.tokens.matches1(n.comma)&&this.tokens.removeToken()}else{for(;!this.tokens.matches1(n.comma)&&!this.tokens.matches1(n.braceR)&&!this.tokens.isAtEnd();)this.tokens.copyToken();this.tokens.matches1(n.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(n.braceR),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}}class Ys extends me{constructor(e,t){super(),this.rootTransformer=e,this.tokens=t}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()}}const Qs=["mock","unmock","enableAutomock","disableAutomock"];class Zs extends me{__init(){this.hoistedFunctionNames=[]}constructor(e,t,n,s){super(),this.rootTransformer=e,this.tokens=t,this.nameManager=n,this.importProcessor=s,Zs.prototype.__init.call(this)}process(){return!(0!==this.tokens.currentToken().scopeDepth||!this.tokens.matches4(n.name,n.dot,n.name,n.parenL)||"jest"!==this.tokens.identifierName())&&(!function(e){let t=void 0,n=e[0],s=1;for(;s<e.length;){const o=e[s],r=e[s+1];if(s+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=r(n)):"call"!==o&&"optionalCall"!==o||(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("jest")])&&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(n.dot,n.name,n.parenL);){const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(Qs.includes(t)){const t=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(t),this.tokens.replaceToken(\`function \${t}(){jest.\`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR),this.tokens.appendCode(";}"),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken("jest."),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.parenR),e=!0}return!0}}class eo extends me{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(n.num)){const e=this.tokens.currentTokenCode();if(e.includes("_"))return this.tokens.replaceToken(e.replace(/_/g,"")),!0}return!1}}class to extends me{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return!!this.tokens.matches2(n._catch,n.braceL)&&(this.tokens.copyToken(),this.tokens.appendCode(\` (\${this.nameManager.claimFreeName("e")})\`),!0)}}class no extends me{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(n.nullishCoalescing)){const e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(n._delete)){if(this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0}const e=this.tokens.currentToken().subscriptStartIndex;if(null!=e&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==n._super){const t=this.nameManager.claimFreeName("_");let s;if(s=e>0&&this.tokens.matches1AtIndex(e-1,n._delete)&&this.isLastSubscriptInChain()?\`\${t} => delete \${t}\`:\`\${t} => \${t}\`,this.tokens.tokens[e].isAsyncOperation&&(s="async "+s),this.tokens.matches2(n.questionDot,n.parenL)||this.tokens.matches2(n.questionDot,n.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(", 'optionalCall', "+s);else if(this.tokens.matches2(n.questionDot,n.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(", 'optionalAccess', "+s);else if(this.tokens.matches1(n.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(\`, 'optionalAccess', \${s}.\`);else if(this.tokens.matches1(n.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(\`, 'access', \${s}.\`);else if(this.tokens.matches1(n.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(\`, 'access', \${s}[\`);else{if(!this.tokens.matches1(n.parenL))throw new Error("Unexpected subscript operator in optional chain.");this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(\`, 'call', \${s}(\`)}return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw new 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 new 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===n._super;t--}}}class so extends me{constructor(e,t,n,s){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.options=s}process(){const e=this.tokens.currentIndex();if("createReactClass"===this.tokens.identifierName()){const 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(n.name,n.dot,n.name)&&"React"===this.tokens.identifierName()&&"createClass"===this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)){const t=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return t?(this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){const t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(n.parenL),this.tokens.copyExpectedToken(n.braceL),this.tokens.appendCode(\`displayName: '\${t}',\`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(n.braceR),this.tokens.copyExpectedToken(n.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,n.name,n.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===j.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,n._export,n._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const e=(this.options.filePath||"unknown").split("/"),t=e[e.length-1],n=t.lastIndexOf("."),s=-1===n?t:t.slice(0,n);return"index"===s&&e[e.length-2]?e[e.length-2]:s}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(n.parenL,n.braceL))return!1;const t=e+1,s=this.tokens.tokens[t].contextId;if(null==s)throw new Error("Expected non-null context ID on object open-brace.");for(;e<this.tokens.tokens.length;e++){const t=this.tokens.tokens[e];if(t.type===n.braceR&&t.contextId===s){e++;break}if("displayName"===this.tokens.identifierNameAtIndex(e)&&this.tokens.tokens[e].identifierRole===j.ObjectKey&&t.contextId===s)return!1}if(e===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(e,n.parenR)||this.tokens.matches2AtIndex(e,n.comma,n.parenR)}}class oo extends me{__init(){this.extractedDefaultExportName=null}constructor(e,t){super(),this.tokens=e,this.filePath=t,oo.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return"\\n (function () {\\n var enterModule = require('react-hot-loader').enterModule;\\n enterModule && enterModule(module);\\n })();".replace(/\\s+/g," ").trim()}getSuffixCode(){const e=new Set;for(const t of this.tokens.tokens)!t.isType&&F(t)&&t.identifierRole!==j.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));const t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),\`\\n;(function () {\\n var reactHotLoader = require('react-hot-loader').default;\\n var leaveModule = require('react-hot-loader').leaveModule;\\n if (!reactHotLoader) {\\n return;\\n }\\n\${t.map(({variableName:e,uniqueLocalName:t})=>\` reactHotLoader.register(\${e}, "\${t}", \${JSON.stringify(this.filePath||"")});\`).join("\\n")}\\n leaveModule(module);\\n})();\`}process(){return!1}}const ro=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 io(e){if(0===e.length)return!1;if(!O[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!R[e.charCodeAt(t)])return!1;return!ro.has(e)}class ao extends me{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(n._public)||this.tokens.matches1(n._protected)||this.tokens.matches1(n._private)||this.tokens.matches1(n._abstract)||this.tokens.matches1(n._readonly)||this.tokens.matches1(n._override)||this.tokens.matches1(n.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(n._enum)||this.tokens.matches2(n._const,n._enum)?(this.processEnum(),!0):!(!this.tokens.matches2(n._export,n._enum)&&!this.tokens.matches3(n._export,n._const,n._enum))&&(this.processEnum(!0),!0))}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(n._const)||this.tokens.matches1(n._enum);)this.tokens.removeToken();const t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(\`var \${t}; (function (\${t})\`),this.tokens.copyExpectedToken(n.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(n.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(n.braceR);){const{nameStringCode:s,variableName:o}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(n.eq,n.string,n.comma)||this.tokens.matches3(n.eq,n.string,n.braceR)?this.processStringLiteralEnumMember(e,s,o):this.tokens.matches1(n.eq)?this.processExplicitValueEnumMember(e,s,o):this.processImplicitValueEnumMember(e,s,o,t),this.tokens.matches1(n.comma)&&this.tokens.removeToken(),t=null!=o?o:\`\${e}[\${s}]\`}}extractEnumKeyInfo(e){if(e.type===n.name){const t=this.tokens.identifierNameForToken(e);return{nameStringCode:\`"\${t}"\`,variableName:io(t)?t:null}}if(e.type===n.string){const t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:io(t)?t:null}}throw new 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){const s=this.tokens.currentToken().rhsEndIndex;if(null==s)throw new Error("Expected rhsEndIndex on enum assign.");if(null!=n){for(this.tokens.appendCode("const "+n),this.tokens.copyToken();this.tokens.currentIndex()<s;)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()<s;)this.rootTransformer.processToken();this.tokens.appendCode(\`] = \${t};\`)}}processImplicitValueEnumMember(e,t,n,s){let o=null!=s?s+" + 1":"0";null!=n&&(this.tokens.appendCode(\`const \${n} = \${o}; \`),o=n),this.tokens.appendCode(\`\${e}[\${e}[\${t}] = \${o}] = \${t};\`)}}class co{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(e,t,n,s){co.prototype.__init.call(this),co.prototype.__init2.call(this),this.nameManager=e.nameManager,this.helperManager=e.helperManager;const{tokenProcessor:o,importProcessor:r}=e;this.tokens=o,this.isImportsTransformEnabled=t.includes("imports"),this.isReactHotLoaderTransformEnabled=t.includes("react-hot-loader"),this.disableESTransforms=Boolean(s.disableESTransforms),s.disableESTransforms||(this.transformers.push(new no(o,this.nameManager)),this.transformers.push(new eo(o)),this.transformers.push(new to(o,this.nameManager))),t.includes("jsx")&&(this.transformers.push(new ge(this,o,r,this.nameManager,s)),this.transformers.push(new so(this,o,r,s)));let i=null;if(t.includes("react-hot-loader")){if(!s.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");i=new oo(o,s.filePath),this.transformers.push(i)}if(t.includes("imports")){if(null===r)throw new Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new Gs(this,o,r,this.nameManager,i,n,t.includes("typescript")))}else this.transformers.push(new Js(o,this.nameManager,i,t.includes("typescript"),s));t.includes("flow")&&this.transformers.push(new Ys(this,o)),t.includes("typescript")&&this.transformers.push(new ao(this,o,t.includes("imports"))),t.includes("jest")&&this.transformers.push(new Zs(this,o,this.nameManager,r))}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?'"use strict";':"";for(const t of this.transformers)e+=t.getPrefixCode();e+=this.helperManager.emitHelpers(),e+=this.generatedVariables.map(e=>\` var \${e};\`).join("");for(const t of this.transformers)e+=t.getHoistedCode();let t="";for(const e of this.transformers)t+=e.getSuffixCode();let n=this.tokens.finish();if(n.startsWith("#!")){let s=n.indexOf("\\n");return-1===s&&(s=n.length,n+="\\n"),n.slice(0,s+1)+e+n.slice(s+1)+t}return e+this.tokens.finish()+t}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(n.braceL)||this.tokens.matches1(n.dollarBraceL))e++;else if(this.tokens.matches1(n.braceR)){if(0===e)return;e--}if(this.tokens.matches1(n.parenL))t++;else if(this.tokens.matches1(n.parenR)){if(0===t)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(n._class))this.processClass();else{for(const e of this.transformers){if(e.process())return}this.tokens.copyToken()}}processNamedClass(){if(!this.tokens.matches2(n._class,n.name))throw new Error("Expected identifier for exported class name.");const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){const e=\$s(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0;let s=e.headerInfo.className;t&&(s=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(s),this.tokens.appendCode(\` (\${s} =\`));const o=this.tokens.currentToken().contextId;if(null==o)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(n._class);!this.tokens.matchesContextIdAndLabel(n.braceL,o);)this.processToken();this.processClassBody(e,s);const r=e.staticInitializerNames.map(e=>\`\${s}.\${e}()\`);t?this.tokens.appendCode(\`, \${r.map(e=>e+", ").join("")}\${s})\`):e.staticInitializerNames.length>0&&this.tokens.appendCode(" "+r.map(e=>e+";").join(" "))}processClassBody(e,t){const{headerInfo:s,constructorInsertPos:o,constructorInitializerStatements:r,fields:i,instanceInitializerNames:a,rangesToRemove:c}=e;let h=0,l=0;const p=this.tokens.currentToken().contextId;if(null==p)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(n.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");const u=r.length+a.length>0;if(null===o&&u){const e=this.makeConstructorInitCode(r,a,t);if(s.hasSuperclass){const t=this.nameManager.claimFreeName("args");this.tokens.appendCode(\`constructor(...\${t}) { super(...\${t}); \${e}; }\`)}else this.tokens.appendCode(\`constructor() { \${e}; }\`)}for(;!this.tokens.matchesContextIdAndLabel(n.braceR,p);)if(h<i.length&&this.tokens.currentIndex()===i[h].start){let e=!1;for(this.tokens.matches1(n.bracketL)?this.tokens.copyTokenWithPrefix(i[h].initializerName+"() {this"):this.tokens.matches1(n.string)||this.tokens.matches1(n.num)?(this.tokens.copyTokenWithPrefix(i[h].initializerName+"() {this["),e=!0):this.tokens.copyTokenWithPrefix(i[h].initializerName+"() {this.");this.tokens.currentIndex()<i[h].end;)e&&this.tokens.currentIndex()===i[h].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),h++}else if(l<c.length&&this.tokens.currentIndex()>=c[l].start){for(this.tokens.currentIndex()<c[l].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<c[l].end;)this.tokens.removeToken();l++}else this.tokens.currentIndex()===o?(this.tokens.copyToken(),u&&this.tokens.appendCode(\`;\${this.makeConstructorInitCode(r,a,t)};\`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(n.braceR)}makeConstructorInitCode(e,t,n){return[...e,...t.map(e=>\`\${n}.prototype.\${e}.call(this)\`)].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(n.parenR,n.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,n.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(t._async)&&!this.tokens.matches1(n._async))return!1;const e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==n.lessThan||!e.isType)return!1;let s=this.tokens.currentIndex()+1;for(;this.tokens.tokens[s].isType;)s++;if(this.tokens.matches1AtIndex(s,n.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<s;)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}}var ho=function(){function e(e){this.string=e;for(var t=[0],n=0;n<e.length;)switch(e[n]){case"\\n":n+="\\n".length,t.push(n);break;case"\\r":"\\n"===e[n+="\\r".length]&&(n+="\\n".length),t.push(n);break;default:n++}this.offsets=t}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();function lo(e,t){return e.length>t?e.slice(0,t-3)+"...":e}function po(e,s,o){s++,e.matches1AtIndex(s,n.parenL)||(e.matches1AtIndex(s,n.name)&&(o.add(e.identifierNameAtIndex(s)),s++,e.matches1AtIndex(s,n.comma)&&s++),e.matches1AtIndex(s,n.star)&&(s+=2,o.add(e.identifierNameAtIndex(s)),s++),e.matches1AtIndex(s,n.braceL)&&function(e,s,o){for(;;){if(e.matches1AtIndex(s,n.braceR))return;let r=e.identifierNameAtIndex(s);if(s++,e.matchesContextualAtIndex(s,t._as)&&(s++,r=e.identifierNameAtIndex(s),s++),o.add(r),e.matches2AtIndex(s,n.comma,n.braceR))return;if(e.matches1AtIndex(s,n.braceR))return;if(!e.matches1AtIndex(s,n.comma))throw new Error("Unexpected token: "+JSON.stringify(e.tokens[s]));s++}}(e,++s,o))}function uo(e,t){const s=t.transforms.includes("jsx"),o=t.transforms.includes("typescript"),r=t.transforms.includes("flow"),i=!0===t.disableESTransforms,a=function(e,t,n,s){if(s&&n)throw new Error("Cannot combine flow and typescript plugins.");_(e,t,n,s);const o=qs();if(p.error)throw m(p.error);return o}(e,s,o,r),c=a.tokens,h=a.scopes,l=new Se(e,c),u=new Ce(l),f=new Bs(e,c,r,i,u),d=Boolean(t.enableLegacyTypeScriptModuleInterop);let k=null;return t.transforms.includes("imports")?(k=new Ie(l,f,d,t,t.transforms.includes("typescript"),u),k.preprocessTokens(),Ae(f,h,k.getGlobalNames()),t.transforms.includes("typescript")&&k.pruneTypeOnlyImports()):t.transforms.includes("typescript")&&Ae(f,h,function(e){const t=new Set;for(let s=0;s<e.tokens.length;s++)e.matches1AtIndex(s,n._import)&&!e.matches3AtIndex(s,n._import,n.name,n.eq)&&po(e,s,t);return t}(f)),{tokenProcessor:f,scopes:h,nameManager:l,importProcessor:k,helperManager:u}}return e.getFormattedTokens=function(e,t){return function(e,t){if(0===t.length)return"";const n=Object.keys(t[0]).filter(e=>"type"!==e&&"value"!==e&&"start"!==e&&"end"!==e&&"loc"!==e),s=Object.keys(t[0].type).filter(e=>"label"!==e&&"keyword"!==e),r=["Location","Label","Raw",...n,...s],i=new ho(e),a=[r,...t.map((function(t){const r=e.slice(t.start,t.end);return[(i=t.start,a=t.end,\`\${l(i)}-\${l(a)}\`),o(t.type),lo(String(r),14),...n.map(e=>h(t[e],e)),...s.map(e=>h(t.type[e],e))];var i,a}))],c=r.map(()=>0);for(const e of a)for(let t=0;t<e.length;t++)c[t]=Math.max(c[t],e[t].length);return a.map(e=>e.map((e,t)=>e.padEnd(c[t])).join(" ")).join("\\n");function h(e,t){return!0===e?t:!1===e||null===e?"":String(e)}function l(e){const t=i.locationForIndex(e);return t?\`\${t.line+1}:\${t.column+1}\`:"Unknown"}}(e,uo(e,t).tokenProcessor.tokens)},e.getVersion=function(){return require("../package.json").version},e.transform=function(e,t){!function(e){Ve.strictCheck(e)}(t);try{const n=uo(e,t);let s={code:new co(n,t.transforms,Boolean(t.enableLegacyBabel5ModuleInterop),t).transform()};if(t.sourceMapOptions){if(!t.filePath)throw new Error("filePath must be specified when generating a source map.");s={...s,sourceMap:ve(s.code,t.filePath,t.sourceMapOptions)}}return s}catch(e){throw t.filePath&&(e.message=\`Error transforming \${t.filePath}: \${e.message}\`),e}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});sucrase //# sourceURL=Sucrase`);
const grass = await eval(`(async () => {
function js_read_fs(path) {
console.info('GRASS read_fs', path)
return ""
}
function js_is_file(path) {
console.log(\`GRASS is_file\`, path)
return true
}
function js_is_dir(path) {
console.log(\`GRASS is_dir\`, path)
return false
}
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
const cachedTextEncoder = new TextEncoder('utf-8');
cachedTextDecoder.decode();
let cachegetUint8Memory0 = null;
function getUint8Memory0() {
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
}
return cachegetUint8Memory0;
}
function getStringFromWasm0(ptr, len) {
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
const heap = new Array(32).fill(undefined);
heap.push(undefined, null, true, false);
let heap_next = heap.length;
function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
function getObject(idx) { return heap[idx]; }
let WASM_VECTOR_LEN = 0;
const encodeString = function (arg, view) {
return cachedTextEncoder.encodeInto(arg, view);
};
function passStringToWasm0(arg, malloc, realloc) {
if (realloc === undefined) {
const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length);
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
WASM_VECTOR_LEN = buf.length;
return ptr;
}
let len = arg.length;
let ptr = malloc(len);
const mem = getUint8Memory0();
let offset = 0;
for (; offset < len; offset++) {
const code = arg.charCodeAt(offset);
if (code > 0x7F) break;
mem[ptr + offset] = code;
}
if (offset !== len) {
if (offset !== 0) {
arg = arg.slice(offset);
}
ptr = realloc(ptr, len, len = offset + arg.length * 3);
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
const ret = encodeString(arg, view);
offset += ret.written;
}
WASM_VECTOR_LEN = offset;
return ptr;
}
function isLikeNone(x) {
return x === undefined || x === null;
}
let cachegetInt32Memory0 = null;
function getInt32Memory0() {
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
}
return cachegetInt32Memory0;
}
let cachegetFloat64Memory0 = null;
function getFloat64Memory0() {
if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
}
return cachegetFloat64Memory0;
}
function dropObject(idx) {
if (idx < 36) return;
heap[idx] = heap_next;
heap_next = idx;
}
function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}
function debugString(val) {
// primitive types
const type = typeof val;
if (type == 'number' || type == 'boolean' || val == null) {
return \`\${val}\`;
}
if (type == 'string') {
return \`"\${val}"\`;
}
if (type == 'symbol') {
const description = val.description;
if (description == null) {
return 'Symbol';
} else {
return \`Symbol(\${description})\`;
}
}
if (type == 'function') {
const name = val.name;
if (typeof name == 'string' && name.length > 0) {
return \`Function(\${name})\`;
} else {
return 'Function';
}
}
// objects
if (Array.isArray(val)) {
const length = val.length;
let debug = '[';
if (length > 0) {
debug += debugString(val[0]);
}
for(let i = 1; i < length; i++) {
debug += ', ' + debugString(val[i]);
}
debug += ']';
return debug;
}
// Test for built-in
const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));
let className;
if (builtInMatches.length > 1) {
className = builtInMatches[1];
} else {
// Failed to match the standard '[object ClassName]'
return toString.call(val);
}
if (className == 'Object') {
// we're a user defined class or Object
// JSON.stringify avoids problems with cycles, and is generally much
// easier than looping through ownProperties of \`val\`.
try {
return 'Object(' + JSON.stringify(val) + ')';
} catch (_) {
return 'Object';
}
}
// errors
if (val instanceof Error) {
return \`\${val.name}: \${val.message}\\n\${val.stack}\`;
}
// TODO we could test for more things here, like \`Set\`s and \`Map\`s.
return className;
}
/**
* @param {string} p
* @param {any} options
* @returns {string}
*/
function str(p, options) {
let ptr1, len1;
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(p, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.str(retptr, ptr0, len0, addHeapObject(options));
const r0 = getInt32Memory0()[retptr / 4 + 0];
const r1 = getInt32Memory0()[retptr / 4 + 1];
const r2 = getInt32Memory0()[retptr / 4 + 2];
const r3 = getInt32Memory0()[retptr / 4 + 3];
ptr1 = r0;
len1 = r1;
if (r3) {
ptr1 = 0; len1 = 0;
throw takeObject(r2);
}
return getStringFromWasm0(ptr1, len1);
} catch (e) {
// topaz.log('grass', 'failed', e);
console.error('grass failed to compile\\n', e, { stdin: p, options });
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
if (ptr1) wasm.__wbindgen_free(ptr1, len1);
}
}
/**
* @returns {any}
*/
/* export function get_config() {
const ret = wasm.get_config();
return takeObject(ret);
} */
let stack_pointer = 32;
function addBorrowedObject(obj) {
if (stack_pointer == 1) throw new Error('out of js stack');
heap[--stack_pointer] = obj;
return stack_pointer;
}
/**
* @param {string} path
* @param {any} jsconfig
* @returns {string}
*/
/* export function file(path, jsconfig) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
wasm.file(retptr, ptr0, len0, addBorrowedObject(jsconfig));
const r0 = getInt32Memory0()[retptr / 4 + 0];
const r1 = getInt32Memory0()[retptr / 4 + 1];
const r2 = getInt32Memory0()[retptr / 4 + 2];
const r3 = getInt32Memory0()[retptr / 4 + 3];
let ptr1 = r0;
let len1 = r1;
if (r3) {
ptr1 = 0; len1 = 0;
throw takeObject(r2);
}
return getStringFromWasm0(ptr1, len1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
heap[stack_pointer++] = undefined;
wasm.__wbindgen_free(ptr1, len1);
}
} */
function handleError(f, args) {
try {
return f.apply(this, args);
} catch (e) {
wasm.__wbindgen_exn_store(addHeapObject(e));
}
}
function getArrayU8FromWasm0(ptr, len) {
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
}
const imports = {
__wbindgen_placeholder__: {
__wbindgen_string_new: function(arg0, arg1) {
var ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
},
__wbindgen_string_get: function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'string' ? obj : undefined;
const ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
},
__wbindgen_boolean_get: function(arg0) {
const v = getObject(arg0);
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
return ret;
},
__wbindgen_is_object: function(arg0) {
const val = getObject(arg0);
const ret = typeof(val) === 'object' && val !== null;
return ret;
},
__wbg_jsreadfs_82f60869c0333697: function(arg0, arg1, arg2) {
const ret = js_read_fs(getStringFromWasm0(arg1, arg2));
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
},
__wbg_jsisfile_5c0a4b8a496e3cfe: function(arg0, arg1) {
const ret = js_is_file(getStringFromWasm0(arg0, arg1));
return ret;
},
__wbg_jsisdir_8b96007ac52fd047: function(arg0, arg1) {
const ret = js_is_dir(getStringFromWasm0(arg0, arg1));
return ret;
},
__wbindgen_json_parse: function(arg0, arg1) {
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
},
__wbindgen_json_serialize: function(arg0, arg1) {
const obj = getObject(arg1);
const ret = JSON.stringify(obj === undefined ? null : obj);
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
},
__wbindgen_number_get: function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'number' ? obj : undefined;
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
},
__wbindgen_is_null: function(arg0) {
const ret = getObject(arg0) === null;
return ret;
},
__wbindgen_is_undefined: function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
},
__wbindgen_object_clone_ref: function(arg0) {
const ret = getObject(arg0);
return addHeapObject(ret);
},
__wbg_get_f7833d6ec572e462: function(arg0, arg1) {
const ret = getObject(arg0)[takeObject(arg1)];
return addHeapObject(ret);
},
__wbg_msCrypto_c429c3f8f7a70bb5: function(arg0) {
const ret = getObject(arg0).msCrypto;
return addHeapObject(ret);
},
__wbg_crypto_9e3521ed42436d35: function(arg0) {
const ret = getObject(arg0).crypto;
return addHeapObject(ret);
},
__wbg_getRandomValues_3e46aa268da0fed1: function() { return handleError(function (arg0, arg1) {
getObject(arg0).getRandomValues(getObject(arg1));
}, arguments) },
__wbg_modulerequire_0a83c0c31d12d2c7: function() { return handleError(function (arg0, arg1) {
const ret = module.require(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
}, arguments) },
__wbg_randomFillSync_59fcc2add91fe7b3: function() { return handleError(function (arg0, arg1, arg2) {
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
}, arguments) },
__wbg_process_f2b73829dbd321da: function(arg0) {
const ret = getObject(arg0).process;
return addHeapObject(ret);
},
__wbg_versions_cd82f79c98672a9f: function(arg0) {
const ret = getObject(arg0).versions;
return addHeapObject(ret);
},
__wbg_node_ee3f6da4130bd35f: function(arg0) {
const ret = getObject(arg0).node;
return addHeapObject(ret);
},
__wbindgen_is_string: function(arg0) {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
},
__wbg_isArray_8480ed76e5369634: function(arg0) {
var ret = Array.isArray(getObject(arg0));
return ret;
},
__wbg_instanceof_ArrayBuffer_649f53c967aec9b3: function(arg0) {
var ret = getObject(arg0) instanceof ArrayBuffer;
return ret;
},
__wbg_values_71935f80778b5113: function(arg0) {
var ret = getObject(arg0).values();
return addHeapObject(ret);
},
__wbg_new_55259b13834a484c: function(arg0, arg1) {
var ret = new Error(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
},
__wbg_newnoargs_f579424187aa1717: function(arg0, arg1) {
var ret = new Function(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
},
__wbg_call_89558c3e96703ca1: function() { return handleError(function (arg0, arg1) {
var ret = getObject(arg0).call(getObject(arg1));
return addHeapObject(ret);
}, arguments) },
__wbg_next_dd1a890d37e38d73: function() { return handleError(function (arg0) {
var ret = getObject(arg0).next();
return addHeapObject(ret);
}, arguments) },
__wbg_next_c7a2a6b012059a5e: function(arg0) {
var ret = getObject(arg0).next;
return addHeapObject(ret);
},
__wbg_done_982b1c7ac0cbc69d: function(arg0) {
var ret = getObject(arg0).done;
return ret;
},
__wbg_value_2def2d1fb38b02cd: function(arg0) {
var ret = getObject(arg0).value;
return addHeapObject(ret);
},
__wbg_iterator_4b9cedbeda0c0e30: function() {
var ret = Symbol.iterator;
return addHeapObject(ret);
},
__wbg_globalThis_d61b1f48a57191ae: function() { return handleError(function () {
var ret = globalThis.globalThis;
return addHeapObject(ret);
}, arguments) },
__wbg_self_e23d74ae45fb17d1: function() { return handleError(function () {
var ret = self.self;
return addHeapObject(ret);
}, arguments) },
__wbg_window_b4be7f48b24ac56e: function() { return handleError(function () {
var ret = window.window;
return addHeapObject(ret);
}, arguments) },
__wbg_global_e7669da72fd7f239: function() { return handleError(function () {
var ret = global.global;
return addHeapObject(ret);
}, arguments) },
__wbg_instanceof_Uint8Array_8a8537f46e056474: function(arg0) {
var ret = getObject(arg0) instanceof Uint8Array;
return ret;
},
__wbg_new_e3b800e570795b3c: function(arg0) {
var ret = new Uint8Array(getObject(arg0));
return addHeapObject(ret);
},
__wbg_newwithlength_5f4ce114a24dfe1e: function(arg0) {
var ret = new Uint8Array(arg0 >>> 0);
return addHeapObject(ret);
},
__wbg_subarray_a68f835ca2af506f: function(arg0, arg1, arg2) {
var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
},
__wbg_length_30803400a8f15c59: function(arg0) {
var ret = getObject(arg0).length;
return ret;
},
__wbg_set_5b8081e9d002f0df: function(arg0, arg1, arg2) {
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
},
__wbindgen_is_function: function(arg0) {
var ret = typeof(getObject(arg0)) === 'function';
return ret;
},
__wbindgen_object_drop_ref: function(arg0) {
takeObject(arg0);
},
__wbg_buffer_5e74a88a1424a2e0: function(arg0) {
var ret = getObject(arg0).buffer;
return addHeapObject(ret);
},
__wbg_get_8bbb82393651dd9c: function() { return handleError(function (arg0, arg1) {
var ret = Reflect.get(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
}, arguments) },
__wbindgen_debug_string: function(arg0, arg1) {
var ret = debugString(getObject(arg1));
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
},
__wbindgen_throw: function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
},
__wbindgen_memory: function() {
var ret = wasm.memory;
return addHeapObject(ret);
},
},
};
let wasmCode = await (await fetch('https://goosemod.github.io/topaz/src/grass.wasm')).arrayBuffer();
const wasmInstance = (await WebAssembly.instantiate(wasmCode, imports)).instance;
const wasm = wasmInstance.exports;
return str;
})(); //# sourceURL=Grass`);
const XXHash = (await eval(`var E=Object.defineProperty;var r=(s,i)=>E(s,"name",{value:i,configurable:!0});var M=new Uint8Array([0,97,115,109,1,0,0,0,1,48,8,96,3,127,127,127,0,96,3,127,127,127,1,127,96,2,127,127,0,96,2,127,126,0,96,1,127,1,127,96,1,127,1,126,96,3,127,127,126,1,126,96,3,126,127,127,1,126,3,11,10,1,1,2,0,4,6,7,3,0,5,5,3,1,0,1,7,85,9,3,109,101,109,2,0,5,120,120,104,51,50,0,0,6,105,110,105,116,51,50,0,2,8,117,112,100,97,116,101,51,50,0,3,8,100,105,103,101,115,116,51,50,0,4,5,120,120,104,54,52,0,5,6,105,110,105,116,54,52,0,7,8,117,112,100,97,116,101,54,52,0,8,8,100,105,103,101,115,116,54,52,0,9,10,211,23,10,242,1,1,4,127,32,0,32,1,106,33,3,32,1,65,16,79,4,127,32,3,65,16,107,33,6,32,2,65,168,136,141,161,2,106,33,3,32,2,65,247,148,175,175,120,106,33,4,32,2,65,177,243,221,241,121,107,33,5,3,64,32,0,40,2,0,65,247,148,175,175,120,108,32,3,106,65,13,119,65,177,243,221,241,121,108,33,3,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,32,4,106,65,13,119,65,177,243,221,241,121,108,33,4,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,32,2,106,65,13,119,65,177,243,221,241,121,108,33,2,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,32,5,106,65,13,119,65,177,243,221,241,121,108,33,5,32,0,65,4,106,34,0,32,6,77,13,0,11,32,2,65,12,119,32,5,65,18,119,106,32,4,65,7,119,106,32,3,65,1,119,106,5,32,2,65,177,207,217,178,1,106,11,32,1,106,32,0,32,1,65,15,113,16,1,11,146,1,0,32,1,32,2,106,33,2,3,64,32,1,65,4,106,32,2,75,69,4,64,32,1,40,2,0,65,189,220,202,149,124,108,32,0,106,65,17,119,65,175,214,211,190,2,108,33,0,32,1,65,4,106,33,1,12,1,11,11,3,64,32,1,32,2,79,69,4,64,32,1,45,0,0,65,177,207,217,178,1,108,32,0,106,65,11,119,65,177,243,221,241,121,108,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,65,15,118,32,0,115,65,247,148,175,175,120,108,34,0,32,0,65,13,118,115,65,189,220,202,149,124,108,34,0,32,0,65,16,118,115,11,63,0,32,0,65,8,106,32,1,65,168,136,141,161,2,106,54,2,0,32,0,65,12,106,32,1,65,247,148,175,175,120,106,54,2,0,32,0,65,16,106,32,1,54,2,0,32,0,65,20,106,32,1,65,177,243,221,241,121,107,54,2,0,11,211,4,1,6,127,32,1,32,2,106,33,6,32,0,65,24,106,33,5,32,0,65,40,106,40,2,0,33,3,32,0,32,0,40,2,0,32,2,106,54,2,0,32,0,65,4,106,34,4,32,4,40,2,0,32,2,65,16,79,32,0,40,2,0,65,16,79,114,114,54,2,0,32,2,32,3,106,65,16,73,4,64,32,3,32,5,106,32,1,32,2,252,10,0,0,32,0,65,40,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,5,106,32,1,65,16,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,40,2,0,32,5,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,3,32,4,54,2,0,32,0,65,12,106,34,3,40,2,0,32,5,65,4,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,3,32,4,54,2,0,32,0,65,16,106,34,3,40,2,0,32,5,65,8,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,3,32,4,54,2,0,32,0,65,20,106,34,3,40,2,0,32,5,65,12,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,3,32,4,54,2,0,32,0,65,40,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,32,6,65,16,107,77,4,64,32,6,65,16,107,33,8,32,0,65,8,106,40,2,0,33,2,32,0,65,12,106,40,2,0,33,3,32,0,65,16,106,40,2,0,33,4,32,0,65,20,106,40,2,0,33,7,3,64,32,1,40,2,0,65,247,148,175,175,120,108,32,2,106,65,13,119,65,177,243,221,241,121,108,33,2,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,32,3,106,65,13,119,65,177,243,221,241,121,108,33,3,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,32,4,106,65,13,119,65,177,243,221,241,121,108,33,4,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,32,7,106,65,13,119,65,177,243,221,241,121,108,33,7,32,1,65,4,106,34,1,32,8,77,13,0,11,32,0,65,8,106,32,2,54,2,0,32,0,65,12,106,32,3,54,2,0,32,0,65,16,106,32,4,54,2,0,32,0,65,20,106,32,7,54,2,0,11,32,1,32,6,73,4,64,32,5,32,1,32,6,32,1,107,34,1,252,10,0,0,32,0,65,40,106,32,1,54,2,0,11,11,97,1,1,127,32,0,65,16,106,40,2,0,33,1,32,0,65,4,106,40,2,0,4,127,32,1,65,12,119,32,0,65,20,106,40,2,0,65,18,119,106,32,0,65,12,106,40,2,0,65,7,119,106,32,0,65,8,106,40,2,0,65,1,119,106,5,32,1,65,177,207,217,178,1,106,11,32,0,40,2,0,106,32,0,65,24,106,32,0,65,40,106,40,2,0,16,1,11,157,4,2,1,127,3,126,32,0,32,1,106,33,3,32,1,65,32,79,4,126,32,3,65,32,107,33,3,32,2,66,135,149,175,175,152,182,222,155,158,127,124,66,207,214,211,190,210,199,171,217,66,124,33,4,32,2,66,207,214,211,190,210,199,171,217,66,124,33,5,32,2,66,0,124,33,6,32,2,66,135,149,175,175,152,182,222,155,158,127,125,33,2,3,64,32,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,32,4,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,4,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,32,5,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,5,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,32,6,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,32,2,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,0,65,8,106,34,0,32,3,77,13,0,11,32,6,66,12,137,32,2,66,18,137,124,32,5,66,7,137,124,32,4,66,1,137,124,32,4,66,207,214,211,190,210,199,171,217,66,126,66,0,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,227,220,202,149,252,206,242,245,133,127,124,32,5,66,207,214,211,190,210,199,171,217,66,126,66,0,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,227,220,202,149,252,206,242,245,133,127,124,32,6,66,207,214,211,190,210,199,171,217,66,126,66,0,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,227,220,202,149,252,206,242,245,133,127,124,32,2,66,207,214,211,190,210,199,171,217,66,126,66,0,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,227,220,202,149,252,206,242,245,133,127,124,5,32,2,66,197,207,217,178,241,229,186,234,39,124,11,32,1,173,124,32,0,32,1,65,31,113,16,6,11,137,2,0,32,1,32,2,106,33,2,3,64,32,1,65,8,106,32,2,77,4,64,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,66,0,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,32,0,133,66,27,137,66,135,149,175,175,152,182,222,155,158,127,126,66,227,220,202,149,252,206,242,245,133,127,124,33,0,32,1,65,8,106,33,1,12,1,11,11,32,1,65,4,106,32,2,77,4,64,32,1,53,2,0,66,135,149,175,175,152,182,222,155,158,127,126,32,0,133,66,23,137,66,207,214,211,190,210,199,171,217,66,126,66,249,243,221,241,153,246,153,171,22,124,33,0,32,1,65,4,106,33,1,11,3,64,32,1,32,2,73,4,64,32,1,49,0,0,66,197,207,217,178,241,229,186,234,39,126,32,0,133,66,11,137,66,135,149,175,175,152,182,222,155,158,127,126,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,66,33,136,32,0,133,66,207,214,211,190,210,199,171,217,66,126,34,0,32,0,66,29,136,133,66,249,243,221,241,153,246,153,171,22,126,34,0,32,0,66,32,136,133,11,88,0,32,0,65,8,106,32,1,66,135,149,175,175,152,182,222,155,158,127,124,66,207,214,211,190,210,199,171,217,66,124,55,3,0,32,0,65,16,106,32,1,66,207,214,211,190,210,199,171,217,66,124,55,3,0,32,0,65,24,106,32,1,55,3,0,32,0,65,32,106,32,1,66,135,149,175,175,152,182,222,155,158,127,125,55,3,0,11,132,5,2,3,127,4,126,32,1,32,2,106,33,5,32,0,65,40,106,33,4,32,0,65,200,0,106,40,2,0,33,3,32,0,32,0,41,3,0,32,2,173,124,55,3,0,32,2,32,3,106,65,32,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,200,0,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,32,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,41,3,0,32,4,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,3,32,6,55,3,0,32,0,65,16,106,34,3,41,3,0,32,4,65,8,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,3,32,6,55,3,0,32,0,65,24,106,34,3,41,3,0,32,4,65,16,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,3,32,6,55,3,0,32,0,65,32,106,34,3,41,3,0,32,4,65,24,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,3,32,6,55,3,0,32,0,65,200,0,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,65,32,106,32,5,77,4,64,32,5,65,32,107,33,2,32,0,65,8,106,41,3,0,33,6,32,0,65,16,106,41,3,0,33,7,32,0,65,24,106,41,3,0,33,8,32,0,65,32,106,41,3,0,33,9,3,64,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,32,6,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,32,7,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,7,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,32,8,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,8,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,32,9,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,9,32,1,65,8,106,34,1,32,2,77,13,0,11,32,0,65,8,106,32,6,55,3,0,32,0,65,16,106,32,7,55,3,0,32,0,65,24,106,32,8,55,3,0,32,0,65,32,106,32,9,55,3,0,11,32,1,32,5,73,4,64,32,4,32,1,32,5,32,1,107,34,1,252,10,0,0,32,0,65,200,0,106,32,1,54,2,0,11,11,200,2,1,5,126,32,0,65,24,106,41,3,0,33,1,32,0,41,3,0,34,2,66,32,90,4,126,32,0,65,8,106,41,3,0,34,3,66,1,137,32,0,65,16,106,41,3,0,34,4,66,7,137,124,32,1,66,12,137,32,0,65,32,106,41,3,0,34,5,66,18,137,124,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,0,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,227,220,202,149,252,206,242,245,133,127,124,32,4,66,207,214,211,190,210,199,171,217,66,126,66,0,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,227,220,202,149,252,206,242,245,133,127,124,32,1,66,207,214,211,190,210,199,171,217,66,126,66,0,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,227,220,202,149,252,206,242,245,133,127,124,32,5,66,207,214,211,190,210,199,171,217,66,126,66,0,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,227,220,202,149,252,206,242,245,133,127,124,5,32,1,66,197,207,217,178,241,229,186,234,39,124,11,32,2,124,32,0,65,40,106,32,2,66,31,131,167,16,6,11]);async function j(){let{instance:{exports:{mem:s,xxh32:i,xxh64:f,init32:p,update32:v,digest32:L,init64:x,update64:S,digest64:A}}}=await WebAssembly.instantiate(M),e=new Uint8Array(s.buffer);function u(t,n){if(s.buffer.byteLength<t+n){let l=Math.ceil((t+n-s.buffer.byteLength)/65536);s.grow(l),e=new Uint8Array(s.buffer)}}r(u,"c");function y(t,n,l,I,T,R){u(t);let a=new Uint8Array(t);return e.set(a),l(0,n),a.set(e.slice(0,t)),{update(g){let d;return e.set(a),typeof g=="string"?(u(3*g.length,t),d=c.encodeInto(g,e.subarray(t)).written):(u(g.byteLength,t),e.set(g,t),d=g.byteLength),I(0,t,d),a.set(e.slice(0,t)),this},digest:()=>(e.set(a),R(T(0)))}}r(y,"l");function h(t){return t>>>0}r(h,"d");let U=2n**64n-1n;function m(t){return t&U}r(m,"y");let c=new TextEncoder,o=0n;function b(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return u(3*t.length,0),h(i(0,c.encodeInto(t,e).written,n))}r(b,"p");function w(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o;return u(3*t.length,0),m(f(0,c.encodeInto(t,e).written,n))}return r(w,"v"),{h32:b,h32ToString(t){return b(t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:0).toString(16).padStart(8,"0")},h32Raw(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return u(t.byteLength,0),e.set(t),h(i(0,t.byteLength,n))},create32(){return y(48,arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,p,v,L,h)},h64:w,h64ToString(t){return w(t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:o).toString(16).padStart(16,"0")},h64Raw(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o;return u(t.byteLength,0),e.set(t),m(f(0,t.byteLength,n))},create64(){return y(88,arguments.length>0&&arguments[0]!==void 0?arguments[0]:o,x,S,A,m)}}}r(j,"e");j`)()).h64ToString;
const attrs = eval(`const { findByProps } = goosemod.webpackModules;
const anon = true; // use fake values
const bodyAttrs = {
'data-current-user-id': anon ? '006482395269169152' : findByProps('getCurrentUser').getCurrentUser().id
};
const manager = {
add: () => {
for (const x in bodyAttrs) {
document.body.setAttribute(x, bodyAttrs[x]);
}
},
remove: () => {
for (const x in bodyAttrs) {
document.body.removeAttribute(x);
}
}
};
manager.add();
manager`);
const Onyx = eval(`const unsentrify = (obj) => Object.keys(obj).reduce((acc, x) => {
const sub = obj[x].__REACT_DEVTOOLS_ORIGINAL_METHOD__ ?? obj[x];
acc[x] = sub.__sentry_original__ ?? sub;
return acc;
}, {});
const sourceURLIndex = {};
sourceURLIndex.increment = function (name) { return this[name] = (this[name] ?? 0) + 1; };
// const makeSourceURL = (name) => \`\${name} | Topaz \${sourceURLIndex.increment(name)}\`.replace(/ /g, '%20');
const makeSourceURL = (name) => \`\${name} | Topaz\`.replace(/ /g, '%20');
const prettifyString = (str) => str.replaceAll('_', ' ').split(' ').map(x => x[0].toUpperCase() + x.slice(1)).join(' ');
// discord's toast for simplicity
const toast = (content, type) => goosemod.webpackModules.findByProps('showToast').showToast(goosemod.webpackModules.findByProps('createToast').createToast(content, type, { duration: 5000, position: 1 }));
const permissions = {
token_read: [ 'getToken', 'showToken' ], // get + show
token_write: [ 'setToken', 'removeToken', 'hideToken', 'showToken' ], // set + more general
actions_typing: [ 'startTyping', 'stopTyping' ],
actions_send: [ 'sendMessage' ],
readacc_username: [ 'getCurrentUser@username' ],
readacc_discrim: [ 'getCurrentUser@discriminator' ],
readacc_email: [ 'getCurrentUser@email' ],
readacc_phone: [ 'getCurrentUser@phone' ],
friends_readwho: [ 'getRelationships', 'isFriend' ],
// friends_check_friend: [ 'isFriend' ],
// friends_check_blocked: [ 'isBlocked' ],
status_readstatus: [ 'getStatus', 'isMobileOnline' ],
status_readactivities: [ 'findActivity', 'getActivities', 'getActivityMetadata', 'getAllApplicationActivities', 'getApplicationActivity', 'getPrimaryActivity' ],
clipboard_read: [],
clipboard_write: [ 'copy', 'writeText' ]
};
const complexMap = Object.keys(permissions).reduce((acc, x) => acc.concat(permissions[x].filter(y => y.includes('@')).map(y => [ x, ...y.split('@') ])), []);
const mimic = (orig) => {
const origType = typeof orig; // mimic original value with empty of same type to try and not cause any errors directly
switch (origType) {
case 'function': return () => ([]); // return empty array instead of just undefined to play nicer
}
return window[origType[0].toUpperCase() + origType.slice(1)]();
};
const parseStack = (stack) => [...stack.matchAll(/^ at (.*?)( \\[as (.*)\\])? \\((.*)\\)\$/gm)].map(x => ({
func: x[1],
alias: x[3],
source: x[4],
sourceType: x[4].startsWith('Topaz') ? 'topaz' : (x[4].includes('discord.com/') ? 'discord' : (x[4] === '<anonymous>' ? 'anonymous' : 'unknown'))
}));
const shouldPermitViaStack = () => {
const stack = parseStack(Error().stack).slice(2, -2); // slice away onyx wrappers
const inClone = !!stack.find(x => (x.func === 'assign' || x.func === 'Function.assign') && x.source === '<anonymous>');
const internalDiscordClone = inClone && stack[1].sourceType === 'discord';
return internalDiscordClone;
};
const perms = {
'Token': {
'Read your token': 'token_read',
'Set your token': 'token_write'
},
'Actions': {
'Set typing state': 'actions_typing',
'Send messages': 'actions_send'
},
'Account': {
'See your username': 'readacc_username',
'See your discriminator': 'readacc_discrim',
'See your email': 'readacc_email',
'See your phone number': 'readacc_phone'
},
'Friends': {
'See who you are friends with': 'friends_readwho'
},
'Status': {
'See status of users': 'status_readstatus',
'See activities of users': 'status_readactivities'
},
'Clipboard': {
'Write to your clipboard': 'clipboard_write',
'Read from your clipboard': 'clipboard_read'
}
};
const permissionsModal = async (manifest, neededPerms) => {
const ButtonColors = goosemod.webpackModules.findByProps('button', 'colorRed');
const Text = goosemod.webpackModules.findByDisplayName("LegacyText");
const Markdown = goosemod.webpackModules.find((x) => x.displayName === 'Markdown' && x.rules);
const Checkbox = goosemod.webpackModules.findByDisplayName('Checkbox');
const Tooltip = goosemod.webpackModules.findByDisplayName('Tooltip');
const { React } = goosemod.webpackModules.common;
const isDangerous = (perm) => [ 'token', 'readacc' ].includes(perm.split('_').shift());
const whyDangerous = (perm) => ({
'token': 'Your token allows access to your account',
'readacc': 'Your account information includes private information'
})[perm.split('_').shift()];
class Permission extends React.PureComponent {
render() {
const subPerm = Object.values(perms).find(x => Object.values(x).find(y => y === this.props.perm));
const name = \`\${Object.keys(perms)[Object.values(perms).indexOf(subPerm)]} > \${Object.keys(subPerm).find(x => subPerm[x] === this.props.perm)}\`;
return React.createElement(Checkbox, {
type: 'inverted',
value: this.props.checked,
onChange: () => {
this.props.checked = !this.props.checked;
this.forceUpdate();
this.props.onChange(this.props.checked);
},
className: 'topaz-permission-choice'
},
React.createElement(Text, {
variant: 'text-sm/normal'
},
isDangerous(this.props.perm) ? React.createElement(Tooltip, {
position: 'top',
color: 'primary',
tooltipClassName: 'topaz-nomax-tooltip',
text: whyDangerous(this.props.perm)
}, ({
onMouseLeave,
onMouseEnter
}) => React.createElement(goosemod.webpackModules.findByDisplayName('WarningCircle'), {
className: 'topaz-permission-danger-icon',
width: 18,
height: 18,
onMouseEnter,
onMouseLeave
})) : null,
React.createElement('span', {}, name)
)
);
}
}
const finalPerms = neededPerms.reduce((acc, x) => { acc[x] = false; return acc; }, {});
const permsIncludesReads = neededPerms.some(x => x.includes('read'));
const permsIncludesWrites = neededPerms.some(x => x.includes('write'));
const permsIncludesActions = neededPerms.some(x => x.includes('action'));
let permsTypes = [
permsIncludesReads ? 'read sensitive data' : null,
permsIncludesWrites ? 'write sensitive data' : null,
permsIncludesActions ? 'perform senstive actions' : null,
].filter(x => x);
if (permsTypes.length === 1) permsTypes = permsTypes[0];
else if (permsTypes.length === 2) permsTypes = permsTypes.join(' and ');
else permsTypes = permsTypes.slice(0, permsTypes.length - 1).join(', ') + ', and ' + permsTypes[permsTypes.length - 1];
permsTypes = permsTypes.replace('read sensitive data, write sensitive data', 'read and write sensitive data').replace('read sensitive data and write sensitive data', 'read and write sensitive data');
const res = await new Promise((res) => goosemod.webpackModules.findByProps('openModal', 'updateModal').openModal(e => {
if (e.transitionState === 3) res(false);
class Modal extends React.PureComponent {
render() {
const allowedCount = Object.values(finalPerms).filter(x => x).length;
const totalCount = Object.values(finalPerms).length;
const allSuffix = totalCount > 1 ? ' All' : '';
return React.createElement(goosemod.webpackModules.findByDisplayName("ConfirmModal"), {
header: \`\${manifest.name} requires permissions\`,
confirmText: allowedCount === 0 ? \`Deny\${allSuffix}\` : (allowedCount === totalCount ? \`Allow\${allSuffix}\` : \`Allow \${allowedCount}\`),
cancelText: allowedCount === 0 ? '' : \`Deny\${allSuffix}\`,
confirmButtonColor: allowedCount === 0 ? ButtonColors.colorRed : ButtonColors.colorBrand,
onClose: () => res(false), // General close (?)
onCancel: () => { // Cancel text