@danielx/civet 0.11.0 → 0.11.2

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"]
@@ -2449,16 +2494,21 @@ ${js}`
2449
2494
  function assignResults(node, collect) {
2450
2495
  if (!node) return;
2451
2496
  switch (node.type) {
2452
- case "BlockStatement":
2497
+ case "BlockStatement": {
2453
2498
  if (node.expressions.length) {
2454
2499
  let ref5;
2455
2500
  assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
2456
2501
  } else
2457
- node.expressions.push(["", collect("void 0"), ";"]);
2502
+ node.expressions.push(["", collect("void 0"), ";"]), updateParentPointers(node);
2458
2503
  return;
2459
- case "CaseBlock":
2460
- node.clauses.forEach((clause) => assignResults(clause, collect));
2504
+ }
2505
+ case "CaseBlock": {
2506
+ for (let ref6 = node.clauses, i4 = 0, len3 = ref6.length; i4 < len3; i4++) {
2507
+ let clause = ref6[i4];
2508
+ assignResults(clause, collect);
2509
+ }
2461
2510
  return;
2511
+ }
2462
2512
  case "WhenClause":
2463
2513
  case "DefaultClause":
2464
2514
  case "PatternClause": {
@@ -2474,7 +2524,7 @@ ${js}`
2474
2524
  exp = exp;
2475
2525
  let outer = exp;
2476
2526
  exp.type === "LabelledStatement" && (exp = exp.statement);
2477
- let ref6, m1;
2527
+ let ref7, ref8, m1;
2478
2528
  switch (exp.type) {
2479
2529
  case "BreakStatement":
2480
2530
  case "ContinueStatement":
@@ -2484,13 +2534,13 @@ ${js}`
2484
2534
  case "ThrowStatement":
2485
2535
  return;
2486
2536
  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;
2537
+ let ref9;
2538
+ exp.bindings?.length ? ref9 = patternAsValue((ref7 = exp.bindings)[ref7.length - 1].pattern) : ref9 = "void 0";
2539
+ let value = ref9;
2490
2540
  exp.children.push([
2491
2541
  "",
2492
2542
  [";", collect(value)]
2493
- ]);
2543
+ ]), updateParentPointers(exp);
2494
2544
  return;
2495
2545
  }
2496
2546
  case "FunctionExpression": {
@@ -2498,7 +2548,7 @@ ${js}`
2498
2548
  exp.children.push([
2499
2549
  "",
2500
2550
  [";", collect(exp.id)]
2501
- ]);
2551
+ ]), updateParentPointers(exp);
2502
2552
  return;
2503
2553
  }
2504
2554
  break;
@@ -2513,11 +2563,11 @@ ${js}`
2513
2563
  case "BlockStatement": {
2514
2564
  if (exp.expressions.some(isExit))
2515
2565
  return;
2516
- assignResults(exp.expressions[exp.expressions.length - 1], collect);
2566
+ assignResults((ref8 = exp.expressions)[ref8.length - 1], collect);
2517
2567
  return;
2518
2568
  }
2519
2569
  case "IfStatement": {
2520
- assignResults(exp.then, collect), exp.else ? assignResults(exp.else.block, collect) : (braceBlock(exp.then), exp.children.push([" else {", collect("void 0"), "}"]));
2570
+ assignResults(exp.then, collect), exp.else ? assignResults(exp.else.block, collect) : (braceBlock(exp.then), exp.children.push([" else {", collect("void 0"), "}"]), updateParentPointers(exp));
2521
2571
  return;
2522
2572
  }
2523
2573
  case "PatternMatchingStatement": {
@@ -2525,15 +2575,15 @@ ${js}`
2525
2575
  return;
2526
2576
  }
2527
2577
  case "SwitchStatement": {
2528
- for (let ref8 = exp.caseBlock.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
2529
- let clause = ref8[i4];
2578
+ for (let ref10 = exp.caseBlock.clauses, i5 = 0, len4 = ref10.length; i5 < len4; i5++) {
2579
+ let clause = ref10[i5];
2530
2580
  assignResults(clause, collect);
2531
2581
  }
2532
2582
  return;
2533
2583
  }
2534
2584
  case "TryStatement": {
2535
- for (let ref9 = exp.blocks, i5 = 0, len4 = ref9.length; i5 < len4; i5++) {
2536
- let block = ref9[i5];
2585
+ for (let ref11 = exp.blocks, i6 = 0, len5 = ref11.length; i6 < len5; i6++) {
2586
+ let block = ref11[i6];
2537
2587
  assignResults(block, collect);
2538
2588
  }
2539
2589
  return;
@@ -2543,13 +2593,16 @@ ${js}`
2543
2593
  return;
2544
2594
  let semi2 = exp.children.lastIndexOf(";");
2545
2595
  if (0 <= semi2 && semi2 < exp.children.length - 1) {
2546
- exp.children.splice(semi2 + 1, 1 / 0, collect(exp.children.slice(semi2 + 1)));
2596
+ exp.children.splice(semi2 + 1, 1 / 0, collect(exp.children.slice(semi2 + 1))), updateParentPointers(exp);
2547
2597
  return;
2548
2598
  }
2549
2599
  break;
2550
2600
  }
2551
2601
  }
2552
- node[node.length - 1]?.type !== "SemicolonDelimiter" && (node[1] = collect(node[1]));
2602
+ if (node[node.length - 1]?.type === "SemicolonDelimiter")
2603
+ return;
2604
+ let parent = node[1].parent;
2605
+ node[1] = collect(node[1]), parent != null && updateParentPointers(parent);
2553
2606
  }
2554
2607
  function insertReturn(node) {
2555
2608
  if (!node) return;
@@ -2573,9 +2626,9 @@ ${js}`
2573
2626
  assert.notEqual(breakIndex, -1, "Could not find break in when clause"), node.children.splice(breakIndex, 1), node.break = void 0;
2574
2627
  }
2575
2628
  if (insertReturn(node.block), !isExit(node.block)) {
2576
- let comment = hasTrailingComment(node.block.expressions), ref10;
2629
+ let comment = hasTrailingComment(node.block.expressions), ref12;
2577
2630
  node.block.expressions.push([
2578
- comment ? (ref10 = node.block.expressions)[ref10.length - 1][0] || `
2631
+ comment ? (ref12 = node.block.expressions)[ref12.length - 1][0] || `
2579
2632
  ` : "",
2580
2633
  wrapWithReturn(void 0, node, !comment)
2581
2634
  ]);
@@ -2593,7 +2646,7 @@ ${js}`
2593
2646
  return;
2594
2647
  let outer = exp;
2595
2648
  exp.type === "LabelledStatement" && (exp = exp.statement);
2596
- let ref11, m3;
2649
+ let ref13, m3;
2597
2650
  switch (exp.type) {
2598
2651
  case "BreakStatement":
2599
2652
  case "ContinueStatement":
@@ -2603,9 +2656,9 @@ ${js}`
2603
2656
  case "ThrowStatement":
2604
2657
  return;
2605
2658
  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);
2659
+ let ref14;
2660
+ exp.bindings?.length ? ref14 = [" ", patternAsValue((ref13 = exp.bindings)[ref13.length - 1].pattern)] : ref14 = [];
2661
+ let value = ref14, parent = outer.parent, index = findChildIndex(parent?.expressions, outer);
2609
2662
  assert.notEqual(index, -1, "Could not find declaration in parent"), parent.expressions.splice(index + 1, 0, [
2610
2663
  "",
2611
2664
  {
@@ -2656,15 +2709,15 @@ ${js}`
2656
2709
  return;
2657
2710
  }
2658
2711
  case "SwitchStatement": {
2659
- for (let ref13 = exp.caseBlock.clauses, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
2660
- let clause = ref13[i6];
2712
+ for (let ref15 = exp.caseBlock.clauses, i7 = 0, len6 = ref15.length; i7 < len6; i7++) {
2713
+ let clause = ref15[i7];
2661
2714
  insertReturn(clause);
2662
2715
  }
2663
2716
  return;
2664
2717
  }
2665
2718
  case "TryStatement": {
2666
- for (let ref14 = exp.blocks, i7 = 0, len6 = ref14.length; i7 < len6; i7++) {
2667
- let block = ref14[i7];
2719
+ for (let ref16 = exp.blocks, i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
2720
+ let block = ref16[i8];
2668
2721
  insertReturn(block);
2669
2722
  }
2670
2723
  return;
@@ -2842,8 +2895,8 @@ ${js}`
2842
2895
  return !1;
2843
2896
  let reduction = statement.type === "ForStatement" && statement.reduction;
2844
2897
  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);
2898
+ let ref17, m5;
2899
+ 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
2900
  }
2848
2901
  if (reduction)
2849
2902
  switch (reduction.subtype) {
@@ -2889,8 +2942,8 @@ ${js}`
2889
2942
  function append2(p) {
2890
2943
  (rest ? after : before).push(p);
2891
2944
  }
2892
- for (let ref16 = parameters.parameters, i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
2893
- let param = ref16[i8];
2945
+ for (let ref18 = parameters.parameters, i9 = 0, len8 = ref18.length; i9 < len8; i9++) {
2946
+ let param = ref18[i9];
2894
2947
  switch (param.type) {
2895
2948
  case "ThisType": {
2896
2949
  if (tt)
@@ -2899,7 +2952,7 @@ ${js}`
2899
2952
  message: "Only one typed this parameter is allowed"
2900
2953
  }), append2(param);
2901
2954
  else if (tt = trimFirstSpace(param), before.length || rest) {
2902
- let ref17, delim = (ref17 = tt.children)[ref17.length - 1];
2955
+ let ref19, delim = (ref19 = tt.children)[ref19.length - 1];
2903
2956
  Array.isArray(delim) && (delim = delim[delim.length - 1]), typeof delim == "object" && delim != null && "token" in delim && delim.token === "," || (tt = {
2904
2957
  ...tt,
2905
2958
  children: [...tt.children, ", "]
@@ -3028,11 +3081,11 @@ ${js}`
3028
3081
  for (; m7 = classExpressions[index2 - 1]?.[1], typeof m7 == "object" && m7 != null && "type" in m7 && m7.type === "MethodDefinition" && "name" in m7 && m7.name === "constructor"; )
3029
3082
  index2--;
3030
3083
  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;
3084
+ for (let ref20 = gatherRecursive(parameters, ($14) => $14.type === "Parameter"), i10 = 0, len9 = ref20.length; i10 < len9; i10++) {
3085
+ let parameter = ref20[i10], { accessModifier } = parameter;
3033
3086
  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;
3087
+ for (let ref21 = gatherRecursive(parameter, ($15) => $15.type === "AtBinding"), i11 = 0, len10 = ref21.length; i11 < len10; i11++) {
3088
+ let binding = ref21[i11], typeSuffix = binding.parent?.typeSuffix;
3036
3089
  if (!(accessModifier || typeSuffix))
3037
3090
  continue;
3038
3091
  parameter.accessModifier && (replaceNode(parameter.accessModifier, void 0), parameter.accessModifier = void 0);
@@ -3058,8 +3111,8 @@ ${js}`
3058
3111
  bindings: [],
3059
3112
  decl: "const"
3060
3113
  }));
3061
- for (let ref20 = splices, i11 = 0, len10 = ref20.length; i11 < len10; i11++) {
3062
- let binding = ref20[i11];
3114
+ for (let ref22 = splices, i12 = 0, len11 = ref22.length; i12 < len11; i12++) {
3115
+ let binding = ref22[i12];
3063
3116
  assert.equal(binding.type, "PostRestBindingElements", "splice should be of type Binding"), prefix.push(makeNode({
3064
3117
  type: "Declaration",
3065
3118
  children: ["let ", binding],
@@ -3097,8 +3150,8 @@ ${js}`
3097
3150
  if (f.async != null)
3098
3151
  f.async.push("async "), signature.modifier.async = !0;
3099
3152
  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);
3153
+ for (let ref23 = gatherRecursiveWithinFunction(block, ($17) => $17.type === "Await"), i13 = 0, len12 = ref23.length; i13 < len12; i13++) {
3154
+ let a = ref23[i13], i = findChildIndex(a.parent, a);
3102
3155
  a.parent.children.splice(i + 1, 0, {
3103
3156
  type: "Error",
3104
3157
  message: `await invalid in ${signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
@@ -3108,8 +3161,8 @@ ${js}`
3108
3161
  if (f.generator != null)
3109
3162
  f.generator.push("*"), signature.modifier.generator = !0;
3110
3163
  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");
3164
+ for (let ref24 = gatherRecursiveWithinFunction(block, ($18) => $18.type === "YieldExpression"), i14 = 0, len13 = ref24.length; i14 < len13; i14++) {
3165
+ let y = ref24[i14], i = y.children.findIndex(($19) => $19.type === "Yield");
3113
3166
  y.children.splice(i + 1, 0, {
3114
3167
  type: "Error",
3115
3168
  message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
@@ -3122,8 +3175,8 @@ ${js}`
3122
3175
  );
3123
3176
  }
3124
3177
  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];
3178
+ for (let ref25 = gatherRecursiveAll(statements, ($20) => $20.type === "FunctionExpression" || $20.type === "ArrowFunction" || $20.type === "MethodDefinition"), i15 = 0, len14 = ref25.length; i15 < len14; i15++) {
3179
+ let f = ref25[i15];
3127
3180
  (f.type === "FunctionExpression" || f.type === "MethodDefinition") && implicitFunctionBlock(f), processSignature(f), processParams(f), processReturn(f, config2.implicitReturns);
3128
3181
  }
3129
3182
  }
@@ -3170,17 +3223,17 @@ ${js}`
3170
3223
  }
3171
3224
  let done;
3172
3225
  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;
3226
+ let ref26;
3227
+ if ((ref26 = blockContainingStatement(exp)) && typeof ref26 == "object" && "block" in ref26 && "index" in ref26) {
3228
+ let { block: parentBlock, index } = ref26;
3176
3229
  statements[0][0] = parentBlock.expressions[index][0], parentBlock.expressions.splice(index, index + 1 - index, ...statements), updateParentPointers(parentBlock), braceBlock(parentBlock), done = !0;
3177
3230
  }
3178
3231
  }
3179
3232
  done || (generator || (statements[statements.length - 1][1] = wrapWithReturn(statements[statements.length - 1][1])), children.splice(i, 1, wrapIIFE(statements, async, generator)), updateParentPointers(exp));
3180
3233
  }
3181
3234
  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];
3235
+ for (let ref27 = gatherRecursiveAll(statements, ($21) => $21.type === "IterationExpression"), i16 = 0, len15 = ref27.length; i16 < len15; i16++) {
3236
+ let s = ref27[i16];
3184
3237
  expressionizeIteration(s);
3185
3238
  }
3186
3239
  }
@@ -3196,12 +3249,12 @@ ${js}`
3196
3249
  let args = [];
3197
3250
  if (typeof expression == "object" && expression != null && "type" in expression && expression.type === "ArrowFunction" || typeof expression == "object" && expression != null && "type" in expression && expression.type === "FunctionExpression") {
3198
3251
  let { parameters } = expression, parameterList = parameters.parameters, results1 = [];
3199
- for (let i16 = 0, len15 = parameterList.length; i16 < len15; i16++) {
3200
- let parameter = parameterList[i16];
3252
+ for (let i17 = 0, len16 = parameterList.length; i17 < len16; i17++) {
3253
+ let parameter = parameterList[i17];
3201
3254
  if (typeof parameter == "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
3202
- let ref26;
3203
- if (ref26 = parameter.initializer) {
3204
- let initializer = ref26;
3255
+ let ref28;
3256
+ if (ref28 = parameter.initializer) {
3257
+ let initializer = ref28;
3205
3258
  args.push(initializer.expression, parameter.delim), parameter = {
3206
3259
  ...parameter,
3207
3260
  initializer: void 0,
@@ -3297,8 +3350,8 @@ ${js}`
3297
3350
  function unbraceBlock(block) {
3298
3351
  if (block.bare)
3299
3352
  return;
3300
- let ref;
3301
- block.children[0] === " {" && (ref = block.children)[ref.length - 1] === "}" && (block.children.shift(), block.children.pop(), block.bare = !0);
3353
+ let m, ref;
3354
+ m = block.children[0], (m === " {" || m === "{") && (ref = block.children)[ref.length - 1] === "}" && (block.children.shift(), block.children.pop(), block.bare = !0);
3302
3355
  }
3303
3356
  function duplicateBlock(block) {
3304
3357
  let expressions = [...block.expressions], children;
@@ -3321,17 +3374,6 @@ ${js}`
3321
3374
  empty: !0
3322
3375
  };
3323
3376
  }
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
3377
  function replaceBlockExpression(node, child, replacement) {
3336
3378
  let found = !1, { expressions } = node;
3337
3379
  for (let i1 = 0, len3 = expressions.length; i1 < len3; i1++) {
@@ -3360,17 +3402,25 @@ ${js}`
3360
3402
  });
3361
3403
  }
3362
3404
  function insertHoistDec(block, node, dec) {
3363
- let { expressions } = block, index = findChildIndex(expressions, node);
3405
+ insertBeforeInBlock(block, node, ["", dec, ";"]);
3406
+ }
3407
+ function insertBeforeInBlock(block, node, ...statements) {
3408
+ let index = findChildIndex(block.expressions, node);
3364
3409
  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);
3410
+ throw new Error("insertBeforeInBlock couldn't find existing statement in block");
3411
+ insertBlockStatements(block, index, ...statements);
3412
+ }
3413
+ function insertBlockStatements(block, index, ...statements) {
3414
+ if (!statements.length)
3415
+ return;
3416
+ let { expressions } = block, before = expressions[index];
3417
+ 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
3418
  }
3369
3419
  function processBlocks(statements) {
3370
3420
  insertSemicolon(statements);
3371
3421
  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")) {
3422
+ let block = ref1[i2], m1;
3423
+ 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
3424
  let object = block.expressions[0][1].expression;
3375
3425
  if (!(() => {
3376
3426
  let results = !0;
@@ -3384,8 +3434,8 @@ ${js}`
3384
3434
  continue;
3385
3435
  block.expressions[0][1] = block.expressions[0][1].expression, unbraceBlock(block);
3386
3436
  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));
3437
+ let i = i3, prop = ref2[i3], m2;
3438
+ 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
3439
  let colon = prop.children.indexOf(": ");
3390
3440
  colon < 0 || prop.children[colon - 1] === prop.name && prop.children.splice(colon - 1, 2);
3391
3441
  }
@@ -3437,8 +3487,8 @@ ${js}`
3437
3487
  }
3438
3488
  }
3439
3489
  function blockContainingStatement(exp) {
3440
- let child = exp, parent = exp.parent, m2;
3441
- for (; parent != null && (m2 = parent.type, m2 === "StatementExpression" || m2 === "PipelineExpression" || m2 === "UnwrappedExpression"); )
3490
+ let child = exp, parent = exp.parent, m3;
3491
+ for (; parent != null && (m3 = parent.type, m3 === "StatementExpression" || m3 === "PipelineExpression" || m3 === "UnwrappedExpression"); )
3442
3492
  child = parent, parent = parent.parent;
3443
3493
  if (parent?.type !== "BlockStatement")
3444
3494
  return;
@@ -3494,6 +3544,12 @@ ${js}`
3494
3544
  throw new Error(`Unknown operator: ${op}`);
3495
3545
  })() : op.type === "PatternTest" ? precedenceRelational : typeof op.prec == "number" ? op.prec : precedenceMap.get(op.prec ?? op.token) ?? (op.relational ? precedenceRelational : precedenceCustomDefault);
3496
3546
  }
3547
+ function isShortCircuitOp(op) {
3548
+ if (op && typeof op == "object" && "token" in op) {
3549
+ let { token } = op;
3550
+ return isShortCircuitOp(token);
3551
+ } else return typeof op == "string" ? (op.endsWith("=") && !op.endsWith("==") && (op = op.slice(0, -1)), op === "||" || op === "&&" || op === "??") : !1;
3552
+ }
3497
3553
  function processBinaryOpExpression($0) {
3498
3554
  return processExpandedBinaryOpExpression(expandChainedComparisons($0));
3499
3555
  }
@@ -4100,22 +4156,15 @@ ${js}`
4100
4156
  let binding = bindings[i3], { typeSuffix, initializer } = binding;
4101
4157
  if (typeSuffix && typeSuffix.optional) {
4102
4158
  if (initializer && !typeSuffix.t) {
4103
- let expression = trimFirstSpace(initializer.expression), m;
4104
- if (m = expression.type, m === "Identifier" || m === "MemberExpression")
4105
- typeSuffix.children.push(": ", typeSuffix.t = {
4106
- type: "TypeTypeof",
4107
- children: ["typeof ", expression],
4108
- expression
4109
- });
4110
- else if (expression.type === "Literal" || expression.type === "RegularExpressionLiteral" || expression.type === "TemplateLiteral")
4111
- typeSuffix.children.push(": ", typeSuffix.t = literalType(expression));
4112
- else {
4159
+ let expression = trimFirstSpace(initializer.expression);
4160
+ if (typeSuffix.t = typeOfExpression(expression), typeSuffix.t == null) {
4113
4161
  spliceChild(binding, typeSuffix, 1, {
4114
4162
  type: "Error",
4115
- message: `Optional type can only be inferred from literals or member expressions, not ${expression.type}`
4163
+ 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}`
4116
4164
  });
4117
4165
  continue;
4118
4166
  }
4167
+ typeSuffix.children.push(": ", typeSuffix.t);
4119
4168
  }
4120
4169
  typeSuffix.t ? convertOptionalType(typeSuffix) : (spliceChild(binding, typeSuffix, 1), binding.children.push(initializer = binding.initializer = {
4121
4170
  type: "Initializer",
@@ -4142,9 +4191,9 @@ ${js}`
4142
4191
  }
4143
4192
  function prependStatementExpressionBlock(initializer, statement) {
4144
4193
  let { expression: exp } = initializer, ws;
4145
- 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"))
4194
+ 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"))
4146
4195
  return;
4147
- let pre = [], statementExp = exp.statement, blockStatement = [ws || "", statementExp, ";"], ref;
4196
+ let statementExp = exp.statement, blockStatement = [ws || "", statementExp, ";"], pre = [blockStatement], ref;
4148
4197
  if (statementExp.type === "IterationExpression") {
4149
4198
  if (statementExp.async || statementExp.generator)
4150
4199
  return;
@@ -4154,8 +4203,7 @@ ${js}`
4154
4203
  if (statement2.type === "DoStatement") {
4155
4204
  ref = initializer.expression = initializer.children[2] = makeRef(), assignResults(blockStatement, (resultNode) => makeNode({
4156
4205
  type: "AssignmentExpression",
4157
- children: [ref, " = ", resultNode],
4158
- parent: statement2
4206
+ children: [ref, " = ", resultNode]
4159
4207
  }));
4160
4208
  let refDec = {
4161
4209
  type: "Declaration",
@@ -4168,8 +4216,7 @@ ${js}`
4168
4216
  } else {
4169
4217
  ref = initializer.expression = initializer.children[2] = makeRef(), assignResults(blockStatement, (resultNode) => makeNode({
4170
4218
  type: "AssignmentExpression",
4171
- children: [ref, " = ", resultNode],
4172
- parent: statement
4219
+ children: [ref, " = ", resultNode]
4173
4220
  }));
4174
4221
  let refDec = {
4175
4222
  type: "Declaration",
@@ -4177,7 +4224,11 @@ ${js}`
4177
4224
  };
4178
4225
  pre.unshift(["", refDec, ";"]);
4179
4226
  }
4180
- return statement.children.unshift(...pre, blockStatement), updateParentPointers(blockStatement, statement), ref;
4227
+ let ref3;
4228
+ if (!((ref3 = blockContainingStatement(statement)) && typeof ref3 == "object" && "block" in ref3 && "index" in ref3))
4229
+ throw new Error("Couldn't find block in prependStatementExpressionBlock");
4230
+ let { block, index } = ref3;
4231
+ return insertBlockStatements(block, index, ...pre), ref;
4181
4232
  }
4182
4233
  function processDeclarationCondition(condition, rootCondition, parent) {
4183
4234
  if (condition.type !== "DeclarationCondition")
@@ -4254,8 +4305,8 @@ ${js}`
4254
4305
  if (conditions.length) {
4255
4306
  let children = condition.children;
4256
4307
  if (s.negated) {
4257
- let m1;
4258
- 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"))
4308
+ let m;
4309
+ 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"))
4259
4310
  throw new Error("Unsupported negated condition");
4260
4311
  ({ children } = condition.expression.children[1]);
4261
4312
  }
@@ -4279,11 +4330,11 @@ ${js}`
4279
4330
  if (index < 0)
4280
4331
  throw new Error("Couldn't find where in block to put postfix declaration");
4281
4332
  ancestor.expressions.splice(index + 1, 0, ...blockPrefix), updateParentPointers(ancestor), braceBlock(ancestor);
4282
- let ref3;
4333
+ let ref4;
4283
4334
  switch (s.type) {
4284
4335
  case "IfStatement": {
4285
- if (ref3 = s.else?.block) {
4286
- let elseBlock = ref3;
4336
+ if (ref4 = s.else?.block) {
4337
+ let elseBlock = ref4;
4287
4338
  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;
4288
4339
  }
4289
4340
  let block = s.then;
@@ -4318,41 +4369,32 @@ ${js}`
4318
4369
  let { ref: ref2, statementDeclaration } = condition.expression;
4319
4370
  if (!blockPrefix)
4320
4371
  return;
4321
- let newCondition = {
4322
- type: "ParenthesizedExpression",
4323
- children: ["(", ref2, ")"],
4324
- expression: ref2,
4325
- parent: s
4326
- };
4327
- if (s.children = s.children.map(function(c) {
4328
- return c === s.condition ? newCondition : c;
4329
- }), s.condition = newCondition, updateParentPointers(s), statementDeclaration) {
4330
- let block = makeEmptyBlock();
4331
- replaceBlockExpression(s.parent, s, block), block.expressions.push(["", s]), s.children.splice(s.children.findIndex(($5) => $5.token === "switch"), 0, blockPrefix), s.parent = block;
4332
- } else {
4333
- let block = blockWithPrefix([["", [{
4372
+ if (replaceNode(s.condition, parenthesizeExpression(ref2), s), !statementDeclaration) {
4373
+ let declStatement = ["", [{
4334
4374
  type: "Declaration",
4335
4375
  children: ["let ", ...condition.expression.children]
4336
- }], ";"], ...blockPrefix], makeEmptyBlock());
4337
- updateParentPointers(block, s.parent), replaceBlockExpression(s.parent, s, block), block.expressions.push(["", s]), s.parent = block;
4376
+ }], ";"];
4377
+ blockPrefix.unshift(declStatement);
4338
4378
  }
4379
+ let block = blockWithPrefix(blockPrefix, makeEmptyBlock());
4380
+ updateParentPointers(block, s.parent), replaceBlockExpression(s.parent, s, block), block.expressions.push(["", s]), s.parent = block;
4339
4381
  break;
4340
4382
  }
4341
4383
  }
4342
4384
  }
4343
4385
  function dynamizeFromClause(from) {
4344
4386
  from = from.slice(1), from = trimFirstSpace(from);
4345
- let ref4;
4346
- if (ref4 = from[from.length - 1]?.assertion) {
4347
- let assert2 = ref4, ref5;
4348
- ref5 = from[from.length - 1], ref5.children = ref5.children.filter((a2) => a2 !== assert2), from.push(", {", assert2.keyword, ":", assert2.object, "}");
4387
+ let ref5;
4388
+ if (ref5 = from[from.length - 1]?.assertion) {
4389
+ let assert2 = ref5, ref6;
4390
+ ref6 = from[from.length - 1], ref6.children = ref6.children.filter((a2) => a2 !== assert2), from.push(", {", assert2.keyword, ":", assert2.object, "}");
4349
4391
  }
4350
4392
  return ["(", ...from, ")"];
4351
4393
  }
4352
4394
  function dynamizeImportDeclaration(decl) {
4353
- let { imports } = decl, { star, binding, specifiers } = imports, justDefault = binding && !specifiers && !star, ref6;
4354
- binding ? specifiers ? ref6 = makeRef() : ref6 = binding : ref6 = convertNamedImportsToObject(imports, !0);
4355
- let pattern = ref6, c = "const", expression = [
4395
+ let { imports } = decl, { star, binding, specifiers } = imports, justDefault = binding && !specifiers && !star, ref7;
4396
+ binding ? specifiers ? ref7 = makeRef() : ref7 = binding : ref7 = convertNamedImportsToObject(imports, !0);
4397
+ let pattern = ref7, c = "const", expression = [
4356
4398
  justDefault ? "(" : void 0,
4357
4399
  { type: "Await", children: ["await"] },
4358
4400
  " ",
@@ -5087,45 +5129,51 @@ ${js}`
5087
5129
  // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\auto-dec.civet.jsx
5088
5130
  var concatAssign2 = (lhs, rhs) => (rhs?.[Symbol.isConcatSpreadable] ?? Array.isArray(rhs) ? lhs.push.apply(lhs, rhs) : lhs.push(rhs), lhs);
5089
5131
  function findDecs(statements) {
5090
- let declarationNames = gatherNodes(statements, ($) => $.type === "Declaration").flatMap((d) => d.names), globals = getConfig().globals || [];
5132
+ let declarationNames = gatherNodes(statements, ($) => $.type === "Declaration").flatMap(($1) => $1.names), globals = getConfig().globals || [];
5091
5133
  return new Set(globals.concat(declarationNames));
5092
5134
  }
5093
5135
  function createConstLetDecs(statements, scopes, letOrConst) {
5094
5136
  function findVarDecs(statements2, decs) {
5095
- 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);
5137
+ 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);
5096
5138
  return new Set(declarationNames);
5097
5139
  }
5098
5140
  let declaredIdentifiers = findVarDecs(statements);
5099
5141
  function hasDec(name) {
5100
- return declaredIdentifiers.has(name) || scopes.some(($1) => $1.has(name));
5142
+ return declaredIdentifiers.has(name) || scopes.some(($4) => $4.has(name));
5101
5143
  }
5102
5144
  function gatherBlockOrOther(statement) {
5103
- 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] : []);
5145
+ 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] : []);
5104
5146
  }
5105
5147
  let currentScope = /* @__PURE__ */ new Set();
5106
5148
  scopes.push(currentScope);
5107
- let fnNodes = gatherNodes(statements, isFunction), forNodes = gatherNodes(statements, (s) => s.type === "ForStatement"), targetStatements = [];
5108
- for (let statement of statements) {
5109
- let nodes = gatherBlockOrOther(statement), undeclaredIdentifiers = [];
5110
- for (let node of nodes) {
5111
- if (node.type == "BlockStatement") {
5112
- let block = node, fnNode = fnNodes.find((fnNode2) => fnNode2.block === block), forNode = forNodes.find((forNode2) => forNode2.block === block);
5149
+ let fnNodes = gatherNodes(statements, isFunction), forNodes = gatherNodes(statements, ($6) => $6.type === "ForStatement"), targetStatements = [];
5150
+ for (let i1 = 0, len3 = statements.length; i1 < len3; i1++) {
5151
+ let statement = statements[i1], nodes = gatherBlockOrOther(statement), undeclaredIdentifiers = [];
5152
+ for (let i2 = 0, len12 = nodes.length; i2 < len12; i2++) {
5153
+ let node = nodes[i2];
5154
+ if (node.type === "BlockStatement") {
5155
+ let block = node, fnNode = fnNodes.find(($7) => $7.block === block), forNode = forNodes.find(($8) => $8.block === block);
5113
5156
  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);
5114
5157
  continue;
5115
5158
  }
5116
- if (node.names == null) continue;
5159
+ if (node.names == null)
5160
+ continue;
5117
5161
  let names = node.names.filter((name) => !hasDec(name));
5118
- node.type == "AssignmentExpression" && undeclaredIdentifiers.push(...names), names.forEach((name) => currentScope.add(name));
5162
+ node.type === "AssignmentExpression" && undeclaredIdentifiers.push(...names);
5163
+ for (let i3 = 0, len22 = names.length; i3 < len22; i3++) {
5164
+ let name = names[i3];
5165
+ currentScope.add(name);
5166
+ }
5119
5167
  }
5120
- if (undeclaredIdentifiers.length > 0) {
5121
- let indent = statement[0], firstIdentifier = gatherNodes(statement[1], (node) => node.type == "Identifier")[0];
5122
- 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)
5168
+ if (undeclaredIdentifiers.length) {
5169
+ let indent = statement[0], firstIdentifier = gatherNodes(statement[1], ($9) => $9.type === "Identifier")[0];
5170
+ 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)
5123
5171
  statement[1].children.unshift([`${letOrConst} `]);
5124
5172
  else {
5125
5173
  let tail = `
5126
5174
  `;
5127
- gatherNodes(indent, (node) => node.token && node.token.endsWith(`
5128
- `)).length > 0 && (tail = void 0), targetStatements.push([indent, {
5175
+ gatherNodes(indent, ($11) => $11.token && $11.token.endsWith(`
5176
+ `)).length && (tail = void 0), targetStatements.push([indent, {
5129
5177
  type: "Declaration",
5130
5178
  children: ["let ", ...undeclaredIdentifiers.join(", ")],
5131
5179
  names: undeclaredIdentifiers
@@ -5138,20 +5186,20 @@ ${js}`
5138
5186
  }
5139
5187
  function createVarDecs(block, scopes, pushVar) {
5140
5188
  function hasDec(name) {
5141
- return scopes.some(($2) => $2.has(name));
5189
+ return scopes.some(($12) => $12.has(name));
5142
5190
  }
5143
5191
  function findAssignments(statements2, decs2) {
5144
- let assignmentStatements2 = gatherNodes(statements2, ($3) => $3.type === "AssignmentExpression");
5192
+ let assignmentStatements2 = gatherNodes(statements2, ($13) => $13.type === "AssignmentExpression");
5145
5193
  return assignmentStatements2.length && concatAssign2(
5146
5194
  assignmentStatements2,
5147
5195
  findAssignments(assignmentStatements2.map((s) => s.children), decs2)
5148
- ), assignmentStatements2.filter(($4) => $4.parent?.type !== "CoffeeClassPublic");
5196
+ ), assignmentStatements2.filter(($14) => $14.parent?.type !== "CoffeeClassPublic");
5149
5197
  }
5150
5198
  pushVar ??= (name) => (varIds.push(name), decs.add(name));
5151
5199
  let { expressions: statements } = block, decs = findDecs(statements);
5152
5200
  scopes.push(decs);
5153
5201
  let varIds = [];
5154
- findAssignments(statements, scopes).flatMap(($5) => $5?.names || []).filter((x, i, a) => {
5202
+ findAssignments(statements, scopes).flatMap(($15) => $15?.names || []).filter((x, i, a) => {
5155
5203
  if (!hasDec(x)) return a.indexOf(x) === i;
5156
5204
  }).forEach(pushVar);
5157
5205
  let fnNodes = gatherNodes(statements, isFunction), forNodes = gatherNodes(statements, (s) => s.type === "ForStatement"), blockNodes = new Set(gatherNodes(statements, (s) => s.type === "BlockStatement"));
@@ -5992,20 +6040,18 @@ ${js}`
5992
6040
  let exp = ref12[i7];
5993
6041
  if (exp.names !== null)
5994
6042
  continue;
5995
- let { lhs: $1, expression: $2 } = exp, tail = [], len3 = $1.length, block, ref13;
5996
- if (blockContainingStatement(exp) && !(ref13 = $1[$1.length - 1])?.[ref13.length - 1]?.special) {
5997
- block = makeBlockFragment();
5998
- let ref14;
5999
- if (ref14 = prependStatementExpressionBlock(
6043
+ let { lhs: $1, expression: $2 } = exp, tail = [], len3 = $1.length, ref13, ref14;
6044
+ if (blockContainingStatement(exp) && !(ref13 = $1[$1.length - 1])?.[ref13.length - 1]?.special && !isShortCircuitOp((ref14 = $1[$1.length - 1])?.[ref14.length - 1])) {
6045
+ let ref15;
6046
+ if (ref15 = prependStatementExpressionBlock(
6000
6047
  { type: "Initializer", expression: $2, children: [void 0, void 0, $2] },
6001
- block
6048
+ exp
6002
6049
  )) {
6003
- let ref = ref14;
6004
- exp.children = exp.children.map(($7) => $7 === $2 ? ref : $7), $2 = ref;
6005
- } else
6006
- block = void 0;
6050
+ let ref = ref15;
6051
+ replaceNode($2, ref, exp), $2 = ref;
6052
+ }
6007
6053
  }
6008
- if ($1.some(($8) => $8[$8.length - 1].special)) {
6054
+ if ($1.some(($7) => $7[$7.length - 1].special)) {
6009
6055
  if ($1.length !== 1) throw new Error("Only one assignment with id= is allowed");
6010
6056
  let [, lhs, , op] = $1[0], { call, omitLhs } = op, index = exp.children.indexOf($2);
6011
6057
  if (index < 0) throw new Error("Assertion error: exp not in AssignmentExpression");
@@ -6046,7 +6092,7 @@ ${js}`
6046
6092
  message: "Slice range cannot be decreasing in assignment"
6047
6093
  });
6048
6094
  break;
6049
- } else m3 = lhs.type, (m3 === "ObjectBindingPattern" || m3 === "ArrayBindingPattern" || m3 === "NamedBindingPattern") && (processBindingPatternLHS(lhs, tail), gatherRecursiveAll(lhs, ($9) => $9.type === "Ref").forEach(refsToDeclare.add.bind(refsToDeclare)));
6095
+ } else m3 = lhs.type, (m3 === "ObjectBindingPattern" || m3 === "ArrayBindingPattern" || m3 === "NamedBindingPattern") && (processBindingPatternLHS(lhs, tail), gatherRecursiveAll(lhs, ($8) => $8.type === "Ref").forEach(refsToDeclare.add.bind(refsToDeclare)));
6050
6096
  }
6051
6097
  i--;
6052
6098
  }
@@ -6067,7 +6113,7 @@ ${js}`
6067
6113
  }
6068
6114
  i--;
6069
6115
  }
6070
- if (refsToDeclare.size && (exp.hoistDec ? exp.hoistDec.children.push([...refsToDeclare].map(($10) => [",", $10])) : exp.hoistDec = {
6116
+ if (refsToDeclare.size && (exp.hoistDec ? exp.hoistDec.children.push([...refsToDeclare].map(($9) => [",", $9])) : exp.hoistDec = {
6071
6117
  type: "Declaration",
6072
6118
  children: ["let ", [...refsToDeclare].map((r, i2) => i2 ? [",", r] : r)],
6073
6119
  names: []
@@ -6076,7 +6122,6 @@ ${js}`
6076
6122
  if (index < 0) throw new Error("Assertion error: exp not in AssignmentExpression");
6077
6123
  exp.children.splice(index + 1, 0, ...tail);
6078
6124
  }
6079
- block && (replaceNode(exp, block), block.expressions.push(["", exp]), exp.parent = block);
6080
6125
  }
6081
6126
  }
6082
6127
  function unchainOptionalMemberExpression(exp, ref, innerExp) {
@@ -6103,9 +6148,9 @@ ${js}`
6103
6148
  }
6104
6149
  j++;
6105
6150
  }
6106
- let ref15;
6107
- if (ref15 = conditions.length) {
6108
- let l = ref15, cs = flatJoin(conditions, " && ");
6151
+ let ref16;
6152
+ if (ref16 = conditions.length) {
6153
+ let l = ref16, cs = flatJoin(conditions, " && ");
6109
6154
  return {
6110
6155
  ...exp,
6111
6156
  children: [...cs, " ? ", innerExp(children), " : void 0"],
@@ -6137,8 +6182,8 @@ ${js}`
6137
6182
  }
6138
6183
  function processTypes(node) {
6139
6184
  let results1 = [];
6140
- for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
6141
- let unary = ref16[i8], suffixIndex = unary.suffix.length - 1, results2 = [];
6185
+ for (let ref17 = gatherRecursiveAll(node, ($10) => $10.type === "TypeUnary"), i8 = 0, len7 = ref17.length; i8 < len7; i8++) {
6186
+ let unary = ref17[i8], suffixIndex = unary.suffix.length - 1, results2 = [];
6142
6187
  for (; suffixIndex >= 0; ) {
6143
6188
  let suffix = unary.suffix[suffixIndex];
6144
6189
  if (typeof suffix == "object" && suffix != null && "token" in suffix && suffix.token === "?") {
@@ -6199,9 +6244,9 @@ ${js}`
6199
6244
  unary.prefix = [], unary.children = unary.children.filter((a2) => a2 !== prefix);
6200
6245
  let outer = unary.suffix.splice(suffixIndex + 1, 1 / 0), space = getTrimmingSpace(unary);
6201
6246
  inplaceInsertTrimmingSpace(unary, "");
6202
- let ref17;
6203
- unary.suffix.length ? ref17 = unary : ref17 = unary.t;
6204
- let t = ref17, argArray = [makeNode({
6247
+ let ref18;
6248
+ unary.suffix.length ? ref18 = unary : ref18 = unary.t;
6249
+ let t = ref18, argArray = [makeNode({
6205
6250
  type: "TypeArgument",
6206
6251
  ts: !0,
6207
6252
  t,
@@ -6237,16 +6282,16 @@ ${js}`
6237
6282
  return results1;
6238
6283
  }
6239
6284
  function processStatementExpressions(statements) {
6240
- for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len8 = ref18.length; i9 < len8; i9++) {
6241
- let exp = ref18[i9], { maybe, statement } = exp;
6285
+ for (let ref19 = gatherRecursiveAll(statements, ($11) => $11.type === "StatementExpression"), i9 = 0, len8 = ref19.length; i9 < len8; i9++) {
6286
+ let exp = ref19[i9], { maybe, statement } = exp;
6242
6287
  if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
6243
6288
  replaceNode(exp, statement);
6244
6289
  continue;
6245
6290
  }
6246
- let ref19;
6291
+ let ref20;
6247
6292
  switch (statement.type) {
6248
6293
  case "IfStatement": {
6249
- (ref19 = expressionizeIfStatement(statement)) ? replaceNode(statement, ref19, exp) : replaceNode(statement, wrapIIFE([["", statement]]), exp);
6294
+ (ref20 = expressionizeIfStatement(statement)) ? replaceNode(statement, ref20, exp) : replaceNode(statement, wrapIIFE([["", statement]]), exp);
6250
6295
  break;
6251
6296
  }
6252
6297
  case "IterationExpression": {
@@ -6287,11 +6332,11 @@ ${js}`
6287
6332
  });
6288
6333
  }
6289
6334
  function processFinallyClauses(statements) {
6290
- for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len9 = ref20.length; i10 < len9; i10++) {
6291
- let f = ref20[i10], ref21;
6292
- if (!((ref21 = blockContainingStatement(f)) && typeof ref21 == "object" && "block" in ref21 && "index" in ref21))
6335
+ for (let ref21 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len9 = ref21.length; i10 < len9; i10++) {
6336
+ let f = ref21[i10], ref22;
6337
+ if (!((ref22 = blockContainingStatement(f)) && typeof ref22 == "object" && "block" in ref22 && "index" in ref22))
6293
6338
  throw new Error("finally clause must be inside try statement or block");
6294
- let { block, index } = ref21, indent = block.expressions[index][0], expressions = block.expressions.slice(index + 1), t = makeNode({
6339
+ let { block, index } = ref22, indent = block.expressions[index][0], expressions = block.expressions.slice(index + 1), t = makeNode({
6295
6340
  type: "BlockStatement",
6296
6341
  expressions,
6297
6342
  children: ["{", expressions, "}"],
@@ -6351,9 +6396,9 @@ ${js}`
6351
6396
  }
6352
6397
  }
6353
6398
  function processCoffeeClasses(statements) {
6354
- for (let ref22 = gatherRecursiveAll(statements, ($13) => $13.type === "ClassExpression"), i11 = 0, len10 = ref22.length; i11 < len10; i11++) {
6355
- let ce = ref22[i11], { expressions } = ce.body, indent = expressions[0]?.[0] ?? `
6356
- `, autoBinds = expressions.filter(($14) => $14[1]?.autoBind);
6399
+ for (let ref23 = gatherRecursiveAll(statements, ($12) => $12.type === "ClassExpression"), i11 = 0, len10 = ref23.length; i11 < len10; i11++) {
6400
+ let ce = ref23[i11], { expressions } = ce.body, indent = expressions[0]?.[0] ?? `
6401
+ `, autoBinds = expressions.filter(($13) => $13[1]?.autoBind);
6357
6402
  if (autoBinds.length) {
6358
6403
  let construct;
6359
6404
  for (let [, c] of expressions)
@@ -6397,17 +6442,17 @@ ${js}`
6397
6442
  })()
6398
6443
  );
6399
6444
  }
6400
- let public_static_function_assignments = expressions.filter(($15) => $15[1]?.type === "CoffeeClassPublic" && $15[1].assignment?.expression?.type === "FunctionExpression").map(($16) => $16[1].assignment);
6445
+ let public_static_function_assignments = expressions.filter(($14) => $14[1]?.type === "CoffeeClassPublic" && $14[1].assignment?.expression?.type === "FunctionExpression").map(($15) => $15[1].assignment);
6401
6446
  for (let public_static_function_assignment of public_static_function_assignments) {
6402
6447
  let id = public_static_function_assignment.lhs[0][1];
6403
6448
  replaceNode(public_static_function_assignment, convertFunctionToMethod(id, public_static_function_assignment.expression));
6404
6449
  }
6405
- let public_static_arrow_function_assignments = expressions.filter(($17) => $17[1]?.type === "CoffeeClassPublic" && $17[1].assignment?.expression?.type === "ArrowFunction").map(($18) => $18[1].assignment);
6450
+ let public_static_arrow_function_assignments = expressions.filter(($16) => $16[1]?.type === "CoffeeClassPublic" && $16[1].assignment?.expression?.type === "ArrowFunction").map(($17) => $17[1].assignment);
6406
6451
  for (let public_static_arrow_function_assignment of public_static_arrow_function_assignments) {
6407
6452
  let id = public_static_arrow_function_assignment.lhs[0][1];
6408
6453
  replaceNode(public_static_arrow_function_assignment, convertArrowFunctionToMethod(id, public_static_arrow_function_assignment.expression));
6409
6454
  }
6410
- let privates = expressions.filter(($19) => $19[1]?.type === "CoffeeClassPrivate");
6455
+ let privates = expressions.filter(($18) => $18[1]?.type === "CoffeeClassPrivate");
6411
6456
  if (!privates.length)
6412
6457
  continue;
6413
6458
  let { parent } = ce;
@@ -6444,31 +6489,31 @@ ${js}`
6444
6489
  root.expressions,
6445
6490
  root.topLevelAwait,
6446
6491
  root.topLevelYield ? "*" : void 0
6447
- ), 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);
6492
+ ), 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);
6448
6493
  }
6449
6494
  async function processProgramAsync(root) {
6450
6495
  let { expressions: statements } = root;
6451
6496
  await processComptime(statements);
6452
6497
  }
6453
6498
  function processRepl(root, rootIIFE) {
6454
- let topBlock = gatherRecursive(rootIIFE, ($21) => $21.type === "BlockStatement")[0], i = 0;
6455
- for (let ref23 = gatherRecursiveWithinFunction(topBlock, ($22) => $22.type === "Declaration"), i14 = 0, len12 = ref23.length; i14 < len12; i14++) {
6456
- let decl = ref23[i14];
6499
+ let topBlock = gatherRecursive(rootIIFE, ($20) => $20.type === "BlockStatement")[0], i = 0;
6500
+ for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($21) => $21.type === "Declaration"), i14 = 0, len12 = ref24.length; i14 < len12; i14++) {
6501
+ let decl = ref24[i14];
6457
6502
  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(",")}`, ";"]));
6458
6503
  }
6459
- for (let ref24 = gatherRecursive(topBlock, ($23) => $23.type === "FunctionExpression"), i15 = 0, len13 = ref24.length; i15 < len13; i15++) {
6460
- let func = ref24[i15];
6504
+ for (let ref25 = gatherRecursive(topBlock, ($22) => $22.type === "FunctionExpression"), i15 = 0, len13 = ref25.length; i15 < len13; i15++) {
6505
+ let func = ref25[i15];
6461
6506
  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}`, ";"])));
6462
6507
  }
6463
- for (let ref25 = gatherRecursiveWithinFunction(topBlock, ($24) => $24.type === "ClassExpression"), i16 = 0, len14 = ref25.length; i16 < len14; i16++) {
6464
- let classExp = ref25[i16], m8;
6508
+ for (let ref26 = gatherRecursiveWithinFunction(topBlock, ($23) => $23.type === "ClassExpression"), i16 = 0, len14 = ref26.length; i16 < len14; i16++) {
6509
+ let classExp = ref26[i16], m8;
6465
6510
  (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}`, ";"]));
6466
6511
  }
6467
6512
  }
6468
6513
  function processPlaceholders(statements) {
6469
6514
  let placeholderMap = /* @__PURE__ */ new Map(), liftedIfs = /* @__PURE__ */ new Set();
6470
- for (let ref26 = gatherRecursiveAll(statements, ($25) => $25.type === "Placeholder"), i17 = 0, len15 = ref26.length; i17 < len15; i17++) {
6471
- let exp = ref26[i17], ancestor;
6515
+ for (let ref27 = gatherRecursiveAll(statements, ($24) => $24.type === "Placeholder"), i17 = 0, len15 = ref27.length; i17 < len15; i17++) {
6516
+ let exp = ref27[i17], ancestor;
6472
6517
  if (exp.subtype === ".") {
6473
6518
  ({ ancestor } = findAncestor(
6474
6519
  exp,
@@ -6540,8 +6585,8 @@ ${js}`
6540
6585
  for (let i18 = 0, len16 = placeholders.length; i18 < len16; i18++) {
6541
6586
  let placeholder = placeholders[i18];
6542
6587
  typeSuffix ??= placeholder.typeSuffix;
6543
- let ref27;
6544
- (ref27 = placeholder.children)[ref27.length - 1] = ref;
6588
+ let ref28;
6589
+ (ref28 = placeholder.children)[ref28.length - 1] = ref;
6545
6590
  }
6546
6591
  let { parent } = ancestor, body = maybeUnwrap(ancestor), fnExp = makeAmpersandFunction({ ref, typeSuffix, body }), outer;
6547
6592
  switch (parent?.type) {
@@ -6558,8 +6603,8 @@ ${js}`
6558
6603
  break;
6559
6604
  }
6560
6605
  case "PipelineExpression": {
6561
- let i = findChildIndex(parent, ancestor), ref28;
6562
- i === 1 ? ref28 = ancestor === parent.children[i] : i === 2 ? ref28 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3] : ref28 = void 0, outer = ref28;
6606
+ let i = findChildIndex(parent, ancestor), ref29;
6607
+ i === 1 ? ref29 = ancestor === parent.children[i] : i === 2 ? ref29 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3] : ref29 = void 0, outer = ref29;
6563
6608
  break;
6564
6609
  }
6565
6610
  case "AssignmentExpression":
@@ -6571,9 +6616,9 @@ ${js}`
6571
6616
  }
6572
6617
  }
6573
6618
  outer || (fnExp = makeLeftHandSideExpression(fnExp)), replaceNode(ancestor, fnExp, parent), typeof parent == "object" && parent != null && "type" in parent && parent.type === "BlockStatement" && "parent" in parent && typeof parent.parent == "object" && parent.parent != null && "type" in parent.parent && parent.parent.type === "ArrowFunction" && "ampersandBlock" in parent.parent && parent.parent.ampersandBlock === !0 && "body" in parent.parent && parent.parent.body === body && (parent.parent.body = fnExp);
6574
- let ref29;
6575
- if (ref29 = getTrimmingSpace(body)) {
6576
- let ws = ref29;
6619
+ let ref30;
6620
+ if (ref30 = getTrimmingSpace(body)) {
6621
+ let ws = ref30;
6577
6622
  inplaceInsertTrimmingSpace(body, ""), inplacePrepend(ws, fnExp);
6578
6623
  }
6579
6624
  }
@@ -6604,8 +6649,8 @@ ${js}`
6604
6649
  }
6605
6650
  ];
6606
6651
  }
6607
- let ref30;
6608
- Array.isArray(rest.delim) && (ref30 = rest.delim)[ref30.length - 1]?.token === "," && (rest.delim = rest.delim.slice(0, -1), rest.children = [...rest.children.slice(0, -1), rest.delim]);
6652
+ let ref31;
6653
+ Array.isArray(rest.delim) && (ref31 = rest.delim)[ref31.length - 1]?.token === "," && (rest.delim = rest.delim.slice(0, -1), rest.children = [...rest.children.slice(0, -1), rest.delim]);
6609
6654
  let children = [...props, ...after, rest];
6610
6655
  return restCount > 1 && children.push({
6611
6656
  type: "Error",
@@ -6654,7 +6699,7 @@ ${js}`
6654
6699
  }
6655
6700
  lastType = child.type;
6656
6701
  }
6657
- return type.length === 1 ? type[0] : (type = type.flatMap(($26) => [$26, ", "]), type.pop(), ["[", type, "]"]);
6702
+ return type.length === 1 ? type[0] : (type = type.flatMap(($25) => [$25, ", "]), type.pop(), ["[", type, "]"]);
6658
6703
  }
6659
6704
  }
6660
6705
 
@@ -6714,6 +6759,7 @@ ${js}`
6714
6759
  Tuple,
6715
6760
  NWTypePostfix,
6716
6761
  UpdateExpression,
6762
+ UpdateExpressionPattern,
6717
6763
  UpdateExpressionSymbol,
6718
6764
  AssignmentExpression,
6719
6765
  NonPipelineAssignmentExpression,
@@ -6849,7 +6895,7 @@ ${js}`
6849
6895
  OperatorPrecedence,
6850
6896
  OperatorAssociativity,
6851
6897
  ThinArrowFunction,
6852
- Arrow,
6898
+ ThinArrow,
6853
6899
  ExplicitBlock,
6854
6900
  EmptyBracedContent,
6855
6901
  ImplicitNestedBlock,
@@ -7509,7 +7555,7 @@ ${js}`
7509
7555
  Dedented,
7510
7556
  PushExtraIndent1
7511
7557
  };
7512
- 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) {
7558
+ 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) {
7513
7559
  var reset = $1, init = $2, ws1 = $3, statements = $4, ws2 = $5;
7514
7560
  let program = {
7515
7561
  type: "BlockStatement",
@@ -7996,6 +8042,10 @@ ${js}`
7996
8042
  function UpdateExpression(ctx, state2) {
7997
8043
  return (0, import_lib2.$EVENT_C)(ctx, state2, "UpdateExpression", UpdateExpression$$);
7998
8044
  }
8045
+ var UpdateExpressionPattern$0 = NamedBindingPattern, UpdateExpressionPattern$1 = UpdateExpression, UpdateExpressionPattern$$ = [UpdateExpressionPattern$0, UpdateExpressionPattern$1];
8046
+ function UpdateExpressionPattern(ctx, state2) {
8047
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "UpdateExpressionPattern", UpdateExpressionPattern$$);
8048
+ }
7999
8049
  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) {
8000
8050
  return { $loc, token: $1 };
8001
8051
  }), UpdateExpressionSymbol$1 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L11, 'UpdateExpressionSymbol "\u29FA"'), function($skip, $loc, $0, $1) {
@@ -8039,7 +8089,7 @@ ${js}`
8039
8089
  function NonPipelineAssignmentExpressionTail(ctx, state2) {
8040
8090
  return (0, import_lib2.$EVENT_C)(ctx, state2, "NonPipelineAssignmentExpressionTail", NonPipelineAssignmentExpressionTail$$);
8041
8091
  }
8042
- 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) {
8092
+ 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) {
8043
8093
  return $1 = $1.map((x) => [x[0], x[1], ...x[2]]), $0 = [$1, $2], {
8044
8094
  type: "AssignmentExpression",
8045
8095
  children: $0,
@@ -8054,7 +8104,7 @@ ${js}`
8054
8104
  function ActualAssignment(ctx, state2) {
8055
8105
  return (0, import_lib2.$EVENT)(ctx, state2, "ActualAssignment", ActualAssignment$0);
8056
8106
  }
8057
- 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) {
8107
+ 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) {
8058
8108
  return $1 = $1.map((x) => [x[0], x[1], ...x[2]]), $0 = [$1, $2], {
8059
8109
  type: "AssignmentExpression",
8060
8110
  children: $0,
@@ -8202,7 +8252,11 @@ ${js}`
8202
8252
  ...first,
8203
8253
  ...rest.map(([nested, line]) => [nested, ...line]).flat()
8204
8254
  ] : $skip;
8205
- }), PipelineExpressionBody$1 = (0, import_lib2.$P)((0, import_lib2.$S)(NotDedented, Pipe, __, PipelineTailItem)), PipelineExpressionBody$$ = [PipelineExpressionBody$0, PipelineExpressionBody$1];
8255
+ }), PipelineExpressionBody$1 = (0, import_lib2.$T)((0, import_lib2.$S)(NewlineBinaryOpAllowed, (0, import_lib2.$P)((0, import_lib2.$S)(NotDedented, Pipe, __, PipelineTailItem))), function(value) {
8256
+ return value[1];
8257
+ }), PipelineExpressionBody$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NewlineBinaryOpAllowed), PipelineExpressionBodySameLine), function($skip, $loc, $0, $1, $2) {
8258
+ return $2.length ? $2 : $skip;
8259
+ }), PipelineExpressionBody$$ = [PipelineExpressionBody$0, PipelineExpressionBody$1, PipelineExpressionBody$2];
8206
8260
  function PipelineExpressionBody(ctx, state2) {
8207
8261
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PipelineExpressionBody", PipelineExpressionBody$$);
8208
8262
  }
@@ -8227,8 +8281,8 @@ ${js}`
8227
8281
  return makeAmpersandFunction({
8228
8282
  body: [" ", $1, ...$2]
8229
8283
  });
8230
- }), PipelineTailItem$4 = (0, import_lib2.$T)((0, import_lib2.$S)(PipelineHeadItem), function(value) {
8231
- return value[0];
8284
+ }), PipelineTailItem$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidNewlineBinaryOp, (0, import_lib2.$E)(PipelineHeadItem), RestoreNewlineBinaryOp), function($skip, $loc, $0, $1, $2, $3) {
8285
+ return $2 || $skip;
8232
8286
  }), PipelineTailItem$$ = [PipelineTailItem$0, PipelineTailItem$1, PipelineTailItem$2, PipelineTailItem$3, PipelineTailItem$4];
8233
8287
  function PipelineTailItem(ctx, state2) {
8234
8288
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PipelineTailItem", PipelineTailItem$$);
@@ -8691,7 +8745,7 @@ ${js}`
8691
8745
  children: $0,
8692
8746
  expression
8693
8747
  };
8694
- }), LeftHandSideExpression$1 = NamedBindingPattern, LeftHandSideExpression$2 = CallExpression, LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression$1, LeftHandSideExpression$2];
8748
+ }), LeftHandSideExpression$1 = CallExpression, LeftHandSideExpression$$ = [LeftHandSideExpression$0, LeftHandSideExpression$1];
8695
8749
  function LeftHandSideExpression(ctx, state2) {
8696
8750
  return (0, import_lib2.$EVENT_C)(ctx, state2, "LeftHandSideExpression", LeftHandSideExpression$$);
8697
8751
  }
@@ -9763,10 +9817,14 @@ ${js}`
9763
9817
  function OperatorAssociativity(ctx, state2) {
9764
9818
  return (0, import_lib2.$EVENT)(ctx, state2, "OperatorAssociativity", OperatorAssociativity$0);
9765
9819
  }
9766
- 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) {
9767
- var async = $1, parameters = $2, returnType = $3, arrow = $5, block = $6;
9820
+ 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) {
9821
+ var async = $1, parameters = $2, returnType = $3, ws = $4, arrow = $5, block = $6;
9768
9822
  async || (async = []);
9769
9823
  let generator = [];
9824
+ if ((!parameters.implicit || returnType || ws) && !block.bare) {
9825
+ let [first, ...rest] = block.children;
9826
+ (first === " {" || first?.[0]?.token === " ") && (block = { ...block, children: [first.slice(1), ...rest] });
9827
+ }
9770
9828
  return {
9771
9829
  type: "FunctionExpression",
9772
9830
  id: void 0,
@@ -9791,6 +9849,7 @@ ${js}`
9791
9849
  generator,
9792
9850
  parameters,
9793
9851
  returnType,
9852
+ ws,
9794
9853
  block
9795
9854
  ]
9796
9855
  };
@@ -9798,11 +9857,11 @@ ${js}`
9798
9857
  function ThinArrowFunction(ctx, state2) {
9799
9858
  return (0, import_lib2.$EVENT)(ctx, state2, "ThinArrowFunction", ThinArrowFunction$0);
9800
9859
  }
9801
- 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) {
9860
+ 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) {
9802
9861
  return { $loc, token: "->" };
9803
9862
  });
9804
- function Arrow(ctx, state2) {
9805
- return (0, import_lib2.$EVENT)(ctx, state2, "Arrow", Arrow$0);
9863
+ function ThinArrow(ctx, state2) {
9864
+ return (0, import_lib2.$EVENT)(ctx, state2, "ThinArrow", ThinArrow$0);
9806
9865
  }
9807
9866
  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) {
9808
9867
  var ws1 = $1, open = $2, block = $4, ws2 = $6, close = $7;
@@ -13433,9 +13492,9 @@ ${js}`
13433
13492
  }
13434
13493
  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) {
13435
13494
  return { $loc, token: $0 };
13436
- });
13495
+ }), InlineComment$1 = CoffeeMultiLineComment, InlineComment$$ = [InlineComment$0, InlineComment$1];
13437
13496
  function InlineComment(ctx, state2) {
13438
- return (0, import_lib2.$EVENT)(ctx, state2, "InlineComment", InlineComment$0);
13497
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "InlineComment", InlineComment$$);
13439
13498
  }
13440
13499
  var RestOfLine$0 = (0, import_lib2.$S)((0, import_lib2.$Q)((0, import_lib2.$C)(NonNewlineWhitespace, Comment)), EOL);
13441
13500
  function RestOfLine(ctx, state2) {
@@ -13445,7 +13504,7 @@ ${js}`
13445
13504
  function TrailingComment(ctx, state2) {
13446
13505
  return (0, import_lib2.$EVENT)(ctx, state2, "TrailingComment", TrailingComment$0);
13447
13506
  }
13448
- 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) {
13507
+ 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) {
13449
13508
  return value[1];
13450
13509
  });
13451
13510
  function _(ctx, state2) {
@@ -16701,11 +16760,15 @@ ${counts}`;
16701
16760
  if (options.sourceMap || options.inlineMap) {
16702
16761
  options.sourceMap = new SourceMap2(src);
16703
16762
  let code = generate_civet_default(ast2, options);
16704
- return checkErrors(), options.inlineMap ? `${code}
16705
- ${options.sourceMap.comment(filename2, filename2 + ".tsx")}` : {
16706
- code,
16707
- sourceMap: options.sourceMap
16708
- };
16763
+ if (checkErrors(), options.inlineMap) {
16764
+ let outputFilename = options.outputFilename ?? (options.js ? filename2 + ".jsx" : filename2 + ".tsx");
16765
+ return `${code}
16766
+ ${options.sourceMap.comment(filename2, outputFilename)}`;
16767
+ } else
16768
+ return {
16769
+ code,
16770
+ sourceMap: options.sourceMap
16771
+ };
16709
16772
  }
16710
16773
  let result = generate_civet_default(ast2, options);
16711
16774
  return options.errors?.length && (delete options.errors, options.sourceMap = new SourceMap2(src), generate_civet_default(ast2, options), checkErrors()), result;