@rockcarver/frodo-cli 4.0.1-0 → 4.0.1

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/app.cjs CHANGED
@@ -156058,7 +156058,7 @@ function stringify(obj) {
156058
156058
  }
156059
156059
  var package_default = {
156060
156060
  name: "@rockcarver/frodo-lib",
156061
- version: "4.0.1-6",
156061
+ version: "4.0.1",
156062
156062
  type: "commonjs",
156063
156063
  main: "./dist/index.js",
156064
156064
  module: "./dist/index.mjs",
@@ -239151,6 +239151,101 @@ var esm_default2 = { watch, FSWatcher };
239151
239151
 
239152
239152
  // src/ops/ScriptOps.ts
239153
239153
 
239154
+
239155
+ // src/ops/utils/ScriptFilters.js
239156
+ _chunkDLBJL7R2cjs.init_cjs_shims.call(void 0, );
239157
+ function normalizeFilterValue(value) {
239158
+ const normalizedValue = _optionalChain([value, 'optionalAccess', _689 => _689.trim, 'call', _690 => _690()]);
239159
+ return normalizedValue ? normalizedValue : void 0;
239160
+ }
239161
+ function normalizeScriptFilters(filters = {}) {
239162
+ return {
239163
+ context: _optionalChain([normalizeFilterValue, 'call', _691 => _691(filters.context), 'optionalAccess', _692 => _692.replace, 'call', _693 => _693(/[\s-]+/g, "_"), 'access', _694 => _694.toUpperCase, 'call', _695 => _695()]),
239164
+ evaluatorVersion: normalizeFilterValue(filters.evaluatorVersion),
239165
+ language: _optionalChain([normalizeFilterValue, 'call', _696 => _696(filters.language), 'optionalAccess', _697 => _697.toUpperCase, 'call', _698 => _698()])
239166
+ };
239167
+ }
239168
+ function hasScriptFilters(filters = {}) {
239169
+ return !!(filters.context || filters.evaluatorVersion || filters.language);
239170
+ }
239171
+ function matchesScriptFilters(script, filters = {}) {
239172
+ const normalizedFilters = normalizeScriptFilters(filters);
239173
+ return (!normalizedFilters.context || script.context === normalizedFilters.context) && (!normalizedFilters.evaluatorVersion || script.evaluatorVersion === normalizedFilters.evaluatorVersion) && (!normalizedFilters.language || script.language === normalizedFilters.language);
239174
+ }
239175
+ function filterScripts(scripts, filters = {}) {
239176
+ if (!hasScriptFilters(filters)) return scripts;
239177
+ return scripts.filter((script) => matchesScriptFilters(script, filters));
239178
+ }
239179
+ function createScriptFilter(filters = {}) {
239180
+ const normalizedFilters = normalizeScriptFilters(filters);
239181
+ const filterConditions = [
239182
+ normalizedFilters.context && {
239183
+ field: "context",
239184
+ value: normalizedFilters.context
239185
+ },
239186
+ normalizedFilters.evaluatorVersion && {
239187
+ field: "evaluatorVersion",
239188
+ value: normalizedFilters.evaluatorVersion
239189
+ },
239190
+ normalizedFilters.language && {
239191
+ field: "language",
239192
+ value: normalizedFilters.language
239193
+ }
239194
+ ].filter(Boolean);
239195
+ if (filterConditions.length === 0) return void 0;
239196
+ if (filterConditions.length === 1) return filterConditions[0];
239197
+ return (
239198
+ /** @type {LibScriptFilterGroup} */
239199
+ {
239200
+ operator: "AND",
239201
+ filters: filterConditions
239202
+ }
239203
+ );
239204
+ }
239205
+ function getLibraryScriptNames2(script) {
239206
+ if (!script.script) return [];
239207
+ const rawScript = Array.isArray(script.script) ? script.script.join("\n") : script.script;
239208
+ return Array.from(rawScript.matchAll(/require\((['"])(.+?)\1\)/g)).map(
239209
+ (match2) => match2[2]
239210
+ );
239211
+ }
239212
+ function includeScriptDependencies(scripts, allScripts) {
239213
+ const scriptsByName = new Map(
239214
+ allScripts.map((script) => [script.name, script])
239215
+ );
239216
+ const includedScripts = new Map(
239217
+ scripts.map((script) => [script._id, script])
239218
+ );
239219
+ const queue5 = [...scripts];
239220
+ while (queue5.length > 0) {
239221
+ const script = queue5.shift();
239222
+ if (!script) continue;
239223
+ for (const libraryScriptName of getLibraryScriptNames2(script)) {
239224
+ const libraryScript = scriptsByName.get(libraryScriptName);
239225
+ if (libraryScript && !includedScripts.has(libraryScript._id)) {
239226
+ includedScripts.set(libraryScript._id, libraryScript);
239227
+ queue5.push(libraryScript);
239228
+ }
239229
+ }
239230
+ }
239231
+ return Array.from(includedScripts.values());
239232
+ }
239233
+ function filterScriptExport(scriptExport, filters = {}, includeDependencies = false) {
239234
+ if (!hasScriptFilters(filters)) return scriptExport;
239235
+ const allScripts = Object.values(scriptExport.script);
239236
+ let filteredScripts = filterScripts(allScripts, filters);
239237
+ if (includeDependencies) {
239238
+ filteredScripts = includeScriptDependencies(filteredScripts, allScripts);
239239
+ }
239240
+ return {
239241
+ ...scriptExport,
239242
+ script: Object.fromEntries(
239243
+ filteredScripts.map((script) => [script._id, script])
239244
+ )
239245
+ };
239246
+ }
239247
+
239248
+ // src/ops/ScriptOps.ts
239154
239249
  var {
239155
239250
  getTypedFilename: getTypedFilename13,
239156
239251
  isValidUrl: isValidUrl2,
@@ -239175,6 +239270,33 @@ var {
239175
239270
  deleteScripts: deleteScripts2
239176
239271
  } = frodo.script;
239177
239272
  var langMap = { JAVASCRIPT: "JavaScript", GROOVY: "Groovy" };
239273
+ function readScriptsWithFilterPassthrough(filters = {}) {
239274
+ const filter2 = createScriptFilter(filters);
239275
+ return readScripts2(filter2);
239276
+ }
239277
+ function exportScriptsWithFilterPassthrough(options, filters = {}) {
239278
+ const filter2 = createScriptFilter(filters);
239279
+ const optionsWithFilter = filter2 ? { ...options, filter: filter2 } : options;
239280
+ return exportScripts2(optionsWithFilter, errorHandler);
239281
+ }
239282
+ async function readFilteredScripts(filters = {}) {
239283
+ return filterScripts(
239284
+ await readScriptsWithFilterPassthrough(filters),
239285
+ filters
239286
+ );
239287
+ }
239288
+ async function readFilteredNonDefaultScripts(filters = {}) {
239289
+ return (await readFilteredScripts(filters)).filter(
239290
+ (script) => !script.default
239291
+ );
239292
+ }
239293
+ function filterTypedScriptExport(scriptExport, filters = {}, includeDependencies = false) {
239294
+ return filterScriptExport(
239295
+ scriptExport,
239296
+ filters,
239297
+ includeDependencies
239298
+ );
239299
+ }
239178
239300
  function getOneLineDescription(scriptObj) {
239179
239301
  const description = `[${scriptObj._id["brightCyan"]}] ${scriptObj.context} - ${scriptObj.name}`;
239180
239302
  return description;
@@ -239189,7 +239311,7 @@ function getTableRowMd(scriptObj) {
239189
239311
  const description = `| ${scriptObj.name} | ${langMap[scriptObj.language]} | ${titleCase7(scriptObj.context.split("_").join(" "))} | \`${scriptObj._id}\` |`;
239190
239312
  return description;
239191
239313
  }
239192
- async function listScripts(long = false, usage = false, file2 = null) {
239314
+ async function listScripts(long = false, usage = false, file2 = null, filters = {}) {
239193
239315
  let spinnerId;
239194
239316
  let scripts = [];
239195
239317
  debugMessage2(`Cli.ScriptOps.listScripts: start`);
@@ -239199,7 +239321,7 @@ async function listScripts(long = false, usage = false, file2 = null) {
239199
239321
  0,
239200
239322
  `Reading scripts...`
239201
239323
  );
239202
- scripts = await readScripts2();
239324
+ scripts = await readFilteredScripts(filters);
239203
239325
  scripts.sort((a, b) => a.name.localeCompare(b.name));
239204
239326
  stopProgressIndicator2(
239205
239327
  spinnerId,
@@ -239379,7 +239501,7 @@ async function exportScriptByNameToFile(name, file2, includeMeta = true, keepMod
239379
239501
  }
239380
239502
  return false;
239381
239503
  }
239382
- async function exportScriptsToFile(file2, includeMeta = true, keepModifiedProperties = false, options) {
239504
+ async function exportScriptsToFile(file2, includeMeta = true, keepModifiedProperties = false, options, filters = {}) {
239383
239505
  debugMessage2(`Cli.ScriptOps.exportScriptsToFile: start`);
239384
239506
  try {
239385
239507
  let fileName = getTypedFilename13(
@@ -239389,7 +239511,11 @@ async function exportScriptsToFile(file2, includeMeta = true, keepModifiedProper
239389
239511
  if (file2) {
239390
239512
  fileName = file2;
239391
239513
  }
239392
- const scriptExport = await exportScripts2(options, errorHandler);
239514
+ const scriptExport = filterTypedScriptExport(
239515
+ await exportScriptsWithFilterPassthrough(options, filters),
239516
+ filters,
239517
+ options.deps
239518
+ );
239393
239519
  saveJsonToFile13(
239394
239520
  scriptExport,
239395
239521
  getFilePath13(fileName, true),
@@ -239404,10 +239530,14 @@ async function exportScriptsToFile(file2, includeMeta = true, keepModifiedProper
239404
239530
  }
239405
239531
  return false;
239406
239532
  }
239407
- async function exportScriptsToFiles(extract = false, includeMeta = true, keepModifiedProperties = false, options) {
239533
+ async function exportScriptsToFiles(extract = false, includeMeta = true, keepModifiedProperties = false, options, filters = {}) {
239408
239534
  debugMessage2(`Cli.ScriptOps.exportScriptsToFiles: start`);
239409
239535
  const errors = [];
239410
- const scriptExport = await exportScripts2(options, errorHandler);
239536
+ const scriptExport = filterTypedScriptExport(
239537
+ await exportScriptsWithFilterPassthrough(options, filters),
239538
+ filters,
239539
+ options.deps
239540
+ );
239411
239541
  const scriptList = Object.values(scriptExport.script);
239412
239542
  const barId = createProgressIndicator2(
239413
239543
  "determinate",
@@ -239557,7 +239687,7 @@ async function importScriptsFromFiles(watch2, options, validateScripts) {
239557
239687
  // !path?.endsWith('.script.groovy')
239558
239688
  // : // in regular mode, ignore everything but frodo script exports
239559
239689
  // stats?.isFile() && !path?.endsWith('.script.json'),
239560
- ignored: (path16, stats) => _optionalChain([stats, 'optionalAccess', _689 => _689.isFile, 'call', _690 => _690()]) && !_optionalChain([path16, 'optionalAccess', _691 => _691.endsWith, 'call', _692 => _692(".script.json")]) && !_optionalChain([path16, 'optionalAccess', _693 => _693.endsWith, 'call', _694 => _694(".script.js")]) && !_optionalChain([path16, 'optionalAccess', _695 => _695.endsWith, 'call', _696 => _696(".script.groovy")]),
239690
+ ignored: (path16, stats) => _optionalChain([stats, 'optionalAccess', _699 => _699.isFile, 'call', _700 => _700()]) && !_optionalChain([path16, 'optionalAccess', _701 => _701.endsWith, 'call', _702 => _702(".script.json")]) && !_optionalChain([path16, 'optionalAccess', _703 => _703.endsWith, 'call', _704 => _704(".script.js")]) && !_optionalChain([path16, 'optionalAccess', _705 => _705.endsWith, 'call', _706 => _706(".script.groovy")]),
239561
239691
  persistent: watch2,
239562
239692
  ignoreInitial: false
239563
239693
  });
@@ -239662,13 +239792,25 @@ async function deleteScriptName(name) {
239662
239792
  }
239663
239793
  return false;
239664
239794
  }
239665
- async function deleteAllScripts() {
239795
+ async function deleteAllScripts(filters = {}) {
239666
239796
  const spinnerId = createProgressIndicator2(
239667
239797
  "indeterminate",
239668
239798
  void 0,
239669
239799
  `Deleting all non-default scripts...`
239670
239800
  );
239671
239801
  try {
239802
+ if (hasScriptFilters(filters)) {
239803
+ const scripts = await readFilteredNonDefaultScripts(filters);
239804
+ for (const script of scripts) {
239805
+ await deleteScript3(script._id);
239806
+ }
239807
+ stopProgressIndicator2(
239808
+ spinnerId,
239809
+ `Deleted ${scripts.length} matching non-default script${scripts.length === 1 ? "" : "s"}.`,
239810
+ "success"
239811
+ );
239812
+ return true;
239813
+ }
239672
239814
  await deleteScripts2(errorHandler);
239673
239815
  stopProgressIndicator2(
239674
239816
  spinnerId,
@@ -239684,14 +239826,14 @@ async function deleteAllScripts() {
239684
239826
  }
239685
239827
  function separateScriptsFromFullExport(fullExport) {
239686
239828
  const scripts = { realm: {} };
239687
- if (!_optionalChain([fullExport, 'optionalAccess', _697 => _697.realm]) || typeof fullExport.realm !== "object") {
239829
+ if (!_optionalChain([fullExport, 'optionalAccess', _707 => _707.realm]) || typeof fullExport.realm !== "object") {
239688
239830
  return scripts;
239689
239831
  }
239690
239832
  for (const [realm2, realmExport] of Object.entries(fullExport.realm)) {
239691
239833
  if (!scripts.realm[realm2]) {
239692
239834
  scripts.realm[realm2] = {};
239693
239835
  }
239694
- scripts.realm[realm2].script = _nullishCoalesce(_optionalChain([realmExport, 'optionalAccess', _698 => _698.script]), () => ( {}));
239836
+ scripts.realm[realm2].script = _nullishCoalesce(_optionalChain([realmExport, 'optionalAccess', _708 => _708.script]), () => ( {}));
239695
239837
  if (realmExport && typeof realmExport === "object") {
239696
239838
  delete realmExport.script;
239697
239839
  }
@@ -239702,9 +239844,9 @@ function getScriptLocations(configuration, scriptName) {
239702
239844
  const locations = [];
239703
239845
  const regex2 = new RegExp(`require\\(['|"]${scriptName}['|"]\\)`);
239704
239846
  for (const [realm2, realmExport] of Object.entries(
239705
- _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _699 => _699.realm]), () => ( {}))
239847
+ _nullishCoalesce(_optionalChain([configuration, 'optionalAccess', _709 => _709.realm]), () => ( {}))
239706
239848
  )) {
239707
- for (const scriptData of Object.values(_nullishCoalesce(_optionalChain([realmExport, 'optionalAccess', _700 => _700.script]), () => ( {})))) {
239849
+ for (const scriptData of Object.values(_nullishCoalesce(_optionalChain([realmExport, 'optionalAccess', _710 => _710.script]), () => ( {})))) {
239708
239850
  let scriptString = scriptData.script;
239709
239851
  if (Array.isArray(scriptData.script)) {
239710
239852
  scriptString = scriptData.script.join("\n");
@@ -239741,7 +239883,7 @@ var {
239741
239883
  } = frodo.utils;
239742
239884
  var { stringify: stringify5 } = frodo.utils.json;
239743
239885
  function getOneLineDescription2(nodeObj, nodeRef) {
239744
- const description = `[${nodeObj._id["brightCyan"]}] ${nodeObj._type._id}${nodeRef ? " - " + _optionalChain([nodeRef, 'optionalAccess', _701 => _701.displayName]) : ""}`;
239886
+ const description = `[${nodeObj._id["brightCyan"]}] ${nodeObj._type._id}${nodeRef ? " - " + _optionalChain([nodeRef, 'optionalAccess', _711 => _711.displayName]) : ""}`;
239745
239887
  return description;
239746
239888
  }
239747
239889
  function getTableHeaderMd2() {
@@ -241629,7 +241771,7 @@ function getExtractedFiles(obj, connectorMappingDirectory) {
241629
241771
  if (!obj || typeof obj !== "object") return;
241630
241772
  for (const key of Object.keys(obj)) {
241631
241773
  const value = obj[key];
241632
- if (_optionalChain([value, 'optionalAccess', _702 => _702.type]) === "text/javascript" && value.file) {
241774
+ if (_optionalChain([value, 'optionalAccess', _712 => _712.type]) === "text/javascript" && value.file) {
241633
241775
  const scriptPath = sysPath2.default.join(connectorMappingDirectory, value.file);
241634
241776
  if (fs52.default.existsSync(scriptPath)) {
241635
241777
  value.source = fs52.default.readFileSync(scriptPath, { encoding: "utf-8" });
@@ -242325,7 +242467,7 @@ function getExtractedFiles2(obj, managedObjectDirectory) {
242325
242467
  if (!obj || typeof obj !== "object") return;
242326
242468
  for (const key of Object.keys(obj)) {
242327
242469
  const value = obj[key];
242328
- if (_optionalChain([value, 'optionalAccess', _703 => _703.type]) === "text/javascript" && value.file) {
242470
+ if (_optionalChain([value, 'optionalAccess', _713 => _713.type]) === "text/javascript" && value.file) {
242329
242471
  const scriptPath = sysPath2.default.join(managedObjectDirectory, value.file);
242330
242472
  if (fs52.default.existsSync(scriptPath)) {
242331
242473
  value.source = fs52.default.readFileSync(scriptPath, { encoding: "utf-8" });
@@ -242659,7 +242801,7 @@ async function configManagerImportPasswordPolicy(realm2) {
242659
242801
  if (parsedData && typeof parsedData === "object" && parsedData.idm && typeof parsedData.idm === "object" && Object.keys(parsedData.idm).length > 0) {
242660
242802
  importData = { idm: parsedData.idm };
242661
242803
  } else {
242662
- const id7 = _optionalChain([parsedData, 'optionalAccess', _704 => _704._id]);
242804
+ const id7 = _optionalChain([parsedData, 'optionalAccess', _714 => _714._id]);
242663
242805
  if (!id7) {
242664
242806
  throw new Error(
242665
242807
  `Invalid password policy payload in '${filePath}': expected either an 'idm' map or top-level '_id'.`
@@ -242851,7 +242993,7 @@ async function configManagerImportSchedules(schedulesName) {
242851
242993
  if (schedulesName && id7 !== `schedule/${schedulesName}`) {
242852
242994
  continue;
242853
242995
  }
242854
- if (_optionalChain([importData, 'access', _705 => _705.invokeContext, 'optionalAccess', _706 => _706.task, 'optionalAccess', _707 => _707.script, 'optionalAccess', _708 => _708.file])) {
242996
+ if (_optionalChain([importData, 'access', _715 => _715.invokeContext, 'optionalAccess', _716 => _716.task, 'optionalAccess', _717 => _717.script, 'optionalAccess', _718 => _718.file])) {
242855
242997
  const scriptPath = getFilePath39(
242856
242998
  `schedules/${schedulesFile}/${importData.invokeContext.task.script.file}`
242857
242999
  );
@@ -246975,7 +247117,7 @@ async function tailLogs(source, levels, txid, cookie, nf) {
246975
247117
  filteredLogs = logsObject.result.filter(
246976
247118
  (el) => !noiseFilter.includes(
246977
247119
  el.payload.logger
246978
- ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _709 => _709.payload, 'access', _710 => _710.transactionId, 'optionalAccess', _711 => _711.includes, 'call', _712 => _712(
247120
+ ) && !noiseFilter.includes(el.type) && (levels[0] === "ALL" || levels.includes(resolvePayloadLevel2(el))) && (typeof txid === "undefined" || txid === null || _optionalChain([el, 'access', _719 => _719.payload, 'access', _720 => _720.transactionId, 'optionalAccess', _721 => _721.includes, 'call', _722 => _722(
246979
247121
  txid
246980
247122
  )]))
246981
247123
  );
@@ -247192,9 +247334,9 @@ function setup148() {
247192
247334
  `Created log API key ${creds.api_key_id} and secret.`
247193
247335
  );
247194
247336
  } catch (error49) {
247195
- printMessage2(_optionalChain([error49, 'access', _713 => _713.response, 'optionalAccess', _714 => _714.data]), "error");
247337
+ printMessage2(_optionalChain([error49, 'access', _723 => _723.response, 'optionalAccess', _724 => _724.data]), "error");
247196
247338
  printMessage2(
247197
- `Error creating log API key and secret: ${_optionalChain([error49, 'access', _715 => _715.response, 'optionalAccess', _716 => _716.data, 'optionalAccess', _717 => _717.message])}`,
247339
+ `Error creating log API key and secret: ${_optionalChain([error49, 'access', _725 => _725.response, 'optionalAccess', _726 => _726.data, 'optionalAccess', _727 => _727.message])}`,
247198
247340
  "error"
247199
247341
  );
247200
247342
  process.exitCode = 1;
@@ -248325,7 +248467,7 @@ function setup162() {
248325
248467
  printMessage2(updatesTable.toString(), "data");
248326
248468
  }
248327
248469
  if (!options.checkOnly) {
248328
- if (_optionalChain([updates, 'access', _718 => _718.secrets, 'optionalAccess', _719 => _719.length]) || _optionalChain([updates, 'access', _720 => _720.variables, 'optionalAccess', _721 => _721.length]) || options.force) {
248470
+ if (_optionalChain([updates, 'access', _728 => _728.secrets, 'optionalAccess', _729 => _729.length]) || _optionalChain([updates, 'access', _730 => _730.variables, 'optionalAccess', _731 => _731.length]) || options.force) {
248329
248471
  const ok = options.yes || await (0, import_yesno.default)({
248330
248472
  question: `
248331
248473
  Changes may take up to 10 minutes to propagate, during which time you will not be able to make further updates.
@@ -252853,7 +252995,7 @@ async function listJourneys(long = false) {
252853
252995
  treeExport.tree.noSession ? "yes"["brightYellow"] : "no"["brightGreen"],
252854
252996
  treeExport.tree.transactionalOnly ? "yes"["brightYellow"] : "no"["brightGreen"],
252855
252997
  treeExport.tree.identityResource ? treeExport.tree.identityResource : "",
252856
- _optionalChain([treeExport, 'access', _722 => _722.tree, 'access', _723 => _723.uiConfig, 'optionalAccess', _724 => _724.categories]) ? wordwrap(
252998
+ _optionalChain([treeExport, 'access', _732 => _732.tree, 'access', _733 => _733.uiConfig, 'optionalAccess', _734 => _734.categories]) ? wordwrap(
252857
252999
  JSON.parse(treeExport.tree.uiConfig.categories).join(", "),
252858
253000
  60
252859
253001
  ) : ""
@@ -253165,11 +253307,11 @@ async function importJourneysFromFiles(options) {
253165
253307
  const allJourneysData = { trees: {} };
253166
253308
  for (const file2 of jsonFiles) {
253167
253309
  const fileObj = JSON.parse(fs52.default.readFileSync(file2, "utf8"));
253168
- if (_optionalChain([fileObj, 'optionalAccess', _725 => _725.trees]) && typeof fileObj.trees === "object") {
253310
+ if (_optionalChain([fileObj, 'optionalAccess', _735 => _735.trees]) && typeof fileObj.trees === "object") {
253169
253311
  for (const [id7, obj] of Object.entries(fileObj.trees)) {
253170
253312
  allJourneysData.trees[id7] = obj;
253171
253313
  }
253172
- } else if (_optionalChain([fileObj, 'optionalAccess', _726 => _726.tree, 'optionalAccess', _727 => _727._id])) {
253314
+ } else if (_optionalChain([fileObj, 'optionalAccess', _736 => _736.tree, 'optionalAccess', _737 => _737._id])) {
253173
253315
  allJourneysData.trees[fileObj.tree._id] = fileObj;
253174
253316
  } else {
253175
253317
  printMessage2(
@@ -253248,7 +253390,7 @@ async function describeJourney(journeyData, resolveTreeExport = onlineTreeExport
253248
253390
  nodeTypeMap[nodeData._type._id] = 1;
253249
253391
  }
253250
253392
  }
253251
- if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _728 => _728.meta, 'optionalAccess', _729 => _729.originAmVersion])) {
253393
+ if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _738 => _738.meta, 'optionalAccess', _739 => _739.originAmVersion])) {
253252
253394
  state.setAmVersion(journeyData.meta.originAmVersion);
253253
253395
  }
253254
253396
  printMessage2(`${getOneLineDescription8(journeyData.tree)}`, "data");
@@ -253272,7 +253414,7 @@ Flags
253272
253414
  - No Session: ${journeyData.tree.noSession ? "true"["brightGreen"] : "false"["brightRed"]}
253273
253415
  - Transactional Only: ${journeyData.tree.transactionalOnly ? "true"["brightGreen"] : "false"["brightRed"]}`
253274
253416
  );
253275
- if (_optionalChain([journeyData, 'access', _730 => _730.tree, 'access', _731 => _731.uiConfig, 'optionalAccess', _732 => _732.categories]) && journeyData.tree.uiConfig.categories != "[]") {
253417
+ if (_optionalChain([journeyData, 'access', _740 => _740.tree, 'access', _741 => _741.uiConfig, 'optionalAccess', _742 => _742.categories]) && journeyData.tree.uiConfig.categories != "[]") {
253276
253418
  printMessage2("\nCategories/Tags", "data");
253277
253419
  printMessage2(
253278
253420
  `${JSON.parse(journeyData.tree.uiConfig.categories).join(", ")}`,
@@ -253311,7 +253453,7 @@ Nodes (${Object.entries(allNodes).length}):`, "data");
253311
253453
  );
253312
253454
  }
253313
253455
  }
253314
- if (_optionalChain([journeyData, 'access', _733 => _733.themes, 'optionalAccess', _734 => _734.length])) {
253456
+ if (_optionalChain([journeyData, 'access', _743 => _743.themes, 'optionalAccess', _744 => _744.length])) {
253315
253457
  printMessage2(`
253316
253458
  Themes (${journeyData.themes.length}):`, "data");
253317
253459
  for (const themeData of journeyData.themes) {
@@ -253405,14 +253547,14 @@ async function describeJourneyMd(journeyData, resolveTreeExport = onlineTreeExpo
253405
253547
  nodeTypeMap[nodeData._type._id] = 1;
253406
253548
  }
253407
253549
  }
253408
- if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _735 => _735.meta, 'optionalAccess', _736 => _736.originAmVersion])) {
253550
+ if (!state.getAmVersion() && _optionalChain([journeyData, 'access', _745 => _745.meta, 'optionalAccess', _746 => _746.originAmVersion])) {
253409
253551
  state.setAmVersion(journeyData.meta.originAmVersion);
253410
253552
  }
253411
253553
  printMessage2(
253412
253554
  `# ${getOneLineDescriptionMd(journeyData.tree)} - ${journeyData.tree.enabled === false ? ":o: `disabled`" : ":white_check_mark: `enabled`"}, ${journeyData.tree.innerTreeOnly ? ":o: `innerTreeOnly`" : ":white_check_mark: `not innerTreeOnly`"}, ${journeyData.tree.mustRun ? ":o: `mustRun`" : ":white_check_mark: `not mustRun`"}, ${journeyData.tree.noSession ? ":o: `noSession`" : ":white_check_mark: `sessionAllowed`"}, ${journeyData.tree.transactionalOnly ? ":o: `transactionalOnly`" : ":white_check_mark: `not transactionalOnly`"}${journeyData.tree.identityResource ? `, identity resource: \`${journeyData.tree.identityResource}\`` : ""}`,
253413
253555
  "data"
253414
253556
  );
253415
- if (_optionalChain([journeyData, 'access', _737 => _737.tree, 'access', _738 => _738.uiConfig, 'optionalAccess', _739 => _739.categories]) && journeyData.tree.uiConfig.categories != "[]") {
253557
+ if (_optionalChain([journeyData, 'access', _747 => _747.tree, 'access', _748 => _748.uiConfig, 'optionalAccess', _749 => _749.categories]) && journeyData.tree.uiConfig.categories != "[]") {
253416
253558
  printMessage2(
253417
253559
  `\`${JSON.parse(journeyData.tree.uiConfig.categories).join("`, `")}\``,
253418
253560
  "data"
@@ -253451,7 +253593,7 @@ ${journeyData.tree.description}`, "data");
253451
253593
  );
253452
253594
  }
253453
253595
  }
253454
- if (_optionalChain([journeyData, 'access', _740 => _740.themes, 'optionalAccess', _741 => _741.length])) {
253596
+ if (_optionalChain([journeyData, 'access', _750 => _750.themes, 'optionalAccess', _751 => _751.length])) {
253455
253597
  printMessage2(`## Themes (${journeyData.themes.length})`, "data");
253456
253598
  printMessage2(getTableHeaderMd7(), "data");
253457
253599
  for (const themeData of journeyData.themes) {
@@ -253736,9 +253878,9 @@ function setup203() {
253736
253878
  journeyData = fileData.trees[options.journeyId];
253737
253879
  } else if (typeof options.journeyId === "undefined" && fileData.trees) {
253738
253880
  [journeyData] = Object.values(fileData.trees);
253739
- } else if (typeof options.journeyId !== "undefined" && options.journeyId === _optionalChain([fileData, 'access', _742 => _742.tree, 'optionalAccess', _743 => _743._id])) {
253881
+ } else if (typeof options.journeyId !== "undefined" && options.journeyId === _optionalChain([fileData, 'access', _752 => _752.tree, 'optionalAccess', _753 => _753._id])) {
253740
253882
  journeyData = fileData;
253741
- } else if (typeof options.journeyId === "undefined" && _optionalChain([fileData, 'access', _744 => _744.tree, 'optionalAccess', _745 => _745._id])) {
253883
+ } else if (typeof options.journeyId === "undefined" && _optionalChain([fileData, 'access', _754 => _754.tree, 'optionalAccess', _755 => _755._id])) {
253742
253884
  journeyData = fileData;
253743
253885
  } else {
253744
253886
  throw new Error(
@@ -255582,7 +255724,7 @@ _chunkDLBJL7R2cjs.init_cjs_shims.call(void 0, );
255582
255724
  var errorUtil;
255583
255725
  (function(errorUtil2) {
255584
255726
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
255585
- errorUtil2.toString = (message) => typeof message === "string" ? message : _optionalChain([message, 'optionalAccess', _746 => _746.message]);
255727
+ errorUtil2.toString = (message) => typeof message === "string" ? message : _optionalChain([message, 'optionalAccess', _756 => _756.message]);
255586
255728
  })(errorUtil || (errorUtil = {}));
255587
255729
 
255588
255730
  // node_modules/zod/v3/types.js
@@ -255698,10 +255840,10 @@ var ZodType = class {
255698
255840
  const ctx = {
255699
255841
  common: {
255700
255842
  issues: [],
255701
- async: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _747 => _747.async]), () => ( false)),
255702
- contextualErrorMap: _optionalChain([params, 'optionalAccess', _748 => _748.errorMap])
255843
+ async: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _757 => _757.async]), () => ( false)),
255844
+ contextualErrorMap: _optionalChain([params, 'optionalAccess', _758 => _758.errorMap])
255703
255845
  },
255704
- path: _optionalChain([params, 'optionalAccess', _749 => _749.path]) || [],
255846
+ path: _optionalChain([params, 'optionalAccess', _759 => _759.path]) || [],
255705
255847
  schemaErrorMap: this._def.errorMap,
255706
255848
  parent: null,
255707
255849
  data: data2,
@@ -255731,7 +255873,7 @@ var ZodType = class {
255731
255873
  issues: ctx.common.issues
255732
255874
  };
255733
255875
  } catch (err) {
255734
- if (_optionalChain([err, 'optionalAccess', _750 => _750.message, 'optionalAccess', _751 => _751.toLowerCase, 'call', _752 => _752(), 'optionalAccess', _753 => _753.includes, 'call', _754 => _754("encountered")])) {
255876
+ if (_optionalChain([err, 'optionalAccess', _760 => _760.message, 'optionalAccess', _761 => _761.toLowerCase, 'call', _762 => _762(), 'optionalAccess', _763 => _763.includes, 'call', _764 => _764("encountered")])) {
255735
255877
  this["~standard"].async = true;
255736
255878
  }
255737
255879
  ctx.common = {
@@ -255756,10 +255898,10 @@ var ZodType = class {
255756
255898
  const ctx = {
255757
255899
  common: {
255758
255900
  issues: [],
255759
- contextualErrorMap: _optionalChain([params, 'optionalAccess', _755 => _755.errorMap]),
255901
+ contextualErrorMap: _optionalChain([params, 'optionalAccess', _765 => _765.errorMap]),
255760
255902
  async: true
255761
255903
  },
255762
- path: _optionalChain([params, 'optionalAccess', _756 => _756.path]) || [],
255904
+ path: _optionalChain([params, 'optionalAccess', _766 => _766.path]) || [],
255763
255905
  schemaErrorMap: this._def.errorMap,
255764
255906
  parent: null,
255765
255907
  data: data2,
@@ -255990,7 +256132,7 @@ function isValidJWT(jwt2, alg) {
255990
256132
  const decoded = JSON.parse(atob(base643));
255991
256133
  if (typeof decoded !== "object" || decoded === null)
255992
256134
  return false;
255993
- if ("typ" in decoded && _optionalChain([decoded, 'optionalAccess', _757 => _757.typ]) !== "JWT")
256135
+ if ("typ" in decoded && _optionalChain([decoded, 'optionalAccess', _767 => _767.typ]) !== "JWT")
255994
256136
  return false;
255995
256137
  if (!decoded.alg)
255996
256138
  return false;
@@ -256379,10 +256521,10 @@ var ZodString = class _ZodString2 extends ZodType {
256379
256521
  }
256380
256522
  return this._addCheck({
256381
256523
  kind: "datetime",
256382
- precision: typeof _optionalChain([options, 'optionalAccess', _758 => _758.precision]) === "undefined" ? null : _optionalChain([options, 'optionalAccess', _759 => _759.precision]),
256383
- offset: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _760 => _760.offset]), () => ( false)),
256384
- local: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _761 => _761.local]), () => ( false)),
256385
- ...errorUtil.errToObj(_optionalChain([options, 'optionalAccess', _762 => _762.message]))
256524
+ precision: typeof _optionalChain([options, 'optionalAccess', _768 => _768.precision]) === "undefined" ? null : _optionalChain([options, 'optionalAccess', _769 => _769.precision]),
256525
+ offset: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _770 => _770.offset]), () => ( false)),
256526
+ local: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _771 => _771.local]), () => ( false)),
256527
+ ...errorUtil.errToObj(_optionalChain([options, 'optionalAccess', _772 => _772.message]))
256386
256528
  });
256387
256529
  }
256388
256530
  date(message) {
@@ -256398,8 +256540,8 @@ var ZodString = class _ZodString2 extends ZodType {
256398
256540
  }
256399
256541
  return this._addCheck({
256400
256542
  kind: "time",
256401
- precision: typeof _optionalChain([options, 'optionalAccess', _763 => _763.precision]) === "undefined" ? null : _optionalChain([options, 'optionalAccess', _764 => _764.precision]),
256402
- ...errorUtil.errToObj(_optionalChain([options, 'optionalAccess', _765 => _765.message]))
256543
+ precision: typeof _optionalChain([options, 'optionalAccess', _773 => _773.precision]) === "undefined" ? null : _optionalChain([options, 'optionalAccess', _774 => _774.precision]),
256544
+ ...errorUtil.errToObj(_optionalChain([options, 'optionalAccess', _775 => _775.message]))
256403
256545
  });
256404
256546
  }
256405
256547
  duration(message) {
@@ -256416,8 +256558,8 @@ var ZodString = class _ZodString2 extends ZodType {
256416
256558
  return this._addCheck({
256417
256559
  kind: "includes",
256418
256560
  value,
256419
- position: _optionalChain([options, 'optionalAccess', _766 => _766.position]),
256420
- ...errorUtil.errToObj(_optionalChain([options, 'optionalAccess', _767 => _767.message]))
256561
+ position: _optionalChain([options, 'optionalAccess', _776 => _776.position]),
256562
+ ...errorUtil.errToObj(_optionalChain([options, 'optionalAccess', _777 => _777.message]))
256421
256563
  });
256422
256564
  }
256423
256565
  startsWith(value, message) {
@@ -256552,7 +256694,7 @@ ZodString.create = (params) => {
256552
256694
  return new ZodString({
256553
256695
  checks: [],
256554
256696
  typeName: ZodFirstPartyTypeKind.ZodString,
256555
- coerce: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _768 => _768.coerce]), () => ( false)),
256697
+ coerce: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _778 => _778.coerce]), () => ( false)),
256556
256698
  ...processCreateParams(params)
256557
256699
  });
256558
256700
  };
@@ -256792,7 +256934,7 @@ ZodNumber.create = (params) => {
256792
256934
  return new ZodNumber({
256793
256935
  checks: [],
256794
256936
  typeName: ZodFirstPartyTypeKind.ZodNumber,
256795
- coerce: _optionalChain([params, 'optionalAccess', _769 => _769.coerce]) || false,
256937
+ coerce: _optionalChain([params, 'optionalAccess', _779 => _779.coerce]) || false,
256796
256938
  ...processCreateParams(params)
256797
256939
  });
256798
256940
  };
@@ -256964,7 +257106,7 @@ ZodBigInt.create = (params) => {
256964
257106
  return new ZodBigInt({
256965
257107
  checks: [],
256966
257108
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
256967
- coerce: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _770 => _770.coerce]), () => ( false)),
257109
+ coerce: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _780 => _780.coerce]), () => ( false)),
256968
257110
  ...processCreateParams(params)
256969
257111
  });
256970
257112
  };
@@ -256989,7 +257131,7 @@ var ZodBoolean = class extends ZodType {
256989
257131
  ZodBoolean.create = (params) => {
256990
257132
  return new ZodBoolean({
256991
257133
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
256992
- coerce: _optionalChain([params, 'optionalAccess', _771 => _771.coerce]) || false,
257134
+ coerce: _optionalChain([params, 'optionalAccess', _781 => _781.coerce]) || false,
256993
257135
  ...processCreateParams(params)
256994
257136
  });
256995
257137
  };
@@ -257097,7 +257239,7 @@ var ZodDate = class _ZodDate extends ZodType {
257097
257239
  ZodDate.create = (params) => {
257098
257240
  return new ZodDate({
257099
257241
  checks: [],
257100
- coerce: _optionalChain([params, 'optionalAccess', _772 => _772.coerce]) || false,
257242
+ coerce: _optionalChain([params, 'optionalAccess', _782 => _782.coerce]) || false,
257101
257243
  typeName: ZodFirstPartyTypeKind.ZodDate,
257102
257244
  ...processCreateParams(params)
257103
257245
  });
@@ -257471,7 +257613,7 @@ var ZodObject = class _ZodObject extends ZodType {
257471
257613
  unknownKeys: "strict",
257472
257614
  ...message !== void 0 ? {
257473
257615
  errorMap: (issue2, ctx) => {
257474
- const defaultError = _nullishCoalesce(_optionalChain([this, 'access', _773 => _773._def, 'access', _774 => _774.errorMap, 'optionalCall', _775 => _775(issue2, ctx), 'access', _776 => _776.message]), () => ( ctx.defaultError));
257616
+ const defaultError = _nullishCoalesce(_optionalChain([this, 'access', _783 => _783._def, 'access', _784 => _784.errorMap, 'optionalCall', _785 => _785(issue2, ctx), 'access', _786 => _786.message]), () => ( ctx.defaultError));
257475
257617
  if (issue2.code === "unrecognized_keys")
257476
257618
  return {
257477
257619
  message: _nullishCoalesce(errorUtil.errToObj(message).message, () => ( defaultError))
@@ -259305,13 +259447,13 @@ function $constructor(name, initializer3, params) {
259305
259447
  }
259306
259448
  }
259307
259449
  }
259308
- const Parent = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _777 => _777.Parent]), () => ( Object));
259450
+ const Parent = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _787 => _787.Parent]), () => ( Object));
259309
259451
  class Definition extends Parent {
259310
259452
  }
259311
259453
  Object.defineProperty(Definition, "name", { value: name });
259312
259454
  function _(def7) {
259313
259455
  var _a4;
259314
- const inst = _optionalChain([params, 'optionalAccess', _778 => _778.Parent]) ? new Definition() : this;
259456
+ const inst = _optionalChain([params, 'optionalAccess', _788 => _788.Parent]) ? new Definition() : this;
259315
259457
  init(inst, def7);
259316
259458
  _nullishCoalesce((_a4 = inst._zod).deferred, () => ( (_a4.deferred = [])));
259317
259459
  for (const fn of inst._zod.deferred) {
@@ -259322,9 +259464,9 @@ function $constructor(name, initializer3, params) {
259322
259464
  Object.defineProperty(_, "init", { value: init });
259323
259465
  Object.defineProperty(_, Symbol.hasInstance, {
259324
259466
  value: (inst) => {
259325
- if (_optionalChain([params, 'optionalAccess', _779 => _779.Parent]) && inst instanceof params.Parent)
259467
+ if (_optionalChain([params, 'optionalAccess', _789 => _789.Parent]) && inst instanceof params.Parent)
259326
259468
  return true;
259327
- return _optionalChain([inst, 'optionalAccess', _780 => _780._zod, 'optionalAccess', _781 => _781.traits, 'optionalAccess', _782 => _782.has, 'call', _783 => _783(name)]);
259469
+ return _optionalChain([inst, 'optionalAccess', _790 => _790._zod, 'optionalAccess', _791 => _791.traits, 'optionalAccess', _792 => _792.has, 'call', _793 => _793(name)]);
259328
259470
  }
259329
259471
  });
259330
259472
  Object.defineProperty(_, "name", { value: name });
@@ -259475,7 +259617,7 @@ function floatSafeRemainder2(val, step2) {
259475
259617
  let stepDecCount = (stepString.split(".")[1] || "").length;
259476
259618
  if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
259477
259619
  const match2 = stepString.match(/\d?e-(\d?)/);
259478
- if (_optionalChain([match2, 'optionalAccess', _784 => _784[1]])) {
259620
+ if (_optionalChain([match2, 'optionalAccess', _794 => _794[1]])) {
259479
259621
  stepDecCount = Number.parseInt(match2[1]);
259480
259622
  }
259481
259623
  }
@@ -259532,7 +259674,7 @@ function cloneDef(schema) {
259532
259674
  function getElementAtPath(obj, path16) {
259533
259675
  if (!path16)
259534
259676
  return obj;
259535
- return path16.reduce((acc, key) => _optionalChain([acc, 'optionalAccess', _785 => _785[key]]), obj);
259677
+ return path16.reduce((acc, key) => _optionalChain([acc, 'optionalAccess', _795 => _795[key]]), obj);
259536
259678
  }
259537
259679
  function promiseAllObject(promisesObj) {
259538
259680
  const keys13 = Object.keys(promisesObj);
@@ -259565,7 +259707,7 @@ function isObject5(data2) {
259565
259707
  return typeof data2 === "object" && data2 !== null && !Array.isArray(data2);
259566
259708
  }
259567
259709
  var allowsEval = cached(() => {
259568
- if (typeof navigator !== "undefined" && _optionalChain([navigator, 'optionalAccess', _786 => _786.userAgent, 'optionalAccess', _787 => _787.includes, 'call', _788 => _788("Cloudflare")])) {
259710
+ if (typeof navigator !== "undefined" && _optionalChain([navigator, 'optionalAccess', _796 => _796.userAgent, 'optionalAccess', _797 => _797.includes, 'call', _798 => _798("Cloudflare")])) {
259569
259711
  return false;
259570
259712
  }
259571
259713
  try {
@@ -259659,7 +259801,7 @@ function escapeRegex2(str) {
259659
259801
  }
259660
259802
  function clone(inst, def7, params) {
259661
259803
  const cl = new inst._zod.constr(_nullishCoalesce(def7, () => ( inst._zod.def)));
259662
- if (!def7 || _optionalChain([params, 'optionalAccess', _789 => _789.parent]))
259804
+ if (!def7 || _optionalChain([params, 'optionalAccess', _799 => _799.parent]))
259663
259805
  cl._zod.parent = inst;
259664
259806
  return cl;
259665
259807
  }
@@ -259669,8 +259811,8 @@ function normalizeParams(_params) {
259669
259811
  return {};
259670
259812
  if (typeof params === "string")
259671
259813
  return { error: () => params };
259672
- if (_optionalChain([params, 'optionalAccess', _790 => _790.message]) !== void 0) {
259673
- if (_optionalChain([params, 'optionalAccess', _791 => _791.error]) !== void 0)
259814
+ if (_optionalChain([params, 'optionalAccess', _800 => _800.message]) !== void 0) {
259815
+ if (_optionalChain([params, 'optionalAccess', _801 => _801.error]) !== void 0)
259674
259816
  throw new Error("Cannot specify both `message` and `error` params");
259675
259817
  params.error = params.message;
259676
259818
  }
@@ -259909,7 +260051,7 @@ function aborted(x, startIndex = 0) {
259909
260051
  if (x.aborted === true)
259910
260052
  return true;
259911
260053
  for (let i2 = startIndex; i2 < x.issues.length; i2++) {
259912
- if (_optionalChain([x, 'access', _792 => _792.issues, 'access', _793 => _793[i2], 'optionalAccess', _794 => _794.continue]) !== true) {
260054
+ if (_optionalChain([x, 'access', _802 => _802.issues, 'access', _803 => _803[i2], 'optionalAccess', _804 => _804.continue]) !== true) {
259913
260055
  return true;
259914
260056
  }
259915
260057
  }
@@ -259924,17 +260066,17 @@ function prefixIssues(path16, issues) {
259924
260066
  });
259925
260067
  }
259926
260068
  function unwrapMessage(message) {
259927
- return typeof message === "string" ? message : _optionalChain([message, 'optionalAccess', _795 => _795.message]);
260069
+ return typeof message === "string" ? message : _optionalChain([message, 'optionalAccess', _805 => _805.message]);
259928
260070
  }
259929
260071
  function finalizeIssue(iss, ctx, config5) {
259930
260072
  const full = { ...iss, path: _nullishCoalesce(iss.path, () => ( [])) };
259931
260073
  if (!iss.message) {
259932
- const message = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(unwrapMessage(_optionalChain([iss, 'access', _796 => _796.inst, 'optionalAccess', _797 => _797._zod, 'access', _798 => _798.def, 'optionalAccess', _799 => _799.error, 'optionalCall', _800 => _800(iss)])), () => ( unwrapMessage(_optionalChain([ctx, 'optionalAccess', _801 => _801.error, 'optionalCall', _802 => _802(iss)])))), () => ( unwrapMessage(_optionalChain([config5, 'access', _803 => _803.customError, 'optionalCall', _804 => _804(iss)])))), () => ( unwrapMessage(_optionalChain([config5, 'access', _805 => _805.localeError, 'optionalCall', _806 => _806(iss)])))), () => ( "Invalid input"));
260074
+ const message = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(unwrapMessage(_optionalChain([iss, 'access', _806 => _806.inst, 'optionalAccess', _807 => _807._zod, 'access', _808 => _808.def, 'optionalAccess', _809 => _809.error, 'optionalCall', _810 => _810(iss)])), () => ( unwrapMessage(_optionalChain([ctx, 'optionalAccess', _811 => _811.error, 'optionalCall', _812 => _812(iss)])))), () => ( unwrapMessage(_optionalChain([config5, 'access', _813 => _813.customError, 'optionalCall', _814 => _814(iss)])))), () => ( unwrapMessage(_optionalChain([config5, 'access', _815 => _815.localeError, 'optionalCall', _816 => _816(iss)])))), () => ( "Invalid input"));
259933
260075
  full.message = message;
259934
260076
  }
259935
260077
  delete full.inst;
259936
260078
  delete full.continue;
259937
- if (!_optionalChain([ctx, 'optionalAccess', _807 => _807.reportInput])) {
260079
+ if (!_optionalChain([ctx, 'optionalAccess', _817 => _817.reportInput])) {
259938
260080
  delete full.input;
259939
260081
  }
259940
260082
  return full;
@@ -260165,7 +260307,7 @@ function prettifyError(error49) {
260165
260307
  const issues = [...error49.issues].sort((a, b) => (_nullishCoalesce(a.path, () => ( []))).length - (_nullishCoalesce(b.path, () => ( []))).length);
260166
260308
  for (const issue2 of issues) {
260167
260309
  lines.push(`\u2716 ${issue2.message}`);
260168
- if (_optionalChain([issue2, 'access', _808 => _808.path, 'optionalAccess', _809 => _809.length]))
260310
+ if (_optionalChain([issue2, 'access', _818 => _818.path, 'optionalAccess', _819 => _819.length]))
260169
260311
  lines.push(` \u2192 at ${toDotPath(issue2.path)}`);
260170
260312
  }
260171
260313
  return lines.join("\n");
@@ -260179,8 +260321,8 @@ var _parse = (_Err) => (schema, value, _ctx7, _params) => {
260179
260321
  throw new $ZodAsyncError();
260180
260322
  }
260181
260323
  if (result.issues.length) {
260182
- const e = new (_nullishCoalesce(_optionalChain([_params, 'optionalAccess', _810 => _810.Err]), () => ( _Err)))(result.issues.map((iss) => finalizeIssue(iss, ctx, config4())));
260183
- captureStackTrace(e, _optionalChain([_params, 'optionalAccess', _811 => _811.callee]));
260324
+ const e = new (_nullishCoalesce(_optionalChain([_params, 'optionalAccess', _820 => _820.Err]), () => ( _Err)))(result.issues.map((iss) => finalizeIssue(iss, ctx, config4())));
260325
+ captureStackTrace(e, _optionalChain([_params, 'optionalAccess', _821 => _821.callee]));
260184
260326
  throw e;
260185
260327
  }
260186
260328
  return result.value;
@@ -260192,8 +260334,8 @@ var _parseAsync = (_Err) => async (schema, value, _ctx7, params) => {
260192
260334
  if (result instanceof Promise)
260193
260335
  result = await result;
260194
260336
  if (result.issues.length) {
260195
- const e = new (_nullishCoalesce(_optionalChain([params, 'optionalAccess', _812 => _812.Err]), () => ( _Err)))(result.issues.map((iss) => finalizeIssue(iss, ctx, config4())));
260196
- captureStackTrace(e, _optionalChain([params, 'optionalAccess', _813 => _813.callee]));
260337
+ const e = new (_nullishCoalesce(_optionalChain([params, 'optionalAccess', _822 => _822.Err]), () => ( _Err)))(result.issues.map((iss) => finalizeIssue(iss, ctx, config4())));
260338
+ captureStackTrace(e, _optionalChain([params, 'optionalAccess', _823 => _823.callee]));
260197
260339
  throw e;
260198
260340
  }
260199
260341
  return result.value;
@@ -260389,7 +260531,7 @@ function datetime(args) {
260389
260531
  return new RegExp(`^${dateSource}T(?:${timeRegex2})$`);
260390
260532
  }
260391
260533
  var string = (params) => {
260392
- const regex2 = params ? `[\\s\\S]{${_nullishCoalesce(_optionalChain([params, 'optionalAccess', _814 => _814.minimum]), () => ( 0))},${_nullishCoalesce(_optionalChain([params, 'optionalAccess', _815 => _815.maximum]), () => ( ""))}}` : `[\\s\\S]*`;
260534
+ const regex2 = params ? `[\\s\\S]{${_nullishCoalesce(_optionalChain([params, 'optionalAccess', _824 => _824.minimum]), () => ( 0))},${_nullishCoalesce(_optionalChain([params, 'optionalAccess', _825 => _825.maximum]), () => ( ""))}}` : `[\\s\\S]*`;
260393
260535
  return new RegExp(`^${regex2}$`);
260394
260536
  };
260395
260537
  var bigint = /^-?\d+n?$/;
@@ -260516,7 +260658,7 @@ var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (i
260516
260658
  var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def7) => {
260517
260659
  $ZodCheck.init(inst, def7);
260518
260660
  def7.format = def7.format || "float64";
260519
- const isInt = _optionalChain([def7, 'access', _816 => _816.format, 'optionalAccess', _817 => _817.includes, 'call', _818 => _818("int")]);
260661
+ const isInt = _optionalChain([def7, 'access', _826 => _826.format, 'optionalAccess', _827 => _827.includes, 'call', _828 => _828("int")]);
260520
260662
  const origin2 = isInt ? "int" : "number";
260521
260663
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def7.format];
260522
260664
  inst._zod.onattach.push((inst2) => {
@@ -261001,8 +261143,8 @@ var Doc = class {
261001
261143
  }
261002
261144
  compile() {
261003
261145
  const F = Function;
261004
- const args = _optionalChain([this, 'optionalAccess', _819 => _819.args]);
261005
- const content = _nullishCoalesce(_optionalChain([this, 'optionalAccess', _820 => _820.content]), () => ( [``]));
261146
+ const args = _optionalChain([this, 'optionalAccess', _829 => _829.args]);
261147
+ const content = _nullishCoalesce(_optionalChain([this, 'optionalAccess', _830 => _830.content]), () => ( [``]));
261006
261148
  const lines = [...content.map((x) => ` ${x}`)];
261007
261149
  return new F(...args, lines.join("\n"));
261008
261150
  }
@@ -261034,7 +261176,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def7) => {
261034
261176
  }
261035
261177
  if (checks.length === 0) {
261036
261178
  _nullishCoalesce((_a4 = inst._zod).deferred, () => ( (_a4.deferred = [])));
261037
- _optionalChain([inst, 'access', _821 => _821._zod, 'access', _822 => _822.deferred, 'optionalAccess', _823 => _823.push, 'call', _824 => _824(() => {
261179
+ _optionalChain([inst, 'access', _831 => _831._zod, 'access', _832 => _832.deferred, 'optionalAccess', _833 => _833.push, 'call', _834 => _834(() => {
261038
261180
  inst._zod.run = inst._zod.parse;
261039
261181
  })]);
261040
261182
  } else {
@@ -261051,7 +261193,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def7) => {
261051
261193
  }
261052
261194
  const currLen = payload.issues.length;
261053
261195
  const _ = ch._zod.check(payload);
261054
- if (_ instanceof Promise && _optionalChain([ctx, 'optionalAccess', _825 => _825.async]) === false) {
261196
+ if (_ instanceof Promise && _optionalChain([ctx, 'optionalAccess', _835 => _835.async]) === false) {
261055
261197
  throw new $ZodAsyncError();
261056
261198
  }
261057
261199
  if (asyncResult || _ instanceof Promise) {
@@ -261117,9 +261259,9 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def7) => {
261117
261259
  validate: (value) => {
261118
261260
  try {
261119
261261
  const r = safeParse(inst, value);
261120
- return r.success ? { value: r.data } : { issues: _optionalChain([r, 'access', _826 => _826.error, 'optionalAccess', _827 => _827.issues]) };
261262
+ return r.success ? { value: r.data } : { issues: _optionalChain([r, 'access', _836 => _836.error, 'optionalAccess', _837 => _837.issues]) };
261121
261263
  } catch (_) {
261122
- return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: _optionalChain([r, 'access', _828 => _828.error, 'optionalAccess', _829 => _829.issues]) });
261264
+ return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: _optionalChain([r, 'access', _838 => _838.error, 'optionalAccess', _839 => _839.issues]) });
261123
261265
  }
261124
261266
  },
261125
261267
  vendor: "zod",
@@ -261128,7 +261270,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def7) => {
261128
261270
  });
261129
261271
  var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def7) => {
261130
261272
  $ZodType.init(inst, def7);
261131
- inst._zod.pattern = _nullishCoalesce([..._nullishCoalesce(_optionalChain([inst, 'optionalAccess', _830 => _830._zod, 'access', _831 => _831.bag, 'optionalAccess', _832 => _832.patterns]), () => ( []))].pop(), () => ( string(inst._zod.bag)));
261273
+ inst._zod.pattern = _nullishCoalesce([..._nullishCoalesce(_optionalChain([inst, 'optionalAccess', _840 => _840._zod, 'access', _841 => _841.bag, 'optionalAccess', _842 => _842.patterns]), () => ( []))].pop(), () => ( string(inst._zod.bag)));
261132
261274
  inst._zod.parse = (payload, _) => {
261133
261275
  if (def7.coerce)
261134
261276
  try {
@@ -261397,7 +261539,7 @@ function isValidJWT2(token2, algorithm = null) {
261397
261539
  if (!header)
261398
261540
  return false;
261399
261541
  const parsedHeader = JSON.parse(atob(header));
261400
- if ("typ" in parsedHeader && _optionalChain([parsedHeader, 'optionalAccess', _833 => _833.typ]) !== "JWT")
261542
+ if ("typ" in parsedHeader && _optionalChain([parsedHeader, 'optionalAccess', _843 => _843.typ]) !== "JWT")
261401
261543
  return false;
261402
261544
  if (!parsedHeader.alg)
261403
261545
  return false;
@@ -261676,7 +261818,7 @@ function handlePropertyResult(result, final, key, input, isOptionalOut) {
261676
261818
  function normalizeDef(def7) {
261677
261819
  const keys13 = Object.keys(def7.shape);
261678
261820
  for (const k2 of keys13) {
261679
- if (!_optionalChain([def7, 'access', _834 => _834.shape, 'optionalAccess', _835 => _835[k2], 'optionalAccess', _836 => _836._zod, 'optionalAccess', _837 => _837.traits, 'optionalAccess', _838 => _838.has, 'call', _839 => _839("$ZodType")])) {
261821
+ if (!_optionalChain([def7, 'access', _844 => _844.shape, 'optionalAccess', _845 => _845[k2], 'optionalAccess', _846 => _846._zod, 'optionalAccess', _847 => _847.traits, 'optionalAccess', _848 => _848.has, 'call', _849 => _849("$ZodType")])) {
261680
261822
  throw new Error(`Invalid element at key "${k2}": expected a Zod schema`);
261681
261823
  }
261682
261824
  }
@@ -261726,7 +261868,7 @@ function handleCatchall(proms, input, payload, ctx, def7, inst) {
261726
261868
  var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def7) => {
261727
261869
  $ZodType.init(inst, def7);
261728
261870
  const desc = Object.getOwnPropertyDescriptor(def7, "shape");
261729
- if (!_optionalChain([desc, 'optionalAccess', _840 => _840.get])) {
261871
+ if (!_optionalChain([desc, 'optionalAccess', _850 => _850.get])) {
261730
261872
  const sh = def7.shape;
261731
261873
  Object.defineProperty(def7, "shape", {
261732
261874
  get: () => {
@@ -261808,7 +261950,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def7) =
261808
261950
  const id7 = ids[key];
261809
261951
  const k2 = esc(key);
261810
261952
  const schema = shape[key];
261811
- const isOptionalOut = _optionalChain([schema, 'optionalAccess', _841 => _841._zod, 'optionalAccess', _842 => _842.optout]) === "optional";
261953
+ const isOptionalOut = _optionalChain([schema, 'optionalAccess', _851 => _851._zod, 'optionalAccess', _852 => _852.optout]) === "optional";
261812
261954
  doc.write(`const ${id7} = ${parseStr(key)};`);
261813
261955
  if (isOptionalOut) {
261814
261956
  doc.write(`
@@ -261874,7 +262016,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def7) =
261874
262016
  });
261875
262017
  return payload;
261876
262018
  }
261877
- if (jit && fastEnabled && _optionalChain([ctx, 'optionalAccess', _843 => _843.async]) === false && ctx.jitless !== true) {
262019
+ if (jit && fastEnabled && _optionalChain([ctx, 'optionalAccess', _853 => _853.async]) === false && ctx.jitless !== true) {
261878
262020
  if (!fastpass)
261879
262021
  fastpass = generateFastpass(def7.shape);
261880
262022
  payload = fastpass(payload, ctx);
@@ -262029,7 +262171,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
262029
262171
  const opts = def7.options;
262030
262172
  const map5 = /* @__PURE__ */ new Map();
262031
262173
  for (const o of opts) {
262032
- const values3 = _optionalChain([o, 'access', _844 => _844._zod, 'access', _845 => _845.propValues, 'optionalAccess', _846 => _846[def7.discriminator]]);
262174
+ const values3 = _optionalChain([o, 'access', _854 => _854._zod, 'access', _855 => _855.propValues, 'optionalAccess', _856 => _856[def7.discriminator]]);
262033
262175
  if (!values3 || values3.size === 0)
262034
262176
  throw new Error(`Invalid discriminated union option at index "${def7.options.indexOf(o)}"`);
262035
262177
  for (const v of values3) {
@@ -262052,7 +262194,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
262052
262194
  });
262053
262195
  return payload;
262054
262196
  }
262055
- const opt = disc.value.get(_optionalChain([input, 'optionalAccess', _847 => _847[def7.discriminator]]));
262197
+ const opt = disc.value.get(_optionalChain([input, 'optionalAccess', _857 => _857[def7.discriminator]]));
262056
262198
  if (opt) {
262057
262199
  return opt._zod.run(payload, ctx);
262058
262200
  }
@@ -262796,8 +262938,8 @@ var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def7) =>
262796
262938
  $ZodType.init(inst, def7);
262797
262939
  defineLazy(inst._zod, "propValues", () => def7.innerType._zod.propValues);
262798
262940
  defineLazy(inst._zod, "values", () => def7.innerType._zod.values);
262799
- defineLazy(inst._zod, "optin", () => _optionalChain([def7, 'access', _848 => _848.innerType, 'optionalAccess', _849 => _849._zod, 'optionalAccess', _850 => _850.optin]));
262800
- defineLazy(inst._zod, "optout", () => _optionalChain([def7, 'access', _851 => _851.innerType, 'optionalAccess', _852 => _852._zod, 'optionalAccess', _853 => _853.optout]));
262941
+ defineLazy(inst._zod, "optin", () => _optionalChain([def7, 'access', _858 => _858.innerType, 'optionalAccess', _859 => _859._zod, 'optionalAccess', _860 => _860.optin]));
262942
+ defineLazy(inst._zod, "optout", () => _optionalChain([def7, 'access', _861 => _861.innerType, 'optionalAccess', _862 => _862._zod, 'optionalAccess', _863 => _863.optout]));
262801
262943
  inst._zod.parse = (payload, ctx) => {
262802
262944
  if (ctx.direction === "backward") {
262803
262945
  return def7.innerType._zod.run(payload, ctx);
@@ -262944,10 +263086,10 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def7) => {
262944
263086
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def7) => {
262945
263087
  $ZodType.init(inst, def7);
262946
263088
  defineLazy(inst._zod, "innerType", () => def7.getter());
262947
- defineLazy(inst._zod, "pattern", () => _optionalChain([inst, 'access', _854 => _854._zod, 'access', _855 => _855.innerType, 'optionalAccess', _856 => _856._zod, 'optionalAccess', _857 => _857.pattern]));
262948
- defineLazy(inst._zod, "propValues", () => _optionalChain([inst, 'access', _858 => _858._zod, 'access', _859 => _859.innerType, 'optionalAccess', _860 => _860._zod, 'optionalAccess', _861 => _861.propValues]));
262949
- defineLazy(inst._zod, "optin", () => _nullishCoalesce(_optionalChain([inst, 'access', _862 => _862._zod, 'access', _863 => _863.innerType, 'optionalAccess', _864 => _864._zod, 'optionalAccess', _865 => _865.optin]), () => ( void 0)));
262950
- defineLazy(inst._zod, "optout", () => _nullishCoalesce(_optionalChain([inst, 'access', _866 => _866._zod, 'access', _867 => _867.innerType, 'optionalAccess', _868 => _868._zod, 'optionalAccess', _869 => _869.optout]), () => ( void 0)));
263089
+ defineLazy(inst._zod, "pattern", () => _optionalChain([inst, 'access', _864 => _864._zod, 'access', _865 => _865.innerType, 'optionalAccess', _866 => _866._zod, 'optionalAccess', _867 => _867.pattern]));
263090
+ defineLazy(inst._zod, "propValues", () => _optionalChain([inst, 'access', _868 => _868._zod, 'access', _869 => _869.innerType, 'optionalAccess', _870 => _870._zod, 'optionalAccess', _871 => _871.propValues]));
263091
+ defineLazy(inst._zod, "optin", () => _nullishCoalesce(_optionalChain([inst, 'access', _872 => _872._zod, 'access', _873 => _873.innerType, 'optionalAccess', _874 => _874._zod, 'optionalAccess', _875 => _875.optin]), () => ( void 0)));
263092
+ defineLazy(inst._zod, "optout", () => _nullishCoalesce(_optionalChain([inst, 'access', _876 => _876._zod, 'access', _877 => _877.innerType, 'optionalAccess', _878 => _878._zod, 'optionalAccess', _879 => _879.optout]), () => ( void 0)));
262951
263093
  inst._zod.parse = (payload, ctx) => {
262952
263094
  const inner = inst._zod.innerType;
262953
263095
  return inner._zod.run(payload, ctx);
@@ -264832,7 +264974,7 @@ var error17 = () => {
264832
264974
  const withDefinite = (t) => `\u05D4${typeLabel(t)}`;
264833
264975
  const verbFor = (t) => {
264834
264976
  const e = typeEntry(t);
264835
- const gender = _nullishCoalesce(_optionalChain([e, 'optionalAccess', _870 => _870.gender]), () => ( "m"));
264977
+ const gender = _nullishCoalesce(_optionalChain([e, 'optionalAccess', _880 => _880.gender]), () => ( "m"));
264836
264978
  return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA";
264837
264979
  };
264838
264980
  const getSizing = (origin2) => {
@@ -264881,7 +265023,7 @@ var error17 = () => {
264881
265023
  const expectedKey = issue2.expected;
264882
265024
  const expected = _nullishCoalesce(TypeDictionary[_nullishCoalesce(expectedKey, () => ( ""))], () => ( typeLabel(expectedKey)));
264883
265025
  const receivedType = parsedType(issue2.input);
264884
- const received = _nullishCoalesce(_nullishCoalesce(TypeDictionary[receivedType], () => ( _optionalChain([TypeNames, 'access', _871 => _871[receivedType], 'optionalAccess', _872 => _872.label]))), () => ( receivedType));
265026
+ const received = _nullishCoalesce(_nullishCoalesce(TypeDictionary[receivedType], () => ( _optionalChain([TypeNames, 'access', _881 => _881[receivedType], 'optionalAccess', _882 => _882.label]))), () => ( receivedType));
264885
265027
  if (/^[A-Z]/.test(issue2.expected)) {
264886
265028
  return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;
264887
265029
  }
@@ -264903,7 +265045,7 @@ var error17 = () => {
264903
265045
  const sizing = getSizing(issue2.origin);
264904
265046
  const subject = withDefinite(_nullishCoalesce(issue2.origin, () => ( "value")));
264905
265047
  if (issue2.origin === "string") {
264906
- return `${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _873 => _873.longLabel]), () => ( "\u05D0\u05E8\u05D5\u05DA"))} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _874 => _874.unit]), () => ( ""))} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();
265048
+ return `${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _883 => _883.longLabel]), () => ( "\u05D0\u05E8\u05D5\u05DA"))} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _884 => _884.unit]), () => ( ""))} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();
264907
265049
  }
264908
265050
  if (issue2.origin === "number") {
264909
265051
  const comparison = issue2.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue2.maximum}`;
@@ -264911,21 +265053,21 @@ var error17 = () => {
264911
265053
  }
264912
265054
  if (issue2.origin === "array" || issue2.origin === "set") {
264913
265055
  const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA";
264914
- const comparison = issue2.inclusive ? `${issue2.maximum} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _875 => _875.unit]), () => ( ""))} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _876 => _876.unit]), () => ( ""))}`;
265056
+ const comparison = issue2.inclusive ? `${issue2.maximum} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _885 => _885.unit]), () => ( ""))} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _886 => _886.unit]), () => ( ""))}`;
264915
265057
  return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
264916
265058
  }
264917
265059
  const adj = issue2.inclusive ? "<=" : "<";
264918
265060
  const be = verbFor(_nullishCoalesce(issue2.origin, () => ( "value")));
264919
- if (_optionalChain([sizing, 'optionalAccess', _877 => _877.unit])) {
265061
+ if (_optionalChain([sizing, 'optionalAccess', _887 => _887.unit])) {
264920
265062
  return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
264921
265063
  }
264922
- return `${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _878 => _878.longLabel]), () => ( "\u05D2\u05D3\u05D5\u05DC"))} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.maximum.toString()}`;
265064
+ return `${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _888 => _888.longLabel]), () => ( "\u05D2\u05D3\u05D5\u05DC"))} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.maximum.toString()}`;
264923
265065
  }
264924
265066
  case "too_small": {
264925
265067
  const sizing = getSizing(issue2.origin);
264926
265068
  const subject = withDefinite(_nullishCoalesce(issue2.origin, () => ( "value")));
264927
265069
  if (issue2.origin === "string") {
264928
- return `${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _879 => _879.shortLabel]), () => ( "\u05E7\u05E6\u05E8"))} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _880 => _880.unit]), () => ( ""))} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();
265070
+ return `${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _889 => _889.shortLabel]), () => ( "\u05E7\u05E6\u05E8"))} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _890 => _890.unit]), () => ( ""))} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();
264929
265071
  }
264930
265072
  if (issue2.origin === "number") {
264931
265073
  const comparison = issue2.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue2.minimum}`;
@@ -264937,15 +265079,15 @@ var error17 = () => {
264937
265079
  const singularPhrase = issue2.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3";
264938
265080
  return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`;
264939
265081
  }
264940
- const comparison = issue2.inclusive ? `${issue2.minimum} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _881 => _881.unit]), () => ( ""))} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _882 => _882.unit]), () => ( ""))}`;
265082
+ const comparison = issue2.inclusive ? `${issue2.minimum} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _891 => _891.unit]), () => ( ""))} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _892 => _892.unit]), () => ( ""))}`;
264941
265083
  return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
264942
265084
  }
264943
265085
  const adj = issue2.inclusive ? ">=" : ">";
264944
265086
  const be = verbFor(_nullishCoalesce(issue2.origin, () => ( "value")));
264945
- if (_optionalChain([sizing, 'optionalAccess', _883 => _883.unit])) {
265087
+ if (_optionalChain([sizing, 'optionalAccess', _893 => _893.unit])) {
264946
265088
  return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
264947
265089
  }
264948
- return `${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _884 => _884.shortLabel]), () => ( "\u05E7\u05D8\u05DF"))} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.minimum.toString()}`;
265090
+ return `${_nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _894 => _894.shortLabel]), () => ( "\u05E7\u05D8\u05DF"))} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.minimum.toString()}`;
264949
265091
  }
264950
265092
  case "invalid_format": {
264951
265093
  const _issue = issue2;
@@ -264958,8 +265100,8 @@ var error17 = () => {
264958
265100
  if (_issue.format === "regex")
264959
265101
  return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`;
264960
265102
  const nounEntry = FormatDictionary[_issue.format];
264961
- const noun = _nullishCoalesce(_optionalChain([nounEntry, 'optionalAccess', _885 => _885.label]), () => ( _issue.format));
264962
- const gender = _nullishCoalesce(_optionalChain([nounEntry, 'optionalAccess', _886 => _886.gender]), () => ( "m"));
265103
+ const noun = _nullishCoalesce(_optionalChain([nounEntry, 'optionalAccess', _895 => _895.label]), () => ( _issue.format));
265104
+ const gender = _nullishCoalesce(_optionalChain([nounEntry, 'optionalAccess', _896 => _896.gender]), () => ( "m"));
264963
265105
  const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF";
264964
265106
  return `${noun} \u05DC\u05D0 ${adjective}`;
264965
265107
  }
@@ -265982,7 +266124,7 @@ var error26 = () => {
265982
266124
  const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC";
265983
266125
  const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4";
265984
266126
  const sizing = getSizing(issue2.origin);
265985
- const unit = _nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _887 => _887.unit]), () => ( "\uC694\uC18C"));
266127
+ const unit = _nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _897 => _897.unit]), () => ( "\uC694\uC18C"));
265986
266128
  if (sizing)
265987
266129
  return `${_nullishCoalesce(issue2.origin, () => ( "\uAC12"))}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`;
265988
266130
  return `${_nullishCoalesce(issue2.origin, () => ( "\uAC12"))}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix}`;
@@ -265991,7 +266133,7 @@ var error26 = () => {
265991
266133
  const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC";
265992
266134
  const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4";
265993
266135
  const sizing = getSizing(issue2.origin);
265994
- const unit = _nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _888 => _888.unit]), () => ( "\uC694\uC18C"));
266136
+ const unit = _nullishCoalesce(_optionalChain([sizing, 'optionalAccess', _898 => _898.unit]), () => ( "\uC694\uC18C"));
265995
266137
  if (sizing) {
265996
266138
  return `${_nullishCoalesce(issue2.origin, () => ( "\uAC12"))}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`;
265997
266139
  }
@@ -266187,18 +266329,18 @@ var error27 = () => {
266187
266329
  case "too_big": {
266188
266330
  const origin2 = _nullishCoalesce(TypeDictionary[issue2.origin], () => ( issue2.origin));
266189
266331
  const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), _nullishCoalesce(issue2.inclusive, () => ( false)), "smaller");
266190
- if (_optionalChain([sizing, 'optionalAccess', _889 => _889.verb]))
266332
+ if (_optionalChain([sizing, 'optionalAccess', _899 => _899.verb]))
266191
266333
  return `${capitalizeFirstCharacter(_nullishCoalesce(_nullishCoalesce(origin2, () => ( issue2.origin)), () => ( "reik\u0161m\u0117")))} ${sizing.verb} ${issue2.maximum.toString()} ${_nullishCoalesce(sizing.unit, () => ( "element\u0173"))}`;
266192
266334
  const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip";
266193
- return `${capitalizeFirstCharacter(_nullishCoalesce(_nullishCoalesce(origin2, () => ( issue2.origin)), () => ( "reik\u0161m\u0117")))} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${_optionalChain([sizing, 'optionalAccess', _890 => _890.unit])}`;
266335
+ return `${capitalizeFirstCharacter(_nullishCoalesce(_nullishCoalesce(origin2, () => ( issue2.origin)), () => ( "reik\u0161m\u0117")))} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${_optionalChain([sizing, 'optionalAccess', _900 => _900.unit])}`;
266194
266336
  }
266195
266337
  case "too_small": {
266196
266338
  const origin2 = _nullishCoalesce(TypeDictionary[issue2.origin], () => ( issue2.origin));
266197
266339
  const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), _nullishCoalesce(issue2.inclusive, () => ( false)), "bigger");
266198
- if (_optionalChain([sizing, 'optionalAccess', _891 => _891.verb]))
266340
+ if (_optionalChain([sizing, 'optionalAccess', _901 => _901.verb]))
266199
266341
  return `${capitalizeFirstCharacter(_nullishCoalesce(_nullishCoalesce(origin2, () => ( issue2.origin)), () => ( "reik\u0161m\u0117")))} ${sizing.verb} ${issue2.minimum.toString()} ${_nullishCoalesce(sizing.unit, () => ( "element\u0173"))}`;
266200
266342
  const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip";
266201
- return `${capitalizeFirstCharacter(_nullishCoalesce(_nullishCoalesce(origin2, () => ( issue2.origin)), () => ( "reik\u0161m\u0117")))} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${_optionalChain([sizing, 'optionalAccess', _892 => _892.unit])}`;
266343
+ return `${capitalizeFirstCharacter(_nullishCoalesce(_nullishCoalesce(origin2, () => ( issue2.origin)), () => ( "reik\u0161m\u0117")))} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${_optionalChain([sizing, 'optionalAccess', _902 => _902.unit])}`;
266202
266344
  }
266203
266345
  case "invalid_format": {
266204
266346
  const _issue = issue2;
@@ -269712,24 +269854,24 @@ function _stringFormat(Class2, format2, fnOrRegex, _params = {}) {
269712
269854
  // node_modules/zod/v4/core/to-json-schema.js
269713
269855
  _chunkDLBJL7R2cjs.init_cjs_shims.call(void 0, );
269714
269856
  function initializeContext(params) {
269715
- let target = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _893 => _893.target]), () => ( "draft-2020-12"));
269857
+ let target = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _903 => _903.target]), () => ( "draft-2020-12"));
269716
269858
  if (target === "draft-4")
269717
269859
  target = "draft-04";
269718
269860
  if (target === "draft-7")
269719
269861
  target = "draft-07";
269720
269862
  return {
269721
269863
  processors: _nullishCoalesce(params.processors, () => ( {})),
269722
- metadataRegistry: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _894 => _894.metadata]), () => ( globalRegistry)),
269864
+ metadataRegistry: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _904 => _904.metadata]), () => ( globalRegistry)),
269723
269865
  target,
269724
- unrepresentable: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _895 => _895.unrepresentable]), () => ( "throw")),
269725
- override: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _896 => _896.override]), () => ( (() => {
269866
+ unrepresentable: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _905 => _905.unrepresentable]), () => ( "throw")),
269867
+ override: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _906 => _906.override]), () => ( (() => {
269726
269868
  }))),
269727
- io: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _897 => _897.io]), () => ( "output")),
269869
+ io: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _907 => _907.io]), () => ( "output")),
269728
269870
  counter: 0,
269729
269871
  seen: /* @__PURE__ */ new Map(),
269730
- cycles: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _898 => _898.cycles]), () => ( "ref")),
269731
- reused: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _899 => _899.reused]), () => ( "inline")),
269732
- external: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _900 => _900.external]), () => ( void 0))
269872
+ cycles: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _908 => _908.cycles]), () => ( "ref")),
269873
+ reused: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _909 => _909.reused]), () => ( "inline")),
269874
+ external: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _910 => _910.external]), () => ( void 0))
269733
269875
  };
269734
269876
  }
269735
269877
  function process5(schema, ctx, _params = { path: [], schemaPath: [] }) {
@@ -269746,7 +269888,7 @@ function process5(schema, ctx, _params = { path: [], schemaPath: [] }) {
269746
269888
  }
269747
269889
  const result = { schema: {}, count: 1, cycle: void 0, path: _params.path };
269748
269890
  ctx.seen.set(schema, result);
269749
- const overrideSchema = _optionalChain([schema, 'access', _901 => _901._zod, 'access', _902 => _902.toJSONSchema, 'optionalCall', _903 => _903()]);
269891
+ const overrideSchema = _optionalChain([schema, 'access', _911 => _911._zod, 'access', _912 => _912.toJSONSchema, 'optionalCall', _913 => _913()]);
269750
269892
  if (overrideSchema) {
269751
269893
  result.schema = overrideSchema;
269752
269894
  } else {
@@ -269792,7 +269934,7 @@ function extractDefs(ctx, schema) {
269792
269934
  throw new Error("Unprocessed schema. This is a bug in Zod.");
269793
269935
  const idToSchema = /* @__PURE__ */ new Map();
269794
269936
  for (const entry of ctx.seen.entries()) {
269795
- const id7 = _optionalChain([ctx, 'access', _904 => _904.metadataRegistry, 'access', _905 => _905.get, 'call', _906 => _906(entry[0]), 'optionalAccess', _907 => _907.id]);
269937
+ const id7 = _optionalChain([ctx, 'access', _914 => _914.metadataRegistry, 'access', _915 => _915.get, 'call', _916 => _916(entry[0]), 'optionalAccess', _917 => _917.id]);
269796
269938
  if (id7) {
269797
269939
  const existing = idToSchema.get(id7);
269798
269940
  if (existing && existing !== entry[0]) {
@@ -269804,7 +269946,7 @@ function extractDefs(ctx, schema) {
269804
269946
  const makeURI = (entry) => {
269805
269947
  const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
269806
269948
  if (ctx.external) {
269807
- const externalId = _optionalChain([ctx, 'access', _908 => _908.external, 'access', _909 => _909.registry, 'access', _910 => _910.get, 'call', _911 => _911(entry[0]), 'optionalAccess', _912 => _912.id]);
269949
+ const externalId = _optionalChain([ctx, 'access', _918 => _918.external, 'access', _919 => _919.registry, 'access', _920 => _920.get, 'call', _921 => _921(entry[0]), 'optionalAccess', _922 => _922.id]);
269808
269950
  const uriGenerator = _nullishCoalesce(ctx.external.uri, () => ( ((id8) => id8)));
269809
269951
  if (externalId) {
269810
269952
  return { ref: uriGenerator(externalId) };
@@ -269840,7 +269982,7 @@ function extractDefs(ctx, schema) {
269840
269982
  for (const entry of ctx.seen.entries()) {
269841
269983
  const seen = entry[1];
269842
269984
  if (seen.cycle) {
269843
- throw new Error(`Cycle detected: #/${_optionalChain([seen, 'access', _913 => _913.cycle, 'optionalAccess', _914 => _914.join, 'call', _915 => _915("/")])}/<root>
269985
+ throw new Error(`Cycle detected: #/${_optionalChain([seen, 'access', _923 => _923.cycle, 'optionalAccess', _924 => _924.join, 'call', _925 => _925("/")])}/<root>
269844
269986
 
269845
269987
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
269846
269988
  }
@@ -269853,13 +269995,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
269853
269995
  continue;
269854
269996
  }
269855
269997
  if (ctx.external) {
269856
- const ext = _optionalChain([ctx, 'access', _916 => _916.external, 'access', _917 => _917.registry, 'access', _918 => _918.get, 'call', _919 => _919(entry[0]), 'optionalAccess', _920 => _920.id]);
269998
+ const ext = _optionalChain([ctx, 'access', _926 => _926.external, 'access', _927 => _927.registry, 'access', _928 => _928.get, 'call', _929 => _929(entry[0]), 'optionalAccess', _930 => _930.id]);
269857
269999
  if (schema !== entry[0] && ext) {
269858
270000
  extractToDef(entry);
269859
270001
  continue;
269860
270002
  }
269861
270003
  }
269862
- const id7 = _optionalChain([ctx, 'access', _921 => _921.metadataRegistry, 'access', _922 => _922.get, 'call', _923 => _923(entry[0]), 'optionalAccess', _924 => _924.id]);
270004
+ const id7 = _optionalChain([ctx, 'access', _931 => _931.metadataRegistry, 'access', _932 => _932.get, 'call', _933 => _933(entry[0]), 'optionalAccess', _934 => _934.id]);
269863
270005
  if (id7) {
269864
270006
  extractToDef(entry);
269865
270007
  continue;
@@ -269923,7 +270065,7 @@ function finalize(ctx, schema) {
269923
270065
  if (parent && parent !== ref) {
269924
270066
  flattenRef(parent);
269925
270067
  const parentSeen = ctx.seen.get(parent);
269926
- if (_optionalChain([parentSeen, 'optionalAccess', _925 => _925.schema, 'access', _926 => _926.$ref])) {
270068
+ if (_optionalChain([parentSeen, 'optionalAccess', _935 => _935.schema, 'access', _936 => _936.$ref])) {
269927
270069
  schema2.$ref = parentSeen.schema.$ref;
269928
270070
  if (parentSeen.def) {
269929
270071
  for (const key in schema2) {
@@ -269955,14 +270097,14 @@ function finalize(ctx, schema) {
269955
270097
  } else if (ctx.target === "openapi-3.0") {
269956
270098
  } else {
269957
270099
  }
269958
- if (_optionalChain([ctx, 'access', _927 => _927.external, 'optionalAccess', _928 => _928.uri])) {
269959
- const id7 = _optionalChain([ctx, 'access', _929 => _929.external, 'access', _930 => _930.registry, 'access', _931 => _931.get, 'call', _932 => _932(schema), 'optionalAccess', _933 => _933.id]);
270100
+ if (_optionalChain([ctx, 'access', _937 => _937.external, 'optionalAccess', _938 => _938.uri])) {
270101
+ const id7 = _optionalChain([ctx, 'access', _939 => _939.external, 'access', _940 => _940.registry, 'access', _941 => _941.get, 'call', _942 => _942(schema), 'optionalAccess', _943 => _943.id]);
269960
270102
  if (!id7)
269961
270103
  throw new Error("Schema is missing an `id` property");
269962
270104
  result.$id = ctx.external.uri(id7);
269963
270105
  }
269964
270106
  Object.assign(result, _nullishCoalesce(root4.def, () => ( root4.schema)));
269965
- const defs = _nullishCoalesce(_optionalChain([ctx, 'access', _934 => _934.external, 'optionalAccess', _935 => _935.defs]), () => ( {}));
270107
+ const defs = _nullishCoalesce(_optionalChain([ctx, 'access', _944 => _944.external, 'optionalAccess', _945 => _945.defs]), () => ( {}));
269966
270108
  for (const entry of ctx.seen.entries()) {
269967
270109
  const seen = entry[1];
269968
270110
  if (seen.def && seen.defId) {
@@ -270341,7 +270483,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
270341
270483
  if (requiredKeys.size > 0) {
270342
270484
  json2.required = Array.from(requiredKeys);
270343
270485
  }
270344
- if (_optionalChain([def7, 'access', _936 => _936.catchall, 'optionalAccess', _937 => _937._zod, 'access', _938 => _938.def, 'access', _939 => _939.type]) === "never") {
270486
+ if (_optionalChain([def7, 'access', _946 => _946.catchall, 'optionalAccess', _947 => _947._zod, 'access', _948 => _948.def, 'access', _949 => _949.type]) === "never") {
270345
270487
  json2.additionalProperties = false;
270346
270488
  } else if (!def7.catchall) {
270347
270489
  if (ctx.io === "output")
@@ -270431,7 +270573,7 @@ var recordProcessor = (schema, ctx, _json, params) => {
270431
270573
  json2.type = "object";
270432
270574
  const keyType = def7.keyType;
270433
270575
  const keyBag = keyType._zod.bag;
270434
- const patterns = _optionalChain([keyBag, 'optionalAccess', _940 => _940.patterns]);
270576
+ const patterns = _optionalChain([keyBag, 'optionalAccess', _950 => _950.patterns]);
270435
270577
  if (def7.mode === "loose" && patterns && patterns.size > 0) {
270436
270578
  const valueSchema = process5(def7.valueType, ctx, {
270437
270579
  ...params,
@@ -270591,7 +270733,7 @@ function toJSONSchema(input, params) {
270591
270733
  const schemas = {};
270592
270734
  const external = {
270593
270735
  registry: registry2,
270594
- uri: _optionalChain([params, 'optionalAccess', _941 => _941.uri]),
270736
+ uri: _optionalChain([params, 'optionalAccess', _951 => _951.uri]),
270595
270737
  defs
270596
270738
  };
270597
270739
  ctx2.external = external;
@@ -270649,7 +270791,7 @@ var JSONSchemaGenerator = class {
270649
270791
  return this.ctx.seen;
270650
270792
  }
270651
270793
  constructor(params) {
270652
- let normalizedTarget = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _942 => _942.target]), () => ( "draft-2020-12"));
270794
+ let normalizedTarget = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _952 => _952.target]), () => ( "draft-2020-12"));
270653
270795
  if (normalizedTarget === "draft-4")
270654
270796
  normalizedTarget = "draft-04";
270655
270797
  if (normalizedTarget === "draft-7")
@@ -270657,10 +270799,10 @@ var JSONSchemaGenerator = class {
270657
270799
  this.ctx = initializeContext({
270658
270800
  processors: allProcessors,
270659
270801
  target: normalizedTarget,
270660
- ..._optionalChain([params, 'optionalAccess', _943 => _943.metadata]) && { metadata: params.metadata },
270661
- ..._optionalChain([params, 'optionalAccess', _944 => _944.unrepresentable]) && { unrepresentable: params.unrepresentable },
270662
- ..._optionalChain([params, 'optionalAccess', _945 => _945.override]) && { override: params.override },
270663
- ..._optionalChain([params, 'optionalAccess', _946 => _946.io]) && { io: params.io }
270802
+ ..._optionalChain([params, 'optionalAccess', _953 => _953.metadata]) && { metadata: params.metadata },
270803
+ ..._optionalChain([params, 'optionalAccess', _954 => _954.unrepresentable]) && { unrepresentable: params.unrepresentable },
270804
+ ..._optionalChain([params, 'optionalAccess', _955 => _955.override]) && { override: params.override },
270805
+ ..._optionalChain([params, 'optionalAccess', _956 => _956.io]) && { io: params.io }
270664
270806
  });
270665
270807
  }
270666
270808
  /**
@@ -270792,7 +270934,7 @@ function getObjectShape(schema) {
270792
270934
  let rawShape;
270793
270935
  if (isZ4Schema(schema)) {
270794
270936
  const v4Schema = schema;
270795
- rawShape = _optionalChain([v4Schema, 'access', _947 => _947._zod, 'optionalAccess', _948 => _948.def, 'optionalAccess', _949 => _949.shape]);
270937
+ rawShape = _optionalChain([v4Schema, 'access', _957 => _957._zod, 'optionalAccess', _958 => _958.def, 'optionalAccess', _959 => _959.shape]);
270796
270938
  } else {
270797
270939
  const v3Schema = schema;
270798
270940
  rawShape = v3Schema.shape;
@@ -270823,7 +270965,7 @@ function normalizeObjectSchema(schema) {
270823
270965
  }
270824
270966
  if (isZ4Schema(schema)) {
270825
270967
  const v4Schema = schema;
270826
- const def7 = _optionalChain([v4Schema, 'access', _950 => _950._zod, 'optionalAccess', _951 => _951.def]);
270968
+ const def7 = _optionalChain([v4Schema, 'access', _960 => _960._zod, 'optionalAccess', _961 => _961.def]);
270827
270969
  if (def7 && (def7.type === "object" || def7.shape !== void 0)) {
270828
270970
  return schema;
270829
270971
  }
@@ -270860,18 +271002,18 @@ function getSchemaDescription(schema) {
270860
271002
  function isSchemaOptional(schema) {
270861
271003
  if (isZ4Schema(schema)) {
270862
271004
  const v4Schema = schema;
270863
- return _optionalChain([v4Schema, 'access', _952 => _952._zod, 'optionalAccess', _953 => _953.def, 'optionalAccess', _954 => _954.type]) === "optional";
271005
+ return _optionalChain([v4Schema, 'access', _962 => _962._zod, 'optionalAccess', _963 => _963.def, 'optionalAccess', _964 => _964.type]) === "optional";
270864
271006
  }
270865
271007
  const v3Schema = schema;
270866
271008
  if (typeof schema.isOptional === "function") {
270867
271009
  return schema.isOptional();
270868
271010
  }
270869
- return _optionalChain([v3Schema, 'access', _955 => _955._def, 'optionalAccess', _956 => _956.typeName]) === "ZodOptional";
271011
+ return _optionalChain([v3Schema, 'access', _965 => _965._def, 'optionalAccess', _966 => _966.typeName]) === "ZodOptional";
270870
271012
  }
270871
271013
  function getLiteralValue(schema) {
270872
271014
  if (isZ4Schema(schema)) {
270873
271015
  const v4Schema = schema;
270874
- const def8 = _optionalChain([v4Schema, 'access', _957 => _957._zod, 'optionalAccess', _958 => _958.def]);
271016
+ const def8 = _optionalChain([v4Schema, 'access', _967 => _967._zod, 'optionalAccess', _968 => _968.def]);
270875
271017
  if (def8) {
270876
271018
  if (def8.value !== void 0)
270877
271019
  return def8.value;
@@ -271518,7 +271660,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def7) => {
271518
271660
  };
271519
271661
  Object.defineProperty(inst, "description", {
271520
271662
  get() {
271521
- return _optionalChain([globalRegistry, 'access', _959 => _959.get, 'call', _960 => _960(inst), 'optionalAccess', _961 => _961.description]);
271663
+ return _optionalChain([globalRegistry, 'access', _969 => _969.get, 'call', _970 => _970(inst), 'optionalAccess', _971 => _971.description]);
271522
271664
  },
271523
271665
  configurable: true
271524
271666
  });
@@ -271767,7 +271909,7 @@ function hex5(_params) {
271767
271909
  return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params);
271768
271910
  }
271769
271911
  function hash(alg, params) {
271770
- const enc2 = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _962 => _962.enc]), () => ( "hex"));
271912
+ const enc2 = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _972 => _972.enc]), () => ( "hex"));
271771
271913
  const format2 = `${alg}_${enc2}`;
271772
271914
  const regex2 = regexes_exports[format2];
271773
271915
  if (!regex2)
@@ -272465,8 +272607,8 @@ var ZodFunction2 = /* @__PURE__ */ $constructor("ZodFunction", (inst, def7) => {
272465
272607
  function _function(params) {
272466
272608
  return new ZodFunction2({
272467
272609
  type: "function",
272468
- input: Array.isArray(_optionalChain([params, 'optionalAccess', _963 => _963.input])) ? tuple(_optionalChain([params, 'optionalAccess', _964 => _964.input])) : _nullishCoalesce(_optionalChain([params, 'optionalAccess', _965 => _965.input]), () => ( array(unknown()))),
272469
- output: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _966 => _966.output]), () => ( unknown()))
272610
+ input: Array.isArray(_optionalChain([params, 'optionalAccess', _973 => _973.input])) ? tuple(_optionalChain([params, 'optionalAccess', _974 => _974.input])) : _nullishCoalesce(_optionalChain([params, 'optionalAccess', _975 => _975.input]), () => ( array(unknown()))),
272611
+ output: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _976 => _976.output]), () => ( unknown()))
272470
272612
  });
272471
272613
  }
272472
272614
  var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def7) => {
@@ -273019,7 +273161,7 @@ function fromJSONSchema(schema, params) {
273019
273161
  if (typeof schema === "boolean") {
273020
273162
  return schema ? z.any() : z.never();
273021
273163
  }
273022
- const version4 = detectVersion(schema, _optionalChain([params, 'optionalAccess', _967 => _967.defaultTarget]));
273164
+ const version4 = detectVersion(schema, _optionalChain([params, 'optionalAccess', _977 => _977.defaultTarget]));
273023
273165
  const defs = schema.$defs || schema.definitions || {};
273024
273166
  const ctx = {
273025
273167
  version: version4,
@@ -273027,7 +273169,7 @@ function fromJSONSchema(schema, params) {
273027
273169
  refs: /* @__PURE__ */ new Map(),
273028
273170
  processing: /* @__PURE__ */ new Set(),
273029
273171
  rootSchema: schema,
273030
- registry: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _968 => _968.registry]), () => ( globalRegistry))
273172
+ registry: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _978 => _978.registry]), () => ( globalRegistry))
273031
273173
  };
273032
273174
  return convertSchema(schema, ctx);
273033
273175
  }
@@ -274590,7 +274732,7 @@ var UrlElicitationRequiredError = class extends McpError {
274590
274732
  });
274591
274733
  }
274592
274734
  get elicitations() {
274593
- return _nullishCoalesce(_optionalChain([this, 'access', _969 => _969.data, 'optionalAccess', _970 => _970.elicitations]), () => ( []));
274735
+ return _nullishCoalesce(_optionalChain([this, 'access', _979 => _979.data, 'optionalAccess', _980 => _980.elicitations]), () => ( []));
274594
274736
  }
274595
274737
  };
274596
274738
 
@@ -274666,7 +274808,7 @@ var getRefs = (options) => {
274666
274808
  // node_modules/zod-to-json-schema/dist/esm/errorMessages.js
274667
274809
  _chunkDLBJL7R2cjs.init_cjs_shims.call(void 0, );
274668
274810
  function addErrorMessage(res, key, errorMessage, refs) {
274669
- if (!_optionalChain([refs, 'optionalAccess', _971 => _971.errorMessages]))
274811
+ if (!_optionalChain([refs, 'optionalAccess', _981 => _981.errorMessages]))
274670
274812
  return;
274671
274813
  if (errorMessage) {
274672
274814
  res.errorMessage = {
@@ -274720,7 +274862,7 @@ function parseArrayDef(def7, refs) {
274720
274862
  const res = {
274721
274863
  type: "array"
274722
274864
  };
274723
- if (_optionalChain([def7, 'access', _972 => _972.type, 'optionalAccess', _973 => _973._def]) && _optionalChain([def7, 'access', _974 => _974.type, 'optionalAccess', _975 => _975._def, 'optionalAccess', _976 => _976.typeName]) !== ZodFirstPartyTypeKind.ZodAny) {
274865
+ if (_optionalChain([def7, 'access', _982 => _982.type, 'optionalAccess', _983 => _983._def]) && _optionalChain([def7, 'access', _984 => _984.type, 'optionalAccess', _985 => _985._def, 'optionalAccess', _986 => _986.typeName]) !== ZodFirstPartyTypeKind.ZodAny) {
274724
274866
  res.items = parseDef(def7.type._def, {
274725
274867
  ...refs,
274726
274868
  currentPath: [...refs.currentPath, "items"]
@@ -275155,7 +275297,7 @@ function escapeNonAlphaNumeric(source) {
275155
275297
  return result;
275156
275298
  }
275157
275299
  function addFormat(schema, value, message, refs) {
275158
- if (schema.format || _optionalChain([schema, 'access', _977 => _977.anyOf, 'optionalAccess', _978 => _978.some, 'call', _979 => _979((x) => x.format)])) {
275300
+ if (schema.format || _optionalChain([schema, 'access', _987 => _987.anyOf, 'optionalAccess', _988 => _988.some, 'call', _989 => _989((x) => x.format)])) {
275159
275301
  if (!schema.anyOf) {
275160
275302
  schema.anyOf = [];
275161
275303
  }
@@ -275183,7 +275325,7 @@ function addFormat(schema, value, message, refs) {
275183
275325
  }
275184
275326
  }
275185
275327
  function addPattern(schema, regex2, message, refs) {
275186
- if (schema.pattern || _optionalChain([schema, 'access', _980 => _980.allOf, 'optionalAccess', _981 => _981.some, 'call', _982 => _982((x) => x.pattern)])) {
275328
+ if (schema.pattern || _optionalChain([schema, 'access', _990 => _990.allOf, 'optionalAccess', _991 => _991.some, 'call', _992 => _992((x) => x.pattern)])) {
275187
275329
  if (!schema.allOf) {
275188
275330
  schema.allOf = [];
275189
275331
  }
@@ -275238,7 +275380,7 @@ function stringifyRegExpWithFlags(regex2, refs) {
275238
275380
  pattern += source[i2];
275239
275381
  pattern += `${source[i2 - 2]}-${source[i2]}`.toUpperCase();
275240
275382
  inCharRange = false;
275241
- } else if (source[i2 + 1] === "-" && _optionalChain([source, 'access', _983 => _983[i2 + 2], 'optionalAccess', _984 => _984.match, 'call', _985 => _985(/[a-z]/)])) {
275383
+ } else if (source[i2 + 1] === "-" && _optionalChain([source, 'access', _993 => _993[i2 + 2], 'optionalAccess', _994 => _994.match, 'call', _995 => _995(/[a-z]/)])) {
275242
275384
  pattern += source[i2];
275243
275385
  inCharRange = true;
275244
275386
  } else {
@@ -275291,7 +275433,7 @@ function parseRecordDef(def7, refs) {
275291
275433
  if (refs.target === "openAi") {
275292
275434
  console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
275293
275435
  }
275294
- if (refs.target === "openApi3" && _optionalChain([def7, 'access', _986 => _986.keyType, 'optionalAccess', _987 => _987._def, 'access', _988 => _988.typeName]) === ZodFirstPartyTypeKind.ZodEnum) {
275436
+ if (refs.target === "openApi3" && _optionalChain([def7, 'access', _996 => _996.keyType, 'optionalAccess', _997 => _997._def, 'access', _998 => _998.typeName]) === ZodFirstPartyTypeKind.ZodEnum) {
275295
275437
  return {
275296
275438
  type: "object",
275297
275439
  required: def7.keyType._def.values,
@@ -275315,20 +275457,20 @@ function parseRecordDef(def7, refs) {
275315
275457
  if (refs.target === "openApi3") {
275316
275458
  return schema;
275317
275459
  }
275318
- if (_optionalChain([def7, 'access', _989 => _989.keyType, 'optionalAccess', _990 => _990._def, 'access', _991 => _991.typeName]) === ZodFirstPartyTypeKind.ZodString && _optionalChain([def7, 'access', _992 => _992.keyType, 'access', _993 => _993._def, 'access', _994 => _994.checks, 'optionalAccess', _995 => _995.length])) {
275460
+ if (_optionalChain([def7, 'access', _999 => _999.keyType, 'optionalAccess', _1000 => _1000._def, 'access', _1001 => _1001.typeName]) === ZodFirstPartyTypeKind.ZodString && _optionalChain([def7, 'access', _1002 => _1002.keyType, 'access', _1003 => _1003._def, 'access', _1004 => _1004.checks, 'optionalAccess', _1005 => _1005.length])) {
275319
275461
  const { type, ...keyType } = parseStringDef(def7.keyType._def, refs);
275320
275462
  return {
275321
275463
  ...schema,
275322
275464
  propertyNames: keyType
275323
275465
  };
275324
- } else if (_optionalChain([def7, 'access', _996 => _996.keyType, 'optionalAccess', _997 => _997._def, 'access', _998 => _998.typeName]) === ZodFirstPartyTypeKind.ZodEnum) {
275466
+ } else if (_optionalChain([def7, 'access', _1006 => _1006.keyType, 'optionalAccess', _1007 => _1007._def, 'access', _1008 => _1008.typeName]) === ZodFirstPartyTypeKind.ZodEnum) {
275325
275467
  return {
275326
275468
  ...schema,
275327
275469
  propertyNames: {
275328
275470
  enum: def7.keyType._def.values
275329
275471
  }
275330
275472
  };
275331
- } else if (_optionalChain([def7, 'access', _999 => _999.keyType, 'optionalAccess', _1000 => _1000._def, 'access', _1001 => _1001.typeName]) === ZodFirstPartyTypeKind.ZodBranded && def7.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && _optionalChain([def7, 'access', _1002 => _1002.keyType, 'access', _1003 => _1003._def, 'access', _1004 => _1004.type, 'access', _1005 => _1005._def, 'access', _1006 => _1006.checks, 'optionalAccess', _1007 => _1007.length])) {
275473
+ } else if (_optionalChain([def7, 'access', _1009 => _1009.keyType, 'optionalAccess', _1010 => _1010._def, 'access', _1011 => _1011.typeName]) === ZodFirstPartyTypeKind.ZodBranded && def7.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && _optionalChain([def7, 'access', _1012 => _1012.keyType, 'access', _1013 => _1013._def, 'access', _1014 => _1014.type, 'access', _1015 => _1015._def, 'access', _1016 => _1016.checks, 'optionalAccess', _1017 => _1017.length])) {
275332
275474
  const { type, ...keyType } = parseBrandedDef(def7.keyType._def, refs);
275333
275475
  return {
275334
275476
  ...schema,
@@ -275628,7 +275770,7 @@ function safeIsOptional(schema) {
275628
275770
  // node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
275629
275771
  _chunkDLBJL7R2cjs.init_cjs_shims.call(void 0, );
275630
275772
  var parseOptionalDef = (def7, refs) => {
275631
- if (refs.currentPath.toString() === _optionalChain([refs, 'access', _1008 => _1008.propertyPath, 'optionalAccess', _1009 => _1009.toString, 'call', _1010 => _1010()])) {
275773
+ if (refs.currentPath.toString() === _optionalChain([refs, 'access', _1018 => _1018.propertyPath, 'optionalAccess', _1019 => _1019.toString, 'call', _1020 => _1020()])) {
275632
275774
  return parseDef(def7.innerType._def, refs);
275633
275775
  }
275634
275776
  const innerSchema = parseDef(def7.innerType._def, {
@@ -275822,7 +275964,7 @@ var selectParser = (def7, typeName, refs) => {
275822
275964
  function parseDef(def7, refs, forceResolution = false) {
275823
275965
  const seenItem = refs.seen.get(def7);
275824
275966
  if (refs.override) {
275825
- const overrideResult = _optionalChain([refs, 'access', _1011 => _1011.override, 'optionalCall', _1012 => _1012(def7, refs, seenItem, forceResolution)]);
275967
+ const overrideResult = _optionalChain([refs, 'access', _1021 => _1021.override, 'optionalCall', _1022 => _1022(def7, refs, seenItem, forceResolution)]);
275826
275968
  if (overrideResult !== ignoreOverride) {
275827
275969
  return overrideResult;
275828
275970
  }
@@ -275888,7 +276030,7 @@ var zodToJsonSchema = (schema, options) => {
275888
276030
  currentPath: [...refs.basePath, refs.definitionPath, name2]
275889
276031
  }, true), () => ( parseAnyDef(refs)))
275890
276032
  }), {}) : void 0;
275891
- const name = typeof options === "string" ? options : _optionalChain([options, 'optionalAccess', _1013 => _1013.nameStrategy]) === "title" ? void 0 : _optionalChain([options, 'optionalAccess', _1014 => _1014.name]);
276033
+ const name = typeof options === "string" ? options : _optionalChain([options, 'optionalAccess', _1023 => _1023.nameStrategy]) === "title" ? void 0 : _optionalChain([options, 'optionalAccess', _1024 => _1024.name]);
275892
276034
  const main = _nullishCoalesce(parseDef(schema._def, name === void 0 ? refs : {
275893
276035
  ...refs,
275894
276036
  currentPath: [...refs.basePath, refs.definitionPath, name]
@@ -275953,18 +276095,18 @@ function mapMiniTarget(t) {
275953
276095
  function toJsonSchemaCompat(schema, opts) {
275954
276096
  if (isZ4Schema(schema)) {
275955
276097
  return toJSONSchema(schema, {
275956
- target: mapMiniTarget(_optionalChain([opts, 'optionalAccess', _1015 => _1015.target])),
275957
- io: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _1016 => _1016.pipeStrategy]), () => ( "input"))
276098
+ target: mapMiniTarget(_optionalChain([opts, 'optionalAccess', _1025 => _1025.target])),
276099
+ io: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _1026 => _1026.pipeStrategy]), () => ( "input"))
275958
276100
  });
275959
276101
  }
275960
276102
  return zodToJsonSchema(schema, {
275961
- strictUnions: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _1017 => _1017.strictUnions]), () => ( true)),
275962
- pipeStrategy: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _1018 => _1018.pipeStrategy]), () => ( "input"))
276103
+ strictUnions: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _1027 => _1027.strictUnions]), () => ( true)),
276104
+ pipeStrategy: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _1028 => _1028.pipeStrategy]), () => ( "input"))
275963
276105
  });
275964
276106
  }
275965
276107
  function getMethodLiteral(schema) {
275966
276108
  const shape = getObjectShape(schema);
275967
- const methodSchema = _optionalChain([shape, 'optionalAccess', _1019 => _1019.method]);
276109
+ const methodSchema = _optionalChain([shape, 'optionalAccess', _1029 => _1029.method]);
275968
276110
  if (!methodSchema) {
275969
276111
  throw new Error("Schema is missing a method literal");
275970
276112
  }
@@ -276008,8 +276150,8 @@ var Protocol = class {
276008
276150
  // Automatic pong by default.
276009
276151
  (_request) => ({})
276010
276152
  );
276011
- this._taskStore = _optionalChain([_options, 'optionalAccess', _1020 => _1020.taskStore]);
276012
- this._taskMessageQueue = _optionalChain([_options, 'optionalAccess', _1021 => _1021.taskMessageQueue]);
276153
+ this._taskStore = _optionalChain([_options, 'optionalAccess', _1030 => _1030.taskStore]);
276154
+ this._taskMessageQueue = _optionalChain([_options, 'optionalAccess', _1031 => _1031.taskMessageQueue]);
276013
276155
  if (this._taskStore) {
276014
276156
  this.setRequestHandler(GetTaskRequestSchema, async (request, extra) => {
276015
276157
  const task5 = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
@@ -276045,7 +276187,7 @@ var Protocol = class {
276045
276187
  }
276046
276188
  continue;
276047
276189
  }
276048
- await _optionalChain([this, 'access', _1022 => _1022._transport, 'optionalAccess', _1023 => _1023.send, 'call', _1024 => _1024(queuedMessage.message, { relatedRequestId: extra.requestId })]);
276190
+ await _optionalChain([this, 'access', _1032 => _1032._transport, 'optionalAccess', _1033 => _1033.send, 'call', _1034 => _1034(queuedMessage.message, { relatedRequestId: extra.requestId })]);
276049
276191
  }
276050
276192
  }
276051
276193
  const task5 = await this._taskStore.getTask(taskId, extra.sessionId);
@@ -276075,7 +276217,7 @@ var Protocol = class {
276075
276217
  });
276076
276218
  this.setRequestHandler(ListTasksRequestSchema, async (request, extra) => {
276077
276219
  try {
276078
- const { tasks, nextCursor } = await this._taskStore.listTasks(_optionalChain([request, 'access', _1025 => _1025.params, 'optionalAccess', _1026 => _1026.cursor]), extra.sessionId);
276220
+ const { tasks, nextCursor } = await this._taskStore.listTasks(_optionalChain([request, 'access', _1035 => _1035.params, 'optionalAccess', _1036 => _1036.cursor]), extra.sessionId);
276079
276221
  return {
276080
276222
  tasks,
276081
276223
  nextCursor,
@@ -276118,7 +276260,7 @@ var Protocol = class {
276118
276260
  return;
276119
276261
  }
276120
276262
  const controller = this._requestHandlerAbortControllers.get(notification.params.requestId);
276121
- _optionalChain([controller, 'optionalAccess', _1027 => _1027.abort, 'call', _1028 => _1028(notification.params.reason)]);
276263
+ _optionalChain([controller, 'optionalAccess', _1037 => _1037.abort, 'call', _1038 => _1038(notification.params.reason)]);
276122
276264
  }
276123
276265
  _setupTimeout(messageId, timeout4, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {
276124
276266
  this._timeoutInfo.set(messageId, {
@@ -276163,19 +276305,19 @@ var Protocol = class {
276163
276305
  throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");
276164
276306
  }
276165
276307
  this._transport = transport;
276166
- const _onclose = _optionalChain([this, 'access', _1029 => _1029.transport, 'optionalAccess', _1030 => _1030.onclose]);
276308
+ const _onclose = _optionalChain([this, 'access', _1039 => _1039.transport, 'optionalAccess', _1040 => _1040.onclose]);
276167
276309
  this._transport.onclose = () => {
276168
- _optionalChain([_onclose, 'optionalCall', _1031 => _1031()]);
276310
+ _optionalChain([_onclose, 'optionalCall', _1041 => _1041()]);
276169
276311
  this._onclose();
276170
276312
  };
276171
- const _onerror = _optionalChain([this, 'access', _1032 => _1032.transport, 'optionalAccess', _1033 => _1033.onerror]);
276313
+ const _onerror = _optionalChain([this, 'access', _1042 => _1042.transport, 'optionalAccess', _1043 => _1043.onerror]);
276172
276314
  this._transport.onerror = (error49) => {
276173
- _optionalChain([_onerror, 'optionalCall', _1034 => _1034(error49)]);
276315
+ _optionalChain([_onerror, 'optionalCall', _1044 => _1044(error49)]);
276174
276316
  this._onerror(error49);
276175
276317
  };
276176
- const _onmessage = _optionalChain([this, 'access', _1035 => _1035._transport, 'optionalAccess', _1036 => _1036.onmessage]);
276318
+ const _onmessage = _optionalChain([this, 'access', _1045 => _1045._transport, 'optionalAccess', _1046 => _1046.onmessage]);
276177
276319
  this._transport.onmessage = (message, extra) => {
276178
- _optionalChain([_onmessage, 'optionalCall', _1037 => _1037(message, extra)]);
276320
+ _optionalChain([_onmessage, 'optionalCall', _1047 => _1047(message, extra)]);
276179
276321
  if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {
276180
276322
  this._onresponse(message);
276181
276323
  } else if (isJSONRPCRequest(message)) {
@@ -276204,13 +276346,13 @@ var Protocol = class {
276204
276346
  this._requestHandlerAbortControllers.clear();
276205
276347
  const error49 = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
276206
276348
  this._transport = void 0;
276207
- _optionalChain([this, 'access', _1038 => _1038.onclose, 'optionalCall', _1039 => _1039()]);
276349
+ _optionalChain([this, 'access', _1048 => _1048.onclose, 'optionalCall', _1049 => _1049()]);
276208
276350
  for (const handler of responseHandlers.values()) {
276209
276351
  handler(error49);
276210
276352
  }
276211
276353
  }
276212
276354
  _onerror(error49) {
276213
- _optionalChain([this, 'access', _1040 => _1040.onerror, 'optionalCall', _1041 => _1041(error49)]);
276355
+ _optionalChain([this, 'access', _1050 => _1050.onerror, 'optionalCall', _1051 => _1051(error49)]);
276214
276356
  }
276215
276357
  _onnotification(notification) {
276216
276358
  const handler = _nullishCoalesce(this._notificationHandlers.get(notification.method), () => ( this.fallbackNotificationHandler));
@@ -276222,7 +276364,7 @@ var Protocol = class {
276222
276364
  _onrequest(request, extra) {
276223
276365
  const handler = _nullishCoalesce(this._requestHandlers.get(request.method), () => ( this.fallbackRequestHandler));
276224
276366
  const capturedTransport = this._transport;
276225
- const relatedTaskId = _optionalChain([request, 'access', _1042 => _1042.params, 'optionalAccess', _1043 => _1043._meta, 'optionalAccess', _1044 => _1044[RELATED_TASK_META_KEY], 'optionalAccess', _1045 => _1045.taskId]);
276367
+ const relatedTaskId = _optionalChain([request, 'access', _1052 => _1052.params, 'optionalAccess', _1053 => _1053._meta, 'optionalAccess', _1054 => _1054[RELATED_TASK_META_KEY], 'optionalAccess', _1055 => _1055.taskId]);
276226
276368
  if (handler === void 0) {
276227
276369
  const errorResponse = {
276228
276370
  jsonrpc: "2.0",
@@ -276237,20 +276379,20 @@ var Protocol = class {
276237
276379
  type: "error",
276238
276380
  message: errorResponse,
276239
276381
  timestamp: Date.now()
276240
- }, _optionalChain([capturedTransport, 'optionalAccess', _1046 => _1046.sessionId])).catch((error49) => this._onerror(new Error(`Failed to enqueue error response: ${error49}`)));
276382
+ }, _optionalChain([capturedTransport, 'optionalAccess', _1056 => _1056.sessionId])).catch((error49) => this._onerror(new Error(`Failed to enqueue error response: ${error49}`)));
276241
276383
  } else {
276242
- _optionalChain([capturedTransport, 'optionalAccess', _1047 => _1047.send, 'call', _1048 => _1048(errorResponse), 'access', _1049 => _1049.catch, 'call', _1050 => _1050((error49) => this._onerror(new Error(`Failed to send an error response: ${error49}`)))]);
276384
+ _optionalChain([capturedTransport, 'optionalAccess', _1057 => _1057.send, 'call', _1058 => _1058(errorResponse), 'access', _1059 => _1059.catch, 'call', _1060 => _1060((error49) => this._onerror(new Error(`Failed to send an error response: ${error49}`)))]);
276243
276385
  }
276244
276386
  return;
276245
276387
  }
276246
276388
  const abortController = new AbortController();
276247
276389
  this._requestHandlerAbortControllers.set(request.id, abortController);
276248
276390
  const taskCreationParams = isTaskAugmentedRequestParams(request.params) ? request.params.task : void 0;
276249
- const taskStore = this._taskStore ? this.requestTaskStore(request, _optionalChain([capturedTransport, 'optionalAccess', _1051 => _1051.sessionId])) : void 0;
276391
+ const taskStore = this._taskStore ? this.requestTaskStore(request, _optionalChain([capturedTransport, 'optionalAccess', _1061 => _1061.sessionId])) : void 0;
276250
276392
  const fullExtra = {
276251
276393
  signal: abortController.signal,
276252
- sessionId: _optionalChain([capturedTransport, 'optionalAccess', _1052 => _1052.sessionId]),
276253
- _meta: _optionalChain([request, 'access', _1053 => _1053.params, 'optionalAccess', _1054 => _1054._meta]),
276394
+ sessionId: _optionalChain([capturedTransport, 'optionalAccess', _1062 => _1062.sessionId]),
276395
+ _meta: _optionalChain([request, 'access', _1063 => _1063.params, 'optionalAccess', _1064 => _1064._meta]),
276254
276396
  sendNotification: async (notification) => {
276255
276397
  if (abortController.signal.aborted)
276256
276398
  return;
@@ -276268,20 +276410,20 @@ var Protocol = class {
276268
276410
  if (relatedTaskId && !requestOptions.relatedTask) {
276269
276411
  requestOptions.relatedTask = { taskId: relatedTaskId };
276270
276412
  }
276271
- const effectiveTaskId = _nullishCoalesce(_optionalChain([requestOptions, 'access', _1055 => _1055.relatedTask, 'optionalAccess', _1056 => _1056.taskId]), () => ( relatedTaskId));
276413
+ const effectiveTaskId = _nullishCoalesce(_optionalChain([requestOptions, 'access', _1065 => _1065.relatedTask, 'optionalAccess', _1066 => _1066.taskId]), () => ( relatedTaskId));
276272
276414
  if (effectiveTaskId && taskStore) {
276273
276415
  await taskStore.updateTaskStatus(effectiveTaskId, "input_required");
276274
276416
  }
276275
276417
  return await this.request(r, resultSchema, requestOptions);
276276
276418
  },
276277
- authInfo: _optionalChain([extra, 'optionalAccess', _1057 => _1057.authInfo]),
276419
+ authInfo: _optionalChain([extra, 'optionalAccess', _1067 => _1067.authInfo]),
276278
276420
  requestId: request.id,
276279
- requestInfo: _optionalChain([extra, 'optionalAccess', _1058 => _1058.requestInfo]),
276421
+ requestInfo: _optionalChain([extra, 'optionalAccess', _1068 => _1068.requestInfo]),
276280
276422
  taskId: relatedTaskId,
276281
276423
  taskStore,
276282
- taskRequestedTtl: _optionalChain([taskCreationParams, 'optionalAccess', _1059 => _1059.ttl]),
276283
- closeSSEStream: _optionalChain([extra, 'optionalAccess', _1060 => _1060.closeSSEStream]),
276284
- closeStandaloneSSEStream: _optionalChain([extra, 'optionalAccess', _1061 => _1061.closeStandaloneSSEStream])
276424
+ taskRequestedTtl: _optionalChain([taskCreationParams, 'optionalAccess', _1069 => _1069.ttl]),
276425
+ closeSSEStream: _optionalChain([extra, 'optionalAccess', _1070 => _1070.closeSSEStream]),
276426
+ closeStandaloneSSEStream: _optionalChain([extra, 'optionalAccess', _1071 => _1071.closeStandaloneSSEStream])
276285
276427
  };
276286
276428
  Promise.resolve().then(() => {
276287
276429
  if (taskCreationParams) {
@@ -276301,9 +276443,9 @@ var Protocol = class {
276301
276443
  type: "response",
276302
276444
  message: response,
276303
276445
  timestamp: Date.now()
276304
- }, _optionalChain([capturedTransport, 'optionalAccess', _1062 => _1062.sessionId]));
276446
+ }, _optionalChain([capturedTransport, 'optionalAccess', _1072 => _1072.sessionId]));
276305
276447
  } else {
276306
- await _optionalChain([capturedTransport, 'optionalAccess', _1063 => _1063.send, 'call', _1064 => _1064(response)]);
276448
+ await _optionalChain([capturedTransport, 'optionalAccess', _1073 => _1073.send, 'call', _1074 => _1074(response)]);
276307
276449
  }
276308
276450
  }, async (error49) => {
276309
276451
  if (abortController.signal.aborted) {
@@ -276323,9 +276465,9 @@ var Protocol = class {
276323
276465
  type: "error",
276324
276466
  message: errorResponse,
276325
276467
  timestamp: Date.now()
276326
- }, _optionalChain([capturedTransport, 'optionalAccess', _1065 => _1065.sessionId]));
276468
+ }, _optionalChain([capturedTransport, 'optionalAccess', _1075 => _1075.sessionId]));
276327
276469
  } else {
276328
- await _optionalChain([capturedTransport, 'optionalAccess', _1066 => _1066.send, 'call', _1067 => _1067(errorResponse)]);
276470
+ await _optionalChain([capturedTransport, 'optionalAccess', _1076 => _1076.send, 'call', _1077 => _1077(errorResponse)]);
276329
276471
  }
276330
276472
  }).catch((error49) => this._onerror(new Error(`Failed to send response: ${error49}`))).finally(() => {
276331
276473
  if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
@@ -276404,7 +276546,7 @@ var Protocol = class {
276404
276546
  * Closes the connection.
276405
276547
  */
276406
276548
  async close() {
276407
- await _optionalChain([this, 'access', _1068 => _1068._transport, 'optionalAccess', _1069 => _1069.close, 'call', _1070 => _1070()]);
276549
+ await _optionalChain([this, 'access', _1078 => _1078._transport, 'optionalAccess', _1079 => _1079.close, 'call', _1080 => _1080()]);
276408
276550
  }
276409
276551
  /**
276410
276552
  * Sends a request and returns an AsyncGenerator that yields response messages.
@@ -276481,9 +276623,9 @@ var Protocol = class {
276481
276623
  yield { type: "result", result };
276482
276624
  return;
276483
276625
  }
276484
- const pollInterval = _nullishCoalesce(_nullishCoalesce(task6.pollInterval, () => ( _optionalChain([this, 'access', _1071 => _1071._options, 'optionalAccess', _1072 => _1072.defaultTaskPollInterval]))), () => ( 1e3));
276626
+ const pollInterval = _nullishCoalesce(_nullishCoalesce(task6.pollInterval, () => ( _optionalChain([this, 'access', _1081 => _1081._options, 'optionalAccess', _1082 => _1082.defaultTaskPollInterval]))), () => ( 1e3));
276485
276627
  await new Promise((resolve7) => setTimeout(resolve7, pollInterval));
276486
- _optionalChain([options, 'optionalAccess', _1073 => _1073.signal, 'optionalAccess', _1074 => _1074.throwIfAborted, 'call', _1075 => _1075()]);
276628
+ _optionalChain([options, 'optionalAccess', _1083 => _1083.signal, 'optionalAccess', _1084 => _1084.throwIfAborted, 'call', _1085 => _1085()]);
276487
276629
  }
276488
276630
  } catch (error49) {
276489
276631
  yield {
@@ -276507,7 +276649,7 @@ var Protocol = class {
276507
276649
  earlyReject(new Error("Not connected"));
276508
276650
  return;
276509
276651
  }
276510
- if (_optionalChain([this, 'access', _1076 => _1076._options, 'optionalAccess', _1077 => _1077.enforceStrictCapabilities]) === true) {
276652
+ if (_optionalChain([this, 'access', _1086 => _1086._options, 'optionalAccess', _1087 => _1087.enforceStrictCapabilities]) === true) {
276511
276653
  try {
276512
276654
  this.assertCapabilityForMethod(request.method);
276513
276655
  if (task5) {
@@ -276518,19 +276660,19 @@ var Protocol = class {
276518
276660
  return;
276519
276661
  }
276520
276662
  }
276521
- _optionalChain([options, 'optionalAccess', _1078 => _1078.signal, 'optionalAccess', _1079 => _1079.throwIfAborted, 'call', _1080 => _1080()]);
276663
+ _optionalChain([options, 'optionalAccess', _1088 => _1088.signal, 'optionalAccess', _1089 => _1089.throwIfAborted, 'call', _1090 => _1090()]);
276522
276664
  const messageId = this._requestMessageId++;
276523
276665
  const jsonrpcRequest = {
276524
276666
  ...request,
276525
276667
  jsonrpc: "2.0",
276526
276668
  id: messageId
276527
276669
  };
276528
- if (_optionalChain([options, 'optionalAccess', _1081 => _1081.onprogress])) {
276670
+ if (_optionalChain([options, 'optionalAccess', _1091 => _1091.onprogress])) {
276529
276671
  this._progressHandlers.set(messageId, options.onprogress);
276530
276672
  jsonrpcRequest.params = {
276531
276673
  ...request.params,
276532
276674
  _meta: {
276533
- ..._optionalChain([request, 'access', _1082 => _1082.params, 'optionalAccess', _1083 => _1083._meta]) || {},
276675
+ ..._optionalChain([request, 'access', _1092 => _1092.params, 'optionalAccess', _1093 => _1093._meta]) || {},
276534
276676
  progressToken: messageId
276535
276677
  }
276536
276678
  };
@@ -276545,7 +276687,7 @@ var Protocol = class {
276545
276687
  jsonrpcRequest.params = {
276546
276688
  ...jsonrpcRequest.params,
276547
276689
  _meta: {
276548
- ..._optionalChain([jsonrpcRequest, 'access', _1084 => _1084.params, 'optionalAccess', _1085 => _1085._meta]) || {},
276690
+ ..._optionalChain([jsonrpcRequest, 'access', _1094 => _1094.params, 'optionalAccess', _1095 => _1095._meta]) || {},
276549
276691
  [RELATED_TASK_META_KEY]: relatedTask
276550
276692
  }
276551
276693
  };
@@ -276554,19 +276696,19 @@ var Protocol = class {
276554
276696
  this._responseHandlers.delete(messageId);
276555
276697
  this._progressHandlers.delete(messageId);
276556
276698
  this._cleanupTimeout(messageId);
276557
- _optionalChain([this, 'access', _1086 => _1086._transport, 'optionalAccess', _1087 => _1087.send, 'call', _1088 => _1088({
276699
+ _optionalChain([this, 'access', _1096 => _1096._transport, 'optionalAccess', _1097 => _1097.send, 'call', _1098 => _1098({
276558
276700
  jsonrpc: "2.0",
276559
276701
  method: "notifications/cancelled",
276560
276702
  params: {
276561
276703
  requestId: messageId,
276562
276704
  reason: String(reason)
276563
276705
  }
276564
- }, { relatedRequestId, resumptionToken, onresumptiontoken }), 'access', _1089 => _1089.catch, 'call', _1090 => _1090((error50) => this._onerror(new Error(`Failed to send cancellation: ${error50}`)))]);
276706
+ }, { relatedRequestId, resumptionToken, onresumptiontoken }), 'access', _1099 => _1099.catch, 'call', _1100 => _1100((error50) => this._onerror(new Error(`Failed to send cancellation: ${error50}`)))]);
276565
276707
  const error49 = reason instanceof McpError ? reason : new McpError(ErrorCode.RequestTimeout, String(reason));
276566
276708
  reject5(error49);
276567
276709
  };
276568
276710
  this._responseHandlers.set(messageId, (response) => {
276569
- if (_optionalChain([options, 'optionalAccess', _1091 => _1091.signal, 'optionalAccess', _1092 => _1092.aborted])) {
276711
+ if (_optionalChain([options, 'optionalAccess', _1101 => _1101.signal, 'optionalAccess', _1102 => _1102.aborted])) {
276570
276712
  return;
276571
276713
  }
276572
276714
  if (response instanceof Error) {
@@ -276583,13 +276725,13 @@ var Protocol = class {
276583
276725
  reject5(error49);
276584
276726
  }
276585
276727
  });
276586
- _optionalChain([options, 'optionalAccess', _1093 => _1093.signal, 'optionalAccess', _1094 => _1094.addEventListener, 'call', _1095 => _1095("abort", () => {
276587
- cancel(_optionalChain([options, 'optionalAccess', _1096 => _1096.signal, 'optionalAccess', _1097 => _1097.reason]));
276728
+ _optionalChain([options, 'optionalAccess', _1103 => _1103.signal, 'optionalAccess', _1104 => _1104.addEventListener, 'call', _1105 => _1105("abort", () => {
276729
+ cancel(_optionalChain([options, 'optionalAccess', _1106 => _1106.signal, 'optionalAccess', _1107 => _1107.reason]));
276588
276730
  })]);
276589
- const timeout4 = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1098 => _1098.timeout]), () => ( DEFAULT_REQUEST_TIMEOUT_MSEC));
276731
+ const timeout4 = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1108 => _1108.timeout]), () => ( DEFAULT_REQUEST_TIMEOUT_MSEC));
276590
276732
  const timeoutHandler = () => cancel(McpError.fromError(ErrorCode.RequestTimeout, "Request timed out", { timeout: timeout4 }));
276591
- this._setupTimeout(messageId, timeout4, _optionalChain([options, 'optionalAccess', _1099 => _1099.maxTotalTimeout]), timeoutHandler, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1100 => _1100.resetTimeoutOnProgress]), () => ( false)));
276592
- const relatedTaskId = _optionalChain([relatedTask, 'optionalAccess', _1101 => _1101.taskId]);
276733
+ this._setupTimeout(messageId, timeout4, _optionalChain([options, 'optionalAccess', _1109 => _1109.maxTotalTimeout]), timeoutHandler, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1110 => _1110.resetTimeoutOnProgress]), () => ( false)));
276734
+ const relatedTaskId = _optionalChain([relatedTask, 'optionalAccess', _1111 => _1111.taskId]);
276593
276735
  if (relatedTaskId) {
276594
276736
  const responseResolver = (response) => {
276595
276737
  const handler = this._responseHandlers.get(messageId);
@@ -276656,7 +276798,7 @@ var Protocol = class {
276656
276798
  throw new Error("Not connected");
276657
276799
  }
276658
276800
  this.assertNotificationCapability(notification.method);
276659
- const relatedTaskId = _optionalChain([options, 'optionalAccess', _1102 => _1102.relatedTask, 'optionalAccess', _1103 => _1103.taskId]);
276801
+ const relatedTaskId = _optionalChain([options, 'optionalAccess', _1112 => _1112.relatedTask, 'optionalAccess', _1113 => _1113.taskId]);
276660
276802
  if (relatedTaskId) {
276661
276803
  const jsonrpcNotification2 = {
276662
276804
  ...notification,
@@ -276664,7 +276806,7 @@ var Protocol = class {
276664
276806
  params: {
276665
276807
  ...notification.params,
276666
276808
  _meta: {
276667
- ..._optionalChain([notification, 'access', _1104 => _1104.params, 'optionalAccess', _1105 => _1105._meta]) || {},
276809
+ ..._optionalChain([notification, 'access', _1114 => _1114.params, 'optionalAccess', _1115 => _1115._meta]) || {},
276668
276810
  [RELATED_TASK_META_KEY]: options.relatedTask
276669
276811
  }
276670
276812
  }
@@ -276676,8 +276818,8 @@ var Protocol = class {
276676
276818
  });
276677
276819
  return;
276678
276820
  }
276679
- const debouncedMethods = _nullishCoalesce(_optionalChain([this, 'access', _1106 => _1106._options, 'optionalAccess', _1107 => _1107.debouncedNotificationMethods]), () => ( []));
276680
- const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !_optionalChain([options, 'optionalAccess', _1108 => _1108.relatedRequestId]) && !_optionalChain([options, 'optionalAccess', _1109 => _1109.relatedTask]);
276821
+ const debouncedMethods = _nullishCoalesce(_optionalChain([this, 'access', _1116 => _1116._options, 'optionalAccess', _1117 => _1117.debouncedNotificationMethods]), () => ( []));
276822
+ const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !_optionalChain([options, 'optionalAccess', _1118 => _1118.relatedRequestId]) && !_optionalChain([options, 'optionalAccess', _1119 => _1119.relatedTask]);
276681
276823
  if (canDebounce) {
276682
276824
  if (this._pendingDebouncedNotifications.has(notification.method)) {
276683
276825
  return;
@@ -276692,19 +276834,19 @@ var Protocol = class {
276692
276834
  ...notification,
276693
276835
  jsonrpc: "2.0"
276694
276836
  };
276695
- if (_optionalChain([options, 'optionalAccess', _1110 => _1110.relatedTask])) {
276837
+ if (_optionalChain([options, 'optionalAccess', _1120 => _1120.relatedTask])) {
276696
276838
  jsonrpcNotification2 = {
276697
276839
  ...jsonrpcNotification2,
276698
276840
  params: {
276699
276841
  ...jsonrpcNotification2.params,
276700
276842
  _meta: {
276701
- ..._optionalChain([jsonrpcNotification2, 'access', _1111 => _1111.params, 'optionalAccess', _1112 => _1112._meta]) || {},
276843
+ ..._optionalChain([jsonrpcNotification2, 'access', _1121 => _1121.params, 'optionalAccess', _1122 => _1122._meta]) || {},
276702
276844
  [RELATED_TASK_META_KEY]: options.relatedTask
276703
276845
  }
276704
276846
  }
276705
276847
  };
276706
276848
  }
276707
- _optionalChain([this, 'access', _1113 => _1113._transport, 'optionalAccess', _1114 => _1114.send, 'call', _1115 => _1115(jsonrpcNotification2, options), 'access', _1116 => _1116.catch, 'call', _1117 => _1117((error49) => this._onerror(error49))]);
276849
+ _optionalChain([this, 'access', _1123 => _1123._transport, 'optionalAccess', _1124 => _1124.send, 'call', _1125 => _1125(jsonrpcNotification2, options), 'access', _1126 => _1126.catch, 'call', _1127 => _1127((error49) => this._onerror(error49))]);
276708
276850
  });
276709
276851
  return;
276710
276852
  }
@@ -276712,13 +276854,13 @@ var Protocol = class {
276712
276854
  ...notification,
276713
276855
  jsonrpc: "2.0"
276714
276856
  };
276715
- if (_optionalChain([options, 'optionalAccess', _1118 => _1118.relatedTask])) {
276857
+ if (_optionalChain([options, 'optionalAccess', _1128 => _1128.relatedTask])) {
276716
276858
  jsonrpcNotification = {
276717
276859
  ...jsonrpcNotification,
276718
276860
  params: {
276719
276861
  ...jsonrpcNotification.params,
276720
276862
  _meta: {
276721
- ..._optionalChain([jsonrpcNotification, 'access', _1119 => _1119.params, 'optionalAccess', _1120 => _1120._meta]) || {},
276863
+ ..._optionalChain([jsonrpcNotification, 'access', _1129 => _1129.params, 'optionalAccess', _1130 => _1130._meta]) || {},
276722
276864
  [RELATED_TASK_META_KEY]: options.relatedTask
276723
276865
  }
276724
276866
  }
@@ -276797,7 +276939,7 @@ var Protocol = class {
276797
276939
  if (!this._taskStore || !this._taskMessageQueue) {
276798
276940
  throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");
276799
276941
  }
276800
- const maxQueueSize = _optionalChain([this, 'access', _1121 => _1121._options, 'optionalAccess', _1122 => _1122.maxTaskQueueSize]);
276942
+ const maxQueueSize = _optionalChain([this, 'access', _1131 => _1131._options, 'optionalAccess', _1132 => _1132.maxTaskQueueSize]);
276801
276943
  await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize);
276802
276944
  }
276803
276945
  /**
@@ -276830,10 +276972,10 @@ var Protocol = class {
276830
276972
  * @returns Promise that resolves when an update occurs or rejects if aborted
276831
276973
  */
276832
276974
  async _waitForTaskUpdate(taskId, signal) {
276833
- let interval = _nullishCoalesce(_optionalChain([this, 'access', _1123 => _1123._options, 'optionalAccess', _1124 => _1124.defaultTaskPollInterval]), () => ( 1e3));
276975
+ let interval = _nullishCoalesce(_optionalChain([this, 'access', _1133 => _1133._options, 'optionalAccess', _1134 => _1134.defaultTaskPollInterval]), () => ( 1e3));
276834
276976
  try {
276835
- const task5 = await _optionalChain([this, 'access', _1125 => _1125._taskStore, 'optionalAccess', _1126 => _1126.getTask, 'call', _1127 => _1127(taskId)]);
276836
- if (_optionalChain([task5, 'optionalAccess', _1128 => _1128.pollInterval])) {
276977
+ const task5 = await _optionalChain([this, 'access', _1135 => _1135._taskStore, 'optionalAccess', _1136 => _1136.getTask, 'call', _1137 => _1137(taskId)]);
276978
+ if (_optionalChain([task5, 'optionalAccess', _1138 => _1138.pollInterval])) {
276837
276979
  interval = task5.pollInterval;
276838
276980
  }
276839
276981
  } catch (e48) {
@@ -277073,7 +277215,7 @@ var ExperimentalServerTasks = class {
277073
277215
  */
277074
277216
  createMessageStream(params, options) {
277075
277217
  const clientCapabilities = this._server.getClientCapabilities();
277076
- if ((params.tools || params.toolChoice) && !_optionalChain([clientCapabilities, 'optionalAccess', _1129 => _1129.sampling, 'optionalAccess', _1130 => _1130.tools])) {
277218
+ if ((params.tools || params.toolChoice) && !_optionalChain([clientCapabilities, 'optionalAccess', _1139 => _1139.sampling, 'optionalAccess', _1140 => _1140.tools])) {
277077
277219
  throw new Error("Client does not support sampling tools capability.");
277078
277220
  }
277079
277221
  if (params.messages.length > 0) {
@@ -277151,13 +277293,13 @@ var ExperimentalServerTasks = class {
277151
277293
  const mode2 = _nullishCoalesce(params.mode, () => ( "form"));
277152
277294
  switch (mode2) {
277153
277295
  case "url": {
277154
- if (!_optionalChain([clientCapabilities, 'optionalAccess', _1131 => _1131.elicitation, 'optionalAccess', _1132 => _1132.url])) {
277296
+ if (!_optionalChain([clientCapabilities, 'optionalAccess', _1141 => _1141.elicitation, 'optionalAccess', _1142 => _1142.url])) {
277155
277297
  throw new Error("Client does not support url elicitation.");
277156
277298
  }
277157
277299
  break;
277158
277300
  }
277159
277301
  case "form": {
277160
- if (!_optionalChain([clientCapabilities, 'optionalAccess', _1133 => _1133.elicitation, 'optionalAccess', _1134 => _1134.form])) {
277302
+ if (!_optionalChain([clientCapabilities, 'optionalAccess', _1143 => _1143.elicitation, 'optionalAccess', _1144 => _1144.form])) {
277161
277303
  throw new Error("Client does not support form elicitation.");
277162
277304
  }
277163
277305
  break;
@@ -277227,7 +277369,7 @@ function assertToolsCallTaskCapability(requests, method2, entityName) {
277227
277369
  }
277228
277370
  switch (method2) {
277229
277371
  case "tools/call":
277230
- if (!_optionalChain([requests, 'access', _1135 => _1135.tools, 'optionalAccess', _1136 => _1136.call])) {
277372
+ if (!_optionalChain([requests, 'access', _1145 => _1145.tools, 'optionalAccess', _1146 => _1146.call])) {
277231
277373
  throw new Error(`${entityName} does not support task creation for tools/call (required for ${method2})`);
277232
277374
  }
277233
277375
  break;
@@ -277241,12 +277383,12 @@ function assertClientRequestTaskCapability(requests, method2, entityName) {
277241
277383
  }
277242
277384
  switch (method2) {
277243
277385
  case "sampling/createMessage":
277244
- if (!_optionalChain([requests, 'access', _1137 => _1137.sampling, 'optionalAccess', _1138 => _1138.createMessage])) {
277386
+ if (!_optionalChain([requests, 'access', _1147 => _1147.sampling, 'optionalAccess', _1148 => _1148.createMessage])) {
277245
277387
  throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method2})`);
277246
277388
  }
277247
277389
  break;
277248
277390
  case "elicitation/create":
277249
- if (!_optionalChain([requests, 'access', _1139 => _1139.elicitation, 'optionalAccess', _1140 => _1140.create])) {
277391
+ if (!_optionalChain([requests, 'access', _1149 => _1149.elicitation, 'optionalAccess', _1150 => _1150.create])) {
277250
277392
  throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method2})`);
277251
277393
  }
277252
277394
  break;
@@ -277269,14 +277411,14 @@ var Server2 = class extends Protocol {
277269
277411
  const currentLevel = this._loggingLevels.get(sessionId);
277270
277412
  return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false;
277271
277413
  };
277272
- this._capabilities = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1141 => _1141.capabilities]), () => ( {}));
277273
- this._instructions = _optionalChain([options, 'optionalAccess', _1142 => _1142.instructions]);
277274
- this._jsonSchemaValidator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1143 => _1143.jsonSchemaValidator]), () => ( new AjvJsonSchemaValidator()));
277414
+ this._capabilities = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1151 => _1151.capabilities]), () => ( {}));
277415
+ this._instructions = _optionalChain([options, 'optionalAccess', _1152 => _1152.instructions]);
277416
+ this._jsonSchemaValidator = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1153 => _1153.jsonSchemaValidator]), () => ( new AjvJsonSchemaValidator()));
277275
277417
  this.setRequestHandler(InitializeRequestSchema, (request) => this._oninitialize(request));
277276
- this.setNotificationHandler(InitializedNotificationSchema, () => _optionalChain([this, 'access', _1144 => _1144.oninitialized, 'optionalCall', _1145 => _1145()]));
277418
+ this.setNotificationHandler(InitializedNotificationSchema, () => _optionalChain([this, 'access', _1154 => _1154.oninitialized, 'optionalCall', _1155 => _1155()]));
277277
277419
  if (this._capabilities.logging) {
277278
277420
  this.setRequestHandler(SetLevelRequestSchema, async (request, extra) => {
277279
- const transportSessionId = extra.sessionId || _optionalChain([extra, 'access', _1146 => _1146.requestInfo, 'optionalAccess', _1147 => _1147.headers, 'access', _1148 => _1148["mcp-session-id"]]) || void 0;
277421
+ const transportSessionId = extra.sessionId || _optionalChain([extra, 'access', _1156 => _1156.requestInfo, 'optionalAccess', _1157 => _1157.headers, 'access', _1158 => _1158["mcp-session-id"]]) || void 0;
277280
277422
  const { level } = request.params;
277281
277423
  const parseResult = LoggingLevelSchema.safeParse(level);
277282
277424
  if (parseResult.success) {
@@ -277317,19 +277459,19 @@ var Server2 = class extends Protocol {
277317
277459
  */
277318
277460
  setRequestHandler(requestSchema, handler) {
277319
277461
  const shape = getObjectShape(requestSchema);
277320
- const methodSchema = _optionalChain([shape, 'optionalAccess', _1149 => _1149.method]);
277462
+ const methodSchema = _optionalChain([shape, 'optionalAccess', _1159 => _1159.method]);
277321
277463
  if (!methodSchema) {
277322
277464
  throw new Error("Schema is missing a method literal");
277323
277465
  }
277324
277466
  let methodValue;
277325
277467
  if (isZ4Schema(methodSchema)) {
277326
277468
  const v4Schema = methodSchema;
277327
- const v4Def = _optionalChain([v4Schema, 'access', _1150 => _1150._zod, 'optionalAccess', _1151 => _1151.def]);
277328
- methodValue = _nullishCoalesce(_optionalChain([v4Def, 'optionalAccess', _1152 => _1152.value]), () => ( v4Schema.value));
277469
+ const v4Def = _optionalChain([v4Schema, 'access', _1160 => _1160._zod, 'optionalAccess', _1161 => _1161.def]);
277470
+ methodValue = _nullishCoalesce(_optionalChain([v4Def, 'optionalAccess', _1162 => _1162.value]), () => ( v4Schema.value));
277329
277471
  } else {
277330
277472
  const v3Schema = methodSchema;
277331
277473
  const legacyDef = v3Schema._def;
277332
- methodValue = _nullishCoalesce(_optionalChain([legacyDef, 'optionalAccess', _1153 => _1153.value]), () => ( v3Schema.value));
277474
+ methodValue = _nullishCoalesce(_optionalChain([legacyDef, 'optionalAccess', _1163 => _1163.value]), () => ( v3Schema.value));
277333
277475
  }
277334
277476
  if (typeof methodValue !== "string") {
277335
277477
  throw new Error("Schema method literal must be a string");
@@ -277366,17 +277508,17 @@ var Server2 = class extends Protocol {
277366
277508
  assertCapabilityForMethod(method2) {
277367
277509
  switch (method2) {
277368
277510
  case "sampling/createMessage":
277369
- if (!_optionalChain([this, 'access', _1154 => _1154._clientCapabilities, 'optionalAccess', _1155 => _1155.sampling])) {
277511
+ if (!_optionalChain([this, 'access', _1164 => _1164._clientCapabilities, 'optionalAccess', _1165 => _1165.sampling])) {
277370
277512
  throw new Error(`Client does not support sampling (required for ${method2})`);
277371
277513
  }
277372
277514
  break;
277373
277515
  case "elicitation/create":
277374
- if (!_optionalChain([this, 'access', _1156 => _1156._clientCapabilities, 'optionalAccess', _1157 => _1157.elicitation])) {
277516
+ if (!_optionalChain([this, 'access', _1166 => _1166._clientCapabilities, 'optionalAccess', _1167 => _1167.elicitation])) {
277375
277517
  throw new Error(`Client does not support elicitation (required for ${method2})`);
277376
277518
  }
277377
277519
  break;
277378
277520
  case "roots/list":
277379
- if (!_optionalChain([this, 'access', _1158 => _1158._clientCapabilities, 'optionalAccess', _1159 => _1159.roots])) {
277521
+ if (!_optionalChain([this, 'access', _1168 => _1168._clientCapabilities, 'optionalAccess', _1169 => _1169.roots])) {
277380
277522
  throw new Error(`Client does not support listing roots (required for ${method2})`);
277381
277523
  }
277382
277524
  break;
@@ -277408,7 +277550,7 @@ var Server2 = class extends Protocol {
277408
277550
  }
277409
277551
  break;
277410
277552
  case "notifications/elicitation/complete":
277411
- if (!_optionalChain([this, 'access', _1160 => _1160._clientCapabilities, 'optionalAccess', _1161 => _1161.elicitation, 'optionalAccess', _1162 => _1162.url])) {
277553
+ if (!_optionalChain([this, 'access', _1170 => _1170._clientCapabilities, 'optionalAccess', _1171 => _1171.elicitation, 'optionalAccess', _1172 => _1172.url])) {
277412
277554
  throw new Error(`Client does not support URL elicitation (required for ${method2})`);
277413
277555
  }
277414
277556
  break;
@@ -277466,13 +277608,13 @@ var Server2 = class extends Protocol {
277466
277608
  }
277467
277609
  }
277468
277610
  assertTaskCapability(method2) {
277469
- assertClientRequestTaskCapability(_optionalChain([this, 'access', _1163 => _1163._clientCapabilities, 'optionalAccess', _1164 => _1164.tasks, 'optionalAccess', _1165 => _1165.requests]), method2, "Client");
277611
+ assertClientRequestTaskCapability(_optionalChain([this, 'access', _1173 => _1173._clientCapabilities, 'optionalAccess', _1174 => _1174.tasks, 'optionalAccess', _1175 => _1175.requests]), method2, "Client");
277470
277612
  }
277471
277613
  assertTaskHandlerCapability(method2) {
277472
277614
  if (!this._capabilities) {
277473
277615
  return;
277474
277616
  }
277475
- assertToolsCallTaskCapability(_optionalChain([this, 'access', _1166 => _1166._capabilities, 'access', _1167 => _1167.tasks, 'optionalAccess', _1168 => _1168.requests]), method2, "Server");
277617
+ assertToolsCallTaskCapability(_optionalChain([this, 'access', _1176 => _1176._capabilities, 'access', _1177 => _1177.tasks, 'optionalAccess', _1178 => _1178.requests]), method2, "Server");
277476
277618
  }
277477
277619
  async _oninitialize(request) {
277478
277620
  const requestedVersion = request.params.protocolVersion;
@@ -277507,7 +277649,7 @@ var Server2 = class extends Protocol {
277507
277649
  // Implementation
277508
277650
  async createMessage(params, options) {
277509
277651
  if (params.tools || params.toolChoice) {
277510
- if (!_optionalChain([this, 'access', _1169 => _1169._clientCapabilities, 'optionalAccess', _1170 => _1170.sampling, 'optionalAccess', _1171 => _1171.tools])) {
277652
+ if (!_optionalChain([this, 'access', _1179 => _1179._clientCapabilities, 'optionalAccess', _1180 => _1180.sampling, 'optionalAccess', _1181 => _1181.tools])) {
277511
277653
  throw new Error("Client does not support sampling tools capability.");
277512
277654
  }
277513
277655
  }
@@ -277550,14 +277692,14 @@ var Server2 = class extends Protocol {
277550
277692
  const mode2 = _nullishCoalesce(params.mode, () => ( "form"));
277551
277693
  switch (mode2) {
277552
277694
  case "url": {
277553
- if (!_optionalChain([this, 'access', _1172 => _1172._clientCapabilities, 'optionalAccess', _1173 => _1173.elicitation, 'optionalAccess', _1174 => _1174.url])) {
277695
+ if (!_optionalChain([this, 'access', _1182 => _1182._clientCapabilities, 'optionalAccess', _1183 => _1183.elicitation, 'optionalAccess', _1184 => _1184.url])) {
277554
277696
  throw new Error("Client does not support url elicitation.");
277555
277697
  }
277556
277698
  const urlParams = params;
277557
277699
  return this.request({ method: "elicitation/create", params: urlParams }, ElicitResultSchema, options);
277558
277700
  }
277559
277701
  case "form": {
277560
- if (!_optionalChain([this, 'access', _1175 => _1175._clientCapabilities, 'optionalAccess', _1176 => _1176.elicitation, 'optionalAccess', _1177 => _1177.form])) {
277702
+ if (!_optionalChain([this, 'access', _1185 => _1185._clientCapabilities, 'optionalAccess', _1186 => _1186.elicitation, 'optionalAccess', _1187 => _1187.form])) {
277561
277703
  throw new Error("Client does not support form elicitation.");
277562
277704
  }
277563
277705
  const formParams = params.mode === "form" ? params : { ...params, mode: "form" };
@@ -277589,7 +277731,7 @@ var Server2 = class extends Protocol {
277589
277731
  * @returns A function that emits the completion notification when awaited.
277590
277732
  */
277591
277733
  createElicitationCompletionNotifier(elicitationId, options) {
277592
- if (!_optionalChain([this, 'access', _1178 => _1178._clientCapabilities, 'optionalAccess', _1179 => _1179.elicitation, 'optionalAccess', _1180 => _1180.url])) {
277734
+ if (!_optionalChain([this, 'access', _1188 => _1188._clientCapabilities, 'optionalAccess', _1189 => _1189.elicitation, 'optionalAccess', _1190 => _1190.url])) {
277593
277735
  throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");
277594
277736
  }
277595
277737
  return () => this.notification({
@@ -277643,7 +277785,7 @@ function isCompletable(schema) {
277643
277785
  }
277644
277786
  function getCompleter(schema) {
277645
277787
  const meta3 = schema[COMPLETABLE_SYMBOL];
277646
- return _optionalChain([meta3, 'optionalAccess', _1181 => _1181.complete]);
277788
+ return _optionalChain([meta3, 'optionalAccess', _1191 => _1191.complete]);
277647
277789
  }
277648
277790
  var McpZodTypeKind;
277649
277791
  (function(McpZodTypeKind2) {
@@ -277823,7 +277965,7 @@ var McpServer = class {
277823
277965
  throw new McpError(ErrorCode.InvalidParams, `Tool ${request.params.name} disabled`);
277824
277966
  }
277825
277967
  const isTaskRequest = !!request.params.task;
277826
- const taskSupport = _optionalChain([tool, 'access', _1182 => _1182.execution, 'optionalAccess', _1183 => _1183.taskSupport]);
277968
+ const taskSupport = _optionalChain([tool, 'access', _1192 => _1192.execution, 'optionalAccess', _1193 => _1193.taskSupport]);
277827
277969
  const isTaskHandler = "createTask" in tool.handler;
277828
277970
  if ((taskSupport === "required" || taskSupport === "optional") && !isTaskHandler) {
277829
277971
  throw new McpError(ErrorCode.InternalError, `Tool ${request.params.name} has taskSupport '${taskSupport}' but was not registered with registerToolTask`);
@@ -277998,7 +278140,7 @@ var McpServer = class {
277998
278140
  return EMPTY_COMPLETION_RESULT;
277999
278141
  }
278000
278142
  const promptShape = getObjectShape(prompt.argsSchema);
278001
- const field = _optionalChain([promptShape, 'optionalAccess', _1184 => _1184[request.params.argument.name]]);
278143
+ const field = _optionalChain([promptShape, 'optionalAccess', _1194 => _1194[request.params.argument.name]]);
278002
278144
  if (!isCompletable(field)) {
278003
278145
  return EMPTY_COMPLETION_RESULT;
278004
278146
  }
@@ -278276,7 +278418,7 @@ var McpServer = class {
278276
278418
  this._registeredPrompts[name] = registeredPrompt;
278277
278419
  if (argsSchema) {
278278
278420
  const hasCompletable = Object.values(argsSchema).some((field) => {
278279
- const inner = field instanceof ZodOptional2 ? _optionalChain([field, 'access', _1185 => _1185._def, 'optionalAccess', _1186 => _1186.innerType]) : field;
278421
+ const inner = field instanceof ZodOptional2 ? _optionalChain([field, 'access', _1195 => _1195._def, 'optionalAccess', _1196 => _1196.innerType]) : field;
278280
278422
  return isCompletable(inner);
278281
278423
  });
278282
278424
  if (hasCompletable) {
@@ -278497,7 +278639,7 @@ function promptArgumentsFromSchema(schema) {
278497
278639
  }
278498
278640
  function getMethodValue(schema) {
278499
278641
  const shape = getObjectShape(schema);
278500
- const methodSchema = _optionalChain([shape, 'optionalAccess', _1187 => _1187.method]);
278642
+ const methodSchema = _optionalChain([shape, 'optionalAccess', _1197 => _1197.method]);
278501
278643
  if (!methodSchema) {
278502
278644
  throw new Error("Schema is missing a method literal");
278503
278645
  }
@@ -278568,7 +278710,7 @@ var StdioServerTransport = class {
278568
278710
  this.processReadBuffer();
278569
278711
  };
278570
278712
  this._onerror = (error49) => {
278571
- _optionalChain([this, 'access', _1188 => _1188.onerror, 'optionalCall', _1189 => _1189(error49)]);
278713
+ _optionalChain([this, 'access', _1198 => _1198.onerror, 'optionalCall', _1199 => _1199(error49)]);
278572
278714
  };
278573
278715
  }
278574
278716
  /**
@@ -278589,9 +278731,9 @@ var StdioServerTransport = class {
278589
278731
  if (message === null) {
278590
278732
  break;
278591
278733
  }
278592
- _optionalChain([this, 'access', _1190 => _1190.onmessage, 'optionalCall', _1191 => _1191(message)]);
278734
+ _optionalChain([this, 'access', _1200 => _1200.onmessage, 'optionalCall', _1201 => _1201(message)]);
278593
278735
  } catch (error49) {
278594
- _optionalChain([this, 'access', _1192 => _1192.onerror, 'optionalCall', _1193 => _1193(error49)]);
278736
+ _optionalChain([this, 'access', _1202 => _1202.onerror, 'optionalCall', _1203 => _1203(error49)]);
278595
278737
  }
278596
278738
  }
278597
278739
  }
@@ -278603,7 +278745,7 @@ var StdioServerTransport = class {
278603
278745
  this._stdin.pause();
278604
278746
  }
278605
278747
  this._readBuffer.clear();
278606
- _optionalChain([this, 'access', _1194 => _1194.onclose, 'optionalCall', _1195 => _1195()]);
278748
+ _optionalChain([this, 'access', _1204 => _1204.onclose, 'optionalCall', _1205 => _1205()]);
278607
278749
  }
278608
278750
  send(message) {
278609
278751
  return new Promise((resolve7) => {
@@ -278644,7 +278786,7 @@ var Request2 = class extends GlobalRequest {
278644
278786
  if (typeof input === "object" && getRequestCache in input) {
278645
278787
  input = input[getRequestCache]();
278646
278788
  }
278647
- if (typeof _optionalChain([options, 'optionalAccess', _1196 => _1196.body, 'optionalAccess', _1197 => _1197.getReader]) !== "undefined") {
278789
+ if (typeof _optionalChain([options, 'optionalAccess', _1206 => _1206.body, 'optionalAccess', _1207 => _1207.getReader]) !== "undefined") {
278648
278790
  ;
278649
278791
  _nullishCoalesce(options.duplex, () => ( (options.duplex = "half")));
278650
278792
  }
@@ -278843,9 +278985,9 @@ var Response22 = (_a3 = class {
278843
278985
  } else {
278844
278986
  _chunkDLBJL7R2cjs.__privateSet.call(void 0, this, _init, init);
278845
278987
  }
278846
- if (typeof body2 === "string" || typeof _optionalChain([body2, 'optionalAccess', _1198 => _1198.getReader]) !== "undefined" || body2 instanceof Blob || body2 instanceof Uint8Array) {
278988
+ if (typeof body2 === "string" || typeof _optionalChain([body2, 'optionalAccess', _1208 => _1208.getReader]) !== "undefined" || body2 instanceof Blob || body2 instanceof Uint8Array) {
278847
278989
  ;
278848
- this[cacheKey] = [_optionalChain([init, 'optionalAccess', _1199 => _1199.status]) || 200, body2, headers2 || _optionalChain([init, 'optionalAccess', _1200 => _1200.headers])];
278990
+ this[cacheKey] = [_optionalChain([init, 'optionalAccess', _1209 => _1209.status]) || 200, body2, headers2 || _optionalChain([init, 'optionalAccess', _1210 => _1210.headers])];
278849
278991
  }
278850
278992
  }
278851
278993
  [getResponseCache]() {
@@ -278865,7 +279007,7 @@ var Response22 = (_a3 = class {
278865
279007
  return this[getResponseCache]().headers;
278866
279008
  }
278867
279009
  get status() {
278868
- return _nullishCoalesce(_optionalChain([this, 'access', _1201 => _1201[cacheKey], 'optionalAccess', _1202 => _1202[0]]), () => ( this[getResponseCache]().status));
279010
+ return _nullishCoalesce(_optionalChain([this, 'access', _1211 => _1211[cacheKey], 'optionalAccess', _1212 => _1212[0]]), () => ( this[getResponseCache]().status));
278869
279011
  }
278870
279012
  get ok() {
278871
279013
  const status = this.status;
@@ -278980,7 +279122,7 @@ var drainIncoming = (incoming) => {
278980
279122
  if (incoming instanceof _http22.Http2ServerRequest) {
278981
279123
  try {
278982
279124
  ;
278983
- _optionalChain([incoming, 'access', _1203 => _1203.stream, 'optionalAccess', _1204 => _1204.close, 'optionalCall', _1205 => _1205(_http22.constants.NGHTTP2_NO_ERROR)]);
279125
+ _optionalChain([incoming, 'access', _1213 => _1213.stream, 'optionalAccess', _1214 => _1214.close, 'optionalCall', _1215 => _1215(_http22.constants.NGHTTP2_NO_ERROR)]);
278984
279126
  } catch (e49) {
278985
279127
  }
278986
279128
  return;
@@ -279000,7 +279142,7 @@ var drainIncoming = (incoming) => {
279000
279142
  }
279001
279143
  };
279002
279144
  const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
279003
- _optionalChain([timer, 'access', _1206 => _1206.unref, 'optionalCall', _1207 => _1207()]);
279145
+ _optionalChain([timer, 'access', _1216 => _1216.unref, 'optionalCall', _1217 => _1217()]);
279004
279146
  const onData = (chunk) => {
279005
279147
  bytesRead += chunk.length;
279006
279148
  if (bytesRead > MAX_DRAIN_BYTES) {
@@ -279072,12 +279214,12 @@ var responseViaCache = async (res, outgoing) => {
279072
279214
  outgoing.end(new Uint8Array(await body2.arrayBuffer()));
279073
279215
  } else {
279074
279216
  flushHeaders(outgoing);
279075
- await _optionalChain([writeFromReadableStream, 'call', _1208 => _1208(body2, outgoing), 'optionalAccess', _1209 => _1209.catch, 'call', _1210 => _1210(
279217
+ await _optionalChain([writeFromReadableStream, 'call', _1218 => _1218(body2, outgoing), 'optionalAccess', _1219 => _1219.catch, 'call', _1220 => _1220(
279076
279218
  (e) => handleResponseError(e, outgoing)
279077
279219
  )]);
279078
279220
  }
279079
279221
  ;
279080
- _optionalChain([outgoing, 'access', _1211 => _1211[outgoingEnded], 'optionalCall', _1212 => _1212()]);
279222
+ _optionalChain([outgoing, 'access', _1221 => _1221[outgoingEnded], 'optionalCall', _1222 => _1222()]);
279081
279223
  };
279082
279224
  var isPromise = (res) => typeof res.then === "function";
279083
279225
  var responseViaResponseObject = async (res, outgoing, options = {}) => {
@@ -279153,7 +279295,7 @@ var responseViaResponseObject = async (res, outgoing, options = {}) => {
279153
279295
  outgoing.end();
279154
279296
  }
279155
279297
  ;
279156
- _optionalChain([outgoing, 'access', _1213 => _1213[outgoingEnded], 'optionalCall', _1214 => _1214()]);
279298
+ _optionalChain([outgoing, 'access', _1223 => _1223[outgoingEnded], 'optionalCall', _1224 => _1224()]);
279157
279299
  };
279158
279300
  var getRequestListener = (fetchCallback, options = {}) => {
279159
279301
  const autoCleanupIncoming = _nullishCoalesce(options.autoCleanupIncoming, () => ( true));
@@ -279280,7 +279422,7 @@ var WebStandardStreamableHTTPServerTransport = class {
279280
279422
  */
279281
279423
  createJsonErrorResponse(status, code, message, options) {
279282
279424
  const error49 = { code, message };
279283
- if (_optionalChain([options, 'optionalAccess', _1215 => _1215.data]) !== void 0) {
279425
+ if (_optionalChain([options, 'optionalAccess', _1225 => _1225.data]) !== void 0) {
279284
279426
  error49.data = options.data;
279285
279427
  }
279286
279428
  return new Response(JSON.stringify({
@@ -279291,7 +279433,7 @@ var WebStandardStreamableHTTPServerTransport = class {
279291
279433
  status,
279292
279434
  headers: {
279293
279435
  "Content-Type": "application/json",
279294
- ..._optionalChain([options, 'optionalAccess', _1216 => _1216.headers])
279436
+ ..._optionalChain([options, 'optionalAccess', _1226 => _1226.headers])
279295
279437
  }
279296
279438
  });
279297
279439
  }
@@ -279307,7 +279449,7 @@ var WebStandardStreamableHTTPServerTransport = class {
279307
279449
  const hostHeader = req.headers.get("host");
279308
279450
  if (!hostHeader || !this._allowedHosts.includes(hostHeader)) {
279309
279451
  const error49 = `Invalid Host header: ${hostHeader}`;
279310
- _optionalChain([this, 'access', _1217 => _1217.onerror, 'optionalCall', _1218 => _1218(new Error(error49))]);
279452
+ _optionalChain([this, 'access', _1227 => _1227.onerror, 'optionalCall', _1228 => _1228(new Error(error49))]);
279311
279453
  return this.createJsonErrorResponse(403, -32e3, error49);
279312
279454
  }
279313
279455
  }
@@ -279315,7 +279457,7 @@ var WebStandardStreamableHTTPServerTransport = class {
279315
279457
  const originHeader = req.headers.get("origin");
279316
279458
  if (originHeader && !this._allowedOrigins.includes(originHeader)) {
279317
279459
  const error49 = `Invalid Origin header: ${originHeader}`;
279318
- _optionalChain([this, 'access', _1219 => _1219.onerror, 'optionalCall', _1220 => _1220(new Error(error49))]);
279460
+ _optionalChain([this, 'access', _1229 => _1229.onerror, 'optionalCall', _1230 => _1230(new Error(error49))]);
279319
279461
  return this.createJsonErrorResponse(403, -32e3, error49);
279320
279462
  }
279321
279463
  }
@@ -279376,8 +279518,8 @@ data:
279376
279518
  */
279377
279519
  async handleGetRequest(req) {
279378
279520
  const acceptHeader = req.headers.get("accept");
279379
- if (!_optionalChain([acceptHeader, 'optionalAccess', _1221 => _1221.includes, 'call', _1222 => _1222("text/event-stream")])) {
279380
- _optionalChain([this, 'access', _1223 => _1223.onerror, 'optionalCall', _1224 => _1224(new Error("Not Acceptable: Client must accept text/event-stream"))]);
279521
+ if (!_optionalChain([acceptHeader, 'optionalAccess', _1231 => _1231.includes, 'call', _1232 => _1232("text/event-stream")])) {
279522
+ _optionalChain([this, 'access', _1233 => _1233.onerror, 'optionalCall', _1234 => _1234(new Error("Not Acceptable: Client must accept text/event-stream"))]);
279381
279523
  return this.createJsonErrorResponse(406, -32e3, "Not Acceptable: Client must accept text/event-stream");
279382
279524
  }
279383
279525
  const sessionError = this.validateSession(req);
@@ -279395,7 +279537,7 @@ data:
279395
279537
  }
279396
279538
  }
279397
279539
  if (this._streamMapping.get(this._standaloneSseStreamId) !== void 0) {
279398
- _optionalChain([this, 'access', _1225 => _1225.onerror, 'optionalCall', _1226 => _1226(new Error("Conflict: Only one SSE stream is allowed per session"))]);
279540
+ _optionalChain([this, 'access', _1235 => _1235.onerror, 'optionalCall', _1236 => _1236(new Error("Conflict: Only one SSE stream is allowed per session"))]);
279399
279541
  return this.createJsonErrorResponse(409, -32e3, "Conflict: Only one SSE stream is allowed per session");
279400
279542
  }
279401
279543
  const encoder = new TextEncoder();
@@ -279435,7 +279577,7 @@ data:
279435
279577
  */
279436
279578
  async replayEvents(lastEventId) {
279437
279579
  if (!this._eventStore) {
279438
- _optionalChain([this, 'access', _1227 => _1227.onerror, 'optionalCall', _1228 => _1228(new Error("Event store not configured"))]);
279580
+ _optionalChain([this, 'access', _1237 => _1237.onerror, 'optionalCall', _1238 => _1238(new Error("Event store not configured"))]);
279439
279581
  return this.createJsonErrorResponse(400, -32e3, "Event store not configured");
279440
279582
  }
279441
279583
  try {
@@ -279443,11 +279585,11 @@ data:
279443
279585
  if (this._eventStore.getStreamIdForEventId) {
279444
279586
  streamId = await this._eventStore.getStreamIdForEventId(lastEventId);
279445
279587
  if (!streamId) {
279446
- _optionalChain([this, 'access', _1229 => _1229.onerror, 'optionalCall', _1230 => _1230(new Error("Invalid event ID format"))]);
279588
+ _optionalChain([this, 'access', _1239 => _1239.onerror, 'optionalCall', _1240 => _1240(new Error("Invalid event ID format"))]);
279447
279589
  return this.createJsonErrorResponse(400, -32e3, "Invalid event ID format");
279448
279590
  }
279449
279591
  if (this._streamMapping.get(streamId) !== void 0) {
279450
- _optionalChain([this, 'access', _1231 => _1231.onerror, 'optionalCall', _1232 => _1232(new Error("Conflict: Stream already has an active connection"))]);
279592
+ _optionalChain([this, 'access', _1241 => _1241.onerror, 'optionalCall', _1242 => _1242(new Error("Conflict: Stream already has an active connection"))]);
279451
279593
  return this.createJsonErrorResponse(409, -32e3, "Conflict: Stream already has an active connection");
279452
279594
  }
279453
279595
  }
@@ -279472,7 +279614,7 @@ data:
279472
279614
  send: async (eventId, message) => {
279473
279615
  const success2 = this.writeSSEEvent(streamController, encoder, message, eventId);
279474
279616
  if (!success2) {
279475
- _optionalChain([this, 'access', _1233 => _1233.onerror, 'optionalCall', _1234 => _1234(new Error("Failed replay events"))]);
279617
+ _optionalChain([this, 'access', _1243 => _1243.onerror, 'optionalCall', _1244 => _1244(new Error("Failed replay events"))]);
279476
279618
  try {
279477
279619
  streamController.close();
279478
279620
  } catch (e51) {
@@ -279493,7 +279635,7 @@ data:
279493
279635
  });
279494
279636
  return new Response(readable, { headers: headers2 });
279495
279637
  } catch (error49) {
279496
- _optionalChain([this, 'access', _1235 => _1235.onerror, 'optionalCall', _1236 => _1236(error49)]);
279638
+ _optionalChain([this, 'access', _1245 => _1245.onerror, 'optionalCall', _1246 => _1246(error49)]);
279497
279639
  return this.createJsonErrorResponse(500, -32e3, "Error replaying events");
279498
279640
  }
279499
279641
  }
@@ -279514,7 +279656,7 @@ data:
279514
279656
  controller.enqueue(encoder.encode(eventData));
279515
279657
  return true;
279516
279658
  } catch (error49) {
279517
- _optionalChain([this, 'access', _1237 => _1237.onerror, 'optionalCall', _1238 => _1238(error49)]);
279659
+ _optionalChain([this, 'access', _1247 => _1247.onerror, 'optionalCall', _1248 => _1248(error49)]);
279518
279660
  return false;
279519
279661
  }
279520
279662
  }
@@ -279522,7 +279664,7 @@ data:
279522
279664
  * Handles unsupported requests (PUT, PATCH, etc.)
279523
279665
  */
279524
279666
  handleUnsupportedRequest() {
279525
- _optionalChain([this, 'access', _1239 => _1239.onerror, 'optionalCall', _1240 => _1240(new Error("Method not allowed."))]);
279667
+ _optionalChain([this, 'access', _1249 => _1249.onerror, 'optionalCall', _1250 => _1250(new Error("Method not allowed."))]);
279526
279668
  return new Response(JSON.stringify({
279527
279669
  jsonrpc: "2.0",
279528
279670
  error: {
@@ -279544,13 +279686,13 @@ data:
279544
279686
  async handlePostRequest(req, options) {
279545
279687
  try {
279546
279688
  const acceptHeader = req.headers.get("accept");
279547
- if (!_optionalChain([acceptHeader, 'optionalAccess', _1241 => _1241.includes, 'call', _1242 => _1242("application/json")]) || !acceptHeader.includes("text/event-stream")) {
279548
- _optionalChain([this, 'access', _1243 => _1243.onerror, 'optionalCall', _1244 => _1244(new Error("Not Acceptable: Client must accept both application/json and text/event-stream"))]);
279689
+ if (!_optionalChain([acceptHeader, 'optionalAccess', _1251 => _1251.includes, 'call', _1252 => _1252("application/json")]) || !acceptHeader.includes("text/event-stream")) {
279690
+ _optionalChain([this, 'access', _1253 => _1253.onerror, 'optionalCall', _1254 => _1254(new Error("Not Acceptable: Client must accept both application/json and text/event-stream"))]);
279549
279691
  return this.createJsonErrorResponse(406, -32e3, "Not Acceptable: Client must accept both application/json and text/event-stream");
279550
279692
  }
279551
279693
  const ct = req.headers.get("content-type");
279552
279694
  if (!ct || !ct.includes("application/json")) {
279553
- _optionalChain([this, 'access', _1245 => _1245.onerror, 'optionalCall', _1246 => _1246(new Error("Unsupported Media Type: Content-Type must be application/json"))]);
279695
+ _optionalChain([this, 'access', _1255 => _1255.onerror, 'optionalCall', _1256 => _1256(new Error("Unsupported Media Type: Content-Type must be application/json"))]);
279554
279696
  return this.createJsonErrorResponse(415, -32e3, "Unsupported Media Type: Content-Type must be application/json");
279555
279697
  }
279556
279698
  const requestInfo = {
@@ -279558,13 +279700,13 @@ data:
279558
279700
  url: new URL(req.url)
279559
279701
  };
279560
279702
  let rawMessage;
279561
- if (_optionalChain([options, 'optionalAccess', _1247 => _1247.parsedBody]) !== void 0) {
279703
+ if (_optionalChain([options, 'optionalAccess', _1257 => _1257.parsedBody]) !== void 0) {
279562
279704
  rawMessage = options.parsedBody;
279563
279705
  } else {
279564
279706
  try {
279565
279707
  rawMessage = await req.json();
279566
279708
  } catch (e53) {
279567
- _optionalChain([this, 'access', _1248 => _1248.onerror, 'optionalCall', _1249 => _1249(new Error("Parse error: Invalid JSON"))]);
279709
+ _optionalChain([this, 'access', _1258 => _1258.onerror, 'optionalCall', _1259 => _1259(new Error("Parse error: Invalid JSON"))]);
279568
279710
  return this.createJsonErrorResponse(400, -32700, "Parse error: Invalid JSON");
279569
279711
  }
279570
279712
  }
@@ -279576,20 +279718,20 @@ data:
279576
279718
  messages = [JSONRPCMessageSchema.parse(rawMessage)];
279577
279719
  }
279578
279720
  } catch (e54) {
279579
- _optionalChain([this, 'access', _1250 => _1250.onerror, 'optionalCall', _1251 => _1251(new Error("Parse error: Invalid JSON-RPC message"))]);
279721
+ _optionalChain([this, 'access', _1260 => _1260.onerror, 'optionalCall', _1261 => _1261(new Error("Parse error: Invalid JSON-RPC message"))]);
279580
279722
  return this.createJsonErrorResponse(400, -32700, "Parse error: Invalid JSON-RPC message");
279581
279723
  }
279582
279724
  const isInitializationRequest = messages.some(isInitializeRequest);
279583
279725
  if (isInitializationRequest) {
279584
279726
  if (this._initialized && this.sessionId !== void 0) {
279585
- _optionalChain([this, 'access', _1252 => _1252.onerror, 'optionalCall', _1253 => _1253(new Error("Invalid Request: Server already initialized"))]);
279727
+ _optionalChain([this, 'access', _1262 => _1262.onerror, 'optionalCall', _1263 => _1263(new Error("Invalid Request: Server already initialized"))]);
279586
279728
  return this.createJsonErrorResponse(400, -32600, "Invalid Request: Server already initialized");
279587
279729
  }
279588
279730
  if (messages.length > 1) {
279589
- _optionalChain([this, 'access', _1254 => _1254.onerror, 'optionalCall', _1255 => _1255(new Error("Invalid Request: Only one initialization request is allowed"))]);
279731
+ _optionalChain([this, 'access', _1264 => _1264.onerror, 'optionalCall', _1265 => _1265(new Error("Invalid Request: Only one initialization request is allowed"))]);
279590
279732
  return this.createJsonErrorResponse(400, -32600, "Invalid Request: Only one initialization request is allowed");
279591
279733
  }
279592
- this.sessionId = _optionalChain([this, 'access', _1256 => _1256.sessionIdGenerator, 'optionalCall', _1257 => _1257()]);
279734
+ this.sessionId = _optionalChain([this, 'access', _1266 => _1266.sessionIdGenerator, 'optionalCall', _1267 => _1267()]);
279593
279735
  this._initialized = true;
279594
279736
  if (this.sessionId && this._onsessioninitialized) {
279595
279737
  await Promise.resolve(this._onsessioninitialized(this.sessionId));
@@ -279608,7 +279750,7 @@ data:
279608
279750
  const hasRequests = messages.some(isJSONRPCRequest);
279609
279751
  if (!hasRequests) {
279610
279752
  for (const message of messages) {
279611
- _optionalChain([this, 'access', _1258 => _1258.onmessage, 'optionalCall', _1259 => _1259(message, { authInfo: _optionalChain([options, 'optionalAccess', _1260 => _1260.authInfo]), requestInfo })]);
279753
+ _optionalChain([this, 'access', _1268 => _1268.onmessage, 'optionalCall', _1269 => _1269(message, { authInfo: _optionalChain([options, 'optionalAccess', _1270 => _1270.authInfo]), requestInfo })]);
279612
279754
  }
279613
279755
  return new Response(null, { status: 202 });
279614
279756
  }
@@ -279629,7 +279771,7 @@ data:
279629
279771
  }
279630
279772
  }
279631
279773
  for (const message of messages) {
279632
- _optionalChain([this, 'access', _1261 => _1261.onmessage, 'optionalCall', _1262 => _1262(message, { authInfo: _optionalChain([options, 'optionalAccess', _1263 => _1263.authInfo]), requestInfo })]);
279774
+ _optionalChain([this, 'access', _1271 => _1271.onmessage, 'optionalCall', _1272 => _1272(message, { authInfo: _optionalChain([options, 'optionalAccess', _1273 => _1273.authInfo]), requestInfo })]);
279633
279775
  }
279634
279776
  });
279635
279777
  }
@@ -279679,11 +279821,11 @@ data:
279679
279821
  this.closeStandaloneSSEStream();
279680
279822
  };
279681
279823
  }
279682
- _optionalChain([this, 'access', _1264 => _1264.onmessage, 'optionalCall', _1265 => _1265(message, { authInfo: _optionalChain([options, 'optionalAccess', _1266 => _1266.authInfo]), requestInfo, closeSSEStream, closeStandaloneSSEStream })]);
279824
+ _optionalChain([this, 'access', _1274 => _1274.onmessage, 'optionalCall', _1275 => _1275(message, { authInfo: _optionalChain([options, 'optionalAccess', _1276 => _1276.authInfo]), requestInfo, closeSSEStream, closeStandaloneSSEStream })]);
279683
279825
  }
279684
279826
  return new Response(readable, { status: 200, headers: headers2 });
279685
279827
  } catch (error49) {
279686
- _optionalChain([this, 'access', _1267 => _1267.onerror, 'optionalCall', _1268 => _1268(error49)]);
279828
+ _optionalChain([this, 'access', _1277 => _1277.onerror, 'optionalCall', _1278 => _1278(error49)]);
279687
279829
  return this.createJsonErrorResponse(400, -32700, "Parse error", { data: String(error49) });
279688
279830
  }
279689
279831
  }
@@ -279699,7 +279841,7 @@ data:
279699
279841
  if (protocolError) {
279700
279842
  return protocolError;
279701
279843
  }
279702
- await Promise.resolve(_optionalChain([this, 'access', _1269 => _1269._onsessionclosed, 'optionalCall', _1270 => _1270(this.sessionId)]));
279844
+ await Promise.resolve(_optionalChain([this, 'access', _1279 => _1279._onsessionclosed, 'optionalCall', _1280 => _1280(this.sessionId)]));
279703
279845
  await this.close();
279704
279846
  return new Response(null, { status: 200 });
279705
279847
  }
@@ -279712,16 +279854,16 @@ data:
279712
279854
  return void 0;
279713
279855
  }
279714
279856
  if (!this._initialized) {
279715
- _optionalChain([this, 'access', _1271 => _1271.onerror, 'optionalCall', _1272 => _1272(new Error("Bad Request: Server not initialized"))]);
279857
+ _optionalChain([this, 'access', _1281 => _1281.onerror, 'optionalCall', _1282 => _1282(new Error("Bad Request: Server not initialized"))]);
279716
279858
  return this.createJsonErrorResponse(400, -32e3, "Bad Request: Server not initialized");
279717
279859
  }
279718
279860
  const sessionId = req.headers.get("mcp-session-id");
279719
279861
  if (!sessionId) {
279720
- _optionalChain([this, 'access', _1273 => _1273.onerror, 'optionalCall', _1274 => _1274(new Error("Bad Request: Mcp-Session-Id header is required"))]);
279862
+ _optionalChain([this, 'access', _1283 => _1283.onerror, 'optionalCall', _1284 => _1284(new Error("Bad Request: Mcp-Session-Id header is required"))]);
279721
279863
  return this.createJsonErrorResponse(400, -32e3, "Bad Request: Mcp-Session-Id header is required");
279722
279864
  }
279723
279865
  if (sessionId !== this.sessionId) {
279724
- _optionalChain([this, 'access', _1275 => _1275.onerror, 'optionalCall', _1276 => _1276(new Error("Session not found"))]);
279866
+ _optionalChain([this, 'access', _1285 => _1285.onerror, 'optionalCall', _1286 => _1286(new Error("Session not found"))]);
279725
279867
  return this.createJsonErrorResponse(404, -32001, "Session not found");
279726
279868
  }
279727
279869
  return void 0;
@@ -279742,7 +279884,7 @@ data:
279742
279884
  validateProtocolVersion(req) {
279743
279885
  const protocolVersion = req.headers.get("mcp-protocol-version");
279744
279886
  if (protocolVersion !== null && !SUPPORTED_PROTOCOL_VERSIONS.includes(protocolVersion)) {
279745
- _optionalChain([this, 'access', _1277 => _1277.onerror, 'optionalCall', _1278 => _1278(new Error(`Bad Request: Unsupported protocol version: ${protocolVersion} (supported versions: ${SUPPORTED_PROTOCOL_VERSIONS.join(", ")})`))]);
279887
+ _optionalChain([this, 'access', _1287 => _1287.onerror, 'optionalCall', _1288 => _1288(new Error(`Bad Request: Unsupported protocol version: ${protocolVersion} (supported versions: ${SUPPORTED_PROTOCOL_VERSIONS.join(", ")})`))]);
279746
279888
  return this.createJsonErrorResponse(400, -32e3, `Bad Request: Unsupported protocol version: ${protocolVersion} (supported versions: ${SUPPORTED_PROTOCOL_VERSIONS.join(", ")})`);
279747
279889
  }
279748
279890
  return void 0;
@@ -279753,7 +279895,7 @@ data:
279753
279895
  });
279754
279896
  this._streamMapping.clear();
279755
279897
  this._requestResponseMap.clear();
279756
- _optionalChain([this, 'access', _1279 => _1279.onclose, 'optionalCall', _1280 => _1280()]);
279898
+ _optionalChain([this, 'access', _1289 => _1289.onclose, 'optionalCall', _1290 => _1290()]);
279757
279899
  }
279758
279900
  /**
279759
279901
  * Close an SSE stream for a specific request, triggering client reconnection.
@@ -279780,7 +279922,7 @@ data:
279780
279922
  }
279781
279923
  }
279782
279924
  async send(message, options) {
279783
- let requestId = _optionalChain([options, 'optionalAccess', _1281 => _1281.relatedRequestId]);
279925
+ let requestId = _optionalChain([options, 'optionalAccess', _1291 => _1291.relatedRequestId]);
279784
279926
  if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {
279785
279927
  requestId = message.id;
279786
279928
  }
@@ -279806,7 +279948,7 @@ data:
279806
279948
  throw new Error(`No connection established for request ID: ${String(requestId)}`);
279807
279949
  }
279808
279950
  const stream4 = this._streamMapping.get(streamId);
279809
- if (!this._enableJsonResponse && _optionalChain([stream4, 'optionalAccess', _1282 => _1282.controller]) && _optionalChain([stream4, 'optionalAccess', _1283 => _1283.encoder])) {
279951
+ if (!this._enableJsonResponse && _optionalChain([stream4, 'optionalAccess', _1292 => _1292.controller]) && _optionalChain([stream4, 'optionalAccess', _1293 => _1293.encoder])) {
279810
279952
  let eventId;
279811
279953
  if (this._eventStore) {
279812
279954
  eventId = await this._eventStore.storeEvent(streamId, message);
@@ -279854,8 +279996,8 @@ var StreamableHTTPServerTransport = class {
279854
279996
  this._requestListener = getRequestListener(async (webRequest) => {
279855
279997
  const context = this._requestContext.get(webRequest);
279856
279998
  return this._webStandardTransport.handleRequest(webRequest, {
279857
- authInfo: _optionalChain([context, 'optionalAccess', _1284 => _1284.authInfo]),
279858
- parsedBody: _optionalChain([context, 'optionalAccess', _1285 => _1285.parsedBody])
279999
+ authInfo: _optionalChain([context, 'optionalAccess', _1294 => _1294.authInfo]),
280000
+ parsedBody: _optionalChain([context, 'optionalAccess', _1295 => _1295.parsedBody])
279859
280001
  });
279860
280002
  }, { overrideGlobalObjects: false });
279861
280003
  }
@@ -281534,7 +281676,7 @@ async function importServiceFromFile(serviceId, file2, options = {
281534
281676
  );
281535
281677
  const data2 = fs52.default.readFileSync(filePath, "utf8");
281536
281678
  const importData = JSON.parse(data2);
281537
- if (_optionalChain([importData, 'optionalAccess', _1286 => _1286.service, 'access', _1287 => _1287[serviceId]])) {
281679
+ if (_optionalChain([importData, 'optionalAccess', _1296 => _1296.service, 'access', _1297 => _1297[serviceId]])) {
281538
281680
  await importService2(serviceId, importData, options);
281539
281681
  stopProgressIndicator2(
281540
281682
  indicatorId,
@@ -282816,7 +282958,7 @@ async function listRealms(long = false) {
282816
282958
  } catch (error49) {
282817
282959
  printMessage2(error49, "error");
282818
282960
  printMessage2(`Error listing realms: ${error49.message}`, "error");
282819
- printMessage2(_optionalChain([error49, 'access', _1288 => _1288.response, 'optionalAccess', _1289 => _1289.data]), "error");
282961
+ printMessage2(_optionalChain([error49, 'access', _1298 => _1298.response, 'optionalAccess', _1299 => _1299.data]), "error");
282820
282962
  }
282821
282963
  }
282822
282964
  async function exportRealmById(realmId, file2, includeMeta = true) {
@@ -284358,6 +284500,21 @@ function setup265() {
284358
284500
  "-a, --all",
284359
284501
  "Delete all non-default scripts in a realm. Ignored with -i."
284360
284502
  )
284503
+ ).addOption(
284504
+ new Option(
284505
+ "--language <language>",
284506
+ "Filter scripts by language when using -a. Use lowercase values such as javascript or groovy."
284507
+ ).choices(["javascript", "groovy"])
284508
+ ).addOption(
284509
+ new Option(
284510
+ "--context <context>",
284511
+ "Filter scripts by context when using -a. Values are case-insensitive; kebab-case and underscore formats are both accepted."
284512
+ )
284513
+ ).addOption(
284514
+ new Option(
284515
+ "--evaluator-version <version>",
284516
+ "Filter scripts by evaluator version when using -a. Combine with other filters to imply AND matching."
284517
+ )
284361
284518
  ).action(
284362
284519
  // implement command logic inside action handler
284363
284520
  async (host, realm2, user, password2, options, command) => {
@@ -284383,7 +284540,11 @@ function setup265() {
284383
284540
  if (!outcome) process.exitCode = 1;
284384
284541
  } else if (options.all && await getTokens2()) {
284385
284542
  verboseMessage2("Deleting all non-default scripts...");
284386
- const outcome = await deleteAllScripts();
284543
+ const outcome = await deleteAllScripts({
284544
+ context: options.context,
284545
+ evaluatorVersion: options.evaluatorVersion,
284546
+ language: options.language
284547
+ });
284387
284548
  if (!outcome) process.exitCode = 1;
284388
284549
  } else {
284389
284550
  printMessage2(
@@ -284504,6 +284665,21 @@ function setup267() {
284504
284665
  "--no-deps",
284505
284666
  "Do not include script dependencies (i.e. library scripts). Ignored with -a and -A."
284506
284667
  )
284668
+ ).addOption(
284669
+ new Option(
284670
+ "--language <language>",
284671
+ "Filter scripts by language when using -a or -A. Use lowercase values such as javascript or groovy."
284672
+ ).choices(["javascript", "groovy"])
284673
+ ).addOption(
284674
+ new Option(
284675
+ "--context <context>",
284676
+ "Filter scripts by context when using -a or -A. Values are case-insensitive; kebab-case and underscore formats are both accepted."
284677
+ )
284678
+ ).addOption(
284679
+ new Option(
284680
+ "--evaluator-version <version>",
284681
+ "Filter scripts by evaluator version when using -a or -A. Combine with other filters to imply AND matching."
284682
+ )
284507
284683
  ).action(
284508
284684
  // implement command logic inside action handler
284509
284685
  async (host, realm2, user, password2, options, command) => {
@@ -284555,6 +284731,11 @@ function setup267() {
284555
284731
  deps: options.deps,
284556
284732
  includeDefault: options.default,
284557
284733
  useStringArrays: true
284734
+ },
284735
+ {
284736
+ context: options.context,
284737
+ evaluatorVersion: options.evaluatorVersion,
284738
+ language: options.language
284558
284739
  }
284559
284740
  );
284560
284741
  if (!outcome) process.exitCode = 1;
@@ -284568,6 +284749,11 @@ function setup267() {
284568
284749
  deps: options.deps,
284569
284750
  includeDefault: options.default,
284570
284751
  useStringArrays: true
284752
+ },
284753
+ {
284754
+ context: options.context,
284755
+ evaluatorVersion: options.evaluatorVersion,
284756
+ language: options.language
284571
284757
  }
284572
284758
  );
284573
284759
  if (!outcome) process.exitCode = 1;
@@ -284705,6 +284891,21 @@ function setup269() {
284705
284891
  "-f, --file [file]",
284706
284892
  "Optional export file to use to determine usage. Overrides -D, --directory. Only used if -u or --usage is provided as well."
284707
284893
  )
284894
+ ).addOption(
284895
+ new Option(
284896
+ "--language <language>",
284897
+ "Filter scripts by language using lowercase values such as javascript or groovy."
284898
+ ).choices(["javascript", "groovy"])
284899
+ ).addOption(
284900
+ new Option(
284901
+ "--context <context>",
284902
+ "Filter scripts by context. Values are case-insensitive; kebab-case and underscore formats are both accepted."
284903
+ )
284904
+ ).addOption(
284905
+ new Option(
284906
+ "--evaluator-version <version>",
284907
+ "Filter scripts by evaluator version. Combine with other filters to imply AND matching."
284908
+ )
284708
284909
  ).action(
284709
284910
  // implement command logic inside action handler
284710
284911
  async (host, realm2, user, password2, options, command) => {
@@ -284721,7 +284922,12 @@ function setup269() {
284721
284922
  const outcome = await listScripts(
284722
284923
  options.long,
284723
284924
  options.usage,
284724
- options.file
284925
+ options.file,
284926
+ {
284927
+ context: options.context,
284928
+ evaluatorVersion: options.evaluatorVersion,
284929
+ language: options.language
284930
+ }
284725
284931
  );
284726
284932
  if (!outcome) process.exitCode = 1;
284727
284933
  } else {
@@ -287037,7 +287243,7 @@ function createFrodoCompleter(rootBindings, docsByMethod, onMethodHint) {
287037
287243
  const tokenMatch = line.match(
287038
287244
  /([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*\.?)$/
287039
287245
  );
287040
- const token2 = _nullishCoalesce(_optionalChain([tokenMatch, 'optionalAccess', _1290 => _1290[1]]), () => ( ""));
287246
+ const token2 = _nullishCoalesce(_optionalChain([tokenMatch, 'optionalAccess', _1300 => _1300[1]]), () => ( ""));
287041
287247
  if (!token2) return [[], line];
287042
287248
  const rootCandidates = Object.keys(rootBindings).filter(
287043
287249
  (rootName2) => rootName2.startsWith(token2)
@@ -287093,7 +287299,7 @@ function buildDocsByMethod(frodoInstance) {
287093
287299
  function registerOpenParenHint(replServer, rootBindings, docsByMethod, onHint) {
287094
287300
  process.stdin.on("keypress", (_char, key) => {
287095
287301
  const char = typeof _char === "string" ? _char : "";
287096
- const sequence = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _1291 => _1291.sequence]), () => ( ""));
287302
+ const sequence = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _1301 => _1301.sequence]), () => ( ""));
287097
287303
  if (sequence !== "(" && char !== "(") return;
287098
287304
  const currentLine = _nullishCoalesce(replServer["line"], () => ( ""));
287099
287305
  const match2 = currentLine.match(
@@ -287246,7 +287452,7 @@ function createHelpContext(frodoInstance) {
287246
287452
  console.log(`${BOLD}Factory helpers:${RESET2}`);
287247
287453
  for (const fn of sortedFns) {
287248
287454
  const docs = idx.get(fn);
287249
- const sigHint = _optionalChain([docs, 'optionalAccess', _1292 => _1292.length]) ? ` ${DIM2}${docs[0].signature}${RESET2}` : "";
287455
+ const sigHint = _optionalChain([docs, 'optionalAccess', _1302 => _1302.length]) ? ` ${DIM2}${docs[0].signature}${RESET2}` : "";
287250
287456
  console.log(` frodo.${GREEN}${fn}${RESET2}${sigHint}`);
287251
287457
  }
287252
287458
  }
@@ -287301,7 +287507,7 @@ function createHelpContext(frodoInstance) {
287301
287507
  const sortedSubMods = [...subMods].sort(alphaSort);
287302
287508
  const methodCount = sortedMethods.length;
287303
287509
  const subModuleCount = sortedSubMods.length;
287304
- const moduleType = _optionalChain([findModulePath, 'call', _1293 => _1293(frodoInstance, target), 'optionalAccess', _1294 => _1294.replace, 'call', _1295 => _1295(
287510
+ const moduleType = _optionalChain([findModulePath, 'call', _1303 => _1303(frodoInstance, target), 'optionalAccess', _1304 => _1304.replace, 'call', _1305 => _1305(
287305
287511
  /^frodo\./,
287306
287512
  ""
287307
287513
  )]) || "Module";
@@ -287367,7 +287573,7 @@ function createHelpContext(frodoInstance) {
287367
287573
  console.log("");
287368
287574
  for (const methodName of sortedMethods) {
287369
287575
  const docs = idx.get(methodName);
287370
- const doc = _nullishCoalesce(_optionalChain([docs, 'optionalAccess', _1296 => _1296.find, 'call', _1297 => _1297((d4) => d4.typeName === bestType)]), () => ( _optionalChain([docs, 'optionalAccess', _1298 => _1298[0]])));
287576
+ const doc = _nullishCoalesce(_optionalChain([docs, 'optionalAccess', _1306 => _1306.find, 'call', _1307 => _1307((d4) => d4.typeName === bestType)]), () => ( _optionalChain([docs, 'optionalAccess', _1308 => _1308[0]])));
287371
287577
  if (doc) {
287372
287578
  const sig = doc.signature.length > 100 ? doc.signature.slice(0, 97) + "..." : doc.signature;
287373
287579
  console.log(` ${YELLOW}${sig}${RESET2}`);
@@ -287619,7 +287825,7 @@ async function startRepl(allowAwait = false, host) {
287619
287825
  console.log(`${BOLD2}Shell dot-commands:${RESET3}`);
287620
287826
  const commands = replServer.commands;
287621
287827
  for (const name of Object.keys(commands).sort()) {
287622
- const helpText = _nullishCoalesce(_optionalChain([commands, 'access', _1299 => _1299[name], 'optionalAccess', _1300 => _1300.help]), () => ( ""));
287828
+ const helpText = _nullishCoalesce(_optionalChain([commands, 'access', _1309 => _1309[name], 'optionalAccess', _1310 => _1310.help]), () => ( ""));
287623
287829
  console.log(` ${GREEN2}.${name}${RESET3} ${DIM3}${helpText}${RESET3}`);
287624
287830
  }
287625
287831
  this.displayPrompt();
@@ -287629,7 +287835,7 @@ async function startRepl(allowAwait = false, host) {
287629
287835
  process.stdin.on("keypress", (_char, key) => {
287630
287836
  const rl = replServer;
287631
287837
  const currentHistIdx = _nullishCoalesce(rl["_historyIndex"], () => ( -1));
287632
- if (_optionalChain([key, 'optionalAccess', _1301 => _1301.name]) === "down" && !historyNavigationActive && currentHistIdx === -1) {
287838
+ if (_optionalChain([key, 'optionalAccess', _1311 => _1311.name]) === "down" && !historyNavigationActive && currentHistIdx === -1) {
287633
287839
  const currentLine = _nullishCoalesce(replServer.line, () => ( ""));
287634
287840
  if (currentLine.trim().length > 0) {
287635
287841
  const replHistory = _nullishCoalesce(rl["history"], () => ( []));
@@ -287641,15 +287847,15 @@ async function startRepl(allowAwait = false, host) {
287641
287847
  replServer.write(null, { ctrl: true, name: "u" });
287642
287848
  }
287643
287849
  }
287644
- if (_optionalChain([key, 'optionalAccess', _1302 => _1302.name]) === "up" || _optionalChain([key, 'optionalAccess', _1303 => _1303.name]) === "down") {
287850
+ if (_optionalChain([key, 'optionalAccess', _1312 => _1312.name]) === "up" || _optionalChain([key, 'optionalAccess', _1313 => _1313.name]) === "down") {
287645
287851
  historyNavigationActive = true;
287646
287852
  return;
287647
287853
  }
287648
- if (_optionalChain([key, 'optionalAccess', _1304 => _1304.name]) === "return" || _optionalChain([key, 'optionalAccess', _1305 => _1305.name]) === "enter") {
287854
+ if (_optionalChain([key, 'optionalAccess', _1314 => _1314.name]) === "return" || _optionalChain([key, 'optionalAccess', _1315 => _1315.name]) === "enter") {
287649
287855
  historyNavigationActive = false;
287650
287856
  return;
287651
287857
  }
287652
- if (_optionalChain([key, 'optionalAccess', _1306 => _1306.ctrl]) || _optionalChain([key, 'optionalAccess', _1307 => _1307.meta]) || typeof _optionalChain([key, 'optionalAccess', _1308 => _1308.name]) === "string") {
287858
+ if (_optionalChain([key, 'optionalAccess', _1316 => _1316.ctrl]) || _optionalChain([key, 'optionalAccess', _1317 => _1317.meta]) || typeof _optionalChain([key, 'optionalAccess', _1318 => _1318.name]) === "string") {
287653
287859
  historyNavigationActive = false;
287654
287860
  }
287655
287861
  });
@@ -288071,7 +288277,7 @@ var compareVersions = (v12, v2) => {
288071
288277
  // package.json
288072
288278
  var package_default2 = {
288073
288279
  name: "@rockcarver/frodo-cli",
288074
- version: "4.0.1-0",
288280
+ version: "4.0.1",
288075
288281
  type: "module",
288076
288282
  description: "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
288077
288283
  keywords: [
@@ -288175,7 +288381,7 @@ var package_default2 = {
288175
288381
  },
288176
288382
  devDependencies: {
288177
288383
  "@modelcontextprotocol/sdk": "^1.29.0",
288178
- "@rockcarver/frodo-lib": "4.0.1-6",
288384
+ "@rockcarver/frodo-lib": "4.0.1",
288179
288385
  "@types/colors": "^1.2.1",
288180
288386
  "@types/fs-extra": "^11.0.1",
288181
288387
  "@types/jest": "^29.2.3",