@danielx/civet 0.10.7 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.js CHANGED
@@ -34,9 +34,9 @@ var Civet = (() => {
34
34
  mod
35
35
  )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
36
36
 
37
- // ../Hera/dist/machine.js
37
+ // node_modules/@danielx/hera/dist/machine.js
38
38
  var require_machine = __commonJS({
39
- "../Hera/dist/machine.js"(exports, module) {
39
+ "node_modules/@danielx/hera/dist/machine.js"(exports, module) {
40
40
  "use strict";
41
41
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
42
42
  for (var name in all)
@@ -531,7 +531,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
531
531
  return;
532
532
  }
533
533
  if (node = node, parent != null && (node.parent = parent), node.children)
534
- for (let ref = node.children, i1 = 0, len1 = ref.length; i1 < len1; i1++) {
534
+ for (let ref = node.children, i1 = 0, len12 = ref.length; i1 < len12; i1++) {
535
535
  let child = ref[i1];
536
536
  addParentPointers(child, node);
537
537
  }
@@ -1257,7 +1257,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1257
1257
  return i;
1258
1258
  }
1259
1259
  function arrayRecurse(array) {
1260
- for (let i2 = 0, len1 = array.length; i2 < len1; i2++) {
1260
+ for (let i2 = 0, len12 = array.length; i2 < len12; i2++) {
1261
1261
  let c = array[i2];
1262
1262
  if (c === child || Array.isArray(c) && arrayRecurse(c))
1263
1263
  return !0;
@@ -1405,7 +1405,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1405
1405
  }
1406
1406
  function adjustBindingElements(elements) {
1407
1407
  let names = elements.flatMap(($2) => $2.names || []), { length } = elements, blockPrefix, restIndex = -1, restCount = 0;
1408
- for (let i2 = 0, len1 = elements.length; i2 < len1; i2++) {
1408
+ for (let i2 = 0, len12 = elements.length; i2 < len12; i2++) {
1409
1409
  let i = i2, { type } = elements[i2];
1410
1410
  type === "BindingRestElement" && (restIndex < 0 && (restIndex = i), restCount++);
1411
1411
  }
@@ -2413,7 +2413,7 @@ ${js}`
2413
2413
  function recurse(pattern2) {
2414
2414
  switch (pattern2.type) {
2415
2415
  case "ArrayBindingPattern": {
2416
- for (let ref3 = pattern2.elements, i2 = 0, len1 = ref3.length; i2 < len1; i2++) {
2416
+ for (let ref3 = pattern2.elements, i2 = 0, len12 = ref3.length; i2 < len12; i2++) {
2417
2417
  let element = ref3[i2];
2418
2418
  recurse(element);
2419
2419
  }
@@ -3137,17 +3137,27 @@ ${js}`
3137
3137
  }
3138
3138
  let statements;
3139
3139
  if (generator)
3140
- iterationDefaultBody(statement), assignResults(block, (node) => ({
3141
- type: "YieldExpression",
3142
- expression: node,
3143
- children: [
3144
- {
3145
- type: "Yield",
3146
- token: "yield "
3147
- },
3148
- node
3149
- ]
3150
- })), statements = [
3140
+ iterationDefaultBody(statement), assignResults(block, (node) => {
3141
+ let star;
3142
+ if (node && typeof node == "object" && "type" in node && node.type === "SpreadElement" && "expression" in node) {
3143
+ let { expression } = node;
3144
+ star = "*", node = expression;
3145
+ }
3146
+ return {
3147
+ type: "YieldExpression",
3148
+ expression: node,
3149
+ star,
3150
+ children: [
3151
+ {
3152
+ type: "Yield",
3153
+ children: ["yield"]
3154
+ },
3155
+ star,
3156
+ " ",
3157
+ node
3158
+ ]
3159
+ };
3160
+ }), statements = [
3151
3161
  ["", statement]
3152
3162
  ];
3153
3163
  else {
@@ -3284,6 +3294,12 @@ ${js}`
3284
3294
  block.bare = block.implicitlyReturned = !1, implicitlyReturned && processReturn(block.parent, !0);
3285
3295
  }
3286
3296
  }
3297
+ function unbraceBlock(block) {
3298
+ if (block.bare)
3299
+ return;
3300
+ let ref;
3301
+ block.children[0] === " {" && (ref = block.children)[ref.length - 1] === "}" && (block.children.shift(), block.children.pop(), block.bare = !0);
3302
+ }
3287
3303
  function duplicateBlock(block) {
3288
3304
  let expressions = [...block.expressions], children;
3289
3305
  return block.children === block.expressions ? children = expressions : (children = [...block.children], children.splice(children.indexOf(block.expressions), 1, expressions)), {
@@ -3352,15 +3368,35 @@ ${js}`
3352
3368
  }
3353
3369
  function processBlocks(statements) {
3354
3370
  insertSemicolon(statements);
3355
- for (let ref = gatherRecursive(statements, ($) => $.type === "BlockStatement"), i2 = 0, len1 = ref.length; i2 < len1; i2++) {
3356
- let { expressions } = ref[i2];
3357
- processBlocks(expressions);
3371
+ 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")) {
3374
+ let object = block.expressions[0][1].expression;
3375
+ if (!(() => {
3376
+ let results = !0;
3377
+ for (let prop of object.properties)
3378
+ if (!(prop.type === "Property" && prop.implicitName)) {
3379
+ results = !1;
3380
+ break;
3381
+ }
3382
+ return results;
3383
+ })())
3384
+ continue;
3385
+ block.expressions[0][1] = block.expressions[0][1].expression, unbraceBlock(block);
3386
+ 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));
3389
+ let colon = prop.children.indexOf(": ");
3390
+ colon < 0 || prop.children[colon - 1] === prop.name && prop.children.splice(colon - 1, 2);
3391
+ }
3392
+ }
3393
+ processBlocks(block.expressions);
3358
3394
  }
3359
3395
  }
3360
3396
  function insertSemicolon(statements) {
3361
3397
  let l = statements.length;
3362
- for (let i3 = 0, len22 = statements.length; i3 < len22; i3++) {
3363
- let i = i3, s = statements[i3];
3398
+ for (let i4 = 0, len3 = statements.length; i4 < len3; i4++) {
3399
+ let i = i4, s = statements[i4];
3364
3400
  if (i < l - 1 && needsPrecedingSemicolon(statements[i + 1][1])) {
3365
3401
  let delim = s[2];
3366
3402
  delim ? typeof delim == "string" && !delim.match(/;/) && (s[2] = `;${delim}`) : s[2] = ";";
@@ -3371,8 +3407,8 @@ ${js}`
3371
3407
  if (!exp)
3372
3408
  return !1;
3373
3409
  if (Array.isArray(exp)) {
3374
- for (let i4 = 0, len3 = exp.length; i4 < len3; i4++) {
3375
- let child = exp[i4];
3410
+ for (let i5 = 0, len4 = exp.length; i5 < len4; i5++) {
3411
+ let child = exp[i5];
3376
3412
  if (child != null)
3377
3413
  return needsPrecedingSemicolon(child);
3378
3414
  }
@@ -3401,8 +3437,8 @@ ${js}`
3401
3437
  }
3402
3438
  }
3403
3439
  function blockContainingStatement(exp) {
3404
- let child = exp, parent = exp.parent, m;
3405
- for (; parent != null && (m = parent.type, m === "StatementExpression" || m === "PipelineExpression" || m === "UnwrappedExpression"); )
3440
+ let child = exp, parent = exp.parent, m2;
3441
+ for (; parent != null && (m2 = parent.type, m2 === "StatementExpression" || m2 === "PipelineExpression" || m2 === "UnwrappedExpression"); )
3406
3442
  child = parent, parent = parent.parent;
3407
3443
  if (parent?.type !== "BlockStatement")
3408
3444
  return;
@@ -3447,7 +3483,7 @@ ${js}`
3447
3483
  ], precedenceMap = /* @__PURE__ */ new Map();
3448
3484
  for (let i1 = 0, len3 = precedenceOrder.length; i1 < len3; i1++) {
3449
3485
  let prec = i1, ops = precedenceOrder[i1];
3450
- for (let i2 = 0, len1 = ops.length; i2 < len1; i2++) {
3486
+ for (let i2 = 0, len12 = ops.length; i2 < len12; i2++) {
3451
3487
  let op = ops[i2];
3452
3488
  precedenceMap.set(op, prec);
3453
3489
  }
@@ -3630,7 +3666,7 @@ ${js}`
3630
3666
  let errors = !1, isPattern = !1;
3631
3667
  if (clauses.some(($4) => $4.type === "PatternClause")) {
3632
3668
  isPattern = !0;
3633
- for (let i2 = 0, len1 = clauses.length; i2 < len1; i2++) {
3669
+ for (let i2 = 0, len12 = clauses.length; i2 < len12; i2++) {
3634
3670
  let c = clauses[i2];
3635
3671
  c.type === "PatternClause" || c.type === "DefaultClause" || (errors = !0, c.children.push({
3636
3672
  type: "Error",
@@ -4053,7 +4089,7 @@ ${js}`
4053
4089
  });
4054
4090
  }
4055
4091
  function processDeclarations(statements) {
4056
- for (let ref1 = gatherRecursiveAll(statements, ($) => $.type === "Declaration"), i1 = 0, len1 = ref1.length; i1 < len1; i1++) {
4092
+ for (let ref1 = gatherRecursiveAll(statements, ($) => $.type === "Declaration"), i1 = 0, len12 = ref1.length; i1 < len12; i1++) {
4057
4093
  let declaration = ref1[i1], { bindings } = declaration;
4058
4094
  if (bindings != null) {
4059
4095
  for (let i2 = bindings.length + -1; i2 >= 0; --i2) {
@@ -4108,7 +4144,7 @@ ${js}`
4108
4144
  let { expression: exp } = initializer, ws;
4109
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"))
4110
4146
  return;
4111
- let pre = [], statementExp = exp.statement, blockStatement = ["", statementExp], ref;
4147
+ let pre = [], statementExp = exp.statement, blockStatement = [ws || "", statementExp, ";"], ref;
4112
4148
  if (statementExp.type === "IterationExpression") {
4113
4149
  if (statementExp.async || statementExp.generator)
4114
4150
  return;
@@ -4123,9 +4159,9 @@ ${js}`
4123
4159
  }));
4124
4160
  let refDec = {
4125
4161
  type: "Declaration",
4126
- children: ["let ", ref, ";"]
4162
+ children: ["let ", ref]
4127
4163
  };
4128
- pre.unshift(refDec);
4164
+ pre.unshift(["", refDec, ";"]);
4129
4165
  } else
4130
4166
  wrapIterationReturningResults(statement2, () => {
4131
4167
  }), ref = initializer.expression = initializer.children[2] = statement2.resultsRef;
@@ -4137,11 +4173,11 @@ ${js}`
4137
4173
  }));
4138
4174
  let refDec = {
4139
4175
  type: "Declaration",
4140
- children: ["let ", ref, ";"]
4176
+ children: ["let ", ref]
4141
4177
  };
4142
- pre.unshift(refDec), ws && pre.push(ws);
4178
+ pre.unshift(["", refDec, ";"]);
4143
4179
  }
4144
- return statement.children.unshift(pre, blockStatement, ";"), updateParentPointers(blockStatement, statement), ref;
4180
+ return statement.children.unshift(...pre, blockStatement), updateParentPointers(blockStatement, statement), ref;
4145
4181
  }
4146
4182
  function processDeclarationCondition(condition, rootCondition, parent) {
4147
4183
  if (condition.type !== "DeclarationCondition")
@@ -4377,24 +4413,55 @@ ${js}`
4377
4413
  };
4378
4414
  }
4379
4415
  function dynamizeImportDeclarationExpression($0) {
4380
- let [imp, ws1, named, ws2, from] = $0, object = convertNamedImportsToObject(named), dot = ".";
4381
- return processCallMemberExpression({
4382
- type: "CallExpression",
4416
+ let [imp, ws1, imports, ws2, from] = $0, awaitExpression = {
4417
+ type: "AwaitExpression",
4383
4418
  children: [
4384
- { type: "Await", children: "await" },
4419
+ { type: "Await", children: ["await"] },
4385
4420
  " ",
4386
4421
  imp,
4387
4422
  trimFirstSpace(ws2),
4388
- dynamizeFromClause(from),
4389
- {
4390
- type: "PropertyGlob",
4391
- dot,
4392
- object,
4393
- children: [ws1, dot, object],
4394
- reversed: !0
4395
- }
4423
+ dynamizeFromClause(from)
4396
4424
  ]
4397
- });
4425
+ }, dot = {
4426
+ type: "AccessStart",
4427
+ children: ["."],
4428
+ optional: !1
4429
+ };
4430
+ switch (imports?.type) {
4431
+ case "Identifier":
4432
+ return processCallMemberExpression({
4433
+ type: "CallExpression",
4434
+ children: [
4435
+ parenthesizeExpression(awaitExpression),
4436
+ {
4437
+ type: "PropertyAccess",
4438
+ dot,
4439
+ name: "default",
4440
+ children: [ws1, dot, "default"]
4441
+ }
4442
+ ]
4443
+ });
4444
+ case "Star":
4445
+ return parenthesizeExpression(awaitExpression);
4446
+ case "Declaration": {
4447
+ let object = convertNamedImportsToObject(imports);
4448
+ return processCallMemberExpression({
4449
+ type: "CallExpression",
4450
+ children: [
4451
+ parenthesizeExpression(awaitExpression),
4452
+ {
4453
+ type: "PropertyGlob",
4454
+ dot,
4455
+ object,
4456
+ children: [ws1, dot, object],
4457
+ reversed: !0
4458
+ }
4459
+ ]
4460
+ });
4461
+ }
4462
+ default:
4463
+ throw new Error("Unsupported dynamic import");
4464
+ }
4398
4465
  }
4399
4466
  function convertWithClause(withClause, extendsClause) {
4400
4467
  let extendsToken, extendsTarget, ws;
@@ -4613,7 +4680,7 @@ ${js}`
4613
4680
  function processPipelineExpressions(statements) {
4614
4681
  for (let ref1 = gatherRecursiveAll(statements, ($1) => $1.type === "PipelineExpression"), i1 = 0, len3 = ref1.length; i1 < len3; i1++) {
4615
4682
  let s = ref1[i1], [ws, , body] = s.children, [, arg] = s.children, children = [ws], comma = blockContainingStatement(s) ? ";" : ",", usingRef = null;
4616
- for (let i2 = 0, len1 = body.length; i2 < len1; i2++) {
4683
+ for (let i2 = 0, len12 = body.length; i2 < len12; i2++) {
4617
4684
  let i = i2, step = body[i2], [leadingComment, pipe, trailingComment, expr] = step, returns = pipe.token === "||>", ref, result, returning = returns ? arg : null;
4618
4685
  if (pipe.token === "|>=") {
4619
4686
  let initRef;
@@ -5142,7 +5209,7 @@ ${js}`
5142
5209
  return $0;
5143
5210
  let stringPart = (() => {
5144
5211
  let results1 = [];
5145
- for (let i2 = 0, len1 = strWithSubstitutions.length; i2 < len1; i2++) {
5212
+ for (let i2 = 0, len12 = strWithSubstitutions.length; i2 < len12; i2++) {
5146
5213
  let part = strWithSubstitutions[i2];
5147
5214
  results1.push(part.token ?? "s");
5148
5215
  }
@@ -5211,6 +5278,9 @@ ${js}`
5211
5278
 
5212
5279
  // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\lib.civet.jsx
5213
5280
  var xor = (a, b) => a ? !b && a : b;
5281
+ function len1(arr, length) {
5282
+ return arr.length === length;
5283
+ }
5214
5284
  function addPostfixStatement(statement, ws, post) {
5215
5285
  let expressions = [
5216
5286
  ...post.blockPrefix || [],
@@ -5503,7 +5573,7 @@ ${js}`
5503
5573
  children: call.children.map((x) => x === call.args ? args : x)
5504
5574
  }, isComma(args[args.length - 1]) && (args[args.length - 1] = deepCopy(args[args.length - 1]), isComma(args[args.length - 1]).token = "");
5505
5575
  let commaCount = 0;
5506
- for (let i2 = 0, len1 = args.length; i2 < len1; i2++) {
5576
+ for (let i2 = 0, len22 = args.length; i2 < len22; i2++) {
5507
5577
  let i = i2, arg = args[i2];
5508
5578
  isComma(arg) && (arg = args[i] = deepCopy(arg), isComma(arg).token = `)${op.token}(`, commaCount++);
5509
5579
  }
@@ -5526,16 +5596,16 @@ ${js}`
5526
5596
  return children[0];
5527
5597
  }
5528
5598
  }
5529
- for (let i3 = 0, len22 = children.length; i3 < len22; i3++) {
5599
+ for (let i3 = 0, len3 = children.length; i3 < len3; i3++) {
5530
5600
  let i = i3, glob = children[i3];
5531
5601
  if (glob?.type === "PropertyGlob") {
5532
5602
  let prefix = children.slice(0, i), parts = [], ref;
5533
- if (prefix.length > 1 && glob.object.properties.length > 1) {
5534
- ref = makeRef();
5603
+ if (needsRef(prefix) && glob.object.properties.length > 1) {
5604
+ Array.isArray(prefix) && len1(prefix, 1) && typeof prefix[0] == "object" && prefix[0] != null && "type" in prefix[0] && prefix[0].type === "ParenthesizedExpression" && "implicit" in prefix[0] && prefix[0].implicit === !0 && (prefix = [prefix[0].expression]), ref = makeRef();
5535
5605
  let { refAssignment } = makeRefAssignment(ref, prefix);
5536
5606
  prefix = [makeLeftHandSideExpression(refAssignment)];
5537
5607
  }
5538
- prefix = prefix.concat(glob.dot);
5608
+ let prefixDot = [...prefix, glob.dot];
5539
5609
  for (let part of glob.object.properties) {
5540
5610
  if (part.type === "Error") {
5541
5611
  parts.push(part);
@@ -5548,7 +5618,7 @@ ${js}`
5548
5618
  });
5549
5619
  continue;
5550
5620
  }
5551
- if (part.value && !["CallExpression", "MemberExpression", "Identifier"].includes(part.value.type)) {
5621
+ if (part.value && !["CallExpression", "MemberExpression", "Identifier", "StringLiteral", "ComputedPropertyName"].includes(part.value.type)) {
5552
5622
  parts.push({
5553
5623
  type: "Error",
5554
5624
  message: `Glob pattern must have call or member expression value, found ${JSON.stringify(part.value)}`
@@ -5556,7 +5626,19 @@ ${js}`
5556
5626
  continue;
5557
5627
  }
5558
5628
  let suppressPrefix = !1, name = part.name, value = part.value ?? name, wValue = getTrimmingSpace(part.value);
5559
- [value, suppressPrefix] = handleThisPrivateShorthands(value), glob.reversed && ([name, value] = [value, name]), suppressPrefix || (value = prefix.concat(trimFirstSpace(value)), ref != null && (prefix = [ref].concat(glob.dot))), wValue && value.unshift(wValue), part.type === "SpreadProperty" ? parts.push({
5629
+ [value, suppressPrefix] = handleThisPrivateShorthands(value), glob.reversed && ([name, value] = [value, name]), suppressPrefix || (value.type === "StringLiteral" ? value = [
5630
+ ...prefix,
5631
+ {
5632
+ type: "Index",
5633
+ children: ["[", trimFirstSpace(value), "]"]
5634
+ }
5635
+ ] : value.type === "ComputedPropertyName" ? value = [
5636
+ ...prefix,
5637
+ {
5638
+ type: "Index",
5639
+ children: [trimFirstSpace(value)]
5640
+ }
5641
+ ] : value = [...prefixDot, trimFirstSpace(value)], ref != null && (prefix = [ref], prefixDot = [...prefix, glob.dot])), wValue && value.unshift(wValue), part.type === "SpreadProperty" ? parts.push({
5560
5642
  type: part.type,
5561
5643
  value,
5562
5644
  dots: part.dots,
@@ -5865,7 +5947,7 @@ ${js}`
5865
5947
  );
5866
5948
  }
5867
5949
  function processAssignments(statements) {
5868
- for (let ref8 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len3 = ref8.length; i5 < len3; i5++) {
5950
+ for (let ref8 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len4 = ref8.length; i5 < len4; i5++) {
5869
5951
  let extractAssignment = function(lhs) {
5870
5952
  let expr = lhs;
5871
5953
  for (; expr.type === "ParenthesizedExpression"; )
@@ -5880,7 +5962,7 @@ ${js}`
5880
5962
  case "AssignmentExpression": {
5881
5963
  if (!exp.lhs)
5882
5964
  continue;
5883
- for (let ref10 = exp.lhs, i6 = 0, len4 = ref10.length; i6 < len4; i6++) {
5965
+ for (let ref10 = exp.lhs, i6 = 0, len5 = ref10.length; i6 < len5; i6++) {
5884
5966
  let lhsPart = ref10[i6], ref11;
5885
5967
  if (ref11 = extractAssignment(lhsPart[1])) {
5886
5968
  let newLhs = ref11;
@@ -5906,7 +5988,7 @@ ${js}`
5906
5988
  }), replaceNode(exp, newMemberExp));
5907
5989
  }
5908
5990
  }
5909
- for (let ref12 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len5 = ref12.length; i7 < len5; i7++) {
5991
+ for (let ref12 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len6 = ref12.length; i7 < len6; i7++) {
5910
5992
  let exp = ref12[i7];
5911
5993
  if (exp.names !== null)
5912
5994
  continue;
@@ -5953,7 +6035,7 @@ ${js}`
5953
6035
  let members = lhs.children, lastMember = members[members.length - 1];
5954
6036
  if (lastMember.type === "SliceExpression") {
5955
6037
  let { start, end, children: c } = lastMember;
5956
- if (c[0].token = ".splice(", c[1] = start, c[2] = ", ", end ? c[3] = [end, " - ", start] : c[3] = ["1/0"], c[4] = [", ...", $2], c[5] = ")", lastAssignment.pop(), isWhitespaceOrEmpty(lastAssignment[2]) && lastAssignment.pop(), $1.length > 1)
6038
+ if (c[0].token = ".splice(", c[1] = start, c[2] = ", ", end ? c[3] = [makeLeftHandSideExpression(end), " - ", makeLeftHandSideExpression(start)] : c[3] = ["1/0"], c[4] = [", ...", $2], c[5] = ")", lastAssignment.pop(), isWhitespaceOrEmpty(lastAssignment[2]) && lastAssignment.pop(), $1.length > 1)
5957
6039
  throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
5958
6040
  exp.children = [$1], exp.names = [];
5959
6041
  break;
@@ -6055,7 +6137,7 @@ ${js}`
6055
6137
  }
6056
6138
  function processTypes(node) {
6057
6139
  let results1 = [];
6058
- for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len6 = ref16.length; i8 < len6; i8++) {
6140
+ for (let ref16 = gatherRecursiveAll(node, ($11) => $11.type === "TypeUnary"), i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
6059
6141
  let unary = ref16[i8], suffixIndex = unary.suffix.length - 1, results2 = [];
6060
6142
  for (; suffixIndex >= 0; ) {
6061
6143
  let suffix = unary.suffix[suffixIndex];
@@ -6155,7 +6237,7 @@ ${js}`
6155
6237
  return results1;
6156
6238
  }
6157
6239
  function processStatementExpressions(statements) {
6158
- for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len7 = ref18.length; i9 < len7; i9++) {
6240
+ for (let ref18 = gatherRecursiveAll(statements, ($12) => $12.type === "StatementExpression"), i9 = 0, len8 = ref18.length; i9 < len8; i9++) {
6159
6241
  let exp = ref18[i9], { maybe, statement } = exp;
6160
6242
  if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
6161
6243
  replaceNode(exp, statement);
@@ -6205,7 +6287,7 @@ ${js}`
6205
6287
  });
6206
6288
  }
6207
6289
  function processFinallyClauses(statements) {
6208
- for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len8 = ref20.length; i10 < len8; i10++) {
6290
+ for (let ref20 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len9 = ref20.length; i10 < len9; i10++) {
6209
6291
  let f = ref20[i10], ref21;
6210
6292
  if (!((ref21 = blockContainingStatement(f)) && typeof ref21 == "object" && "block" in ref21 && "index" in ref21))
6211
6293
  throw new Error("finally clause must be inside try statement or block");
@@ -6269,7 +6351,7 @@ ${js}`
6269
6351
  }
6270
6352
  }
6271
6353
  function processCoffeeClasses(statements) {
6272
- for (let ref22 = gatherRecursiveAll(statements, ($13) => $13.type === "ClassExpression"), i11 = 0, len9 = ref22.length; i11 < len9; i11++) {
6354
+ for (let ref22 = gatherRecursiveAll(statements, ($13) => $13.type === "ClassExpression"), i11 = 0, len10 = ref22.length; i11 < len10; i11++) {
6273
6355
  let ce = ref22[i11], { expressions } = ce.body, indent = expressions[0]?.[0] ?? `
6274
6356
  `, autoBinds = expressions.filter(($14) => $14[1]?.autoBind);
6275
6357
  if (autoBinds.length) {
@@ -6307,7 +6389,7 @@ ${js}`
6307
6389
  0,
6308
6390
  ...(() => {
6309
6391
  let results3 = [];
6310
- for (let i12 = 0, len10 = autoBinds.length; i12 < len10; i12++) {
6392
+ for (let i12 = 0, len11 = autoBinds.length; i12 < len11; i12++) {
6311
6393
  let [, a] = autoBinds[i12];
6312
6394
  results3.push([indent, ["this.", a.name, " = this.", a.name, ".bind(this)"], ";"]);
6313
6395
  }
@@ -6370,22 +6452,22 @@ ${js}`
6370
6452
  }
6371
6453
  function processRepl(root, rootIIFE) {
6372
6454
  let topBlock = gatherRecursive(rootIIFE, ($21) => $21.type === "BlockStatement")[0], i = 0;
6373
- for (let ref23 = gatherRecursiveWithinFunction(topBlock, ($22) => $22.type === "Declaration"), i14 = 0, len11 = ref23.length; i14 < len11; i14++) {
6455
+ for (let ref23 = gatherRecursiveWithinFunction(topBlock, ($22) => $22.type === "Declaration"), i14 = 0, len12 = ref23.length; i14 < len12; i14++) {
6374
6456
  let decl = ref23[i14];
6375
6457
  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(",")}`, ";"]));
6376
6458
  }
6377
- for (let ref24 = gatherRecursive(topBlock, ($23) => $23.type === "FunctionExpression"), i15 = 0, len12 = ref24.length; i15 < len12; i15++) {
6459
+ for (let ref24 = gatherRecursive(topBlock, ($23) => $23.type === "FunctionExpression"), i15 = 0, len13 = ref24.length; i15 < len13; i15++) {
6378
6460
  let func = ref24[i15];
6379
6461
  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}`, ";"])));
6380
6462
  }
6381
- for (let ref25 = gatherRecursiveWithinFunction(topBlock, ($24) => $24.type === "ClassExpression"), i16 = 0, len13 = ref25.length; i16 < len13; i16++) {
6463
+ for (let ref25 = gatherRecursiveWithinFunction(topBlock, ($24) => $24.type === "ClassExpression"), i16 = 0, len14 = ref25.length; i16 < len14; i16++) {
6382
6464
  let classExp = ref25[i16], m8;
6383
6465
  (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}`, ";"]));
6384
6466
  }
6385
6467
  }
6386
6468
  function processPlaceholders(statements) {
6387
6469
  let placeholderMap = /* @__PURE__ */ new Map(), liftedIfs = /* @__PURE__ */ new Set();
6388
- for (let ref26 = gatherRecursiveAll(statements, ($25) => $25.type === "Placeholder"), i17 = 0, len14 = ref26.length; i17 < len14; i17++) {
6470
+ for (let ref26 = gatherRecursiveAll(statements, ($25) => $25.type === "Placeholder"), i17 = 0, len15 = ref26.length; i17 < len15; i17++) {
6389
6471
  let exp = ref26[i17], ancestor;
6390
6472
  if (exp.subtype === ".") {
6391
6473
  ({ ancestor } = findAncestor(
@@ -6455,7 +6537,7 @@ ${js}`
6455
6537
  }
6456
6538
  for (let [ancestor, placeholders] of placeholderMap) {
6457
6539
  let ref = makeRef("$"), typeSuffix;
6458
- for (let i18 = 0, len15 = placeholders.length; i18 < len15; i18++) {
6540
+ for (let i18 = 0, len16 = placeholders.length; i18 < len16; i18++) {
6459
6541
  let placeholder = placeholders[i18];
6460
6542
  typeSuffix ??= placeholder.typeSuffix;
6461
6543
  let ref27;
@@ -6551,24 +6633,28 @@ ${js}`
6551
6633
  let type = [], lastType;
6552
6634
  for (let child of node.jsxChildren) {
6553
6635
  switch (child.type) {
6554
- case "JSXText":
6636
+ case "JSXText": {
6555
6637
  lastType !== "JSXText" && type.push("string");
6556
6638
  break;
6557
- case "JSXElement":
6639
+ }
6640
+ case "JSXElement": {
6558
6641
  type.push(typeOfJSXElement(child, config2));
6559
6642
  break;
6560
- case "JSXFragment":
6643
+ }
6644
+ case "JSXFragment": {
6561
6645
  type.push(...typeOfJSXFragment(child, config2));
6562
6646
  break;
6563
- case "JSXChildExpression":
6647
+ }
6648
+ case "JSXChildExpression": {
6564
6649
  child.expression && type.push(["typeof ", child.expression]);
6565
6650
  break;
6651
+ }
6566
6652
  default:
6567
6653
  throw new Error(`unknown child in JSXFragment: ${JSON.stringify(child)}`);
6568
6654
  }
6569
6655
  lastType = child.type;
6570
6656
  }
6571
- return type.length === 1 ? type[0] : (type = type.flatMap((t) => [t, ", "]), type.pop(), ["[", type, "]"]);
6657
+ return type.length === 1 ? type[0] : (type = type.flatMap(($26) => [$26, ", "]), type.pop(), ["[", type, "]"]);
6572
6658
  }
6573
6659
  }
6574
6660
 
@@ -6788,6 +6874,8 @@ ${js}`
6788
6874
  NonSingleBracedBlock,
6789
6875
  DeclarationOrStatement,
6790
6876
  SingleLineStatements,
6877
+ ObjectSingleLineStatements,
6878
+ BracedObjectSingleLineStatements,
6791
6879
  PostfixedSingleLineStatements,
6792
6880
  PostfixedSingleLineNoCommaStatements,
6793
6881
  NestedBlockStatements,
@@ -6968,6 +7056,10 @@ ${js}`
6968
7056
  ForbidNewlineBinaryOp,
6969
7057
  RestoreNewlineBinaryOp,
6970
7058
  NewlineBinaryOpAllowed,
7059
+ AllowImplicitFragment,
7060
+ ForbidImplicitFragment,
7061
+ RestoreImplicitFragment,
7062
+ ImplicitFragmentAllowed,
6971
7063
  AllowPipeline,
6972
7064
  ForbidPipeline,
6973
7065
  RestorePipeline,
@@ -6993,11 +7085,15 @@ ${js}`
6993
7085
  NameSpaceImport,
6994
7086
  NamedImports,
6995
7087
  OperatorNamedImports,
7088
+ DynamicNamedImports,
7089
+ DynamicImportContents,
6996
7090
  FromClause,
6997
7091
  ImportAssertion,
6998
7092
  TypeAndImportSpecifier,
6999
7093
  ImportSpecifier,
7000
7094
  OperatorImportSpecifier,
7095
+ DynamicImportSpecifier,
7096
+ DynamicModuleExportName,
7001
7097
  ImportAsToken,
7002
7098
  ModuleExportName,
7003
7099
  ModuleSpecifier,
@@ -7796,7 +7892,10 @@ ${js}`
7796
7892
  function SingleLineBinaryOpRHS(ctx, state2) {
7797
7893
  return (0, import_lib2.$EVENT)(ctx, state2, "SingleLineBinaryOpRHS", SingleLineBinaryOpRHS$0);
7798
7894
  }
7799
- var RHS$0 = ExpressionizedStatementWithTrailingCallExpressions, RHS$1 = UnaryExpression, RHS$$ = [RHS$0, RHS$1];
7895
+ var RHS$0 = ExpressionizedStatementWithTrailingCallExpressions, RHS$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidImplicitFragment, (0, import_lib2.$E)(UnaryExpression), RestoreImplicitFragment), function($skip, $loc, $0, $1, $2, $3) {
7896
+ var exp = $2;
7897
+ return exp || $skip;
7898
+ }), RHS$$ = [RHS$0, RHS$1];
7800
7899
  function RHS(ctx, state2) {
7801
7900
  return (0, import_lib2.$EVENT_C)(ctx, state2, "RHS", RHS$$);
7802
7901
  }
@@ -8049,7 +8148,7 @@ ${js}`
8049
8148
  children: [expressions],
8050
8149
  implicitlyReturned: !0
8051
8150
  };
8052
- }), FatArrowBody$1 = NoCommaBracedOrEmptyBlock, FatArrowBody$$ = [FatArrowBody$0, FatArrowBody$1];
8151
+ }), FatArrowBody$1 = BracedObjectSingleLineStatements, FatArrowBody$2 = NoCommaBracedOrEmptyBlock, FatArrowBody$$ = [FatArrowBody$0, FatArrowBody$1, FatArrowBody$2];
8053
8152
  function FatArrowBody(ctx, state2) {
8054
8153
  return (0, import_lib2.$EVENT_C)(ctx, state2, "FatArrowBody", FatArrowBody$$);
8055
8154
  }
@@ -8602,9 +8701,9 @@ ${js}`
8602
8701
  type: "CallExpression",
8603
8702
  children: [$1, ...$2, ...rest.flat()]
8604
8703
  });
8605
- }), CallExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, NamedImports, __, FromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8704
+ }), CallExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Import, _, DynamicImportContents, __, FromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8606
8705
  return dynamizeImportDeclarationExpression($0);
8607
- }), CallExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __, Import, _, NamedImports), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8706
+ }), CallExpression$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(FromClause, __, Import, _, DynamicImportContents), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8608
8707
  var from = $1, fws = $2, i = $3, iws = $4, imports = $5;
8609
8708
  return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
8610
8709
  }), CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
@@ -9664,7 +9763,7 @@ ${js}`
9664
9763
  function OperatorAssociativity(ctx, state2) {
9665
9764
  return (0, import_lib2.$EVENT)(ctx, state2, "OperatorAssociativity", OperatorAssociativity$0);
9666
9765
  }
9667
- 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, NoCommaBracedOrEmptyBlock), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
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) {
9668
9767
  var async = $1, parameters = $2, returnType = $3, arrow = $5, block = $6;
9669
9768
  async || (async = []);
9670
9769
  let generator = [];
@@ -9788,7 +9887,7 @@ ${js}`
9788
9887
  }
9789
9888
  var ThenBlock$0 = (0, import_lib2.$T)((0, import_lib2.$S)(NoBlock, EmptyBlock), function(value) {
9790
9889
  return value[1];
9791
- }), ThenBlock$1 = ImplicitNestedBlock, ThenBlock$2 = SingleLineStatements, ThenBlock$$ = [ThenBlock$0, ThenBlock$1, ThenBlock$2];
9890
+ }), ThenBlock$1 = ImplicitNestedBlock, ThenBlock$2 = ObjectSingleLineStatements, ThenBlock$3 = SingleLineStatements, ThenBlock$$ = [ThenBlock$0, ThenBlock$1, ThenBlock$2, ThenBlock$3];
9792
9891
  function ThenBlock(ctx, state2) {
9793
9892
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ThenBlock", ThenBlock$$);
9794
9893
  }
@@ -9837,9 +9936,9 @@ ${js}`
9837
9936
  function BlockOrEmptyStatement(ctx, state2) {
9838
9937
  return (0, import_lib2.$EVENT_C)(ctx, state2, "BlockOrEmptyStatement", BlockOrEmptyStatement$$);
9839
9938
  }
9840
- var BlockOrEmpty$0 = Block, BlockOrEmpty$1 = (0, import_lib2.$T)((0, import_lib2.$S)(NoBlock, EmptyBlock), function(value) {
9939
+ var BlockOrEmpty$0 = ObjectSingleLineStatements, BlockOrEmpty$1 = Block, BlockOrEmpty$2 = (0, import_lib2.$T)((0, import_lib2.$S)(NoBlock, EmptyBlock), function(value) {
9841
9940
  return value[1];
9842
- }), BlockOrEmpty$$ = [BlockOrEmpty$0, BlockOrEmpty$1];
9941
+ }), BlockOrEmpty$$ = [BlockOrEmpty$0, BlockOrEmpty$1, BlockOrEmpty$2];
9843
9942
  function BlockOrEmpty(ctx, state2) {
9844
9943
  return (0, import_lib2.$EVENT_C)(ctx, state2, "BlockOrEmpty", BlockOrEmpty$$);
9845
9944
  }
@@ -9947,6 +10046,24 @@ ${js}`
9947
10046
  function SingleLineStatements(ctx, state2) {
9948
10047
  return (0, import_lib2.$EVENT)(ctx, state2, "SingleLineStatements", SingleLineStatements$0);
9949
10048
  }
10049
+ var ObjectSingleLineStatements$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), BracedObjectLiteral)), SingleLineStatements), function($skip, $loc, $0, $1, $2) {
10050
+ var block = $2;
10051
+ if (block.bare && block.expressions.length === 1) {
10052
+ let expression = block.expressions[0][1];
10053
+ expression.type === "ParenthesizedExpression" && expression.implicit && expression.expression.type === "ObjectExpression" && (block = { ...block, unwrapObject: !0 });
10054
+ }
10055
+ return block;
10056
+ });
10057
+ function ObjectSingleLineStatements(ctx, state2) {
10058
+ return (0, import_lib2.$EVENT)(ctx, state2, "ObjectSingleLineStatements", ObjectSingleLineStatements$0);
10059
+ }
10060
+ var BracedObjectSingleLineStatements$0 = (0, import_lib2.$TV)(ObjectSingleLineStatements, function($skip, $loc, $0, $1) {
10061
+ var block = $0;
10062
+ return bracedBlock(block);
10063
+ });
10064
+ function BracedObjectSingleLineStatements(ctx, state2) {
10065
+ return (0, import_lib2.$EVENT)(ctx, state2, "BracedObjectSingleLineStatements", BracedObjectSingleLineStatements$0);
10066
+ }
9950
10067
  var PostfixedSingleLineStatements$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$N)(EOS)), StatementListItem, SemicolonDelimiter)), (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$N)(EOS)), StatementListItem, (0, import_lib2.$E)(SemicolonDelimiter)))), function($skip, $loc, $0, $1, $2) {
9951
10068
  var stmts = $1, last = $2;
9952
10069
  let children = [...stmts];
@@ -10610,7 +10727,8 @@ ${js}`
10610
10727
  children: [ws, id],
10611
10728
  name: id,
10612
10729
  names: id.names,
10613
- value: id
10730
+ value: id,
10731
+ implicitName: !0
10614
10732
  };
10615
10733
  }), PropertyDefinition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), MethodDefinition), function($skip, $loc, $0, $1, $2) {
10616
10734
  var ws = $1, def = $2;
@@ -10649,7 +10767,8 @@ ${js}`
10649
10767
  if (type === "Index")
10650
10768
  ({ ref, refAssignment } = maybeRefAssignment(expression)), refAssignment ? (name = {
10651
10769
  type: "ComputedPropertyName",
10652
- children: [last.children[0], "(", refAssignment, ",", ref, ")", ...last.children.slice(-2)]
10770
+ children: [last.children[0], "(", refAssignment, ",", ref, ")", ...last.children.slice(-2)],
10771
+ implicit: !0
10653
10772
  }, value = {
10654
10773
  ...value,
10655
10774
  children: value.children.map((c) => c === last ? {
@@ -10658,7 +10777,8 @@ ${js}`
10658
10777
  } : c)
10659
10778
  }) : name = {
10660
10779
  type: "ComputedPropertyName",
10661
- children: last.children
10780
+ children: last.children,
10781
+ implicit: !0
10662
10782
  };
10663
10783
  else if ({ name } = last, !name) return $skip;
10664
10784
  return name[0] === "#" && (name = name.slice(1)), {
@@ -10666,7 +10786,8 @@ ${js}`
10666
10786
  children: [ws, name, ": ", processUnaryExpression(pre, value, post)],
10667
10787
  name,
10668
10788
  names: [],
10669
- value
10789
+ value,
10790
+ implicitName: !0
10670
10791
  };
10671
10792
  }), PropertyDefinition$$ = [PropertyDefinition$0, PropertyDefinition$1, PropertyDefinition$2, PropertyDefinition$3, PropertyDefinition$4, PropertyDefinition$5];
10672
10793
  function PropertyDefinition(ctx, state2) {
@@ -10830,7 +10951,7 @@ ${js}`
10830
10951
  }
10831
10952
  var MethodModifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(GetOrSet, (0, import_lib2.$E)(_), (0, import_lib2.$Y)(ClassElementName)), function($skip, $loc, $0, $1, $2, $3) {
10832
10953
  var kind = $1, ws = $2;
10833
- return {
10954
+ return ws || (ws = " "), {
10834
10955
  // no async or generator, because getters and setters can't be
10835
10956
  modifier: {
10836
10957
  async: !1,
@@ -11342,7 +11463,7 @@ ${js}`
11342
11463
  function ShouldExpressionize(ctx, state2) {
11343
11464
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ShouldExpressionize", ShouldExpressionize$$);
11344
11465
  }
11345
- var NoCommaStatement$0 = KeywordStatement, NoCommaStatement$1 = VariableStatement, NoCommaStatement$2 = IfStatement, NoCommaStatement$3 = IterationStatement, NoCommaStatement$4 = SwitchStatement, NoCommaStatement$5 = TryStatement, NoCommaStatement$6 = EmptyStatement, NoCommaStatement$7 = LabelledStatement, NoCommaStatement$8 = ExpressionStatement, NoCommaStatement$9 = BlockStatement, NoCommaStatement$$ = [NoCommaStatement$0, NoCommaStatement$1, NoCommaStatement$2, NoCommaStatement$3, NoCommaStatement$4, NoCommaStatement$5, NoCommaStatement$6, NoCommaStatement$7, NoCommaStatement$8, NoCommaStatement$9];
11466
+ var NoCommaStatement$0 = KeywordStatement, NoCommaStatement$1 = VariableStatement, NoCommaStatement$2 = IfStatement, NoCommaStatement$3 = IterationActualStatement, NoCommaStatement$4 = SwitchStatement, NoCommaStatement$5 = TryStatement, NoCommaStatement$6 = EmptyStatement, NoCommaStatement$7 = LabelledStatement, NoCommaStatement$8 = ExpressionStatement, NoCommaStatement$9 = BlockStatement, NoCommaStatement$$ = [NoCommaStatement$0, NoCommaStatement$1, NoCommaStatement$2, NoCommaStatement$3, NoCommaStatement$4, NoCommaStatement$5, NoCommaStatement$6, NoCommaStatement$7, NoCommaStatement$8, NoCommaStatement$9];
11346
11467
  function NoCommaStatement(ctx, state2) {
11347
11468
  return (0, import_lib2.$EVENT_C)(ctx, state2, "NoCommaStatement", NoCommaStatement$$);
11348
11469
  }
@@ -12148,8 +12269,8 @@ ${js}`
12148
12269
  function SingleLineExpressionWithIndentedApplicationForbidden(ctx, state2) {
12149
12270
  return (0, import_lib2.$EVENT)(ctx, state2, "SingleLineExpressionWithIndentedApplicationForbidden", SingleLineExpressionWithIndentedApplicationForbidden$0);
12150
12271
  }
12151
- var ExpressionWithObjectApplicationForbidden$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidBracedApplication, ForbidIndentedApplication, (0, import_lib2.$E)(Expression), RestoreBracedApplication, RestoreIndentedApplication), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12152
- var exp = $3;
12272
+ var ExpressionWithObjectApplicationForbidden$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidBracedApplication, ForbidIndentedApplication, ForbidImplicitFragment, (0, import_lib2.$E)(Expression), RestoreBracedApplication, RestoreIndentedApplication, RestoreImplicitFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
12273
+ var exp = $4;
12153
12274
  return exp || $skip;
12154
12275
  });
12155
12276
  function ExpressionWithObjectApplicationForbidden(ctx, state2) {
@@ -12306,6 +12427,30 @@ ${js}`
12306
12427
  function NewlineBinaryOpAllowed(ctx, state2) {
12307
12428
  return (0, import_lib2.$EVENT)(ctx, state2, "NewlineBinaryOpAllowed", NewlineBinaryOpAllowed$0);
12308
12429
  }
12430
+ var AllowImplicitFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'AllowImplicitFragment ""'), function($skip, $loc, $0, $1) {
12431
+ state.forbidImplicitFragment.push(!1);
12432
+ });
12433
+ function AllowImplicitFragment(ctx, state2) {
12434
+ return (0, import_lib2.$EVENT)(ctx, state2, "AllowImplicitFragment", AllowImplicitFragment$0);
12435
+ }
12436
+ var ForbidImplicitFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ForbidImplicitFragment ""'), function($skip, $loc, $0, $1) {
12437
+ state.forbidImplicitFragment.push(!0);
12438
+ });
12439
+ function ForbidImplicitFragment(ctx, state2) {
12440
+ return (0, import_lib2.$EVENT)(ctx, state2, "ForbidImplicitFragment", ForbidImplicitFragment$0);
12441
+ }
12442
+ var RestoreImplicitFragment$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'RestoreImplicitFragment ""'), function($skip, $loc, $0, $1) {
12443
+ state.forbidImplicitFragment.pop();
12444
+ });
12445
+ function RestoreImplicitFragment(ctx, state2) {
12446
+ return (0, import_lib2.$EVENT)(ctx, state2, "RestoreImplicitFragment", RestoreImplicitFragment$0);
12447
+ }
12448
+ var ImplicitFragmentAllowed$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImplicitFragmentAllowed ""'), function($skip, $loc, $0, $1) {
12449
+ if (config.verbose && console.log("forbidImplicitFragment:", state.forbidImplicitFragment), state.implicitFragmentForbidden) return $skip;
12450
+ });
12451
+ function ImplicitFragmentAllowed(ctx, state2) {
12452
+ return (0, import_lib2.$EVENT)(ctx, state2, "ImplicitFragmentAllowed", ImplicitFragmentAllowed$0);
12453
+ }
12309
12454
  var AllowPipeline$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'AllowPipeline ""'), function($skip, $loc, $0, $1) {
12310
12455
  state.forbidPipeline.push(!1);
12311
12456
  });
@@ -12330,11 +12475,11 @@ ${js}`
12330
12475
  function PipelineAllowed(ctx, state2) {
12331
12476
  return (0, import_lib2.$EVENT)(ctx, state2, "PipelineAllowed", PipelineAllowed$0);
12332
12477
  }
12333
- var AllowAll$0 = (0, import_lib2.$S)(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication, AllowClassImplicitCall, AllowNestedBinaryOp, AllowNewlineBinaryOp, AllowPipeline);
12478
+ var AllowAll$0 = (0, import_lib2.$S)(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication, AllowClassImplicitCall, AllowNestedBinaryOp, AllowNewlineBinaryOp, AllowImplicitFragment, AllowPipeline);
12334
12479
  function AllowAll(ctx, state2) {
12335
12480
  return (0, import_lib2.$EVENT)(ctx, state2, "AllowAll", AllowAll$0);
12336
12481
  }
12337
- var RestoreAll$0 = (0, import_lib2.$S)(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreClassImplicitCall, RestoreNestedBinaryOp, RestoreNewlineBinaryOp, RestorePipeline);
12482
+ var RestoreAll$0 = (0, import_lib2.$S)(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreClassImplicitCall, RestoreNestedBinaryOp, RestoreNewlineBinaryOp, RestoreImplicitFragment, RestorePipeline);
12338
12483
  function RestoreAll(ctx, state2) {
12339
12484
  return (0, import_lib2.$EVENT)(ctx, state2, "RestoreAll", RestoreAll$0);
12340
12485
  }
@@ -12420,14 +12565,20 @@ ${js}`
12420
12565
  var MaybeNestedNonPipelineExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, NonPipelineExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12421
12566
  var expression = $4, trailing = $6;
12422
12567
  return expression ? trailing ? [expression, trailing] : expression : $skip;
12423
- }), MaybeNestedNonPipelineExpression$1 = NonPipelineExpression, MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1];
12568
+ }), MaybeNestedNonPipelineExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidImplicitFragment, (0, import_lib2.$E)(NonPipelineExpression), RestoreImplicitFragment), function($skip, $loc, $0, $1, $2, $3) {
12569
+ var expression = $2;
12570
+ return expression || $skip;
12571
+ }), MaybeNestedNonPipelineExpression$$ = [MaybeNestedNonPipelineExpression$0, MaybeNestedNonPipelineExpression$1];
12424
12572
  function MaybeNestedNonPipelineExpression(ctx, state2) {
12425
12573
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedNonPipelineExpression", MaybeNestedNonPipelineExpression$$);
12426
12574
  }
12427
12575
  var MaybeNestedPostfixedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, PostfixedExpression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12428
12576
  var expression = $4, trailing = $6;
12429
12577
  return expression ? trailing ? [expression, trailing] : expression : $skip;
12430
- }), MaybeNestedPostfixedExpression$1 = PostfixedExpression, MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1];
12578
+ }), MaybeNestedPostfixedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidImplicitFragment, (0, import_lib2.$E)(PostfixedExpression), RestoreImplicitFragment), function($skip, $loc, $0, $1, $2, $3) {
12579
+ var expression = $2;
12580
+ return expression || $skip;
12581
+ }), MaybeNestedPostfixedExpression$$ = [MaybeNestedPostfixedExpression$0, MaybeNestedPostfixedExpression$1];
12431
12582
  function MaybeNestedPostfixedExpression(ctx, state2) {
12432
12583
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedPostfixedExpression", MaybeNestedPostfixedExpression$$);
12433
12584
  }
@@ -12441,7 +12592,10 @@ ${js}`
12441
12592
  var MaybeNestedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(NestedBulletedArray), (0, import_lib2.$N)(NestedImplicitObjectLiteral), PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression)), PopIndent, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12442
12593
  var expression = $4, trailing = $6;
12443
12594
  return expression ? trailing ? [expression, trailing] : expression : $skip;
12444
- }), MaybeNestedExpression$1 = Expression, MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1];
12595
+ }), MaybeNestedExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidImplicitFragment, (0, import_lib2.$E)(Expression), RestoreImplicitFragment), function($skip, $loc, $0, $1, $2, $3) {
12596
+ var expression = $2;
12597
+ return expression || $skip;
12598
+ }), MaybeNestedExpression$$ = [MaybeNestedExpression$0, MaybeNestedExpression$1];
12445
12599
  function MaybeNestedExpression(ctx, state2) {
12446
12600
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MaybeNestedExpression", MaybeNestedExpression$$);
12447
12601
  }
@@ -12584,6 +12738,21 @@ ${js}`
12584
12738
  function OperatorNamedImports(ctx, state2) {
12585
12739
  return (0, import_lib2.$EVENT)(ctx, state2, "OperatorNamedImports", OperatorNamedImports$0);
12586
12740
  }
12741
+ var DynamicNamedImports$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenBrace, (0, import_lib2.$Q)(DynamicImportSpecifier), (0, import_lib2.$E)((0, import_lib2.$S)(__, Comma)), __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12742
+ var specifiers = $2;
12743
+ return {
12744
+ type: "Declaration",
12745
+ children: $0,
12746
+ specifiers
12747
+ };
12748
+ });
12749
+ function DynamicNamedImports(ctx, state2) {
12750
+ return (0, import_lib2.$EVENT)(ctx, state2, "DynamicNamedImports", DynamicNamedImports$0);
12751
+ }
12752
+ var DynamicImportContents$0 = DynamicNamedImports, DynamicImportContents$1 = IdentifierName, DynamicImportContents$2 = Star, DynamicImportContents$$ = [DynamicImportContents$0, DynamicImportContents$1, DynamicImportContents$2];
12753
+ function DynamicImportContents(ctx, state2) {
12754
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "DynamicImportContents", DynamicImportContents$$);
12755
+ }
12587
12756
  var FromClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(From, __, ModuleSpecifier), function($skip, $loc, $0, $1, $2, $3) {
12588
12757
  var module = $3;
12589
12758
  return Array.isArray(module) ? [$1, $2, ...module] : $0;
@@ -12603,9 +12772,9 @@ ${js}`
12603
12772
  function ImportAssertion(ctx, state2) {
12604
12773
  return (0, import_lib2.$EVENT)(ctx, state2, "ImportAssertion", ImportAssertion$0);
12605
12774
  }
12606
- var TypeAndImportSpecifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(__, TypeKeyword)), ImportSpecifier), function($skip, $loc, $0, $1, $2) {
12607
- return $1 ? { ts: !0, children: $0, binding: $2.binding } : $2;
12608
- }), TypeAndImportSpecifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, Operator, OperatorImportSpecifier), function($skip, $loc, $0, $1, $2, $3) {
12775
+ var TypeAndImportSpecifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, TypeKeyword, ImportSpecifier), function($skip, $loc, $0, $1, $2, $3) {
12776
+ return { ts: !0, children: $0, binding: $3.binding };
12777
+ }), TypeAndImportSpecifier$1 = ImportSpecifier, TypeAndImportSpecifier$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, Operator, OperatorImportSpecifier), function($skip, $loc, $0, $1, $2, $3) {
12609
12778
  var ws = $1, spec = $3;
12610
12779
  if (spec.binding.type !== "Identifier")
12611
12780
  throw new Error("Expected identifier after `operator`");
@@ -12617,7 +12786,7 @@ ${js}`
12617
12786
  spec.children.slice(1)
12618
12787
  ]
12619
12788
  };
12620
- }), TypeAndImportSpecifier$$ = [TypeAndImportSpecifier$0, TypeAndImportSpecifier$1];
12789
+ }), TypeAndImportSpecifier$$ = [TypeAndImportSpecifier$0, TypeAndImportSpecifier$1, TypeAndImportSpecifier$2];
12621
12790
  function TypeAndImportSpecifier(ctx, state2) {
12622
12791
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeAndImportSpecifier", TypeAndImportSpecifier$$);
12623
12792
  }
@@ -12657,6 +12826,23 @@ ${js}`
12657
12826
  function OperatorImportSpecifier(ctx, state2) {
12658
12827
  return (0, import_lib2.$EVENT_C)(ctx, state2, "OperatorImportSpecifier", OperatorImportSpecifier$$);
12659
12828
  }
12829
+ var DynamicImportSpecifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(__, (0, import_lib2.$E)((0, import_lib2.$S)(TypeKeyword, __, (0, import_lib2.$Y)(DynamicModuleExportName))), DynamicModuleExportName, (0, import_lib2.$E)((0, import_lib2.$S)(ImportAsToken, __, DynamicModuleExportName)), ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12830
+ var ts2 = $2, source = $3, binding = $4;
12831
+ return {
12832
+ source,
12833
+ binding: binding?.[2],
12834
+ ts: !!ts2,
12835
+ // true causes an error later
12836
+ children: $0
12837
+ };
12838
+ });
12839
+ function DynamicImportSpecifier(ctx, state2) {
12840
+ return (0, import_lib2.$EVENT)(ctx, state2, "DynamicImportSpecifier", DynamicImportSpecifier$0);
12841
+ }
12842
+ var DynamicModuleExportName$0 = ModuleExportName, DynamicModuleExportName$1 = ComputedPropertyName, DynamicModuleExportName$$ = [DynamicModuleExportName$0, DynamicModuleExportName$1];
12843
+ function DynamicModuleExportName(ctx, state2) {
12844
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "DynamicModuleExportName", DynamicModuleExportName$$);
12845
+ }
12660
12846
  var ImportAsToken$0 = (0, import_lib2.$S)(__, As), ImportAsToken$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, __, Colon, (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'ImportAsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
12661
12847
  var l = $1, ws = $2, c = $3;
12662
12848
  let children = [
@@ -13796,7 +13982,7 @@ ${js}`
13796
13982
  return (0, import_lib2.$EVENT)(ctx, state2, "SingleQuote", SingleQuote$0);
13797
13983
  }
13798
13984
  var Star$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L75, 'Star "*"'), function($skip, $loc, $0, $1) {
13799
- return { $loc, token: $1 };
13985
+ return { $loc, token: $1, type: "Star" };
13800
13986
  });
13801
13987
  function Star(ctx, state2) {
13802
13988
  return (0, import_lib2.$EVENT)(ctx, state2, "Star", Star$0);
@@ -13947,20 +14133,23 @@ ${js}`
13947
14133
  function Yield(ctx, state2) {
13948
14134
  return (0, import_lib2.$EVENT)(ctx, state2, "Yield", Yield$0);
13949
14135
  }
13950
- var JSXImplicitFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(JSXTag, (0, import_lib2.$Q)((0, import_lib2.$S)(Nested, (0, import_lib2.$C)(JSXTag, JSXAngleChild)))), function($skip, $loc, $0, $1, $2) {
13951
- let jsx = $2.length === 0 ? $1 : {
14136
+ var JSXImplicitFragment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(JSXTag, (0, import_lib2.$E)((0, import_lib2.$S)(ImplicitFragmentAllowed, NestedBinaryOpAllowed, NewlineBinaryOpAllowed, (0, import_lib2.$Q)((0, import_lib2.$S)(Nested, (0, import_lib2.$C)(JSXTag, JSXAngleChild)))))), function($skip, $loc, $0, $1, $2) {
14137
+ var first = $1, rest = $2;
14138
+ rest = rest ? rest[3] : [];
14139
+ let jsx = rest.length === 0 ? first : {
13952
14140
  type: "JSXFragment",
13953
14141
  children: [
13954
14142
  `<>
13955
14143
  `,
13956
14144
  state.currentIndent.token,
13957
- ...$0,
14145
+ first,
14146
+ ...rest,
13958
14147
  `
13959
14148
  `,
13960
14149
  state.currentIndent.token,
13961
14150
  "</>"
13962
14151
  ],
13963
- jsxChildren: [$1].concat($2.map(([, tag]) => tag))
14152
+ jsxChildren: [first, ...rest.map(([, tag]) => tag)]
13964
14153
  }, type = typeOfJSX(jsx, config);
13965
14154
  return type ? [
13966
14155
  { ts: !0, children: ["("] },
@@ -14468,10 +14657,7 @@ ${js}`
14468
14657
  function JSXAngleChild(ctx, state2) {
14469
14658
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXAngleChild", JSXAngleChild$0);
14470
14659
  }
14471
- var JSXCodeChild$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertInlineOpenBrace, JSXCodeChildExpression, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
14472
- var open = $1, expression = $2, close = $3;
14473
- return expression ? [open, expression, close] : $skip;
14474
- });
14660
+ var JSXCodeChild$0 = (0, import_lib2.$S)(InsertInlineOpenBrace, JSXCodeChildExpression, InsertCloseBrace);
14475
14661
  function JSXCodeChild(ctx, state2) {
14476
14662
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXCodeChild", JSXCodeChild$0);
14477
14663
  }
@@ -15859,7 +16045,7 @@ ${js}`
15859
16045
  state.indentLevels = [{
15860
16046
  level: 0,
15861
16047
  token: ""
15862
- }], state.forbidClassImplicitCall = [!1], state.forbidIndentedApplication = [!1], state.forbidBracedApplication = [!1], state.forbidTrailingMemberProperty = [!1], state.forbidNestedBinaryOp = [!1], state.forbidNewlineBinaryOp = [!1], state.forbidPipeline = [!1], state.JSXTagStack = [void 0], state.operators = /* @__PURE__ */ new Map(), state.helperRefs = {}, state.prelude = [], config = {
16048
+ }], state.forbidClassImplicitCall = [!1], state.forbidIndentedApplication = [!1], state.forbidBracedApplication = [!1], state.forbidTrailingMemberProperty = [!1], state.forbidNestedBinaryOp = [!1], state.forbidNewlineBinaryOp = [!1], state.forbidImplicitFragment = [!1], state.forbidPipeline = [!1], state.JSXTagStack = [void 0], state.operators = /* @__PURE__ */ new Map(), state.helperRefs = {}, state.prelude = [], config = {
15863
16049
  autoConst: !1,
15864
16050
  autoVar: !1,
15865
16051
  autoLet: !1,
@@ -16084,6 +16270,7 @@ ${js}`
16084
16270
  forbidTrailingMemberProperty: [!1],
16085
16271
  forbidNestedBinaryOp: [!1],
16086
16272
  forbidNewlineBinaryOp: [!1],
16273
+ forbidImplicitFragment: [!1],
16087
16274
  forbidPipeline: [!1],
16088
16275
  JSXTagStack: [void 0]
16089
16276
  }, getState = () => state, getConfig = () => config, getInitialConfig = () => initialConfig, getFilename = () => filename, getSync = () => sync;
@@ -16130,6 +16317,12 @@ ${js}`
16130
16317
  return s[s.length - 1];
16131
16318
  }
16132
16319
  },
16320
+ implicitFragmentForbidden: {
16321
+ get() {
16322
+ let { forbidImplicitFragment: s } = state;
16323
+ return s[s.length - 1];
16324
+ }
16325
+ },
16133
16326
  pipelineForbidden: {
16134
16327
  get() {
16135
16328
  let { forbidPipeline: s } = state;
@@ -16148,7 +16341,7 @@ ${js}`
16148
16341
  existing && behavior ? state.operators.set(name, { ...existing, ...behavior }) : state.operators.set(name, behavior || existing);
16149
16342
  }
16150
16343
  function getStateKey() {
16151
- return [state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.nestedBinaryOpForbidden << 3 | state.newlineBinaryOpForbidden << 2 | state.pipelineForbidden << 1 | // This is slightly different than the rest of the state,
16344
+ return [state.currentIndent.level % 256 << 9 | state.classImplicitCallForbidden << 8 | state.indentedApplicationForbidden << 7 | state.bracedApplicationForbidden << 6 | state.trailingMemberPropertyForbidden << 5 | state.nestedBinaryOpForbidden << 4 | state.newlineBinaryOpForbidden << 3 | state.implicitFragmentForbidden << 2 | state.pipelineForbidden << 1 | // This is slightly different than the rest of the state,
16152
16345
  // since it is affected by the directive prologue and may be hit
16153
16346
  // by the EOL rule early in the parse. Later if we wanted to
16154
16347
  // allow block scoping of the compat directives we would need to
@@ -16217,7 +16410,7 @@ ${js}`
16217
16410
  let line = ref1[i1];
16218
16411
  results.push((() => {
16219
16412
  let results1 = [];
16220
- for (let i2 = 0, len1 = line.length; i2 < len1; i2++) {
16413
+ for (let i2 = 0, len12 = line.length; i2 < len12; i2++) {
16221
16414
  let entry = line[i2];
16222
16415
  if (entry.length === 4) {
16223
16416
  let [colDelta, sourceFileIndex, srcLine, srcCol] = entry, lineDelta = srcLine - lastSourceLine;
@@ -16575,7 +16768,7 @@ ${options.sourceMap.comment(filename2, filename2 + ".tsx")}` : {
16575
16768
  }
16576
16769
  function autoRunScripts(roots, options = {}) {
16577
16770
  let observer = new MutationObserver(async (mutations) => {
16578
- for (let i2 = 0, len1 = mutations.length; i2 < len1; i2++) {
16771
+ for (let i2 = 0, len12 = mutations.length; i2 < len12; i2++) {
16579
16772
  let mutation = mutations[i2];
16580
16773
  if (mutation.type === "childList")
16581
16774
  for (let ref1 = mutation.addedNodes, i3 = 0, len22 = ref1.length; i3 < len22; i3++) {