@intentic/claude-plugin 1.331.0 → 1.333.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/fileq.mjs CHANGED
@@ -376,8 +376,8 @@ function isNiladic(namedFlagWithNegation) {
376
376
  }
377
377
  return false;
378
378
  }
379
- function findFlagsByArgument(arg, flags, allowsNegation, resolvedAliases, config) {
380
- const shorthandMatch = FLAG_SHORTHAND_PATTERN.exec(arg);
379
+ function findFlagsByArgument(arg2, flags, allowsNegation, resolvedAliases, config) {
380
+ const shorthandMatch = FLAG_SHORTHAND_PATTERN.exec(arg2);
381
381
  if (shorthandMatch) {
382
382
  const batch = shorthandMatch[1];
383
383
  return Array.from(batch).map((alias) => {
@@ -389,15 +389,15 @@ function findFlagsByArgument(arg, flags, allowsNegation, resolvedAliases, config
389
389
  return namedFlag;
390
390
  });
391
391
  }
392
- const flagNameMatch = FLAG_NAME_PATTERN.exec(arg);
392
+ const flagNameMatch = FLAG_NAME_PATTERN.exec(arg2);
393
393
  if (flagNameMatch) {
394
394
  const externalFlagName = flagNameMatch[1];
395
395
  return [findInternalFlagMatch(externalFlagName, flags, allowsNegation, config)];
396
396
  }
397
397
  return [];
398
398
  }
399
- function findFlagByArgumentWithInput(arg, flags, allowsNegation, resolvedAliases, config) {
400
- const flagsNameMatch = FLAG_NAME_VALUE_PATTERN.exec(arg);
399
+ function findFlagByArgumentWithInput(arg2, flags, allowsNegation, resolvedAliases, config) {
400
+ const flagsNameMatch = FLAG_NAME_VALUE_PATTERN.exec(arg2);
401
401
  if (flagsNameMatch) {
402
402
  const externalFlagName = flagsNameMatch[1];
403
403
  const namedFlag = findInternalFlagMatch(externalFlagName, flags, allowsNegation, config);
@@ -407,7 +407,7 @@ function findFlagByArgumentWithInput(arg, flags, allowsNegation, resolvedAliases
407
407
  }
408
408
  return [namedFlag, valueText];
409
409
  }
410
- const aliasValueMatch = ALIAS_VALUE_PATTERN.exec(arg);
410
+ const aliasValueMatch = ALIAS_VALUE_PATTERN.exec(arg2);
411
411
  if (aliasValueMatch) {
412
412
  const aliasName = aliasValueMatch[1];
413
413
  const namedFlag = resolvedAliases[aliasName];
@@ -1343,8 +1343,8 @@ async function scanInputsAndRunTarget(app2, rawInputs, context, text, ansiColorB
1343
1343
  const scanner = buildRouteScanner(app2.root, app2.config.scanner, [app2.config.name], additionalFlags);
1344
1344
  let error2;
1345
1345
  while (inputs.length > 0 && !error2) {
1346
- const arg = inputs.shift();
1347
- error2 = scanner.next(arg);
1346
+ const arg2 = inputs.shift();
1347
+ error2 = scanner.next(arg2);
1348
1348
  }
1349
1349
  if (error2) {
1350
1350
  const routeNames = listAllRouteNamesAndAliasesForScan(
@@ -2601,11 +2601,21 @@ var init_version = __esm({
2601
2601
  }
2602
2602
  });
2603
2603
 
2604
+ // ../../_tools/base/src/text/escape.ts
2605
+ var escapeRegExp;
2606
+ var init_escape = __esm({
2607
+ "../../_tools/base/src/text/escape.ts"() {
2608
+ "use strict";
2609
+ escapeRegExp = (text) => text.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
2610
+ }
2611
+ });
2612
+
2604
2613
  // ../../_tools/base/src/format.ts
2605
2614
  var CHARS_PER_TOKEN, tokensOfChars, estimateTokens, plural;
2606
2615
  var init_format = __esm({
2607
2616
  "../../_tools/base/src/format.ts"() {
2608
2617
  "use strict";
2618
+ init_escape();
2609
2619
  CHARS_PER_TOKEN = 4;
2610
2620
  tokensOfChars = (chars) => Math.ceil(chars / CHARS_PER_TOKEN);
2611
2621
  estimateTokens = (text) => tokensOfChars(text.length);
@@ -2729,13 +2739,13 @@ var init_outside_text = __esm({
2729
2739
  let out = "";
2730
2740
  let cursor = 0;
2731
2741
  for (const match of folded.text.matchAll(pattern)) {
2732
- const start = folded.starts[match.index] ?? match.index;
2742
+ const start2 = folded.starts[match.index] ?? match.index;
2733
2743
  const last = match.index + match[0].length - 1;
2734
2744
  const end = folded.ends[last] ?? last + 1;
2735
- if (start < cursor) {
2745
+ if (start2 < cursor) {
2736
2746
  continue;
2737
2747
  }
2738
- out += original.slice(cursor, start) + NEUTRALIZED;
2748
+ out += original.slice(cursor, start2) + NEUTRALIZED;
2739
2749
  cursor = end;
2740
2750
  }
2741
2751
  return out + original.slice(cursor);
@@ -3606,9 +3616,9 @@ var init_Deferred = __esm({
3606
3616
  constructor() {
3607
3617
  this.resolve = () => null;
3608
3618
  this.reject = () => null;
3609
- this.promise = new Promise((resolve6, reject) => {
3619
+ this.promise = new Promise((resolve7, reject) => {
3610
3620
  this.reject = reject;
3611
- this.resolve = resolve6;
3621
+ this.resolve = resolve7;
3612
3622
  });
3613
3623
  }
3614
3624
  };
@@ -8341,17 +8351,42 @@ var init_formats = __esm({
8341
8351
  }
8342
8352
  });
8343
8353
 
8354
+ // ../../_tools/base/src/text/one-line.ts
8355
+ var SPACE, INVISIBLE, cutAt, oneLine;
8356
+ var init_one_line = __esm({
8357
+ "../../_tools/base/src/text/one-line.ts"() {
8358
+ "use strict";
8359
+ SPACE = /\s+/gu;
8360
+ INVISIBLE = /[\p{Cc}\p{Cf}]/gu;
8361
+ cutAt = (text, units2) => {
8362
+ const high = text.charCodeAt(units2 - 1);
8363
+ return text.slice(0, high >= 55296 && high <= 56319 ? units2 - 1 : units2);
8364
+ };
8365
+ oneLine = (text, max2 = Number.POSITIVE_INFINITY, options = {}) => {
8366
+ const flat = text.replaceAll(SPACE, " ").replaceAll(INVISIBLE, "").replaceAll(SPACE, " ").trim();
8367
+ if (flat.length <= max2) {
8368
+ return flat;
8369
+ }
8370
+ const ellipsis = options.ellipsis === false ? "" : options.ellipsis ?? "\u2026";
8371
+ if (ellipsis.length >= max2) {
8372
+ return cutAt(flat, Math.max(0, max2));
8373
+ }
8374
+ return `${cutAt(flat, max2 - ellipsis.length).trimEnd()}${ellipsis}`;
8375
+ };
8376
+ }
8377
+ });
8378
+
8344
8379
  // ../fileq/src/lib/check/finding.ts
8345
8380
  var error, warning, plural2, excerpt, LEFTOVER_CERTAIN, LEFTOVER_LIKELY, leftoverText, EMU_PER_INCH, inches;
8346
8381
  var init_finding = __esm({
8347
8382
  "../fileq/src/lib/check/finding.ts"() {
8348
8383
  "use strict";
8384
+ init_one_line();
8349
8385
  error = (rule, where, message) => ({ severity: "error", rule, where, message });
8350
8386
  warning = (rule, where, message) => ({ severity: "warning", rule, where, message });
8351
8387
  plural2 = (count, noun, nouns = `${noun}s`) => `${count} ${count === 1 ? noun : nouns}`;
8352
8388
  excerpt = (text, max2 = 60) => {
8353
- const line2 = text.replaceAll(/\s+/g, " ").trim();
8354
- return `"${line2.length > max2 ? `${line2.slice(0, max2 - 1)}\u2026` : line2}"`;
8389
+ return `"${oneLine(text, max2)}"`;
8355
8390
  };
8356
8391
  LEFTOVER_CERTAIN = [
8357
8392
  /\bClick (?:or tap )?(?:here )?(?:to|icon to) (?:add|edit|enter|insert)\b[^.\n]*/i,
@@ -8525,10 +8560,10 @@ var init_esm = __esm({
8525
8560
  0
8526
8561
  ]);
8527
8562
  clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
8528
- freb = function(eb, start) {
8563
+ freb = function(eb, start2) {
8529
8564
  var b3 = new u16(31);
8530
8565
  for (var i3 = 0; i3 < 31; ++i3) {
8531
- b3[i3] = start += 1 << eb[i3 - 1];
8566
+ b3[i3] = start2 += 1 << eb[i3 - 1];
8532
8567
  }
8533
8568
  var r2 = new i32(b3[30]);
8534
8569
  for (var i3 = 1; i3 < 30; ++i3) {
@@ -8879,9 +8914,10 @@ var decodeEntities, attributeOf;
8879
8914
  var init_xml = __esm({
8880
8915
  "../fileq/src/lib/xml.ts"() {
8881
8916
  "use strict";
8917
+ init_escape();
8882
8918
  decodeEntities = (text) => text.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll(/&#x([0-9a-f]+);/gi, (_3, hex) => String.fromCodePoint(Number.parseInt(hex, 16))).replaceAll(/&#(\d+);/g, (_3, dec) => String.fromCodePoint(Number(dec))).replaceAll("&amp;", "&");
8883
8919
  attributeOf = (attributes, name) => {
8884
- const match = new RegExp(`(?:^|\\s)${name.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`).exec(attributes);
8920
+ const match = new RegExp(`(?:^|\\s)${escapeRegExp(name)}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`).exec(attributes);
8885
8921
  if (match === null) {
8886
8922
  return void 0;
8887
8923
  }
@@ -9263,11 +9299,11 @@ var init_check_docx = __esm({
9263
9299
  }
9264
9300
  return owner;
9265
9301
  };
9266
- stepField = (node, open, fields, where) => {
9302
+ stepField = (node, open2, fields, where) => {
9267
9303
  const type = node.attrs["w:fldCharType"];
9268
- const current = open.at(-1);
9304
+ const current = open2.at(-1);
9269
9305
  if (type === "begin") {
9270
- open.push({ instruction: "", result: "", separated: false, where });
9306
+ open2.push({ instruction: "", result: "", separated: false, where });
9271
9307
  return;
9272
9308
  }
9273
9309
  if (current === void 0) {
@@ -9276,7 +9312,7 @@ var init_check_docx = __esm({
9276
9312
  if (type === "separate") {
9277
9313
  current.separated = true;
9278
9314
  } else if (type === "end") {
9279
- open.pop();
9315
+ open2.pop();
9280
9316
  fields.push({
9281
9317
  instruction: current.instruction.trim(),
9282
9318
  result: current.result,
@@ -9287,15 +9323,15 @@ var init_check_docx = __esm({
9287
9323
  };
9288
9324
  fieldsIn = (body, whereOfNode) => {
9289
9325
  const fields = [];
9290
- const open = [];
9326
+ const open2 = [];
9291
9327
  for (const node of everyElement(body)) {
9292
9328
  if (node.name === "w:fldSimple") {
9293
9329
  const result = textIn(node, "w:t");
9294
9330
  fields.push({ instruction: (node.attrs["w:instr"] ?? "").trim(), result, hasResult: result.trim() !== "", where: whereOfNode(node) });
9295
9331
  } else if (node.name === "w:fldChar") {
9296
- stepField(node, open, fields, whereOfNode(node));
9332
+ stepField(node, open2, fields, whereOfNode(node));
9297
9333
  } else {
9298
- const current = open.at(-1);
9334
+ const current = open2.at(-1);
9299
9335
  const text = node.children.filter((child) => !isElement(child)).join("");
9300
9336
  if (current !== void 0 && node.name === "w:instrText" && !current.separated) {
9301
9337
  current.instruction += text;
@@ -10552,7 +10588,7 @@ async function JBig2(e2 = {}) {
10552
10588
  };
10553
10589
  if (n2.noExitRuntime && n2.noExitRuntime, n2.print && n2.print, n2.printErr && n2.printErr, n2.wasmBinary && n2.wasmBinary, n2.arguments && n2.arguments, n2.thisProgram && n2.thisProgram, n2.preInit) for (typeof n2.preInit == `function` && (n2.preInit = [n2.preInit]); n2.preInit.length > 0; ) n2.preInit.shift()();
10554
10590
  n2.writeArrayToMemory = writeArrayToMemory;
10555
- function run5() {
10591
+ function run3() {
10556
10592
  preRun();
10557
10593
  function doRun() {
10558
10594
  n2.calledRun = true, initRuntime(), a2?.(n2), n2.onRuntimeInitialized?.(), postRun();
@@ -10562,7 +10598,7 @@ async function JBig2(e2 = {}) {
10562
10598
  }, 1)) : doRun();
10563
10599
  }
10564
10600
  var u2 = {}();
10565
- return run5(), t2 = s2 ? n2 : new Promise((e3, t3) => {
10601
+ return run3(), t2 = s2 ? n2 : new Promise((e3, t3) => {
10566
10602
  a2 = e3;
10567
10603
  }), t2;
10568
10604
  }
@@ -10607,7 +10643,7 @@ async function OpenJPEG(e2 = {}) {
10607
10643
  };
10608
10644
  if (n2.noExitRuntime && n2.noExitRuntime, n2.print && n2.print, n2.printErr && n2.printErr, n2.wasmBinary && n2.wasmBinary, n2.arguments && n2.arguments, n2.thisProgram && (i3 = n2.thisProgram), n2.preInit) for (typeof n2.preInit == `function` && (n2.preInit = [n2.preInit]); n2.preInit.length > 0; ) n2.preInit.shift()();
10609
10645
  n2.writeArrayToMemory = writeArrayToMemory;
10610
- function run5() {
10646
+ function run3() {
10611
10647
  preRun();
10612
10648
  function doRun() {
10613
10649
  n2.calledRun = true, initRuntime(), o2?.(n2), n2.onRuntimeInitialized?.(), postRun();
@@ -10617,7 +10653,7 @@ async function OpenJPEG(e2 = {}) {
10617
10653
  }, 1)) : doRun();
10618
10654
  }
10619
10655
  var f2 = {}();
10620
- return run5(), t2 = s2 ? n2 : new Promise((e3, t3) => {
10656
+ return run3(), t2 = s2 ? n2 : new Promise((e3, t3) => {
10621
10657
  o2 = e3;
10622
10658
  }), t2;
10623
10659
  }
@@ -49313,7 +49349,7 @@ var init_check_pdf = __esm({
49313
49349
  ])
49314
49350
  });
49315
49351
  isGlyph = (item) => typeof item !== "number";
49316
- visibleCharacters = (run5) => run5.filter((item) => isGlyph(item) && /\S/.test(item.unicode ?? "")).length;
49352
+ visibleCharacters = (run3) => run3.filter((item) => isGlyph(item) && /\S/.test(item.unicode ?? "")).length;
49317
49353
  fontOf = (page, id) => {
49318
49354
  if (id === void 0) {
49319
49355
  return void 0;
@@ -49484,8 +49520,8 @@ var decoder, toUTF8String, toHexString, getView, readInt16LE, readUInt16BE, read
49484
49520
  var init_utils = __esm({
49485
49521
  "../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/utils.js"() {
49486
49522
  decoder = new TextDecoder();
49487
- toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
49488
- toHexString = (input, start = 0, end = input.length) => input.slice(start, end).reduce((memo, i3) => memo + `0${i3.toString(16)}`.slice(-2), "");
49523
+ toUTF8String = (input, start2 = 0, end = input.length) => decoder.decode(input.slice(start2, end));
49524
+ toHexString = (input, start2 = 0, end = input.length) => input.slice(start2, end).reduce((memo, i3) => memo + `0${i3.toString(16)}`.slice(-2), "");
49489
49525
  getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
49490
49526
  readInt16LE = (input, offset = 0) => getView(input, offset).getInt16(0, true);
49491
49527
  readUInt16BE = (input, offset = 0) => getView(input, offset).getUint16(0, false);
@@ -49843,12 +49879,12 @@ function extractOrientation(exifBlock, isBigEndian) {
49843
49879
  const offset = EXIF_HEADER_BYTES + idfOffset;
49844
49880
  const idfDirectoryEntries = readUInt(exifBlock, 16, offset, isBigEndian);
49845
49881
  for (let directoryEntryNumber = 0; directoryEntryNumber < idfDirectoryEntries; directoryEntryNumber++) {
49846
- const start = offset + NUM_DIRECTORY_ENTRIES_BYTES + directoryEntryNumber * IDF_ENTRY_BYTES;
49847
- const end = start + IDF_ENTRY_BYTES;
49848
- if (start > exifBlock.length) {
49882
+ const start2 = offset + NUM_DIRECTORY_ENTRIES_BYTES + directoryEntryNumber * IDF_ENTRY_BYTES;
49883
+ const end = start2 + IDF_ENTRY_BYTES;
49884
+ if (start2 > exifBlock.length) {
49849
49885
  return;
49850
49886
  }
49851
- const block = exifBlock.slice(start, end);
49887
+ const block = exifBlock.slice(start2, end);
49852
49888
  const tagNumber = readUInt(block, 16, 0, isBigEndian);
49853
49889
  if (tagNumber === 274) {
49854
49890
  const dataFormat = readUInt(block, 16, 2, isBigEndian);
@@ -50882,9 +50918,9 @@ var init_check_pptx = __esm({
50882
50918
  () => intAttr(childAt(pPr, "a:defRPr"), attribute),
50883
50919
  ...style.listStyles.map((listStyle) => () => intAttr(childAt(listStyle, `a:lvl${level}pPr`, "a:defRPr"), attribute))
50884
50920
  ]);
50885
- const runSizes = runs.flatMap((run5) => intAttr(childNamed(run5, "a:rPr"), "sz") ?? []);
50921
+ const runSizes = runs.flatMap((run3) => intAttr(childNamed(run3, "a:rPr"), "sz") ?? []);
50886
50922
  const size = runSizes.length > 0 ? Math.max(...runSizes) : intAttr(childNamed(p2, "a:endParaRPr"), "sz") ?? inherited("sz") ?? DEFAULT_SIZE_HUNDREDTHS;
50887
- const bold = runs.some((run5) => childNamed(run5, "a:rPr")?.attrs["b"] === "1") || runs.length > 0 && inherited("b") === 1;
50923
+ const bold = runs.some((run3) => childNamed(run3, "a:rPr")?.attrs["b"] === "1") || runs.length > 0 && inherited("b") === 1;
50888
50924
  const spacing = (name) => firstOf([
50889
50925
  () => hundredthsAt(pPr, [name, "a:spcPts"], "val"),
50890
50926
  ...style.listStyles.map((listStyle) => () => hundredthsAt(listStyle, [`a:lvl${level}pPr`, name, "a:spcPts"], "val"))
@@ -51521,7 +51557,7 @@ var require_ignore = __commonJS({
51521
51557
  }
51522
51558
  var UNDEFINED = void 0;
51523
51559
  var EMPTY = "";
51524
- var SPACE = " ";
51560
+ var SPACE2 = " ";
51525
51561
  var ESCAPE = "\\";
51526
51562
  var REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/;
51527
51563
  var BOM = "\uFEFF";
@@ -51573,9 +51609,9 @@ var require_ignore = __commonJS({
51573
51609
  const source = `[${body}]`;
51574
51610
  return new RegExp(source).test("/") ? NON_SLASH + source : source;
51575
51611
  };
51576
- var scanBracket = (pattern, start) => {
51612
+ var scanBracket = (pattern, start2) => {
51577
51613
  const { length } = pattern;
51578
- let index = start + 1;
51614
+ let index = start2 + 1;
51579
51615
  let negated = EMPTY;
51580
51616
  const lead = pattern[index];
51581
51617
  if (lead === "!" || lead === "^") {
@@ -51662,7 +51698,7 @@ var require_ignore = __commonJS({
51662
51698
  const escaped = pattern[index + 1];
51663
51699
  if (escaped === UNDEFINED || escaped === SLASH && index + 2 === length) {
51664
51700
  out += hold(NEVER_MATCH);
51665
- } else if (escaped === "*" || escaped === "[" || escaped === SPACE || escaped === ESCAPE) {
51701
+ } else if (escaped === "*" || escaped === "[" || escaped === SPACE2 || escaped === ESCAPE) {
51666
51702
  out += pattern.slice(index, index + 2);
51667
51703
  } else {
51668
51704
  out += hold(
@@ -51707,8 +51743,8 @@ var require_ignore = __commonJS({
51707
51743
  // ever starts again inside it -- `(\\+?) ` did, which made a long run
51708
51744
  // quadratic.
51709
51745
  /(\\+)( ?)/g,
51710
- (_3, run5, space) => space ? run5.slice(0, run5.length - run5.length % 2) + SPACE : run5,
51711
- ESCAPE + SPACE
51746
+ (_3, run3, space) => space ? run3.slice(0, run3.length - run3.length % 2) + SPACE2 : run3,
51747
+ ESCAPE + SPACE2
51712
51748
  ],
51713
51749
  // Escape metacharacters
51714
51750
  // which is written down by users but means special for regular expressions.
@@ -51880,10 +51916,10 @@ var require_ignore = __commonJS({
51880
51916
  var REGEX_REPLACE_TRAILING_DOUBLESTAR = /\uE001$/;
51881
51917
  var replaceTrailingDoublestar = () => ".+(?=$|\\/$)";
51882
51918
  var WILDCARD = "[^\\/]*";
51883
- var separatorAfter = (run5, at2) => {
51919
+ var separatorAfter = (run3, at2) => {
51884
51920
  let separator = EMPTY;
51885
- for (let index = at2 + 1; index < run5.length && !run5[index].wildcard; index++) {
51886
- separator += run5[index].single;
51921
+ for (let index = at2 + 1; index < run3.length && !run3[index].wildcard; index++) {
51922
+ separator += run3[index].single;
51887
51923
  }
51888
51924
  return separator;
51889
51925
  };
@@ -51943,26 +51979,26 @@ var require_ignore = __commonJS({
51943
51979
  }
51944
51980
  }
51945
51981
  let out = EMPTY;
51946
- let run5 = [];
51982
+ let run3 = [];
51947
51983
  const flush = () => {
51948
51984
  let lastWildcard;
51949
- run5.forEach((token, at2) => {
51985
+ run3.forEach((token, at2) => {
51950
51986
  if (token.wildcard) {
51951
51987
  lastWildcard = at2;
51952
51988
  }
51953
51989
  });
51954
- run5.forEach((token, at2) => {
51990
+ run3.forEach((token, at2) => {
51955
51991
  if (!token.wildcard) {
51956
51992
  out += token.single;
51957
51993
  return;
51958
51994
  }
51959
- out += at2 === lastWildcard ? WILDCARD : `(?:(?!${separatorAfter(run5, at2)})[^\\/])*`;
51995
+ out += at2 === lastWildcard ? WILDCARD : `(?:(?!${separatorAfter(run3, at2)})[^\\/])*`;
51960
51996
  });
51961
- run5 = [];
51997
+ run3 = [];
51962
51998
  };
51963
51999
  tokens.forEach((token) => {
51964
52000
  if (token.boundary === void 0) {
51965
- run5.push(token);
52001
+ run3.push(token);
51966
52002
  return;
51967
52003
  }
51968
52004
  flush();
@@ -52076,7 +52112,7 @@ var require_ignore = __commonJS({
52076
52112
  end--;
52077
52113
  }
52078
52114
  const lineEnd = end;
52079
- while (end && body[end - 1] === SPACE) {
52115
+ while (end && body[end - 1] === SPACE2) {
52080
52116
  end--;
52081
52117
  }
52082
52118
  if (end === lineEnd) {
@@ -52086,7 +52122,7 @@ var require_ignore = __commonJS({
52086
52122
  while (backslashes < end && body[end - backslashes - 1] === ESCAPE) {
52087
52123
  backslashes++;
52088
52124
  }
52089
- return backslashes % 2 ? body.slice(0, end - 1) + SPACE : body.slice(0, end);
52125
+ return backslashes % 2 ? body.slice(0, end - 1) + SPACE2 : body.slice(0, end);
52090
52126
  };
52091
52127
  var createRule = ({
52092
52128
  pattern,
@@ -52102,7 +52138,7 @@ var require_ignore = __commonJS({
52102
52138
  body = body.slice(1);
52103
52139
  }
52104
52140
  const last = body[body.length - 1];
52105
- if (last === SPACE || last === "\r" || last === "\n") {
52141
+ if (last === SPACE2 || last === "\r" || last === "\n") {
52106
52142
  body = trimEnd2(body);
52107
52143
  }
52108
52144
  if (!body) {
@@ -52199,13 +52235,13 @@ var require_ignore = __commonJS({
52199
52235
  const rules = this._rules;
52200
52236
  const { length } = rules;
52201
52237
  const shortcut = this._basenameCount * 2 >= length;
52202
- const basename7 = shortcut ? basenameOf(path) : path;
52238
+ const basename8 = shortcut ? basenameOf(path) : path;
52203
52239
  for (let index = 0; index < length; index++) {
52204
52240
  const rule = rules[index];
52205
52241
  const { negative } = rule;
52206
52242
  const skip = unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored;
52207
52243
  if (!skip && rule[mode].test(
52208
- shortcut && rule._basenameOnly ? basename7 : path
52244
+ shortcut && rule._basenameOnly ? basename8 : path
52209
52245
  )) {
52210
52246
  ignored = !negative;
52211
52247
  unignored = negative;
@@ -52391,6 +52427,105 @@ var init_turn_preamble = __esm({
52391
52427
  }
52392
52428
  });
52393
52429
 
52430
+ // ../../_tools/constants/src/one-liner.ts
52431
+ var SETUP_CODE_PATTERN, SYNC_LEAF_PATTERN, FIX_CODE_PATTERN, SLUG_PATTERN, IMAGE_HASH_PATTERN, SHORT_CODE_PATTERN, HOSTNAME_PATTERN, DEFAULT_SYNC_ROOT, isOneLinerHost, arg, slug, host, shortCode, RECREATE, coded, VERBS, ONE_LINER_VERBS;
52432
+ var init_one_liner = __esm({
52433
+ "../../_tools/constants/src/one-liner.ts"() {
52434
+ "use strict";
52435
+ init_src();
52436
+ SETUP_CODE_PATTERN = /^[A-Za-z0-9]{6,64}$/;
52437
+ SYNC_LEAF_PATTERN = /^[a-z0-9][a-z0-9-]{0,80}$/;
52438
+ FIX_CODE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/;
52439
+ SLUG_PATTERN = /^[a-z0-9][a-z0-9-]{1,62}$/;
52440
+ IMAGE_HASH_PATTERN = /^[a-f0-9]{8,64}$/;
52441
+ SHORT_CODE_PATTERN = /^[0-9A-Za-z]{4}-?[0-9A-Za-z]{4}$/;
52442
+ HOSTNAME_PATTERN = /^(?=.{4,253}$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$/;
52443
+ DEFAULT_SYNC_ROOT = "~/intentic";
52444
+ isOneLinerHost = (host2) => HOSTNAME_PATTERN.test(host2) && !/^\d+$/.test(host2.slice(host2.lastIndexOf(".") + 1));
52445
+ arg = (name, pattern, normalize) => ({
52446
+ name,
52447
+ test: (value) => pattern.test(value),
52448
+ ...normalize === void 0 ? {} : { normalize }
52449
+ });
52450
+ slug = arg(`sandbox name`, SLUG_PATTERN);
52451
+ host = { name: `sandbox address`, test: isOneLinerHost, normalize: (value) => value.toLowerCase() };
52452
+ shortCode = arg(`code`, SHORT_CODE_PATTERN);
52453
+ RECREATE = { sh: `recreate.sh`, ps1: `recreate.ps1` };
52454
+ coded = (sh, ps1) => ({
52455
+ files: { sh, ps1 },
52456
+ required: [host, shortCode],
52457
+ optional: [],
52458
+ sh: ([address = ``, code = ``]) => ({ args: [address, code] }),
52459
+ ps1: ([address = ``, code = ``]) => [
52460
+ { name: `Sandbox`, value: address },
52461
+ { name: `Code`, value: code }
52462
+ ]
52463
+ });
52464
+ VERBS = {
52465
+ setup: {
52466
+ files: { sh: `connect.sh`, ps1: `connect.ps1` },
52467
+ required: [arg(`setup code`, SETUP_CODE_PATTERN)],
52468
+ optional: [arg(`sync folder`, SYNC_LEAF_PATTERN)],
52469
+ sh: ([code = ``, leaf]) => ({ args: [code], env: leaf === void 0 ? [] : [[`SYNC_DIR`, `${DEFAULT_SYNC_ROOT}/${leaf}`]] }),
52470
+ ps1: ([code = ``, leaf]) => [
52471
+ { name: `SetupCode`, value: code },
52472
+ ...leaf === void 0 ? [] : [{ name: `SyncDir`, value: `${DEFAULT_SYNC_ROOT}/${leaf}` }]
52473
+ ]
52474
+ },
52475
+ fix: {
52476
+ files: { sh: `fix.sh`, ps1: `fix.ps1` },
52477
+ required: [arg(`fix code`, FIX_CODE_PATTERN)],
52478
+ optional: [],
52479
+ sh: ([code = ``]) => ({ args: [code] }),
52480
+ ps1: ([code = ``]) => [{ name: `Code`, value: code }]
52481
+ },
52482
+ update: {
52483
+ files: RECREATE,
52484
+ required: [slug],
52485
+ optional: [],
52486
+ sh: ([name = ``]) => ({ args: [name] }),
52487
+ ps1: ([name = ``]) => [{ name: `Slug`, value: name }]
52488
+ },
52489
+ rollback: {
52490
+ files: RECREATE,
52491
+ required: [slug],
52492
+ optional: [],
52493
+ sh: ([name = ``]) => ({ args: [name, `--rollback`] }),
52494
+ ps1: ([name = ``]) => [{ name: `Slug`, value: name }, { name: `Rollback` }]
52495
+ },
52496
+ restart: {
52497
+ files: RECREATE,
52498
+ required: [slug],
52499
+ optional: [],
52500
+ sh: ([name = ``]) => ({ args: [name, `--restart`] }),
52501
+ ps1: ([name = ``]) => [{ name: `Slug`, value: name }, { name: `Restart` }]
52502
+ },
52503
+ rebuild: {
52504
+ files: RECREATE,
52505
+ required: [slug, arg(`image hash`, IMAGE_HASH_PATTERN)],
52506
+ optional: [],
52507
+ sh: ([name = ``, hash = ``]) => ({ args: [name, hash] }),
52508
+ ps1: ([name = ``, hash = ``]) => [
52509
+ { name: `Slug`, value: name },
52510
+ { name: `Hash`, value: hash }
52511
+ ]
52512
+ },
52513
+ // Recoverable for 7 days; with no name the script lists the sandboxes on the device and asks which.
52514
+ remove: {
52515
+ files: { sh: `cleanup.sh`, ps1: `cleanup.ps1` },
52516
+ required: [],
52517
+ optional: [slug],
52518
+ sh: ([name]) => ({ args: name === void 0 ? [] : [name, `--yes`] }),
52519
+ ps1: ([name]) => name === void 0 ? [] : [{ name: `Slug`, value: name }, { name: `Yes` }]
52520
+ },
52521
+ device: coded(`device.sh`, `device.ps1`),
52522
+ sync: coded(`sync.sh`, `sync.ps1`),
52523
+ server: coded(`connect-host.sh`, `connect-host.ps1`)
52524
+ };
52525
+ ONE_LINER_VERBS = Object.keys(VERBS);
52526
+ }
52527
+ });
52528
+
52394
52529
  // ../../_tools/constants/src/index.ts
52395
52530
  var STATE_DIR, REFERENCE_DIR, GOOGLE_CLIENT_ID, GOOGLE_TOKEN_STORAGE_KEY;
52396
52531
  var init_src = __esm({
@@ -52400,6 +52535,7 @@ var init_src = __esm({
52400
52535
  init_profile();
52401
52536
  init_hosted_tiers();
52402
52537
  init_turn_preamble();
52538
+ init_one_liner();
52403
52539
  STATE_DIR = ".intentic";
52404
52540
  REFERENCE_DIR = "refs";
52405
52541
  GOOGLE_CLIENT_ID = "481795963975-cq9msl6higcd91joidrfp8mjlkuq5fk3.apps.googleusercontent.com";
@@ -52436,15 +52572,15 @@ var init_constants = __esm({
52436
52572
  ]);
52437
52573
  isSeparator = (char) => char === "/" || char === "\\";
52438
52574
  firstSegment = (relPath) => {
52439
- let start = 0;
52440
- while (isSeparator(relPath[start])) {
52441
- start++;
52575
+ let start2 = 0;
52576
+ while (isSeparator(relPath[start2])) {
52577
+ start2++;
52442
52578
  }
52443
- let end = start;
52579
+ let end = start2;
52444
52580
  while (end < relPath.length && !isSeparator(relPath[end])) {
52445
52581
  end++;
52446
52582
  }
52447
- return relPath.slice(start, end);
52583
+ return relPath.slice(start2, end);
52448
52584
  };
52449
52585
  isReferencePath = (relPath) => firstSegment(relPath) === REFERENCE_DIR;
52450
52586
  AGENT_WORKTREE_SEGMENTS = [".claude", "worktrees"];
@@ -52922,7 +53058,7 @@ function decodeTrieDict(input, resultLength, atomCount, dict1AtomCount, ngramCou
52922
53058
  const single = new Int32Array(slotCount);
52923
53059
  single.fill(-1, dict1AtomCount, dictSize);
52924
53060
  single.fill(-1, dictSize + dict2AtomCount, slotCount);
52925
- const start = new Int32Array(slotCount);
53061
+ const start2 = new Int32Array(slotCount);
52926
53062
  const length = new Int32Array(slotCount);
52927
53063
  function decodeDelta(count, off) {
52928
53064
  let previous = 0;
@@ -52958,7 +53094,7 @@ function decodeTrieDict(input, resultLength, atomCount, dict1AtomCount, ngramCou
52958
53094
  references[ngramIndex * 2] = a2;
52959
53095
  references[ngramIndex * 2 + 1] = b3;
52960
53096
  ngramIndex += 1;
52961
- start[slot] = poolSize;
53097
+ start2[slot] = poolSize;
52962
53098
  const entryLength = (single[a2] < 0 ? length[a2] : 1) + (single[b3] < 0 ? length[b3] : 1);
52963
53099
  length[slot] = entryLength;
52964
53100
  poolSize += entryLength;
@@ -52973,7 +53109,7 @@ function decodeTrieDict(input, resultLength, atomCount, dict1AtomCount, ngramCou
52973
53109
  const source = references[index * 2 + half];
52974
53110
  const value = single[source];
52975
53111
  if (value < 0) {
52976
- let read2 = start[source];
53112
+ let read2 = start2[source];
52977
53113
  const readEnd = read2 + length[source];
52978
53114
  while (read2 < readEnd)
52979
53115
  pool[write3++] = pool[read2++];
@@ -52991,7 +53127,7 @@ function decodeTrieDict(input, resultLength, atomCount, dict1AtomCount, ngramCou
52991
53127
  }
52992
53128
  const value = single[slot];
52993
53129
  if (value < 0) {
52994
- let read2 = start[slot];
53130
+ let read2 = start2[slot];
52995
53131
  const readEnd = read2 + length[slot];
52996
53132
  while (read2 < readEnd)
52997
53133
  out[outIndex++] = pool[read2++];
@@ -60779,17 +60915,17 @@ var init_markdown = __esm({
60779
60915
  };
60780
60916
  renderFlow = (nodes, options) => {
60781
60917
  const blocks = [];
60782
- let run5 = "";
60918
+ let run3 = "";
60783
60919
  const flush = () => {
60784
- const paragraph = collapse(run5);
60920
+ const paragraph = collapse(run3);
60785
60921
  if (paragraph !== "") {
60786
60922
  blocks.push(paragraph);
60787
60923
  }
60788
- run5 = "";
60924
+ run3 = "";
60789
60925
  };
60790
60926
  for (const node of nodes) {
60791
60927
  if (isText(node)) {
60792
- run5 += node.value;
60928
+ run3 += node.value;
60793
60929
  continue;
60794
60930
  }
60795
60931
  if (!isElement2(node) || NON_CONTENT2.has(node.tagName)) {
@@ -60797,7 +60933,7 @@ var init_markdown = __esm({
60797
60933
  }
60798
60934
  const block = renderBlock(node, options);
60799
60935
  if (block === void 0) {
60800
- run5 += renderInline(node, options);
60936
+ run3 += renderInline(node, options);
60801
60937
  } else {
60802
60938
  flush();
60803
60939
  if (block !== "") {
@@ -60916,11 +61052,11 @@ var init_markdown = __esm({
60916
61052
  };
60917
61053
  renderList = (el, options, depth) => {
60918
61054
  const ordered = el.tagName === "ol";
60919
- const start = Number(attr(el, "start") ?? "1");
61055
+ const start2 = Number(attr(el, "start") ?? "1");
60920
61056
  const items = el.childNodes.filter(isElement2).filter((child) => child.tagName === "li");
60921
61057
  const lines = [];
60922
61058
  items.forEach((item, index) => {
60923
- const marker = ordered ? `${start + index}. ` : "- ";
61059
+ const marker = ordered ? `${start2 + index}. ` : "- ";
60924
61060
  const indent = " ".repeat(depth);
60925
61061
  const nested = [];
60926
61062
  const inlineParts = [];
@@ -61045,6 +61181,273 @@ ${fence}`;
61045
61181
  }
61046
61182
  });
61047
61183
 
61184
+ // ../../_tools/base/src/async.ts
61185
+ var keyedLock, sleep;
61186
+ var init_async = __esm({
61187
+ "../../_tools/base/src/async.ts"() {
61188
+ "use strict";
61189
+ init_errors();
61190
+ keyedLock = () => {
61191
+ const tails = /* @__PURE__ */ new Map();
61192
+ return (key, task) => {
61193
+ const next = (tails.get(key) ?? Promise.resolve()).then(task, task);
61194
+ const tail = next.catch(() => void 0);
61195
+ tails.set(key, tail);
61196
+ void tail.then(() => {
61197
+ if (tails.get(key) === tail) {
61198
+ tails.delete(key);
61199
+ }
61200
+ });
61201
+ return next;
61202
+ };
61203
+ };
61204
+ sleep = (ms2, options) => new Promise((resolve7) => {
61205
+ const signal = options?.signal;
61206
+ if (signal?.aborted === true) {
61207
+ resolve7();
61208
+ return;
61209
+ }
61210
+ const done = () => {
61211
+ clearTimeout(timer);
61212
+ signal?.removeEventListener("abort", done);
61213
+ resolve7();
61214
+ };
61215
+ const timer = setTimeout(done, ms2);
61216
+ if (options?.unref === true) {
61217
+ timer.unref?.();
61218
+ }
61219
+ signal?.addEventListener("abort", done, { once: true });
61220
+ });
61221
+ }
61222
+ });
61223
+
61224
+ // ../../_tools/base/src/node/process.ts
61225
+ import { spawn, spawnSync } from "node:child_process";
61226
+ import { StringDecoder } from "node:string_decoder";
61227
+ var DEFAULT_MAX_OUTPUT, PIPE_QUIET_MS, PIPE_LINGER_MS, PIPE_POLL_MS, KILL_GRACE_MS, textCollector, delay, signalGroup, GROUP_POLL_MS, groupAlive, stopProcessTree, spawnOptions, start, stopperFor, drain, run2, runBounded, ProcessError, execBounded;
61228
+ var init_process = __esm({
61229
+ "../../_tools/base/src/node/process.ts"() {
61230
+ "use strict";
61231
+ init_async();
61232
+ init_errors();
61233
+ DEFAULT_MAX_OUTPUT = 8 * 1024 * 1024;
61234
+ PIPE_QUIET_MS = 1e3;
61235
+ PIPE_LINGER_MS = 5e3;
61236
+ PIPE_POLL_MS = 50;
61237
+ KILL_GRACE_MS = 2e3;
61238
+ textCollector = (maxOutput) => {
61239
+ const decoder5 = new StringDecoder("utf8");
61240
+ const half = Math.floor(maxOutput / 2);
61241
+ let head = "";
61242
+ let tail = "";
61243
+ let dropped = 0;
61244
+ const take = (text) => {
61245
+ const room = Math.max(half - head.length, 0);
61246
+ head += text.slice(0, room);
61247
+ tail += text.slice(room);
61248
+ if (tail.length > half) {
61249
+ dropped += tail.length - half;
61250
+ tail = tail.slice(-half);
61251
+ }
61252
+ };
61253
+ return {
61254
+ write: (chunk) => take(decoder5.write(chunk)),
61255
+ end: () => {
61256
+ take(decoder5.end());
61257
+ return { text: dropped === 0 ? `${head}${tail}` : `${head}
61258
+ \u2026 [${dropped} characters cut] \u2026
61259
+ ${tail}`, dropped };
61260
+ }
61261
+ };
61262
+ };
61263
+ delay = (ms2) => sleep(ms2, { unref: true });
61264
+ signalGroup = (pid, signal) => {
61265
+ try {
61266
+ process.kill(-pid, signal);
61267
+ } catch (error2) {
61268
+ if (errnoCode(error2) !== "ESRCH") {
61269
+ throw error2;
61270
+ }
61271
+ }
61272
+ };
61273
+ GROUP_POLL_MS = 25;
61274
+ groupAlive = (pid) => {
61275
+ try {
61276
+ process.kill(-pid, 0);
61277
+ return true;
61278
+ } catch (error2) {
61279
+ return errnoCode(error2) !== "ESRCH";
61280
+ }
61281
+ };
61282
+ stopProcessTree = async (child, killGraceMs = KILL_GRACE_MS) => {
61283
+ const pid = child.pid;
61284
+ if (pid === void 0) {
61285
+ return;
61286
+ }
61287
+ if (process.platform === "win32") {
61288
+ await new Promise((resolve7) => {
61289
+ spawn("taskkill", ["/pid", String(pid), "/T", "/F"], { stdio: "ignore", windowsHide: true }).once("exit", () => resolve7()).once("error", () => resolve7());
61290
+ });
61291
+ child.kill();
61292
+ return;
61293
+ }
61294
+ signalGroup(pid, "SIGTERM");
61295
+ const until = Date.now() + killGraceMs;
61296
+ while (groupAlive(pid) && Date.now() < until) {
61297
+ await delay(GROUP_POLL_MS);
61298
+ }
61299
+ signalGroup(pid, "SIGKILL");
61300
+ };
61301
+ spawnOptions = (options) => {
61302
+ const spawned = {
61303
+ stdio: [options.input === void 0 ? "ignore" : "pipe", "pipe", "pipe"],
61304
+ // A process group of its own, which a deadline ends whole. On Windows this would open a console window
61305
+ // instead, and taskkill /T finds the tree without one.
61306
+ detached: process.platform !== "win32",
61307
+ windowsHide: true
61308
+ };
61309
+ if (options.cwd !== void 0) {
61310
+ spawned.cwd = options.cwd;
61311
+ }
61312
+ if (options.env !== void 0) {
61313
+ spawned.env = options.env;
61314
+ }
61315
+ return spawned;
61316
+ };
61317
+ start = (command, args, options) => {
61318
+ try {
61319
+ return spawn(command, [...args], spawnOptions(options));
61320
+ } catch (error2) {
61321
+ return error2 instanceof Error ? error2 : new Error(String(error2));
61322
+ }
61323
+ };
61324
+ stopperFor = (child, options) => {
61325
+ let stopping;
61326
+ let timedOut = false;
61327
+ let aborted = false;
61328
+ const stop = () => {
61329
+ stopping ??= stopProcessTree(child, options.killGraceMs);
61330
+ };
61331
+ const deadline = options.timeoutMs === void 0 ? void 0 : setTimeout(() => {
61332
+ timedOut = true;
61333
+ stop();
61334
+ }, options.timeoutMs);
61335
+ const onAbort = () => {
61336
+ aborted = true;
61337
+ stop();
61338
+ };
61339
+ options.signal?.addEventListener("abort", onAbort, { once: true });
61340
+ return {
61341
+ timedOut: () => timedOut,
61342
+ aborted: () => aborted,
61343
+ stopped: async () => {
61344
+ await stopping;
61345
+ },
61346
+ dispose: () => {
61347
+ clearTimeout(deadline);
61348
+ options.signal?.removeEventListener("abort", onAbort);
61349
+ }
61350
+ };
61351
+ };
61352
+ drain = async (child, closed, lastData) => {
61353
+ const exitedAt = Date.now();
61354
+ for (; ; ) {
61355
+ if (await Promise.race([closed, delay(PIPE_POLL_MS).then(() => false)])) {
61356
+ return true;
61357
+ }
61358
+ const now = Date.now();
61359
+ if (now - lastData() >= PIPE_QUIET_MS || now - exitedAt >= PIPE_LINGER_MS) {
61360
+ child.stdout?.destroy();
61361
+ child.stderr?.destroy();
61362
+ return false;
61363
+ }
61364
+ }
61365
+ };
61366
+ run2 = async (command, args, options, stdout) => {
61367
+ const stderr = textCollector(options.maxOutput ?? DEFAULT_MAX_OUTPUT);
61368
+ const failed = (spawnError, aborted) => ({
61369
+ exitCode: null,
61370
+ exitSignal: null,
61371
+ stdout: stdout.end(),
61372
+ stderr: stderr.end(),
61373
+ timedOut: false,
61374
+ aborted,
61375
+ lingering: false,
61376
+ spawnError
61377
+ });
61378
+ if (options.signal?.aborted === true) {
61379
+ return failed(new Error(`${command} was not started: the call was aborted`), true);
61380
+ }
61381
+ const child = start(command, args, options);
61382
+ if (child instanceof Error) {
61383
+ return failed(child, false);
61384
+ }
61385
+ options.onSpawn?.(child);
61386
+ let lastData = Date.now();
61387
+ const heard = (sink) => (chunk) => {
61388
+ lastData = Date.now();
61389
+ sink.write(chunk);
61390
+ };
61391
+ child.stdout?.on("data", heard(stdout));
61392
+ child.stderr?.on("data", heard(stderr));
61393
+ if (options.input !== void 0 && child.stdin !== null) {
61394
+ child.stdin.on("error", () => void 0);
61395
+ child.stdin.end(options.input);
61396
+ }
61397
+ const closed = new Promise((resolve7) => child.once("close", () => resolve7(true)));
61398
+ const stopper = stopperFor(child, options);
61399
+ const ended = await new Promise((resolve7) => {
61400
+ child.once("exit", (code, signal) => resolve7({ code, signal }));
61401
+ child.once("error", (error2) => resolve7(error2));
61402
+ });
61403
+ stopper.dispose();
61404
+ if (ended instanceof Error) {
61405
+ return failed(ended, stopper.aborted());
61406
+ }
61407
+ await stopper.stopped();
61408
+ const drained = await drain(child, closed, () => lastData);
61409
+ return {
61410
+ exitCode: ended.code,
61411
+ exitSignal: ended.signal,
61412
+ stdout: stdout.end(),
61413
+ stderr: stderr.end(),
61414
+ timedOut: stopper.timedOut(),
61415
+ aborted: stopper.aborted(),
61416
+ lingering: !drained
61417
+ };
61418
+ };
61419
+ runBounded = async (command, args, options = {}) => await run2(command, args, options, textCollector(options.maxOutput ?? DEFAULT_MAX_OUTPUT));
61420
+ ProcessError = class extends Error {
61421
+ code;
61422
+ killed;
61423
+ signal;
61424
+ stdout;
61425
+ stderr;
61426
+ timedOut;
61427
+ constructor(command, args, result) {
61428
+ const line2 = [command, ...args].join(" ");
61429
+ const reason = result.spawnError !== void 0 ? result.spawnError.message : result.timedOut ? "it ran past its deadline and was stopped" : result.aborted ? "it was aborted" : `exit ${result.exitCode ?? result.exitSignal ?? "unknown"}`;
61430
+ super(`Command failed: ${line2} (${reason})${result.stderr.text.trim() === "" ? "" : `
61431
+ ${result.stderr.text.trimEnd()}`}`, result.spawnError === void 0 ? {} : { cause: result.spawnError });
61432
+ this.name = "ProcessError";
61433
+ this.code = result.spawnError !== void 0 ? errnoCode(result.spawnError) : result.exitCode ?? void 0;
61434
+ this.killed = result.timedOut || result.aborted;
61435
+ this.signal = result.exitSignal;
61436
+ this.stdout = result.stdout.text;
61437
+ this.stderr = result.stderr.text;
61438
+ this.timedOut = result.timedOut;
61439
+ }
61440
+ };
61441
+ execBounded = async (command, args, options = {}) => {
61442
+ const result = await runBounded(command, args, options);
61443
+ if (result.exitCode !== 0) {
61444
+ throw new ProcessError(command, args, result);
61445
+ }
61446
+ return { stdout: result.stdout.text, stderr: result.stderr.text };
61447
+ };
61448
+ }
61449
+ });
61450
+
61048
61451
  // ../fileq/src/lib/tools.ts
61049
61452
  import { accessSync, constants } from "node:fs";
61050
61453
  import { join as join2 } from "node:path";
@@ -61067,15 +61470,13 @@ var init_tools = __esm({
61067
61470
  });
61068
61471
 
61069
61472
  // ../fileq/src/lib/archives.ts
61070
- import { execFile } from "node:child_process";
61071
- import { promisify } from "node:util";
61072
- var run2, zipEntries, BLOCK, decoder2, field, octal, headerChecks, looksLikeTar, paxPath, blockAt, NAME_CARRIERS, carriedName, entryOf, tarEntries, gzipName, gzipHead, tarOnPath, LISTING_LINE, parseTarListing, TAR_TIMEOUT_MS, TAR_MAX_BUFFER, listWithTar;
61473
+ var zipEntries, BLOCK, decoder2, field, octal, headerChecks, looksLikeTar, paxPath, blockAt, NAME_CARRIERS, carriedName, entryOf, tarEntries, gzipName, gzipHead, tarOnPath, LISTING_LINE, parseTarListing, TAR_TIMEOUT_MS, TAR_MAX_OUTPUT, listWithTar;
61073
61474
  var init_archives = __esm({
61074
61475
  "../fileq/src/lib/archives.ts"() {
61075
61476
  "use strict";
61477
+ init_process();
61076
61478
  init_esm();
61077
61479
  init_tools();
61078
- run2 = promisify(execFile);
61079
61480
  zipEntries = (bytes) => {
61080
61481
  const entries = [];
61081
61482
  unzipSync(bytes, {
@@ -61198,9 +61599,9 @@ var init_archives = __esm({
61198
61599
  return entries;
61199
61600
  };
61200
61601
  TAR_TIMEOUT_MS = 6e4;
61201
- TAR_MAX_BUFFER = 16 * 1024 * 1024;
61602
+ TAR_MAX_OUTPUT = 16 * 1024 * 1024;
61202
61603
  listWithTar = async (absPath) => {
61203
- const { stdout } = await run2("tar", ["-tvf", absPath], { timeout: TAR_TIMEOUT_MS, maxBuffer: TAR_MAX_BUFFER });
61604
+ const { stdout } = await execBounded("tar", ["-tvf", absPath], { timeoutMs: TAR_TIMEOUT_MS, maxOutput: TAR_MAX_OUTPUT });
61204
61605
  return parseTarListing(stdout);
61205
61606
  };
61206
61607
  }
@@ -61913,7 +62314,7 @@ var require_underscore_node_f = __commonJS({
61913
62314
  "\u2028": "u2028",
61914
62315
  "\u2029": "u2029"
61915
62316
  };
61916
- var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
62317
+ var escapeRegExp2 = /\\|'|\r|\n|\u2028|\u2029/g;
61917
62318
  function escapeChar(match) {
61918
62319
  return "\\" + escapes[match];
61919
62320
  }
@@ -61929,7 +62330,7 @@ var require_underscore_node_f = __commonJS({
61929
62330
  var index = 0;
61930
62331
  var source = "__p+='";
61931
62332
  text.replace(matcher2, function(match, escape2, interpolate, evaluate, offset) {
61932
- source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
62333
+ source += text.slice(index, offset).replace(escapeRegExp2, escapeChar);
61933
62334
  index = offset + match.length;
61934
62335
  if (escape2) {
61935
62336
  source += "'+\n((__t=(" + escape2 + "))==null?'':_.escape(__t))+\n'";
@@ -62065,12 +62466,12 @@ var require_underscore_node_f = __commonJS({
62065
62466
  memoize2.cache = {};
62066
62467
  return memoize2;
62067
62468
  }
62068
- var delay = restArguments(function(func, wait, args) {
62469
+ var delay2 = restArguments(function(func, wait, args) {
62069
62470
  return setTimeout(function() {
62070
62471
  return func.apply(null, args);
62071
62472
  }, wait);
62072
62473
  });
62073
- var defer = partial(delay, _$1, 1);
62474
+ var defer = partial(delay2, _$1, 1);
62074
62475
  function throttle(func, wait, options) {
62075
62476
  var timeout, context, args, result2;
62076
62477
  var previous = 0;
@@ -62145,10 +62546,10 @@ var require_underscore_node_f = __commonJS({
62145
62546
  }
62146
62547
  function compose() {
62147
62548
  var args = arguments;
62148
- var start = args.length - 1;
62549
+ var start2 = args.length - 1;
62149
62550
  return function() {
62150
- var i3 = start;
62151
- var result2 = args[start].apply(this, arguments);
62551
+ var i3 = start2;
62552
+ var result2 = args[start2].apply(this, arguments);
62152
62553
  while (i3--) result2 = args[i3].call(this, result2);
62153
62554
  return result2;
62154
62555
  };
@@ -62590,18 +62991,18 @@ var require_underscore_node_f = __commonJS({
62590
62991
  }
62591
62992
  return result2;
62592
62993
  }
62593
- function range(start, stop, step) {
62994
+ function range(start2, stop, step) {
62594
62995
  if (stop == null) {
62595
- stop = start || 0;
62596
- start = 0;
62996
+ stop = start2 || 0;
62997
+ start2 = 0;
62597
62998
  }
62598
62999
  if (!step) {
62599
- step = stop < start ? -1 : 1;
63000
+ step = stop < start2 ? -1 : 1;
62600
63001
  }
62601
- var length = Math.max(Math.ceil((stop - start) / step), 0);
63002
+ var length = Math.max(Math.ceil((stop - start2) / step), 0);
62602
63003
  var range2 = Array(length);
62603
- for (var idx = 0; idx < length; idx++, start += step) {
62604
- range2[idx] = start;
63004
+ for (var idx = 0; idx < length; idx++, start2 += step) {
63005
+ range2[idx] = start2;
62605
63006
  }
62606
63007
  return range2;
62607
63008
  }
@@ -62719,7 +63120,7 @@ var require_underscore_node_f = __commonJS({
62719
63120
  bind,
62720
63121
  bindAll,
62721
63122
  memoize,
62722
- delay,
63123
+ delay: delay2,
62723
63124
  defer,
62724
63125
  throttle,
62725
63126
  debounce,
@@ -62821,7 +63222,7 @@ var require_underscore_node_f = __commonJS({
62821
63222
  exports2.debounce = debounce;
62822
63223
  exports2.defaults = defaults;
62823
63224
  exports2.defer = defer;
62824
- exports2.delay = delay;
63225
+ exports2.delay = delay2;
62825
63226
  exports2.difference = difference;
62826
63227
  exports2.each = each;
62827
63228
  exports2.every = every;
@@ -62991,14 +63392,14 @@ var require_promises = __commonJS({
62991
63392
  }
62992
63393
  };
62993
63394
  function defer() {
62994
- var resolve6;
63395
+ var resolve7;
62995
63396
  var reject;
62996
63397
  var promise = new Promise(function(resolveArg, rejectArg) {
62997
- resolve6 = resolveArg;
63398
+ resolve7 = resolveArg;
62998
63399
  reject = rejectArg;
62999
63400
  });
63000
63401
  return {
63001
- resolve: resolve6,
63402
+ resolve: resolve7,
63002
63403
  reject,
63003
63404
  promise
63004
63405
  };
@@ -63010,8 +63411,8 @@ var require_promises = __commonJS({
63010
63411
  }
63011
63412
  ExternalPromise.__proto__ = Promise;
63012
63413
  ExternalPromise.prototype.__proto__ = Promise.prototype;
63013
- ExternalPromise.prototype.done = function(resolve6, reject) {
63014
- return this.then(resolve6, reject).catch(function(error2) {
63414
+ ExternalPromise.prototype.done = function(resolve7, reject) {
63415
+ return this.then(resolve7, reject).catch(function(error2) {
63015
63416
  if (isNode3()) {
63016
63417
  var stack = error2 instanceof Error ? error2.stack : error2;
63017
63418
  process.stderr.write("Fatal " + stack + "\n");
@@ -63402,10 +63803,10 @@ var require_base64_js = __commonJS({
63402
63803
  function tripletToBase64(num) {
63403
63804
  return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
63404
63805
  }
63405
- function encodeChunk(uint8, start, end) {
63806
+ function encodeChunk(uint8, start2, end) {
63406
63807
  var tmp;
63407
63808
  var output = [];
63408
- for (var i4 = start; i4 < end; i4 += 3) {
63809
+ for (var i4 = start2; i4 < end; i4 += 3) {
63409
63810
  tmp = (uint8[i4] << 16 & 16711680) + (uint8[i4 + 1] << 8 & 65280) + (uint8[i4 + 2] & 255);
63410
63811
  output.push(tripletToBase64(tmp));
63411
63812
  }
@@ -63514,15 +63915,15 @@ var require_safe_buffer = __commonJS({
63514
63915
  copyProps(buffer, exports2);
63515
63916
  exports2.Buffer = SafeBuffer;
63516
63917
  }
63517
- function SafeBuffer(arg, encodingOrOffset, length) {
63518
- return Buffer2(arg, encodingOrOffset, length);
63918
+ function SafeBuffer(arg2, encodingOrOffset, length) {
63919
+ return Buffer2(arg2, encodingOrOffset, length);
63519
63920
  }
63520
63921
  copyProps(Buffer2, SafeBuffer);
63521
- SafeBuffer.from = function(arg, encodingOrOffset, length) {
63522
- if (typeof arg === "number") {
63922
+ SafeBuffer.from = function(arg2, encodingOrOffset, length) {
63923
+ if (typeof arg2 === "number") {
63523
63924
  throw new TypeError("Argument must not be a number");
63524
63925
  }
63525
- return Buffer2(arg, encodingOrOffset, length);
63926
+ return Buffer2(arg2, encodingOrOffset, length);
63526
63927
  };
63527
63928
  SafeBuffer.alloc = function(size, fill, encoding) {
63528
63929
  if (typeof size !== "number") {
@@ -63558,47 +63959,47 @@ var require_safe_buffer = __commonJS({
63558
63959
  // ../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js
63559
63960
  var require_util = __commonJS({
63560
63961
  "../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"(exports2) {
63561
- function isArray(arg) {
63962
+ function isArray(arg2) {
63562
63963
  if (Array.isArray) {
63563
- return Array.isArray(arg);
63964
+ return Array.isArray(arg2);
63564
63965
  }
63565
- return objectToString2(arg) === "[object Array]";
63966
+ return objectToString2(arg2) === "[object Array]";
63566
63967
  }
63567
63968
  exports2.isArray = isArray;
63568
- function isBoolean(arg) {
63569
- return typeof arg === "boolean";
63969
+ function isBoolean(arg2) {
63970
+ return typeof arg2 === "boolean";
63570
63971
  }
63571
63972
  exports2.isBoolean = isBoolean;
63572
- function isNull(arg) {
63573
- return arg === null;
63973
+ function isNull(arg2) {
63974
+ return arg2 === null;
63574
63975
  }
63575
63976
  exports2.isNull = isNull;
63576
- function isNullOrUndefined(arg) {
63577
- return arg == null;
63977
+ function isNullOrUndefined(arg2) {
63978
+ return arg2 == null;
63578
63979
  }
63579
63980
  exports2.isNullOrUndefined = isNullOrUndefined;
63580
- function isNumber2(arg) {
63581
- return typeof arg === "number";
63981
+ function isNumber2(arg2) {
63982
+ return typeof arg2 === "number";
63582
63983
  }
63583
63984
  exports2.isNumber = isNumber2;
63584
- function isString(arg) {
63585
- return typeof arg === "string";
63985
+ function isString(arg2) {
63986
+ return typeof arg2 === "string";
63586
63987
  }
63587
63988
  exports2.isString = isString;
63588
- function isSymbol(arg) {
63589
- return typeof arg === "symbol";
63989
+ function isSymbol(arg2) {
63990
+ return typeof arg2 === "symbol";
63590
63991
  }
63591
63992
  exports2.isSymbol = isSymbol;
63592
- function isUndefined(arg) {
63593
- return arg === void 0;
63993
+ function isUndefined(arg2) {
63994
+ return arg2 === void 0;
63594
63995
  }
63595
63996
  exports2.isUndefined = isUndefined;
63596
63997
  function isRegExp(re2) {
63597
63998
  return objectToString2(re2) === "[object RegExp]";
63598
63999
  }
63599
64000
  exports2.isRegExp = isRegExp;
63600
- function isObject2(arg) {
63601
- return typeof arg === "object" && arg !== null;
64001
+ function isObject2(arg2) {
64002
+ return typeof arg2 === "object" && arg2 !== null;
63602
64003
  }
63603
64004
  exports2.isObject = isObject2;
63604
64005
  function isDate(d2) {
@@ -63609,13 +64010,13 @@ var require_util = __commonJS({
63609
64010
  return objectToString2(e2) === "[object Error]" || e2 instanceof Error;
63610
64011
  }
63611
64012
  exports2.isError = isError2;
63612
- function isFunction(arg) {
63613
- return typeof arg === "function";
64013
+ function isFunction(arg2) {
64014
+ return typeof arg2 === "function";
63614
64015
  }
63615
64016
  exports2.isFunction = isFunction;
63616
- function isPrimitive2(arg) {
63617
- return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
63618
- typeof arg === "undefined";
64017
+ function isPrimitive2(arg2) {
64018
+ return arg2 === null || typeof arg2 === "boolean" || typeof arg2 === "number" || typeof arg2 === "string" || typeof arg2 === "symbol" || // ES6 symbol
64019
+ typeof arg2 === "undefined";
63619
64020
  }
63620
64021
  exports2.isPrimitive = isPrimitive2;
63621
64022
  exports2.isBuffer = __require("buffer").Buffer.isBuffer;
@@ -63717,7 +64118,7 @@ var require_BufferList = __commonJS({
63717
64118
  this.head = this.tail = null;
63718
64119
  this.length = 0;
63719
64120
  };
63720
- BufferList.prototype.join = function join9(s2) {
64121
+ BufferList.prototype.join = function join10(s2) {
63721
64122
  if (this.length === 0) return "";
63722
64123
  var p2 = this.head;
63723
64124
  var ret2 = "" + p2.data;
@@ -64398,8 +64799,8 @@ var require_string_decoder = __commonJS({
64398
64799
  if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc);
64399
64800
  return nenc || enc;
64400
64801
  }
64401
- exports2.StringDecoder = StringDecoder;
64402
- function StringDecoder(encoding) {
64802
+ exports2.StringDecoder = StringDecoder2;
64803
+ function StringDecoder2(encoding) {
64403
64804
  this.encoding = normalizeEncoding(encoding);
64404
64805
  var nb;
64405
64806
  switch (this.encoding) {
@@ -64426,7 +64827,7 @@ var require_string_decoder = __commonJS({
64426
64827
  this.lastTotal = 0;
64427
64828
  this.lastChar = Buffer2.allocUnsafe(nb);
64428
64829
  }
64429
- StringDecoder.prototype.write = function(buf) {
64830
+ StringDecoder2.prototype.write = function(buf) {
64430
64831
  if (buf.length === 0) return "";
64431
64832
  var r2;
64432
64833
  var i3;
@@ -64441,9 +64842,9 @@ var require_string_decoder = __commonJS({
64441
64842
  if (i3 < buf.length) return r2 ? r2 + this.text(buf, i3) : this.text(buf, i3);
64442
64843
  return r2 || "";
64443
64844
  };
64444
- StringDecoder.prototype.end = utf8End;
64445
- StringDecoder.prototype.text = utf8Text;
64446
- StringDecoder.prototype.fillLast = function(buf) {
64845
+ StringDecoder2.prototype.end = utf8End;
64846
+ StringDecoder2.prototype.text = utf8Text;
64847
+ StringDecoder2.prototype.fillLast = function(buf) {
64447
64848
  if (this.lastNeed <= buf.length) {
64448
64849
  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
64449
64850
  return this.lastChar.toString(this.encoding, 0, this.lastTotal);
@@ -64615,7 +65016,7 @@ var require_stream_readable = __commonJS({
64615
65016
  }
64616
65017
  var BufferList = require_BufferList();
64617
65018
  var destroyImpl = require_destroy();
64618
- var StringDecoder;
65019
+ var StringDecoder2;
64619
65020
  util.inherits(Readable, Stream2);
64620
65021
  var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
64621
65022
  function prependListener(emitter, event, fn2) {
@@ -64657,8 +65058,8 @@ var require_stream_readable = __commonJS({
64657
65058
  this.decoder = null;
64658
65059
  this.encoding = null;
64659
65060
  if (options.encoding) {
64660
- if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder;
64661
- this.decoder = new StringDecoder(options.encoding);
65061
+ if (!StringDecoder2) StringDecoder2 = require_string_decoder().StringDecoder;
65062
+ this.decoder = new StringDecoder2(options.encoding);
64662
65063
  this.encoding = options.encoding;
64663
65064
  }
64664
65065
  }
@@ -64774,8 +65175,8 @@ var require_stream_readable = __commonJS({
64774
65175
  return this._readableState.flowing === false;
64775
65176
  };
64776
65177
  Readable.prototype.setEncoding = function(enc) {
64777
- if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder;
64778
- this._readableState.decoder = new StringDecoder(enc);
65178
+ if (!StringDecoder2) StringDecoder2 = require_string_decoder().StringDecoder;
65179
+ this._readableState.decoder = new StringDecoder2(enc);
64779
65180
  this._readableState.encoding = enc;
64780
65181
  return this;
64781
65182
  };
@@ -65692,8 +66093,8 @@ var require_lib2 = __commonJS({
65692
66093
  return this;
65693
66094
  }
65694
66095
  var p2 = this.constructor;
65695
- return this.then(resolve7, reject2);
65696
- function resolve7(value) {
66096
+ return this.then(resolve8, reject2);
66097
+ function resolve8(value) {
65697
66098
  function yes() {
65698
66099
  return value;
65699
66100
  }
@@ -65846,8 +66247,8 @@ var require_lib2 = __commonJS({
65846
66247
  }
65847
66248
  return out;
65848
66249
  }
65849
- Promise2.resolve = resolve6;
65850
- function resolve6(value) {
66250
+ Promise2.resolve = resolve7;
66251
+ function resolve7(value) {
65851
66252
  if (value instanceof this) {
65852
66253
  return value;
65853
66254
  }
@@ -65972,7 +66373,7 @@ var require_setImmediate = __commonJS({
65972
66373
  function clearImmediate(handle) {
65973
66374
  delete tasksByHandle[handle];
65974
66375
  }
65975
- function run5(task) {
66376
+ function run3(task) {
65976
66377
  var callback = task.callback;
65977
66378
  var args = task.args;
65978
66379
  switch (args.length) {
@@ -66001,7 +66402,7 @@ var require_setImmediate = __commonJS({
66001
66402
  if (task) {
66002
66403
  currentlyRunningATask = true;
66003
66404
  try {
66004
- run5(task);
66405
+ run3(task);
66005
66406
  } finally {
66006
66407
  clearImmediate(handle);
66007
66408
  currentlyRunningATask = false;
@@ -66382,10 +66783,10 @@ var require_utils = __commonJS({
66382
66783
  if (typeof Blob.prototype.arrayBuffer !== "undefined") {
66383
66784
  return data.arrayBuffer();
66384
66785
  } else if (typeof FileReader !== "undefined") {
66385
- return new external.Promise(function(resolve6, reject) {
66786
+ return new external.Promise(function(resolve7, reject) {
66386
66787
  var reader = new FileReader();
66387
66788
  reader.onload = function(e2) {
66388
- resolve6(e2.target.result);
66789
+ resolve7(e2.target.result);
66389
66790
  };
66390
66791
  reader.onerror = function(e2) {
66391
66792
  reject(e2.target.error);
@@ -66512,10 +66913,10 @@ var require_GenericWorker = __commonJS({
66512
66913
  * @param {String} name the name of the event (data, end, error)
66513
66914
  * @param {Object} arg the argument to call the callback with.
66514
66915
  */
66515
- emit: function(name, arg) {
66916
+ emit: function(name, arg2) {
66516
66917
  if (this._listeners[name]) {
66517
66918
  for (var i3 = 0; i3 < this._listeners[name].length; i3++) {
66518
- this._listeners[name][i3].call(this, arg);
66919
+ this._listeners[name][i3].call(this, arg2);
66519
66920
  }
66520
66921
  }
66521
66922
  },
@@ -66944,7 +67345,7 @@ var require_StreamHelper = __commonJS({
66944
67345
  }
66945
67346
  }
66946
67347
  function accumulate(helper, updateCallback) {
66947
- return new external.Promise(function(resolve6, reject) {
67348
+ return new external.Promise(function(resolve7, reject) {
66948
67349
  var dataArray = [];
66949
67350
  var chunkType = helper._internalType, resultType = helper._outputType, mimeType = helper._mimeType;
66950
67351
  helper.on("data", function(data, meta) {
@@ -66958,7 +67359,7 @@ var require_StreamHelper = __commonJS({
66958
67359
  }).on("end", function() {
66959
67360
  try {
66960
67361
  var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);
66961
- resolve6(result);
67362
+ resolve7(result);
66962
67363
  } catch (e2) {
66963
67364
  reject(e2);
66964
67365
  }
@@ -68317,7 +68718,7 @@ var require_deflate = __commonJS({
68317
68718
  s2.pending_buf[s2.pending++] = b3 >>> 8 & 255;
68318
68719
  s2.pending_buf[s2.pending++] = b3 & 255;
68319
68720
  }
68320
- function read_buf(strm, buf, start, size) {
68721
+ function read_buf(strm, buf, start2, size) {
68321
68722
  var len = strm.avail_in;
68322
68723
  if (len > size) {
68323
68724
  len = size;
@@ -68326,11 +68727,11 @@ var require_deflate = __commonJS({
68326
68727
  return 0;
68327
68728
  }
68328
68729
  strm.avail_in -= len;
68329
- utils.arraySet(buf, strm.input, strm.next_in, len, start);
68730
+ utils.arraySet(buf, strm.input, strm.next_in, len, start2);
68330
68731
  if (strm.state.wrap === 1) {
68331
- strm.adler = adler32(strm.adler, buf, len, start);
68732
+ strm.adler = adler32(strm.adler, buf, len, start2);
68332
68733
  } else if (strm.state.wrap === 2) {
68333
- strm.adler = crc32(strm.adler, buf, len, start);
68734
+ strm.adler = crc32(strm.adler, buf, len, start2);
68334
68735
  }
68335
68736
  strm.next_in += len;
68336
68737
  strm.total_in += len;
@@ -69600,7 +70001,7 @@ var require_inffast = __commonJS({
69600
70001
  "use strict";
69601
70002
  var BAD = 30;
69602
70003
  var TYPE = 12;
69603
- module2.exports = function inflate_fast(strm, start) {
70004
+ module2.exports = function inflate_fast(strm, start2) {
69604
70005
  var state;
69605
70006
  var _in;
69606
70007
  var last;
@@ -69631,7 +70032,7 @@ var require_inffast = __commonJS({
69631
70032
  last = _in + (strm.avail_in - 5);
69632
70033
  _out = strm.next_out;
69633
70034
  output = strm.output;
69634
- beg = _out - (start - strm.avail_out);
70035
+ beg = _out - (start2 - strm.avail_out);
69635
70036
  end = _out + (strm.avail_out - 257);
69636
70037
  dmax = state.dmax;
69637
70038
  wsize = state.wsize;
@@ -72267,16 +72668,16 @@ var require_object = __commonJS({
72267
72668
  * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders.
72268
72669
  * @return {JSZip} an object with the new directory as the root, or an array containing matching folders.
72269
72670
  */
72270
- folder: function(arg) {
72271
- if (!arg) {
72671
+ folder: function(arg2) {
72672
+ if (!arg2) {
72272
72673
  return this;
72273
72674
  }
72274
- if (isRegExp(arg)) {
72675
+ if (isRegExp(arg2)) {
72275
72676
  return this.filter(function(relativePath, file) {
72276
- return file.dir && arg.test(relativePath);
72677
+ return file.dir && arg2.test(relativePath);
72277
72678
  });
72278
72679
  }
72279
- var name = this.root + arg;
72680
+ var name = this.root + arg2;
72280
72681
  var newFolder = folderAdd.call(this, name);
72281
72682
  var ret2 = this.clone();
72282
72683
  ret2.root = newFolder.name;
@@ -73071,7 +73472,7 @@ var require_load = __commonJS({
73071
73472
  var Crc32Probe = require_Crc32Probe();
73072
73473
  var nodejsUtils = require_nodejsUtils();
73073
73474
  function checkEntryCRC32(zipEntry) {
73074
- return new external.Promise(function(resolve6, reject) {
73475
+ return new external.Promise(function(resolve7, reject) {
73075
73476
  var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());
73076
73477
  worker.on("error", function(e2) {
73077
73478
  reject(e2);
@@ -73079,7 +73480,7 @@ var require_load = __commonJS({
73079
73480
  if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {
73080
73481
  reject(new Error("Corrupted zip : CRC32 mismatch"));
73081
73482
  } else {
73082
- resolve6();
73483
+ resolve7();
73083
73484
  }
73084
73485
  }).resume();
73085
73486
  });
@@ -74640,9 +75041,9 @@ var require_dom = __commonJS({
74640
75041
  this.replaceData(offset, count, "");
74641
75042
  },
74642
75043
  replaceData: function(offset, count, text) {
74643
- var start = this.data.substring(0, offset);
75044
+ var start2 = this.data.substring(0, offset);
74644
75045
  var end = this.data.substring(offset + count);
74645
- text = start + text + end;
75046
+ text = start2 + text + end;
74646
75047
  this.nodeValue = this.data = text;
74647
75048
  this.length = text.length;
74648
75049
  }
@@ -77285,11 +77686,11 @@ var require_sax = __commonJS({
77285
77686
  }
77286
77687
  }
77287
77688
  function appendText2(end2) {
77288
- if (end2 > start) {
77289
- var xt2 = source.substring(start, end2).replace(/&#?\w+;/g, entityReplacer);
77290
- locator && position(start);
77291
- domBuilder.characters(xt2, 0, end2 - start);
77292
- start = end2;
77689
+ if (end2 > start2) {
77690
+ var xt2 = source.substring(start2, end2).replace(/&#?\w+;/g, entityReplacer);
77691
+ locator && position(start2);
77692
+ domBuilder.characters(xt2, 0, end2 - start2);
77693
+ start2 = end2;
77293
77694
  }
77294
77695
  }
77295
77696
  function position(p2, m2) {
@@ -77306,20 +77707,20 @@ var require_sax = __commonJS({
77306
77707
  var locator = domBuilder.locator;
77307
77708
  var parseStack = [{ currentNSMap: defaultNSMapCopy }];
77308
77709
  var closeMap = {};
77309
- var start = 0;
77710
+ var start2 = 0;
77310
77711
  while (true) {
77311
77712
  try {
77312
- var tagStart = source.indexOf("<", start);
77713
+ var tagStart = source.indexOf("<", start2);
77313
77714
  if (tagStart < 0) {
77314
- if (!source.substr(start).match(/^\s*$/)) {
77715
+ if (!source.substr(start2).match(/^\s*$/)) {
77315
77716
  var doc = domBuilder.doc;
77316
- var text = doc.createTextNode(source.substr(start));
77717
+ var text = doc.createTextNode(source.substr(start2));
77317
77718
  doc.appendChild(text);
77318
77719
  domBuilder.currentElement = text;
77319
77720
  }
77320
77721
  return;
77321
77722
  }
77322
- if (tagStart > start) {
77723
+ if (tagStart > start2) {
77323
77724
  appendText2(tagStart);
77324
77725
  }
77325
77726
  switch (source.charAt(tagStart + 1)) {
@@ -77409,10 +77810,10 @@ var require_sax = __commonJS({
77409
77810
  errorHandler.error("element parse error: " + e2);
77410
77811
  end = -1;
77411
77812
  }
77412
- if (end > start) {
77413
- start = end;
77813
+ if (end > start2) {
77814
+ start2 = end;
77414
77815
  } else {
77415
- appendText2(Math.max(tagStart, start) + 1);
77816
+ appendText2(Math.max(tagStart, start2) + 1);
77416
77817
  }
77417
77818
  }
77418
77819
  }
@@ -77421,7 +77822,7 @@ var require_sax = __commonJS({
77421
77822
  t2.columnNumber = f2.columnNumber;
77422
77823
  return t2;
77423
77824
  }
77424
- function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler) {
77825
+ function parseElementStartPart(source, start2, el, currentNSMap, entityReplacer, errorHandler) {
77425
77826
  function addAttribute(qname, value2, startIndex) {
77426
77827
  if (el.attributeNames.hasOwnProperty(qname)) {
77427
77828
  errorHandler.fatalError("Attribute " + qname + " redefined");
@@ -77438,17 +77839,17 @@ var require_sax = __commonJS({
77438
77839
  }
77439
77840
  var attrName;
77440
77841
  var value;
77441
- var p2 = ++start;
77842
+ var p2 = ++start2;
77442
77843
  var s2 = S_TAG;
77443
77844
  while (true) {
77444
77845
  var c2 = source.charAt(p2);
77445
77846
  if (s2 === S_TAG && c2 === "<") {
77446
- throw new Error("unexpected < in tag name: " + source.slice(start, p2));
77847
+ throw new Error("unexpected < in tag name: " + source.slice(start2, p2));
77447
77848
  }
77448
77849
  switch (c2) {
77449
77850
  case "=":
77450
77851
  if (s2 === S_ATTR) {
77451
- attrName = source.slice(start, p2);
77852
+ attrName = source.slice(start2, p2);
77452
77853
  s2 = S_EQ;
77453
77854
  } else if (s2 === S_ATTR_SPACE) {
77454
77855
  s2 = S_EQ;
@@ -77461,22 +77862,22 @@ var require_sax = __commonJS({
77461
77862
  if (s2 === S_EQ || s2 === S_ATTR) {
77462
77863
  if (s2 === S_ATTR) {
77463
77864
  errorHandler.warning('attribute value must after "="');
77464
- attrName = source.slice(start, p2);
77865
+ attrName = source.slice(start2, p2);
77465
77866
  }
77466
- start = p2 + 1;
77467
- p2 = source.indexOf(c2, start);
77867
+ start2 = p2 + 1;
77868
+ p2 = source.indexOf(c2, start2);
77468
77869
  if (p2 > 0) {
77469
- value = source.slice(start, p2);
77470
- addAttribute(attrName, value, start - 1);
77870
+ value = source.slice(start2, p2);
77871
+ addAttribute(attrName, value, start2 - 1);
77471
77872
  s2 = S_ATTR_END;
77472
77873
  } else {
77473
77874
  throw new Error("attribute value no end '" + c2 + "' match");
77474
77875
  }
77475
77876
  } else if (s2 == S_ATTR_NOQUOT_VALUE) {
77476
- value = source.slice(start, p2);
77477
- addAttribute(attrName, value, start);
77877
+ value = source.slice(start2, p2);
77878
+ addAttribute(attrName, value, start2);
77478
77879
  errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c2 + ")!!");
77479
- start = p2 + 1;
77880
+ start2 = p2 + 1;
77480
77881
  s2 = S_ATTR_END;
77481
77882
  } else {
77482
77883
  throw new Error('attribute value must after "="');
@@ -77485,7 +77886,7 @@ var require_sax = __commonJS({
77485
77886
  case "/":
77486
77887
  switch (s2) {
77487
77888
  case S_TAG:
77488
- el.setTagName(source.slice(start, p2));
77889
+ el.setTagName(source.slice(start2, p2));
77489
77890
  case S_ATTR_END:
77490
77891
  case S_TAG_SPACE:
77491
77892
  case S_TAG_CLOSE:
@@ -77505,13 +77906,13 @@ var require_sax = __commonJS({
77505
77906
  case "":
77506
77907
  errorHandler.error("unexpected end of input");
77507
77908
  if (s2 == S_TAG) {
77508
- el.setTagName(source.slice(start, p2));
77909
+ el.setTagName(source.slice(start2, p2));
77509
77910
  }
77510
77911
  return p2;
77511
77912
  case ">":
77512
77913
  switch (s2) {
77513
77914
  case S_TAG:
77514
- el.setTagName(source.slice(start, p2));
77915
+ el.setTagName(source.slice(start2, p2));
77515
77916
  case S_ATTR_END:
77516
77917
  case S_TAG_SPACE:
77517
77918
  case S_TAG_CLOSE:
@@ -77520,7 +77921,7 @@ var require_sax = __commonJS({
77520
77921
  case S_ATTR_NOQUOT_VALUE:
77521
77922
  //Compatible state
77522
77923
  case S_ATTR:
77523
- value = source.slice(start, p2);
77924
+ value = source.slice(start2, p2);
77524
77925
  if (value.slice(-1) === "/") {
77525
77926
  el.closed = true;
77526
77927
  value = value.slice(0, -1);
@@ -77531,12 +77932,12 @@ var require_sax = __commonJS({
77531
77932
  }
77532
77933
  if (s2 == S_ATTR_NOQUOT_VALUE) {
77533
77934
  errorHandler.warning('attribute "' + value + '" missed quot(")!');
77534
- addAttribute(attrName, value, start);
77935
+ addAttribute(attrName, value, start2);
77535
77936
  } else {
77536
77937
  if (!NAMESPACE.isHTML(currentNSMap[""]) || !value.match(/^(?:disabled|checked|selected)$/i)) {
77537
77938
  errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!');
77538
77939
  }
77539
- addAttribute(value, value, start);
77940
+ addAttribute(value, value, start2);
77540
77941
  }
77541
77942
  break;
77542
77943
  case S_EQ:
@@ -77550,17 +77951,17 @@ var require_sax = __commonJS({
77550
77951
  if (c2 <= " ") {
77551
77952
  switch (s2) {
77552
77953
  case S_TAG:
77553
- el.setTagName(source.slice(start, p2));
77954
+ el.setTagName(source.slice(start2, p2));
77554
77955
  s2 = S_TAG_SPACE;
77555
77956
  break;
77556
77957
  case S_ATTR:
77557
- attrName = source.slice(start, p2);
77958
+ attrName = source.slice(start2, p2);
77558
77959
  s2 = S_ATTR_SPACE;
77559
77960
  break;
77560
77961
  case S_ATTR_NOQUOT_VALUE:
77561
- var value = source.slice(start, p2);
77962
+ var value = source.slice(start2, p2);
77562
77963
  errorHandler.warning('attribute "' + value + '" missed quot(")!!');
77563
- addAttribute(attrName, value, start);
77964
+ addAttribute(attrName, value, start2);
77564
77965
  case S_ATTR_END:
77565
77966
  s2 = S_TAG_SPACE;
77566
77967
  break;
@@ -77575,19 +77976,19 @@ var require_sax = __commonJS({
77575
77976
  if (!NAMESPACE.isHTML(currentNSMap[""]) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {
77576
77977
  errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!');
77577
77978
  }
77578
- addAttribute(attrName, attrName, start);
77579
- start = p2;
77979
+ addAttribute(attrName, attrName, start2);
77980
+ start2 = p2;
77580
77981
  s2 = S_ATTR;
77581
77982
  break;
77582
77983
  case S_ATTR_END:
77583
77984
  errorHandler.warning('attribute space is required"' + attrName + '"!!');
77584
77985
  case S_TAG_SPACE:
77585
77986
  s2 = S_ATTR;
77586
- start = p2;
77987
+ start2 = p2;
77587
77988
  break;
77588
77989
  case S_EQ:
77589
77990
  s2 = S_ATTR_NOQUOT_VALUE;
77590
- start = p2;
77991
+ start2 = p2;
77591
77992
  break;
77592
77993
  case S_TAG_CLOSE:
77593
77994
  throw new Error("elements closed character '/' and '>' must be connected to");
@@ -77698,14 +78099,14 @@ var require_sax = __commonJS({
77698
78099
  }
77699
78100
  }
77700
78101
  }
77701
- function parseDCC(source, start, domBuilder, errorHandler) {
77702
- var next = source.charAt(start + 2);
78102
+ function parseDCC(source, start2, domBuilder, errorHandler) {
78103
+ var next = source.charAt(start2 + 2);
77703
78104
  switch (next) {
77704
78105
  case "-":
77705
- if (source.charAt(start + 3) === "-") {
77706
- var end = source.indexOf("-->", start + 4);
77707
- if (end > start) {
77708
- domBuilder.comment(source, start + 4, end - start - 4);
78106
+ if (source.charAt(start2 + 3) === "-") {
78107
+ var end = source.indexOf("-->", start2 + 4);
78108
+ if (end > start2) {
78109
+ domBuilder.comment(source, start2 + 4, end - start2 - 4);
77709
78110
  return end + 3;
77710
78111
  } else {
77711
78112
  errorHandler.error("Unclosed comment");
@@ -77715,14 +78116,14 @@ var require_sax = __commonJS({
77715
78116
  return -1;
77716
78117
  }
77717
78118
  default:
77718
- if (source.substr(start + 3, 6) == "CDATA[") {
77719
- var end = source.indexOf("]]>", start + 9);
78119
+ if (source.substr(start2 + 3, 6) == "CDATA[") {
78120
+ var end = source.indexOf("]]>", start2 + 9);
77720
78121
  domBuilder.startCDATA();
77721
- domBuilder.characters(source, start + 9, end - start - 9);
78122
+ domBuilder.characters(source, start2 + 9, end - start2 - 9);
77722
78123
  domBuilder.endCDATA();
77723
78124
  return end + 3;
77724
78125
  }
77725
- var matchs = split(source, start);
78126
+ var matchs = split(source, start2);
77726
78127
  var len = matchs.length;
77727
78128
  if (len > 1 && /!doctype/i.test(matchs[0][0])) {
77728
78129
  var name = matchs[1][0];
@@ -77744,10 +78145,10 @@ var require_sax = __commonJS({
77744
78145
  }
77745
78146
  return -1;
77746
78147
  }
77747
- function parseInstruction(source, start, domBuilder) {
77748
- var end = source.indexOf("?>", start);
78148
+ function parseInstruction(source, start2, domBuilder) {
78149
+ var end = source.indexOf("?>", start2);
77749
78150
  if (end) {
77750
- var match = source.substring(start, end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
78151
+ var match = source.substring(start2, end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
77751
78152
  if (match) {
77752
78153
  var len = match[0].length;
77753
78154
  domBuilder.processingInstruction(match[1], match[2]);
@@ -77802,11 +78203,11 @@ var require_sax = __commonJS({
77802
78203
  // getType:function(uri,localName){}
77803
78204
  // getType:function(i){},
77804
78205
  };
77805
- function split(source, start) {
78206
+ function split(source, start2) {
77806
78207
  var match;
77807
78208
  var buf = [];
77808
78209
  var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
77809
- reg.lastIndex = start;
78210
+ reg.lastIndex = start2;
77810
78211
  reg.exec(source);
77811
78212
  while (match = reg.exec(source)) {
77812
78213
  buf.push(match);
@@ -77937,9 +78338,9 @@ var require_dom_parser = __commonJS({
77937
78338
  this.locator && position(this.locator, ins);
77938
78339
  appendElement(this, ins);
77939
78340
  },
77940
- ignorableWhitespace: function(ch2, start, length) {
78341
+ ignorableWhitespace: function(ch2, start2, length) {
77941
78342
  },
77942
- characters: function(chars, start, length) {
78343
+ characters: function(chars, start2, length) {
77943
78344
  chars = _toString.apply(this, arguments);
77944
78345
  if (chars) {
77945
78346
  if (this.cdata) {
@@ -77966,7 +78367,7 @@ var require_dom_parser = __commonJS({
77966
78367
  }
77967
78368
  },
77968
78369
  //LexicalHandler
77969
- comment: function(chars, start, length) {
78370
+ comment: function(chars, start2, length) {
77970
78371
  chars = _toString.apply(this, arguments);
77971
78372
  var comm = this.doc.createComment(chars);
77972
78373
  this.locator && position(this.locator, comm);
@@ -78006,12 +78407,12 @@ var require_dom_parser = __commonJS({
78006
78407
  return "\n@" + (l3.systemId || "") + "#[line:" + l3.lineNumber + ",col:" + l3.columnNumber + "]";
78007
78408
  }
78008
78409
  }
78009
- function _toString(chars, start, length) {
78410
+ function _toString(chars, start2, length) {
78010
78411
  if (typeof chars == "string") {
78011
- return chars.substr(start, length);
78412
+ return chars.substr(start2, length);
78012
78413
  } else {
78013
- if (chars.length >= start + length || start) {
78014
- return new java.lang.String(chars, start, length) + "";
78414
+ if (chars.length >= start2 + length || start2) {
78415
+ return new java.lang.String(chars, start2, length) + "";
78015
78416
  }
78016
78417
  return chars;
78017
78418
  }
@@ -81873,7 +82274,7 @@ var require_transforms = __commonJS({
81873
82274
  "../../node_modules/.pnpm/mammoth@1.13.0/node_modules/mammoth/lib/transforms.js"(exports2) {
81874
82275
  var _3 = require_underscore_node();
81875
82276
  exports2.paragraph = paragraph;
81876
- exports2.run = run5;
82277
+ exports2.run = run3;
81877
82278
  exports2._elements = elements;
81878
82279
  exports2._elementsOfType = elementsOfType;
81879
82280
  exports2.getDescendantsOfType = getDescendantsOfType;
@@ -81881,7 +82282,7 @@ var require_transforms = __commonJS({
81881
82282
  function paragraph(transform) {
81882
82283
  return elementsOfType("paragraph", transform);
81883
82284
  }
81884
- function run5(transform) {
82285
+ function run3(transform) {
81885
82286
  return elementsOfType("run", transform);
81886
82287
  }
81887
82288
  function elementsOfType(elementType, transform) {
@@ -83654,10 +84055,10 @@ var require_html_writer = __commonJS({
83654
84055
  var indentationLevel = 0;
83655
84056
  var indentation = " ";
83656
84057
  var stack = [];
83657
- var start = true;
84058
+ var start2 = true;
83658
84059
  var inText = false;
83659
84060
  var writer2 = simpleWriter();
83660
- function open(tagName, attributes) {
84061
+ function open2(tagName, attributes) {
83661
84062
  if (indentedElements[tagName]) {
83662
84063
  indent();
83663
84064
  }
@@ -83666,7 +84067,7 @@ var require_html_writer = __commonJS({
83666
84067
  if (indentedElements[tagName]) {
83667
84068
  indentationLevel++;
83668
84069
  }
83669
- start = false;
84070
+ start2 = false;
83670
84071
  }
83671
84072
  function close(tagName) {
83672
84073
  if (indentedElements[tagName]) {
@@ -83696,7 +84097,7 @@ var require_html_writer = __commonJS({
83696
84097
  }
83697
84098
  function indent() {
83698
84099
  inText = false;
83699
- if (!start && insideIndentedElement() && !isInPre()) {
84100
+ if (!start2 && insideIndentedElement() && !isInPre()) {
83700
84101
  writer2._append("\n");
83701
84102
  for (var i3 = 0; i3 < indentationLevel; i3++) {
83702
84103
  writer2._append(indentation);
@@ -83710,7 +84111,7 @@ var require_html_writer = __commonJS({
83710
84111
  }
83711
84112
  return {
83712
84113
  asString: writer2.asString,
83713
- open,
84114
+ open: open2,
83714
84115
  close,
83715
84116
  text,
83716
84117
  selfClosing
@@ -83718,7 +84119,7 @@ var require_html_writer = __commonJS({
83718
84119
  }
83719
84120
  function simpleWriter() {
83720
84121
  var fragments = [];
83721
- function open(tagName, attributes) {
84122
+ function open2(tagName, attributes) {
83722
84123
  var attributeString = generateAttributeString(attributes);
83723
84124
  fragments.push("<" + tagName + attributeString + ">");
83724
84125
  }
@@ -83745,7 +84146,7 @@ var require_html_writer = __commonJS({
83745
84146
  }
83746
84147
  return {
83747
84148
  asString,
83748
- open,
84149
+ open: open2,
83749
84150
  close,
83750
84151
  text,
83751
84152
  selfClosing,
@@ -83769,9 +84170,9 @@ var require_markdown_writer = __commonJS({
83769
84170
  function symmetricMarkdownElement(end) {
83770
84171
  return markdownElement(end, end);
83771
84172
  }
83772
- function markdownElement(start, end) {
84173
+ function markdownElement(start2, end) {
83773
84174
  return function() {
83774
- return { start, end };
84175
+ return { start: start2, end };
83775
84176
  };
83776
84177
  }
83777
84178
  function markdownLink(attributes) {
@@ -83813,9 +84214,9 @@ var require_markdown_writer = __commonJS({
83813
84214
  list.count++;
83814
84215
  listItem.hasClosed = false;
83815
84216
  var bullet = list.isOrdered ? list.count + "." : "-";
83816
- var start = repeatString(" ", list.indent) + bullet + " ";
84217
+ var start2 = repeatString(" ", list.indent) + bullet + " ";
83817
84218
  return {
83818
- start,
84219
+ start: start2,
83819
84220
  end: function() {
83820
84221
  if (!listItem.hasClosed) {
83821
84222
  listItem.hasClosed = true;
@@ -83848,7 +84249,7 @@ var require_markdown_writer = __commonJS({
83848
84249
  var elementStack = [];
83849
84250
  var list = null;
83850
84251
  var listItem = {};
83851
- function open(tagName, attributes) {
84252
+ function open2(tagName, attributes) {
83852
84253
  attributes = attributes || {};
83853
84254
  var createElement = htmlToMarkdown[tagName] || function() {
83854
84255
  return {};
@@ -83882,7 +84283,7 @@ var require_markdown_writer = __commonJS({
83882
84283
  fragments.push(end || "");
83883
84284
  }
83884
84285
  function selfClosing(tagName, attributes) {
83885
- open(tagName, attributes);
84286
+ open2(tagName, attributes);
83886
84287
  close(tagName);
83887
84288
  }
83888
84289
  function text(value) {
@@ -83893,7 +84294,7 @@ var require_markdown_writer = __commonJS({
83893
84294
  }
83894
84295
  return {
83895
84296
  asString,
83896
- open,
84297
+ open: open2,
83897
84298
  close,
83898
84299
  text,
83899
84300
  selfClosing
@@ -84031,47 +84432,47 @@ var require_document_to_html = __commonJS({
84031
84432
  return defaultParagraphStyle;
84032
84433
  }
84033
84434
  }
84034
- function convertRun(run5, messages, context) {
84435
+ function convertRun(run3, messages, context) {
84035
84436
  var nodes = function() {
84036
- return convertElements(run5.children, messages, context);
84437
+ return convertElements(run3.children, messages, context);
84037
84438
  };
84038
84439
  var paths = [];
84039
- if (run5.highlight !== null) {
84040
- var path = findHtmlPath({ type: "highlight", color: run5.highlight });
84440
+ if (run3.highlight !== null) {
84441
+ var path = findHtmlPath({ type: "highlight", color: run3.highlight });
84041
84442
  if (path) {
84042
84443
  paths.push(path);
84043
84444
  }
84044
84445
  }
84045
- if (run5.isSmallCaps) {
84446
+ if (run3.isSmallCaps) {
84046
84447
  paths.push(findHtmlPathForRunProperty("smallCaps"));
84047
84448
  }
84048
- if (run5.isAllCaps) {
84449
+ if (run3.isAllCaps) {
84049
84450
  paths.push(findHtmlPathForRunProperty("allCaps"));
84050
84451
  }
84051
- if (run5.isStrikethrough) {
84452
+ if (run3.isStrikethrough) {
84052
84453
  paths.push(findHtmlPathForRunProperty("strikethrough", "s"));
84053
84454
  }
84054
- if (run5.isUnderline) {
84455
+ if (run3.isUnderline) {
84055
84456
  paths.push(findHtmlPathForRunProperty("underline"));
84056
84457
  }
84057
- if (run5.verticalAlignment === documents.verticalAlignment.subscript) {
84458
+ if (run3.verticalAlignment === documents.verticalAlignment.subscript) {
84058
84459
  paths.push(htmlPaths.element("sub", {}, { fresh: false }));
84059
84460
  }
84060
- if (run5.verticalAlignment === documents.verticalAlignment.superscript) {
84461
+ if (run3.verticalAlignment === documents.verticalAlignment.superscript) {
84061
84462
  paths.push(htmlPaths.element("sup", {}, { fresh: false }));
84062
84463
  }
84063
- if (run5.isItalic) {
84464
+ if (run3.isItalic) {
84064
84465
  paths.push(findHtmlPathForRunProperty("italic", "em"));
84065
84466
  }
84066
- if (run5.isBold) {
84467
+ if (run3.isBold) {
84067
84468
  paths.push(findHtmlPathForRunProperty("bold", "strong"));
84068
84469
  }
84069
84470
  var stylePath = htmlPaths.empty;
84070
- var style = findStyle(run5);
84471
+ var style = findStyle(run3);
84071
84472
  if (style) {
84072
84473
  stylePath = style.to;
84073
- } else if (run5.styleId) {
84074
- messages.push(unrecognisedStyleWarning("run", run5));
84474
+ } else if (run3.styleId) {
84475
+ messages.push(unrecognisedStyleWarning("run", run3));
84075
84476
  }
84076
84477
  paths.push(stylePath);
84077
84478
  paths.forEach(function(path2) {
@@ -84381,9 +84782,9 @@ var require_TokenIterator = __commonJS({
84381
84782
  return this._tokens[this._tokens.length - 1];
84382
84783
  };
84383
84784
  TokenIterator.prototype.to = function(end) {
84384
- var start = this.head().source;
84785
+ var start2 = this.head().source;
84385
84786
  var endToken = end.head() || end.end();
84386
- return start.to(endToken.source);
84787
+ return start2.to(endToken.source);
84387
84788
  };
84388
84789
  }
84389
84790
  });
@@ -84912,7 +85313,7 @@ var require_rules = __commonJS({
84912
85313
  });
84913
85314
  var repeatedRule = exports2.firstOf.apply(null, ["rules"].concat(rights));
84914
85315
  return function(input) {
84915
- var start = input;
85316
+ var start2 = input;
84916
85317
  var leftResult = leftRule(input);
84917
85318
  if (!leftResult.isSuccess()) {
84918
85319
  return leftResult;
@@ -84920,7 +85321,7 @@ var require_rules = __commonJS({
84920
85321
  var repeatedResult = repeatedRule(leftResult.remaining());
84921
85322
  while (repeatedResult.isSuccess()) {
84922
85323
  var remaining = repeatedResult.remaining();
84923
- var source = start.to(repeatedResult.remaining());
85324
+ var source = start2.to(repeatedResult.remaining());
84924
85325
  var right = repeatedResult.value();
84925
85326
  leftResult = results.success(
84926
85327
  right(leftResult.value(), source),
@@ -85241,7 +85642,7 @@ var require_lop = __commonJS({
85241
85642
  var require_document_matchers = __commonJS({
85242
85643
  "../../node_modules/.pnpm/mammoth@1.13.0/node_modules/mammoth/lib/styles/document-matchers.js"(exports2) {
85243
85644
  exports2.paragraph = paragraph;
85244
- exports2.run = run5;
85645
+ exports2.run = run3;
85245
85646
  exports2.table = table2;
85246
85647
  exports2.bold = new Matcher("bold");
85247
85648
  exports2.italic = new Matcher("italic");
@@ -85259,7 +85660,7 @@ var require_document_matchers = __commonJS({
85259
85660
  function paragraph(options) {
85260
85661
  return new Matcher("paragraph", options);
85261
85662
  }
85262
- function run5(options) {
85663
+ function run3(options) {
85263
85664
  return new Matcher("run", options);
85264
85665
  }
85265
85666
  function table2(options) {
@@ -88765,8 +89166,8 @@ var require_dist2 = __commonJS({
88765
89166
  }
88766
89167
  return index;
88767
89168
  }
88768
- function trailingOWS(header, start, end) {
88769
- while (end > start) {
89169
+ function trailingOWS(header, start2, end) {
89170
+ while (end > start2) {
88770
89171
  const char = header.charCodeAt(end - 1);
88771
89172
  if (char !== SP && char !== HTAB)
88772
89173
  break;
@@ -89563,7 +89964,7 @@ function readByobReaderWithSignal(reader, buffer, signal) {
89563
89964
  return reader.read(buffer);
89564
89965
  }
89565
89966
  signal.throwIfAborted();
89566
- return new Promise((resolve6, reject) => {
89967
+ return new Promise((resolve7, reject) => {
89567
89968
  const cleanup = () => {
89568
89969
  signal.removeEventListener("abort", onAbort);
89569
89970
  };
@@ -89583,7 +89984,7 @@ function readByobReaderWithSignal(reader, buffer, signal) {
89583
89984
  try {
89584
89985
  const result = await reader.read(buffer);
89585
89986
  cleanup();
89586
- resolve6(result);
89987
+ resolve7(result);
89587
89988
  } catch (error2) {
89588
89989
  cleanup();
89589
89990
  reject(error2);
@@ -97627,7 +98028,7 @@ var init_MP4Parser = __esm({
97627
98028
  }
97628
98029
  const chapters = [];
97629
98030
  for (let i3 = 0; i3 < chapterTrack.chunkOffsetTable.length && len > 0; ++i3) {
97630
- const start = chapterTrack.timeToSampleTable.slice(0, i3).reduce((acc, cur) => acc + cur.duration, 0);
98031
+ const start2 = chapterTrack.timeToSampleTable.slice(0, i3).reduce((acc, cur) => acc + cur.duration, 0);
97631
98032
  const chunkOffset = chapterTrack.chunkOffsetTable[i3];
97632
98033
  const nextChunkLen = chunkOffset - this.tokenizer.position;
97633
98034
  const sampleSize = chapterTrack.sampleSize > 0 ? chapterTrack.sampleSize : chapterTrack.sampleSizeTable[i3];
@@ -97641,7 +98042,7 @@ var init_MP4Parser = __esm({
97641
98042
  const chapter = {
97642
98043
  title,
97643
98044
  timeScale: chapterTrack.media.header ? chapterTrack.media.header.timeScale : 0,
97644
- start,
98045
+ start: start2,
97645
98046
  sampleOffset: this.findSampleOffset(track, this.tokenizer.position)
97646
98047
  };
97647
98048
  debug17(`Chapter title=${chapter.title}, offset=${chapter.sampleOffset}/${track.header.duration}`);
@@ -100345,9 +100746,9 @@ var init_odt = __esm({
100345
100746
  ];
100346
100747
  dropSubtrees = (xml) => DROP_SUBTREE.reduce((text, tag) => text.replaceAll(new RegExp(`<${tag}\\b[^>]*?(?:/>|>[\\s\\S]*?</${tag}>)`, "g"), ""), xml);
100347
100748
  odfToHtml = (xml) => {
100348
- const start = xml.indexOf("<office:text");
100749
+ const start2 = xml.indexOf("<office:text");
100349
100750
  const end = xml.lastIndexOf("</office:text>");
100350
- const body = dropSubtrees(start === -1 || end === -1 ? xml : xml.slice(start, end));
100751
+ const body = dropSubtrees(start2 === -1 || end === -1 ? xml : xml.slice(start2, end));
100351
100752
  return body.replaceAll(/<text:h\b([^>]*)>([\s\S]*?)<\/text:h>/g, (_3, attributes, inner) => {
100352
100753
  const level = Math.min(6, Math.max(1, Number(attributeOf(attributes, "text:outline-level") ?? "1") || 1));
100353
100754
  return `<h${level}>${inner}</h${level}>`;
@@ -100474,15 +100875,15 @@ var init_pdf_furniture = __esm({
100474
100875
  });
100475
100876
 
100476
100877
  // ../fileq/src/lib/derivers/pdf.ts
100477
- import { execFile as execFile2, spawnSync } from "node:child_process";
100878
+ import { spawnSync as spawnSync2 } from "node:child_process";
100478
100879
  import { mkdtemp, readdir, readFile as readFile10, rm } from "node:fs/promises";
100479
100880
  import { tmpdir } from "node:os";
100480
100881
  import { join as join3 } from "node:path";
100481
- import { promisify as promisify2 } from "node:util";
100482
- var SCAN_THRESHOLD_CHARS_PER_PAGE, MAX_OCR_PAGES, OCR_DPI, OCR_TIMEOUT_MS, run3, checked, ocrAvailable, readPages, recognisePages, pagesToMarkdown, furnitureNotes, withoutFurniture, pdfDeriver;
100882
+ var SCAN_THRESHOLD_CHARS_PER_PAGE, MAX_OCR_PAGES, OCR_DPI, OCR_TIMEOUT_MS, checked, ocrAvailable, readPages, recognisePages, pagesToMarkdown, furnitureNotes, withoutFurniture, pdfDeriver;
100483
100883
  var init_pdf = __esm({
100484
100884
  "../fileq/src/lib/derivers/pdf.ts"() {
100485
100885
  "use strict";
100886
+ init_process();
100486
100887
  init_dist2();
100487
100888
  init_tools();
100488
100889
  init_pdf_furniture();
@@ -100490,31 +100891,28 @@ var init_pdf = __esm({
100490
100891
  MAX_OCR_PAGES = 20;
100491
100892
  OCR_DPI = "200";
100492
100893
  OCR_TIMEOUT_MS = 6e4 + MAX_OCR_PAGES * 15e3;
100493
- run3 = promisify2(execFile2);
100494
100894
  checked = /* @__PURE__ */ new Map();
100495
100895
  ocrAvailable = () => {
100496
100896
  const path = process.env["PATH"] ?? "";
100497
100897
  let available = checked.get(path);
100498
100898
  if (available === void 0) {
100499
- available = onPath("pdftoppm") && onPath("ocr") && spawnSync("ocr", ["--check"], { stdio: "ignore", timeout: 1e4 }).status === 0;
100899
+ available = onPath("pdftoppm") && onPath("ocr") && spawnSync2("ocr", ["--check"], { stdio: "ignore", timeout: 1e4 }).status === 0;
100500
100900
  checked.set(path, available);
100501
100901
  }
100502
100902
  return available;
100503
100903
  };
100504
- readPages = (images) => new Promise((resolve6, reject) => {
100505
- execFile2("ocr", [...images], { timeout: OCR_TIMEOUT_MS, maxBuffer: 16 * 1024 * 1024 }, (error2, stdout) => {
100506
- if (error2 === null || error2.code === 1) {
100507
- resolve6(stdout);
100508
- } else {
100509
- reject(error2);
100510
- }
100511
- });
100512
- });
100904
+ readPages = async (images) => {
100905
+ const result = await runBounded("ocr", images, { timeoutMs: OCR_TIMEOUT_MS, maxOutput: 16 * 1024 * 1024 });
100906
+ if (!result.timedOut && (result.exitCode === 0 || result.exitCode === 1)) {
100907
+ return result.stdout.text;
100908
+ }
100909
+ throw new ProcessError("ocr", images, result);
100910
+ };
100513
100911
  recognisePages = async (absPath, totalPages) => {
100514
100912
  const dir = await mkdtemp(join3(tmpdir(), "fileq-ocr-"));
100515
100913
  try {
100516
- await run3("pdftoppm", ["-r", OCR_DPI, "-png", "-f", "1", "-l", String(Math.min(totalPages, MAX_OCR_PAGES)), absPath, join3(dir, "page")], {
100517
- timeout: 12e4
100914
+ await execBounded("pdftoppm", ["-r", OCR_DPI, "-png", "-f", "1", "-l", String(Math.min(totalPages, MAX_OCR_PAGES)), absPath, join3(dir, "page")], {
100915
+ timeoutMs: 12e4
100518
100916
  });
100519
100917
  const images = (await readdir(dir)).filter((name) => name.endsWith(".png")).toSorted();
100520
100918
  if (images.length === 0) {
@@ -100588,7 +100986,7 @@ var init_pptx = __esm({
100588
100986
  SLIDE_PART = /^ppt\/slides\/slide(\d+)\.xml$/;
100589
100987
  NOTES_PART = /^ppt\/notesSlides\/notesSlide(\d+)\.xml$/;
100590
100988
  slideParagraphs = (xml) => [...xml.matchAll(/<a:p\b[\s\S]*?<\/a:p>/g)].map(
100591
- (paragraph) => [...paragraph[0].matchAll(/<a:t[^>]*>([\s\S]*?)<\/a:t>/g)].map((run5) => decodeEntities(run5[1] ?? "")).join("").trim()
100989
+ (paragraph) => [...paragraph[0].matchAll(/<a:t[^>]*>([\s\S]*?)<\/a:t>/g)].map((run3) => decodeEntities(run3[1] ?? "")).join("").trim()
100592
100990
  ).filter((text) => text !== "");
100593
100991
  partsByNumber = (names, pattern) => {
100594
100992
  const map = /* @__PURE__ */ new Map();
@@ -102724,15 +103122,15 @@ var require_row = __commonJS({
102724
103122
  });
102725
103123
  }
102726
103124
  // remove cell(s) and shift all higher cells down by count
102727
- splice(start, count, ...inserts) {
102728
- const nKeep = start + count;
103125
+ splice(start2, count, ...inserts) {
103126
+ const nKeep = start2 + count;
102729
103127
  const nExpand = inserts.length - count;
102730
103128
  const nEnd = this._cells.length;
102731
103129
  let i3;
102732
103130
  let cSrc;
102733
103131
  let cDst;
102734
103132
  if (nExpand < 0) {
102735
- for (i3 = start + inserts.length; i3 <= nEnd; i3++) {
103133
+ for (i3 = start2 + inserts.length; i3 <= nEnd; i3++) {
102736
103134
  cDst = this._cells[i3 - 1];
102737
103135
  cSrc = this._cells[i3 - nExpand - 1];
102738
103136
  if (cSrc) {
@@ -102760,7 +103158,7 @@ var require_row = __commonJS({
102760
103158
  }
102761
103159
  }
102762
103160
  for (i3 = 0; i3 < inserts.length; i3++) {
102763
- cDst = this.getCell(start + i3);
103161
+ cDst = this.getCell(start2 + i3);
102764
103162
  cDst.value = inserts[i3];
102765
103163
  cDst.style = {};
102766
103164
  cDst._comment = void 0;
@@ -104101,12 +104499,12 @@ var require_worksheet = __commonJS({
104101
104499
  }
104102
104500
  return this._columns[c2 - 1];
104103
104501
  }
104104
- spliceColumns(start, count, ...inserts) {
104502
+ spliceColumns(start2, count, ...inserts) {
104105
104503
  const rows = this._rows;
104106
104504
  const nRows = rows.length;
104107
104505
  if (inserts.length > 0) {
104108
104506
  for (let i3 = 0; i3 < nRows; i3++) {
104109
- const rowArguments = [start, count];
104507
+ const rowArguments = [start2, count];
104110
104508
  inserts.forEach((insert) => {
104111
104509
  rowArguments.push(insert[i3] || null);
104112
104510
  });
@@ -104116,15 +104514,15 @@ var require_worksheet = __commonJS({
104116
104514
  } else {
104117
104515
  this._rows.forEach((r2) => {
104118
104516
  if (r2) {
104119
- r2.splice(start, count);
104517
+ r2.splice(start2, count);
104120
104518
  }
104121
104519
  });
104122
104520
  }
104123
104521
  const nExpand = inserts.length - count;
104124
- const nKeep = start + count;
104522
+ const nKeep = start2 + count;
104125
104523
  const nEnd = this._columns.length;
104126
104524
  if (nExpand < 0) {
104127
- for (let i3 = start + inserts.length; i3 <= nEnd; i3++) {
104525
+ for (let i3 = start2 + inserts.length; i3 <= nEnd; i3++) {
104128
104526
  this.getColumn(i3).defn = this.getColumn(i3 - nExpand).defn;
104129
104527
  }
104130
104528
  } else if (nExpand > 0) {
@@ -104132,10 +104530,10 @@ var require_worksheet = __commonJS({
104132
104530
  this.getColumn(i3 + nExpand).defn = this.getColumn(i3).defn;
104133
104531
  }
104134
104532
  }
104135
- for (let i3 = start; i3 < start + inserts.length; i3++) {
104533
+ for (let i3 = start2; i3 < start2 + inserts.length; i3++) {
104136
104534
  this.getColumn(i3).defn = null;
104137
104535
  }
104138
- this.workbook.definedNames.spliceColumns(this.name, start, count, inserts.length);
104536
+ this.workbook.definedNames.spliceColumns(this.name, start2, count, inserts.length);
104139
104537
  }
104140
104538
  get lastColumn() {
104141
104539
  return this.getColumn(this.columnCount);
@@ -104186,8 +104584,8 @@ var require_worksheet = __commonJS({
104186
104584
  return this._rows[r2 - 1];
104187
104585
  }
104188
104586
  // find multiple rows (if exists) by row number
104189
- findRows(start, length) {
104190
- return this._rows.slice(start - 1, start - 1 + length);
104587
+ findRows(start2, length) {
104588
+ return this._rows.slice(start2 - 1, start2 - 1 + length);
104191
104589
  }
104192
104590
  get rowCount() {
104193
104591
  return this._lastRowNumber;
@@ -104208,10 +104606,10 @@ var require_worksheet = __commonJS({
104208
104606
  return row;
104209
104607
  }
104210
104608
  // get multiple rows by row number.
104211
- getRows(start, length) {
104609
+ getRows(start2, length) {
104212
104610
  if (length < 1) return void 0;
104213
104611
  const rows = [];
104214
- for (let i3 = start; i3 < start + length; i3++) {
104612
+ for (let i3 = start2; i3 < start2 + length; i3++) {
104215
104613
  rows.push(this.getRow(i3));
104216
104614
  }
104217
104615
  return rows;
@@ -104278,15 +104676,15 @@ var require_worksheet = __commonJS({
104278
104676
  });
104279
104677
  }
104280
104678
  }
104281
- spliceRows(start, count, ...inserts) {
104282
- const nKeep = start + count;
104679
+ spliceRows(start2, count, ...inserts) {
104680
+ const nKeep = start2 + count;
104283
104681
  const nInserts = inserts.length;
104284
104682
  const nExpand = nInserts - count;
104285
104683
  const nEnd = this._rows.length;
104286
104684
  let i3;
104287
104685
  let rSrc;
104288
104686
  if (nExpand < 0) {
104289
- if (start === nEnd) {
104687
+ if (start2 === nEnd) {
104290
104688
  this._rows[nEnd - 1] = void 0;
104291
104689
  }
104292
104690
  for (i3 = nKeep; i3 <= nEnd; i3++) {
@@ -104327,11 +104725,11 @@ var require_worksheet = __commonJS({
104327
104725
  }
104328
104726
  }
104329
104727
  for (i3 = 0; i3 < nInserts; i3++) {
104330
- const rDst = this.getRow(start + i3);
104728
+ const rDst = this.getRow(start2 + i3);
104331
104729
  rDst.style = {};
104332
104730
  rDst.values = inserts[i3];
104333
104731
  }
104334
- this.workbook.definedNames.spliceRows(this.name, start, count, nInserts);
104732
+ this.workbook.definedNames.spliceRows(this.name, start2, count, nInserts);
104335
104733
  }
104336
104734
  // iterate over every row in the worksheet, including maybe empty rows
104337
104735
  eachRow(options, iteratee) {
@@ -104502,7 +104900,7 @@ var require_worksheet = __commonJS({
104502
104900
  // =========================================================================
104503
104901
  // Worksheet Protection
104504
104902
  protect(password, options) {
104505
- return new Promise((resolve6) => {
104903
+ return new Promise((resolve7) => {
104506
104904
  this.sheetProtection = {
104507
104905
  sheet: true
104508
104906
  };
@@ -104526,7 +104924,7 @@ var require_worksheet = __commonJS({
104526
104924
  delete this.sheetProtection.spinCount;
104527
104925
  }
104528
104926
  }
104529
- resolve6();
104927
+ resolve7();
104530
104928
  });
104531
104929
  }
104532
104930
  unprotect() {
@@ -104767,17 +105165,17 @@ var require_cell_matrix = __commonJS({
104767
105165
  }
104768
105166
  return void 0;
104769
105167
  }
104770
- spliceRows(sheetName, start, numDelete, numInsert) {
105168
+ spliceRows(sheetName, start2, numDelete, numInsert) {
104771
105169
  const sheet = this.sheets[sheetName];
104772
105170
  if (sheet) {
104773
105171
  const inserts = [];
104774
105172
  for (let i3 = 0; i3 < numInsert; i3++) {
104775
105173
  inserts.push([]);
104776
105174
  }
104777
- sheet.splice(start, numDelete, ...inserts);
105175
+ sheet.splice(start2, numDelete, ...inserts);
104778
105176
  }
104779
105177
  }
104780
- spliceColumns(sheetName, start, numDelete, numInsert) {
105178
+ spliceColumns(sheetName, start2, numDelete, numInsert) {
104781
105179
  const sheet = this.sheets[sheetName];
104782
105180
  if (sheet) {
104783
105181
  const inserts = [];
@@ -104785,7 +105183,7 @@ var require_cell_matrix = __commonJS({
104785
105183
  inserts.push(null);
104786
105184
  }
104787
105185
  _3.each(sheet, (row) => {
104788
- row.splice(start, numDelete, ...inserts);
105186
+ row.splice(start2, numDelete, ...inserts);
104789
105187
  });
104790
105188
  }
104791
105189
  }
@@ -104925,15 +105323,15 @@ var require_defined_names = __commonJS({
104925
105323
  }
104926
105324
  });
104927
105325
  }
104928
- spliceRows(sheetName, start, numDelete, numInsert) {
105326
+ spliceRows(sheetName, start2, numDelete, numInsert) {
104929
105327
  _3.each(this.matrixMap, (matrix) => {
104930
- matrix.spliceRows(sheetName, start, numDelete, numInsert);
105328
+ matrix.spliceRows(sheetName, start2, numDelete, numInsert);
104931
105329
  this.normaliseMatrix(matrix, sheetName);
104932
105330
  });
104933
105331
  }
104934
- spliceColumns(sheetName, start, numDelete, numInsert) {
105332
+ spliceColumns(sheetName, start2, numDelete, numInsert) {
104935
105333
  _3.each(this.matrixMap, (matrix) => {
104936
- matrix.spliceColumns(sheetName, start, numDelete, numInsert);
105334
+ matrix.spliceColumns(sheetName, start2, numDelete, numInsert);
104937
105335
  this.normaliseMatrix(matrix, sheetName);
104938
105336
  });
104939
105337
  }
@@ -105019,8 +105417,8 @@ var require_buffer_list = __commonJS({
105019
105417
  Object.defineProperty(Constructor, "prototype", { writable: false });
105020
105418
  return Constructor;
105021
105419
  }
105022
- function _toPropertyKey(arg) {
105023
- var key = _toPrimitive(arg, "string");
105420
+ function _toPropertyKey(arg2) {
105421
+ var key = _toPrimitive(arg2, "string");
105024
105422
  return typeof key === "symbol" ? key : String(key);
105025
105423
  }
105026
105424
  function _toPrimitive(input, hint) {
@@ -105089,7 +105487,7 @@ var require_buffer_list = __commonJS({
105089
105487
  }
105090
105488
  }, {
105091
105489
  key: "join",
105092
- value: function join9(s2) {
105490
+ value: function join10(s2) {
105093
105491
  if (this.length === 0) return "";
105094
105492
  var p2 = this.head;
105095
105493
  var ret2 = "" + p2.data;
@@ -105345,14 +105743,14 @@ var require_errors2 = __commonJS({
105345
105743
  }
105346
105744
  return str.substring(this_len - search.length, this_len) === search;
105347
105745
  }
105348
- function includes(str, search, start) {
105349
- if (typeof start !== "number") {
105350
- start = 0;
105746
+ function includes(str, search, start2) {
105747
+ if (typeof start2 !== "number") {
105748
+ start2 = 0;
105351
105749
  }
105352
- if (start + search.length > str.length) {
105750
+ if (start2 + search.length > str.length) {
105353
105751
  return false;
105354
105752
  } else {
105355
- return str.indexOf(search, start) !== -1;
105753
+ return str.indexOf(search, start2) !== -1;
105356
105754
  }
105357
105755
  }
105358
105756
  createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) {
@@ -105388,8 +105786,8 @@ var require_errors2 = __commonJS({
105388
105786
  createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
105389
105787
  createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
105390
105788
  createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
105391
- createErrorType("ERR_UNKNOWN_ENCODING", function(arg) {
105392
- return "Unknown encoding: " + arg;
105789
+ createErrorType("ERR_UNKNOWN_ENCODING", function(arg2) {
105790
+ return "Unknown encoding: " + arg2;
105393
105791
  }, TypeError);
105394
105792
  createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
105395
105793
  module2.exports.codes = codes;
@@ -106001,16 +106399,16 @@ var require_safe_buffer2 = __commonJS({
106001
106399
  copyProps(buffer, exports2);
106002
106400
  exports2.Buffer = SafeBuffer;
106003
106401
  }
106004
- function SafeBuffer(arg, encodingOrOffset, length) {
106005
- return Buffer2(arg, encodingOrOffset, length);
106402
+ function SafeBuffer(arg2, encodingOrOffset, length) {
106403
+ return Buffer2(arg2, encodingOrOffset, length);
106006
106404
  }
106007
106405
  SafeBuffer.prototype = Object.create(Buffer2.prototype);
106008
106406
  copyProps(Buffer2, SafeBuffer);
106009
- SafeBuffer.from = function(arg, encodingOrOffset, length) {
106010
- if (typeof arg === "number") {
106407
+ SafeBuffer.from = function(arg2, encodingOrOffset, length) {
106408
+ if (typeof arg2 === "number") {
106011
106409
  throw new TypeError("Argument must not be a number");
106012
106410
  }
106013
- return Buffer2(arg, encodingOrOffset, length);
106411
+ return Buffer2(arg2, encodingOrOffset, length);
106014
106412
  };
106015
106413
  SafeBuffer.alloc = function(size, fill, encoding) {
106016
106414
  if (typeof size !== "number") {
@@ -106099,8 +106497,8 @@ var require_string_decoder2 = __commonJS({
106099
106497
  if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc);
106100
106498
  return nenc || enc;
106101
106499
  }
106102
- exports2.StringDecoder = StringDecoder;
106103
- function StringDecoder(encoding) {
106500
+ exports2.StringDecoder = StringDecoder2;
106501
+ function StringDecoder2(encoding) {
106104
106502
  this.encoding = normalizeEncoding(encoding);
106105
106503
  var nb;
106106
106504
  switch (this.encoding) {
@@ -106127,7 +106525,7 @@ var require_string_decoder2 = __commonJS({
106127
106525
  this.lastTotal = 0;
106128
106526
  this.lastChar = Buffer2.allocUnsafe(nb);
106129
106527
  }
106130
- StringDecoder.prototype.write = function(buf) {
106528
+ StringDecoder2.prototype.write = function(buf) {
106131
106529
  if (buf.length === 0) return "";
106132
106530
  var r2;
106133
106531
  var i3;
@@ -106142,9 +106540,9 @@ var require_string_decoder2 = __commonJS({
106142
106540
  if (i3 < buf.length) return r2 ? r2 + this.text(buf, i3) : this.text(buf, i3);
106143
106541
  return r2 || "";
106144
106542
  };
106145
- StringDecoder.prototype.end = utf8End;
106146
- StringDecoder.prototype.text = utf8Text;
106147
- StringDecoder.prototype.fillLast = function(buf) {
106543
+ StringDecoder2.prototype.end = utf8End;
106544
+ StringDecoder2.prototype.text = utf8Text;
106545
+ StringDecoder2.prototype.fillLast = function(buf) {
106148
106546
  if (this.lastNeed <= buf.length) {
106149
106547
  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
106150
106548
  return this.lastChar.toString(this.encoding, 0, this.lastTotal);
@@ -106384,8 +106782,8 @@ var require_async_iterator = __commonJS({
106384
106782
  }
106385
106783
  return obj2;
106386
106784
  }
106387
- function _toPropertyKey(arg) {
106388
- var key = _toPrimitive(arg, "string");
106785
+ function _toPropertyKey(arg2) {
106786
+ var key = _toPrimitive(arg2, "string");
106389
106787
  return typeof key === "symbol" ? key : String(key);
106390
106788
  }
106391
106789
  function _toPrimitive(input, hint) {
@@ -106413,14 +106811,14 @@ var require_async_iterator = __commonJS({
106413
106811
  };
106414
106812
  }
106415
106813
  function readAndResolve(iter) {
106416
- var resolve6 = iter[kLastResolve];
106417
- if (resolve6 !== null) {
106814
+ var resolve7 = iter[kLastResolve];
106815
+ if (resolve7 !== null) {
106418
106816
  var data = iter[kStream].read();
106419
106817
  if (data !== null) {
106420
106818
  iter[kLastPromise] = null;
106421
106819
  iter[kLastResolve] = null;
106422
106820
  iter[kLastReject] = null;
106423
- resolve6(createIterResult(data, false));
106821
+ resolve7(createIterResult(data, false));
106424
106822
  }
106425
106823
  }
106426
106824
  }
@@ -106428,13 +106826,13 @@ var require_async_iterator = __commonJS({
106428
106826
  process.nextTick(readAndResolve, iter);
106429
106827
  }
106430
106828
  function wrapForNext(lastPromise, iter) {
106431
- return function(resolve6, reject) {
106829
+ return function(resolve7, reject) {
106432
106830
  lastPromise.then(function() {
106433
106831
  if (iter[kEnded]) {
106434
- resolve6(createIterResult(void 0, true));
106832
+ resolve7(createIterResult(void 0, true));
106435
106833
  return;
106436
106834
  }
106437
- iter[kHandlePromise](resolve6, reject);
106835
+ iter[kHandlePromise](resolve7, reject);
106438
106836
  }, reject);
106439
106837
  };
106440
106838
  }
@@ -106454,12 +106852,12 @@ var require_async_iterator = __commonJS({
106454
106852
  return Promise.resolve(createIterResult(void 0, true));
106455
106853
  }
106456
106854
  if (this[kStream].destroyed) {
106457
- return new Promise(function(resolve6, reject) {
106855
+ return new Promise(function(resolve7, reject) {
106458
106856
  process.nextTick(function() {
106459
106857
  if (_this[kError]) {
106460
106858
  reject(_this[kError]);
106461
106859
  } else {
106462
- resolve6(createIterResult(void 0, true));
106860
+ resolve7(createIterResult(void 0, true));
106463
106861
  }
106464
106862
  });
106465
106863
  });
@@ -106482,13 +106880,13 @@ var require_async_iterator = __commonJS({
106482
106880
  return this;
106483
106881
  }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
106484
106882
  var _this2 = this;
106485
- return new Promise(function(resolve6, reject) {
106883
+ return new Promise(function(resolve7, reject) {
106486
106884
  _this2[kStream].destroy(null, function(err2) {
106487
106885
  if (err2) {
106488
106886
  reject(err2);
106489
106887
  return;
106490
106888
  }
106491
- resolve6(createIterResult(void 0, true));
106889
+ resolve7(createIterResult(void 0, true));
106492
106890
  });
106493
106891
  });
106494
106892
  }), _Object$setPrototypeO), AsyncIteratorPrototype);
@@ -106510,15 +106908,15 @@ var require_async_iterator = __commonJS({
106510
106908
  value: stream._readableState.endEmitted,
106511
106909
  writable: true
106512
106910
  }), _defineProperty(_Object$create, kHandlePromise, {
106513
- value: function value(resolve6, reject) {
106911
+ value: function value(resolve7, reject) {
106514
106912
  var data = iterator[kStream].read();
106515
106913
  if (data) {
106516
106914
  iterator[kLastPromise] = null;
106517
106915
  iterator[kLastResolve] = null;
106518
106916
  iterator[kLastReject] = null;
106519
- resolve6(createIterResult(data, false));
106917
+ resolve7(createIterResult(data, false));
106520
106918
  } else {
106521
- iterator[kLastResolve] = resolve6;
106919
+ iterator[kLastResolve] = resolve7;
106522
106920
  iterator[kLastReject] = reject;
106523
106921
  }
106524
106922
  },
@@ -106537,12 +106935,12 @@ var require_async_iterator = __commonJS({
106537
106935
  iterator[kError] = err2;
106538
106936
  return;
106539
106937
  }
106540
- var resolve6 = iterator[kLastResolve];
106541
- if (resolve6 !== null) {
106938
+ var resolve7 = iterator[kLastResolve];
106939
+ if (resolve7 !== null) {
106542
106940
  iterator[kLastPromise] = null;
106543
106941
  iterator[kLastResolve] = null;
106544
106942
  iterator[kLastReject] = null;
106545
- resolve6(createIterResult(void 0, true));
106943
+ resolve7(createIterResult(void 0, true));
106546
106944
  }
106547
106945
  iterator[kEnded] = true;
106548
106946
  });
@@ -106557,16 +106955,16 @@ var require_async_iterator = __commonJS({
106557
106955
  var require_from = __commonJS({
106558
106956
  "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
106559
106957
  "use strict";
106560
- function asyncGeneratorStep(gen, resolve6, reject, _next, _throw, key, arg) {
106958
+ function asyncGeneratorStep(gen, resolve7, reject, _next, _throw, key, arg2) {
106561
106959
  try {
106562
- var info2 = gen[key](arg);
106960
+ var info2 = gen[key](arg2);
106563
106961
  var value = info2.value;
106564
106962
  } catch (error2) {
106565
106963
  reject(error2);
106566
106964
  return;
106567
106965
  }
106568
106966
  if (info2.done) {
106569
- resolve6(value);
106967
+ resolve7(value);
106570
106968
  } else {
106571
106969
  Promise.resolve(value).then(_next, _throw);
106572
106970
  }
@@ -106574,13 +106972,13 @@ var require_from = __commonJS({
106574
106972
  function _asyncToGenerator(fn2) {
106575
106973
  return function() {
106576
106974
  var self2 = this, args = arguments;
106577
- return new Promise(function(resolve6, reject) {
106975
+ return new Promise(function(resolve7, reject) {
106578
106976
  var gen = fn2.apply(self2, args);
106579
106977
  function _next(value) {
106580
- asyncGeneratorStep(gen, resolve6, reject, _next, _throw, "next", value);
106978
+ asyncGeneratorStep(gen, resolve7, reject, _next, _throw, "next", value);
106581
106979
  }
106582
106980
  function _throw(err2) {
106583
- asyncGeneratorStep(gen, resolve6, reject, _next, _throw, "throw", err2);
106981
+ asyncGeneratorStep(gen, resolve7, reject, _next, _throw, "throw", err2);
106584
106982
  }
106585
106983
  _next(void 0);
106586
106984
  });
@@ -106616,8 +107014,8 @@ var require_from = __commonJS({
106616
107014
  }
106617
107015
  return obj2;
106618
107016
  }
106619
- function _toPropertyKey(arg) {
106620
- var key = _toPrimitive(arg, "string");
107017
+ function _toPropertyKey(arg2) {
107018
+ var key = _toPrimitive(arg2, "string");
106621
107019
  return typeof key === "symbol" ? key : String(key);
106622
107020
  }
106623
107021
  function _toPrimitive(input, hint) {
@@ -106712,7 +107110,7 @@ var require_stream_readable2 = __commonJS({
106712
107110
  var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF;
106713
107111
  var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
106714
107112
  var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
106715
- var StringDecoder;
107113
+ var StringDecoder2;
106716
107114
  var createReadableStreamAsyncIterator;
106717
107115
  var from;
106718
107116
  require_inherits()(Readable, Stream2);
@@ -106754,8 +107152,8 @@ var require_stream_readable2 = __commonJS({
106754
107152
  this.decoder = null;
106755
107153
  this.encoding = null;
106756
107154
  if (options.encoding) {
106757
- if (!StringDecoder) StringDecoder = require_string_decoder2().StringDecoder;
106758
- this.decoder = new StringDecoder(options.encoding);
107155
+ if (!StringDecoder2) StringDecoder2 = require_string_decoder2().StringDecoder;
107156
+ this.decoder = new StringDecoder2(options.encoding);
106759
107157
  this.encoding = options.encoding;
106760
107158
  }
106761
107159
  }
@@ -106876,8 +107274,8 @@ var require_stream_readable2 = __commonJS({
106876
107274
  return this._readableState.flowing === false;
106877
107275
  };
106878
107276
  Readable.prototype.setEncoding = function(enc) {
106879
- if (!StringDecoder) StringDecoder = require_string_decoder2().StringDecoder;
106880
- var decoder5 = new StringDecoder(enc);
107277
+ if (!StringDecoder2) StringDecoder2 = require_string_decoder2().StringDecoder;
107278
+ var decoder5 = new StringDecoder2(enc);
106881
107279
  this._readableState.decoder = decoder5;
106882
107280
  this._readableState.encoding = this._readableState.decoder.encoding;
106883
107281
  var p2 = this._readableState.buffer.head;
@@ -107667,14 +108065,14 @@ var require_utils2 = __commonJS({
107667
108065
  nop() {
107668
108066
  },
107669
108067
  promiseImmediate(value) {
107670
- return new Promise((resolve6) => {
108068
+ return new Promise((resolve7) => {
107671
108069
  if (global.setImmediate) {
107672
108070
  setImmediate(() => {
107673
- resolve6(value);
108071
+ resolve7(value);
107674
108072
  });
107675
108073
  } else {
107676
108074
  setTimeout(() => {
107677
- resolve6(value);
108075
+ resolve7(value);
107678
108076
  }, 1);
107679
108077
  }
107680
108078
  });
@@ -107774,9 +108172,9 @@ var require_utils2 = __commonJS({
107774
108172
  },
107775
108173
  fs: {
107776
108174
  exists(path) {
107777
- return new Promise((resolve6) => {
108175
+ return new Promise((resolve7) => {
107778
108176
  fs2.access(path, fs2.constants.F_OK, (err2) => {
107779
- resolve6(!err2);
108177
+ resolve7(!err2);
107780
108178
  });
107781
108179
  });
107782
108180
  }
@@ -107999,9 +108397,9 @@ var require_stream_buf = __commonJS({
107999
108397
  },
108000
108398
  async _pipe(chunk) {
108001
108399
  const write3 = function(pipe) {
108002
- return new Promise((resolve6) => {
108400
+ return new Promise((resolve7) => {
108003
108401
  pipe.write(chunk.toBuffer(), () => {
108004
- resolve6();
108402
+ resolve7();
108005
108403
  });
108006
108404
  });
108007
108405
  };
@@ -108413,14 +108811,14 @@ var require_ed5 = __commonJS({
108413
108811
  var TAB = 9;
108414
108812
  var NL = 10;
108415
108813
  var CR = 13;
108416
- var SPACE = 32;
108417
- exports2.S_LIST = [SPACE, NL, CR, TAB];
108814
+ var SPACE2 = 32;
108815
+ exports2.S_LIST = [SPACE2, NL, CR, TAB];
108418
108816
  function isChar(c2) {
108419
- return c2 >= SPACE && c2 <= 55295 || c2 === NL || c2 === CR || c2 === TAB || c2 >= 57344 && c2 <= 65533 || c2 >= 65536 && c2 <= 1114111;
108817
+ return c2 >= SPACE2 && c2 <= 55295 || c2 === NL || c2 === CR || c2 === TAB || c2 >= 57344 && c2 <= 65533 || c2 >= 65536 && c2 <= 1114111;
108420
108818
  }
108421
108819
  exports2.isChar = isChar;
108422
108820
  function isS(c2) {
108423
- return c2 === SPACE || c2 === NL || c2 === CR || c2 === TAB;
108821
+ return c2 === SPACE2 || c2 === NL || c2 === CR || c2 === TAB;
108424
108822
  }
108425
108823
  exports2.isS = isS;
108426
108824
  function isNameStartChar(c2) {
@@ -108454,8 +108852,8 @@ var require_ed2 = __commonJS({
108454
108852
  var TAB = 9;
108455
108853
  var NL = 10;
108456
108854
  var CR = 13;
108457
- var SPACE = 32;
108458
- exports2.S_LIST = [SPACE, NL, CR, TAB];
108855
+ var SPACE2 = 32;
108856
+ exports2.S_LIST = [SPACE2, NL, CR, TAB];
108459
108857
  function isChar(c2) {
108460
108858
  return c2 >= 1 && c2 <= 55295 || c2 >= 57344 && c2 <= 65533 || c2 >= 65536 && c2 <= 1114111;
108461
108859
  }
@@ -108469,7 +108867,7 @@ var require_ed2 = __commonJS({
108469
108867
  }
108470
108868
  exports2.isCharAndNotRestricted = isCharAndNotRestricted;
108471
108869
  function isS(c2) {
108472
- return c2 === SPACE || c2 === NL || c2 === CR || c2 === TAB;
108870
+ return c2 === SPACE2 || c2 === NL || c2 === CR || c2 === TAB;
108473
108871
  }
108474
108872
  exports2.isS = isS;
108475
108873
  function isNameStartChar(c2) {
@@ -108589,7 +108987,7 @@ var require_saxes = __commonJS({
108589
108987
  var TAB = 9;
108590
108988
  var NL = 10;
108591
108989
  var CR = 13;
108592
- var SPACE = 32;
108990
+ var SPACE2 = 32;
108593
108991
  var BANG = 33;
108594
108992
  var DQUOTE = 34;
108595
108993
  var AMP = 38;
@@ -108969,7 +109367,7 @@ var require_saxes = __commonJS({
108969
109367
  const code = chunk.charCodeAt(i3);
108970
109368
  this.column++;
108971
109369
  if (code < 55296) {
108972
- if (code >= SPACE || code === TAB) {
109370
+ if (code >= SPACE2 || code === TAB) {
108973
109371
  return code;
108974
109372
  }
108975
109373
  switch (code) {
@@ -109087,20 +109485,20 @@ var require_saxes = __commonJS({
109087
109485
  * instead.
109088
109486
  */
109089
109487
  captureTo(chars) {
109090
- let { i: start } = this;
109488
+ let { i: start2 } = this;
109091
109489
  const { chunk } = this;
109092
109490
  while (true) {
109093
109491
  const c2 = this.getCode();
109094
109492
  const isNLLike = c2 === NL_LIKE;
109095
109493
  const final = isNLLike ? NL : c2;
109096
109494
  if (final === EOC || chars.includes(final)) {
109097
- this.text += chunk.slice(start, this.prevI);
109495
+ this.text += chunk.slice(start2, this.prevI);
109098
109496
  return final;
109099
109497
  }
109100
109498
  if (isNLLike) {
109101
- this.text += `${chunk.slice(start, this.prevI)}
109499
+ this.text += `${chunk.slice(start2, this.prevI)}
109102
109500
  `;
109103
- start = this.i;
109501
+ start2 = this.i;
109104
109502
  }
109105
109503
  }
109106
109504
  }
@@ -109114,24 +109512,24 @@ var require_saxes = __commonJS({
109114
109512
  * end of the current chunk.
109115
109513
  */
109116
109514
  captureToChar(char) {
109117
- let { i: start } = this;
109515
+ let { i: start2 } = this;
109118
109516
  const { chunk } = this;
109119
109517
  while (true) {
109120
109518
  let c2 = this.getCode();
109121
109519
  switch (c2) {
109122
109520
  case NL_LIKE:
109123
- this.text += `${chunk.slice(start, this.prevI)}
109521
+ this.text += `${chunk.slice(start2, this.prevI)}
109124
109522
  `;
109125
- start = this.i;
109523
+ start2 = this.i;
109126
109524
  c2 = NL;
109127
109525
  break;
109128
109526
  case EOC:
109129
- this.text += chunk.slice(start);
109527
+ this.text += chunk.slice(start2);
109130
109528
  return false;
109131
109529
  default:
109132
109530
  }
109133
109531
  if (c2 === char) {
109134
- this.text += chunk.slice(start, this.prevI);
109532
+ this.text += chunk.slice(start2, this.prevI);
109135
109533
  return true;
109136
109534
  }
109137
109535
  }
@@ -109145,15 +109543,15 @@ var require_saxes = __commonJS({
109145
109543
  * instead.
109146
109544
  */
109147
109545
  captureNameChars() {
109148
- const { chunk, i: start } = this;
109546
+ const { chunk, i: start2 } = this;
109149
109547
  while (true) {
109150
109548
  const c2 = this.getCode();
109151
109549
  if (c2 === EOC) {
109152
- this.name += chunk.slice(start);
109550
+ this.name += chunk.slice(start2);
109153
109551
  return EOC;
109154
109552
  }
109155
109553
  if (!isNameChar(c2)) {
109156
- this.name += chunk.slice(start, this.prevI);
109554
+ this.name += chunk.slice(start2, this.prevI);
109157
109555
  return c2 === NL_LIKE ? NL : c2;
109158
109556
  }
109159
109557
  }
@@ -109334,19 +109732,19 @@ var require_saxes = __commonJS({
109334
109732
  }
109335
109733
  }
109336
109734
  sEntity() {
109337
- let { i: start } = this;
109735
+ let { i: start2 } = this;
109338
109736
  const { chunk } = this;
109339
109737
  loop:
109340
109738
  while (true) {
109341
109739
  switch (this.getCode()) {
109342
109740
  case NL_LIKE:
109343
- this.entity += `${chunk.slice(start, this.prevI)}
109741
+ this.entity += `${chunk.slice(start2, this.prevI)}
109344
109742
  `;
109345
- start = this.i;
109743
+ start2 = this.i;
109346
109744
  break;
109347
109745
  case SEMICOLON: {
109348
109746
  const { entityReturnState } = this;
109349
- const entity = this.entity + chunk.slice(start, this.prevI);
109747
+ const entity = this.entity + chunk.slice(start2, this.prevI);
109350
109748
  this.state = entityReturnState;
109351
109749
  let parsed;
109352
109750
  if (entity === "") {
@@ -109362,7 +109760,7 @@ var require_saxes = __commonJS({
109362
109760
  break loop;
109363
109761
  }
109364
109762
  case EOC:
109365
- this.entity += chunk.slice(start);
109763
+ this.entity += chunk.slice(start2);
109366
109764
  break loop;
109367
109765
  default:
109368
109766
  }
@@ -109503,15 +109901,15 @@ var require_saxes = __commonJS({
109503
109901
  }
109504
109902
  }
109505
109903
  sPIRest() {
109506
- const { chunk, i: start } = this;
109904
+ const { chunk, i: start2 } = this;
109507
109905
  while (true) {
109508
109906
  const c2 = this.getCodeNorm();
109509
109907
  if (c2 === EOC) {
109510
- this.piTarget += chunk.slice(start);
109908
+ this.piTarget += chunk.slice(start2);
109511
109909
  return;
109512
109910
  }
109513
109911
  if (!this.nameCheck(c2)) {
109514
- this.piTarget += chunk.slice(start, this.prevI);
109912
+ this.piTarget += chunk.slice(start2, this.prevI);
109515
109913
  const isQuestion = c2 === QUESTION;
109516
109914
  if (isQuestion || isS(c2)) {
109517
109915
  if (this.piTarget === "xml") {
@@ -109630,7 +110028,7 @@ var require_saxes = __commonJS({
109630
110028
  }
109631
110029
  if (!isQuote(c2)) {
109632
110030
  this.fail("value must be quoted.");
109633
- this.q = SPACE;
110031
+ this.q = SPACE2;
109634
110032
  } else {
109635
110033
  this.q = c2;
109636
110034
  }
@@ -109818,32 +110216,32 @@ var require_saxes = __commonJS({
109818
110216
  }
109819
110217
  sAttribValueQuoted() {
109820
110218
  const { q: q2, chunk } = this;
109821
- let { i: start } = this;
110219
+ let { i: start2 } = this;
109822
110220
  while (true) {
109823
110221
  switch (this.getCode()) {
109824
110222
  case q2:
109825
- this.pushAttrib(this.name, this.text + chunk.slice(start, this.prevI));
110223
+ this.pushAttrib(this.name, this.text + chunk.slice(start2, this.prevI));
109826
110224
  this.name = this.text = "";
109827
110225
  this.q = null;
109828
110226
  this.state = S_ATTRIB_VALUE_CLOSED;
109829
110227
  return;
109830
110228
  case AMP:
109831
- this.text += chunk.slice(start, this.prevI);
110229
+ this.text += chunk.slice(start2, this.prevI);
109832
110230
  this.state = S_ENTITY;
109833
110231
  this.entityReturnState = S_ATTRIB_VALUE_QUOTED;
109834
110232
  return;
109835
110233
  case NL:
109836
110234
  case NL_LIKE:
109837
110235
  case TAB:
109838
- this.text += `${chunk.slice(start, this.prevI)} `;
109839
- start = this.i;
110236
+ this.text += `${chunk.slice(start2, this.prevI)} `;
110237
+ start2 = this.i;
109840
110238
  break;
109841
110239
  case LESS:
109842
- this.text += chunk.slice(start, this.prevI);
110240
+ this.text += chunk.slice(start2, this.prevI);
109843
110241
  this.fail("disallowed character.");
109844
110242
  return;
109845
110243
  case EOC:
109846
- this.text += chunk.slice(start);
110244
+ this.text += chunk.slice(start2);
109847
110245
  return;
109848
110246
  default:
109849
110247
  }
@@ -109913,7 +110311,7 @@ var require_saxes = __commonJS({
109913
110311
  }
109914
110312
  // END OF STATE ENGINE METHODS
109915
110313
  handleTextInRoot() {
109916
- let { i: start, forbiddenState } = this;
110314
+ let { i: start2, forbiddenState } = this;
109917
110315
  const { chunk, textHandler: handler } = this;
109918
110316
  scanLoop:
109919
110317
  while (true) {
@@ -109922,7 +110320,7 @@ var require_saxes = __commonJS({
109922
110320
  this.state = S_OPEN_WAKA;
109923
110321
  if (handler !== void 0) {
109924
110322
  const { text } = this;
109925
- const slice = chunk.slice(start, this.prevI);
110323
+ const slice = chunk.slice(start2, this.prevI);
109926
110324
  if (text.length !== 0) {
109927
110325
  handler(text + slice);
109928
110326
  this.text = "";
@@ -109937,7 +110335,7 @@ var require_saxes = __commonJS({
109937
110335
  this.state = S_ENTITY;
109938
110336
  this.entityReturnState = S_TEXT;
109939
110337
  if (handler !== void 0) {
109940
- this.text += chunk.slice(start, this.prevI);
110338
+ this.text += chunk.slice(start2, this.prevI);
109941
110339
  }
109942
110340
  forbiddenState = FORBIDDEN_START;
109943
110341
  break scanLoop;
@@ -109963,15 +110361,15 @@ var require_saxes = __commonJS({
109963
110361
  break;
109964
110362
  case NL_LIKE:
109965
110363
  if (handler !== void 0) {
109966
- this.text += `${chunk.slice(start, this.prevI)}
110364
+ this.text += `${chunk.slice(start2, this.prevI)}
109967
110365
  `;
109968
110366
  }
109969
- start = this.i;
110367
+ start2 = this.i;
109970
110368
  forbiddenState = FORBIDDEN_START;
109971
110369
  break;
109972
110370
  case EOC:
109973
110371
  if (handler !== void 0) {
109974
- this.text += chunk.slice(start);
110372
+ this.text += chunk.slice(start2);
109975
110373
  }
109976
110374
  break scanLoop;
109977
110375
  default:
@@ -109981,7 +110379,7 @@ var require_saxes = __commonJS({
109981
110379
  this.forbiddenState = forbiddenState;
109982
110380
  }
109983
110381
  handleTextOutsideRoot() {
109984
- let { i: start } = this;
110382
+ let { i: start2 } = this;
109985
110383
  const { chunk, textHandler: handler } = this;
109986
110384
  let nonSpace = false;
109987
110385
  outRootLoop:
@@ -109992,7 +110390,7 @@ var require_saxes = __commonJS({
109992
110390
  this.state = S_OPEN_WAKA;
109993
110391
  if (handler !== void 0) {
109994
110392
  const { text } = this;
109995
- const slice = chunk.slice(start, this.prevI);
110393
+ const slice = chunk.slice(start2, this.prevI);
109996
110394
  if (text.length !== 0) {
109997
110395
  handler(text + slice);
109998
110396
  this.text = "";
@@ -110006,20 +110404,20 @@ var require_saxes = __commonJS({
110006
110404
  this.state = S_ENTITY;
110007
110405
  this.entityReturnState = S_TEXT;
110008
110406
  if (handler !== void 0) {
110009
- this.text += chunk.slice(start, this.prevI);
110407
+ this.text += chunk.slice(start2, this.prevI);
110010
110408
  }
110011
110409
  nonSpace = true;
110012
110410
  break outRootLoop;
110013
110411
  case NL_LIKE:
110014
110412
  if (handler !== void 0) {
110015
- this.text += `${chunk.slice(start, this.prevI)}
110413
+ this.text += `${chunk.slice(start2, this.prevI)}
110016
110414
  `;
110017
110415
  }
110018
- start = this.i;
110416
+ start2 = this.i;
110019
110417
  break;
110020
110418
  case EOC:
110021
110419
  if (handler !== void 0) {
110022
- this.text += chunk.slice(start);
110420
+ this.text += chunk.slice(start2);
110023
110421
  }
110024
110422
  break outRootLoop;
110025
110423
  default:
@@ -120036,12 +120434,12 @@ var require_xlsx = __commonJS({
120036
120434
  var VmlNotesXform = require_vml_notes_xform();
120037
120435
  var theme1Xml = require_theme1();
120038
120436
  function fsReadFileAsync(filename, options) {
120039
- return new Promise((resolve6, reject) => {
120437
+ return new Promise((resolve7, reject) => {
120040
120438
  fs2.readFile(filename, options, (error2, data) => {
120041
120439
  if (error2) {
120042
120440
  reject(error2);
120043
120441
  } else {
120044
- resolve6(data);
120442
+ resolve7(data);
120045
120443
  }
120046
120444
  });
120047
120445
  });
@@ -120168,7 +120566,7 @@ var require_xlsx = __commonJS({
120168
120566
  if (lastDot >= 1) {
120169
120567
  const extension = filename.substr(lastDot + 1);
120170
120568
  const name = filename.substr(0, lastDot);
120171
- await new Promise((resolve6, reject) => {
120569
+ await new Promise((resolve7, reject) => {
120172
120570
  const streamBuf = new StreamBuf();
120173
120571
  streamBuf.on("finish", () => {
120174
120572
  model.mediaIndex[filename] = model.media.length;
@@ -120180,7 +120578,7 @@ var require_xlsx = __commonJS({
120180
120578
  buffer: streamBuf.toBuffer()
120181
120579
  };
120182
120580
  model.media.push(medium);
120183
- resolve6();
120581
+ resolve7();
120184
120582
  });
120185
120583
  entry.on("error", (error2) => {
120186
120584
  reject(error2);
@@ -120205,13 +120603,13 @@ var require_xlsx = __commonJS({
120205
120603
  model.vmlDrawings[`../drawings/${name}.vml`] = vmlDrawing;
120206
120604
  }
120207
120605
  async _processThemeEntry(entry, model, name) {
120208
- await new Promise((resolve6, reject) => {
120606
+ await new Promise((resolve7, reject) => {
120209
120607
  const stream = new StreamBuf();
120210
120608
  entry.on("error", reject);
120211
120609
  stream.on("error", reject);
120212
120610
  stream.on("finish", () => {
120213
120611
  model.themes[name] = stream.read().toString();
120214
- resolve6();
120612
+ resolve7();
120215
120613
  });
120216
120614
  entry.pipe(stream);
120217
120615
  });
@@ -120519,9 +120917,9 @@ var require_xlsx = __commonJS({
120519
120917
  });
120520
120918
  }
120521
120919
  _finalize(zip) {
120522
- return new Promise((resolve6, reject) => {
120920
+ return new Promise((resolve7, reject) => {
120523
120921
  zip.on("finish", () => {
120524
- resolve6(this);
120922
+ resolve7(this);
120525
120923
  });
120526
120924
  zip.on("error", reject);
120527
120925
  zip.finalize();
@@ -120581,9 +120979,9 @@ var require_xlsx = __commonJS({
120581
120979
  }
120582
120980
  writeFile(filename, options) {
120583
120981
  const stream = fs2.createWriteStream(filename);
120584
- return new Promise((resolve6, reject) => {
120982
+ return new Promise((resolve7, reject) => {
120585
120983
  stream.on("finish", () => {
120586
- resolve6();
120984
+ resolve7();
120587
120985
  });
120588
120986
  stream.on("error", (error2) => {
120589
120987
  reject(error2);
@@ -120817,8 +121215,8 @@ var require_lodash2 = __commonJS({
120817
121215
  return result;
120818
121216
  }
120819
121217
  function overArg(func, transform) {
120820
- return function(arg) {
120821
- return func(transform(arg));
121218
+ return function(arg2) {
121219
+ return func(transform(arg2));
120822
121220
  };
120823
121221
  }
120824
121222
  function setToArray(set) {
@@ -121467,11 +121865,11 @@ var require_lodash5 = __commonJS({
121467
121865
  function toString(value) {
121468
121866
  return value == null ? "" : baseToString(value);
121469
121867
  }
121470
- function escapeRegExp(string) {
121868
+ function escapeRegExp2(string) {
121471
121869
  string = toString(string);
121472
121870
  return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
121473
121871
  }
121474
- module2.exports = escapeRegExp;
121872
+ module2.exports = escapeRegExp2;
121475
121873
  }
121476
121874
  });
121477
121875
 
@@ -122487,8 +122885,8 @@ var require_lodash8 = __commonJS({
122487
122885
  return result;
122488
122886
  }
122489
122887
  function overArg(func, transform) {
122490
- return function(arg) {
122491
- return func(transform(arg));
122888
+ return function(arg2) {
122889
+ return func(transform(arg2));
122492
122890
  };
122493
122891
  }
122494
122892
  function setToArray(set) {
@@ -124708,7 +125106,7 @@ var require_csv = __commonJS({
124708
125106
  }
124709
125107
  read(stream, options) {
124710
125108
  options = options || {};
124711
- return new Promise((resolve6, reject) => {
125109
+ return new Promise((resolve7, reject) => {
124712
125110
  const worksheet = this.workbook.addWorksheet(options.sheetName);
124713
125111
  const dateFormats = options.dateFormats || [
124714
125112
  "YYYY-MM-DD[T]HH:mm:ssZ",
@@ -124748,7 +125146,7 @@ var require_csv = __commonJS({
124748
125146
  }).on("end", () => {
124749
125147
  csvStream.emit("worksheet", worksheet);
124750
125148
  });
124751
- csvStream.on("worksheet", resolve6).on("error", reject);
125149
+ csvStream.on("worksheet", resolve7).on("error", reject);
124752
125150
  stream.pipe(csvStream);
124753
125151
  });
124754
125152
  }
@@ -124761,12 +125159,12 @@ var require_csv = __commonJS({
124761
125159
  );
124762
125160
  }
124763
125161
  write(stream, options) {
124764
- return new Promise((resolve6, reject) => {
125162
+ return new Promise((resolve7, reject) => {
124765
125163
  options = options || {};
124766
125164
  const worksheet = this.workbook.getWorksheet(options.sheetName || options.sheetId);
124767
125165
  const csvStream = fastCsv.format(options.formatterOptions);
124768
125166
  stream.on("finish", () => {
124769
- resolve6();
125167
+ resolve7();
124770
125168
  });
124771
125169
  csvStream.on("error", reject);
124772
125170
  csvStream.pipe(stream);
@@ -126005,9 +126403,9 @@ var require_readdir_glob = __commonJS({
126005
126403
  var fs2 = __require("fs");
126006
126404
  var { EventEmitter } = __require("events");
126007
126405
  var { Minimatch } = require_minimatch();
126008
- var { resolve: resolve6 } = __require("path");
126406
+ var { resolve: resolve7 } = __require("path");
126009
126407
  function readdir3(dir, strict) {
126010
- return new Promise((resolve7, reject) => {
126408
+ return new Promise((resolve8, reject) => {
126011
126409
  fs2.readdir(dir, { withFileTypes: true }, (err2, files) => {
126012
126410
  if (err2) {
126013
126411
  switch (err2.code) {
@@ -126015,7 +126413,7 @@ var require_readdir_glob = __commonJS({
126015
126413
  if (strict) {
126016
126414
  reject(err2);
126017
126415
  } else {
126018
- resolve7([]);
126416
+ resolve8([]);
126019
126417
  }
126020
126418
  break;
126021
126419
  case "ENOTSUP":
@@ -126025,7 +126423,7 @@ var require_readdir_glob = __commonJS({
126025
126423
  case "ENAMETOOLONG":
126026
126424
  // Filename too long
126027
126425
  case "UNKNOWN":
126028
- resolve7([]);
126426
+ resolve8([]);
126029
126427
  break;
126030
126428
  case "ELOOP":
126031
126429
  // Too many levels of symbolic links
@@ -126034,30 +126432,30 @@ var require_readdir_glob = __commonJS({
126034
126432
  break;
126035
126433
  }
126036
126434
  } else {
126037
- resolve7(files);
126435
+ resolve8(files);
126038
126436
  }
126039
126437
  });
126040
126438
  });
126041
126439
  }
126042
126440
  function stat3(file, followSymlinks) {
126043
- return new Promise((resolve7, reject) => {
126441
+ return new Promise((resolve8, reject) => {
126044
126442
  const statFunc = followSymlinks ? fs2.stat : fs2.lstat;
126045
126443
  statFunc(file, (err2, stats) => {
126046
126444
  if (err2) {
126047
126445
  switch (err2.code) {
126048
126446
  case "ENOENT":
126049
126447
  if (followSymlinks) {
126050
- resolve7(stat3(file, false));
126448
+ resolve8(stat3(file, false));
126051
126449
  } else {
126052
- resolve7(null);
126450
+ resolve8(null);
126053
126451
  }
126054
126452
  break;
126055
126453
  default:
126056
- resolve7(null);
126454
+ resolve8(null);
126057
126455
  break;
126058
126456
  }
126059
126457
  } else {
126060
- resolve7(stats);
126458
+ resolve8(stats);
126061
126459
  }
126062
126460
  });
126063
126461
  });
@@ -126147,7 +126545,7 @@ var require_readdir_glob = __commonJS({
126147
126545
  (skip) => new Minimatch(skip, { dot: true })
126148
126546
  );
126149
126547
  }
126150
- this.iterator = explore(resolve6(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this));
126548
+ this.iterator = explore(resolve7(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this));
126151
126549
  this.paused = false;
126152
126550
  this.inactive = false;
126153
126551
  this.aborted = false;
@@ -126314,10 +126712,10 @@ var require_async = __commonJS({
126314
126712
  if (typeof args[arity - 1] === "function") {
126315
126713
  return asyncFn.apply(this, args);
126316
126714
  }
126317
- return new Promise((resolve6, reject2) => {
126715
+ return new Promise((resolve7, reject2) => {
126318
126716
  args[arity - 1] = (err2, ...cbArgs) => {
126319
126717
  if (err2) return reject2(err2);
126320
- resolve6(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
126718
+ resolve7(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
126321
126719
  };
126322
126720
  asyncFn.apply(this, args);
126323
126721
  });
@@ -126563,13 +126961,13 @@ var require_async = __commonJS({
126563
126961
  var applyEachSeries = applyEach$1(mapSeries$1);
126564
126962
  const PROMISE_SYMBOL = /* @__PURE__ */ Symbol("promiseCallback");
126565
126963
  function promiseCallback() {
126566
- let resolve6, reject2;
126964
+ let resolve7, reject2;
126567
126965
  function callback(err2, ...args) {
126568
126966
  if (err2) return reject2(err2);
126569
- resolve6(args.length > 1 ? args : args[0]);
126967
+ resolve7(args.length > 1 ? args : args[0]);
126570
126968
  }
126571
126969
  callback[PROMISE_SYMBOL] = new Promise((res, rej) => {
126572
- resolve6 = res, reject2 = rej;
126970
+ resolve7 = res, reject2 = rej;
126573
126971
  });
126574
126972
  return callback;
126575
126973
  }
@@ -126632,8 +127030,8 @@ var require_async = __commonJS({
126632
127030
  return callback(null, results);
126633
127031
  }
126634
127032
  while (readyTasks.length && runningTasks < concurrency) {
126635
- var run5 = readyTasks.shift();
126636
- run5();
127033
+ var run3 = readyTasks.shift();
127034
+ run3();
126637
127035
  }
126638
127036
  }
126639
127037
  function addListener(taskName, fn2) {
@@ -126748,7 +127146,7 @@ var require_async = __commonJS({
126748
127146
  }
126749
127147
  if (!match) throw new Error("could not parse args in autoInject\nSource:\n" + src);
126750
127148
  let [, args] = match;
126751
- return args.replace(/\s/g, "").split(FN_ARG_SPLIT).map((arg) => arg.replace(FN_ARG, "").trim());
127149
+ return args.replace(/\s/g, "").split(FN_ARG_SPLIT).map((arg2) => arg2.replace(FN_ARG, "").trim());
126752
127150
  }
126753
127151
  function autoInject(tasks, callback) {
126754
127152
  var newTasks = {};
@@ -126916,8 +127314,8 @@ var require_async = __commonJS({
126916
127314
  });
126917
127315
  }
126918
127316
  if (rejectOnError || !callback) {
126919
- return new Promise((resolve6, reject2) => {
126920
- res = resolve6;
127317
+ return new Promise((resolve7, reject2) => {
127318
+ res = resolve7;
126921
127319
  rej = reject2;
126922
127320
  });
126923
127321
  }
@@ -126956,10 +127354,10 @@ var require_async = __commonJS({
126956
127354
  }
126957
127355
  const eventMethod = (name) => (handler) => {
126958
127356
  if (!handler) {
126959
- return new Promise((resolve6, reject2) => {
127357
+ return new Promise((resolve7, reject2) => {
126960
127358
  once2(name, (err2, data) => {
126961
127359
  if (err2) return reject2(err2);
126962
- resolve6(data);
127360
+ resolve7(data);
126963
127361
  });
126964
127362
  });
126965
127363
  }
@@ -128148,10 +128546,10 @@ var require_polyfills = __commonJS({
128148
128546
  if (platform === "win32") {
128149
128547
  fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : (function(fs$rename) {
128150
128548
  function rename2(from, to2, cb) {
128151
- var start = Date.now();
128549
+ var start2 = Date.now();
128152
128550
  var backoff = 0;
128153
128551
  fs$rename(from, to2, function CB(er2) {
128154
- if (er2 && (er2.code === "EACCES" || er2.code === "EPERM" || er2.code === "EBUSY") && Date.now() - start < 6e4) {
128552
+ if (er2 && (er2.code === "EACCES" || er2.code === "EPERM" || er2.code === "EBUSY") && Date.now() - start2 < 6e4) {
128155
128553
  setTimeout(function() {
128156
128554
  fs2.stat(to2, function(stater, st2) {
128157
128555
  if (stater && stater.code === "ENOENT")
@@ -128749,7 +129147,7 @@ var require_graceful_fs = __commonJS({
128749
129147
  }
128750
129148
  function ReadStream$open() {
128751
129149
  var that = this;
128752
- open(that.path, that.flags, that.mode, function(err2, fd2) {
129150
+ open2(that.path, that.flags, that.mode, function(err2, fd2) {
128753
129151
  if (err2) {
128754
129152
  if (that.autoClose)
128755
129153
  that.destroy();
@@ -128769,7 +129167,7 @@ var require_graceful_fs = __commonJS({
128769
129167
  }
128770
129168
  function WriteStream$open() {
128771
129169
  var that = this;
128772
- open(that.path, that.flags, that.mode, function(err2, fd2) {
129170
+ open2(that.path, that.flags, that.mode, function(err2, fd2) {
128773
129171
  if (err2) {
128774
129172
  that.destroy();
128775
129173
  that.emit("error", err2);
@@ -128786,8 +129184,8 @@ var require_graceful_fs = __commonJS({
128786
129184
  return new fs3.WriteStream(path, options);
128787
129185
  }
128788
129186
  var fs$open = fs3.open;
128789
- fs3.open = open;
128790
- function open(path, flags, mode, cb) {
129187
+ fs3.open = open2;
129188
+ function open2(path, flags, mode, cb) {
128791
129189
  if (typeof mode === "function")
128792
129190
  cb = mode, mode = null;
128793
129191
  return go$open(path, flags, mode, cb);
@@ -129003,19 +129401,19 @@ var require_lodash9 = __commonJS({
129003
129401
  }
129004
129402
  return result;
129005
129403
  }
129006
- function baseRest(func, start) {
129007
- start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
129404
+ function baseRest(func, start2) {
129405
+ start2 = nativeMax(start2 === void 0 ? func.length - 1 : start2, 0);
129008
129406
  return function() {
129009
- var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
129407
+ var args = arguments, index = -1, length = nativeMax(args.length - start2, 0), array = Array(length);
129010
129408
  while (++index < length) {
129011
- array[index] = args[start + index];
129409
+ array[index] = args[start2 + index];
129012
129410
  }
129013
129411
  index = -1;
129014
- var otherArgs = Array(start + 1);
129015
- while (++index < start) {
129412
+ var otherArgs = Array(start2 + 1);
129413
+ while (++index < start2) {
129016
129414
  otherArgs[index] = args[index];
129017
129415
  }
129018
- otherArgs[start] = array;
129416
+ otherArgs[start2] = array;
129019
129417
  return apply(func, this, otherArgs);
129020
129418
  };
129021
129419
  }
@@ -129509,19 +129907,19 @@ var require_lodash11 = __commonJS({
129509
129907
  var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
129510
129908
  return pattern.test(toSource(value));
129511
129909
  }
129512
- function baseRest(func, start) {
129513
- start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
129910
+ function baseRest(func, start2) {
129911
+ start2 = nativeMax(start2 === void 0 ? func.length - 1 : start2, 0);
129514
129912
  return function() {
129515
- var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
129913
+ var args = arguments, index = -1, length = nativeMax(args.length - start2, 0), array = Array(length);
129516
129914
  while (++index < length) {
129517
- array[index] = args[start + index];
129915
+ array[index] = args[start2 + index];
129518
129916
  }
129519
129917
  index = -1;
129520
- var otherArgs = Array(start + 1);
129521
- while (++index < start) {
129918
+ var otherArgs = Array(start2 + 1);
129919
+ while (++index < start2) {
129522
129920
  otherArgs[index] = args[index];
129523
129921
  }
129524
- otherArgs[start] = array;
129922
+ otherArgs[start2] = array;
129525
129923
  return apply(func, this, otherArgs);
129526
129924
  };
129527
129925
  }
@@ -129871,19 +130269,19 @@ var require_lodash12 = __commonJS({
129871
130269
  var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
129872
130270
  return pattern.test(toSource(value));
129873
130271
  }
129874
- function baseRest(func, start) {
129875
- start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
130272
+ function baseRest(func, start2) {
130273
+ start2 = nativeMax(start2 === void 0 ? func.length - 1 : start2, 0);
129876
130274
  return function() {
129877
- var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
130275
+ var args = arguments, index = -1, length = nativeMax(args.length - start2, 0), array = Array(length);
129878
130276
  while (++index < length) {
129879
- array[index] = args[start + index];
130277
+ array[index] = args[start2 + index];
129880
130278
  }
129881
130279
  index = -1;
129882
- var otherArgs = Array(start + 1);
129883
- while (++index < start) {
130280
+ var otherArgs = Array(start2 + 1);
130281
+ while (++index < start2) {
129884
130282
  otherArgs[index] = args[index];
129885
130283
  }
129886
- otherArgs[start] = array;
130284
+ otherArgs[start2] = array;
129887
130285
  return apply(func, this, otherArgs);
129888
130286
  };
129889
130287
  }
@@ -130012,8 +130410,8 @@ var require_lodash13 = __commonJS({
130012
130410
  return result;
130013
130411
  }
130014
130412
  function overArg(func, transform) {
130015
- return function(arg) {
130016
- return func(transform(arg));
130413
+ return function(arg2) {
130414
+ return func(transform(arg2));
130017
130415
  };
130018
130416
  }
130019
130417
  var funcProto = Function.prototype;
@@ -130103,8 +130501,8 @@ var require_old = __commonJS({
130103
130501
  var current;
130104
130502
  var base;
130105
130503
  var previous;
130106
- start();
130107
- function start() {
130504
+ start2();
130505
+ function start2() {
130108
130506
  var m2 = splitRootRe.exec(p2);
130109
130507
  pos = m2[0].length;
130110
130508
  current = m2[0];
@@ -130151,7 +130549,7 @@ var require_old = __commonJS({
130151
130549
  if (!isWindows) seenLinks[id] = linkTarget;
130152
130550
  }
130153
130551
  p2 = pathModule.resolve(resolvedLink, p2.slice(pos));
130154
- start();
130552
+ start2();
130155
130553
  }
130156
130554
  if (cache) cache[original] = p2;
130157
130555
  return p2;
@@ -130170,8 +130568,8 @@ var require_old = __commonJS({
130170
130568
  var current;
130171
130569
  var base;
130172
130570
  var previous;
130173
- start();
130174
- function start() {
130571
+ start2();
130572
+ function start2() {
130175
130573
  var m2 = splitRootRe.exec(p2);
130176
130574
  pos = m2[0].length;
130177
130575
  current = m2[0];
@@ -130235,7 +130633,7 @@ var require_old = __commonJS({
130235
130633
  }
130236
130634
  function gotResolvedLink(resolvedLink) {
130237
130635
  p2 = pathModule.resolve(resolvedLink, p2.slice(pos));
130238
- start();
130636
+ start2();
130239
130637
  }
130240
130638
  };
130241
130639
  }
@@ -133255,11 +133653,11 @@ var require_core = __commonJS({
133255
133653
  this._finalize();
133256
133654
  }
133257
133655
  var self2 = this;
133258
- return new Promise(function(resolve6, reject) {
133656
+ return new Promise(function(resolve7, reject) {
133259
133657
  var errored;
133260
133658
  self2._module.on("end", function() {
133261
133659
  if (!errored) {
133262
- resolve6();
133660
+ resolve7();
133263
133661
  }
133264
133662
  });
133265
133663
  self2._module.on("error", function(err2) {
@@ -135157,14 +135555,14 @@ var require_BufferList2 = __commonJS({
135157
135555
  const offset = this._offset(index);
135158
135556
  return this._bufs[offset[0]][offset[1]];
135159
135557
  };
135160
- BufferList.prototype.slice = function slice(start, end) {
135161
- if (typeof start === "number" && start < 0) {
135162
- start += this.length;
135558
+ BufferList.prototype.slice = function slice(start2, end) {
135559
+ if (typeof start2 === "number" && start2 < 0) {
135560
+ start2 += this.length;
135163
135561
  }
135164
135562
  if (typeof end === "number" && end < 0) {
135165
135563
  end += this.length;
135166
135564
  }
135167
- return this.copy(null, 0, start, end);
135565
+ return this.copy(null, 0, start2, end);
135168
135566
  };
135169
135567
  BufferList.prototype.copy = function copy(dst, dstStart, srcStart, srcEnd) {
135170
135568
  if (typeof srcStart !== "number" || srcStart < 0) {
@@ -135184,7 +135582,7 @@ var require_BufferList2 = __commonJS({
135184
135582
  const len = srcEnd - srcStart;
135185
135583
  let bytes = len;
135186
135584
  let bufoff = copy2 && dstStart || 0;
135187
- let start = off[1];
135585
+ let start2 = off[1];
135188
135586
  if (srcStart === 0 && srcEnd === this.length) {
135189
135587
  if (!copy2) {
135190
135588
  return this._bufs.length === 1 ? this._bufs[0] : Buffer2.concat(this._bufs, this.length);
@@ -135195,43 +135593,43 @@ var require_BufferList2 = __commonJS({
135195
135593
  }
135196
135594
  return dst;
135197
135595
  }
135198
- if (bytes <= this._bufs[off[0]].length - start) {
135199
- return copy2 ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) : this._bufs[off[0]].slice(start, start + bytes);
135596
+ if (bytes <= this._bufs[off[0]].length - start2) {
135597
+ return copy2 ? this._bufs[off[0]].copy(dst, dstStart, start2, start2 + bytes) : this._bufs[off[0]].slice(start2, start2 + bytes);
135200
135598
  }
135201
135599
  if (!copy2) {
135202
135600
  dst = Buffer2.allocUnsafe(len);
135203
135601
  }
135204
135602
  for (let i3 = off[0]; i3 < this._bufs.length; i3++) {
135205
- const l3 = this._bufs[i3].length - start;
135603
+ const l3 = this._bufs[i3].length - start2;
135206
135604
  if (bytes > l3) {
135207
- this._bufs[i3].copy(dst, bufoff, start);
135605
+ this._bufs[i3].copy(dst, bufoff, start2);
135208
135606
  bufoff += l3;
135209
135607
  } else {
135210
- this._bufs[i3].copy(dst, bufoff, start, start + bytes);
135608
+ this._bufs[i3].copy(dst, bufoff, start2, start2 + bytes);
135211
135609
  bufoff += l3;
135212
135610
  break;
135213
135611
  }
135214
135612
  bytes -= l3;
135215
- if (start) {
135216
- start = 0;
135613
+ if (start2) {
135614
+ start2 = 0;
135217
135615
  }
135218
135616
  }
135219
135617
  if (dst.length > bufoff) return dst.slice(0, bufoff);
135220
135618
  return dst;
135221
135619
  };
135222
- BufferList.prototype.shallowSlice = function shallowSlice(start, end) {
135223
- start = start || 0;
135620
+ BufferList.prototype.shallowSlice = function shallowSlice(start2, end) {
135621
+ start2 = start2 || 0;
135224
135622
  end = typeof end !== "number" ? this.length : end;
135225
- if (start < 0) {
135226
- start += this.length;
135623
+ if (start2 < 0) {
135624
+ start2 += this.length;
135227
135625
  }
135228
135626
  if (end < 0) {
135229
135627
  end += this.length;
135230
135628
  }
135231
- if (start === end) {
135629
+ if (start2 === end) {
135232
135630
  return this._new();
135233
135631
  }
135234
- const startOffset = this._offset(start);
135632
+ const startOffset = this._offset(start2);
135235
135633
  const endOffset = this._offset(end);
135236
135634
  const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1);
135237
135635
  if (endOffset[1] === 0) {
@@ -135244,8 +135642,8 @@ var require_BufferList2 = __commonJS({
135244
135642
  }
135245
135643
  return this._new(buffers);
135246
135644
  };
135247
- BufferList.prototype.toString = function toString(encoding, start, end) {
135248
- return this.slice(start, end).toString(encoding);
135645
+ BufferList.prototype.toString = function toString(encoding, start2, end) {
135646
+ return this.slice(start2, end).toString(encoding);
135249
135647
  };
135250
135648
  BufferList.prototype.consume = function consume(bytes) {
135251
135649
  bytes = Math.trunc(bytes);
@@ -135784,8 +136182,8 @@ var require_extract = __commonJS({
135784
136182
  };
135785
136183
  var onstreamend = function() {
135786
136184
  self2._stream = null;
135787
- var drain = overflow(self2._header.size);
135788
- if (drain) self2._parse(drain, ondrain);
136185
+ var drain2 = overflow(self2._header.size);
136186
+ if (drain2) self2._parse(drain2, ondrain);
135789
136187
  else self2._parse(512, onheader);
135790
136188
  if (!self2._locked) oncontinue();
135791
136189
  };
@@ -136033,7 +136431,7 @@ var require_pack = __commonJS({
136033
136431
  var alloc = Buffer.alloc;
136034
136432
  var Readable = require_readable2().Readable;
136035
136433
  var Writable = require_readable2().Writable;
136036
- var StringDecoder = __require("string_decoder").StringDecoder;
136434
+ var StringDecoder2 = __require("string_decoder").StringDecoder;
136037
136435
  var headers = require_headers();
136038
136436
  var DMODE = parseInt("755", 8);
136039
136437
  var FMODE = parseInt("644", 8);
@@ -136079,7 +136477,7 @@ var require_pack = __commonJS({
136079
136477
  var LinkSink = function() {
136080
136478
  Writable.call(this);
136081
136479
  this.linkname = "";
136082
- this._decoder = new StringDecoder("utf-8");
136480
+ this._decoder = new StringDecoder2("utf-8");
136083
136481
  this._destroyed = false;
136084
136482
  };
136085
136483
  inherits2(LinkSink, Writable);
@@ -136231,9 +136629,9 @@ var require_pack = __commonJS({
136231
136629
  this.push(headers.encode(newHeader));
136232
136630
  };
136233
136631
  Pack.prototype._read = function(n2) {
136234
- var drain = this._drain;
136632
+ var drain2 = this._drain;
136235
136633
  this._drain = noop;
136236
- drain();
136634
+ drain2();
136237
136635
  };
136238
136636
  module2.exports = Pack;
136239
136637
  }
@@ -137001,7 +137399,7 @@ var require_worksheet_writer = __commonJS({
137001
137399
  // =========================================================================
137002
137400
  // Worksheet Protection
137003
137401
  protect(password, options) {
137004
- return new Promise((resolve6) => {
137402
+ return new Promise((resolve7) => {
137005
137403
  this.sheetProtection = {
137006
137404
  sheet: true
137007
137405
  };
@@ -137025,7 +137423,7 @@ var require_worksheet_writer = __commonJS({
137025
137423
  delete this.sheetProtection.spinCount;
137026
137424
  }
137027
137425
  }
137028
- resolve6();
137426
+ resolve7();
137029
137427
  });
137030
137428
  }
137031
137429
  unprotect() {
@@ -137243,9 +137641,9 @@ var require_workbook_writer = __commonJS({
137243
137641
  _commitWorksheets() {
137244
137642
  const commitWorksheet = function(worksheet) {
137245
137643
  if (!worksheet.committed) {
137246
- return new Promise((resolve6) => {
137644
+ return new Promise((resolve7) => {
137247
137645
  worksheet.stream.on("zipped", () => {
137248
- resolve6();
137646
+ resolve7();
137249
137647
  });
137250
137648
  worksheet.commit();
137251
137649
  });
@@ -137333,19 +137731,19 @@ var require_workbook_writer = __commonJS({
137333
137731
  return void 0;
137334
137732
  }
137335
137733
  addStyles() {
137336
- return new Promise((resolve6) => {
137734
+ return new Promise((resolve7) => {
137337
137735
  this.zip.append(this.styles.xml, { name: "xl/styles.xml" });
137338
- resolve6();
137736
+ resolve7();
137339
137737
  });
137340
137738
  }
137341
137739
  addThemes() {
137342
- return new Promise((resolve6) => {
137740
+ return new Promise((resolve7) => {
137343
137741
  this.zip.append(theme1Xml, { name: "xl/theme/theme1.xml" });
137344
- resolve6();
137742
+ resolve7();
137345
137743
  });
137346
137744
  }
137347
137745
  addOfficeRels() {
137348
- return new Promise((resolve6) => {
137746
+ return new Promise((resolve7) => {
137349
137747
  const xform = new RelationshipsXform();
137350
137748
  const xml = xform.toXml([
137351
137749
  { Id: "rId1", Type: RelType.OfficeDocument, Target: "xl/workbook.xml" },
@@ -137353,11 +137751,11 @@ var require_workbook_writer = __commonJS({
137353
137751
  { Id: "rId3", Type: RelType.ExtenderProperties, Target: "docProps/app.xml" }
137354
137752
  ]);
137355
137753
  this.zip.append(xml, { name: "/_rels/.rels" });
137356
- resolve6();
137754
+ resolve7();
137357
137755
  });
137358
137756
  }
137359
137757
  addContentTypes() {
137360
- return new Promise((resolve6) => {
137758
+ return new Promise((resolve7) => {
137361
137759
  const model = {
137362
137760
  worksheets: this._worksheets.filter(Boolean),
137363
137761
  sharedStrings: this.sharedStrings,
@@ -137367,7 +137765,7 @@ var require_workbook_writer = __commonJS({
137367
137765
  const xform = new ContentTypesXform();
137368
137766
  const xml = xform.toXml(model);
137369
137767
  this.zip.append(xml, { name: "[Content_Types].xml" });
137370
- resolve6();
137768
+ resolve7();
137371
137769
  });
137372
137770
  }
137373
137771
  addMedia() {
@@ -137392,31 +137790,31 @@ var require_workbook_writer = __commonJS({
137392
137790
  );
137393
137791
  }
137394
137792
  addApp() {
137395
- return new Promise((resolve6) => {
137793
+ return new Promise((resolve7) => {
137396
137794
  const model = {
137397
137795
  worksheets: this._worksheets.filter(Boolean)
137398
137796
  };
137399
137797
  const xform = new AppXform();
137400
137798
  const xml = xform.toXml(model);
137401
137799
  this.zip.append(xml, { name: "docProps/app.xml" });
137402
- resolve6();
137800
+ resolve7();
137403
137801
  });
137404
137802
  }
137405
137803
  addCore() {
137406
- return new Promise((resolve6) => {
137804
+ return new Promise((resolve7) => {
137407
137805
  const coreXform = new CoreXform();
137408
137806
  const xml = coreXform.toXml(this);
137409
137807
  this.zip.append(xml, { name: "docProps/core.xml" });
137410
- resolve6();
137808
+ resolve7();
137411
137809
  });
137412
137810
  }
137413
137811
  addSharedStrings() {
137414
137812
  if (this.sharedStrings.count) {
137415
- return new Promise((resolve6) => {
137813
+ return new Promise((resolve7) => {
137416
137814
  const sharedStringsXform = new SharedStringsXform();
137417
137815
  const xml = sharedStringsXform.toXml(this.sharedStrings);
137418
137816
  this.zip.append(xml, { name: "/xl/sharedStrings.xml" });
137419
- resolve6();
137817
+ resolve7();
137420
137818
  });
137421
137819
  }
137422
137820
  return Promise.resolve();
@@ -137444,11 +137842,11 @@ var require_workbook_writer = __commonJS({
137444
137842
  });
137445
137843
  }
137446
137844
  });
137447
- return new Promise((resolve6) => {
137845
+ return new Promise((resolve7) => {
137448
137846
  const xform = new RelationshipsXform();
137449
137847
  const xml = xform.toXml(relationships);
137450
137848
  this.zip.append(xml, { name: "/xl/_rels/workbook.xml.rels" });
137451
- resolve6();
137849
+ resolve7();
137452
137850
  });
137453
137851
  }
137454
137852
  addWorkbook() {
@@ -137460,18 +137858,18 @@ var require_workbook_writer = __commonJS({
137460
137858
  properties: {},
137461
137859
  calcProperties: {}
137462
137860
  };
137463
- return new Promise((resolve6) => {
137861
+ return new Promise((resolve7) => {
137464
137862
  const xform = new WorkbookXform();
137465
137863
  xform.prepare(model);
137466
137864
  zip.append(xform.toXml(model), { name: "/xl/workbook.xml" });
137467
- resolve6();
137865
+ resolve7();
137468
137866
  });
137469
137867
  }
137470
137868
  _finalize() {
137471
- return new Promise((resolve6, reject) => {
137869
+ return new Promise((resolve7, reject) => {
137472
137870
  this.stream.on("error", reject);
137473
137871
  this.stream.on("finish", () => {
137474
- resolve6(this);
137872
+ resolve7(this);
137475
137873
  });
137476
137874
  this.zip.on("error", reject);
137477
137875
  this.zip.finalize();
@@ -137992,8 +138390,8 @@ var require_buffers = __commonJS({
137992
138390
  }
137993
138391
  return this.length;
137994
138392
  };
137995
- Buffers.prototype.copy = function(dst, dStart, start, end) {
137996
- return this.slice(start, end).copy(dst, dStart, 0, end - start);
138393
+ Buffers.prototype.copy = function(dst, dStart, start2, end) {
138394
+ return this.slice(start2, end).copy(dst, dStart, 0, end - start2);
137997
138395
  };
137998
138396
  Buffers.prototype.splice = function(i3, howMany) {
137999
138397
  var buffers = this.buffers;
@@ -138014,17 +138412,17 @@ var require_buffers = __commonJS({
138014
138412
  startBytes += buffers[ii2].length;
138015
138413
  }
138016
138414
  if (index - startBytes > 0) {
138017
- var start = index - startBytes;
138018
- if (start + howMany < buffers[ii2].length) {
138019
- removed.push(buffers[ii2].slice(start, start + howMany));
138415
+ var start2 = index - startBytes;
138416
+ if (start2 + howMany < buffers[ii2].length) {
138417
+ removed.push(buffers[ii2].slice(start2, start2 + howMany));
138020
138418
  var orig = buffers[ii2];
138021
- var buf0 = new Buffer(start);
138022
- for (var i3 = 0; i3 < start; i3++) {
138419
+ var buf0 = new Buffer(start2);
138420
+ for (var i3 = 0; i3 < start2; i3++) {
138023
138421
  buf0[i3] = orig[i3];
138024
138422
  }
138025
- var buf1 = new Buffer(orig.length - start - howMany);
138026
- for (var i3 = start + howMany; i3 < orig.length; i3++) {
138027
- buf1[i3 - howMany - start] = orig[i3];
138423
+ var buf1 = new Buffer(orig.length - start2 - howMany);
138424
+ for (var i3 = start2 + howMany; i3 < orig.length; i3++) {
138425
+ buf1[i3 - howMany - start2] = orig[i3];
138028
138426
  }
138029
138427
  if (reps.length > 0) {
138030
138428
  var reps_ = reps.slice();
@@ -138038,8 +138436,8 @@ var require_buffers = __commonJS({
138038
138436
  ii2 += 2;
138039
138437
  }
138040
138438
  } else {
138041
- removed.push(buffers[ii2].slice(start));
138042
- buffers[ii2] = buffers[ii2].slice(0, start);
138439
+ removed.push(buffers[ii2].slice(start2));
138440
+ buffers[ii2] = buffers[ii2].slice(0, start2);
138043
138441
  ii2++;
138044
138442
  }
138045
138443
  }
@@ -138075,10 +138473,10 @@ var require_buffers = __commonJS({
138075
138473
  var ti2 = 0;
138076
138474
  for (var ii2 = si2; ti2 < j2 - i3 && ii2 < buffers.length; ii2++) {
138077
138475
  var len = buffers[ii2].length;
138078
- var start = ti2 === 0 ? i3 - startBytes : 0;
138079
- var end = ti2 + len >= j2 - i3 ? Math.min(start + (j2 - i3) - ti2, len) : len;
138080
- buffers[ii2].copy(target, ti2, start, end);
138081
- ti2 += end - start;
138476
+ var start2 = ti2 === 0 ? i3 - startBytes : 0;
138477
+ var end = ti2 + len >= j2 - i3 ? Math.min(start2 + (j2 - i3) - ti2, len) : len;
138478
+ buffers[ii2].copy(target, ti2, start2, end);
138479
+ ti2 += end - start2;
138082
138480
  }
138083
138481
  return target;
138084
138482
  };
@@ -138157,8 +138555,8 @@ var require_buffers = __commonJS({
138157
138555
  Buffers.prototype.toBuffer = function() {
138158
138556
  return this.slice();
138159
138557
  };
138160
- Buffers.prototype.toString = function(encoding, start, end) {
138161
- return this.slice(start, end).toString(encoding);
138558
+ Buffers.prototype.toString = function(encoding, start2, end) {
138559
+ return this.slice(start2, end).toString(encoding);
138162
138560
  };
138163
138561
  }
138164
138562
  });
@@ -139020,19 +139418,19 @@ var require_queue = __commonJS({
139020
139418
  Queue.prototype._willBeOverCapacity = function(size) {
139021
139419
  return this._capacity < size;
139022
139420
  };
139023
- Queue.prototype._pushOne = function(arg) {
139421
+ Queue.prototype._pushOne = function(arg2) {
139024
139422
  var length = this.length();
139025
139423
  this._checkCapacity(length + 1);
139026
139424
  var i3 = this._front + length & this._capacity - 1;
139027
- this[i3] = arg;
139425
+ this[i3] = arg2;
139028
139426
  this._length = length + 1;
139029
139427
  };
139030
- Queue.prototype.push = function(fn2, receiver, arg) {
139428
+ Queue.prototype.push = function(fn2, receiver, arg2) {
139031
139429
  var length = this.length() + 3;
139032
139430
  if (this._willBeOverCapacity(length)) {
139033
139431
  this._pushOne(fn2);
139034
139432
  this._pushOne(receiver);
139035
- this._pushOne(arg);
139433
+ this._pushOne(arg2);
139036
139434
  return;
139037
139435
  }
139038
139436
  var j2 = this._front + length - 3;
@@ -139040,7 +139438,7 @@ var require_queue = __commonJS({
139040
139438
  var wrapMask = this._capacity - 1;
139041
139439
  this[j2 + 0 & wrapMask] = fn2;
139042
139440
  this[j2 + 1 & wrapMask] = receiver;
139043
- this[j2 + 2 & wrapMask] = arg;
139441
+ this[j2 + 2 & wrapMask] = arg2;
139044
139442
  this._length = length;
139045
139443
  };
139046
139444
  Queue.prototype.shift = function() {
@@ -139124,31 +139522,31 @@ var require_async2 = __commonJS({
139124
139522
  this.throwLater(e2);
139125
139523
  }
139126
139524
  };
139127
- Async.prototype.throwLater = function(fn2, arg) {
139525
+ Async.prototype.throwLater = function(fn2, arg2) {
139128
139526
  if (arguments.length === 1) {
139129
- arg = fn2;
139527
+ arg2 = fn2;
139130
139528
  fn2 = function() {
139131
- throw arg;
139529
+ throw arg2;
139132
139530
  };
139133
139531
  }
139134
139532
  if (typeof setTimeout !== "undefined") {
139135
139533
  setTimeout(function() {
139136
- fn2(arg);
139534
+ fn2(arg2);
139137
139535
  }, 0);
139138
139536
  } else try {
139139
139537
  this._schedule(function() {
139140
- fn2(arg);
139538
+ fn2(arg2);
139141
139539
  });
139142
139540
  } catch (e2) {
139143
139541
  throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n");
139144
139542
  }
139145
139543
  };
139146
- function AsyncInvokeLater(fn2, receiver, arg) {
139147
- this._lateQueue.push(fn2, receiver, arg);
139544
+ function AsyncInvokeLater(fn2, receiver, arg2) {
139545
+ this._lateQueue.push(fn2, receiver, arg2);
139148
139546
  this._queueTick();
139149
139547
  }
139150
- function AsyncInvoke(fn2, receiver, arg) {
139151
- this._normalQueue.push(fn2, receiver, arg);
139548
+ function AsyncInvoke(fn2, receiver, arg2) {
139549
+ this._normalQueue.push(fn2, receiver, arg2);
139152
139550
  this._queueTick();
139153
139551
  }
139154
139552
  function AsyncSettlePromises(promise) {
@@ -139160,23 +139558,23 @@ var require_async2 = __commonJS({
139160
139558
  Async.prototype.invoke = AsyncInvoke;
139161
139559
  Async.prototype.settlePromises = AsyncSettlePromises;
139162
139560
  } else {
139163
- Async.prototype.invokeLater = function(fn2, receiver, arg) {
139561
+ Async.prototype.invokeLater = function(fn2, receiver, arg2) {
139164
139562
  if (this._trampolineEnabled) {
139165
- AsyncInvokeLater.call(this, fn2, receiver, arg);
139563
+ AsyncInvokeLater.call(this, fn2, receiver, arg2);
139166
139564
  } else {
139167
139565
  this._schedule(function() {
139168
139566
  setTimeout(function() {
139169
- fn2.call(receiver, arg);
139567
+ fn2.call(receiver, arg2);
139170
139568
  }, 100);
139171
139569
  });
139172
139570
  }
139173
139571
  };
139174
- Async.prototype.invoke = function(fn2, receiver, arg) {
139572
+ Async.prototype.invoke = function(fn2, receiver, arg2) {
139175
139573
  if (this._trampolineEnabled) {
139176
- AsyncInvoke.call(this, fn2, receiver, arg);
139574
+ AsyncInvoke.call(this, fn2, receiver, arg2);
139177
139575
  } else {
139178
139576
  this._schedule(function() {
139179
- fn2.call(receiver, arg);
139577
+ fn2.call(receiver, arg2);
139180
139578
  });
139181
139579
  }
139182
139580
  };
@@ -139198,8 +139596,8 @@ var require_async2 = __commonJS({
139198
139596
  continue;
139199
139597
  }
139200
139598
  var receiver = queue.shift();
139201
- var arg = queue.shift();
139202
- fn2.call(receiver, arg);
139599
+ var arg2 = queue.shift();
139600
+ fn2.call(receiver, arg2);
139203
139601
  }
139204
139602
  };
139205
139603
  Async.prototype._drainQueues = function() {
@@ -139398,13 +139796,13 @@ var require_thenables = __commonJS({
139398
139796
  promise._captureStackTrace();
139399
139797
  if (context) context._popContext();
139400
139798
  var synchronous = true;
139401
- var result = util.tryCatch(then).call(x3, resolve6, reject);
139799
+ var result = util.tryCatch(then).call(x3, resolve7, reject);
139402
139800
  synchronous = false;
139403
139801
  if (promise && result === errorObj2) {
139404
139802
  promise._rejectCallback(result.e, true, true);
139405
139803
  promise = null;
139406
139804
  }
139407
- function resolve6(value) {
139805
+ function resolve7(value) {
139408
139806
  if (!promise) return;
139409
139807
  promise._resolveCallback(value);
139410
139808
  promise = null;
@@ -139939,9 +140337,9 @@ var require_debuggability = __commonJS({
139939
140337
  return false;
139940
140338
  }
139941
140339
  Promise2.prototype._fireEvent = defaultFireEvent;
139942
- Promise2.prototype._execute = function(executor, resolve6, reject) {
140340
+ Promise2.prototype._execute = function(executor, resolve7, reject) {
139943
140341
  try {
139944
- executor(resolve6, reject);
140342
+ executor(resolve7, reject);
139945
140343
  } catch (e2) {
139946
140344
  return e2;
139947
140345
  }
@@ -139964,10 +140362,10 @@ var require_debuggability = __commonJS({
139964
140362
  ;
139965
140363
  ;
139966
140364
  };
139967
- function cancellationExecute(executor, resolve6, reject) {
140365
+ function cancellationExecute(executor, resolve7, reject) {
139968
140366
  var promise = this;
139969
140367
  try {
139970
- executor(resolve6, reject, function(onCancel) {
140368
+ executor(resolve7, reject, function(onCancel) {
139971
140369
  if (typeof onCancel !== "function") {
139972
140370
  throw new TypeError("onCancel must be a function, got: " + util.toString(onCancel));
139973
140371
  }
@@ -140744,9 +141142,9 @@ var require_method = __commonJS({
140744
141142
  var value;
140745
141143
  if (arguments.length > 1) {
140746
141144
  debug31.deprecated("calling Promise.try with more than 1 argument");
140747
- var arg = arguments[1];
141145
+ var arg2 = arguments[1];
140748
141146
  var ctx = arguments[2];
140749
- value = util.isArray(arg) ? tryCatch2(fn2).apply(ctx, arg) : tryCatch2(fn2).call(ctx, arg);
141147
+ value = util.isArray(arg2) ? tryCatch2(fn2).apply(ctx, arg2) : tryCatch2(fn2).call(ctx, arg2);
140750
141148
  } else {
140751
141149
  value = tryCatch2(fn2)();
140752
141150
  }
@@ -141721,9 +142119,9 @@ var require_timers = __commonJS({
141721
142119
  clearTimeout(this.handle);
141722
142120
  };
141723
142121
  var afterValue = function(value) {
141724
- return delay(+this).thenReturn(value);
142122
+ return delay2(+this).thenReturn(value);
141725
142123
  };
141726
- var delay = Promise2.delay = function(ms2, value) {
142124
+ var delay2 = Promise2.delay = function(ms2, value) {
141727
142125
  var ret2;
141728
142126
  var handle;
141729
142127
  if (value !== void 0) {
@@ -141745,7 +142143,7 @@ var require_timers = __commonJS({
141745
142143
  return ret2;
141746
142144
  };
141747
142145
  Promise2.prototype.delay = function(ms2) {
141748
- return delay(ms2, this);
142146
+ return delay2(ms2, this);
141749
142147
  };
141750
142148
  var afterTimeout = function(promise, message, parent) {
141751
142149
  var err2;
@@ -141990,15 +142388,15 @@ var require_generators = __commonJS({
141990
142388
  var stack = new Error().stack;
141991
142389
  return function() {
141992
142390
  var generator = generatorFunction.apply(this, arguments);
141993
- var spawn = new PromiseSpawn$(
142391
+ var spawn2 = new PromiseSpawn$(
141994
142392
  void 0,
141995
142393
  void 0,
141996
142394
  yieldHandler,
141997
142395
  stack
141998
142396
  );
141999
- var ret2 = spawn.promise();
142000
- spawn._generator = generator;
142001
- spawn._promiseFulfilled(void 0);
142397
+ var ret2 = spawn2.promise();
142398
+ spawn2._generator = generator;
142399
+ spawn2._promiseFulfilled(void 0);
142002
142400
  return ret2;
142003
142401
  };
142004
142402
  };
@@ -142013,9 +142411,9 @@ var require_generators = __commonJS({
142013
142411
  if (typeof generatorFunction !== "function") {
142014
142412
  return apiRejection("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");
142015
142413
  }
142016
- var spawn = new PromiseSpawn(generatorFunction, this);
142017
- var ret2 = spawn.promise();
142018
- spawn._run(Promise2.spawn);
142414
+ var spawn2 = new PromiseSpawn(generatorFunction, this);
142415
+ var ret2 = spawn2.promise();
142416
+ spawn2._run(Promise2.spawn);
142019
142417
  return ret2;
142020
142418
  };
142021
142419
  };
@@ -142290,7 +142688,7 @@ var require_promisify = __commonJS({
142290
142688
  util.toFastProperties(obj2);
142291
142689
  return obj2;
142292
142690
  }
142293
- function promisify4(callback, receiver, multiArgs) {
142691
+ function promisify(callback, receiver, multiArgs) {
142294
142692
  return makeNodePromisified(
142295
142693
  callback,
142296
142694
  receiver,
@@ -142310,7 +142708,7 @@ var require_promisify = __commonJS({
142310
142708
  options = Object(options);
142311
142709
  var receiver = options.context === void 0 ? THIS : options.context;
142312
142710
  var multiArgs = !!options.multiArgs;
142313
- var ret2 = promisify4(fn2, receiver, multiArgs);
142711
+ var ret2 = promisify(fn2, receiver, multiArgs);
142314
142712
  util.copyDescriptors(fn2, ret2, propsFilter);
142315
142713
  return ret2;
142316
142714
  };
@@ -143259,8 +143657,8 @@ var require_promise = __commonJS({
143259
143657
  this._setLength(index + 1);
143260
143658
  return index;
143261
143659
  };
143262
- Promise2.prototype._proxy = function(proxyable, arg) {
143263
- this._addCallbacks(void 0, void 0, arg, proxyable, null);
143660
+ Promise2.prototype._proxy = function(proxyable, arg2) {
143661
+ this._addCallbacks(void 0, void 0, arg2, proxyable, null);
143264
143662
  };
143265
143663
  Promise2.prototype._resolveCallback = function(value, shouldBind) {
143266
143664
  if ((this._bitField & 117506048) !== 0) return;
@@ -143716,7 +144114,7 @@ var require_PullStream = __commonJS({
143716
144114
  };
143717
144115
  var rejectHandler;
143718
144116
  var pullStreamRejectHandler;
143719
- return new Promise2(function(resolve6, reject) {
144117
+ return new Promise2(function(resolve7, reject) {
143720
144118
  rejectHandler = reject;
143721
144119
  pullStreamRejectHandler = function(e2) {
143722
144120
  self2.__emittedError = e2;
@@ -143726,7 +144124,7 @@ var require_PullStream = __commonJS({
143726
144124
  return reject(new Error("FILE_ENDED"));
143727
144125
  self2.once("error", pullStreamRejectHandler);
143728
144126
  self2.stream(eof, includeEof).on("error", reject).pipe(concatStream).on("finish", function() {
143729
- resolve6(buffer);
144127
+ resolve7(buffer);
143730
144128
  }).on("error", reject);
143731
144129
  }).finally(function() {
143732
144130
  self2.removeListener("error", rejectHandler);
@@ -143769,10 +144167,10 @@ var require_BufferStream = __commonJS({
143769
144167
  if (!Stream2.Writable || !Stream2.Writable.prototype.destroy)
143770
144168
  Stream2 = require_readable();
143771
144169
  module2.exports = function(entry) {
143772
- return new Promise2(function(resolve6, reject) {
144170
+ return new Promise2(function(resolve7, reject) {
143773
144171
  var chunks = [];
143774
144172
  var bufferStream = Stream2.Transform().on("finish", function() {
143775
- resolve6(Buffer2.concat(chunks));
144173
+ resolve7(Buffer2.concat(chunks));
143776
144174
  }).on("error", reject);
143777
144175
  bufferStream._transform = function(d2, e2, cb) {
143778
144176
  chunks.push(d2);
@@ -143911,8 +144309,8 @@ var require_parse2 = __commonJS({
143911
144309
  __autodraining = true;
143912
144310
  var draining = entry.pipe(NoopStream());
143913
144311
  draining.promise = function() {
143914
- return new Promise2(function(resolve6, reject) {
143915
- draining.on("finish", resolve6);
144312
+ return new Promise2(function(resolve7, reject) {
144313
+ draining.on("finish", resolve7);
143916
144314
  draining.on("error", reject);
143917
144315
  });
143918
144316
  };
@@ -143967,11 +144365,11 @@ var require_parse2 = __commonJS({
143967
144365
  eof = Buffer2.alloc(4);
143968
144366
  eof.writeUInt32LE(134695760, 0);
143969
144367
  }
143970
- return new Promise2(function(resolve6, reject) {
144368
+ return new Promise2(function(resolve7, reject) {
143971
144369
  self2.stream(eof).pipe(inflater).on("error", function(err2) {
143972
144370
  self2.emit("error", err2);
143973
144371
  }).pipe(entry).on("finish", function() {
143974
- return fileSizeKnown ? self2._readRecord().then(resolve6).catch(reject) : self2._processDataDescriptor(entry).then(resolve6).catch(reject);
144372
+ return fileSizeKnown ? self2._readRecord().then(resolve7).catch(reject) : self2._processDataDescriptor(entry).then(resolve7).catch(reject);
143975
144373
  });
143976
144374
  });
143977
144375
  });
@@ -144013,8 +144411,8 @@ var require_parse2 = __commonJS({
144013
144411
  };
144014
144412
  Parse.prototype.promise = function() {
144015
144413
  var self2 = this;
144016
- return new Promise2(function(resolve6, reject) {
144017
- self2.on("finish", resolve6);
144414
+ return new Promise2(function(resolve7, reject) {
144415
+ self2.on("finish", resolve7);
144018
144416
  self2.on("error", reject);
144019
144417
  });
144020
144418
  };
@@ -145792,24 +146190,24 @@ var require_writer2 = __commonJS({
145792
146190
  }
145793
146191
  function endChmod(self2, want, current, path2, cb) {
145794
146192
  var wantMode = want.mode;
145795
- var chmod = want.follow || self2.type !== "SymbolicLink" ? "chmod" : "lchmod";
145796
- if (!fs2[chmod]) return cb();
146193
+ var chmod2 = want.follow || self2.type !== "SymbolicLink" ? "chmod" : "lchmod";
146194
+ if (!fs2[chmod2]) return cb();
145797
146195
  if (typeof wantMode !== "number") return cb();
145798
146196
  var curMode = current.mode & parseInt("0777", 8);
145799
146197
  wantMode = wantMode & parseInt("0777", 8);
145800
146198
  if (wantMode === curMode) return cb();
145801
- fs2[chmod](path2, wantMode, cb);
146199
+ fs2[chmod2](path2, wantMode, cb);
145802
146200
  }
145803
146201
  function endChown(self2, want, current, path2, cb) {
145804
146202
  if (process.platform === "win32") return cb();
145805
146203
  if (!process.getuid || process.getuid() !== 0) return cb();
145806
146204
  if (typeof want.uid !== "number" && typeof want.gid !== "number") return cb();
145807
146205
  if (current.uid === want.uid && current.gid === want.gid) return cb();
145808
- var chown = self2.props.follow || self2.type !== "SymbolicLink" ? "chown" : "lchown";
145809
- if (!fs2[chown]) return cb();
146206
+ var chown2 = self2.props.follow || self2.type !== "SymbolicLink" ? "chown" : "lchown";
146207
+ if (!fs2[chown2]) return cb();
145810
146208
  if (typeof want.uid !== "number") want.uid = current.uid;
145811
146209
  if (typeof want.gid !== "number") want.gid = current.gid;
145812
- fs2[chown](path2, want.uid, want.gid, cb);
146210
+ fs2[chown2](path2, want.uid, want.gid, cb);
145813
146211
  }
145814
146212
  function endUtimes(self2, want, current, path2, cb) {
145815
146213
  if (!fs2.utimes || process.platform === "win32") return cb();
@@ -146003,8 +146401,8 @@ var require_extract2 = __commonJS({
146003
146401
  extract.emit("close");
146004
146402
  });
146005
146403
  extract.promise = function() {
146006
- return new Promise2(function(resolve6, reject) {
146007
- extract.on("close", resolve6);
146404
+ return new Promise2(function(resolve7, reject) {
146405
+ extract.on("close", resolve7);
146008
146406
  extract.on("error", reject);
146009
146407
  });
146010
146408
  };
@@ -147055,11 +147453,11 @@ var require_BigInteger = __commonJS({
147055
147453
  var c2 = text[i4];
147056
147454
  if (c2 in alphabetValues) digits.push(parseValue(alphabetValues[c2]));
147057
147455
  else if (c2 === "<") {
147058
- var start = i4;
147456
+ var start2 = i4;
147059
147457
  do {
147060
147458
  i4++;
147061
147459
  } while (text[i4] !== ">" && i4 < text.length);
147062
- digits.push(parseValue(text.slice(start + 1, i4)));
147460
+ digits.push(parseValue(text.slice(start2 + 1, i4)));
147063
147461
  } else throw new Error(c2 + " is not a valid character");
147064
147462
  }
147065
147463
  return parseBaseFromArray(digits, base, isNegative);
@@ -147511,8 +147909,8 @@ var require_directory = __commonJS({
147511
147909
  return;
147512
147910
  }
147513
147911
  var writer = opts.getWriter ? opts.getWriter({ path: extractPath }) : Writer({ path: extractPath });
147514
- return new Promise2(function(resolve6, reject) {
147515
- entry.stream(opts.password).on("error", reject).pipe(writer).on("close", resolve6).on("error", reject);
147912
+ return new Promise2(function(resolve7, reject) {
147913
+ entry.stream(opts.password).on("error", reject).pipe(writer).on("close", resolve7).on("error", reject);
147516
147914
  });
147517
147915
  }, { concurrency: opts.concurrency > 1 ? opts.concurrency : 1 });
147518
147916
  });
@@ -147578,12 +147976,12 @@ var require_Open = __commonJS({
147578
147976
  return fs2.createReadStream(filename, { start: offset, end: length && offset + length });
147579
147977
  },
147580
147978
  size: function() {
147581
- return new Promise2(function(resolve6, reject) {
147979
+ return new Promise2(function(resolve7, reject) {
147582
147980
  fs2.stat(filename, function(err2, d2) {
147583
147981
  if (err2)
147584
147982
  reject(err2);
147585
147983
  else
147586
- resolve6(d2.size);
147984
+ resolve7(d2.size);
147587
147985
  });
147588
147986
  });
147589
147987
  }
@@ -147604,14 +148002,14 @@ var require_Open = __commonJS({
147604
148002
  return request(options2);
147605
148003
  },
147606
148004
  size: function() {
147607
- return new Promise2(function(resolve6, reject) {
148005
+ return new Promise2(function(resolve7, reject) {
147608
148006
  var req = request(params);
147609
148007
  req.on("response", function(d2) {
147610
148008
  req.abort();
147611
148009
  if (!d2.headers["content-length"])
147612
148010
  reject(new Error("Missing content length header"));
147613
148011
  else
147614
- resolve6(d2.headers["content-length"]);
148012
+ resolve7(d2.headers["content-length"]);
147615
148013
  }).on("error", reject);
147616
148014
  });
147617
148015
  }
@@ -147621,12 +148019,12 @@ var require_Open = __commonJS({
147621
148019
  s3: function(client, params, options) {
147622
148020
  var source = {
147623
148021
  size: function() {
147624
- return new Promise2(function(resolve6, reject) {
148022
+ return new Promise2(function(resolve7, reject) {
147625
148023
  client.headObject(params, function(err2, d2) {
147626
148024
  if (err2)
147627
148025
  reject(err2);
147628
148026
  else
147629
- resolve6(d2.ContentLength);
148027
+ resolve7(d2.ContentLength);
147630
148028
  });
147631
148029
  });
147632
148030
  },
@@ -147926,8 +148324,8 @@ var require_tmp = __commonJS({
147926
148324
  if (!_isUndefined(options.name)) {
147927
148325
  const name = options.name;
147928
148326
  if (path.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`);
147929
- const basename7 = path.basename(name);
147930
- if (basename7 === ".." || basename7 === "." || basename7 !== name) {
148327
+ const basename8 = path.basename(name);
148328
+ if (basename8 === ".." || basename8 === "." || basename8 !== name) {
147931
148329
  throw new Error(`name option must not contain a path, found "${name}".`);
147932
148330
  }
147933
148331
  }
@@ -148042,7 +148440,7 @@ var require_iterate_stream = __commonJS({
148042
148440
  const contents = [];
148043
148441
  stream.on("data", (data) => contents.push(data));
148044
148442
  let resolveStreamEndedPromise;
148045
- const streamEndedPromise = new Promise((resolve6) => resolveStreamEndedPromise = resolve6);
148443
+ const streamEndedPromise = new Promise((resolve7) => resolveStreamEndedPromise = resolve7);
148046
148444
  let ended = false;
148047
148445
  stream.on("end", () => {
148048
148446
  ended = true;
@@ -148067,13 +148465,13 @@ var require_iterate_stream = __commonJS({
148067
148465
  resolveStreamEndedPromise();
148068
148466
  };
148069
148467
  function once(eventEmitter, type) {
148070
- return new Promise((resolve6) => {
148468
+ return new Promise((resolve7) => {
148071
148469
  let fired = false;
148072
148470
  const handler = () => {
148073
148471
  if (!fired) {
148074
148472
  fired = true;
148075
148473
  eventEmitter.removeListener(type, handler);
148076
- resolve6();
148474
+ resolve7();
148077
148475
  }
148078
148476
  };
148079
148477
  eventEmitter.addListener(type, handler);
@@ -148597,7 +148995,7 @@ var require_workbook_reader = __commonJS({
148597
148995
  if (this.sharedStrings && this.workbookRels) {
148598
148996
  yield* this._parseWorksheet(iterateStream(entry), sheetNo);
148599
148997
  } else {
148600
- await new Promise((resolve6, reject) => {
148998
+ await new Promise((resolve7, reject) => {
148601
148999
  tmp.file((err2, path, fd2, tempFileCleanupCallback) => {
148602
149000
  if (err2) {
148603
149001
  return reject(err2);
@@ -148607,7 +149005,7 @@ var require_workbook_reader = __commonJS({
148607
149005
  tempStream.on("error", reject);
148608
149006
  entry.pipe(tempStream);
148609
149007
  return tempStream.on("finish", () => {
148610
- return resolve6();
149008
+ return resolve7();
148611
149009
  });
148612
149010
  });
148613
149011
  });
@@ -148835,10 +149233,11 @@ var require_excel = __commonJS({
148835
149233
  });
148836
149234
 
148837
149235
  // ../fileq/src/lib/derivers/xlsx.ts
148838
- var MAX_ROWS_PER_SHEET2, MAX_COLUMNS2, cellText2, oneLine, xlsxDeriver;
149236
+ var MAX_ROWS_PER_SHEET2, MAX_COLUMNS2, cellText2, xlsxDeriver;
148839
149237
  var init_xlsx = __esm({
148840
149238
  "../fileq/src/lib/derivers/xlsx.ts"() {
148841
149239
  "use strict";
149240
+ init_one_line();
148842
149241
  init_markdown();
148843
149242
  MAX_ROWS_PER_SHEET2 = 200;
148844
149243
  MAX_COLUMNS2 = 30;
@@ -148851,7 +149250,7 @@ var init_xlsx = __esm({
148851
149250
  }
148852
149251
  if (typeof value === "object") {
148853
149252
  if ("richText" in value) {
148854
- return value.richText.map((run5) => run5.text).join("");
149253
+ return value.richText.map((run3) => run3.text).join("");
148855
149254
  }
148856
149255
  if ("text" in value) {
148857
149256
  return String(value.text);
@@ -148866,7 +149265,6 @@ var init_xlsx = __esm({
148866
149265
  }
148867
149266
  return String(value);
148868
149267
  };
148869
- oneLine = (text) => text.replaceAll(/\s+/g, " ").trim();
148870
149268
  xlsxDeriver = {
148871
149269
  name: "xlsx",
148872
149270
  version: 1,
@@ -148902,7 +149300,7 @@ var init_xlsx = __esm({
148902
149300
  }
148903
149301
  sections.push(`## ${sheet.name}
148904
149302
 
148905
- ${markdownTable(kept.map((row) => row.map(oneLine)))}`);
149303
+ ${markdownTable(kept.map((row) => row.map((cell) => oneLine(cell))))}`);
148906
149304
  }
148907
149305
  return { markdown: sections.join("\n\n"), notes };
148908
149306
  }
@@ -148929,23 +149327,120 @@ var init_env = __esm({
148929
149327
  }
148930
149328
  });
148931
149329
 
149330
+ // ../../_tools/base/src/node/fs.ts
149331
+ import { randomBytes } from "node:crypto";
149332
+ import { access, chmod, chown, mkdir, open, rename, rm as rm2 } from "node:fs/promises";
149333
+ import { basename as basename3, dirname as dirname2, join as join5, resolve as resolve3 } from "node:path";
149334
+ import { setTimeout as sleep2 } from "node:timers/promises";
149335
+ var fileLock, TRANSIENT_RENAME, RENAME_ATTEMPTS, RENAME_RETRY_MS, renameOver, stagingOf, writeStaged, directoriesToSync, isUnder, syncDirectories, syncOne, replaceAtomically, writeFileAtomic;
149336
+ var init_fs = __esm({
149337
+ "../../_tools/base/src/node/fs.ts"() {
149338
+ "use strict";
149339
+ init_async();
149340
+ init_errors();
149341
+ fileLock = keyedLock();
149342
+ TRANSIENT_RENAME = /* @__PURE__ */ new Set(["EPERM", "EACCES", "EBUSY"]);
149343
+ RENAME_ATTEMPTS = 10;
149344
+ RENAME_RETRY_MS = 25;
149345
+ renameOver = async (from, to2) => {
149346
+ for (let attempt = 1; ; attempt++) {
149347
+ try {
149348
+ await rename(from, to2);
149349
+ return;
149350
+ } catch (error2) {
149351
+ if (process.platform !== "win32" || attempt >= RENAME_ATTEMPTS || !TRANSIENT_RENAME.has(error2.code ?? "")) {
149352
+ throw error2;
149353
+ }
149354
+ await sleep2(RENAME_RETRY_MS);
149355
+ }
149356
+ }
149357
+ };
149358
+ stagingOf = (path) => join5(dirname2(path), `.${basename3(path)}.${randomBytes(6).toString("hex")}.tmp`);
149359
+ writeStaged = async (staging, write3, mode, durable) => {
149360
+ const handle = await open(staging, "w", mode);
149361
+ try {
149362
+ await write3(handle);
149363
+ if (durable) {
149364
+ await handle.sync();
149365
+ }
149366
+ } finally {
149367
+ await handle.close();
149368
+ }
149369
+ };
149370
+ directoriesToSync = (dirs, upTo) => {
149371
+ const top = upTo === void 0 ? void 0 : resolve3(upTo);
149372
+ const seen = /* @__PURE__ */ new Set();
149373
+ for (const dir of dirs) {
149374
+ for (let directory = resolve3(dir); !seen.has(directory); directory = dirname2(directory)) {
149375
+ seen.add(directory);
149376
+ const parent = dirname2(directory);
149377
+ if (top === void 0 || directory === top || parent === directory || !isUnder(top, directory)) {
149378
+ break;
149379
+ }
149380
+ }
149381
+ }
149382
+ return [...seen];
149383
+ };
149384
+ isUnder = (top, path) => path === top || path.startsWith(top.endsWith("/") ? top : `${top}/`);
149385
+ syncDirectories = async (dirs, options = {}) => {
149386
+ if (process.platform === "win32") {
149387
+ return;
149388
+ }
149389
+ for (const directory of directoriesToSync(dirs, options.upTo)) {
149390
+ await syncOne(directory);
149391
+ }
149392
+ };
149393
+ syncOne = async (directory) => {
149394
+ let handle;
149395
+ try {
149396
+ handle = await open(directory, "r");
149397
+ await handle.sync();
149398
+ } catch {
149399
+ } finally {
149400
+ await handle?.close().catch(() => void 0);
149401
+ }
149402
+ };
149403
+ replaceAtomically = async (path, write3, mode, options) => {
149404
+ const staging = stagingOf(path);
149405
+ await mkdir(dirname2(path), { recursive: true });
149406
+ try {
149407
+ await writeStaged(staging, write3, mode, options.durable === true);
149408
+ if (options.owner !== void 0) {
149409
+ await chown(staging, options.owner.uid, options.owner.gid);
149410
+ }
149411
+ if (mode !== void 0) {
149412
+ await chmod(staging, mode);
149413
+ }
149414
+ await renameOver(staging, path);
149415
+ } finally {
149416
+ await rm2(staging, { force: true });
149417
+ }
149418
+ if (options.durable === true) {
149419
+ await syncDirectories([dirname2(path)], options.syncUpTo === void 0 ? {} : { upTo: options.syncUpTo });
149420
+ }
149421
+ };
149422
+ writeFileAtomic = async (path, content, mode, options = {}) => await replaceAtomically(path, async (handle) => await handle.writeFile(content), mode, options);
149423
+ }
149424
+ });
149425
+
148932
149426
  // ../fileq/src/lib/sidecar.ts
148933
- import { createHash, randomBytes } from "node:crypto";
149427
+ import { createHash } from "node:crypto";
148934
149428
  import { createReadStream } from "node:fs";
148935
- import { mkdir, readFile as readFile14, rename, rm as rm2, writeFile } from "node:fs/promises";
148936
- import { dirname as dirname2, join as join5 } from "node:path";
149429
+ import { readFile as readFile14, rm as rm3, writeFile } from "node:fs/promises";
149430
+ import { join as join6 } from "node:path";
148937
149431
  var DERIVED_DIR, sidecarPathFor, sha256OfFile, EMPTY_FRONT, parseSidecarFront, sidecarBody, readSidecar, isFresh, provenanceNote, writeDerived, writeSidecar, ignoreShadowsInGit, removeSidecar;
148938
149432
  var init_sidecar = __esm({
148939
149433
  "../fileq/src/lib/sidecar.ts"() {
148940
149434
  "use strict";
148941
149435
  init_format();
149436
+ init_fs();
148942
149437
  init_outside_text();
148943
149438
  init_src();
148944
149439
  DERIVED_DIR = `${STATE_DIR}/local/cache/derived`;
148945
- sidecarPathFor = (workspaceRoot2, relPath) => join5(workspaceRoot2, DERIVED_DIR, `${relPath}.md`);
148946
- sha256OfFile = (absPath) => new Promise((resolve6, reject) => {
149440
+ sidecarPathFor = (workspaceRoot2, relPath) => join6(workspaceRoot2, DERIVED_DIR, `${relPath}.md`);
149441
+ sha256OfFile = (absPath) => new Promise((resolve7, reject) => {
148947
149442
  const hash = createHash("sha256");
148948
- createReadStream(absPath).on("error", reject).on("data", (chunk) => hash.update(chunk)).on("end", () => resolve6(hash.digest("hex")));
149443
+ createReadStream(absPath).on("error", reject).on("data", (chunk) => hash.update(chunk)).on("end", () => resolve7(hash.digest("hex")));
148949
149444
  });
148950
149445
  EMPTY_FRONT = { source: void 0, sha256: void 0, deriver: void 0, derivedAt: void 0, title: void 0, notes: [] };
148951
149446
  parseSidecarFront = (content) => {
@@ -149012,16 +149507,8 @@ var init_sidecar = __esm({
149012
149507
  "---",
149013
149508
  ""
149014
149509
  ].join("\n");
149015
- await mkdir(dirname2(path), { recursive: true });
149016
- const temp = `${path}.${process.pid}-${randomBytes(4).toString("hex")}.tmp`;
149017
- try {
149018
- await writeFile(temp, `${frontMatter}${body === "" ? "" : `${body}
149510
+ await writeFileAtomic(path, `${frontMatter}${body === "" ? "" : `${body}
149019
149511
  `}`);
149020
- await rename(temp, path);
149021
- } catch (error2) {
149022
- await rm2(temp, { force: true });
149023
- throw error2;
149024
- }
149025
149512
  return { path, body, tokens: estimateTokens(body) };
149026
149513
  };
149027
149514
  writeSidecar = async (workspaceRoot2, input) => {
@@ -149032,7 +149519,7 @@ var init_sidecar = __esm({
149032
149519
  };
149033
149520
  ignoreShadowsInGit = async (workspaceRoot2) => {
149034
149521
  try {
149035
- await writeFile(join5(workspaceRoot2, DERIVED_DIR, ".gitignore"), "# fileq's derived shadows; regenerated on demand.\n*\n", { flag: "wx" });
149522
+ await writeFile(join6(workspaceRoot2, DERIVED_DIR, ".gitignore"), "# fileq's derived shadows; regenerated on demand.\n*\n", { flag: "wx" });
149036
149523
  } catch (error2) {
149037
149524
  if (error2.code !== "EEXIST") {
149038
149525
  return;
@@ -149043,7 +149530,7 @@ var init_sidecar = __esm({
149043
149530
  const path = sidecarPathFor(workspaceRoot2, relPath);
149044
149531
  const existed = await readSidecar(path) !== void 0;
149045
149532
  if (existed) {
149046
- await rm2(path, { force: true });
149533
+ await rm3(path, { force: true });
149047
149534
  }
149048
149535
  return existed;
149049
149536
  };
@@ -149051,15 +149538,15 @@ var init_sidecar = __esm({
149051
149538
  });
149052
149539
 
149053
149540
  // ../fileq/src/lib/content-cache.ts
149054
- import { join as join6 } from "node:path";
149541
+ import { join as join7 } from "node:path";
149055
149542
  var contentCacheDir, contentCachePathFor, readCachedRendering, cacheRendering;
149056
149543
  var init_content_cache = __esm({
149057
149544
  "../fileq/src/lib/content-cache.ts"() {
149058
149545
  "use strict";
149059
149546
  init_env();
149060
149547
  init_sidecar();
149061
- contentCacheDir = (workspaceRoot2) => workspaceRoot2 === void 0 ? join6(toolHome("fileq"), "by-hash") : join6(workspaceRoot2, DERIVED_DIR, ".by-hash");
149062
- contentCachePathFor = (workspaceRoot2, sourceSha, deriverStamp2) => join6(contentCacheDir(workspaceRoot2), `${sourceSha}.${deriverStamp2.replaceAll(/[^A-Za-z0-9.+-]/g, "-")}.md`);
149548
+ contentCacheDir = (workspaceRoot2) => workspaceRoot2 === void 0 ? join7(toolHome("fileq"), "by-hash") : join7(workspaceRoot2, DERIVED_DIR, ".by-hash");
149549
+ contentCachePathFor = (workspaceRoot2, sourceSha, deriverStamp2) => join7(contentCacheDir(workspaceRoot2), `${sourceSha}.${deriverStamp2.replaceAll(/[^A-Za-z0-9.+-]/g, "-")}.md`);
149063
149550
  readCachedRendering = async (workspaceRoot2, sourceSha, deriverStamp2) => {
149064
149551
  const path = contentCachePathFor(workspaceRoot2, sourceSha, deriverStamp2);
149065
149552
  const content = await readSidecar(path);
@@ -149238,7 +149725,7 @@ var init_env2 = __esm({
149238
149725
  });
149239
149726
 
149240
149727
  // ../fileq/src/commands/derive.command.ts
149241
- import { resolve as resolve3 } from "node:path";
149728
+ import { resolve as resolve4 } from "node:path";
149242
149729
  var outcomeLine, deriveCommand;
149243
149730
  var init_derive_command = __esm({
149244
149731
  "../fileq/src/commands/derive.command.ts"() {
@@ -149280,7 +149767,7 @@ var init_derive_command = __esm({
149280
149767
  }
149281
149768
  let useful = 0;
149282
149769
  for (const file of files) {
149283
- const outcome = await ensureSidecar(root, resolve3(root, file));
149770
+ const outcome = await ensureSidecar(root, resolve4(root, file));
149284
149771
  if (outcome.kind !== "skipped") {
149285
149772
  useful += 1;
149286
149773
  }
@@ -149334,7 +149821,7 @@ var init_flags = __esm({
149334
149821
  });
149335
149822
 
149336
149823
  // ../fileq/src/commands/read.command.ts
149337
- import { basename as basename3, resolve as resolve4 } from "node:path";
149824
+ import { basename as basename4, resolve as resolve5 } from "node:path";
149338
149825
  var readCommand, readInWorkspace, fromOutcome, readOutsideWorkspace, withFinalNewline;
149339
149826
  var init_read_command = __esm({
149340
149827
  "../fileq/src/commands/read.command.ts"() {
@@ -149360,7 +149847,7 @@ var init_read_command = __esm({
149360
149847
  }
149361
149848
  },
149362
149849
  async func(flags, file) {
149363
- const absPath = resolve4(file);
149850
+ const absPath = resolve5(file);
149364
149851
  const root = workspaceRoot();
149365
149852
  const result = root === void 0 ? await readOutsideWorkspace(void 0, absPath) : await readInWorkspace(root, absPath);
149366
149853
  if (result === void 0) {
@@ -149379,7 +149866,7 @@ var init_read_command = __esm({
149379
149866
  );
149380
149867
  return;
149381
149868
  }
149382
- const fields = [result.title ?? basename3(absPath), result.format, `${result.tokens} tokens`, result.source];
149869
+ const fields = [result.title ?? basename4(absPath), result.format, `${result.tokens} tokens`, result.source];
149383
149870
  const notes = result.savedPath === void 0 ? [...result.notes, "nothing saved: the rendering cache could not be written"] : result.notes;
149384
149871
  this.process.stdout.write(capsule("fileq", fields, notes));
149385
149872
  if (result.savedPath !== void 0) {
@@ -149503,18 +149990,16 @@ var init_pages = __esm({
149503
149990
  });
149504
149991
 
149505
149992
  // ../fileq/src/lib/render/convert.ts
149506
- import { execFile as execFile3 } from "node:child_process";
149507
149993
  import { readdir as readdir2 } from "node:fs/promises";
149508
- import { basename as basename4, extname as extname2, join as join7 } from "node:path";
149509
- import { promisify as promisify3 } from "node:util";
149510
- var run4, CONVERT_TIMEOUT_MS, RASTER_TIMEOUT_MS, ToolMissing, ConvertFailed, listDir, OFFICE_PACK, inSandbox, rasterizer, office, IMPRESS_PDF, pdfFilter, toPdf, toPngs;
149994
+ import { basename as basename5, extname as extname2, join as join8 } from "node:path";
149995
+ var CONVERT_TIMEOUT_MS, RASTER_TIMEOUT_MS, ToolMissing, ConvertFailed, listDir, OFFICE_PACK, inSandbox, rasterizer, office, IMPRESS_PDF, pdfFilter, toPdf, toPngs;
149511
149996
  var init_convert = __esm({
149512
149997
  "../fileq/src/lib/render/convert.ts"() {
149513
149998
  "use strict";
149514
149999
  init_errors();
150000
+ init_process();
149515
150001
  init_tools();
149516
150002
  init_pages();
149517
- run4 = promisify3(execFile3);
149518
150003
  CONVERT_TIMEOUT_MS = 18e4;
149519
150004
  RASTER_TIMEOUT_MS = 12e4;
149520
150005
  ToolMissing = class extends Error {
@@ -149555,13 +150040,13 @@ var init_convert = __esm({
149555
150040
  IMPRESS_PDF = 'pdf:impress_pdf_Export:{"ExportHiddenSlides":{"type":"boolean","value":"true"}}';
149556
150041
  pdfFilter = (format) => format === "pptx" || format === "odp" ? IMPRESS_PDF : "pdf";
149557
150042
  toPdf = async (binary, absPath, format, workDir) => {
149558
- const outDir = join7(workDir, "pdf");
150043
+ const outDir = join8(workDir, "pdf");
149559
150044
  const args = [
149560
150045
  "--headless",
149561
150046
  "--norestore",
149562
150047
  "--nologo",
149563
150048
  "--nolockcheck",
149564
- `-env:UserInstallation=file://${join7(workDir, "profile")}`,
150049
+ `-env:UserInstallation=file://${join8(workDir, "profile")}`,
149565
150050
  "--convert-to",
149566
150051
  pdfFilter(format),
149567
150052
  "--outdir",
@@ -149570,29 +150055,29 @@ var init_convert = __esm({
149570
150055
  ];
149571
150056
  let output = "";
149572
150057
  try {
149573
- const result = await run4(binary, args, { timeout: CONVERT_TIMEOUT_MS, maxBuffer: 4 * 1024 * 1024 });
150058
+ const result = await execBounded(binary, args, { timeoutMs: CONVERT_TIMEOUT_MS, maxOutput: 4 * 1024 * 1024 });
149574
150059
  output = `${result.stdout}${result.stderr}`;
149575
150060
  } catch (cause) {
149576
150061
  throw new ConvertFailed(`LibreOffice could not convert it: ${errorMessage(cause).split("\n").slice(0, 3).join(" ")}`);
149577
150062
  }
149578
- const expected = `${basename4(absPath, extname2(absPath))}.pdf`;
150063
+ const expected = `${basename5(absPath, extname2(absPath))}.pdf`;
149579
150064
  const written = await listDir(outDir);
149580
150065
  if (!written.includes(expected)) {
149581
150066
  const said = output.trim().split("\n").slice(-2).join(" ");
149582
150067
  throw new ConvertFailed(`LibreOffice wrote no PDF${said === "" ? "" : ` (it said: ${said})`}; the file may be damaged or password-protected`);
149583
150068
  }
149584
- return join7(outDir, expected);
150069
+ return join8(outDir, expected);
149585
150070
  };
149586
150071
  toPngs = async (tool, pdf, pages, size, outDir) => {
149587
- const prefix = join7(outDir, "p");
150072
+ const prefix = join8(outDir, "p");
149588
150073
  try {
149589
150074
  if (tool === "pdftoppm") {
149590
150075
  for (const [first, last] of runsOf(pages)) {
149591
- await run4("pdftoppm", ["-png", "-scale-to", String(size), "-f", String(first), "-l", String(last), pdf, prefix], { timeout: RASTER_TIMEOUT_MS });
150076
+ await execBounded("pdftoppm", ["-png", "-scale-to", String(size), "-f", String(first), "-l", String(last), pdf, prefix], { timeoutMs: RASTER_TIMEOUT_MS });
149592
150077
  }
149593
150078
  } else {
149594
- await run4("mutool", ["draw", "-q", "-F", "png", "-w", String(size), "-h", String(size), "-o", `${prefix}-%d.png`, pdf, pages.join(",")], {
149595
- timeout: RASTER_TIMEOUT_MS
150079
+ await execBounded("mutool", ["draw", "-q", "-F", "png", "-w", String(size), "-h", String(size), "-o", `${prefix}-%d.png`, pdf, pages.join(",")], {
150080
+ timeoutMs: RASTER_TIMEOUT_MS
149596
150081
  });
149597
150082
  }
149598
150083
  } catch (cause) {
@@ -149602,7 +150087,7 @@ var init_convert = __esm({
149602
150087
  for (const name of await readdir2(outDir)) {
149603
150088
  const match = /^p-0*(\d+)\.png$/.exec(name);
149604
150089
  if (match !== null) {
149605
- drawn.set(Number(match[1]), join7(outDir, name));
150090
+ drawn.set(Number(match[1]), join8(outDir, name));
149606
150091
  }
149607
150092
  }
149608
150093
  return drawn;
@@ -149612,9 +150097,9 @@ var init_convert = __esm({
149612
150097
 
149613
150098
  // ../fileq/src/lib/render/render.ts
149614
150099
  import { createHash as createHash2 } from "node:crypto";
149615
- import { copyFile, mkdir as mkdir2, mkdtemp as mkdtemp2, readFile as readFile15, rm as rm3, writeFile as writeFile2 } from "node:fs/promises";
150100
+ import { copyFile, mkdir as mkdir2, mkdtemp as mkdtemp2, readFile as readFile15, rm as rm4, writeFile as writeFile2 } from "node:fs/promises";
149616
150101
  import { tmpdir as tmpdir2 } from "node:os";
149617
- import { basename as basename5, join as join8 } from "node:path";
150102
+ import { basename as basename6, join as join9 } from "node:path";
149618
150103
  var RENDERED_DIR, DEFAULT_PAGE_CAP, DEFAULT_SIZE, VIA_OFFICE, SLIDES, NotRenderable, STAMP_FILE, defaultOutDir, readStamp, clearImages, ignoreInGit, pageCount, formatOf, choosePages, renderDocument;
149619
150104
  var init_render = __esm({
149620
150105
  "../fileq/src/lib/render/render.ts"() {
@@ -149638,14 +150123,14 @@ var init_render = __esm({
149638
150123
  defaultOutDir = (absPath, workspaceRoot2) => {
149639
150124
  const relPath = workspaceRoot2 === void 0 ? void 0 : relPathIn(workspaceRoot2, absPath);
149640
150125
  if (workspaceRoot2 !== void 0 && relPath !== void 0) {
149641
- return join8(workspaceRoot2, RENDERED_DIR, relPath);
150126
+ return join9(workspaceRoot2, RENDERED_DIR, relPath);
149642
150127
  }
149643
150128
  const hash = createHash2("sha256").update(absPath).digest("hex").slice(0, 8);
149644
- return join8(toolOutDir("fileq"), "rendered", `${basename5(absPath).toLowerCase().replaceAll(/[^a-z0-9.]+/g, "-")}-${hash}`);
150129
+ return join9(toolOutDir("fileq"), "rendered", `${basename6(absPath).toLowerCase().replaceAll(/[^a-z0-9.]+/g, "-")}-${hash}`);
149645
150130
  };
149646
150131
  readStamp = async (dir) => {
149647
150132
  try {
149648
- const parsed = JSON.parse(await readFile15(join8(dir, STAMP_FILE), "utf8"));
150133
+ const parsed = JSON.parse(await readFile15(join9(dir, STAMP_FILE), "utf8"));
149649
150134
  return parsed.sha256 === void 0 || parsed.size === void 0 || parsed.total === void 0 ? void 0 : { sha256: parsed.sha256, size: parsed.size, total: parsed.total };
149650
150135
  } catch {
149651
150136
  return void 0;
@@ -149653,14 +150138,14 @@ var init_render = __esm({
149653
150138
  };
149654
150139
  clearImages = async (dir) => {
149655
150140
  const names = await listDir(dir);
149656
- await Promise.all(names.filter((name) => /^(?:slide|page)-\d+\.png$/.test(name)).map((name) => rm3(join8(dir, name), { force: true })));
150141
+ await Promise.all(names.filter((name) => /^(?:slide|page)-\d+\.png$/.test(name)).map((name) => rm4(join9(dir, name), { force: true })));
149657
150142
  };
149658
150143
  ignoreInGit = async (workspaceRoot2, outDir) => {
149659
- if (workspaceRoot2 === void 0 || !outDir.startsWith(join8(workspaceRoot2, RENDERED_DIR))) {
150144
+ if (workspaceRoot2 === void 0 || !outDir.startsWith(join9(workspaceRoot2, RENDERED_DIR))) {
149660
150145
  return;
149661
150146
  }
149662
150147
  try {
149663
- await writeFile2(join8(workspaceRoot2, RENDERED_DIR, ".gitignore"), "# fileq's rendered pages; regenerated on demand.\n*\n", { flag: "wx" });
150148
+ await writeFile2(join9(workspaceRoot2, RENDERED_DIR, ".gitignore"), "# fileq's rendered pages; regenerated on demand.\n*\n", { flag: "wx" });
149664
150149
  } catch {
149665
150150
  }
149666
150151
  };
@@ -149715,16 +150200,16 @@ var init_render = __esm({
149715
150200
  const pages = choosePages(request, cached.total, unit, notes);
149716
150201
  const existing = new Set(await listDir(outDir));
149717
150202
  if (pages.every((page) => existing.has(`${unit}-${page}.png`))) {
149718
- return { format, unit, total: cached.total, images: pages.map((page) => ({ page, path: join8(outDir, `${unit}-${page}.png`) })), outDir, reused: true, notes };
150203
+ return { format, unit, total: cached.total, images: pages.map((page) => ({ page, path: join9(outDir, `${unit}-${page}.png`) })), outDir, reused: true, notes };
149719
150204
  }
149720
150205
  notes.length = 0;
149721
150206
  }
149722
- const work = await mkdtemp2(join8(tmpdir2(), "fileq-render-"));
150207
+ const work = await mkdtemp2(join9(tmpdir2(), "fileq-render-"));
149723
150208
  try {
149724
150209
  const pdf = binary === void 0 ? request.absPath : await toPdf(binary, request.absPath, format, work);
149725
150210
  const total = await pageCount(pdf);
149726
150211
  const pages = choosePages(request, total, unit, notes);
149727
- const raster = join8(work, "png");
150212
+ const raster = join9(work, "png");
149728
150213
  await mkdir2(raster, { recursive: true });
149729
150214
  const drawn = await toPngs(tool, pdf, pages, request.size, raster);
149730
150215
  await mkdir2(outDir, { recursive: true });
@@ -149736,7 +150221,7 @@ var init_render = __esm({
149736
150221
  for (const page of pages) {
149737
150222
  const from = drawn.get(page);
149738
150223
  if (from !== void 0) {
149739
- const path = join8(outDir, `${unit}-${page}.png`);
150224
+ const path = join9(outDir, `${unit}-${page}.png`);
149740
150225
  await copyFile(from, path);
149741
150226
  images.push({ page, path });
149742
150227
  }
@@ -149745,19 +150230,19 @@ var init_render = __esm({
149745
150230
  notes.push(`${pages.length - images.length} of the ${unit}s asked for drew nothing`);
149746
150231
  }
149747
150232
  if (request.outDir === void 0) {
149748
- await writeFile2(join8(outDir, STAMP_FILE), `${JSON.stringify({ sha256, size: request.size, total })}
150233
+ await writeFile2(join9(outDir, STAMP_FILE), `${JSON.stringify({ sha256, size: request.size, total })}
149749
150234
  `);
149750
150235
  }
149751
150236
  return { format, unit, total, images, outDir, reused: false, notes };
149752
150237
  } finally {
149753
- await rm3(work, { recursive: true, force: true });
150238
+ await rm4(work, { recursive: true, force: true });
149754
150239
  }
149755
150240
  };
149756
150241
  }
149757
150242
  });
149758
150243
 
149759
150244
  // ../fileq/src/commands/render.command.ts
149760
- import { basename as basename6, resolve as resolve5 } from "node:path";
150245
+ import { basename as basename7, resolve as resolve6 } from "node:path";
149761
150246
  var failure, summary, renderCommand;
149762
150247
  var init_render_command = __esm({
149763
150248
  "../fileq/src/commands/render.command.ts"() {
@@ -149782,7 +150267,7 @@ var init_render_command = __esm({
149782
150267
  summary = (file, result) => {
149783
150268
  const drawn = result.images.map((image) => image.page);
149784
150269
  const fields = [
149785
- basename6(file),
150270
+ basename7(file),
149786
150271
  result.format,
149787
150272
  `${result.total} ${result.unit}${result.total === 1 ? "" : "s"}`,
149788
150273
  drawn.length === 0 ? "nothing drawn" : `drew ${result.unit}${drawn.length === 1 ? "" : "s"} ${describePages(drawn)}`,
@@ -149805,12 +150290,12 @@ var init_render_command = __esm({
149805
150290
  }
149806
150291
  },
149807
150292
  async func(flags, file) {
149808
- const absPath = resolve5(file);
150293
+ const absPath = resolve6(file);
149809
150294
  let result;
149810
150295
  try {
149811
150296
  const pages = flags.pages === void 0 ? void 0 : parsePages(flags.pages);
149812
150297
  const size = Math.max(64, Math.round(flags.size));
149813
- result = await renderDocument({ absPath, pages, outDir: flags.out === void 0 ? void 0 : resolve5(flags.out), size }, workspaceRoot());
150298
+ result = await renderDocument({ absPath, pages, outDir: flags.out === void 0 ? void 0 : resolve6(flags.out), size }, workspaceRoot());
149814
150299
  } catch (cause) {
149815
150300
  const known = failure(cause);
149816
150301
  this.process.stdout.write(`fileq: cannot render ${absPath}: ${known?.message ?? errorMessage(cause)}