canvas-parent-mcp 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -773,9 +773,6 @@ var require_util = __commonJS({
773
773
  else
774
774
  defineBound2(proto, key, desc.value);
775
775
  }
776
- for (const sym of Object.getOwnPropertySymbols(table)) {
777
- defineBound2(proto, sym, table[sym]);
778
- }
779
776
  }
780
777
  function own2(inst, key, value, enumerable = true) {
781
778
  Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });
@@ -952,8 +949,7 @@ var require_core = __commonJS({
952
949
  } finally {
953
950
  _zodDesc2.value = void 0;
954
951
  }
955
- }
956
- if (inst._zod.traits.has(name)) {
952
+ } else if (inst._zod.traits.has(name)) {
957
953
  return;
958
954
  }
959
955
  inst._zod.traits.add(name);
@@ -1556,8 +1552,8 @@ var require_regexes = __commonJS({
1556
1552
  return result;
1557
1553
  };
1558
1554
  Object.defineProperty(exports, "__esModule", { value: true });
1559
- exports.sha1_base64url = exports.sha1_base64 = exports.sha1_hex = exports.md5_base64url = exports.md5_base64 = exports.md5_hex = exports.hex = exports.uppercase = exports.lowercase = exports.undefined = exports.null = exports.boolean = exports.number = exports.integer = exports.bigint = exports.string = exports.anyString = exports.date = exports.iban = exports.creditCard = exports.e164 = exports.httpProtocol = exports.domain = exports.hostname = exports.base64url = exports.base64 = exports.cidrv6 = exports.cidrv4 = exports.mac = exports.ipv6 = exports.ipv4 = exports.browserEmail = exports.idnEmail = exports.unicodeEmail = exports.rfc5322Email = exports.html5Email = exports.email = exports.uuid7 = exports.uuid6 = exports.uuid4 = exports.uuid = exports.guid = exports.extendedDuration = exports.duration = exports.nanoid = exports.ksuid = exports.xid = exports.ulid = exports.cuid2 = exports.cuid = void 0;
1560
- exports.sha512_base64url = exports.sha512_base64 = exports.sha512_hex = exports.sha384_base64url = exports.sha384_base64 = exports.sha384_hex = exports.sha256_base64url = exports.sha256_base64 = exports.sha256_hex = void 0;
1555
+ exports.sha1_base64 = exports.sha1_hex = exports.md5_base64url = exports.md5_base64 = exports.md5_hex = exports.hex = exports.uppercase = exports.lowercase = exports.undefined = exports.null = exports.boolean = exports.number = exports.integer = exports.bigint = exports.string = exports.anyString = exports.date = exports.iban = exports.currencyCode = exports.creditCard = exports.e164 = exports.httpProtocol = exports.domain = exports.hostname = exports.base64url = exports.base64 = exports.cidrv6 = exports.cidrv4 = exports.mac = exports.ipv6 = exports.ipv4 = exports.browserEmail = exports.idnEmail = exports.unicodeEmail = exports.rfc5322Email = exports.html5Email = exports.email = exports.uuid7 = exports.uuid6 = exports.uuid4 = exports.uuid = exports.guid = exports.extendedDuration = exports.duration = exports.nanoid = exports.ksuid = exports.xid = exports.ulid = exports.cuid2 = exports.cuid = void 0;
1556
+ exports.sha512_base64url = exports.sha512_base64 = exports.sha512_hex = exports.sha384_base64url = exports.sha384_base64 = exports.sha384_hex = exports.sha256_base64url = exports.sha256_base64 = exports.sha256_hex = exports.sha1_base64url = void 0;
1561
1557
  exports.nanoidOfLength = nanoidOfLength2;
1562
1558
  exports.emoji = emoji3;
1563
1559
  exports.time = time3;
@@ -1610,6 +1606,7 @@ var require_regexes = __commonJS({
1610
1606
  exports.httpProtocol = /^https?$/;
1611
1607
  exports.e164 = /^\+[1-9]\d{6,14}$/;
1612
1608
  exports.creditCard = /^\d(?:[ -]?\d){11,18}$/;
1609
+ exports.currencyCode = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;
1613
1610
  exports.iban = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
1614
1611
  var dateSource2 = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
1615
1612
  function anchor2(source) {
@@ -1721,7 +1718,7 @@ var require_checks = __commonJS({
1721
1718
  return result;
1722
1719
  };
1723
1720
  Object.defineProperty(exports, "__esModule", { value: true });
1724
- exports.$ZodCheckOverwrite = exports.$ZodCheckMimeType = exports.$ZodCheckProperty = exports.$ZodCheckEndsWith = exports.$ZodCheckStartsWith = exports.$ZodCheckIncludes = exports.$ZodCheckUpperCase = exports.$ZodCheckLowerCase = exports.$ZodCheckRegex = exports.$ZodCheckStringFormat = exports.$ZodCheckLengthEquals = exports.$ZodCheckMinLength = exports.$ZodCheckMaxLength = exports.$ZodCheckSizeEquals = exports.$ZodCheckMinSize = exports.$ZodCheckMaxSize = exports.$ZodCheckBigIntFormat = exports.$ZodCheckNumberFormat = exports.$ZodCheckMultipleOf = exports.$ZodCheckGreaterThan = exports.$ZodCheckLessThan = exports.$ZodCheck = void 0;
1721
+ exports.$ZodCheckOverwrite = exports.$ZodCheckMimeType = exports.$ZodCheckProperties = exports.$ZodCheckProperty = exports.$ZodCheckEndsWith = exports.$ZodCheckStartsWith = exports.$ZodCheckIncludes = exports.$ZodCheckUpperCase = exports.$ZodCheckLowerCase = exports.$ZodCheckRegex = exports.$ZodCheckStringFormat = exports.$ZodCheckLengthEquals = exports.$ZodCheckMinLength = exports.$ZodCheckMaxLength = exports.$ZodCheckSizeEquals = exports.$ZodCheckMinSize = exports.$ZodCheckMaxSize = exports.$ZodCheckBigIntFormat = exports.$ZodCheckNumberFormat = exports.$ZodCheckMultipleOf = exports.$ZodCheckGreaterThan = exports.$ZodCheckLessThan = exports.$ZodCheck = void 0;
1725
1722
  var core = __importStar(require_core());
1726
1723
  var regexes = __importStar(require_regexes());
1727
1724
  var util = __importStar(require_util());
@@ -2150,6 +2147,34 @@ var require_checks = __commonJS({
2150
2147
  return;
2151
2148
  };
2152
2149
  });
2150
+ exports.$ZodCheckProperties = core.$constructor("$ZodCheckProperties", (inst, def) => {
2151
+ exports.$ZodCheck.init(inst, def);
2152
+ util.hide(inst, Symbol.iterator, function* () {
2153
+ yield inst;
2154
+ });
2155
+ let entries;
2156
+ inst._zod.check = (payload) => {
2157
+ if (payload.value == null) {
2158
+ payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
2159
+ return void 0;
2160
+ }
2161
+ entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
2162
+ const input2 = payload.value;
2163
+ let proms;
2164
+ for (const [key, schema] of entries) {
2165
+ const result = schema._zod.run({ value: input2[key], issues: [] }, {});
2166
+ if (result instanceof Promise) {
2167
+ proms ?? (proms = []);
2168
+ proms.push(result.then((result2) => handleCheckPropertyResult2(result2, payload, key)));
2169
+ } else {
2170
+ handleCheckPropertyResult2(result, payload, key);
2171
+ }
2172
+ }
2173
+ if (proms)
2174
+ return Promise.all(proms).then(() => void 0);
2175
+ return void 0;
2176
+ };
2177
+ });
2153
2178
  exports.$ZodCheckMimeType = core.$constructor("$ZodCheckMimeType", (inst, def) => {
2154
2179
  exports.$ZodCheck.init(inst, def);
2155
2180
  const mimeSet = new Set(def.mime);
@@ -2264,7 +2289,7 @@ var require_versions = __commonJS({
2264
2289
  exports.version = {
2265
2290
  major: 4,
2266
2291
  minor: 6,
2267
- patch: 2
2292
+ patch: 5
2268
2293
  };
2269
2294
  (function() {
2270
2295
  var keys = Object.getOwnPropertyNames(exports);
@@ -2318,8 +2343,10 @@ var require_schemas = __commonJS({
2318
2343
  };
2319
2344
  Object.defineProperty(exports, "__esModule", { value: true });
2320
2345
  exports.$ZodObject = exports.$ZodArray = exports.$ZodDate = exports.$ZodVoid = exports.$ZodNever = exports.$ZodUnknown = exports.$ZodAny = exports.$ZodNull = exports.$ZodUndefined = exports.$ZodSymbol = exports.$ZodBigIntFormat = exports.$ZodBigInt = exports.$ZodBoolean = exports.$ZodNumberFormat = exports.$ZodNumber = exports.$ZodCustomStringFormat = exports.$ZodJWT = exports.$ZodIBAN = exports.$ZodCreditCard = exports.$ZodE164 = exports.$ZodBase64URL = exports.base64urlCharset = exports.$ZodBase64 = exports.base64Charset = exports.$ZodCIDRv6 = exports.$ZodCIDRv4 = exports.$ZodMAC = exports.$ZodIPv6 = exports.$ZodIPv4 = exports.$ZodISODuration = exports.$ZodISOTime = exports.$ZodISODate = exports.$ZodISODateTime = exports.$ZodKSUID = exports.$ZodXID = exports.$ZodULID = exports.$ZodCUID2 = exports.$ZodCUID = exports.$ZodNanoID = exports.$ZodEmoji = exports.$ZodURL = exports.URL_UNPARSEABLE = exports.URL_BAD_FORMAT = exports.$ZodEmail = exports.$ZodUUID = exports.$ZodGUID = exports.$ZodStringFormat = exports.$ZodString = exports.clone = exports.$ZodType = void 0;
2321
- exports.$ZodProperties = exports.$ZodCustom = exports.$ZodLazy = exports.$ZodPromise = exports.$ZodFunction = exports.$ZodTemplateLiteral = exports.$ZodReadonly = exports.$ZodPreprocess = exports.$ZodCodec = exports.$ZodPipe = exports.$ZodNaN = exports.$ZodCatch = exports.$ZodSuccess = exports.$ZodNonOptional = exports.$ZodPrefault = exports.$ZodDefault = exports.$ZodNullable = exports.$ZodExactOptional = exports.$ZodOptional = exports.$ZodTransform = exports.$ZodFile = exports.$ZodLiteral = exports.$ZodEnum = exports.$ZodSet = exports.$ZodMap = exports.$ZodRecord = exports.$ZodTuple = exports.$ZodIntersection = exports.$ZodDiscriminatedUnion = exports.$ZodXor = exports.$ZodUnion = exports.$ZodObjectJIT = void 0;
2346
+ exports.$ZodCustom = exports.$ZodLazy = exports.$ZodPromise = exports.$ZodFunction = exports.$ZodTemplateLiteral = exports.$ZodReadonly = exports.$ZodPreprocess = exports.$ZodCodec = exports.$ZodPipe = exports.$ZodNaN = exports.$ZodCatch = exports.$ZodSuccess = exports.$ZodNonOptional = exports.$ZodPrefault = exports.$ZodDefault = exports.$ZodNullable = exports.$ZodExactOptional = exports.$ZodOptional = exports.$ZodTransform = exports.$ZodFile = exports.$ZodLiteral = exports.$ZodEnum = exports.$ZodSet = exports.$ZodMap = exports.$ZodRecord = exports.$ZodTuple = exports.$ZodIntersection = exports.$ZodDiscriminatedUnion = exports.$ZodXor = exports.$ZodUnion = exports.$ZodObjectJIT = void 0;
2322
2347
  exports.standardProps = standardProps2;
2348
+ exports.canParseURL = canParseURL2;
2349
+ exports.validateURL = validateURL2;
2323
2350
  exports.parseURLObject = parseURLObject2;
2324
2351
  exports.stripTabAndNewline = stripTabAndNewline2;
2325
2352
  exports.urlHostnameOk = urlHostnameOk2;
@@ -2528,11 +2555,32 @@ var require_schemas = __commonJS({
2528
2555
  });
2529
2556
  exports.URL_BAD_FORMAT = 1;
2530
2557
  exports.URL_UNPARSEABLE = 2;
2558
+ function canParseURL2(input2) {
2559
+ try {
2560
+ if (typeof URL !== "undefined" && typeof URL.canParse === "function")
2561
+ return URL.canParse(input2);
2562
+ new URL(input2);
2563
+ return true;
2564
+ } catch {
2565
+ return false;
2566
+ }
2567
+ }
2568
+ function validateURL2(trimmed, def) {
2569
+ if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
2570
+ return canParseURL2(trimmed) || exports.URL_UNPARSEABLE;
2571
+ }
2572
+ return parseURLObject2(trimmed, def);
2573
+ }
2531
2574
  function parseURLObject2(trimmed, def) {
2532
2575
  if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
2533
2576
  return exports.URL_BAD_FORMAT;
2534
2577
  }
2535
2578
  try {
2579
+ if (typeof URL !== "undefined") {
2580
+ const URLStatic = URL;
2581
+ if (typeof URLStatic.parse === "function")
2582
+ return URLStatic.parse(trimmed) ?? exports.URL_UNPARSEABLE;
2583
+ }
2536
2584
  return new URL(trimmed);
2537
2585
  } catch {
2538
2586
  return exports.URL_UNPARSEABLE;
@@ -2555,7 +2603,7 @@ var require_schemas = __commonJS({
2555
2603
  inst._zod.check = (payload) => {
2556
2604
  try {
2557
2605
  const trimmed = payload.value.trim();
2558
- const url4 = parseURLObject2(trimmed, def);
2606
+ const url4 = validateURL2(trimmed, def);
2559
2607
  if (url4 === exports.URL_BAD_FORMAT) {
2560
2608
  payload.issues.push({
2561
2609
  code: "invalid_format",
@@ -2577,6 +2625,10 @@ var require_schemas = __commonJS({
2577
2625
  });
2578
2626
  return;
2579
2627
  }
2628
+ if (url4 === true) {
2629
+ payload.value = stripTabAndNewline2(trimmed);
2630
+ return;
2631
+ }
2580
2632
  if (def.hostname && !urlHostnameOk2(url4, def.hostname)) {
2581
2633
  payload.issues.push({
2582
2634
  code: "invalid_format",
@@ -2666,12 +2718,7 @@ var require_schemas = __commonJS({
2666
2718
  function isValidIPv62(value) {
2667
2719
  if (!ipv6Alphabet2.test(value))
2668
2720
  return false;
2669
- try {
2670
- new URL(`http://[${value}]`);
2671
- return true;
2672
- } catch {
2673
- return false;
2674
- }
2721
+ return canParseURL2(`http://[${value}]`);
2675
2722
  }
2676
2723
  exports.$ZodIPv6 = core.$constructor("$ZodIPv6", (inst, def) => {
2677
2724
  def.pattern ?? (def.pattern = regexes.ipv6);
@@ -4736,59 +4783,6 @@ var require_schemas = __commonJS({
4736
4783
  payload.issues.push(util.issue(_iss));
4737
4784
  }
4738
4785
  }
4739
- function handlePropertiesResult2(result, payload, key) {
4740
- if (result.issues.length) {
4741
- payload.issues.push(...util.prefixIssues(key, result.issues));
4742
- }
4743
- }
4744
- exports.$ZodProperties = core.$constructor("$ZodProperties", (inst, def) => {
4745
- exports.$ZodType.init(inst, def);
4746
- checks.$ZodCheck.init(inst, def);
4747
- const memo3 = core.globalConfig.memoizer;
4748
- memo3?.attach(inst);
4749
- let entries;
4750
- const runShape = (payload, ctx) => {
4751
- entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
4752
- const input2 = payload.value;
4753
- let proms;
4754
- for (const [key, schema] of entries) {
4755
- const result = schema._zod.run({ value: input2[key], issues: [] }, ctx);
4756
- if (result instanceof Promise) {
4757
- proms ?? (proms = []);
4758
- proms.push(result.then((result2) => handlePropertiesResult2(result2, payload, key)));
4759
- } else {
4760
- handlePropertiesResult2(result, payload, key);
4761
- }
4762
- }
4763
- if (proms)
4764
- return Promise.all(proms).then(() => void 0);
4765
- return void 0;
4766
- };
4767
- inst._zod.parse = (payload, ctx) => {
4768
- const input2 = payload.value;
4769
- if (input2 === null || typeof input2 !== "object" && typeof input2 !== "function") {
4770
- payload.issues.push({ expected: "object", code: "invalid_type", input: input2, inst });
4771
- return payload;
4772
- }
4773
- if (ctx.direction === "backward")
4774
- ctx = { ...ctx, direction: "forward" };
4775
- if (memo3)
4776
- memo3.alloc(inst, payload, input2, ctx);
4777
- const result = runShape(payload, ctx);
4778
- return result instanceof Promise ? result.then(() => payload) : payload;
4779
- };
4780
- inst._zod.check = (payload) => {
4781
- if (payload.value == null) {
4782
- payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
4783
- return void 0;
4784
- }
4785
- return runShape(payload, {});
4786
- };
4787
- }, {
4788
- *[Symbol.iterator]() {
4789
- yield this;
4790
- }
4791
- });
4792
4786
  (function() {
4793
4787
  var keys = Object.getOwnPropertyNames(exports);
4794
4788
  for (var i = 0; i < keys.length; i++) {
@@ -4855,7 +4849,7 @@ var require_memoizer = __commonJS({
4855
4849
  var STATE2 = "~memo";
4856
4850
  var NO_ISSUES2 = [];
4857
4851
  function isRef2(value) {
4858
- return value !== null && (typeof value === "object" || typeof value === "function");
4852
+ return value !== null && typeof value === "object";
4859
4853
  }
4860
4854
  function cloneIssues2(issues) {
4861
4855
  return issues.map((iss) => iss.path ? { ...iss, path: iss.path.slice() } : { ...iss });
@@ -4904,9 +4898,6 @@ var require_memoizer = __commonJS({
4904
4898
  check2(def.catchall);
4905
4899
  break;
4906
4900
  }
4907
- case "properties":
4908
- merge2(shape(def.shape, false));
4909
- break;
4910
4901
  case "array":
4911
4902
  check2(def.element);
4912
4903
  break;
@@ -5217,6 +5208,7 @@ var require_ar = __commonJS({
5217
5208
  json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",
5218
5209
  e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",
5219
5210
  credit_card: "\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",
5211
+ currency_code: "\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",
5220
5212
  iban: "IBAN",
5221
5213
  jwt: "JWT",
5222
5214
  template_literal: "\u0645\u062F\u062E\u0644"
@@ -5364,6 +5356,7 @@ var require_az = __commonJS({
5364
5356
  json_string: "JSON string",
5365
5357
  e164: "E.164 number",
5366
5358
  credit_card: "kredit kart\u0131 n\xF6mr\u0259si",
5359
+ currency_code: "valyuta kodu",
5367
5360
  iban: "IBAN",
5368
5361
  jwt: "JWT",
5369
5362
  template_literal: "input"
@@ -5560,6 +5553,7 @@ var require_be = __commonJS({
5560
5553
  json_string: "JSON \u0440\u0430\u0434\u043E\u043A",
5561
5554
  e164: "\u043D\u0443\u043C\u0430\u0440 E.164",
5562
5555
  credit_card: "\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",
5556
+ currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
5563
5557
  iban: "IBAN",
5564
5558
  jwt: "JWT",
5565
5559
  template_literal: "\u0443\u0432\u043E\u0434"
@@ -5714,6 +5708,7 @@ var require_bg = __commonJS({
5714
5708
  json_string: "JSON \u043D\u0438\u0437",
5715
5709
  e164: "E.164 \u043D\u043E\u043C\u0435\u0440",
5716
5710
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",
5711
+ currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
5717
5712
  iban: "IBAN",
5718
5713
  jwt: "JWT",
5719
5714
  template_literal: "\u0432\u0445\u043E\u0434"
@@ -5875,6 +5870,7 @@ var require_bn = __commonJS({
5875
5870
  json_string: "JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",
5876
5871
  e164: "E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",
5877
5872
  credit_card: "\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",
5873
+ currency_code: "\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",
5878
5874
  iban: "IBAN",
5879
5875
  jwt: "JWT",
5880
5876
  template_literal: "\u0987\u09A8\u09AA\u09C1\u099F"
@@ -6024,6 +6020,7 @@ var require_ca = __commonJS({
6024
6020
  json_string: "cadena JSON",
6025
6021
  e164: "n\xFAmero E.164",
6026
6022
  credit_card: "n\xFAmero de targeta de cr\xE8dit",
6023
+ currency_code: "codi de moneda",
6027
6024
  iban: "IBAN",
6028
6025
  jwt: "JWT",
6029
6026
  template_literal: "entrada"
@@ -6173,6 +6170,7 @@ var require_ckb = __commonJS({
6173
6170
  json_string: "\u062F\u06D5\u0642\u06CC JSON",
6174
6171
  e164: "\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",
6175
6172
  credit_card: "\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",
6173
+ currency_code: "\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",
6176
6174
  iban: "IBAN",
6177
6175
  jwt: "JWT",
6178
6176
  template_literal: "\u062A\u06CE\u06A9\u0631\u062F\u06D5"
@@ -6341,6 +6339,7 @@ var require_cs = __commonJS({
6341
6339
  json_string: "\u0159et\u011Bzec ve form\xE1tu JSON",
6342
6340
  e164: "\u010D\xEDslo E.164",
6343
6341
  credit_card: "\u010D\xEDslo kreditn\xED karty",
6342
+ currency_code: "k\xF3d m\u011Bny",
6344
6343
  iban: "IBAN",
6345
6344
  jwt: "JWT",
6346
6345
  template_literal: "vstup"
@@ -6493,6 +6492,7 @@ var require_da = __commonJS({
6493
6492
  json_string: "JSON-streng",
6494
6493
  e164: "E.164-nummer",
6495
6494
  credit_card: "kreditkortnummer",
6495
+ currency_code: "valutakode",
6496
6496
  iban: "IBAN",
6497
6497
  jwt: "JWT",
6498
6498
  template_literal: "input"
@@ -6649,6 +6649,7 @@ var require_de = __commonJS({
6649
6649
  json_string: "JSON-String",
6650
6650
  e164: "E.164-Nummer",
6651
6651
  credit_card: "Kreditkartennummer",
6652
+ currency_code: "W\xE4hrungscode",
6652
6653
  iban: "IBAN",
6653
6654
  jwt: "JWT",
6654
6655
  template_literal: "Eingabe"
@@ -6798,6 +6799,7 @@ var require_el = __commonJS({
6798
6799
  json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
6799
6800
  e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
6800
6801
  credit_card: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",
6802
+ currency_code: "\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",
6801
6803
  iban: "IBAN",
6802
6804
  jwt: "JWT",
6803
6805
  template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
@@ -6945,6 +6947,7 @@ var require_en = __commonJS({
6945
6947
  base64url: "base64url-encoded string",
6946
6948
  json_string: "JSON string",
6947
6949
  e164: "E.164 number",
6950
+ currency_code: "currency code",
6948
6951
  credit_card: "credit card number",
6949
6952
  iban: "IBAN",
6950
6953
  jwt: "JWT",
@@ -7106,6 +7109,7 @@ var require_eo = __commonJS({
7106
7109
  json_string: "JSON-karaktraro",
7107
7110
  e164: "E.164-nombro",
7108
7111
  credit_card: "kreditkarta numero",
7112
+ currency_code: "valuta kodo",
7109
7113
  iban: "IBAN",
7110
7114
  jwt: "JWT",
7111
7115
  template_literal: "enigo"
@@ -7255,6 +7259,7 @@ var require_es = __commonJS({
7255
7259
  json_string: "cadena JSON",
7256
7260
  e164: "n\xFAmero E.164",
7257
7261
  credit_card: "n\xFAmero de tarjeta de cr\xE9dito",
7262
+ currency_code: "c\xF3digo de moneda",
7258
7263
  iban: "IBAN",
7259
7264
  jwt: "JWT",
7260
7265
  template_literal: "entrada"
@@ -7428,6 +7433,7 @@ var require_fa = __commonJS({
7428
7433
  json_string: "JSON \u0631\u0634\u062A\u0647",
7429
7434
  e164: "E.164 \u0639\u062F\u062F",
7430
7435
  credit_card: "\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",
7436
+ currency_code: "\u06A9\u062F \u0627\u0631\u0632",
7431
7437
  iban: "IBAN",
7432
7438
  jwt: "JWT",
7433
7439
  template_literal: "\u0648\u0631\u0648\u062F\u06CC"
@@ -7587,6 +7593,7 @@ var require_fi = __commonJS({
7587
7593
  json_string: "JSON-merkkijono",
7588
7594
  e164: "E.164-luku",
7589
7595
  credit_card: "luottokortin numero",
7596
+ currency_code: "valuuttakoodi",
7590
7597
  iban: "IBAN",
7591
7598
  jwt: "JWT",
7592
7599
  template_literal: "templaattimerkkijono"
@@ -7735,6 +7742,7 @@ var require_fr = __commonJS({
7735
7742
  json_string: "cha\xEEne de caract\xE8res JSON",
7736
7743
  e164: "num\xE9ro au format E.164",
7737
7744
  credit_card: "num\xE9ro de carte de cr\xE9dit",
7745
+ currency_code: "code de devise",
7738
7746
  iban: "IBAN",
7739
7747
  jwt: "JWT",
7740
7748
  template_literal: "entr\xE9e"
@@ -7901,6 +7909,7 @@ var require_fr_CA = __commonJS({
7901
7909
  json_string: "cha\xEEne JSON",
7902
7910
  e164: "num\xE9ro E.164",
7903
7911
  credit_card: "num\xE9ro de carte de cr\xE9dit",
7912
+ currency_code: "code de devise",
7904
7913
  iban: "IBAN",
7905
7914
  jwt: "JWT",
7906
7915
  template_literal: "entr\xE9e"
@@ -8049,6 +8058,7 @@ var require_gu = __commonJS({
8049
8058
  json_string: "JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",
8050
8059
  e164: "E.164 \u0AA8\u0A82\u0AAC\u0AB0",
8051
8060
  credit_card: "\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",
8061
+ currency_code: "\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",
8052
8062
  iban: "IBAN",
8053
8063
  jwt: "JWT",
8054
8064
  template_literal: "\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"
@@ -8234,6 +8244,7 @@ var require_he = __commonJS({
8234
8244
  json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
8235
8245
  e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
8236
8246
  credit_card: { label: "\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9", gender: "m" },
8247
+ currency_code: { label: "\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2", gender: "m" },
8237
8248
  iban: { label: "IBAN", gender: "m" },
8238
8249
  jwt: { label: "JWT", gender: "m" },
8239
8250
  template_literal: { label: "\u05E7\u05DC\u05D8", gender: "m" },
@@ -8435,6 +8446,7 @@ var require_hi = __commonJS({
8435
8446
  json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",
8436
8447
  e164: "E.164 \u0938\u0902\u0916\u094D\u092F\u093E",
8437
8448
  credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",
8449
+ currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
8438
8450
  iban: "IBAN",
8439
8451
  jwt: "JWT",
8440
8452
  template_literal: "\u0907\u0928\u092A\u0941\u091F"
@@ -8581,6 +8593,7 @@ var require_hr = __commonJS({
8581
8593
  json_string: "JSON tekst",
8582
8594
  e164: "E.164 broj",
8583
8595
  credit_card: "broj kreditne kartice",
8596
+ currency_code: "kod valute",
8584
8597
  iban: "IBAN",
8585
8598
  jwt: "JWT",
8586
8599
  template_literal: "unos"
@@ -8744,6 +8757,7 @@ var require_hu = __commonJS({
8744
8757
  json_string: "JSON string",
8745
8758
  e164: "E.164 sz\xE1m",
8746
8759
  credit_card: "hitelk\xE1rtyasz\xE1m",
8760
+ currency_code: "p\xE9nznemk\xF3d",
8747
8761
  iban: "IBAN",
8748
8762
  jwt: "JWT",
8749
8763
  template_literal: "bemenet"
@@ -8933,6 +8947,7 @@ var require_hy = __commonJS({
8933
8947
  json_string: "JSON \u057F\u0578\u0572",
8934
8948
  e164: "E.164 \u0570\u0561\u0574\u0561\u0580",
8935
8949
  credit_card: "\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",
8950
+ currency_code: "\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",
8936
8951
  iban: "IBAN",
8937
8952
  jwt: "JWT",
8938
8953
  template_literal: "\u0574\u0578\u0582\u057F\u0584"
@@ -9087,6 +9102,7 @@ var require_id = __commonJS({
9087
9102
  json_string: "string JSON",
9088
9103
  e164: "angka E.164",
9089
9104
  credit_card: "nomor kartu kredit",
9105
+ currency_code: "kode mata uang",
9090
9106
  iban: "IBAN",
9091
9107
  jwt: "JWT",
9092
9108
  template_literal: "input"
@@ -9234,6 +9250,7 @@ var require_is = __commonJS({
9234
9250
  json_string: "JSON strengur",
9235
9251
  e164: "E.164 t\xF6lugildi",
9236
9252
  credit_card: "kreditkortan\xFAmer",
9253
+ currency_code: "gjaldmi\xF0ilsk\xF3\xF0i",
9237
9254
  iban: "IBAN",
9238
9255
  jwt: "JWT",
9239
9256
  template_literal: "gildi"
@@ -9384,6 +9401,7 @@ var require_it = __commonJS({
9384
9401
  json_string: "stringa JSON",
9385
9402
  e164: "numero E.164",
9386
9403
  credit_card: "numero di carta di credito",
9404
+ currency_code: "codice valuta",
9387
9405
  iban: "IBAN",
9388
9406
  jwt: "JWT",
9389
9407
  template_literal: "input"
@@ -9533,6 +9551,7 @@ var require_ja = __commonJS({
9533
9551
  json_string: "JSON\u6587\u5B57\u5217",
9534
9552
  e164: "E.164\u756A\u53F7",
9535
9553
  credit_card: "\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",
9554
+ currency_code: "\u901A\u8CA8\u30B3\u30FC\u30C9",
9536
9555
  iban: "IBAN",
9537
9556
  jwt: "JWT",
9538
9557
  template_literal: "\u5165\u529B\u5024"
@@ -9681,6 +9700,7 @@ var require_ka = __commonJS({
9681
9700
  json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
9682
9701
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
9683
9702
  credit_card: "\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
9703
+ currency_code: "\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",
9684
9704
  iban: "IBAN",
9685
9705
  jwt: "JWT",
9686
9706
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -9834,6 +9854,7 @@ var require_km = __commonJS({
9834
9854
  json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",
9835
9855
  e164: "\u179B\u17C1\u1781 E.164",
9836
9856
  credit_card: "\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",
9857
+ currency_code: "\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",
9837
9858
  iban: "IBAN",
9838
9859
  jwt: "JWT",
9839
9860
  template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"
@@ -10002,6 +10023,7 @@ var require_kn = __commonJS({
10002
10023
  json_string: "JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",
10003
10024
  e164: "E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
10004
10025
  credit_card: "\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
10026
+ currency_code: "\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",
10005
10027
  iban: "IBAN",
10006
10028
  jwt: "JWT",
10007
10029
  template_literal: "\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"
@@ -10153,6 +10175,7 @@ var require_ko = __commonJS({
10153
10175
  json_string: "JSON \uBB38\uC790\uC5F4",
10154
10176
  e164: "E.164 \uBC88\uD638",
10155
10177
  credit_card: "\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",
10178
+ currency_code: "\uD1B5\uD654 \uCF54\uB4DC",
10156
10179
  iban: "IBAN",
10157
10180
  jwt: "JWT",
10158
10181
  template_literal: "\uC785\uB825"
@@ -10387,6 +10410,7 @@ var require_lt = __commonJS({
10387
10410
  json_string: "JSON eilut\u0117",
10388
10411
  e164: "E.164 numeris",
10389
10412
  credit_card: "kredito kortel\u0117s numeris",
10413
+ currency_code: "valiutos kodas",
10390
10414
  iban: "IBAN",
10391
10415
  jwt: "JWT",
10392
10416
  template_literal: "\u012Fvestis"
@@ -10548,6 +10572,7 @@ var require_mk = __commonJS({
10548
10572
  json_string: "JSON \u043D\u0438\u0437\u0430",
10549
10573
  e164: "E.164 \u0431\u0440\u043E\u0458",
10550
10574
  credit_card: "\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",
10575
+ currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
10551
10576
  iban: "IBAN",
10552
10577
  jwt: "JWT",
10553
10578
  template_literal: "\u0432\u043D\u0435\u0441"
@@ -10698,6 +10723,7 @@ var require_ms = __commonJS({
10698
10723
  json_string: "string JSON",
10699
10724
  e164: "nombor E.164",
10700
10725
  credit_card: "nombor kad kredit",
10726
+ currency_code: "kod mata wang",
10701
10727
  iban: "IBAN",
10702
10728
  jwt: "JWT",
10703
10729
  template_literal: "input"
@@ -10846,6 +10872,7 @@ var require_ne = __commonJS({
10846
10872
  json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",
10847
10873
  e164: "E.164 \u0928\u092E\u094D\u092C\u0930",
10848
10874
  credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",
10875
+ currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
10849
10876
  iban: "IBAN",
10850
10877
  jwt: "JWT",
10851
10878
  template_literal: "\u0907\u0928\u092A\u0941\u091F"
@@ -10993,6 +11020,7 @@ var require_nl = __commonJS({
10993
11020
  json_string: "JSON string",
10994
11021
  e164: "E.164-nummer",
10995
11022
  credit_card: "creditcardnummer",
11023
+ currency_code: "valutacode",
10996
11024
  iban: "IBAN",
10997
11025
  jwt: "JWT",
10998
11026
  template_literal: "invoer"
@@ -11144,6 +11172,7 @@ var require_nn = __commonJS({
11144
11172
  json_string: "JSON-streng",
11145
11173
  e164: "E.164-nummer",
11146
11174
  credit_card: "kredittkortnummer",
11175
+ currency_code: "valutakode",
11147
11176
  iban: "IBAN",
11148
11177
  jwt: "JWT",
11149
11178
  template_literal: "input"
@@ -11293,6 +11322,7 @@ var require_no = __commonJS({
11293
11322
  json_string: "JSON-streng",
11294
11323
  e164: "E.164-nummer",
11295
11324
  credit_card: "kredittkortnummer",
11325
+ currency_code: "valutakode",
11296
11326
  iban: "IBAN",
11297
11327
  jwt: "JWT",
11298
11328
  template_literal: "input"
@@ -11442,6 +11472,7 @@ var require_ota = __commonJS({
11442
11472
  json_string: "JSON metin",
11443
11473
  e164: "E.164 say\u0131s\u0131",
11444
11474
  credit_card: "i'tib\xE2r kart\u0131 numaras\u0131",
11475
+ currency_code: "para birimi kodu",
11445
11476
  iban: "IBAN",
11446
11477
  jwt: "JWT",
11447
11478
  template_literal: "giren"
@@ -11592,6 +11623,7 @@ var require_ps = __commonJS({
11592
11623
  json_string: "JSON \u0645\u062A\u0646",
11593
11624
  e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",
11594
11625
  credit_card: "\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",
11626
+ currency_code: "\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",
11595
11627
  iban: "IBAN",
11596
11628
  jwt: "JWT",
11597
11629
  template_literal: "\u0648\u0631\u0648\u062F\u064A"
@@ -11747,6 +11779,7 @@ var require_pl = __commonJS({
11747
11779
  json_string: "ci\u0105g znak\xF3w w formacie JSON",
11748
11780
  e164: "liczba E.164",
11749
11781
  credit_card: "numer karty kredytowej",
11782
+ currency_code: "kod waluty",
11750
11783
  iban: "IBAN",
11751
11784
  jwt: "JWT",
11752
11785
  template_literal: "wej\u015Bcie"
@@ -11897,6 +11930,7 @@ var require_pt = __commonJS({
11897
11930
  json_string: "o texto JSON",
11898
11931
  e164: "o n\xFAmero E.164",
11899
11932
  credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
11933
+ currency_code: "o c\xF3digo de moeda",
11900
11934
  iban: "o IBAN",
11901
11935
  jwt: "o JWT",
11902
11936
  template_literal: "a entrada"
@@ -12076,6 +12110,7 @@ var require_pt_BR = __commonJS({
12076
12110
  json_string: "o texto JSON",
12077
12111
  e164: "o n\xFAmero E.164",
12078
12112
  credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
12113
+ currency_code: "o c\xF3digo de moeda",
12079
12114
  iban: "o IBAN",
12080
12115
  jwt: "o JWT",
12081
12116
  template_literal: "a entrada"
@@ -12256,6 +12291,7 @@ var require_ro = __commonJS({
12256
12291
  json_string: "\u0219ir JSON",
12257
12292
  e164: "num\u0103r E.164",
12258
12293
  credit_card: "num\u0103r de card de credit",
12294
+ currency_code: "cod valutar",
12259
12295
  iban: "IBAN",
12260
12296
  jwt: "JWT",
12261
12297
  template_literal: "intrare"
@@ -12464,6 +12500,7 @@ var require_ru = __commonJS({
12464
12500
  json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430",
12465
12501
  e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
12466
12502
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",
12503
+ currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
12467
12504
  iban: "IBAN",
12468
12505
  jwt: "JWT",
12469
12506
  template_literal: "\u0432\u0432\u043E\u0434"
@@ -12618,6 +12655,7 @@ var require_sk = __commonJS({
12618
12655
  json_string: "re\u0165azec vo form\xE1te JSON",
12619
12656
  e164: "\u010D\xEDslo E.164",
12620
12657
  credit_card: "\u010D\xEDslo kreditnej karty",
12658
+ currency_code: "k\xF3d meny",
12621
12659
  iban: "IBAN",
12622
12660
  jwt: "JWT",
12623
12661
  template_literal: "vstup"
@@ -12770,6 +12808,7 @@ var require_sl = __commonJS({
12770
12808
  json_string: "JSON niz",
12771
12809
  e164: "E.164 \u0161tevilka",
12772
12810
  credit_card: "\u0161tevilka kreditne kartice",
12811
+ currency_code: "koda valute",
12773
12812
  iban: "IBAN",
12774
12813
  jwt: "JWT",
12775
12814
  template_literal: "vnos"
@@ -12920,6 +12959,7 @@ var require_sv = __commonJS({
12920
12959
  json_string: "JSON-str\xE4ng",
12921
12960
  e164: "E.164-nummer",
12922
12961
  credit_card: "kreditkortsnummer",
12962
+ currency_code: "valutakod",
12923
12963
  iban: "IBAN",
12924
12964
  jwt: "JWT",
12925
12965
  template_literal: "mall-literal"
@@ -13071,6 +13111,7 @@ var require_ta = __commonJS({
13071
13111
  json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD",
13072
13112
  e164: "E.164 \u0B8E\u0BA3\u0BCD",
13073
13113
  credit_card: "\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",
13114
+ currency_code: "\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",
13074
13115
  iban: "IBAN",
13075
13116
  jwt: "JWT",
13076
13117
  template_literal: "input"
@@ -13222,6 +13263,7 @@ var require_tg = __commonJS({
13222
13263
  json_string: "\u0441\u0430\u0442\u0440\u0438 JSON",
13223
13264
  e164: "\u0440\u0430\u049B\u0430\u043C\u0438 E.164",
13224
13265
  credit_card: "\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",
13266
+ currency_code: "\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",
13225
13267
  iban: "IBAN",
13226
13268
  jwt: "JWT",
13227
13269
  template_literal: "\u0432\u0443\u0440\u0443\u0434"
@@ -13374,6 +13416,7 @@ var require_th = __commonJS({
13374
13416
  json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
13375
13417
  e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
13376
13418
  credit_card: "\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",
13419
+ currency_code: "\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",
13377
13420
  iban: "IBAN",
13378
13421
  jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
13379
13422
  template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
@@ -13525,6 +13568,7 @@ var require_tk = __commonJS({
13525
13568
  json_string: "JSON setiri",
13526
13569
  e164: "E.164 nomeri",
13527
13570
  credit_card: "kredit kartyny\u0148 nomeri",
13571
+ currency_code: "wal\xFDuta kody",
13528
13572
  iban: "IBAN",
13529
13573
  jwt: "JWT",
13530
13574
  template_literal: "\u015Fablon"
@@ -13668,6 +13712,7 @@ var require_tr = __commonJS({
13668
13712
  json_string: "JSON dizesi",
13669
13713
  e164: "E.164 say\u0131s\u0131",
13670
13714
  credit_card: "kredi kart\u0131 numaras\u0131",
13715
+ currency_code: "para birimi kodu",
13671
13716
  iban: "IBAN",
13672
13717
  jwt: "JWT",
13673
13718
  template_literal: "\u015Eablon dizesi"
@@ -13814,6 +13859,7 @@ var require_uk = __commonJS({
13814
13859
  json_string: "\u0440\u044F\u0434\u043E\u043A JSON",
13815
13860
  e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
13816
13861
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",
13862
+ currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",
13817
13863
  iban: "IBAN",
13818
13864
  jwt: "JWT",
13819
13865
  template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"
@@ -13980,6 +14026,7 @@ var require_ur = __commonJS({
13980
14026
  json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",
13981
14027
  e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631",
13982
14028
  credit_card: "\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",
14029
+ currency_code: "\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",
13983
14030
  iban: "IBAN",
13984
14031
  jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",
13985
14032
  template_literal: "\u0627\u0646 \u067E\u0679"
@@ -14131,6 +14178,7 @@ var require_uz = __commonJS({
14131
14178
  json_string: "JSON satr",
14132
14179
  e164: "E.164 raqam",
14133
14180
  credit_card: "kredit karta raqami",
14181
+ currency_code: "valyuta kodi",
14134
14182
  iban: "IBAN",
14135
14183
  jwt: "JWT",
14136
14184
  template_literal: "kirish"
@@ -14280,6 +14328,7 @@ var require_vi = __commonJS({
14280
14328
  json_string: "chu\u1ED7i JSON",
14281
14329
  e164: "s\u1ED1 E.164",
14282
14330
  credit_card: "s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",
14331
+ currency_code: "m\xE3 ti\u1EC1n t\u1EC7",
14283
14332
  iban: "IBAN",
14284
14333
  jwt: "JWT",
14285
14334
  template_literal: "\u0111\u1EA7u v\xE0o"
@@ -14429,6 +14478,7 @@ var require_zh_CN = __commonJS({
14429
14478
  json_string: "JSON\u5B57\u7B26\u4E32",
14430
14479
  e164: "E.164\u53F7\u7801",
14431
14480
  credit_card: "\u4FE1\u7528\u5361\u53F7",
14481
+ currency_code: "\u8D27\u5E01\u4EE3\u7801",
14432
14482
  iban: "IBAN",
14433
14483
  jwt: "JWT",
14434
14484
  template_literal: "\u8F93\u5165"
@@ -14579,6 +14629,7 @@ var require_zh_TW = __commonJS({
14579
14629
  json_string: "JSON \u5B57\u4E32",
14580
14630
  e164: "E.164 \u6578\u503C",
14581
14631
  credit_card: "\u4FE1\u7528\u5361\u865F",
14632
+ currency_code: "\u8CA8\u5E63\u4EE3\u78BC",
14582
14633
  iban: "IBAN",
14583
14634
  jwt: "JWT",
14584
14635
  template_literal: "\u8F38\u5165"
@@ -14727,6 +14778,7 @@ var require_yo = __commonJS({
14727
14778
  json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON",
14728
14779
  e164: "n\u1ECD\u0301mb\xE0 E.164",
14729
14780
  credit_card: "n\u1ECDmba kaadi gbese",
14781
+ currency_code: "koodu ow\xF3",
14730
14782
  iban: "IBAN",
14731
14783
  jwt: "JWT",
14732
14784
  template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"
@@ -15457,7 +15509,7 @@ ${code}
15457
15509
  generatePropertyCheck2(doc, ctx, def, currentAccessor);
15458
15510
  break;
15459
15511
  case "properties":
15460
- generatePropertiesChecks2(doc, ctx, def, currentAccessor, false);
15512
+ generatePropertiesChecks2(doc, ctx, def, currentAccessor);
15461
15513
  break;
15462
15514
  case "overwrite": {
15463
15515
  const newAccessor = newVar2(ctx);
@@ -15567,11 +15619,11 @@ ${code}
15567
15619
  doc.write(`if (!${mimeSet}.has(${accessor}.type)) return INVALID;`);
15568
15620
  }
15569
15621
  }
15570
- function generatePropertiesChecks2(doc, ctx, def, accessor, schemaRole) {
15622
+ function generatePropertiesChecks2(doc, ctx, def, accessor) {
15571
15623
  if (def.when) {
15572
15624
  throw new ZodCompileUnsupportedError2(`check with a custom "when" condition`);
15573
15625
  }
15574
- doc.write(schemaRole ? `if (${accessor} === null || (typeof ${accessor} !== "object" && typeof ${accessor} !== "function")) return INVALID;` : `if (${accessor} == null) return INVALID;`);
15626
+ doc.write(`if (${accessor} == null) return INVALID;`);
15575
15627
  const shape = def.shape;
15576
15628
  for (const key of Reflect.ownKeys(shape)) {
15577
15629
  const keyExpr = typeof key === "symbol" ? addConstant2(ctx, key) : util.esc(key);
@@ -15661,7 +15713,7 @@ ${code}
15661
15713
  "uuid",
15662
15714
  "xid"
15663
15715
  ]);
15664
- function generateStringFormatCheck2(doc, ctx, def, accessor) {
15716
+ function generateStringFormatCheck2(doc, ctx, def, accessor, needsValue = true) {
15665
15717
  const fmt = def.format;
15666
15718
  if (fmt === "base64") {
15667
15719
  const validator = addConstant2(ctx, schemas_js_1.isValidBase64);
@@ -15701,7 +15753,7 @@ ${code}
15701
15753
  }
15702
15754
  const formatDef = def;
15703
15755
  if (fmt === "url" || fmt === "httpurl" || formatDef.normalize || formatDef.hostname !== void 0 || formatDef.protocol !== void 0) {
15704
- const parseConst = addConstant2(ctx, schemas_js_1.parseURLObject);
15756
+ const parseConst = addConstant2(ctx, schemas_js_1.validateURL);
15705
15757
  const defConst = addConstant2(ctx, def);
15706
15758
  const trimVar = newVar2(ctx);
15707
15759
  const urlVar = newVar2(ctx);
@@ -15716,6 +15768,8 @@ ${code}
15716
15768
  const protocolConst = addConstant2(ctx, schemas_js_1.urlProtocolOk);
15717
15769
  doc.write(`if (!${protocolConst}(${urlVar}, ${defConst}.protocol)) return INVALID;`);
15718
15770
  }
15771
+ if (!needsValue)
15772
+ return null;
15719
15773
  const outputVar = newVar2(ctx);
15720
15774
  const outputExpr = formatDef.normalize ? `${urlVar}.href` : `${addConstant2(ctx, schemas_js_1.stripTabAndNewline)}(${trimVar})`;
15721
15775
  doc.write(`const ${outputVar} = ${outputExpr};`);
@@ -15775,7 +15829,7 @@ ${code}
15775
15829
  let typeAccessor;
15776
15830
  switch (type) {
15777
15831
  case "string":
15778
- typeAccessor = generateStringCheck2(doc, ctx, schema, accessor);
15832
+ typeAccessor = generateStringCheck2(doc, ctx, schema, accessor, buildsValue);
15779
15833
  break;
15780
15834
  case "number":
15781
15835
  typeAccessor = generateNumberCheck2(doc, schema, accessor);
@@ -15881,10 +15935,6 @@ ${code}
15881
15935
  case "custom":
15882
15936
  typeAccessor = generateCustomCheck2(doc, ctx, schema, accessor);
15883
15937
  break;
15884
- case "properties":
15885
- generatePropertiesChecks2(doc, ctx, schema._zod.def, accessor, true);
15886
- typeAccessor = accessor;
15887
- break;
15888
15938
  case "transform":
15889
15939
  typeAccessor = generateTransformCheck2(doc, ctx, schema, accessor);
15890
15940
  break;
@@ -15900,12 +15950,12 @@ ${code}
15900
15950
  return null;
15901
15951
  return generateChecks2(doc, ctx, schema, typeAccessor);
15902
15952
  }
15903
- function generateStringCheck2(doc, ctx, schema, accessor) {
15953
+ function generateStringCheck2(doc, ctx, schema, accessor, needsValue = true) {
15904
15954
  doc.write(`if (typeof ${accessor} !== "string") return INVALID;`);
15905
15955
  const def = schema._zod.def;
15906
15956
  if (def.format === void 0)
15907
15957
  return accessor;
15908
- return generateStringFormatCheck2(doc, ctx, def, accessor);
15958
+ return generateStringFormatCheck2(doc, ctx, def, accessor, needsValue);
15909
15959
  }
15910
15960
  function generateNumberCheck2(doc, schema, accessor) {
15911
15961
  doc.write(`if (typeof ${accessor} !== "number" || !Number.isFinite(${accessor})) return INVALID;`);
@@ -16982,20 +17032,18 @@ var require_api = __commonJS({
16982
17032
  var registries = __importStar(require_registries());
16983
17033
  var schemas = __importStar(require_schemas());
16984
17034
  var util = __importStar(require_util());
17035
+ function snapshotChecks2(def) {
17036
+ if (def.checks)
17037
+ def.checks = [...def.checks];
17038
+ return def;
17039
+ }
16985
17040
  // @__NO_SIDE_EFFECTS__
16986
17041
  function _string2(Class2, params) {
16987
- return new Class2({
16988
- type: "string",
16989
- ...util.normalizeParams(params)
16990
- });
17042
+ return new Class2(snapshotChecks2({ type: "string", ...util.normalizeParams(params) }));
16991
17043
  }
16992
17044
  // @__NO_SIDE_EFFECTS__
16993
17045
  function _coercedString2(Class2, params) {
16994
- return new Class2({
16995
- type: "string",
16996
- coerce: true,
16997
- ...util.normalizeParams(params)
16998
- });
17046
+ return new Class2(snapshotChecks2({ type: "string", coerce: true, ...util.normalizeParams(params) }));
16999
17047
  }
17000
17048
  // @__NO_SIDE_EFFECTS__
17001
17049
  function _email2(Class2, params) {
@@ -17299,20 +17347,11 @@ var require_api = __commonJS({
17299
17347
  }
17300
17348
  // @__NO_SIDE_EFFECTS__
17301
17349
  function _number2(Class2, params) {
17302
- return new Class2({
17303
- type: "number",
17304
- checks: [],
17305
- ...util.normalizeParams(params)
17306
- });
17350
+ return new Class2(snapshotChecks2({ type: "number", checks: [], ...util.normalizeParams(params) }));
17307
17351
  }
17308
17352
  // @__NO_SIDE_EFFECTS__
17309
17353
  function _coercedNumber2(Class2, params) {
17310
- return new Class2({
17311
- type: "number",
17312
- coerce: true,
17313
- checks: [],
17314
- ...util.normalizeParams(params)
17315
- });
17354
+ return new Class2(snapshotChecks2({ type: "number", coerce: true, checks: [], ...util.normalizeParams(params) }));
17316
17355
  }
17317
17356
  // @__NO_SIDE_EFFECTS__
17318
17357
  function _int2(Class2, params) {
@@ -17654,9 +17693,8 @@ var require_api = __commonJS({
17654
17693
  });
17655
17694
  }
17656
17695
  // @__NO_SIDE_EFFECTS__
17657
- function _properties2(Class2, shape, params) {
17658
- return new Class2({
17659
- type: "properties",
17696
+ function _properties2(shape, params) {
17697
+ return new checks.$ZodCheckProperties({
17660
17698
  check: "properties",
17661
17699
  shape,
17662
17700
  ...util.normalizeParams(params)
@@ -18084,7 +18122,6 @@ var require_to_json_schema = __commonJS({
18084
18122
  exports.process = processSchema2;
18085
18123
  exports.extractDefs = extractDefs2;
18086
18124
  exports.finalize = finalize2;
18087
- exports.isTransforming = isTransforming2;
18088
18125
  var registries_js_1 = require_registries();
18089
18126
  var util_js_1 = require_util();
18090
18127
  function assignProps2(target, ...sources) {
@@ -18325,11 +18362,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18325
18362
  }
18326
18363
  objects.push(member);
18327
18364
  }
18328
- const properties2 = {};
18365
+ const properties = {};
18329
18366
  const required2 = /* @__PURE__ */ new Set();
18330
18367
  for (const object4 of objects) {
18331
18368
  for (const key in object4.properties) {
18332
- if (Object.prototype.hasOwnProperty.call(properties2, key))
18369
+ if (Object.prototype.hasOwnProperty.call(properties, key))
18333
18370
  continue;
18334
18371
  const parts = [];
18335
18372
  for (const other of objects) {
@@ -18340,12 +18377,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18340
18377
  parts.push(part);
18341
18378
  }
18342
18379
  const merged = parts.length === 1 ? parts[0] : foldObjects2(parts) ?? { allOf: parts };
18343
- (0, util_js_1.assignProp)(properties2, key, merged);
18380
+ (0, util_js_1.assignProp)(properties, key, merged);
18344
18381
  }
18345
18382
  for (const key of object4.required ?? [])
18346
18383
  required2.add(key);
18347
18384
  }
18348
- const folded = { type: "object", properties: properties2 };
18385
+ const folded = { type: "object", properties };
18349
18386
  if (required2.size)
18350
18387
  folded.required = [...required2];
18351
18388
  if (objects.every((object4) => object4.additionalProperties === false)) {
@@ -18668,7 +18705,7 @@ var require_json_schema_processors = __commonJS({
18668
18705
  return result;
18669
18706
  };
18670
18707
  Object.defineProperty(exports, "__esModule", { value: true });
18671
- exports.allProcessors = exports.lazyProcessor = exports.optionalProcessor = exports.promiseProcessor = exports.readonlyProcessor = exports.pipeProcessor = exports.catchProcessor = exports.prefaultProcessor = exports.defaultProcessor = exports.nonoptionalProcessor = exports.nullableProcessor = exports.recordProcessor = exports.tupleProcessor = exports.intersectionProcessor = exports.unionProcessor = exports.propertiesProcessor = exports.objectProcessor = exports.arrayProcessor = exports.setProcessor = exports.mapProcessor = exports.transformProcessor = exports.functionProcessor = exports.customProcessor = exports.successProcessor = exports.fileProcessor = exports.templateLiteralProcessor = exports.nanProcessor = exports.literalProcessor = exports.enumProcessor = exports.dateProcessor = exports.unknownProcessor = exports.anyProcessor = exports.neverProcessor = exports.voidProcessor = exports.undefinedProcessor = exports.nullProcessor = exports.symbolProcessor = exports.bigintProcessor = exports.booleanProcessor = exports.numberProcessor = exports.stringProcessor = void 0;
18708
+ exports.allProcessors = exports.lazyProcessor = exports.optionalProcessor = exports.promiseProcessor = exports.readonlyProcessor = exports.pipeProcessor = exports.catchProcessor = exports.prefaultProcessor = exports.defaultProcessor = exports.nonoptionalProcessor = exports.nullableProcessor = exports.recordProcessor = exports.tupleProcessor = exports.intersectionProcessor = exports.unionProcessor = exports.objectProcessor = exports.arrayProcessor = exports.setProcessor = exports.mapProcessor = exports.transformProcessor = exports.functionProcessor = exports.customProcessor = exports.successProcessor = exports.fileProcessor = exports.templateLiteralProcessor = exports.nanProcessor = exports.literalProcessor = exports.enumProcessor = exports.dateProcessor = exports.unknownProcessor = exports.anyProcessor = exports.neverProcessor = exports.voidProcessor = exports.undefinedProcessor = exports.nullProcessor = exports.symbolProcessor = exports.bigintProcessor = exports.booleanProcessor = exports.numberProcessor = exports.stringProcessor = void 0;
18672
18709
  exports.aggregateChecks = aggregateChecks2;
18673
18710
  exports.toJSONSchema = toJSONSchema3;
18674
18711
  var regexes = __importStar(require_regexes());
@@ -19049,17 +19086,15 @@ var require_json_schema_processors = __commonJS({
19049
19086
  path: [...params.path, "properties", key]
19050
19087
  }));
19051
19088
  }
19052
- const allKeys = new Set(Object.keys(shape));
19053
- const requiredKeys = new Set([...allKeys].filter((key) => {
19089
+ const requiredKeys = [];
19090
+ for (const key of Object.keys(shape)) {
19054
19091
  const field = def.shape[key];
19055
- if (ctx.io === "input") {
19056
- return inputOptin2(field) === void 0;
19057
- } else {
19058
- return field._zod.optout === void 0;
19092
+ if (ctx.io === "input" ? inputOptin2(field) === void 0 : field._zod.optout === void 0) {
19093
+ requiredKeys.push(key);
19059
19094
  }
19060
- }));
19061
- if (requiredKeys.size > 0) {
19062
- json2.required = Array.from(requiredKeys);
19095
+ }
19096
+ if (requiredKeys.length > 0) {
19097
+ json2.required = requiredKeys;
19063
19098
  }
19064
19099
  if (def.catchall?._zod.def.type === "never") {
19065
19100
  json2.additionalProperties = false;
@@ -19074,32 +19109,6 @@ var require_json_schema_processors = __commonJS({
19074
19109
  }
19075
19110
  };
19076
19111
  exports.objectProcessor = objectProcessor2;
19077
- var propertiesProcessor2 = (schema, ctx, _json, params) => {
19078
- const json2 = _json;
19079
- const def = schema._zod.def;
19080
- if (Object.getOwnPropertySymbols(def.shape).length && (0, to_json_schema_js_1.handleUnrepresentable)(schema, ctx, json2, params, "Symbol keys cannot be represented in JSON Schema")) {
19081
- return;
19082
- }
19083
- if (ctx.io === "output") {
19084
- for (const key in def.shape) {
19085
- if ((0, to_json_schema_js_1.isTransforming)(def.shape[key]) && (0, to_json_schema_js_1.handleUnrepresentable)(schema, ctx, json2, params, `z.properties() returns its input, so the output of a transforming schema at key "${key}" cannot be represented in JSON Schema`)) {
19086
- return;
19087
- }
19088
- }
19089
- }
19090
- json2.type = "object";
19091
- json2.properties = {};
19092
- for (const key in def.shape) {
19093
- (0, util_js_1.assignProp)(json2.properties, key, (0, to_json_schema_js_1.processSchema)(def.shape[key], ctx, {
19094
- ...params,
19095
- path: [...params.path, "properties", key]
19096
- }));
19097
- }
19098
- const required2 = Object.keys(def.shape).filter((key) => inputOptin2(def.shape[key]) === void 0);
19099
- if (required2.length > 0)
19100
- json2.required = required2;
19101
- };
19102
- exports.propertiesProcessor = propertiesProcessor2;
19103
19112
  var unionProcessor2 = (schema, ctx, json2, params) => {
19104
19113
  const def = schema._zod.def;
19105
19114
  const isExclusive = def.inclusive === false;
@@ -19433,7 +19442,6 @@ var require_json_schema_processors = __commonJS({
19433
19442
  file: exports.fileProcessor,
19434
19443
  success: exports.successProcessor,
19435
19444
  custom: exports.customProcessor,
19436
- properties: exports.propertiesProcessor,
19437
19445
  function: exports.functionProcessor,
19438
19446
  transform: exports.transformProcessor,
19439
19447
  map: exports.mapProcessor,
@@ -19724,7 +19732,7 @@ var require_checks2 = __commonJS({
19724
19732
  "node_modules/zod/v4/classic/checks.cjs"(exports) {
19725
19733
  "use strict";
19726
19734
  Object.defineProperty(exports, "__esModule", { value: true });
19727
- exports.slugify = exports.toUpperCase = exports.toLowerCase = exports.trim = exports.normalize = exports.overwrite = exports.mime = exports.property = exports.endsWith = exports.startsWith = exports.includes = exports.uppercase = exports.lowercase = exports.regex = exports.length = exports.minLength = exports.maxLength = exports.size = exports.minSize = exports.maxSize = exports.multipleOf = exports.nonnegative = exports.nonpositive = exports.negative = exports.positive = exports.gte = exports.gt = exports.lte = exports.lt = void 0;
19735
+ exports.slugify = exports.toUpperCase = exports.toLowerCase = exports.trim = exports.normalize = exports.overwrite = exports.mime = exports.properties = exports.property = exports.endsWith = exports.startsWith = exports.includes = exports.uppercase = exports.lowercase = exports.regex = exports.length = exports.minLength = exports.maxLength = exports.size = exports.minSize = exports.maxSize = exports.multipleOf = exports.nonnegative = exports.nonpositive = exports.negative = exports.positive = exports.gte = exports.gt = exports.lte = exports.lt = void 0;
19728
19736
  var index_js_1 = require_core2();
19729
19737
  Object.defineProperty(exports, "lt", { enumerable: true, get: function() {
19730
19738
  return index_js_1._lt;
@@ -19792,6 +19800,9 @@ var require_checks2 = __commonJS({
19792
19800
  Object.defineProperty(exports, "property", { enumerable: true, get: function() {
19793
19801
  return index_js_1._property;
19794
19802
  } });
19803
+ Object.defineProperty(exports, "properties", { enumerable: true, get: function() {
19804
+ return index_js_1._properties;
19805
+ } });
19795
19806
  Object.defineProperty(exports, "mime", { enumerable: true, get: function() {
19796
19807
  return index_js_1._mime;
19797
19808
  } });
@@ -20040,7 +20051,7 @@ var require_schemas2 = __commonJS({
20040
20051
  };
20041
20052
  Object.defineProperty(exports, "__esModule", { value: true });
20042
20053
  exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodXor = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodDate = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodBigIntFormat = exports.ZodBigInt = exports.ZodBoolean = exports.ZodNumberFormat = exports.ZodNumber = exports.ZodCustomStringFormat = exports.ZodJWT = exports.ZodIBAN = exports.ZodCreditCard = exports.ZodE164 = exports.ZodBase64URL = exports.ZodBase64 = exports.ZodCIDRv6 = exports.ZodCIDRv4 = exports.ZodIPv6 = exports.ZodMAC = exports.ZodIPv4 = exports.ZodKSUID = exports.ZodXID = exports.ZodULID = exports.ZodCUID2 = exports.ZodCUID = exports.ZodNanoID = exports.ZodEmoji = exports.ZodURL = exports.ZodUUID = exports.ZodGUID = exports.ZodEmail = exports.ZodISODuration = exports.ZodISOTime = exports.ZodISODate = exports.ZodISODateTime = exports.ZodStringFormat = exports.ZodString = exports._ZodString = exports.ZodType = void 0;
20043
- exports.stringbool = exports.ZodInstanceOf = exports.meta = exports.describe = exports.ZodProperties = exports.ZodCustom = exports.ZodFunction = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPreprocess = exports.ZodCodec = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = exports.ZodExactOptional = exports.ZodOptional = exports.ZodTransform = exports.ZodFile = exports.ZodLiteral = exports.ZodEnum = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = void 0;
20054
+ exports.stringbool = exports.ZodInstanceOf = exports.meta = exports.describe = exports.ZodCustom = exports.ZodFunction = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPreprocess = exports.ZodCodec = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = exports.ZodExactOptional = exports.ZodOptional = exports.ZodTransform = exports.ZodFile = exports.ZodLiteral = exports.ZodEnum = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = void 0;
20044
20055
  exports.string = string6;
20045
20056
  exports.email = email4;
20046
20057
  exports.guid = guid3;
@@ -20071,6 +20082,7 @@ var require_schemas2 = __commonJS({
20071
20082
  exports.stringFormat = stringFormat2;
20072
20083
  exports.hostname = hostname3;
20073
20084
  exports.hex = hex3;
20085
+ exports.currencyCode = currencyCode3;
20074
20086
  exports.hash = hash2;
20075
20087
  exports.number = number6;
20076
20088
  exports.int = int2;
@@ -20131,7 +20143,6 @@ var require_schemas2 = __commonJS({
20131
20143
  exports.function = _function2;
20132
20144
  exports._function = _function2;
20133
20145
  exports.function = _function2;
20134
- exports.properties = properties2;
20135
20146
  exports.check = check2;
20136
20147
  exports.custom = custom2;
20137
20148
  exports.refine = refine2;
@@ -20142,6 +20153,7 @@ var require_schemas2 = __commonJS({
20142
20153
  var core = __importStar(require_core2());
20143
20154
  var index_js_1 = require_core2();
20144
20155
  var processors = __importStar(require_json_schema_processors());
20156
+ var regexes = __importStar(require_regexes());
20145
20157
  var to_json_schema_js_1 = require_to_json_schema();
20146
20158
  var en_js_1 = __importDefault(require_en());
20147
20159
  var checks = __importStar(require_checks2());
@@ -20533,8 +20545,8 @@ var require_schemas2 = __commonJS({
20533
20545
  }
20534
20546
  function httpUrl2(params) {
20535
20547
  return core._url(exports.ZodURL, {
20536
- protocol: core.regexes.httpProtocol,
20537
- hostname: core.regexes.domain,
20548
+ protocol: regexes.httpProtocol,
20549
+ hostname: regexes.domain,
20538
20550
  ...index_js_1.util.normalizeParams(params)
20539
20551
  });
20540
20552
  }
@@ -20672,10 +20684,13 @@ var require_schemas2 = __commonJS({
20672
20684
  return core._stringFormat(exports.ZodCustomStringFormat, format, fnOrRegex, _params);
20673
20685
  }
20674
20686
  function hostname3(_params) {
20675
- return core._stringFormat(exports.ZodCustomStringFormat, "hostname", core.regexes.hostname, _params);
20687
+ return core._stringFormat(exports.ZodCustomStringFormat, "hostname", regexes.hostname, _params);
20676
20688
  }
20677
20689
  function hex3(_params) {
20678
- return core._stringFormat(exports.ZodCustomStringFormat, "hex", core.regexes.hex, _params);
20690
+ return core._stringFormat(exports.ZodCustomStringFormat, "hex", regexes.hex, _params);
20691
+ }
20692
+ function currencyCode3(_params) {
20693
+ return core._stringFormat(exports.ZodCustomStringFormat, "currency_code", regexes.currencyCode, _params);
20679
20694
  }
20680
20695
  function hash2(alg, params) {
20681
20696
  const enc6 = params?.enc ?? "hex";
@@ -21540,14 +21555,6 @@ var require_schemas2 = __commonJS({
21540
21555
  exports.ZodType.init(inst, def);
21541
21556
  inst._zod.processJSONSchema = (ctx, json3, params) => processors.customProcessor(inst, ctx, json3, params);
21542
21557
  });
21543
- exports.ZodProperties = core.$constructor("ZodProperties", (inst, def) => {
21544
- _ensureDefaultMemoizer2();
21545
- core.$ZodProperties.init(inst, def);
21546
- exports.ZodType.init(inst, def);
21547
- });
21548
- function properties2(shape, params) {
21549
- return core._properties(exports.ZodProperties, shape, params);
21550
- }
21551
21558
  function check2(fn) {
21552
21559
  const ch = new core.$ZodCheck({
21553
21560
  check: "custom"
@@ -21571,7 +21578,7 @@ var require_schemas2 = __commonJS({
21571
21578
  exports.ZodCustom.init(inst, def);
21572
21579
  }, {
21573
21580
  properties(shape, params) {
21574
- return this.check(properties2(shape, params));
21581
+ return this.check(core._properties(shape, params));
21575
21582
  }
21576
21583
  });
21577
21584
  function _instanceof2(cls, params = {}) {
@@ -22332,10 +22339,10 @@ var require_from_json_schema = __commonJS({
22332
22339
  }
22333
22340
  case "object": {
22334
22341
  const shape = {};
22335
- const properties2 = schema.properties || {};
22342
+ const properties = schema.properties || {};
22336
22343
  const requiredSet = new Set(schema.required || []);
22337
22344
  const additionalSchema = typeof schema.additionalProperties === "object" ? convertSchema2(schema.additionalProperties, ctx) : void 0;
22338
- for (const [key, propSchema] of Object.entries(properties2)) {
22345
+ for (const [key, propSchema] of Object.entries(properties)) {
22339
22346
  const propZodSchema = convertSchema2(propSchema, ctx);
22340
22347
  (0, util_js_1.assignProp)(shape, key, requiredSet.has(key) ? propZodSchema : propZodSchema.optional());
22341
22348
  }
@@ -22748,18 +22755,6 @@ var require_visit = __commonJS({
22748
22755
  const { _cachedInner, ...rest } = def;
22749
22756
  return (0, util_js_1.clone)(s, { ...rest, getter: () => run(original()) });
22750
22757
  }
22751
- case "properties": {
22752
- const oldShape = def.shape;
22753
- let changed = false;
22754
- const newShape = {};
22755
- for (const k of Reflect.ownKeys(oldShape)) {
22756
- const mapped = run(oldShape[k]);
22757
- if (mapped !== oldShape[k])
22758
- changed = true;
22759
- newShape[k] = mapped;
22760
- }
22761
- return changed ? (0, util_js_1.clone)(s, { ...def, shape: newShape }) : s;
22762
- }
22763
22758
  // A leaf by choice: `parts` are regex fragments, not data positions.
22764
22759
  case "template_literal":
22765
22760
  // Leaves.
@@ -25553,7 +25548,7 @@ var require_websocket = __commonJS({
25553
25548
  var http = __require("http");
25554
25549
  var net = __require("net");
25555
25550
  var tls = __require("tls");
25556
- var { randomBytes: randomBytes3, createHash } = __require("crypto");
25551
+ var { randomBytes: randomBytes4, createHash } = __require("crypto");
25557
25552
  var { Duplex, Readable } = __require("stream");
25558
25553
  var { URL: URL2 } = __require("url");
25559
25554
  var PerMessageDeflate2 = require_permessage_deflate();
@@ -26091,7 +26086,7 @@ var require_websocket = __commonJS({
26091
26086
  }
26092
26087
  }
26093
26088
  const defaultPort = isSecure ? 443 : 80;
26094
- const key = randomBytes3(16).toString("base64");
26089
+ const key = randomBytes4(16).toString("base64");
26095
26090
  const request = isSecure ? https.request : http.request;
26096
26091
  const protocolSet = /* @__PURE__ */ new Set();
26097
26092
  let perMessageDeflate;
@@ -26988,6 +26983,20 @@ var require_websocket_server = __commonJS({
26988
26983
  import { dirname as dirname3, join as join4 } from "path";
26989
26984
  import { fileURLToPath } from "url";
26990
26985
 
26986
+ // node_modules/@chrischall/mcp-utils/dist/cancel/index.js
26987
+ import { AsyncLocalStorage } from "node:async_hooks";
26988
+ var storage = new AsyncLocalStorage();
26989
+ function withCallSignal(signal, fn, request) {
26990
+ return signal ? storage.run({ signal, ...request ? { request } : {} }, fn) : fn();
26991
+ }
26992
+
26993
+ // node_modules/@chrischall/mcp-utils/dist/caller/index.js
26994
+ import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
26995
+ var storage2 = new AsyncLocalStorage2();
26996
+ function withCallerCapabilities(capabilities, fn) {
26997
+ return capabilities ? storage2.run(capabilities, fn) : fn();
26998
+ }
26999
+
26991
27000
  // node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs
26992
27001
  var __create2 = Object.create;
26993
27002
  var __defProp2 = Object.defineProperty;
@@ -30950,8 +30959,8 @@ function scanXMcpHeaderDeclarations(inputSchema) {
30950
30959
  type
30951
30960
  });
30952
30961
  }
30953
- const properties2 = schema.properties;
30954
- if (properties2 !== null && typeof properties2 === "object") for (const [key, child] of Object.entries(properties2)) {
30962
+ const properties = schema.properties;
30963
+ if (properties !== null && typeof properties === "object") for (const [key, child] of Object.entries(properties)) {
30955
30964
  const fault$1 = visit2(child, [...path, key], reachable);
30956
30965
  if (fault$1 !== void 0) return fault$1;
30957
30966
  }
@@ -31245,9 +31254,9 @@ function isLibraryFormatPattern(format, pattern, vendor) {
31245
31254
  }
31246
31255
  function promptArgumentsFromStandardSchema(schema) {
31247
31256
  const jsonSchema = standardSchemaToJsonSchema(schema, "input");
31248
- const properties2 = jsonSchema.properties || {};
31257
+ const properties = jsonSchema.properties || {};
31249
31258
  const required2 = jsonSchema.required || [];
31250
- return Object.entries(properties2).map(([name, prop]) => ({
31259
+ return Object.entries(properties).map(([name, prop]) => ({
31251
31260
  name,
31252
31261
  description: prop?.description,
31253
31262
  required: required2.includes(name)
@@ -34094,8 +34103,8 @@ var require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {
34094
34103
  const codegen_1 = require_codegen();
34095
34104
  const util_1 = require_util2();
34096
34105
  function assignDefaults(it, ty) {
34097
- const { properties: properties2, items } = it.schema;
34098
- if (ty === "object" && properties2) for (const key in properties2) assignDefault(it, key, properties2[key].default);
34106
+ const { properties, items } = it.schema;
34107
+ if (ty === "object" && properties) for (const key in properties) assignDefault(it, key, properties[key].default);
34099
34108
  else if (ty === "array" && Array.isArray(items)) items.forEach((sch, i) => assignDefault(it, i, sch.default));
34100
34109
  }
34101
34110
  exports.assignDefaults = assignDefaults;
@@ -34127,8 +34136,8 @@ var require_code = /* @__PURE__ */ __commonJSMin(((exports) => {
34127
34136
  });
34128
34137
  }
34129
34138
  exports.checkReportMissingProp = checkReportMissingProp;
34130
- function checkMissingProp({ gen, data, it: { opts } }, properties2, missing) {
34131
- return (0, codegen_1.or)(...properties2.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));
34139
+ function checkMissingProp({ gen, data, it: { opts } }, properties, missing) {
34140
+ return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));
34132
34141
  }
34133
34142
  exports.checkMissingProp = checkMissingProp;
34134
34143
  function reportMissingProp(cxt, missing) {
@@ -37404,10 +37413,10 @@ var require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {
37404
37413
  const allProps = (0, code_1.allSchemaProperties)(schema);
37405
37414
  for (const prop of allProps) it.definedProperties.add(prop);
37406
37415
  if (it.opts.unevaluated && allProps.length && it.props !== true) it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
37407
- const properties2 = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
37408
- if (properties2.length === 0) return;
37416
+ const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
37417
+ if (properties.length === 0) return;
37409
37418
  const valid = gen.name("valid");
37410
- for (const prop of properties2) {
37419
+ for (const prop of properties) {
37411
37420
  if (hasDefault(prop)) applyPropertySchema(prop);
37412
37421
  else {
37413
37422
  gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));
@@ -41667,13 +41676,28 @@ var API_KEY_RE = new RegExp([
41667
41676
  "whsec_[A-Za-z0-9]{16,}\\b"
41668
41677
  // webhook signing secret (Stripe-style)
41669
41678
  ].map((p) => `\\b${p}`).join("|"), "g");
41670
- var QUERY_SECRET_RE = /([?&](?:access_token|refresh_token|client_secret|api_?key|signature|token|key|sig)=)[^&#\s"'<>`]+/gi;
41679
+ var QUERY_SECRET_RE = /([?&](?:(?:access|refresh|id|auth|session|csrf|xsrf)[_-]?token|client[_-]?secret|api[_-]?secret|api[_-]?key|password|passwd|signature|token|key|sig)=)[^&#\s"'<>`]+/gi;
41680
+ var OAUTH_CODE_RE = /([?&]code=)(?=[^&#\s"'<>`]{16,})[^&#\s"'<>`]+/gi;
41681
+ var FORM_PASSWORD_RE = /((?:^|[\s,;:"'(\[{])(?:password|passwd)=)[^&#\s"'<>`]+/gim;
41682
+ var HEADER_SECRET_RE = /(\b(?:x[-_][a-z0-9_-]*?(?:api[-_]?key|token|secret|auth)[a-z0-9_-]*|api[-_]?key)\s*:\s*)[^\s,;"'<>`]+/gi;
41671
41683
  var AWS_SIGV4_RE = /([?&]X-Amz-(?:Signature|Security-Token|Credential)=)[^&#\s"'<>`]+/gi;
41672
- var JSON_SECRET_KEYS = "access_token|refresh_token|client_secret|api_?key|password|passwd|secret|token";
41673
- var JSON_SECRET_DQ_RE = new RegExp(`("(?:${JSON_SECRET_KEYS})"\\s*:\\s*")[^"]*(")`, "gi");
41674
- var JSON_SECRET_SQ_RE = new RegExp(`('(?:${JSON_SECRET_KEYS})'\\s*:\\s*')[^']*(')`, "gi");
41684
+ var JSON_SECRET_KEYS = [
41685
+ "(?:access|refresh|id|auth|session|bearer|csrf|xsrf)[_-]?token",
41686
+ "client[_-]?secret",
41687
+ "api[_-]?secret",
41688
+ "(?:x[_-])?api[_-]?key",
41689
+ "private[_-]?key",
41690
+ "x[_-][a-z0-9_-]*?(?:api[_-]?key|token|secret|auth)[a-z0-9_-]*",
41691
+ "(?:proxy-)?authorization",
41692
+ "password",
41693
+ "passwd",
41694
+ "secret",
41695
+ "token"
41696
+ ].join("|");
41697
+ var JSON_SECRET_DQ_RE = new RegExp(`("(?:${JSON_SECRET_KEYS})"\\s*:\\s*")(?:[^"\\\\]|\\\\.)*(")`, "gi");
41698
+ var JSON_SECRET_SQ_RE = new RegExp(`('(?:${JSON_SECRET_KEYS})'\\s*:\\s*')(?:[^'\\\\]|\\\\.)*(')`, "gi");
41675
41699
  function redactSecrets(text) {
41676
- return text.replace(BEARER_RE, "$1[REDACTED]").replace(BASIC_AUTH_RE, "$1[REDACTED]").replace(SET_COOKIE_RE, "$1$2=[REDACTED]").replace(COOKIE_HEADER_RE, (_m, prefix, pairs) => `${prefix}${pairs.replace(/=[^;,\s]*/g, "=[REDACTED]")}`).replace(API_KEY_RE, "[REDACTED]").replace(QUERY_SECRET_RE, "$1[REDACTED]").replace(AWS_SIGV4_RE, "$1[REDACTED]").replace(JSON_SECRET_DQ_RE, "$1[REDACTED]$2").replace(JSON_SECRET_SQ_RE, "$1[REDACTED]$2").replace(JWT_RE, "[REDACTED]");
41700
+ return text.replace(BEARER_RE, "$1[REDACTED]").replace(BASIC_AUTH_RE, "$1[REDACTED]").replace(SET_COOKIE_RE, "$1$2=[REDACTED]").replace(COOKIE_HEADER_RE, (_m, prefix, pairs) => `${prefix}${pairs.replace(/=[^;,\s]*/g, "=[REDACTED]")}`).replace(API_KEY_RE, "[REDACTED]").replace(HEADER_SECRET_RE, "$1[REDACTED]").replace(QUERY_SECRET_RE, "$1[REDACTED]").replace(OAUTH_CODE_RE, "$1[REDACTED]").replace(FORM_PASSWORD_RE, "$1[REDACTED]").replace(AWS_SIGV4_RE, "$1[REDACTED]").replace(JSON_SECRET_DQ_RE, "$1[REDACTED]$2").replace(JSON_SECRET_SQ_RE, "$1[REDACTED]$2").replace(JWT_RE, "[REDACTED]");
41677
41701
  }
41678
41702
  function truncateErrorMessage(text, max = DEFAULT_ERROR_MESSAGE_MAX) {
41679
41703
  const str = text === null || text === void 0 ? "" : String(text);
@@ -41758,7 +41782,6 @@ __export(external_exports, {
41758
41782
  ZodPrefault: () => ZodPrefault,
41759
41783
  ZodPreprocess: () => ZodPreprocess,
41760
41784
  ZodPromise: () => ZodPromise,
41761
- ZodProperties: () => ZodProperties,
41762
41785
  ZodReadonly: () => ZodReadonly,
41763
41786
  ZodRealError: () => ZodRealError,
41764
41787
  ZodRecord: () => ZodRecord,
@@ -41802,6 +41825,7 @@ __export(external_exports, {
41802
41825
  creditCard: () => creditCard2,
41803
41826
  cuid: () => cuid3,
41804
41827
  cuid2: () => cuid22,
41828
+ currencyCode: () => currencyCode2,
41805
41829
  custom: () => custom,
41806
41830
  date: () => date2,
41807
41831
  decode: () => decode2,
@@ -41895,7 +41919,7 @@ __export(external_exports, {
41895
41919
  preprocess: () => preprocess3,
41896
41920
  prettifyError: () => prettifyError,
41897
41921
  promise: () => promise,
41898
- properties: () => properties,
41922
+ properties: () => _properties,
41899
41923
  property: () => _property,
41900
41924
  readonly: () => readonly,
41901
41925
  record: () => record3,
@@ -41983,6 +42007,7 @@ __export(core_exports2, {
41983
42007
  $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
41984
42008
  $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
41985
42009
  $ZodCheckOverwrite: () => $ZodCheckOverwrite,
42010
+ $ZodCheckProperties: () => $ZodCheckProperties,
41986
42011
  $ZodCheckProperty: () => $ZodCheckProperty,
41987
42012
  $ZodCheckRegex: () => $ZodCheckRegex,
41988
42013
  $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
@@ -42036,7 +42061,6 @@ __export(core_exports2, {
42036
42061
  $ZodPrefault: () => $ZodPrefault,
42037
42062
  $ZodPreprocess: () => $ZodPreprocess,
42038
42063
  $ZodPromise: () => $ZodPromise,
42039
- $ZodProperties: () => $ZodProperties,
42040
42064
  $ZodReadonly: () => $ZodReadonly,
42041
42065
  $ZodRealError: () => $ZodRealError,
42042
42066
  $ZodRecord: () => $ZodRecord,
@@ -42204,6 +42228,7 @@ __export(core_exports2, {
42204
42228
  _xor: () => _xor,
42205
42229
  base64Charset: () => base64Charset,
42206
42230
  base64urlCharset: () => base64urlCharset,
42231
+ canParseURL: () => canParseURL,
42207
42232
  clone: () => clone,
42208
42233
  compile: () => compile,
42209
42234
  compileFn: () => compileFn,
@@ -42226,7 +42251,6 @@ __export(core_exports2, {
42226
42251
  initializeContext: () => initializeContext,
42227
42252
  isBackEdge: () => isBackEdge,
42228
42253
  isRecursiveSchema: () => isRecursiveSchema,
42229
- isTransforming: () => isTransforming,
42230
42254
  isValidBase64: () => isValidBase64,
42231
42255
  isValidBase64URL: () => isValidBase64URL,
42232
42256
  isValidCIDRv6: () => isValidCIDRv6,
@@ -42263,6 +42287,7 @@ __export(core_exports2, {
42263
42287
  util: () => util_exports,
42264
42288
  validate: () => validate,
42265
42289
  validateAsync: () => validateAsync,
42290
+ validateURL: () => validateURL,
42266
42291
  version: () => version,
42267
42292
  withParser: () => withParser
42268
42293
  });
@@ -43004,9 +43029,6 @@ function members(proto, table) {
43004
43029
  else
43005
43030
  defineBound(proto, key, desc.value);
43006
43031
  }
43007
- for (const sym of Object.getOwnPropertySymbols(table)) {
43008
- defineBound(proto, sym, table[sym]);
43009
- }
43010
43032
  }
43011
43033
  function own(inst, key, value, enumerable = true) {
43012
43034
  Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });
@@ -43159,8 +43181,7 @@ function $constructor(name, initializer3, proto, params) {
43159
43181
  } finally {
43160
43182
  _zodDesc.value = void 0;
43161
43183
  }
43162
- }
43163
- if (inst._zod.traits.has(name)) {
43184
+ } else if (inst._zod.traits.has(name)) {
43164
43185
  return;
43165
43186
  }
43166
43187
  inst._zod.traits.add(name);
@@ -43602,6 +43623,7 @@ __export(regexes_exports, {
43602
43623
  creditCard: () => creditCard,
43603
43624
  cuid: () => cuid,
43604
43625
  cuid2: () => cuid2,
43626
+ currencyCode: () => currencyCode,
43605
43627
  date: () => date,
43606
43628
  datetime: () => datetime,
43607
43629
  domain: () => domain,
@@ -43700,6 +43722,7 @@ var domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a
43700
43722
  var httpProtocol = /^https?$/;
43701
43723
  var e164 = /^\+[1-9]\d{6,14}$/;
43702
43724
  var creditCard = /^\d(?:[ -]?\d){11,18}$/;
43725
+ var currencyCode = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;
43703
43726
  var iban = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
43704
43727
  var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
43705
43728
  function anchor(source) {
@@ -44184,6 +44207,34 @@ var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst,
44184
44207
  return;
44185
44208
  };
44186
44209
  });
44210
+ var $ZodCheckProperties = /* @__PURE__ */ $constructor("$ZodCheckProperties", (inst, def) => {
44211
+ $ZodCheck.init(inst, def);
44212
+ hide(inst, Symbol.iterator, function* () {
44213
+ yield inst;
44214
+ });
44215
+ let entries;
44216
+ inst._zod.check = (payload) => {
44217
+ if (payload.value == null) {
44218
+ payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
44219
+ return void 0;
44220
+ }
44221
+ entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
44222
+ const input2 = payload.value;
44223
+ let proms;
44224
+ for (const [key, schema] of entries) {
44225
+ const result = schema._zod.run({ value: input2[key], issues: [] }, {});
44226
+ if (result instanceof Promise) {
44227
+ proms ?? (proms = []);
44228
+ proms.push(result.then((result2) => handleCheckPropertyResult(result2, payload, key)));
44229
+ } else {
44230
+ handleCheckPropertyResult(result, payload, key);
44231
+ }
44232
+ }
44233
+ if (proms)
44234
+ return Promise.all(proms).then(() => void 0);
44235
+ return void 0;
44236
+ };
44237
+ });
44187
44238
  var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => {
44188
44239
  $ZodCheck.init(inst, def);
44189
44240
  const mimeSet = new Set(def.mime);
@@ -44251,7 +44302,7 @@ ${content.join("\n")}
44251
44302
  var version = {
44252
44303
  major: 4,
44253
44304
  minor: 6,
44254
- patch: 2
44305
+ patch: 5
44255
44306
  };
44256
44307
 
44257
44308
  // node_modules/zod/v4/core/schemas.js
@@ -44439,11 +44490,32 @@ var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
44439
44490
  });
44440
44491
  var URL_BAD_FORMAT = 1;
44441
44492
  var URL_UNPARSEABLE = 2;
44493
+ function canParseURL(input2) {
44494
+ try {
44495
+ if (typeof URL !== "undefined" && typeof URL.canParse === "function")
44496
+ return URL.canParse(input2);
44497
+ new URL(input2);
44498
+ return true;
44499
+ } catch {
44500
+ return false;
44501
+ }
44502
+ }
44503
+ function validateURL(trimmed, def) {
44504
+ if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
44505
+ return canParseURL(trimmed) || URL_UNPARSEABLE;
44506
+ }
44507
+ return parseURLObject(trimmed, def);
44508
+ }
44442
44509
  function parseURLObject(trimmed, def) {
44443
44510
  if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
44444
44511
  return URL_BAD_FORMAT;
44445
44512
  }
44446
44513
  try {
44514
+ if (typeof URL !== "undefined") {
44515
+ const URLStatic = URL;
44516
+ if (typeof URLStatic.parse === "function")
44517
+ return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
44518
+ }
44447
44519
  return new URL(trimmed);
44448
44520
  } catch {
44449
44521
  return URL_UNPARSEABLE;
@@ -44466,7 +44538,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
44466
44538
  inst._zod.check = (payload) => {
44467
44539
  try {
44468
44540
  const trimmed = payload.value.trim();
44469
- const url4 = parseURLObject(trimmed, def);
44541
+ const url4 = validateURL(trimmed, def);
44470
44542
  if (url4 === URL_BAD_FORMAT) {
44471
44543
  payload.issues.push({
44472
44544
  code: "invalid_format",
@@ -44488,6 +44560,10 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
44488
44560
  });
44489
44561
  return;
44490
44562
  }
44563
+ if (url4 === true) {
44564
+ payload.value = stripTabAndNewline(trimmed);
44565
+ return;
44566
+ }
44491
44567
  if (def.hostname && !urlHostnameOk(url4, def.hostname)) {
44492
44568
  payload.issues.push({
44493
44569
  code: "invalid_format",
@@ -44577,12 +44653,7 @@ var ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
44577
44653
  function isValidIPv6(value) {
44578
44654
  if (!ipv6Alphabet.test(value))
44579
44655
  return false;
44580
- try {
44581
- new URL(`http://[${value}]`);
44582
- return true;
44583
- } catch {
44584
- return false;
44585
- }
44656
+ return canParseURL(`http://[${value}]`);
44586
44657
  }
44587
44658
  var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
44588
44659
  def.pattern ?? (def.pattern = ipv6);
@@ -46647,59 +46718,6 @@ function handleRefineResult(result, payload, input2, inst) {
46647
46718
  payload.issues.push(issue(_iss));
46648
46719
  }
46649
46720
  }
46650
- function handlePropertiesResult(result, payload, key) {
46651
- if (result.issues.length) {
46652
- payload.issues.push(...prefixIssues(key, result.issues));
46653
- }
46654
- }
46655
- var $ZodProperties = /* @__PURE__ */ $constructor("$ZodProperties", (inst, def) => {
46656
- $ZodType.init(inst, def);
46657
- $ZodCheck.init(inst, def);
46658
- const memo3 = globalConfig.memoizer;
46659
- memo3?.attach(inst);
46660
- let entries;
46661
- const runShape = (payload, ctx) => {
46662
- entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
46663
- const input2 = payload.value;
46664
- let proms;
46665
- for (const [key, schema] of entries) {
46666
- const result = schema._zod.run({ value: input2[key], issues: [] }, ctx);
46667
- if (result instanceof Promise) {
46668
- proms ?? (proms = []);
46669
- proms.push(result.then((result2) => handlePropertiesResult(result2, payload, key)));
46670
- } else {
46671
- handlePropertiesResult(result, payload, key);
46672
- }
46673
- }
46674
- if (proms)
46675
- return Promise.all(proms).then(() => void 0);
46676
- return void 0;
46677
- };
46678
- inst._zod.parse = (payload, ctx) => {
46679
- const input2 = payload.value;
46680
- if (input2 === null || typeof input2 !== "object" && typeof input2 !== "function") {
46681
- payload.issues.push({ expected: "object", code: "invalid_type", input: input2, inst });
46682
- return payload;
46683
- }
46684
- if (ctx.direction === "backward")
46685
- ctx = { ...ctx, direction: "forward" };
46686
- if (memo3)
46687
- memo3.alloc(inst, payload, input2, ctx);
46688
- const result = runShape(payload, ctx);
46689
- return result instanceof Promise ? result.then(() => payload) : payload;
46690
- };
46691
- inst._zod.check = (payload) => {
46692
- if (payload.value == null) {
46693
- payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
46694
- return void 0;
46695
- }
46696
- return runShape(payload, {});
46697
- };
46698
- }, {
46699
- *[Symbol.iterator]() {
46700
- yield this;
46701
- }
46702
- });
46703
46721
 
46704
46722
  // node_modules/zod/v4/core/memoizer.js
46705
46723
  var $ZodCyclicError = class extends Error {
@@ -46711,7 +46729,7 @@ var $ZodCyclicError = class extends Error {
46711
46729
  var STATE = "~memo";
46712
46730
  var NO_ISSUES = [];
46713
46731
  function isRef(value) {
46714
- return value !== null && (typeof value === "object" || typeof value === "function");
46732
+ return value !== null && typeof value === "object";
46715
46733
  }
46716
46734
  function cloneIssues(issues) {
46717
46735
  return issues.map((iss) => iss.path ? { ...iss, path: iss.path.slice() } : { ...iss });
@@ -46760,9 +46778,6 @@ function isRecursive(inst, stack, resolve2) {
46760
46778
  check2(def.catchall);
46761
46779
  break;
46762
46780
  }
46763
- case "properties":
46764
- merge2(shape(def.shape, false));
46765
- break;
46766
46781
  case "array":
46767
46782
  check2(def.element);
46768
46783
  break;
@@ -47090,6 +47105,7 @@ var error = () => {
47090
47105
  json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",
47091
47106
  e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",
47092
47107
  credit_card: "\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",
47108
+ currency_code: "\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",
47093
47109
  iban: "IBAN",
47094
47110
  jwt: "JWT",
47095
47111
  template_literal: "\u0645\u062F\u062E\u0644"
@@ -47201,6 +47217,7 @@ var error2 = () => {
47201
47217
  json_string: "JSON string",
47202
47218
  e164: "E.164 number",
47203
47219
  credit_card: "kredit kart\u0131 n\xF6mr\u0259si",
47220
+ currency_code: "valyuta kodu",
47204
47221
  iban: "IBAN",
47205
47222
  jwt: "JWT",
47206
47223
  template_literal: "input"
@@ -47361,6 +47378,7 @@ var error3 = () => {
47361
47378
  json_string: "JSON \u0440\u0430\u0434\u043E\u043A",
47362
47379
  e164: "\u043D\u0443\u043C\u0430\u0440 E.164",
47363
47380
  credit_card: "\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",
47381
+ currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
47364
47382
  iban: "IBAN",
47365
47383
  jwt: "JWT",
47366
47384
  template_literal: "\u0443\u0432\u043E\u0434"
@@ -47479,6 +47497,7 @@ var error4 = () => {
47479
47497
  json_string: "JSON \u043D\u0438\u0437",
47480
47498
  e164: "E.164 \u043D\u043E\u043C\u0435\u0440",
47481
47499
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",
47500
+ currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
47482
47501
  iban: "IBAN",
47483
47502
  jwt: "JWT",
47484
47503
  template_literal: "\u0432\u0445\u043E\u0434"
@@ -47604,6 +47623,7 @@ var error5 = () => {
47604
47623
  json_string: "JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",
47605
47624
  e164: "E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",
47606
47625
  credit_card: "\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",
47626
+ currency_code: "\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",
47607
47627
  iban: "IBAN",
47608
47628
  jwt: "JWT",
47609
47629
  template_literal: "\u0987\u09A8\u09AA\u09C1\u099F"
@@ -47717,6 +47737,7 @@ var error6 = () => {
47717
47737
  json_string: "cadena JSON",
47718
47738
  e164: "n\xFAmero E.164",
47719
47739
  credit_card: "n\xFAmero de targeta de cr\xE8dit",
47740
+ currency_code: "codi de moneda",
47720
47741
  iban: "IBAN",
47721
47742
  jwt: "JWT",
47722
47743
  template_literal: "entrada"
@@ -47830,6 +47851,7 @@ var error7 = () => {
47830
47851
  json_string: "\u062F\u06D5\u0642\u06CC JSON",
47831
47852
  e164: "\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",
47832
47853
  credit_card: "\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",
47854
+ currency_code: "\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",
47833
47855
  iban: "IBAN",
47834
47856
  jwt: "JWT",
47835
47857
  template_literal: "\u062A\u06CE\u06A9\u0631\u062F\u06D5"
@@ -47962,6 +47984,7 @@ var error8 = () => {
47962
47984
  json_string: "\u0159et\u011Bzec ve form\xE1tu JSON",
47963
47985
  e164: "\u010D\xEDslo E.164",
47964
47986
  credit_card: "\u010D\xEDslo kreditn\xED karty",
47987
+ currency_code: "k\xF3d m\u011Bny",
47965
47988
  iban: "IBAN",
47966
47989
  jwt: "JWT",
47967
47990
  template_literal: "vstup"
@@ -48078,6 +48101,7 @@ var error9 = () => {
48078
48101
  json_string: "JSON-streng",
48079
48102
  e164: "E.164-nummer",
48080
48103
  credit_card: "kreditkortnummer",
48104
+ currency_code: "valutakode",
48081
48105
  iban: "IBAN",
48082
48106
  jwt: "JWT",
48083
48107
  template_literal: "input"
@@ -48198,6 +48222,7 @@ var error10 = () => {
48198
48222
  json_string: "JSON-String",
48199
48223
  e164: "E.164-Nummer",
48200
48224
  credit_card: "Kreditkartennummer",
48225
+ currency_code: "W\xE4hrungscode",
48201
48226
  iban: "IBAN",
48202
48227
  jwt: "JWT",
48203
48228
  template_literal: "Eingabe"
@@ -48311,6 +48336,7 @@ var error11 = () => {
48311
48336
  json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
48312
48337
  e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
48313
48338
  credit_card: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",
48339
+ currency_code: "\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",
48314
48340
  iban: "IBAN",
48315
48341
  jwt: "JWT",
48316
48342
  template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
@@ -48422,6 +48448,7 @@ var error12 = () => {
48422
48448
  base64url: "base64url-encoded string",
48423
48449
  json_string: "JSON string",
48424
48450
  e164: "E.164 number",
48451
+ currency_code: "currency code",
48425
48452
  credit_card: "credit card number",
48426
48453
  iban: "IBAN",
48427
48454
  jwt: "JWT",
@@ -48547,6 +48574,7 @@ var error13 = () => {
48547
48574
  json_string: "JSON-karaktraro",
48548
48575
  e164: "E.164-nombro",
48549
48576
  credit_card: "kreditkarta numero",
48577
+ currency_code: "valuta kodo",
48550
48578
  iban: "IBAN",
48551
48579
  jwt: "JWT",
48552
48580
  template_literal: "enigo"
@@ -48660,6 +48688,7 @@ var error14 = () => {
48660
48688
  json_string: "cadena JSON",
48661
48689
  e164: "n\xFAmero E.164",
48662
48690
  credit_card: "n\xFAmero de tarjeta de cr\xE9dito",
48691
+ currency_code: "c\xF3digo de moneda",
48663
48692
  iban: "IBAN",
48664
48693
  jwt: "JWT",
48665
48694
  template_literal: "entrada"
@@ -48797,6 +48826,7 @@ var error15 = () => {
48797
48826
  json_string: "JSON \u0631\u0634\u062A\u0647",
48798
48827
  e164: "E.164 \u0639\u062F\u062F",
48799
48828
  credit_card: "\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",
48829
+ currency_code: "\u06A9\u062F \u0627\u0631\u0632",
48800
48830
  iban: "IBAN",
48801
48831
  jwt: "JWT",
48802
48832
  template_literal: "\u0648\u0631\u0648\u062F\u06CC"
@@ -48920,6 +48950,7 @@ var error16 = () => {
48920
48950
  json_string: "JSON-merkkijono",
48921
48951
  e164: "E.164-luku",
48922
48952
  credit_card: "luottokortin numero",
48953
+ currency_code: "valuuttakoodi",
48923
48954
  iban: "IBAN",
48924
48955
  jwt: "JWT",
48925
48956
  template_literal: "templaattimerkkijono"
@@ -49032,6 +49063,7 @@ var error17 = () => {
49032
49063
  json_string: "cha\xEEne de caract\xE8res JSON",
49033
49064
  e164: "num\xE9ro au format E.164",
49034
49065
  credit_card: "num\xE9ro de carte de cr\xE9dit",
49066
+ currency_code: "code de devise",
49035
49067
  iban: "IBAN",
49036
49068
  jwt: "JWT",
49037
49069
  template_literal: "entr\xE9e"
@@ -49162,6 +49194,7 @@ var error18 = () => {
49162
49194
  json_string: "cha\xEEne JSON",
49163
49195
  e164: "num\xE9ro E.164",
49164
49196
  credit_card: "num\xE9ro de carte de cr\xE9dit",
49197
+ currency_code: "code de devise",
49165
49198
  iban: "IBAN",
49166
49199
  jwt: "JWT",
49167
49200
  template_literal: "entr\xE9e"
@@ -49274,6 +49307,7 @@ var error19 = () => {
49274
49307
  json_string: "JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",
49275
49308
  e164: "E.164 \u0AA8\u0A82\u0AAC\u0AB0",
49276
49309
  credit_card: "\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",
49310
+ currency_code: "\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",
49277
49311
  iban: "IBAN",
49278
49312
  jwt: "JWT",
49279
49313
  template_literal: "\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"
@@ -49423,6 +49457,7 @@ var error20 = () => {
49423
49457
  json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
49424
49458
  e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
49425
49459
  credit_card: { label: "\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9", gender: "m" },
49460
+ currency_code: { label: "\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2", gender: "m" },
49426
49461
  iban: { label: "IBAN", gender: "m" },
49427
49462
  jwt: { label: "JWT", gender: "m" },
49428
49463
  template_literal: { label: "\u05E7\u05DC\u05D8", gender: "m" },
@@ -49588,6 +49623,7 @@ var error21 = () => {
49588
49623
  json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",
49589
49624
  e164: "E.164 \u0938\u0902\u0916\u094D\u092F\u093E",
49590
49625
  credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",
49626
+ currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
49591
49627
  iban: "IBAN",
49592
49628
  jwt: "JWT",
49593
49629
  template_literal: "\u0907\u0928\u092A\u0941\u091F"
@@ -49698,6 +49734,7 @@ var error22 = () => {
49698
49734
  json_string: "JSON tekst",
49699
49735
  e164: "E.164 broj",
49700
49736
  credit_card: "broj kreditne kartice",
49737
+ currency_code: "kod valute",
49701
49738
  iban: "IBAN",
49702
49739
  jwt: "JWT",
49703
49740
  template_literal: "unos"
@@ -49825,6 +49862,7 @@ var error23 = () => {
49825
49862
  json_string: "JSON string",
49826
49863
  e164: "E.164 sz\xE1m",
49827
49864
  credit_card: "hitelk\xE1rtyasz\xE1m",
49865
+ currency_code: "p\xE9nznemk\xF3d",
49828
49866
  iban: "IBAN",
49829
49867
  jwt: "JWT",
49830
49868
  template_literal: "bemenet"
@@ -49978,6 +50016,7 @@ var error24 = () => {
49978
50016
  json_string: "JSON \u057F\u0578\u0572",
49979
50017
  e164: "E.164 \u0570\u0561\u0574\u0561\u0580",
49980
50018
  credit_card: "\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",
50019
+ currency_code: "\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",
49981
50020
  iban: "IBAN",
49982
50021
  jwt: "JWT",
49983
50022
  template_literal: "\u0574\u0578\u0582\u057F\u0584"
@@ -50096,6 +50135,7 @@ var error25 = () => {
50096
50135
  json_string: "string JSON",
50097
50136
  e164: "angka E.164",
50098
50137
  credit_card: "nomor kartu kredit",
50138
+ currency_code: "kode mata uang",
50099
50139
  iban: "IBAN",
50100
50140
  jwt: "JWT",
50101
50141
  template_literal: "input"
@@ -50207,6 +50247,7 @@ var error26 = () => {
50207
50247
  json_string: "JSON strengur",
50208
50248
  e164: "E.164 t\xF6lugildi",
50209
50249
  credit_card: "kreditkortan\xFAmer",
50250
+ currency_code: "gjaldmi\xF0ilsk\xF3\xF0i",
50210
50251
  iban: "IBAN",
50211
50252
  jwt: "JWT",
50212
50253
  template_literal: "gildi"
@@ -50321,6 +50362,7 @@ var error27 = () => {
50321
50362
  json_string: "stringa JSON",
50322
50363
  e164: "numero E.164",
50323
50364
  credit_card: "numero di carta di credito",
50365
+ currency_code: "codice valuta",
50324
50366
  iban: "IBAN",
50325
50367
  jwt: "JWT",
50326
50368
  template_literal: "input"
@@ -50434,6 +50476,7 @@ var error28 = () => {
50434
50476
  json_string: "JSON\u6587\u5B57\u5217",
50435
50477
  e164: "E.164\u756A\u53F7",
50436
50478
  credit_card: "\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",
50479
+ currency_code: "\u901A\u8CA8\u30B3\u30FC\u30C9",
50437
50480
  iban: "IBAN",
50438
50481
  jwt: "JWT",
50439
50482
  template_literal: "\u5165\u529B\u5024"
@@ -50546,6 +50589,7 @@ var error29 = () => {
50546
50589
  json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
50547
50590
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
50548
50591
  credit_card: "\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
50592
+ currency_code: "\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",
50549
50593
  iban: "IBAN",
50550
50594
  jwt: "JWT",
50551
50595
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -50663,6 +50707,7 @@ var error30 = () => {
50663
50707
  json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",
50664
50708
  e164: "\u179B\u17C1\u1781 E.164",
50665
50709
  credit_card: "\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",
50710
+ currency_code: "\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",
50666
50711
  iban: "IBAN",
50667
50712
  jwt: "JWT",
50668
50713
  template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"
@@ -50783,6 +50828,7 @@ var error31 = () => {
50783
50828
  json_string: "JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",
50784
50829
  e164: "E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
50785
50830
  credit_card: "\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
50831
+ currency_code: "\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",
50786
50832
  iban: "IBAN",
50787
50833
  jwt: "JWT",
50788
50834
  template_literal: "\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"
@@ -50898,6 +50944,7 @@ var error32 = () => {
50898
50944
  json_string: "JSON \uBB38\uC790\uC5F4",
50899
50945
  e164: "E.164 \uBC88\uD638",
50900
50946
  credit_card: "\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",
50947
+ currency_code: "\uD1B5\uD654 \uCF54\uB4DC",
50901
50948
  iban: "IBAN",
50902
50949
  jwt: "JWT",
50903
50950
  template_literal: "\uC785\uB825"
@@ -51096,6 +51143,7 @@ var error33 = () => {
51096
51143
  json_string: "JSON eilut\u0117",
51097
51144
  e164: "E.164 numeris",
51098
51145
  credit_card: "kredito kortel\u0117s numeris",
51146
+ currency_code: "valiutos kodas",
51099
51147
  iban: "IBAN",
51100
51148
  jwt: "JWT",
51101
51149
  template_literal: "\u012Fvestis"
@@ -51221,6 +51269,7 @@ var error34 = () => {
51221
51269
  json_string: "JSON \u043D\u0438\u0437\u0430",
51222
51270
  e164: "E.164 \u0431\u0440\u043E\u0458",
51223
51271
  credit_card: "\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",
51272
+ currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
51224
51273
  iban: "IBAN",
51225
51274
  jwt: "JWT",
51226
51275
  template_literal: "\u0432\u043D\u0435\u0441"
@@ -51335,6 +51384,7 @@ var error35 = () => {
51335
51384
  json_string: "string JSON",
51336
51385
  e164: "nombor E.164",
51337
51386
  credit_card: "nombor kad kredit",
51387
+ currency_code: "kod mata wang",
51338
51388
  iban: "IBAN",
51339
51389
  jwt: "JWT",
51340
51390
  template_literal: "input"
@@ -51447,6 +51497,7 @@ var error36 = () => {
51447
51497
  json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",
51448
51498
  e164: "E.164 \u0928\u092E\u094D\u092C\u0930",
51449
51499
  credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",
51500
+ currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
51450
51501
  iban: "IBAN",
51451
51502
  jwt: "JWT",
51452
51503
  template_literal: "\u0907\u0928\u092A\u0941\u091F"
@@ -51558,6 +51609,7 @@ var error37 = () => {
51558
51609
  json_string: "JSON string",
51559
51610
  e164: "E.164-nummer",
51560
51611
  credit_card: "creditcardnummer",
51612
+ currency_code: "valutacode",
51561
51613
  iban: "IBAN",
51562
51614
  jwt: "JWT",
51563
51615
  template_literal: "invoer"
@@ -51673,6 +51725,7 @@ var error38 = () => {
51673
51725
  json_string: "JSON-streng",
51674
51726
  e164: "E.164-nummer",
51675
51727
  credit_card: "kredittkortnummer",
51728
+ currency_code: "valutakode",
51676
51729
  iban: "IBAN",
51677
51730
  jwt: "JWT",
51678
51731
  template_literal: "input"
@@ -51786,6 +51839,7 @@ var error39 = () => {
51786
51839
  json_string: "JSON-streng",
51787
51840
  e164: "E.164-nummer",
51788
51841
  credit_card: "kredittkortnummer",
51842
+ currency_code: "valutakode",
51789
51843
  iban: "IBAN",
51790
51844
  jwt: "JWT",
51791
51845
  template_literal: "input"
@@ -51899,6 +51953,7 @@ var error40 = () => {
51899
51953
  json_string: "JSON metin",
51900
51954
  e164: "E.164 say\u0131s\u0131",
51901
51955
  credit_card: "i'tib\xE2r kart\u0131 numaras\u0131",
51956
+ currency_code: "para birimi kodu",
51902
51957
  iban: "IBAN",
51903
51958
  jwt: "JWT",
51904
51959
  template_literal: "giren"
@@ -52013,6 +52068,7 @@ var error41 = () => {
52013
52068
  json_string: "JSON \u0645\u062A\u0646",
52014
52069
  e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",
52015
52070
  credit_card: "\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",
52071
+ currency_code: "\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",
52016
52072
  iban: "IBAN",
52017
52073
  jwt: "JWT",
52018
52074
  template_literal: "\u0648\u0631\u0648\u062F\u064A"
@@ -52132,6 +52188,7 @@ var error42 = () => {
52132
52188
  json_string: "ci\u0105g znak\xF3w w formacie JSON",
52133
52189
  e164: "liczba E.164",
52134
52190
  credit_card: "numer karty kredytowej",
52191
+ currency_code: "kod waluty",
52135
52192
  iban: "IBAN",
52136
52193
  jwt: "JWT",
52137
52194
  template_literal: "wej\u015Bcie"
@@ -52246,6 +52303,7 @@ var error43 = () => {
52246
52303
  json_string: "o texto JSON",
52247
52304
  e164: "o n\xFAmero E.164",
52248
52305
  credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
52306
+ currency_code: "o c\xF3digo de moeda",
52249
52307
  iban: "o IBAN",
52250
52308
  jwt: "o JWT",
52251
52309
  template_literal: "a entrada"
@@ -52389,6 +52447,7 @@ var error44 = () => {
52389
52447
  json_string: "o texto JSON",
52390
52448
  e164: "o n\xFAmero E.164",
52391
52449
  credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
52450
+ currency_code: "o c\xF3digo de moeda",
52392
52451
  iban: "o IBAN",
52393
52452
  jwt: "o JWT",
52394
52453
  template_literal: "a entrada"
@@ -52533,6 +52592,7 @@ var error45 = () => {
52533
52592
  json_string: "\u0219ir JSON",
52534
52593
  e164: "num\u0103r E.164",
52535
52594
  credit_card: "num\u0103r de card de credit",
52595
+ currency_code: "cod valutar",
52536
52596
  iban: "IBAN",
52537
52597
  jwt: "JWT",
52538
52598
  template_literal: "intrare"
@@ -52705,6 +52765,7 @@ var error46 = () => {
52705
52765
  json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430",
52706
52766
  e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
52707
52767
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",
52768
+ currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
52708
52769
  iban: "IBAN",
52709
52770
  jwt: "JWT",
52710
52771
  template_literal: "\u0432\u0432\u043E\u0434"
@@ -52823,6 +52884,7 @@ var error47 = () => {
52823
52884
  json_string: "re\u0165azec vo form\xE1te JSON",
52824
52885
  e164: "\u010D\xEDslo E.164",
52825
52886
  credit_card: "\u010D\xEDslo kreditnej karty",
52887
+ currency_code: "k\xF3d meny",
52826
52888
  iban: "IBAN",
52827
52889
  jwt: "JWT",
52828
52890
  template_literal: "vstup"
@@ -52939,6 +53001,7 @@ var error48 = () => {
52939
53001
  json_string: "JSON niz",
52940
53002
  e164: "E.164 \u0161tevilka",
52941
53003
  credit_card: "\u0161tevilka kreditne kartice",
53004
+ currency_code: "koda valute",
52942
53005
  iban: "IBAN",
52943
53006
  jwt: "JWT",
52944
53007
  template_literal: "vnos"
@@ -53053,6 +53116,7 @@ var error49 = () => {
53053
53116
  json_string: "JSON-str\xE4ng",
53054
53117
  e164: "E.164-nummer",
53055
53118
  credit_card: "kreditkortsnummer",
53119
+ currency_code: "valutakod",
53056
53120
  iban: "IBAN",
53057
53121
  jwt: "JWT",
53058
53122
  template_literal: "mall-literal"
@@ -53168,6 +53232,7 @@ var error50 = () => {
53168
53232
  json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD",
53169
53233
  e164: "E.164 \u0B8E\u0BA3\u0BCD",
53170
53234
  credit_card: "\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",
53235
+ currency_code: "\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",
53171
53236
  iban: "IBAN",
53172
53237
  jwt: "JWT",
53173
53238
  template_literal: "input"
@@ -53283,6 +53348,7 @@ var error51 = () => {
53283
53348
  json_string: "\u0441\u0430\u0442\u0440\u0438 JSON",
53284
53349
  e164: "\u0440\u0430\u049B\u0430\u043C\u0438 E.164",
53285
53350
  credit_card: "\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",
53351
+ currency_code: "\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",
53286
53352
  iban: "IBAN",
53287
53353
  jwt: "JWT",
53288
53354
  template_literal: "\u0432\u0443\u0440\u0443\u0434"
@@ -53399,6 +53465,7 @@ var error52 = () => {
53399
53465
  json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
53400
53466
  e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
53401
53467
  credit_card: "\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",
53468
+ currency_code: "\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",
53402
53469
  iban: "IBAN",
53403
53470
  jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
53404
53471
  template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
@@ -53514,6 +53581,7 @@ var error53 = () => {
53514
53581
  json_string: "JSON setiri",
53515
53582
  e164: "E.164 nomeri",
53516
53583
  credit_card: "kredit kartyny\u0148 nomeri",
53584
+ currency_code: "wal\xFDuta kody",
53517
53585
  iban: "IBAN",
53518
53586
  jwt: "JWT",
53519
53587
  template_literal: "\u015Fablon"
@@ -53621,6 +53689,7 @@ var error54 = () => {
53621
53689
  json_string: "JSON dizesi",
53622
53690
  e164: "E.164 say\u0131s\u0131",
53623
53691
  credit_card: "kredi kart\u0131 numaras\u0131",
53692
+ currency_code: "para birimi kodu",
53624
53693
  iban: "IBAN",
53625
53694
  jwt: "JWT",
53626
53695
  template_literal: "\u015Eablon dizesi"
@@ -53731,6 +53800,7 @@ var error55 = () => {
53731
53800
  json_string: "\u0440\u044F\u0434\u043E\u043A JSON",
53732
53801
  e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
53733
53802
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",
53803
+ currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",
53734
53804
  iban: "IBAN",
53735
53805
  jwt: "JWT",
53736
53806
  template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"
@@ -53849,6 +53919,7 @@ var error56 = () => {
53849
53919
  json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",
53850
53920
  e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631",
53851
53921
  credit_card: "\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",
53922
+ currency_code: "\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",
53852
53923
  iban: "IBAN",
53853
53924
  jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",
53854
53925
  template_literal: "\u0627\u0646 \u067E\u0679"
@@ -53964,6 +54035,7 @@ var error57 = () => {
53964
54035
  json_string: "JSON satr",
53965
54036
  e164: "E.164 raqam",
53966
54037
  credit_card: "kredit karta raqami",
54038
+ currency_code: "valyuta kodi",
53967
54039
  iban: "IBAN",
53968
54040
  jwt: "JWT",
53969
54041
  template_literal: "kirish"
@@ -54077,6 +54149,7 @@ var error58 = () => {
54077
54149
  json_string: "chu\u1ED7i JSON",
54078
54150
  e164: "s\u1ED1 E.164",
54079
54151
  credit_card: "s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",
54152
+ currency_code: "m\xE3 ti\u1EC1n t\u1EC7",
54080
54153
  iban: "IBAN",
54081
54154
  jwt: "JWT",
54082
54155
  template_literal: "\u0111\u1EA7u v\xE0o"
@@ -54190,6 +54263,7 @@ var error59 = () => {
54190
54263
  json_string: "JSON\u5B57\u7B26\u4E32",
54191
54264
  e164: "E.164\u53F7\u7801",
54192
54265
  credit_card: "\u4FE1\u7528\u5361\u53F7",
54266
+ currency_code: "\u8D27\u5E01\u4EE3\u7801",
54193
54267
  iban: "IBAN",
54194
54268
  jwt: "JWT",
54195
54269
  template_literal: "\u8F93\u5165"
@@ -54304,6 +54378,7 @@ var error60 = () => {
54304
54378
  json_string: "JSON \u5B57\u4E32",
54305
54379
  e164: "E.164 \u6578\u503C",
54306
54380
  credit_card: "\u4FE1\u7528\u5361\u865F",
54381
+ currency_code: "\u8CA8\u5E63\u4EE3\u78BC",
54307
54382
  iban: "IBAN",
54308
54383
  jwt: "JWT",
54309
54384
  template_literal: "\u8F38\u5165"
@@ -54416,6 +54491,7 @@ var error61 = () => {
54416
54491
  json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON",
54417
54492
  e164: "n\u1ECD\u0301mb\xE0 E.164",
54418
54493
  credit_card: "n\u1ECDmba kaadi gbese",
54494
+ currency_code: "koodu ow\xF3",
54419
54495
  iban: "IBAN",
54420
54496
  jwt: "JWT",
54421
54497
  template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"
@@ -54794,7 +54870,7 @@ function generateChecks(doc, ctx, schema, accessor) {
54794
54870
  generatePropertyCheck(doc, ctx, def, currentAccessor);
54795
54871
  break;
54796
54872
  case "properties":
54797
- generatePropertiesChecks(doc, ctx, def, currentAccessor, false);
54873
+ generatePropertiesChecks(doc, ctx, def, currentAccessor);
54798
54874
  break;
54799
54875
  case "overwrite": {
54800
54876
  const newAccessor = newVar(ctx);
@@ -54904,11 +54980,11 @@ function generateMimeTypeCheck(doc, ctx, def, accessor) {
54904
54980
  doc.write(`if (!${mimeSet}.has(${accessor}.type)) return INVALID;`);
54905
54981
  }
54906
54982
  }
54907
- function generatePropertiesChecks(doc, ctx, def, accessor, schemaRole) {
54983
+ function generatePropertiesChecks(doc, ctx, def, accessor) {
54908
54984
  if (def.when) {
54909
54985
  throw new ZodCompileUnsupportedError(`check with a custom "when" condition`);
54910
54986
  }
54911
- doc.write(schemaRole ? `if (${accessor} === null || (typeof ${accessor} !== "object" && typeof ${accessor} !== "function")) return INVALID;` : `if (${accessor} == null) return INVALID;`);
54987
+ doc.write(`if (${accessor} == null) return INVALID;`);
54912
54988
  const shape = def.shape;
54913
54989
  for (const key of Reflect.ownKeys(shape)) {
54914
54990
  const keyExpr = typeof key === "symbol" ? addConstant(ctx, key) : esc(key);
@@ -54998,7 +55074,7 @@ var PATTERN_IS_COMPLETE = /* @__PURE__ */ new Set([
54998
55074
  "uuid",
54999
55075
  "xid"
55000
55076
  ]);
55001
- function generateStringFormatCheck(doc, ctx, def, accessor) {
55077
+ function generateStringFormatCheck(doc, ctx, def, accessor, needsValue = true) {
55002
55078
  const fmt = def.format;
55003
55079
  if (fmt === "base64") {
55004
55080
  const validator = addConstant(ctx, isValidBase64);
@@ -55038,7 +55114,7 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
55038
55114
  }
55039
55115
  const formatDef = def;
55040
55116
  if (fmt === "url" || fmt === "httpurl" || formatDef.normalize || formatDef.hostname !== void 0 || formatDef.protocol !== void 0) {
55041
- const parseConst = addConstant(ctx, parseURLObject);
55117
+ const parseConst = addConstant(ctx, validateURL);
55042
55118
  const defConst = addConstant(ctx, def);
55043
55119
  const trimVar = newVar(ctx);
55044
55120
  const urlVar = newVar(ctx);
@@ -55053,6 +55129,8 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
55053
55129
  const protocolConst = addConstant(ctx, urlProtocolOk);
55054
55130
  doc.write(`if (!${protocolConst}(${urlVar}, ${defConst}.protocol)) return INVALID;`);
55055
55131
  }
55132
+ if (!needsValue)
55133
+ return null;
55056
55134
  const outputVar = newVar(ctx);
55057
55135
  const outputExpr = formatDef.normalize ? `${urlVar}.href` : `${addConstant(ctx, stripTabAndNewline)}(${trimVar})`;
55058
55136
  doc.write(`const ${outputVar} = ${outputExpr};`);
@@ -55112,7 +55190,7 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
55112
55190
  let typeAccessor;
55113
55191
  switch (type) {
55114
55192
  case "string":
55115
- typeAccessor = generateStringCheck(doc, ctx, schema, accessor);
55193
+ typeAccessor = generateStringCheck(doc, ctx, schema, accessor, buildsValue);
55116
55194
  break;
55117
55195
  case "number":
55118
55196
  typeAccessor = generateNumberCheck(doc, schema, accessor);
@@ -55218,10 +55296,6 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
55218
55296
  case "custom":
55219
55297
  typeAccessor = generateCustomCheck(doc, ctx, schema, accessor);
55220
55298
  break;
55221
- case "properties":
55222
- generatePropertiesChecks(doc, ctx, schema._zod.def, accessor, true);
55223
- typeAccessor = accessor;
55224
- break;
55225
55299
  case "transform":
55226
55300
  typeAccessor = generateTransformCheck(doc, ctx, schema, accessor);
55227
55301
  break;
@@ -55237,12 +55311,12 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
55237
55311
  return null;
55238
55312
  return generateChecks(doc, ctx, schema, typeAccessor);
55239
55313
  }
55240
- function generateStringCheck(doc, ctx, schema, accessor) {
55314
+ function generateStringCheck(doc, ctx, schema, accessor, needsValue = true) {
55241
55315
  doc.write(`if (typeof ${accessor} !== "string") return INVALID;`);
55242
55316
  const def = schema._zod.def;
55243
55317
  if (def.format === void 0)
55244
55318
  return accessor;
55245
- return generateStringFormatCheck(doc, ctx, def, accessor);
55319
+ return generateStringFormatCheck(doc, ctx, def, accessor, needsValue);
55246
55320
  }
55247
55321
  function generateNumberCheck(doc, schema, accessor) {
55248
55322
  doc.write(`if (typeof ${accessor} !== "number" || !Number.isFinite(${accessor})) return INVALID;`);
@@ -56142,20 +56216,18 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
56142
56216
  }
56143
56217
 
56144
56218
  // node_modules/zod/v4/core/api.js
56219
+ function snapshotChecks(def) {
56220
+ if (def.checks)
56221
+ def.checks = [...def.checks];
56222
+ return def;
56223
+ }
56145
56224
  // @__NO_SIDE_EFFECTS__
56146
56225
  function _string(Class2, params) {
56147
- return new Class2({
56148
- type: "string",
56149
- ...normalizeParams(params)
56150
- });
56226
+ return new Class2(snapshotChecks({ type: "string", ...normalizeParams(params) }));
56151
56227
  }
56152
56228
  // @__NO_SIDE_EFFECTS__
56153
56229
  function _coercedString(Class2, params) {
56154
- return new Class2({
56155
- type: "string",
56156
- coerce: true,
56157
- ...normalizeParams(params)
56158
- });
56230
+ return new Class2(snapshotChecks({ type: "string", coerce: true, ...normalizeParams(params) }));
56159
56231
  }
56160
56232
  // @__NO_SIDE_EFFECTS__
56161
56233
  function _email(Class2, params) {
@@ -56459,20 +56531,11 @@ function _isoDuration(Class2, params) {
56459
56531
  }
56460
56532
  // @__NO_SIDE_EFFECTS__
56461
56533
  function _number(Class2, params) {
56462
- return new Class2({
56463
- type: "number",
56464
- checks: [],
56465
- ...normalizeParams(params)
56466
- });
56534
+ return new Class2(snapshotChecks({ type: "number", checks: [], ...normalizeParams(params) }));
56467
56535
  }
56468
56536
  // @__NO_SIDE_EFFECTS__
56469
56537
  function _coercedNumber(Class2, params) {
56470
- return new Class2({
56471
- type: "number",
56472
- coerce: true,
56473
- checks: [],
56474
- ...normalizeParams(params)
56475
- });
56538
+ return new Class2(snapshotChecks({ type: "number", coerce: true, checks: [], ...normalizeParams(params) }));
56476
56539
  }
56477
56540
  // @__NO_SIDE_EFFECTS__
56478
56541
  function _int(Class2, params) {
@@ -56814,9 +56877,8 @@ function _property(property, schema, params) {
56814
56877
  });
56815
56878
  }
56816
56879
  // @__NO_SIDE_EFFECTS__
56817
- function _properties(Class2, shape, params) {
56818
- return new Class2({
56819
- type: "properties",
56880
+ function _properties(shape, params) {
56881
+ return new $ZodCheckProperties({
56820
56882
  check: "properties",
56821
56883
  shape,
56822
56884
  ...normalizeParams(params)
@@ -57451,11 +57513,11 @@ function foldObjects(members2) {
57451
57513
  }
57452
57514
  objects.push(member);
57453
57515
  }
57454
- const properties2 = {};
57516
+ const properties = {};
57455
57517
  const required2 = /* @__PURE__ */ new Set();
57456
57518
  for (const object4 of objects) {
57457
57519
  for (const key in object4.properties) {
57458
- if (Object.prototype.hasOwnProperty.call(properties2, key))
57520
+ if (Object.prototype.hasOwnProperty.call(properties, key))
57459
57521
  continue;
57460
57522
  const parts = [];
57461
57523
  for (const other of objects) {
@@ -57466,12 +57528,12 @@ function foldObjects(members2) {
57466
57528
  parts.push(part);
57467
57529
  }
57468
57530
  const merged = parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts };
57469
- assignProp(properties2, key, merged);
57531
+ assignProp(properties, key, merged);
57470
57532
  }
57471
57533
  for (const key of object4.required ?? [])
57472
57534
  required2.add(key);
57473
57535
  }
57474
- const folded = { type: "object", properties: properties2 };
57536
+ const folded = { type: "object", properties };
57475
57537
  if (required2.size)
57476
57538
  folded.required = [...required2];
57477
57539
  if (objects.every((object4) => object4.additionalProperties === false)) {
@@ -58093,17 +58155,15 @@ var objectProcessor = (schema, ctx, _json, params) => {
58093
58155
  path: [...params.path, "properties", key]
58094
58156
  }));
58095
58157
  }
58096
- const allKeys = new Set(Object.keys(shape));
58097
- const requiredKeys = new Set([...allKeys].filter((key) => {
58158
+ const requiredKeys = [];
58159
+ for (const key of Object.keys(shape)) {
58098
58160
  const field = def.shape[key];
58099
- if (ctx.io === "input") {
58100
- return inputOptin(field) === void 0;
58101
- } else {
58102
- return field._zod.optout === void 0;
58161
+ if (ctx.io === "input" ? inputOptin(field) === void 0 : field._zod.optout === void 0) {
58162
+ requiredKeys.push(key);
58103
58163
  }
58104
- }));
58105
- if (requiredKeys.size > 0) {
58106
- json2.required = Array.from(requiredKeys);
58164
+ }
58165
+ if (requiredKeys.length > 0) {
58166
+ json2.required = requiredKeys;
58107
58167
  }
58108
58168
  if (def.catchall?._zod.def.type === "never") {
58109
58169
  json2.additionalProperties = false;
@@ -58117,31 +58177,6 @@ var objectProcessor = (schema, ctx, _json, params) => {
58117
58177
  });
58118
58178
  }
58119
58179
  };
58120
- var propertiesProcessor = (schema, ctx, _json, params) => {
58121
- const json2 = _json;
58122
- const def = schema._zod.def;
58123
- if (Object.getOwnPropertySymbols(def.shape).length && handleUnrepresentable(schema, ctx, json2, params, "Symbol keys cannot be represented in JSON Schema")) {
58124
- return;
58125
- }
58126
- if (ctx.io === "output") {
58127
- for (const key in def.shape) {
58128
- if (isTransforming(def.shape[key]) && handleUnrepresentable(schema, ctx, json2, params, `z.properties() returns its input, so the output of a transforming schema at key "${key}" cannot be represented in JSON Schema`)) {
58129
- return;
58130
- }
58131
- }
58132
- }
58133
- json2.type = "object";
58134
- json2.properties = {};
58135
- for (const key in def.shape) {
58136
- assignProp(json2.properties, key, processSchema(def.shape[key], ctx, {
58137
- ...params,
58138
- path: [...params.path, "properties", key]
58139
- }));
58140
- }
58141
- const required2 = Object.keys(def.shape).filter((key) => inputOptin(def.shape[key]) === void 0);
58142
- if (required2.length > 0)
58143
- json2.required = required2;
58144
- };
58145
58180
  var unionProcessor = (schema, ctx, json2, params) => {
58146
58181
  const def = schema._zod.def;
58147
58182
  const isExclusive = def.inclusive === false;
@@ -58461,7 +58496,6 @@ var allProcessors = {
58461
58496
  file: fileProcessor,
58462
58497
  success: successProcessor,
58463
58498
  custom: customProcessor,
58464
- properties: propertiesProcessor,
58465
58499
  function: functionProcessor,
58466
58500
  transform: transformProcessor,
58467
58501
  map: mapProcessor,
@@ -58658,7 +58692,6 @@ __export(schemas_exports3, {
58658
58692
  ZodPrefault: () => ZodPrefault,
58659
58693
  ZodPreprocess: () => ZodPreprocess,
58660
58694
  ZodPromise: () => ZodPromise,
58661
- ZodProperties: () => ZodProperties,
58662
58695
  ZodReadonly: () => ZodReadonly,
58663
58696
  ZodRecord: () => ZodRecord,
58664
58697
  ZodSet: () => ZodSet,
@@ -58696,6 +58729,7 @@ __export(schemas_exports3, {
58696
58729
  creditCard: () => creditCard2,
58697
58730
  cuid: () => cuid3,
58698
58731
  cuid2: () => cuid22,
58732
+ currencyCode: () => currencyCode2,
58699
58733
  custom: () => custom,
58700
58734
  date: () => date2,
58701
58735
  describe: () => describe2,
@@ -58750,7 +58784,6 @@ __export(schemas_exports3, {
58750
58784
  prefault: () => prefault,
58751
58785
  preprocess: () => preprocess3,
58752
58786
  promise: () => promise,
58753
- properties: () => properties,
58754
58787
  readonly: () => readonly,
58755
58788
  record: () => record3,
58756
58789
  refine: () => refine,
@@ -58804,6 +58837,7 @@ __export(checks_exports2, {
58804
58837
  normalize: () => _normalize,
58805
58838
  overwrite: () => _overwrite,
58806
58839
  positive: () => _positive,
58840
+ properties: () => _properties,
58807
58841
  property: () => _property,
58808
58842
  regex: () => _regex,
58809
58843
  size: () => _size,
@@ -59263,8 +59297,8 @@ function url3(params) {
59263
59297
  }
59264
59298
  function httpUrl(params) {
59265
59299
  return _url(ZodURL, {
59266
- protocol: regexes_exports.httpProtocol,
59267
- hostname: regexes_exports.domain,
59300
+ protocol: httpProtocol,
59301
+ hostname: domain,
59268
59302
  ...util_exports.normalizeParams(params)
59269
59303
  });
59270
59304
  }
@@ -59402,10 +59436,13 @@ function stringFormat(format, fnOrRegex, _params = {}) {
59402
59436
  return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
59403
59437
  }
59404
59438
  function hostname2(_params) {
59405
- return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params);
59439
+ return _stringFormat(ZodCustomStringFormat, "hostname", hostname, _params);
59406
59440
  }
59407
59441
  function hex2(_params) {
59408
- return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params);
59442
+ return _stringFormat(ZodCustomStringFormat, "hex", hex, _params);
59443
+ }
59444
+ function currencyCode2(_params) {
59445
+ return _stringFormat(ZodCustomStringFormat, "currency_code", currencyCode, _params);
59409
59446
  }
59410
59447
  function hash(alg, params) {
59411
59448
  const enc6 = params?.enc ?? "hex";
@@ -60270,14 +60307,6 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
60270
60307
  ZodType.init(inst, def);
60271
60308
  inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
60272
60309
  });
60273
- var ZodProperties = /* @__PURE__ */ $constructor("ZodProperties", (inst, def) => {
60274
- _ensureDefaultMemoizer();
60275
- $ZodProperties.init(inst, def);
60276
- ZodType.init(inst, def);
60277
- });
60278
- function properties(shape, params) {
60279
- return _properties(ZodProperties, shape, params);
60280
- }
60281
60310
  function check(fn) {
60282
60311
  const ch = new $ZodCheck({
60283
60312
  check: "custom"
@@ -60301,7 +60330,7 @@ var ZodInstanceOf = /* @__PURE__ */ $constructor("ZodInstanceOf", (inst, def) =>
60301
60330
  ZodCustom.init(inst, def);
60302
60331
  }, {
60303
60332
  properties(shape, params) {
60304
- return this.check(properties(shape, params));
60333
+ return this.check(_properties(shape, params));
60305
60334
  }
60306
60335
  });
60307
60336
  function _instanceof(cls, params = {}) {
@@ -60888,10 +60917,10 @@ function convertBaseSchema(schema, ctx) {
60888
60917
  }
60889
60918
  case "object": {
60890
60919
  const shape = {};
60891
- const properties2 = schema.properties || {};
60920
+ const properties = schema.properties || {};
60892
60921
  const requiredSet = new Set(schema.required || []);
60893
60922
  const additionalSchema = typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : void 0;
60894
- for (const [key, propSchema] of Object.entries(properties2)) {
60923
+ for (const [key, propSchema] of Object.entries(properties)) {
60895
60924
  const propZodSchema = convertSchema(propSchema, ctx);
60896
60925
  assignProp(shape, key, requiredSet.has(key) ? propZodSchema : propZodSchema.optional());
60897
60926
  }
@@ -61252,18 +61281,6 @@ function visit(schema, fnOrHandlers) {
61252
61281
  const { _cachedInner, ...rest } = def;
61253
61282
  return clone(s, { ...rest, getter: () => run(original()) });
61254
61283
  }
61255
- case "properties": {
61256
- const oldShape = def.shape;
61257
- let changed = false;
61258
- const newShape = {};
61259
- for (const k of Reflect.ownKeys(oldShape)) {
61260
- const mapped = run(oldShape[k]);
61261
- if (mapped !== oldShape[k])
61262
- changed = true;
61263
- newShape[k] = mapped;
61264
- }
61265
- return changed ? clone(s, { ...def, shape: newShape }) : s;
61266
- }
61267
61284
  // A leaf by choice: `parts` are regex fragments, not data positions.
61268
61285
  case "template_literal":
61269
61286
  // Leaves.
@@ -61459,17 +61476,73 @@ Hint: ${err.hint}`);
61459
61476
  }
61460
61477
  throw err;
61461
61478
  }
61479
+ function mcpRequestFrom(args) {
61480
+ const ctx = args.at(-1);
61481
+ if (typeof ctx !== "object" || ctx === null)
61482
+ return void 0;
61483
+ const req = ctx.mcpReq;
61484
+ if (typeof req !== "object" || req === null)
61485
+ return void 0;
61486
+ return typeof req.notify === "function" ? req : void 0;
61487
+ }
61488
+ function callSignalFrom(args) {
61489
+ const ctx = args.at(-1);
61490
+ if (typeof ctx !== "object" || ctx === null)
61491
+ return void 0;
61492
+ const req = ctx.mcpReq;
61493
+ if (typeof req !== "object" || req === null)
61494
+ return void 0;
61495
+ const signal = req.signal;
61496
+ return signal instanceof AbortSignal ? signal : void 0;
61497
+ }
61498
+ function declaredCapabilitiesFrom(server) {
61499
+ const inner = server.server;
61500
+ if (typeof inner !== "object" || inner === null)
61501
+ return void 0;
61502
+ const read = inner.getClientCapabilities;
61503
+ if (typeof read !== "function")
61504
+ return void 0;
61505
+ try {
61506
+ const declared = read.call(inner);
61507
+ return typeof declared === "object" && declared !== null ? declared : void 0;
61508
+ } catch {
61509
+ return void 0;
61510
+ }
61511
+ }
61462
61512
  function surfaceToolHints(server) {
61463
61513
  const register2 = server.registerTool.bind(server);
61464
- server.registerTool = (name, config2, cb) => register2(name, config2, (...args) => {
61465
- let result;
61466
- try {
61467
- result = cb(...args);
61468
- } catch (err) {
61469
- return hintResultOrRethrow(err);
61470
- }
61471
- return result instanceof Promise ? result.catch(hintResultOrRethrow) : result;
61472
- });
61514
+ server.registerTool = (name, config2, cb) => register2(name, config2, (...args) => (
61515
+ // THE CALLER'S CANCELLATION, made ambient for the whole handler
61516
+ // (`cancel/index.ts`). The SDK delivers it and the fleet ignored it:
61517
+ // measured against @modelcontextprotocol/server 2.0.0, a cancelled
61518
+ // call aborts `ctx.mcpReq.signal` with the caller's reason and the
61519
+ // handler runs to completion regardless — so the HTTP request stays
61520
+ // in flight, the child keeps burning metered CPU, and the upstream
61521
+ // keeps being hit for somebody who has gone. claude.ai sent 101
61522
+ // cancellations in the week to 2026-09-20.
61523
+ //
61524
+ // Here because this is the one wrapper every tool already passes
61525
+ // through: threading the signal by hand would mean editing several
61526
+ // hundred handlers and missing exactly the ones nobody edits.
61527
+ withCallSignal(callSignalFrom(args), () => (
61528
+ // WHAT THE CALLER CAN DO, made ambient for the same reason and in
61529
+ // the same place (`caller/index.ts`). Only the 2025-era half needs
61530
+ // the wrapper — a 2026-07-28 request answers for itself off its own
61531
+ // envelope — but a guarded tool that cannot tell whether the caller
61532
+ // can be shown a prompt returns one the SDK then refuses to deliver,
61533
+ // and that refusal reaches the caller as an unexplained protocol
61534
+ // error it had no chance to catch.
61535
+ withCallerCapabilities(declaredCapabilitiesFrom(server), () => {
61536
+ let result;
61537
+ try {
61538
+ result = cb(...args);
61539
+ } catch (err) {
61540
+ return hintResultOrRethrow(err);
61541
+ }
61542
+ return result instanceof Promise ? result.catch(hintResultOrRethrow) : result;
61543
+ })
61544
+ ), mcpRequestFrom(args))
61545
+ ));
61473
61546
  }
61474
61547
  async function createMcpServer(opts) {
61475
61548
  const server = new McpServer({ name: opts.name, version: opts.version }, { supportedProtocolVersions: [...SERVER_PROTOCOL_VERSIONS] });
@@ -61484,13 +61557,47 @@ async function createMcpServer(opts) {
61484
61557
  }
61485
61558
  return server;
61486
61559
  }
61560
+ var DEFAULT_SHUTDOWN_TIMEOUT_MS = 5e3;
61561
+ var DEFAULT_REPEAT_SIGNAL_GRACE_MS = 500;
61487
61562
  function withGracefulShutdown(target, opts = {}) {
61488
61563
  const shouldExit = opts.exit ?? true;
61564
+ if (opts.timeoutMs !== void 0 && !(Number.isFinite(opts.timeoutMs) && opts.timeoutMs > 0)) {
61565
+ throw new RangeError("withGracefulShutdown: timeoutMs must be a finite number greater than 0.");
61566
+ }
61567
+ const timeoutMs = opts.timeoutMs ?? DEFAULT_SHUTDOWN_TIMEOUT_MS;
61568
+ if (opts.repeatSignalGraceMs !== void 0 && !(Number.isFinite(opts.repeatSignalGraceMs) && opts.repeatSignalGraceMs >= 0)) {
61569
+ throw new RangeError("withGracefulShutdown: repeatSignalGraceMs must be a finite number >= 0.");
61570
+ }
61571
+ const repeatGraceMs = opts.repeatSignalGraceMs ?? DEFAULT_REPEAT_SIGNAL_GRACE_MS;
61489
61572
  let shuttingDown = false;
61573
+ let firstSignalAt = 0;
61574
+ let exited = false;
61575
+ const exitOnce = () => {
61576
+ if (exited)
61577
+ return;
61578
+ exited = true;
61579
+ process.exit(0);
61580
+ };
61490
61581
  const handler = (signal) => {
61491
- if (shuttingDown)
61582
+ if (shuttingDown) {
61583
+ if (Date.now() - firstSignalAt < repeatGraceMs)
61584
+ return;
61585
+ if (shouldExit) {
61586
+ console.error(`[mcp-utils] second ${signal} during shutdown \u2014 exiting now`);
61587
+ exitOnce();
61588
+ }
61492
61589
  return;
61590
+ }
61493
61591
  shuttingDown = true;
61592
+ firstSignalAt = Date.now();
61593
+ let timer;
61594
+ if (shouldExit) {
61595
+ timer = setTimeout(() => {
61596
+ console.error(`[mcp-utils] graceful shutdown on ${signal} did not finish in ${timeoutMs}ms \u2014 exiting`);
61597
+ exitOnce();
61598
+ }, timeoutMs);
61599
+ timer.unref?.();
61600
+ }
61494
61601
  void (async () => {
61495
61602
  try {
61496
61603
  if (opts.onSignal)
@@ -61499,8 +61606,10 @@ function withGracefulShutdown(target, opts = {}) {
61499
61606
  } catch (err) {
61500
61607
  console.error(`[mcp-utils] error during graceful shutdown on ${signal}: ${err instanceof Error ? err.message : String(err)}`);
61501
61608
  } finally {
61609
+ if (timer !== void 0)
61610
+ clearTimeout(timer);
61502
61611
  if (shouldExit)
61503
- process.exit(0);
61612
+ exitOnce();
61504
61613
  }
61505
61614
  })();
61506
61615
  };
@@ -61707,6 +61816,33 @@ var pageSchema = {
61707
61816
  };
61708
61817
 
61709
61818
  // node_modules/@chrischall/mcp-utils/dist/auth/index.js
61819
+ var OAuth2RefreshError = class extends McpToolError {
61820
+ status;
61821
+ constructor(status, message, opts) {
61822
+ super(message, opts);
61823
+ this.name = "OAuth2RefreshError";
61824
+ this.status = status;
61825
+ Object.setPrototypeOf(this, new.target.prototype);
61826
+ }
61827
+ };
61828
+ var OAuth2RotationPersistError = class extends McpToolError {
61829
+ persistenceFailure = true;
61830
+ result;
61831
+ constructor(result, cause) {
61832
+ super(`OAuth2 refresh token rotated, but saving it failed: ${truncateErrorMessage(messageOf2(cause), 200)}`, {
61833
+ hint: "The new refresh token is still held in memory; fix the storage problem before the process restarts.",
61834
+ cause
61835
+ });
61836
+ this.name = "OAuth2RotationPersistError";
61837
+ this.result = result;
61838
+ Object.setPrototypeOf(this, new.target.prototype);
61839
+ }
61840
+ };
61841
+ function isRetryable(err) {
61842
+ if (!(err instanceof OAuth2RefreshError))
61843
+ return true;
61844
+ return err.status >= 500 || err.status === 429 || err.status === 408;
61845
+ }
61710
61846
  var sleep2 = (ms) => ms > 0 ? new Promise((r) => setTimeout(r, ms)) : Promise.resolve();
61711
61847
  function createOAuth2Refresher(opts) {
61712
61848
  const doFetch = opts.fetchImpl ?? fetch;
@@ -61714,10 +61850,13 @@ function createOAuth2Refresher(opts) {
61714
61850
  const maxRetries = opts.retry?.count ?? 0;
61715
61851
  const retryDelayMs = opts.retry?.delayMs ?? 0;
61716
61852
  let inFlight = null;
61853
+ let currentRefreshToken = opts.refreshToken;
61854
+ const spent = /* @__PURE__ */ new Set();
61855
+ let rotatedTo;
61717
61856
  async function exchangeOnce() {
61718
61857
  const body = new URLSearchParams({
61719
61858
  grant_type: grantType,
61720
- refresh_token: opts.refreshToken,
61859
+ refresh_token: currentRefreshToken,
61721
61860
  ...opts.params
61722
61861
  }).toString();
61723
61862
  const res = await doFetch(opts.endpoint, {
@@ -61730,7 +61869,7 @@ function createOAuth2Refresher(opts) {
61730
61869
  });
61731
61870
  if (!res.ok) {
61732
61871
  const errText = await res.text().catch(() => "");
61733
- throw createHelpfulError(`OAuth2 token refresh failed: ${res.status} ${res.statusText}: ${truncateErrorMessage(errText, 200)}`, { hint: "The refresh token may be expired or revoked \u2014 re-authenticate." });
61872
+ throw new OAuth2RefreshError(res.status, `OAuth2 token refresh failed: ${res.status} ${res.statusText}: ${truncateErrorMessage(errText, 200)}`, { hint: "The refresh token may be expired or revoked \u2014 re-authenticate." });
61734
61873
  }
61735
61874
  const data = await res.json().catch(() => null);
61736
61875
  const accessToken = data?.access_token;
@@ -61742,6 +61881,11 @@ function createOAuth2Refresher(opts) {
61742
61881
  const result = { accessToken };
61743
61882
  if (typeof data?.refresh_token === "string" && data.refresh_token.length > 0) {
61744
61883
  result.refreshToken = data.refresh_token;
61884
+ if (data.refresh_token !== currentRefreshToken) {
61885
+ spent.add(currentRefreshToken);
61886
+ currentRefreshToken = data.refresh_token;
61887
+ rotatedTo = data.refresh_token;
61888
+ }
61745
61889
  }
61746
61890
  if (typeof data?.expires_in === "number") {
61747
61891
  result.expiresIn = data.expires_in;
@@ -61756,16 +61900,32 @@ function createOAuth2Refresher(opts) {
61756
61900
  return await exchangeOnce();
61757
61901
  } catch (e) {
61758
61902
  lastErr = e;
61903
+ if (!isRetryable(e))
61904
+ break;
61759
61905
  if (attempt < maxRetries)
61760
61906
  await sleep2(retryDelayMs);
61761
61907
  }
61762
61908
  }
61763
61909
  throw lastErr instanceof Error ? lastErr : new Error(String(lastErr));
61764
61910
  }
61765
- return function refresh() {
61911
+ return function refresh(refreshToken) {
61766
61912
  if (inFlight)
61767
61913
  return inFlight;
61768
- const p = exchangeWithRetry().finally(() => {
61914
+ if (typeof refreshToken === "string" && refreshToken.length > 0 && !spent.has(refreshToken)) {
61915
+ currentRefreshToken = refreshToken;
61916
+ }
61917
+ const p = (async () => {
61918
+ rotatedTo = void 0;
61919
+ const result = await exchangeWithRetry();
61920
+ if (rotatedTo !== void 0 && opts.onRotate) {
61921
+ try {
61922
+ await opts.onRotate(rotatedTo);
61923
+ } catch (err) {
61924
+ throw new OAuth2RotationPersistError(result, err);
61925
+ }
61926
+ }
61927
+ return result;
61928
+ })().finally(() => {
61769
61929
  if (inFlight === p)
61770
61930
  inFlight = null;
61771
61931
  });
@@ -61773,6 +61933,9 @@ function createOAuth2Refresher(opts) {
61773
61933
  return p;
61774
61934
  };
61775
61935
  }
61936
+ function messageOf2(err) {
61937
+ return err instanceof Error ? err.message : String(err);
61938
+ }
61776
61939
 
61777
61940
  // node_modules/@fetchproxy/protocol/dist/crypto.js
61778
61941
  var subtle = globalThis.crypto.subtle;
@@ -61971,6 +62134,7 @@ var KNOWN_CAPABILITIES = /* @__PURE__ */ new Set([
61971
62134
  "capture_redirect",
61972
62135
  "read_indexed_db",
61973
62136
  "read_dom",
62137
+ "read_dom_list",
61974
62138
  "download",
61975
62139
  "graphql",
61976
62140
  "write_cookies"
@@ -62471,6 +62635,79 @@ function assertDomSelectorsArray(value, label) {
62471
62635
  }
62472
62636
  }
62473
62637
  }
62638
+ function assertDomListSelectorsArray(value, label) {
62639
+ if (!Array.isArray(value)) {
62640
+ throw new ProtocolError3(`${label}: expected array, got ${typeof value}`);
62641
+ }
62642
+ const seen = /* @__PURE__ */ new Set();
62643
+ for (let i = 0; i < value.length; i++) {
62644
+ const entry = value[i];
62645
+ assertObject(entry, `${label}[${i}]`);
62646
+ if (entry.name === void 0) {
62647
+ throw new ProtocolError3(`${label}[${i}].name: missing`);
62648
+ }
62649
+ if (entry.itemSelector === void 0) {
62650
+ throw new ProtocolError3(`${label}[${i}].itemSelector: missing`);
62651
+ }
62652
+ if (entry.fields === void 0) {
62653
+ throw new ProtocolError3(`${label}[${i}].fields: missing`);
62654
+ }
62655
+ if (typeof entry.name !== "string" || !SCOPE_KEY_RE.test(entry.name)) {
62656
+ throw new ProtocolError3(`${label}[${i}].name: invalid ${JSON.stringify(entry.name)}`);
62657
+ }
62658
+ if (typeof entry.itemSelector !== "string" || !DOM_SELECTOR_RE.test(entry.itemSelector)) {
62659
+ throw new ProtocolError3(`${label}[${i}].itemSelector: invalid ${JSON.stringify(entry.itemSelector)}`);
62660
+ }
62661
+ if (!Array.isArray(entry.fields) || entry.fields.length === 0) {
62662
+ throw new ProtocolError3(`${label}[${i}].fields: expected non-empty array`);
62663
+ }
62664
+ const fieldNames = /* @__PURE__ */ new Set();
62665
+ for (let j = 0; j < entry.fields.length; j++) {
62666
+ const field = entry.fields[j];
62667
+ const fieldLabel = `${label}[${i}].fields[${j}]`;
62668
+ assertObject(field, fieldLabel);
62669
+ if (field.name === void 0) {
62670
+ throw new ProtocolError3(`${fieldLabel}.name: missing`);
62671
+ }
62672
+ if (typeof field.name !== "string" || !SCOPE_KEY_RE.test(field.name)) {
62673
+ throw new ProtocolError3(`${fieldLabel}.name: invalid ${JSON.stringify(field.name)}`);
62674
+ }
62675
+ if (field.selector !== void 0) {
62676
+ if (typeof field.selector !== "string" || !DOM_SELECTOR_RE.test(field.selector)) {
62677
+ throw new ProtocolError3(`${fieldLabel}.selector: invalid ${JSON.stringify(field.selector)}`);
62678
+ }
62679
+ }
62680
+ if (field.attribute !== void 0) {
62681
+ if (typeof field.attribute !== "string" || !DOM_ATTRIBUTE_RE.test(field.attribute)) {
62682
+ throw new ProtocolError3(`${fieldLabel}.attribute: invalid ${JSON.stringify(field.attribute)}`);
62683
+ }
62684
+ }
62685
+ if (fieldNames.has(field.name)) {
62686
+ throw new ProtocolError3(`${label}[${i}].fields: duplicate name ${JSON.stringify(field.name)}`);
62687
+ }
62688
+ fieldNames.add(field.name);
62689
+ for (const k of Object.keys(field)) {
62690
+ if (k !== "name" && k !== "selector" && k !== "attribute") {
62691
+ throw new ProtocolError3(`${fieldLabel}: unexpected field ${JSON.stringify(k)}`);
62692
+ }
62693
+ }
62694
+ }
62695
+ if (entry.maxItems !== void 0) {
62696
+ if (typeof entry.maxItems !== "number" || !Number.isInteger(entry.maxItems) || entry.maxItems < 1 || entry.maxItems > 1e3) {
62697
+ throw new ProtocolError3(`${label}[${i}].maxItems: invalid ${JSON.stringify(entry.maxItems)}`);
62698
+ }
62699
+ }
62700
+ if (seen.has(entry.name)) {
62701
+ throw new ProtocolError3(`${label}: duplicate name ${JSON.stringify(entry.name)}`);
62702
+ }
62703
+ seen.add(entry.name);
62704
+ for (const k of Object.keys(entry)) {
62705
+ if (k !== "name" && k !== "itemSelector" && k !== "fields" && k !== "maxItems") {
62706
+ throw new ProtocolError3(`${label}[${i}]: unexpected field ${JSON.stringify(k)}`);
62707
+ }
62708
+ }
62709
+ }
62710
+ }
62474
62711
  function assertGraphqlOpsArray(value, label) {
62475
62712
  if (!Array.isArray(value)) {
62476
62713
  throw new ProtocolError3(`${label}: expected array, got ${typeof value}`);
@@ -62517,6 +62754,8 @@ function validateFrame(raw) {
62517
62754
  return validateHelloRejected(raw);
62518
62755
  if (t === "extension-disconnected")
62519
62756
  return { type: "extension-disconnected" };
62757
+ if (t === "peer-gone")
62758
+ return validatePeerGone(raw);
62520
62759
  throw new ProtocolError3(`unknown frame type: ${String(t)}`);
62521
62760
  }
62522
62761
  function validateHello(raw) {
@@ -62587,16 +62826,11 @@ function validateHello(raw) {
62587
62826
  if (raw.domSelectors !== void 0) {
62588
62827
  assertDomSelectorsArray(raw.domSelectors, "hello.domSelectors");
62589
62828
  }
62590
- if (raw.accepts !== void 0) {
62591
- if (!Array.isArray(raw.accepts)) {
62592
- throw new ProtocolError3("hello.accepts: expected array");
62593
- }
62594
- for (const a of raw.accepts) {
62595
- if (typeof a !== "string") {
62596
- throw new ProtocolError3(`hello.accepts: entry must be string, got ${typeof a}`);
62597
- }
62598
- }
62829
+ if (raw.domListSelectors !== void 0) {
62830
+ assertDomListSelectorsArray(raw.domListSelectors, "hello.domListSelectors");
62599
62831
  }
62832
+ if (raw.accepts !== void 0)
62833
+ assertAcceptsList(raw.accepts);
62600
62834
  if (raw.graphqlOps !== void 0) {
62601
62835
  assertGraphqlOpsArray(raw.graphqlOps, "hello.graphqlOps");
62602
62836
  }
@@ -62618,6 +62852,8 @@ function validateHello(raw) {
62618
62852
  assertBase64(raw.identityX25519Pub, "hello.identityX25519Pub");
62619
62853
  assertBase64(raw.identityEd25519Pub, "hello.identityEd25519Pub");
62620
62854
  assertBase64(raw.sessionNonce, "hello.sessionNonce");
62855
+ if (raw.accepts !== void 0)
62856
+ assertAcceptsList(raw.accepts);
62621
62857
  return raw;
62622
62858
  }
62623
62859
  throw new ProtocolError3(`hello.role: must be 'server' or 'extension', got ${String(role)}`);
@@ -62673,6 +62909,27 @@ function validatePairPending(raw) {
62673
62909
  }
62674
62910
  return { type: "pair-pending", mcpId: raw.mcpId, pairCode: raw.pairCode };
62675
62911
  }
62912
+ function assertAcceptsList(accepts) {
62913
+ if (!Array.isArray(accepts)) {
62914
+ throw new ProtocolError3("hello.accepts: expected array");
62915
+ }
62916
+ for (const a of accepts) {
62917
+ if (typeof a !== "string") {
62918
+ throw new ProtocolError3(`hello.accepts: entry must be string, got ${typeof a}`);
62919
+ }
62920
+ }
62921
+ }
62922
+ function validatePeerGone(raw) {
62923
+ assertString(raw.mcpId, "peer-gone.mcpId");
62924
+ if (!isValidMcpId(raw.mcpId))
62925
+ throw new ProtocolError3("peer-gone.mcpId: invalid format");
62926
+ for (const k of Object.keys(raw)) {
62927
+ if (k !== "type" && k !== "mcpId") {
62928
+ throw new ProtocolError3(`peer-gone: unexpected field ${JSON.stringify(k)}`);
62929
+ }
62930
+ }
62931
+ return { type: "peer-gone", mcpId: raw.mcpId };
62932
+ }
62676
62933
  function validateHelloRejected(raw) {
62677
62934
  assertString(raw.mcpId, "hello-rejected.mcpId");
62678
62935
  if (!isValidMcpId(raw.mcpId))
@@ -62922,6 +63179,24 @@ function validateInnerRequest(raw) {
62922
63179
  }
62923
63180
  return raw;
62924
63181
  }
63182
+ if (raw.op === "read_dom_list") {
63183
+ assertObject(raw.init, "inner.init");
63184
+ if (raw.init.origin === void 0)
63185
+ throw new ProtocolError3("inner.init.origin: missing");
63186
+ if (raw.init.name === void 0)
63187
+ throw new ProtocolError3("inner.init.name: missing");
63188
+ assertHttpsOriginOnly(raw.init.origin, "inner.init.origin");
63189
+ assertString(raw.init.name, "inner.init.name");
63190
+ if (raw.init.name.length === 0) {
63191
+ throw new ProtocolError3("inner.init.name: must be non-empty");
63192
+ }
63193
+ for (const k of Object.keys(raw.init)) {
63194
+ if (k !== "origin" && k !== "name") {
63195
+ throw new ProtocolError3(`inner.init: unexpected field ${JSON.stringify(k)} on read_dom_list`);
63196
+ }
63197
+ }
63198
+ return raw;
63199
+ }
62925
63200
  if (raw.op === "graphql_query") {
62926
63201
  assertObject(raw.init, "inner.init");
62927
63202
  if (raw.init.name === void 0)
@@ -62969,7 +63244,7 @@ function validateInnerRequest(raw) {
62969
63244
  }
62970
63245
  return raw;
62971
63246
  }
62972
- throw new ProtocolError3(`inner.op: must be one of "fetch", "read_cookies", "read_local_storage", "read_session_storage", "capture_request_header", "capture_redirect", "read_indexed_db", "read_dom", "download", "graphql_query", "write_cookies"; got ${JSON.stringify(raw.op)}`);
63247
+ throw new ProtocolError3(`inner.op: must be one of "fetch", "read_cookies", "read_local_storage", "read_session_storage", "capture_request_header", "capture_redirect", "read_indexed_db", "read_dom", "read_dom_list", "download", "graphql_query", "write_cookies"; got ${JSON.stringify(raw.op)}`);
62973
63248
  }
62974
63249
  function assertNonEmptyKeyArray(value, label) {
62975
63250
  if (!Array.isArray(value)) {
@@ -63077,6 +63352,18 @@ function validateInnerResponse(raw) {
63077
63352
  assertStringMap(raw.values, "inner.values");
63078
63353
  return raw;
63079
63354
  }
63355
+ if (op === "read_dom_list") {
63356
+ if (raw.rows === void 0) {
63357
+ throw new ProtocolError3("inner.rows: missing on read_dom_list response");
63358
+ }
63359
+ if (!Array.isArray(raw.rows)) {
63360
+ throw new ProtocolError3("inner.rows: expected array, got " + typeof raw.rows);
63361
+ }
63362
+ for (const [i, row] of raw.rows.entries()) {
63363
+ assertStringMap(row, `inner.rows[${i}]`);
63364
+ }
63365
+ return raw;
63366
+ }
63080
63367
  if (op === "graphql_query") {
63081
63368
  if (raw.data === void 0) {
63082
63369
  throw new ProtocolError3("inner.data: missing on graphql_query response");
@@ -63178,12 +63465,6 @@ async function sealInnerFrame(sessionKey, mcpId, seq, inner, direction) {
63178
63465
  ciphertext: toB64(ct)
63179
63466
  };
63180
63467
  }
63181
- async function openEncryptedFrame(sessionKey, frame, direction) {
63182
- const result = await openEncryptedFrameDetailed(sessionKey, frame, direction);
63183
- if (result.stage === "ok")
63184
- return result.inner;
63185
- throw result.error instanceof Error ? result.error : new Error(String(result.error));
63186
- }
63187
63468
  async function openEncryptedFrameDetailed(sessionKey, frame, direction) {
63188
63469
  let pt;
63189
63470
  try {
@@ -63335,6 +63616,18 @@ async function buildServerHello(opts) {
63335
63616
  ...d.attribute !== void 0 ? { attribute: d.attribute } : {}
63336
63617
  }));
63337
63618
  }
63619
+ if (opts.domListSelectors && opts.domListSelectors.length > 0) {
63620
+ hello.domListSelectors = opts.domListSelectors.map((d) => ({
63621
+ name: d.name,
63622
+ itemSelector: d.itemSelector,
63623
+ fields: d.fields.map((f) => ({
63624
+ name: f.name,
63625
+ ...f.selector !== void 0 ? { selector: f.selector } : {},
63626
+ ...f.attribute !== void 0 ? { attribute: f.attribute } : {}
63627
+ })),
63628
+ ...d.maxItems !== void 0 ? { maxItems: d.maxItems } : {}
63629
+ }));
63630
+ }
63338
63631
  if (opts.graphqlOps && opts.graphqlOps.length > 0) {
63339
63632
  hello.graphqlOps = opts.graphqlOps.map((d) => ({
63340
63633
  name: d.name,
@@ -63503,11 +63796,12 @@ async function awaitSessionReady(ready, opts) {
63503
63796
  }
63504
63797
 
63505
63798
  // node_modules/@fetchproxy/server/dist/extension-trust.js
63506
- import { readFile as readFile2, writeFile as writeFile2, rename as rename2, unlink as unlink2, mkdir as mkdir2, chmod as chmod2 } from "node:fs/promises";
63799
+ import { readFile as readFile2, writeFile as writeFile2, rename as rename2, unlink as unlink2, mkdir as mkdir2, chmod as chmod2, rm as rm2 } from "node:fs/promises";
63800
+ import { randomBytes as randomBytes2 } from "node:crypto";
63507
63801
  import { isAbsolute as isAbsolute2, join as join2 } from "node:path";
63508
63802
 
63509
63803
  // node_modules/@fetchproxy/server/dist/identity.js
63510
- import { readFile, readdir, writeFile, mkdir, chmod, rename, rm, unlink } from "node:fs/promises";
63804
+ import { readFile, readdir, writeFile, mkdir, chmod, rename, rm, unlink, link, lstat } from "node:fs/promises";
63511
63805
  import { randomBytes } from "node:crypto";
63512
63806
  import { isAbsolute, join } from "node:path";
63513
63807
  import { homedir } from "node:os";
@@ -63575,7 +63869,7 @@ async function openIdentityDir(dir) {
63575
63869
  }
63576
63870
  }
63577
63871
  var STAGING_BYTES = 6;
63578
- async function sweepStagingFiles(dir, serverName) {
63872
+ async function sweepStagingFiles(dir, serverName, opts = {}) {
63579
63873
  const base = safeIdentityFileBase(serverName).replace(/[.]/g, "\\.");
63580
63874
  const staging = new RegExp(`^${base}\\.json\\.[0-9a-f]{${STAGING_BYTES * 2}}\\.tmp$`);
63581
63875
  let names;
@@ -63584,35 +63878,80 @@ async function sweepStagingFiles(dir, serverName) {
63584
63878
  } catch {
63585
63879
  return;
63586
63880
  }
63587
- await Promise.all(names.filter((name) => staging.test(name)).map((name) => unlink(join(dir, name)).catch(() => void 0)));
63881
+ const cutoff = opts.olderThanMs === void 0 ? null : Date.now() - opts.olderThanMs;
63882
+ await Promise.all(names.filter((name) => staging.test(name)).map(async (name) => {
63883
+ const path = join(dir, name);
63884
+ if (cutoff !== null) {
63885
+ const st = await lstat(path).catch(() => null);
63886
+ if (st === null || st.mtimeMs > cutoff)
63887
+ return;
63888
+ }
63889
+ await unlink(path).catch(() => void 0);
63890
+ }));
63588
63891
  }
63589
- async function writeIdentityFile(dir, serverName, id) {
63892
+ async function loadOrCreateIdentity(serverName, dir = defaultIdentityDir()) {
63590
63893
  const path = identityFilePath(dir, serverName);
63591
63894
  await openIdentityDir(dir);
63592
- await sweepStagingFiles(dir, serverName);
63593
- const tmp = `${path}.${randomBytes(STAGING_BYTES).toString("hex")}.tmp`;
63594
63895
  try {
63595
- await writeFile(tmp, serializeIdentity(id), { mode: 384, flag: "wx" });
63596
- await chmod(tmp, 384);
63597
- await rename(tmp, path);
63896
+ return parseIdentity(await readFile(path, "utf8"));
63598
63897
  } catch (e) {
63599
- await rm(tmp, { force: true });
63600
- throw e;
63898
+ if (e.code !== "ENOENT" && !(e instanceof SyntaxError))
63899
+ throw e;
63601
63900
  }
63602
- return path;
63901
+ let unreadable = null;
63902
+ for (let attempt = 0; attempt < 5; attempt++) {
63903
+ const id = await generateIdentity();
63904
+ if (await publishIdentityIfAbsent(dir, serverName, id))
63905
+ return id;
63906
+ try {
63907
+ return parseIdentity(await readFile(path, "utf8"));
63908
+ } catch (e) {
63909
+ if (e.code === "ENOENT") {
63910
+ continue;
63911
+ }
63912
+ if (!(e instanceof SyntaxError))
63913
+ throw e;
63914
+ unreadable = e;
63915
+ await new Promise((r) => setTimeout(r, 20 * (attempt + 1)));
63916
+ }
63917
+ }
63918
+ if (unreadable !== null)
63919
+ throw unreadable;
63920
+ throw new Error(`fetchproxy: could not create an identity for ${JSON.stringify(serverName)} in ${dir}`);
63603
63921
  }
63604
- async function loadOrCreateIdentity(serverName, dir = defaultIdentityDir()) {
63922
+ var NO_HARD_LINKS = /* @__PURE__ */ new Set(["EPERM", "ENOTSUP", "EOPNOTSUPP", "ENOSYS"]);
63923
+ async function publishIdentityIfAbsent(dir, serverName, id) {
63605
63924
  const path = identityFilePath(dir, serverName);
63606
- await openIdentityDir(dir);
63925
+ await sweepStagingFiles(dir, serverName, { olderThanMs: 6e4 });
63926
+ const tmp = `${path}.${randomBytes(STAGING_BYTES).toString("hex")}.tmp`;
63607
63927
  try {
63608
- return parseIdentity(await readFile(path, "utf8"));
63928
+ await writeFile(tmp, serializeIdentity(id), { mode: 384, flag: "wx" });
63929
+ await chmod(tmp, 384);
63930
+ try {
63931
+ await link(tmp, path);
63932
+ } catch (e) {
63933
+ const code = e.code;
63934
+ if (code === void 0 || !NO_HARD_LINKS.has(code))
63935
+ throw e;
63936
+ try {
63937
+ await writeFile(path, serializeIdentity(id), { mode: 384, flag: "wx" });
63938
+ } catch (writeErr) {
63939
+ if (writeErr.code !== "EEXIST") {
63940
+ await rm(path, { force: true }).catch(() => void 0);
63941
+ }
63942
+ throw writeErr;
63943
+ }
63944
+ await chmod(path, 384);
63945
+ }
63946
+ return true;
63609
63947
  } catch (e) {
63610
- if (e.code !== "ENOENT")
63611
- throw e;
63948
+ const code = e.code;
63949
+ if (code === "EEXIST" || code === "ENOENT")
63950
+ return false;
63951
+ throw e;
63952
+ } finally {
63953
+ await rm(tmp, { force: true });
63612
63954
  }
63613
- const id = await generateIdentity();
63614
- await writeIdentityFile(dir, serverName, id);
63615
- return id;
63616
63955
  }
63617
63956
 
63618
63957
  // node_modules/@fetchproxy/server/dist/extension-trust.js
@@ -63713,10 +64052,15 @@ async function readExtensionPin(serverName, dir = defaultTrustDir()) {
63713
64052
  async function writeExtensionPin(serverName, pin, dir = defaultTrustDir()) {
63714
64053
  const path = extensionTrustPath(serverName, dir);
63715
64054
  await mkdir2(dir, { recursive: true, mode: 448 });
63716
- const tmp = `${path}.tmp`;
63717
- await writeFile2(tmp, JSON.stringify(pin, null, 2), { mode: 384 });
63718
- await chmod2(tmp, 384);
63719
- await rename2(tmp, path);
64055
+ const tmp = `${path}.${randomBytes2(6).toString("hex")}.tmp`;
64056
+ try {
64057
+ await writeFile2(tmp, JSON.stringify(pin, null, 2), { mode: 384, flag: "wx" });
64058
+ await chmod2(tmp, 384);
64059
+ await rename2(tmp, path);
64060
+ } catch (e) {
64061
+ await rm2(tmp, { force: true });
64062
+ throw e;
64063
+ }
63720
64064
  }
63721
64065
 
63722
64066
  // node_modules/@fetchproxy/server/dist/host.js
@@ -63753,6 +64097,7 @@ function originVerdict(origin, allowLocal) {
63753
64097
  var HANDSHAKE_TIMEOUT_MS = 15e3;
63754
64098
  var MAX_PAYLOAD_BYTES = MAX_FRAME_BYTES;
63755
64099
  var enc4 = new TextEncoder();
64100
+ var OWN_DECRYPT_FAILURES_BEFORE_REHANDSHAKE = 3;
63756
64101
  async function startHost(opts) {
63757
64102
  const allowLocalOrigins = envAllowsLocalOrigins();
63758
64103
  if (allowLocalOrigins) {
@@ -63796,6 +64141,7 @@ async function startHost(opts) {
63796
64141
  localStoragePointers: opts.ownLocalStoragePointers,
63797
64142
  sessionStoragePointers: opts.ownSessionStoragePointers,
63798
64143
  domSelectors: opts.ownDomSelectors,
64144
+ domListSelectors: opts.ownDomListSelectors,
63799
64145
  graphqlOps: opts.ownGraphqlOps
63800
64146
  };
63801
64147
  const generateSessionKeypair = opts.generateSessionKeypair ?? generateX25519;
@@ -63866,6 +64212,31 @@ async function startHost(opts) {
63866
64212
  return null;
63867
64213
  }
63868
64214
  };
64215
+ let ownDecryptFailures = 0;
64216
+ const rehandshakeOwnSession = async (ws) => {
64217
+ const hello = extensionHello;
64218
+ if (extensionWs !== ws || !hello)
64219
+ return;
64220
+ console.warn(`[fetchproxy] ${opts.ownServerName}: ${OWN_DECRYPT_FAILURES_BEFORE_REHANDSHAKE} frames in a row from the extension failed authentication under this MCP's session key \u2014 re-handshaking this MCP's session (the extension stays connected).`);
64221
+ ownSession = dropOwnSessionAndEphemeral();
64222
+ resetSessionPromise();
64223
+ const mintedKeypair = await generateSessionKeypair();
64224
+ const mintedHello = await buildServerHello({
64225
+ ...ownHelloBase,
64226
+ sessionPub: mintedKeypair.publicKey,
64227
+ answersExtNonce: fromB64(hello.sessionNonce)
64228
+ });
64229
+ if (extensionWs !== ws || extensionHello !== hello || ownSession !== null) {
64230
+ mintedKeypair.privateKey.fill(0);
64231
+ return;
64232
+ }
64233
+ installOwnEphemeral({
64234
+ nonce: fromB64(mintedHello.sessionNonce),
64235
+ pub: mintedKeypair.publicKey,
64236
+ priv: mintedKeypair.privateKey
64237
+ });
64238
+ ws.send(JSON.stringify(mintedHello));
64239
+ };
63869
64240
  wss.on("connection", (ws) => {
63870
64241
  let identified = null;
63871
64242
  let peerMcpId = null;
@@ -64056,6 +64427,7 @@ async function startHost(opts) {
64056
64427
  if (extensionWs !== ws)
64057
64428
  return;
64058
64429
  ownSession = new SessionState(key);
64430
+ ownDecryptFailures = 0;
64059
64431
  ownPendingPairCode = null;
64060
64432
  resolveOwnSession(ownSession);
64061
64433
  } else {
@@ -64077,15 +64449,42 @@ async function startHost(opts) {
64077
64449
  }
64078
64450
  if (claim2 !== "ok")
64079
64451
  return;
64080
- let inner;
64452
+ let result;
64081
64453
  try {
64082
- inner = await openEncryptedFrame(session.sessionKey, frame, "e2s");
64454
+ result = await openEncryptedFrameDetailed(session.sessionKey, frame, "e2s");
64083
64455
  } catch (e) {
64084
64456
  session.releaseInboundSeq(frame.seq);
64085
64457
  throw e;
64086
64458
  }
64459
+ if (result.stage === "decrypt-failed") {
64460
+ session.releaseInboundSeq(frame.seq);
64461
+ console.warn(`[fetchproxy] ${opts.ownServerName}: dropped an inbound frame (seq ${frame.seq}) that failed authentication \u2014 most likely a straggler from a previous session.`);
64462
+ if (session === ownSession) {
64463
+ ownDecryptFailures += 1;
64464
+ if (ownDecryptFailures >= OWN_DECRYPT_FAILURES_BEFORE_REHANDSHAKE) {
64465
+ ownDecryptFailures = 0;
64466
+ void rehandshakeOwnSession(ws).catch((e) => console.error(`[fetchproxy] ${opts.ownServerName}: re-handshake failed:`, e));
64467
+ }
64468
+ }
64469
+ return;
64470
+ }
64471
+ if (session === ownSession)
64472
+ ownDecryptFailures = 0;
64087
64473
  session.commitInboundSeq(frame.seq);
64088
- ownInnerListeners.forEach((cb) => cb(inner));
64474
+ if (result.stage === "ok") {
64475
+ ownInnerListeners.forEach((cb) => cb(result.inner));
64476
+ } else {
64477
+ console.error("[fetchproxy] host: received a frame that decrypted OK but failed validation:", result.error);
64478
+ const recoveredId = result.recoveredId;
64479
+ if (recoveredId !== void 0) {
64480
+ ownInnerListeners.forEach((cb) => cb({
64481
+ type: "response",
64482
+ id: recoveredId,
64483
+ ok: false,
64484
+ error: `malformed response failed protocol validation: ${String(result.error)}`
64485
+ }));
64486
+ }
64487
+ }
64089
64488
  } else {
64090
64489
  const slot = peers.get(frame.mcpId);
64091
64490
  if (slot)
@@ -64144,6 +64543,7 @@ async function startHost(opts) {
64144
64543
  rejectOwnSession(new Error("extension disconnected before ready"));
64145
64544
  }
64146
64545
  ownSession = dropOwnSessionAndEphemeral();
64546
+ ownDecryptFailures = 0;
64147
64547
  ownPendingPairCode = null;
64148
64548
  resetSessionPromise();
64149
64549
  disconnectListeners.forEach((cb) => cb());
@@ -64158,8 +64558,15 @@ async function startHost(opts) {
64158
64558
  }
64159
64559
  }
64160
64560
  if (identified === "peer" && peerMcpId) {
64161
- if (peers.get(peerMcpId)?.ws === ws)
64561
+ if (peers.get(peerMcpId)?.ws === ws) {
64162
64562
  peers.delete(peerMcpId);
64563
+ if (extensionWs && extensionHello?.accepts?.includes("peer-gone")) {
64564
+ try {
64565
+ extensionWs.send(JSON.stringify({ type: "peer-gone", mcpId: peerMcpId }));
64566
+ } catch {
64567
+ }
64568
+ }
64569
+ }
64163
64570
  }
64164
64571
  });
64165
64572
  });
@@ -64202,12 +64609,18 @@ async function startHost(opts) {
64202
64609
  }
64203
64610
 
64204
64611
  // node_modules/@fetchproxy/server/dist/peer.js
64612
+ var PEER_DIAL_TIMEOUT_MS = 5e3;
64205
64613
  var enc5 = new TextEncoder();
64614
+ function notSentError() {
64615
+ return new Error("fetchproxy: request not sent \u2014 the connection to the bridge host closed before it went out, so nothing reached the browser. It is safe to retry.");
64616
+ }
64206
64617
  async function startPeer(opts) {
64207
64618
  const ws = new import_websocket.default(`ws://${opts.host}:${opts.port}`, {
64208
64619
  maxPayload: opts.maxPayloadBytes ?? MAX_PAYLOAD_BYTES
64209
64620
  });
64621
+ const dialTimeoutMs = opts.dialTimeoutMs ?? PEER_DIAL_TIMEOUT_MS;
64210
64622
  await new Promise((resolve2, reject) => {
64623
+ let timer;
64211
64624
  const onOpen = () => {
64212
64625
  cleanup();
64213
64626
  resolve2();
@@ -64217,11 +64630,21 @@ async function startPeer(opts) {
64217
64630
  reject(e);
64218
64631
  };
64219
64632
  const cleanup = () => {
64633
+ if (timer !== void 0)
64634
+ clearTimeout(timer);
64220
64635
  ws.off("open", onOpen);
64221
64636
  ws.off("error", onError);
64222
64637
  };
64223
64638
  ws.once("open", onOpen);
64224
64639
  ws.once("error", onError);
64640
+ if (dialTimeoutMs > 0) {
64641
+ timer = setTimeout(() => {
64642
+ cleanup();
64643
+ ws.on("error", () => void 0);
64644
+ ws.terminate();
64645
+ reject(new Error(`fetchproxy: the process holding ${opts.host}:${opts.port} did not answer the WebSocket upgrade within ${dialTimeoutMs}ms \u2014 it may be wedged or not a fetchproxy host. Restart the MCP that owns the port (or free it) and retry.`));
64646
+ }, dialTimeoutMs);
64647
+ }
64225
64648
  });
64226
64649
  ws.on("error", (e) => {
64227
64650
  console.warn(`[fetchproxy] peer: socket error: ${String(e)}`);
@@ -64240,6 +64663,7 @@ async function startPeer(opts) {
64240
64663
  captureHeaders: opts.captureHeaders,
64241
64664
  indexedDbScopes: opts.indexedDbScopes,
64242
64665
  domSelectors: opts.domSelectors,
64666
+ domListSelectors: opts.domListSelectors,
64243
64667
  localStoragePointers: opts.localStoragePointers,
64244
64668
  sessionStoragePointers: opts.sessionStoragePointers,
64245
64669
  graphqlOps: opts.graphqlOps,
@@ -64263,6 +64687,7 @@ async function startPeer(opts) {
64263
64687
  const renegotiateListeners = [];
64264
64688
  const pendingPairListeners = [];
64265
64689
  const closeListeners = [];
64690
+ const extensionDisconnectListeners = [];
64266
64691
  let session = null;
64267
64692
  let sessionEphemeral = null;
64268
64693
  function dropSessionEphemeral() {
@@ -64282,10 +64707,24 @@ async function startPeer(opts) {
64282
64707
  let warnedUnverifiablePairCode = false;
64283
64708
  let resolveFirstReady;
64284
64709
  let rejectFirstReady;
64285
- const sessionPromise = new Promise((resolve2, reject) => {
64286
- resolveFirstReady = resolve2;
64287
- rejectFirstReady = reject;
64288
- });
64710
+ let sessionPromise;
64711
+ let sessionPromiseSettled = false;
64712
+ function resetSessionPromise() {
64713
+ sessionPromiseSettled = false;
64714
+ sessionPromise = new Promise((resolve2, reject) => {
64715
+ resolveFirstReady = (st) => {
64716
+ sessionPromiseSettled = true;
64717
+ resolve2(st);
64718
+ };
64719
+ rejectFirstReady = (e) => {
64720
+ sessionPromiseSettled = true;
64721
+ reject(e);
64722
+ };
64723
+ });
64724
+ sessionPromise.catch(() => {
64725
+ });
64726
+ }
64727
+ resetSessionPromise();
64289
64728
  let extensionHello = null;
64290
64729
  let extensionGone = false;
64291
64730
  let cachedPin = void 0;
@@ -64382,6 +64821,12 @@ async function startPeer(opts) {
64382
64821
  extensionGone = true;
64383
64822
  dropSessionEphemeral();
64384
64823
  pendingPairCode = null;
64824
+ if (session !== null) {
64825
+ session = null;
64826
+ if (sessionPromiseSettled)
64827
+ resetSessionPromise();
64828
+ }
64829
+ extensionDisconnectListeners.forEach((cb) => cb());
64385
64830
  return;
64386
64831
  }
64387
64832
  if (frame.type === "ready" && frame.mcpId === opts.mcpId) {
@@ -64498,19 +64943,30 @@ async function startPeer(opts) {
64498
64943
  }
64499
64944
  closeListeners.forEach((cb) => cb());
64500
64945
  });
64501
- sessionPromise.catch(() => {
64502
- });
64503
64946
  const handle = {
64504
64947
  ws,
64505
- session: sessionPromise,
64948
+ // A getter: `extension-disconnected` replaces the promise (B-BUG-5).
64949
+ get session() {
64950
+ return sessionPromise;
64951
+ },
64506
64952
  sendInner: async (inner) => {
64507
- await awaitSessionReady(sessionPromise, {
64508
- mcpId: opts.mcpId,
64509
- pendingPairCode: () => pendingPairCode
64510
- });
64953
+ try {
64954
+ await awaitSessionReady(sessionPromise, {
64955
+ mcpId: opts.mcpId,
64956
+ pendingPairCode: () => pendingPairCode
64957
+ });
64958
+ } catch (e) {
64959
+ if (ws.readyState !== import_websocket.default.OPEN)
64960
+ throw notSentError();
64961
+ throw e;
64962
+ }
64511
64963
  const s = session;
64964
+ if (s === null)
64965
+ throw new Error("peer: extension disconnected");
64512
64966
  const plaintext = encodeOutboundInnerFrame(opts.mcpId, inner);
64513
64967
  const sealed = await sealInnerFrame(s.sessionKey, opts.mcpId, s.nextOutboundSeq(), plaintext, "s2e");
64968
+ if (ws.readyState !== import_websocket.default.OPEN)
64969
+ throw notSentError();
64514
64970
  ws.send(JSON.stringify(sealed));
64515
64971
  },
64516
64972
  onInner: (cb) => {
@@ -64528,6 +64984,9 @@ async function startPeer(opts) {
64528
64984
  onClose: (cb) => {
64529
64985
  closeListeners.push(cb);
64530
64986
  },
64987
+ onExtensionDisconnect: (cb) => {
64988
+ extensionDisconnectListeners.push(cb);
64989
+ },
64531
64990
  close: () => ws.close()
64532
64991
  };
64533
64992
  return handle;
@@ -64535,15 +64994,15 @@ async function startPeer(opts) {
64535
64994
 
64536
64995
  // node_modules/@fetchproxy/server/dist/error-kind.js
64537
64996
  function classifyFetchError(error62) {
64997
+ if (/^(in-page )?fetch threw:/.test(error62)) {
64998
+ return "tab_fetch_failed";
64999
+ }
64538
65000
  if (/Could not establish connection/i.test(error62) || /Receiving end does not exist/i.test(error62)) {
64539
65001
  return "content_script_unreachable";
64540
65002
  }
64541
65003
  if (/^tab fetch failed:/.test(error62)) {
64542
65004
  return "tab_fetch_failed";
64543
65005
  }
64544
- if (/^(in-page )?fetch threw:/.test(error62)) {
64545
- return "tab_fetch_failed";
64546
- }
64547
65006
  if (/^no tab matching /.test(error62)) {
64548
65007
  return "no_tab";
64549
65008
  }
@@ -64735,6 +65194,17 @@ var FetchproxyTimeoutError = class extends FetchproxyProtocolError {
64735
65194
  * the message says which number that was and where it came from.
64736
65195
  */
64737
65196
  requestedTimeoutMs;
65197
+ /**
65198
+ * B-BUG-1: whether re-sending this request is safe. A timeout only means
65199
+ * the reply did not arrive in time — the extension may already have run the
65200
+ * request in the tab — so this is `false` for a non-idempotent `fetch`
65201
+ * (anything but GET/HEAD/OPTIONS) the caller did not mark `retryOnTimeout`,
65202
+ * for `download` and `writeCookies`, and for `graphqlQuery` unless the
65203
+ * caller marked it `retryOnTimeout` (a declared operation may be a
65204
+ * mutation). `retryOnceOnTimeout` honours it. Defaults to `true` (the read
65205
+ * verbs).
65206
+ */
65207
+ retrySafe;
64738
65208
  constructor(args) {
64739
65209
  const graceMs = args.graceMs ?? VERB_DEADLINE_GRACE_MS;
64740
65210
  const callerChose = args.requestedTimeoutMs !== void 0 && args.timeoutMs === args.requestedTimeoutMs + graceMs;
@@ -64747,6 +65217,7 @@ var FetchproxyTimeoutError = class extends FetchproxyProtocolError {
64747
65217
  this.elapsedMs = args.elapsedMs ?? args.timeoutMs;
64748
65218
  this.retryAttempted = args.retryAttempted ?? false;
64749
65219
  this.requestedTimeoutMs = args.requestedTimeoutMs ?? null;
65220
+ this.retrySafe = args.retrySafe ?? true;
64750
65221
  }
64751
65222
  };
64752
65223
  var SUBDOMAIN_LABEL_RE = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
@@ -64786,6 +65257,32 @@ function assertUrlInDomains(field, url4, domains) {
64786
65257
  throw new Error(`FetchproxyServer: ${field} host "${host}" is outside declared domains [${declared}] \u2014 must be one of them or a subdomain`);
64787
65258
  }
64788
65259
  var DEFAULT_JSON_OK_STATUSES = [200, 201, 202, 204];
65260
+ function parseJsonBody(response) {
65261
+ if (response.status === 204 || response.body.trim() === "")
65262
+ return null;
65263
+ return JSON.parse(response.body);
65264
+ }
65265
+ var TIMEOUT_RETRY_SAFE_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
65266
+ function isRetrySafeOnTimeout(method, retryOnTimeout) {
65267
+ if (retryOnTimeout !== void 0)
65268
+ return retryOnTimeout;
65269
+ return TIMEOUT_RETRY_SAFE_METHODS.has(method.toUpperCase());
65270
+ }
65271
+ function isResendableRequest(inner) {
65272
+ switch (inner.op) {
65273
+ case "fetch":
65274
+ return isRetrySafeOnTimeout(inner.init.method);
65275
+ case "write_cookies":
65276
+ case "download":
65277
+ // A declared GraphQL operation may be a mutation; the server holds only
65278
+ // its name, so it cannot tell. `graphqlQuery({ retryOnTimeout: true })`
65279
+ // passes `resendable` explicitly for a known query.
65280
+ case "graphql_query":
65281
+ return false;
65282
+ default:
65283
+ return true;
65284
+ }
65285
+ }
64789
65286
  var FetchproxyServer = class {
64790
65287
  /**
64791
65288
  * Bridge role. `null` until the first verb call (or an explicit
@@ -64834,12 +65331,22 @@ var FetchproxyServer = class {
64834
65331
  pendingRedirect = /* @__PURE__ */ new Map();
64835
65332
  // 0.4.0+: read_indexed_db awaiters resolve a JSON-typed values map.
64836
65333
  pendingIdb = /* @__PURE__ */ new Map();
65334
+ // 3.1.0+: read_dom_list awaiters resolve an array of field-value rows —
65335
+ // a different shape from `pendingStorage`'s single map, so its own map.
65336
+ pendingDomList = /* @__PURE__ */ new Map();
64837
65337
  // download awaiters resolve the saved-file metadata (path + size + mime).
64838
65338
  pendingDownload = /* @__PURE__ */ new Map();
64839
65339
  // 1.x+: graphql_query awaiters resolve the GraphQL `data` object. Its
64840
65340
  // shape is operation-specific, so the awaiter resolves `unknown` and the
64841
65341
  // caller narrows.
64842
65342
  pendingGraphql = /* @__PURE__ */ new Map();
65343
+ /**
65344
+ * B-BUG-6: the frames of in-flight requests that are safe to send again
65345
+ * if the host that relayed them exits before replying (see
65346
+ * `recoverFromHostLoss`). Keyed by request id; an entry outlives its
65347
+ * request only until the next prune or response.
65348
+ */
65349
+ resendable = /* @__PURE__ */ new Map();
64843
65350
  mcpId = null;
64844
65351
  identity = null;
64845
65352
  // 0.5.3+: in-flight role-election / handle-start promise. Set the
@@ -64885,7 +65392,7 @@ var FetchproxyServer = class {
64885
65392
  }
64886
65393
  for (const c of opts.capabilities) {
64887
65394
  if (!KNOWN_CAPABILITIES.has(c)) {
64888
- throw new Error(`FetchproxyServer: unknown capability ${JSON.stringify(c)} \u2014 known values: ["fetch", "read_cookies"]`);
65395
+ throw new Error(`FetchproxyServer: unknown capability ${JSON.stringify(c)} \u2014 known values: ${JSON.stringify([...KNOWN_CAPABILITIES])}`);
64889
65396
  }
64890
65397
  }
64891
65398
  capabilities = [...opts.capabilities];
@@ -64932,6 +65439,16 @@ var FetchproxyServer = class {
64932
65439
  selector: d.selector,
64933
65440
  ...d.attribute !== void 0 ? { attribute: d.attribute } : {}
64934
65441
  })),
65442
+ domListSelectors: (opts.domListSelectors ?? []).map((d) => ({
65443
+ name: d.name,
65444
+ itemSelector: d.itemSelector,
65445
+ fields: d.fields.map((f) => ({
65446
+ name: f.name,
65447
+ ...f.selector !== void 0 ? { selector: f.selector } : {},
65448
+ ...f.attribute !== void 0 ? { attribute: f.attribute } : {}
65449
+ })),
65450
+ ...d.maxItems !== void 0 ? { maxItems: d.maxItems } : {}
65451
+ })),
64935
65452
  graphqlOps: (opts.graphqlOps ?? []).map((d) => ({
64936
65453
  name: d.name,
64937
65454
  operationName: d.operationName
@@ -65061,6 +65578,7 @@ var FetchproxyServer = class {
65061
65578
  ownLocalStoragePointers: this.opts.localStoragePointers,
65062
65579
  ownSessionStoragePointers: this.opts.sessionStoragePointers,
65063
65580
  ownDomSelectors: this.opts.domSelectors,
65581
+ ownDomListSelectors: this.opts.domListSelectors,
65064
65582
  ownGraphqlOps: this.opts.graphqlOps,
65065
65583
  onPairCode: this.opts.onPairCode,
65066
65584
  extensionTrust: this.extensionTrust()
@@ -65092,6 +65610,7 @@ var FetchproxyServer = class {
65092
65610
  localStoragePointers: this.opts.localStoragePointers,
65093
65611
  sessionStoragePointers: this.opts.sessionStoragePointers,
65094
65612
  domSelectors: this.opts.domSelectors,
65613
+ domListSelectors: this.opts.domListSelectors,
65095
65614
  graphqlOps: this.opts.graphqlOps,
65096
65615
  extensionTrust: this.extensionTrust(),
65097
65616
  requireExtensionIdentity: this.opts.requireExtensionIdentity
@@ -65101,6 +65620,10 @@ var FetchproxyServer = class {
65101
65620
  this.stopKeepalive();
65102
65621
  this.rejectAllPending();
65103
65622
  });
65623
+ this.peerHandle.onExtensionDisconnect(() => {
65624
+ this.stopKeepalive();
65625
+ this.rejectAllPending();
65626
+ });
65104
65627
  this.peerHandle.onPendingPair((code) => {
65105
65628
  this.rejectAllPending(this.pairingErrorMessage(code));
65106
65629
  });
@@ -65112,9 +65635,9 @@ var FetchproxyServer = class {
65112
65635
  if (this.closing || this.peerHandle === null)
65113
65636
  return;
65114
65637
  this.stopKeepalive();
65115
- this.rejectAllPending();
65116
65638
  this.peerHandle = null;
65117
65639
  this.role = null;
65640
+ void this.recoverFromHostLoss();
65118
65641
  });
65119
65642
  }
65120
65643
  }
@@ -65135,7 +65658,7 @@ var FetchproxyServer = class {
65135
65658
  * only when the bridge itself failed (no signed-in tab, extension
65136
65659
  * offline, etc.).
65137
65660
  */
65138
- async fetch(init) {
65661
+ async fetch(init, fetchOpts = {}) {
65139
65662
  await this.ensureConnected();
65140
65663
  const pendingCode = this.currentPendingPairCode();
65141
65664
  if (pendingCode !== null) {
@@ -65147,16 +65670,17 @@ var FetchproxyServer = class {
65147
65670
  retryAttempted: false
65148
65671
  };
65149
65672
  }
65150
- const first = await this._fetchOnceWithTimeout(init);
65673
+ const first = await this._fetchOnceWithTimeout(init, fetchOpts);
65151
65674
  const reviveMs = this.opts.bridgeReviveDelayMs;
65152
65675
  const isColdStartSymptom = !first.ok && (first.kind === "content_script_unreachable" || first.kind === "timeout");
65153
65676
  if (isColdStartSymptom) {
65154
65677
  this.lastEvictionDetectedAt = Date.now();
65155
65678
  }
65156
- if (isColdStartSymptom && reviveMs !== void 0 && reviveMs > 0) {
65679
+ const retryable = isColdStartSymptom && (first.kind === "content_script_unreachable" || isRetrySafeOnTimeout(init.method, fetchOpts.retryOnTimeout));
65680
+ if (retryable && reviveMs !== void 0 && reviveMs > 0) {
65157
65681
  this.lazyReviveAttempts += 1;
65158
65682
  await new Promise((r) => setTimeout(r, reviveMs));
65159
- const second = await this._fetchOnceWithTimeout(init);
65683
+ const second = await this._fetchOnceWithTimeout(init, fetchOpts);
65160
65684
  if (second.ok) {
65161
65685
  this.lazyReviveSuccesses += 1;
65162
65686
  this.recordSuccess();
@@ -65305,13 +65829,16 @@ var FetchproxyServer = class {
65305
65829
  * one of the op maps — request ids are unique) so it doesn't leak until the
65306
65830
  * server closes, then rethrow.
65307
65831
  */
65308
- async sendInnerFrame(inner) {
65832
+ async sendInnerFrame(inner, opts = {}) {
65309
65833
  try {
65310
65834
  if (this.hostHandle) {
65311
65835
  await this.hostHandle.sendOwnInner(inner);
65312
65836
  } else if (this.peerHandle) {
65313
65837
  await this.peerHandle.sendInner(inner);
65314
65838
  }
65839
+ if (inner.type === "request" && (opts.resendable ?? isResendableRequest(inner))) {
65840
+ this.noteResendable(inner);
65841
+ }
65315
65842
  } catch (err) {
65316
65843
  if ("id" in inner && typeof inner.id === "number") {
65317
65844
  const { id } = inner;
@@ -65323,6 +65850,7 @@ var FetchproxyServer = class {
65323
65850
  this.pendingRedirect.delete(id);
65324
65851
  this.pendingDownload.delete(id);
65325
65852
  this.pendingIdb.delete(id);
65853
+ this.pendingDomList.delete(id);
65326
65854
  this.pendingGraphql.delete(id);
65327
65855
  }
65328
65856
  throw err;
@@ -65333,13 +65861,25 @@ var FetchproxyServer = class {
65333
65861
  * On timeout returns the `{ok:false, kind:'timeout'}` envelope —
65334
65862
  * the throwing surface is the convenience methods.
65335
65863
  */
65336
- async _fetchOnceWithTimeout(init) {
65864
+ async _fetchOnceWithTimeout(init, fetchOpts = {}) {
65337
65865
  const id = this.nextRequestId++;
65338
65866
  const inner = { type: "request", id, op: "fetch", init };
65339
65867
  const pending = this.guardPending(new Promise((resolve2) => {
65340
65868
  this.pending.set(id, resolve2);
65341
65869
  }));
65342
- await this.sendInnerFrame(inner);
65870
+ try {
65871
+ await this.sendInnerFrame(inner, {
65872
+ resendable: isRetrySafeOnTimeout(init.method, fetchOpts.retryOnTimeout)
65873
+ });
65874
+ } catch (err) {
65875
+ return {
65876
+ ok: false,
65877
+ error: err instanceof Error ? err.message : String(err),
65878
+ kind: "session_not_ready",
65879
+ retryAttempted: false,
65880
+ cause: err
65881
+ };
65882
+ }
65343
65883
  const timeoutMs = this.opts.fetchTimeoutMs;
65344
65884
  if (timeoutMs === void 0 || timeoutMs <= 0)
65345
65885
  return pending;
@@ -65413,7 +65953,7 @@ var FetchproxyServer = class {
65413
65953
  });
65414
65954
  return pending;
65415
65955
  }
65416
- async _withVerbTimeout(pending, pendingMap, id, url4, requestedTimeoutMs) {
65956
+ async _withVerbTimeout(pending, pendingMap, id, url4, requestedTimeoutMs, retrySafe = true) {
65417
65957
  const transportMs = this.opts.fetchTimeoutMs;
65418
65958
  if (transportMs === void 0 || transportMs <= 0)
65419
65959
  return pending;
@@ -65434,6 +65974,7 @@ var FetchproxyServer = class {
65434
65974
  port: this.opts.port,
65435
65975
  elapsedMs: Date.now() - start,
65436
65976
  retryAttempted: false,
65977
+ retrySafe,
65437
65978
  graceMs,
65438
65979
  ...requestedTimeoutMs !== void 0 ? { requestedTimeoutMs } : {}
65439
65980
  }));
@@ -65451,7 +65992,7 @@ var FetchproxyServer = class {
65451
65992
  * logic re-implemented inline) `captureRequestHeader()` agree on what
65452
65993
  * to throw.
65453
65994
  */
65454
- _typedErrorFor(result, url4, op, retryAttempted) {
65995
+ _typedErrorFor(result, url4, op, retryAttempted, retrySafe = true) {
65455
65996
  if (result.kind === "timeout") {
65456
65997
  return new FetchproxyTimeoutError({
65457
65998
  url: url4,
@@ -65459,7 +66000,8 @@ var FetchproxyServer = class {
65459
66000
  role: this.role,
65460
66001
  port: this.opts.port,
65461
66002
  elapsedMs: result.elapsedMs,
65462
- retryAttempted
66003
+ retryAttempted,
66004
+ retrySafe
65463
66005
  });
65464
66006
  }
65465
66007
  if (result.kind === "content_script_unreachable") {
@@ -65533,9 +66075,12 @@ var FetchproxyServer = class {
65533
66075
  // every version before this option existed.
65534
66076
  ...opts.credentials === "omit" ? { credentials: "omit" } : {}
65535
66077
  };
65536
- const result = await this.fetch(init);
66078
+ const result = await this.fetch(init, opts.retryOnTimeout !== void 0 ? { retryOnTimeout: opts.retryOnTimeout } : {});
65537
66079
  if (!result.ok) {
65538
- throw this._typedErrorFor(result, init.url, "fetch", result.retryAttempted ?? false);
66080
+ if (result.kind === "session_not_ready" && result.cause instanceof Error) {
66081
+ throw result.cause;
66082
+ }
66083
+ throw this._typedErrorFor(result, init.url, "fetch", result.retryAttempted ?? false, isRetrySafeOnTimeout(method, opts.retryOnTimeout));
65539
66084
  }
65540
66085
  const response = {
65541
66086
  status: result.status,
@@ -65575,17 +66120,21 @@ var FetchproxyServer = class {
65575
66120
  * GET a path and parse the response body as JSON. Throws
65576
66121
  * `FetchproxyHttpError` if the status is outside the default 2xx
65577
66122
  * happy-path set (`[200, 201, 202, 204]`); pass a custom
65578
- * `expectStatus` to override.
66123
+ * `expectStatus` to override. A 204 or an empty/whitespace body
66124
+ * resolves to `null` (the declared `T` does not say so, to keep
66125
+ * existing call sites compiling — include `| null` in `T` if the
66126
+ * endpoint can answer empty).
65579
66127
  */
65580
66128
  async getJson(path, opts = {}) {
65581
66129
  const response = await this.get(path, this.applyJsonDefaults(opts));
65582
- return JSON.parse(response.body);
66130
+ return parseJsonBody(response);
65583
66131
  }
65584
66132
  /**
65585
66133
  * POST a JSON body and parse the response body as JSON. The body is
65586
66134
  * `JSON.stringify`'d; `Content-Type: application/json` is set unless
65587
66135
  * the caller already provided one. Defaults `expectStatus` to the 2xx
65588
- * happy-path set.
66136
+ * happy-path set. A 204 or an empty/whitespace body resolves to `null`
66137
+ * rather than throwing after the write already happened (see `getJson`).
65589
66138
  */
65590
66139
  async postJson(path, body, opts = {}) {
65591
66140
  const headers = { ...opts.headers ?? {} };
@@ -65597,7 +66146,7 @@ var FetchproxyServer = class {
65597
66146
  headers,
65598
66147
  body: body === void 0 ? void 0 : JSON.stringify(body)
65599
66148
  });
65600
- return JSON.parse(response.body);
66149
+ return parseJsonBody(response);
65601
66150
  }
65602
66151
  /**
65603
66152
  * GET a path and return the response body as a string. Throws
@@ -65618,7 +66167,8 @@ var FetchproxyServer = class {
65618
66167
  * - adds `Content-Type: application/json` only for a non-GET request
65619
66168
  * that carries a `body` (and only if the caller didn't set one);
65620
66169
  * - `JSON.stringify`s the body (GET / no-body sends nothing);
65621
- * - treats a `204` or an empty body as `data: null` (no parse);
66170
+ * - treats a `204`, an empty body, or a whitespace-only body as
66171
+ * `data: null` (no parse), the same rule as getJson/postJson;
65622
66172
  * - otherwise `JSON.parse`s the body.
65623
66173
  *
65624
66174
  * Scope is serialization + header defaults + 204-handling +
@@ -65632,6 +66182,11 @@ var FetchproxyServer = class {
65632
66182
  * Bridge-level failures (no signed-in tab, SW down, timeout) still
65633
66183
  * throw the typed errors via `request()`, exactly like the verb
65634
66184
  * helpers — only successful round-trips (any HTTP status) return.
66185
+ *
66186
+ * `retryOnTimeout` is `RequestOpts.retryOnTimeout`: a timed-out POST is
66187
+ * NOT re-sent unless the caller says it is safe to repeat. A read-only POST
66188
+ * (a search, a GraphQL query) should pass `true` to keep the cold-start
66189
+ * timeout retry (#90).
65635
66190
  */
65636
66191
  async requestJson(method, path, opts = {}) {
65637
66192
  const isGet = method.toUpperCase() === "GET";
@@ -65645,7 +66200,8 @@ var FetchproxyServer = class {
65645
66200
  headers,
65646
66201
  body: sendBody ? JSON.stringify(opts.body) : void 0,
65647
66202
  ...opts.subdomain !== void 0 ? { subdomain: opts.subdomain } : {},
65648
- ...opts.domain !== void 0 ? { domain: opts.domain } : {}
66203
+ ...opts.domain !== void 0 ? { domain: opts.domain } : {},
66204
+ ...opts.retryOnTimeout !== void 0 ? { retryOnTimeout: opts.retryOnTimeout } : {}
65649
66205
  });
65650
66206
  const result = {
65651
66207
  ok: true,
@@ -65653,12 +66209,9 @@ var FetchproxyServer = class {
65653
66209
  url: response.url,
65654
66210
  body: response.body
65655
66211
  };
65656
- if (response.status === 204 || response.body === "") {
65657
- return { data: null, result };
65658
- }
65659
66212
  let data;
65660
66213
  try {
65661
- data = JSON.parse(response.body);
66214
+ data = parseJsonBody(response);
65662
66215
  } catch (e) {
65663
66216
  throw new Error(`fetchproxy ${method} ${path} \u2014 response was not JSON: ${e instanceof Error ? e.message : String(e)}`);
65664
66217
  }
@@ -65715,18 +66268,19 @@ var FetchproxyServer = class {
65715
66268
  };
65716
66269
  }
65717
66270
  /**
65718
- * Snapshot the user's non-HttpOnly cookies for the chosen domain.
66271
+ * Read the user's cookies for the chosen domain.
65719
66272
  *
65720
66273
  * Requires `'read_cookies'` in `FetchproxyServerOpts.capabilities`.
65721
66274
  * Throws a developer-facing `Error` at the call site if the MCP did
65722
66275
  * not declare the capability — this is a programming mistake, not a
65723
66276
  * runtime condition.
65724
66277
  *
65725
- * The returned string is the raw `document.cookie` value (semicolon-
65726
- * separated `k=v` pairs). HttpOnly cookies are NOT visible to page JS
65727
- * and are therefore not included; the underlying threat model assumes
65728
- * the cookies that matter for the auth bootstrap (session tokens, csrf
65729
- * cookies that the page itself reads) are non-HttpOnly.
66278
+ * The returned string is semicolon-separated `k=v` pairs. With `keys`
66279
+ * (each in the declared `cookieKeys`), the extension reads each name via
66280
+ * `chrome.cookies.get`, which INCLUDES HttpOnly cookies — the login
66281
+ * session cookie among them; that is what cookie-session MCPs use it
66282
+ * for. Without `keys` (legacy), it is the tab's `document.cookie`, which
66283
+ * omits HttpOnly cookies. See docs/SECURITY.md §T-cookie-exfil.
65730
66284
  *
65731
66285
  * Throws `FetchproxyProtocolError` if the bridge could not deliver
65732
66286
  * the request (no signed-in tab, extension offline, etc.).
@@ -65822,7 +66376,15 @@ var FetchproxyServer = class {
65822
66376
  this.pendingWriteCookies.set(id, { resolve: resolve2, reject });
65823
66377
  }));
65824
66378
  await this.sendInnerFrame(inner);
65825
- return this._withVerbTimeout(pending, this.pendingWriteCookies, id, `https://${host}`);
66379
+ return this._withVerbTimeout(
66380
+ pending,
66381
+ this.pendingWriteCookies,
66382
+ id,
66383
+ `https://${host}`,
66384
+ void 0,
66385
+ // A write: never re-sent after an ambiguous timeout.
66386
+ false
66387
+ );
65826
66388
  }
65827
66389
  /**
65828
66390
  * 0.3.0+: read declared localStorage keys from the user's signed-in
@@ -65925,53 +66487,7 @@ var FetchproxyServer = class {
65925
66487
  throw new Error("FetchproxyServer.captureRequestHeader: pass both host AND headerName, or neither (which defaults to the single declared entry)");
65926
66488
  }
65927
66489
  const callOpts = { ...resolved2, ...opts?.timeoutMs !== void 0 ? { timeoutMs: opts.timeoutMs } : {} };
65928
- try {
65929
- const result = await this._captureRequestHeaderOnce(callOpts);
65930
- this.recordSuccess();
65931
- return result;
65932
- } catch (err) {
65933
- const swDown = err instanceof FetchproxyProtocolError && classifyFetchError(err.message) === "content_script_unreachable";
65934
- if (!swDown) {
65935
- this.recordFailure(`capture_request_header: ${err.message ?? String(err)}`);
65936
- throw err;
65937
- }
65938
- this.lastEvictionDetectedAt = Date.now();
65939
- const reviveMs = this.opts.bridgeReviveDelayMs ?? 0;
65940
- if (reviveMs > 0) {
65941
- this.lazyReviveAttempts += 1;
65942
- await new Promise((r) => setTimeout(r, reviveMs));
65943
- try {
65944
- const result = await this._captureRequestHeaderOnce(callOpts);
65945
- this.lazyReviveSuccesses += 1;
65946
- this.recordSuccess();
65947
- return result;
65948
- } catch (retryErr) {
65949
- const stillDown = retryErr instanceof FetchproxyProtocolError && classifyFetchError(retryErr.message) === "content_script_unreachable";
65950
- if (!stillDown) {
65951
- this.recordFailure(`capture_request_header: ${retryErr.message ?? String(retryErr)}`);
65952
- throw retryErr;
65953
- }
65954
- this.recordFailure(`capture_request_header bridge-down: ${retryErr.message}`);
65955
- throw new FetchproxyBridgeDownError({
65956
- originalError: retryErr.message,
65957
- retryAttempted: true,
65958
- op: "capture_request_header",
65959
- url: `https://${resolved2.host}${resolved2.path ?? "/*"}`,
65960
- role: this.role,
65961
- port: this.opts.port
65962
- });
65963
- }
65964
- }
65965
- this.recordFailure(`capture_request_header bridge-down: ${err.message}`);
65966
- throw new FetchproxyBridgeDownError({
65967
- originalError: err.message,
65968
- retryAttempted: false,
65969
- op: "capture_request_header",
65970
- url: `https://${resolved2.host}${resolved2.path ?? "/*"}`,
65971
- role: this.role,
65972
- port: this.opts.port
65973
- });
65974
- }
66490
+ return this.withLazyRevive("capture_request_header", `https://${resolved2.host}${resolved2.path ?? "/*"}`, () => this._captureRequestHeaderOnce(callOpts));
65975
66491
  }
65976
66492
  async _captureRequestHeaderOnce(opts) {
65977
66493
  const id = this.nextRequestId++;
@@ -66020,53 +66536,7 @@ var FetchproxyServer = class {
66020
66536
  }
66021
66537
  await this.ensureConnected();
66022
66538
  this.throwIfPendingPair();
66023
- try {
66024
- const result = await this._captureRedirectOnce(opts);
66025
- this.recordSuccess();
66026
- return result;
66027
- } catch (err) {
66028
- const swDown = err instanceof FetchproxyProtocolError && classifyFetchError(err.message) === "content_script_unreachable";
66029
- if (!swDown) {
66030
- this.recordFailure(`capture_redirect: ${err.message ?? String(err)}`);
66031
- throw err;
66032
- }
66033
- this.lastEvictionDetectedAt = Date.now();
66034
- const reviveMs = this.opts.bridgeReviveDelayMs ?? 0;
66035
- if (reviveMs > 0) {
66036
- this.lazyReviveAttempts += 1;
66037
- await new Promise((r) => setTimeout(r, reviveMs));
66038
- try {
66039
- const result = await this._captureRedirectOnce(opts);
66040
- this.lazyReviveSuccesses += 1;
66041
- this.recordSuccess();
66042
- return result;
66043
- } catch (retryErr) {
66044
- const stillDown = retryErr instanceof FetchproxyProtocolError && classifyFetchError(retryErr.message) === "content_script_unreachable";
66045
- if (!stillDown) {
66046
- this.recordFailure(`capture_redirect: ${retryErr.message ?? String(retryErr)}`);
66047
- throw retryErr;
66048
- }
66049
- this.recordFailure(`capture_redirect bridge-down: ${retryErr.message}`);
66050
- throw new FetchproxyBridgeDownError({
66051
- originalError: retryErr.message,
66052
- retryAttempted: true,
66053
- op: "capture_redirect",
66054
- url: `https://${opts.host}${opts.path ?? "/*"}`,
66055
- role: this.role,
66056
- port: this.opts.port
66057
- });
66058
- }
66059
- }
66060
- this.recordFailure(`capture_redirect bridge-down: ${err.message}`);
66061
- throw new FetchproxyBridgeDownError({
66062
- originalError: err.message,
66063
- retryAttempted: false,
66064
- op: "capture_redirect",
66065
- url: `https://${opts.host}${opts.path ?? "/*"}`,
66066
- role: this.role,
66067
- port: this.opts.port
66068
- });
66069
- }
66539
+ return this.withLazyRevive("capture_redirect", `https://${opts.host}${opts.path ?? "/*"}`, () => this._captureRedirectOnce(opts));
66070
66540
  }
66071
66541
  async _captureRedirectOnce(opts) {
66072
66542
  const id = this.nextRequestId++;
@@ -66111,52 +66581,57 @@ var FetchproxyServer = class {
66111
66581
  assertUrlInDomains("download url", opts.url, this.opts.domains);
66112
66582
  await this.ensureConnected();
66113
66583
  this.throwIfPendingPair();
66584
+ return this.withLazyRevive("download", opts.url, () => this._downloadOnce(opts));
66585
+ }
66586
+ /**
66587
+ * B-QUAL-1: the lazy-revive policy for the throwing verbs
66588
+ * (`capture_request_header`, `capture_redirect`, `download`), in one place.
66589
+ * Runs `once`; on the SW-eviction symptom (`content_script_unreachable` —
66590
+ * the request provably never reached a tab, so re-sending is safe) stamps
66591
+ * the eviction counter, waits `bridgeReviveDelayMs` and retries once, then
66592
+ * surfaces a `FetchproxyBridgeDownError`. Every other error is recorded and
66593
+ * rethrown untouched. `fetch()` keeps its own envelope-shaped variant.
66594
+ */
66595
+ async withLazyRevive(op, url4, once) {
66596
+ const isSwDown = (e) => e instanceof FetchproxyProtocolError && classifyFetchError(e.message) === "content_script_unreachable";
66597
+ const bridgeDown = (e, retryAttempted) => {
66598
+ this.recordFailure(`${op} bridge-down: ${e.message}`);
66599
+ return new FetchproxyBridgeDownError({
66600
+ originalError: e.message,
66601
+ retryAttempted,
66602
+ op,
66603
+ url: url4,
66604
+ role: this.role,
66605
+ port: this.opts.port
66606
+ });
66607
+ };
66114
66608
  try {
66115
- const result = await this._downloadOnce(opts);
66609
+ const result = await once();
66116
66610
  this.recordSuccess();
66117
66611
  return result;
66118
66612
  } catch (err) {
66119
- const swDown = err instanceof FetchproxyProtocolError && classifyFetchError(err.message) === "content_script_unreachable";
66120
- if (!swDown) {
66121
- this.recordFailure(`download: ${err.message ?? String(err)}`);
66613
+ if (!isSwDown(err)) {
66614
+ this.recordFailure(`${op}: ${err.message ?? String(err)}`);
66122
66615
  throw err;
66123
66616
  }
66124
66617
  this.lastEvictionDetectedAt = Date.now();
66125
66618
  const reviveMs = this.opts.bridgeReviveDelayMs ?? 0;
66126
- if (reviveMs > 0) {
66127
- this.lazyReviveAttempts += 1;
66128
- await new Promise((r) => setTimeout(r, reviveMs));
66129
- try {
66130
- const result = await this._downloadOnce(opts);
66131
- this.lazyReviveSuccesses += 1;
66132
- this.recordSuccess();
66133
- return result;
66134
- } catch (retryErr) {
66135
- const stillDown = retryErr instanceof FetchproxyProtocolError && classifyFetchError(retryErr.message) === "content_script_unreachable";
66136
- if (!stillDown) {
66137
- this.recordFailure(`download: ${retryErr.message ?? String(retryErr)}`);
66138
- throw retryErr;
66139
- }
66140
- this.recordFailure(`download bridge-down: ${retryErr.message}`);
66141
- throw new FetchproxyBridgeDownError({
66142
- originalError: retryErr.message,
66143
- retryAttempted: true,
66144
- op: "download",
66145
- url: opts.url,
66146
- role: this.role,
66147
- port: this.opts.port
66148
- });
66619
+ if (reviveMs <= 0)
66620
+ throw bridgeDown(err, false);
66621
+ this.lazyReviveAttempts += 1;
66622
+ await new Promise((r) => setTimeout(r, reviveMs));
66623
+ try {
66624
+ const result = await once();
66625
+ this.lazyReviveSuccesses += 1;
66626
+ this.recordSuccess();
66627
+ return result;
66628
+ } catch (retryErr) {
66629
+ if (!isSwDown(retryErr)) {
66630
+ this.recordFailure(`${op}: ${retryErr.message ?? String(retryErr)}`);
66631
+ throw retryErr;
66149
66632
  }
66633
+ throw bridgeDown(retryErr, true);
66150
66634
  }
66151
- this.recordFailure(`download bridge-down: ${err.message}`);
66152
- throw new FetchproxyBridgeDownError({
66153
- originalError: err.message,
66154
- retryAttempted: false,
66155
- op: "download",
66156
- url: opts.url,
66157
- role: this.role,
66158
- port: this.opts.port
66159
- });
66160
66635
  }
66161
66636
  }
66162
66637
  async _downloadOnce(opts) {
@@ -66185,7 +66660,9 @@ var FetchproxyServer = class {
66185
66660
  // CAP and need the identical explanation; missing it then was the point
66186
66661
  // of #279 — "both verbs" was counted off the two call sites in view
66187
66662
  // rather than off the type. Three is still the number.
66188
- opts.timeoutMs
66663
+ opts.timeoutMs,
66664
+ // A second download saves a duplicate "file (1)".
66665
+ false
66189
66666
  );
66190
66667
  }
66191
66668
  /**
@@ -66276,6 +66753,52 @@ var FetchproxyServer = class {
66276
66753
  await this.sendInnerFrame(inner);
66277
66754
  return this._withVerbTimeout(pending, this.pendingStorage, id, origin);
66278
66755
  }
66756
+ /**
66757
+ * 3.1.0+: read a declared REPEATED DOM structure from the user's
66758
+ * signed-in tab. Requires `'read_dom_list'` in capabilities AND `name` to
66759
+ * match a declared `domListSelectors` entry. The extension resolves the
66760
+ * entry's `itemSelector` via `document.querySelectorAll` in the matched
66761
+ * tab's DOM (isolated world), then resolves each declared field against
66762
+ * every matched item in turn — no page-JS execution, same as `readDom`.
66763
+ *
66764
+ * Returns one row per matched item, in document order, truncated to the
66765
+ * entry's declared `maxItems` when set. A field absent on a given item is
66766
+ * omitted from that item's row (the row itself is still returned). Throws
66767
+ * `FetchproxyProtocolError` on bridge failures and a plain `Error` on
66768
+ * developer mistakes (undeclared capability, undeclared name).
66769
+ *
66770
+ * Reads only what is CURRENTLY rendered — a virtualized or lazily-loaded
66771
+ * list returns only its visible rows. A caller that needs more scrolls
66772
+ * the list (out of band) and calls again.
66773
+ */
66774
+ async readDomList(opts) {
66775
+ if (!this.opts.capabilities.includes("read_dom_list")) {
66776
+ throw new Error('FetchproxyServer.readDomList(): MCP did not declare "read_dom_list" in capabilities');
66777
+ }
66778
+ await this.ensureConnected();
66779
+ this.throwIfPendingPair();
66780
+ if (typeof opts.name !== "string" || opts.name.length === 0) {
66781
+ throw new Error("FetchproxyServer.readDomList: opts.name must be a non-empty string");
66782
+ }
66783
+ this.assertScopeSubset([opts.name], this.opts.domListSelectors.map((d) => d.name), "domListSelectors");
66784
+ if (opts.subdomain !== void 0)
66785
+ assertSubdomainLabel(opts.subdomain);
66786
+ const baseDomain = this.resolveBaseDomain(opts.domain);
66787
+ const host = opts.subdomain ? `${opts.subdomain}.${baseDomain}` : baseDomain;
66788
+ const origin = `https://${host}`;
66789
+ const id = this.nextRequestId++;
66790
+ const inner = {
66791
+ type: "request",
66792
+ id,
66793
+ op: "read_dom_list",
66794
+ init: { origin, name: opts.name }
66795
+ };
66796
+ const pending = this.guardPending(new Promise((resolve2, reject) => {
66797
+ this.pendingDomList.set(id, { resolve: resolve2, reject });
66798
+ }));
66799
+ await this.sendInnerFrame(inner);
66800
+ return this._withVerbTimeout(pending, this.pendingDomList, id, origin);
66801
+ }
66279
66802
  /**
66280
66803
  * 1.x+: run a declared GraphQL operation through the page's own Apollo
66281
66804
  * client (`window.__APOLLO_CLIENT__`) in the signed-in tab's MAIN world.
@@ -66319,8 +66842,9 @@ var FetchproxyServer = class {
66319
66842
  const pending = this.guardPending(new Promise((resolve2, reject) => {
66320
66843
  this.pendingGraphql.set(id, { resolve: resolve2, reject });
66321
66844
  }));
66322
- await this.sendInnerFrame(inner);
66323
- return this._withVerbTimeout(pending, this.pendingGraphql, id, opts.name);
66845
+ const retrySafe = opts.retryOnTimeout === true;
66846
+ await this.sendInnerFrame(inner, { resendable: retrySafe });
66847
+ return this._withVerbTimeout(pending, this.pendingGraphql, id, opts.name, void 0, retrySafe);
66324
66848
  }
66325
66849
  assertScopeSubset(requested, declared, label) {
66326
66850
  const undeclared = undeclaredKeys(requested, declared);
@@ -66357,6 +66881,7 @@ var FetchproxyServer = class {
66357
66881
  onInner(inner) {
66358
66882
  if (inner.type !== "response")
66359
66883
  return;
66884
+ this.resendable.delete(inner.id);
66360
66885
  this.lastExtensionMessageAt = Date.now();
66361
66886
  const fetchCb = this.pending.get(inner.id);
66362
66887
  if (fetchCb) {
@@ -66445,6 +66970,20 @@ var FetchproxyServer = class {
66445
66970
  }
66446
66971
  return;
66447
66972
  }
66973
+ const domListCb = this.pendingDomList.get(inner.id);
66974
+ if (domListCb) {
66975
+ this.pendingDomList.delete(inner.id);
66976
+ if (inner.ok) {
66977
+ if (inner.op === "read_dom_list" && inner.rows) {
66978
+ domListCb.resolve(inner.rows.map((row) => ({ ...row })));
66979
+ } else {
66980
+ domListCb.reject(new FetchproxyProtocolError(`unexpected ${String(inner.op)} response on read_dom_list awaiter`));
66981
+ }
66982
+ } else {
66983
+ domListCb.reject(protocolErrorFrom(inner.error));
66984
+ }
66985
+ return;
66986
+ }
66448
66987
  const downloadCb = this.pendingDownload.get(inner.id);
66449
66988
  if (downloadCb) {
66450
66989
  this.pendingDownload.delete(inner.id);
@@ -66504,42 +67043,133 @@ var FetchproxyServer = class {
66504
67043
  }
66505
67044
  }
66506
67045
  }
66507
- rejectAllPending(reason = "extension disconnected") {
67046
+ rejectAllPending(reason = "extension disconnected", keep = /* @__PURE__ */ new Set()) {
67047
+ for (const id of this.allPendingIds()) {
67048
+ if (!keep.has(id))
67049
+ this.rejectPendingId(id, reason);
67050
+ }
67051
+ if (keep.size === 0)
67052
+ this.resendable.clear();
67053
+ }
67054
+ /** Every request id with a live awaiter, across all op maps. */
67055
+ allPendingIds() {
67056
+ const ids = [];
67057
+ for (const map2 of this.pendingMaps())
67058
+ for (const id of map2.keys())
67059
+ ids.push(id);
67060
+ return ids;
67061
+ }
67062
+ pendingMaps() {
67063
+ return [
67064
+ this.pending,
67065
+ this.pendingReadCookies,
67066
+ this.pendingStorage,
67067
+ this.pendingWriteCookies,
67068
+ this.pendingCapture,
67069
+ this.pendingRedirect,
67070
+ this.pendingIdb,
67071
+ this.pendingDomList,
67072
+ this.pendingDownload,
67073
+ this.pendingGraphql
67074
+ ];
67075
+ }
67076
+ isPendingId(id) {
67077
+ return this.pendingMaps().some((m) => m.has(id));
67078
+ }
67079
+ /** Fail the one awaiter registered under `id`, in its own map's shape. */
67080
+ rejectPendingId(id, reason) {
66508
67081
  const err = new FetchproxyProtocolError(reason);
66509
- for (const cb of this.pending.values()) {
66510
- cb({
67082
+ this.resendable.delete(id);
67083
+ const fetchCb = this.pending.get(id);
67084
+ if (fetchCb) {
67085
+ this.pending.delete(id);
67086
+ fetchCb({
66511
67087
  ok: false,
66512
67088
  error: err.message,
66513
67089
  kind: classifyFetchError(err.message),
66514
67090
  retryAttempted: false
66515
67091
  });
67092
+ return;
67093
+ }
67094
+ const cookieCb = this.pendingReadCookies.get(id);
67095
+ if (cookieCb) {
67096
+ this.pendingReadCookies.delete(id);
67097
+ cookieCb({ ok: false, error: err.message });
67098
+ return;
67099
+ }
67100
+ for (const map2 of [
67101
+ this.pendingStorage,
67102
+ this.pendingWriteCookies,
67103
+ this.pendingCapture,
67104
+ this.pendingRedirect,
67105
+ this.pendingIdb,
67106
+ this.pendingDomList,
67107
+ this.pendingDownload,
67108
+ this.pendingGraphql
67109
+ ]) {
67110
+ const entry = map2.get(id);
67111
+ if (entry) {
67112
+ map2.delete(id);
67113
+ entry.reject(err);
67114
+ return;
67115
+ }
67116
+ }
67117
+ }
67118
+ noteResendable(inner) {
67119
+ this.resendable.set(inner.id, inner);
67120
+ if (this.resendable.size > 256) {
67121
+ for (const id of [...this.resendable.keys()]) {
67122
+ if (!this.isPendingId(id))
67123
+ this.resendable.delete(id);
67124
+ }
66516
67125
  }
66517
- this.pending.clear();
66518
- for (const cb of this.pendingReadCookies.values()) {
66519
- cb({ ok: false, error: err.message });
66520
- }
66521
- this.pendingReadCookies.clear();
66522
- for (const { reject } of this.pendingStorage.values())
66523
- reject(err);
66524
- this.pendingStorage.clear();
66525
- for (const { reject } of this.pendingWriteCookies.values())
66526
- reject(err);
66527
- this.pendingWriteCookies.clear();
66528
- for (const { reject } of this.pendingCapture.values())
66529
- reject(err);
66530
- this.pendingCapture.clear();
66531
- for (const { reject } of this.pendingRedirect.values())
66532
- reject(err);
66533
- this.pendingRedirect.clear();
66534
- for (const { reject } of this.pendingIdb.values())
66535
- reject(err);
66536
- this.pendingIdb.clear();
66537
- for (const { reject } of this.pendingDownload.values())
66538
- reject(err);
66539
- this.pendingDownload.clear();
66540
- for (const { reject } of this.pendingGraphql.values())
66541
- reject(err);
66542
- this.pendingGraphql.clear();
67126
+ }
67127
+ /**
67128
+ * B-BUG-6: the host this peer relayed through has gone — most often a
67129
+ * short-lived process (a bootstrap lift, an `fpx` call) that won the
67130
+ * election and then closed. Fail only the in-flight requests that may
67131
+ * already have run (a non-idempotent fetch, a cookie write, a download);
67132
+ * re-elect and send the rest again. The replies to the originals died with
67133
+ * the old host, and each re-sent request keeps its awaiter and its
67134
+ * original deadline.
67135
+ */
67136
+ async recoverFromHostLoss() {
67137
+ const toResend = /* @__PURE__ */ new Map();
67138
+ for (const [id, inner] of this.resendable) {
67139
+ if (this.isPendingId(id))
67140
+ toResend.set(id, inner);
67141
+ }
67142
+ this.resendable.clear();
67143
+ this.rejectAllPending("fetchproxy: the MCP process holding the bridge port exited while this request was in flight. It was not re-sent because it may already have run in the browser \u2014 check before retrying.", new Set(toResend.keys()));
67144
+ if (toResend.size === 0)
67145
+ return;
67146
+ const lost = (id, e) => this.rejectPendingId(id, `fetchproxy: the bridge host exited and reconnecting failed: ${e instanceof Error ? e.message : String(e)}`);
67147
+ try {
67148
+ await this.ensureConnected();
67149
+ } catch (e) {
67150
+ for (const id of toResend.keys())
67151
+ lost(id, e);
67152
+ return;
67153
+ }
67154
+ for (const [id, inner] of toResend) {
67155
+ if (!this.isPendingId(id))
67156
+ continue;
67157
+ try {
67158
+ await this.resendInnerFrame(inner);
67159
+ } catch (e) {
67160
+ lost(id, e);
67161
+ }
67162
+ }
67163
+ }
67164
+ /** Send an already-registered request again, keeping its awaiter on failure. */
67165
+ async resendInnerFrame(inner) {
67166
+ if (this.hostHandle)
67167
+ await this.hostHandle.sendOwnInner(inner);
67168
+ else if (this.peerHandle)
67169
+ await this.peerHandle.sendInner(inner);
67170
+ else
67171
+ throw new Error("no bridge handle after re-election");
67172
+ this.noteResendable(inner);
66543
67173
  }
66544
67174
  /**
66545
67175
  * 0.5.2+: read the current pair-pending pair code from whichever handle
@@ -66642,6 +67272,12 @@ async function runOneLift(opts) {
66642
67272
  if (envVal !== void 0 && envVal !== "" && envVal !== "0" && envVal !== "false") {
66643
67273
  throw new BootstrapDisabledError(opts.serverName, envVar);
66644
67274
  }
67275
+ for (const bucket of ["cookies", "localStorage", "sessionStorage"]) {
67276
+ const glob = opts.declare[bucket].find((k) => k.endsWith("*"));
67277
+ if (glob !== void 0) {
67278
+ throw new Error(`fetchproxy bootstrap: declare.${bucket} contains ${JSON.stringify(glob)}, a glob. A lift reads each key by its exact name, so a glob can never match \u2014 list the concrete key names instead.`);
67279
+ }
67280
+ }
66645
67281
  const factory = opts._serverFactory ?? defaultFactory;
66646
67282
  const indexedDb = opts.declare.indexedDb ?? [];
66647
67283
  const localStoragePointers = opts.declare.localStoragePointers ?? [];
@@ -66899,7 +67535,7 @@ function loadAccount(env = process.env) {
66899
67535
  // package.json
66900
67536
  var package_default = {
66901
67537
  name: "canvas-parent-mcp",
66902
- version: "2.1.0",
67538
+ version: "2.1.2",
66903
67539
  mcpName: "io.github.chrischall/canvas-parent-mcp",
66904
67540
  description: "Canvas LMS (Instructure) MCP server \u2014 student/observer read access with optional file download",
66905
67541
  author: "Claude Code (AI) <https://www.anthropic.com/claude>",
@@ -66946,12 +67582,12 @@ var package_default = {
66946
67582
  typecheck: "tsc -p tsconfig.json --noEmit"
66947
67583
  },
66948
67584
  dependencies: {
66949
- "@chrischall/mcp-utils": "^1.0.0",
66950
- "@fetchproxy/bootstrap": "^3.0.1",
66951
- "@fetchproxy/server": "^3.0.1",
67585
+ "@chrischall/mcp-utils": "^2.4.0",
67586
+ "@fetchproxy/bootstrap": "^3.2.0",
67587
+ "@fetchproxy/server": "^3.2.0",
66952
67588
  "@modelcontextprotocol/server": "^2.0.0",
66953
- dotenv: "^17.4.2",
66954
- zod: "^4.6.2"
67589
+ dotenv: "^18.0.0",
67590
+ zod: "^4.6.5"
66955
67591
  },
66956
67592
  devDependencies: {
66957
67593
  "@modelcontextprotocol/client": "^2.0.0",
@@ -67211,7 +67847,7 @@ import { writeFile as writeFile3, stat } from "fs/promises";
67211
67847
  import { existsSync, readFileSync, writeFileSync, mkdirSync, chmodSync, renameSync, unlinkSync } from "node:fs";
67212
67848
  import { dirname, join as join3, resolve } from "node:path";
67213
67849
  import { homedir as homedir2 } from "node:os";
67214
- import { randomBytes as randomBytes2, createHmac } from "node:crypto";
67850
+ import { randomBytes as randomBytes3, createHmac } from "node:crypto";
67215
67851
  function bindingDigest(secret, salt) {
67216
67852
  return createHmac("sha256", salt).update(secret).digest("hex").slice(0, 32);
67217
67853
  }
@@ -67263,7 +67899,7 @@ function createFileStatePersistence(opts) {
67263
67899
  },
67264
67900
  save(state) {
67265
67901
  const dir = dirname(filePath);
67266
- const tmp = `${filePath}.tmp-${randomBytes2(6).toString("hex")}`;
67902
+ const tmp = `${filePath}.tmp-${randomBytes3(6).toString("hex")}`;
67267
67903
  const dirExisted = existsSync(dir);
67268
67904
  try {
67269
67905
  mkdirSync(dir, { recursive: true, mode: 448 });
@@ -67271,7 +67907,7 @@ function createFileStatePersistence(opts) {
67271
67907
  chmodSync(dir, 448);
67272
67908
  let boundTo;
67273
67909
  if (secret !== void 0) {
67274
- const salt = randomBytes2(16).toString("hex");
67910
+ const salt = randomBytes3(16).toString("hex");
67275
67911
  boundTo = { salt, digest: bindingDigest(secret, salt) };
67276
67912
  }
67277
67913
  const envelope = { v: 1, ...boundTo !== void 0 ? { boundTo } : {}, state };
@@ -67741,7 +68377,7 @@ var CanvasClient = class {
67741
68377
  const res = await this.doRawRequest(path, opts);
67742
68378
  const text = await res.text();
67743
68379
  if (opts.responseType === "text") return text;
67744
- return parseJsonBody(text) ?? null;
68380
+ return parseJsonBody2(text) ?? null;
67745
68381
  }
67746
68382
  async requestPaginated(path, opts = {}) {
67747
68383
  const perPage = opts.perPage ?? DEFAULT_PER_PAGE;
@@ -67751,7 +68387,7 @@ var CanvasClient = class {
67751
68387
  for (let page = 0; page < maxPages; page++) {
67752
68388
  const res = await this.doRawRequest(url4, opts);
67753
68389
  const text = await res.text();
67754
- const parsed = parseJsonBody(text) ?? [];
68390
+ const parsed = parseJsonBody2(text) ?? [];
67755
68391
  for (const item of parsed) out.push(item);
67756
68392
  const linkHeader = res.headers.get("link");
67757
68393
  const next = linkHeader ? parseLinkHeader(linkHeader).next : void 0;
@@ -67892,7 +68528,7 @@ var CanvasClient = class {
67892
68528
  };
67893
68529
  }
67894
68530
  };
67895
- function parseJsonBody(text) {
68531
+ function parseJsonBody2(text) {
67896
68532
  if (!text) return null;
67897
68533
  const stripped = text.replace(/^while\(1\);/, "");
67898
68534
  return JSON.parse(stripped);
@@ -68370,7 +69006,7 @@ try {
68370
69006
  }
68371
69007
  await runMcp({
68372
69008
  name: "canvas",
68373
- version: "2.1.0",
69009
+ version: "2.1.2",
68374
69010
  // x-release-please-version
68375
69011
  tools: [
68376
69012
  // Outside the `if (resolved)` on purpose: an unconfigured server must