@danielx/civet 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.js CHANGED
@@ -879,6 +879,51 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
879
879
  children: [t]
880
880
  };
881
881
  }
882
+ function typeOfExpression(expression) {
883
+ let t;
884
+ if (isASTNodeObject(expression)) {
885
+ switch (expression.type) {
886
+ case "Literal": {
887
+ switch (expression.subtype) {
888
+ case "NullLiteral":
889
+ return;
890
+ default:
891
+ t = literalType(expression);
892
+ }
893
+ break;
894
+ }
895
+ case "RegularExpressionLiteral":
896
+ case "TemplateLiteral": {
897
+ t = literalType(expression);
898
+ break;
899
+ }
900
+ case "Identifier":
901
+ if (expression.name === "undefined")
902
+ return;
903
+ case "MemberExpression": {
904
+ t = {
905
+ type: "TypeTypeof",
906
+ children: ["typeof ", expression],
907
+ expression
908
+ };
909
+ break;
910
+ }
911
+ default:
912
+ return;
913
+ }
914
+ return t;
915
+ }
916
+ }
917
+ function typeSuffixForExpression(expression) {
918
+ let t = typeOfExpression(expression);
919
+ if (t != null)
920
+ return {
921
+ type: "TypeSuffix",
922
+ ts: !0,
923
+ t,
924
+ children: [": ", t]
925
+ };
926
+ }
882
927
  function makeNumericLiteral(n) {
883
928
  let s = n.toString();
884
929
  return {
@@ -1528,8 +1573,8 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1528
1573
  {
1529
1574
  let results1 = [];
1530
1575
  for (let ref7 = pattern.elements, i7 = 0, len6 = ref7.length; i7 < len6; i7++) {
1531
- let elem = ref7[i7], { typeSuffix } = elem;
1532
- typeSuffix ??= elem.binding?.typeSuffix, typeSuffix && count++;
1576
+ let elem = ref7[i7], { typeSuffix, initializer } = elem;
1577
+ typeSuffix ??= elem.binding?.typeSuffix, typeSuffix && count++, initializer != null && (typeSuffix ??= typeSuffixForExpression(trimFirstSpace(initializer.expression)));
1533
1578
  let typeElement = [typeSuffix?.t, elem.delim];
1534
1579
  typeSuffix?.optional && (typeElement[0] = parenthesizeType(typeElement[0]), typeElement.unshift("undefined |")), elem.type === "BindingRestElement" ? (typeElement[0] ??= "unknown[]", typeElement.unshift(elem.dots)) : typeElement[0] ??= "unknown", results1.push(typeElement);
1535
1580
  }
@@ -1550,8 +1595,8 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1550
1595
  {
1551
1596
  let restType, results2 = [];
1552
1597
  for (let ref8 = pattern.properties, i8 = 0, len7 = ref8.length; i8 < len7; i8++) {
1553
- let prop = ref8[i8], { typeSuffix } = prop;
1554
- switch (typeSuffix ??= prop.value?.typeSuffix, typeSuffix && count++, typeSuffix ??= {
1598
+ let prop = ref8[i8], { typeSuffix, initializer } = prop;
1599
+ switch (typeSuffix ??= prop.value?.typeSuffix, typeSuffix && count++, initializer != null && (typeSuffix ??= typeSuffixForExpression(trimFirstSpace(initializer.expression))), typeSuffix ??= {
1555
1600
  type: "TypeSuffix",
1556
1601
  ts: !0,
1557
1602
  children: [": unknown"]
@@ -2283,17 +2328,49 @@ ${js}`
2283
2328
  };
2284
2329
  }
2285
2330
  function implicitFunctionBlock(f) {
2286
- if (f.abstract || f.block || f.signature?.optional) return;
2287
- let { name, parent } = f, ancestor = parent, child = f;
2288
- ancestor?.type === "ExportDeclaration" && (child = ancestor, ancestor = ancestor.parent);
2289
- let expressions = ancestor?.expressions ?? ancestor?.elements, currentIndex = expressions?.findIndex(([, def]) => def === child), following = currentIndex >= 0 && expressions[currentIndex + 1]?.[1];
2290
- if (following?.type === "ExportDeclaration" && (following = following.declaration), f.type === following?.type && name != null && name === following.name)
2291
- f.ts = !0;
2292
- else {
2293
- let block = makeEmptyBlock();
2294
- block.parent = f, f.block = block, f.children.push(block), f.ts = !1;
2331
+ if (!(f.abstract || f.block || f.signature?.optional))
2332
+ if (followingOverloads(f).length)
2333
+ f.ts = !0;
2334
+ else {
2335
+ let block = makeEmptyBlock();
2336
+ block.parent = f, f.block = block, f.children.push(block), f.ts = !1;
2337
+ }
2338
+ }
2339
+ function overloadsInDirection(f, direction) {
2340
+ if (f.name == null)
2341
+ return [];
2342
+ let ancestor = f.parent, child = f;
2343
+ if (ancestor?.type === "ExportDeclaration" && (child = ancestor, ancestor = ancestor.parent), ancestor?.type !== "BlockStatement")
2344
+ return [];
2345
+ let { expressions } = ancestor, index = findChildIndex(expressions, child);
2346
+ if (!(index >= 0))
2347
+ return [];
2348
+ if (direction < 0) {
2349
+ let results1 = [];
2350
+ for (; --index >= 0; ) {
2351
+ let candidate = expressions[index][1];
2352
+ if (!candidate || (candidate.type === "ExportDeclaration" && (candidate = candidate.declaration), !(candidate && candidate.type === f.type && candidate.name === f.name)))
2353
+ break;
2354
+ results1.push(candidate);
2355
+ }
2356
+ return results1;
2357
+ } else {
2358
+ let results2 = [];
2359
+ for (; ++index < expressions.length; ) {
2360
+ let candidate = expressions[index][1];
2361
+ if (!candidate || (candidate.type === "ExportDeclaration" && (candidate = candidate.declaration), !(candidate && candidate.type === f.type && candidate.name === f.name)))
2362
+ break;
2363
+ results2.push(candidate);
2364
+ }
2365
+ return results2;
2295
2366
  }
2296
2367
  }
2368
+ function precedingOverloads(f) {
2369
+ return overloadsInDirection(f, -1);
2370
+ }
2371
+ function followingOverloads(f) {
2372
+ return overloadsInDirection(f, 1);
2373
+ }
2297
2374
  function processReturn(f, implicitReturns) {
2298
2375
  let { returnType } = f.signature;
2299
2376
  if (returnType && returnType.optional && convertOptionalType(returnType), !processReturnValue(f) && (implicitReturns || f.signature.implicitReturn)) {
@@ -2449,16 +2526,21 @@ ${js}`
2449
2526
  function assignResults(node, collect) {
2450
2527
  if (!node) return;
2451
2528
  switch (node.type) {
2452
- case "BlockStatement":
2529
+ case "BlockStatement": {
2453
2530
  if (node.expressions.length) {
2454
2531
  let ref5;
2455
2532
  assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
2456
2533
  } else
2457
- node.expressions.push(["", collect("void 0"), ";"]);
2534
+ node.expressions.push(["", collect("void 0"), ";"]), updateParentPointers(node);
2458
2535
  return;
2459
- case "CaseBlock":
2460
- node.clauses.forEach((clause) => assignResults(clause, collect));
2536
+ }
2537
+ case "CaseBlock": {
2538
+ for (let ref6 = node.clauses, i4 = 0, len3 = ref6.length; i4 < len3; i4++) {
2539
+ let clause = ref6[i4];
2540
+ assignResults(clause, collect);
2541
+ }
2461
2542
  return;
2543
+ }
2462
2544
  case "WhenClause":
2463
2545
  case "DefaultClause":
2464
2546
  case "PatternClause": {
@@ -2474,7 +2556,7 @@ ${js}`
2474
2556
  exp = exp;
2475
2557
  let outer = exp;
2476
2558
  exp.type === "LabelledStatement" && (exp = exp.statement);
2477
- let ref6, m1;
2559
+ let ref7, ref8, m1;
2478
2560
  switch (exp.type) {
2479
2561
  case "BreakStatement":
2480
2562
  case "ContinueStatement":
@@ -2484,13 +2566,13 @@ ${js}`
2484
2566
  case "ThrowStatement":
2485
2567
  return;
2486
2568
  case "Declaration": {
2487
- let ref7;
2488
- exp.bindings?.length ? ref7 = patternAsValue((ref6 = exp.bindings)[ref6.length - 1].pattern) : ref7 = "void 0";
2489
- let value = ref7;
2569
+ let ref9;
2570
+ exp.bindings?.length ? ref9 = patternAsValue((ref7 = exp.bindings)[ref7.length - 1].pattern) : ref9 = "void 0";
2571
+ let value = ref9;
2490
2572
  exp.children.push([
2491
2573
  "",
2492
2574
  [";", collect(value)]
2493
- ]);
2575
+ ]), updateParentPointers(exp);
2494
2576
  return;
2495
2577
  }
2496
2578
  case "FunctionExpression": {
@@ -2498,7 +2580,7 @@ ${js}`
2498
2580
  exp.children.push([
2499
2581
  "",
2500
2582
  [";", collect(exp.id)]
2501
- ]);
2583
+ ]), updateParentPointers(exp);
2502
2584
  return;
2503
2585
  }
2504
2586
  break;
@@ -2513,11 +2595,11 @@ ${js}`
2513
2595
  case "BlockStatement": {
2514
2596
  if (exp.expressions.some(isExit))
2515
2597
  return;
2516
- assignResults(exp.expressions[exp.expressions.length - 1], collect);
2598
+ assignResults((ref8 = exp.expressions)[ref8.length - 1], collect);
2517
2599
  return;
2518
2600
  }
2519
2601
  case "IfStatement": {
2520
- assignResults(exp.then, collect), exp.else ? assignResults(exp.else.block, collect) : (braceBlock(exp.then), exp.children.push([" else {", collect("void 0"), "}"]));
2602
+ assignResults(exp.then, collect), exp.else ? assignResults(exp.else.block, collect) : (braceBlock(exp.then), exp.children.push([" else {", collect("void 0"), "}"]), updateParentPointers(exp));
2521
2603
  return;
2522
2604
  }
2523
2605
  case "PatternMatchingStatement": {
@@ -2525,15 +2607,15 @@ ${js}`
2525
2607
  return;
2526
2608
  }
2527
2609
  case "SwitchStatement": {
2528
- for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
2529
- let clause = ref8[i4];
2610
+ for (let ref10 = exp.caseBlock.clauses, i5 = 0, len4 = ref10.length; i5 < len4; i5++) {
2611
+ let clause = ref10[i5];
2530
2612
  assignResults(clause, collect);
2531
2613
  }
2532
2614
  return;
2533
2615
  }
2534
2616
  case "TryStatement": {
2535
- for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
2536
- let block = ref9[i5];
2617
+ for (let ref11 = exp.blocks, i6 = 0, len5 = ref11.length; i6 < len5; i6++) {
2618
+ let block = ref11[i6];
2537
2619
  assignResults(block, collect);
2538
2620
  }
2539
2621
  return;
@@ -2543,13 +2625,16 @@ ${js}`
2543
2625
  return;
2544
2626
  let semi2 = exp.children.lastIndexOf(";");
2545
2627
  if (0 <= semi2 && semi2 < exp.children.length - 1) {
2546
- exp.children.splice(semi2 + 1, 1 / 0, collect(exp.children.slice(semi2 + 1)));
2628
+ exp.children.splice(semi2 + 1, 1 / 0, collect(exp.children.slice(semi2 + 1))), updateParentPointers(exp);
2547
2629
  return;
2548
2630
  }
2549
2631
  break;
2550
2632
  }
2551
2633
  }
2552
- node[node.length - 1]?.type !== "SemicolonDelimiter" && (node[1] = collect(node[1]));
2634
+ if (node[node.length - 1]?.type === "SemicolonDelimiter")
2635
+ return;
2636
+ let parent = node[1].parent;
2637
+ node[1] = collect(node[1]), parent != null && updateParentPointers(parent);
2553
2638
  }
2554
2639
  function insertReturn(node) {
2555
2640
  if (!node) return;
@@ -2573,9 +2658,9 @@ ${js}`
2573
2658
  assert.notEqual(breakIndex, -1, "Could not find break in when clause"), node.children.splice(breakIndex, 1), node.break = void 0;
2574
2659
  }
2575
2660
  if (insertReturn(node.block), !isExit(node.block)) {
2576
- let comment = hasTrailingComment(node.block.expressions), ref10;
2661
+ let comment = hasTrailingComment(node.block.expressions), ref12;
2577
2662
  node.block.expressions.push([
2578
- comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || `
2663
+ comment ? (ref12 = node.block.expressions)[ref12.length - 1][0] || `
2579
2664
  ` : "",
2580
2665
  wrapWithReturn(void 0, node, !comment)
2581
2666
  ]);
@@ -2593,7 +2678,7 @@ ${js}`
2593
2678
  return;
2594
2679
  let outer = exp;
2595
2680
  exp.type === "LabelledStatement" && (exp = exp.statement);
2596
- let ref11, m3;
2681
+ let ref13, m3;
2597
2682
  switch (exp.type) {
2598
2683
  case "BreakStatement":
2599
2684
  case "ContinueStatement":
@@ -2603,9 +2688,9 @@ ${js}`
2603
2688
  case "ThrowStatement":
2604
2689
  return;
2605
2690
  case "Declaration": {
2606
- let ref12;
2607
- exp.bindings?.length ? ref12 = [" ", patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern)] : ref12 = [];
2608
- let value = ref12, parent = outer.parent, index = findChildIndex(parent?.expressions, outer);
2691
+ let ref14;
2692
+ exp.bindings?.length ? ref14 = [" ", patternAsValue((ref13 = exp.bindings)[ref13.length - 1].pattern)] : ref14 = [];
2693
+ let value = ref14, parent = outer.parent, index = findChildIndex(parent?.expressions, outer);
2609
2694
  assert.notEqual(index, -1, "Could not find declaration in parent"), parent.expressions.splice(index + 1, 0, [
2610
2695
  "",
2611
2696
  {
@@ -2656,15 +2741,15 @@ ${js}`
2656
2741
  return;
2657
2742
  }
2658
2743
  case "SwitchStatement": {
2659
- for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
2660
- let clause = ref13[i6];
2744
+ for (let ref15 = exp.caseBlock.clauses, i7 = 0, len6 = ref15.length; i7 < len6; i7++) {
2745
+ let clause = ref15[i7];
2661
2746
  insertReturn(clause);
2662
2747
  }
2663
2748
  return;
2664
2749
  }
2665
2750
  case "TryStatement": {
2666
- for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
2667
- let block = ref14[i7];
2751
+ for (let ref16 = exp.blocks, i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
2752
+ let block = ref16[i8];
2668
2753
  insertReturn(block);
2669
2754
  }
2670
2755
  return;
@@ -2842,8 +2927,8 @@ ${js}`
2842
2927
  return !1;
2843
2928
  let reduction = statement.type === "ForStatement" && statement.reduction;
2844
2929
  function fillBlock(expression) {
2845
- let ref15, m5;
2846
- return m5 = (ref15 = block.expressions)[ref15.length - 1], Array.isArray(m5) && m5.length >= 2 && typeof m5[1] == "object" && m5[1] != null && "type" in m5[1] && m5[1].type === "EmptyStatement" && "implicit" in m5[1] && m5[1].implicit === !0 && block.expressions.pop(), block.expressions.push(expression), block.empty = !1, braceBlock(block);
2930
+ let ref17, m5;
2931
+ return m5 = (ref17 = block.expressions)[ref17.length - 1], Array.isArray(m5) && m5.length >= 2 && typeof m5[1] == "object" && m5[1] != null && "type" in m5[1] && m5[1].type === "EmptyStatement" && "implicit" in m5[1] && m5[1].implicit === !0 && block.expressions.pop(), block.expressions.push(expression), block.empty = !1, braceBlock(block);
2847
2932
  }
2848
2933
  if (reduction)
2849
2934
  switch (reduction.subtype) {
@@ -2889,8 +2974,8 @@ ${js}`
2889
2974
  function append2(p) {
2890
2975
  (rest ? after : before).push(p);
2891
2976
  }
2892
- for (let ref16 = parameters.parameters, i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
2893
- let param = ref16[i8];
2977
+ for (let ref18 = parameters.parameters, i9 = 0, len8 = ref18.length; i9 < len8; i9++) {
2978
+ let param = ref18[i9];
2894
2979
  switch (param.type) {
2895
2980
  case "ThisType": {
2896
2981
  if (tt)
@@ -2899,7 +2984,7 @@ ${js}`
2899
2984
  message: "Only one typed this parameter is allowed"
2900
2985
  }), append2(param);
2901
2986
  else if (tt = trimFirstSpace(param), before.length || rest) {
2902
- let ref17, delim = (ref17 = tt.children)[ref17.length - 1];
2987
+ let ref19, delim = (ref19 = tt.children)[ref19.length - 1];
2903
2988
  Array.isArray(delim) && (delim = delim[delim.length - 1]), typeof delim == "object" && delim != null && "token" in delim && delim.token === "," || (tt = {
2904
2989
  ...tt,
2905
2990
  children: [...tt.children, ", "]
@@ -3023,16 +3108,13 @@ ${js}`
3023
3108
  let { ancestor } = findAncestor(f, ($10) => $10.type === "ClassExpression");
3024
3109
  if (ancestor != null) {
3025
3110
  let fields = new Set(gatherRecursiveWithinFunction(ancestor, ($11) => $11.type === "FieldDefinition").map(($12) => $12.id).filter((a3) => typeof a3 == "object" && a3 != null && "type" in a3 && a3.type === "Identifier").map(($13) => $13.name)), classExpressions = ancestor.body.expressions, index2 = findChildIndex(classExpressions, f);
3026
- assert.notEqual(index2, -1, "Could not find constructor in class");
3027
- let m7;
3028
- for (; m7 = classExpressions[index2 - 1]?.[1], typeof m7 == "object" && m7 != null && "type" in m7 && m7.type === "MethodDefinition" && "name" in m7 && m7.name === "constructor"; )
3029
- index2--;
3111
+ assert.notEqual(index2, -1, "Could not find constructor in class"), index2 -= precedingOverloads(f).length;
3030
3112
  let fStatement = classExpressions[index2];
3031
- for (let ref18 = gatherRecursive(parameters, ($14) => $14.type === "Parameter"), i9 = 0, len8 = ref18.length; i9 < len8; i9++) {
3032
- let parameter = ref18[i9], { accessModifier } = parameter;
3113
+ for (let ref20 = gatherRecursive(parameters, ($14) => $14.type === "Parameter"), i10 = 0, len9 = ref20.length; i10 < len9; i10++) {
3114
+ let parameter = ref20[i10], { accessModifier } = parameter;
3033
3115
  if (accessModifier || parameter.typeSuffix)
3034
- for (let ref19 = gatherRecursive(parameter, ($15) => $15.type === "AtBinding"), i10 = 0, len9 = ref19.length; i10 < len9; i10++) {
3035
- let binding = ref19[i10], typeSuffix = binding.parent?.typeSuffix;
3116
+ for (let ref21 = gatherRecursive(parameter, ($15) => $15.type === "AtBinding"), i11 = 0, len10 = ref21.length; i11 < len10; i11++) {
3117
+ let binding = ref21[i11], typeSuffix = binding.parent?.typeSuffix;
3036
3118
  if (!(accessModifier || typeSuffix))
3037
3119
  continue;
3038
3120
  parameter.accessModifier && (replaceNode(parameter.accessModifier, void 0), parameter.accessModifier = void 0);
@@ -3058,8 +3140,8 @@ ${js}`
3058
3140
  bindings: [],
3059
3141
  decl: "const"
3060
3142
  }));
3061
- for (let ref20 = splices, i11 = 0, len10 = ref20.length; i11 < len10; i11++) {
3062
- let binding = ref20[i11];
3143
+ for (let ref22 = splices, i12 = 0, len11 = ref22.length; i12 < len11; i12++) {
3144
+ let binding = ref22[i12];
3063
3145
  assert.equal(binding.type, "PostRestBindingElements", "splice should be of type Binding"), prefix.push(makeNode({
3064
3146
  type: "Declaration",
3065
3147
  children: ["let ", binding],
@@ -3092,13 +3174,13 @@ ${js}`
3092
3174
  return -1;
3093
3175
  }
3094
3176
  function processSignature(f) {
3095
- let { block, signature } = f;
3177
+ let { block, signature } = f, addAsync = !1, addGenerator = !1;
3096
3178
  if (!f.async?.length && hasAwait(block))
3097
3179
  if (f.async != null)
3098
- f.async.push("async "), signature.modifier.async = !0;
3180
+ addAsync = !0;
3099
3181
  else
3100
- for (let ref21 = gatherRecursiveWithinFunction(block, ($17) => $17.type === "Await"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
3101
- let a = ref21[i12], i = findChildIndex(a.parent, a);
3182
+ for (let ref23 = gatherRecursiveWithinFunction(block, ($17) => $17.type === "Await"), i13 = 0, len12 = ref23.length; i13 < len12; i13++) {
3183
+ let a = ref23[i13], i = findChildIndex(a.parent, a);
3102
3184
  a.parent.children.splice(i + 1, 0, {
3103
3185
  type: "Error",
3104
3186
  message: `await invalid in ${signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
@@ -3106,24 +3188,27 @@ ${js}`
3106
3188
  }
3107
3189
  if (!f.generator?.length && hasYield(block))
3108
3190
  if (f.generator != null)
3109
- f.generator.push("*"), signature.modifier.generator = !0;
3191
+ addGenerator = !0;
3110
3192
  else
3111
- for (let ref22 = gatherRecursiveWithinFunction(block, ($18) => $18.type === "YieldExpression"), i13 = 0, len12 = ref22.length; i13 < len12; i13++) {
3112
- let y = ref22[i13], i = y.children.findIndex(($19) => $19.type === "Yield");
3193
+ for (let ref24 = gatherRecursiveWithinFunction(block, ($18) => $18.type === "YieldExpression"), i14 = 0, len13 = ref24.length; i14 < len13; i14++) {
3194
+ let y = ref24[i14], i = y.children.findIndex(($19) => $19.type === "Yield");
3113
3195
  y.children.splice(i + 1, 0, {
3114
3196
  type: "Error",
3115
3197
  message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
3116
3198
  });
3117
3199
  }
3118
- signature.modifier.async && !signature.modifier.generator && signature.returnType && !isPromiseType(signature.returnType.t) && replaceNode(
3119
- signature.returnType.t,
3120
- wrapTypeInPromise(signature.returnType.t),
3121
- signature.returnType
3122
- );
3200
+ for (let ref25 = [f, ...precedingOverloads(f)], i15 = 0, len14 = ref25.length; i15 < len14; i15++) {
3201
+ let overload = ref25[i15];
3202
+ addAsync && overload.async != null && !overload.async.length && (overload.async.push("async "), overload.signature.modifier.async = !0), addGenerator && overload.generator != null && !overload.generator.length && (overload.generator.push("*"), overload.signature.modifier.generator = !0), overload.signature.modifier.async && !overload.signature.modifier.generator && overload.signature.returnType && !isPromiseType(overload.signature.returnType.t) && replaceNode(
3203
+ overload.signature.returnType.t,
3204
+ wrapTypeInPromise(overload.signature.returnType.t),
3205
+ overload.signature.returnType
3206
+ );
3207
+ }
3123
3208
  }
3124
3209
  function processFunctions(statements, config2) {
3125
- for (let ref23 = gatherRecursiveAll(statements, ($20) => $20.type === "FunctionExpression" || $20.type === "ArrowFunction" || $20.type === "MethodDefinition"), i14 = 0, len13 = ref23.length; i14 < len13; i14++) {
3126
- let f = ref23[i14];
3210
+ for (let ref26 = gatherRecursiveAll(statements, ($20) => $20.type === "FunctionExpression" || $20.type === "ArrowFunction" || $20.type === "MethodDefinition"), i16 = 0, len15 = ref26.length; i16 < len15; i16++) {
3211
+ let f = ref26[i16];
3127
3212
  (f.type === "FunctionExpression" || f.type === "MethodDefinition") && implicitFunctionBlock(f), processSignature(f), processParams(f), processReturn(f, config2.implicitReturns);
3128
3213
  }
3129
3214
  }
@@ -3170,17 +3255,17 @@ ${js}`
3170
3255
  }
3171
3256
  let done;
3172
3257
  if (!async) {
3173
- let ref24;
3174
- if ((ref24 = blockContainingStatement(exp)) && typeof ref24 == "object" && "block" in ref24 && "index" in ref24) {
3175
- let { block: parentBlock, index } = ref24;
3258
+ let ref27;
3259
+ if ((ref27 = blockContainingStatement(exp)) && typeof ref27 == "object" && "block" in ref27 && "index" in ref27) {
3260
+ let { block: parentBlock, index } = ref27;
3176
3261
  statements[0][0] = parentBlock.expressions[index][0], parentBlock.expressions.splice(index, index + 1 - index, ...statements), updateParentPointers(parentBlock), braceBlock(parentBlock), done = !0;
3177
3262
  }
3178
3263
  }
3179
3264
  done || (generator || (statements[statements.length - 1][1] = wrapWithReturn(statements[statements.length - 1][1])), children.splice(i, 1, wrapIIFE(statements, async, generator)), updateParentPointers(exp));
3180
3265
  }
3181
3266
  function processIterationExpressions(statements) {
3182
- for (let ref25 = gatherRecursiveAll(statements, ($21) => $21.type === "IterationExpression"), i15 = 0, len14 = ref25.length; i15 < len14; i15++) {
3183
- let s = ref25[i15];
3267
+ for (let ref28 = gatherRecursiveAll(statements, ($21) => $21.type === "IterationExpression"), i17 = 0, len16 = ref28.length; i17 < len16; i17++) {
3268
+ let s = ref28[i17];
3184
3269
  expressionizeIteration(s);
3185
3270
  }
3186
3271
  }
@@ -3195,13 +3280,13 @@ ${js}`
3195
3280
  ws = trimFirstSpace(ws);
3196
3281
  let args = [];
3197
3282
  if (typeof expression == "object" && expression != null && "type" in expression && expression.type === "ArrowFunction" || typeof expression == "object" && expression != null && "type" in expression && expression.type === "FunctionExpression") {
3198
- let { parameters } = expression, parameterList = parameters.parameters, results1 = [];
3199
- for (let i16 = 0, len15 = parameterList.length; i16 < len15; i16++) {
3200
- let parameter = parameterList[i16];
3283
+ let { parameters } = expression, parameterList = parameters.parameters, results3 = [];
3284
+ for (let i18 = 0, len17 = parameterList.length; i18 < len17; i18++) {
3285
+ let parameter = parameterList[i18];
3201
3286
  if (typeof parameter == "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
3202
- let ref26;
3203
- if (ref26 = parameter.initializer) {
3204
- let initializer = ref26;
3287
+ let ref29;
3288
+ if (ref29 = parameter.initializer) {
3289
+ let initializer = ref29;
3205
3290
  args.push(initializer.expression, parameter.delim), parameter = {
3206
3291
  ...parameter,
3207
3292
  initializer: void 0,
@@ -3212,9 +3297,9 @@ ${js}`
3212
3297
  (a7) => a7 !== parameter.typeSuffix
3213
3298
  ));
3214
3299
  }
3215
- results1.push(parameter);
3300
+ results3.push(parameter);
3216
3301
  }
3217
- let newParameterList = results1, newParameters = {
3302
+ let newParameterList = results3, newParameters = {
3218
3303
  ...parameters,
3219
3304
  parameters: newParameterList,
3220
3305
  children: parameters.children.map(($22) => $22 === parameterList ? newParameterList : $22)
@@ -3297,8 +3382,8 @@ ${js}`
3297
3382
  function unbraceBlock(block) {
3298
3383
  if (block.bare)
3299
3384
  return;
3300
- let ref;
3301
- block.children[0] === " {" && (ref = block.children)[ref.length - 1] === "}" && (block.children.shift(), block.children.pop(), block.bare = !0);
3385
+ let m, ref;
3386
+ m = block.children[0], (m === " {" || m === "{") && (ref = block.children)[ref.length - 1] === "}" && (block.children.shift(), block.children.pop(), block.bare = !0);
3302
3387
  }
3303
3388
  function duplicateBlock(block) {
3304
3389
  let expressions = [...block.expressions], children;
@@ -3321,17 +3406,6 @@ ${js}`
3321
3406
  empty: !0
3322
3407
  };
3323
3408
  }
3324
- function makeBlockFragment() {
3325
- let expressions = [];
3326
- return {
3327
- type: "BlockStatement",
3328
- children: expressions,
3329
- parent: void 0,
3330
- expressions,
3331
- bare: !1,
3332
- root: !1
3333
- };
3334
- }
3335
3409
  function replaceBlockExpression(node, child, replacement) {
3336
3410
  let found = !1, { expressions } = node;
3337
3411
  for (let i1 = 0, len3 = expressions.length; i1 < len3; i1++) {
@@ -3360,17 +3434,25 @@ ${js}`
3360
3434
  });
3361
3435
  }
3362
3436
  function insertHoistDec(block, node, dec) {
3363
- let { expressions } = block, index = findChildIndex(expressions, node);
3437
+ insertBeforeInBlock(block, node, ["", dec, ";"]);
3438
+ }
3439
+ function insertBeforeInBlock(block, node, ...statements) {
3440
+ let index = findChildIndex(block.expressions, node);
3364
3441
  if (index < 0)
3365
- throw new Error("Couldn't find expression in block for hoistable declaration.");
3366
- let statement = [expressions[index][0], dec, ";"];
3367
- expressions[index][0] = "", expressions.splice(index, 0, statement), updateParentPointers(dec, block);
3442
+ throw new Error("insertBeforeInBlock couldn't find existing statement in block");
3443
+ insertBlockStatements(block, index, ...statements);
3444
+ }
3445
+ function insertBlockStatements(block, index, ...statements) {
3446
+ if (!statements.length)
3447
+ return;
3448
+ let { expressions } = block, before = expressions[index];
3449
+ statements[0][0] && before?.[0] ? (Array.isArray(statements[0][0]) || (statements[0][0] = [statements[0][0]]), Array.isArray(before[0]) || (before[0] = [before[0]]), statements[0][0] = [...before[0], ...statements[0][0]]) : statements[0][0] ||= before?.[0], before[0] = "", expressions.splice(index, 0, ...statements), updateParentPointers(block), braceBlock(block);
3368
3450
  }
3369
3451
  function processBlocks(statements) {
3370
3452
  insertSemicolon(statements);
3371
3453
  for (let ref1 = gatherRecursive(statements, ($) => $.type === "BlockStatement"), i2 = 0, len12 = ref1.length; i2 < len12; i2++) {
3372
- let block = ref1[i2], m;
3373
- if (block.unwrapObject && block.expressions.length === 1 && (m = block.expressions[0][1], typeof m == "object" && m != null && "type" in m && m.type === "ParenthesizedExpression" && "implicit" in m && m.implicit === !0 && "expression" in m && typeof m.expression == "object" && m.expression != null && "type" in m.expression && m.expression.type === "ObjectExpression")) {
3454
+ let block = ref1[i2], m1;
3455
+ if (block.unwrapObject && block.expressions.length === 1 && (m1 = block.expressions[0][1], typeof m1 == "object" && m1 != null && "type" in m1 && m1.type === "ParenthesizedExpression" && "implicit" in m1 && m1.implicit === !0 && "expression" in m1 && typeof m1.expression == "object" && m1.expression != null && "type" in m1.expression && m1.expression.type === "ObjectExpression")) {
3374
3456
  let object = block.expressions[0][1].expression;
3375
3457
  if (!(() => {
3376
3458
  let results = !0;
@@ -3384,8 +3466,8 @@ ${js}`
3384
3466
  continue;
3385
3467
  block.expressions[0][1] = block.expressions[0][1].expression, unbraceBlock(block);
3386
3468
  for (let ref2 = object.properties, i3 = 0, len22 = ref2.length; i3 < len22; i3++) {
3387
- let i = i3, prop = ref2[i3], m1;
3388
- m1 = prop.name, typeof m1 == "object" && m1 != null && "type" in m1 && m1.type === "ComputedPropertyName" && "implicit" in m1 && m1.implicit === !0 && replaceNode(prop.name, prop.name.expression, prop), prop.delim?.implicit && (needsPrecedingSemicolon(object.properties[i + 1]) ? prop.delim.token = ";" : (replaceNode(prop.delim, void 0, prop), prop.delim = void 0));
3469
+ let i = i3, prop = ref2[i3], m2;
3470
+ m2 = prop.name, typeof m2 == "object" && m2 != null && "type" in m2 && m2.type === "ComputedPropertyName" && "implicit" in m2 && m2.implicit === !0 && replaceNode(prop.name, prop.name.expression, prop), prop.delim?.implicit && (needsPrecedingSemicolon(object.properties[i + 1]) ? prop.delim.token = ";" : (replaceNode(prop.delim, void 0, prop), prop.delim = void 0));
3389
3471
  let colon = prop.children.indexOf(": ");
3390
3472
  colon < 0 || prop.children[colon - 1] === prop.name && prop.children.splice(colon - 1, 2);
3391
3473
  }
@@ -3437,8 +3519,8 @@ ${js}`
3437
3519
  }
3438
3520
  }
3439
3521
  function blockContainingStatement(exp) {
3440
- let child = exp, parent = exp.parent, m2;
3441
- for (; parent != null && (m2 = parent.type, m2 === "StatementExpression" || m2 === "PipelineExpression" || m2 === "UnwrappedExpression"); )
3522
+ let child = exp, parent = exp.parent, m3;
3523
+ for (; parent != null && (m3 = parent.type, m3 === "StatementExpression" || m3 === "PipelineExpression" || m3 === "UnwrappedExpression"); )
3442
3524
  child = parent, parent = parent.parent;
3443
3525
  if (parent?.type !== "BlockStatement")
3444
3526
  return;
@@ -4106,22 +4188,15 @@ ${js}`
4106
4188
  let binding = bindings[i3], { typeSuffix, initializer } = binding;
4107
4189
  if (typeSuffix && typeSuffix.optional) {
4108
4190
  if (initializer && !typeSuffix.t) {
4109
- let expression = trimFirstSpace(initializer.expression), m;
4110
- if (m = expression.type, m === "Identifier" || m === "MemberExpression")
4111
- typeSuffix.children.push(": ", typeSuffix.t = {
4112
- type: "TypeTypeof",
4113
- children: ["typeof ", expression],
4114
- expression
4115
- });
4116
- else if (expression.type === "Literal" || expression.type === "RegularExpressionLiteral" || expression.type === "TemplateLiteral")
4117
- typeSuffix.children.push(": ", typeSuffix.t = literalType(expression));
4118
- else {
4191
+ let expression = trimFirstSpace(initializer.expression);
4192
+ if (typeSuffix.t = typeOfExpression(expression), typeSuffix.t == null) {
4119
4193
  spliceChild(binding, typeSuffix, 1, {
4120
4194
  type: "Error",
4121
- message: `Optional type can only be inferred from literals or member expressions, not ${expression.type}`
4195
+ message: typeof expression == "object" && expression != null && "type" in expression && expression.type === "Literal" && "subtype" in expression && expression.subtype === "NullLiteral" ? "Optional type can't be inferred from null" : typeof expression == "object" && expression != null && "type" in expression && expression.type === "Identifier" && "name" in expression && expression.name === "undefined" ? "Optional type can't be inferred from undefined" : `Optional type can only be inferred from literals or member expressions, not ${expression.type}`
4122
4196
  });
4123
4197
  continue;
4124
4198
  }
4199
+ typeSuffix.children.push(": ", typeSuffix.t);
4125
4200
  }
4126
4201
  typeSuffix.t ? convertOptionalType(typeSuffix) : (spliceChild(binding, typeSuffix, 1), binding.children.push(initializer = binding.initializer = {
4127
4202
  type: "Initializer",
@@ -4148,9 +4223,9 @@ ${js}`
4148
4223
  }
4149
4224
  function prependStatementExpressionBlock(initializer, statement) {
4150
4225
  let { expression: exp } = initializer, ws;
4151
- if (Array.isArray(exp) && (ws = exp[0], exp = exp[1]), !(typeof exp == "object" && exp != null && "type" in exp && exp.type === "StatementExpression" || typeof exp == "object" && exp != null && "type" in exp && exp.type === "SpreadElement" && "expression" in exp && typeof exp.expression == "object" && exp.expression != null && "type" in exp.expression && exp.expression.type === "StatementExpression"))
4226
+ if (Array.isArray(exp) && exp.length === 2 && isWhitespaceOrEmpty(exp[0]) && (ws = exp[0], exp = exp[1]), !(typeof exp == "object" && exp != null && "type" in exp && exp.type === "StatementExpression" || typeof exp == "object" && exp != null && "type" in exp && exp.type === "SpreadElement" && "expression" in exp && typeof exp.expression == "object" && exp.expression != null && "type" in exp.expression && exp.expression.type === "StatementExpression"))
4152
4227
  return;
4153
- let pre = [], statementExp = exp.statement, blockStatement = [ws || "", statementExp, ";"], ref;
4228
+ let statementExp = exp.statement, blockStatement = [ws || "", statementExp, ";"], pre = [blockStatement], ref;
4154
4229
  if (statementExp.type === "IterationExpression") {
4155
4230
  if (statementExp.async || statementExp.generator)
4156
4231
  return;
@@ -4160,8 +4235,7 @@ ${js}`
4160
4235
  if (statement2.type === "DoStatement") {
4161
4236
  ref = initializer.expression = initializer.children[2] = makeRef(), assignResults(blockStatement, (resultNode) => makeNode({
4162
4237
  type: "AssignmentExpression",
4163
- children: [ref, " = ", resultNode],
4164
- parent: statement2
4238
+ children: [ref, " = ", resultNode]
4165
4239
  }));
4166
4240
  let refDec = {
4167
4241
  type: "Declaration",
@@ -4174,8 +4248,7 @@ ${js}`
4174
4248
  } else {
4175
4249
  ref = initializer.expression = initializer.children[2] = makeRef(), assignResults(blockStatement, (resultNode) => makeNode({
4176
4250
  type: "AssignmentExpression",
4177
- children: [ref, " = ", resultNode],
4178
- parent: statement
4251
+ children: [ref, " = ", resultNode]
4179
4252
  }));
4180
4253
  let refDec = {
4181
4254
  type: "Declaration",
@@ -4183,7 +4256,11 @@ ${js}`
4183
4256
  };
4184
4257
  pre.unshift(["", refDec, ";"]);
4185
4258
  }
4186
- return statement.children.unshift(...pre, blockStatement), updateParentPointers(blockStatement, statement), ref;
4259
+ let ref3;
4260
+ if (!((ref3 = blockContainingStatement(statement)) && typeof ref3 == "object" && "block" in ref3 && "index" in ref3))
4261
+ throw new Error("Couldn't find block in prependStatementExpressionBlock");
4262
+ let { block, index } = ref3;
4263
+ return insertBlockStatements(block, index, ...pre), ref;
4187
4264
  }
4188
4265
  function processDeclarationCondition(condition, rootCondition, parent) {
4189
4266
  if (condition.type !== "DeclarationCondition")
@@ -4260,8 +4337,8 @@ ${js}`
4260
4337
  if (conditions.length) {
4261
4338
  let children = condition.children;
4262
4339
  if (s.negated) {
4263
- let m1;
4264
- if (m1 = condition.expression, !(typeof m1 == "object" && m1 != null && "type" in m1 && m1.type === "UnaryExpression" && "children" in m1 && Array.isArray(m1.children) && len2(m1.children, 2) && Array.isArray(m1.children[0]) && len2(m1.children[0], 1) && m1.children[0][0] === "!" && typeof m1.children[1] == "object" && m1.children[1] != null && "type" in m1.children[1] && m1.children[1].type === "ParenthesizedExpression"))
4340
+ let m;
4341
+ if (m = condition.expression, !(typeof m == "object" && m != null && "type" in m && m.type === "UnaryExpression" && "children" in m && Array.isArray(m.children) && len2(m.children, 2) && Array.isArray(m.children[0]) && len2(m.children[0], 1) && m.children[0][0] === "!" && typeof m.children[1] == "object" && m.children[1] != null && "type" in m.children[1] && m.children[1].type === "ParenthesizedExpression"))
4265
4342
  throw new Error("Unsupported negated condition");
4266
4343
  ({ children } = condition.expression.children[1]);
4267
4344
  }
@@ -4285,11 +4362,11 @@ ${js}`
4285
4362
  if (index < 0)
4286
4363
  throw new Error("Couldn't find where in block to put postfix declaration");
4287
4364
  ancestor.expressions.splice(index + 1, 0, ...blockPrefix), updateParentPointers(ancestor), braceBlock(ancestor);
4288
- let ref3;
4365
+ let ref4;
4289
4366
  switch (s.type) {
4290
4367
  case "IfStatement": {
4291
- if (ref3 = s.else?.block) {
4292
- let elseBlock = ref3;
4368
+ if (ref4 = s.else?.block) {
4369
+ let elseBlock = ref4;
4293
4370
  elseBlock.bare && !elseBlock.semicolon && elseBlock.children.push(elseBlock.semicolon = ";"), ancestor.expressions.splice(index + 1 + blockPrefix.length, 0, ["", elseBlock]), s.children = s.children.filter((a1) => a1 !== s.else), s.else = void 0;
4294
4371
  }
4295
4372
  let block = s.then;
@@ -4324,41 +4401,32 @@ ${js}`
4324
4401
  let { ref: ref2, statementDeclaration } = condition.expression;
4325
4402
  if (!blockPrefix)
4326
4403
  return;
4327
- let newCondition = {
4328
- type: "ParenthesizedExpression",
4329
- children: ["(", ref2, ")"],
4330
- expression: ref2,
4331
- parent: s
4332
- };
4333
- if (s.children = s.children.map(function(c) {
4334
- return c === s.condition ? newCondition : c;
4335
- }), s.condition = newCondition, updateParentPointers(s), statementDeclaration) {
4336
- let block = makeEmptyBlock();
4337
- replaceBlockExpression(s.parent, s, block), block.expressions.push(["", s]), s.children.splice(s.children.findIndex(($5) => $5.token === "switch"), 0, blockPrefix), s.parent = block;
4338
- } else {
4339
- let block = blockWithPrefix([["", [{
4404
+ if (replaceNode(s.condition, parenthesizeExpression(ref2), s), !statementDeclaration) {
4405
+ let declStatement = ["", [{
4340
4406
  type: "Declaration",
4341
4407
  children: ["let ", ...condition.expression.children]
4342
- }], ";"], ...blockPrefix], makeEmptyBlock());
4343
- updateParentPointers(block, s.parent), replaceBlockExpression(s.parent, s, block), block.expressions.push(["", s]), s.parent = block;
4408
+ }], ";"];
4409
+ blockPrefix.unshift(declStatement);
4344
4410
  }
4411
+ let block = blockWithPrefix(blockPrefix, makeEmptyBlock());
4412
+ updateParentPointers(block, s.parent), replaceBlockExpression(s.parent, s, block), block.expressions.push(["", s]), s.parent = block;
4345
4413
  break;
4346
4414
  }
4347
4415
  }
4348
4416
  }
4349
4417
  function dynamizeFromClause(from) {
4350
4418
  from = from.slice(1), from = trimFirstSpace(from);
4351
- let ref4;
4352
- if (ref4 = from[from.length - 1]?.assertion) {
4353
- let assert2 = ref4, ref5;
4354
- ref5 = from[from.length - 1], ref5.children = ref5.children.filter((a2) => a2 !== assert2), from.push(", {", assert2.keyword, ":", assert2.object, "}");
4419
+ let ref5;
4420
+ if (ref5 = from[from.length - 1]?.assertion) {
4421
+ let assert2 = ref5, ref6;
4422
+ ref6 = from[from.length - 1], ref6.children = ref6.children.filter((a2) => a2 !== assert2), from.push(", {", assert2.keyword, ":", assert2.object, "}");
4355
4423
  }
4356
4424
  return ["(", ...from, ")"];
4357
4425
  }
4358
4426
  function dynamizeImportDeclaration(decl) {
4359
- let { imports } = decl, { star, binding, specifiers } = imports, justDefault = binding && !specifiers && !star, ref6;
4360
- binding ? specifiers ? ref6 = makeRef() : ref6 = binding : ref6 = convertNamedImportsToObject(imports, !0);
4361
- let pattern = ref6, c = "const", expression = [
4427
+ let { imports } = decl, { star, binding, specifiers } = imports, justDefault = binding && !specifiers && !star, ref7;
4428
+ binding ? specifiers ? ref7 = makeRef() : ref7 = binding : ref7 = convertNamedImportsToObject(imports, !0);
4429
+ let pattern = ref7, c = "const", expression = [
4362
4430
  justDefault ? "(" : void 0,
4363
4431
  { type: "Await", children: ["await"] },
4364
4432
  " ",
@@ -5093,45 +5161,51 @@ ${js}`
5093
5161
  // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\auto-dec.civet.jsx
5094
5162
  var concatAssign2 = (lhs, rhs) => (rhs?.[Symbol.isConcatSpreadable] ?? Array.isArray(rhs) ? lhs.push.apply(lhs, rhs) : lhs.push(rhs), lhs);
5095
5163
  function findDecs(statements) {
5096
- let declarationNames = gatherNodes(statements, ($) => $.type === "Declaration").flatMap((d) => d.names), globals = getConfig().globals || [];
5164
+ let declarationNames = gatherNodes(statements, ($) => $.type === "Declaration").flatMap(($1) => $1.names), globals = getConfig().globals || [];
5097
5165
  return new Set(globals.concat(declarationNames));
5098
5166
  }
5099
5167
  function createConstLetDecs(statements, scopes, letOrConst) {
5100
5168
  function findVarDecs(statements2, decs) {
5101
- let declarationNames = gatherRecursive(statements2, (node) => node.type === "Declaration" && node.children && node.children.length > 0 && node.children[0].token && node.children[0].token.startsWith("var") || node.type === "FunctionExpression").filter((node) => node.type === "Declaration").flatMap((node) => node.names);
5169
+ let declarationNames = gatherRecursive(statements2, (node) => node.type === "Declaration" && node.children && node.children.length > 0 && node.children[0].token && node.children[0].token.startsWith("var") || node.type === "FunctionExpression").filter(($2) => $2.type === "Declaration").flatMap(($3) => $3.names);
5102
5170
  return new Set(declarationNames);
5103
5171
  }
5104
5172
  let declaredIdentifiers = findVarDecs(statements);
5105
5173
  function hasDec(name) {
5106
- return declaredIdentifiers.has(name) || scopes.some(($1) => $1.has(name));
5174
+ return declaredIdentifiers.has(name) || scopes.some(($4) => $4.has(name));
5107
5175
  }
5108
5176
  function gatherBlockOrOther(statement) {
5109
- return gatherNodes(statement, (s) => s.type === "BlockStatement" || s.type === "AssignmentExpression" || s.type === "Declaration").flatMap((node) => node.type == "BlockStatement" ? node.bare ? gatherBlockOrOther(node.expressions) : node : node.children && node.children.length ? [...gatherBlockOrOther(node.children), node] : []);
5177
+ return gatherNodes(statement, ($5) => $5.type === "BlockStatement" || $5.type === "AssignmentExpression" || $5.type === "Declaration").flatMap((node) => node.type === "BlockStatement" ? node.bare ? gatherBlockOrOther(node.expressions) : node : node.children && node.children.length ? [...gatherBlockOrOther(node.children), node] : []);
5110
5178
  }
5111
5179
  let currentScope = /* @__PURE__ */ new Set();
5112
5180
  scopes.push(currentScope);
5113
- let fnNodes = gatherNodes(statements, isFunction), forNodes = gatherNodes(statements, (s) => s.type === "ForStatement"), targetStatements = [];
5114
- for (let statement of statements) {
5115
- let nodes = gatherBlockOrOther(statement), undeclaredIdentifiers = [];
5116
- for (let node of nodes) {
5117
- if (node.type == "BlockStatement") {
5118
- let block = node, fnNode = fnNodes.find((fnNode2) => fnNode2.block === block), forNode = forNodes.find((forNode2) => forNode2.block === block);
5181
+ let fnNodes = gatherNodes(statements, isFunction), forNodes = gatherNodes(statements, ($6) => $6.type === "ForStatement"), targetStatements = [];
5182
+ for (let i1 = 0, len3 = statements.length; i1 < len3; i1++) {
5183
+ let statement = statements[i1], nodes = gatherBlockOrOther(statement), undeclaredIdentifiers = [];
5184
+ for (let i2 = 0, len12 = nodes.length; i2 < len12; i2++) {
5185
+ let node = nodes[i2];
5186
+ if (node.type === "BlockStatement") {
5187
+ let block = node, fnNode = fnNodes.find(($7) => $7.block === block), forNode = forNodes.find(($8) => $8.block === block);
5119
5188
  fnNode != null ? (scopes.push(new Set(fnNode.parameters.names)), createConstLetDecs(block.expressions, scopes, letOrConst), scopes.pop()) : forNode != null ? (scopes.push(new Set(forNode.declaration.names)), createConstLetDecs(block.expressions, scopes, letOrConst), scopes.pop()) : createConstLetDecs(block.expressions, scopes, letOrConst);
5120
5189
  continue;
5121
5190
  }
5122
- if (node.names == null) continue;
5191
+ if (node.names == null)
5192
+ continue;
5123
5193
  let names = node.names.filter((name) => !hasDec(name));
5124
- node.type == "AssignmentExpression" && undeclaredIdentifiers.push(...names), names.forEach((name) => currentScope.add(name));
5194
+ node.type === "AssignmentExpression" && undeclaredIdentifiers.push(...names);
5195
+ for (let i3 = 0, len22 = names.length; i3 < len22; i3++) {
5196
+ let name = names[i3];
5197
+ currentScope.add(name);
5198
+ }
5125
5199
  }
5126
- if (undeclaredIdentifiers.length > 0) {
5127
- let indent = statement[0], firstIdentifier = gatherNodes(statement[1], (node) => node.type == "Identifier")[0];
5128
- if (undeclaredIdentifiers.length == 1 && statement[1].type == "AssignmentExpression" && statement[1].names.length == 1 && statement[1].names[0] == undeclaredIdentifiers[0] && firstIdentifier && firstIdentifier.names == undeclaredIdentifiers[0] && gatherNodes(statement[1], (node) => node.type === "ObjectBindingPattern").length == 0)
5200
+ if (undeclaredIdentifiers.length) {
5201
+ let indent = statement[0], firstIdentifier = gatherNodes(statement[1], ($9) => $9.type === "Identifier")[0];
5202
+ if (undeclaredIdentifiers.length === 1 && statement[1].type === "AssignmentExpression" && statement[1].names.length === 1 && statement[1].names[0] === undeclaredIdentifiers[0] && firstIdentifier && firstIdentifier.names == undeclaredIdentifiers[0] && gatherNodes(statement[1], ($10) => $10.type === "ObjectBindingPattern").length === 0)
5129
5203
  statement[1].children.unshift([`${letOrConst} `]);
5130
5204
  else {
5131
5205
  let tail = `
5132
5206
  `;
5133
- gatherNodes(indent, (node) => node.token && node.token.endsWith(`
5134
- `)).length > 0 && (tail = void 0), targetStatements.push([indent, {
5207
+ gatherNodes(indent, ($11) => $11.token && $11.token.endsWith(`
5208
+ `)).length && (tail = void 0), targetStatements.push([indent, {
5135
5209
  type: "Declaration",
5136
5210
  children: ["let ", ...undeclaredIdentifiers.join(", ")],
5137
5211
  names: undeclaredIdentifiers
@@ -5144,20 +5218,20 @@ ${js}`
5144
5218
  }
5145
5219
  function createVarDecs(block, scopes, pushVar) {
5146
5220
  function hasDec(name) {
5147
- return scopes.some(($2) => $2.has(name));
5221
+ return scopes.some(($12) => $12.has(name));
5148
5222
  }
5149
5223
  function findAssignments(statements2, decs2) {
5150
- let assignmentStatements2 = gatherNodes(statements2, ($3) => $3.type === "AssignmentExpression");
5224
+ let assignmentStatements2 = gatherNodes(statements2, ($13) => $13.type === "AssignmentExpression");
5151
5225
  return assignmentStatements2.length && concatAssign2(
5152
5226
  assignmentStatements2,
5153
5227
  findAssignments(assignmentStatements2.map((s) => s.children), decs2)
5154
- ), assignmentStatements2.filter(($4) => $4.parent?.type !== "CoffeeClassPublic");
5228
+ ), assignmentStatements2.filter(($14) => $14.parent?.type !== "CoffeeClassPublic");
5155
5229
  }
5156
5230
  pushVar ??= (name) => (varIds.push(name), decs.add(name));
5157
5231
  let { expressions: statements } = block, decs = findDecs(statements);
5158
5232
  scopes.push(decs);
5159
5233
  let varIds = [];
5160
- findAssignments(statements, scopes).flatMap(($5) => $5?.names || []).filter((x, i, a) => {
5234
+ findAssignments(statements, scopes).flatMap(($15) => $15?.names || []).filter((x, i, a) => {
5161
5235
  if (!hasDec(x)) return a.indexOf(x) === i;
5162
5236
  }).forEach(pushVar);
5163
5237
  let fnNodes = gatherNodes(statements, isFunction), forNodes = gatherNodes(statements, (s) => s.type === "ForStatement"), blockNodes = new Set(gatherNodes(statements, (s) => s.type === "BlockStatement"));
@@ -5998,20 +6072,18 @@ ${js}`
5998
6072
  let exp = ref12[i7];
5999
6073
  if (exp.names !== null)
6000
6074
  continue;
6001
- let { lhs: $1, expression: $2 } = exp, tail = [], len3 = $1.length, block, ref13, ref14;
6075
+ let { lhs: $1, expression: $2 } = exp, tail = [], len3 = $1.length, ref13, ref14;
6002
6076
  if (blockContainingStatement(exp) && !(ref13 = $1[$1.length - 1])?.[ref13.length - 1]?.special && !isShortCircuitOp((ref14 = $1[$1.length - 1])?.[ref14.length - 1])) {
6003
- block = makeBlockFragment();
6004
6077
  let ref15;
6005
6078
  if (ref15 = prependStatementExpressionBlock(
6006
6079
  { type: "Initializer", expression: $2, children: [void 0, void 0, $2] },
6007
- block
6080
+ exp
6008
6081
  )) {
6009
6082
  let ref = ref15;
6010
- exp.children = exp.children.map(($7) => $7 === $2 ? ref : $7), $2 = ref;
6011
- } else
6012
- block = void 0;
6083
+ replaceNode($2, ref, exp), $2 = ref;
6084
+ }
6013
6085
  }
6014
- if ($1.some(($8) => $8[$8.length - 1].special)) {
6086
+ if ($1.some(($7) => $7[$7.length - 1].special)) {
6015
6087
  if ($1.length !== 1) throw new Error("Only one assignment with id= is allowed");
6016
6088
  let [, lhs, , op] = $1[0], { call, omitLhs } = op, index = exp.children.indexOf($2);
6017
6089
  if (index < 0) throw new Error("Assertion error: exp not in AssignmentExpression");
@@ -6052,7 +6124,7 @@ ${js}`
6052
6124
  message: "Slice range cannot be decreasing in assignment"
6053
6125
  });
6054
6126
  break;
6055
- } else m3 = lhs.type, (m3 === "ObjectBindingPattern" || m3 === "ArrayBindingPattern" || m3 === "NamedBindingPattern") && (processBindingPatternLHS(lhs, tail), gatherRecursiveAll(lhs, ($9) => $9.type === "Ref").forEach(refsToDeclare.add.bind(refsToDeclare)));
6127
+ } else m3 = lhs.type, (m3 === "ObjectBindingPattern" || m3 === "ArrayBindingPattern" || m3 === "NamedBindingPattern") && (processBindingPatternLHS(lhs, tail), gatherRecursiveAll(lhs, ($8) => $8.type === "Ref").forEach(refsToDeclare.add.bind(refsToDeclare)));
6056
6128
  }
6057
6129
  i--;
6058
6130
  }
@@ -6073,7 +6145,7 @@ ${js}`
6073
6145
  }
6074
6146
  i--;
6075
6147
  }
6076
- if (refsToDeclare.size && (exp.hoistDec ? exp.hoistDec.children.push([...refsToDeclare].map(($10) => [",", $10])) : exp.hoistDec = {
6148
+ if (refsToDeclare.size && (exp.hoistDec ? exp.hoistDec.children.push([...refsToDeclare].map(($9) => [",", $9])) : exp.hoistDec = {
6077
6149
  type: "Declaration",
6078
6150
  children: ["let ", [...refsToDeclare].map((r, i2) => i2 ? [",", r] : r)],
6079
6151
  names: []
@@ -6082,7 +6154,6 @@ ${js}`
6082
6154
  if (index < 0) throw new Error("Assertion error: exp not in AssignmentExpression");
6083
6155
  exp.children.splice(index + 1, 0, ...tail);
6084
6156
  }
6085
- block && (replaceNode(exp, block), block.expressions.push(["", exp]), exp.parent = block);
6086
6157
  }
6087
6158
  }
6088
6159
  function unchainOptionalMemberExpression(exp, ref, innerExp) {
@@ -6143,7 +6214,7 @@ ${js}`
6143
6214
  }
6144
6215
  function processTypes(node) {
6145
6216
  let results1 = [];
6146
- for (let ref17 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len7 = ref17.length; i8 < len7; i8++) {
6217
+ for (let ref17 = gatherRecursiveAll(node, ($10) => $10.type === "TypeUnary"), i8 = 0, len7 = ref17.length; i8 < len7; i8++) {
6147
6218
  let unary = ref17[i8], suffixIndex = unary.suffix.length - 1, results2 = [];
6148
6219
  for (; suffixIndex >= 0; ) {
6149
6220
  let suffix = unary.suffix[suffixIndex];
@@ -6243,7 +6314,7 @@ ${js}`
6243
6314
  return results1;
6244
6315
  }
6245
6316
  function processStatementExpressions(statements) {
6246
- for (let ref19 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len8 = ref19.length; i9 < len8; i9++) {
6317
+ for (let ref19 = gatherRecursiveAll(statements, ($11) => $11.type === "StatementExpression"), i9 = 0, len8 = ref19.length; i9 < len8; i9++) {
6247
6318
  let exp = ref19[i9], { maybe, statement } = exp;
6248
6319
  if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
6249
6320
  replaceNode(exp, statement);
@@ -6357,9 +6428,9 @@ ${js}`
6357
6428
  }
6358
6429
  }
6359
6430
  function processCoffeeClasses(statements) {
6360
- for (let ref23 = gatherRecursiveAll(statements, ($13) => $13.type === "ClassExpression"), i11 = 0, len10 = ref23.length; i11 < len10; i11++) {
6431
+ for (let ref23 = gatherRecursiveAll(statements, ($12) => $12.type === "ClassExpression"), i11 = 0, len10 = ref23.length; i11 < len10; i11++) {
6361
6432
  let ce = ref23[i11], { expressions } = ce.body, indent = expressions[0]?.[0] ?? `
6362
- `, autoBinds = expressions.filter(($14) => $14[1]?.autoBind);
6433
+ `, autoBinds = expressions.filter(($13) => $13[1]?.autoBind);
6363
6434
  if (autoBinds.length) {
6364
6435
  let construct;
6365
6436
  for (let [, c] of expressions)
@@ -6403,17 +6474,17 @@ ${js}`
6403
6474
  })()
6404
6475
  );
6405
6476
  }
6406
- let public_static_function_assignments = expressions.filter(($15) => $15[1]?.type === "CoffeeClassPublic" && $15[1].assignment?.expression?.type === "FunctionExpression").map(($16) => $16[1].assignment);
6477
+ let public_static_function_assignments = expressions.filter(($14) => $14[1]?.type === "CoffeeClassPublic" && $14[1].assignment?.expression?.type === "FunctionExpression").map(($15) => $15[1].assignment);
6407
6478
  for (let public_static_function_assignment of public_static_function_assignments) {
6408
6479
  let id = public_static_function_assignment.lhs[0][1];
6409
6480
  replaceNode(public_static_function_assignment, convertFunctionToMethod(id, public_static_function_assignment.expression));
6410
6481
  }
6411
- let public_static_arrow_function_assignments = expressions.filter(($17) => $17[1]?.type === "CoffeeClassPublic" && $17[1].assignment?.expression?.type === "ArrowFunction").map(($18) => $18[1].assignment);
6482
+ let public_static_arrow_function_assignments = expressions.filter(($16) => $16[1]?.type === "CoffeeClassPublic" && $16[1].assignment?.expression?.type === "ArrowFunction").map(($17) => $17[1].assignment);
6412
6483
  for (let public_static_arrow_function_assignment of public_static_arrow_function_assignments) {
6413
6484
  let id = public_static_arrow_function_assignment.lhs[0][1];
6414
6485
  replaceNode(public_static_arrow_function_assignment, convertArrowFunctionToMethod(id, public_static_arrow_function_assignment.expression));
6415
6486
  }
6416
- let privates = expressions.filter(($19) => $19[1]?.type === "CoffeeClassPrivate");
6487
+ let privates = expressions.filter(($18) => $18[1]?.type === "CoffeeClassPrivate");
6417
6488
  if (!privates.length)
6418
6489
  continue;
6419
6490
  let { parent } = ce;
@@ -6450,30 +6521,30 @@ ${js}`
6450
6521
  root.expressions,
6451
6522
  root.topLevelAwait,
6452
6523
  root.topLevelYield ? "*" : void 0
6453
- ), statements = [["", rootIIFE]], root.children = root.children.map(($20) => $20 === root.expressions ? statements : $20), root.expressions = statements), hoistRefDecs(statements), processFunctions(statements, config2), config2.coffeeClasses && processCoffeeClasses(statements), statements.unshift(...extractPreludeFor(statements)), config2.autoLet ? createConstLetDecs(statements, [], "let") : config2.autoConst ? createConstLetDecs(statements, [], "const") : config2.autoVar && createVarDecs(root, []), config2.repl && processRepl(root, rootIIFE), processBlocks(statements), populateRefs(statements), adjustAtBindings(statements), getSync() && processComptime(statements);
6524
+ ), statements = [["", rootIIFE]], root.children = root.children.map(($19) => $19 === root.expressions ? statements : $19), root.expressions = statements), hoistRefDecs(statements), processFunctions(statements, config2), config2.coffeeClasses && processCoffeeClasses(statements), statements.unshift(...extractPreludeFor(statements)), config2.autoLet ? createConstLetDecs(statements, [], "let") : config2.autoConst ? createConstLetDecs(statements, [], "const") : config2.autoVar && createVarDecs(root, []), config2.repl && processRepl(root, rootIIFE), processBlocks(statements), populateRefs(statements), adjustAtBindings(statements), getSync() && processComptime(statements);
6454
6525
  }
6455
6526
  async function processProgramAsync(root) {
6456
6527
  let { expressions: statements } = root;
6457
6528
  await processComptime(statements);
6458
6529
  }
6459
6530
  function processRepl(root, rootIIFE) {
6460
- let topBlock = gatherRecursive(rootIIFE, ($21) => $21.type === "BlockStatement")[0], i = 0;
6461
- for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($22) => $22.type === "Declaration"), i14 = 0, len12 = ref24.length; i14 < len12; i14++) {
6531
+ let topBlock = gatherRecursive(rootIIFE, ($20) => $20.type === "BlockStatement")[0], i = 0;
6532
+ for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($21) => $21.type === "Declaration"), i14 = 0, len12 = ref24.length; i14 < len12; i14++) {
6462
6533
  let decl = ref24[i14];
6463
6534
  decl.names?.length && (decl.parent === topBlock || decl.decl === "var") && (decl.children.shift(), decl.bindings[0]?.pattern?.type === "ObjectBindingPattern" && (decl.children.unshift("("), decl.children.push(")")), root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]));
6464
6535
  }
6465
- for (let ref25 = gatherRecursive(topBlock, ($23) => $23.type === "FunctionExpression"), i15 = 0, len13 = ref25.length; i15 < len13; i15++) {
6536
+ for (let ref25 = gatherRecursive(topBlock, ($22) => $22.type === "FunctionExpression"), i15 = 0, len13 = ref25.length; i15 < len13; i15++) {
6466
6537
  let func = ref25[i15];
6467
6538
  func.name && func.parent?.type === "BlockStatement" && (func.parent === topBlock ? (replaceNode(func, void 0), root.expressions.splice(i++, 0, ["", func]), func.parent = root) : (func.children.unshift(func.name, "="), root.expressions.splice(i++, 0, ["", `var ${func.name}`, ";"])));
6468
6539
  }
6469
- for (let ref26 = gatherRecursiveWithinFunction(topBlock, ($24) => $24.type === "ClassExpression"), i16 = 0, len14 = ref26.length; i16 < len14; i16++) {
6540
+ for (let ref26 = gatherRecursiveWithinFunction(topBlock, ($23) => $23.type === "ClassExpression"), i16 = 0, len14 = ref26.length; i16 < len14; i16++) {
6470
6541
  let classExp = ref26[i16], m8;
6471
6542
  (classExp.name && classExp.parent === topBlock || (m8 = classExp.parent, typeof m8 == "object" && m8 != null && "type" in m8 && m8.type === "ReturnStatement" && "parent" in m8 && m8.parent === topBlock)) && (classExp.children.unshift(classExp.name, "="), root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]));
6472
6543
  }
6473
6544
  }
6474
6545
  function processPlaceholders(statements) {
6475
6546
  let placeholderMap = /* @__PURE__ */ new Map(), liftedIfs = /* @__PURE__ */ new Set();
6476
- for (let ref27 = gatherRecursiveAll(statements, ($25) => $25.type === "Placeholder"), i17 = 0, len15 = ref27.length; i17 < len15; i17++) {
6547
+ for (let ref27 = gatherRecursiveAll(statements, ($24) => $24.type === "Placeholder"), i17 = 0, len15 = ref27.length; i17 < len15; i17++) {
6477
6548
  let exp = ref27[i17], ancestor;
6478
6549
  if (exp.subtype === ".") {
6479
6550
  ({ ancestor } = findAncestor(
@@ -6660,7 +6731,7 @@ ${js}`
6660
6731
  }
6661
6732
  lastType = child.type;
6662
6733
  }
6663
- return type.length === 1 ? type[0] : (type = type.flatMap(($26) => [$26, ", "]), type.pop(), ["[", type, "]"]);
6734
+ return type.length === 1 ? type[0] : (type = type.flatMap(($25) => [$25, ", "]), type.pop(), ["[", type, "]"]);
6664
6735
  }
6665
6736
  }
6666
6737
 
@@ -6695,12 +6766,16 @@ ${js}`
6695
6766
  CommaDelimiter,
6696
6767
  OptionalCommaDelimiter,
6697
6768
  ArgumentList,
6769
+ PostfixedArgumentList,
6698
6770
  NestedArguments,
6699
6771
  NestedArgumentList,
6700
6772
  NestedArgument,
6701
6773
  SingleLineArgumentExpressions,
6702
6774
  WArgumentPart,
6775
+ SingleLinePostfixedArgumentExpressions,
6776
+ WPostfixedArgumentPart,
6703
6777
  ArgumentPart,
6778
+ PostfixedArgumentPart,
6704
6779
  BinaryOpExpression,
6705
6780
  BinaryOpNotDedented,
6706
6781
  BinaryOpRHS,
@@ -6720,6 +6795,7 @@ ${js}`
6720
6795
  Tuple,
6721
6796
  NWTypePostfix,
6722
6797
  UpdateExpression,
6798
+ UpdateExpressionPattern,
6723
6799
  UpdateExpressionSymbol,
6724
6800
  AssignmentExpression,
6725
6801
  NonPipelineAssignmentExpression,
@@ -6855,7 +6931,7 @@ ${js}`
6855
6931
  OperatorPrecedence,
6856
6932
  OperatorAssociativity,
6857
6933
  ThinArrowFunction,
6858
- Arrow,
6934
+ ThinArrow,
6859
6935
  ExplicitBlock,
6860
6936
  EmptyBracedContent,
6861
6937
  ImplicitNestedBlock,
@@ -7082,6 +7158,7 @@ ${js}`
7082
7158
  Debugger,
7083
7159
  MaybeNestedNonPipelineExpression,
7084
7160
  MaybeNestedPostfixedExpression,
7161
+ MaybeNestedPostfixedCommaExpression,
7085
7162
  NestedPostfixedExpressionNoTrailing,
7086
7163
  MaybeNestedExpression,
7087
7164
  MaybeParenNestedExpression,
@@ -7515,7 +7592,7 @@ ${js}`
7515
7592
  Dedented,
7516
7593
  PushExtraIndent1
7517
7594
  };
7518
- var $L0 = (0, import_lib2.$L)(""), $L1 = (0, import_lib2.$L)("{"), $L2 = (0, import_lib2.$L)("/ "), $L3 = (0, import_lib2.$L)("="), $L4 = (0, import_lib2.$L)("("), $L5 = (0, import_lib2.$L)("... "), $L6 = (0, import_lib2.$L)("?"), $L7 = (0, import_lib2.$L)("."), $L8 = (0, import_lib2.$L)("tuple"), $L9 = (0, import_lib2.$L)("++"), $L10 = (0, import_lib2.$L)("--"), $L11 = (0, import_lib2.$L)("\u29FA"), $L12 = (0, import_lib2.$L)("\u2014"), $L13 = (0, import_lib2.$L)("=>"), $L14 = (0, import_lib2.$L)("\u21D2"), $L15 = (0, import_lib2.$L)("import"), $L16 = (0, import_lib2.$L)(":"), $L17 = (0, import_lib2.$L)(" "), $L18 = (0, import_lib2.$L)("<"), $L19 = (0, import_lib2.$L)("implements"), $L20 = (0, import_lib2.$L)("<:"), $L21 = (0, import_lib2.$L)("^"), $L22 = (0, import_lib2.$L)("<?"), $L23 = (0, import_lib2.$L)("-"), $L24 = (0, import_lib2.$L)("import.meta"), $L25 = (0, import_lib2.$L)("return.value"), $L26 = (0, import_lib2.$L)(","), $L27 = (0, import_lib2.$L)("tighter"), $L28 = (0, import_lib2.$L)("looser"), $L29 = (0, import_lib2.$L)("same"), $L30 = (0, import_lib2.$L)("left"), $L31 = (0, import_lib2.$L)("right"), $L32 = (0, import_lib2.$L)("non"), $L33 = (0, import_lib2.$L)("relational"), $L34 = (0, import_lib2.$L)("arguments"), $L35 = (0, import_lib2.$L)("->"), $L36 = (0, import_lib2.$L)("\u2192"), $L37 = (0, import_lib2.$L)("}"), $L38 = (0, import_lib2.$L)("null"), $L39 = (0, import_lib2.$L)("true"), $L40 = (0, import_lib2.$L)("false"), $L41 = (0, import_lib2.$L)("yes"), $L42 = (0, import_lib2.$L)("on"), $L43 = (0, import_lib2.$L)("no"), $L44 = (0, import_lib2.$L)("off"), $L45 = (0, import_lib2.$L)(">"), $L46 = (0, import_lib2.$L)("]"), $L47 = (0, import_lib2.$L)("\u2022"), $L48 = (0, import_lib2.$L)("//"), $L49 = (0, import_lib2.$L)("**="), $L50 = (0, import_lib2.$L)("*="), $L51 = (0, import_lib2.$L)("%/"), $L52 = (0, import_lib2.$L)("\xF7"), $L53 = (0, import_lib2.$L)("%%"), $L54 = (0, import_lib2.$L)("/="), $L55 = (0, import_lib2.$L)("%="), $L56 = (0, import_lib2.$L)("+="), $L57 = (0, import_lib2.$L)("-="), $L58 = (0, import_lib2.$L)("<<="), $L59 = (0, import_lib2.$L)("\u226A="), $L60 = (0, import_lib2.$L)(">>>="), $L61 = (0, import_lib2.$L)("\u22D9="), $L62 = (0, import_lib2.$L)(">>="), $L63 = (0, import_lib2.$L)("\u226B="), $L64 = (0, import_lib2.$L)("&&="), $L65 = (0, import_lib2.$L)("&="), $L66 = (0, import_lib2.$L)("^="), $L67 = (0, import_lib2.$L)("||="), $L68 = (0, import_lib2.$L)("\u2016="), $L69 = (0, import_lib2.$L)("|="), $L70 = (0, import_lib2.$L)("??="), $L71 = (0, import_lib2.$L)("\u2047="), $L72 = (0, import_lib2.$L)("?="), $L73 = (0, import_lib2.$L)("and="), $L74 = (0, import_lib2.$L)("or="), $L75 = (0, import_lib2.$L)("*"), $L76 = (0, import_lib2.$L)("**"), $L77 = (0, import_lib2.$L)("/"), $L78 = (0, import_lib2.$L)("%"), $L79 = (0, import_lib2.$L)("+"), $L80 = (0, import_lib2.$L)("<="), $L81 = (0, import_lib2.$L)("\u2264"), $L82 = (0, import_lib2.$L)(">="), $L83 = (0, import_lib2.$L)("\u2265"), $L84 = (0, import_lib2.$L)("!<?"), $L85 = (0, import_lib2.$L)("<<"), $L86 = (0, import_lib2.$L)("\u226A"), $L87 = (0, import_lib2.$L)(">>>"), $L88 = (0, import_lib2.$L)("\u22D9"), $L89 = (0, import_lib2.$L)(">>"), $L90 = (0, import_lib2.$L)("\u226B"), $L91 = (0, import_lib2.$L)("!=="), $L92 = (0, import_lib2.$L)("\u2262"), $L93 = (0, import_lib2.$L)("!="), $L94 = (0, import_lib2.$L)("\u2260"), $L95 = (0, import_lib2.$L)("isnt"), $L96 = (0, import_lib2.$L)("==="), $L97 = (0, import_lib2.$L)("\u2263"), $L98 = (0, import_lib2.$L)("\u2A76"), $L99 = (0, import_lib2.$L)("=="), $L100 = (0, import_lib2.$L)("\u2261"), $L101 = (0, import_lib2.$L)("\u2A75"), $L102 = (0, import_lib2.$L)("and"), $L103 = (0, import_lib2.$L)("&&"), $L104 = (0, import_lib2.$L)("or"), $L105 = (0, import_lib2.$L)("||"), $L106 = (0, import_lib2.$L)("\u2016"), $L107 = (0, import_lib2.$L)("^^"), $L108 = (0, import_lib2.$L)("xor"), $L109 = (0, import_lib2.$L)("xnor"), $L110 = (0, import_lib2.$L)("??"), $L111 = (0, import_lib2.$L)("\u2047"), $L112 = (0, import_lib2.$L)("instanceof"), $L113 = (0, import_lib2.$L)("\u2208"), $L114 = (0, import_lib2.$L)("\u220B"), $L115 = (0, import_lib2.$L)("\u220C"), $L116 = (0, import_lib2.$L)("\u2209"), $L117 = (0, import_lib2.$L)("&"), $L118 = (0, import_lib2.$L)("|"), $L119 = (0, import_lib2.$L)(";"), $L120 = (0, import_lib2.$L)("some"), $L121 = (0, import_lib2.$L)("every"), $L122 = (0, import_lib2.$L)("count"), $L123 = (0, import_lib2.$L)("first"), $L124 = (0, import_lib2.$L)("sum"), $L125 = (0, import_lib2.$L)("product"), $L126 = (0, import_lib2.$L)("min"), $L127 = (0, import_lib2.$L)("max"), $L128 = (0, import_lib2.$L)("join"), $L129 = (0, import_lib2.$L)("concat"), $L130 = (0, import_lib2.$L)("break"), $L131 = (0, import_lib2.$L)("continue"), $L132 = (0, import_lib2.$L)("debugger"), $L133 = (0, import_lib2.$L)("require"), $L134 = (0, import_lib2.$L)("with"), $L135 = (0, import_lib2.$L)("assert"), $L136 = (0, import_lib2.$L)(":="), $L137 = (0, import_lib2.$L)("\u2254"), $L138 = (0, import_lib2.$L)(".="), $L139 = (0, import_lib2.$L)("::="), $L140 = (0, import_lib2.$L)("/*"), $L141 = (0, import_lib2.$L)("*/"), $L142 = (0, import_lib2.$L)("\\"), $L143 = (0, import_lib2.$L)(")"), $L144 = (0, import_lib2.$L)("abstract"), $L145 = (0, import_lib2.$L)("as"), $L146 = (0, import_lib2.$L)("@"), $L147 = (0, import_lib2.$L)("@@"), $L148 = (0, import_lib2.$L)("async"), $L149 = (0, import_lib2.$L)("await"), $L150 = (0, import_lib2.$L)("`"), $L151 = (0, import_lib2.$L)("by"), $L152 = (0, import_lib2.$L)("case"), $L153 = (0, import_lib2.$L)("catch"), $L154 = (0, import_lib2.$L)("class"), $L155 = (0, import_lib2.$L)("#{"), $L156 = (0, import_lib2.$L)("comptime"), $L157 = (0, import_lib2.$L)("declare"), $L158 = (0, import_lib2.$L)("default"), $L159 = (0, import_lib2.$L)("delete"), $L160 = (0, import_lib2.$L)("do"), $L161 = (0, import_lib2.$L)(".."), $L162 = (0, import_lib2.$L)("\u2025"), $L163 = (0, import_lib2.$L)("..."), $L164 = (0, import_lib2.$L)("\u2026"), $L165 = (0, import_lib2.$L)("::"), $L166 = (0, import_lib2.$L)('"'), $L167 = (0, import_lib2.$L)("each"), $L168 = (0, import_lib2.$L)("else"), $L169 = (0, import_lib2.$L)("!"), $L170 = (0, import_lib2.$L)("export"), $L171 = (0, import_lib2.$L)("extends"), $L172 = (0, import_lib2.$L)("finally"), $L173 = (0, import_lib2.$L)("for"), $L174 = (0, import_lib2.$L)("from"), $L175 = (0, import_lib2.$L)("function"), $L176 = (0, import_lib2.$L)("get"), $L177 = (0, import_lib2.$L)("set"), $L178 = (0, import_lib2.$L)("#"), $L179 = (0, import_lib2.$L)("if"), $L180 = (0, import_lib2.$L)("in"), $L181 = (0, import_lib2.$L)("infer"), $L182 = (0, import_lib2.$L)("let"), $L183 = (0, import_lib2.$L)("const"), $L184 = (0, import_lib2.$L)("is"), $L185 = (0, import_lib2.$L)("var"), $L186 = (0, import_lib2.$L)("like"), $L187 = (0, import_lib2.$L)("loop"), $L188 = (0, import_lib2.$L)("new"), $L189 = (0, import_lib2.$L)("not"), $L190 = (0, import_lib2.$L)("of"), $L191 = (0, import_lib2.$L)("["), $L192 = (0, import_lib2.$L)("operator"), $L193 = (0, import_lib2.$L)("override"), $L194 = (0, import_lib2.$L)("own"), $L195 = (0, import_lib2.$L)("public"), $L196 = (0, import_lib2.$L)("private"), $L197 = (0, import_lib2.$L)("protected"), $L198 = (0, import_lib2.$L)("||>"), $L199 = (0, import_lib2.$L)("|\u25B7"), $L200 = (0, import_lib2.$L)("|>="), $L201 = (0, import_lib2.$L)("\u25B7="), $L202 = (0, import_lib2.$L)("|>"), $L203 = (0, import_lib2.$L)("\u25B7"), $L204 = (0, import_lib2.$L)("readonly"), $L205 = (0, import_lib2.$L)("return"), $L206 = (0, import_lib2.$L)("satisfies"), $L207 = (0, import_lib2.$L)("'"), $L208 = (0, import_lib2.$L)("static"), $L209 = (0, import_lib2.$L)("${"), $L210 = (0, import_lib2.$L)("super"), $L211 = (0, import_lib2.$L)("switch"), $L212 = (0, import_lib2.$L)("target"), $L213 = (0, import_lib2.$L)("then"), $L214 = (0, import_lib2.$L)("this"), $L215 = (0, import_lib2.$L)("throw"), $L216 = (0, import_lib2.$L)('"""'), $L217 = (0, import_lib2.$L)("'''"), $L218 = (0, import_lib2.$L)("///"), $L219 = (0, import_lib2.$L)("```"), $L220 = (0, import_lib2.$L)("try"), $L221 = (0, import_lib2.$L)("typeof"), $L222 = (0, import_lib2.$L)("undefined"), $L223 = (0, import_lib2.$L)("unless"), $L224 = (0, import_lib2.$L)("until"), $L225 = (0, import_lib2.$L)("using"), $L226 = (0, import_lib2.$L)("void"), $L227 = (0, import_lib2.$L)("when"), $L228 = (0, import_lib2.$L)("while"), $L229 = (0, import_lib2.$L)("yield"), $L230 = (0, import_lib2.$L)("/>"), $L231 = (0, import_lib2.$L)("</"), $L232 = (0, import_lib2.$L)("<>"), $L233 = (0, import_lib2.$L)("</>"), $L234 = (0, import_lib2.$L)("<!--"), $L235 = (0, import_lib2.$L)("-->"), $L236 = (0, import_lib2.$L)("type"), $L237 = (0, import_lib2.$L)("enum"), $L238 = (0, import_lib2.$L)("interface"), $L239 = (0, import_lib2.$L)("global"), $L240 = (0, import_lib2.$L)("module"), $L241 = (0, import_lib2.$L)("namespace"), $L242 = (0, import_lib2.$L)("asserts"), $L243 = (0, import_lib2.$L)("keyof"), $L244 = (0, import_lib2.$L)("???"), $L245 = (0, import_lib2.$L)("unique"), $L246 = (0, import_lib2.$L)("symbol"), $L247 = (0, import_lib2.$L)("[]"), $L248 = (0, import_lib2.$L)("civet"), $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy")), $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy")), $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R3 = (0, import_lib2.$R)(new RegExp("[0-9]", "suy")), $R4 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Start}|[_$0-9(\\[{])", "suy")), $R5 = (0, import_lib2.$R)(new RegExp("[ \\t]", "suy")), $R6 = (0, import_lib2.$R)(new RegExp("\\p{ID_Continue}|[\\u200C\\u200D$.#{=]", "suy")), $R7 = (0, import_lib2.$R)(new RegExp("[&=]", "suy")), $R8 = (0, import_lib2.$R)(new RegExp("(?=['\"`])", "suy")), $R9 = (0, import_lib2.$R)(new RegExp("(?=[\\/?])", "suy")), $R10 = (0, import_lib2.$R)(new RegExp("(?=[\\/\\[{?.!@#'\u2019:])", "suy")), $R11 = (0, import_lib2.$R)(new RegExp("%%?", "suy")), $R12 = (0, import_lib2.$R)(new RegExp("[.\\s]", "suy")), $R13 = (0, import_lib2.$R)(new RegExp("[)\\]}]", "suy")), $R14 = (0, import_lib2.$R)(new RegExp("[+-]", "suy")), $R15 = (0, import_lib2.$R)(new RegExp("\\+\\+|--|\u29FA|\u2014|[\\+\\-&]\\S", "suy")), $R16 = (0, import_lib2.$R)(new RegExp(`(?=[0-9.'"tfyno])`, "suy")), $R17 = (0, import_lib2.$R)(new RegExp("(?=true|false|yes|no|on|off)", "suy")), $R18 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$])", "suy")), $R19 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R20 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022\\/])", "suy")), $R21 = (0, import_lib2.$R)(new RegExp("([<>])(=?)|([\u2264\u2265])", "suy")), $R22 = (0, import_lib2.$R)(new RegExp("[ \\t]*", "suy")), $R23 = (0, import_lib2.$R)(new RegExp("[ \\t]+", "suy")), $R24 = (0, import_lib2.$R)(new RegExp("[!+-]?", "suy")), $R25 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R26 = (0, import_lib2.$R)(new RegExp("[=>]", "suy")), $R27 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])", "suy")), $R28 = (0, import_lib2.$R)(new RegExp("!\\^\\^?", "suy")), $R29 = (0, import_lib2.$R)(new RegExp("(?!\\+\\+|--)[!~+-](?!\\s)", "suy")), $R30 = (0, import_lib2.$R)(new RegExp("[:.]", "suy")), $R31 = (0, import_lib2.$R)(new RegExp("(?=for|if|loop|unless|until|while)", "suy")), $R32 = (0, import_lib2.$R)(new RegExp("(?:loop|while|until|for|do)(?!\\p{ID_Continue})", "suy")), $R33 = (0, import_lib2.$R)(new RegExp("(?=loop|comptime|do|for|until|while)", "suy")), $R34 = (0, import_lib2.$R)(new RegExp('[^;"\\s=>]+', "suy")), $R35 = (0, import_lib2.$R)(new RegExp("(?=[0-9.])", "suy")), $R36 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy")), $R37 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy")), $R38 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?", "suy")), $R39 = (0, import_lib2.$R)(new RegExp("(?:\\.[0-9](?:_[0-9]|[0-9])*)", "suy")), $R40 = (0, import_lib2.$R)(new RegExp("(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)", "suy")), $R41 = (0, import_lib2.$R)(new RegExp("0[bB][01](?:[01]|_[01])*n?", "suy")), $R42 = (0, import_lib2.$R)(new RegExp("0[oO][0-7](?:[0-7]|_[0-7])*n?", "suy")), $R43 = (0, import_lib2.$R)(new RegExp("0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?", "suy")), $R44 = (0, import_lib2.$R)(new RegExp("(?=[0-9])", "suy")), $R45 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)", "suy")), $R46 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"])*', "suy")), $R47 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'])*", "suy")), $R48 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+', "suy")), $R49 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|\\\\.|[^"])+', "suy")), $R50 = (0, import_lib2.$R)(new RegExp("(?:'(?!'')|\\\\.|[^'])*", "suy")), $R51 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|#(?!\\{)|[^"#])+', "suy")), $R52 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^\\]])*", "suy")), $R53 = (0, import_lib2.$R)(new RegExp("(?:\\\\.)", "suy")), $R54 = (0, import_lib2.$R)(new RegExp("[\\s]+", "suy")), $R55 = (0, import_lib2.$R)(new RegExp("\\/(?!\\/\\/)", "suy")), $R56 = (0, import_lib2.$R)(new RegExp("[^[\\/\\s#$\\\\]+|[#$]", "suy")), $R57 = (0, import_lib2.$R)(new RegExp("[*\\/\\r\\n]", "suy")), $R58 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^[\\/\\r\\n])+", "suy")), $R59 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R60 = (0, import_lib2.$R)(new RegExp("(?=[`'\"])", "suy")), $R61 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|\\\\.|[^$`])+", "suy")), $R62 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+", "suy")), $R63 = (0, import_lib2.$R)(new RegExp("(?:on|off|yes|no)(?!\\p{ID_Continue})", "suy")), $R64 = (0, import_lib2.$R)(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy")), $R65 = (0, import_lib2.$R)(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy")), $R66 = (0, import_lib2.$R)(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy")), $R67 = (0, import_lib2.$R)(new RegExp("(?:and|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|not|null|or|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy")), $R68 = (0, import_lib2.$R)(new RegExp("(?=\\/|#)", "suy")), $R69 = (0, import_lib2.$R)(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy")), $R70 = (0, import_lib2.$R)(new RegExp(".", "suy")), $R71 = (0, import_lib2.$R)(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy")), $R72 = (0, import_lib2.$R)(new RegExp("[^]*?###", "suy")), $R73 = (0, import_lib2.$R)(new RegExp("###(?!#)", "suy")), $R74 = (0, import_lib2.$R)(new RegExp("\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\/", "suy")), $R75 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\/\\\\])", "suy")), $R76 = (0, import_lib2.$R)(new RegExp("(?=\\s|\\/|#)", "suy")), $R77 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Continue})", "suy")), $R78 = (0, import_lib2.$R)(new RegExp("[=:]", "suy")), $R79 = (0, import_lib2.$R)(new RegExp("['\u2019]s", "suy")), $R80 = (0, import_lib2.$R)(new RegExp("\\s", "suy")), $R81 = (0, import_lib2.$R)(new RegExp("(?=[<])", "suy")), $R82 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R83 = (0, import_lib2.$R)(new RegExp("[!+-]", "suy")), $R84 = (0, import_lib2.$R)(new RegExp("[\\s>]|\\/>", "suy")), $R85 = (0, import_lib2.$R)(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy")), $R86 = (0, import_lib2.$R)(new RegExp(`"[^"]*"|'[^']*'`, "suy")), $R87 = (0, import_lib2.$R)(new RegExp("[<>]", "suy")), $R88 = (0, import_lib2.$R)(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy")), $R89 = (0, import_lib2.$R)(new RegExp("(?:-[^-]|[^-]*)*", "suy")), $R90 = (0, import_lib2.$R)(new RegExp("[^{}<>\\r\\n]+", "suy")), $R91 = (0, import_lib2.$R)(new RegExp("[+-]?", "suy")), $R92 = (0, import_lib2.$R)(new RegExp("(?=if|unless)", "suy")), $R93 = (0, import_lib2.$R)(new RegExp("[|&<!=\\-\u21D2\u2192]", "suy")), $R94 = (0, import_lib2.$R)(new RegExp("(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R95 = (0, import_lib2.$R)(new RegExp("const|in|out", "suy")), $R96 = (0, import_lib2.$R)(new RegExp("#![^\\r\\n]*", "suy")), $R97 = (0, import_lib2.$R)(new RegExp("[\\t ]*", "suy")), $R98 = (0, import_lib2.$R)(new RegExp("[\\s]*", "suy")), $R99 = (0, import_lib2.$R)(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?", "suy")), $R100 = (0, import_lib2.$R)(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy")), $R101 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy")), $R102 = (0, import_lib2.$R)(new RegExp("\\r\\n|\\n|\\r|$", "suy")), $R103 = (0, import_lib2.$R)(new RegExp("[^]*", "suy")), Program$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Reset, Init, (0, import_lib2.$E)(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7595
+ var $L0 = (0, import_lib2.$L)(""), $L1 = (0, import_lib2.$L)("{"), $L2 = (0, import_lib2.$L)("/ "), $L3 = (0, import_lib2.$L)("="), $L4 = (0, import_lib2.$L)("("), $L5 = (0, import_lib2.$L)("... "), $L6 = (0, import_lib2.$L)("?"), $L7 = (0, import_lib2.$L)("."), $L8 = (0, import_lib2.$L)("tuple"), $L9 = (0, import_lib2.$L)("++"), $L10 = (0, import_lib2.$L)("--"), $L11 = (0, import_lib2.$L)("\u29FA"), $L12 = (0, import_lib2.$L)("\u2014"), $L13 = (0, import_lib2.$L)("=>"), $L14 = (0, import_lib2.$L)("\u21D2"), $L15 = (0, import_lib2.$L)("import"), $L16 = (0, import_lib2.$L)(":"), $L17 = (0, import_lib2.$L)(" "), $L18 = (0, import_lib2.$L)("<"), $L19 = (0, import_lib2.$L)("implements"), $L20 = (0, import_lib2.$L)("<:"), $L21 = (0, import_lib2.$L)("^"), $L22 = (0, import_lib2.$L)("<?"), $L23 = (0, import_lib2.$L)("-"), $L24 = (0, import_lib2.$L)("import.meta"), $L25 = (0, import_lib2.$L)("return.value"), $L26 = (0, import_lib2.$L)(","), $L27 = (0, import_lib2.$L)("tighter"), $L28 = (0, import_lib2.$L)("looser"), $L29 = (0, import_lib2.$L)("same"), $L30 = (0, import_lib2.$L)("left"), $L31 = (0, import_lib2.$L)("right"), $L32 = (0, import_lib2.$L)("non"), $L33 = (0, import_lib2.$L)("relational"), $L34 = (0, import_lib2.$L)("arguments"), $L35 = (0, import_lib2.$L)("->"), $L36 = (0, import_lib2.$L)("\u2192"), $L37 = (0, import_lib2.$L)("}"), $L38 = (0, import_lib2.$L)("null"), $L39 = (0, import_lib2.$L)("true"), $L40 = (0, import_lib2.$L)("false"), $L41 = (0, import_lib2.$L)("yes"), $L42 = (0, import_lib2.$L)("on"), $L43 = (0, import_lib2.$L)("no"), $L44 = (0, import_lib2.$L)("off"), $L45 = (0, import_lib2.$L)(">"), $L46 = (0, import_lib2.$L)("]"), $L47 = (0, import_lib2.$L)("\u2022"), $L48 = (0, import_lib2.$L)("//"), $L49 = (0, import_lib2.$L)("**="), $L50 = (0, import_lib2.$L)("*="), $L51 = (0, import_lib2.$L)("%/"), $L52 = (0, import_lib2.$L)("\xF7"), $L53 = (0, import_lib2.$L)("%%"), $L54 = (0, import_lib2.$L)("/="), $L55 = (0, import_lib2.$L)("%="), $L56 = (0, import_lib2.$L)("+="), $L57 = (0, import_lib2.$L)("-="), $L58 = (0, import_lib2.$L)("<<="), $L59 = (0, import_lib2.$L)("\u226A="), $L60 = (0, import_lib2.$L)(">>>="), $L61 = (0, import_lib2.$L)("\u22D9="), $L62 = (0, import_lib2.$L)(">>="), $L63 = (0, import_lib2.$L)("\u226B="), $L64 = (0, import_lib2.$L)("&&="), $L65 = (0, import_lib2.$L)("&="), $L66 = (0, import_lib2.$L)("^="), $L67 = (0, import_lib2.$L)("||="), $L68 = (0, import_lib2.$L)("\u2016="), $L69 = (0, import_lib2.$L)("|="), $L70 = (0, import_lib2.$L)("??="), $L71 = (0, import_lib2.$L)("\u2047="), $L72 = (0, import_lib2.$L)("?="), $L73 = (0, import_lib2.$L)("and="), $L74 = (0, import_lib2.$L)("or="), $L75 = (0, import_lib2.$L)("*"), $L76 = (0, import_lib2.$L)("**"), $L77 = (0, import_lib2.$L)("/"), $L78 = (0, import_lib2.$L)("%"), $L79 = (0, import_lib2.$L)("+"), $L80 = (0, import_lib2.$L)("<="), $L81 = (0, import_lib2.$L)("\u2264"), $L82 = (0, import_lib2.$L)(">="), $L83 = (0, import_lib2.$L)("\u2265"), $L84 = (0, import_lib2.$L)("!<?"), $L85 = (0, import_lib2.$L)("<<"), $L86 = (0, import_lib2.$L)("\u226A"), $L87 = (0, import_lib2.$L)(">>>"), $L88 = (0, import_lib2.$L)("\u22D9"), $L89 = (0, import_lib2.$L)(">>"), $L90 = (0, import_lib2.$L)("\u226B"), $L91 = (0, import_lib2.$L)("!=="), $L92 = (0, import_lib2.$L)("\u2262"), $L93 = (0, import_lib2.$L)("!="), $L94 = (0, import_lib2.$L)("\u2260"), $L95 = (0, import_lib2.$L)("isnt"), $L96 = (0, import_lib2.$L)("==="), $L97 = (0, import_lib2.$L)("\u2263"), $L98 = (0, import_lib2.$L)("\u2A76"), $L99 = (0, import_lib2.$L)("=="), $L100 = (0, import_lib2.$L)("\u2261"), $L101 = (0, import_lib2.$L)("\u2A75"), $L102 = (0, import_lib2.$L)("and"), $L103 = (0, import_lib2.$L)("&&"), $L104 = (0, import_lib2.$L)("or"), $L105 = (0, import_lib2.$L)("||"), $L106 = (0, import_lib2.$L)("\u2016"), $L107 = (0, import_lib2.$L)("^^"), $L108 = (0, import_lib2.$L)("xor"), $L109 = (0, import_lib2.$L)("xnor"), $L110 = (0, import_lib2.$L)("??"), $L111 = (0, import_lib2.$L)("\u2047"), $L112 = (0, import_lib2.$L)("instanceof"), $L113 = (0, import_lib2.$L)("\u2208"), $L114 = (0, import_lib2.$L)("\u220B"), $L115 = (0, import_lib2.$L)("\u220C"), $L116 = (0, import_lib2.$L)("\u2209"), $L117 = (0, import_lib2.$L)("&"), $L118 = (0, import_lib2.$L)("|"), $L119 = (0, import_lib2.$L)(";"), $L120 = (0, import_lib2.$L)("some"), $L121 = (0, import_lib2.$L)("every"), $L122 = (0, import_lib2.$L)("count"), $L123 = (0, import_lib2.$L)("first"), $L124 = (0, import_lib2.$L)("sum"), $L125 = (0, import_lib2.$L)("product"), $L126 = (0, import_lib2.$L)("min"), $L127 = (0, import_lib2.$L)("max"), $L128 = (0, import_lib2.$L)("join"), $L129 = (0, import_lib2.$L)("concat"), $L130 = (0, import_lib2.$L)("break"), $L131 = (0, import_lib2.$L)("continue"), $L132 = (0, import_lib2.$L)("debugger"), $L133 = (0, import_lib2.$L)("require"), $L134 = (0, import_lib2.$L)("with"), $L135 = (0, import_lib2.$L)("assert"), $L136 = (0, import_lib2.$L)(":="), $L137 = (0, import_lib2.$L)("\u2254"), $L138 = (0, import_lib2.$L)(".="), $L139 = (0, import_lib2.$L)("::="), $L140 = (0, import_lib2.$L)("/*"), $L141 = (0, import_lib2.$L)("*/"), $L142 = (0, import_lib2.$L)("\\"), $L143 = (0, import_lib2.$L)(")"), $L144 = (0, import_lib2.$L)("abstract"), $L145 = (0, import_lib2.$L)("as"), $L146 = (0, import_lib2.$L)("@"), $L147 = (0, import_lib2.$L)("@@"), $L148 = (0, import_lib2.$L)("async"), $L149 = (0, import_lib2.$L)("await"), $L150 = (0, import_lib2.$L)("`"), $L151 = (0, import_lib2.$L)("by"), $L152 = (0, import_lib2.$L)("case"), $L153 = (0, import_lib2.$L)("catch"), $L154 = (0, import_lib2.$L)("class"), $L155 = (0, import_lib2.$L)("#{"), $L156 = (0, import_lib2.$L)("comptime"), $L157 = (0, import_lib2.$L)("declare"), $L158 = (0, import_lib2.$L)("default"), $L159 = (0, import_lib2.$L)("delete"), $L160 = (0, import_lib2.$L)("do"), $L161 = (0, import_lib2.$L)(".."), $L162 = (0, import_lib2.$L)("\u2025"), $L163 = (0, import_lib2.$L)("..."), $L164 = (0, import_lib2.$L)("\u2026"), $L165 = (0, import_lib2.$L)("::"), $L166 = (0, import_lib2.$L)('"'), $L167 = (0, import_lib2.$L)("each"), $L168 = (0, import_lib2.$L)("else"), $L169 = (0, import_lib2.$L)("!"), $L170 = (0, import_lib2.$L)("export"), $L171 = (0, import_lib2.$L)("extends"), $L172 = (0, import_lib2.$L)("finally"), $L173 = (0, import_lib2.$L)("for"), $L174 = (0, import_lib2.$L)("from"), $L175 = (0, import_lib2.$L)("function"), $L176 = (0, import_lib2.$L)("get"), $L177 = (0, import_lib2.$L)("set"), $L178 = (0, import_lib2.$L)("#"), $L179 = (0, import_lib2.$L)("if"), $L180 = (0, import_lib2.$L)("in"), $L181 = (0, import_lib2.$L)("infer"), $L182 = (0, import_lib2.$L)("let"), $L183 = (0, import_lib2.$L)("const"), $L184 = (0, import_lib2.$L)("is"), $L185 = (0, import_lib2.$L)("var"), $L186 = (0, import_lib2.$L)("like"), $L187 = (0, import_lib2.$L)("loop"), $L188 = (0, import_lib2.$L)("new"), $L189 = (0, import_lib2.$L)("not"), $L190 = (0, import_lib2.$L)("of"), $L191 = (0, import_lib2.$L)("["), $L192 = (0, import_lib2.$L)("operator"), $L193 = (0, import_lib2.$L)("override"), $L194 = (0, import_lib2.$L)("own"), $L195 = (0, import_lib2.$L)("public"), $L196 = (0, import_lib2.$L)("private"), $L197 = (0, import_lib2.$L)("protected"), $L198 = (0, import_lib2.$L)("||>"), $L199 = (0, import_lib2.$L)("|\u25B7"), $L200 = (0, import_lib2.$L)("|>="), $L201 = (0, import_lib2.$L)("\u25B7="), $L202 = (0, import_lib2.$L)("|>"), $L203 = (0, import_lib2.$L)("\u25B7"), $L204 = (0, import_lib2.$L)("readonly"), $L205 = (0, import_lib2.$L)("return"), $L206 = (0, import_lib2.$L)("satisfies"), $L207 = (0, import_lib2.$L)("'"), $L208 = (0, import_lib2.$L)("static"), $L209 = (0, import_lib2.$L)("${"), $L210 = (0, import_lib2.$L)("super"), $L211 = (0, import_lib2.$L)("switch"), $L212 = (0, import_lib2.$L)("target"), $L213 = (0, import_lib2.$L)("then"), $L214 = (0, import_lib2.$L)("this"), $L215 = (0, import_lib2.$L)("throw"), $L216 = (0, import_lib2.$L)('"""'), $L217 = (0, import_lib2.$L)("'''"), $L218 = (0, import_lib2.$L)("///"), $L219 = (0, import_lib2.$L)("```"), $L220 = (0, import_lib2.$L)("try"), $L221 = (0, import_lib2.$L)("typeof"), $L222 = (0, import_lib2.$L)("undefined"), $L223 = (0, import_lib2.$L)("unless"), $L224 = (0, import_lib2.$L)("until"), $L225 = (0, import_lib2.$L)("using"), $L226 = (0, import_lib2.$L)("void"), $L227 = (0, import_lib2.$L)("when"), $L228 = (0, import_lib2.$L)("while"), $L229 = (0, import_lib2.$L)("yield"), $L230 = (0, import_lib2.$L)("/>"), $L231 = (0, import_lib2.$L)("</"), $L232 = (0, import_lib2.$L)("<>"), $L233 = (0, import_lib2.$L)("</>"), $L234 = (0, import_lib2.$L)("<!--"), $L235 = (0, import_lib2.$L)("-->"), $L236 = (0, import_lib2.$L)("type"), $L237 = (0, import_lib2.$L)("enum"), $L238 = (0, import_lib2.$L)("interface"), $L239 = (0, import_lib2.$L)("global"), $L240 = (0, import_lib2.$L)("module"), $L241 = (0, import_lib2.$L)("namespace"), $L242 = (0, import_lib2.$L)("asserts"), $L243 = (0, import_lib2.$L)("keyof"), $L244 = (0, import_lib2.$L)("???"), $L245 = (0, import_lib2.$L)("unique"), $L246 = (0, import_lib2.$L)("symbol"), $L247 = (0, import_lib2.$L)("[]"), $L248 = (0, import_lib2.$L)("civet"), $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy")), $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy")), $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R3 = (0, import_lib2.$R)(new RegExp("[0-9]", "suy")), $R4 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Start}|[_$0-9(\\[{])", "suy")), $R5 = (0, import_lib2.$R)(new RegExp("[ \\t]", "suy")), $R6 = (0, import_lib2.$R)(new RegExp("\\p{ID_Continue}|[\\u200C\\u200D$.#{=]", "suy")), $R7 = (0, import_lib2.$R)(new RegExp("[&=]", "suy")), $R8 = (0, import_lib2.$R)(new RegExp("(?=['\"`])", "suy")), $R9 = (0, import_lib2.$R)(new RegExp("(?=[\\/?])", "suy")), $R10 = (0, import_lib2.$R)(new RegExp("(?=[\\/\\[{?.!@#'\u2019:])", "suy")), $R11 = (0, import_lib2.$R)(new RegExp("%%?", "suy")), $R12 = (0, import_lib2.$R)(new RegExp("[.\\s]", "suy")), $R13 = (0, import_lib2.$R)(new RegExp("[)\\]}]", "suy")), $R14 = (0, import_lib2.$R)(new RegExp("[+-]", "suy")), $R15 = (0, import_lib2.$R)(new RegExp("\\+\\+|--|\u29FA|\u2014|[\\+\\-&]\\S", "suy")), $R16 = (0, import_lib2.$R)(new RegExp(`(?=[0-9.'"tfyno])`, "suy")), $R17 = (0, import_lib2.$R)(new RegExp("(?=true|false|yes|no|on|off)", "suy")), $R18 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$])", "suy")), $R19 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R20 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022\\/])", "suy")), $R21 = (0, import_lib2.$R)(new RegExp("([<>])(=?)|([\u2264\u2265])", "suy")), $R22 = (0, import_lib2.$R)(new RegExp("[ \\t]*", "suy")), $R23 = (0, import_lib2.$R)(new RegExp("[ \\t]+", "suy")), $R24 = (0, import_lib2.$R)(new RegExp("[!+-]?", "suy")), $R25 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R26 = (0, import_lib2.$R)(new RegExp("[=>]", "suy")), $R27 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])", "suy")), $R28 = (0, import_lib2.$R)(new RegExp("!\\^\\^?", "suy")), $R29 = (0, import_lib2.$R)(new RegExp("(?!\\+\\+|--)[!~+-](?!\\s)", "suy")), $R30 = (0, import_lib2.$R)(new RegExp("[:.]", "suy")), $R31 = (0, import_lib2.$R)(new RegExp("(?=for|if|loop|unless|until|while)", "suy")), $R32 = (0, import_lib2.$R)(new RegExp("(?:loop|while|until|for|do)(?!\\p{ID_Continue})", "suy")), $R33 = (0, import_lib2.$R)(new RegExp("(?=loop|comptime|do|for|until|while)", "suy")), $R34 = (0, import_lib2.$R)(new RegExp('[^;"\\s=>]+', "suy")), $R35 = (0, import_lib2.$R)(new RegExp("(?=[0-9.])", "suy")), $R36 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy")), $R37 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy")), $R38 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?", "suy")), $R39 = (0, import_lib2.$R)(new RegExp("(?:\\.[0-9](?:_[0-9]|[0-9])*)", "suy")), $R40 = (0, import_lib2.$R)(new RegExp("(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)", "suy")), $R41 = (0, import_lib2.$R)(new RegExp("0[bB][01](?:[01]|_[01])*n?", "suy")), $R42 = (0, import_lib2.$R)(new RegExp("0[oO][0-7](?:[0-7]|_[0-7])*n?", "suy")), $R43 = (0, import_lib2.$R)(new RegExp("0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?", "suy")), $R44 = (0, import_lib2.$R)(new RegExp("(?=[0-9])", "suy")), $R45 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)", "suy")), $R46 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"])*', "suy")), $R47 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'])*", "suy")), $R48 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+', "suy")), $R49 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|\\\\.|[^"])+', "suy")), $R50 = (0, import_lib2.$R)(new RegExp("(?:'(?!'')|\\\\.|[^'])*", "suy")), $R51 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|#(?!\\{)|[^"#])+', "suy")), $R52 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^\\]])*", "suy")), $R53 = (0, import_lib2.$R)(new RegExp("(?:\\\\.)", "suy")), $R54 = (0, import_lib2.$R)(new RegExp("[\\s]+", "suy")), $R55 = (0, import_lib2.$R)(new RegExp("\\/(?!\\/\\/)", "suy")), $R56 = (0, import_lib2.$R)(new RegExp("[^[\\/\\s#$\\\\]+|[#$]", "suy")), $R57 = (0, import_lib2.$R)(new RegExp("[*\\/\\r\\n]", "suy")), $R58 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^[\\/\\r\\n])+", "suy")), $R59 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R60 = (0, import_lib2.$R)(new RegExp("(?=[`'\"])", "suy")), $R61 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|\\\\.|[^$`])+", "suy")), $R62 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+", "suy")), $R63 = (0, import_lib2.$R)(new RegExp("(?:on|off|yes|no)(?!\\p{ID_Continue})", "suy")), $R64 = (0, import_lib2.$R)(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy")), $R65 = (0, import_lib2.$R)(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy")), $R66 = (0, import_lib2.$R)(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy")), $R67 = (0, import_lib2.$R)(new RegExp("(?:and|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|not|null|or|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy")), $R68 = (0, import_lib2.$R)(new RegExp("(?=\\/|#)", "suy")), $R69 = (0, import_lib2.$R)(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy")), $R70 = (0, import_lib2.$R)(new RegExp(".", "suy")), $R71 = (0, import_lib2.$R)(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy")), $R72 = (0, import_lib2.$R)(new RegExp("[^]*?###", "suy")), $R73 = (0, import_lib2.$R)(new RegExp("###(?!#)", "suy")), $R74 = (0, import_lib2.$R)(new RegExp("\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\/", "suy")), $R75 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\/\\\\#])", "suy")), $R76 = (0, import_lib2.$R)(new RegExp("(?=\\s|\\/|#)", "suy")), $R77 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Continue})", "suy")), $R78 = (0, import_lib2.$R)(new RegExp("[=:]", "suy")), $R79 = (0, import_lib2.$R)(new RegExp("['\u2019]s", "suy")), $R80 = (0, import_lib2.$R)(new RegExp("\\s", "suy")), $R81 = (0, import_lib2.$R)(new RegExp("(?=[<])", "suy")), $R82 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R83 = (0, import_lib2.$R)(new RegExp("[!+-]", "suy")), $R84 = (0, import_lib2.$R)(new RegExp("[\\s>]|\\/>", "suy")), $R85 = (0, import_lib2.$R)(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy")), $R86 = (0, import_lib2.$R)(new RegExp(`"[^"]*"|'[^']*'`, "suy")), $R87 = (0, import_lib2.$R)(new RegExp("[<>]", "suy")), $R88 = (0, import_lib2.$R)(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy")), $R89 = (0, import_lib2.$R)(new RegExp("(?:-[^-]|[^-]*)*", "suy")), $R90 = (0, import_lib2.$R)(new RegExp("[^{}<>\\r\\n]+", "suy")), $R91 = (0, import_lib2.$R)(new RegExp("[+-]?", "suy")), $R92 = (0, import_lib2.$R)(new RegExp("(?=if|unless)", "suy")), $R93 = (0, import_lib2.$R)(new RegExp("[|&<!=\\-\u21D2\u2192]", "suy")), $R94 = (0, import_lib2.$R)(new RegExp("(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R95 = (0, import_lib2.$R)(new RegExp("const|in|out", "suy")), $R96 = (0, import_lib2.$R)(new RegExp("#![^\\r\\n]*", "suy")), $R97 = (0, import_lib2.$R)(new RegExp("[\\t ]*", "suy")), $R98 = (0, import_lib2.$R)(new RegExp("[\\s]*", "suy")), $R99 = (0, import_lib2.$R)(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?", "suy")), $R100 = (0, import_lib2.$R)(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy")), $R101 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy")), $R102 = (0, import_lib2.$R)(new RegExp("\\r\\n|\\n|\\r|$", "suy")), $R103 = (0, import_lib2.$R)(new RegExp("[^]*", "suy")), Program$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Reset, Init, (0, import_lib2.$E)(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7519
7596
  var reset = $1, init = $2, ws1 = $3, statements = $4, ws2 = $5;
7520
7597
  let program = {
7521
7598
  type: "BlockStatement",
@@ -7689,7 +7766,7 @@ ${js}`
7689
7766
  function ImplicitArguments(ctx, state2) {
7690
7767
  return (0, import_lib2.$EVENT)(ctx, state2, "ImplicitArguments", ImplicitArguments$0);
7691
7768
  }
7692
- var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$S)(ArgumentList, (0, import_lib2.$E)((0, import_lib2.$S)(__, Comma)))), __, RestoreAll, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
7769
+ var ExplicitArguments$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$S)(PostfixedArgumentList, (0, import_lib2.$E)((0, import_lib2.$S)(__, Comma)))), __, RestoreAll, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
7693
7770
  var open = $1, args = $3, ws = $4, close = $6;
7694
7771
  return args ? args[1] ? args = [...args[0], args[1]] : args = args[0] : args = [], {
7695
7772
  type: "Call",
@@ -7788,6 +7865,31 @@ ${js}`
7788
7865
  function ArgumentList(ctx, state2) {
7789
7866
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ArgumentList", ArgumentList$$);
7790
7867
  }
7868
+ var PostfixedArgumentList$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(EOS), PostfixedArgumentPart, (0, import_lib2.$Q)((0, import_lib2.$S)(CommaDelimiter, (0, import_lib2.$N)(EOS), (0, import_lib2.$E)(_), PostfixedArgumentPart)), (0, import_lib2.$S)(CommaDelimiter, NestedArguments), (0, import_lib2.$Q)((0, import_lib2.$S)(OptionalCommaDelimiter, NestedArguments))), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7869
+ return [
7870
+ $2,
7871
+ ...$3.flatMap(([comma, eos, ws, arg]) => [comma, prepend(ws, arg)]),
7872
+ ...Array.isArray($4[1]) ? [$4[0], ...$4[1]] : $4,
7873
+ ...$5.flatMap(
7874
+ ([comma, args]) => Array.isArray(args) ? [comma, ...args] : [comma, args]
7875
+ )
7876
+ ];
7877
+ }), PostfixedArgumentList$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(NestedArguments, (0, import_lib2.$Q)((0, import_lib2.$S)(OptionalCommaDelimiter, NestedArguments))), function($skip, $loc, $0, $1, $2) {
7878
+ return Array.isArray($1) || ($1 = [$1]), [
7879
+ ...trimFirstSpace($1),
7880
+ ...$2.flatMap(
7881
+ ([comma, args]) => Array.isArray(args) ? [comma, ...args] : [comma, args]
7882
+ )
7883
+ ];
7884
+ }), PostfixedArgumentList$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixedArgumentPart, (0, import_lib2.$Q)((0, import_lib2.$S)(CommaDelimiter, (0, import_lib2.$E)(_), PostfixedArgumentPart))), function($skip, $loc, $0, $1, $2, $3) {
7885
+ return [
7886
+ prepend($1, $2),
7887
+ ...$3.flatMap(([comma, ws, arg]) => [comma, prepend(ws, arg)])
7888
+ ];
7889
+ }), PostfixedArgumentList$$ = [PostfixedArgumentList$0, PostfixedArgumentList$1, PostfixedArgumentList$2];
7890
+ function PostfixedArgumentList(ctx, state2) {
7891
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "PostfixedArgumentList", PostfixedArgumentList$$);
7892
+ }
7791
7893
  var NestedArguments$0 = NestedBulletedArray, NestedArguments$1 = NestedImplicitObjectLiteral, NestedArguments$2 = NestedArgumentList, NestedArguments$$ = [NestedArguments$0, NestedArguments$1, NestedArguments$2];
7792
7894
  function NestedArguments(ctx, state2) {
7793
7895
  return (0, import_lib2.$EVENT_C)(ctx, state2, "NestedArguments", NestedArguments$$);
@@ -7799,7 +7901,7 @@ ${js}`
7799
7901
  function NestedArgumentList(ctx, state2) {
7800
7902
  return (0, import_lib2.$EVENT)(ctx, state2, "NestedArgumentList", NestedArgumentList$0);
7801
7903
  }
7802
- var NestedArgument$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedImplicitPropertyDefinition), Nested, (0, import_lib2.$N)(Bullet), SingleLineArgumentExpressions, ParameterElementDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7904
+ var NestedArgument$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedImplicitPropertyDefinition), Nested, (0, import_lib2.$N)(Bullet), SingleLinePostfixedArgumentExpressions, ParameterElementDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7803
7905
  var indent = $2, args = $4, comma = $5;
7804
7906
  let [arg0, ...rest] = args;
7805
7907
  return arg0 = prepend(indent, arg0), [arg0, ...rest, comma];
@@ -7819,6 +7921,18 @@ ${js}`
7819
7921
  function WArgumentPart(ctx, state2) {
7820
7922
  return (0, import_lib2.$EVENT)(ctx, state2, "WArgumentPart", WArgumentPart$0);
7821
7923
  }
7924
+ var SingleLinePostfixedArgumentExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(WPostfixedArgumentPart, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$S)((0, import_lib2.$E)(_), Comma), WPostfixedArgumentPart))), function($skip, $loc, $0, $1, $2) {
7925
+ return [$1, ...$2.flat()];
7926
+ });
7927
+ function SingleLinePostfixedArgumentExpressions(ctx, state2) {
7928
+ return (0, import_lib2.$EVENT)(ctx, state2, "SingleLinePostfixedArgumentExpressions", SingleLinePostfixedArgumentExpressions$0);
7929
+ }
7930
+ var WPostfixedArgumentPart$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixedArgumentPart), function($skip, $loc, $0, $1, $2) {
7931
+ return prepend($1, $2);
7932
+ });
7933
+ function WPostfixedArgumentPart(ctx, state2) {
7934
+ return (0, import_lib2.$EVENT)(ctx, state2, "WPostfixedArgumentPart", WPostfixedArgumentPart$0);
7935
+ }
7822
7936
  var ArgumentPart$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(DotDotDot, Expression), function($skip, $loc, $0, $1, $2) {
7823
7937
  var spread = $1, expression = $2;
7824
7938
  return {
@@ -7839,6 +7953,26 @@ ${js}`
7839
7953
  function ArgumentPart(ctx, state2) {
7840
7954
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ArgumentPart", ArgumentPart$$);
7841
7955
  }
7956
+ var PostfixedArgumentPart$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(DotDotDot, PostfixedExpression), function($skip, $loc, $0, $1, $2) {
7957
+ var spread = $1, expression = $2;
7958
+ return {
7959
+ type: "Argument",
7960
+ children: $0,
7961
+ expression,
7962
+ spread
7963
+ };
7964
+ }), PostfixedArgumentPart$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PostfixedExpression, (0, import_lib2.$E)(DotDotDot)), function($skip, $loc, $0, $1, $2) {
7965
+ var expression = $1, spread = $2;
7966
+ return {
7967
+ type: "Argument",
7968
+ children: spread ? [spread, expression] : [expression],
7969
+ expression,
7970
+ spread
7971
+ };
7972
+ }), PostfixedArgumentPart$$ = [PostfixedArgumentPart$0, PostfixedArgumentPart$1];
7973
+ function PostfixedArgumentPart(ctx, state2) {
7974
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "PostfixedArgumentPart", PostfixedArgumentPart$$);
7975
+ }
7842
7976
  var BinaryOpExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(UnaryExpression, (0, import_lib2.$Q)(BinaryOpRHS)), function($skip, $loc, $0, $1, $2) {
7843
7977
  return $2.length ? processBinaryOpExpression($0) : $1;
7844
7978
  });
@@ -7861,9 +7995,10 @@ ${js}`
7861
7995
  return [[], op, [], rhs];
7862
7996
  }), BinaryOpRHS$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(NewlineBinaryOpAllowed, NotDedentedBinaryOp, WRHS), function($skip, $loc, $0, $1, $2, $3) {
7863
7997
  var op = $2, rhs = $3;
7864
- return [...op, ...rhs];
7865
- }), BinaryOpRHS$3 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$N)(NewlineBinaryOpAllowed), SingleLineBinaryOpRHS), function(value) {
7866
- return value[1];
7998
+ return op[1].token === ">" && op[0].length === 0 ? $skip : [...op, ...rhs];
7999
+ }), BinaryOpRHS$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NewlineBinaryOpAllowed), SingleLineBinaryOpRHS), function($skip, $loc, $0, $1, $2) {
8000
+ let [ws1, op] = $2;
8001
+ return op.token === ">" && !ws1.length ? $skip : $2;
7867
8002
  }), BinaryOpRHS$$ = [BinaryOpRHS$0, BinaryOpRHS$1, BinaryOpRHS$2, BinaryOpRHS$3];
7868
8003
  function BinaryOpRHS(ctx, state2) {
7869
8004
  return (0, import_lib2.$EVENT_C)(ctx, state2, "BinaryOpRHS", BinaryOpRHS$$);
@@ -8002,6 +8137,10 @@ ${js}`
8002
8137
  function UpdateExpression(ctx, state2) {
8003
8138
  return (0, import_lib2.$EVENT_C)(ctx, state2, "UpdateExpression", UpdateExpression$$);
8004
8139
  }
8140
+ var UpdateExpressionPattern$0 = NamedBindingPattern, UpdateExpressionPattern$1 = UpdateExpression, UpdateExpressionPattern$$ = [UpdateExpressionPattern$0, UpdateExpressionPattern$1];
8141
+ function UpdateExpressionPattern(ctx, state2) {
8142
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "UpdateExpressionPattern", UpdateExpressionPattern$$);
8143
+ }
8005
8144
  var UpdateExpressionSymbol$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L9, 'UpdateExpressionSymbol "++"'), (0, import_lib2.$EXPECT)($L10, 'UpdateExpressionSymbol "--"')), function($skip, $loc, $0, $1) {
8006
8145
  return { $loc, token: $1 };
8007
8146
  }), UpdateExpressionSymbol$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L11, 'UpdateExpressionSymbol "\u29FA"'), function($skip, $loc, $0, $1) {
@@ -8045,7 +8184,7 @@ ${js}`
8045
8184
  function NonPipelineAssignmentExpressionTail(ctx, state2) {
8046
8185
  return (0, import_lib2.$EVENT_C)(ctx, state2, "NonPipelineAssignmentExpressionTail", NonPipelineAssignmentExpressionTail$$);
8047
8186
  }
8048
- var ActualAssignment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$P)((0, import_lib2.$S)(NotDedented, UpdateExpression, WAssignmentOp)), MaybeNestedExpression), function($skip, $loc, $0, $1, $2) {
8187
+ var ActualAssignment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$P)((0, import_lib2.$S)(NotDedented, UpdateExpressionPattern, WAssignmentOp)), MaybeNestedExpression), function($skip, $loc, $0, $1, $2) {
8049
8188
  return $1 = $1.map((x) => [x[0], x[1], ...x[2]]), $0 = [$1, $2], {
8050
8189
  type: "AssignmentExpression",
8051
8190
  children: $0,
@@ -8060,7 +8199,7 @@ ${js}`
8060
8199
  function ActualAssignment(ctx, state2) {
8061
8200
  return (0, import_lib2.$EVENT)(ctx, state2, "ActualAssignment", ActualAssignment$0);
8062
8201
  }
8063
- var NonPipelineActualAssignment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$P)((0, import_lib2.$S)(NotDedented, UpdateExpression, WAssignmentOp)), MaybeNestedNonPipelineExpression), function($skip, $loc, $0, $1, $2) {
8202
+ var NonPipelineActualAssignment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$P)((0, import_lib2.$S)(NotDedented, UpdateExpressionPattern, WAssignmentOp)), MaybeNestedNonPipelineExpression), function($skip, $loc, $0, $1, $2) {
8064
8203
  return $1 = $1.map((x) => [x[0], x[1], ...x[2]]), $0 = [$1, $2], {
8065
8204
  type: "AssignmentExpression",
8066
8205
  children: $0,
@@ -8208,7 +8347,11 @@ ${js}`
8208
8347
  ...first,
8209
8348
  ...rest.map(([nested, line]) => [nested, ...line]).flat()
8210
8349
  ] : $skip;
8211
- }), PipelineExpressionBody$1 = (0, import_lib2.$P)((0, import_lib2.$S)(NotDedented, Pipe, __, PipelineTailItem)), PipelineExpressionBody$$ = [PipelineExpressionBody$0, PipelineExpressionBody$1];
8350
+ }), PipelineExpressionBody$1 = (0, import_lib2.$T)((0, import_lib2.$S)(NewlineBinaryOpAllowed, (0, import_lib2.$P)((0, import_lib2.$S)(NotDedented, Pipe, __, PipelineTailItem))), function(value) {
8351
+ return value[1];
8352
+ }), PipelineExpressionBody$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NewlineBinaryOpAllowed), PipelineExpressionBodySameLine), function($skip, $loc, $0, $1, $2) {
8353
+ return $2.length ? $2 : $skip;
8354
+ }), PipelineExpressionBody$$ = [PipelineExpressionBody$0, PipelineExpressionBody$1, PipelineExpressionBody$2];
8212
8355
  function PipelineExpressionBody(ctx, state2) {
8213
8356
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PipelineExpressionBody", PipelineExpressionBody$$);
8214
8357
  }
@@ -8233,8 +8376,8 @@ ${js}`
8233
8376
  return makeAmpersandFunction({
8234
8377
  body: [" ", $1, ...$2]
8235
8378
  });
8236
- }), PipelineTailItem$4 = (0, import_lib2.$T)((0, import_lib2.$S)(PipelineHeadItem), function(value) {
8237
- return value[0];
8379
+ }), PipelineTailItem$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidNewlineBinaryOp, (0, import_lib2.$E)(PipelineHeadItem), RestoreNewlineBinaryOp), function($skip, $loc, $0, $1, $2, $3) {
8380
+ return $2 || $skip;
8238
8381
  }), PipelineTailItem$$ = [PipelineTailItem$0, PipelineTailItem$1, PipelineTailItem$2, PipelineTailItem$3, PipelineTailItem$4];
8239
8382
  function PipelineTailItem(ctx, state2) {
8240
8383
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PipelineTailItem", PipelineTailItem$$);
@@ -8579,7 +8722,7 @@ ${js}`
8579
8722
  children: [id, " = ", exp]
8580
8723
  };
8581
8724
  }
8582
- }), FieldDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertReadonly, ClassElementName, (0, import_lib2.$E)(TypeSuffix), __, ConstAssignment, MaybeNestedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8725
+ }), FieldDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertReadonly, ClassElementName, (0, import_lib2.$E)(TypeSuffix), __, ConstAssignment, MaybeNestedPostfixedCommaExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8583
8726
  var readonly = $1, id = $2, typeSuffix = $3, ca = $5;
8584
8727
  return readonly.children[0].$loc = {
8585
8728
  pos: ca.$loc.pos - 1,
@@ -8697,7 +8840,7 @@ ${js}`
8697
8840
  children: $0,
8698
8841
  expression
8699
8842
  };
8700
- }), LeftHandSideExpression$1 = NamedBindingPattern, LeftHandSideExpression$2 = CallExpression, LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression$1, LeftHandSideExpression$2];
8843
+ }), LeftHandSideExpression$1 = CallExpression, LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression$1];
8701
8844
  function LeftHandSideExpression(ctx, state2) {
8702
8845
  return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
8703
8846
  }
@@ -9769,10 +9912,14 @@ ${js}`
9769
9912
  function OperatorAssociativity(ctx, state2) {
9770
9913
  return (0, import_lib2.$EVENT)(ctx, state2, "OperatorAssociativity", OperatorAssociativity$0);
9771
9914
  }
9772
- var ThinArrowFunction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Async, _)), ArrowParameters, (0, import_lib2.$E)(ReturnTypeSuffix), (0, import_lib2.$E)(_), Arrow, (0, import_lib2.$C)(BracedObjectSingleLineStatements, NoCommaBracedOrEmptyBlock)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
9773
- var async = $1, parameters = $2, returnType = $3, arrow = $5, block = $6;
9915
+ var ThinArrowFunction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Async, _)), ArrowParameters, (0, import_lib2.$E)(ReturnTypeSuffix), (0, import_lib2.$E)(_), ThinArrow, (0, import_lib2.$C)(BracedObjectSingleLineStatements, NoCommaBracedOrEmptyBlock)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
9916
+ var async = $1, parameters = $2, returnType = $3, ws = $4, arrow = $5, block = $6;
9774
9917
  async || (async = []);
9775
9918
  let generator = [];
9919
+ if ((!parameters.implicit || returnType || ws) && !block.bare) {
9920
+ let [first, ...rest] = block.children;
9921
+ (first === " {" || first?.[0]?.token === " ") && (block = { ...block, children: [first.slice(1), ...rest] });
9922
+ }
9776
9923
  return {
9777
9924
  type: "FunctionExpression",
9778
9925
  id: void 0,
@@ -9797,6 +9944,7 @@ ${js}`
9797
9944
  generator,
9798
9945
  parameters,
9799
9946
  returnType,
9947
+ ws,
9800
9948
  block
9801
9949
  ]
9802
9950
  };
@@ -9804,11 +9952,11 @@ ${js}`
9804
9952
  function ThinArrowFunction(ctx, state2) {
9805
9953
  return (0, import_lib2.$EVENT)(ctx, state2, "ThinArrowFunction", ThinArrowFunction$0);
9806
9954
  }
9807
- var Arrow$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L35, 'Arrow "->"'), (0, import_lib2.$EXPECT)($L36, 'Arrow "\u2192"')), function($skip, $loc, $0, $1) {
9955
+ var ThinArrow$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($L35, 'ThinArrow "->"'), (0, import_lib2.$EXPECT)($L36, 'ThinArrow "\u2192"')), function($skip, $loc, $0, $1) {
9808
9956
  return { $loc, token: "->" };
9809
9957
  });
9810
- function Arrow(ctx, state2) {
9811
- return (0, import_lib2.$EVENT)(ctx, state2, "Arrow", Arrow$0);
9958
+ function ThinArrow(ctx, state2) {
9959
+ return (0, import_lib2.$EVENT)(ctx, state2, "ThinArrow", ThinArrow$0);
9812
9960
  }
9813
9961
  var ExplicitBlock$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), OpenBrace, AllowAll, (0, import_lib2.$E)((0, import_lib2.$C)(NestedBlockStatements, SingleLineStatements, EmptyBracedContent)), RestoreAll, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
9814
9962
  var ws1 = $1, open = $2, block = $4, ws2 = $6, close = $7;
@@ -11425,19 +11573,25 @@ ${js}`
11425
11573
  function PostfixedNoCommaStatement(ctx, state2) {
11426
11574
  return (0, import_lib2.$EVENT)(ctx, state2, "PostfixedNoCommaStatement", PostfixedNoCommaStatement$0);
11427
11575
  }
11428
- var PostfixedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Expression, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement))), function($skip, $loc, $0, $1, $2) {
11576
+ var PostfixedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(AssignmentExpressionSpread, (0, import_lib2.$E)(_), (0, import_lib2.$N)(IfClause), PostfixStatement), function($skip, $loc, $0, $1, $2, $3, $4) {
11577
+ var expression = $1, ws = $2, post = $4;
11578
+ return attachPostfixStatementAsExpression(expression, [ws, post]);
11579
+ }), PostfixedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Expression, (0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement)), function($skip, $loc, $0, $1, $2) {
11429
11580
  var expression = $1, post = $2;
11430
- return post ? attachPostfixStatementAsExpression(expression, post) : expression;
11431
- });
11581
+ return attachPostfixStatementAsExpression(expression, post);
11582
+ }), PostfixedExpression$2 = Expression, PostfixedExpression$$ = [PostfixedExpression$0, PostfixedExpression$1, PostfixedExpression$2];
11432
11583
  function PostfixedExpression(ctx, state2) {
11433
- return (0, import_lib2.$EVENT)(ctx, state2, "PostfixedExpression", PostfixedExpression$0);
11584
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "PostfixedExpression", PostfixedExpression$$);
11434
11585
  }
11435
- var PostfixedCommaExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PostfixedExpression, (0, import_lib2.$C)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement), (0, import_lib2.$Q)((0, import_lib2.$S)(CommaDelimiter, AssignmentExpression)))), function($skip, $loc, $0, $1, $2) {
11586
+ var PostfixedCommaExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CommaExpressionSpread, (0, import_lib2.$E)(_), (0, import_lib2.$N)(IfClause), PostfixStatement), function($skip, $loc, $0, $1, $2, $3, $4) {
11587
+ var expression = $1, ws = $2, post = $4;
11588
+ return attachPostfixStatementAsExpression(expression, [ws, post]);
11589
+ }), PostfixedCommaExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Expression, (0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement)), function($skip, $loc, $0, $1, $2) {
11436
11590
  var expression = $1, post = $2;
11437
- return post.length ? post.length === 2 && !Array.isArray(post[1]) ? attachPostfixStatementAsExpression(expression, post) : $0 : $1;
11438
- });
11591
+ return attachPostfixStatementAsExpression(expression, post);
11592
+ }), PostfixedCommaExpression$2 = CommaExpression, PostfixedCommaExpression$$ = [PostfixedCommaExpression$0, PostfixedCommaExpression$1, PostfixedCommaExpression$2];
11439
11593
  function PostfixedCommaExpression(ctx, state2) {
11440
- return (0, import_lib2.$EVENT)(ctx, state2, "PostfixedCommaExpression", PostfixedCommaExpression$0);
11594
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "PostfixedCommaExpression", PostfixedCommaExpression$$);
11441
11595
  }
11442
11596
  var PostfixStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R31, "PostfixStatement /(?=for|if|loop|unless|until|while)/"), _PostfixStatement), function(value) {
11443
11597
  return value[1];
@@ -12588,6 +12742,16 @@ ${js}`
12588
12742
  function MaybeNestedPostfixedExpression(ctx, state2) {
12589
12743
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedPostfixedExpression", MaybeNestedPostfixedExpression$$);
12590
12744
  }
12745
+ var MaybeNestedPostfixedCommaExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedCommaExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12746
+ var expression = $4, trailing = $6;
12747
+ return expression ? trailing ? [expression, trailing] : expression : $skip;
12748
+ }), MaybeNestedPostfixedCommaExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidImplicitFragment, (0, import_lib2.$E)(PostfixedCommaExpression), RestoreImplicitFragment), function($skip, $loc, $0, $1, $2, $3) {
12749
+ var expression = $2;
12750
+ return expression || $skip;
12751
+ }), MaybeNestedPostfixedCommaExpression$$ = [MaybeNestedPostfixedCommaExpression$0, MaybeNestedPostfixedCommaExpression$1];
12752
+ function MaybeNestedPostfixedCommaExpression(ctx, state2) {
12753
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedPostfixedCommaExpression", MaybeNestedPostfixedCommaExpression$$);
12754
+ }
12591
12755
  var NestedPostfixedExpressionNoTrailing$0 = NestedBulletedArray, NestedPostfixedExpressionNoTrailing$1 = NestedImplicitObjectLiteral, NestedPostfixedExpressionNoTrailing$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
12592
12756
  var expression = $2;
12593
12757
  return expression || $skip;
@@ -12927,7 +13091,7 @@ ${js}`
12927
13091
  children: [...$0.slice(0, -2), id]
12928
13092
  }
12929
13093
  ];
12930
- }), ExportDeclaration$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(Decorators), Export, __, Default, __, (0, import_lib2.$C)(HoistableDeclaration, ClassDeclaration, InterfaceDeclaration, MaybeNestedExpression)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
13094
+ }), ExportDeclaration$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(Decorators), Export, __, Default, __, (0, import_lib2.$C)(HoistableDeclaration, ClassDeclaration, InterfaceDeclaration, MaybeNestedPostfixedExpression)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12931
13095
  var declaration = $6;
12932
13096
  return { type: "ExportDeclaration", declaration, ts: declaration.ts, children: $0 };
12933
13097
  }), ExportDeclaration$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(Export, __, ExportFromClause, __, FromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
@@ -13017,7 +13181,7 @@ ${js}`
13017
13181
  splices: bindings.flatMap((b) => b.splices),
13018
13182
  thisAssignments: bindings.flatMap((b) => b.thisAssignments)
13019
13183
  };
13020
- }), LexicalDeclaration$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, (0, import_lib2.$C)(BindingPattern, BindingIdentifier), (0, import_lib2.$E)(TypeSuffix), __, (0, import_lib2.$C)(ConstAssignment, LetAssignment), MaybeNestedPostfixedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
13184
+ }), LexicalDeclaration$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, (0, import_lib2.$C)(BindingPattern, BindingIdentifier), (0, import_lib2.$E)(TypeSuffix), __, (0, import_lib2.$C)(ConstAssignment, LetAssignment), MaybeNestedPostfixedCommaExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
13021
13185
  var loc = $1, assign = $5;
13022
13186
  return processAssignmentDeclaration(
13023
13187
  { $loc: loc, token: assign.decl },
@@ -13074,7 +13238,7 @@ ${js}`
13074
13238
  function LexicalBinding(ctx, state2) {
13075
13239
  return (0, import_lib2.$EVENT_C)(ctx, state2, "LexicalBinding", LexicalBinding$$);
13076
13240
  }
13077
- var Initializer$0 = (0, import_lib2.$T)((0, import_lib2.$S)(__, Equals, MaybeNestedExpression), function(value) {
13241
+ var Initializer$0 = (0, import_lib2.$T)((0, import_lib2.$S)(__, Equals, MaybeNestedPostfixedExpression), function(value) {
13078
13242
  var expression = value[2];
13079
13243
  return { type: "Initializer", expression, children: value };
13080
13244
  });
@@ -13439,9 +13603,9 @@ ${js}`
13439
13603
  }
13440
13604
  var InlineComment$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R74, "InlineComment /\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\//"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13441
13605
  return { $loc, token: $0 };
13442
- });
13606
+ }), InlineComment$1 = CoffeeMultiLineComment, InlineComment$$ = [InlineComment$0, InlineComment$1];
13443
13607
  function InlineComment(ctx, state2) {
13444
- return (0, import_lib2.$EVENT)(ctx, state2, "InlineComment", InlineComment$0);
13608
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "InlineComment", InlineComment$$);
13445
13609
  }
13446
13610
  var RestOfLine$0 = (0, import_lib2.$S)((0, import_lib2.$Q)((0, import_lib2.$C)(NonNewlineWhitespace, Comment)), EOL);
13447
13611
  function RestOfLine(ctx, state2) {
@@ -13451,7 +13615,7 @@ ${js}`
13451
13615
  function TrailingComment(ctx, state2) {
13452
13616
  return (0, import_lib2.$EVENT)(ctx, state2, "TrailingComment", TrailingComment$0);
13453
13617
  }
13454
- var _$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R75, "_ /(?=[ \\t\\/\\\\])/"), (0, import_lib2.$P)((0, import_lib2.$C)(NonNewlineWhitespace, InlineComment))), function(value) {
13618
+ var _$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R75, "_ /(?=[ \\t\\/\\\\#])/"), (0, import_lib2.$P)((0, import_lib2.$C)(NonNewlineWhitespace, InlineComment))), function(value) {
13455
13619
  return value[1];
13456
13620
  });
13457
13621
  function _(ctx, state2) {
@@ -16707,11 +16871,15 @@ ${counts}`;
16707
16871
  if (options.sourceMap || options.inlineMap) {
16708
16872
  options.sourceMap = new SourceMap2(src);
16709
16873
  let code = generate_civet_default(ast2, options);
16710
- return checkErrors(), options.inlineMap ? `${code}
16711
- ${options.sourceMap.comment(filename2, filename2 + ".tsx")}` : {
16712
- code,
16713
- sourceMap: options.sourceMap
16714
- };
16874
+ if (checkErrors(), options.inlineMap) {
16875
+ let outputFilename = options.outputFilename ?? (options.js ? filename2 + ".jsx" : filename2 + ".tsx");
16876
+ return `${code}
16877
+ ${options.sourceMap.comment(filename2, outputFilename)}`;
16878
+ } else
16879
+ return {
16880
+ code,
16881
+ sourceMap: options.sourceMap
16882
+ };
16715
16883
  }
16716
16884
  let result = generate_civet_default(ast2, options);
16717
16885
  return options.errors?.length && (delete options.errors, options.sourceMap = new SourceMap2(src), generate_civet_default(ast2, options), checkErrors()), result;