@tonyclaw/agent-inspector 3.0.16 → 3.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{CompareDrawer-BJmxAiM0.js → CompareDrawer-Lx-WeJNC.js} +1 -1
  3. package/.output/public/assets/{ProxyViewerContainer-C40Nig73.js → ProxyViewerContainer-BNehwMI0.js} +31 -31
  4. package/.output/public/assets/{ReplayDialog-CkLdOMJr.js → ReplayDialog-CADaXFPE.js} +1 -1
  5. package/.output/public/assets/{RequestAnatomy-DemOFfSc.js → RequestAnatomy-CGoL8ACh.js} +1 -1
  6. package/.output/public/assets/{ResponseView-9LhpuDo7.js → ResponseView-BSwM1dCH.js} +2 -2
  7. package/.output/public/assets/{StreamingChunkSequence-RRWYBOdz.js → StreamingChunkSequence-qhWtSx3D.js} +1 -1
  8. package/.output/public/assets/{_sessionId-CWEh2Jsn.js → _sessionId-2uq_HB8p.js} +1 -1
  9. package/.output/public/assets/index-BHXN1Fsx.css +1 -0
  10. package/.output/public/assets/{index-Lwir70Rs.js → index-DPc2wzgW.js} +1 -1
  11. package/.output/public/assets/{index-hjNWJZGE.js → index-T0u1foYL.js} +1 -1
  12. package/.output/public/assets/{json-viewer-D8gvbDlB.js → json-viewer-uIwLntt-.js} +1 -1
  13. package/.output/public/assets/{main-ovrz0tyD.js → main-DuFBHsus.js} +2 -2
  14. package/.output/server/_libs/@opentelemetry/semantic-conventions+[...].mjs +2658 -0
  15. package/.output/server/_libs/agent-base.mjs +234 -0
  16. package/.output/server/_libs/anthropic-ai__sdk.mjs +6042 -0
  17. package/.output/server/_libs/atomically.mjs +3 -0
  18. package/.output/server/_libs/base64-js.mjs +102 -0
  19. package/.output/server/_libs/bignumber.js.mjs +1353 -0
  20. package/.output/server/_libs/buffer-equal-constant-time.mjs +38 -0
  21. package/.output/server/_libs/data-uri-to-buffer.mjs +39 -0
  22. package/.output/server/_libs/debug.mjs +547 -0
  23. package/.output/server/_libs/ecdsa-sig-formatter.mjs +162 -0
  24. package/.output/server/_libs/extend.mjs +2 -1
  25. package/.output/server/_libs/fetch-blob.mjs +287 -0
  26. package/.output/server/_libs/formdata-polyfill.mjs +88 -0
  27. package/.output/server/_libs/gaxios.mjs +927 -0
  28. package/.output/server/_libs/gcp-metadata.mjs +322 -0
  29. package/.output/server/_libs/google-auth-library.mjs +6339 -0
  30. package/.output/server/_libs/google-logging-utils.mjs +385 -0
  31. package/.output/server/_libs/google__genai.mjs +18034 -0
  32. package/.output/server/_libs/has-flag.mjs +16 -0
  33. package/.output/server/_libs/https-proxy-agent.mjs +280 -0
  34. package/.output/server/_libs/json-bigint.mjs +413 -0
  35. package/.output/server/_libs/jwa.mjs +233 -0
  36. package/.output/server/_libs/jws.mjs +298 -0
  37. package/.output/server/_libs/lucide-react.mjs +261 -226
  38. package/.output/server/_libs/mariozechner__pi-agent-core.mjs +824 -0
  39. package/.output/server/_libs/mariozechner__pi-ai.mjs +22889 -0
  40. package/.output/server/_libs/mistralai__mistralai.mjs +32045 -0
  41. package/.output/server/_libs/ms.mjs +120 -0
  42. package/.output/server/_libs/node-domexception.mjs +17 -0
  43. package/.output/server/_libs/node-fetch.mjs +1578 -0
  44. package/.output/server/_libs/ohash.mjs +1 -1
  45. package/.output/server/_libs/openai.mjs +6766 -0
  46. package/.output/server/_libs/opentelemetry__api.mjs +1678 -0
  47. package/.output/server/_libs/p-retry.mjs +87 -0
  48. package/.output/server/_libs/partial-json.mjs +244 -0
  49. package/.output/server/_libs/react-dom.mjs +5 -5
  50. package/.output/server/_libs/react-markdown.mjs +2 -2
  51. package/.output/server/_libs/react.mjs +30 -0
  52. package/.output/server/_libs/readable-stream.mjs +5 -5
  53. package/.output/server/_libs/retry.mjs +236 -0
  54. package/.output/server/_libs/safe-buffer.mjs +63 -1
  55. package/.output/server/_libs/srvx.mjs +2 -2
  56. package/.output/server/_libs/supports-color.mjs +108 -0
  57. package/.output/server/_libs/tanstack__router-core.mjs +1 -1
  58. package/.output/server/_libs/typebox.mjs +6596 -0
  59. package/.output/server/_libs/util-deprecate.mjs +2 -2
  60. package/.output/server/_libs/vfile.mjs +2 -2
  61. package/.output/server/_libs/web-streams-polyfill.mjs +4282 -0
  62. package/.output/server/_libs/ws.mjs +3715 -0
  63. package/.output/server/_libs/zod-to-json-schema.mjs +1207 -0
  64. package/.output/server/_libs/zod.mjs +597 -9
  65. package/.output/server/{_sessionId-zI_GFX_7.mjs → _sessionId-DL2JQJwR.mjs} +14 -13
  66. package/.output/server/_ssr/{CompareDrawer-Ckcx1RVu.mjs → CompareDrawer-hPTOTmyU.mjs} +14 -13
  67. package/.output/server/_ssr/{ProxyViewerContainer-BgXewlIr.mjs → ProxyViewerContainer-k0mFaufl.mjs} +153 -87
  68. package/.output/server/_ssr/{ReplayDialog-wx3nDtZn.mjs → ReplayDialog-t6QdwnZh.mjs} +15 -14
  69. package/.output/server/_ssr/{RequestAnatomy-DN80zt0G.mjs → RequestAnatomy-BnvWxyac.mjs} +14 -13
  70. package/.output/server/_ssr/{ResponseView-DD7rTu_l.mjs → ResponseView-BhhozRRl.mjs} +14 -13
  71. package/.output/server/_ssr/{StreamingChunkSequence-DAgz6Vvw.mjs → StreamingChunkSequence-Dl_laTbX.mjs} +14 -13
  72. package/.output/server/_ssr/{index-dcTjp8du.mjs → index-D1-t1D8F.mjs} +13 -12
  73. package/.output/server/_ssr/index.mjs +4 -4
  74. package/.output/server/_ssr/{json-viewer-N2cuzGWR.mjs → json-viewer-D5Lh2yBU.mjs} +14 -13
  75. package/.output/server/_ssr/{router-BfQ0QsD5.mjs → router-DaLFEeWW.mjs} +523 -97
  76. package/.output/server/_tanstack-start-manifest_v-DsSiD2gY.mjs +4 -0
  77. package/.output/server/index.mjs +76 -76
  78. package/package.json +4 -1
  79. package/src/components/ProxyViewer.tsx +3 -0
  80. package/src/components/pi-agent/PiAgentPanel.tsx +204 -0
  81. package/src/lib/piAgentContract.ts +21 -0
  82. package/src/routes/api/pi-agent.ts +29 -0
  83. package/src/services/piAgent.ts +390 -0
  84. package/.output/public/assets/index-HRfrFVYw.css +0 -1
  85. package/.output/server/_tanstack-start-manifest_v-BXnYrbcJ.mjs +0 -4
@@ -0,0 +1,87 @@
1
+ import { g as getDefaultExportFromCjs } from "./react.mjs";
2
+ import { r as requireRetry } from "./retry.mjs";
3
+ var pRetry$1 = { exports: {} };
4
+ var hasRequiredPRetry;
5
+ function requirePRetry() {
6
+ if (hasRequiredPRetry) return pRetry$1.exports;
7
+ hasRequiredPRetry = 1;
8
+ const retry = requireRetry();
9
+ const networkErrorMsgs = [
10
+ "Failed to fetch",
11
+ // Chrome
12
+ "NetworkError when attempting to fetch resource.",
13
+ // Firefox
14
+ "The Internet connection appears to be offline.",
15
+ // Safari
16
+ "Network request failed"
17
+ // `cross-fetch`
18
+ ];
19
+ class AbortError extends Error {
20
+ constructor(message) {
21
+ super();
22
+ if (message instanceof Error) {
23
+ this.originalError = message;
24
+ ({ message } = message);
25
+ } else {
26
+ this.originalError = new Error(message);
27
+ this.originalError.stack = this.stack;
28
+ }
29
+ this.name = "AbortError";
30
+ this.message = message;
31
+ }
32
+ }
33
+ const decorateErrorWithCounts = (error, attemptNumber, options) => {
34
+ const retriesLeft = options.retries - (attemptNumber - 1);
35
+ error.attemptNumber = attemptNumber;
36
+ error.retriesLeft = retriesLeft;
37
+ return error;
38
+ };
39
+ const isNetworkError = (errorMessage) => networkErrorMsgs.includes(errorMessage);
40
+ const pRetry2 = (input, options) => new Promise((resolve, reject) => {
41
+ options = {
42
+ onFailedAttempt: () => {
43
+ },
44
+ retries: 10,
45
+ ...options
46
+ };
47
+ const operation = retry.operation(options);
48
+ operation.attempt(async (attemptNumber) => {
49
+ try {
50
+ resolve(await input(attemptNumber));
51
+ } catch (error) {
52
+ if (!(error instanceof Error)) {
53
+ reject(new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`));
54
+ return;
55
+ }
56
+ if (error instanceof AbortError) {
57
+ operation.stop();
58
+ reject(error.originalError);
59
+ } else if (error instanceof TypeError && !isNetworkError(error.message)) {
60
+ operation.stop();
61
+ reject(error);
62
+ } else {
63
+ decorateErrorWithCounts(error, attemptNumber, options);
64
+ try {
65
+ await options.onFailedAttempt(error);
66
+ } catch (error2) {
67
+ reject(error2);
68
+ return;
69
+ }
70
+ if (!operation.retry(error)) {
71
+ reject(operation.mainError());
72
+ }
73
+ }
74
+ }
75
+ });
76
+ });
77
+ pRetry$1.exports = pRetry2;
78
+ pRetry$1.exports.default = pRetry2;
79
+ pRetry$1.exports.AbortError = AbortError;
80
+ return pRetry$1.exports;
81
+ }
82
+ var pRetryExports = requirePRetry();
83
+ const pRetry = /* @__PURE__ */ getDefaultExportFromCjs(pRetryExports);
84
+ export {
85
+ pRetryExports as a,
86
+ pRetry as p
87
+ };
@@ -0,0 +1,244 @@
1
+ var dist = {};
2
+ var options = {};
3
+ var hasRequiredOptions;
4
+ function requireOptions() {
5
+ if (hasRequiredOptions) return options;
6
+ hasRequiredOptions = 1;
7
+ (function(exports$1) {
8
+ Object.defineProperty(exports$1, "__esModule", { value: true });
9
+ exports$1.Allow = exports$1.ALL = exports$1.COLLECTION = exports$1.ATOM = exports$1.SPECIAL = exports$1.INF = exports$1._INFINITY = exports$1.INFINITY = exports$1.NAN = exports$1.BOOL = exports$1.NULL = exports$1.OBJ = exports$1.ARR = exports$1.NUM = exports$1.STR = void 0;
10
+ exports$1.STR = 1;
11
+ exports$1.NUM = 2;
12
+ exports$1.ARR = 4;
13
+ exports$1.OBJ = 8;
14
+ exports$1.NULL = 16;
15
+ exports$1.BOOL = 32;
16
+ exports$1.NAN = 64;
17
+ exports$1.INFINITY = 128;
18
+ exports$1._INFINITY = 256;
19
+ exports$1.INF = exports$1.INFINITY | exports$1._INFINITY;
20
+ exports$1.SPECIAL = exports$1.NULL | exports$1.BOOL | exports$1.INF | exports$1.NAN;
21
+ exports$1.ATOM = exports$1.STR | exports$1.NUM | exports$1.SPECIAL;
22
+ exports$1.COLLECTION = exports$1.ARR | exports$1.OBJ;
23
+ exports$1.ALL = exports$1.ATOM | exports$1.COLLECTION;
24
+ exports$1.Allow = { STR: exports$1.STR, NUM: exports$1.NUM, ARR: exports$1.ARR, OBJ: exports$1.OBJ, NULL: exports$1.NULL, BOOL: exports$1.BOOL, NAN: exports$1.NAN, INFINITY: exports$1.INFINITY, _INFINITY: exports$1._INFINITY, INF: exports$1.INF, SPECIAL: exports$1.SPECIAL, ATOM: exports$1.ATOM, COLLECTION: exports$1.COLLECTION, ALL: exports$1.ALL };
25
+ exports$1.default = exports$1.Allow;
26
+ })(options);
27
+ return options;
28
+ }
29
+ var hasRequiredDist;
30
+ function requireDist() {
31
+ if (hasRequiredDist) return dist;
32
+ hasRequiredDist = 1;
33
+ (function(exports$1) {
34
+ var __createBinding = dist && dist.__createBinding || (Object.create ? (function(o, m, k, k2) {
35
+ if (k2 === void 0) k2 = k;
36
+ var desc = Object.getOwnPropertyDescriptor(m, k);
37
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
38
+ desc = { enumerable: true, get: function() {
39
+ return m[k];
40
+ } };
41
+ }
42
+ Object.defineProperty(o, k2, desc);
43
+ }) : (function(o, m, k, k2) {
44
+ if (k2 === void 0) k2 = k;
45
+ o[k2] = m[k];
46
+ }));
47
+ var __exportStar = dist && dist.__exportStar || function(m, exports$12) {
48
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding(exports$12, m, p);
49
+ };
50
+ Object.defineProperty(exports$1, "__esModule", { value: true });
51
+ exports$1.Allow = exports$1.MalformedJSON = exports$1.PartialJSON = exports$1.parseJSON = exports$1.parse = void 0;
52
+ const options_1 = requireOptions();
53
+ Object.defineProperty(exports$1, "Allow", { enumerable: true, get: function() {
54
+ return options_1.Allow;
55
+ } });
56
+ __exportStar(requireOptions(), exports$1);
57
+ class PartialJSON extends Error {
58
+ }
59
+ exports$1.PartialJSON = PartialJSON;
60
+ class MalformedJSON extends Error {
61
+ }
62
+ exports$1.MalformedJSON = MalformedJSON;
63
+ function parseJSON(jsonString, allowPartial = options_1.Allow.ALL) {
64
+ if (typeof jsonString !== "string") {
65
+ throw new TypeError(`expecting str, got ${typeof jsonString}`);
66
+ }
67
+ if (!jsonString.trim()) {
68
+ throw new Error(`${jsonString} is empty`);
69
+ }
70
+ return _parseJSON(jsonString.trim(), allowPartial);
71
+ }
72
+ exports$1.parseJSON = parseJSON;
73
+ const _parseJSON = (jsonString, allow) => {
74
+ const length = jsonString.length;
75
+ let index = 0;
76
+ const markPartialJSON = (msg) => {
77
+ throw new PartialJSON(`${msg} at position ${index}`);
78
+ };
79
+ const throwMalformedError = (msg) => {
80
+ throw new MalformedJSON(`${msg} at position ${index}`);
81
+ };
82
+ const parseAny = () => {
83
+ skipBlank();
84
+ if (index >= length)
85
+ markPartialJSON("Unexpected end of input");
86
+ if (jsonString[index] === '"')
87
+ return parseStr();
88
+ if (jsonString[index] === "{")
89
+ return parseObj();
90
+ if (jsonString[index] === "[")
91
+ return parseArr();
92
+ if (jsonString.substring(index, index + 4) === "null" || options_1.Allow.NULL & allow && length - index < 4 && "null".startsWith(jsonString.substring(index))) {
93
+ index += 4;
94
+ return null;
95
+ }
96
+ if (jsonString.substring(index, index + 4) === "true" || options_1.Allow.BOOL & allow && length - index < 4 && "true".startsWith(jsonString.substring(index))) {
97
+ index += 4;
98
+ return true;
99
+ }
100
+ if (jsonString.substring(index, index + 5) === "false" || options_1.Allow.BOOL & allow && length - index < 5 && "false".startsWith(jsonString.substring(index))) {
101
+ index += 5;
102
+ return false;
103
+ }
104
+ if (jsonString.substring(index, index + 8) === "Infinity" || options_1.Allow.INFINITY & allow && length - index < 8 && "Infinity".startsWith(jsonString.substring(index))) {
105
+ index += 8;
106
+ return Infinity;
107
+ }
108
+ if (jsonString.substring(index, index + 9) === "-Infinity" || options_1.Allow._INFINITY & allow && 1 < length - index && length - index < 9 && "-Infinity".startsWith(jsonString.substring(index))) {
109
+ index += 9;
110
+ return -Infinity;
111
+ }
112
+ if (jsonString.substring(index, index + 3) === "NaN" || options_1.Allow.NAN & allow && length - index < 3 && "NaN".startsWith(jsonString.substring(index))) {
113
+ index += 3;
114
+ return NaN;
115
+ }
116
+ return parseNum();
117
+ };
118
+ const parseStr = () => {
119
+ const start = index;
120
+ let escape = false;
121
+ index++;
122
+ while (index < length && (jsonString[index] !== '"' || escape && jsonString[index - 1] === "\\")) {
123
+ escape = jsonString[index] === "\\" ? !escape : false;
124
+ index++;
125
+ }
126
+ if (jsonString.charAt(index) == '"') {
127
+ try {
128
+ return JSON.parse(jsonString.substring(start, ++index - Number(escape)));
129
+ } catch (e) {
130
+ throwMalformedError(String(e));
131
+ }
132
+ } else if (options_1.Allow.STR & allow) {
133
+ try {
134
+ return JSON.parse(jsonString.substring(start, index - Number(escape)) + '"');
135
+ } catch (e) {
136
+ return JSON.parse(jsonString.substring(start, jsonString.lastIndexOf("\\")) + '"');
137
+ }
138
+ }
139
+ markPartialJSON("Unterminated string literal");
140
+ };
141
+ const parseObj = () => {
142
+ index++;
143
+ skipBlank();
144
+ const obj = {};
145
+ try {
146
+ while (jsonString[index] !== "}") {
147
+ skipBlank();
148
+ if (index >= length && options_1.Allow.OBJ & allow)
149
+ return obj;
150
+ const key = parseStr();
151
+ skipBlank();
152
+ index++;
153
+ try {
154
+ const value = parseAny();
155
+ obj[key] = value;
156
+ } catch (e) {
157
+ if (options_1.Allow.OBJ & allow)
158
+ return obj;
159
+ else
160
+ throw e;
161
+ }
162
+ skipBlank();
163
+ if (jsonString[index] === ",")
164
+ index++;
165
+ }
166
+ } catch (e) {
167
+ if (options_1.Allow.OBJ & allow)
168
+ return obj;
169
+ else
170
+ markPartialJSON("Expected '}' at end of object");
171
+ }
172
+ index++;
173
+ return obj;
174
+ };
175
+ const parseArr = () => {
176
+ index++;
177
+ const arr = [];
178
+ try {
179
+ while (jsonString[index] !== "]") {
180
+ arr.push(parseAny());
181
+ skipBlank();
182
+ if (jsonString[index] === ",") {
183
+ index++;
184
+ }
185
+ }
186
+ } catch (e) {
187
+ if (options_1.Allow.ARR & allow) {
188
+ return arr;
189
+ }
190
+ markPartialJSON("Expected ']' at end of array");
191
+ }
192
+ index++;
193
+ return arr;
194
+ };
195
+ const parseNum = () => {
196
+ if (index === 0) {
197
+ if (jsonString === "-")
198
+ throwMalformedError("Not sure what '-' is");
199
+ try {
200
+ return JSON.parse(jsonString);
201
+ } catch (e) {
202
+ if (options_1.Allow.NUM & allow)
203
+ try {
204
+ return JSON.parse(jsonString.substring(0, jsonString.lastIndexOf("e")));
205
+ } catch (e2) {
206
+ }
207
+ throwMalformedError(String(e));
208
+ }
209
+ }
210
+ const start = index;
211
+ if (jsonString[index] === "-")
212
+ index++;
213
+ while (jsonString[index] && ",]}".indexOf(jsonString[index]) === -1)
214
+ index++;
215
+ if (index == length && !(options_1.Allow.NUM & allow))
216
+ markPartialJSON("Unterminated number literal");
217
+ try {
218
+ return JSON.parse(jsonString.substring(start, index));
219
+ } catch (e) {
220
+ if (jsonString.substring(start, index) === "-")
221
+ markPartialJSON("Not sure what '-' is");
222
+ try {
223
+ return JSON.parse(jsonString.substring(start, jsonString.lastIndexOf("e")));
224
+ } catch (e2) {
225
+ throwMalformedError(String(e2));
226
+ }
227
+ }
228
+ };
229
+ const skipBlank = () => {
230
+ while (index < length && " \n\r ".includes(jsonString[index])) {
231
+ index++;
232
+ }
233
+ };
234
+ return parseAny();
235
+ };
236
+ const parse = parseJSON;
237
+ exports$1.parse = parse;
238
+ })(dist);
239
+ return dist;
240
+ }
241
+ var distExports = requireDist();
242
+ export {
243
+ distExports as d
244
+ };
@@ -1,8 +1,8 @@
1
- import require$$0 from "util";
2
- import require$$2 from "async_hooks";
3
- import require$$0$1 from "stream";
4
- import { b as requireReact, g as getDefaultExportFromCjs } from "./react.mjs";
1
+ import require$$2 from "util";
5
2
  import require$$1 from "crypto";
3
+ import require$$2$1 from "async_hooks";
4
+ import require$$0 from "stream";
5
+ import { b as requireReact, g as getDefaultExportFromCjs } from "./react.mjs";
6
6
  var server_node = {};
7
7
  var reactDomServerLegacy_node_production = {};
8
8
  var reactDom = { exports: {} };
@@ -5058,7 +5058,7 @@ var hasRequiredReactDomServer_node_production;
5058
5058
  function requireReactDomServer_node_production() {
5059
5059
  if (hasRequiredReactDomServer_node_production) return reactDomServer_node_production;
5060
5060
  hasRequiredReactDomServer_node_production = 1;
5061
- var util = require$$0, crypto = require$$1, async_hooks = require$$2, React = requireReact(), ReactDOM2 = requireReactDom(), stream = require$$0$1, REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_SCOPE_TYPE = /* @__PURE__ */ Symbol.for("react.scope"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE = /* @__PURE__ */ Symbol.for("react.legacy_hidden"), REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
5061
+ var util = require$$2, crypto = require$$1, async_hooks = require$$2$1, React = requireReact(), ReactDOM2 = requireReactDom(), stream = require$$0, REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_SCOPE_TYPE = /* @__PURE__ */ Symbol.for("react.scope"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_LEGACY_HIDDEN_TYPE = /* @__PURE__ */ Symbol.for("react.legacy_hidden"), REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
5062
5062
  function getIteratorFn(maybeIterable) {
5063
5063
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
5064
5064
  maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
@@ -38,10 +38,10 @@ import "./ungap__structured-clone.mjs";
38
38
  import "./micromark-util-sanitize-uri.mjs";
39
39
  import "./unist-util-position.mjs";
40
40
  import "./trim-lines.mjs";
41
- import "./vfile-message.mjs";
42
- import "node:process";
43
41
  import "node:path";
44
42
  import "node:url";
43
+ import "./vfile-message.mjs";
44
+ import "node:process";
45
45
  import "./unist-util-visit-parents.mjs";
46
46
  import "./unist-util-is.mjs";
47
47
  import "./comma-separated-tokens.mjs";
@@ -23,6 +23,35 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
23
23
  function getDefaultExportFromCjs(x) {
24
24
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
25
25
  }
26
+ function getAugmentedNamespace(n) {
27
+ if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n;
28
+ var f = n.default;
29
+ if (typeof f == "function") {
30
+ var a = function a2() {
31
+ var isInstance = false;
32
+ try {
33
+ isInstance = this instanceof a2;
34
+ } catch {
35
+ }
36
+ if (isInstance) {
37
+ return Reflect.construct(f, arguments, this.constructor);
38
+ }
39
+ return f.apply(this, arguments);
40
+ };
41
+ a.prototype = f.prototype;
42
+ } else a = {};
43
+ Object.defineProperty(a, "__esModule", { value: true });
44
+ Object.keys(n).forEach(function(k) {
45
+ var d = Object.getOwnPropertyDescriptor(n, k);
46
+ Object.defineProperty(a, k, d.get ? d : {
47
+ enumerable: true,
48
+ get: function() {
49
+ return n[k];
50
+ }
51
+ });
52
+ });
53
+ return a;
54
+ }
26
55
  var jsxRuntime = { exports: {} };
27
56
  var reactJsxRuntime_production = {};
28
57
  var hasRequiredReactJsxRuntime_production;
@@ -509,6 +538,7 @@ export {
509
538
  React as a,
510
539
  requireReact as b,
511
540
  commonjsGlobal as c,
541
+ getAugmentedNamespace as d,
512
542
  getDefaultExportFromCjs as g,
513
543
  jsxRuntimeExports as j,
514
544
  reactExports as r
@@ -1,4 +1,4 @@
1
- import require$$2 from "events";
1
+ import require$$0$1 from "events";
2
2
  import require$$11 from "node:string_decoder";
3
3
  import require$$0 from "stream";
4
4
  import { c as commonjsGlobal } from "./react.mjs";
@@ -7,7 +7,7 @@ import { r as requireIsarray } from "./isarray.mjs";
7
7
  import { r as requireSafeBuffer } from "./safe-buffer.mjs";
8
8
  import { r as requireUtil } from "./core-util-is.mjs";
9
9
  import { r as requireInherits } from "./inherits.mjs";
10
- import require$$0$1 from "util";
10
+ import require$$2 from "util";
11
11
  import { r as requireNode } from "./util-deprecate.mjs";
12
12
  var readable = { exports: {} };
13
13
  var stream;
@@ -30,7 +30,7 @@ function requireBufferList() {
30
30
  }
31
31
  }
32
32
  var Buffer = requireSafeBuffer().Buffer;
33
- var util = require$$0$1;
33
+ var util = require$$2;
34
34
  function copyBuffer(src, target, offset) {
35
35
  src.copy(target, offset);
36
36
  }
@@ -691,7 +691,7 @@ function require_stream_readable() {
691
691
  var isArray = requireIsarray();
692
692
  var Duplex;
693
693
  Readable.ReadableState = ReadableState;
694
- require$$2.EventEmitter;
694
+ require$$0$1.EventEmitter;
695
695
  var EElistenerCount = function(emitter, type) {
696
696
  return emitter.listeners(type).length;
697
697
  };
@@ -707,7 +707,7 @@ function require_stream_readable() {
707
707
  }
708
708
  var util = Object.create(requireUtil());
709
709
  util.inherits = requireInherits();
710
- var debugUtil = require$$0$1;
710
+ var debugUtil = require$$2;
711
711
  var debug = void 0;
712
712
  if (debugUtil && debugUtil.debuglog) {
713
713
  debug = debugUtil.debuglog("stream");
@@ -0,0 +1,236 @@
1
+ var retry$1 = {};
2
+ var retry_operation;
3
+ var hasRequiredRetry_operation;
4
+ function requireRetry_operation() {
5
+ if (hasRequiredRetry_operation) return retry_operation;
6
+ hasRequiredRetry_operation = 1;
7
+ function RetryOperation(timeouts, options) {
8
+ if (typeof options === "boolean") {
9
+ options = { forever: options };
10
+ }
11
+ this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
12
+ this._timeouts = timeouts;
13
+ this._options = options || {};
14
+ this._maxRetryTime = options && options.maxRetryTime || Infinity;
15
+ this._fn = null;
16
+ this._errors = [];
17
+ this._attempts = 1;
18
+ this._operationTimeout = null;
19
+ this._operationTimeoutCb = null;
20
+ this._timeout = null;
21
+ this._operationStart = null;
22
+ this._timer = null;
23
+ if (this._options.forever) {
24
+ this._cachedTimeouts = this._timeouts.slice(0);
25
+ }
26
+ }
27
+ retry_operation = RetryOperation;
28
+ RetryOperation.prototype.reset = function() {
29
+ this._attempts = 1;
30
+ this._timeouts = this._originalTimeouts.slice(0);
31
+ };
32
+ RetryOperation.prototype.stop = function() {
33
+ if (this._timeout) {
34
+ clearTimeout(this._timeout);
35
+ }
36
+ if (this._timer) {
37
+ clearTimeout(this._timer);
38
+ }
39
+ this._timeouts = [];
40
+ this._cachedTimeouts = null;
41
+ };
42
+ RetryOperation.prototype.retry = function(err) {
43
+ if (this._timeout) {
44
+ clearTimeout(this._timeout);
45
+ }
46
+ if (!err) {
47
+ return false;
48
+ }
49
+ var currentTime = (/* @__PURE__ */ new Date()).getTime();
50
+ if (err && currentTime - this._operationStart >= this._maxRetryTime) {
51
+ this._errors.push(err);
52
+ this._errors.unshift(new Error("RetryOperation timeout occurred"));
53
+ return false;
54
+ }
55
+ this._errors.push(err);
56
+ var timeout = this._timeouts.shift();
57
+ if (timeout === void 0) {
58
+ if (this._cachedTimeouts) {
59
+ this._errors.splice(0, this._errors.length - 1);
60
+ timeout = this._cachedTimeouts.slice(-1);
61
+ } else {
62
+ return false;
63
+ }
64
+ }
65
+ var self = this;
66
+ this._timer = setTimeout(function() {
67
+ self._attempts++;
68
+ if (self._operationTimeoutCb) {
69
+ self._timeout = setTimeout(function() {
70
+ self._operationTimeoutCb(self._attempts);
71
+ }, self._operationTimeout);
72
+ if (self._options.unref) {
73
+ self._timeout.unref();
74
+ }
75
+ }
76
+ self._fn(self._attempts);
77
+ }, timeout);
78
+ if (this._options.unref) {
79
+ this._timer.unref();
80
+ }
81
+ return true;
82
+ };
83
+ RetryOperation.prototype.attempt = function(fn, timeoutOps) {
84
+ this._fn = fn;
85
+ if (timeoutOps) {
86
+ if (timeoutOps.timeout) {
87
+ this._operationTimeout = timeoutOps.timeout;
88
+ }
89
+ if (timeoutOps.cb) {
90
+ this._operationTimeoutCb = timeoutOps.cb;
91
+ }
92
+ }
93
+ var self = this;
94
+ if (this._operationTimeoutCb) {
95
+ this._timeout = setTimeout(function() {
96
+ self._operationTimeoutCb();
97
+ }, self._operationTimeout);
98
+ }
99
+ this._operationStart = (/* @__PURE__ */ new Date()).getTime();
100
+ this._fn(this._attempts);
101
+ };
102
+ RetryOperation.prototype.try = function(fn) {
103
+ console.log("Using RetryOperation.try() is deprecated");
104
+ this.attempt(fn);
105
+ };
106
+ RetryOperation.prototype.start = function(fn) {
107
+ console.log("Using RetryOperation.start() is deprecated");
108
+ this.attempt(fn);
109
+ };
110
+ RetryOperation.prototype.start = RetryOperation.prototype.try;
111
+ RetryOperation.prototype.errors = function() {
112
+ return this._errors;
113
+ };
114
+ RetryOperation.prototype.attempts = function() {
115
+ return this._attempts;
116
+ };
117
+ RetryOperation.prototype.mainError = function() {
118
+ if (this._errors.length === 0) {
119
+ return null;
120
+ }
121
+ var counts = {};
122
+ var mainError = null;
123
+ var mainErrorCount = 0;
124
+ for (var i = 0; i < this._errors.length; i++) {
125
+ var error = this._errors[i];
126
+ var message = error.message;
127
+ var count = (counts[message] || 0) + 1;
128
+ counts[message] = count;
129
+ if (count >= mainErrorCount) {
130
+ mainError = error;
131
+ mainErrorCount = count;
132
+ }
133
+ }
134
+ return mainError;
135
+ };
136
+ return retry_operation;
137
+ }
138
+ var hasRequiredRetry$1;
139
+ function requireRetry$1() {
140
+ if (hasRequiredRetry$1) return retry$1;
141
+ hasRequiredRetry$1 = 1;
142
+ (function(exports$1) {
143
+ var RetryOperation = requireRetry_operation();
144
+ exports$1.operation = function(options) {
145
+ var timeouts = exports$1.timeouts(options);
146
+ return new RetryOperation(timeouts, {
147
+ forever: options && (options.forever || options.retries === Infinity),
148
+ unref: options && options.unref,
149
+ maxRetryTime: options && options.maxRetryTime
150
+ });
151
+ };
152
+ exports$1.timeouts = function(options) {
153
+ if (options instanceof Array) {
154
+ return [].concat(options);
155
+ }
156
+ var opts = {
157
+ retries: 10,
158
+ factor: 2,
159
+ minTimeout: 1 * 1e3,
160
+ maxTimeout: Infinity,
161
+ randomize: false
162
+ };
163
+ for (var key in options) {
164
+ opts[key] = options[key];
165
+ }
166
+ if (opts.minTimeout > opts.maxTimeout) {
167
+ throw new Error("minTimeout is greater than maxTimeout");
168
+ }
169
+ var timeouts = [];
170
+ for (var i = 0; i < opts.retries; i++) {
171
+ timeouts.push(this.createTimeout(i, opts));
172
+ }
173
+ if (options && options.forever && !timeouts.length) {
174
+ timeouts.push(this.createTimeout(i, opts));
175
+ }
176
+ timeouts.sort(function(a, b) {
177
+ return a - b;
178
+ });
179
+ return timeouts;
180
+ };
181
+ exports$1.createTimeout = function(attempt, opts) {
182
+ var random = opts.randomize ? Math.random() + 1 : 1;
183
+ var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));
184
+ timeout = Math.min(timeout, opts.maxTimeout);
185
+ return timeout;
186
+ };
187
+ exports$1.wrap = function(obj, options, methods) {
188
+ if (options instanceof Array) {
189
+ methods = options;
190
+ options = null;
191
+ }
192
+ if (!methods) {
193
+ methods = [];
194
+ for (var key in obj) {
195
+ if (typeof obj[key] === "function") {
196
+ methods.push(key);
197
+ }
198
+ }
199
+ }
200
+ for (var i = 0; i < methods.length; i++) {
201
+ var method = methods[i];
202
+ var original = obj[method];
203
+ obj[method] = (function retryWrapper(original2) {
204
+ var op = exports$1.operation(options);
205
+ var args = Array.prototype.slice.call(arguments, 1);
206
+ var callback = args.pop();
207
+ args.push(function(err) {
208
+ if (op.retry(err)) {
209
+ return;
210
+ }
211
+ if (err) {
212
+ arguments[0] = op.mainError();
213
+ }
214
+ callback.apply(this, arguments);
215
+ });
216
+ op.attempt(function() {
217
+ original2.apply(obj, args);
218
+ });
219
+ }).bind(obj, original);
220
+ obj[method].options = options;
221
+ }
222
+ };
223
+ })(retry$1);
224
+ return retry$1;
225
+ }
226
+ var retry;
227
+ var hasRequiredRetry;
228
+ function requireRetry() {
229
+ if (hasRequiredRetry) return retry;
230
+ hasRequiredRetry = 1;
231
+ retry = requireRetry$1();
232
+ return retry;
233
+ }
234
+ export {
235
+ requireRetry as r
236
+ };