@cloud-cli/on 1.7.9 → 1.8.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/on.js CHANGED
@@ -4468,6 +4468,13 @@ var pi = class {
4468
4468
  async finishJob(e, t) {
4469
4469
  await S.run("UPDATE jobs SET status = ?, finished_at = CURRENT_TIMESTAMP WHERE id = ?;", [t, e]);
4470
4470
  }
4471
+ async completeJob(e, t, n) {
4472
+ await S.run("UPDATE jobs\n SET status = ?, report = ?, updated_at = CURRENT_TIMESTAMP, finished_at = CURRENT_TIMESTAMP\n WHERE id = ?;", [
4473
+ t,
4474
+ JSON.stringify(n),
4475
+ e
4476
+ ]);
4477
+ }
4471
4478
  async restartJob(e) {
4472
4479
  let t = await this.getJob(e);
4473
4480
  if (t) return t.status === "running" && await S.run("UPDATE jobs SET status = 'cancelled', finished_at = CURRENT_TIMESTAMP WHERE id = ?;", [e]), (await S.get("INSERT INTO jobs (parentId, workflow_id, concurrency_key, payload) SELECT id, workflow_id, concurrency_key, payload FROM jobs WHERE id = ? RETURNING *", [e])).id;
@@ -4479,7 +4486,7 @@ var pi = class {
4479
4486
  return await S.run("UPDATE jobs SET status = 'pending', worker_id = NULL WHERE status = 'running' AND started_at < datetime('now', '-1 hour');");
4480
4487
  }
4481
4488
  async createTables() {
4482
- await S.exec("\n CREATE TABLE IF NOT EXISTS jobs (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n parentId INTEGER,\n workflow_id TEXT NOT NULL,\n payload TEXT NOT NULL,\n status TEXT NOT NULL DEFAULT 'pending',\n concurrency_key TEXT,\n worker_id TEXT,\n report TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n started_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n finished_at DATETIME DEFAULT CURRENT_TIMESTAMP\n );\n\n CREATE TABLE IF NOT EXISTS step_logs (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n job_id INTEGER NOT NULL,\n step_id TEXT NOT NULL,\n log_content TEXT NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY(job_id) REFERENCES jobs(id) ON DELETE CASCADE\n );\n\n CREATE INDEX IF NOT EXISTS idx_step_logs_job ON step_logs(job_id);\n ");
4489
+ await S.exec("\n CREATE TABLE IF NOT EXISTS jobs (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n parentId INTEGER,\n workflow_id TEXT NOT NULL,\n payload TEXT NOT NULL,\n status TEXT NOT NULL DEFAULT 'pending',\n concurrency_key TEXT,\n worker_id TEXT,\n report TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n started_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n finished_at DATETIME DEFAULT CURRENT_TIMESTAMP\n );\n\n CREATE TABLE IF NOT EXISTS step_logs (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n job_id INTEGER NOT NULL,\n step_id TEXT NOT NULL,\n log_content TEXT NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY(job_id) REFERENCES jobs(id) ON DELETE CASCADE\n );\n\n CREATE INDEX IF NOT EXISTS idx_step_logs_job ON step_logs(job_id);\n\n DELETE FROM step_logs\n WHERE id NOT IN (\n SELECT MAX(id) FROM step_logs GROUP BY job_id, step_id\n );\n CREATE UNIQUE INDEX IF NOT EXISTS idx_step_logs_job_step ON step_logs(job_id, step_id);\n ");
4483
4490
  }
4484
4491
  async getJob(e) {
4485
4492
  return S.get("SELECT * FROM jobs WHERE id = ?", [e]);
@@ -4491,7 +4498,7 @@ var pi = class {
4491
4498
  await S.run("UPDATE jobs SET report = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?", [JSON.stringify(t), e]);
4492
4499
  }
4493
4500
  async saveStepLog(e, t, n) {
4494
- n && await S.run("INSERT INTO step_logs (job_id, step_id, log_content) VALUES (?, ?, ?)", [
4501
+ await S.run("INSERT INTO step_logs (job_id, step_id, log_content) VALUES (?, ?, ?)\n ON CONFLICT(job_id, step_id) DO UPDATE SET\n log_content = excluded.log_content,\n created_at = CURRENT_TIMESTAMP", [
4495
4502
  e,
4496
4503
  t,
4497
4504
  n
@@ -6381,39 +6388,39 @@ q.toAssignable = function(e, t, n) {
6381
6388
  default: this.checkLValPattern(e, t, n);
6382
6389
  }
6383
6390
  };
6384
- var wa = function(e, t, n, r, i) {
6391
+ var J = function(e, t, n, r, i) {
6385
6392
  this.token = e, this.isExpr = !!t, this.preserveSpace = !!n, this.override = r, this.generator = !!i;
6386
- }, J = {
6387
- b_stat: new wa("{", !1),
6388
- b_expr: new wa("{", !0),
6389
- b_tmpl: new wa("${", !1),
6390
- p_stat: new wa("(", !1),
6391
- p_expr: new wa("(", !0),
6392
- q_tmpl: new wa("`", !0, !0, function(e) {
6393
+ }, Y = {
6394
+ b_stat: new J("{", !1),
6395
+ b_expr: new J("{", !0),
6396
+ b_tmpl: new J("${", !1),
6397
+ p_stat: new J("(", !1),
6398
+ p_expr: new J("(", !0),
6399
+ q_tmpl: new J("`", !0, !0, function(e) {
6393
6400
  return e.tryReadTemplateToken();
6394
6401
  }),
6395
- f_stat: new wa("function", !1),
6396
- f_expr: new wa("function", !0),
6397
- f_expr_gen: new wa("function", !0, !1, null, !0),
6398
- f_gen: new wa("function", !1, !1, null, !0)
6399
- }, Ta = U.prototype;
6400
- Ta.initialContext = function() {
6401
- return [J.b_stat];
6402
- }, Ta.curContext = function() {
6402
+ f_stat: new J("function", !1),
6403
+ f_expr: new J("function", !0),
6404
+ f_expr_gen: new J("function", !0, !1, null, !0),
6405
+ f_gen: new J("function", !1, !1, null, !0)
6406
+ }, wa = U.prototype;
6407
+ wa.initialContext = function() {
6408
+ return [Y.b_stat];
6409
+ }, wa.curContext = function() {
6403
6410
  return this.context[this.context.length - 1];
6404
- }, Ta.braceIsBlock = function(e) {
6411
+ }, wa.braceIsBlock = function(e) {
6405
6412
  var t = this.curContext();
6406
- return t === J.f_expr || t === J.f_stat ? !0 : e === B.colon && (t === J.b_stat || t === J.b_expr) ? !t.isExpr : e === B._return || e === B.name && this.exprAllowed ? V.test(this.input.slice(this.lastTokEnd, this.start)) : e === B._else || e === B.semi || e === B.eof || e === B.parenR || e === B.arrow ? !0 : e === B.braceL ? t === J.b_stat : e === B._var || e === B._const || e === B.name ? !1 : !this.exprAllowed;
6407
- }, Ta.inGeneratorContext = function() {
6413
+ return t === Y.f_expr || t === Y.f_stat ? !0 : e === B.colon && (t === Y.b_stat || t === Y.b_expr) ? !t.isExpr : e === B._return || e === B.name && this.exprAllowed ? V.test(this.input.slice(this.lastTokEnd, this.start)) : e === B._else || e === B.semi || e === B.eof || e === B.parenR || e === B.arrow ? !0 : e === B.braceL ? t === Y.b_stat : e === B._var || e === B._const || e === B.name ? !1 : !this.exprAllowed;
6414
+ }, wa.inGeneratorContext = function() {
6408
6415
  for (var e = this.context.length - 1; e >= 1; e--) {
6409
6416
  var t = this.context[e];
6410
6417
  if (t.token === "function") return t.generator;
6411
6418
  }
6412
6419
  return !1;
6413
- }, Ta.updateContext = function(e) {
6420
+ }, wa.updateContext = function(e) {
6414
6421
  var t, n = this.type;
6415
6422
  n.keyword && e === B.dot ? this.exprAllowed = !1 : (t = n.updateContext) ? t.call(this, e) : this.exprAllowed = n.beforeExpr;
6416
- }, Ta.overrideContext = function(e) {
6423
+ }, wa.overrideContext = function(e) {
6417
6424
  this.curContext() !== e && (this.context[this.context.length - 1] = e);
6418
6425
  }, B.parenR.updateContext = B.braceR.updateContext = function() {
6419
6426
  if (this.context.length === 1) {
@@ -6421,32 +6428,32 @@ Ta.initialContext = function() {
6421
6428
  return;
6422
6429
  }
6423
6430
  var e = this.context.pop();
6424
- e === J.b_stat && this.curContext().token === "function" && (e = this.context.pop()), this.exprAllowed = !e.isExpr;
6431
+ e === Y.b_stat && this.curContext().token === "function" && (e = this.context.pop()), this.exprAllowed = !e.isExpr;
6425
6432
  }, B.braceL.updateContext = function(e) {
6426
- this.context.push(this.braceIsBlock(e) ? J.b_stat : J.b_expr), this.exprAllowed = !0;
6433
+ this.context.push(this.braceIsBlock(e) ? Y.b_stat : Y.b_expr), this.exprAllowed = !0;
6427
6434
  }, B.dollarBraceL.updateContext = function() {
6428
- this.context.push(J.b_tmpl), this.exprAllowed = !0;
6435
+ this.context.push(Y.b_tmpl), this.exprAllowed = !0;
6429
6436
  }, B.parenL.updateContext = function(e) {
6430
6437
  var t = e === B._if || e === B._for || e === B._with || e === B._while;
6431
- this.context.push(t ? J.p_stat : J.p_expr), this.exprAllowed = !0;
6438
+ this.context.push(t ? Y.p_stat : Y.p_expr), this.exprAllowed = !0;
6432
6439
  }, B.incDec.updateContext = function() {}, B._function.updateContext = B._class.updateContext = function(e) {
6433
- e.beforeExpr && e !== B._else && (e !== B.semi || this.curContext() === J.p_stat) && !(e === B._return && V.test(this.input.slice(this.lastTokEnd, this.start))) && (e !== B.colon && e !== B.braceL || this.curContext() !== J.b_stat) ? this.context.push(J.f_expr) : this.context.push(J.f_stat), this.exprAllowed = !1;
6440
+ e.beforeExpr && e !== B._else && (e !== B.semi || this.curContext() === Y.p_stat) && !(e === B._return && V.test(this.input.slice(this.lastTokEnd, this.start))) && (e !== B.colon && e !== B.braceL || this.curContext() !== Y.b_stat) ? this.context.push(Y.f_expr) : this.context.push(Y.f_stat), this.exprAllowed = !1;
6434
6441
  }, B.colon.updateContext = function() {
6435
6442
  this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
6436
6443
  }, B.backQuote.updateContext = function() {
6437
- this.curContext() === J.q_tmpl ? this.context.pop() : this.context.push(J.q_tmpl), this.exprAllowed = !1;
6444
+ this.curContext() === Y.q_tmpl ? this.context.pop() : this.context.push(Y.q_tmpl), this.exprAllowed = !1;
6438
6445
  }, B.star.updateContext = function(e) {
6439
6446
  if (e === B._function) {
6440
6447
  var t = this.context.length - 1;
6441
- this.context[t] === J.f_expr ? this.context[t] = J.f_expr_gen : this.context[t] = J.f_gen;
6448
+ this.context[t] === Y.f_expr ? this.context[t] = Y.f_expr_gen : this.context[t] = Y.f_gen;
6442
6449
  }
6443
6450
  this.exprAllowed = !0;
6444
6451
  }, B.name.updateContext = function(e) {
6445
6452
  var t = !1;
6446
6453
  this.options.ecmaVersion >= 6 && e !== B.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t = !0), this.exprAllowed = t;
6447
6454
  };
6448
- var Y = U.prototype;
6449
- Y.checkPropClash = function(e, t, n) {
6455
+ var X = U.prototype;
6456
+ X.checkPropClash = function(e, t, n) {
6450
6457
  if (!(this.options.ecmaVersion >= 9 && e.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
6451
6458
  var r = e.key, i;
6452
6459
  switch (r.type) {
@@ -6471,7 +6478,7 @@ Y.checkPropClash = function(e, t, n) {
6471
6478
  set: !1
6472
6479
  }, o[a] = !0;
6473
6480
  }
6474
- }, Y.parseExpression = function(e, t) {
6481
+ }, X.parseExpression = function(e, t) {
6475
6482
  var n = this;
6476
6483
  return this.catchStackOverflow(function() {
6477
6484
  var r = n.start, i = n.startLoc, a = n.parseMaybeAssign(e, t);
@@ -6482,7 +6489,7 @@ Y.checkPropClash = function(e, t, n) {
6482
6489
  }
6483
6490
  return a;
6484
6491
  });
6485
- }, Y.parseMaybeAssign = function(e, t, n) {
6492
+ }, X.parseMaybeAssign = function(e, t, n) {
6486
6493
  if (this.isContextual("yield")) {
6487
6494
  if (this.inGenerator) return this.parseYield(e);
6488
6495
  this.exprAllowed = !1;
@@ -6497,7 +6504,7 @@ Y.checkPropClash = function(e, t, n) {
6497
6504
  return u.operator = this.value, this.type === B.eq && (l = this.toAssignable(l, !1, t)), r || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= l.start && (t.shorthandAssign = -1), this.type === B.eq ? this.checkLValPattern(l) : this.checkLValSimple(l), u.left = l, this.next(), u.right = this.parseMaybeAssign(e), o > -1 && (t.doubleProto = o), this.finishNode(u, "AssignmentExpression");
6498
6505
  }
6499
6506
  return r && this.checkExpressionErrors(t, !0), i > -1 && (t.parenthesizedAssign = i), a > -1 && (t.trailingComma = a), l;
6500
- }, Y.parseMaybeConditional = function(e, t) {
6507
+ }, X.parseMaybeConditional = function(e, t) {
6501
6508
  var n = this.start, r = this.startLoc, i = this.parseExprOps(e, t);
6502
6509
  if (this.checkExpressionErrors(t)) return i;
6503
6510
  if ((i.type !== "ArrowFunctionExpression" || i.start !== n) && this.eat(B.question)) {
@@ -6505,10 +6512,10 @@ Y.checkPropClash = function(e, t, n) {
6505
6512
  return a.test = i, a.consequent = this.parseMaybeAssign(), this.expect(B.colon), a.alternate = this.parseMaybeAssign(e), this.finishNode(a, "ConditionalExpression");
6506
6513
  }
6507
6514
  return i;
6508
- }, Y.parseExprOps = function(e, t) {
6515
+ }, X.parseExprOps = function(e, t) {
6509
6516
  var n = this.start, r = this.startLoc, i = this.parseMaybeUnary(t, !1, !1, e);
6510
6517
  return this.checkExpressionErrors(t) || i.start === n && i.type === "ArrowFunctionExpression" ? i : this.parseExprOp(i, n, r, -1, e);
6511
- }, Y.parseExprOp = function(e, t, n, r, i) {
6518
+ }, X.parseExprOp = function(e, t, n, r, i) {
6512
6519
  var a = this.type.binop;
6513
6520
  if (a != null && (!i || this.type !== B._in) && a > r) {
6514
6521
  var o = this.type === B.logicalOR || this.type === B.logicalAND, s = this.type === B.coalesce;
@@ -6519,16 +6526,16 @@ Y.checkPropClash = function(e, t, n) {
6519
6526
  return (o && this.type === B.coalesce || s && (this.type === B.logicalOR || this.type === B.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(f, t, n, r, i);
6520
6527
  }
6521
6528
  return e;
6522
- }, Y.buildBinary = function(e, t, n, r, i, a) {
6529
+ }, X.buildBinary = function(e, t, n, r, i, a) {
6523
6530
  r.type === "PrivateIdentifier" && this.raise(r.start, "Private identifier can only be left side of binary expression");
6524
6531
  var o = this.startNodeAt(e, t);
6525
6532
  return o.left = n, o.operator = i, o.right = r, this.finishNode(o, a ? "LogicalExpression" : "BinaryExpression");
6526
- }, Y.parseMaybeUnary = function(e, t, n, r) {
6533
+ }, X.parseMaybeUnary = function(e, t, n, r) {
6527
6534
  var i = this.start, a = this.startLoc, o;
6528
6535
  if (this.isContextual("await") && this.canAwait) o = this.parseAwait(r), t = !0;
6529
6536
  else if (this.type.prefix) {
6530
6537
  var s = this.startNode(), c = this.type === B.incDec;
6531
- s.operator = this.value, s.prefix = !0, this.next(), s.argument = this.parseMaybeUnary(null, !0, c, r), this.checkExpressionErrors(e, !0), c ? this.checkLValSimple(s.argument) : this.strict && s.operator === "delete" && Ea(s.argument) ? this.raiseRecoverable(s.start, "Deleting local variable in strict mode") : s.operator === "delete" && Da(s.argument) ? this.raiseRecoverable(s.start, "Private fields can not be deleted") : t = !0, o = this.finishNode(s, c ? "UpdateExpression" : "UnaryExpression");
6538
+ s.operator = this.value, s.prefix = !0, this.next(), s.argument = this.parseMaybeUnary(null, !0, c, r), this.checkExpressionErrors(e, !0), c ? this.checkLValSimple(s.argument) : this.strict && s.operator === "delete" && Ta(s.argument) ? this.raiseRecoverable(s.start, "Deleting local variable in strict mode") : s.operator === "delete" && Ea(s.argument) ? this.raiseRecoverable(s.start, "Private fields can not be deleted") : t = !0, o = this.finishNode(s, c ? "UpdateExpression" : "UnaryExpression");
6532
6539
  } else if (!t && this.type === B.privateId) (r || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), o = this.parsePrivateIdent(), this.type !== B._in && this.unexpected();
6533
6540
  else {
6534
6541
  if (o = this.parseExprSubscripts(e, r), this.checkExpressionErrors(e)) return o;
@@ -6542,18 +6549,18 @@ Y.checkPropClash = function(e, t, n) {
6542
6549
  else return this.buildBinary(i, a, o, this.parseMaybeUnary(null, !1, !1, r), "**", !1);
6543
6550
  } else return o;
6544
6551
  };
6545
- function Ea(e) {
6546
- return e.type === "Identifier" || e.type === "ParenthesizedExpression" && Ea(e.expression);
6552
+ function Ta(e) {
6553
+ return e.type === "Identifier" || e.type === "ParenthesizedExpression" && Ta(e.expression);
6547
6554
  }
6548
- function Da(e) {
6549
- return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && Da(e.expression) || e.type === "ParenthesizedExpression" && Da(e.expression);
6555
+ function Ea(e) {
6556
+ return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && Ea(e.expression) || e.type === "ParenthesizedExpression" && Ea(e.expression);
6550
6557
  }
6551
- Y.parseExprSubscripts = function(e, t) {
6558
+ X.parseExprSubscripts = function(e, t) {
6552
6559
  var n = this.start, r = this.startLoc, i = this.parseExprAtom(e, t);
6553
6560
  if (i.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") return i;
6554
6561
  var a = this.parseSubscripts(i, n, r, !1, t);
6555
6562
  return e && a.type === "MemberExpression" && (e.parenthesizedAssign >= a.start && (e.parenthesizedAssign = -1), e.parenthesizedBind >= a.start && (e.parenthesizedBind = -1), e.trailingComma >= a.start && (e.trailingComma = -1)), a;
6556
- }, Y.parseSubscripts = function(e, t, n, r, i) {
6563
+ }, X.parseSubscripts = function(e, t, n, r, i) {
6557
6564
  for (var a = this.options.ecmaVersion >= 8 && e.type === "Identifier" && e.name === "async" && this.lastTokEnd === e.end && !this.canInsertSemicolon() && e.end - e.start === 5 && this.potentialArrowAt === e.start, o = !1;;) {
6558
6565
  var s = this.parseSubscript(e, t, n, r, a, o, i);
6559
6566
  if (s.optional && (o = !0), s === e || s.type === "ArrowFunctionExpression") {
@@ -6565,11 +6572,11 @@ Y.parseExprSubscripts = function(e, t) {
6565
6572
  }
6566
6573
  e = s;
6567
6574
  }
6568
- }, Y.shouldParseAsyncArrow = function() {
6575
+ }, X.shouldParseAsyncArrow = function() {
6569
6576
  return !this.canInsertSemicolon() && this.eat(B.arrow);
6570
- }, Y.parseSubscriptAsyncArrow = function(e, t, n, r) {
6577
+ }, X.parseSubscriptAsyncArrow = function(e, t, n, r) {
6571
6578
  return this.parseArrowExpression(this.startNodeAt(e, t), n, !0, r);
6572
- }, Y.parseSubscript = function(e, t, n, r, i, a, o) {
6579
+ }, X.parseSubscript = function(e, t, n, r, i, a, o) {
6573
6580
  var s = this.options.ecmaVersion >= 11, c = s && this.eat(B.questionDot);
6574
6581
  r && c && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
6575
6582
  var l = this.eat(B.bracketL);
@@ -6590,7 +6597,7 @@ Y.parseExprSubscripts = function(e, t) {
6590
6597
  _.tag = e, _.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(_, "TaggedTemplateExpression");
6591
6598
  }
6592
6599
  return e;
6593
- }, Y.parseExprAtom = function(e, t, n) {
6600
+ }, X.parseExprAtom = function(e, t, n) {
6594
6601
  this.type === B.slash && this.readRegexp();
6595
6602
  var r, i = this.potentialArrowAt === this.start;
6596
6603
  switch (this.type) {
@@ -6598,7 +6605,7 @@ Y.parseExprSubscripts = function(e, t) {
6598
6605
  case B._this: return r = this.startNode(), this.next(), this.finishNode(r, "ThisExpression");
6599
6606
  case B.name:
6600
6607
  var a = this.start, o = this.startLoc, s = this.containsEsc, c = this.parseIdent(!1);
6601
- if (this.options.ecmaVersion >= 8 && !s && c.name === "async" && !this.canInsertSemicolon() && this.eat(B._function)) return this.overrideContext(J.f_expr), this.parseFunction(this.startNodeAt(a, o), 0, !1, !0, t);
6608
+ if (this.options.ecmaVersion >= 8 && !s && c.name === "async" && !this.canInsertSemicolon() && this.eat(B._function)) return this.overrideContext(Y.f_expr), this.parseFunction(this.startNodeAt(a, o), 0, !1, !0, t);
6602
6609
  if (i && !this.canInsertSemicolon()) {
6603
6610
  if (this.eat(B.arrow)) return this.parseArrowExpression(this.startNodeAt(a, o), [c], !1, t);
6604
6611
  if (this.options.ecmaVersion >= 8 && c.name === "async" && this.type === B.name && !s && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return c = this.parseIdent(!1), (this.canInsertSemicolon() || !this.eat(B.arrow)) && this.unexpected(), this.parseArrowExpression(this.startNodeAt(a, o), [c], !0, t);
@@ -6619,7 +6626,7 @@ Y.parseExprSubscripts = function(e, t) {
6619
6626
  var u = this.start, d = this.parseParenAndDistinguishExpression(i, t);
6620
6627
  return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(d) && (e.parenthesizedAssign = u), e.parenthesizedBind < 0 && (e.parenthesizedBind = u)), d;
6621
6628
  case B.bracketL: return r = this.startNode(), this.next(), r.elements = this.parseExprList(B.bracketR, !0, !0, e), this.finishNode(r, "ArrayExpression");
6622
- case B.braceL: return this.overrideContext(J.b_expr), this.parseObj(!1, e);
6629
+ case B.braceL: return this.overrideContext(Y.b_expr), this.parseObj(!1, e);
6623
6630
  case B._function: return r = this.startNode(), this.next(), this.parseFunction(r, 0);
6624
6631
  case B._class: return this.parseClass(this.startNode(), !1);
6625
6632
  case B._new: return this.parseNew();
@@ -6627,9 +6634,9 @@ Y.parseExprSubscripts = function(e, t) {
6627
6634
  case B._import: return this.options.ecmaVersion >= 11 ? this.parseExprImport(n) : this.unexpected();
6628
6635
  default: return this.parseExprAtomDefault();
6629
6636
  }
6630
- }, Y.parseExprAtomDefault = function() {
6637
+ }, X.parseExprAtomDefault = function() {
6631
6638
  this.unexpected();
6632
- }, Y.parseExprImport = function(e) {
6639
+ }, X.parseExprImport = function(e) {
6633
6640
  var t = this.startNode();
6634
6641
  if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === B.parenL && !e) return this.parseDynamicImport(t);
6635
6642
  if (this.type === B.dot) {
@@ -6637,27 +6644,27 @@ Y.parseExprSubscripts = function(e, t) {
6637
6644
  return n.name = "import", t.meta = this.finishNode(n, "Identifier"), this.parseImportMeta(t);
6638
6645
  }
6639
6646
  this.unexpected();
6640
- }, Y.parseDynamicImport = function(e) {
6647
+ }, X.parseDynamicImport = function(e) {
6641
6648
  if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16) this.eat(B.parenR) ? e.options = null : (this.expect(B.comma), this.afterTrailingComma(B.parenR) ? e.options = null : (e.options = this.parseMaybeAssign(), this.eat(B.parenR) || (this.expect(B.comma), this.afterTrailingComma(B.parenR) || this.unexpected())));
6642
6649
  else if (!this.eat(B.parenR)) {
6643
6650
  var t = this.start;
6644
6651
  this.eat(B.comma) && this.eat(B.parenR) ? this.raiseRecoverable(t, "Trailing comma is not allowed in import()") : this.unexpected(t);
6645
6652
  }
6646
6653
  return this.finishNode(e, "ImportExpression");
6647
- }, Y.parseImportMeta = function(e) {
6654
+ }, X.parseImportMeta = function(e) {
6648
6655
  this.next();
6649
6656
  var t = this.containsEsc;
6650
6657
  return e.property = this.parseIdent(!0), e.property.name !== "meta" && this.raiseRecoverable(e.property.start, "The only valid meta property for import is 'import.meta'"), t && this.raiseRecoverable(e.start, "'import.meta' must not contain escaped characters"), this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere && this.raiseRecoverable(e.start, "Cannot use 'import.meta' outside a module"), this.finishNode(e, "MetaProperty");
6651
- }, Y.parseLiteral = function(e) {
6658
+ }, X.parseLiteral = function(e) {
6652
6659
  var t = this.startNode();
6653
6660
  return t.value = e, t.raw = this.input.slice(this.start, this.end), t.raw.charCodeAt(t.raw.length - 1) === 110 && (t.bigint = t.value == null ? t.raw.slice(0, -1).replace(/_/g, "") : t.value.toString()), this.next(), this.finishNode(t, "Literal");
6654
- }, Y.parseParenExpression = function() {
6661
+ }, X.parseParenExpression = function() {
6655
6662
  this.expect(B.parenL);
6656
6663
  var e = this.parseExpression();
6657
6664
  return this.expect(B.parenR), e;
6658
- }, Y.shouldParseArrow = function(e) {
6665
+ }, X.shouldParseArrow = function(e) {
6659
6666
  return !this.canInsertSemicolon();
6660
- }, Y.parseParenAndDistinguishExpression = function(e, t) {
6667
+ }, X.parseParenAndDistinguishExpression = function(e, t) {
6661
6668
  var n = this.start, r = this.startLoc, i, a = this.options.ecmaVersion >= 8;
6662
6669
  if (this.options.ecmaVersion >= 6) {
6663
6670
  this.next();
@@ -6682,13 +6689,13 @@ Y.parseExprSubscripts = function(e, t) {
6682
6689
  return _.expression = i, this.finishNode(_, "ParenthesizedExpression");
6683
6690
  }
6684
6691
  return i;
6685
- }, Y.parseParenItem = function(e) {
6692
+ }, X.parseParenItem = function(e) {
6686
6693
  return e;
6687
- }, Y.parseParenArrowList = function(e, t, n, r) {
6694
+ }, X.parseParenArrowList = function(e, t, n, r) {
6688
6695
  return this.parseArrowExpression(this.startNodeAt(e, t), n, !1, r);
6689
6696
  };
6690
- var Oa = [];
6691
- Y.parseNew = function() {
6697
+ var Da = [];
6698
+ X.parseNew = function() {
6692
6699
  this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
6693
6700
  var e = this.startNode();
6694
6701
  if (this.next(), this.options.ecmaVersion >= 6 && this.type === B.dot) {
@@ -6698,8 +6705,8 @@ Y.parseNew = function() {
6698
6705
  return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), n && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
6699
6706
  }
6700
6707
  var r = this.start, i = this.startLoc;
6701
- return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, i, !0, !1), e.callee.type === "Super" && this.raiseRecoverable(r, "Invalid use of 'super'"), e.arguments = this.eat(B.parenL) ? this.parseExprList(B.parenR, this.options.ecmaVersion >= 8, !1) : Oa, this.finishNode(e, "NewExpression");
6702
- }, Y.parseTemplateElement = function(e) {
6708
+ return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, i, !0, !1), e.callee.type === "Super" && this.raiseRecoverable(r, "Invalid use of 'super'"), e.arguments = this.eat(B.parenL) ? this.parseExprList(B.parenR, this.options.ecmaVersion >= 8, !1) : Da, this.finishNode(e, "NewExpression");
6709
+ }, X.parseTemplateElement = function(e) {
6703
6710
  var t = e.isTagged, n = this.startNode();
6704
6711
  return this.type === B.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), n.value = {
6705
6712
  raw: this.value.replace(/\r\n?/g, "\n"),
@@ -6708,7 +6715,7 @@ Y.parseNew = function() {
6708
6715
  raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
6709
6716
  cooked: this.value
6710
6717
  }, this.next(), n.tail = this.type === B.backQuote, this.finishNode(n, "TemplateElement");
6711
- }, Y.parseTemplate = function(e) {
6718
+ }, X.parseTemplate = function(e) {
6712
6719
  e === void 0 && (e = {});
6713
6720
  var t = e.isTagged;
6714
6721
  t === void 0 && (t = !1);
@@ -6717,9 +6724,9 @@ Y.parseNew = function() {
6717
6724
  var r = this.parseTemplateElement({ isTagged: t });
6718
6725
  for (n.quasis = [r]; !r.tail;) this.type === B.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(B.dollarBraceL), n.expressions.push(this.parseExpression()), this.expect(B.braceR), n.quasis.push(r = this.parseTemplateElement({ isTagged: t }));
6719
6726
  return this.next(), this.finishNode(n, "TemplateLiteral");
6720
- }, Y.isAsyncProp = function(e) {
6727
+ }, X.isAsyncProp = function(e) {
6721
6728
  return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === B.name || this.type === B.num || this.type === B.string || this.type === B.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === B.star) && !V.test(this.input.slice(this.lastTokEnd, this.start));
6722
- }, Y.parseObj = function(e, t) {
6729
+ }, X.parseObj = function(e, t) {
6723
6730
  var n = this.startNode(), r = !0, i = {};
6724
6731
  for (n.properties = [], this.next(); !this.eat(B.braceR);) {
6725
6732
  if (r) r = !1;
@@ -6728,13 +6735,13 @@ Y.parseNew = function() {
6728
6735
  e || this.checkPropClash(a, i, t), n.properties.push(a);
6729
6736
  }
6730
6737
  return this.finishNode(n, e ? "ObjectPattern" : "ObjectExpression");
6731
- }, Y.parseProperty = function(e, t) {
6738
+ }, X.parseProperty = function(e, t) {
6732
6739
  var n = this.startNode(), r, i, a, o;
6733
6740
  if (this.options.ecmaVersion >= 9 && this.eat(B.ellipsis)) return e ? (n.argument = this.parseIdent(!1), this.type === B.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(n, "RestElement")) : (n.argument = this.parseMaybeAssign(!1, t), this.type === B.comma && t && t.trailingComma < 0 && (t.trailingComma = this.start), this.finishNode(n, "SpreadElement"));
6734
6741
  this.options.ecmaVersion >= 6 && (n.method = !1, n.shorthand = !1, (e || t) && (a = this.start, o = this.startLoc), e || (r = this.eat(B.star)));
6735
6742
  var s = this.containsEsc;
6736
6743
  return this.parsePropertyName(n), !e && !s && this.options.ecmaVersion >= 8 && !r && this.isAsyncProp(n) ? (i = !0, r = this.options.ecmaVersion >= 9 && this.eat(B.star), this.parsePropertyName(n)) : i = !1, this.parsePropertyValue(n, e, r, i, a, o, t, s), this.finishNode(n, "Property");
6737
- }, Y.parseGetterSetter = function(e) {
6744
+ }, X.parseGetterSetter = function(e) {
6738
6745
  var t = e.key.name;
6739
6746
  this.parsePropertyName(e), e.value = this.parseMethod(!1), e.kind = t;
6740
6747
  var n = e.kind === "get" ? 0 : 1;
@@ -6742,23 +6749,23 @@ Y.parseNew = function() {
6742
6749
  var r = e.value.start;
6743
6750
  e.kind === "get" ? this.raiseRecoverable(r, "getter should have no params") : this.raiseRecoverable(r, "setter should have exactly one param");
6744
6751
  } else e.kind === "set" && e.value.params[0].type === "RestElement" && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params");
6745
- }, Y.parsePropertyValue = function(e, t, n, r, i, a, o, s) {
6752
+ }, X.parsePropertyValue = function(e, t, n, r, i, a, o, s) {
6746
6753
  (n || r) && this.type === B.colon && this.unexpected(), this.eat(B.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, o), e.kind = "init") : this.options.ecmaVersion >= 6 && this.type === B.parenL ? (t && this.unexpected(), e.method = !0, e.value = this.parseMethod(n, r), e.kind = "init") : !t && !s && this.options.ecmaVersion >= 5 && !e.computed && e.key.type === "Identifier" && (e.key.name === "get" || e.key.name === "set") && this.type !== B.comma && this.type !== B.braceR && this.type !== B.eq ? ((n || r) && this.unexpected(), this.parseGetterSetter(e)) : this.options.ecmaVersion >= 6 && !e.computed && e.key.type === "Identifier" ? ((n || r) && this.unexpected(), this.checkUnreserved(e.key), e.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = i), t ? e.value = this.parseMaybeDefault(i, a, this.copyNode(e.key)) : this.type === B.eq && o ? (o.shorthandAssign < 0 && (o.shorthandAssign = this.start), e.value = this.parseMaybeDefault(i, a, this.copyNode(e.key))) : e.value = this.copyNode(e.key), e.kind = "init", e.shorthand = !0) : this.unexpected();
6747
- }, Y.parsePropertyName = function(e) {
6754
+ }, X.parsePropertyName = function(e) {
6748
6755
  if (this.options.ecmaVersion >= 6) {
6749
6756
  if (this.eat(B.bracketL)) return e.computed = !0, e.key = this.parseMaybeAssign(), this.expect(B.bracketR), e.key;
6750
6757
  e.computed = !1;
6751
6758
  }
6752
6759
  return e.key = this.type === B.num || this.type === B.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
6753
- }, Y.initFunction = function(e) {
6760
+ }, X.initFunction = function(e) {
6754
6761
  e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1);
6755
- }, Y.parseMethod = function(e, t, n) {
6762
+ }, X.parseMethod = function(e, t, n) {
6756
6763
  var r = this.startNode(), i = this.yieldPos, a = this.awaitPos, o = this.awaitIdentPos;
6757
6764
  return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(sa(t, r.generator) | ta | (n ? na : 0)), this.expect(B.parenL), r.params = this.parseBindingList(B.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(r, !1, !0, !1), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = o, this.finishNode(r, "FunctionExpression");
6758
- }, Y.parseArrowExpression = function(e, t, n, r) {
6765
+ }, X.parseArrowExpression = function(e, t, n, r) {
6759
6766
  var i = this.yieldPos, a = this.awaitPos, o = this.awaitIdentPos;
6760
6767
  return this.enterScope(sa(n, !1) | $i), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, r), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = o, this.finishNode(e, "ArrowFunctionExpression");
6761
- }, Y.parseFunctionBody = function(e, t, n, r) {
6768
+ }, X.parseFunctionBody = function(e, t, n, r) {
6762
6769
  var i = t && this.type !== B.braceL, a = this.strict, o = !1;
6763
6770
  if (i) e.body = this.parseMaybeAssign(r), e.expression = !0, this.checkParams(e, !1);
6764
6771
  else {
@@ -6768,15 +6775,15 @@ Y.parseNew = function() {
6768
6775
  this.labels = [], o && (this.strict = !0), this.checkParams(e, !a && !o && !t && !n && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, pa), e.body = this.parseBlock(!1, void 0, o && !a), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = c;
6769
6776
  }
6770
6777
  this.exitScope();
6771
- }, Y.isSimpleParamList = function(e) {
6778
+ }, X.isSimpleParamList = function(e) {
6772
6779
  for (var t = 0, n = e; t < n.length; t += 1) if (n[t].type !== "Identifier") return !1;
6773
6780
  return !0;
6774
- }, Y.checkParams = function(e, t) {
6781
+ }, X.checkParams = function(e, t) {
6775
6782
  for (var n = Object.create(null), r = 0, i = e.params; r < i.length; r += 1) {
6776
6783
  var a = i[r];
6777
6784
  this.checkLValInnerPattern(a, la, t ? null : n);
6778
6785
  }
6779
- }, Y.parseExprList = function(e, t, n, r) {
6786
+ }, X.parseExprList = function(e, t, n, r) {
6780
6787
  for (var i = [], a = !0; !this.eat(e);) {
6781
6788
  if (a) a = !1;
6782
6789
  else if (this.expect(B.comma), t && this.afterTrailingComma(e)) break;
@@ -6784,46 +6791,46 @@ Y.parseNew = function() {
6784
6791
  n && this.type === B.comma ? o = null : this.type === B.ellipsis ? (o = this.parseSpread(r), r && this.type === B.comma && r.trailingComma < 0 && (r.trailingComma = this.start)) : o = this.parseMaybeAssign(!1, r), i.push(o);
6785
6792
  }
6786
6793
  return i;
6787
- }, Y.checkUnreserved = function(e) {
6794
+ }, X.checkUnreserved = function(e) {
6788
6795
  var t = e.start, n = e.end, r = e.name;
6789
6796
  this.inGenerator && r === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & oa) && r === "arguments" && this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (r === "arguments" || r === "await") && this.raise(t, "Cannot use " + r + " in class static initialization block"), this.keywords.test(r) && this.raise(t, "Unexpected keyword '" + r + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(t, n).indexOf("\\") !== -1) && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(r) && (!this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + r + "' is reserved"));
6790
- }, Y.parseIdent = function(e) {
6797
+ }, X.parseIdent = function(e) {
6791
6798
  var t = this.parseIdentNode();
6792
6799
  return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), t.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = t.start)), t;
6793
- }, Y.parseIdentNode = function() {
6800
+ }, X.parseIdentNode = function() {
6794
6801
  var e = this.startNode();
6795
6802
  return this.type === B.name ? e.name = this.value : this.type.keyword ? (e.name = this.type.keyword, (e.name === "class" || e.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = B.name) : this.unexpected(), e;
6796
- }, Y.parsePrivateIdent = function() {
6803
+ }, X.parsePrivateIdent = function() {
6797
6804
  var e = this.startNode();
6798
6805
  return this.type === B.privateId ? e.name = this.value : this.unexpected(), this.next(), this.finishNode(e, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(e.start, "Private field '#" + e.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(e)), e;
6799
- }, Y.parseYield = function(e) {
6806
+ }, X.parseYield = function(e) {
6800
6807
  this.yieldPos ||= this.start;
6801
6808
  var t = this.startNode();
6802
6809
  return this.next(), this.type === B.semi || this.canInsertSemicolon() || this.type !== B.star && !this.type.startsExpr ? (t.delegate = !1, t.argument = null) : (t.delegate = this.eat(B.star), t.argument = this.parseMaybeAssign(e)), this.finishNode(t, "YieldExpression");
6803
- }, Y.parseAwait = function(e) {
6810
+ }, X.parseAwait = function(e) {
6804
6811
  this.awaitPos ||= this.start;
6805
6812
  var t = this.startNode();
6806
6813
  return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
6807
6814
  };
6808
- var ka = U.prototype;
6809
- ka.raise = function(e, t) {
6815
+ var Oa = U.prototype;
6816
+ Oa.raise = function(e, t) {
6810
6817
  var n = Wi(this.input, e);
6811
6818
  t += " (" + n.line + ":" + n.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
6812
6819
  var r = SyntaxError(t);
6813
6820
  throw r.pos = e, r.loc = n, r.raisedAt = this.pos, r;
6814
- }, ka.raiseRecoverable = ka.raise, ka.curPosition = function() {
6821
+ }, Oa.raiseRecoverable = Oa.raise, Oa.curPosition = function() {
6815
6822
  if (this.options.locations) return new Hi(this.curLine, this.pos - this.lineStart);
6816
6823
  };
6817
- var Aa = U.prototype, ja = function(e) {
6824
+ var ka = U.prototype, Aa = function(e) {
6818
6825
  this.flags = e, this.var = [], this.lexical = [], this.functions = [];
6819
6826
  };
6820
- Aa.enterScope = function(e) {
6821
- this.scopeStack.push(new ja(e));
6822
- }, Aa.exitScope = function() {
6827
+ ka.enterScope = function(e) {
6828
+ this.scopeStack.push(new Aa(e));
6829
+ }, ka.exitScope = function() {
6823
6830
  this.scopeStack.pop();
6824
- }, Aa.treatFunctionsAsVarInScope = function(e) {
6831
+ }, ka.treatFunctionsAsVarInScope = function(e) {
6825
6832
  return e.flags & Xi || !this.inModule && e.flags & Yi;
6826
- }, Aa.declareName = function(e, t, n) {
6833
+ }, ka.declareName = function(e, t, n) {
6827
6834
  var r = !1;
6828
6835
  if (t === ua) {
6829
6836
  var i = this.currentScope();
@@ -6841,103 +6848,103 @@ Aa.enterScope = function(e) {
6841
6848
  if (s.var.push(e), this.inModule && s.flags & Yi && delete this.undefinedExports[e], s.flags & oa) break;
6842
6849
  }
6843
6850
  r && this.raiseRecoverable(n, "Identifier '" + e + "' has already been declared");
6844
- }, Aa.checkLocalExport = function(e) {
6851
+ }, ka.checkLocalExport = function(e) {
6845
6852
  this.scopeStack[0].lexical.indexOf(e.name) === -1 && this.scopeStack[0].var.indexOf(e.name) === -1 && (this.undefinedExports[e.name] = e);
6846
- }, Aa.currentScope = function() {
6853
+ }, ka.currentScope = function() {
6847
6854
  return this.scopeStack[this.scopeStack.length - 1];
6848
- }, Aa.currentVarScope = function() {
6855
+ }, ka.currentVarScope = function() {
6849
6856
  for (var e = this.scopeStack.length - 1;; e--) {
6850
6857
  var t = this.scopeStack[e];
6851
6858
  if (t.flags & (oa | ia | ra)) return t;
6852
6859
  }
6853
- }, Aa.currentThisScope = function() {
6860
+ }, ka.currentThisScope = function() {
6854
6861
  for (var e = this.scopeStack.length - 1;; e--) {
6855
6862
  var t = this.scopeStack[e];
6856
6863
  if (t.flags & (oa | ia | ra) && !(t.flags & $i)) return t;
6857
6864
  }
6858
6865
  };
6859
- var Ma = function(e, t, n) {
6866
+ var ja = function(e, t, n) {
6860
6867
  this.type = "", this.start = t, this.end = 0, e.options.locations && (this.loc = new Ui(e, n)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [t, 0]);
6861
- }, Na = U.prototype;
6862
- Na.startNode = function() {
6863
- return new Ma(this, this.start, this.startLoc);
6864
- }, Na.startNodeAt = function(e, t) {
6865
- return new Ma(this, e, t);
6868
+ }, Ma = U.prototype;
6869
+ Ma.startNode = function() {
6870
+ return new ja(this, this.start, this.startLoc);
6871
+ }, Ma.startNodeAt = function(e, t) {
6872
+ return new ja(this, e, t);
6866
6873
  };
6867
- function Pa(e, t, n, r) {
6874
+ function Na(e, t, n, r) {
6868
6875
  return e.type = t, e.end = n, this.options.locations && (e.loc.end = r), this.options.ranges && (e.range[1] = n), e;
6869
6876
  }
6870
- Na.finishNode = function(e, t) {
6871
- return Pa.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
6872
- }, Na.finishNodeAt = function(e, t, n, r) {
6873
- return Pa.call(this, e, t, n, r);
6874
- }, Na.copyNode = function(e) {
6875
- var t = new Ma(this, e.start, this.startLoc);
6877
+ Ma.finishNode = function(e, t) {
6878
+ return Na.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
6879
+ }, Ma.finishNodeAt = function(e, t, n, r) {
6880
+ return Na.call(this, e, t, n, r);
6881
+ }, Ma.copyNode = function(e) {
6882
+ var t = new ja(this, e.start, this.startLoc);
6876
6883
  for (var n in e) t[n] = e[n];
6877
6884
  return t;
6878
6885
  };
6879
- var Fa = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz", Ia = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", La = Ia + " Extended_Pictographic", Ra = La, za = Ra + " EBase EComp EMod EPres ExtPict", Ba = za, Va = {
6880
- 9: Ia,
6881
- 10: La,
6882
- 11: Ra,
6883
- 12: za,
6884
- 13: Ba,
6885
- 14: Ba
6886
- }, Ha = {
6886
+ var Pa = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz", Fa = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", Ia = Fa + " Extended_Pictographic", La = Ia, Ra = La + " EBase EComp EMod EPres ExtPict", za = Ra, Ba = {
6887
+ 9: Fa,
6888
+ 10: Ia,
6889
+ 11: La,
6890
+ 12: Ra,
6891
+ 13: za,
6892
+ 14: za
6893
+ }, Va = {
6887
6894
  9: "",
6888
6895
  10: "",
6889
6896
  11: "",
6890
6897
  12: "",
6891
6898
  13: "",
6892
6899
  14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
6893
- }, Ua = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", Wa = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", Ga = Wa + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", Ka = Ga + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", qa = Ka + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", Ja = qa + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Ya = {
6894
- 9: Wa,
6895
- 10: Ga,
6896
- 11: Ka,
6897
- 12: qa,
6898
- 13: Ja,
6899
- 14: Ja + " " + Fa
6900
- }, Xa = {};
6901
- function Za(e) {
6902
- var t = Xa[e] = {
6903
- binary: zi(Va[e] + " " + Ua),
6904
- binaryOfStrings: zi(Ha[e]),
6900
+ }, Ha = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", Ua = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", Wa = Ua + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", Ga = Wa + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", Ka = Ga + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", qa = Ka + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Ja = {
6901
+ 9: Ua,
6902
+ 10: Wa,
6903
+ 11: Ga,
6904
+ 12: Ka,
6905
+ 13: qa,
6906
+ 14: qa + " " + Pa
6907
+ }, Ya = {};
6908
+ function Xa(e) {
6909
+ var t = Ya[e] = {
6910
+ binary: zi(Ba[e] + " " + Ha),
6911
+ binaryOfStrings: zi(Va[e]),
6905
6912
  nonBinary: {
6906
- General_Category: zi(Ua),
6907
- Script: zi(Ya[e])
6913
+ General_Category: zi(Ha),
6914
+ Script: zi(Ja[e])
6908
6915
  }
6909
6916
  };
6910
6917
  t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
6911
6918
  }
6912
- for (var Qa = 0, $a = [
6919
+ for (var Za = 0, Qa = [
6913
6920
  9,
6914
6921
  10,
6915
6922
  11,
6916
6923
  12,
6917
6924
  13,
6918
6925
  14
6919
- ]; Qa < $a.length; Qa += 1) {
6920
- var eo = $a[Qa];
6921
- Za(eo);
6926
+ ]; Za < Qa.length; Za += 1) {
6927
+ var $a = Qa[Za];
6928
+ Xa($a);
6922
6929
  }
6923
- var X = U.prototype, to = function(e, t) {
6930
+ var Z = U.prototype, eo = function(e, t) {
6924
6931
  this.parent = e, this.base = t || this;
6925
6932
  };
6926
- to.prototype.separatedFrom = function(e) {
6933
+ eo.prototype.separatedFrom = function(e) {
6927
6934
  for (var t = this; t; t = t.parent) for (var n = e; n; n = n.parent) if (t.base === n.base && t !== n) return !0;
6928
6935
  return !1;
6929
- }, to.prototype.sibling = function() {
6930
- return new to(this.parent, this.base);
6936
+ }, eo.prototype.sibling = function() {
6937
+ return new eo(this.parent, this.base);
6931
6938
  };
6932
- var no = function(e) {
6933
- this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = Xa[e.options.ecmaVersion >= 14 ? 14 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null;
6939
+ var to = function(e) {
6940
+ this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = Ya[e.options.ecmaVersion >= 14 ? 14 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null;
6934
6941
  };
6935
- no.prototype.reset = function(e, t, n) {
6942
+ to.prototype.reset = function(e, t, n) {
6936
6943
  var r = n.indexOf("v") !== -1, i = n.indexOf("u") !== -1;
6937
6944
  this.start = e | 0, this.source = t + "", this.flags = n, r && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = i && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = i && this.parser.options.ecmaVersion >= 9);
6938
- }, no.prototype.raise = function(e) {
6945
+ }, to.prototype.raise = function(e) {
6939
6946
  this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e);
6940
- }, no.prototype.at = function(e, t) {
6947
+ }, to.prototype.at = function(e, t) {
6941
6948
  t === void 0 && (t = !1);
6942
6949
  var n = this.source, r = n.length;
6943
6950
  if (e >= r) return -1;
@@ -6945,21 +6952,21 @@ no.prototype.reset = function(e, t, n) {
6945
6952
  if (!(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r) return i;
6946
6953
  var a = n.charCodeAt(e + 1);
6947
6954
  return a >= 56320 && a <= 57343 ? (i << 10) + a - 56613888 : i;
6948
- }, no.prototype.nextIndex = function(e, t) {
6955
+ }, to.prototype.nextIndex = function(e, t) {
6949
6956
  t === void 0 && (t = !1);
6950
6957
  var n = this.source, r = n.length;
6951
6958
  if (e >= r) return r;
6952
6959
  var i = n.charCodeAt(e), a;
6953
6960
  return !(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r || (a = n.charCodeAt(e + 1)) < 56320 || a > 57343 ? e + 1 : e + 2;
6954
- }, no.prototype.current = function(e) {
6961
+ }, to.prototype.current = function(e) {
6955
6962
  return e === void 0 && (e = !1), this.at(this.pos, e);
6956
- }, no.prototype.lookahead = function(e) {
6963
+ }, to.prototype.lookahead = function(e) {
6957
6964
  return e === void 0 && (e = !1), this.at(this.nextIndex(this.pos, e), e);
6958
- }, no.prototype.advance = function(e) {
6965
+ }, to.prototype.advance = function(e) {
6959
6966
  e === void 0 && (e = !1), this.pos = this.nextIndex(this.pos, e);
6960
- }, no.prototype.eat = function(e, t) {
6967
+ }, to.prototype.eat = function(e, t) {
6961
6968
  return t === void 0 && (t = !1), this.current(t) === e && (this.advance(t), !0);
6962
- }, no.prototype.eatChars = function(e, t) {
6969
+ }, to.prototype.eatChars = function(e, t) {
6963
6970
  t === void 0 && (t = !1);
6964
6971
  for (var n = this.pos, r = 0, i = e; r < i.length; r += 1) {
6965
6972
  var a = i[r], o = this.at(n, t);
@@ -6967,34 +6974,34 @@ no.prototype.reset = function(e, t, n) {
6967
6974
  n = this.nextIndex(n, t);
6968
6975
  }
6969
6976
  return this.pos = n, !0;
6970
- }, X.validateRegExpFlags = function(e) {
6977
+ }, Z.validateRegExpFlags = function(e) {
6971
6978
  for (var t = e.validFlags, n = e.flags, r = !1, i = !1, a = 0; a < n.length; a++) {
6972
6979
  var o = n.charAt(a);
6973
6980
  t.indexOf(o) === -1 && this.raise(e.start, "Invalid regular expression flag"), n.indexOf(o, a + 1) > -1 && this.raise(e.start, "Duplicate regular expression flag"), o === "u" && (r = !0), o === "v" && (i = !0);
6974
6981
  }
6975
6982
  this.options.ecmaVersion >= 15 && r && i && this.raise(e.start, "Invalid regular expression flag");
6976
6983
  };
6977
- function ro(e) {
6984
+ function no(e) {
6978
6985
  for (var t in e) return !0;
6979
6986
  return !1;
6980
6987
  }
6981
- X.validateRegExpPattern = function(e) {
6982
- this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && ro(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
6983
- }, X.regexp_pattern = function(e) {
6988
+ Z.validateRegExpPattern = function(e) {
6989
+ this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && no(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
6990
+ }, Z.regexp_pattern = function(e) {
6984
6991
  e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(41) && e.raise("Unmatched ')'"), (e.eat(93) || e.eat(125)) && e.raise("Lone quantifier brackets")), e.maxBackReference > e.numCapturingParens && e.raise("Invalid escape");
6985
6992
  for (var t = 0, n = e.backReferenceNames; t < n.length; t += 1) {
6986
6993
  var r = n[t];
6987
6994
  e.groupNames[r] || e.raise("Invalid named capture referenced");
6988
6995
  }
6989
- }, X.regexp_disjunction = function(e) {
6996
+ }, Z.regexp_disjunction = function(e) {
6990
6997
  var t = this.options.ecmaVersion >= 16;
6991
- for (t && (e.branchID = new to(e.branchID, null)), this.regexp_alternative(e); e.eat(124);) t && (e.branchID = e.branchID.sibling()), this.regexp_alternative(e);
6998
+ for (t && (e.branchID = new eo(e.branchID, null)), this.regexp_alternative(e); e.eat(124);) t && (e.branchID = e.branchID.sibling()), this.regexp_alternative(e);
6992
6999
  t && (e.branchID = e.branchID.parent), this.regexp_eatQuantifier(e, !0) && e.raise("Nothing to repeat"), e.eat(123) && e.raise("Lone quantifier brackets");
6993
- }, X.regexp_alternative = function(e) {
7000
+ }, Z.regexp_alternative = function(e) {
6994
7001
  for (; e.pos < e.source.length && this.regexp_eatTerm(e););
6995
- }, X.regexp_eatTerm = function(e) {
7002
+ }, Z.regexp_eatTerm = function(e) {
6996
7003
  return this.regexp_eatAssertion(e) ? (e.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(e) && e.switchU && e.raise("Invalid quantifier"), !0) : (e.switchU ? this.regexp_eatAtom(e) : this.regexp_eatExtendedAtom(e)) ? (this.regexp_eatQuantifier(e), !0) : !1;
6997
- }, X.regexp_eatAssertion = function(e) {
7004
+ }, Z.regexp_eatAssertion = function(e) {
6998
7005
  var t = e.pos;
6999
7006
  if (e.lastAssertionIsQuantifiable = !1, e.eat(94) || e.eat(36)) return !0;
7000
7007
  if (e.eat(92)) {
@@ -7006,11 +7013,11 @@ X.validateRegExpPattern = function(e) {
7006
7013
  if (this.options.ecmaVersion >= 9 && (n = e.eat(60)), e.eat(61) || e.eat(33)) return this.regexp_disjunction(e), e.eat(41) || e.raise("Unterminated group"), e.lastAssertionIsQuantifiable = !n, !0;
7007
7014
  }
7008
7015
  return e.pos = t, !1;
7009
- }, X.regexp_eatQuantifier = function(e, t) {
7016
+ }, Z.regexp_eatQuantifier = function(e, t) {
7010
7017
  return t === void 0 && (t = !1), this.regexp_eatQuantifierPrefix(e, t) ? (e.eat(63), !0) : !1;
7011
- }, X.regexp_eatQuantifierPrefix = function(e, t) {
7018
+ }, Z.regexp_eatQuantifierPrefix = function(e, t) {
7012
7019
  return e.eat(42) || e.eat(43) || e.eat(63) || this.regexp_eatBracedQuantifier(e, t);
7013
- }, X.regexp_eatBracedQuantifier = function(e, t) {
7020
+ }, Z.regexp_eatBracedQuantifier = function(e, t) {
7014
7021
  var n = e.pos;
7015
7022
  if (e.eat(123)) {
7016
7023
  var r = 0, i = -1;
@@ -7018,16 +7025,16 @@ X.validateRegExpPattern = function(e) {
7018
7025
  e.switchU && !t && e.raise("Incomplete quantifier"), e.pos = n;
7019
7026
  }
7020
7027
  return !1;
7021
- }, X.regexp_eatAtom = function(e) {
7028
+ }, Z.regexp_eatAtom = function(e) {
7022
7029
  return this.regexp_eatPatternCharacters(e) || e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e);
7023
- }, X.regexp_eatReverseSolidusAtomEscape = function(e) {
7030
+ }, Z.regexp_eatReverseSolidusAtomEscape = function(e) {
7024
7031
  var t = e.pos;
7025
7032
  if (e.eat(92)) {
7026
7033
  if (this.regexp_eatAtomEscape(e)) return !0;
7027
7034
  e.pos = t;
7028
7035
  }
7029
7036
  return !1;
7030
- }, X.regexp_eatUncapturingGroup = function(e) {
7037
+ }, Z.regexp_eatUncapturingGroup = function(e) {
7031
7038
  var t = e.pos;
7032
7039
  if (e.eat(40)) {
7033
7040
  if (e.eat(63)) {
@@ -7056,37 +7063,37 @@ X.validateRegExpPattern = function(e) {
7056
7063
  e.pos = t;
7057
7064
  }
7058
7065
  return !1;
7059
- }, X.regexp_eatCapturingGroup = function(e) {
7066
+ }, Z.regexp_eatCapturingGroup = function(e) {
7060
7067
  if (e.eat(40)) {
7061
7068
  if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(e) : e.current() === 63 && e.raise("Invalid group"), this.regexp_disjunction(e), e.eat(41)) return e.numCapturingParens += 1, !0;
7062
7069
  e.raise("Unterminated group");
7063
7070
  }
7064
7071
  return !1;
7065
- }, X.regexp_eatModifiers = function(e) {
7066
- for (var t = "", n = 0; (n = e.current()) !== -1 && io(n);) t += Bi(n), e.advance();
7072
+ }, Z.regexp_eatModifiers = function(e) {
7073
+ for (var t = "", n = 0; (n = e.current()) !== -1 && ro(n);) t += Bi(n), e.advance();
7067
7074
  return t;
7068
7075
  };
7069
- function io(e) {
7076
+ function ro(e) {
7070
7077
  return e === 105 || e === 109 || e === 115;
7071
7078
  }
7072
- X.regexp_eatExtendedAtom = function(e) {
7079
+ Z.regexp_eatExtendedAtom = function(e) {
7073
7080
  return e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e) || this.regexp_eatInvalidBracedQuantifier(e) || this.regexp_eatExtendedPatternCharacter(e);
7074
- }, X.regexp_eatInvalidBracedQuantifier = function(e) {
7081
+ }, Z.regexp_eatInvalidBracedQuantifier = function(e) {
7075
7082
  return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1;
7076
- }, X.regexp_eatSyntaxCharacter = function(e) {
7083
+ }, Z.regexp_eatSyntaxCharacter = function(e) {
7077
7084
  var t = e.current();
7078
- return ao(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
7085
+ return io(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
7079
7086
  };
7080
- function ao(e) {
7087
+ function io(e) {
7081
7088
  return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
7082
7089
  }
7083
- X.regexp_eatPatternCharacters = function(e) {
7084
- for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !ao(n);) e.advance();
7090
+ Z.regexp_eatPatternCharacters = function(e) {
7091
+ for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !io(n);) e.advance();
7085
7092
  return e.pos !== t;
7086
- }, X.regexp_eatExtendedPatternCharacter = function(e) {
7093
+ }, Z.regexp_eatExtendedPatternCharacter = function(e) {
7087
7094
  var t = e.current();
7088
7095
  return t !== -1 && t !== 36 && !(t >= 40 && t <= 43) && t !== 46 && t !== 63 && t !== 91 && t !== 94 && t !== 124 && (e.advance(), !0);
7089
- }, X.regexp_groupSpecifier = function(e) {
7096
+ }, Z.regexp_groupSpecifier = function(e) {
7090
7097
  if (e.eat(63)) {
7091
7098
  this.regexp_eatGroupName(e) || e.raise("Invalid group");
7092
7099
  var t = this.options.ecmaVersion >= 16, n = e.groupNames[e.lastStringValue];
@@ -7096,35 +7103,35 @@ X.regexp_eatPatternCharacters = function(e) {
7096
7103
  }
7097
7104
  t ? (n || (e.groupNames[e.lastStringValue] = [])).push(e.branchID) : e.groupNames[e.lastStringValue] = !0;
7098
7105
  }
7099
- }, X.regexp_eatGroupName = function(e) {
7106
+ }, Z.regexp_eatGroupName = function(e) {
7100
7107
  if (e.lastStringValue = "", e.eat(60)) {
7101
7108
  if (this.regexp_eatRegExpIdentifierName(e) && e.eat(62)) return !0;
7102
7109
  e.raise("Invalid capture group name");
7103
7110
  }
7104
7111
  return !1;
7105
- }, X.regexp_eatRegExpIdentifierName = function(e) {
7112
+ }, Z.regexp_eatRegExpIdentifierName = function(e) {
7106
7113
  if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) {
7107
7114
  for (e.lastStringValue += Bi(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e);) e.lastStringValue += Bi(e.lastIntValue);
7108
7115
  return !0;
7109
7116
  }
7110
7117
  return !1;
7111
- }, X.regexp_eatRegExpIdentifierStart = function(e) {
7118
+ }, Z.regexp_eatRegExpIdentifierStart = function(e) {
7112
7119
  var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
7113
- return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), oo(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
7120
+ return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), ao(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
7114
7121
  };
7115
- function oo(e) {
7122
+ function ao(e) {
7116
7123
  return Ei(e, !0) || e === 36 || e === 95;
7117
7124
  }
7118
- X.regexp_eatRegExpIdentifierPart = function(e) {
7125
+ Z.regexp_eatRegExpIdentifierPart = function(e) {
7119
7126
  var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
7120
- return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), so(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
7127
+ return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), oo(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
7121
7128
  };
7122
- function so(e) {
7129
+ function oo(e) {
7123
7130
  return Di(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
7124
7131
  }
7125
- X.regexp_eatAtomEscape = function(e) {
7132
+ Z.regexp_eatAtomEscape = function(e) {
7126
7133
  return this.regexp_eatBackReference(e) || this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e) || e.switchN && this.regexp_eatKGroupName(e) ? !0 : (e.switchU && (e.current() === 99 && e.raise("Invalid unicode escape"), e.raise("Invalid escape")), !1);
7127
- }, X.regexp_eatBackReference = function(e) {
7134
+ }, Z.regexp_eatBackReference = function(e) {
7128
7135
  var t = e.pos;
7129
7136
  if (this.regexp_eatDecimalEscape(e)) {
7130
7137
  var n = e.lastIntValue;
@@ -7133,34 +7140,34 @@ X.regexp_eatAtomEscape = function(e) {
7133
7140
  e.pos = t;
7134
7141
  }
7135
7142
  return !1;
7136
- }, X.regexp_eatKGroupName = function(e) {
7143
+ }, Z.regexp_eatKGroupName = function(e) {
7137
7144
  if (e.eat(107)) {
7138
7145
  if (this.regexp_eatGroupName(e)) return e.backReferenceNames.push(e.lastStringValue), !0;
7139
7146
  e.raise("Invalid named reference");
7140
7147
  }
7141
7148
  return !1;
7142
- }, X.regexp_eatCharacterEscape = function(e) {
7149
+ }, Z.regexp_eatCharacterEscape = function(e) {
7143
7150
  return this.regexp_eatControlEscape(e) || this.regexp_eatCControlLetter(e) || this.regexp_eatZero(e) || this.regexp_eatHexEscapeSequence(e) || this.regexp_eatRegExpUnicodeEscapeSequence(e, !1) || !e.switchU && this.regexp_eatLegacyOctalEscapeSequence(e) || this.regexp_eatIdentityEscape(e);
7144
- }, X.regexp_eatCControlLetter = function(e) {
7151
+ }, Z.regexp_eatCControlLetter = function(e) {
7145
7152
  var t = e.pos;
7146
7153
  if (e.eat(99)) {
7147
7154
  if (this.regexp_eatControlLetter(e)) return !0;
7148
7155
  e.pos = t;
7149
7156
  }
7150
7157
  return !1;
7151
- }, X.regexp_eatZero = function(e) {
7152
- return e.current() === 48 && !yo(e.lookahead()) && (e.lastIntValue = 0, e.advance(), !0);
7153
- }, X.regexp_eatControlEscape = function(e) {
7158
+ }, Z.regexp_eatZero = function(e) {
7159
+ return e.current() === 48 && !vo(e.lookahead()) && (e.lastIntValue = 0, e.advance(), !0);
7160
+ }, Z.regexp_eatControlEscape = function(e) {
7154
7161
  var t = e.current();
7155
7162
  return t === 116 ? (e.lastIntValue = 9, e.advance(), !0) : t === 110 ? (e.lastIntValue = 10, e.advance(), !0) : t === 118 ? (e.lastIntValue = 11, e.advance(), !0) : t === 102 ? (e.lastIntValue = 12, e.advance(), !0) : t === 114 && (e.lastIntValue = 13, e.advance(), !0);
7156
- }, X.regexp_eatControlLetter = function(e) {
7163
+ }, Z.regexp_eatControlLetter = function(e) {
7157
7164
  var t = e.current();
7158
- return co(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
7165
+ return so(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
7159
7166
  };
7160
- function co(e) {
7167
+ function so(e) {
7161
7168
  return e >= 65 && e <= 90 || e >= 97 && e <= 122;
7162
7169
  }
7163
- X.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
7170
+ Z.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
7164
7171
  t === void 0 && (t = !1);
7165
7172
  var n = e.pos, r = t || e.switchU;
7166
7173
  if (e.eat(117)) {
@@ -7176,19 +7183,19 @@ X.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
7176
7183
  }
7177
7184
  return !0;
7178
7185
  }
7179
- if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && lo(e.lastIntValue)) return !0;
7186
+ if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && co(e.lastIntValue)) return !0;
7180
7187
  r && e.raise("Invalid unicode escape"), e.pos = n;
7181
7188
  }
7182
7189
  return !1;
7183
7190
  };
7184
- function lo(e) {
7191
+ function co(e) {
7185
7192
  return e >= 0 && e <= 1114111;
7186
7193
  }
7187
- X.regexp_eatIdentityEscape = function(e) {
7194
+ Z.regexp_eatIdentityEscape = function(e) {
7188
7195
  if (e.switchU) return this.regexp_eatSyntaxCharacter(e) ? !0 : e.eat(47) ? (e.lastIntValue = 47, !0) : !1;
7189
7196
  var t = e.current();
7190
7197
  return t !== 99 && (!e.switchN || t !== 107) && (e.lastIntValue = t, e.advance(), !0);
7191
- }, X.regexp_eatDecimalEscape = function(e) {
7198
+ }, Z.regexp_eatDecimalEscape = function(e) {
7192
7199
  e.lastIntValue = 0;
7193
7200
  var t = e.current();
7194
7201
  if (t >= 49 && t <= 57) {
@@ -7199,69 +7206,69 @@ X.regexp_eatIdentityEscape = function(e) {
7199
7206
  }
7200
7207
  return !1;
7201
7208
  };
7202
- var uo = 0, fo = 1, Z = 2;
7203
- X.regexp_eatCharacterClassEscape = function(e) {
7209
+ var lo = 0, uo = 1, Q = 2;
7210
+ Z.regexp_eatCharacterClassEscape = function(e) {
7204
7211
  var t = e.current();
7205
- if (po(t)) return e.lastIntValue = -1, e.advance(), fo;
7212
+ if (fo(t)) return e.lastIntValue = -1, e.advance(), uo;
7206
7213
  var n = !1;
7207
7214
  if (e.switchU && this.options.ecmaVersion >= 9 && ((n = t === 80) || t === 112)) {
7208
7215
  e.lastIntValue = -1, e.advance();
7209
7216
  var r;
7210
- if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r === Z && e.raise("Invalid property name"), r;
7217
+ if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r === Q && e.raise("Invalid property name"), r;
7211
7218
  e.raise("Invalid property name");
7212
7219
  }
7213
- return uo;
7220
+ return lo;
7214
7221
  };
7215
- function po(e) {
7222
+ function fo(e) {
7216
7223
  return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
7217
7224
  }
7218
- X.regexp_eatUnicodePropertyValueExpression = function(e) {
7225
+ Z.regexp_eatUnicodePropertyValueExpression = function(e) {
7219
7226
  var t = e.pos;
7220
7227
  if (this.regexp_eatUnicodePropertyName(e) && e.eat(61)) {
7221
7228
  var n = e.lastStringValue;
7222
7229
  if (this.regexp_eatUnicodePropertyValue(e)) {
7223
7230
  var r = e.lastStringValue;
7224
- return this.regexp_validateUnicodePropertyNameAndValue(e, n, r), fo;
7231
+ return this.regexp_validateUnicodePropertyNameAndValue(e, n, r), uo;
7225
7232
  }
7226
7233
  }
7227
7234
  if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
7228
7235
  var i = e.lastStringValue;
7229
7236
  return this.regexp_validateUnicodePropertyNameOrValue(e, i);
7230
7237
  }
7231
- return uo;
7232
- }, X.regexp_validateUnicodePropertyNameAndValue = function(e, t, n) {
7238
+ return lo;
7239
+ }, Z.regexp_validateUnicodePropertyNameAndValue = function(e, t, n) {
7233
7240
  Ii(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(n) || e.raise("Invalid property value");
7234
- }, X.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
7235
- if (e.unicodeProperties.binary.test(t)) return fo;
7236
- if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return Z;
7241
+ }, Z.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
7242
+ if (e.unicodeProperties.binary.test(t)) return uo;
7243
+ if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return Q;
7237
7244
  e.raise("Invalid property name");
7238
- }, X.regexp_eatUnicodePropertyName = function(e) {
7245
+ }, Z.regexp_eatUnicodePropertyName = function(e) {
7239
7246
  var t = 0;
7240
- for (e.lastStringValue = ""; mo(t = e.current());) e.lastStringValue += Bi(t), e.advance();
7247
+ for (e.lastStringValue = ""; po(t = e.current());) e.lastStringValue += Bi(t), e.advance();
7241
7248
  return e.lastStringValue !== "";
7242
7249
  };
7243
- function mo(e) {
7244
- return co(e) || e === 95;
7250
+ function po(e) {
7251
+ return so(e) || e === 95;
7245
7252
  }
7246
- X.regexp_eatUnicodePropertyValue = function(e) {
7253
+ Z.regexp_eatUnicodePropertyValue = function(e) {
7247
7254
  var t = 0;
7248
- for (e.lastStringValue = ""; ho(t = e.current());) e.lastStringValue += Bi(t), e.advance();
7255
+ for (e.lastStringValue = ""; mo(t = e.current());) e.lastStringValue += Bi(t), e.advance();
7249
7256
  return e.lastStringValue !== "";
7250
7257
  };
7251
- function ho(e) {
7252
- return mo(e) || yo(e);
7258
+ function mo(e) {
7259
+ return po(e) || vo(e);
7253
7260
  }
7254
- X.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
7261
+ Z.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
7255
7262
  return this.regexp_eatUnicodePropertyValue(e);
7256
- }, X.regexp_eatCharacterClass = function(e) {
7263
+ }, Z.regexp_eatCharacterClass = function(e) {
7257
7264
  if (e.eat(91)) {
7258
7265
  var t = e.eat(94), n = this.regexp_classContents(e);
7259
- return e.eat(93) || e.raise("Unterminated character class"), t && n === Z && e.raise("Negated character class may contain strings"), !0;
7266
+ return e.eat(93) || e.raise("Unterminated character class"), t && n === Q && e.raise("Negated character class may contain strings"), !0;
7260
7267
  }
7261
7268
  return !1;
7262
- }, X.regexp_classContents = function(e) {
7263
- return e.current() === 93 ? fo : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), fo);
7264
- }, X.regexp_nonEmptyClassRanges = function(e) {
7269
+ }, Z.regexp_classContents = function(e) {
7270
+ return e.current() === 93 ? uo : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), uo);
7271
+ }, Z.regexp_nonEmptyClassRanges = function(e) {
7265
7272
  for (; this.regexp_eatClassAtom(e);) {
7266
7273
  var t = e.lastIntValue;
7267
7274
  if (e.eat(45) && this.regexp_eatClassAtom(e)) {
@@ -7269,19 +7276,19 @@ X.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
7269
7276
  e.switchU && (t === -1 || n === -1) && e.raise("Invalid character class"), t !== -1 && n !== -1 && t > n && e.raise("Range out of order in character class");
7270
7277
  }
7271
7278
  }
7272
- }, X.regexp_eatClassAtom = function(e) {
7279
+ }, Z.regexp_eatClassAtom = function(e) {
7273
7280
  var t = e.pos;
7274
7281
  if (e.eat(92)) {
7275
7282
  if (this.regexp_eatClassEscape(e)) return !0;
7276
7283
  if (e.switchU) {
7277
7284
  var n = e.current();
7278
- (n === 99 || So(n)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
7285
+ (n === 99 || xo(n)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
7279
7286
  }
7280
7287
  e.pos = t;
7281
7288
  }
7282
7289
  var r = e.current();
7283
7290
  return r !== 93 && (e.lastIntValue = r, e.advance(), !0);
7284
- }, X.regexp_eatClassEscape = function(e) {
7291
+ }, Z.regexp_eatClassEscape = function(e) {
7285
7292
  var t = e.pos;
7286
7293
  if (e.eat(98)) return e.lastIntValue = 8, !0;
7287
7294
  if (e.switchU && e.eat(45)) return e.lastIntValue = 45, !0;
@@ -7290,14 +7297,14 @@ X.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
7290
7297
  e.pos = t;
7291
7298
  }
7292
7299
  return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
7293
- }, X.regexp_classSetExpression = function(e) {
7294
- var t = fo, n;
7300
+ }, Z.regexp_classSetExpression = function(e) {
7301
+ var t = uo, n;
7295
7302
  if (!this.regexp_eatClassSetRange(e)) {
7296
7303
  if (n = this.regexp_eatClassSetOperand(e)) {
7297
- n === Z && (t = Z);
7304
+ n === Q && (t = Q);
7298
7305
  for (var r = e.pos; e.eatChars([38, 38]);) {
7299
7306
  if (e.current() !== 38 && (n = this.regexp_eatClassSetOperand(e))) {
7300
- n !== Z && (t = fo);
7307
+ n !== Q && (t = uo);
7301
7308
  continue;
7302
7309
  }
7303
7310
  e.raise("Invalid character in character class");
@@ -7309,9 +7316,9 @@ X.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
7309
7316
  }
7310
7317
  for (;;) if (!this.regexp_eatClassSetRange(e)) {
7311
7318
  if (n = this.regexp_eatClassSetOperand(e), !n) return t;
7312
- n === Z && (t = Z);
7319
+ n === Q && (t = Q);
7313
7320
  }
7314
- }, X.regexp_eatClassSetRange = function(e) {
7321
+ }, Z.regexp_eatClassSetRange = function(e) {
7315
7322
  var t = e.pos;
7316
7323
  if (this.regexp_eatClassSetCharacter(e)) {
7317
7324
  var n = e.lastIntValue;
@@ -7322,13 +7329,13 @@ X.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
7322
7329
  e.pos = t;
7323
7330
  }
7324
7331
  return !1;
7325
- }, X.regexp_eatClassSetOperand = function(e) {
7326
- return this.regexp_eatClassSetCharacter(e) ? fo : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
7327
- }, X.regexp_eatNestedClass = function(e) {
7332
+ }, Z.regexp_eatClassSetOperand = function(e) {
7333
+ return this.regexp_eatClassSetCharacter(e) ? uo : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
7334
+ }, Z.regexp_eatNestedClass = function(e) {
7328
7335
  var t = e.pos;
7329
7336
  if (e.eat(91)) {
7330
7337
  var n = e.eat(94), r = this.regexp_classContents(e);
7331
- if (e.eat(93)) return n && r === Z && e.raise("Negated character class may contain strings"), r;
7338
+ if (e.eat(93)) return n && r === Q && e.raise("Negated character class may contain strings"), r;
7332
7339
  e.pos = t;
7333
7340
  }
7334
7341
  if (e.eat(92)) {
@@ -7337,7 +7344,7 @@ X.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
7337
7344
  e.pos = t;
7338
7345
  }
7339
7346
  return null;
7340
- }, X.regexp_eatClassStringDisjunction = function(e) {
7347
+ }, Z.regexp_eatClassStringDisjunction = function(e) {
7341
7348
  var t = e.pos;
7342
7349
  if (e.eatChars([92, 113])) {
7343
7350
  if (e.eat(123)) {
@@ -7347,61 +7354,61 @@ X.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
7347
7354
  e.pos = t;
7348
7355
  }
7349
7356
  return null;
7350
- }, X.regexp_classStringDisjunctionContents = function(e) {
7351
- for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) === Z && (t = Z);
7357
+ }, Z.regexp_classStringDisjunctionContents = function(e) {
7358
+ for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) === Q && (t = Q);
7352
7359
  return t;
7353
- }, X.regexp_classString = function(e) {
7360
+ }, Z.regexp_classString = function(e) {
7354
7361
  for (var t = 0; this.regexp_eatClassSetCharacter(e);) t++;
7355
- return t === 1 ? fo : Z;
7356
- }, X.regexp_eatClassSetCharacter = function(e) {
7362
+ return t === 1 ? uo : Q;
7363
+ }, Z.regexp_eatClassSetCharacter = function(e) {
7357
7364
  var t = e.pos;
7358
7365
  if (e.eat(92)) return this.regexp_eatCharacterEscape(e) || this.regexp_eatClassSetReservedPunctuator(e) ? !0 : e.eat(98) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
7359
7366
  var n = e.current();
7360
- return n < 0 || n === e.lookahead() && go(n) || _o(n) ? !1 : (e.advance(), e.lastIntValue = n, !0);
7367
+ return n < 0 || n === e.lookahead() && ho(n) || go(n) ? !1 : (e.advance(), e.lastIntValue = n, !0);
7361
7368
  };
7362
- function go(e) {
7369
+ function ho(e) {
7363
7370
  return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
7364
7371
  }
7365
- function _o(e) {
7372
+ function go(e) {
7366
7373
  return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
7367
7374
  }
7368
- X.regexp_eatClassSetReservedPunctuator = function(e) {
7375
+ Z.regexp_eatClassSetReservedPunctuator = function(e) {
7369
7376
  var t = e.current();
7370
- return vo(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
7377
+ return _o(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
7371
7378
  };
7372
- function vo(e) {
7379
+ function _o(e) {
7373
7380
  return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
7374
7381
  }
7375
- X.regexp_eatClassControlLetter = function(e) {
7382
+ Z.regexp_eatClassControlLetter = function(e) {
7376
7383
  var t = e.current();
7377
- return yo(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
7378
- }, X.regexp_eatHexEscapeSequence = function(e) {
7384
+ return vo(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
7385
+ }, Z.regexp_eatHexEscapeSequence = function(e) {
7379
7386
  var t = e.pos;
7380
7387
  if (e.eat(120)) {
7381
7388
  if (this.regexp_eatFixedHexDigits(e, 2)) return !0;
7382
7389
  e.switchU && e.raise("Invalid escape"), e.pos = t;
7383
7390
  }
7384
7391
  return !1;
7385
- }, X.regexp_eatDecimalDigits = function(e) {
7392
+ }, Z.regexp_eatDecimalDigits = function(e) {
7386
7393
  var t = e.pos, n = 0;
7387
- for (e.lastIntValue = 0; yo(n = e.current());) e.lastIntValue = 10 * e.lastIntValue + (n - 48), e.advance();
7394
+ for (e.lastIntValue = 0; vo(n = e.current());) e.lastIntValue = 10 * e.lastIntValue + (n - 48), e.advance();
7388
7395
  return e.pos !== t;
7389
7396
  };
7390
- function yo(e) {
7397
+ function vo(e) {
7391
7398
  return e >= 48 && e <= 57;
7392
7399
  }
7393
- X.regexp_eatHexDigits = function(e) {
7400
+ Z.regexp_eatHexDigits = function(e) {
7394
7401
  var t = e.pos, n = 0;
7395
- for (e.lastIntValue = 0; bo(n = e.current());) e.lastIntValue = 16 * e.lastIntValue + xo(n), e.advance();
7402
+ for (e.lastIntValue = 0; yo(n = e.current());) e.lastIntValue = 16 * e.lastIntValue + bo(n), e.advance();
7396
7403
  return e.pos !== t;
7397
7404
  };
7398
- function bo(e) {
7405
+ function yo(e) {
7399
7406
  return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
7400
7407
  }
7401
- function xo(e) {
7408
+ function bo(e) {
7402
7409
  return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
7403
7410
  }
7404
- X.regexp_eatLegacyOctalEscapeSequence = function(e) {
7411
+ Z.regexp_eatLegacyOctalEscapeSequence = function(e) {
7405
7412
  if (this.regexp_eatOctalDigit(e)) {
7406
7413
  var t = e.lastIntValue;
7407
7414
  if (this.regexp_eatOctalDigit(e)) {
@@ -7411,31 +7418,31 @@ X.regexp_eatLegacyOctalEscapeSequence = function(e) {
7411
7418
  return !0;
7412
7419
  }
7413
7420
  return !1;
7414
- }, X.regexp_eatOctalDigit = function(e) {
7421
+ }, Z.regexp_eatOctalDigit = function(e) {
7415
7422
  var t = e.current();
7416
- return So(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
7423
+ return xo(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
7417
7424
  };
7418
- function So(e) {
7425
+ function xo(e) {
7419
7426
  return e >= 48 && e <= 55;
7420
7427
  }
7421
- X.regexp_eatFixedHexDigits = function(e, t) {
7428
+ Z.regexp_eatFixedHexDigits = function(e, t) {
7422
7429
  var n = e.pos;
7423
7430
  e.lastIntValue = 0;
7424
7431
  for (var r = 0; r < t; ++r) {
7425
7432
  var i = e.current();
7426
- if (!bo(i)) return e.pos = n, !1;
7427
- e.lastIntValue = 16 * e.lastIntValue + xo(i), e.advance();
7433
+ if (!yo(i)) return e.pos = n, !1;
7434
+ e.lastIntValue = 16 * e.lastIntValue + bo(i), e.advance();
7428
7435
  }
7429
7436
  return !0;
7430
7437
  };
7431
- var Co = function(e) {
7438
+ var So = function(e) {
7432
7439
  this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new Ui(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
7433
- }, Q = U.prototype;
7434
- Q.next = function(e) {
7435
- !e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Co(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
7436
- }, Q.getToken = function() {
7437
- return this.next(), new Co(this);
7438
- }, typeof Symbol < "u" && (Q[Symbol.iterator] = function() {
7440
+ }, $ = U.prototype;
7441
+ $.next = function(e) {
7442
+ !e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new So(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
7443
+ }, $.getToken = function() {
7444
+ return this.next(), new So(this);
7445
+ }, typeof Symbol < "u" && ($[Symbol.iterator] = function() {
7439
7446
  var e = this;
7440
7447
  return { next: function() {
7441
7448
  var t = e.getToken();
@@ -7444,28 +7451,28 @@ Q.next = function(e) {
7444
7451
  value: t
7445
7452
  };
7446
7453
  } };
7447
- }), Q.nextToken = function() {
7454
+ }), $.nextToken = function() {
7448
7455
  var e = this.curContext();
7449
7456
  if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length) return this.finishToken(B.eof);
7450
7457
  if (e.override) return e.override(this);
7451
7458
  this.readToken(this.fullCharCodeAtPos());
7452
- }, Q.readToken = function(e) {
7459
+ }, $.readToken = function(e) {
7453
7460
  return Ei(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
7454
- }, Q.fullCharCodeAt = function(e) {
7461
+ }, $.fullCharCodeAt = function(e) {
7455
7462
  var t = this.input.charCodeAt(e);
7456
7463
  if (t <= 55295 || t >= 56320) return t;
7457
7464
  var n = this.input.charCodeAt(e + 1);
7458
7465
  return n <= 56319 || n >= 57344 ? t : (t << 10) + n - 56613888;
7459
- }, Q.fullCharCodeAtPos = function() {
7466
+ }, $.fullCharCodeAtPos = function() {
7460
7467
  return this.fullCharCodeAt(this.pos);
7461
- }, Q.skipBlockComment = function() {
7468
+ }, $.skipBlockComment = function() {
7462
7469
  var e = this.options.onComment && this.curPosition(), t = this.pos, n = this.input.indexOf("*/", this.pos += 2);
7463
7470
  if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r = void 0, i = t; (r = ji(this.input, i, this.pos)) > -1;) ++this.curLine, i = this.lineStart = r;
7464
7471
  this.options.onComment && this.options.onComment(!0, this.input.slice(t + 2, n), t, this.pos, e, this.curPosition());
7465
- }, Q.skipLineComment = function(e) {
7472
+ }, $.skipLineComment = function(e) {
7466
7473
  for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !Ai(r);) r = this.input.charCodeAt(++this.pos);
7467
7474
  this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, n, this.curPosition());
7468
- }, Q.skipSpace = function() {
7475
+ }, $.skipSpace = function() {
7469
7476
  loop: for (; this.pos < this.input.length;) {
7470
7477
  var e = this.input.charCodeAt(this.pos);
7471
7478
  switch (e) {
@@ -7494,36 +7501,36 @@ Q.next = function(e) {
7494
7501
  else break loop;
7495
7502
  }
7496
7503
  }
7497
- }, Q.finishToken = function(e, t) {
7504
+ }, $.finishToken = function(e, t) {
7498
7505
  this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
7499
7506
  var n = this.type;
7500
7507
  this.type = e, this.value = t, this.updateContext(n);
7501
- }, Q.readToken_dot = function() {
7508
+ }, $.readToken_dot = function() {
7502
7509
  var e = this.input.charCodeAt(this.pos + 1);
7503
7510
  if (e >= 48 && e <= 57) return this.readNumber(!0);
7504
7511
  var t = this.input.charCodeAt(this.pos + 2);
7505
7512
  return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(B.ellipsis)) : (++this.pos, this.finishToken(B.dot));
7506
- }, Q.readToken_slash = function() {
7513
+ }, $.readToken_slash = function() {
7507
7514
  var e = this.input.charCodeAt(this.pos + 1);
7508
7515
  return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(B.assign, 2) : this.finishOp(B.slash, 1);
7509
- }, Q.readToken_mult_modulo_exp = function(e) {
7516
+ }, $.readToken_mult_modulo_exp = function(e) {
7510
7517
  var t = this.input.charCodeAt(this.pos + 1), n = 1, r = e === 42 ? B.star : B.modulo;
7511
7518
  return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++n, r = B.starstar, t = this.input.charCodeAt(this.pos + 2)), t === 61 ? this.finishOp(B.assign, n + 1) : this.finishOp(r, n);
7512
- }, Q.readToken_pipe_amp = function(e) {
7519
+ }, $.readToken_pipe_amp = function(e) {
7513
7520
  var t = this.input.charCodeAt(this.pos + 1);
7514
7521
  return t === e ? this.options.ecmaVersion >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(B.assign, 3) : this.finishOp(e === 124 ? B.logicalOR : B.logicalAND, 2) : t === 61 ? this.finishOp(B.assign, 2) : this.finishOp(e === 124 ? B.bitwiseOR : B.bitwiseAND, 1);
7515
- }, Q.readToken_caret = function() {
7522
+ }, $.readToken_caret = function() {
7516
7523
  return this.input.charCodeAt(this.pos + 1) === 61 ? this.finishOp(B.assign, 2) : this.finishOp(B.bitwiseXOR, 1);
7517
- }, Q.readToken_plus_min = function(e) {
7524
+ }, $.readToken_plus_min = function(e) {
7518
7525
  var t = this.input.charCodeAt(this.pos + 1);
7519
7526
  return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || V.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(B.incDec, 2) : t === 61 ? this.finishOp(B.assign, 2) : this.finishOp(B.plusMin, 1);
7520
- }, Q.readToken_lt_gt = function(e) {
7527
+ }, $.readToken_lt_gt = function(e) {
7521
7528
  var t = this.input.charCodeAt(this.pos + 1), n = 1;
7522
7529
  return t === e ? (n = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + n) === 61 ? this.finishOp(B.assign, n + 1) : this.finishOp(B.bitShift, n)) : t === 33 && e === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (t === 61 && (n = 2), this.finishOp(B.relational, n));
7523
- }, Q.readToken_eq_excl = function(e) {
7530
+ }, $.readToken_eq_excl = function(e) {
7524
7531
  var t = this.input.charCodeAt(this.pos + 1);
7525
7532
  return t === 61 ? this.finishOp(B.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : e === 61 && t === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(B.arrow)) : this.finishOp(e === 61 ? B.eq : B.prefix, 1);
7526
- }, Q.readToken_question = function() {
7533
+ }, $.readToken_question = function() {
7527
7534
  var e = this.options.ecmaVersion;
7528
7535
  if (e >= 11) {
7529
7536
  var t = this.input.charCodeAt(this.pos + 1);
@@ -7534,11 +7541,11 @@ Q.next = function(e) {
7534
7541
  if (t === 63) return e >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(B.assign, 3) : this.finishOp(B.coalesce, 2);
7535
7542
  }
7536
7543
  return this.finishOp(B.question, 1);
7537
- }, Q.readToken_numberSign = function() {
7544
+ }, $.readToken_numberSign = function() {
7538
7545
  var e = this.options.ecmaVersion, t = 35;
7539
7546
  if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), Ei(t, !0) || t === 92)) return this.finishToken(B.privateId, this.readWord1());
7540
7547
  this.raise(this.pos, "Unexpected character '" + Bi(t) + "'");
7541
- }, Q.getTokenFromCode = function(e) {
7548
+ }, $.getTokenFromCode = function(e) {
7542
7549
  switch (e) {
7543
7550
  case 46: return this.readToken_dot();
7544
7551
  case 40: return ++this.pos, this.finishToken(B.parenL);
@@ -7588,10 +7595,10 @@ Q.next = function(e) {
7588
7595
  case 35: return this.readToken_numberSign();
7589
7596
  }
7590
7597
  this.raise(this.pos, "Unexpected character '" + Bi(e) + "'");
7591
- }, Q.finishOp = function(e, t) {
7598
+ }, $.finishOp = function(e, t) {
7592
7599
  var n = this.input.slice(this.pos, this.pos + t);
7593
7600
  return this.pos += t, this.finishToken(e, n);
7594
- }, Q.readRegexp = function() {
7601
+ }, $.readRegexp = function() {
7595
7602
  for (var e, t, n = this.pos;;) {
7596
7603
  this.pos >= this.input.length && this.raise(n, "Unterminated regular expression");
7597
7604
  var r = this.input.charAt(this.pos);
@@ -7608,7 +7615,7 @@ Q.next = function(e) {
7608
7615
  ++this.pos;
7609
7616
  var a = this.pos, o = this.readWord1();
7610
7617
  this.containsEsc && this.unexpected(a);
7611
- var s = this.regexpState ||= new no(this);
7618
+ var s = this.regexpState ||= new to(this);
7612
7619
  s.reset(n, i, o), this.validateRegExpFlags(s), this.validateRegExpPattern(s);
7613
7620
  var c = null;
7614
7621
  try {
@@ -7619,7 +7626,7 @@ Q.next = function(e) {
7619
7626
  flags: o,
7620
7627
  value: c
7621
7628
  });
7622
- }, Q.readInt = function(e, t, n) {
7629
+ }, $.readInt = function(e, t, n) {
7623
7630
  for (var r = this.options.ecmaVersion >= 12 && t === void 0, i = n && this.input.charCodeAt(this.pos) === 48, a = this.pos, o = 0, s = 0, c = 0, l = t ?? Infinity; c < l; ++c, ++this.pos) {
7624
7631
  var u = this.input.charCodeAt(this.pos), d = void 0;
7625
7632
  if (r && u === 95) {
@@ -7631,31 +7638,31 @@ Q.next = function(e) {
7631
7638
  }
7632
7639
  return r && s === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === a || t != null && this.pos - a !== t ? null : o;
7633
7640
  };
7634
- function wo(e, t) {
7641
+ function Co(e, t) {
7635
7642
  return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
7636
7643
  }
7637
- function To(e) {
7644
+ function wo(e) {
7638
7645
  return typeof BigInt == "function" ? BigInt(e.replace(/_/g, "")) : null;
7639
7646
  }
7640
- Q.readRadixNumber = function(e) {
7647
+ $.readRadixNumber = function(e) {
7641
7648
  var t = this.pos;
7642
7649
  this.pos += 2;
7643
7650
  var n = this.readInt(e);
7644
- return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n = To(this.input.slice(t, this.pos)), ++this.pos) : Ei(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(B.num, n);
7645
- }, Q.readNumber = function(e) {
7651
+ return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n = wo(this.input.slice(t, this.pos)), ++this.pos) : Ei(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(B.num, n);
7652
+ }, $.readNumber = function(e) {
7646
7653
  var t = this.pos;
7647
7654
  !e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number");
7648
7655
  var n = this.pos - t >= 2 && this.input.charCodeAt(t) === 48;
7649
7656
  n && this.strict && this.raise(t, "Invalid number");
7650
7657
  var r = this.input.charCodeAt(this.pos);
7651
7658
  if (!n && !e && this.options.ecmaVersion >= 11 && r === 110) {
7652
- var i = To(this.input.slice(t, this.pos));
7659
+ var i = wo(this.input.slice(t, this.pos));
7653
7660
  return ++this.pos, Ei(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(B.num, i);
7654
7661
  }
7655
7662
  n && /[89]/.test(this.input.slice(t, this.pos)) && (n = !1), r === 46 && !n && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !n && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), Ei(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
7656
- var a = wo(this.input.slice(t, this.pos), n);
7663
+ var a = Co(this.input.slice(t, this.pos), n);
7657
7664
  return this.finishToken(B.num, a);
7658
- }, Q.readCodePoint = function() {
7665
+ }, $.readCodePoint = function() {
7659
7666
  var e = this.input.charCodeAt(this.pos), t;
7660
7667
  if (e === 123) {
7661
7668
  this.options.ecmaVersion < 6 && this.unexpected();
@@ -7663,7 +7670,7 @@ Q.readRadixNumber = function(e) {
7663
7670
  t = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, t > 1114111 && this.invalidStringToken(n, "Code point out of bounds");
7664
7671
  } else t = this.readHexChar(4);
7665
7672
  return t;
7666
- }, Q.readString = function(e) {
7673
+ }, $.readString = function(e) {
7667
7674
  for (var t = "", n = ++this.pos;;) {
7668
7675
  this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
7669
7676
  var r = this.input.charCodeAt(this.pos);
@@ -7672,20 +7679,20 @@ Q.readRadixNumber = function(e) {
7672
7679
  }
7673
7680
  return t += this.input.slice(n, this.pos++), this.finishToken(B.string, t);
7674
7681
  };
7675
- var Eo = {};
7676
- Q.tryReadTemplateToken = function() {
7682
+ var To = {};
7683
+ $.tryReadTemplateToken = function() {
7677
7684
  this.inTemplateElement = !0;
7678
7685
  try {
7679
7686
  this.readTmplToken();
7680
7687
  } catch (e) {
7681
- if (e === Eo) this.readInvalidTemplateToken();
7688
+ if (e === To) this.readInvalidTemplateToken();
7682
7689
  else throw e;
7683
7690
  }
7684
7691
  this.inTemplateElement = !1;
7685
- }, Q.invalidStringToken = function(e, t) {
7686
- if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw Eo;
7692
+ }, $.invalidStringToken = function(e, t) {
7693
+ if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw To;
7687
7694
  this.raise(e, t);
7688
- }, Q.readTmplToken = function() {
7695
+ }, $.readTmplToken = function() {
7689
7696
  for (var e = "", t = this.pos;;) {
7690
7697
  this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
7691
7698
  var n = this.input.charCodeAt(this.pos);
@@ -7702,7 +7709,7 @@ Q.tryReadTemplateToken = function() {
7702
7709
  this.options.locations && (++this.curLine, this.lineStart = this.pos), t = this.pos;
7703
7710
  } else ++this.pos;
7704
7711
  }
7705
- }, Q.readInvalidTemplateToken = function() {
7712
+ }, $.readInvalidTemplateToken = function() {
7706
7713
  for (; this.pos < this.input.length; this.pos++) switch (this.input[this.pos]) {
7707
7714
  case "\\":
7708
7715
  ++this.pos;
@@ -7715,7 +7722,7 @@ Q.tryReadTemplateToken = function() {
7715
7722
  case "\u2029": ++this.curLine, this.lineStart = this.pos + 1;
7716
7723
  }
7717
7724
  this.raise(this.start, "Unterminated template");
7718
- }, Q.readEscapedChar = function(e) {
7725
+ }, $.readEscapedChar = function(e) {
7719
7726
  var t = this.input.charCodeAt(++this.pos);
7720
7727
  switch (++this.pos, t) {
7721
7728
  case 110: return "\n";
@@ -7740,10 +7747,10 @@ Q.tryReadTemplateToken = function() {
7740
7747
  }
7741
7748
  return Ai(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
7742
7749
  }
7743
- }, Q.readHexChar = function(e) {
7750
+ }, $.readHexChar = function(e) {
7744
7751
  var t = this.pos, n = this.readInt(16, e);
7745
7752
  return n === null && this.invalidStringToken(t, "Bad character escape sequence"), n;
7746
- }, Q.readWord1 = function() {
7753
+ }, $.readWord1 = function() {
7747
7754
  this.containsEsc = !1;
7748
7755
  for (var e = "", t = !0, n = this.pos, r = this.options.ecmaVersion >= 6; this.pos < this.input.length;) {
7749
7756
  var i = this.fullCharCodeAtPos();
@@ -7758,7 +7765,7 @@ Q.tryReadTemplateToken = function() {
7758
7765
  t = !1;
7759
7766
  }
7760
7767
  return e + this.input.slice(n, this.pos);
7761
- }, Q.readWord = function() {
7768
+ }, $.readWord = function() {
7762
7769
  var e = this.readWord1(), t = B.name;
7763
7770
  return this.keywords.test(e) && (t = Oi[e]), this.finishToken(t, e);
7764
7771
  }, U.acorn = {
@@ -7768,26 +7775,26 @@ Q.tryReadTemplateToken = function() {
7768
7775
  Position: Hi,
7769
7776
  SourceLocation: Ui,
7770
7777
  getLineInfo: Wi,
7771
- Node: Ma,
7778
+ Node: ja,
7772
7779
  TokenType: F,
7773
7780
  tokTypes: B,
7774
7781
  keywordTypes: Oi,
7775
- TokContext: wa,
7776
- tokContexts: J,
7782
+ TokContext: J,
7783
+ tokContexts: Y,
7777
7784
  isIdentifierChar: Di,
7778
7785
  isIdentifierStart: Ei,
7779
- Token: Co,
7786
+ Token: So,
7780
7787
  isNewLine: Ai,
7781
7788
  lineBreak: V,
7782
7789
  lineBreakG: ki,
7783
7790
  nonASCIIwhitespace: Mi
7784
7791
  };
7785
- function Do(e, t, n) {
7792
+ function Eo(e, t, n) {
7786
7793
  return U.parseExpressionAt(e, t, n);
7787
7794
  }
7788
7795
  //#endregion
7789
7796
  //#region src/safe-eval.ts
7790
- var Oo = process.cwd(), ko = {
7797
+ var Do = process.cwd(), Oo = {
7791
7798
  String: (e) => String(e ?? ""),
7792
7799
  Number: (e) => Number(e),
7793
7800
  Boolean: (e) => !!e,
@@ -7798,9 +7805,9 @@ var Oo = process.cwd(), ko = {
7798
7805
  FS: {
7799
7806
  readFile: (t) => e.readFileSync(t, "utf8"),
7800
7807
  exists: (t) => (console.log("FS.exists [%s] %s", process.cwd(), t), e.existsSync(t)),
7801
- join: (...e) => a.join(...e.map((e) => e === "CWD" ? Oo : e))
7808
+ join: (...e) => a.join(...e.map((e) => e === "CWD" ? Do : e))
7802
7809
  }
7803
- }, Ao = class {
7810
+ }, ko = class {
7804
7811
  static async evaluateValue(e, t = {}) {
7805
7812
  if (typeof e != "string" || !e.includes("${")) return e;
7806
7813
  let n = `\`${e}\``;
@@ -7818,7 +7825,7 @@ var Oo = process.cwd(), ko = {
7818
7825
  if (!e || typeof e != "string") return e;
7819
7826
  let n = e.trim(), r;
7820
7827
  try {
7821
- r = Do(n, 0, {
7828
+ r = Eo(n, 0, {
7822
7829
  ecmaVersion: 2020,
7823
7830
  allowAwaitOutsideFunction: !1
7824
7831
  });
@@ -7830,7 +7837,7 @@ var Oo = process.cwd(), ko = {
7830
7837
  static async evalNodeAsync(e, t) {
7831
7838
  switch (e.type) {
7832
7839
  case "Literal": return e.value;
7833
- case "Identifier": return e.name in t ? t[e.name] : e.name in ko ? ko[e.name] : void 0;
7840
+ case "Identifier": return e.name in t ? t[e.name] : e.name in Oo ? Oo[e.name] : void 0;
7834
7841
  case "MemberExpression": {
7835
7842
  let n = await this.evalNodeAsync(e.object, t);
7836
7843
  if (n == null) return;
@@ -7856,7 +7863,7 @@ var Oo = process.cwd(), ko = {
7856
7863
  else throw Error(`Property '${i}' is not a callable function on target object.`);
7857
7864
  } else if (e.callee.type === "Identifier") {
7858
7865
  let r = e.callee.name;
7859
- if (n = t[r] ?? ko[r], !n || typeof n != "function") throw Error(`Unknown function helper '${r}'.`);
7866
+ if (n = t[r] ?? Oo[r], !n || typeof n != "function") throw Error(`Unknown function helper '${r}'.`);
7860
7867
  }
7861
7868
  if (!n) throw Error("Invalid function invocation target.");
7862
7869
  let i = await Promise.all(e.arguments.map((e) => this.evalNodeAsync(e, t)));
@@ -7912,13 +7919,23 @@ var Oo = process.cwd(), ko = {
7912
7919
  default: throw Error(`Security Guard Violation: AST Node type '${e.type}' is disallowed.`);
7913
7920
  }
7914
7921
  }
7915
- }, jo = class {
7922
+ };
7923
+ //#endregion
7924
+ //#region src/preprocessors/github.ts
7925
+ function Ao(e, t) {
7926
+ let n = t.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*");
7927
+ return RegExp(`^${n}$`).test(e);
7928
+ }
7929
+ function jo(e, t) {
7930
+ return (Array.isArray(t) ? t : [t]).includes(e);
7931
+ }
7932
+ var Mo = class {
7916
7933
  name = "github";
7917
7934
  parse(e, t, n) {
7918
- let r = !0, i = null, a = e["x-hub-signature-256"];
7919
- if (n || (r = !1), n && a) {
7920
- let e = "sha256=" + m.createHmac("sha256", n).update(t).digest("hex");
7921
- r = m.timingSafeEqual(Buffer.from(a), Buffer.from(e));
7935
+ let r = !1, i = null, a = e["x-hub-signature-256"];
7936
+ if (n && a) {
7937
+ let e = "sha256=" + m.createHmac("sha256", n).update(t).digest("hex"), i = Buffer.from(a), o = Buffer.from(e);
7938
+ r = i.length === o.length && m.timingSafeEqual(i, o);
7922
7939
  }
7923
7940
  if (r) {
7924
7941
  let n = JSON.parse(t.toString("utf-8")), r = e["x-github-event"] || "unknown", a = n.ref || "", o = a.includes("refs/heads") ? a.replace("refs/heads/", "") : "", s = a.includes("refs/tags") ? a.replace("refs/tags/", "") : "", [c, l] = (n.repository?.full_name || "").split("/");
@@ -7934,9 +7951,9 @@ var Oo = process.cwd(), ko = {
7934
7951
  action: n.action,
7935
7952
  raw: n,
7936
7953
  changes: n.commits ? Array.from(new Set(n.commits.flatMap((e) => [
7937
- ...e.added,
7938
- ...e.removed,
7939
- ...e.modified
7954
+ ...e.added || [],
7955
+ ...e.removed || [],
7956
+ ...e.modified || []
7940
7957
  ]))) : []
7941
7958
  };
7942
7959
  }
@@ -7945,378 +7962,31 @@ var Oo = process.cwd(), ko = {
7945
7962
  inputs: i
7946
7963
  };
7947
7964
  }
7948
- }, Mo = function(e, t) {
7949
- return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
7950
- }, $;
7951
- (function(e) {
7952
- e[e.EOS = 0] = "EOS", e[e.Text = 1] = "Text", e[e.Incomplete = 2] = "Incomplete", e[e.ESC = 3] = "ESC", e[e.Unknown = 4] = "Unknown", e[e.SGR = 5] = "SGR", e[e.OSCURL = 6] = "OSCURL";
7953
- })($ ||= {});
7954
- var No = class {
7955
- constructor() {
7956
- this.VERSION = "6.0.6", this.setup_palettes(), this._use_classes = !1, this.bold = !1, this.faint = !1, this.italic = !1, this.underline = !1, this.fg = this.bg = null, this._buffer = "", this._url_allowlist = {
7957
- http: 1,
7958
- https: 1
7959
- }, this._escape_html = !0, this.boldStyle = "font-weight:bold", this.faintStyle = "opacity:0.7", this.italicStyle = "font-style:italic", this.underlineStyle = "text-decoration:underline";
7960
- }
7961
- set use_classes(e) {
7962
- this._use_classes = e;
7963
- }
7964
- get use_classes() {
7965
- return this._use_classes;
7966
- }
7967
- set url_allowlist(e) {
7968
- this._url_allowlist = e;
7969
- }
7970
- get url_allowlist() {
7971
- return this._url_allowlist;
7972
- }
7973
- set escape_html(e) {
7974
- this._escape_html = e;
7975
- }
7976
- get escape_html() {
7977
- return this._escape_html;
7978
- }
7979
- set boldStyle(e) {
7980
- this._boldStyle = e;
7981
- }
7982
- get boldStyle() {
7983
- return this._boldStyle;
7984
- }
7985
- set faintStyle(e) {
7986
- this._faintStyle = e;
7987
- }
7988
- get faintStyle() {
7989
- return this._faintStyle;
7990
- }
7991
- set italicStyle(e) {
7992
- this._italicStyle = e;
7993
- }
7994
- get italicStyle() {
7995
- return this._italicStyle;
7996
- }
7997
- set underlineStyle(e) {
7998
- this._underlineStyle = e;
7999
- }
8000
- get underlineStyle() {
8001
- return this._underlineStyle;
8002
- }
8003
- setup_palettes() {
8004
- this.ansi_colors = [[
8005
- {
8006
- rgb: [
8007
- 0,
8008
- 0,
8009
- 0
8010
- ],
8011
- class_name: "ansi-black"
8012
- },
8013
- {
8014
- rgb: [
8015
- 187,
8016
- 0,
8017
- 0
8018
- ],
8019
- class_name: "ansi-red"
8020
- },
8021
- {
8022
- rgb: [
8023
- 0,
8024
- 187,
8025
- 0
8026
- ],
8027
- class_name: "ansi-green"
8028
- },
8029
- {
8030
- rgb: [
8031
- 187,
8032
- 187,
8033
- 0
8034
- ],
8035
- class_name: "ansi-yellow"
8036
- },
8037
- {
8038
- rgb: [
8039
- 0,
8040
- 0,
8041
- 187
8042
- ],
8043
- class_name: "ansi-blue"
8044
- },
8045
- {
8046
- rgb: [
8047
- 187,
8048
- 0,
8049
- 187
8050
- ],
8051
- class_name: "ansi-magenta"
8052
- },
8053
- {
8054
- rgb: [
8055
- 0,
8056
- 187,
8057
- 187
8058
- ],
8059
- class_name: "ansi-cyan"
8060
- },
8061
- {
8062
- rgb: [
8063
- 255,
8064
- 255,
8065
- 255
8066
- ],
8067
- class_name: "ansi-white"
8068
- }
8069
- ], [
8070
- {
8071
- rgb: [
8072
- 85,
8073
- 85,
8074
- 85
8075
- ],
8076
- class_name: "ansi-bright-black"
8077
- },
8078
- {
8079
- rgb: [
8080
- 255,
8081
- 85,
8082
- 85
8083
- ],
8084
- class_name: "ansi-bright-red"
8085
- },
8086
- {
8087
- rgb: [
8088
- 0,
8089
- 255,
8090
- 0
8091
- ],
8092
- class_name: "ansi-bright-green"
8093
- },
8094
- {
8095
- rgb: [
8096
- 255,
8097
- 255,
8098
- 85
8099
- ],
8100
- class_name: "ansi-bright-yellow"
8101
- },
8102
- {
8103
- rgb: [
8104
- 85,
8105
- 85,
8106
- 255
8107
- ],
8108
- class_name: "ansi-bright-blue"
8109
- },
8110
- {
8111
- rgb: [
8112
- 255,
8113
- 85,
8114
- 255
8115
- ],
8116
- class_name: "ansi-bright-magenta"
8117
- },
8118
- {
8119
- rgb: [
8120
- 85,
8121
- 255,
8122
- 255
8123
- ],
8124
- class_name: "ansi-bright-cyan"
8125
- },
8126
- {
8127
- rgb: [
8128
- 255,
8129
- 255,
8130
- 255
8131
- ],
8132
- class_name: "ansi-bright-white"
8133
- }
8134
- ]], this.palette_256 = [], this.ansi_colors.forEach((e) => {
8135
- e.forEach((e) => {
8136
- this.palette_256.push(e);
8137
- });
8138
- });
8139
- let e = [
8140
- 0,
8141
- 95,
8142
- 135,
8143
- 175,
8144
- 215,
8145
- 255
8146
- ];
8147
- for (let t = 0; t < 6; ++t) for (let n = 0; n < 6; ++n) for (let r = 0; r < 6; ++r) {
8148
- let i = {
8149
- rgb: [
8150
- e[t],
8151
- e[n],
8152
- e[r]
8153
- ],
8154
- class_name: "truecolor"
8155
- };
8156
- this.palette_256.push(i);
8157
- }
8158
- let t = 8;
8159
- for (let e = 0; e < 24; ++e, t += 10) {
8160
- let e = {
8161
- rgb: [
8162
- t,
8163
- t,
8164
- t
8165
- ],
8166
- class_name: "truecolor"
8167
- };
8168
- this.palette_256.push(e);
8169
- }
8170
- }
8171
- escape_txt_for_html(e) {
8172
- return this._escape_html ? e.replace(/[&<>"']/gm, (e) => {
8173
- if (e === "&") return "&amp;";
8174
- if (e === "<") return "&lt;";
8175
- if (e === ">") return "&gt;";
8176
- if (e === "\"") return "&quot;";
8177
- if (e === "'") return "&#x27;";
8178
- }) : e;
8179
- }
8180
- append_buffer(e) {
8181
- var t = this._buffer + e;
8182
- this._buffer = t;
8183
- }
8184
- get_next_packet() {
8185
- var e = {
8186
- kind: $.EOS,
8187
- text: "",
8188
- url: ""
8189
- }, t = this._buffer.length;
8190
- if (t == 0) return e;
8191
- var n = this._buffer.indexOf("\x1B");
8192
- if (n == -1) return e.kind = $.Text, e.text = this._buffer, this._buffer = "", e;
8193
- if (n > 0) return e.kind = $.Text, e.text = this._buffer.slice(0, n), this._buffer = this._buffer.slice(n), e;
8194
- if (n == 0) {
8195
- if (t < 3) return e.kind = $.Incomplete, e;
8196
- var r = this._buffer.charAt(1);
8197
- if (r != "[" && r != "]" && r != "(") return e.kind = $.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
8198
- if (r == "[") {
8199
- this._csi_regex ||= Po(Io ||= Mo(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \x1B[ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \x1B[ # CSI\n [ -~]* # anything legal\n ([\0-:]) # anything illegal\n )\n "], ["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]));
8200
- let t = this._buffer.match(this._csi_regex);
8201
- if (t === null) return e.kind = $.Incomplete, e;
8202
- if (t[4]) return e.kind = $.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
8203
- e.kind = t[1] != "" || t[3] != "m" ? $.Unknown : $.SGR, e.text = t[2];
8204
- var i = t[0].length;
8205
- return this._buffer = this._buffer.slice(i), e;
8206
- }
8207
- if (r == "]") {
8208
- if (t < 4) return e.kind = $.Incomplete, e;
8209
- if (this._buffer.charAt(2) != "8" || this._buffer.charAt(3) != ";") return e.kind = $.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
8210
- this._osc_st ||= Fo(Lo ||= Mo(["\n (?: # legal sequence\n (\x1B\\) # ESC | # alternate\n (\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-] # anything illegal\n | # alternate\n [\b-] # anything illegal\n | # alternate\n [-] # anything illegal\n )\n "], ["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "])), this._osc_st.lastIndex = 0;
8211
- {
8212
- let t = this._osc_st.exec(this._buffer);
8213
- if (t === null) return e.kind = $.Incomplete, e;
8214
- if (t[3]) return e.kind = $.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
8215
- }
8216
- {
8217
- let t = this._osc_st.exec(this._buffer);
8218
- if (t === null) return e.kind = $.Incomplete, e;
8219
- if (t[3]) return e.kind = $.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
8220
- }
8221
- this._osc_regex ||= Po(Ro ||= Mo(["\n ^ # beginning of line\n #\n \x1B]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\x1B\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n ([ -~]+) # TEXT capture\n \x1B]8;; # OSC Hyperlink End\n (?: # ST\n (?:\x1B\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n "], ["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x20-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]));
8222
- let n = this._buffer.match(this._osc_regex);
8223
- if (n === null) return e.kind = $.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
8224
- e.kind = $.OSCURL, e.url = n[1], e.text = n[2];
8225
- var i = n[0].length;
8226
- return this._buffer = this._buffer.slice(i), e;
8227
- }
8228
- if (r == "(") return e.kind = $.Unknown, this._buffer = this._buffer.slice(3), e;
8229
- }
8230
- }
8231
- ansi_to_html(e) {
8232
- this.append_buffer(e);
8233
- for (var t = [];;) {
8234
- var n = this.get_next_packet();
8235
- if (n.kind == $.EOS || n.kind == $.Incomplete) break;
8236
- n.kind != $.ESC && n.kind != $.Unknown && (n.kind == $.Text ? t.push(this.transform_to_html(this.with_state(n))) : n.kind == $.SGR ? this.process_ansi(n) : n.kind == $.OSCURL && t.push(this.process_hyperlink(n)));
7965
+ filter(e, t) {
7966
+ let n = !0;
7967
+ if (t.events && !t.events.includes(e.event) && (n = !1), t.owner && !jo(e.owner, t.owner) && (n = !1), t.repo && !jo(e.repo, t.repo) && (n = !1), t.branches && !t.branches.some((t) => Ao(e.branch, t)) && (n = !1), t.tag !== void 0 && !!e.tag !== t.tag && (n = !1), t.tags) try {
7968
+ t.tags.some((t) => new RegExp(t).test(e.tag)) || (n = !1);
7969
+ } catch {
7970
+ n = !1;
8237
7971
  }
8238
- return t.join("");
8239
- }
8240
- with_state(e) {
8241
- return {
8242
- bold: this.bold,
8243
- faint: this.faint,
8244
- italic: this.italic,
8245
- underline: this.underline,
8246
- fg: this.fg,
8247
- bg: this.bg,
8248
- text: e.text
7972
+ return t.paths && ((Array.isArray(e.changes) ? e.changes : []).some((e) => t.paths?.some((t) => Ao(e, t))) || (n = !1)), {
7973
+ isValid: n,
7974
+ inputs: e
8249
7975
  };
8250
7976
  }
8251
- process_ansi(e) {
8252
- let t = e.text.split(";");
8253
- for (; t.length > 0;) {
8254
- let e = t.shift(), n = parseInt(e, 10);
8255
- if (isNaN(n) || n === 0) this.fg = null, this.bg = null, this.bold = !1, this.faint = !1, this.italic = !1, this.underline = !1;
8256
- else if (n === 1) this.bold = !0;
8257
- else if (n === 2) this.faint = !0;
8258
- else if (n === 3) this.italic = !0;
8259
- else if (n === 4) this.underline = !0;
8260
- else if (n === 21) this.bold = !1;
8261
- else if (n === 22) this.faint = !1, this.bold = !1;
8262
- else if (n === 23) this.italic = !1;
8263
- else if (n === 24) this.underline = !1;
8264
- else if (n === 39) this.fg = null;
8265
- else if (n === 49) this.bg = null;
8266
- else if (n >= 30 && n < 38) this.fg = this.ansi_colors[0][n - 30];
8267
- else if (n >= 40 && n < 48) this.bg = this.ansi_colors[0][n - 40];
8268
- else if (n >= 90 && n < 98) this.fg = this.ansi_colors[1][n - 90];
8269
- else if (n >= 100 && n < 108) this.bg = this.ansi_colors[1][n - 100];
8270
- else if ((n === 38 || n === 48) && t.length > 0) {
8271
- let e = n === 38, r = t.shift();
8272
- if (r === "5" && t.length > 0) {
8273
- let n = parseInt(t.shift(), 10);
8274
- n >= 0 && n <= 255 && (e ? this.fg = this.palette_256[n] : this.bg = this.palette_256[n]);
8275
- }
8276
- if (r === "2" && t.length > 2) {
8277
- let n = parseInt(t.shift(), 10), r = parseInt(t.shift(), 10), i = parseInt(t.shift(), 10);
8278
- if (n >= 0 && n <= 255 && r >= 0 && r <= 255 && i >= 0 && i <= 255) {
8279
- let t = {
8280
- rgb: [
8281
- n,
8282
- r,
8283
- i
8284
- ],
8285
- class_name: "truecolor"
8286
- };
8287
- e ? this.fg = t : this.bg = t;
8288
- }
8289
- }
8290
- }
8291
- }
8292
- }
8293
- transform_to_html(e) {
8294
- let t = e.text;
8295
- if (t.length === 0 || (t = this.escape_txt_for_html(t), !e.bold && !e.italic && !e.faint && !e.underline && e.fg === null && e.bg === null)) return t;
8296
- let n = [], r = [], i = e.fg, a = e.bg;
8297
- e.bold && n.push(this._boldStyle), e.faint && n.push(this._faintStyle), e.italic && n.push(this._italicStyle), e.underline && n.push(this._underlineStyle), this._use_classes ? (i && (i.class_name === "truecolor" ? n.push(`color:rgb(${i.rgb.join(",")})`) : r.push(`${i.class_name}-fg`)), a && (a.class_name === "truecolor" ? n.push(`background-color:rgb(${a.rgb.join(",")})`) : r.push(`${a.class_name}-bg`))) : (i && n.push(`color:rgb(${i.rgb.join(",")})`), a && n.push(`background-color:rgb(${a.rgb})`));
8298
- let o = "", s = "";
8299
- return r.length && (o = ` class="${r.join(" ")}"`), n.length && (s = ` style="${n.join(";")}"`), `<span${s}${o}>${t}</span>`;
8300
- }
8301
- process_hyperlink(e) {
8302
- let t = e.url.split(":");
8303
- return t.length < 1 || !this._url_allowlist[t[0]] ? "" : `<a href="${this.escape_txt_for_html(e.url)}">${this.escape_txt_for_html(e.text)}</a>`;
8304
- }
8305
7977
  };
8306
- function Po(e, ...t) {
8307
- let n = e.raw[0].replace(/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm, "");
8308
- return new RegExp(n);
8309
- }
8310
- function Fo(e, ...t) {
8311
- let n = e.raw[0].replace(/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm, "");
8312
- return new RegExp(n, "g");
7978
+ //#endregion
7979
+ //#region src/html-state.ts
7980
+ function No(e) {
7981
+ return JSON.stringify(e).replace(/[<>&\u2028\u2029]/g, (e) => `\\u${e.charCodeAt(0).toString(16).padStart(4, "0")}`);
8313
7982
  }
8314
- var Io, Lo, Ro, zo = class {
7983
+ //#endregion
7984
+ //#region src/reporters/html.reporter.html?raw
7985
+ var Po = "<!DOCTYPE html>\n<html lang=\"en\" class=\"dark\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Workflow Run</title>\n <script type=\"importmap\">\n {\n \"imports\": {\n \"@li3/\": \"https://cdn.li3.dev/@li3/\",\n \"ansi_up\": \"https://esm.sh/ansi_up@6.0.6\"\n }\n }\n <\/script>\n</head>\n<body class=\"bg-gray-950 text-gray-100 min-h-screen p-4 md:p-6 font-sans\">\n <template app>\n <div class=\"max-w-5xl mx-auto space-y-4\">\n <header class=\"flex flex-col md:flex-row md:items-center justify-between border-b border-gray-800 pb-6 gap-4\">\n <div class=\"min-w-0\">\n <a href=\"/runs\" class=\"text-xs text-indigo-400 hover:underline mb-1 inline-block\">Back to Dashboard</a>\n <h1 class=\"text-2xl font-bold text-white flex flex-wrap items-center gap-3\">\n {{ report.workflowName }}\n <span class=\"text-sm font-mono text-gray-500\">#{{ report.jobId }}</span>\n <template if=\"report.parentId\">\n <a attr-href=\"'/runs/' + report.parentId\" class=\"text-sm font-mono text-indigo-400 hover:underline\">\n from #{{ report.parentId }}\n </a>\n </template>\n </h1>\n <p class=\"text-xs text-gray-400 mt-1\">Started {{ report.startedAt }} · {{ timing }}</p>\n </div>\n <div class=\"flex items-center gap-2 shrink-0\">\n <span\n class=\"px-4 py-1.5 rounded-full text-sm font-semibold border\"\n bind-class=\"{\n 'bg-emerald-500/10.text-emerald-400.border-emerald-500/20': report.status === 'success',\n 'bg-rose-500/10.text-rose-400.border-rose-500/20': report.status === 'failed',\n 'bg-indigo-500/10.text-indigo-400.border-indigo-500/20': report.status === 'running',\n 'bg-amber-500/10.text-amber-400.border-amber-500/20': !['success', 'failed', 'running'].includes(report.status)\n }\"\n >\n {{ upper(report.status) }}\n </span>\n <button\n class=\"text-sm text-white px-4 py-1.5 border border-gray-600 hover:border-gray-400 rounded-full\"\n on-click=\"restartJob()\"\n >\n Restart\n </button>\n </div>\n </header>\n\n <section class=\"rounded overflow-hidden border-b border-gray-800\">\n <h2 class=\"sr-only\">Execution Steps</h2>\n <template for=\"[step, index] of report.steps\">\n <details class=\"border border-b-0 border-gray-800 bg-gray-900/50 text-sm\">\n <summary class=\"flex flex-col md:flex-row md:items-center justify-between gap-2 p-3 bg-gray-800/40 border-b border-gray-800 cursor-pointer\">\n <div class=\"flex flex-wrap items-center gap-3 min-w-0\">\n <span class=\"font-mono text-gray-500\">\n #{{ index + 1 }}<template if=\"step.exitCode !== undefined && step.exitCode !== 0\"> ({{ step.exitCode }})</template>\n </span>\n <h3 class=\"font-semibold text-gray-200 break-words\">{{ step.name }}</h3>\n <span\n class=\"px-2.5 py-0.5 rounded-full font-medium\"\n bind-class=\"{\n 'text-emerald-400.bg-emerald-500/10': step.status === 'success',\n 'text-rose-400.bg-rose-500/10': step.status === 'failed',\n 'text-indigo-400.bg-indigo-500/10': step.status === 'running',\n 'text-gray-400.bg-gray-500/10': !['success', 'failed', 'running'].includes(step.status)\n }\"\n >\n {{ upper(step.status) }}\n </span>\n </div>\n <div class=\"font-mono text-gray-400 shrink-0\">{{ step.durationMs }}ms</div>\n </summary>\n <div class=\"p-4 bg-gray-950 font-mono text-gray-300 leading-relaxed overflow-auto w-full\">\n <pre class=\"whitespace-pre-wrap\" bind-innerhtml=\"stepLog(step)\"></pre>\n </div>\n </details>\n </template>\n </section>\n\n <details class=\"bg-gray-900 border border-gray-800 rounded-xl p-4 overflow-auto max-h-[400px]\">\n <summary class=\"cursor-pointer\">\n <h2 class=\"inline text-xs font-semibold text-gray-400 uppercase tracking-wider\">Trigger Inputs</h2>\n </summary>\n <pre class=\"font-mono text-xs text-gray-200 bg-gray-950 p-3 mt-3 rounded-lg overflow-x-auto\">{{ inputsJson }}</pre>\n </details>\n </div>\n\n <script setup>\n import { computed, onInit, ref } from '@li3/web';\n import { AnsiUp } from 'ansi_up';\n\n export default function setup() {\n const report = ref({});\n const ansiUp = new AnsiUp();\n ansiUp.use_classes = false;\n\n const active = computed(() => ['pending', 'running'].includes(report.value.status));\n const inputsJson = computed(() => JSON.stringify(report.value.inputs || {}, null, 2));\n const timing = computed(() => {\n if (report.value.status === 'pending') return 'Waiting for a worker';\n if (report.value.status === 'running') return `Running for ${report.value.durationMs}ms`;\n return `Finished in ${report.value.durationMs}ms`;\n });\n\n const upper = (value) => String(value || '').toUpperCase();\n const stepLog = (step) => {\n if (step.status === 'skipped') return '';\n if (step.status === 'running') return '<span class=\"text-indigo-400\">Step is running. Logs will appear after it finishes.</span>';\n if (step.status === 'pending') return '<span class=\"text-gray-500\">Waiting to run.</span>';\n if (step.logContent) return ansiUp.ansi_to_html(step.logContent);\n return '<span class=\"text-gray-500\">(No terminal log output recorded for this step)</span>';\n };\n const restartJob = async () => {\n const response = await fetch(`/restart/${report.value.jobId}`, { method: 'POST' });\n if (response.ok) {\n const { id } = await response.json();\n location.href = `/runs/${id}`;\n }\n };\n\n onInit(() => {\n document.title = `Run #${report.value.jobId} - ${report.value.workflowName}`;\n if (active.value) setTimeout(() => location.reload(), 3000);\n });\n\n return { report, inputsJson, timing, upper, stepLog, restartJob };\n }\n <\/script>\n <script state>__REPORT_STATE__<\/script>\n </template>\n\n <script type=\"module\">import '@li3/web';<\/script>\n <script src=\"https://cdn.tailwindcss.com\"><\/script>\n</body>\n</html>\n", Fo = "__REPORT_STATE__", Io = class {
8315
7986
  name = "html";
8316
7987
  outputDir;
8317
- ansiUp;
8318
7988
  constructor(e) {
8319
- this.outputDir = e.outputDir, this.ansiUp = new No(), this.ansiUp.use_classes = !1;
7989
+ this.outputDir = e.outputDir;
8320
7990
  }
8321
7991
  async report(t) {
8322
7992
  e.mkdirSync(this.outputDir, { recursive: !0 });
@@ -8324,82 +7994,9 @@ var Io, Lo, Ro, zo = class {
8324
7994
  e.writeFileSync(r, n, "utf-8"), console.log(`📊 HTML Execution Report generated: ${r}`);
8325
7995
  }
8326
7996
  generateHtml(e) {
8327
- let t = e.status === "success" ? "bg-emerald-500/10 text-emerald-400 border-emerald-500/20" : e.status === "failed" ? "bg-rose-500/10 text-rose-400 border-rose-500/20" : "bg-amber-500/10 text-amber-400 border-amber-500/20", n = (e.steps ?? []).map((e, t) => {
8328
- let n = e.logContent, r = e.status === "skipped" ? "" : n ? this.ansiUp.ansi_to_html(n) : "<span class=\"text-gray-500\">(No terminal log output recorded for this step)</span>", i = e.status === "success" ? "text-emerald-400 bg-emerald-500/10" : e.status === "failed" ? "text-rose-400 bg-rose-500/10" : "text-gray-400 bg-gray-500/10";
8329
- return `<details class="border border-b-0 border-gray-800 bg-gray-900/50 text-sm">
8330
- <summary class="flex items-center justify-between p-2 bg-gray-800/40 border-b border-gray-800 cursor-pointer">
8331
- <div class="flex items-center gap-3">
8332
- <span class="font-mono text-gray-500">#${t + 1} ${e.exitCode === 0 ? "" : "(" + e.exitCode + ")"}</span>
8333
- <h3 class="font-semibold text-gray-200">${e.name}</h3>
8334
- <span class="px-2.5 py-0.5 rounded-full font-medium ${i}">
8335
- ${e.status.toUpperCase()}
8336
- </span>
8337
- </div>
8338
- <div class="font-mono text-gray-400">${e.durationMs}ms</div>
8339
- </summary>
8340
- <div class="p-4 bg-gray-950 font-mono text-gray-300 leading-relaxed overflow-auto w-full">
8341
- <pre class="whitespace-pre-wrap">${r}</pre>
8342
- </div>
8343
- </details>`;
8344
- }).join("");
8345
- return `<!DOCTYPE html>
8346
- <html lang="en" class="dark">
8347
- <head>
8348
- <meta charset="UTF-8">
8349
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
8350
- <title>Run #${e.jobId} - ${e.workflowName}</title>
8351
- <script type="importmap"> {"imports": { "@li3/": "https://cdn.li3.dev/@li3/" }}<\/script>
8352
- <script>
8353
- async function restartJob(jobId) {
8354
- const r = await fetch('/restart/' + jobId, { method:'POST' });
8355
- if (r.ok) {
8356
- const { id } = await r.json();
8357
- location.href = '/runs/' + id
8358
- }
8359
- }
8360
- <\/script>
8361
- </head>
8362
- <body class="bg-gray-950 text-gray-100 min-h-screen p-6 font-sans">
8363
- <div class="max-w-5xl mx-auto space-y-4">
8364
-
8365
- <div class="flex items-center justify-between border-b border-gray-800 pb-6 gap-2">
8366
- <div>
8367
- <a href="/runs" class="text-xs text-indigo-400 hover:underline mb-1 inline-block">← Back to Dashboard</a>
8368
- <h1 class="text-2xl font-bold text-white flex items-center gap-3">
8369
- ${e.workflowName}
8370
- <span class="text-sm font-mono text-gray-500">#${e.jobId}
8371
- ${e.parentId ? ` -> <a href="/runs/${e.parentId}">#${e.parentId}</a>` : ""}
8372
- </span>
8373
- </h1>
8374
- <p class="text-xs text-gray-400 mt-1">Started ${e.startedAt} • Finished in ${e.durationMs}ms</p>
8375
- </div>
8376
- <div class="flex items-center gap-2">
8377
- <span class="px-4 py-1.5 rounded-full text-sm font-semibold border ${t}">
8378
- ${e.status.toUpperCase()}
8379
- </span>
8380
- <button class="text-sm text-white px-4 py-1.5 border border-gray-400 rounded-full" onclick="restartJob('${e.jobId}')">restart</button>
8381
- </div>
8382
- </div>
8383
-
8384
- <div class="rounded overflow-hidden border-b border-gray-800">
8385
- <h2 class="sr-only">Execution Steps</h2>
8386
- ${n}
8387
- </div>
8388
-
8389
- <details class="bg-gray-900 border border-gray-800 rounded-xl p-4 overflow-auto max-h-[400px]">
8390
- <summary>
8391
- <h2 class="text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2">Trigger Inputs</h2>
8392
- </summary>
8393
- <pre class="font-mono text-xs text-gray-200 bg-gray-950 p-3 rounded-lg overflow-x-auto">${JSON.stringify(e.inputs, null, 2)}</pre>
8394
- </details>
8395
-
8396
- </div>
8397
- <script type="module">import "@li3/web"<\/script>
8398
- <script src="https://cdn.tailwindcss.com"><\/script>
8399
- </body>
8400
- </html>`;
8401
- }
8402
- }, Bo = class e {
7997
+ return Po.replace(Fo, () => No({ report: e }));
7998
+ }
7999
+ }, Lo = class e {
8403
8000
  static async from(t) {
8404
8001
  let n = o(t) ? c("/", t) : s(process.cwd(), c("/", t)), r = (await _(n, { withFileTypes: !0 })).filter((e) => e.isFile() && (e.name.endsWith(".yml") || e.name.endsWith(".yaml"))).map((e) => s(n, e.name)), i = [], a = new di(t);
8405
8002
  for (let t of r) i.push(...await e.loadFile(t, a));
@@ -8414,13 +8011,13 @@ var Io, Lo, Ro, zo = class {
8414
8011
  console.error(`on: not defined in ${e}! Ignoring this workflow.`);
8415
8012
  continue;
8416
8013
  }
8417
- let r = Object.keys(t.on)[0] || "generic";
8014
+ let r = Object.keys(t.on)[0] || "generic", i = t.on[r] || {};
8418
8015
  n.push({
8419
8016
  id: (t.id || t.name)?.toLowerCase().replace(/[^a-z0-9]/g, "-") ?? h(),
8420
8017
  name: t.name,
8421
8018
  on: {
8422
- provider: r,
8423
- if: t.on[r]?.if
8019
+ ...i,
8020
+ provider: r
8424
8021
  },
8425
8022
  concurrency: t.concurrency,
8426
8023
  steps: t.steps,
@@ -8432,7 +8029,25 @@ var Io, Lo, Ro, zo = class {
8432
8029
  }
8433
8030
  return n;
8434
8031
  }
8435
- }, Vo = class e {
8032
+ }, Ro = "<!DOCTYPE html>\n<html lang=\"en\" class=\"dark\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Workflow Engine Dashboard</title>\n <script type=\"importmap\">\n { \"imports\": { \"@li3/\": \"https://cdn.li3.dev/@li3/\" } }\n <\/script>\n</head>\n<body class=\"bg-gray-950 text-gray-100 min-h-screen p-4 md:p-6 font-sans\">\n <template app>\n <main class=\"max-w-6xl mx-auto space-y-6\">\n <header class=\"flex flex-col sm:flex-row sm:items-center justify-between gap-3 border-b border-gray-800 pb-4\">\n <div>\n <h1 class=\"text-2xl font-bold text-white\">Runner Engine Status</h1>\n <p class=\"text-xs text-gray-400\">Live Job Queue &amp; Execution Traces</p>\n </div>\n <div class=\"flex items-center gap-3 text-xs font-mono\">\n <span class=\"text-gray-500\">Updated {{ lastUpdated }}</span>\n <span\n class=\"px-3 py-1 rounded-full border\"\n bind-class=\"{\n 'bg-emerald-500/10.text-emerald-400.border-emerald-500/20': !refreshError,\n 'bg-rose-500/10.text-rose-400.border-rose-500/20': refreshError\n }\"\n >\n {{ refreshError ? 'Refresh failed' : 'System operational' }}\n </span>\n </div>\n </header>\n\n <section class=\"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden hidden md:block\">\n <table class=\"w-full text-left text-sm\">\n <thead class=\"bg-gray-800/50 text-gray-400 text-xs uppercase font-mono border-b border-gray-800\">\n <tr>\n <th class=\"py-3 px-4\">Job ID</th>\n <th class=\"py-3 px-4\">Workflow</th>\n <th class=\"py-3 px-4\">Status</th>\n <th class=\"py-3 px-4 hidden xl:table-cell\">Worker</th>\n <th class=\"py-3 px-4 hidden lg:table-cell\">Created At</th>\n <th class=\"py-3 px-4 text-right\">Action</th>\n </tr>\n </thead>\n <tbody>\n <template for=\"job of jobs\">\n <tr class=\"border-b border-gray-800 hover:bg-gray-800/40 transition\">\n <td class=\"py-3 px-4 font-mono text-indigo-400\">\n <a attr-href=\"'/runs/' + job.id\" class=\"hover:underline\">#{{ job.id }}</a>\n </td>\n <td class=\"py-3 px-4 font-medium text-white\">{{ job.workflowId }}</td>\n <td class=\"py-3 px-4\">\n <span\n class=\"px-2.5 py-0.5 rounded-full text-xs font-semibold\"\n bind-class=\"{\n 'bg-emerald-500/10.text-emerald-400': job.status === 'success',\n 'bg-rose-500/10.text-rose-400': job.status === 'failed',\n 'bg-indigo-500/10.text-indigo-400.animate-pulse': job.status === 'running',\n 'bg-gray-500/10.text-gray-400': !['success', 'failed', 'running'].includes(job.status)\n }\"\n >\n {{ upper(job.status) }}\n </span>\n </td>\n <td class=\"py-3 px-4 hidden xl:table-cell text-xs font-mono text-gray-400\">{{ job.workerId || '-' }}</td>\n <td class=\"py-3 px-4 hidden lg:table-cell text-xs text-gray-400\">{{ job.createdAt }}</td>\n <td class=\"py-3 px-4 text-right whitespace-nowrap\">\n <a attr-href=\"'/runs/' + job.id\" class=\"text-xs bg-gray-800 hover:bg-gray-700 text-gray-200 px-3 py-1 rounded border border-gray-700\">View Trace</a>\n </td>\n </tr>\n </template>\n </tbody>\n </table>\n <template if=\"!jobs.length\">\n <div class=\"p-8 text-center text-gray-500\">No jobs recorded yet.</div>\n </template>\n </section>\n\n <section class=\"md:hidden bg-gray-900 border border-gray-800 rounded-xl divide-y divide-gray-800 overflow-hidden\">\n <template for=\"job of jobs\">\n <article class=\"p-4 bg-gray-900/60\">\n <div class=\"flex items-start justify-between gap-3\">\n <div class=\"min-w-0\">\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full shrink-0\"\n bind-class=\"{\n 'bg-emerald-400': job.status === 'success',\n 'bg-rose-400': job.status === 'failed',\n 'bg-indigo-400.animate-pulse': job.status === 'running',\n 'bg-gray-500': !['success', 'failed', 'running'].includes(job.status)\n }\"\n ></span>\n <h2 class=\"font-medium text-white truncate\">{{ job.workflowId }}</h2>\n </div>\n <p class=\"mt-1 pl-[18px] text-xs font-mono text-gray-400\">#{{ job.id }} · {{ upper(job.status) }}</p>\n </div>\n <a attr-href=\"'/runs/' + job.id\" class=\"shrink-0 text-xs bg-gray-800 hover:bg-gray-700 text-gray-300 px-2.5 py-1 rounded border border-gray-700\">Trace</a>\n </div>\n </article>\n </template>\n <template if=\"!jobs.length\">\n <div class=\"p-8 text-center text-gray-500\">No jobs recorded yet.</div>\n </template>\n </section>\n </main>\n\n <script setup>\n import { onDestroy, onInit, ref } from '@li3/web';\n\n export default function setup() {\n const jobs = ref([]);\n const lastUpdated = ref('now');\n const refreshError = ref(false);\n let refreshTimer;\n let refreshing = false;\n\n const upper = (value) => String(value || '').toUpperCase();\n const refreshJobs = async () => {\n if (refreshing) return;\n refreshing = true;\n\n try {\n const response = await fetch('/api/jobs', { headers: { accept: 'application/json' } });\n if (!response.ok) throw new Error(`Dashboard refresh failed: ${response.status}`);\n\n const data = await response.json();\n jobs.value = data.jobs;\n lastUpdated.value = new Date().toLocaleTimeString();\n refreshError.value = false;\n } catch (error) {\n console.error(error);\n refreshError.value = true;\n } finally {\n refreshing = false;\n }\n };\n\n onInit(() => {\n refreshTimer = setInterval(refreshJobs, 5000);\n });\n onDestroy(() => clearInterval(refreshTimer));\n\n return { jobs, lastUpdated, refreshError, upper };\n }\n <\/script>\n <script state>__DASHBOARD_STATE__<\/script>\n </template>\n\n <script type=\"module\">import '@li3/web';<\/script>\n <script src=\"https://cdn.tailwindcss.com\"><\/script>\n</body>\n</html>\n";
8033
+ //#endregion
8034
+ //#region src/dashboard.ts
8035
+ function zo(e) {
8036
+ return e.map((e) => ({
8037
+ id: e.id,
8038
+ workflowId: e.workflow_id,
8039
+ status: e.status,
8040
+ workerId: e.worker_id || null,
8041
+ createdAt: e.created_at,
8042
+ updatedAt: e.updated_at
8043
+ }));
8044
+ }
8045
+ function Bo(e) {
8046
+ return Ro.replace("__DASHBOARD_STATE__", () => No({ jobs: e }));
8047
+ }
8048
+ //#endregion
8049
+ //#region src/server.ts
8050
+ var Vo = class e {
8436
8051
  server;
8437
8052
  preprocessors = /* @__PURE__ */ new Map();
8438
8053
  workflows = [];
@@ -8444,9 +8059,9 @@ var Io, Lo, Ro, zo = class {
8444
8059
  return new e(r).listen(n);
8445
8060
  }
8446
8061
  constructor(e) {
8447
- this.queue = e.queue, this.secrets = e.secrets, this.adminToken = e.adminToken, Bo.from(e.config.workflows).then((t) => {
8062
+ this.queue = e.queue, this.secrets = e.secrets, this.adminToken = e.adminToken, Lo.from(e.config.workflows).then((t) => {
8448
8063
  this.workflows = t, console.log(`✅ Loaded ${t.length} workflow(s) from ${e.config.workflows}`);
8449
- }), this.registerPreprocessor(new jo()), this.server = f.createServer((e, t) => this.handleRequest(e, t));
8064
+ }), this.registerPreprocessor(new Mo()), this.server = f.createServer((e, t) => this.handleRequest(e, t));
8450
8065
  }
8451
8066
  registerPreprocessor(e) {
8452
8067
  this.preprocessors.set(e.name, e);
@@ -8454,6 +8069,7 @@ var Io, Lo, Ro, zo = class {
8454
8069
  async handleRequest(e, t) {
8455
8070
  let n = new p(e.url || "/", `${e.headers["x-forwarded-proto"] || "http"}://${e.headers["x-forwarded-host"] || e.headers.host}`);
8456
8071
  if (e.method === "GET" && (n.pathname === "/runs" || n.pathname === "/")) return this.renderDashboard(t);
8072
+ if (e.method === "GET" && n.pathname === "/api/jobs") return this.renderDashboardJobs(t);
8457
8073
  if (e.method === "GET" && n.pathname.startsWith("/runs/")) {
8458
8074
  let e = n.pathname.replace("/runs/", "");
8459
8075
  return this.renderRunDetails(e, t);
@@ -8524,8 +8140,13 @@ var Io, Lo, Ro, zo = class {
8524
8140
  async matchWorkflows(e, t) {
8525
8141
  for (let n of this.workflows) {
8526
8142
  if (n.on.provider !== e) continue;
8143
+ let r = this.preprocessors.get(e);
8144
+ if (r?.filter && !r.filter(t, n.on).isValid) {
8145
+ console.log(`⏩ Skipped ${n.id} based on ${e} webhook filters`, { inputs: t });
8146
+ continue;
8147
+ }
8527
8148
  if (n.on.if) try {
8528
- if (!await Ao.evaluateConditions(n.on.if, { inputs: t })) {
8149
+ if (!await ko.evaluateConditions(n.on.if, { inputs: t })) {
8529
8150
  console.log(`⏩ Skipped ${n.id} based on conditions: ${n.on.if}`, { inputs: t });
8530
8151
  continue;
8531
8152
  }
@@ -8533,15 +8154,15 @@ var Io, Lo, Ro, zo = class {
8533
8154
  console.error(`⚠️ Condition evaluation error in workflow [${n.id}]:`, e.message);
8534
8155
  continue;
8535
8156
  }
8536
- let r = "";
8537
- n.concurrency?.group && (r = await Ao.evaluateValue(n.concurrency.group, { inputs: t }));
8538
- let i = {
8157
+ let i = "";
8158
+ n.concurrency?.group && (i = await ko.evaluateValue(n.concurrency.group, { inputs: t }));
8159
+ let a = {
8539
8160
  workflowId: n.id,
8540
8161
  env: n.env,
8541
8162
  steps: n.steps,
8542
8163
  inputs: t
8543
8164
  };
8544
- await this.queue.enqueue(n.id, i, r);
8165
+ await this.queue.enqueue(n.id, a, i);
8545
8166
  }
8546
8167
  }
8547
8168
  async handleSecretReload(e, t) {
@@ -8549,102 +8170,55 @@ var Io, Lo, Ro, zo = class {
8549
8170
  this.secrets.reload(), console.log("🔄 SecretStore reloaded successfully without downtime!"), t.writeHead(200, { "Content-Type": "application/json" }), t.end(JSON.stringify({ message: "Secrets reloaded successfully" }));
8550
8171
  }
8551
8172
  async renderDashboard(e) {
8552
- let t = await this.queue.listJobs(500), n = {
8553
- success: "bg-emerald-500/10 text-emerald-400",
8554
- failed: "bg-rose-500/10 text-rose-400",
8555
- running: "bg-indigo-500/10 text-indigo-400 animate-pulse",
8556
- _: "bg-gray-500/10 text-gray-400"
8557
- }, r = (e) => {
8558
- switch (e) {
8559
- case "success": return "bg-emerald-400";
8560
- case "failed": return "bg-rose-400";
8561
- case "running": return "bg-indigo-400 animate-pulse";
8562
- default: return "bg-gray-500";
8563
- }
8564
- }, i = t.map((e) => `
8565
- <div class="py-3 px-4 block md:hidden bg-gray-900/60">
8566
- <div class="flex items-center justify-between gap-2 mb-1">
8567
- <div class="flex items-center gap-2 min-w-0">
8568
- <span class="w-2.5 h-2.5 rounded-full ${r(e.status)} flex-shrink-0"></span>
8569
- <span class="font-medium text-white truncate">${e.workflow_id}</span>
8570
- </div>
8571
- <a href="/runs/${e.id}" class="shrink-0 text-xs bg-gray-800 hover:bg-gray-700 text-gray-300 px-2.5 py-1 rounded border border-gray-700 whitespace-nowrap">Trace</a>
8572
- </div>
8573
- <div class="flex items-center gap-2 text-xs text-gray-400 pl-[18px]">
8574
- #${e.id}
8575
- </div>
8576
- </div>
8577
- `).join(""), a = `<!doctype html>
8578
- <html lang="en" class="dark">
8579
- <head>
8580
- <meta charset="utf-8" />
8581
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
8582
- <meta name="viewport" content="width=device-width,initial-scale=1.0" />
8583
- <meta http-equiv="refresh" content="10"> <!-- Auto-refreshes every 10s -->
8584
- <title>Workflow Engine Dashboard</title>
8585
- <script src="https://cdn.tailwindcss.com"><\/script>
8586
- </head>
8587
- <body class="bg-gray-950 text-gray-100 min-h-screen p-6 font-sans">
8588
- <div class="max-w-6xl mx-auto space-y-6">
8589
- <div class="flex items-center justify-between border-b border-gray-800 pb-4">
8590
- <div>
8591
- <h1 class="text-2xl font-bold text-white">⚙️ Runner Engine Status</h1>
8592
- <p class="text-xs text-gray-400">Live Job Queue & Execution Traces</p>
8593
- </div>
8594
- <span class="text-xs font-mono bg-emerald-500/10 text-emerald-400 px-3 py-1 rounded-full border border-emerald-500/20">
8595
- ● System Operational
8596
- </span>
8597
- </div>
8598
-
8599
- <div class="bg-gray-900 border border-gray-800 rounded-xl overflow-hidden hidden md:block">
8600
- <table class="w-full text-left text-sm">
8601
- <thead class="bg-gray-800/50 text-gray-400 text-xs uppercase font-mono border-b border-gray-800">
8602
- <tr>
8603
- <th class="py-3 px-4">Job ID</th>
8604
- <th class="py-3 px-4">Workflow</th>
8605
- <th class="py-3 px-4">Status</th>
8606
- <th class="py-3 px-4 hidden xl:table-cell">Worker</th>
8607
- <th class="py-3 px-4 hidden lg:table-cell">Created At</th>
8608
- <th class="py-3 px-4 text-right hidden md:table-cell">Action</th>
8609
- </tr>
8610
- </thead>
8611
- <tbody>${t.map((e) => {
8612
- let t = n[e.status] || n._;
8613
- return `
8614
- <tr class="border-b border-gray-800 hover:bg-gray-900/50 transition">
8615
- <td class="py-3 px-4 font-mono text-indigo-400"><a href="/runs/${e.id}" class="hover:underline">#${e.id}</a></td>
8616
- <td class="py-3 px-4 font-medium text-white">${e.workflow_id}</td>
8617
- <td class="py-3 px-4">
8618
- <span class="px-2.5 py-0.5 rounded-full text-xs font-semibold ${t}">${e.status?.toUpperCase() ?? "?"}</span>
8619
- </td>
8620
- <td class="py-3 px-4 hidden xl:table-cell text-xs font-mono text-gray-400">${e.worker_id || "-"}</td>
8621
- <td class="py-3 px-4 hidden lg:table-cell text-xs text-gray-400">${e.created_at}</td>
8622
- <td class="py-3 px-4 text-right whitespace-nowrap hidden md:table-cell">
8623
- <a href="/runs/${e.id}" class="text-xs bg-gray-800 hover:bg-gray-700 text-gray-200 px-3 py-1 rounded border border-gray-700">View Trace →</a>
8624
- </td>
8625
- </tr>
8626
- `;
8627
- }).join("")}</tbody>
8628
- </table>
8629
- </div>
8630
-
8631
- <div class="md:hidden divide-y divide-gray-800">${i || "<div class=\"p-6 text-center text-gray-500\">No jobs recorded yet.</div>"}</div>
8632
- </div>
8633
- </body>
8634
- </html>`, o = this.secrets.redactText(a);
8635
- e.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), e.end(o);
8173
+ let t = zo(await this.queue.listJobs(500)), n = this.secrets.redactText(Bo(t));
8174
+ e.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), e.end(n);
8175
+ }
8176
+ async renderDashboardJobs(e) {
8177
+ let t = zo(await this.queue.listJobs(500)), n = this.secrets.redactText(JSON.stringify({ jobs: t }));
8178
+ e.writeHead(200, {
8179
+ "Cache-Control": "no-store",
8180
+ "Content-Type": "application/json; charset=utf-8"
8181
+ }), e.end(n);
8636
8182
  }
8637
8183
  async renderRunDetails(e, t) {
8638
8184
  let n = await this.queue.getJob(e);
8639
- if (!n || !n.report) return t.writeHead(404, { "Content-Type": "text/html; charset=utf-8" }), t.end("<h1>404 - Report Not Found</h1>");
8640
- let r = JSON.parse(n.report), i = await this.queue.getJobLogs(e);
8185
+ if (!n) return t.writeHead(404, { "Content-Type": "text/html; charset=utf-8" }), t.end("<h1>404 - Report Not Found</h1>");
8186
+ let r = n.report ? JSON.parse(n.report) : this.buildPendingReport(n);
8187
+ r.status = n.status, r.status === "running" && (r.durationMs = Math.max(0, Date.now() - Date.parse(r.startedAt)));
8188
+ let i = await this.queue.getJobLogs(e);
8641
8189
  r.steps = (r.steps || []).map((e) => ({
8642
8190
  ...e,
8643
- logContent: i[e.id] || ""
8191
+ logContent: e.status === "running" || e.status === "pending" ? "" : i[e.id] || ""
8644
8192
  }));
8645
- let a = new zo({ outputDir: "" }).generateHtml(r), o = this.secrets.redactText(a);
8193
+ let a = new Io({ outputDir: "" }).generateHtml(r), o = this.secrets.redactText(a);
8646
8194
  t.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), t.end(o);
8647
8195
  }
8196
+ buildPendingReport(e) {
8197
+ let t = JSON.parse(e.payload), n = e.started_at || e.created_at;
8198
+ return {
8199
+ jobId: String(e.id),
8200
+ parentId: String(e.parentId || ""),
8201
+ workflowName: e.workflow_id,
8202
+ status: e.status,
8203
+ durationMs: e.status === "running" ? Math.max(0, Date.now() - Date.parse(n)) : 0,
8204
+ startedAt: n,
8205
+ inputs: t.inputs || {},
8206
+ environment: t.env || {},
8207
+ steps: (t.steps || []).map((e, t) => ({
8208
+ id: e.id || `step-${t}`,
8209
+ name: e.name || e.id || `step-${t}`,
8210
+ status: "pending",
8211
+ durationMs: 0,
8212
+ outputs: {},
8213
+ logContent: ""
8214
+ })),
8215
+ artifacts: [],
8216
+ rerunToken: JSON.stringify({
8217
+ jobId: e.id,
8218
+ payload: t
8219
+ })
8220
+ };
8221
+ }
8648
8222
  async handleRestartJob(e, t) {
8649
8223
  let n = await this.queue.restartJob(e);
8650
8224
  if (n) {
@@ -8976,53 +8550,89 @@ async function Zo(e) {
8976
8550
  steps: {},
8977
8551
  logsDir: f,
8978
8552
  workingDir: p
8979
- }, { cancelled: h, failed: g, stepReports: _ } = await Qo({
8553
+ }, h = c.map((e, t) => (e.id ||= `step-${t}`, e.name ||= e.id, {
8554
+ id: e.id,
8555
+ name: e.name,
8556
+ status: "pending",
8557
+ durationMs: 0,
8558
+ outputs: {},
8559
+ logContent: ""
8560
+ })), g = is(n, "running", u, l, m.env, h, s);
8561
+ await o.saveReport(n.id, g);
8562
+ let { cancelled: _, failed: v } = await Qo({
8980
8563
  payload: s,
8981
8564
  steps: c,
8982
8565
  executionContext: m,
8983
8566
  ...e
8984
- }), v = h ? "cancelled" : g ? "failed" : "success";
8985
- await o.finishJob(n.id, v), console.log(`[${t}] ✅ Job #${n.id} completed as: ${v}`);
8986
- let y = is(n, v, u, l, m.env, _, s);
8987
- await o.saveReport(n.id, y), await as(t, r.reporters, y);
8567
+ }, g), y = _ ? "cancelled" : v ? "failed" : "success";
8568
+ g.status = y, g.durationMs = Date.now() - u, g.finishedAt = (/* @__PURE__ */ new Date()).toISOString(), await o.completeJob(n.id, y, g), console.log(`[${t}] ✅ Job #${n.id} completed as: ${y}`), await as(t, r.reporters, g);
8988
8569
  }
8989
- async function Qo(e) {
8990
- let { driver: t, workerId: n, queue: r, config: i, job: a, payload: o, steps: s, executionContext: c } = e, l = [], u = !1, d = !1;
8570
+ async function Qo(e, t) {
8571
+ let { driver: n, workerId: r, queue: i, config: a, job: o, payload: s, steps: c, executionContext: l } = e, u = t.steps, d = !1, f = !1, p = 0;
8991
8572
  try {
8992
- o.env && Object.assign(c.env, await ts(o.env, c));
8993
- for (let e = 0; e < s.length; e++) {
8994
- let o = s[e], f = await $o({
8995
- workerId: n,
8996
- jobId: a.id,
8997
- step: o,
8573
+ s.env && Object.assign(l.env, await ts(s.env, l));
8574
+ for (let e = 0; e < c.length; e++) {
8575
+ let s = c[e], m = (/* @__PURE__ */ new Date()).toISOString();
8576
+ u[e] = {
8577
+ ...u[e],
8578
+ status: "running",
8579
+ durationMs: 0,
8580
+ exitCode: void 0,
8581
+ error: void 0,
8582
+ outputs: {},
8583
+ logContent: "",
8584
+ startedAt: m,
8585
+ finishedAt: void 0
8586
+ }, t.durationMs = Date.now() - Date.parse(t.startedAt), await i.saveReport(o.id, t);
8587
+ let h = await $o({
8588
+ workerId: r,
8589
+ jobId: o.id,
8590
+ step: s,
8998
8591
  stepIndex: e,
8999
- executionContext: c,
9000
- driver: t,
9001
- queue: r,
9002
- config: i
8592
+ executionContext: l,
8593
+ driver: n,
8594
+ queue: i,
8595
+ config: a
9003
8596
  });
9004
- if (f.report && l.push(f.report), f.skipped) break;
9005
- if (f.cancelled) {
9006
- d = !0, u = !0;
8597
+ if (h.report ? u[e] = {
8598
+ ...h.report,
8599
+ startedAt: m,
8600
+ finishedAt: (/* @__PURE__ */ new Date()).toISOString()
8601
+ } : h.skipped ? u[e] = {
8602
+ ...u[e],
8603
+ status: "skipped",
8604
+ durationMs: 0,
8605
+ exitCode: 0,
8606
+ finishedAt: (/* @__PURE__ */ new Date()).toISOString()
8607
+ } : u[e] = {
8608
+ ...u[e],
8609
+ status: "failed",
8610
+ durationMs: 0,
8611
+ exitCode: 1,
8612
+ error: "Step failed before execution started",
8613
+ finishedAt: (/* @__PURE__ */ new Date()).toISOString()
8614
+ }, p = e + 1, t.durationMs = Date.now() - Date.parse(t.startedAt), await i.saveReport(o.id, t), h.skipped) break;
8615
+ if (h.cancelled) {
8616
+ f = !0, d = !0;
9007
8617
  break;
9008
8618
  }
9009
- if (f.failed) {
9010
- u = !0;
8619
+ if (h.failed) {
8620
+ d = !0;
9011
8621
  break;
9012
8622
  }
9013
8623
  }
9014
8624
  } catch (e) {
9015
- console.log("🛑 Step failed", e), u = !0;
8625
+ console.log("🛑 Step failed", e), d = !0;
9016
8626
  }
9017
- return l.length < s.length && rs(s, l.length, l), {
9018
- failed: u,
9019
- cancelled: d,
9020
- stepReports: l
8627
+ return p < c.length && (rs(c, p, u), t.durationMs = Date.now() - Date.parse(t.startedAt), await i.saveReport(o.id, t)), {
8628
+ failed: d,
8629
+ cancelled: f,
8630
+ stepReports: u
9021
8631
  };
9022
8632
  }
9023
8633
  async function $o(e) {
9024
8634
  let { step: t, stepIndex: n, executionContext: r } = e;
9025
- if (t.id ||= `step-${n}`, t.name ||= t.id, t.if && !await Ao.evaluateConditions(t.if, r)) return qo && console.log(`⏩ Skipped step ${t.id} based on condition: ${t.if}`, r), {
8635
+ if (t.id ||= `step-${n}`, t.name ||= t.id, t.if && !await ko.evaluateConditions(t.if, r)) return qo && console.log(`⏩ Skipped step ${t.id} based on condition: ${t.if}`, r), {
9026
8636
  failed: !1,
9027
8637
  cancelled: !1,
9028
8638
  skipped: !0,
@@ -9062,7 +8672,7 @@ async function $o(e) {
9062
8672
  async function es(e) {
9063
8673
  let { queue: t, stepContext: n, executionContext: r } = e, { jobId: i, step: a } = n, o = Date.now(), s = a.id, c = a.name;
9064
8674
  try {
9065
- let e = await Ao.evaluateExpression(a.eval, r);
8675
+ let e = await ko.evaluateExpression(a.eval, r);
9066
8676
  r.steps[s] = {
9067
8677
  status: "success",
9068
8678
  exitCode: 0,
@@ -9107,7 +8717,7 @@ async function es(e) {
9107
8717
  }
9108
8718
  async function ts(e, t) {
9109
8719
  let n = {};
9110
- if (e) for (let [r, i] of Object.entries(e)) n[r] = String(await Ao.evaluateValue(i, t));
8720
+ if (e) for (let [r, i] of Object.entries(e)) n[r] = String(await ko.evaluateValue(i, t));
9111
8721
  return n;
9112
8722
  }
9113
8723
  async function ns(t) {
@@ -9134,7 +8744,7 @@ async function ns(t) {
9134
8744
  } catch (e) {
9135
8745
  console.error(`[${n}] ⚠️ Failed to read step log file:`, e.message);
9136
8746
  }
9137
- let h = m.exitCode !== 0 || f, g = m.exitCode === 0 ? "success" : f ? "cancelled" : "failed";
8747
+ let h = m.exitCode !== 0 || f, g = f ? "cancelled" : m.exitCode === 0 ? "success" : "failed";
9138
8748
  return a.steps[l] = {
9139
8749
  status: g,
9140
8750
  exitCode: m.exitCode,
@@ -9158,7 +8768,7 @@ async function ns(t) {
9158
8768
  function rs(e, t, n) {
9159
8769
  for (let r = t; r < e.length; r++) {
9160
8770
  let t = e[r], i = t.id || `step-${r}`;
9161
- n.push({
8771
+ n[r] = {
9162
8772
  id: i,
9163
8773
  name: t.name || i,
9164
8774
  status: "skipped",
@@ -9166,7 +8776,7 @@ function rs(e, t, n) {
9166
8776
  exitCode: 0,
9167
8777
  outputs: {},
9168
8778
  logContent: ""
9169
- });
8779
+ };
9170
8780
  }
9171
8781
  }
9172
8782
  function is(e, t, n, r, i, a, o) {
@@ -9177,7 +8787,7 @@ function is(e, t, n, r, i, a, o) {
9177
8787
  status: t,
9178
8788
  durationMs: Date.now() - n,
9179
8789
  startedAt: new Date(n).toISOString(),
9180
- finishedAt: (/* @__PURE__ */ new Date()).toISOString(),
8790
+ finishedAt: t === "running" ? void 0 : (/* @__PURE__ */ new Date()).toISOString(),
9181
8791
  inputs: r,
9182
8792
  environment: i,
9183
8793
  steps: a,
@@ -9267,4 +8877,4 @@ async function ls() {
9267
8877
  }
9268
8878
  ls().catch(console.error);
9269
8879
  //#endregion
9270
- export { zo as HtmlReporter, os as JsonFileReporter, ss as SlackReporter };
8880
+ export { Io as HtmlReporter, os as JsonFileReporter, ss as SlackReporter };