@casualtheorics/argdown-mcp 0.2.0 → 0.3.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.
Files changed (4) hide show
  1. package/README.md +317 -75
  2. package/dist/cli.js +220469 -0
  3. package/dist/server.js +658 -588
  4. package/package.json +48 -37
package/dist/server.js CHANGED
@@ -41,8 +41,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
41
41
  ));
42
42
 
43
43
  // .yarn/__virtual__/tsup-virtual-c82205643d/0/cache/tsup-npm-8.5.1-41f4f7d59b-86b0a5ee55.zip/node_modules/tsup/assets/esm_shims.js
44
- import path from "path";
45
- import { fileURLToPath } from "url";
44
+ import path from "node:path";
45
+ import { fileURLToPath } from "node:url";
46
46
  var getFilename, getDirname, __dirname, __filename;
47
47
  var init_esm_shims = __esm({
48
48
  ".yarn/__virtual__/tsup-virtual-c82205643d/0/cache/tsup-npm-8.5.1-41f4f7d59b-86b0a5ee55.zip/node_modules/tsup/assets/esm_shims.js"() {
@@ -3272,8 +3272,8 @@ var require_utils = __commonJS({
3272
3272
  }
3273
3273
  return ind;
3274
3274
  }
3275
- function removeDotSegments(path12) {
3276
- let input = path12;
3275
+ function removeDotSegments(path11) {
3276
+ let input = path11;
3277
3277
  const output = [];
3278
3278
  let nextSlash = -1;
3279
3279
  let len = 0;
@@ -3526,8 +3526,8 @@ var require_schemes = __commonJS({
3526
3526
  wsComponent.secure = void 0;
3527
3527
  }
3528
3528
  if (wsComponent.resourceName) {
3529
- const [path12, query] = wsComponent.resourceName.split("?");
3530
- wsComponent.path = path12 && path12 !== "/" ? path12 : void 0;
3529
+ const [path11, query] = wsComponent.resourceName.split("?");
3530
+ wsComponent.path = path11 && path11 !== "/" ? path11 : void 0;
3531
3531
  wsComponent.query = query;
3532
3532
  wsComponent.resourceName = void 0;
3533
3533
  }
@@ -10566,7 +10566,7 @@ var require_lodash5 = __commonJS({
10566
10566
  var freeProcess2 = moduleExports4 && freeGlobal2.process;
10567
10567
  var nodeUtil2 = (function() {
10568
10568
  try {
10569
- var types2 = freeModule4 && freeModule4.require && freeModule4.require("util").types;
10569
+ var types2 = freeModule4 && freeModule4.require && freeModule4.require("node:util").types;
10570
10570
  if (types2) {
10571
10571
  return types2;
10572
10572
  }
@@ -11711,7 +11711,7 @@ var require_lodash7 = __commonJS({
11711
11711
  var freeProcess2 = moduleExports4 && freeGlobal2.process;
11712
11712
  var nodeUtil2 = (function() {
11713
11713
  try {
11714
- var types2 = freeModule4 && freeModule4.require && freeModule4.require("util").types;
11714
+ var types2 = freeModule4 && freeModule4.require && freeModule4.require("node:util").types;
11715
11715
  if (types2) {
11716
11716
  return types2;
11717
11717
  }
@@ -18415,9 +18415,9 @@ var require_resolve_from = __commonJS({
18415
18415
  ".yarn/cache/resolve-from-npm-4.0.0-f758ec21bf-8408eec31a.zip/node_modules/resolve-from/index.js"(exports2, module2) {
18416
18416
  "use strict";
18417
18417
  init_esm_shims();
18418
- var path12 = __require("path");
18419
- var Module = __require("module");
18420
- var fs10 = __require("fs");
18418
+ var path11 = __require("node:path");
18419
+ var Module = __require("node:module");
18420
+ var fs10 = __require("node:fs");
18421
18421
  var resolveFrom = (fromDir, moduleId, silent) => {
18422
18422
  if (typeof fromDir !== "string") {
18423
18423
  throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDir}\``);
@@ -18429,14 +18429,14 @@ var require_resolve_from = __commonJS({
18429
18429
  fromDir = fs10.realpathSync(fromDir);
18430
18430
  } catch (err) {
18431
18431
  if (err.code === "ENOENT") {
18432
- fromDir = path12.resolve(fromDir);
18432
+ fromDir = path11.resolve(fromDir);
18433
18433
  } else if (silent) {
18434
18434
  return null;
18435
18435
  } else {
18436
18436
  throw err;
18437
18437
  }
18438
18438
  }
18439
- const fromFile = path12.join(fromDir, "noop.js");
18439
+ const fromFile = path11.join(fromDir, "noop.js");
18440
18440
  const resolveFileName = () => Module._resolveFilename(moduleId, {
18441
18441
  id: fromFile,
18442
18442
  filename: fromFile,
@@ -18511,7 +18511,7 @@ var require_import_fresh = __commonJS({
18511
18511
  ".yarn/cache/import-fresh-npm-3.3.1-1916794950-bf8cc49487.zip/node_modules/import-fresh/index.js"(exports2, module2) {
18512
18512
  "use strict";
18513
18513
  init_esm_shims();
18514
- var path12 = __require("path");
18514
+ var path11 = __require("node:path");
18515
18515
  var resolveFrom = require_resolve_from();
18516
18516
  var parentModule = require_parent_module();
18517
18517
  module2.exports = (moduleId) => {
@@ -18519,7 +18519,7 @@ var require_import_fresh = __commonJS({
18519
18519
  throw new TypeError("Expected a string");
18520
18520
  }
18521
18521
  const parentPath = parentModule(__filename);
18522
- const cwd = parentPath ? path12.dirname(parentPath) : __dirname;
18522
+ const cwd = parentPath ? path11.dirname(parentPath) : __dirname;
18523
18523
  const filePath = resolveFrom(cwd, moduleId);
18524
18524
  const oldModule = __require.cache[filePath];
18525
18525
  if (oldModule && oldModule.parent) {
@@ -18570,7 +18570,7 @@ var require_core4 = __commonJS({
18570
18570
  }
18571
18571
  if (!crypto3 && typeof __require === "function") {
18572
18572
  try {
18573
- crypto3 = __require("crypto");
18573
+ crypto3 = __require("node:crypto");
18574
18574
  } catch (err) {
18575
18575
  }
18576
18576
  }
@@ -152252,7 +152252,7 @@ var require_lib3 = __commonJS({
152252
152252
  ".yarn/cache/jpeg-exif-npm-1.1.4-b22cfb6a0d-0f9225b242.zip/node_modules/jpeg-exif/lib/index.js"(exports2) {
152253
152253
  "use strict";
152254
152254
  init_esm_shims();
152255
- var _fs = __require("fs");
152255
+ var _fs = __require("node:fs");
152256
152256
  var _fs2 = _interopRequireDefault(_fs);
152257
152257
  function _interopRequireDefault(obj) {
152258
152258
  return obj && obj.__esModule ? obj : { default: obj };
@@ -155783,8 +155783,8 @@ var require_delayed_stream = __commonJS({
155783
155783
  ".yarn/cache/delayed-stream-npm-1.0.0-c5a4c4cc02-d758899da0.zip/node_modules/delayed-stream/lib/delayed_stream.js"(exports2, module2) {
155784
155784
  "use strict";
155785
155785
  init_esm_shims();
155786
- var Stream = __require("stream").Stream;
155787
- var util4 = __require("util");
155786
+ var Stream = __require("node:stream").Stream;
155787
+ var util4 = __require("node:util");
155788
155788
  module2.exports = DelayedStream;
155789
155789
  function DelayedStream() {
155790
155790
  this.source = null;
@@ -155876,8 +155876,8 @@ var require_combined_stream = __commonJS({
155876
155876
  ".yarn/cache/combined-stream-npm-1.0.8-dc14d4a63a-0dbb829577.zip/node_modules/combined-stream/lib/combined_stream.js"(exports2, module2) {
155877
155877
  "use strict";
155878
155878
  init_esm_shims();
155879
- var util4 = __require("util");
155880
- var Stream = __require("stream").Stream;
155879
+ var util4 = __require("node:util");
155880
+ var Stream = __require("node:stream").Stream;
155881
155881
  var DelayedStream = require_delayed_stream();
155882
155882
  module2.exports = CombinedStream;
155883
155883
  function CombinedStream() {
@@ -164582,7 +164582,7 @@ var require_mime_types = __commonJS({
164582
164582
  "use strict";
164583
164583
  init_esm_shims();
164584
164584
  var db = require_mime_db();
164585
- var extname4 = __require("path").extname;
164585
+ var extname4 = __require("node:path").extname;
164586
164586
  var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
164587
164587
  var TEXT_TYPE_REGEXP = /^text\//i;
164588
164588
  exports2.charset = charset;
@@ -164632,11 +164632,11 @@ var require_mime_types = __commonJS({
164632
164632
  }
164633
164633
  return exts[0];
164634
164634
  }
164635
- function lookup(path12) {
164636
- if (!path12 || typeof path12 !== "string") {
164635
+ function lookup(path11) {
164636
+ if (!path11 || typeof path11 !== "string") {
164637
164637
  return false;
164638
164638
  }
164639
- var extension2 = extname4("x." + path12).toLowerCase().substr(1);
164639
+ var extension2 = extname4("x." + path11).toLowerCase().substr(1);
164640
164640
  if (!extension2) {
164641
164641
  return false;
164642
164642
  }
@@ -165836,14 +165836,14 @@ var require_form_data = __commonJS({
165836
165836
  "use strict";
165837
165837
  init_esm_shims();
165838
165838
  var CombinedStream = require_combined_stream();
165839
- var util4 = __require("util");
165840
- var path12 = __require("path");
165841
- var http3 = __require("http");
165842
- var https2 = __require("https");
165843
- var parseUrl2 = __require("url").parse;
165844
- var fs10 = __require("fs");
165845
- var Stream = __require("stream").Stream;
165846
- var crypto3 = __require("crypto");
165839
+ var util4 = __require("node:util");
165840
+ var path11 = __require("node:path");
165841
+ var http3 = __require("node:http");
165842
+ var https2 = __require("node:https");
165843
+ var parseUrl2 = __require("node:url").parse;
165844
+ var fs10 = __require("node:fs");
165845
+ var Stream = __require("node:stream").Stream;
165846
+ var crypto3 = __require("node:crypto");
165847
165847
  var mime = require_mime_types();
165848
165848
  var asynckit = require_asynckit();
165849
165849
  var setToStringTag = require_es_set_tostringtag();
@@ -165965,11 +165965,11 @@ var require_form_data = __commonJS({
165965
165965
  FormData3.prototype._getContentDisposition = function(value, options) {
165966
165966
  var filename;
165967
165967
  if (typeof options.filepath === "string") {
165968
- filename = path12.normalize(options.filepath).replace(/\\/g, "/");
165968
+ filename = path11.normalize(options.filepath).replace(/\\/g, "/");
165969
165969
  } else if (options.filename || value && (value.name || value.path)) {
165970
- filename = path12.basename(options.filename || value && (value.name || value.path));
165970
+ filename = path11.basename(options.filename || value && (value.name || value.path));
165971
165971
  } else if (value && value.readable && hasOwn(value, "httpVersion")) {
165972
- filename = path12.basename(value.client._httpMessage.path || "");
165972
+ filename = path11.basename(value.client._httpMessage.path || "");
165973
165973
  }
165974
165974
  if (filename) {
165975
165975
  return 'filename="' + filename + '"';
@@ -166624,8 +166624,8 @@ var require_node = __commonJS({
166624
166624
  ".yarn/__virtual__/debug-virtual-f1d35ffda4/0/cache/debug-npm-4.4.3-0105c6123a-d79136ec6c.zip/node_modules/debug/src/node.js"(exports2, module2) {
166625
166625
  "use strict";
166626
166626
  init_esm_shims();
166627
- var tty = __require("tty");
166628
- var util4 = __require("util");
166627
+ var tty = __require("node:tty");
166628
+ var util4 = __require("node:util");
166629
166629
  exports2.init = init2;
166630
166630
  exports2.log = log;
166631
166631
  exports2.formatArgs = formatArgs;
@@ -166839,7 +166839,7 @@ var require_src2 = __commonJS({
166839
166839
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
166840
166840
  return mod && mod.__esModule ? mod : { "default": mod };
166841
166841
  };
166842
- var events_1 = __require("events");
166842
+ var events_1 = __require("node:events");
166843
166843
  var debug_1 = __importDefault(require_src());
166844
166844
  var promisify_1 = __importDefault(require_promisify());
166845
166845
  var debug = debug_1.default("agent-base");
@@ -167118,10 +167118,10 @@ var require_agent = __commonJS({
167118
167118
  return mod && mod.__esModule ? mod : { "default": mod };
167119
167119
  };
167120
167120
  Object.defineProperty(exports2, "__esModule", { value: true });
167121
- var net_1 = __importDefault(__require("net"));
167122
- var tls_1 = __importDefault(__require("tls"));
167123
- var url_1 = __importDefault(__require("url"));
167124
- var assert_1 = __importDefault(__require("assert"));
167121
+ var net_1 = __importDefault(__require("node:net"));
167122
+ var tls_1 = __importDefault(__require("node:tls"));
167123
+ var url_1 = __importDefault(__require("node:url"));
167124
+ var assert_1 = __importDefault(__require("node:assert"));
167125
167125
  var debug_1 = __importDefault(require_src());
167126
167126
  var agent_base_1 = require_src2();
167127
167127
  var parse_proxy_response_1 = __importDefault(require_parse_proxy_response());
@@ -167290,12 +167290,12 @@ var require_follow_redirects = __commonJS({
167290
167290
  ".yarn/__virtual__/follow-redirects-virtual-5635fcf123/0/cache/follow-redirects-npm-1.16.0-816e4f62d9-a1e2900163.zip/node_modules/follow-redirects/index.js"(exports2, module2) {
167291
167291
  "use strict";
167292
167292
  init_esm_shims();
167293
- var url2 = __require("url");
167293
+ var url2 = __require("node:url");
167294
167294
  var URL2 = url2.URL;
167295
- var http3 = __require("http");
167296
- var https2 = __require("https");
167297
- var Writable = __require("stream").Writable;
167298
- var assert2 = __require("assert");
167295
+ var http3 = __require("node:http");
167296
+ var https2 = __require("node:https");
167297
+ var Writable = __require("node:stream").Writable;
167298
+ var assert2 = __require("node:assert");
167299
167299
  var debug = require_debug();
167300
167300
  (function detectUnsupportedEnvironment() {
167301
167301
  var looksLikeNode = typeof process !== "undefined";
@@ -170491,8 +170491,8 @@ function getErrorMap() {
170491
170491
  // .yarn/cache/zod-npm-3.25.76-7de26333f8-5718ec35e3.zip/node_modules/zod/v3/helpers/parseUtil.js
170492
170492
  init_esm_shims();
170493
170493
  var makeIssue = (params) => {
170494
- const { data, path: path12, errorMaps, issueData } = params;
170495
- const fullPath = [...path12, ...issueData.path || []];
170494
+ const { data, path: path11, errorMaps, issueData } = params;
170495
+ const fullPath = [...path11, ...issueData.path || []];
170496
170496
  const fullIssue = {
170497
170497
  ...issueData,
170498
170498
  path: fullPath
@@ -170612,11 +170612,11 @@ var errorUtil;
170612
170612
 
170613
170613
  // .yarn/cache/zod-npm-3.25.76-7de26333f8-5718ec35e3.zip/node_modules/zod/v3/types.js
170614
170614
  var ParseInputLazyPath = class {
170615
- constructor(parent, value, path12, key) {
170615
+ constructor(parent, value, path11, key) {
170616
170616
  this._cachedPath = [];
170617
170617
  this.parent = parent;
170618
170618
  this.data = value;
170619
- this._path = path12;
170619
+ this._path = path11;
170620
170620
  this._key = key;
170621
170621
  }
170622
170622
  get path() {
@@ -174267,10 +174267,10 @@ function assignProp(target, prop, value) {
174267
174267
  configurable: true
174268
174268
  });
174269
174269
  }
174270
- function getElementAtPath(obj, path12) {
174271
- if (!path12)
174270
+ function getElementAtPath(obj, path11) {
174271
+ if (!path11)
174272
174272
  return obj;
174273
- return path12.reduce((acc, key) => acc?.[key], obj);
174273
+ return path11.reduce((acc, key) => acc?.[key], obj);
174274
174274
  }
174275
174275
  function promiseAllObject(promisesObj) {
174276
174276
  const keys2 = Object.keys(promisesObj);
@@ -174590,11 +174590,11 @@ function aborted(x2, startIndex = 0) {
174590
174590
  }
174591
174591
  return false;
174592
174592
  }
174593
- function prefixIssues(path12, issues) {
174593
+ function prefixIssues(path11, issues) {
174594
174594
  return issues.map((iss) => {
174595
174595
  var _a;
174596
174596
  (_a = iss).path ?? (_a.path = []);
174597
- iss.path.unshift(path12);
174597
+ iss.path.unshift(path11);
174598
174598
  return iss;
174599
174599
  });
174600
174600
  }
@@ -184256,7 +184256,7 @@ var EMPTY_COMPLETION_RESULT = {
184256
184256
 
184257
184257
  // .yarn/__virtual__/@modelcontextprotocol-sdk-virtual-71fefb608e/0/cache/@modelcontextprotocol-sdk-npm-1.29.0-51771aaf2d-7c4bc33920.zip/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
184258
184258
  init_esm_shims();
184259
- import process2 from "process";
184259
+ import process2 from "node:process";
184260
184260
 
184261
184261
  // .yarn/__virtual__/@modelcontextprotocol-sdk-virtual-71fefb608e/0/cache/@modelcontextprotocol-sdk-npm-1.29.0-51771aaf2d-7c4bc33920.zip/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
184262
184262
  init_esm_shims();
@@ -184348,18 +184348,83 @@ var StdioServerTransport = class {
184348
184348
  }
184349
184349
  };
184350
184350
 
184351
- // src/server.ts
184352
- import { readFileSync } from "fs";
184353
- import { fileURLToPath as fileURLToPath2 } from "url";
184354
- import path11 from "path";
184355
-
184356
- // src/tools/shared.ts
184357
- init_esm_shims();
184351
+ // package.json
184352
+ var package_default = {
184353
+ name: "@casualtheorics/argdown-mcp",
184354
+ version: "0.3.0",
184355
+ description: "stdio MCP server wrapping the Argdown argumentation toolchain (parse + JSON export + Dung grounded extension)",
184356
+ keywords: [
184357
+ "argdown",
184358
+ "argumentation",
184359
+ "claude",
184360
+ "mcp",
184361
+ "model-context-protocol"
184362
+ ],
184363
+ homepage: "https://github.com/casualtheorics/argdown-mcp#readme",
184364
+ bugs: {
184365
+ url: "https://github.com/casualtheorics/argdown-mcp/issues"
184366
+ },
184367
+ license: "MIT",
184368
+ author: "Casual Theorics",
184369
+ repository: {
184370
+ type: "git",
184371
+ url: "https://github.com/casualtheorics/argdown-mcp.git"
184372
+ },
184373
+ bin: {
184374
+ "argdown-cli": "./dist/cli.js",
184375
+ "argdown-mcp": "./dist/server.js"
184376
+ },
184377
+ files: [
184378
+ "dist/server.js",
184379
+ "dist/cli.js"
184380
+ ],
184381
+ os: [
184382
+ "!win32"
184383
+ ],
184384
+ type: "module",
184385
+ publishConfig: {
184386
+ access: "public"
184387
+ },
184388
+ scripts: {
184389
+ build: "tsup",
184390
+ dev: "tsup --watch",
184391
+ typecheck: "tsc --noEmit",
184392
+ test: "vitest run",
184393
+ smoke: "bash scripts/smoke.sh",
184394
+ "smoke:deno": "bash scripts/smoke-deno.sh",
184395
+ "bundle-sanity": "bash scripts/bundle-sanity.sh",
184396
+ lint: "oxlint",
184397
+ "lint:fix": "oxlint --fix",
184398
+ format: "oxfmt",
184399
+ "format:check": "oxfmt --check",
184400
+ prepublishOnly: "yarn build && yarn typecheck && yarn lint && yarn format:check && yarn test",
184401
+ release: "yarn npm publish --access public"
184402
+ },
184403
+ devDependencies: {
184404
+ "@argdown/core": "2.0.1",
184405
+ "@argdown/node": "2.0.3",
184406
+ "@modelcontextprotocol/sdk": "1.29.0",
184407
+ "@rollup/rollup-darwin-arm64": "4.60.3",
184408
+ "@types/node": "24.12.4",
184409
+ "@yarnpkg/sdks": "3.2.3",
184410
+ oxfmt: "0.51.0",
184411
+ oxlint: "1.66.0",
184412
+ "oxlint-tsgolint": "0.23.0",
184413
+ tsup: "8.5.1",
184414
+ typescript: "5.9.3",
184415
+ vitest: "4.1.6",
184416
+ zod: "3.25.76"
184417
+ },
184418
+ engines: {
184419
+ node: ">=24"
184420
+ },
184421
+ packageManager: "yarn@4.14.1"
184422
+ };
184358
184423
 
184359
- // src/argdown/inline.ts
184424
+ // src/tools/dung.ts
184360
184425
  init_esm_shims();
184361
184426
 
184362
- // src/argdown/build-app.ts
184427
+ // src/argdown/dung.ts
184363
184428
  init_esm_shims();
184364
184429
 
184365
184430
  // .yarn/cache/@argdown-core-npm-2.0.1-fa9833a07f-feb109ea72.zip/node_modules/@argdown/core/dist/index.js
@@ -185162,7 +185227,7 @@ var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
185162
185227
  var freeProcess = moduleExports2 && freeGlobal_default.process;
185163
185228
  var nodeUtil = (function() {
185164
185229
  try {
185165
- var types2 = freeModule2 && freeModule2.require && freeModule2.require("util").types;
185230
+ var types2 = freeModule2 && freeModule2.require && freeModule2.require("node:util").types;
185166
185231
  if (types2) {
185167
185232
  return types2;
185168
185233
  }
@@ -185669,19 +185734,19 @@ function toKey(value) {
185669
185734
  var toKey_default = toKey;
185670
185735
 
185671
185736
  // .yarn/cache/lodash-es-npm-4.17.23-b4279789e6-3150fb6660.zip/node_modules/lodash-es/_baseGet.js
185672
- function baseGet(object3, path12) {
185673
- path12 = castPath_default(path12, object3);
185674
- var index = 0, length = path12.length;
185737
+ function baseGet(object3, path11) {
185738
+ path11 = castPath_default(path11, object3);
185739
+ var index = 0, length = path11.length;
185675
185740
  while (object3 != null && index < length) {
185676
- object3 = object3[toKey_default(path12[index++])];
185741
+ object3 = object3[toKey_default(path11[index++])];
185677
185742
  }
185678
185743
  return index && index == length ? object3 : void 0;
185679
185744
  }
185680
185745
  var baseGet_default = baseGet;
185681
185746
 
185682
185747
  // .yarn/cache/lodash-es-npm-4.17.23-b4279789e6-3150fb6660.zip/node_modules/lodash-es/get.js
185683
- function get(object3, path12, defaultValue) {
185684
- var result = object3 == null ? void 0 : baseGet_default(object3, path12);
185748
+ function get(object3, path11, defaultValue) {
185749
+ var result = object3 == null ? void 0 : baseGet_default(object3, path11);
185685
185750
  return result === void 0 ? defaultValue : result;
185686
185751
  }
185687
185752
  var get_default = get;
@@ -186710,11 +186775,11 @@ var baseHasIn_default = baseHasIn;
186710
186775
 
186711
186776
  // .yarn/cache/lodash-es-npm-4.17.23-b4279789e6-3150fb6660.zip/node_modules/lodash-es/_hasPath.js
186712
186777
  init_esm_shims();
186713
- function hasPath(object3, path12, hasFunc) {
186714
- path12 = castPath_default(path12, object3);
186715
- var index = -1, length = path12.length, result = false;
186778
+ function hasPath(object3, path11, hasFunc) {
186779
+ path11 = castPath_default(path11, object3);
186780
+ var index = -1, length = path11.length, result = false;
186716
186781
  while (++index < length) {
186717
- var key = toKey_default(path12[index]);
186782
+ var key = toKey_default(path11[index]);
186718
186783
  if (!(result = object3 != null && hasFunc(object3, key))) {
186719
186784
  break;
186720
186785
  }
@@ -186729,21 +186794,21 @@ function hasPath(object3, path12, hasFunc) {
186729
186794
  var hasPath_default = hasPath;
186730
186795
 
186731
186796
  // .yarn/cache/lodash-es-npm-4.17.23-b4279789e6-3150fb6660.zip/node_modules/lodash-es/hasIn.js
186732
- function hasIn(object3, path12) {
186733
- return object3 != null && hasPath_default(object3, path12, baseHasIn_default);
186797
+ function hasIn(object3, path11) {
186798
+ return object3 != null && hasPath_default(object3, path11, baseHasIn_default);
186734
186799
  }
186735
186800
  var hasIn_default = hasIn;
186736
186801
 
186737
186802
  // .yarn/cache/lodash-es-npm-4.17.23-b4279789e6-3150fb6660.zip/node_modules/lodash-es/_baseMatchesProperty.js
186738
186803
  var COMPARE_PARTIAL_FLAG6 = 1;
186739
186804
  var COMPARE_UNORDERED_FLAG4 = 2;
186740
- function baseMatchesProperty(path12, srcValue) {
186741
- if (isKey_default(path12) && isStrictComparable_default(srcValue)) {
186742
- return matchesStrictComparable_default(toKey_default(path12), srcValue);
186805
+ function baseMatchesProperty(path11, srcValue) {
186806
+ if (isKey_default(path11) && isStrictComparable_default(srcValue)) {
186807
+ return matchesStrictComparable_default(toKey_default(path11), srcValue);
186743
186808
  }
186744
186809
  return function(object3) {
186745
- var objValue = get_default(object3, path12);
186746
- return objValue === void 0 && objValue === srcValue ? hasIn_default(object3, path12) : baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4);
186810
+ var objValue = get_default(object3, path11);
186811
+ return objValue === void 0 && objValue === srcValue ? hasIn_default(object3, path11) : baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4);
186747
186812
  };
186748
186813
  }
186749
186814
  var baseMatchesProperty_default = baseMatchesProperty;
@@ -186762,16 +186827,16 @@ var baseProperty_default = baseProperty;
186762
186827
 
186763
186828
  // .yarn/cache/lodash-es-npm-4.17.23-b4279789e6-3150fb6660.zip/node_modules/lodash-es/_basePropertyDeep.js
186764
186829
  init_esm_shims();
186765
- function basePropertyDeep(path12) {
186830
+ function basePropertyDeep(path11) {
186766
186831
  return function(object3) {
186767
- return baseGet_default(object3, path12);
186832
+ return baseGet_default(object3, path11);
186768
186833
  };
186769
186834
  }
186770
186835
  var basePropertyDeep_default = basePropertyDeep;
186771
186836
 
186772
186837
  // .yarn/cache/lodash-es-npm-4.17.23-b4279789e6-3150fb6660.zip/node_modules/lodash-es/property.js
186773
- function property(path12) {
186774
- return isKey_default(path12) ? baseProperty_default(toKey_default(path12)) : basePropertyDeep_default(path12);
186838
+ function property(path11) {
186839
+ return isKey_default(path11) ? baseProperty_default(toKey_default(path11)) : basePropertyDeep_default(path11);
186775
186840
  }
186776
186841
  var property_default = property;
186777
186842
 
@@ -187203,8 +187268,8 @@ function baseHas(object3, key) {
187203
187268
  var baseHas_default = baseHas;
187204
187269
 
187205
187270
  // .yarn/cache/lodash-es-npm-4.17.23-b4279789e6-3150fb6660.zip/node_modules/lodash-es/has.js
187206
- function has(object3, path12) {
187207
- return object3 != null && hasPath_default(object3, path12, baseHas_default);
187271
+ function has(object3, path11) {
187272
+ return object3 != null && hasPath_default(object3, path11, baseHas_default);
187208
187273
  }
187209
187274
  var has_default = has;
187210
187275
 
@@ -187350,14 +187415,14 @@ init_esm_shims();
187350
187415
 
187351
187416
  // .yarn/cache/lodash-es-npm-4.17.23-b4279789e6-3150fb6660.zip/node_modules/lodash-es/_baseSet.js
187352
187417
  init_esm_shims();
187353
- function baseSet(object3, path12, value, customizer) {
187418
+ function baseSet(object3, path11, value, customizer) {
187354
187419
  if (!isObject_default(object3)) {
187355
187420
  return object3;
187356
187421
  }
187357
- path12 = castPath_default(path12, object3);
187358
- var index = -1, length = path12.length, lastIndex = length - 1, nested = object3;
187422
+ path11 = castPath_default(path11, object3);
187423
+ var index = -1, length = path11.length, lastIndex = length - 1, nested = object3;
187359
187424
  while (nested != null && ++index < length) {
187360
- var key = toKey_default(path12[index]), newValue = value;
187425
+ var key = toKey_default(path11[index]), newValue = value;
187361
187426
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
187362
187427
  return object3;
187363
187428
  }
@@ -187365,7 +187430,7 @@ function baseSet(object3, path12, value, customizer) {
187365
187430
  var objValue = nested[key];
187366
187431
  newValue = customizer ? customizer(objValue, key, nested) : void 0;
187367
187432
  if (newValue === void 0) {
187368
- newValue = isObject_default(objValue) ? objValue : isIndex_default(path12[index + 1]) ? [] : {};
187433
+ newValue = isObject_default(objValue) ? objValue : isIndex_default(path11[index + 1]) ? [] : {};
187369
187434
  }
187370
187435
  }
187371
187436
  assignValue_default(nested, key, newValue);
@@ -187379,9 +187444,9 @@ var baseSet_default = baseSet;
187379
187444
  function basePickBy(object3, paths, predicate) {
187380
187445
  var index = -1, length = paths.length, result = {};
187381
187446
  while (++index < length) {
187382
- var path12 = paths[index], value = baseGet_default(object3, path12);
187383
- if (predicate(value, path12)) {
187384
- baseSet_default(result, castPath_default(path12, object3), value);
187447
+ var path11 = paths[index], value = baseGet_default(object3, path11);
187448
+ if (predicate(value, path11)) {
187449
+ baseSet_default(result, castPath_default(path11, object3), value);
187385
187450
  }
187386
187451
  }
187387
187452
  return result;
@@ -187397,8 +187462,8 @@ function pickBy(object3, predicate) {
187397
187462
  return [prop];
187398
187463
  });
187399
187464
  predicate = baseIteratee_default(predicate);
187400
- return basePickBy_default(object3, props, function(value, path12) {
187401
- return predicate(value, path12[0]);
187465
+ return basePickBy_default(object3, props, function(value, path11) {
187466
+ return predicate(value, path11[0]);
187402
187467
  });
187403
187468
  }
187404
187469
  var pickBy_default = pickBy;
@@ -189948,12 +190013,12 @@ function assignCategoriesMapProp(tokenTypes) {
189948
190013
  singleAssignCategoriesToksMap([], currTokType);
189949
190014
  });
189950
190015
  }
189951
- function singleAssignCategoriesToksMap(path12, nextNode) {
189952
- forEach_default(path12, (pathNode) => {
190016
+ function singleAssignCategoriesToksMap(path11, nextNode) {
190017
+ forEach_default(path11, (pathNode) => {
189953
190018
  nextNode.categoryMatchesMap[pathNode.tokenTypeIdx] = true;
189954
190019
  });
189955
190020
  forEach_default(nextNode.CATEGORIES, (nextCategory) => {
189956
- const newPath = path12.concat(nextNode);
190021
+ const newPath = path11.concat(nextNode);
189957
190022
  if (!includes_default(newPath, nextCategory)) {
189958
190023
  singleAssignCategoriesToksMap(newPath, nextCategory);
189959
190024
  }
@@ -190810,10 +190875,10 @@ init_esm_shims();
190810
190875
  // .yarn/cache/chevrotain-npm-11.2.0-c89fd6b650-247cb0061d.zip/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js
190811
190876
  init_esm_shims();
190812
190877
  var AbstractNextPossibleTokensWalker = class extends RestWalker {
190813
- constructor(topProd, path12) {
190878
+ constructor(topProd, path11) {
190814
190879
  super();
190815
190880
  this.topProd = topProd;
190816
- this.path = path12;
190881
+ this.path = path11;
190817
190882
  this.possibleTokTypes = [];
190818
190883
  this.nextProductionName = "";
190819
190884
  this.nextProductionOccurrence = 0;
@@ -190857,9 +190922,9 @@ var AbstractNextPossibleTokensWalker = class extends RestWalker {
190857
190922
  }
190858
190923
  };
190859
190924
  var NextAfterTokenWalker = class extends AbstractNextPossibleTokensWalker {
190860
- constructor(topProd, path12) {
190861
- super(topProd, path12);
190862
- this.path = path12;
190925
+ constructor(topProd, path11) {
190926
+ super(topProd, path11);
190927
+ this.path = path11;
190863
190928
  this.nextTerminalName = "";
190864
190929
  this.nextTerminalOccurrence = 0;
190865
190930
  this.nextTerminalName = this.path.lastTok.name;
@@ -191455,10 +191520,10 @@ function initializeArrayOfArrays(size) {
191455
191520
  }
191456
191521
  return result;
191457
191522
  }
191458
- function pathToHashKeys(path12) {
191523
+ function pathToHashKeys(path11) {
191459
191524
  let keys2 = [""];
191460
- for (let i = 0; i < path12.length; i++) {
191461
- const tokType = path12[i];
191525
+ for (let i = 0; i < path11.length; i++) {
191526
+ const tokType = path11[i];
191462
191527
  const longerKeys = [];
191463
191528
  for (let j2 = 0; j2 < keys2.length; j2++) {
191464
191529
  const currShorterKey = keys2[j2];
@@ -191697,7 +191762,7 @@ function validateRuleIsOverridden(ruleName, definedRulesNames, className) {
191697
191762
  }
191698
191763
  return errors;
191699
191764
  }
191700
- function validateNoLeftRecursion(topRule, currRule, errMsgProvider, path12 = []) {
191765
+ function validateNoLeftRecursion(topRule, currRule, errMsgProvider, path11 = []) {
191701
191766
  const errors = [];
191702
191767
  const nextNonTerminals = getFirstNoneTerminal(currRule.definition);
191703
191768
  if (isEmpty_default(nextNonTerminals)) {
@@ -191709,15 +191774,15 @@ function validateNoLeftRecursion(topRule, currRule, errMsgProvider, path12 = [])
191709
191774
  errors.push({
191710
191775
  message: errMsgProvider.buildLeftRecursionError({
191711
191776
  topLevelRule: topRule,
191712
- leftRecursionPath: path12
191777
+ leftRecursionPath: path11
191713
191778
  }),
191714
191779
  type: ParserDefinitionErrorType.LEFT_RECURSION,
191715
191780
  ruleName
191716
191781
  });
191717
191782
  }
191718
- const validNextSteps = difference_default(nextNonTerminals, path12.concat([topRule]));
191783
+ const validNextSteps = difference_default(nextNonTerminals, path11.concat([topRule]));
191719
191784
  const errorsFromNextSteps = flatMap_default(validNextSteps, (currRefRule) => {
191720
- const newPath = clone_default(path12);
191785
+ const newPath = clone_default(path11);
191721
191786
  newPath.push(currRefRule);
191722
191787
  return validateNoLeftRecursion(topRule, currRefRule, errMsgProvider, newPath);
191723
191788
  });
@@ -199460,8 +199525,8 @@ var SyncDotToSvgExportPlugin = class {
199460
199525
  nop
199461
199526
  };
199462
199527
  if (files) {
199463
- settings.images = Object.values(files).map(({ path: path12, width, height }) => ({
199464
- path: path12,
199528
+ settings.images = Object.values(files).map(({ path: path11, width, height }) => ({
199529
+ path: path11,
199465
199530
  width: `${width || 100}px`,
199466
199531
  height: `${height || 100}px`
199467
199532
  }));
@@ -206232,6 +206297,73 @@ init_esm_shims();
206232
206297
  // .yarn/cache/@argdown-core-npm-2.0.1-fa9833a07f-feb109ea72.zip/node_modules/@argdown/core/dist/deriveImplicitRelations.js
206233
206298
  init_esm_shims();
206234
206299
 
206300
+ // src/argdown/dung.ts
206301
+ function extractArgumentAttacks(resp) {
206302
+ const out = [];
206303
+ for (const r of resp.relations ?? []) {
206304
+ if (r.relationType !== RelationType.ATTACK) continue;
206305
+ if (r.from?.type !== ArgdownTypes.ARGUMENT) continue;
206306
+ if (r.to?.type !== ArgdownTypes.ARGUMENT) continue;
206307
+ const fromTitle = r.from.title;
206308
+ const toTitle = r.to.title;
206309
+ if (typeof fromTitle !== "string" || typeof toTitle !== "string") continue;
206310
+ out.push([fromTitle, toTitle]);
206311
+ }
206312
+ return out;
206313
+ }
206314
+ function computeGrounded(argumentIds, attacks) {
206315
+ const known = new Set(argumentIds);
206316
+ const label = /* @__PURE__ */ new Map();
206317
+ for (const id of argumentIds) label.set(id, "undec");
206318
+ const attackersOf = /* @__PURE__ */ new Map();
206319
+ for (const id of argumentIds) attackersOf.set(id, []);
206320
+ for (const [from, to] of attacks) {
206321
+ if (!known.has(from) || !known.has(to)) continue;
206322
+ attackersOf.get(to).push(from);
206323
+ }
206324
+ let changed = true;
206325
+ while (changed) {
206326
+ changed = false;
206327
+ for (const id of argumentIds) {
206328
+ if (label.get(id) !== "undec") continue;
206329
+ const attackers = attackersOf.get(id);
206330
+ const allOut = attackers.every((a) => label.get(a) === "out");
206331
+ if (allOut) {
206332
+ label.set(id, "in");
206333
+ changed = true;
206334
+ continue;
206335
+ }
206336
+ const someIn = attackers.some((a) => label.get(a) === "in");
206337
+ if (someIn) {
206338
+ label.set(id, "out");
206339
+ changed = true;
206340
+ }
206341
+ }
206342
+ }
206343
+ const ext = { in: [], out: [], undec: [] };
206344
+ for (const id of argumentIds) {
206345
+ ext[label.get(id)].push(id);
206346
+ }
206347
+ return ext;
206348
+ }
206349
+ function dungGrounded(resp) {
206350
+ const argumentIds = Object.keys(resp.arguments ?? {});
206351
+ const attacks = extractArgumentAttacks(resp);
206352
+ const extension = computeGrounded(argumentIds, attacks);
206353
+ return {
206354
+ extension,
206355
+ argumentCount: argumentIds.length,
206356
+ attackCount: attacks.length
206357
+ };
206358
+ }
206359
+
206360
+ // src/argdown/file.ts
206361
+ init_esm_shims();
206362
+ import path10 from "node:path";
206363
+
206364
+ // src/argdown/build-app.ts
206365
+ init_esm_shims();
206366
+
206235
206367
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/index.js
206236
206368
  init_esm_shims();
206237
206369
 
@@ -206254,20 +206386,20 @@ var isAsyncPlugin = (plugin) => {
206254
206386
  };
206255
206387
 
206256
206388
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/AsyncArgdownApplication.js
206257
- import path2 from "path";
206389
+ import path2 from "node:path";
206258
206390
 
206259
206391
  // .yarn/cache/chokidar-npm-5.0.0-2f70d31c86-42fc907cb2.zip/node_modules/chokidar/index.js
206260
206392
  init_esm_shims();
206261
- import { EventEmitter as EventEmitter2 } from "events";
206262
- import { stat as statcb, Stats } from "fs";
206263
- import { readdir as readdir2, stat as stat3 } from "fs/promises";
206264
- import * as sp2 from "path";
206393
+ import { EventEmitter as EventEmitter2 } from "node:events";
206394
+ import { stat as statcb, Stats } from "node:fs";
206395
+ import { readdir as readdir2, stat as stat3 } from "node:fs/promises";
206396
+ import * as sp2 from "node:path";
206265
206397
 
206266
206398
  // .yarn/cache/readdirp-npm-5.0.0-82b01a282e-faf1ec57cf.zip/node_modules/readdirp/index.js
206267
206399
  init_esm_shims();
206268
- import { lstat, readdir, realpath, stat } from "fs/promises";
206269
- import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "path";
206270
- import { Readable } from "stream";
206400
+ import { lstat, readdir, realpath, stat } from "node:fs/promises";
206401
+ import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
206402
+ import { Readable } from "node:stream";
206271
206403
  var EntryTypes = {
206272
206404
  FILE_TYPE: "files",
206273
206405
  DIR_TYPE: "directories",
@@ -206348,7 +206480,7 @@ var ReaddirpStream = class extends Readable {
206348
206480
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
206349
206481
  const statMethod = opts.lstat ? lstat : stat;
206350
206482
  if (wantBigintFsStats) {
206351
- this._stat = (path12) => statMethod(path12, { bigint: true });
206483
+ this._stat = (path11) => statMethod(path11, { bigint: true });
206352
206484
  } else {
206353
206485
  this._stat = statMethod;
206354
206486
  }
@@ -206373,8 +206505,8 @@ var ReaddirpStream = class extends Readable {
206373
206505
  const par = this.parent;
206374
206506
  const fil = par && par.files;
206375
206507
  if (fil && fil.length > 0) {
206376
- const { path: path12, depth } = par;
206377
- const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path12));
206508
+ const { path: path11, depth } = par;
206509
+ const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path11));
206378
206510
  const awaited = await Promise.all(slice);
206379
206511
  for (const entry of awaited) {
206380
206512
  if (!entry)
@@ -206414,20 +206546,20 @@ var ReaddirpStream = class extends Readable {
206414
206546
  this.reading = false;
206415
206547
  }
206416
206548
  }
206417
- async _exploreDir(path12, depth) {
206549
+ async _exploreDir(path11, depth) {
206418
206550
  let files;
206419
206551
  try {
206420
- files = await readdir(path12, this._rdOptions);
206552
+ files = await readdir(path11, this._rdOptions);
206421
206553
  } catch (error2) {
206422
206554
  this._onError(error2);
206423
206555
  }
206424
- return { files, depth, path: path12 };
206556
+ return { files, depth, path: path11 };
206425
206557
  }
206426
- async _formatEntry(dirent, path12) {
206558
+ async _formatEntry(dirent, path11) {
206427
206559
  let entry;
206428
206560
  const basename5 = this._isDirent ? dirent.name : dirent;
206429
206561
  try {
206430
- const fullPath = presolve(pjoin(path12, basename5));
206562
+ const fullPath = presolve(pjoin(path11, basename5));
206431
206563
  entry = { path: prelative(this._root, fullPath), fullPath, basename: basename5 };
206432
206564
  entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
206433
206565
  } catch (err) {
@@ -206499,10 +206631,10 @@ function readdirp(root2, options = {}) {
206499
206631
 
206500
206632
  // .yarn/cache/chokidar-npm-5.0.0-2f70d31c86-42fc907cb2.zip/node_modules/chokidar/handler.js
206501
206633
  init_esm_shims();
206502
- import { watch as fs_watch, unwatchFile, watchFile } from "fs";
206503
- import { realpath as fsrealpath, lstat as lstat2, open, stat as stat2 } from "fs/promises";
206504
- import { type as osType } from "os";
206505
- import * as sp from "path";
206634
+ import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
206635
+ import { realpath as fsrealpath, lstat as lstat2, open, stat as stat2 } from "node:fs/promises";
206636
+ import { type as osType } from "node:os";
206637
+ import * as sp from "node:path";
206506
206638
  var STR_DATA = "data";
206507
206639
  var STR_END = "end";
206508
206640
  var STR_CLOSE = "close";
@@ -206828,16 +206960,16 @@ var delFromSet = (main, prop, item) => {
206828
206960
  };
206829
206961
  var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
206830
206962
  var FsWatchInstances = /* @__PURE__ */ new Map();
206831
- function createFsWatchInstance(path12, options, listener, errHandler, emitRaw) {
206963
+ function createFsWatchInstance(path11, options, listener, errHandler, emitRaw) {
206832
206964
  const handleEvent = (rawEvent, evPath) => {
206833
- listener(path12);
206834
- emitRaw(rawEvent, evPath, { watchedPath: path12 });
206835
- if (evPath && path12 !== evPath) {
206836
- fsWatchBroadcast(sp.resolve(path12, evPath), KEY_LISTENERS, sp.join(path12, evPath));
206965
+ listener(path11);
206966
+ emitRaw(rawEvent, evPath, { watchedPath: path11 });
206967
+ if (evPath && path11 !== evPath) {
206968
+ fsWatchBroadcast(sp.resolve(path11, evPath), KEY_LISTENERS, sp.join(path11, evPath));
206837
206969
  }
206838
206970
  };
206839
206971
  try {
206840
- return fs_watch(path12, {
206972
+ return fs_watch(path11, {
206841
206973
  persistent: options.persistent
206842
206974
  }, handleEvent);
206843
206975
  } catch (error2) {
@@ -206853,12 +206985,12 @@ var fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => {
206853
206985
  listener(val1, val2, val3);
206854
206986
  });
206855
206987
  };
206856
- var setFsWatchListener = (path12, fullPath, options, handlers2) => {
206988
+ var setFsWatchListener = (path11, fullPath, options, handlers2) => {
206857
206989
  const { listener, errHandler, rawEmitter } = handlers2;
206858
206990
  let cont = FsWatchInstances.get(fullPath);
206859
206991
  let watcher;
206860
206992
  if (!options.persistent) {
206861
- watcher = createFsWatchInstance(path12, options, listener, errHandler, rawEmitter);
206993
+ watcher = createFsWatchInstance(path11, options, listener, errHandler, rawEmitter);
206862
206994
  if (!watcher)
206863
206995
  return;
206864
206996
  return watcher.close.bind(watcher);
@@ -206869,7 +207001,7 @@ var setFsWatchListener = (path12, fullPath, options, handlers2) => {
206869
207001
  addAndConvert(cont, KEY_RAW, rawEmitter);
206870
207002
  } else {
206871
207003
  watcher = createFsWatchInstance(
206872
- path12,
207004
+ path11,
206873
207005
  options,
206874
207006
  fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
206875
207007
  errHandler,
@@ -206884,7 +207016,7 @@ var setFsWatchListener = (path12, fullPath, options, handlers2) => {
206884
207016
  cont.watcherUnusable = true;
206885
207017
  if (isWindows && error2.code === "EPERM") {
206886
207018
  try {
206887
- const fd = await open(path12, "r");
207019
+ const fd = await open(path11, "r");
206888
207020
  await fd.close();
206889
207021
  broadcastErr(error2);
206890
207022
  } catch (err) {
@@ -206915,7 +207047,7 @@ var setFsWatchListener = (path12, fullPath, options, handlers2) => {
206915
207047
  };
206916
207048
  };
206917
207049
  var FsWatchFileInstances = /* @__PURE__ */ new Map();
206918
- var setFsWatchFileListener = (path12, fullPath, options, handlers2) => {
207050
+ var setFsWatchFileListener = (path11, fullPath, options, handlers2) => {
206919
207051
  const { listener, rawEmitter } = handlers2;
206920
207052
  let cont = FsWatchFileInstances.get(fullPath);
206921
207053
  const copts = cont && cont.options;
@@ -206937,7 +207069,7 @@ var setFsWatchFileListener = (path12, fullPath, options, handlers2) => {
206937
207069
  });
206938
207070
  const currmtime = curr.mtimeMs;
206939
207071
  if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
206940
- foreach(cont.listeners, (listener2) => listener2(path12, curr));
207072
+ foreach(cont.listeners, (listener2) => listener2(path11, curr));
206941
207073
  }
206942
207074
  })
206943
207075
  };
@@ -206967,13 +207099,13 @@ var NodeFsHandler = class {
206967
207099
  * @param listener on fs change
206968
207100
  * @returns closer for the watcher instance
206969
207101
  */
206970
- _watchWithNodeFs(path12, listener) {
207102
+ _watchWithNodeFs(path11, listener) {
206971
207103
  const opts = this.fsw.options;
206972
- const directory = sp.dirname(path12);
206973
- const basename5 = sp.basename(path12);
207104
+ const directory = sp.dirname(path11);
207105
+ const basename5 = sp.basename(path11);
206974
207106
  const parent = this.fsw._getWatchedDir(directory);
206975
207107
  parent.add(basename5);
206976
- const absolutePath = sp.resolve(path12);
207108
+ const absolutePath = sp.resolve(path11);
206977
207109
  const options = {
206978
207110
  persistent: opts.persistent
206979
207111
  };
@@ -206983,12 +207115,12 @@ var NodeFsHandler = class {
206983
207115
  if (opts.usePolling) {
206984
207116
  const enableBin = opts.interval !== opts.binaryInterval;
206985
207117
  options.interval = enableBin && isBinaryPath(basename5) ? opts.binaryInterval : opts.interval;
206986
- closer = setFsWatchFileListener(path12, absolutePath, options, {
207118
+ closer = setFsWatchFileListener(path11, absolutePath, options, {
206987
207119
  listener,
206988
207120
  rawEmitter: this.fsw._emitRaw
206989
207121
  });
206990
207122
  } else {
206991
- closer = setFsWatchListener(path12, absolutePath, options, {
207123
+ closer = setFsWatchListener(path11, absolutePath, options, {
206992
207124
  listener,
206993
207125
  errHandler: this._boundHandleError,
206994
207126
  rawEmitter: this.fsw._emitRaw
@@ -207010,7 +207142,7 @@ var NodeFsHandler = class {
207010
207142
  let prevStats = stats;
207011
207143
  if (parent.has(basename5))
207012
207144
  return;
207013
- const listener = async (path12, newStats) => {
207145
+ const listener = async (path11, newStats) => {
207014
207146
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
207015
207147
  return;
207016
207148
  if (!newStats || newStats.mtimeMs === 0) {
@@ -207024,11 +207156,11 @@ var NodeFsHandler = class {
207024
207156
  this.fsw._emit(EV.CHANGE, file, newStats2);
207025
207157
  }
207026
207158
  if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
207027
- this.fsw._closeFile(path12);
207159
+ this.fsw._closeFile(path11);
207028
207160
  prevStats = newStats2;
207029
207161
  const closer2 = this._watchWithNodeFs(file, listener);
207030
207162
  if (closer2)
207031
- this.fsw._addPathCloser(path12, closer2);
207163
+ this.fsw._addPathCloser(path11, closer2);
207032
207164
  } else {
207033
207165
  prevStats = newStats2;
207034
207166
  }
@@ -207060,7 +207192,7 @@ var NodeFsHandler = class {
207060
207192
  * @param item basename of this item
207061
207193
  * @returns true if no more processing is needed for this entry.
207062
207194
  */
207063
- async _handleSymlink(entry, directory, path12, item) {
207195
+ async _handleSymlink(entry, directory, path11, item) {
207064
207196
  if (this.fsw.closed) {
207065
207197
  return;
207066
207198
  }
@@ -207070,7 +207202,7 @@ var NodeFsHandler = class {
207070
207202
  this.fsw._incrReadyCount();
207071
207203
  let linkPath;
207072
207204
  try {
207073
- linkPath = await fsrealpath(path12);
207205
+ linkPath = await fsrealpath(path11);
207074
207206
  } catch (e) {
207075
207207
  this.fsw._emitReady();
207076
207208
  return true;
@@ -207080,12 +207212,12 @@ var NodeFsHandler = class {
207080
207212
  if (dir.has(item)) {
207081
207213
  if (this.fsw._symlinkPaths.get(full) !== linkPath) {
207082
207214
  this.fsw._symlinkPaths.set(full, linkPath);
207083
- this.fsw._emit(EV.CHANGE, path12, entry.stats);
207215
+ this.fsw._emit(EV.CHANGE, path11, entry.stats);
207084
207216
  }
207085
207217
  } else {
207086
207218
  dir.add(item);
207087
207219
  this.fsw._symlinkPaths.set(full, linkPath);
207088
- this.fsw._emit(EV.ADD, path12, entry.stats);
207220
+ this.fsw._emit(EV.ADD, path11, entry.stats);
207089
207221
  }
207090
207222
  this.fsw._emitReady();
207091
207223
  return true;
@@ -207115,9 +207247,9 @@ var NodeFsHandler = class {
207115
207247
  return;
207116
207248
  }
207117
207249
  const item = entry.path;
207118
- let path12 = sp.join(directory, item);
207250
+ let path11 = sp.join(directory, item);
207119
207251
  current.add(item);
207120
- if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path12, item)) {
207252
+ if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path11, item)) {
207121
207253
  return;
207122
207254
  }
207123
207255
  if (this.fsw.closed) {
@@ -207126,8 +207258,8 @@ var NodeFsHandler = class {
207126
207258
  }
207127
207259
  if (item === target || !target && !previous.has(item)) {
207128
207260
  this.fsw._incrReadyCount();
207129
- path12 = sp.join(dir, sp.relative(dir, path12));
207130
- this._addToNodeFs(path12, initialAdd, wh, depth + 1);
207261
+ path11 = sp.join(dir, sp.relative(dir, path11));
207262
+ this._addToNodeFs(path11, initialAdd, wh, depth + 1);
207131
207263
  }
207132
207264
  }).on(EV.ERROR, this._boundHandleError);
207133
207265
  return new Promise((resolve8, reject2) => {
@@ -207196,13 +207328,13 @@ var NodeFsHandler = class {
207196
207328
  * @param depth Child path actually targeted for watch
207197
207329
  * @param target Child path actually targeted for watch
207198
207330
  */
207199
- async _addToNodeFs(path12, initialAdd, priorWh, depth, target) {
207331
+ async _addToNodeFs(path11, initialAdd, priorWh, depth, target) {
207200
207332
  const ready = this.fsw._emitReady;
207201
- if (this.fsw._isIgnored(path12) || this.fsw.closed) {
207333
+ if (this.fsw._isIgnored(path11) || this.fsw.closed) {
207202
207334
  ready();
207203
207335
  return false;
207204
207336
  }
207205
- const wh = this.fsw._getWatchHelpers(path12);
207337
+ const wh = this.fsw._getWatchHelpers(path11);
207206
207338
  if (priorWh) {
207207
207339
  wh.filterPath = (entry) => priorWh.filterPath(entry);
207208
207340
  wh.filterDir = (entry) => priorWh.filterDir(entry);
@@ -207218,8 +207350,8 @@ var NodeFsHandler = class {
207218
207350
  const follow = this.fsw.options.followSymlinks;
207219
207351
  let closer;
207220
207352
  if (stats.isDirectory()) {
207221
- const absPath = sp.resolve(path12);
207222
- const targetPath = follow ? await fsrealpath(path12) : path12;
207353
+ const absPath = sp.resolve(path11);
207354
+ const targetPath = follow ? await fsrealpath(path11) : path11;
207223
207355
  if (this.fsw.closed)
207224
207356
  return;
207225
207357
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
@@ -207229,29 +207361,29 @@ var NodeFsHandler = class {
207229
207361
  this.fsw._symlinkPaths.set(absPath, targetPath);
207230
207362
  }
207231
207363
  } else if (stats.isSymbolicLink()) {
207232
- const targetPath = follow ? await fsrealpath(path12) : path12;
207364
+ const targetPath = follow ? await fsrealpath(path11) : path11;
207233
207365
  if (this.fsw.closed)
207234
207366
  return;
207235
207367
  const parent = sp.dirname(wh.watchPath);
207236
207368
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
207237
207369
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
207238
- closer = await this._handleDir(parent, stats, initialAdd, depth, path12, wh, targetPath);
207370
+ closer = await this._handleDir(parent, stats, initialAdd, depth, path11, wh, targetPath);
207239
207371
  if (this.fsw.closed)
207240
207372
  return;
207241
207373
  if (targetPath !== void 0) {
207242
- this.fsw._symlinkPaths.set(sp.resolve(path12), targetPath);
207374
+ this.fsw._symlinkPaths.set(sp.resolve(path11), targetPath);
207243
207375
  }
207244
207376
  } else {
207245
207377
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
207246
207378
  }
207247
207379
  ready();
207248
207380
  if (closer)
207249
- this.fsw._addPathCloser(path12, closer);
207381
+ this.fsw._addPathCloser(path11, closer);
207250
207382
  return false;
207251
207383
  } catch (error2) {
207252
207384
  if (this.fsw._handleError(error2)) {
207253
207385
  ready();
207254
- return path12;
207386
+ return path11;
207255
207387
  }
207256
207388
  }
207257
207389
  }
@@ -207294,24 +207426,24 @@ function createPattern(matcher) {
207294
207426
  }
207295
207427
  return () => false;
207296
207428
  }
207297
- function normalizePath(path12) {
207298
- if (typeof path12 !== "string")
207429
+ function normalizePath(path11) {
207430
+ if (typeof path11 !== "string")
207299
207431
  throw new Error("string expected");
207300
- path12 = sp2.normalize(path12);
207301
- path12 = path12.replace(/\\/g, "/");
207432
+ path11 = sp2.normalize(path11);
207433
+ path11 = path11.replace(/\\/g, "/");
207302
207434
  let prepend = false;
207303
- if (path12.startsWith("//"))
207435
+ if (path11.startsWith("//"))
207304
207436
  prepend = true;
207305
- path12 = path12.replace(DOUBLE_SLASH_RE, "/");
207437
+ path11 = path11.replace(DOUBLE_SLASH_RE, "/");
207306
207438
  if (prepend)
207307
- path12 = "/" + path12;
207308
- return path12;
207439
+ path11 = "/" + path11;
207440
+ return path11;
207309
207441
  }
207310
207442
  function matchPatterns(patterns, testString, stats) {
207311
- const path12 = normalizePath(testString);
207443
+ const path11 = normalizePath(testString);
207312
207444
  for (let index = 0; index < patterns.length; index++) {
207313
207445
  const pattern2 = patterns[index];
207314
- if (pattern2(path12, stats)) {
207446
+ if (pattern2(path11, stats)) {
207315
207447
  return true;
207316
207448
  }
207317
207449
  }
@@ -207349,19 +207481,19 @@ var toUnix = (string3) => {
207349
207481
  }
207350
207482
  return str2;
207351
207483
  };
207352
- var normalizePathToUnix = (path12) => toUnix(sp2.normalize(toUnix(path12)));
207353
- var normalizeIgnored = (cwd = "") => (path12) => {
207354
- if (typeof path12 === "string") {
207355
- return normalizePathToUnix(sp2.isAbsolute(path12) ? path12 : sp2.join(cwd, path12));
207484
+ var normalizePathToUnix = (path11) => toUnix(sp2.normalize(toUnix(path11)));
207485
+ var normalizeIgnored = (cwd = "") => (path11) => {
207486
+ if (typeof path11 === "string") {
207487
+ return normalizePathToUnix(sp2.isAbsolute(path11) ? path11 : sp2.join(cwd, path11));
207356
207488
  } else {
207357
- return path12;
207489
+ return path11;
207358
207490
  }
207359
207491
  };
207360
- var getAbsolutePath = (path12, cwd) => {
207361
- if (sp2.isAbsolute(path12)) {
207362
- return path12;
207492
+ var getAbsolutePath = (path11, cwd) => {
207493
+ if (sp2.isAbsolute(path11)) {
207494
+ return path11;
207363
207495
  }
207364
- return sp2.join(cwd, path12);
207496
+ return sp2.join(cwd, path11);
207365
207497
  };
207366
207498
  var EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
207367
207499
  var DirEntry = class {
@@ -207426,10 +207558,10 @@ var WatchHelper = class {
207426
207558
  dirParts;
207427
207559
  followSymlinks;
207428
207560
  statMethod;
207429
- constructor(path12, follow, fsw) {
207561
+ constructor(path11, follow, fsw) {
207430
207562
  this.fsw = fsw;
207431
- const watchPath = path12;
207432
- this.path = path12 = path12.replace(REPLACER_RE, "");
207563
+ const watchPath = path11;
207564
+ this.path = path11 = path11.replace(REPLACER_RE, "");
207433
207565
  this.watchPath = watchPath;
207434
207566
  this.fullWatchPath = sp2.resolve(watchPath);
207435
207567
  this.dirParts = [];
@@ -207569,20 +207701,20 @@ var FSWatcher = class extends EventEmitter2 {
207569
207701
  this._closePromise = void 0;
207570
207702
  let paths = unifyPaths(paths_);
207571
207703
  if (cwd) {
207572
- paths = paths.map((path12) => {
207573
- const absPath = getAbsolutePath(path12, cwd);
207704
+ paths = paths.map((path11) => {
207705
+ const absPath = getAbsolutePath(path11, cwd);
207574
207706
  return absPath;
207575
207707
  });
207576
207708
  }
207577
- paths.forEach((path12) => {
207578
- this._removeIgnoredPath(path12);
207709
+ paths.forEach((path11) => {
207710
+ this._removeIgnoredPath(path11);
207579
207711
  });
207580
207712
  this._userIgnored = void 0;
207581
207713
  if (!this._readyCount)
207582
207714
  this._readyCount = 0;
207583
207715
  this._readyCount += paths.length;
207584
- Promise.all(paths.map(async (path12) => {
207585
- const res = await this._nodeFsHandler._addToNodeFs(path12, !_internal, void 0, 0, _origAdd);
207716
+ Promise.all(paths.map(async (path11) => {
207717
+ const res = await this._nodeFsHandler._addToNodeFs(path11, !_internal, void 0, 0, _origAdd);
207586
207718
  if (res)
207587
207719
  this._emitReady();
207588
207720
  return res;
@@ -207604,17 +207736,17 @@ var FSWatcher = class extends EventEmitter2 {
207604
207736
  return this;
207605
207737
  const paths = unifyPaths(paths_);
207606
207738
  const { cwd } = this.options;
207607
- paths.forEach((path12) => {
207608
- if (!sp2.isAbsolute(path12) && !this._closers.has(path12)) {
207739
+ paths.forEach((path11) => {
207740
+ if (!sp2.isAbsolute(path11) && !this._closers.has(path11)) {
207609
207741
  if (cwd)
207610
- path12 = sp2.join(cwd, path12);
207611
- path12 = sp2.resolve(path12);
207742
+ path11 = sp2.join(cwd, path11);
207743
+ path11 = sp2.resolve(path11);
207612
207744
  }
207613
- this._closePath(path12);
207614
- this._addIgnoredPath(path12);
207615
- if (this._watched.has(path12)) {
207745
+ this._closePath(path11);
207746
+ this._addIgnoredPath(path11);
207747
+ if (this._watched.has(path11)) {
207616
207748
  this._addIgnoredPath({
207617
- path: path12,
207749
+ path: path11,
207618
207750
  recursive: true
207619
207751
  });
207620
207752
  }
@@ -207678,38 +207810,38 @@ var FSWatcher = class extends EventEmitter2 {
207678
207810
  * @param stats arguments to be passed with event
207679
207811
  * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
207680
207812
  */
207681
- async _emit(event, path12, stats) {
207813
+ async _emit(event, path11, stats) {
207682
207814
  if (this.closed)
207683
207815
  return;
207684
207816
  const opts = this.options;
207685
207817
  if (isWindows)
207686
- path12 = sp2.normalize(path12);
207818
+ path11 = sp2.normalize(path11);
207687
207819
  if (opts.cwd)
207688
- path12 = sp2.relative(opts.cwd, path12);
207689
- const args = [path12];
207820
+ path11 = sp2.relative(opts.cwd, path11);
207821
+ const args = [path11];
207690
207822
  if (stats != null)
207691
207823
  args.push(stats);
207692
207824
  const awf = opts.awaitWriteFinish;
207693
207825
  let pw;
207694
- if (awf && (pw = this._pendingWrites.get(path12))) {
207826
+ if (awf && (pw = this._pendingWrites.get(path11))) {
207695
207827
  pw.lastChange = /* @__PURE__ */ new Date();
207696
207828
  return this;
207697
207829
  }
207698
207830
  if (opts.atomic) {
207699
207831
  if (event === EVENTS.UNLINK) {
207700
- this._pendingUnlinks.set(path12, [event, ...args]);
207832
+ this._pendingUnlinks.set(path11, [event, ...args]);
207701
207833
  setTimeout(() => {
207702
- this._pendingUnlinks.forEach((entry, path13) => {
207834
+ this._pendingUnlinks.forEach((entry, path12) => {
207703
207835
  this.emit(...entry);
207704
207836
  this.emit(EVENTS.ALL, ...entry);
207705
- this._pendingUnlinks.delete(path13);
207837
+ this._pendingUnlinks.delete(path12);
207706
207838
  });
207707
207839
  }, typeof opts.atomic === "number" ? opts.atomic : 100);
207708
207840
  return this;
207709
207841
  }
207710
- if (event === EVENTS.ADD && this._pendingUnlinks.has(path12)) {
207842
+ if (event === EVENTS.ADD && this._pendingUnlinks.has(path11)) {
207711
207843
  event = EVENTS.CHANGE;
207712
- this._pendingUnlinks.delete(path12);
207844
+ this._pendingUnlinks.delete(path11);
207713
207845
  }
207714
207846
  }
207715
207847
  if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
@@ -207727,16 +207859,16 @@ var FSWatcher = class extends EventEmitter2 {
207727
207859
  this.emitWithAll(event, args);
207728
207860
  }
207729
207861
  };
207730
- this._awaitWriteFinish(path12, awf.stabilityThreshold, event, awfEmit);
207862
+ this._awaitWriteFinish(path11, awf.stabilityThreshold, event, awfEmit);
207731
207863
  return this;
207732
207864
  }
207733
207865
  if (event === EVENTS.CHANGE) {
207734
- const isThrottled = !this._throttle(EVENTS.CHANGE, path12, 50);
207866
+ const isThrottled = !this._throttle(EVENTS.CHANGE, path11, 50);
207735
207867
  if (isThrottled)
207736
207868
  return this;
207737
207869
  }
207738
207870
  if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
207739
- const fullPath = opts.cwd ? sp2.join(opts.cwd, path12) : path12;
207871
+ const fullPath = opts.cwd ? sp2.join(opts.cwd, path11) : path11;
207740
207872
  let stats2;
207741
207873
  try {
207742
207874
  stats2 = await stat3(fullPath);
@@ -207767,23 +207899,23 @@ var FSWatcher = class extends EventEmitter2 {
207767
207899
  * @param timeout duration of time to suppress duplicate actions
207768
207900
  * @returns tracking object or false if action should be suppressed
207769
207901
  */
207770
- _throttle(actionType, path12, timeout) {
207902
+ _throttle(actionType, path11, timeout) {
207771
207903
  if (!this._throttled.has(actionType)) {
207772
207904
  this._throttled.set(actionType, /* @__PURE__ */ new Map());
207773
207905
  }
207774
207906
  const action = this._throttled.get(actionType);
207775
207907
  if (!action)
207776
207908
  throw new Error("invalid throttle");
207777
- const actionPath = action.get(path12);
207909
+ const actionPath = action.get(path11);
207778
207910
  if (actionPath) {
207779
207911
  actionPath.count++;
207780
207912
  return false;
207781
207913
  }
207782
207914
  let timeoutObject;
207783
207915
  const clear = () => {
207784
- const item = action.get(path12);
207916
+ const item = action.get(path11);
207785
207917
  const count = item ? item.count : 0;
207786
- action.delete(path12);
207918
+ action.delete(path11);
207787
207919
  clearTimeout(timeoutObject);
207788
207920
  if (item)
207789
207921
  clearTimeout(item.timeoutObject);
@@ -207791,7 +207923,7 @@ var FSWatcher = class extends EventEmitter2 {
207791
207923
  };
207792
207924
  timeoutObject = setTimeout(clear, timeout);
207793
207925
  const thr = { timeoutObject, clear, count: 0 };
207794
- action.set(path12, thr);
207926
+ action.set(path11, thr);
207795
207927
  return thr;
207796
207928
  }
207797
207929
  _incrReadyCount() {
@@ -207805,44 +207937,44 @@ var FSWatcher = class extends EventEmitter2 {
207805
207937
  * @param event
207806
207938
  * @param awfEmit Callback to be called when ready for event to be emitted.
207807
207939
  */
207808
- _awaitWriteFinish(path12, threshold, event, awfEmit) {
207940
+ _awaitWriteFinish(path11, threshold, event, awfEmit) {
207809
207941
  const awf = this.options.awaitWriteFinish;
207810
207942
  if (typeof awf !== "object")
207811
207943
  return;
207812
207944
  const pollInterval = awf.pollInterval;
207813
207945
  let timeoutHandler;
207814
- let fullPath = path12;
207815
- if (this.options.cwd && !sp2.isAbsolute(path12)) {
207816
- fullPath = sp2.join(this.options.cwd, path12);
207946
+ let fullPath = path11;
207947
+ if (this.options.cwd && !sp2.isAbsolute(path11)) {
207948
+ fullPath = sp2.join(this.options.cwd, path11);
207817
207949
  }
207818
207950
  const now = /* @__PURE__ */ new Date();
207819
207951
  const writes = this._pendingWrites;
207820
207952
  function awaitWriteFinishFn(prevStat) {
207821
207953
  statcb(fullPath, (err, curStat) => {
207822
- if (err || !writes.has(path12)) {
207954
+ if (err || !writes.has(path11)) {
207823
207955
  if (err && err.code !== "ENOENT")
207824
207956
  awfEmit(err);
207825
207957
  return;
207826
207958
  }
207827
207959
  const now2 = Number(/* @__PURE__ */ new Date());
207828
207960
  if (prevStat && curStat.size !== prevStat.size) {
207829
- writes.get(path12).lastChange = now2;
207961
+ writes.get(path11).lastChange = now2;
207830
207962
  }
207831
- const pw = writes.get(path12);
207963
+ const pw = writes.get(path11);
207832
207964
  const df = now2 - pw.lastChange;
207833
207965
  if (df >= threshold) {
207834
- writes.delete(path12);
207966
+ writes.delete(path11);
207835
207967
  awfEmit(void 0, curStat);
207836
207968
  } else {
207837
207969
  timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
207838
207970
  }
207839
207971
  });
207840
207972
  }
207841
- if (!writes.has(path12)) {
207842
- writes.set(path12, {
207973
+ if (!writes.has(path11)) {
207974
+ writes.set(path11, {
207843
207975
  lastChange: now,
207844
207976
  cancelWait: () => {
207845
- writes.delete(path12);
207977
+ writes.delete(path11);
207846
207978
  clearTimeout(timeoutHandler);
207847
207979
  return event;
207848
207980
  }
@@ -207853,8 +207985,8 @@ var FSWatcher = class extends EventEmitter2 {
207853
207985
  /**
207854
207986
  * Determines whether user has asked to ignore this path.
207855
207987
  */
207856
- _isIgnored(path12, stats) {
207857
- if (this.options.atomic && DOT_RE.test(path12))
207988
+ _isIgnored(path11, stats) {
207989
+ if (this.options.atomic && DOT_RE.test(path11))
207858
207990
  return true;
207859
207991
  if (!this._userIgnored) {
207860
207992
  const { cwd } = this.options;
@@ -207864,17 +207996,17 @@ var FSWatcher = class extends EventEmitter2 {
207864
207996
  const list = [...ignoredPaths.map(normalizeIgnored(cwd)), ...ignored];
207865
207997
  this._userIgnored = anymatch(list, void 0);
207866
207998
  }
207867
- return this._userIgnored(path12, stats);
207999
+ return this._userIgnored(path11, stats);
207868
208000
  }
207869
- _isntIgnored(path12, stat5) {
207870
- return !this._isIgnored(path12, stat5);
208001
+ _isntIgnored(path11, stat5) {
208002
+ return !this._isIgnored(path11, stat5);
207871
208003
  }
207872
208004
  /**
207873
208005
  * Provides a set of common helpers and properties relating to symlink handling.
207874
208006
  * @param path file or directory pattern being watched
207875
208007
  */
207876
- _getWatchHelpers(path12) {
207877
- return new WatchHelper(path12, this.options.followSymlinks, this);
208008
+ _getWatchHelpers(path11) {
208009
+ return new WatchHelper(path11, this.options.followSymlinks, this);
207878
208010
  }
207879
208011
  // Directory helpers
207880
208012
  // -----------------
@@ -207906,63 +208038,63 @@ var FSWatcher = class extends EventEmitter2 {
207906
208038
  * @param item base path of item/directory
207907
208039
  */
207908
208040
  _remove(directory, item, isDirectory) {
207909
- const path12 = sp2.join(directory, item);
207910
- const fullPath = sp2.resolve(path12);
207911
- isDirectory = isDirectory != null ? isDirectory : this._watched.has(path12) || this._watched.has(fullPath);
207912
- if (!this._throttle("remove", path12, 100))
208041
+ const path11 = sp2.join(directory, item);
208042
+ const fullPath = sp2.resolve(path11);
208043
+ isDirectory = isDirectory != null ? isDirectory : this._watched.has(path11) || this._watched.has(fullPath);
208044
+ if (!this._throttle("remove", path11, 100))
207913
208045
  return;
207914
208046
  if (!isDirectory && this._watched.size === 1) {
207915
208047
  this.add(directory, item, true);
207916
208048
  }
207917
- const wp = this._getWatchedDir(path12);
208049
+ const wp = this._getWatchedDir(path11);
207918
208050
  const nestedDirectoryChildren = wp.getChildren();
207919
- nestedDirectoryChildren.forEach((nested) => this._remove(path12, nested));
208051
+ nestedDirectoryChildren.forEach((nested) => this._remove(path11, nested));
207920
208052
  const parent = this._getWatchedDir(directory);
207921
208053
  const wasTracked = parent.has(item);
207922
208054
  parent.remove(item);
207923
208055
  if (this._symlinkPaths.has(fullPath)) {
207924
208056
  this._symlinkPaths.delete(fullPath);
207925
208057
  }
207926
- let relPath = path12;
208058
+ let relPath = path11;
207927
208059
  if (this.options.cwd)
207928
- relPath = sp2.relative(this.options.cwd, path12);
208060
+ relPath = sp2.relative(this.options.cwd, path11);
207929
208061
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
207930
208062
  const event = this._pendingWrites.get(relPath).cancelWait();
207931
208063
  if (event === EVENTS.ADD)
207932
208064
  return;
207933
208065
  }
207934
- this._watched.delete(path12);
208066
+ this._watched.delete(path11);
207935
208067
  this._watched.delete(fullPath);
207936
208068
  const eventName = isDirectory ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
207937
- if (wasTracked && !this._isIgnored(path12))
207938
- this._emit(eventName, path12);
207939
- this._closePath(path12);
208069
+ if (wasTracked && !this._isIgnored(path11))
208070
+ this._emit(eventName, path11);
208071
+ this._closePath(path11);
207940
208072
  }
207941
208073
  /**
207942
208074
  * Closes all watchers for a path
207943
208075
  */
207944
- _closePath(path12) {
207945
- this._closeFile(path12);
207946
- const dir = sp2.dirname(path12);
207947
- this._getWatchedDir(dir).remove(sp2.basename(path12));
208076
+ _closePath(path11) {
208077
+ this._closeFile(path11);
208078
+ const dir = sp2.dirname(path11);
208079
+ this._getWatchedDir(dir).remove(sp2.basename(path11));
207948
208080
  }
207949
208081
  /**
207950
208082
  * Closes only file-specific watchers
207951
208083
  */
207952
- _closeFile(path12) {
207953
- const closers = this._closers.get(path12);
208084
+ _closeFile(path11) {
208085
+ const closers = this._closers.get(path11);
207954
208086
  if (!closers)
207955
208087
  return;
207956
208088
  closers.forEach((closer) => closer());
207957
- this._closers.delete(path12);
208089
+ this._closers.delete(path11);
207958
208090
  }
207959
- _addPathCloser(path12, closer) {
208091
+ _addPathCloser(path11, closer) {
207960
208092
  if (!closer)
207961
208093
  return;
207962
- let list = this._closers.get(path12);
208094
+ let list = this._closers.get(path11);
207963
208095
  if (!list) {
207964
208096
  list = [];
207965
- this._closers.set(path12, list);
208097
+ this._closers.set(path11, list);
207966
208098
  }
207967
208099
  list.push(closer);
207968
208100
  }
@@ -207992,15 +208124,15 @@ function watch(paths, options = {}) {
207992
208124
 
207993
208125
  // .yarn/cache/glob-npm-13.0.6-864eb0cece-269c236f11.zip/node_modules/glob/dist/esm/index.min.js
207994
208126
  init_esm_shims();
207995
- import { fileURLToPath as Wi } from "url";
207996
- import { posix as mi, win32 as re } from "path";
207997
- import { fileURLToPath as gi } from "url";
207998
- import { lstatSync as wi, readdir as yi, readdirSync as bi, readlinkSync as Si, realpathSync as Ei } from "fs";
207999
- import * as xi from "fs";
208000
- import { lstat as Ci, readdir as Ti, readlink as Ai, realpath as ki } from "fs/promises";
208001
- import { EventEmitter as ee } from "events";
208002
- import Pe from "stream";
208003
- import { StringDecoder as ni2 } from "string_decoder";
208127
+ import { fileURLToPath as Wi } from "node:url";
208128
+ import { posix as mi, win32 as re } from "node:path";
208129
+ import { fileURLToPath as gi } from "node:url";
208130
+ import { lstatSync as wi, readdir as yi, readdirSync as bi, readlinkSync as Si, realpathSync as Ei } from "node:fs";
208131
+ import * as xi from "node:fs";
208132
+ import { lstat as Ci, readdir as Ti, readlink as Ai, realpath as ki } from "node:fs/promises";
208133
+ import { EventEmitter as ee } from "node:events";
208134
+ import Pe from "node:stream";
208135
+ import { StringDecoder as ni2 } from "node:string_decoder";
208004
208136
  var Gt = (n7, t, e) => {
208005
208137
  let s = n7 instanceof RegExp ? ce(n7, e) : n7, i = t instanceof RegExp ? ce(t, e) : t, r = s !== null && i != null && ss(s, i, e);
208006
208138
  return r && { start: r[0], end: r[1], pre: e.slice(0, r[0]), body: e.slice(r[0] + s.length, r[1]), post: e.slice(r[1] + i.length) };
@@ -210977,8 +211109,8 @@ Ze.glob = Ze;
210977
211109
 
210978
211110
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/AsyncArgdownApplication.js
210979
211111
  var import_import_fresh = __toESM(require_import_fresh(), 1);
210980
- import { promisify } from "util";
210981
- import { readFile } from "fs";
211112
+ import { promisify } from "node:util";
211113
+ import { readFile } from "node:fs";
210982
211114
  var readFileAsync = promisify(readFile);
210983
211115
  var globAsync = Ze;
210984
211116
  var AsyncArgdownApplication = class extends ArgdownApplication {
@@ -211140,16 +211272,16 @@ var AsyncArgdownApplication = class extends ArgdownApplication {
211140
211272
  const watcher = watch(absoluteInputGlob, loadOptions);
211141
211273
  const watcherRequest = (0, import_lodash33.default)(req);
211142
211274
  watcherRequest.watch = false;
211143
- watcher.on("add", (path12) => {
211144
- this.logger.log("verbose", `File ${path12} has been added.`);
211145
- watcherRequest.inputPath = path12;
211275
+ watcher.on("add", (path11) => {
211276
+ this.logger.log("verbose", `File ${path11} has been added.`);
211277
+ watcherRequest.inputPath = path11;
211146
211278
  void this.load(watcherRequest);
211147
- }).on("change", (path12) => {
211148
- this.logger.log("verbose", `File ${path12} has been changed.`);
211149
- watcherRequest.inputPath = path12;
211279
+ }).on("change", (path11) => {
211280
+ this.logger.log("verbose", `File ${path11} has been changed.`);
211281
+ watcherRequest.inputPath = path11;
211150
211282
  void this.load(watcherRequest);
211151
- }).on("unlink", (path12) => {
211152
- this.logger.log("verbose", `File ${path12} has been removed.`);
211283
+ }).on("unlink", (path11) => {
211284
+ this.logger.log("verbose", `File ${path11} has been removed.`);
211153
211285
  });
211154
211286
  } else {
211155
211287
  const files = await globAsync(absoluteInputGlob, loadOptions);
@@ -211213,19 +211345,19 @@ Error: ${e.message}`;
211213
211345
 
211214
211346
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/plugins/SaveAsFilePlugin.js
211215
211347
  init_esm_shims();
211216
- import * as fs2 from "fs";
211217
- import * as path3 from "path";
211348
+ import * as fs2 from "node:fs";
211349
+ import * as path3 from "node:path";
211218
211350
 
211219
211351
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/index.js
211220
211352
  init_esm_shims();
211221
211353
 
211222
211354
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/mkdirp-manual.js
211223
211355
  init_esm_shims();
211224
- import { dirname as dirname3 } from "path";
211356
+ import { dirname as dirname3 } from "node:path";
211225
211357
 
211226
211358
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/opts-arg.js
211227
211359
  init_esm_shims();
211228
- import { mkdir, mkdirSync, stat as stat4, statSync } from "fs";
211360
+ import { mkdir, mkdirSync, stat as stat4, statSync } from "node:fs";
211229
211361
  var optsArg = (opts) => {
211230
211362
  if (!opts) {
211231
211363
  opts = { mode: 511 };
@@ -211241,23 +211373,23 @@ var optsArg = (opts) => {
211241
211373
  const resolved = opts;
211242
211374
  const optsFs = opts.fs || {};
211243
211375
  opts.mkdir = opts.mkdir || optsFs.mkdir || mkdir;
211244
- opts.mkdirAsync = opts.mkdirAsync ? opts.mkdirAsync : async (path12, options) => {
211245
- return new Promise((res, rej) => resolved.mkdir(path12, options, (er, made) => er ? rej(er) : res(made)));
211376
+ opts.mkdirAsync = opts.mkdirAsync ? opts.mkdirAsync : async (path11, options) => {
211377
+ return new Promise((res, rej) => resolved.mkdir(path11, options, (er, made) => er ? rej(er) : res(made)));
211246
211378
  };
211247
211379
  opts.stat = opts.stat || optsFs.stat || stat4;
211248
- opts.statAsync = opts.statAsync ? opts.statAsync : async (path12) => new Promise((res, rej) => resolved.stat(path12, (err, stats) => err ? rej(err) : res(stats)));
211380
+ opts.statAsync = opts.statAsync ? opts.statAsync : async (path11) => new Promise((res, rej) => resolved.stat(path11, (err, stats) => err ? rej(err) : res(stats)));
211249
211381
  opts.statSync = opts.statSync || optsFs.statSync || statSync;
211250
211382
  opts.mkdirSync = opts.mkdirSync || optsFs.mkdirSync || mkdirSync;
211251
211383
  return resolved;
211252
211384
  };
211253
211385
 
211254
211386
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/mkdirp-manual.js
211255
- var mkdirpManualSync = (path12, options, made) => {
211256
- const parent = dirname3(path12);
211387
+ var mkdirpManualSync = (path11, options, made) => {
211388
+ const parent = dirname3(path11);
211257
211389
  const opts = { ...optsArg(options), recursive: false };
211258
- if (parent === path12) {
211390
+ if (parent === path11) {
211259
211391
  try {
211260
- return opts.mkdirSync(path12, opts);
211392
+ return opts.mkdirSync(path11, opts);
211261
211393
  } catch (er) {
211262
211394
  const fer = er;
211263
211395
  if (fer && fer.code !== "EISDIR") {
@@ -211267,45 +211399,45 @@ var mkdirpManualSync = (path12, options, made) => {
211267
211399
  }
211268
211400
  }
211269
211401
  try {
211270
- opts.mkdirSync(path12, opts);
211271
- return made || path12;
211402
+ opts.mkdirSync(path11, opts);
211403
+ return made || path11;
211272
211404
  } catch (er) {
211273
211405
  const fer = er;
211274
211406
  if (fer && fer.code === "ENOENT") {
211275
- return mkdirpManualSync(path12, opts, mkdirpManualSync(parent, opts, made));
211407
+ return mkdirpManualSync(path11, opts, mkdirpManualSync(parent, opts, made));
211276
211408
  }
211277
211409
  if (fer && fer.code !== "EEXIST" && fer && fer.code !== "EROFS") {
211278
211410
  throw er;
211279
211411
  }
211280
211412
  try {
211281
- if (!opts.statSync(path12).isDirectory())
211413
+ if (!opts.statSync(path11).isDirectory())
211282
211414
  throw er;
211283
211415
  } catch (_2) {
211284
211416
  throw er;
211285
211417
  }
211286
211418
  }
211287
211419
  };
211288
- var mkdirpManual = Object.assign(async (path12, options, made) => {
211420
+ var mkdirpManual = Object.assign(async (path11, options, made) => {
211289
211421
  const opts = optsArg(options);
211290
211422
  opts.recursive = false;
211291
- const parent = dirname3(path12);
211292
- if (parent === path12) {
211293
- return opts.mkdirAsync(path12, opts).catch((er) => {
211423
+ const parent = dirname3(path11);
211424
+ if (parent === path11) {
211425
+ return opts.mkdirAsync(path11, opts).catch((er) => {
211294
211426
  const fer = er;
211295
211427
  if (fer && fer.code !== "EISDIR") {
211296
211428
  throw er;
211297
211429
  }
211298
211430
  });
211299
211431
  }
211300
- return opts.mkdirAsync(path12, opts).then(() => made || path12, async (er) => {
211432
+ return opts.mkdirAsync(path11, opts).then(() => made || path11, async (er) => {
211301
211433
  const fer = er;
211302
211434
  if (fer && fer.code === "ENOENT") {
211303
- return mkdirpManual(parent, opts).then((made2) => mkdirpManual(path12, opts, made2));
211435
+ return mkdirpManual(parent, opts).then((made2) => mkdirpManual(path11, opts, made2));
211304
211436
  }
211305
211437
  if (fer && fer.code !== "EEXIST" && fer.code !== "EROFS") {
211306
211438
  throw er;
211307
211439
  }
211308
- return opts.statAsync(path12).then((st2) => {
211440
+ return opts.statAsync(path11).then((st2) => {
211309
211441
  if (st2.isDirectory()) {
211310
211442
  return made;
211311
211443
  } else {
@@ -211319,17 +211451,17 @@ var mkdirpManual = Object.assign(async (path12, options, made) => {
211319
211451
 
211320
211452
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/mkdirp-native.js
211321
211453
  init_esm_shims();
211322
- import { dirname as dirname5 } from "path";
211454
+ import { dirname as dirname5 } from "node:path";
211323
211455
 
211324
211456
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/find-made.js
211325
211457
  init_esm_shims();
211326
- import { dirname as dirname4 } from "path";
211327
- var findMade = async (opts, parent, path12) => {
211328
- if (path12 === parent) {
211458
+ import { dirname as dirname4 } from "node:path";
211459
+ var findMade = async (opts, parent, path11) => {
211460
+ if (path11 === parent) {
211329
211461
  return;
211330
211462
  }
211331
211463
  return opts.statAsync(parent).then(
211332
- (st2) => st2.isDirectory() ? path12 : void 0,
211464
+ (st2) => st2.isDirectory() ? path11 : void 0,
211333
211465
  // will fail later
211334
211466
  // will fail later
211335
211467
  (er) => {
@@ -211338,12 +211470,12 @@ var findMade = async (opts, parent, path12) => {
211338
211470
  }
211339
211471
  );
211340
211472
  };
211341
- var findMadeSync = (opts, parent, path12) => {
211342
- if (path12 === parent) {
211473
+ var findMadeSync = (opts, parent, path11) => {
211474
+ if (path11 === parent) {
211343
211475
  return void 0;
211344
211476
  }
211345
211477
  try {
211346
- return opts.statSync(parent).isDirectory() ? path12 : void 0;
211478
+ return opts.statSync(parent).isDirectory() ? path11 : void 0;
211347
211479
  } catch (er) {
211348
211480
  const fer = er;
211349
211481
  return fer && fer.code === "ENOENT" ? findMadeSync(opts, dirname4(parent), parent) : void 0;
@@ -211351,36 +211483,36 @@ var findMadeSync = (opts, parent, path12) => {
211351
211483
  };
211352
211484
 
211353
211485
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/mkdirp-native.js
211354
- var mkdirpNativeSync = (path12, options) => {
211486
+ var mkdirpNativeSync = (path11, options) => {
211355
211487
  const opts = optsArg(options);
211356
211488
  opts.recursive = true;
211357
- const parent = dirname5(path12);
211358
- if (parent === path12) {
211359
- return opts.mkdirSync(path12, opts);
211489
+ const parent = dirname5(path11);
211490
+ if (parent === path11) {
211491
+ return opts.mkdirSync(path11, opts);
211360
211492
  }
211361
- const made = findMadeSync(opts, path12);
211493
+ const made = findMadeSync(opts, path11);
211362
211494
  try {
211363
- opts.mkdirSync(path12, opts);
211495
+ opts.mkdirSync(path11, opts);
211364
211496
  return made;
211365
211497
  } catch (er) {
211366
211498
  const fer = er;
211367
211499
  if (fer && fer.code === "ENOENT") {
211368
- return mkdirpManualSync(path12, opts);
211500
+ return mkdirpManualSync(path11, opts);
211369
211501
  } else {
211370
211502
  throw er;
211371
211503
  }
211372
211504
  }
211373
211505
  };
211374
- var mkdirpNative = Object.assign(async (path12, options) => {
211506
+ var mkdirpNative = Object.assign(async (path11, options) => {
211375
211507
  const opts = { ...optsArg(options), recursive: true };
211376
- const parent = dirname5(path12);
211377
- if (parent === path12) {
211378
- return await opts.mkdirAsync(path12, opts);
211508
+ const parent = dirname5(path11);
211509
+ if (parent === path11) {
211510
+ return await opts.mkdirAsync(path11, opts);
211379
211511
  }
211380
- return findMade(opts, path12).then((made) => opts.mkdirAsync(path12, opts).then((m) => made || m).catch((er) => {
211512
+ return findMade(opts, path11).then((made) => opts.mkdirAsync(path11, opts).then((m) => made || m).catch((er) => {
211381
211513
  const fer = er;
211382
211514
  if (fer && fer.code === "ENOENT") {
211383
- return mkdirpManual(path12, opts);
211515
+ return mkdirpManual(path11, opts);
211384
211516
  } else {
211385
211517
  throw er;
211386
211518
  }
@@ -211389,32 +211521,32 @@ var mkdirpNative = Object.assign(async (path12, options) => {
211389
211521
 
211390
211522
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/path-arg.js
211391
211523
  init_esm_shims();
211392
- import { parse as parse3, resolve as resolve3 } from "path";
211524
+ import { parse as parse3, resolve as resolve3 } from "node:path";
211393
211525
  var platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
211394
- var pathArg = (path12) => {
211395
- if (/\0/.test(path12)) {
211526
+ var pathArg = (path11) => {
211527
+ if (/\0/.test(path11)) {
211396
211528
  throw Object.assign(new TypeError("path must be a string without null bytes"), {
211397
- path: path12,
211529
+ path: path11,
211398
211530
  code: "ERR_INVALID_ARG_VALUE"
211399
211531
  });
211400
211532
  }
211401
- path12 = resolve3(path12);
211533
+ path11 = resolve3(path11);
211402
211534
  if (platform === "win32") {
211403
211535
  const badWinChars = /[*|"<>?:]/;
211404
- const { root: root2 } = parse3(path12);
211405
- if (badWinChars.test(path12.substring(root2.length))) {
211536
+ const { root: root2 } = parse3(path11);
211537
+ if (badWinChars.test(path11.substring(root2.length))) {
211406
211538
  throw Object.assign(new Error("Illegal characters in path."), {
211407
- path: path12,
211539
+ path: path11,
211408
211540
  code: "EINVAL"
211409
211541
  });
211410
211542
  }
211411
211543
  }
211412
- return path12;
211544
+ return path11;
211413
211545
  };
211414
211546
 
211415
211547
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/use-native.js
211416
211548
  init_esm_shims();
211417
- import { mkdir as mkdir2, mkdirSync as mkdirSync2 } from "fs";
211549
+ import { mkdir as mkdir2, mkdirSync as mkdirSync2 } from "node:fs";
211418
211550
  var version2 = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version;
211419
211551
  var versArr = version2.replace(/^v/, "").split(".");
211420
211552
  var hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12;
@@ -211424,15 +211556,15 @@ var useNative = Object.assign(!hasNative ? () => false : (opts) => optsArg(opts)
211424
211556
  });
211425
211557
 
211426
211558
  // .yarn/cache/mkdirp-npm-2.1.6-832c38f12a-96f551c651.zip/node_modules/mkdirp/dist/mjs/index.js
211427
- var mkdirpSync = (path12, opts) => {
211428
- path12 = pathArg(path12);
211559
+ var mkdirpSync = (path11, opts) => {
211560
+ path11 = pathArg(path11);
211429
211561
  const resolved = optsArg(opts);
211430
- return useNativeSync(resolved) ? mkdirpNativeSync(path12, resolved) : mkdirpManualSync(path12, resolved);
211562
+ return useNativeSync(resolved) ? mkdirpNativeSync(path11, resolved) : mkdirpManualSync(path11, resolved);
211431
211563
  };
211432
- var mkdirp = Object.assign(async (path12, opts) => {
211433
- path12 = pathArg(path12);
211564
+ var mkdirp = Object.assign(async (path11, opts) => {
211565
+ path11 = pathArg(path11);
211434
211566
  const resolved = optsArg(opts);
211435
- return useNative(resolved) ? mkdirpNative(path12, resolved) : mkdirpManual(path12, resolved);
211567
+ return useNative(resolved) ? mkdirpNative(path11, resolved) : mkdirpManual(path11, resolved);
211436
211568
  }, {
211437
211569
  mkdirpSync,
211438
211570
  mkdirpNative,
@@ -211538,9 +211670,9 @@ init_esm_shims();
211538
211670
  // .yarn/cache/pdfkit-npm-0.17.2-ca20bcf46c-d6344391fb.zip/node_modules/pdfkit/js/pdfkit.es.js
211539
211671
  init_esm_shims();
211540
211672
  var import_crypto_js = __toESM(require_crypto_js());
211541
- import stream from "stream";
211542
- import zlib2 from "zlib";
211543
- import fs4 from "fs";
211673
+ import stream from "node:stream";
211674
+ import zlib2 from "node:zlib";
211675
+ import fs4 from "node:fs";
211544
211676
 
211545
211677
  // .yarn/cache/fontkit-npm-2.0.4-efdc8cf5e0-e68940a080.zip/node_modules/fontkit/dist/module.mjs
211546
211678
  init_esm_shims();
@@ -212610,7 +212742,7 @@ var VoidPointer = class {
212610
212742
  };
212611
212743
 
212612
212744
  // .yarn/cache/fontkit-npm-2.0.4-efdc8cf5e0-e68940a080.zip/node_modules/fontkit/dist/module.mjs
212613
- import $52ZIf$fs from "fs";
212745
+ import $52ZIf$fs from "node:fs";
212614
212746
 
212615
212747
  // .yarn/cache/@swc-helpers-npm-0.5.21-8f854c3b92-692018ec8a.zip/node_modules/@swc/helpers/esm/_define_property.js
212616
212748
  init_esm_shims();
@@ -222161,16 +222293,16 @@ var $f43aec954cdfdf21$export$2e2bcd8739ae039 = class _$f43aec954cdfdf21$export$2
222161
222293
  * @return {Path}
222162
222294
  */
222163
222295
  mapPoints(fn) {
222164
- let path12 = new _$f43aec954cdfdf21$export$2e2bcd8739ae039();
222296
+ let path11 = new _$f43aec954cdfdf21$export$2e2bcd8739ae039();
222165
222297
  for (let c of this.commands) {
222166
222298
  let args = [];
222167
222299
  for (let i = 0; i < c.args.length; i += 2) {
222168
222300
  let [x2, y] = fn(c.args[i], c.args[i + 1]);
222169
222301
  args.push(x2, y);
222170
222302
  }
222171
- path12[c.command](...args);
222303
+ path11[c.command](...args);
222172
222304
  }
222173
- return path12;
222305
+ return path11;
222174
222306
  }
222175
222307
  /**
222176
222308
  * Transforms the path by the given matrix.
@@ -222863,7 +222995,7 @@ var $69aac16029968692$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
222863
222995
  // Converts contours to a Path object that can be rendered
222864
222996
  _getPath() {
222865
222997
  let contours = this._getContours();
222866
- let path12 = new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039)();
222998
+ let path11 = new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039)();
222867
222999
  for (let i = 0; i < contours.length; i++) {
222868
223000
  let contour = contours[i];
222869
223001
  let firstPt = contour[0];
@@ -222879,26 +223011,26 @@ var $69aac16029968692$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
222879
223011
  firstPt = new $69aac16029968692$export$baf26146a414f24a(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2);
222880
223012
  var curvePt = firstPt;
222881
223013
  }
222882
- path12.moveTo(firstPt.x, firstPt.y);
223014
+ path11.moveTo(firstPt.x, firstPt.y);
222883
223015
  for (let j2 = start; j2 < contour.length; j2++) {
222884
223016
  let pt3 = contour[j2];
222885
223017
  let prevPt = j2 === 0 ? firstPt : contour[j2 - 1];
222886
- if (prevPt.onCurve && pt3.onCurve) path12.lineTo(pt3.x, pt3.y);
223018
+ if (prevPt.onCurve && pt3.onCurve) path11.lineTo(pt3.x, pt3.y);
222887
223019
  else if (prevPt.onCurve && !pt3.onCurve) var curvePt = pt3;
222888
223020
  else if (!prevPt.onCurve && !pt3.onCurve) {
222889
223021
  let midX = (prevPt.x + pt3.x) / 2;
222890
223022
  let midY = (prevPt.y + pt3.y) / 2;
222891
- path12.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);
223023
+ path11.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);
222892
223024
  var curvePt = pt3;
222893
223025
  } else if (!prevPt.onCurve && pt3.onCurve) {
222894
- path12.quadraticCurveTo(curvePt.x, curvePt.y, pt3.x, pt3.y);
223026
+ path11.quadraticCurveTo(curvePt.x, curvePt.y, pt3.x, pt3.y);
222895
223027
  var curvePt = null;
222896
223028
  } else throw new Error("Unknown TTF path state");
222897
223029
  }
222898
- if (curvePt) path12.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y);
222899
- path12.closePath();
223030
+ if (curvePt) path11.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y);
223031
+ path11.closePath();
222900
223032
  }
222901
- return path12;
223033
+ return path11;
222902
223034
  }
222903
223035
  constructor(...args) {
222904
223036
  super(...args);
@@ -222921,7 +223053,7 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
222921
223053
  let str2 = cff.topDict.CharStrings[this.id];
222922
223054
  let end = str2.offset + str2.length;
222923
223055
  stream5.pos = str2.offset;
222924
- let path12 = new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039)();
223056
+ let path11 = new (0, $f43aec954cdfdf21$export$2e2bcd8739ae039)();
222925
223057
  let stack = [];
222926
223058
  let trans = [];
222927
223059
  let width = null;
@@ -222949,8 +223081,8 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
222949
223081
  return stack.length = 0;
222950
223082
  }
222951
223083
  function moveTo(x3, y2) {
222952
- if (open2) path12.closePath();
222953
- path12.moveTo(x3, y2);
223084
+ if (open2) path11.closePath();
223085
+ path11.moveTo(x3, y2);
222954
223086
  open2 = true;
222955
223087
  }
222956
223088
  let parse5 = function() {
@@ -222977,7 +223109,7 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
222977
223109
  while (stack.length >= 2) {
222978
223110
  x2 += stack.shift();
222979
223111
  y += stack.shift();
222980
- path12.lineTo(x2, y);
223112
+ path11.lineTo(x2, y);
222981
223113
  }
222982
223114
  break;
222983
223115
  case 6:
@@ -222986,7 +223118,7 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
222986
223118
  while (stack.length >= 1) {
222987
223119
  if (phase) x2 += stack.shift();
222988
223120
  else y += stack.shift();
222989
- path12.lineTo(x2, y);
223121
+ path11.lineTo(x2, y);
222990
223122
  phase = !phase;
222991
223123
  }
222992
223124
  break;
@@ -222998,7 +223130,7 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
222998
223130
  c2y = c1y + stack.shift();
222999
223131
  x2 = c2x + stack.shift();
223000
223132
  y = c2y + stack.shift();
223001
- path12.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223133
+ path11.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223002
223134
  }
223003
223135
  break;
223004
223136
  case 10:
@@ -223022,7 +223154,7 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223022
223154
  if (cff.version >= 2) break;
223023
223155
  if (stack.length > 0) checkWidth();
223024
223156
  if (open2) {
223025
- path12.closePath();
223157
+ path11.closePath();
223026
223158
  open2 = false;
223027
223159
  }
223028
223160
  break;
@@ -223070,17 +223202,17 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223070
223202
  c2y = c1y + stack.shift();
223071
223203
  x2 = c2x + stack.shift();
223072
223204
  y = c2y + stack.shift();
223073
- path12.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223205
+ path11.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223074
223206
  }
223075
223207
  x2 += stack.shift();
223076
223208
  y += stack.shift();
223077
- path12.lineTo(x2, y);
223209
+ path11.lineTo(x2, y);
223078
223210
  break;
223079
223211
  case 25:
223080
223212
  while (stack.length >= 8) {
223081
223213
  x2 += stack.shift();
223082
223214
  y += stack.shift();
223083
- path12.lineTo(x2, y);
223215
+ path11.lineTo(x2, y);
223084
223216
  }
223085
223217
  c1x = x2 + stack.shift();
223086
223218
  c1y = y + stack.shift();
@@ -223088,7 +223220,7 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223088
223220
  c2y = c1y + stack.shift();
223089
223221
  x2 = c2x + stack.shift();
223090
223222
  y = c2y + stack.shift();
223091
- path12.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223223
+ path11.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223092
223224
  break;
223093
223225
  case 26:
223094
223226
  if (stack.length % 2) x2 += stack.shift();
@@ -223099,7 +223231,7 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223099
223231
  c2y = c1y + stack.shift();
223100
223232
  x2 = c2x;
223101
223233
  y = c2y + stack.shift();
223102
- path12.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223234
+ path11.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223103
223235
  }
223104
223236
  break;
223105
223237
  case 27:
@@ -223111,7 +223243,7 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223111
223243
  c2y = c1y + stack.shift();
223112
223244
  x2 = c2x + stack.shift();
223113
223245
  y = c2y;
223114
- path12.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223246
+ path11.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223115
223247
  }
223116
223248
  break;
223117
223249
  case 28:
@@ -223150,7 +223282,7 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223150
223282
  x2 = c2x + stack.shift();
223151
223283
  y = c2y + (stack.length === 1 ? stack.shift() : 0);
223152
223284
  }
223153
- path12.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223285
+ path11.bezierCurveTo(c1x, c1y, c2x, c2y, x2, y);
223154
223286
  phase = !phase;
223155
223287
  }
223156
223288
  break;
@@ -223276,8 +223408,8 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223276
223408
  c6y = c5y;
223277
223409
  x2 = c6x;
223278
223410
  y = c6y;
223279
- path12.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);
223280
- path12.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);
223411
+ path11.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);
223412
+ path11.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);
223281
223413
  break;
223282
223414
  case 35:
223283
223415
  pts = [];
@@ -223286,8 +223418,8 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223286
223418
  y += stack.shift();
223287
223419
  pts.push(x2, y);
223288
223420
  }
223289
- path12.bezierCurveTo(...pts.slice(0, 6));
223290
- path12.bezierCurveTo(...pts.slice(6));
223421
+ path11.bezierCurveTo(...pts.slice(0, 6));
223422
+ path11.bezierCurveTo(...pts.slice(6));
223291
223423
  stack.shift();
223292
223424
  break;
223293
223425
  case 36:
@@ -223305,8 +223437,8 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223305
223437
  c6y = c5y;
223306
223438
  x2 = c6x;
223307
223439
  y = c6y;
223308
- path12.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);
223309
- path12.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);
223440
+ path11.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);
223441
+ path11.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);
223310
223442
  break;
223311
223443
  case 37:
223312
223444
  let startx = x2;
@@ -223325,8 +223457,8 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223325
223457
  y += stack.shift();
223326
223458
  }
223327
223459
  pts.push(x2, y);
223328
- path12.bezierCurveTo(...pts.slice(0, 6));
223329
- path12.bezierCurveTo(...pts.slice(6));
223460
+ path11.bezierCurveTo(...pts.slice(0, 6));
223461
+ path11.bezierCurveTo(...pts.slice(6));
223330
223462
  break;
223331
223463
  default:
223332
223464
  throw new Error(`Unknown op: 12 ${op}`);
@@ -223346,8 +223478,8 @@ var $62cc5109c6101893$export$2e2bcd8739ae039 = class extends (0, $f92906be28e617
223346
223478
  }
223347
223479
  };
223348
223480
  parse5();
223349
- if (open2) path12.closePath();
223350
- return path12;
223481
+ if (open2) path11.closePath();
223482
+ return path11;
223351
223483
  }
223352
223484
  constructor(...args) {
223353
223485
  super(...args);
@@ -223807,7 +223939,7 @@ var $807e58506be70005$var$Glyf = new Struct({
223807
223939
  yPoints: new ArrayT($807e58506be70005$var$Point, 0)
223808
223940
  });
223809
223941
  var $807e58506be70005$export$2e2bcd8739ae039 = class {
223810
- encodeSimple(path12, instructions = []) {
223942
+ encodeSimple(path11, instructions = []) {
223811
223943
  let endPtsOfContours = [];
223812
223944
  let xPoints = [];
223813
223945
  let yPoints = [];
@@ -223815,14 +223947,14 @@ var $807e58506be70005$export$2e2bcd8739ae039 = class {
223815
223947
  let same = 0;
223816
223948
  let lastX = 0, lastY = 0, lastFlag = 0;
223817
223949
  let pointCount = 0;
223818
- for (let i = 0; i < path12.commands.length; i++) {
223819
- let c = path12.commands[i];
223950
+ for (let i = 0; i < path11.commands.length; i++) {
223951
+ let c = path11.commands[i];
223820
223952
  for (let j2 = 0; j2 < c.args.length; j2 += 2) {
223821
223953
  let x2 = c.args[j2];
223822
223954
  let y = c.args[j2 + 1];
223823
223955
  let flag = 0;
223824
223956
  if (c.command === "quadraticCurveTo" && j2 === 2) {
223825
- let next = path12.commands[i + 1];
223957
+ let next = path11.commands[i + 1];
223826
223958
  if (next && next.command === "quadraticCurveTo") {
223827
223959
  let midX = (lastX + next.args[0]) / 2;
223828
223960
  let midY = (lastY + next.args[1]) / 2;
@@ -223849,8 +223981,8 @@ var $807e58506be70005$export$2e2bcd8739ae039 = class {
223849
223981
  }
223850
223982
  if (c.command === "closePath") endPtsOfContours.push(pointCount - 1);
223851
223983
  }
223852
- if (path12.commands.length > 1 && path12.commands[path12.commands.length - 1].command !== "closePath") endPtsOfContours.push(pointCount - 1);
223853
- let bbox = path12.bbox;
223984
+ if (path11.commands.length > 1 && path11.commands[path11.commands.length - 1].command !== "closePath") endPtsOfContours.push(pointCount - 1);
223985
+ let bbox = path11.bbox;
223854
223986
  let glyf = {
223855
223987
  numberOfContours: endPtsOfContours.length,
223856
223988
  xMin: bbox.minX,
@@ -223957,7 +224089,7 @@ var $001d739428a71d5a$export$2e2bcd8739ae039 = class extends (0, $5cc7476da92df3
223957
224089
  for (let gid of this.glyphs) {
223958
224090
  this.charstrings.push(this.cff.getCharString(gid));
223959
224091
  let glyph = this.font.getGlyph(gid);
223960
- let path12 = glyph.path;
224092
+ let path11 = glyph.path;
223961
224093
  for (let subr in glyph._usedGsubrs) gsubrs[subr] = true;
223962
224094
  }
223963
224095
  this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs);
@@ -223995,7 +224127,7 @@ var $001d739428a71d5a$export$2e2bcd8739ae039 = class extends (0, $5cc7476da92df3
223995
224127
  used_fds[fd] = true;
223996
224128
  topDict.FDSelect.fds.push(fd_select[fd]);
223997
224129
  let glyph = this.font.getGlyph(gid);
223998
- let path12 = glyph.path;
224130
+ let path11 = glyph.path;
223999
224131
  for (let subr in glyph._usedSubrs) used_subrs[fd_select[fd]][subr] = true;
224000
224132
  }
224001
224133
  for (let i = 0; i < topDict.FDArray.length; i++) {
@@ -224012,7 +224144,7 @@ var $001d739428a71d5a$export$2e2bcd8739ae039 = class extends (0, $5cc7476da92df3
224012
224144
  let used_subrs = {};
224013
224145
  for (let gid of this.glyphs) {
224014
224146
  let glyph = this.font.getGlyph(gid);
224015
- let path12 = glyph.path;
224147
+ let path11 = glyph.path;
224016
224148
  for (let subr in glyph._usedSubrs) used_subrs[subr] = true;
224017
224149
  }
224018
224150
  let privateDict = Object.assign({}, this.cff.topDict.Private);
@@ -224993,7 +225125,7 @@ var $05f49f930186144e$export$2e2bcd8739ae039 = class {
224993
225125
  (0, $d636bc798e7178db$export$36b2f24e97d43be)((0, $05f49f930186144e$export$2e2bcd8739ae039));
224994
225126
 
224995
225127
  // .yarn/cache/pdfkit-npm-0.17.2-ca20bcf46c-d6344391fb.zip/node_modules/pdfkit/js/pdfkit.es.js
224996
- import { EventEmitter as EventEmitter3 } from "events";
225128
+ import { EventEmitter as EventEmitter3 } from "node:events";
224997
225129
 
224998
225130
  // .yarn/cache/linebreak-npm-1.1.0-d845ecba6a-b350c90d7b.zip/node_modules/linebreak/dist/module.mjs
224999
225131
  init_esm_shims();
@@ -226325,20 +226457,20 @@ var import_jpeg_exif = __toESM(require_lib3());
226325
226457
 
226326
226458
  // .yarn/cache/png-js-npm-1.1.0-bd07864ed6-61e275cb42.zip/node_modules/png-js/lib/png-js.js
226327
226459
  init_esm_shims();
226328
- import fs3 from "fs";
226329
- import zlib from "zlib";
226460
+ import fs3 from "node:fs";
226461
+ import zlib from "node:zlib";
226330
226462
  var PNG = class _PNG {
226331
- static decode(path12, fn) {
226463
+ static decode(path11, fn) {
226332
226464
  {
226333
- return fs3.readFile(path12, function(err, file) {
226465
+ return fs3.readFile(path11, function(err, file) {
226334
226466
  const png = new _PNG(file);
226335
226467
  return png.decode((pixels) => fn(pixels));
226336
226468
  });
226337
226469
  }
226338
226470
  }
226339
- static load(path12) {
226471
+ static load(path11) {
226340
226472
  {
226341
- const file = fs3.readFileSync(path12);
226473
+ const file = fs3.readFileSync(path11);
226342
226474
  return new _PNG(file);
226343
226475
  }
226344
226476
  }
@@ -228089,14 +228221,14 @@ var parameters = {
228089
228221
  Z: 0,
228090
228222
  z: 0
228091
228223
  };
228092
- var parse4 = function(path12) {
228224
+ var parse4 = function(path11) {
228093
228225
  let cmd;
228094
228226
  const ret = [];
228095
228227
  let args = [];
228096
228228
  let curArg = "";
228097
228229
  let foundDecimal = false;
228098
228230
  let params = 0;
228099
- for (let c of path12) {
228231
+ for (let c of path11) {
228100
228232
  if (parameters[c] != null) {
228101
228233
  params = parameters[c];
228102
228234
  if (cmd) {
@@ -228394,8 +228526,8 @@ var segmentToBezier = function(cx2, cy2, th0, th1, rx, ry, sin_th, cos_th) {
228394
228526
  return [a00 * x1 + a01 * y1, a10 * x1 + a11 * y1, a00 * x2 + a01 * y2, a10 * x2 + a11 * y2, a00 * x3 + a01 * y3, a10 * x3 + a11 * y3];
228395
228527
  };
228396
228528
  var SVGPath = class {
228397
- static apply(doc, path12) {
228398
- const commands = parse4(path12);
228529
+ static apply(doc, path11) {
228530
+ const commands = parse4(path11);
228399
228531
  apply2(commands, doc);
228400
228532
  }
228401
228533
  };
@@ -228563,8 +228695,8 @@ var VectorMixin = {
228563
228695
  }
228564
228696
  return this.closePath();
228565
228697
  },
228566
- path(path12) {
228567
- SVGPath.apply(this, path12);
228698
+ path(path11) {
228699
+ SVGPath.apply(this, path11);
228568
228700
  return this;
228569
228701
  },
228570
228702
  _windingRule(rule) {
@@ -232648,8 +232780,8 @@ mixin(TableMixin);
232648
232780
  PDFDocument.LineWrapper = LineWrapper;
232649
232781
 
232650
232782
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/plugins/SvgToPdfExportPlugin.js
232651
- import { promises as fs5, createWriteStream } from "fs";
232652
- import * as path4 from "path";
232783
+ import { promises as fs5, createWriteStream } from "node:fs";
232784
+ import * as path4 from "node:path";
232653
232785
  var import_lodash38 = __toESM(require_lodash5(), 1);
232654
232786
  var import_lodash39 = __toESM(require_lodash8(), 1);
232655
232787
  var import_lodash40 = __toESM(require_lodash9(), 1);
@@ -232784,9 +232916,9 @@ var SvgToPdfExportPlugin = class {
232784
232916
 
232785
232917
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/plugins/CopyDefaultCssPlugin.js
232786
232918
  init_esm_shims();
232787
- import * as fs6 from "fs";
232788
- import * as path5 from "path";
232789
- import { createRequire } from "module";
232919
+ import * as fs6 from "node:fs";
232920
+ import * as path5 from "node:path";
232921
+ import { createRequire } from "node:module";
232790
232922
  var import_lodash41 = __toESM(require_lodash5(), 1);
232791
232923
  var require2 = createRequire(import.meta.url);
232792
232924
  var CopyDefaultCssPlugin = class {
@@ -232911,9 +233043,9 @@ var StdOutPlugin = class {
232911
233043
  init_esm_shims();
232912
233044
  var import_lodash43 = __toESM(require_lodash5(), 1);
232913
233045
  var import_lodash44 = __toESM(require_lodash12(), 1);
232914
- import * as fs7 from "fs";
232915
- import { promisify as promisify2 } from "util";
232916
- import * as path6 from "path";
233046
+ import * as fs7 from "node:fs";
233047
+ import { promisify as promisify2 } from "node:util";
233048
+ import * as path6 from "node:path";
232917
233049
  var readFileAsync2 = promisify2(fs7.readFile);
232918
233050
  var IncludePlugin = class {
232919
233051
  name = "IncludePlugin";
@@ -232972,8 +233104,8 @@ var IncludePlugin = class {
232972
233104
 
232973
233105
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/plugins/LoadFilePlugin.js
232974
233106
  init_esm_shims();
232975
- import { promisify as promisify3 } from "util";
232976
- import { readFile as readFile3 } from "fs";
233107
+ import { promisify as promisify3 } from "node:util";
233108
+ import { readFile as readFile3 } from "node:fs";
232977
233109
  var readFileAsync3 = promisify3(readFile3);
232978
233110
  var LoadFilePlugin = class {
232979
233111
  name = "LoadFilePlugin";
@@ -234880,9 +235012,9 @@ function isVisitable(thing) {
234880
235012
  function removeBrackets(key) {
234881
235013
  return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
234882
235014
  }
234883
- function renderKey(path12, key, dots) {
234884
- if (!path12) return key;
234885
- return path12.concat(key).map(function each(token, i) {
235015
+ function renderKey(path11, key, dots) {
235016
+ if (!path11) return key;
235017
+ return path11.concat(key).map(function each(token, i) {
234886
235018
  token = removeBrackets(token);
234887
235019
  return !dots && i ? "[" + token + "]" : token;
234888
235020
  }).join(dots ? "." : "");
@@ -234936,13 +235068,13 @@ function toFormData(obj, formData, options) {
234936
235068
  }
234937
235069
  return value;
234938
235070
  }
234939
- function defaultVisitor(value, key, path12) {
235071
+ function defaultVisitor(value, key, path11) {
234940
235072
  let arr = value;
234941
235073
  if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
234942
- formData.append(renderKey(path12, key, dots), convertValue(value));
235074
+ formData.append(renderKey(path11, key, dots), convertValue(value));
234943
235075
  return false;
234944
235076
  }
234945
- if (value && !path12 && typeof value === "object") {
235077
+ if (value && !path11 && typeof value === "object") {
234946
235078
  if (utils_default.endsWith(key, "{}")) {
234947
235079
  key = metaTokens ? key : key.slice(0, -2);
234948
235080
  value = JSON.stringify(value);
@@ -234961,7 +235093,7 @@ function toFormData(obj, formData, options) {
234961
235093
  if (isVisitable(value)) {
234962
235094
  return true;
234963
235095
  }
234964
- formData.append(renderKey(path12, key, dots), convertValue(value));
235096
+ formData.append(renderKey(path11, key, dots), convertValue(value));
234965
235097
  return false;
234966
235098
  }
234967
235099
  const stack = [];
@@ -234970,7 +235102,7 @@ function toFormData(obj, formData, options) {
234970
235102
  convertValue,
234971
235103
  isVisitable
234972
235104
  });
234973
- function build(value, path12, depth = 0) {
235105
+ function build(value, path11, depth = 0) {
234974
235106
  if (utils_default.isUndefined(value)) return;
234975
235107
  if (depth > maxDepth) {
234976
235108
  throw new AxiosError_default(
@@ -234979,13 +235111,13 @@ function toFormData(obj, formData, options) {
234979
235111
  );
234980
235112
  }
234981
235113
  if (stack.indexOf(value) !== -1) {
234982
- throw Error("Circular reference detected in " + path12.join("."));
235114
+ throw Error("Circular reference detected in " + path11.join("."));
234983
235115
  }
234984
235116
  stack.push(value);
234985
235117
  utils_default.forEach(value, function each(el, key) {
234986
- const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path12, exposedHelpers);
235118
+ const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path11, exposedHelpers);
234987
235119
  if (result === true) {
234988
- build(el, path12 ? path12.concat(key) : [key], depth + 1);
235120
+ build(el, path11 ? path11.concat(key) : [key], depth + 1);
234989
235121
  }
234990
235122
  });
234991
235123
  stack.pop();
@@ -235151,11 +235283,11 @@ init_esm_shims();
235151
235283
 
235152
235284
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/platform/node/index.js
235153
235285
  init_esm_shims();
235154
- import crypto2 from "crypto";
235286
+ import crypto2 from "node:crypto";
235155
235287
 
235156
235288
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
235157
235289
  init_esm_shims();
235158
- import url from "url";
235290
+ import url from "node:url";
235159
235291
  var URLSearchParams_default = url.URLSearchParams;
235160
235292
 
235161
235293
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/platform/node/index.js
@@ -235216,7 +235348,7 @@ var platform_default = {
235216
235348
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/helpers/toURLEncodedForm.js
235217
235349
  function toURLEncodedForm(data, options) {
235218
235350
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
235219
- visitor: function(value, key, path12, helpers) {
235351
+ visitor: function(value, key, path11, helpers) {
235220
235352
  if (platform_default.isNode && utils_default.isBuffer(value)) {
235221
235353
  this.append(key, value.toString("base64"));
235222
235354
  return false;
@@ -235247,11 +235379,11 @@ function arrayToObject(arr) {
235247
235379
  return obj;
235248
235380
  }
235249
235381
  function formDataToJSON(formData) {
235250
- function buildPath(path12, value, target, index) {
235251
- let name = path12[index++];
235382
+ function buildPath(path11, value, target, index) {
235383
+ let name = path11[index++];
235252
235384
  if (name === "__proto__") return true;
235253
235385
  const isNumericKey = Number.isFinite(+name);
235254
- const isLast = index >= path12.length;
235386
+ const isLast = index >= path11.length;
235255
235387
  name = !name && utils_default.isArray(target) ? target.length : name;
235256
235388
  if (isLast) {
235257
235389
  if (utils_default.hasOwnProp(target, name)) {
@@ -235264,7 +235396,7 @@ function formDataToJSON(formData) {
235264
235396
  if (!utils_default.hasOwnProp(target, name) || !utils_default.isObject(target[name])) {
235265
235397
  target[name] = [];
235266
235398
  }
235267
- const result = buildPath(path12, value, target[name], index);
235399
+ const result = buildPath(path11, value, target[name], index);
235268
235400
  if (result && utils_default.isArray(target[name])) {
235269
235401
  target[name] = arrayToObject(target[name]);
235270
235402
  }
@@ -235558,12 +235690,12 @@ function getEnv(key) {
235558
235690
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/adapters/http.js
235559
235691
  var import_https_proxy_agent = __toESM(require_dist2(), 1);
235560
235692
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
235561
- import http from "http";
235562
- import https from "https";
235563
- import http2 from "http2";
235564
- import util3 from "util";
235565
- import { resolve as resolvePath } from "path";
235566
- import zlib3 from "zlib";
235693
+ import http from "node:http";
235694
+ import https from "node:https";
235695
+ import http2 from "node:http2";
235696
+ import util3 from "node:util";
235697
+ import { resolve as resolvePath } from "node:path";
235698
+ import zlib3 from "node:zlib";
235567
235699
 
235568
235700
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/env/data.js
235569
235701
  init_esm_shims();
@@ -235616,11 +235748,11 @@ function fromDataURI(uri, asBlob, options) {
235616
235748
  }
235617
235749
 
235618
235750
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/adapters/http.js
235619
- import stream4 from "stream";
235751
+ import stream4 from "node:stream";
235620
235752
 
235621
235753
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/helpers/AxiosTransformStream.js
235622
235754
  init_esm_shims();
235623
- import stream2 from "stream";
235755
+ import stream2 from "node:stream";
235624
235756
  var kInternals = /* @__PURE__ */ Symbol("internals");
235625
235757
  var AxiosTransformStream = class extends stream2.Transform {
235626
235758
  constructor(options) {
@@ -235743,12 +235875,12 @@ var AxiosTransformStream = class extends stream2.Transform {
235743
235875
  var AxiosTransformStream_default = AxiosTransformStream;
235744
235876
 
235745
235877
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/adapters/http.js
235746
- import { EventEmitter as EventEmitter4 } from "events";
235878
+ import { EventEmitter as EventEmitter4 } from "node:events";
235747
235879
 
235748
235880
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/helpers/formDataToStream.js
235749
235881
  init_esm_shims();
235750
- import util2 from "util";
235751
- import { Readable as Readable2 } from "stream";
235882
+ import util2 from "node:util";
235883
+ import { Readable as Readable2 } from "node:stream";
235752
235884
 
235753
235885
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/helpers/readBlob.js
235754
235886
  init_esm_shims();
@@ -235853,7 +235985,7 @@ var formDataToStream_default = formDataToStream;
235853
235985
 
235854
235986
  // .yarn/cache/axios-npm-1.16.1-c946e2f9bd-2f77e37e65.zip/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
235855
235987
  init_esm_shims();
235856
- import stream3 from "stream";
235988
+ import stream3 from "node:stream";
235857
235989
  var ZlibHeaderTransformStream = class extends stream3.Transform {
235858
235990
  __transform(chunk, encoding, callback) {
235859
235991
  this.push(chunk);
@@ -236752,9 +236884,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
236752
236884
  auth = urlUsername + ":" + urlPassword;
236753
236885
  }
236754
236886
  auth && headers.delete("authorization");
236755
- let path12;
236887
+ let path11;
236756
236888
  try {
236757
- path12 = buildURL(
236889
+ path11 = buildURL(
236758
236890
  parsed.pathname + parsed.search,
236759
236891
  config2.params,
236760
236892
  config2.paramsSerializer
@@ -236772,7 +236904,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
236772
236904
  false
236773
236905
  );
236774
236906
  const options = Object.assign(/* @__PURE__ */ Object.create(null), {
236775
- path: path12,
236907
+ path: path11,
236776
236908
  method,
236777
236909
  headers: toByteStringHeaderObject(headers),
236778
236910
  agents: { http: config2.httpAgent, https: config2.httpsAgent },
@@ -237123,14 +237255,14 @@ init_esm_shims();
237123
237255
  var cookies_default = platform_default.hasStandardBrowserEnv ? (
237124
237256
  // Standard browser envs support document.cookie
237125
237257
  {
237126
- write(name, value, expires, path12, domain, secure, sameSite) {
237258
+ write(name, value, expires, path11, domain, secure, sameSite) {
237127
237259
  if (typeof document === "undefined") return;
237128
237260
  const cookie = [`${name}=${encodeURIComponent(value)}`];
237129
237261
  if (utils_default.isNumber(expires)) {
237130
237262
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
237131
237263
  }
237132
- if (utils_default.isString(path12)) {
237133
- cookie.push(`path=${path12}`);
237264
+ if (utils_default.isString(path11)) {
237265
+ cookie.push(`path=${path11}`);
237134
237266
  }
237135
237267
  if (utils_default.isString(domain)) {
237136
237268
  cookie.push(`domain=${domain}`);
@@ -238544,8 +238676,8 @@ var {
238544
238676
  } = axios_default;
238545
238677
 
238546
238678
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/plugins/ImageSizePlugin.js
238547
- import { constants as constants2, promises as fs8 } from "fs";
238548
- import path7 from "path";
238679
+ import { constants as constants2, promises as fs8 } from "node:fs";
238680
+ import path7 from "node:path";
238549
238681
  var ImageSizePlugin = class {
238550
238682
  name = "ImageSizePlugin";
238551
238683
  runAsync = async (request, _response, _logger) => {
@@ -238585,8 +238717,8 @@ var ImageSizePlugin = class {
238585
238717
  }
238586
238718
  }
238587
238719
  };
238588
- getSizeFromRemoteFile = async (path12) => {
238589
- const response = await axios_default.get(path12, {
238720
+ getSizeFromRemoteFile = async (path11) => {
238721
+ const response = await axios_default.get(path11, {
238590
238722
  responseType: "arraybuffer"
238591
238723
  });
238592
238724
  const buffer = Buffer.from(response.data, "binary");
@@ -239050,12 +239182,12 @@ function fromBuffer(uint8Array, fileInfo) {
239050
239182
 
239051
239183
  // .yarn/cache/file-type-npm-18.7.0-b585ca87df-bd06a5a5b2.zip/node_modules/file-type/core.js
239052
239184
  init_esm_shims();
239053
- import { Buffer as Buffer5 } from "buffer";
239185
+ import { Buffer as Buffer5 } from "node:buffer";
239054
239186
 
239055
239187
  // .yarn/cache/token-types-npm-5.0.1-a86fdb8b12-cb671b2b52.zip/node_modules/token-types/lib/index.js
239056
239188
  init_esm_shims();
239057
239189
  var ieee754 = __toESM(require_ieee754(), 1);
239058
- import { Buffer as Buffer4 } from "buffer";
239190
+ import { Buffer as Buffer4 } from "node:buffer";
239059
239191
  function dv(array2) {
239060
239192
  return new DataView(array2.buffer, array2.byteOffset);
239061
239193
  }
@@ -239704,7 +239836,7 @@ var FileTypeParser = class {
239704
239836
  }
239705
239837
  }
239706
239838
  async toDetectionStream(readableStream, options = {}) {
239707
- const { default: stream5 } = await import("stream");
239839
+ const { default: stream5 } = await import("node:stream");
239708
239840
  const { sampleSize = minimumBytes } = options;
239709
239841
  return new Promise((resolve8, reject2) => {
239710
239842
  readableStream.on("error", reject2);
@@ -240962,9 +241094,9 @@ async function imageType(input) {
240962
241094
 
240963
241095
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/plugins/utils.js
240964
241096
  init_esm_shims();
240965
- import { promises as fs9 } from "fs";
240966
- import path8 from "path";
240967
- import process3 from "process";
241097
+ import { promises as fs9 } from "node:fs";
241098
+ import path8 from "node:path";
241099
+ import process3 from "node:process";
240968
241100
  var imageUtils = {
240969
241101
  getImage: async (imagePath, baseDir = "") => {
240970
241102
  let buffer;
@@ -240980,8 +241112,8 @@ var imageUtils = {
240980
241112
  }
240981
241113
  return buffer;
240982
241114
  },
240983
- getRemoteImage: async (path12) => {
240984
- const response = await axios_default.get(path12, {
241115
+ getRemoteImage: async (path11) => {
241116
+ const response = await axios_default.get(path11, {
240985
241117
  responseType: "arraybuffer"
240986
241118
  });
240987
241119
  return Buffer.from(response.data, "binary");
@@ -240989,7 +241121,7 @@ var imageUtils = {
240989
241121
  };
240990
241122
 
240991
241123
  // .yarn/cache/@argdown-node-npm-2.0.3-8ea489fea5-c7d01fa548.zip/node_modules/@argdown/node/dist/plugins/GenerateDataUrlsPlugin.js
240992
- import path9 from "path";
241124
+ import path9 from "node:path";
240993
241125
  var GenerateDataUrlsPlugin = class {
240994
241126
  name = "GenerateDataUrlsPlugin";
240995
241127
  runAsync = async (request, _response, _logger) => {
@@ -241256,24 +241388,7 @@ function buildApp(opts) {
241256
241388
  return app;
241257
241389
  }
241258
241390
 
241259
- // src/argdown/inline.ts
241260
- function runInline(source, opts) {
241261
- const app = buildApp({
241262
- async: false,
241263
- withJson: opts.withJson,
241264
- withFileIO: false
241265
- });
241266
- const request = {
241267
- input: source,
241268
- process: opts.withJson ? "export-json" : "parse",
241269
- throwExceptions: false
241270
- };
241271
- return app.run(request);
241272
- }
241273
-
241274
241391
  // src/argdown/file.ts
241275
- init_esm_shims();
241276
- import path10 from "path";
241277
241392
  async function runFile(filePath, opts) {
241278
241393
  const app = buildApp({
241279
241394
  async: true,
@@ -241295,6 +241410,22 @@ async function runFile(filePath, opts) {
241295
241410
  }
241296
241411
  }
241297
241412
 
241413
+ // src/argdown/inline.ts
241414
+ init_esm_shims();
241415
+ function runInline(source, opts) {
241416
+ const app = buildApp({
241417
+ async: false,
241418
+ withJson: opts.withJson,
241419
+ withFileIO: false
241420
+ });
241421
+ const request = {
241422
+ input: source,
241423
+ process: opts.withJson ? "export-json" : "parse",
241424
+ throwExceptions: false
241425
+ };
241426
+ return app.run(request);
241427
+ }
241428
+
241298
241429
  // src/shape.ts
241299
241430
  init_esm_shims();
241300
241431
  function shapeResponse(resp, mode) {
@@ -241316,10 +241447,9 @@ function shapeResponse(resp, mode) {
241316
241447
  const statementCount = locationKeys.size;
241317
241448
  const argumentCount = Object.keys(args).length;
241318
241449
  const sectionCount = sections.length;
241319
- const lines = [];
241320
- lines.push(
241450
+ const lines = [
241321
241451
  `Parsed ${statementCount} statements (by source-location), ${argumentCount} arguments, ${sectionCount} sections.`
241322
- );
241452
+ ];
241323
241453
  const hasDiagnostics = lexerErrors.length > 0 || parserErrors.length > 0 || exceptions.length > 0;
241324
241454
  if (hasDiagnostics) {
241325
241455
  lines.push("Errors:");
@@ -241334,7 +241464,7 @@ function shapeResponse(resp, mode) {
241334
241464
  lines.push(` exception: ${e.message}`);
241335
241465
  }
241336
241466
  }
241337
- const syntheticTitle = /^Untitled \d+$/;
241467
+ const syntheticTitle = /^Untitled \d+$/u;
241338
241468
  const hasTitledStatement = Object.values(statements).some((ec) => {
241339
241469
  const title = ec.title;
241340
241470
  return typeof title === "string" && !syntheticTitle.test(title);
@@ -241370,10 +241500,9 @@ function shapeDungResponse(resp, dung) {
241370
241500
  const parserErrors = resp.parserErrors ?? [];
241371
241501
  const exceptions = resp.exceptions ?? [];
241372
241502
  const hasDiagnostics = lexerErrors.length > 0 || parserErrors.length > 0 || exceptions.length > 0;
241373
- const lines = [];
241374
- lines.push(
241503
+ const lines = [
241375
241504
  `Grounded extension: ${dung.extension.in.length} IN, ${dung.extension.out.length} OUT, ${dung.extension.undec.length} UNDEC over ${dung.argumentCount} arguments and ${dung.attackCount} attacks.`
241376
- );
241505
+ ];
241377
241506
  if (hasDiagnostics) {
241378
241507
  lines.push("Diagnostics:");
241379
241508
  for (const e of lexerErrors) {
@@ -241405,21 +241534,8 @@ function shapeDungResponse(resp, dung) {
241405
241534
  return result;
241406
241535
  }
241407
241536
 
241408
- // src/tools/shared.ts
241409
- var InputShape = {
241410
- kind: external_exports.enum(["inline", "file"]).describe(
241411
- "Input mode. 'inline' parses the `source` string directly; 'file' loads the file at `path` and resolves @import directives."
241412
- ),
241413
- source: external_exports.string().min(1).optional().describe(
241414
- "Inline Argdown source string. Required when kind='inline'; ignored when kind='file'."
241415
- ),
241416
- path: external_exports.string().min(1).optional().describe(
241417
- "Filesystem path to a .argdown file. Required when kind='file'; ignored when kind='inline'. @import directives resolve relative to this file."
241418
- )
241419
- };
241420
- var InputSchema = external_exports.object(InputShape);
241421
- async function dispatch(input, mode) {
241422
- const withJson = mode === "export_json";
241537
+ // src/tools/dung.ts
241538
+ async function dispatchDung(input) {
241423
241539
  if (input.kind === "inline" && !input.source) {
241424
241540
  return {
241425
241541
  isError: true,
@@ -241443,8 +241559,9 @@ async function dispatch(input, mode) {
241443
241559
  };
241444
241560
  }
241445
241561
  try {
241446
- const response = input.kind === "inline" ? runInline(input.source, { withJson }) : await runFile(input.path, { withJson });
241447
- return shapeResponse(response, mode);
241562
+ const response = input.kind === "inline" ? runInline(input.source, { withJson: false }) : await runFile(input.path, { withJson: false });
241563
+ const dung = dungGrounded(response);
241564
+ return shapeDungResponse(response, dung);
241448
241565
  } catch (err) {
241449
241566
  return {
241450
241567
  isError: true,
@@ -241458,72 +241575,22 @@ async function dispatch(input, mode) {
241458
241575
  }
241459
241576
  }
241460
241577
 
241461
- // src/tools/dung.ts
241462
- init_esm_shims();
241463
-
241464
- // src/argdown/dung.ts
241578
+ // src/tools/shared.ts
241465
241579
  init_esm_shims();
241466
- function extractArgumentAttacks(resp) {
241467
- const out = [];
241468
- for (const r of resp.relations ?? []) {
241469
- if (r.relationType !== RelationType.ATTACK) continue;
241470
- if (r.from?.type !== ArgdownTypes.ARGUMENT) continue;
241471
- if (r.to?.type !== ArgdownTypes.ARGUMENT) continue;
241472
- const fromTitle = r.from.title;
241473
- const toTitle = r.to.title;
241474
- if (typeof fromTitle !== "string" || typeof toTitle !== "string") continue;
241475
- out.push([fromTitle, toTitle]);
241476
- }
241477
- return out;
241478
- }
241479
- function computeGrounded(argumentIds, attacks) {
241480
- const known = new Set(argumentIds);
241481
- const label = /* @__PURE__ */ new Map();
241482
- for (const id of argumentIds) label.set(id, "undec");
241483
- const attackersOf = /* @__PURE__ */ new Map();
241484
- for (const id of argumentIds) attackersOf.set(id, []);
241485
- for (const [from, to] of attacks) {
241486
- if (!known.has(from) || !known.has(to)) continue;
241487
- attackersOf.get(to).push(from);
241488
- }
241489
- let changed = true;
241490
- while (changed) {
241491
- changed = false;
241492
- for (const id of argumentIds) {
241493
- if (label.get(id) !== "undec") continue;
241494
- const attackers = attackersOf.get(id);
241495
- const allOut = attackers.every((a) => label.get(a) === "out");
241496
- if (allOut) {
241497
- label.set(id, "in");
241498
- changed = true;
241499
- continue;
241500
- }
241501
- const someIn = attackers.some((a) => label.get(a) === "in");
241502
- if (someIn) {
241503
- label.set(id, "out");
241504
- changed = true;
241505
- }
241506
- }
241507
- }
241508
- const ext = { in: [], out: [], undec: [] };
241509
- for (const id of argumentIds) {
241510
- ext[label.get(id)].push(id);
241511
- }
241512
- return ext;
241513
- }
241514
- function dungGrounded(resp) {
241515
- const argumentIds = Object.keys(resp.arguments ?? {});
241516
- const attacks = extractArgumentAttacks(resp);
241517
- const extension = computeGrounded(argumentIds, attacks);
241518
- return {
241519
- extension,
241520
- argumentCount: argumentIds.length,
241521
- attackCount: attacks.length
241522
- };
241523
- }
241524
-
241525
- // src/tools/dung.ts
241526
- async function dispatchDung(input) {
241580
+ var InputShape = {
241581
+ kind: external_exports.enum(["inline", "file"]).describe(
241582
+ "Input mode. Use 'inline' with `source` for normal MCP calls. 'file' is legacy/deprecated because it requires filesystem read permission."
241583
+ ),
241584
+ source: external_exports.string().min(1).optional().describe(
241585
+ "Inline Argdown source string. Required when kind='inline'; ignored when kind='file'."
241586
+ ),
241587
+ path: external_exports.string().min(1).optional().describe(
241588
+ "Deprecated legacy filesystem path to a .argdown file. Required only when kind='file'; ignored when kind='inline'. Requires file-read permission and fails under the recommended strict Deno launch."
241589
+ )
241590
+ };
241591
+ var InputSchema = external_exports.object(InputShape);
241592
+ async function dispatch(input, mode) {
241593
+ const withJson = mode === "export_json";
241527
241594
  if (input.kind === "inline" && !input.source) {
241528
241595
  return {
241529
241596
  isError: true,
@@ -241547,9 +241614,8 @@ async function dispatchDung(input) {
241547
241614
  };
241548
241615
  }
241549
241616
  try {
241550
- const response = input.kind === "inline" ? runInline(input.source, { withJson: false }) : await runFile(input.path, { withJson: false });
241551
- const dung = dungGrounded(response);
241552
- return shapeDungResponse(response, dung);
241617
+ const response = input.kind === "inline" ? runInline(input.source, { withJson }) : await runFile(input.path, { withJson });
241618
+ return shapeResponse(response, mode);
241553
241619
  } catch (err) {
241554
241620
  return {
241555
241621
  isError: true,
@@ -241564,15 +241630,11 @@ async function dispatchDung(input) {
241564
241630
  }
241565
241631
 
241566
241632
  // src/server.ts
241567
- var pkgPath = path11.resolve(
241568
- path11.dirname(fileURLToPath2(import.meta.url)),
241569
- "../package.json"
241570
- );
241571
- var { version: version3 } = JSON.parse(readFileSync(pkgPath, "utf8"));
241633
+ var { version: version3 } = package_default;
241572
241634
  var server = new McpServer(
241573
241635
  { name: "argdown-mcp", version: version3 },
241574
241636
  {
241575
- instructions: "Argdown argumentation toolchain. Three tools:\n - parse: lex/parse an Argdown document; returns diagnostics + summary counts.\n - export_json: parse + serialise the full AST as JSON.\n - dung_extensions: compute the grounded extension (which arguments survive once all attacks are resolved) under Dung's abstract argumentation framework. Returns IN/OUT/UNDEC partition.\nAll tools accept either inline `source` (kind: 'inline') or a filesystem `path` (kind: 'file').\nFile-mode resolves @import directives relative to the importer."
241637
+ instructions: "Argdown argumentation toolchain. Three tools:\n - parse: lex/parse an Argdown document; returns diagnostics + summary counts.\n - export_json: parse + serialise the full AST as JSON.\n - dung_extensions: compute the grounded extension (which arguments survive once all attacks are resolved) under Dung's abstract argumentation framework. Returns IN/OUT/UNDEC partition.\nPrefer inline `source` (kind: 'inline') for all model-invoked calls.\nFilesystem `path` input (kind: 'file') is legacy/deprecated because it requires granting the MCP server host file-read permission; strict Deno launches intentionally deny file I/O."
241576
241638
  }
241577
241639
  );
241578
241640
  server.registerTool(
@@ -241585,7 +241647,7 @@ server.registerTool(
241585
241647
  openWorldHint: false
241586
241648
  }
241587
241649
  },
241588
- async (input) => dispatch(input, "parse")
241650
+ (input) => dispatch(input, "parse")
241589
241651
  );
241590
241652
  server.registerTool(
241591
241653
  "export_json",
@@ -241597,7 +241659,7 @@ server.registerTool(
241597
241659
  openWorldHint: false
241598
241660
  }
241599
241661
  },
241600
- async (input) => dispatch(input, "export_json")
241662
+ (input) => dispatch(input, "export_json")
241601
241663
  );
241602
241664
  server.registerTool(
241603
241665
  "dung_extensions",
@@ -241609,13 +241671,21 @@ server.registerTool(
241609
241671
  openWorldHint: false
241610
241672
  }
241611
241673
  },
241612
- async (input) => dispatchDung(input)
241674
+ (input) => dispatchDung(input)
241613
241675
  );
241614
241676
  process.on("SIGINT", () => process.exit(0));
241615
241677
  process.on("SIGTERM", () => process.exit(0));
241616
241678
  process.on("SIGPIPE", () => process.exit(0));
241617
241679
  process.stdin.on("end", () => {
241618
- setTimeout(() => process.exit(0), 100).unref();
241680
+ const handle = setTimeout(() => process.exit(0), 100);
241681
+ if (typeof handle === "object" && handle !== null && "unref" in handle) {
241682
+ handle.unref();
241683
+ } else if (typeof handle === "number") {
241684
+ const denoGlobal = globalThis.Deno;
241685
+ if (denoGlobal && typeof denoGlobal.unrefTimer === "function") {
241686
+ denoGlobal.unrefTimer(handle);
241687
+ }
241688
+ }
241619
241689
  });
241620
241690
  var transport = new StdioServerTransport();
241621
241691
  await server.connect(transport);