@tonyclaw/agent-inspector 4.0.8 → 4.0.9
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/.output/backend/nitro.json +1 -1
- package/.output/cli.js +915 -25970
- package/.output/server/_chunks/ssr-renderer.mjs +1 -38
- package/.output/server/_libs/@opentelemetry/semantic-conventions+[...].mjs +1 -2658
- package/.output/server/_libs/agent-base.mjs +2 -234
- package/.output/server/_libs/ajv-formats.mjs +1 -330
- package/.output/server/_libs/ajv.mjs +8 -6080
- package/.output/server/_libs/anthropic-ai__sdk.mjs +19 -6021
- package/.output/server/_libs/atomically.mjs +1 -155
- package/.output/server/_libs/base64-js.mjs +1 -102
- package/.output/server/_libs/bignumber.js.mjs +1 -1353
- package/.output/server/_libs/buffer-equal-constant-time.mjs +1 -38
- package/.output/server/_libs/conf.mjs +1 -635
- package/.output/server/_libs/cookie-es.mjs +1 -44
- package/.output/server/_libs/core-util-is.mjs +1 -75
- package/.output/server/_libs/data-uri-to-buffer.mjs +1 -39
- package/.output/server/_libs/debounce-fn.mjs +1 -69
- package/.output/server/_libs/debug.mjs +5 -547
- package/.output/server/_libs/dot-prop.mjs +1 -265
- package/.output/server/_libs/ecdsa-sig-formatter.mjs +1 -162
- package/.output/server/_libs/env-paths.mjs +1 -57
- package/.output/server/_libs/extend.mjs +1 -94
- package/.output/server/_libs/fast-deep-equal.mjs +1 -38
- package/.output/server/_libs/fast-uri.mjs +1 -812
- package/.output/server/_libs/fetch-blob.mjs +1 -287
- package/.output/server/_libs/formdata-polyfill.mjs +9 -86
- package/.output/server/_libs/gaxios.mjs +5 -926
- package/.output/server/_libs/gcp-metadata.mjs +1 -322
- package/.output/server/_libs/google-auth-library.mjs +16 -6339
- package/.output/server/_libs/google-logging-utils.mjs +1 -385
- package/.output/server/_libs/google__genai.mjs +13 -18034
- package/.output/server/_libs/h3-v2.mjs +2 -287
- package/.output/server/_libs/h3.mjs +2 -408
- package/.output/server/_libs/has-flag.mjs +1 -16
- package/.output/server/_libs/https-proxy-agent.mjs +7 -280
- package/.output/server/_libs/immediate.mjs +1 -74
- package/.output/server/_libs/inherits.mjs +1 -50
- package/.output/server/_libs/isarray.mjs +1 -14
- package/.output/server/_libs/isbot.mjs +1 -20
- package/.output/server/_libs/json-bigint.mjs +8 -413
- package/.output/server/_libs/json-schema-traverse.mjs +1 -91
- package/.output/server/_libs/jszip.mjs +2 -3051
- package/.output/server/_libs/jwa.mjs +3 -233
- package/.output/server/_libs/jws.mjs +1 -298
- package/.output/server/_libs/lie.mjs +1 -273
- package/.output/server/_libs/mariozechner__pi-agent-core.mjs +1 -824
- package/.output/server/_libs/mariozechner__pi-ai.mjs +34 -22887
- package/.output/server/_libs/mimic-function.mjs +2 -47
- package/.output/server/_libs/mistralai__mistralai.mjs +7 -32045
- package/.output/server/_libs/modelcontextprotocol__core.mjs +1 -1121
- package/.output/server/_libs/modelcontextprotocol__server.mjs +13 -13205
- package/.output/server/_libs/ms.mjs +1 -120
- package/.output/server/_libs/node-domexception.mjs +1 -17
- package/.output/server/_libs/node-fetch.mjs +4 -1578
- package/.output/server/_libs/ohash.mjs +1 -1
- package/.output/server/_libs/openai.mjs +23 -6766
- package/.output/server/_libs/opentelemetry__api.mjs +1 -1678
- package/.output/server/_libs/p-retry.mjs +1 -87
- package/.output/server/_libs/pako.mjs +1 -4223
- package/.output/server/_libs/partial-json.mjs +2 -244
- package/.output/server/_libs/process-nextick-args.mjs +1 -48
- package/.output/server/_libs/react-dom.mjs +62 -10778
- package/.output/server/_libs/react.mjs +1 -519
- package/.output/server/_libs/readable-stream.mjs +1 -1518
- package/.output/server/_libs/retry.mjs +1 -236
- package/.output/server/_libs/rou3.mjs +1 -14
- package/.output/server/_libs/safe-buffer.mjs +1 -126
- package/.output/server/_libs/semver.mjs +1 -1938
- package/.output/server/_libs/seroval-plugins.mjs +1 -58
- package/.output/server/_libs/seroval.mjs +3 -1775
- package/.output/server/_libs/setimmediate.mjs +1 -152
- package/.output/server/_libs/srvx.mjs +4 -1390
- package/.output/server/_libs/stubborn-fs.mjs +1 -91
- package/.output/server/_libs/stubborn-utils.mjs +1 -66
- package/.output/server/_libs/supports-color.mjs +1 -108
- package/.output/server/_libs/tanstack__history.mjs +1 -230
- package/.output/server/_libs/tanstack__react-router.mjs +1 -848
- package/.output/server/_libs/tanstack__react-store.mjs +1 -1
- package/.output/server/_libs/tanstack__router-core.mjs +1 -4839
- package/.output/server/_libs/typebox.mjs +3 -6596
- package/.output/server/_libs/ufo.mjs +1 -54
- package/.output/server/_libs/uint8array-extras.mjs +1 -69
- package/.output/server/_libs/util-deprecate.mjs +1 -12
- package/.output/server/_libs/web-streams-polyfill.mjs +1 -4282
- package/.output/server/_libs/when-exit.mjs +1 -53
- package/.output/server/_libs/ws.mjs +7 -3715
- package/.output/server/_libs/zod-to-json-schema.mjs +5 -1207
- package/.output/server/_libs/zod.mjs +59 -9958
- package/.output/server/_ssr/empty-plugin-adapters-C3Q1xu4u.mjs +1 -0
- package/.output/server/_ssr/index.mjs +2 -1512
- package/.output/server/_ssr/publicBasePathContext--TAQS2_5.mjs +1 -0
- package/.output/server/_ssr/router-zSWaME0l.mjs +341 -0
- package/.output/server/_ssr/start-PDVGOqUN.mjs +1 -0
- package/.output/server/_tanstack-start-manifest_v-D7cKwKzM.mjs +1 -0
- package/.output/server/index.mjs +1 -320
- package/.output/ui/assets/{CompareDrawer-DafpfgaT.js → CompareDrawer-C6KvvPtJ.js} +1 -1
- package/.output/ui/assets/{InspectorPet-Brsmmfzx.js → InspectorPet-CSH6OAhB.js} +1 -1
- package/.output/ui/assets/{ProxyViewerContainer-D2pq1fUr.js → ProxyViewerContainer-vPd7g0Xn.js} +4 -4
- package/.output/ui/assets/{ReplayDialog-D4mXXgT9.js → ReplayDialog-DbXUcT39.js} +1 -1
- package/.output/ui/assets/{RequestAnatomy-Ccnsq12U.js → RequestAnatomy-BWOCIN7J.js} +1 -1
- package/.output/ui/assets/{ResponseView-CJv3vB5X.js → ResponseView-BqDbTzFs.js} +1 -1
- package/.output/ui/assets/{StreamingChunkSequence-CEkLnOF6.js → StreamingChunkSequence-UHl2g6w6.js} +1 -1
- package/.output/ui/assets/{_sessionId-DlG-yHoI.js → _sessionId-B2S61lDJ.js} +1 -1
- package/.output/ui/assets/{_sessionId-C7s68UH3.js → _sessionId-CS6hqj8-.js} +1 -1
- package/.output/ui/assets/{index-Cqh47jeU.js → index-C6V66rNI.js} +1 -1
- package/.output/ui/assets/{index-CFqnSirZ.js → index-DY5xBYHr.js} +1 -1
- package/.output/ui/assets/{index-B0NCZQ93.js → index-DgyIeqyV.js} +2 -2
- package/.output/ui/assets/{index-ChZZrVHa.js → index-HLs5jTyi.js} +1 -1
- package/.output/ui/assets/{json-viewer-DvpI0vbY.js → json-viewer-i5LcN8e7.js} +1 -1
- package/.output/ui/assets/{jszip.min-5AG8hW2c.js → jszip.min-yNpb9qnf.js} +1 -1
- package/.output/ui/index.html +1 -1
- package/.output/workers/logFinalizer.worker.js +41 -17739
- package/.output/workers/sessionWorkerEntry.js +41 -17735
- package/package.json +7 -7
- package/.output/server/_ssr/empty-plugin-adapters-BFgPZ6_d.mjs +0 -6
- package/.output/server/_ssr/publicBasePathContext-IH2ilOfu.mjs +0 -176
- package/.output/server/_ssr/router-BDyF-OMB.mjs +0 -27187
- package/.output/server/_ssr/start-COQu_AgD.mjs +0 -57
- package/.output/server/_tanstack-start-manifest_v-ClTaMkEj.mjs +0 -4
|
@@ -1,273 +1 @@
|
|
|
1
|
-
import { r
|
|
2
|
-
var lib;
|
|
3
|
-
var hasRequiredLib;
|
|
4
|
-
function requireLib() {
|
|
5
|
-
if (hasRequiredLib) return lib;
|
|
6
|
-
hasRequiredLib = 1;
|
|
7
|
-
var immediate = requireLib$1();
|
|
8
|
-
function INTERNAL() {
|
|
9
|
-
}
|
|
10
|
-
var handlers = {};
|
|
11
|
-
var REJECTED = ["REJECTED"];
|
|
12
|
-
var FULFILLED = ["FULFILLED"];
|
|
13
|
-
var PENDING = ["PENDING"];
|
|
14
|
-
if (!process.browser) {
|
|
15
|
-
var UNHANDLED = ["UNHANDLED"];
|
|
16
|
-
}
|
|
17
|
-
lib = Promise2;
|
|
18
|
-
function Promise2(resolver) {
|
|
19
|
-
if (typeof resolver !== "function") {
|
|
20
|
-
throw new TypeError("resolver must be a function");
|
|
21
|
-
}
|
|
22
|
-
this.state = PENDING;
|
|
23
|
-
this.queue = [];
|
|
24
|
-
this.outcome = void 0;
|
|
25
|
-
if (!process.browser) {
|
|
26
|
-
this.handled = UNHANDLED;
|
|
27
|
-
}
|
|
28
|
-
if (resolver !== INTERNAL) {
|
|
29
|
-
safelyResolveThenable(this, resolver);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
Promise2.prototype.finally = function(callback) {
|
|
33
|
-
if (typeof callback !== "function") {
|
|
34
|
-
return this;
|
|
35
|
-
}
|
|
36
|
-
var p = this.constructor;
|
|
37
|
-
return this.then(resolve2, reject2);
|
|
38
|
-
function resolve2(value) {
|
|
39
|
-
function yes() {
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
return p.resolve(callback()).then(yes);
|
|
43
|
-
}
|
|
44
|
-
function reject2(reason) {
|
|
45
|
-
function no() {
|
|
46
|
-
throw reason;
|
|
47
|
-
}
|
|
48
|
-
return p.resolve(callback()).then(no);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
Promise2.prototype.catch = function(onRejected) {
|
|
52
|
-
return this.then(null, onRejected);
|
|
53
|
-
};
|
|
54
|
-
Promise2.prototype.then = function(onFulfilled, onRejected) {
|
|
55
|
-
if (typeof onFulfilled !== "function" && this.state === FULFILLED || typeof onRejected !== "function" && this.state === REJECTED) {
|
|
56
|
-
return this;
|
|
57
|
-
}
|
|
58
|
-
var promise = new this.constructor(INTERNAL);
|
|
59
|
-
if (!process.browser) {
|
|
60
|
-
if (this.handled === UNHANDLED) {
|
|
61
|
-
this.handled = null;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (this.state !== PENDING) {
|
|
65
|
-
var resolver = this.state === FULFILLED ? onFulfilled : onRejected;
|
|
66
|
-
unwrap(promise, resolver, this.outcome);
|
|
67
|
-
} else {
|
|
68
|
-
this.queue.push(new QueueItem(promise, onFulfilled, onRejected));
|
|
69
|
-
}
|
|
70
|
-
return promise;
|
|
71
|
-
};
|
|
72
|
-
function QueueItem(promise, onFulfilled, onRejected) {
|
|
73
|
-
this.promise = promise;
|
|
74
|
-
if (typeof onFulfilled === "function") {
|
|
75
|
-
this.onFulfilled = onFulfilled;
|
|
76
|
-
this.callFulfilled = this.otherCallFulfilled;
|
|
77
|
-
}
|
|
78
|
-
if (typeof onRejected === "function") {
|
|
79
|
-
this.onRejected = onRejected;
|
|
80
|
-
this.callRejected = this.otherCallRejected;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
QueueItem.prototype.callFulfilled = function(value) {
|
|
84
|
-
handlers.resolve(this.promise, value);
|
|
85
|
-
};
|
|
86
|
-
QueueItem.prototype.otherCallFulfilled = function(value) {
|
|
87
|
-
unwrap(this.promise, this.onFulfilled, value);
|
|
88
|
-
};
|
|
89
|
-
QueueItem.prototype.callRejected = function(value) {
|
|
90
|
-
handlers.reject(this.promise, value);
|
|
91
|
-
};
|
|
92
|
-
QueueItem.prototype.otherCallRejected = function(value) {
|
|
93
|
-
unwrap(this.promise, this.onRejected, value);
|
|
94
|
-
};
|
|
95
|
-
function unwrap(promise, func, value) {
|
|
96
|
-
immediate(function() {
|
|
97
|
-
var returnValue;
|
|
98
|
-
try {
|
|
99
|
-
returnValue = func(value);
|
|
100
|
-
} catch (e) {
|
|
101
|
-
return handlers.reject(promise, e);
|
|
102
|
-
}
|
|
103
|
-
if (returnValue === promise) {
|
|
104
|
-
handlers.reject(promise, new TypeError("Cannot resolve promise with itself"));
|
|
105
|
-
} else {
|
|
106
|
-
handlers.resolve(promise, returnValue);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
handlers.resolve = function(self, value) {
|
|
111
|
-
var result = tryCatch(getThen, value);
|
|
112
|
-
if (result.status === "error") {
|
|
113
|
-
return handlers.reject(self, result.value);
|
|
114
|
-
}
|
|
115
|
-
var thenable = result.value;
|
|
116
|
-
if (thenable) {
|
|
117
|
-
safelyResolveThenable(self, thenable);
|
|
118
|
-
} else {
|
|
119
|
-
self.state = FULFILLED;
|
|
120
|
-
self.outcome = value;
|
|
121
|
-
var i = -1;
|
|
122
|
-
var len = self.queue.length;
|
|
123
|
-
while (++i < len) {
|
|
124
|
-
self.queue[i].callFulfilled(value);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return self;
|
|
128
|
-
};
|
|
129
|
-
handlers.reject = function(self, error) {
|
|
130
|
-
self.state = REJECTED;
|
|
131
|
-
self.outcome = error;
|
|
132
|
-
if (!process.browser) {
|
|
133
|
-
if (self.handled === UNHANDLED) {
|
|
134
|
-
immediate(function() {
|
|
135
|
-
if (self.handled === UNHANDLED) {
|
|
136
|
-
process.emit("unhandledRejection", error, self);
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
var i = -1;
|
|
142
|
-
var len = self.queue.length;
|
|
143
|
-
while (++i < len) {
|
|
144
|
-
self.queue[i].callRejected(error);
|
|
145
|
-
}
|
|
146
|
-
return self;
|
|
147
|
-
};
|
|
148
|
-
function getThen(obj) {
|
|
149
|
-
var then = obj && obj.then;
|
|
150
|
-
if (obj && (typeof obj === "object" || typeof obj === "function") && typeof then === "function") {
|
|
151
|
-
return function appyThen() {
|
|
152
|
-
then.apply(obj, arguments);
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function safelyResolveThenable(self, thenable) {
|
|
157
|
-
var called = false;
|
|
158
|
-
function onError(value) {
|
|
159
|
-
if (called) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
called = true;
|
|
163
|
-
handlers.reject(self, value);
|
|
164
|
-
}
|
|
165
|
-
function onSuccess(value) {
|
|
166
|
-
if (called) {
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
called = true;
|
|
170
|
-
handlers.resolve(self, value);
|
|
171
|
-
}
|
|
172
|
-
function tryToUnwrap() {
|
|
173
|
-
thenable(onSuccess, onError);
|
|
174
|
-
}
|
|
175
|
-
var result = tryCatch(tryToUnwrap);
|
|
176
|
-
if (result.status === "error") {
|
|
177
|
-
onError(result.value);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
function tryCatch(func, value) {
|
|
181
|
-
var out = {};
|
|
182
|
-
try {
|
|
183
|
-
out.value = func(value);
|
|
184
|
-
out.status = "success";
|
|
185
|
-
} catch (e) {
|
|
186
|
-
out.status = "error";
|
|
187
|
-
out.value = e;
|
|
188
|
-
}
|
|
189
|
-
return out;
|
|
190
|
-
}
|
|
191
|
-
Promise2.resolve = resolve;
|
|
192
|
-
function resolve(value) {
|
|
193
|
-
if (value instanceof this) {
|
|
194
|
-
return value;
|
|
195
|
-
}
|
|
196
|
-
return handlers.resolve(new this(INTERNAL), value);
|
|
197
|
-
}
|
|
198
|
-
Promise2.reject = reject;
|
|
199
|
-
function reject(reason) {
|
|
200
|
-
var promise = new this(INTERNAL);
|
|
201
|
-
return handlers.reject(promise, reason);
|
|
202
|
-
}
|
|
203
|
-
Promise2.all = all;
|
|
204
|
-
function all(iterable) {
|
|
205
|
-
var self = this;
|
|
206
|
-
if (Object.prototype.toString.call(iterable) !== "[object Array]") {
|
|
207
|
-
return this.reject(new TypeError("must be an array"));
|
|
208
|
-
}
|
|
209
|
-
var len = iterable.length;
|
|
210
|
-
var called = false;
|
|
211
|
-
if (!len) {
|
|
212
|
-
return this.resolve([]);
|
|
213
|
-
}
|
|
214
|
-
var values = new Array(len);
|
|
215
|
-
var resolved = 0;
|
|
216
|
-
var i = -1;
|
|
217
|
-
var promise = new this(INTERNAL);
|
|
218
|
-
while (++i < len) {
|
|
219
|
-
allResolver(iterable[i], i);
|
|
220
|
-
}
|
|
221
|
-
return promise;
|
|
222
|
-
function allResolver(value, i2) {
|
|
223
|
-
self.resolve(value).then(resolveFromAll, function(error) {
|
|
224
|
-
if (!called) {
|
|
225
|
-
called = true;
|
|
226
|
-
handlers.reject(promise, error);
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
function resolveFromAll(outValue) {
|
|
230
|
-
values[i2] = outValue;
|
|
231
|
-
if (++resolved === len && !called) {
|
|
232
|
-
called = true;
|
|
233
|
-
handlers.resolve(promise, values);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
Promise2.race = race;
|
|
239
|
-
function race(iterable) {
|
|
240
|
-
var self = this;
|
|
241
|
-
if (Object.prototype.toString.call(iterable) !== "[object Array]") {
|
|
242
|
-
return this.reject(new TypeError("must be an array"));
|
|
243
|
-
}
|
|
244
|
-
var len = iterable.length;
|
|
245
|
-
var called = false;
|
|
246
|
-
if (!len) {
|
|
247
|
-
return this.resolve([]);
|
|
248
|
-
}
|
|
249
|
-
var i = -1;
|
|
250
|
-
var promise = new this(INTERNAL);
|
|
251
|
-
while (++i < len) {
|
|
252
|
-
resolver(iterable[i]);
|
|
253
|
-
}
|
|
254
|
-
return promise;
|
|
255
|
-
function resolver(value) {
|
|
256
|
-
self.resolve(value).then(function(response) {
|
|
257
|
-
if (!called) {
|
|
258
|
-
called = true;
|
|
259
|
-
handlers.resolve(promise, response);
|
|
260
|
-
}
|
|
261
|
-
}, function(error) {
|
|
262
|
-
if (!called) {
|
|
263
|
-
called = true;
|
|
264
|
-
handlers.reject(promise, error);
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
return lib;
|
|
270
|
-
}
|
|
271
|
-
export {
|
|
272
|
-
requireLib as r
|
|
273
|
-
};
|
|
1
|
+
import{r as S}from"./immediate.mjs";var w,q;function G(){if(q)return w;q=1;var m=S();function l(){}var i={},j=["REJECTED"],p=["FULFILLED"],E=["PENDING"];if(!process.browser)var v=["UNHANDLED"];w=c;function c(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=E,this.queue=[],this.outcome=void 0,process.browser||(this.handled=v),e!==l&&R(this,e)}c.prototype.finally=function(e){if(typeof e!="function")return this;var r=this.constructor;return this.then(t,n);function t(o){function u(){return o}return r.resolve(e()).then(u)}function n(o){function u(){throw o}return r.resolve(e()).then(u)}},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,r){if(typeof e!="function"&&this.state===p||typeof r!="function"&&this.state===j)return this;var t=new this.constructor(l);if(process.browser||this.handled===v&&(this.handled=null),this.state!==E){var n=this.state===p?e:r;y(t,n,this.outcome)}else this.queue.push(new f(t,e,r));return t};function f(e,r,t){this.promise=e,typeof r=="function"&&(this.onFulfilled=r,this.callFulfilled=this.otherCallFulfilled),typeof t=="function"&&(this.onRejected=t,this.callRejected=this.otherCallRejected)}f.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},f.prototype.otherCallFulfilled=function(e){y(this.promise,this.onFulfilled,e)},f.prototype.callRejected=function(e){i.reject(this.promise,e)},f.prototype.otherCallRejected=function(e){y(this.promise,this.onRejected,e)};function y(e,r,t){m(function(){var n;try{n=r(t)}catch(o){return i.reject(e,o)}n===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,n)})}i.resolve=function(e,r){var t=T(F,r);if(t.status==="error")return i.reject(e,t.value);var n=t.value;if(n)R(e,n);else{e.state=p,e.outcome=r;for(var o=-1,u=e.queue.length;++o<u;)e.queue[o].callFulfilled(r)}return e},i.reject=function(e,r){e.state=j,e.outcome=r,process.browser||e.handled===v&&m(function(){e.handled===v&&process.emit("unhandledRejection",r,e)});for(var t=-1,n=e.queue.length;++t<n;)e.queue[t].callRejected(r);return e};function F(e){var r=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof r=="function")return function(){r.apply(e,arguments)}}function R(e,r){var t=!1;function n(s){t||(t=!0,i.reject(e,s))}function o(s){t||(t=!0,i.resolve(e,s))}function u(){r(o,n)}var a=T(u);a.status==="error"&&n(a.value)}function T(e,r){var t={};try{t.value=e(r),t.status="success"}catch(n){t.status="error",t.value=n}return t}c.resolve=g;function g(e){return e instanceof this?e:i.resolve(new this(l),e)}c.reject=C;function C(e){var r=new this(l);return i.reject(r,e)}c.all=L;function L(e){var r=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var t=e.length,n=!1;if(!t)return this.resolve([]);for(var o=new Array(t),u=0,a=-1,s=new this(l);++a<t;)h(e[a],a);return s;function h(I,A){r.resolve(I).then(P,function(d){n||(n=!0,i.reject(s,d))});function P(d){o[A]=d,++u===t&&!n&&(n=!0,i.resolve(s,o))}}}c.race=b;function b(e){var r=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var t=e.length,n=!1;if(!t)return this.resolve([]);for(var o=-1,u=new this(l);++o<t;)a(e[o]);return u;function a(s){r.resolve(s).then(function(h){n||(n=!0,i.resolve(u,h))},function(h){n||(n=!0,i.reject(u,h))})}}return w}export{G as r};
|