@steedos/webapp 3.0.0 → 3.0.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1600,10 +1600,10 @@
|
|
|
1600
1600
|
var SHARED = "__core-js_shared__";
|
|
1601
1601
|
var store2 = sharedStore.exports = globalThis2[SHARED] || defineGlobalProperty2(SHARED, {});
|
|
1602
1602
|
(store2.versions || (store2.versions = [])).push({
|
|
1603
|
-
version: "3.
|
|
1603
|
+
version: "3.47.0",
|
|
1604
1604
|
mode: IS_PURE ? "pure" : "global",
|
|
1605
1605
|
copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",
|
|
1606
|
-
license: "https://github.com/zloirock/core-js/blob/v3.
|
|
1606
|
+
license: "https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",
|
|
1607
1607
|
source: "https://github.com/zloirock/core-js"
|
|
1608
1608
|
});
|
|
1609
1609
|
return sharedStore.exports;
|
|
@@ -3285,39 +3285,89 @@
|
|
|
3285
3285
|
});
|
|
3286
3286
|
return functionApply;
|
|
3287
3287
|
}
|
|
3288
|
-
var
|
|
3289
|
-
var
|
|
3290
|
-
function
|
|
3291
|
-
if (
|
|
3292
|
-
|
|
3288
|
+
var isRawJson;
|
|
3289
|
+
var hasRequiredIsRawJson;
|
|
3290
|
+
function requireIsRawJson() {
|
|
3291
|
+
if (hasRequiredIsRawJson) return isRawJson;
|
|
3292
|
+
hasRequiredIsRawJson = 1;
|
|
3293
|
+
var isObject2 = requireIsObject();
|
|
3294
|
+
var getInternalState = requireInternalState().get;
|
|
3295
|
+
isRawJson = function isRawJSON(O) {
|
|
3296
|
+
if (!isObject2(O)) return false;
|
|
3297
|
+
var state = getInternalState(O);
|
|
3298
|
+
return !!state && state.type === "RawJSON";
|
|
3299
|
+
};
|
|
3300
|
+
return isRawJson;
|
|
3301
|
+
}
|
|
3302
|
+
var parseJsonString;
|
|
3303
|
+
var hasRequiredParseJsonString;
|
|
3304
|
+
function requireParseJsonString() {
|
|
3305
|
+
if (hasRequiredParseJsonString) return parseJsonString;
|
|
3306
|
+
hasRequiredParseJsonString = 1;
|
|
3293
3307
|
var uncurryThis = requireFunctionUncurryThis();
|
|
3294
|
-
var
|
|
3295
|
-
var
|
|
3296
|
-
var
|
|
3297
|
-
var
|
|
3298
|
-
var
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3308
|
+
var hasOwn = requireHasOwnProperty();
|
|
3309
|
+
var $SyntaxError = SyntaxError;
|
|
3310
|
+
var $parseInt = parseInt;
|
|
3311
|
+
var fromCharCode = String.fromCharCode;
|
|
3312
|
+
var at2 = uncurryThis("".charAt);
|
|
3313
|
+
var slice2 = uncurryThis("".slice);
|
|
3314
|
+
var exec = uncurryThis(/./.exec);
|
|
3315
|
+
var codePoints = {
|
|
3316
|
+
'\\"': '"',
|
|
3317
|
+
"\\\\": "\\",
|
|
3318
|
+
"\\/": "/",
|
|
3319
|
+
"\\b": "\b",
|
|
3320
|
+
"\\f": "\f",
|
|
3321
|
+
"\\n": "\n",
|
|
3322
|
+
"\\r": "\r",
|
|
3323
|
+
"\\t": " "
|
|
3324
|
+
};
|
|
3325
|
+
var IS_4_HEX_DIGITS = /^[\da-f]{4}$/i;
|
|
3326
|
+
var IS_C0_CONTROL_CODE = /^[\u0000-\u001F]$/;
|
|
3327
|
+
parseJsonString = function(source, i) {
|
|
3328
|
+
var unterminated = true;
|
|
3329
|
+
var value2 = "";
|
|
3330
|
+
while (i < source.length) {
|
|
3331
|
+
var chr = at2(source, i);
|
|
3332
|
+
if (chr === "\\") {
|
|
3333
|
+
var twoChars = slice2(source, i, i + 2);
|
|
3334
|
+
if (hasOwn(codePoints, twoChars)) {
|
|
3335
|
+
value2 += codePoints[twoChars];
|
|
3336
|
+
i += 2;
|
|
3337
|
+
} else if (twoChars === "\\u") {
|
|
3338
|
+
i += 2;
|
|
3339
|
+
var fourHexDigits = slice2(source, i, i + 4);
|
|
3340
|
+
if (!exec(IS_4_HEX_DIGITS, fourHexDigits)) throw new $SyntaxError("Bad Unicode escape at: " + i);
|
|
3341
|
+
value2 += fromCharCode($parseInt(fourHexDigits, 16));
|
|
3342
|
+
i += 4;
|
|
3343
|
+
} else throw new $SyntaxError('Unknown escape sequence: "' + twoChars + '"');
|
|
3344
|
+
} else if (chr === '"') {
|
|
3345
|
+
unterminated = false;
|
|
3346
|
+
i++;
|
|
3347
|
+
break;
|
|
3348
|
+
} else {
|
|
3349
|
+
if (exec(IS_C0_CONTROL_CODE, chr)) throw new $SyntaxError("Bad control character in string literal at: " + i);
|
|
3350
|
+
value2 += chr;
|
|
3351
|
+
i++;
|
|
3315
3352
|
}
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
};
|
|
3353
|
+
}
|
|
3354
|
+
if (unterminated) throw new $SyntaxError("Unterminated string at: " + i);
|
|
3355
|
+
return { value: value2, end: i };
|
|
3319
3356
|
};
|
|
3320
|
-
return
|
|
3357
|
+
return parseJsonString;
|
|
3358
|
+
}
|
|
3359
|
+
var nativeRawJson;
|
|
3360
|
+
var hasRequiredNativeRawJson;
|
|
3361
|
+
function requireNativeRawJson() {
|
|
3362
|
+
if (hasRequiredNativeRawJson) return nativeRawJson;
|
|
3363
|
+
hasRequiredNativeRawJson = 1;
|
|
3364
|
+
var fails2 = requireFails();
|
|
3365
|
+
nativeRawJson = !fails2(function() {
|
|
3366
|
+
var unsafeInt = "9007199254740993";
|
|
3367
|
+
var raw = JSON.rawJSON(unsafeInt);
|
|
3368
|
+
return !JSON.isRawJSON(raw) || JSON.stringify(raw) !== unsafeInt;
|
|
3369
|
+
});
|
|
3370
|
+
return nativeRawJson;
|
|
3321
3371
|
}
|
|
3322
3372
|
var hasRequiredEs_json_stringify;
|
|
3323
3373
|
function requireEs_json_stringify() {
|
|
@@ -3329,21 +3379,31 @@
|
|
|
3329
3379
|
var call = requireFunctionCall();
|
|
3330
3380
|
var uncurryThis = requireFunctionUncurryThis();
|
|
3331
3381
|
var fails2 = requireFails();
|
|
3382
|
+
var isArray2 = requireIsArray();
|
|
3332
3383
|
var isCallable2 = requireIsCallable();
|
|
3384
|
+
var isRawJSON = requireIsRawJson();
|
|
3333
3385
|
var isSymbol2 = requireIsSymbol();
|
|
3386
|
+
var classof2 = requireClassofRaw();
|
|
3387
|
+
var toString2 = requireToString();
|
|
3334
3388
|
var arraySlice2 = requireArraySlice();
|
|
3335
|
-
var
|
|
3389
|
+
var parseJSONString = requireParseJsonString();
|
|
3390
|
+
var uid2 = requireUid();
|
|
3336
3391
|
var NATIVE_SYMBOL = requireSymbolConstructorDetection();
|
|
3392
|
+
var NATIVE_RAW_JSON = requireNativeRawJson();
|
|
3337
3393
|
var $String = String;
|
|
3338
3394
|
var $stringify = getBuiltIn2("JSON", "stringify");
|
|
3339
3395
|
var exec = uncurryThis(/./.exec);
|
|
3340
3396
|
var charAt = uncurryThis("".charAt);
|
|
3341
3397
|
var charCodeAt = uncurryThis("".charCodeAt);
|
|
3342
3398
|
var replace2 = uncurryThis("".replace);
|
|
3399
|
+
var slice2 = uncurryThis("".slice);
|
|
3400
|
+
var push2 = uncurryThis([].push);
|
|
3343
3401
|
var numberToString = uncurryThis(1.1.toString);
|
|
3344
|
-
var
|
|
3345
|
-
var
|
|
3346
|
-
var
|
|
3402
|
+
var surrogates = /[\uD800-\uDFFF]/g;
|
|
3403
|
+
var lowSurrogates = /^[\uD800-\uDBFF]$/;
|
|
3404
|
+
var hiSurrogates = /^[\uDC00-\uDFFF]$/;
|
|
3405
|
+
var MARK = uid2();
|
|
3406
|
+
var MARK_LENGTH = MARK.length;
|
|
3347
3407
|
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails2(function() {
|
|
3348
3408
|
var symbol2 = getBuiltIn2("Symbol")("stringify detection");
|
|
3349
3409
|
return $stringify([symbol2]) !== "[null]" || $stringify({ a: symbol2 }) !== "{}" || $stringify(Object(symbol2)) !== "{}";
|
|
@@ -3351,7 +3411,7 @@
|
|
|
3351
3411
|
var ILL_FORMED_UNICODE = fails2(function() {
|
|
3352
3412
|
return $stringify("\uDF06\uD834") !== '"\\udf06\\ud834"' || $stringify("\uDEAD") !== '"\\udead"';
|
|
3353
3413
|
});
|
|
3354
|
-
var
|
|
3414
|
+
var stringifyWithProperSymbolsConversion = WRONG_SYMBOLS_CONVERSION ? function(it, replacer) {
|
|
3355
3415
|
var args = arraySlice2(arguments);
|
|
3356
3416
|
var $replacer = getReplacerFunction(replacer);
|
|
3357
3417
|
if (!isCallable2($replacer) && (it === void 0 || isSymbol2(it))) return;
|
|
@@ -3360,25 +3420,61 @@
|
|
|
3360
3420
|
if (!isSymbol2(value2)) return value2;
|
|
3361
3421
|
};
|
|
3362
3422
|
return apply($stringify, null, args);
|
|
3363
|
-
};
|
|
3364
|
-
var
|
|
3423
|
+
} : $stringify;
|
|
3424
|
+
var fixIllFormedJSON = function(match2, offset, string2) {
|
|
3365
3425
|
var prev = charAt(string2, offset - 1);
|
|
3366
3426
|
var next = charAt(string2, offset + 1);
|
|
3367
|
-
if (exec(
|
|
3427
|
+
if (exec(lowSurrogates, match2) && !exec(hiSurrogates, next) || exec(hiSurrogates, match2) && !exec(lowSurrogates, prev)) {
|
|
3368
3428
|
return "\\u" + numberToString(charCodeAt(match2, 0), 16);
|
|
3369
3429
|
}
|
|
3370
3430
|
return match2;
|
|
3371
3431
|
};
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3432
|
+
var getReplacerFunction = function(replacer) {
|
|
3433
|
+
if (isCallable2(replacer)) return replacer;
|
|
3434
|
+
if (!isArray2(replacer)) return;
|
|
3435
|
+
var rawLength = replacer.length;
|
|
3436
|
+
var keys2 = [];
|
|
3437
|
+
for (var i = 0; i < rawLength; i++) {
|
|
3438
|
+
var element2 = replacer[i];
|
|
3439
|
+
if (typeof element2 == "string") push2(keys2, element2);
|
|
3440
|
+
else if (typeof element2 == "number" || classof2(element2) === "Number" || classof2(element2) === "String") push2(keys2, toString2(element2));
|
|
3441
|
+
}
|
|
3442
|
+
var keysLength = keys2.length;
|
|
3443
|
+
var root2 = true;
|
|
3444
|
+
return function(key2, value2) {
|
|
3445
|
+
if (root2) {
|
|
3446
|
+
root2 = false;
|
|
3447
|
+
return value2;
|
|
3379
3448
|
}
|
|
3380
|
-
|
|
3381
|
-
|
|
3449
|
+
if (isArray2(this)) return value2;
|
|
3450
|
+
for (var j = 0; j < keysLength; j++) if (keys2[j] === key2) return value2;
|
|
3451
|
+
};
|
|
3452
|
+
};
|
|
3453
|
+
if ($stringify) $2({ target: "JSON", stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE || !NATIVE_RAW_JSON }, {
|
|
3454
|
+
stringify: function stringify2(text2, replacer, space2) {
|
|
3455
|
+
var replacerFunction = getReplacerFunction(replacer);
|
|
3456
|
+
var rawStrings = [];
|
|
3457
|
+
var json = stringifyWithProperSymbolsConversion(text2, function(key2, value2) {
|
|
3458
|
+
var v = isCallable2(replacerFunction) ? call(replacerFunction, this, $String(key2), value2) : value2;
|
|
3459
|
+
return !NATIVE_RAW_JSON && isRawJSON(v) ? MARK + (push2(rawStrings, v.rawJSON) - 1) : v;
|
|
3460
|
+
}, space2);
|
|
3461
|
+
if (typeof json != "string") return json;
|
|
3462
|
+
if (ILL_FORMED_UNICODE) json = replace2(json, surrogates, fixIllFormedJSON);
|
|
3463
|
+
if (NATIVE_RAW_JSON) return json;
|
|
3464
|
+
var result = "";
|
|
3465
|
+
var length = json.length;
|
|
3466
|
+
for (var i = 0; i < length; i++) {
|
|
3467
|
+
var chr = charAt(json, i);
|
|
3468
|
+
if (chr === '"') {
|
|
3469
|
+
var end = parseJSONString(json, ++i).end - 1;
|
|
3470
|
+
var string2 = slice2(json, i, end);
|
|
3471
|
+
result += slice2(string2, 0, MARK_LENGTH) === MARK ? rawStrings[slice2(string2, MARK_LENGTH)] : '"' + string2 + '"';
|
|
3472
|
+
i = end;
|
|
3473
|
+
} else result += chr;
|
|
3474
|
+
}
|
|
3475
|
+
return result;
|
|
3476
|
+
}
|
|
3477
|
+
});
|
|
3382
3478
|
return es_json_stringify;
|
|
3383
3479
|
}
|
|
3384
3480
|
var es_object_getOwnPropertySymbols = {};
|
|
@@ -6237,9 +6333,7 @@
|
|
|
6237
6333
|
new Set2()[name2](createSetLikeWithInfinitySize(-Infinity));
|
|
6238
6334
|
return false;
|
|
6239
6335
|
} catch (error) {
|
|
6240
|
-
var set2 = new Set2();
|
|
6241
|
-
set2.add(1);
|
|
6242
|
-
set2.add(2);
|
|
6336
|
+
var set2 = new Set2([1, 2]);
|
|
6243
6337
|
return callback(set2[name2](createSetLikeWithInfinitySize(Infinity)));
|
|
6244
6338
|
}
|
|
6245
6339
|
}
|
|
@@ -7589,7 +7683,7 @@
|
|
|
7589
7683
|
var state = getInternalParamsState(this);
|
|
7590
7684
|
validateArgumentsLength2(arguments.length, 2);
|
|
7591
7685
|
push2(state.entries, { key: $toString(name2), value: $toString(value2) });
|
|
7592
|
-
if (!DESCRIPTORS) this.
|
|
7686
|
+
if (!DESCRIPTORS) this.size++;
|
|
7593
7687
|
state.updateURL();
|
|
7594
7688
|
},
|
|
7595
7689
|
// `URLSearchParams.prototype.delete` method
|
|
@@ -8912,9 +9006,9 @@
|
|
|
8912
9006
|
var host = this.host;
|
|
8913
9007
|
return host === null ? "" : serializeHost(host);
|
|
8914
9008
|
},
|
|
8915
|
-
setHostname: function(
|
|
9009
|
+
setHostname: function(hostname) {
|
|
8916
9010
|
if (this.cannotBeABaseURL) return;
|
|
8917
|
-
this.parse(
|
|
9011
|
+
this.parse(hostname, HOSTNAME);
|
|
8918
9012
|
},
|
|
8919
9013
|
// https://url.spec.whatwg.org/#dom-url-port
|
|
8920
9014
|
getPort: function() {
|
|
@@ -12453,53 +12547,7 @@
|
|
|
12453
12547
|
});
|
|
12454
12548
|
return es_iterator_constructor;
|
|
12455
12549
|
}
|
|
12456
|
-
var
|
|
12457
|
-
var hasRequiredEs_iterator_dispose;
|
|
12458
|
-
function requireEs_iterator_dispose() {
|
|
12459
|
-
if (hasRequiredEs_iterator_dispose) return es_iterator_dispose;
|
|
12460
|
-
hasRequiredEs_iterator_dispose = 1;
|
|
12461
|
-
var call = requireFunctionCall();
|
|
12462
|
-
var defineBuiltIn2 = requireDefineBuiltIn();
|
|
12463
|
-
var getMethod2 = requireGetMethod();
|
|
12464
|
-
var hasOwn = requireHasOwnProperty();
|
|
12465
|
-
var wellKnownSymbol2 = requireWellKnownSymbol();
|
|
12466
|
-
var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
|
|
12467
|
-
var DISPOSE = wellKnownSymbol2("dispose");
|
|
12468
|
-
if (!hasOwn(IteratorPrototype, DISPOSE)) {
|
|
12469
|
-
defineBuiltIn2(IteratorPrototype, DISPOSE, function() {
|
|
12470
|
-
var $return = getMethod2(this, "return");
|
|
12471
|
-
if ($return) call($return, this);
|
|
12472
|
-
});
|
|
12473
|
-
}
|
|
12474
|
-
return es_iterator_dispose;
|
|
12475
|
-
}
|
|
12476
|
-
var es_iterator_drop = {};
|
|
12477
|
-
var notANan;
|
|
12478
|
-
var hasRequiredNotANan;
|
|
12479
|
-
function requireNotANan() {
|
|
12480
|
-
if (hasRequiredNotANan) return notANan;
|
|
12481
|
-
hasRequiredNotANan = 1;
|
|
12482
|
-
var $RangeError = RangeError;
|
|
12483
|
-
notANan = function(it) {
|
|
12484
|
-
if (it === it) return it;
|
|
12485
|
-
throw new $RangeError("NaN is not allowed");
|
|
12486
|
-
};
|
|
12487
|
-
return notANan;
|
|
12488
|
-
}
|
|
12489
|
-
var toPositiveInteger;
|
|
12490
|
-
var hasRequiredToPositiveInteger;
|
|
12491
|
-
function requireToPositiveInteger() {
|
|
12492
|
-
if (hasRequiredToPositiveInteger) return toPositiveInteger;
|
|
12493
|
-
hasRequiredToPositiveInteger = 1;
|
|
12494
|
-
var toIntegerOrInfinity2 = requireToIntegerOrInfinity();
|
|
12495
|
-
var $RangeError = RangeError;
|
|
12496
|
-
toPositiveInteger = function(it) {
|
|
12497
|
-
var result = toIntegerOrInfinity2(it);
|
|
12498
|
-
if (result < 0) throw new $RangeError("The argument can't be less than 0");
|
|
12499
|
-
return result;
|
|
12500
|
-
};
|
|
12501
|
-
return toPositiveInteger;
|
|
12502
|
-
}
|
|
12550
|
+
var es_iterator_concat = {};
|
|
12503
12551
|
var iteratorCloseAll;
|
|
12504
12552
|
var hasRequiredIteratorCloseAll;
|
|
12505
12553
|
function requireIteratorCloseAll() {
|
|
@@ -12602,6 +12650,109 @@
|
|
|
12602
12650
|
};
|
|
12603
12651
|
return iteratorCreateProxy;
|
|
12604
12652
|
}
|
|
12653
|
+
var hasRequiredEs_iterator_concat;
|
|
12654
|
+
function requireEs_iterator_concat() {
|
|
12655
|
+
if (hasRequiredEs_iterator_concat) return es_iterator_concat;
|
|
12656
|
+
hasRequiredEs_iterator_concat = 1;
|
|
12657
|
+
var $2 = require_export();
|
|
12658
|
+
var call = requireFunctionCall();
|
|
12659
|
+
var aCallable2 = requireACallable();
|
|
12660
|
+
var anObject2 = requireAnObject();
|
|
12661
|
+
var getIteratorMethod2 = requireGetIteratorMethod();
|
|
12662
|
+
var createIteratorProxy = requireIteratorCreateProxy();
|
|
12663
|
+
var $Array = Array;
|
|
12664
|
+
var IteratorProxy = createIteratorProxy(function() {
|
|
12665
|
+
while (true) {
|
|
12666
|
+
var iterator2 = this.iterator;
|
|
12667
|
+
if (!iterator2) {
|
|
12668
|
+
var iterableIndex = this.nextIterableIndex++;
|
|
12669
|
+
var iterables = this.iterables;
|
|
12670
|
+
if (iterableIndex >= iterables.length) {
|
|
12671
|
+
this.done = true;
|
|
12672
|
+
return;
|
|
12673
|
+
}
|
|
12674
|
+
var entry = iterables[iterableIndex];
|
|
12675
|
+
this.iterables[iterableIndex] = null;
|
|
12676
|
+
iterator2 = this.iterator = call(entry.method, entry.iterable);
|
|
12677
|
+
this.next = iterator2.next;
|
|
12678
|
+
}
|
|
12679
|
+
var result = anObject2(call(this.next, iterator2));
|
|
12680
|
+
if (result.done) {
|
|
12681
|
+
this.iterator = null;
|
|
12682
|
+
this.next = null;
|
|
12683
|
+
continue;
|
|
12684
|
+
}
|
|
12685
|
+
return result.value;
|
|
12686
|
+
}
|
|
12687
|
+
});
|
|
12688
|
+
$2({ target: "Iterator", stat: true }, {
|
|
12689
|
+
concat: function concat() {
|
|
12690
|
+
var length = arguments.length;
|
|
12691
|
+
var iterables = $Array(length);
|
|
12692
|
+
for (var index2 = 0; index2 < length; index2++) {
|
|
12693
|
+
var item = anObject2(arguments[index2]);
|
|
12694
|
+
iterables[index2] = {
|
|
12695
|
+
iterable: item,
|
|
12696
|
+
method: aCallable2(getIteratorMethod2(item))
|
|
12697
|
+
};
|
|
12698
|
+
}
|
|
12699
|
+
return new IteratorProxy({
|
|
12700
|
+
iterables,
|
|
12701
|
+
nextIterableIndex: 0,
|
|
12702
|
+
iterator: null,
|
|
12703
|
+
next: null
|
|
12704
|
+
});
|
|
12705
|
+
}
|
|
12706
|
+
});
|
|
12707
|
+
return es_iterator_concat;
|
|
12708
|
+
}
|
|
12709
|
+
var es_iterator_dispose = {};
|
|
12710
|
+
var hasRequiredEs_iterator_dispose;
|
|
12711
|
+
function requireEs_iterator_dispose() {
|
|
12712
|
+
if (hasRequiredEs_iterator_dispose) return es_iterator_dispose;
|
|
12713
|
+
hasRequiredEs_iterator_dispose = 1;
|
|
12714
|
+
var call = requireFunctionCall();
|
|
12715
|
+
var defineBuiltIn2 = requireDefineBuiltIn();
|
|
12716
|
+
var getMethod2 = requireGetMethod();
|
|
12717
|
+
var hasOwn = requireHasOwnProperty();
|
|
12718
|
+
var wellKnownSymbol2 = requireWellKnownSymbol();
|
|
12719
|
+
var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
|
|
12720
|
+
var DISPOSE = wellKnownSymbol2("dispose");
|
|
12721
|
+
if (!hasOwn(IteratorPrototype, DISPOSE)) {
|
|
12722
|
+
defineBuiltIn2(IteratorPrototype, DISPOSE, function() {
|
|
12723
|
+
var $return = getMethod2(this, "return");
|
|
12724
|
+
if ($return) call($return, this);
|
|
12725
|
+
});
|
|
12726
|
+
}
|
|
12727
|
+
return es_iterator_dispose;
|
|
12728
|
+
}
|
|
12729
|
+
var es_iterator_drop = {};
|
|
12730
|
+
var notANan;
|
|
12731
|
+
var hasRequiredNotANan;
|
|
12732
|
+
function requireNotANan() {
|
|
12733
|
+
if (hasRequiredNotANan) return notANan;
|
|
12734
|
+
hasRequiredNotANan = 1;
|
|
12735
|
+
var $RangeError = RangeError;
|
|
12736
|
+
notANan = function(it) {
|
|
12737
|
+
if (it === it) return it;
|
|
12738
|
+
throw new $RangeError("NaN is not allowed");
|
|
12739
|
+
};
|
|
12740
|
+
return notANan;
|
|
12741
|
+
}
|
|
12742
|
+
var toPositiveInteger;
|
|
12743
|
+
var hasRequiredToPositiveInteger;
|
|
12744
|
+
function requireToPositiveInteger() {
|
|
12745
|
+
if (hasRequiredToPositiveInteger) return toPositiveInteger;
|
|
12746
|
+
hasRequiredToPositiveInteger = 1;
|
|
12747
|
+
var toIntegerOrInfinity2 = requireToIntegerOrInfinity();
|
|
12748
|
+
var $RangeError = RangeError;
|
|
12749
|
+
toPositiveInteger = function(it) {
|
|
12750
|
+
var result = toIntegerOrInfinity2(it);
|
|
12751
|
+
if (result < 0) throw new $RangeError("The argument can't be less than 0");
|
|
12752
|
+
return result;
|
|
12753
|
+
};
|
|
12754
|
+
return toPositiveInteger;
|
|
12755
|
+
}
|
|
12605
12756
|
var iteratorHelperThrowsOnInvalidIterator;
|
|
12606
12757
|
var hasRequiredIteratorHelperThrowsOnInvalidIterator;
|
|
12607
12758
|
function requireIteratorHelperThrowsOnInvalidIterator() {
|
|
@@ -13129,6 +13280,295 @@
|
|
|
13129
13280
|
});
|
|
13130
13281
|
return es_iterator_toArray;
|
|
13131
13282
|
}
|
|
13283
|
+
var es_json_isRawJson = {};
|
|
13284
|
+
var hasRequiredEs_json_isRawJson;
|
|
13285
|
+
function requireEs_json_isRawJson() {
|
|
13286
|
+
if (hasRequiredEs_json_isRawJson) return es_json_isRawJson;
|
|
13287
|
+
hasRequiredEs_json_isRawJson = 1;
|
|
13288
|
+
var $2 = require_export();
|
|
13289
|
+
var NATIVE_RAW_JSON = requireNativeRawJson();
|
|
13290
|
+
var isRawJSON = requireIsRawJson();
|
|
13291
|
+
$2({ target: "JSON", stat: true, forced: !NATIVE_RAW_JSON }, {
|
|
13292
|
+
isRawJSON
|
|
13293
|
+
});
|
|
13294
|
+
return es_json_isRawJson;
|
|
13295
|
+
}
|
|
13296
|
+
var es_json_parse = {};
|
|
13297
|
+
var hasRequiredEs_json_parse;
|
|
13298
|
+
function requireEs_json_parse() {
|
|
13299
|
+
if (hasRequiredEs_json_parse) return es_json_parse;
|
|
13300
|
+
hasRequiredEs_json_parse = 1;
|
|
13301
|
+
var $2 = require_export();
|
|
13302
|
+
var DESCRIPTORS = requireDescriptors();
|
|
13303
|
+
var globalThis2 = requireGlobalThis();
|
|
13304
|
+
var getBuiltIn2 = requireGetBuiltIn();
|
|
13305
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
13306
|
+
var call = requireFunctionCall();
|
|
13307
|
+
var isCallable2 = requireIsCallable();
|
|
13308
|
+
var isObject2 = requireIsObject();
|
|
13309
|
+
var isArray2 = requireIsArray();
|
|
13310
|
+
var hasOwn = requireHasOwnProperty();
|
|
13311
|
+
var toString2 = requireToString();
|
|
13312
|
+
var lengthOfArrayLike2 = requireLengthOfArrayLike();
|
|
13313
|
+
var createProperty2 = requireCreateProperty();
|
|
13314
|
+
var fails2 = requireFails();
|
|
13315
|
+
var parseJSONString = requireParseJsonString();
|
|
13316
|
+
var NATIVE_SYMBOL = requireSymbolConstructorDetection();
|
|
13317
|
+
var JSON2 = globalThis2.JSON;
|
|
13318
|
+
var Number2 = globalThis2.Number;
|
|
13319
|
+
var SyntaxError2 = globalThis2.SyntaxError;
|
|
13320
|
+
var nativeParse = JSON2 && JSON2.parse;
|
|
13321
|
+
var enumerableOwnProperties = getBuiltIn2("Object", "keys");
|
|
13322
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
13323
|
+
var at2 = uncurryThis("".charAt);
|
|
13324
|
+
var slice2 = uncurryThis("".slice);
|
|
13325
|
+
var exec = uncurryThis(/./.exec);
|
|
13326
|
+
var push2 = uncurryThis([].push);
|
|
13327
|
+
var IS_DIGIT = /^\d$/;
|
|
13328
|
+
var IS_NON_ZERO_DIGIT = /^[1-9]$/;
|
|
13329
|
+
var IS_NUMBER_START = /^[\d-]$/;
|
|
13330
|
+
var IS_WHITESPACE = /^[\t\n\r ]$/;
|
|
13331
|
+
var PRIMITIVE2 = 0;
|
|
13332
|
+
var OBJECT2 = 1;
|
|
13333
|
+
var $parse = function(source, reviver) {
|
|
13334
|
+
source = toString2(source);
|
|
13335
|
+
var context = new Context2(source, 0);
|
|
13336
|
+
var root2 = context.parse();
|
|
13337
|
+
var value2 = root2.value;
|
|
13338
|
+
var endIndex = context.skip(IS_WHITESPACE, root2.end);
|
|
13339
|
+
if (endIndex < source.length) {
|
|
13340
|
+
throw new SyntaxError2('Unexpected extra character: "' + at2(source, endIndex) + '" after the parsed data at: ' + endIndex);
|
|
13341
|
+
}
|
|
13342
|
+
return isCallable2(reviver) ? internalize({ "": value2 }, "", reviver, root2) : value2;
|
|
13343
|
+
};
|
|
13344
|
+
var internalize = function(holder, name2, reviver, node2) {
|
|
13345
|
+
var val = holder[name2];
|
|
13346
|
+
var unmodified = node2 && val === node2.value;
|
|
13347
|
+
var context = unmodified && typeof node2.source == "string" ? { source: node2.source } : {};
|
|
13348
|
+
var elementRecordsLen, keys2, len, i, P;
|
|
13349
|
+
if (isObject2(val)) {
|
|
13350
|
+
var nodeIsArray = isArray2(val);
|
|
13351
|
+
var nodes = unmodified ? node2.nodes : nodeIsArray ? [] : {};
|
|
13352
|
+
if (nodeIsArray) {
|
|
13353
|
+
elementRecordsLen = nodes.length;
|
|
13354
|
+
len = lengthOfArrayLike2(val);
|
|
13355
|
+
for (i = 0; i < len; i++) {
|
|
13356
|
+
internalizeProperty(val, i, internalize(val, "" + i, reviver, i < elementRecordsLen ? nodes[i] : void 0));
|
|
13357
|
+
}
|
|
13358
|
+
} else {
|
|
13359
|
+
keys2 = enumerableOwnProperties(val);
|
|
13360
|
+
len = lengthOfArrayLike2(keys2);
|
|
13361
|
+
for (i = 0; i < len; i++) {
|
|
13362
|
+
P = keys2[i];
|
|
13363
|
+
internalizeProperty(val, P, internalize(val, P, reviver, hasOwn(nodes, P) ? nodes[P] : void 0));
|
|
13364
|
+
}
|
|
13365
|
+
}
|
|
13366
|
+
}
|
|
13367
|
+
return call(reviver, holder, name2, val, context);
|
|
13368
|
+
};
|
|
13369
|
+
var internalizeProperty = function(object2, key2, value2) {
|
|
13370
|
+
if (DESCRIPTORS) {
|
|
13371
|
+
var descriptor = getOwnPropertyDescriptor(object2, key2);
|
|
13372
|
+
if (descriptor && !descriptor.configurable) return;
|
|
13373
|
+
}
|
|
13374
|
+
if (value2 === void 0) delete object2[key2];
|
|
13375
|
+
else createProperty2(object2, key2, value2);
|
|
13376
|
+
};
|
|
13377
|
+
var Node = function(value2, end, source, nodes) {
|
|
13378
|
+
this.value = value2;
|
|
13379
|
+
this.end = end;
|
|
13380
|
+
this.source = source;
|
|
13381
|
+
this.nodes = nodes;
|
|
13382
|
+
};
|
|
13383
|
+
var Context2 = function(source, index2) {
|
|
13384
|
+
this.source = source;
|
|
13385
|
+
this.index = index2;
|
|
13386
|
+
};
|
|
13387
|
+
Context2.prototype = {
|
|
13388
|
+
fork: function(nextIndex) {
|
|
13389
|
+
return new Context2(this.source, nextIndex);
|
|
13390
|
+
},
|
|
13391
|
+
parse: function() {
|
|
13392
|
+
var source = this.source;
|
|
13393
|
+
var i = this.skip(IS_WHITESPACE, this.index);
|
|
13394
|
+
var fork = this.fork(i);
|
|
13395
|
+
var chr = at2(source, i);
|
|
13396
|
+
if (exec(IS_NUMBER_START, chr)) return fork.number();
|
|
13397
|
+
switch (chr) {
|
|
13398
|
+
case "{":
|
|
13399
|
+
return fork.object();
|
|
13400
|
+
case "[":
|
|
13401
|
+
return fork.array();
|
|
13402
|
+
case '"':
|
|
13403
|
+
return fork.string();
|
|
13404
|
+
case "t":
|
|
13405
|
+
return fork.keyword(true);
|
|
13406
|
+
case "f":
|
|
13407
|
+
return fork.keyword(false);
|
|
13408
|
+
case "n":
|
|
13409
|
+
return fork.keyword(null);
|
|
13410
|
+
}
|
|
13411
|
+
throw new SyntaxError2('Unexpected character: "' + chr + '" at: ' + i);
|
|
13412
|
+
},
|
|
13413
|
+
node: function(type, value2, start, end, nodes) {
|
|
13414
|
+
return new Node(value2, end, type ? null : slice2(this.source, start, end), nodes);
|
|
13415
|
+
},
|
|
13416
|
+
object: function() {
|
|
13417
|
+
var source = this.source;
|
|
13418
|
+
var i = this.index + 1;
|
|
13419
|
+
var expectKeypair = false;
|
|
13420
|
+
var object2 = {};
|
|
13421
|
+
var nodes = {};
|
|
13422
|
+
while (i < source.length) {
|
|
13423
|
+
i = this.until(['"', "}"], i);
|
|
13424
|
+
if (at2(source, i) === "}" && !expectKeypair) {
|
|
13425
|
+
i++;
|
|
13426
|
+
break;
|
|
13427
|
+
}
|
|
13428
|
+
var result = this.fork(i).string();
|
|
13429
|
+
var key2 = result.value;
|
|
13430
|
+
i = result.end;
|
|
13431
|
+
i = this.until([":"], i) + 1;
|
|
13432
|
+
i = this.skip(IS_WHITESPACE, i);
|
|
13433
|
+
result = this.fork(i).parse();
|
|
13434
|
+
createProperty2(nodes, key2, result);
|
|
13435
|
+
createProperty2(object2, key2, result.value);
|
|
13436
|
+
i = this.until([",", "}"], result.end);
|
|
13437
|
+
var chr = at2(source, i);
|
|
13438
|
+
if (chr === ",") {
|
|
13439
|
+
expectKeypair = true;
|
|
13440
|
+
i++;
|
|
13441
|
+
} else if (chr === "}") {
|
|
13442
|
+
i++;
|
|
13443
|
+
break;
|
|
13444
|
+
}
|
|
13445
|
+
}
|
|
13446
|
+
return this.node(OBJECT2, object2, this.index, i, nodes);
|
|
13447
|
+
},
|
|
13448
|
+
array: function() {
|
|
13449
|
+
var source = this.source;
|
|
13450
|
+
var i = this.index + 1;
|
|
13451
|
+
var expectElement = false;
|
|
13452
|
+
var array2 = [];
|
|
13453
|
+
var nodes = [];
|
|
13454
|
+
while (i < source.length) {
|
|
13455
|
+
i = this.skip(IS_WHITESPACE, i);
|
|
13456
|
+
if (at2(source, i) === "]" && !expectElement) {
|
|
13457
|
+
i++;
|
|
13458
|
+
break;
|
|
13459
|
+
}
|
|
13460
|
+
var result = this.fork(i).parse();
|
|
13461
|
+
push2(nodes, result);
|
|
13462
|
+
push2(array2, result.value);
|
|
13463
|
+
i = this.until([",", "]"], result.end);
|
|
13464
|
+
if (at2(source, i) === ",") {
|
|
13465
|
+
expectElement = true;
|
|
13466
|
+
i++;
|
|
13467
|
+
} else if (at2(source, i) === "]") {
|
|
13468
|
+
i++;
|
|
13469
|
+
break;
|
|
13470
|
+
}
|
|
13471
|
+
}
|
|
13472
|
+
return this.node(OBJECT2, array2, this.index, i, nodes);
|
|
13473
|
+
},
|
|
13474
|
+
string: function() {
|
|
13475
|
+
var index2 = this.index;
|
|
13476
|
+
var parsed = parseJSONString(this.source, this.index + 1);
|
|
13477
|
+
return this.node(PRIMITIVE2, parsed.value, index2, parsed.end);
|
|
13478
|
+
},
|
|
13479
|
+
number: function() {
|
|
13480
|
+
var source = this.source;
|
|
13481
|
+
var startIndex = this.index;
|
|
13482
|
+
var i = startIndex;
|
|
13483
|
+
if (at2(source, i) === "-") i++;
|
|
13484
|
+
if (at2(source, i) === "0") i++;
|
|
13485
|
+
else if (exec(IS_NON_ZERO_DIGIT, at2(source, i))) i = this.skip(IS_DIGIT, i + 1);
|
|
13486
|
+
else throw new SyntaxError2("Failed to parse number at: " + i);
|
|
13487
|
+
if (at2(source, i) === ".") i = this.skip(IS_DIGIT, i + 1);
|
|
13488
|
+
if (at2(source, i) === "e" || at2(source, i) === "E") {
|
|
13489
|
+
i++;
|
|
13490
|
+
if (at2(source, i) === "+" || at2(source, i) === "-") i++;
|
|
13491
|
+
var exponentStartIndex = i;
|
|
13492
|
+
i = this.skip(IS_DIGIT, i);
|
|
13493
|
+
if (exponentStartIndex === i) throw new SyntaxError2("Failed to parse number's exponent value at: " + i);
|
|
13494
|
+
}
|
|
13495
|
+
return this.node(PRIMITIVE2, Number2(slice2(source, startIndex, i)), startIndex, i);
|
|
13496
|
+
},
|
|
13497
|
+
keyword: function(value2) {
|
|
13498
|
+
var keyword = "" + value2;
|
|
13499
|
+
var index2 = this.index;
|
|
13500
|
+
var endIndex = index2 + keyword.length;
|
|
13501
|
+
if (slice2(this.source, index2, endIndex) !== keyword) throw new SyntaxError2("Failed to parse value at: " + index2);
|
|
13502
|
+
return this.node(PRIMITIVE2, value2, index2, endIndex);
|
|
13503
|
+
},
|
|
13504
|
+
skip: function(regex, i) {
|
|
13505
|
+
var source = this.source;
|
|
13506
|
+
for (; i < source.length; i++) if (!exec(regex, at2(source, i))) break;
|
|
13507
|
+
return i;
|
|
13508
|
+
},
|
|
13509
|
+
until: function(array2, i) {
|
|
13510
|
+
i = this.skip(IS_WHITESPACE, i);
|
|
13511
|
+
var chr = at2(this.source, i);
|
|
13512
|
+
for (var j = 0; j < array2.length; j++) if (array2[j] === chr) return i;
|
|
13513
|
+
throw new SyntaxError2('Unexpected character: "' + chr + '" at: ' + i);
|
|
13514
|
+
}
|
|
13515
|
+
};
|
|
13516
|
+
var NO_SOURCE_SUPPORT = fails2(function() {
|
|
13517
|
+
var unsafeInt = "9007199254740993";
|
|
13518
|
+
var source;
|
|
13519
|
+
nativeParse(unsafeInt, function(key2, value2, context) {
|
|
13520
|
+
source = context.source;
|
|
13521
|
+
});
|
|
13522
|
+
return source !== unsafeInt;
|
|
13523
|
+
});
|
|
13524
|
+
var PROPER_BASE_PARSE = NATIVE_SYMBOL && !fails2(function() {
|
|
13525
|
+
return 1 / nativeParse("-0 ") !== -Infinity;
|
|
13526
|
+
});
|
|
13527
|
+
$2({ target: "JSON", stat: true, forced: NO_SOURCE_SUPPORT }, {
|
|
13528
|
+
parse: function parse2(text2, reviver) {
|
|
13529
|
+
return PROPER_BASE_PARSE && !isCallable2(reviver) ? nativeParse(text2) : $parse(text2, reviver);
|
|
13530
|
+
}
|
|
13531
|
+
});
|
|
13532
|
+
return es_json_parse;
|
|
13533
|
+
}
|
|
13534
|
+
var es_json_rawJson = {};
|
|
13535
|
+
var hasRequiredEs_json_rawJson;
|
|
13536
|
+
function requireEs_json_rawJson() {
|
|
13537
|
+
if (hasRequiredEs_json_rawJson) return es_json_rawJson;
|
|
13538
|
+
hasRequiredEs_json_rawJson = 1;
|
|
13539
|
+
var $2 = require_export();
|
|
13540
|
+
var FREEZING = requireFreezing();
|
|
13541
|
+
var NATIVE_RAW_JSON = requireNativeRawJson();
|
|
13542
|
+
var getBuiltIn2 = requireGetBuiltIn();
|
|
13543
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
13544
|
+
var toString2 = requireToString();
|
|
13545
|
+
var createProperty2 = requireCreateProperty();
|
|
13546
|
+
var setInternalState = requireInternalState().set;
|
|
13547
|
+
var $SyntaxError = SyntaxError;
|
|
13548
|
+
var parse2 = getBuiltIn2("JSON", "parse");
|
|
13549
|
+
var create2 = getBuiltIn2("Object", "create");
|
|
13550
|
+
var freeze = getBuiltIn2("Object", "freeze");
|
|
13551
|
+
var at2 = uncurryThis("".charAt);
|
|
13552
|
+
var ERROR_MESSAGE = "Unacceptable as raw JSON";
|
|
13553
|
+
var isWhitespace = function(it) {
|
|
13554
|
+
return it === " " || it === " " || it === "\n" || it === "\r";
|
|
13555
|
+
};
|
|
13556
|
+
$2({ target: "JSON", stat: true, forced: !NATIVE_RAW_JSON }, {
|
|
13557
|
+
rawJSON: function rawJSON(text2) {
|
|
13558
|
+
var jsonString = toString2(text2);
|
|
13559
|
+
if (jsonString === "" || isWhitespace(at2(jsonString, 0)) || isWhitespace(at2(jsonString, jsonString.length - 1))) {
|
|
13560
|
+
throw new $SyntaxError(ERROR_MESSAGE);
|
|
13561
|
+
}
|
|
13562
|
+
var parsed = parse2(jsonString);
|
|
13563
|
+
if (typeof parsed == "object" && parsed !== null) throw new $SyntaxError(ERROR_MESSAGE);
|
|
13564
|
+
var obj = create2(null);
|
|
13565
|
+
setInternalState(obj, { type: "RawJSON" });
|
|
13566
|
+
createProperty2(obj, "rawJSON", jsonString);
|
|
13567
|
+
return FREEZING ? freeze(obj) : obj;
|
|
13568
|
+
}
|
|
13569
|
+
});
|
|
13570
|
+
return es_json_rawJson;
|
|
13571
|
+
}
|
|
13132
13572
|
var es_math_acosh = {};
|
|
13133
13573
|
var mathLog1p;
|
|
13134
13574
|
var hasRequiredMathLog1p;
|
|
@@ -17391,12 +17831,11 @@
|
|
|
17391
17831
|
var execCalled = false;
|
|
17392
17832
|
var re2 = /a/;
|
|
17393
17833
|
if (KEY === "split") {
|
|
17394
|
-
|
|
17395
|
-
|
|
17396
|
-
re2.constructor[SPECIES] = function() {
|
|
17834
|
+
var constructor = {};
|
|
17835
|
+
constructor[SPECIES] = function() {
|
|
17397
17836
|
return re2;
|
|
17398
17837
|
};
|
|
17399
|
-
re2
|
|
17838
|
+
re2 = { constructor, flags: "" };
|
|
17400
17839
|
re2[SYMBOL] = /./[SYMBOL];
|
|
17401
17840
|
}
|
|
17402
17841
|
re2.exec = function() {
|
|
@@ -21395,6 +21834,7 @@
|
|
|
21395
21834
|
requireEs_function_name();
|
|
21396
21835
|
requireEs_globalThis();
|
|
21397
21836
|
requireEs_iterator_constructor();
|
|
21837
|
+
requireEs_iterator_concat();
|
|
21398
21838
|
requireEs_iterator_dispose();
|
|
21399
21839
|
requireEs_iterator_drop();
|
|
21400
21840
|
requireEs_iterator_every();
|
|
@@ -21408,6 +21848,9 @@
|
|
|
21408
21848
|
requireEs_iterator_some();
|
|
21409
21849
|
requireEs_iterator_take();
|
|
21410
21850
|
requireEs_iterator_toArray();
|
|
21851
|
+
requireEs_json_isRawJson();
|
|
21852
|
+
requireEs_json_parse();
|
|
21853
|
+
requireEs_json_rawJson();
|
|
21411
21854
|
requireEs_json_stringify();
|
|
21412
21855
|
requireEs_json_toStringTag();
|
|
21413
21856
|
requireEs_map();
|
|
@@ -21646,6 +22089,10 @@
|
|
|
21646
22089
|
var clientExports = requireClient();
|
|
21647
22090
|
var reactExports = requireReact();
|
|
21648
22091
|
const React$1 = /* @__PURE__ */ getDefaultExportFromCjs(reactExports);
|
|
22092
|
+
const React4 = /* @__PURE__ */ _mergeNamespaces({
|
|
22093
|
+
__proto__: null,
|
|
22094
|
+
default: React$1
|
|
22095
|
+
}, [reactExports]);
|
|
21649
22096
|
function _typeof$6(o) {
|
|
21650
22097
|
"@babel/helpers - typeof";
|
|
21651
22098
|
return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
@@ -21713,7 +22160,7 @@
|
|
|
21713
22160
|
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString$1();
|
|
21714
22161
|
}
|
|
21715
22162
|
};
|
|
21716
|
-
function isPlainObject$
|
|
22163
|
+
function isPlainObject$5(obj) {
|
|
21717
22164
|
if (typeof obj !== "object" || obj === null) return false;
|
|
21718
22165
|
var proto = obj;
|
|
21719
22166
|
while (Object.getPrototypeOf(proto) !== null) {
|
|
@@ -21780,7 +22227,7 @@
|
|
|
21780
22227
|
};
|
|
21781
22228
|
}
|
|
21782
22229
|
function dispatch2(action) {
|
|
21783
|
-
if (!isPlainObject$
|
|
22230
|
+
if (!isPlainObject$5(action)) {
|
|
21784
22231
|
throw new Error(formatProdErrorMessage(7));
|
|
21785
22232
|
}
|
|
21786
22233
|
if (typeof action.type === "undefined") {
|
|
@@ -24146,19 +24593,23 @@
|
|
|
24146
24593
|
if (isIndexRoute(route)) {
|
|
24147
24594
|
let indexRoute = {
|
|
24148
24595
|
...route,
|
|
24149
|
-
...mapRouteProperties2(route),
|
|
24150
24596
|
id: id2
|
|
24151
24597
|
};
|
|
24152
|
-
manifest[id2] =
|
|
24598
|
+
manifest[id2] = mergeRouteUpdates(
|
|
24599
|
+
indexRoute,
|
|
24600
|
+
mapRouteProperties2(indexRoute)
|
|
24601
|
+
);
|
|
24153
24602
|
return indexRoute;
|
|
24154
24603
|
} else {
|
|
24155
24604
|
let pathOrLayoutRoute = {
|
|
24156
24605
|
...route,
|
|
24157
|
-
...mapRouteProperties2(route),
|
|
24158
24606
|
id: id2,
|
|
24159
24607
|
children: void 0
|
|
24160
24608
|
};
|
|
24161
|
-
manifest[id2] =
|
|
24609
|
+
manifest[id2] = mergeRouteUpdates(
|
|
24610
|
+
pathOrLayoutRoute,
|
|
24611
|
+
mapRouteProperties2(pathOrLayoutRoute)
|
|
24612
|
+
);
|
|
24162
24613
|
if (route.children) {
|
|
24163
24614
|
pathOrLayoutRoute.children = convertRoutesToDataRoutes(
|
|
24164
24615
|
route.children,
|
|
@@ -24172,6 +24623,17 @@
|
|
|
24172
24623
|
}
|
|
24173
24624
|
});
|
|
24174
24625
|
}
|
|
24626
|
+
function mergeRouteUpdates(route, updates) {
|
|
24627
|
+
return Object.assign(route, {
|
|
24628
|
+
...updates,
|
|
24629
|
+
...typeof updates.lazy === "object" && updates.lazy != null ? {
|
|
24630
|
+
lazy: {
|
|
24631
|
+
...route.lazy,
|
|
24632
|
+
...updates.lazy
|
|
24633
|
+
}
|
|
24634
|
+
} : {}
|
|
24635
|
+
});
|
|
24636
|
+
}
|
|
24175
24637
|
function matchRoutes(routes2, locationArg, basename2 = "/") {
|
|
24176
24638
|
return matchRoutesImpl(routes2, locationArg, basename2, false);
|
|
24177
24639
|
}
|
|
@@ -24459,13 +24921,36 @@
|
|
|
24459
24921
|
}) {
|
|
24460
24922
|
return pathname === "/" ? basename2 : joinPaths([basename2, pathname]);
|
|
24461
24923
|
}
|
|
24924
|
+
var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
24925
|
+
var isAbsoluteUrl = (url2) => ABSOLUTE_URL_REGEX.test(url2);
|
|
24462
24926
|
function resolvePath(to, fromPathname = "/") {
|
|
24463
24927
|
let {
|
|
24464
24928
|
pathname: toPathname,
|
|
24465
24929
|
search: search2 = "",
|
|
24466
24930
|
hash: hash2 = ""
|
|
24467
24931
|
} = typeof to === "string" ? parsePath$1(to) : to;
|
|
24468
|
-
let pathname
|
|
24932
|
+
let pathname;
|
|
24933
|
+
if (toPathname) {
|
|
24934
|
+
if (isAbsoluteUrl(toPathname)) {
|
|
24935
|
+
pathname = toPathname;
|
|
24936
|
+
} else {
|
|
24937
|
+
if (toPathname.includes("//")) {
|
|
24938
|
+
let oldPathname = toPathname;
|
|
24939
|
+
toPathname = toPathname.replace(/\/\/+/g, "/");
|
|
24940
|
+
warning(
|
|
24941
|
+
false,
|
|
24942
|
+
`Pathnames cannot have embedded double slashes - normalizing ${oldPathname} -> ${toPathname}`
|
|
24943
|
+
);
|
|
24944
|
+
}
|
|
24945
|
+
if (toPathname.startsWith("/")) {
|
|
24946
|
+
pathname = resolvePathname(toPathname.substring(1), "/");
|
|
24947
|
+
} else {
|
|
24948
|
+
pathname = resolvePathname(toPathname, fromPathname);
|
|
24949
|
+
}
|
|
24950
|
+
}
|
|
24951
|
+
} else {
|
|
24952
|
+
pathname = fromPathname;
|
|
24953
|
+
}
|
|
24469
24954
|
return {
|
|
24470
24955
|
pathname,
|
|
24471
24956
|
search: normalizeSearch(search2),
|
|
@@ -24575,6 +25060,247 @@
|
|
|
24575
25060
|
function isRouteErrorResponse(error) {
|
|
24576
25061
|
return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
|
|
24577
25062
|
}
|
|
25063
|
+
function getRoutePattern(matches) {
|
|
25064
|
+
return matches.map((m) => m.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
|
|
25065
|
+
}
|
|
25066
|
+
var UninstrumentedSymbol = Symbol("Uninstrumented");
|
|
25067
|
+
function getRouteInstrumentationUpdates(fns, route) {
|
|
25068
|
+
let aggregated = {
|
|
25069
|
+
lazy: [],
|
|
25070
|
+
"lazy.loader": [],
|
|
25071
|
+
"lazy.action": [],
|
|
25072
|
+
"lazy.middleware": [],
|
|
25073
|
+
middleware: [],
|
|
25074
|
+
loader: [],
|
|
25075
|
+
action: []
|
|
25076
|
+
};
|
|
25077
|
+
fns.forEach(
|
|
25078
|
+
(fn) => fn({
|
|
25079
|
+
id: route.id,
|
|
25080
|
+
index: route.index,
|
|
25081
|
+
path: route.path,
|
|
25082
|
+
instrument(i) {
|
|
25083
|
+
let keys2 = Object.keys(aggregated);
|
|
25084
|
+
for (let key2 of keys2) {
|
|
25085
|
+
if (i[key2]) {
|
|
25086
|
+
aggregated[key2].push(i[key2]);
|
|
25087
|
+
}
|
|
25088
|
+
}
|
|
25089
|
+
}
|
|
25090
|
+
})
|
|
25091
|
+
);
|
|
25092
|
+
let updates = {};
|
|
25093
|
+
if (typeof route.lazy === "function" && aggregated.lazy.length > 0) {
|
|
25094
|
+
let instrumented = wrapImpl(aggregated.lazy, route.lazy, () => void 0);
|
|
25095
|
+
if (instrumented) {
|
|
25096
|
+
updates.lazy = instrumented;
|
|
25097
|
+
}
|
|
25098
|
+
}
|
|
25099
|
+
if (typeof route.lazy === "object") {
|
|
25100
|
+
let lazyObject = route.lazy;
|
|
25101
|
+
["middleware", "loader", "action"].forEach((key2) => {
|
|
25102
|
+
let lazyFn = lazyObject[key2];
|
|
25103
|
+
let instrumentations = aggregated[`lazy.${key2}`];
|
|
25104
|
+
if (typeof lazyFn === "function" && instrumentations.length > 0) {
|
|
25105
|
+
let instrumented = wrapImpl(instrumentations, lazyFn, () => void 0);
|
|
25106
|
+
if (instrumented) {
|
|
25107
|
+
updates.lazy = Object.assign(updates.lazy || {}, {
|
|
25108
|
+
[key2]: instrumented
|
|
25109
|
+
});
|
|
25110
|
+
}
|
|
25111
|
+
}
|
|
25112
|
+
});
|
|
25113
|
+
}
|
|
25114
|
+
["loader", "action"].forEach((key2) => {
|
|
25115
|
+
let handler = route[key2];
|
|
25116
|
+
if (typeof handler === "function" && aggregated[key2].length > 0) {
|
|
25117
|
+
let original = handler[UninstrumentedSymbol] ?? handler;
|
|
25118
|
+
let instrumented = wrapImpl(
|
|
25119
|
+
aggregated[key2],
|
|
25120
|
+
original,
|
|
25121
|
+
(...args) => getHandlerInfo(args[0])
|
|
25122
|
+
);
|
|
25123
|
+
if (instrumented) {
|
|
25124
|
+
instrumented[UninstrumentedSymbol] = original;
|
|
25125
|
+
updates[key2] = instrumented;
|
|
25126
|
+
}
|
|
25127
|
+
}
|
|
25128
|
+
});
|
|
25129
|
+
if (route.middleware && route.middleware.length > 0 && aggregated.middleware.length > 0) {
|
|
25130
|
+
updates.middleware = route.middleware.map((middleware) => {
|
|
25131
|
+
let original = middleware[UninstrumentedSymbol] ?? middleware;
|
|
25132
|
+
let instrumented = wrapImpl(
|
|
25133
|
+
aggregated.middleware,
|
|
25134
|
+
original,
|
|
25135
|
+
(...args) => getHandlerInfo(args[0])
|
|
25136
|
+
);
|
|
25137
|
+
if (instrumented) {
|
|
25138
|
+
instrumented[UninstrumentedSymbol] = original;
|
|
25139
|
+
return instrumented;
|
|
25140
|
+
}
|
|
25141
|
+
return middleware;
|
|
25142
|
+
});
|
|
25143
|
+
}
|
|
25144
|
+
return updates;
|
|
25145
|
+
}
|
|
25146
|
+
function instrumentClientSideRouter(router, fns) {
|
|
25147
|
+
let aggregated = {
|
|
25148
|
+
navigate: [],
|
|
25149
|
+
fetch: []
|
|
25150
|
+
};
|
|
25151
|
+
fns.forEach(
|
|
25152
|
+
(fn) => fn({
|
|
25153
|
+
instrument(i) {
|
|
25154
|
+
let keys2 = Object.keys(i);
|
|
25155
|
+
for (let key2 of keys2) {
|
|
25156
|
+
if (i[key2]) {
|
|
25157
|
+
aggregated[key2].push(i[key2]);
|
|
25158
|
+
}
|
|
25159
|
+
}
|
|
25160
|
+
}
|
|
25161
|
+
})
|
|
25162
|
+
);
|
|
25163
|
+
if (aggregated.navigate.length > 0) {
|
|
25164
|
+
let navigate = router.navigate[UninstrumentedSymbol] ?? router.navigate;
|
|
25165
|
+
let instrumentedNavigate = wrapImpl(
|
|
25166
|
+
aggregated.navigate,
|
|
25167
|
+
navigate,
|
|
25168
|
+
(...args) => {
|
|
25169
|
+
let [to, opts] = args;
|
|
25170
|
+
return {
|
|
25171
|
+
to: typeof to === "number" || typeof to === "string" ? to : to ? createPath$1(to) : ".",
|
|
25172
|
+
...getRouterInfo(router, opts ?? {})
|
|
25173
|
+
};
|
|
25174
|
+
}
|
|
25175
|
+
);
|
|
25176
|
+
if (instrumentedNavigate) {
|
|
25177
|
+
instrumentedNavigate[UninstrumentedSymbol] = navigate;
|
|
25178
|
+
router.navigate = instrumentedNavigate;
|
|
25179
|
+
}
|
|
25180
|
+
}
|
|
25181
|
+
if (aggregated.fetch.length > 0) {
|
|
25182
|
+
let fetch2 = router.fetch[UninstrumentedSymbol] ?? router.fetch;
|
|
25183
|
+
let instrumentedFetch = wrapImpl(aggregated.fetch, fetch2, (...args) => {
|
|
25184
|
+
let [key2, , href, opts] = args;
|
|
25185
|
+
return {
|
|
25186
|
+
href: href ?? ".",
|
|
25187
|
+
fetcherKey: key2,
|
|
25188
|
+
...getRouterInfo(router, opts ?? {})
|
|
25189
|
+
};
|
|
25190
|
+
});
|
|
25191
|
+
if (instrumentedFetch) {
|
|
25192
|
+
instrumentedFetch[UninstrumentedSymbol] = fetch2;
|
|
25193
|
+
router.fetch = instrumentedFetch;
|
|
25194
|
+
}
|
|
25195
|
+
}
|
|
25196
|
+
return router;
|
|
25197
|
+
}
|
|
25198
|
+
function wrapImpl(impls, handler, getInfo) {
|
|
25199
|
+
if (impls.length === 0) {
|
|
25200
|
+
return null;
|
|
25201
|
+
}
|
|
25202
|
+
return async (...args) => {
|
|
25203
|
+
let result = await recurseRight(
|
|
25204
|
+
impls,
|
|
25205
|
+
getInfo(...args),
|
|
25206
|
+
() => handler(...args),
|
|
25207
|
+
impls.length - 1
|
|
25208
|
+
);
|
|
25209
|
+
if (result.type === "error") {
|
|
25210
|
+
throw result.value;
|
|
25211
|
+
}
|
|
25212
|
+
return result.value;
|
|
25213
|
+
};
|
|
25214
|
+
}
|
|
25215
|
+
async function recurseRight(impls, info, handler, index2) {
|
|
25216
|
+
let impl = impls[index2];
|
|
25217
|
+
let result;
|
|
25218
|
+
if (!impl) {
|
|
25219
|
+
try {
|
|
25220
|
+
let value2 = await handler();
|
|
25221
|
+
result = { type: "success", value: value2 };
|
|
25222
|
+
} catch (e) {
|
|
25223
|
+
result = { type: "error", value: e };
|
|
25224
|
+
}
|
|
25225
|
+
} else {
|
|
25226
|
+
let handlerPromise = void 0;
|
|
25227
|
+
let callHandler = async () => {
|
|
25228
|
+
if (handlerPromise) {
|
|
25229
|
+
console.error("You cannot call instrumented handlers more than once");
|
|
25230
|
+
} else {
|
|
25231
|
+
handlerPromise = recurseRight(impls, info, handler, index2 - 1);
|
|
25232
|
+
}
|
|
25233
|
+
result = await handlerPromise;
|
|
25234
|
+
invariant$1(result, "Expected a result");
|
|
25235
|
+
if (result.type === "error" && result.value instanceof Error) {
|
|
25236
|
+
return { status: "error", error: result.value };
|
|
25237
|
+
}
|
|
25238
|
+
return { status: "success", error: void 0 };
|
|
25239
|
+
};
|
|
25240
|
+
try {
|
|
25241
|
+
await impl(callHandler, info);
|
|
25242
|
+
} catch (e) {
|
|
25243
|
+
console.error("An instrumentation function threw an error:", e);
|
|
25244
|
+
}
|
|
25245
|
+
if (!handlerPromise) {
|
|
25246
|
+
await callHandler();
|
|
25247
|
+
}
|
|
25248
|
+
await handlerPromise;
|
|
25249
|
+
}
|
|
25250
|
+
if (result) {
|
|
25251
|
+
return result;
|
|
25252
|
+
}
|
|
25253
|
+
return {
|
|
25254
|
+
type: "error",
|
|
25255
|
+
value: new Error("No result assigned in instrumentation chain.")
|
|
25256
|
+
};
|
|
25257
|
+
}
|
|
25258
|
+
function getHandlerInfo(args) {
|
|
25259
|
+
let { request: request2, context, params, unstable_pattern } = args;
|
|
25260
|
+
return {
|
|
25261
|
+
request: getReadonlyRequest(request2),
|
|
25262
|
+
params: { ...params },
|
|
25263
|
+
unstable_pattern,
|
|
25264
|
+
context: getReadonlyContext(context)
|
|
25265
|
+
};
|
|
25266
|
+
}
|
|
25267
|
+
function getRouterInfo(router, opts) {
|
|
25268
|
+
return {
|
|
25269
|
+
currentUrl: createPath$1(router.state.location),
|
|
25270
|
+
..."formMethod" in opts ? { formMethod: opts.formMethod } : {},
|
|
25271
|
+
..."formEncType" in opts ? { formEncType: opts.formEncType } : {},
|
|
25272
|
+
..."formData" in opts ? { formData: opts.formData } : {},
|
|
25273
|
+
..."body" in opts ? { body: opts.body } : {}
|
|
25274
|
+
};
|
|
25275
|
+
}
|
|
25276
|
+
function getReadonlyRequest(request2) {
|
|
25277
|
+
return {
|
|
25278
|
+
method: request2.method,
|
|
25279
|
+
url: request2.url,
|
|
25280
|
+
headers: {
|
|
25281
|
+
get: (...args) => request2.headers.get(...args)
|
|
25282
|
+
}
|
|
25283
|
+
};
|
|
25284
|
+
}
|
|
25285
|
+
function getReadonlyContext(context) {
|
|
25286
|
+
if (isPlainObject$4(context)) {
|
|
25287
|
+
let frozen = { ...context };
|
|
25288
|
+
Object.freeze(frozen);
|
|
25289
|
+
return frozen;
|
|
25290
|
+
} else {
|
|
25291
|
+
return {
|
|
25292
|
+
get: (ctx) => context.get(ctx)
|
|
25293
|
+
};
|
|
25294
|
+
}
|
|
25295
|
+
}
|
|
25296
|
+
var objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
25297
|
+
function isPlainObject$4(thing) {
|
|
25298
|
+
if (thing === null || typeof thing !== "object") {
|
|
25299
|
+
return false;
|
|
25300
|
+
}
|
|
25301
|
+
const proto = Object.getPrototypeOf(thing);
|
|
25302
|
+
return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === objectProtoNames;
|
|
25303
|
+
}
|
|
24578
25304
|
var validMutationMethodsArr = [
|
|
24579
25305
|
"POST",
|
|
24580
25306
|
"PUT",
|
|
@@ -24617,8 +25343,6 @@
|
|
|
24617
25343
|
reset: void 0,
|
|
24618
25344
|
location: void 0
|
|
24619
25345
|
};
|
|
24620
|
-
var ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
24621
|
-
var isAbsoluteUrl = (url2) => ABSOLUTE_URL_REGEX.test(url2);
|
|
24622
25346
|
var defaultMapRouteProperties = (route) => ({
|
|
24623
25347
|
hasErrorBoundary: Boolean(route.hasErrorBoundary)
|
|
24624
25348
|
});
|
|
@@ -24632,7 +25356,20 @@
|
|
|
24632
25356
|
"You must provide a non-empty routes array to createRouter"
|
|
24633
25357
|
);
|
|
24634
25358
|
let hydrationRouteProperties2 = init.hydrationRouteProperties || [];
|
|
24635
|
-
let
|
|
25359
|
+
let _mapRouteProperties = init.mapRouteProperties || defaultMapRouteProperties;
|
|
25360
|
+
let mapRouteProperties2 = _mapRouteProperties;
|
|
25361
|
+
if (init.unstable_instrumentations) {
|
|
25362
|
+
let instrumentations = init.unstable_instrumentations;
|
|
25363
|
+
mapRouteProperties2 = (route) => {
|
|
25364
|
+
return {
|
|
25365
|
+
..._mapRouteProperties(route),
|
|
25366
|
+
...getRouteInstrumentationUpdates(
|
|
25367
|
+
instrumentations.map((i) => i.route).filter(Boolean),
|
|
25368
|
+
route
|
|
25369
|
+
)
|
|
25370
|
+
};
|
|
25371
|
+
};
|
|
25372
|
+
}
|
|
24636
25373
|
let manifest = {};
|
|
24637
25374
|
let dataRoutes = convertRoutesToDataRoutes(
|
|
24638
25375
|
init.routes,
|
|
@@ -24729,6 +25466,7 @@
|
|
|
24729
25466
|
blockers: /* @__PURE__ */ new Map()
|
|
24730
25467
|
};
|
|
24731
25468
|
let pendingAction = "POP";
|
|
25469
|
+
let pendingPopstateNavigationDfd = null;
|
|
24732
25470
|
let pendingPreventScrollReset = false;
|
|
24733
25471
|
let pendingNavigationController;
|
|
24734
25472
|
let pendingViewTransitionEnabled = false;
|
|
@@ -24788,6 +25526,8 @@
|
|
|
24788
25526
|
updateState({ blockers });
|
|
24789
25527
|
}
|
|
24790
25528
|
});
|
|
25529
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
25530
|
+
pendingPopstateNavigationDfd = null;
|
|
24791
25531
|
return;
|
|
24792
25532
|
}
|
|
24793
25533
|
return startNavigation(historyAction, location2);
|
|
@@ -24859,6 +25599,7 @@
|
|
|
24859
25599
|
[...subscribers].forEach(
|
|
24860
25600
|
(subscriber) => subscriber(state, {
|
|
24861
25601
|
deletedFetchers: unmountedFetchers,
|
|
25602
|
+
newErrors: newState.errors ?? null,
|
|
24862
25603
|
viewTransitionOpts: opts.viewTransitionOpts,
|
|
24863
25604
|
flushSync: opts.flushSync === true
|
|
24864
25605
|
})
|
|
@@ -24956,13 +25697,21 @@
|
|
|
24956
25697
|
pendingViewTransitionEnabled = false;
|
|
24957
25698
|
isUninterruptedRevalidation = false;
|
|
24958
25699
|
isRevalidationRequired = false;
|
|
25700
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
25701
|
+
pendingPopstateNavigationDfd = null;
|
|
24959
25702
|
pendingRevalidationDfd?.resolve();
|
|
24960
25703
|
pendingRevalidationDfd = null;
|
|
24961
25704
|
}
|
|
24962
25705
|
async function navigate(to, opts) {
|
|
25706
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
25707
|
+
pendingPopstateNavigationDfd = null;
|
|
24963
25708
|
if (typeof to === "number") {
|
|
25709
|
+
if (!pendingPopstateNavigationDfd) {
|
|
25710
|
+
pendingPopstateNavigationDfd = createDeferred();
|
|
25711
|
+
}
|
|
25712
|
+
let promise = pendingPopstateNavigationDfd.promise;
|
|
24964
25713
|
init.history.go(to);
|
|
24965
|
-
return;
|
|
25714
|
+
return promise;
|
|
24966
25715
|
}
|
|
24967
25716
|
let normalizedPath = normalizeTo(
|
|
24968
25717
|
state.location,
|
|
@@ -25645,6 +26394,14 @@
|
|
|
25645
26394
|
key2
|
|
25646
26395
|
);
|
|
25647
26396
|
let actionResult = actionResults[match2.route.id];
|
|
26397
|
+
if (!actionResult) {
|
|
26398
|
+
for (let match22 of fetchMatches) {
|
|
26399
|
+
if (actionResults[match22.route.id]) {
|
|
26400
|
+
actionResult = actionResults[match22.route.id];
|
|
26401
|
+
break;
|
|
26402
|
+
}
|
|
26403
|
+
}
|
|
26404
|
+
}
|
|
25648
26405
|
if (fetchRequest.signal.aborted) {
|
|
25649
26406
|
if (fetchControllers.get(key2) === abortController) {
|
|
25650
26407
|
fetchControllers.delete(key2);
|
|
@@ -25894,6 +26651,10 @@
|
|
|
25894
26651
|
preventScrollReset,
|
|
25895
26652
|
replace: replace2
|
|
25896
26653
|
} = {}) {
|
|
26654
|
+
if (!isNavigation) {
|
|
26655
|
+
pendingPopstateNavigationDfd?.resolve();
|
|
26656
|
+
pendingPopstateNavigationDfd = null;
|
|
26657
|
+
}
|
|
25897
26658
|
if (redirect2.response.headers.has("X-Remix-Revalidate")) {
|
|
25898
26659
|
isRevalidationRequired = true;
|
|
25899
26660
|
}
|
|
@@ -26301,23 +27062,43 @@
|
|
|
26301
27062
|
return { type: "aborted" };
|
|
26302
27063
|
}
|
|
26303
27064
|
let newMatches = matchRoutes(routesToUse, pathname, basename2);
|
|
27065
|
+
let newPartialMatches = null;
|
|
26304
27066
|
if (newMatches) {
|
|
26305
|
-
|
|
27067
|
+
if (Object.keys(newMatches[0].params).length === 0) {
|
|
27068
|
+
return { type: "success", matches: newMatches };
|
|
27069
|
+
} else {
|
|
27070
|
+
newPartialMatches = matchRoutesImpl(
|
|
27071
|
+
routesToUse,
|
|
27072
|
+
pathname,
|
|
27073
|
+
basename2,
|
|
27074
|
+
true
|
|
27075
|
+
);
|
|
27076
|
+
let matchedDeeper = newPartialMatches && partialMatches.length < newPartialMatches.length && compareMatches(
|
|
27077
|
+
partialMatches,
|
|
27078
|
+
newPartialMatches.slice(0, partialMatches.length)
|
|
27079
|
+
);
|
|
27080
|
+
if (!matchedDeeper) {
|
|
27081
|
+
return { type: "success", matches: newMatches };
|
|
27082
|
+
}
|
|
27083
|
+
}
|
|
26306
27084
|
}
|
|
26307
|
-
|
|
26308
|
-
|
|
26309
|
-
|
|
26310
|
-
|
|
26311
|
-
|
|
26312
|
-
|
|
26313
|
-
|
|
26314
|
-
|
|
26315
|
-
)) {
|
|
27085
|
+
if (!newPartialMatches) {
|
|
27086
|
+
newPartialMatches = matchRoutesImpl(
|
|
27087
|
+
routesToUse,
|
|
27088
|
+
pathname,
|
|
27089
|
+
basename2,
|
|
27090
|
+
true
|
|
27091
|
+
);
|
|
27092
|
+
}
|
|
27093
|
+
if (!newPartialMatches || compareMatches(partialMatches, newPartialMatches)) {
|
|
26316
27094
|
return { type: "success", matches: null };
|
|
26317
27095
|
}
|
|
26318
27096
|
partialMatches = newPartialMatches;
|
|
26319
27097
|
}
|
|
26320
27098
|
}
|
|
27099
|
+
function compareMatches(a, b) {
|
|
27100
|
+
return a.length === b.length && a.every((m, i) => m.route.id === b[i].route.id);
|
|
27101
|
+
}
|
|
26321
27102
|
function _internalSetRoutes(newRoutes) {
|
|
26322
27103
|
manifest = {};
|
|
26323
27104
|
inFlightDataRoutes = convertRoutesToDataRoutes(
|
|
@@ -26384,6 +27165,12 @@
|
|
|
26384
27165
|
updateState(newState);
|
|
26385
27166
|
}
|
|
26386
27167
|
};
|
|
27168
|
+
if (init.unstable_instrumentations) {
|
|
27169
|
+
router = instrumentClientSideRouter(
|
|
27170
|
+
router,
|
|
27171
|
+
init.unstable_instrumentations.map((i) => i.router).filter(Boolean)
|
|
27172
|
+
);
|
|
27173
|
+
}
|
|
26387
27174
|
return router;
|
|
26388
27175
|
}
|
|
26389
27176
|
function isSubmissionNavigation(opts) {
|
|
@@ -26563,6 +27350,7 @@
|
|
|
26563
27350
|
actionResult,
|
|
26564
27351
|
actionStatus
|
|
26565
27352
|
};
|
|
27353
|
+
let pattern = getRoutePattern(matches);
|
|
26566
27354
|
let dsMatches = matches.map((match2, index2) => {
|
|
26567
27355
|
let { route } = match2;
|
|
26568
27356
|
let forceShouldLoad = null;
|
|
@@ -26586,6 +27374,7 @@
|
|
|
26586
27374
|
mapRouteProperties2,
|
|
26587
27375
|
manifest,
|
|
26588
27376
|
request2,
|
|
27377
|
+
pattern,
|
|
26589
27378
|
match2,
|
|
26590
27379
|
lazyRoutePropertiesToSkip,
|
|
26591
27380
|
scopedContext,
|
|
@@ -26606,6 +27395,7 @@
|
|
|
26606
27395
|
mapRouteProperties2,
|
|
26607
27396
|
manifest,
|
|
26608
27397
|
request2,
|
|
27398
|
+
pattern,
|
|
26609
27399
|
match2,
|
|
26610
27400
|
lazyRoutePropertiesToSkip,
|
|
26611
27401
|
scopedContext,
|
|
@@ -27015,7 +27805,7 @@
|
|
|
27015
27805
|
),
|
|
27016
27806
|
// or the shallowest route that needs to load data
|
|
27017
27807
|
Math.max(
|
|
27018
|
-
matches.findIndex((m) => m.
|
|
27808
|
+
matches.findIndex((m) => m.shouldCallHandler()),
|
|
27019
27809
|
0
|
|
27020
27810
|
)
|
|
27021
27811
|
);
|
|
@@ -27030,12 +27820,17 @@
|
|
|
27030
27820
|
}
|
|
27031
27821
|
}
|
|
27032
27822
|
async function runMiddlewarePipeline(args, handler, processResult, isResult, errorHandler) {
|
|
27033
|
-
let { matches, request: request2, params, context } = args;
|
|
27823
|
+
let { matches, request: request2, params, context, unstable_pattern } = args;
|
|
27034
27824
|
let tuples = matches.flatMap(
|
|
27035
27825
|
(m) => m.route.middleware ? m.route.middleware.map((fn) => [m.route.id, fn]) : []
|
|
27036
27826
|
);
|
|
27037
27827
|
let result = await callRouteMiddleware(
|
|
27038
|
-
{
|
|
27828
|
+
{
|
|
27829
|
+
request: request2,
|
|
27830
|
+
params,
|
|
27831
|
+
context,
|
|
27832
|
+
unstable_pattern
|
|
27833
|
+
},
|
|
27039
27834
|
tuples,
|
|
27040
27835
|
handler,
|
|
27041
27836
|
processResult,
|
|
@@ -27113,7 +27908,7 @@
|
|
|
27113
27908
|
handler: lazyRoutePromises.lazyHandlerPromise
|
|
27114
27909
|
};
|
|
27115
27910
|
}
|
|
27116
|
-
function getDataStrategyMatch(mapRouteProperties2, manifest, request2, match2, lazyRoutePropertiesToSkip, scopedContext, shouldLoad,
|
|
27911
|
+
function getDataStrategyMatch(mapRouteProperties2, manifest, request2, unstable_pattern, match2, lazyRoutePropertiesToSkip, scopedContext, shouldLoad, shouldRevalidateArgs = null) {
|
|
27117
27912
|
let isUsingNewApi = false;
|
|
27118
27913
|
let _lazyPromises = getDataStrategyMatchLazyPromises(
|
|
27119
27914
|
mapRouteProperties2,
|
|
@@ -27126,27 +27921,28 @@
|
|
|
27126
27921
|
...match2,
|
|
27127
27922
|
_lazyPromises,
|
|
27128
27923
|
shouldLoad,
|
|
27129
|
-
|
|
27130
|
-
|
|
27924
|
+
shouldRevalidateArgs,
|
|
27925
|
+
shouldCallHandler(defaultShouldRevalidate) {
|
|
27131
27926
|
isUsingNewApi = true;
|
|
27132
|
-
if (!
|
|
27927
|
+
if (!shouldRevalidateArgs) {
|
|
27133
27928
|
return shouldLoad;
|
|
27134
27929
|
}
|
|
27135
27930
|
if (typeof defaultShouldRevalidate === "boolean") {
|
|
27136
27931
|
return shouldRevalidateLoader(match2, {
|
|
27137
|
-
...
|
|
27932
|
+
...shouldRevalidateArgs,
|
|
27138
27933
|
defaultShouldRevalidate
|
|
27139
27934
|
});
|
|
27140
27935
|
}
|
|
27141
|
-
return shouldRevalidateLoader(match2,
|
|
27936
|
+
return shouldRevalidateLoader(match2, shouldRevalidateArgs);
|
|
27142
27937
|
},
|
|
27143
27938
|
resolve(handlerOverride) {
|
|
27144
27939
|
let { lazy: lazy2, loader, middleware } = match2.route;
|
|
27145
27940
|
let callHandler = isUsingNewApi || shouldLoad || handlerOverride && !isMutationMethod(request2.method) && (lazy2 || loader);
|
|
27146
27941
|
let isMiddlewareOnlyRoute = middleware && middleware.length > 0 && !loader && !lazy2;
|
|
27147
|
-
if (callHandler && !isMiddlewareOnlyRoute) {
|
|
27942
|
+
if (callHandler && (isMutationMethod(request2.method) || !isMiddlewareOnlyRoute)) {
|
|
27148
27943
|
return callLoaderOrAction({
|
|
27149
27944
|
request: request2,
|
|
27945
|
+
unstable_pattern,
|
|
27150
27946
|
match: match2,
|
|
27151
27947
|
lazyHandlerPromise: _lazyPromises?.handler,
|
|
27152
27948
|
lazyRoutePromise: _lazyPromises?.route,
|
|
@@ -27164,8 +27960,8 @@
|
|
|
27164
27960
|
return {
|
|
27165
27961
|
...match2,
|
|
27166
27962
|
shouldLoad: false,
|
|
27167
|
-
|
|
27168
|
-
|
|
27963
|
+
shouldRevalidateArgs,
|
|
27964
|
+
shouldCallHandler: () => false,
|
|
27169
27965
|
_lazyPromises: getDataStrategyMatchLazyPromises(
|
|
27170
27966
|
mapRouteProperties2,
|
|
27171
27967
|
manifest,
|
|
@@ -27180,6 +27976,7 @@
|
|
|
27180
27976
|
mapRouteProperties2,
|
|
27181
27977
|
manifest,
|
|
27182
27978
|
request2,
|
|
27979
|
+
getRoutePattern(matches),
|
|
27183
27980
|
match2,
|
|
27184
27981
|
lazyRoutePropertiesToSkip,
|
|
27185
27982
|
scopedContext,
|
|
@@ -27194,6 +27991,7 @@
|
|
|
27194
27991
|
}
|
|
27195
27992
|
let dataStrategyArgs = {
|
|
27196
27993
|
request: request2,
|
|
27994
|
+
unstable_pattern: getRoutePattern(matches),
|
|
27197
27995
|
params: matches[0].params,
|
|
27198
27996
|
context: scopedContext,
|
|
27199
27997
|
matches
|
|
@@ -27230,6 +28028,7 @@
|
|
|
27230
28028
|
}
|
|
27231
28029
|
async function callLoaderOrAction({
|
|
27232
28030
|
request: request2,
|
|
28031
|
+
unstable_pattern,
|
|
27233
28032
|
match: match2,
|
|
27234
28033
|
lazyHandlerPromise,
|
|
27235
28034
|
lazyRoutePromise,
|
|
@@ -27256,6 +28055,7 @@
|
|
|
27256
28055
|
return handler(
|
|
27257
28056
|
{
|
|
27258
28057
|
request: request2,
|
|
28058
|
+
unstable_pattern,
|
|
27259
28059
|
params: match2.params,
|
|
27260
28060
|
context: scopedContext
|
|
27261
28061
|
},
|
|
@@ -27370,11 +28170,7 @@
|
|
|
27370
28170
|
}
|
|
27371
28171
|
return {
|
|
27372
28172
|
type: "error",
|
|
27373
|
-
error:
|
|
27374
|
-
result.init?.status || 500,
|
|
27375
|
-
void 0,
|
|
27376
|
-
result.data
|
|
27377
|
-
),
|
|
28173
|
+
error: dataWithResponseInitToErrorResponse(result),
|
|
27378
28174
|
statusCode: isRouteErrorResponse(result) ? result.status : void 0,
|
|
27379
28175
|
headers: result.init?.headers ? new Headers(result.init.headers) : void 0
|
|
27380
28176
|
};
|
|
@@ -27668,6 +28464,13 @@
|
|
|
27668
28464
|
}
|
|
27669
28465
|
return false;
|
|
27670
28466
|
}
|
|
28467
|
+
function dataWithResponseInitToErrorResponse(data2) {
|
|
28468
|
+
return new ErrorResponseImpl(
|
|
28469
|
+
data2.init?.status ?? 500,
|
|
28470
|
+
data2.init?.statusText ?? "Internal Server Error",
|
|
28471
|
+
data2.data
|
|
28472
|
+
);
|
|
28473
|
+
}
|
|
27671
28474
|
function isDataStrategyResults(result) {
|
|
27672
28475
|
return result != null && typeof result === "object" && Object.entries(result).every(
|
|
27673
28476
|
([key2, value2]) => typeof key2 === "string" && isDataStrategyResult(value2)
|
|
@@ -28163,8 +28966,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28163
28966
|
};
|
|
28164
28967
|
}
|
|
28165
28968
|
componentDidCatch(error, errorInfo) {
|
|
28166
|
-
if (this.props.
|
|
28167
|
-
this.props.
|
|
28969
|
+
if (this.props.onError) {
|
|
28970
|
+
this.props.onError(error, errorInfo);
|
|
28168
28971
|
} else {
|
|
28169
28972
|
console.error(
|
|
28170
28973
|
"React Router caught the following error during render",
|
|
@@ -28242,6 +29045,14 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28242
29045
|
}
|
|
28243
29046
|
}
|
|
28244
29047
|
}
|
|
29048
|
+
let onError = dataRouterState && unstable_onError ? (error, errorInfo) => {
|
|
29049
|
+
unstable_onError(error, {
|
|
29050
|
+
location: dataRouterState.location,
|
|
29051
|
+
params: dataRouterState.matches?.[0]?.params ?? {},
|
|
29052
|
+
unstable_pattern: getRoutePattern(dataRouterState.matches),
|
|
29053
|
+
errorInfo
|
|
29054
|
+
});
|
|
29055
|
+
} : void 0;
|
|
28245
29056
|
return renderedMatches.reduceRight(
|
|
28246
29057
|
(outlet, match2, index2) => {
|
|
28247
29058
|
let error;
|
|
@@ -28302,7 +29113,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28302
29113
|
error,
|
|
28303
29114
|
children: getChildren(),
|
|
28304
29115
|
routeContext: { outlet: null, matches: matches2, isDataRoute: true },
|
|
28305
|
-
|
|
29116
|
+
onError
|
|
28306
29117
|
}
|
|
28307
29118
|
) : getChildren();
|
|
28308
29119
|
},
|
|
@@ -28375,7 +29186,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28375
29186
|
warning(activeRef.current, navigateEffectWarning);
|
|
28376
29187
|
if (!activeRef.current) return;
|
|
28377
29188
|
if (typeof to === "number") {
|
|
28378
|
-
router.navigate(to);
|
|
29189
|
+
await router.navigate(to);
|
|
28379
29190
|
} else {
|
|
28380
29191
|
await router.navigate(to, { fromRouteId: id2, ...options });
|
|
28381
29192
|
}
|
|
@@ -28398,6 +29209,15 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28398
29209
|
console.warn(message2);
|
|
28399
29210
|
}
|
|
28400
29211
|
}
|
|
29212
|
+
var USE_OPTIMISTIC = "useOptimistic";
|
|
29213
|
+
var useOptimisticImpl = React4[USE_OPTIMISTIC];
|
|
29214
|
+
function useOptimisticSafe(val) {
|
|
29215
|
+
if (useOptimisticImpl) {
|
|
29216
|
+
return useOptimisticImpl(val);
|
|
29217
|
+
} else {
|
|
29218
|
+
return [val, () => void 0];
|
|
29219
|
+
}
|
|
29220
|
+
}
|
|
28401
29221
|
function mapRouteProperties(route) {
|
|
28402
29222
|
let updates = {
|
|
28403
29223
|
// Note: this check also occurs in createRoutesFromChildren so update
|
|
@@ -28474,9 +29294,11 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28474
29294
|
function RouterProvider({
|
|
28475
29295
|
router,
|
|
28476
29296
|
flushSync: reactDomFlushSyncImpl,
|
|
28477
|
-
unstable_onError
|
|
29297
|
+
unstable_onError,
|
|
29298
|
+
unstable_useTransitions
|
|
28478
29299
|
}) {
|
|
28479
|
-
let [
|
|
29300
|
+
let [_state2, setStateImpl] = reactExports.useState(router.state);
|
|
29301
|
+
let [state, setOptimisticState] = useOptimisticSafe(_state2);
|
|
28480
29302
|
let [pendingState, setPendingState] = reactExports.useState();
|
|
28481
29303
|
let [vtContext, setVtContext] = reactExports.useState({
|
|
28482
29304
|
isTransitioning: false
|
|
@@ -28485,23 +29307,17 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28485
29307
|
let [transition2, setTransition] = reactExports.useState();
|
|
28486
29308
|
let [interruption, setInterruption] = reactExports.useState();
|
|
28487
29309
|
let fetcherData = reactExports.useRef(/* @__PURE__ */ new Map());
|
|
28488
|
-
let logErrorsAndSetState = reactExports.useCallback(
|
|
28489
|
-
(newState) => {
|
|
28490
|
-
setStateImpl((prevState) => {
|
|
28491
|
-
if (newState.errors && unstable_onError) {
|
|
28492
|
-
Object.entries(newState.errors).forEach(([routeId, error]) => {
|
|
28493
|
-
if (prevState.errors?.[routeId] !== error) {
|
|
28494
|
-
unstable_onError(error);
|
|
28495
|
-
}
|
|
28496
|
-
});
|
|
28497
|
-
}
|
|
28498
|
-
return newState;
|
|
28499
|
-
});
|
|
28500
|
-
},
|
|
28501
|
-
[unstable_onError]
|
|
28502
|
-
);
|
|
28503
29310
|
let setState = reactExports.useCallback(
|
|
28504
|
-
(newState, { deletedFetchers, flushSync, viewTransitionOpts }) => {
|
|
29311
|
+
(newState, { deletedFetchers, newErrors, flushSync, viewTransitionOpts }) => {
|
|
29312
|
+
if (newErrors && unstable_onError) {
|
|
29313
|
+
Object.values(newErrors).forEach(
|
|
29314
|
+
(error) => unstable_onError(error, {
|
|
29315
|
+
location: newState.location,
|
|
29316
|
+
params: newState.matches[0]?.params ?? {},
|
|
29317
|
+
unstable_pattern: getRoutePattern(newState.matches)
|
|
29318
|
+
})
|
|
29319
|
+
);
|
|
29320
|
+
}
|
|
28505
29321
|
newState.fetchers.forEach((fetcher, key2) => {
|
|
28506
29322
|
if (fetcher.data !== void 0) {
|
|
28507
29323
|
fetcherData.current.set(key2, fetcher.data);
|
|
@@ -28519,16 +29335,23 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28519
29335
|
);
|
|
28520
29336
|
if (!viewTransitionOpts || !isViewTransitionAvailable) {
|
|
28521
29337
|
if (reactDomFlushSyncImpl && flushSync) {
|
|
28522
|
-
reactDomFlushSyncImpl(() =>
|
|
29338
|
+
reactDomFlushSyncImpl(() => setStateImpl(newState));
|
|
29339
|
+
} else if (unstable_useTransitions === false) {
|
|
29340
|
+
setStateImpl(newState);
|
|
28523
29341
|
} else {
|
|
28524
|
-
reactExports.startTransition(() =>
|
|
29342
|
+
reactExports.startTransition(() => {
|
|
29343
|
+
if (unstable_useTransitions === true) {
|
|
29344
|
+
setOptimisticState((s) => getOptimisticRouterState(s, newState));
|
|
29345
|
+
}
|
|
29346
|
+
setStateImpl(newState);
|
|
29347
|
+
});
|
|
28525
29348
|
}
|
|
28526
29349
|
return;
|
|
28527
29350
|
}
|
|
28528
29351
|
if (reactDomFlushSyncImpl && flushSync) {
|
|
28529
29352
|
reactDomFlushSyncImpl(() => {
|
|
28530
29353
|
if (transition2) {
|
|
28531
|
-
renderDfd
|
|
29354
|
+
renderDfd?.resolve();
|
|
28532
29355
|
transition2.skipTransition();
|
|
28533
29356
|
}
|
|
28534
29357
|
setVtContext({
|
|
@@ -28539,7 +29362,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28539
29362
|
});
|
|
28540
29363
|
});
|
|
28541
29364
|
let t = router.window.document.startViewTransition(() => {
|
|
28542
|
-
reactDomFlushSyncImpl(() =>
|
|
29365
|
+
reactDomFlushSyncImpl(() => setStateImpl(newState));
|
|
28543
29366
|
});
|
|
28544
29367
|
t.finished.finally(() => {
|
|
28545
29368
|
reactDomFlushSyncImpl(() => {
|
|
@@ -28553,7 +29376,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28553
29376
|
return;
|
|
28554
29377
|
}
|
|
28555
29378
|
if (transition2) {
|
|
28556
|
-
renderDfd
|
|
29379
|
+
renderDfd?.resolve();
|
|
28557
29380
|
transition2.skipTransition();
|
|
28558
29381
|
setInterruption({
|
|
28559
29382
|
state: newState,
|
|
@@ -28575,7 +29398,9 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28575
29398
|
reactDomFlushSyncImpl,
|
|
28576
29399
|
transition2,
|
|
28577
29400
|
renderDfd,
|
|
28578
|
-
|
|
29401
|
+
unstable_useTransitions,
|
|
29402
|
+
setOptimisticState,
|
|
29403
|
+
unstable_onError
|
|
28579
29404
|
]
|
|
28580
29405
|
);
|
|
28581
29406
|
reactExports.useLayoutEffect(() => router.subscribe(setState), [router, setState]);
|
|
@@ -28589,7 +29414,16 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28589
29414
|
let newState = pendingState;
|
|
28590
29415
|
let renderPromise = renderDfd.promise;
|
|
28591
29416
|
let transition22 = router.window.document.startViewTransition(async () => {
|
|
28592
|
-
|
|
29417
|
+
if (unstable_useTransitions === false) {
|
|
29418
|
+
setStateImpl(newState);
|
|
29419
|
+
} else {
|
|
29420
|
+
reactExports.startTransition(() => {
|
|
29421
|
+
if (unstable_useTransitions === true) {
|
|
29422
|
+
setOptimisticState((s) => getOptimisticRouterState(s, newState));
|
|
29423
|
+
}
|
|
29424
|
+
setStateImpl(newState);
|
|
29425
|
+
});
|
|
29426
|
+
}
|
|
28593
29427
|
await renderPromise;
|
|
28594
29428
|
});
|
|
28595
29429
|
transition22.finished.finally(() => {
|
|
@@ -28600,7 +29434,13 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28600
29434
|
});
|
|
28601
29435
|
setTransition(transition22);
|
|
28602
29436
|
}
|
|
28603
|
-
}, [
|
|
29437
|
+
}, [
|
|
29438
|
+
pendingState,
|
|
29439
|
+
renderDfd,
|
|
29440
|
+
router.window,
|
|
29441
|
+
unstable_useTransitions,
|
|
29442
|
+
setOptimisticState
|
|
29443
|
+
]);
|
|
28604
29444
|
reactExports.useEffect(() => {
|
|
28605
29445
|
if (renderDfd && pendingState && state.location.key === pendingState.location.key) {
|
|
28606
29446
|
renderDfd.resolve();
|
|
@@ -28651,7 +29491,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28651
29491
|
basename: basename2,
|
|
28652
29492
|
location: state.location,
|
|
28653
29493
|
navigationType: state.historyAction,
|
|
28654
|
-
navigator: navigator2
|
|
29494
|
+
navigator: navigator2,
|
|
29495
|
+
unstable_useTransitions: unstable_useTransitions === true
|
|
28655
29496
|
},
|
|
28656
29497
|
/* @__PURE__ */ reactExports.createElement(
|
|
28657
29498
|
MemoizedDataRoutes,
|
|
@@ -28664,6 +29505,20 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28664
29505
|
)
|
|
28665
29506
|
))))), null);
|
|
28666
29507
|
}
|
|
29508
|
+
function getOptimisticRouterState(currentState, newState) {
|
|
29509
|
+
return {
|
|
29510
|
+
// Don't surface "current location specific" stuff mid-navigation
|
|
29511
|
+
// (historyAction, location, matches, loaderData, errors, initialized,
|
|
29512
|
+
// restoreScroll, preventScrollReset, blockers, etc.)
|
|
29513
|
+
...currentState,
|
|
29514
|
+
// Only surface "pending/in-flight stuff"
|
|
29515
|
+
// (navigation, revalidation, actionData, fetchers, )
|
|
29516
|
+
navigation: newState.navigation.state !== "idle" ? newState.navigation : currentState.navigation,
|
|
29517
|
+
revalidation: newState.revalidation !== "idle" ? newState.revalidation : currentState.revalidation,
|
|
29518
|
+
actionData: newState.navigation.state !== "submitting" ? newState.actionData : currentState.actionData,
|
|
29519
|
+
fetchers: newState.fetchers
|
|
29520
|
+
};
|
|
29521
|
+
}
|
|
28667
29522
|
var MemoizedDataRoutes = reactExports.memo(DataRoutes);
|
|
28668
29523
|
function DataRoutes({
|
|
28669
29524
|
routes: routes2,
|
|
@@ -28679,7 +29534,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28679
29534
|
location: locationProp,
|
|
28680
29535
|
navigationType = "POP",
|
|
28681
29536
|
navigator: navigator2,
|
|
28682
|
-
static: staticProp = false
|
|
29537
|
+
static: staticProp = false,
|
|
29538
|
+
unstable_useTransitions
|
|
28683
29539
|
}) {
|
|
28684
29540
|
invariant$1(
|
|
28685
29541
|
!useInRouterContext(),
|
|
@@ -28691,9 +29547,10 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28691
29547
|
basename: basename2,
|
|
28692
29548
|
navigator: navigator2,
|
|
28693
29549
|
static: staticProp,
|
|
29550
|
+
unstable_useTransitions,
|
|
28694
29551
|
future: {}
|
|
28695
29552
|
}),
|
|
28696
|
-
[basename2, navigator2, staticProp]
|
|
29553
|
+
[basename2, navigator2, staticProp, unstable_useTransitions]
|
|
28697
29554
|
);
|
|
28698
29555
|
if (typeof locationProp === "string") {
|
|
28699
29556
|
locationProp = parsePath$1(locationProp);
|
|
@@ -28733,7 +29590,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
28733
29590
|
var defaultMethod = "get";
|
|
28734
29591
|
var defaultEncType = "application/x-www-form-urlencoded";
|
|
28735
29592
|
function isHtmlElement(object2) {
|
|
28736
|
-
return
|
|
29593
|
+
return typeof HTMLElement !== "undefined" && object2 instanceof HTMLElement;
|
|
28737
29594
|
}
|
|
28738
29595
|
function isButtonElement(object2) {
|
|
28739
29596
|
return isHtmlElement(object2) && object2.tagName.toLowerCase() === "button";
|
|
@@ -29238,7 +30095,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29238
30095
|
try {
|
|
29239
30096
|
if (isBrowser$3) {
|
|
29240
30097
|
window.__reactRouterVersion = // @ts-expect-error
|
|
29241
|
-
"7.
|
|
30098
|
+
"7.10.0";
|
|
29242
30099
|
}
|
|
29243
30100
|
} catch (e) {
|
|
29244
30101
|
}
|
|
@@ -29254,7 +30111,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29254
30111
|
hydrationRouteProperties,
|
|
29255
30112
|
dataStrategy: opts?.dataStrategy,
|
|
29256
30113
|
patchRoutesOnNavigation: opts?.patchRoutesOnNavigation,
|
|
29257
|
-
window: opts?.window
|
|
30114
|
+
window: opts?.window,
|
|
30115
|
+
unstable_instrumentations: opts?.unstable_instrumentations
|
|
29258
30116
|
}).initialize();
|
|
29259
30117
|
}
|
|
29260
30118
|
function parseHydrationData() {
|
|
@@ -29318,7 +30176,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29318
30176
|
viewTransition,
|
|
29319
30177
|
...rest
|
|
29320
30178
|
}, forwardedRef) {
|
|
29321
|
-
let { basename: basename2 } = reactExports.useContext(NavigationContext);
|
|
30179
|
+
let { basename: basename2, unstable_useTransitions } = reactExports.useContext(NavigationContext);
|
|
29322
30180
|
let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX2.test(to);
|
|
29323
30181
|
let absoluteHref;
|
|
29324
30182
|
let isExternal = false;
|
|
@@ -29353,7 +30211,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29353
30211
|
target,
|
|
29354
30212
|
preventScrollReset,
|
|
29355
30213
|
relative,
|
|
29356
|
-
viewTransition
|
|
30214
|
+
viewTransition,
|
|
30215
|
+
unstable_useTransitions
|
|
29357
30216
|
});
|
|
29358
30217
|
function handleClick(event2) {
|
|
29359
30218
|
if (onClick) onClick(event2);
|
|
@@ -29463,6 +30322,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29463
30322
|
viewTransition,
|
|
29464
30323
|
...props
|
|
29465
30324
|
}, forwardedRef) => {
|
|
30325
|
+
let { unstable_useTransitions } = reactExports.useContext(NavigationContext);
|
|
29466
30326
|
let submit = useSubmit();
|
|
29467
30327
|
let formAction = useFormAction(action, { relative });
|
|
29468
30328
|
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
@@ -29473,7 +30333,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29473
30333
|
event2.preventDefault();
|
|
29474
30334
|
let submitter = event2.nativeEvent.submitter;
|
|
29475
30335
|
let submitMethod = submitter?.getAttribute("formmethod") || method;
|
|
29476
|
-
submit(submitter || event2.currentTarget, {
|
|
30336
|
+
let doSubmit = () => submit(submitter || event2.currentTarget, {
|
|
29477
30337
|
fetcherKey,
|
|
29478
30338
|
method: submitMethod,
|
|
29479
30339
|
navigate,
|
|
@@ -29483,6 +30343,11 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29483
30343
|
preventScrollReset,
|
|
29484
30344
|
viewTransition
|
|
29485
30345
|
});
|
|
30346
|
+
if (unstable_useTransitions && navigate !== false) {
|
|
30347
|
+
reactExports.startTransition(() => doSubmit());
|
|
30348
|
+
} else {
|
|
30349
|
+
doSubmit();
|
|
30350
|
+
}
|
|
29486
30351
|
};
|
|
29487
30352
|
return /* @__PURE__ */ reactExports.createElement(
|
|
29488
30353
|
"form",
|
|
@@ -29512,7 +30377,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29512
30377
|
state,
|
|
29513
30378
|
preventScrollReset,
|
|
29514
30379
|
relative,
|
|
29515
|
-
viewTransition
|
|
30380
|
+
viewTransition,
|
|
30381
|
+
unstable_useTransitions
|
|
29516
30382
|
} = {}) {
|
|
29517
30383
|
let navigate = useNavigate();
|
|
29518
30384
|
let location2 = useLocation();
|
|
@@ -29522,13 +30388,18 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29522
30388
|
if (shouldProcessLinkClick(event2, target)) {
|
|
29523
30389
|
event2.preventDefault();
|
|
29524
30390
|
let replace2 = replaceProp !== void 0 ? replaceProp : createPath$1(location2) === createPath$1(path2);
|
|
29525
|
-
navigate(to, {
|
|
30391
|
+
let doNavigate = () => navigate(to, {
|
|
29526
30392
|
replace: replace2,
|
|
29527
30393
|
state,
|
|
29528
30394
|
preventScrollReset,
|
|
29529
30395
|
relative,
|
|
29530
30396
|
viewTransition
|
|
29531
30397
|
});
|
|
30398
|
+
if (unstable_useTransitions) {
|
|
30399
|
+
reactExports.startTransition(() => doNavigate());
|
|
30400
|
+
} else {
|
|
30401
|
+
doNavigate();
|
|
30402
|
+
}
|
|
29532
30403
|
}
|
|
29533
30404
|
},
|
|
29534
30405
|
[
|
|
@@ -29541,7 +30412,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29541
30412
|
to,
|
|
29542
30413
|
preventScrollReset,
|
|
29543
30414
|
relative,
|
|
29544
|
-
viewTransition
|
|
30415
|
+
viewTransition,
|
|
30416
|
+
unstable_useTransitions
|
|
29545
30417
|
]
|
|
29546
30418
|
);
|
|
29547
30419
|
}
|
|
@@ -29587,6 +30459,8 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29587
30459
|
);
|
|
29588
30460
|
let { basename: basename2 } = reactExports.useContext(NavigationContext);
|
|
29589
30461
|
let currentRouteId = useRouteId();
|
|
30462
|
+
let routerFetch = router.fetch;
|
|
30463
|
+
let routerNavigate = router.navigate;
|
|
29590
30464
|
return reactExports.useCallback(
|
|
29591
30465
|
async (target, options = {}) => {
|
|
29592
30466
|
let { action, method, encType, formData, body } = getFormSubmissionInfo(
|
|
@@ -29595,7 +30469,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29595
30469
|
);
|
|
29596
30470
|
if (options.navigate === false) {
|
|
29597
30471
|
let key2 = options.fetcherKey || getUniqueFetcherId();
|
|
29598
|
-
await
|
|
30472
|
+
await routerFetch(key2, currentRouteId, options.action || action, {
|
|
29599
30473
|
preventScrollReset: options.preventScrollReset,
|
|
29600
30474
|
formData,
|
|
29601
30475
|
body,
|
|
@@ -29604,7 +30478,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29604
30478
|
flushSync: options.flushSync
|
|
29605
30479
|
});
|
|
29606
30480
|
} else {
|
|
29607
|
-
await
|
|
30481
|
+
await routerNavigate(options.action || action, {
|
|
29608
30482
|
preventScrollReset: options.preventScrollReset,
|
|
29609
30483
|
formData,
|
|
29610
30484
|
body,
|
|
@@ -29618,7 +30492,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
29618
30492
|
});
|
|
29619
30493
|
}
|
|
29620
30494
|
},
|
|
29621
|
-
[
|
|
30495
|
+
[routerFetch, routerNavigate, basename2, currentRouteId]
|
|
29622
30496
|
);
|
|
29623
30497
|
}
|
|
29624
30498
|
function useFormAction(action, { relative } = {}) {
|
|
@@ -42732,8 +43606,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
42732
43606
|
type: "builder.registerEditor",
|
|
42733
43607
|
data: omit$4(info, "component")
|
|
42734
43608
|
}, "*");
|
|
42735
|
-
var
|
|
42736
|
-
if (!Builder2.isTrustedHost(
|
|
43609
|
+
var hostname = location.hostname;
|
|
43610
|
+
if (!Builder2.isTrustedHost(hostname)) {
|
|
42737
43611
|
console.error("Builder.registerEditor() called in the wrong environment! You cannot load custom editors from your app, they must be loaded through the builder6.com app itself. Follow the readme here for more details: https://github.com/builderio/builder/tree/master/plugins/cloudinary or contact chat us in our Spectrum community for help: https://spectrum.chat/builder");
|
|
42738
43612
|
}
|
|
42739
43613
|
}
|
|
@@ -42751,9 +43625,9 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
42751
43625
|
Builder2.setServerContext = function(context) {
|
|
42752
43626
|
this.serverContext = context;
|
|
42753
43627
|
};
|
|
42754
|
-
Builder2.isTrustedHost = function(
|
|
43628
|
+
Builder2.isTrustedHost = function(hostname) {
|
|
42755
43629
|
var isTrusted2 = this.trustedHosts.findIndex(function(trustedHost) {
|
|
42756
|
-
return trustedHost.startsWith("*.") ?
|
|
43630
|
+
return trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname;
|
|
42757
43631
|
}) > -1;
|
|
42758
43632
|
return isTrusted2;
|
|
42759
43633
|
};
|
|
@@ -45139,8 +46013,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
45139
46013
|
});
|
|
45140
46014
|
});
|
|
45141
46015
|
var define_process_env_default = {};
|
|
45142
|
-
var SDK_VERSION = "8.0.40", _a$
|
|
45143
|
-
"undefined" != typeof window && (null === (_a$
|
|
46016
|
+
var SDK_VERSION = "8.0.40", _a$2;
|
|
46017
|
+
"undefined" != typeof window && (null === (_a$2 = window.parent) || void 0 === _a$2 || _a$2.postMessage({ type: "builder.isReactSdk", data: { value: true, supportsPatchUpdates: "v4", supportsCustomBreakpoints: true, supportsGlobalSymbols: true, blockLevelPersonalization: true, version: SDK_VERSION } }, "*"));
|
|
45144
46018
|
var extendStatics = function(e, t) {
|
|
45145
46019
|
return (extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e2, t2) {
|
|
45146
46020
|
e2.__proto__ = t2;
|
|
@@ -53533,7 +54407,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
53533
54407
|
body: [
|
|
53534
54408
|
{
|
|
53535
54409
|
"type": "wrapper",
|
|
53536
|
-
"className": "flex w-full px-4 py-0 h-[50px] justify-between items-center steedos-header-container-line-one bg-white
|
|
54410
|
+
"className": "flex w-full px-4 py-0 h-[50px] justify-between items-center steedos-header-container-line-one bg-white shadow",
|
|
53537
54411
|
"body": [
|
|
53538
54412
|
{
|
|
53539
54413
|
type: "service",
|
|
@@ -54141,7 +55015,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
54141
55015
|
};
|
|
54142
55016
|
var marker = "vercel.ai.error";
|
|
54143
55017
|
var symbol = Symbol.for(marker);
|
|
54144
|
-
var _a;
|
|
55018
|
+
var _a$1;
|
|
54145
55019
|
var _AISDKError = class _AISDKError2 extends Error {
|
|
54146
55020
|
/**
|
|
54147
55021
|
* Creates an AI SDK Error.
|
|
@@ -54157,7 +55031,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
54157
55031
|
cause
|
|
54158
55032
|
}) {
|
|
54159
55033
|
super(message2);
|
|
54160
|
-
this[_a] = true;
|
|
55034
|
+
this[_a$1] = true;
|
|
54161
55035
|
this.name = name14;
|
|
54162
55036
|
this.cause = cause;
|
|
54163
55037
|
}
|
|
@@ -54174,7 +55048,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
54174
55048
|
return error != null && typeof error === "object" && markerSymbol in error && typeof error[markerSymbol] === "boolean" && error[markerSymbol] === true;
|
|
54175
55049
|
}
|
|
54176
55050
|
};
|
|
54177
|
-
_a = symbol;
|
|
55051
|
+
_a$1 = symbol;
|
|
54178
55052
|
var AISDKError = _AISDKError;
|
|
54179
55053
|
function getErrorMessage(error) {
|
|
54180
55054
|
if (error == null) {
|
|
@@ -54207,26 +55081,26 @@ Try polyfilling it using "@formatjs/intl-displaynames"
|
|
|
54207
55081
|
}
|
|
54208
55082
|
};
|
|
54209
55083
|
_a4 = symbol4;
|
|
54210
|
-
var name6 = "AI_JSONParseError";
|
|
54211
|
-
var marker7
|
|
54212
|
-
var symbol7
|
|
54213
|
-
var _a7
|
|
55084
|
+
var name6$1 = "AI_JSONParseError";
|
|
55085
|
+
var marker7 = `vercel.ai.error.${name6$1}`;
|
|
55086
|
+
var symbol7 = Symbol.for(marker7);
|
|
55087
|
+
var _a7;
|
|
54214
55088
|
var JSONParseError = class extends AISDKError {
|
|
54215
55089
|
constructor({ text: text2, cause }) {
|
|
54216
55090
|
super({
|
|
54217
|
-
name: name6,
|
|
55091
|
+
name: name6$1,
|
|
54218
55092
|
message: `JSON parsing failed: Text: ${text2}.
|
|
54219
55093
|
Error message: ${getErrorMessage(cause)}`,
|
|
54220
55094
|
cause
|
|
54221
55095
|
});
|
|
54222
|
-
this[_a7
|
|
55096
|
+
this[_a7] = true;
|
|
54223
55097
|
this.text = text2;
|
|
54224
55098
|
}
|
|
54225
55099
|
static isInstance(error) {
|
|
54226
|
-
return AISDKError.hasMarker(error, marker7
|
|
55100
|
+
return AISDKError.hasMarker(error, marker7);
|
|
54227
55101
|
}
|
|
54228
55102
|
};
|
|
54229
|
-
_a7
|
|
55103
|
+
_a7 = symbol7;
|
|
54230
55104
|
var name12 = "AI_TypeValidationError";
|
|
54231
55105
|
var marker13 = `vercel.ai.error.${name12}`;
|
|
54232
55106
|
var symbol13 = Symbol.for(marker13);
|
|
@@ -54389,20 +55263,29 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
54389
55263
|
}
|
|
54390
55264
|
function $constructor(name2, initializer2, params) {
|
|
54391
55265
|
function init(inst, def) {
|
|
54392
|
-
|
|
54393
|
-
|
|
54394
|
-
|
|
54395
|
-
|
|
54396
|
-
|
|
54397
|
-
|
|
55266
|
+
if (!inst._zod) {
|
|
55267
|
+
Object.defineProperty(inst, "_zod", {
|
|
55268
|
+
value: {
|
|
55269
|
+
def,
|
|
55270
|
+
constr: _2,
|
|
55271
|
+
traits: /* @__PURE__ */ new Set()
|
|
55272
|
+
},
|
|
55273
|
+
enumerable: false
|
|
55274
|
+
});
|
|
55275
|
+
}
|
|
55276
|
+
if (inst._zod.traits.has(name2)) {
|
|
55277
|
+
return;
|
|
55278
|
+
}
|
|
54398
55279
|
inst._zod.traits.add(name2);
|
|
54399
55280
|
initializer2(inst, def);
|
|
54400
|
-
|
|
54401
|
-
|
|
54402
|
-
|
|
55281
|
+
const proto = _2.prototype;
|
|
55282
|
+
const keys2 = Object.keys(proto);
|
|
55283
|
+
for (let i = 0; i < keys2.length; i++) {
|
|
55284
|
+
const k = keys2[i];
|
|
55285
|
+
if (!(k in inst)) {
|
|
55286
|
+
inst[k] = proto[k].bind(inst);
|
|
55287
|
+
}
|
|
54403
55288
|
}
|
|
54404
|
-
inst._zod.constr = _2;
|
|
54405
|
-
inst._zod.def = def;
|
|
54406
55289
|
}
|
|
54407
55290
|
const Parent = params?.Parent ?? Object;
|
|
54408
55291
|
class Definition extends Parent {
|
|
@@ -54530,6 +55413,9 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
54530
55413
|
function esc(str) {
|
|
54531
55414
|
return JSON.stringify(str);
|
|
54532
55415
|
}
|
|
55416
|
+
function slugify(input) {
|
|
55417
|
+
return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
55418
|
+
}
|
|
54533
55419
|
const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
|
|
54534
55420
|
};
|
|
54535
55421
|
function isObject$1(data2) {
|
|
@@ -54553,6 +55439,8 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
54553
55439
|
const ctor = o.constructor;
|
|
54554
55440
|
if (ctor === void 0)
|
|
54555
55441
|
return true;
|
|
55442
|
+
if (typeof ctor !== "function")
|
|
55443
|
+
return true;
|
|
54556
55444
|
const prot = ctor.prototype;
|
|
54557
55445
|
if (isObject$1(prot) === false)
|
|
54558
55446
|
return false;
|
|
@@ -54974,9 +55862,8 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
54974
55862
|
const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
54975
55863
|
const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
54976
55864
|
const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
54977
|
-
const base64
|
|
55865
|
+
const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
54978
55866
|
const base64url = /^[A-Za-z0-9_-]*$/;
|
|
54979
|
-
const hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
54980
55867
|
const e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
54981
55868
|
const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
54982
55869
|
const date$1 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -55429,7 +56316,7 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
55429
56316
|
const version = {
|
|
55430
56317
|
major: 4,
|
|
55431
56318
|
minor: 1,
|
|
55432
|
-
patch:
|
|
56319
|
+
patch: 13
|
|
55433
56320
|
};
|
|
55434
56321
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
55435
56322
|
var _a2;
|
|
@@ -55605,7 +56492,7 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
55605
56492
|
code: "invalid_format",
|
|
55606
56493
|
format: "url",
|
|
55607
56494
|
note: "Invalid hostname",
|
|
55608
|
-
pattern: hostname.source,
|
|
56495
|
+
pattern: def.hostname.source,
|
|
55609
56496
|
input: payload.value,
|
|
55610
56497
|
inst,
|
|
55611
56498
|
continue: !def.abort
|
|
@@ -55690,18 +56577,12 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
55690
56577
|
const $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
|
|
55691
56578
|
def.pattern ?? (def.pattern = ipv4);
|
|
55692
56579
|
$ZodStringFormat.init(inst, def);
|
|
55693
|
-
inst._zod.
|
|
55694
|
-
const bag = inst2._zod.bag;
|
|
55695
|
-
bag.format = `ipv4`;
|
|
55696
|
-
});
|
|
56580
|
+
inst._zod.bag.format = `ipv4`;
|
|
55697
56581
|
});
|
|
55698
56582
|
const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
55699
56583
|
def.pattern ?? (def.pattern = ipv6);
|
|
55700
56584
|
$ZodStringFormat.init(inst, def);
|
|
55701
|
-
inst._zod.
|
|
55702
|
-
const bag = inst2._zod.bag;
|
|
55703
|
-
bag.format = `ipv6`;
|
|
55704
|
-
});
|
|
56585
|
+
inst._zod.bag.format = `ipv6`;
|
|
55705
56586
|
inst._zod.check = (payload) => {
|
|
55706
56587
|
try {
|
|
55707
56588
|
new URL(`http://[${payload.value}]`);
|
|
@@ -55761,11 +56642,9 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
55761
56642
|
}
|
|
55762
56643
|
}
|
|
55763
56644
|
const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
55764
|
-
def.pattern ?? (def.pattern = base64
|
|
56645
|
+
def.pattern ?? (def.pattern = base64);
|
|
55765
56646
|
$ZodStringFormat.init(inst, def);
|
|
55766
|
-
inst._zod.
|
|
55767
|
-
inst2._zod.bag.contentEncoding = "base64";
|
|
55768
|
-
});
|
|
56647
|
+
inst._zod.bag.contentEncoding = "base64";
|
|
55769
56648
|
inst._zod.check = (payload) => {
|
|
55770
56649
|
if (isValidBase64(payload.value))
|
|
55771
56650
|
return;
|
|
@@ -55788,9 +56667,7 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
55788
56667
|
const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
|
|
55789
56668
|
def.pattern ?? (def.pattern = base64url);
|
|
55790
56669
|
$ZodStringFormat.init(inst, def);
|
|
55791
|
-
inst._zod.
|
|
55792
|
-
inst2._zod.bag.contentEncoding = "base64url";
|
|
55793
|
-
});
|
|
56670
|
+
inst._zod.bag.contentEncoding = "base64url";
|
|
55794
56671
|
inst._zod.check = (payload) => {
|
|
55795
56672
|
if (isValidBase64URL(payload.value))
|
|
55796
56673
|
return;
|
|
@@ -55865,7 +56742,7 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
55865
56742
|
return payload;
|
|
55866
56743
|
};
|
|
55867
56744
|
});
|
|
55868
|
-
const $ZodNumberFormat = /* @__PURE__ */ $constructor("$
|
|
56745
|
+
const $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => {
|
|
55869
56746
|
$ZodCheckNumberFormat.init(inst, def);
|
|
55870
56747
|
$ZodNumber.init(inst, def);
|
|
55871
56748
|
});
|
|
@@ -55995,7 +56872,7 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
55995
56872
|
const keySet = def.keySet;
|
|
55996
56873
|
const _catchall = def.catchall._zod;
|
|
55997
56874
|
const t = _catchall.def.type;
|
|
55998
|
-
for (const key2
|
|
56875
|
+
for (const key2 in input) {
|
|
55999
56876
|
if (keySet.has(key2))
|
|
56000
56877
|
continue;
|
|
56001
56878
|
if (t === "never") {
|
|
@@ -56381,11 +57258,13 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
56381
57258
|
return payload;
|
|
56382
57259
|
}
|
|
56383
57260
|
const proms = [];
|
|
56384
|
-
|
|
56385
|
-
|
|
57261
|
+
const values2 = def.keyType._zod.values;
|
|
57262
|
+
if (values2) {
|
|
56386
57263
|
payload.value = {};
|
|
57264
|
+
const recordKeys = /* @__PURE__ */ new Set();
|
|
56387
57265
|
for (const key2 of values2) {
|
|
56388
57266
|
if (typeof key2 === "string" || typeof key2 === "number" || typeof key2 === "symbol") {
|
|
57267
|
+
recordKeys.add(typeof key2 === "number" ? key2.toString() : key2);
|
|
56389
57268
|
const result = def.valueType._zod.run({ value: input[key2], issues: [] }, ctx);
|
|
56390
57269
|
if (result instanceof Promise) {
|
|
56391
57270
|
proms.push(result.then((result2) => {
|
|
@@ -56404,7 +57283,7 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
56404
57283
|
}
|
|
56405
57284
|
let unrecognized;
|
|
56406
57285
|
for (const key2 in input) {
|
|
56407
|
-
if (!
|
|
57286
|
+
if (!recordKeys.has(key2)) {
|
|
56408
57287
|
unrecognized = unrecognized ?? [];
|
|
56409
57288
|
unrecognized.push(key2);
|
|
56410
57289
|
}
|
|
@@ -56485,11 +57364,12 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
56485
57364
|
if (def.values.length === 0) {
|
|
56486
57365
|
throw new Error("Cannot create literal schema with no valid values");
|
|
56487
57366
|
}
|
|
56488
|
-
|
|
57367
|
+
const values2 = new Set(def.values);
|
|
57368
|
+
inst._zod.values = values2;
|
|
56489
57369
|
inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
|
|
56490
57370
|
inst._zod.parse = (payload, _ctx) => {
|
|
56491
57371
|
const input = payload.value;
|
|
56492
|
-
if (
|
|
57372
|
+
if (values2.has(input)) {
|
|
56493
57373
|
return payload;
|
|
56494
57374
|
}
|
|
56495
57375
|
payload.issues.push({
|
|
@@ -56705,8 +57585,8 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
56705
57585
|
$ZodType.init(inst, def);
|
|
56706
57586
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
56707
57587
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
56708
|
-
defineLazy(inst._zod, "optin", () => def.innerType
|
|
56709
|
-
defineLazy(inst._zod, "optout", () => def.innerType
|
|
57588
|
+
defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
|
|
57589
|
+
defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
|
|
56710
57590
|
inst._zod.parse = (payload, ctx) => {
|
|
56711
57591
|
if (ctx.direction === "backward") {
|
|
56712
57592
|
return def.innerType._zod.run(payload, ctx);
|
|
@@ -56725,10 +57605,10 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
56725
57605
|
const $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
56726
57606
|
$ZodType.init(inst, def);
|
|
56727
57607
|
defineLazy(inst._zod, "innerType", () => def.getter());
|
|
56728
|
-
defineLazy(inst._zod, "pattern", () => inst._zod.innerType
|
|
56729
|
-
defineLazy(inst._zod, "propValues", () => inst._zod.innerType
|
|
56730
|
-
defineLazy(inst._zod, "optin", () => inst._zod.innerType
|
|
56731
|
-
defineLazy(inst._zod, "optout", () => inst._zod.innerType
|
|
57608
|
+
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
57609
|
+
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
57610
|
+
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
57611
|
+
defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0);
|
|
56732
57612
|
inst._zod.parse = (payload, ctx) => {
|
|
56733
57613
|
const inner = inst._zod.innerType;
|
|
56734
57614
|
return inner._zod.run(payload, ctx);
|
|
@@ -56767,6 +57647,7 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
56767
57647
|
payload.issues.push(issue(_iss));
|
|
56768
57648
|
}
|
|
56769
57649
|
}
|
|
57650
|
+
var _a;
|
|
56770
57651
|
class $ZodRegistry {
|
|
56771
57652
|
constructor() {
|
|
56772
57653
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
@@ -56813,7 +57694,8 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
56813
57694
|
function registry() {
|
|
56814
57695
|
return new $ZodRegistry();
|
|
56815
57696
|
}
|
|
56816
|
-
|
|
57697
|
+
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
57698
|
+
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
56817
57699
|
function _string(Class, params) {
|
|
56818
57700
|
return new Class({
|
|
56819
57701
|
type: "string",
|
|
@@ -57221,6 +58103,9 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
57221
58103
|
function _toUpperCase() {
|
|
57222
58104
|
return _overwrite((input) => input.toUpperCase());
|
|
57223
58105
|
}
|
|
58106
|
+
function _slugify() {
|
|
58107
|
+
return _overwrite((input) => slugify(input));
|
|
58108
|
+
}
|
|
57224
58109
|
function _array(Class, element2, params) {
|
|
57225
58110
|
return new Class({
|
|
57226
58111
|
type: "array",
|
|
@@ -57507,11 +58392,16 @@ Error message: ${getErrorMessage(cause)}`,
|
|
|
57507
58392
|
}
|
|
57508
58393
|
case "union": {
|
|
57509
58394
|
const json = _json;
|
|
58395
|
+
const isDiscriminated = def.discriminator !== void 0;
|
|
57510
58396
|
const options = def.options.map((x, i) => this.process(x, {
|
|
57511
58397
|
...params,
|
|
57512
|
-
path: [...params.path, "anyOf", i]
|
|
58398
|
+
path: [...params.path, isDiscriminated ? "oneOf" : "anyOf", i]
|
|
57513
58399
|
}));
|
|
57514
|
-
|
|
58400
|
+
if (isDiscriminated) {
|
|
58401
|
+
json.oneOf = options;
|
|
58402
|
+
} else {
|
|
58403
|
+
json.anyOf = options;
|
|
58404
|
+
}
|
|
57515
58405
|
break;
|
|
57516
58406
|
}
|
|
57517
58407
|
case "intersection": {
|
|
@@ -57996,100 +58886,51 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
57996
58886
|
if (ctx.seen.has(_schema))
|
|
57997
58887
|
return false;
|
|
57998
58888
|
ctx.seen.add(_schema);
|
|
57999
|
-
const
|
|
58000
|
-
|
|
58001
|
-
|
|
58002
|
-
|
|
58003
|
-
|
|
58004
|
-
|
|
58005
|
-
|
|
58006
|
-
|
|
58007
|
-
|
|
58008
|
-
|
|
58009
|
-
|
|
58010
|
-
|
|
58011
|
-
|
|
58012
|
-
|
|
58013
|
-
|
|
58014
|
-
|
|
58015
|
-
|
|
58016
|
-
|
|
58017
|
-
|
|
58018
|
-
|
|
58019
|
-
|
|
58020
|
-
|
|
58021
|
-
|
|
58022
|
-
|
|
58023
|
-
case "object": {
|
|
58024
|
-
for (const key2 in def.shape) {
|
|
58025
|
-
if (isTransforming(def.shape[key2], ctx))
|
|
58026
|
-
return true;
|
|
58027
|
-
}
|
|
58028
|
-
return false;
|
|
58029
|
-
}
|
|
58030
|
-
case "union": {
|
|
58031
|
-
for (const option of def.options) {
|
|
58032
|
-
if (isTransforming(option, ctx))
|
|
58033
|
-
return true;
|
|
58034
|
-
}
|
|
58035
|
-
return false;
|
|
58036
|
-
}
|
|
58037
|
-
case "intersection": {
|
|
58038
|
-
return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
|
|
58039
|
-
}
|
|
58040
|
-
case "tuple": {
|
|
58041
|
-
for (const item of def.items) {
|
|
58042
|
-
if (isTransforming(item, ctx))
|
|
58043
|
-
return true;
|
|
58044
|
-
}
|
|
58045
|
-
if (def.rest && isTransforming(def.rest, ctx))
|
|
58889
|
+
const def = _schema._zod.def;
|
|
58890
|
+
if (def.type === "transform")
|
|
58891
|
+
return true;
|
|
58892
|
+
if (def.type === "array")
|
|
58893
|
+
return isTransforming(def.element, ctx);
|
|
58894
|
+
if (def.type === "set")
|
|
58895
|
+
return isTransforming(def.valueType, ctx);
|
|
58896
|
+
if (def.type === "lazy")
|
|
58897
|
+
return isTransforming(def.getter(), ctx);
|
|
58898
|
+
if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
|
|
58899
|
+
return isTransforming(def.innerType, ctx);
|
|
58900
|
+
}
|
|
58901
|
+
if (def.type === "intersection") {
|
|
58902
|
+
return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
|
|
58903
|
+
}
|
|
58904
|
+
if (def.type === "record" || def.type === "map") {
|
|
58905
|
+
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
58906
|
+
}
|
|
58907
|
+
if (def.type === "pipe") {
|
|
58908
|
+
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
58909
|
+
}
|
|
58910
|
+
if (def.type === "object") {
|
|
58911
|
+
for (const key2 in def.shape) {
|
|
58912
|
+
if (isTransforming(def.shape[key2], ctx))
|
|
58046
58913
|
return true;
|
|
58047
|
-
return false;
|
|
58048
58914
|
}
|
|
58049
|
-
|
|
58050
|
-
|
|
58051
|
-
|
|
58052
|
-
|
|
58053
|
-
|
|
58054
|
-
|
|
58055
|
-
case "set": {
|
|
58056
|
-
return isTransforming(def.valueType, ctx);
|
|
58057
|
-
}
|
|
58058
|
-
// inner types
|
|
58059
|
-
case "promise":
|
|
58060
|
-
case "optional":
|
|
58061
|
-
case "nonoptional":
|
|
58062
|
-
case "nullable":
|
|
58063
|
-
case "readonly":
|
|
58064
|
-
return isTransforming(def.innerType, ctx);
|
|
58065
|
-
case "lazy":
|
|
58066
|
-
return isTransforming(def.getter(), ctx);
|
|
58067
|
-
case "default": {
|
|
58068
|
-
return isTransforming(def.innerType, ctx);
|
|
58069
|
-
}
|
|
58070
|
-
case "prefault": {
|
|
58071
|
-
return isTransforming(def.innerType, ctx);
|
|
58915
|
+
return false;
|
|
58916
|
+
}
|
|
58917
|
+
if (def.type === "union") {
|
|
58918
|
+
for (const option of def.options) {
|
|
58919
|
+
if (isTransforming(option, ctx))
|
|
58920
|
+
return true;
|
|
58072
58921
|
}
|
|
58073
|
-
|
|
58074
|
-
|
|
58922
|
+
return false;
|
|
58923
|
+
}
|
|
58924
|
+
if (def.type === "tuple") {
|
|
58925
|
+
for (const item of def.items) {
|
|
58926
|
+
if (isTransforming(item, ctx))
|
|
58927
|
+
return true;
|
|
58075
58928
|
}
|
|
58076
|
-
|
|
58929
|
+
if (def.rest && isTransforming(def.rest, ctx))
|
|
58077
58930
|
return true;
|
|
58078
|
-
|
|
58079
|
-
case "pipe": {
|
|
58080
|
-
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
58081
|
-
}
|
|
58082
|
-
case "success": {
|
|
58083
|
-
return false;
|
|
58084
|
-
}
|
|
58085
|
-
case "catch": {
|
|
58086
|
-
return false;
|
|
58087
|
-
}
|
|
58088
|
-
case "function": {
|
|
58089
|
-
return false;
|
|
58090
|
-
}
|
|
58931
|
+
return false;
|
|
58091
58932
|
}
|
|
58092
|
-
|
|
58933
|
+
return false;
|
|
58093
58934
|
}
|
|
58094
58935
|
const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
|
|
58095
58936
|
$ZodISODateTime.init(inst, def);
|
|
@@ -58260,6 +59101,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
58260
59101
|
inst.normalize = (...args) => inst.check(_normalize(...args));
|
|
58261
59102
|
inst.toLowerCase = () => inst.check(_toLowerCase());
|
|
58262
59103
|
inst.toUpperCase = () => inst.check(_toUpperCase());
|
|
59104
|
+
inst.slugify = () => inst.check(_slugify());
|
|
58263
59105
|
});
|
|
58264
59106
|
const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
58265
59107
|
$ZodString.init(inst, def);
|
|
@@ -58363,9 +59205,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
58363
59205
|
$ZodBase64.init(inst, def);
|
|
58364
59206
|
ZodStringFormat.init(inst, def);
|
|
58365
59207
|
});
|
|
58366
|
-
function base64(params) {
|
|
58367
|
-
return _base64(ZodBase64, params);
|
|
58368
|
-
}
|
|
58369
59208
|
const ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
|
|
58370
59209
|
$ZodBase64URL.init(inst, def);
|
|
58371
59210
|
ZodStringFormat.init(inst, def);
|
|
@@ -58494,14 +59333,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
58494
59333
|
...normalizeParams(params)
|
|
58495
59334
|
});
|
|
58496
59335
|
}
|
|
58497
|
-
function looseObject(shape2, params) {
|
|
58498
|
-
return new ZodObject({
|
|
58499
|
-
type: "object",
|
|
58500
|
-
shape: shape2,
|
|
58501
|
-
catchall: unknown(),
|
|
58502
|
-
...normalizeParams(params)
|
|
58503
|
-
});
|
|
58504
|
-
}
|
|
58505
59336
|
const ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
58506
59337
|
$ZodUnion.init(inst, def);
|
|
58507
59338
|
ZodType.init(inst, def);
|
|
@@ -59080,22 +59911,35 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
59080
59911
|
}
|
|
59081
59912
|
return "runtime/unknown";
|
|
59082
59913
|
}
|
|
59083
|
-
function
|
|
59084
|
-
|
|
59085
|
-
|
|
59086
|
-
|
|
59914
|
+
function normalizeHeaders(headers) {
|
|
59915
|
+
if (headers == null) {
|
|
59916
|
+
return {};
|
|
59917
|
+
}
|
|
59918
|
+
const normalized = {};
|
|
59919
|
+
if (headers instanceof Headers) {
|
|
59920
|
+
headers.forEach((value2, key2) => {
|
|
59921
|
+
normalized[key2.toLowerCase()] = value2;
|
|
59922
|
+
});
|
|
59923
|
+
} else {
|
|
59924
|
+
if (!Array.isArray(headers)) {
|
|
59925
|
+
headers = Object.entries(headers);
|
|
59926
|
+
}
|
|
59927
|
+
for (const [key2, value2] of headers) {
|
|
59928
|
+
if (value2 != null) {
|
|
59929
|
+
normalized[key2.toLowerCase()] = value2;
|
|
59930
|
+
}
|
|
59931
|
+
}
|
|
59932
|
+
}
|
|
59933
|
+
return normalized;
|
|
59087
59934
|
}
|
|
59088
59935
|
function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
59089
|
-
const
|
|
59090
|
-
headers != null ? headers : {}
|
|
59091
|
-
);
|
|
59092
|
-
const normalizedHeaders = new Headers(cleanedHeaders);
|
|
59936
|
+
const normalizedHeaders = new Headers(normalizeHeaders(headers));
|
|
59093
59937
|
const currentUserAgentHeader = normalizedHeaders.get("user-agent") || "";
|
|
59094
59938
|
normalizedHeaders.set(
|
|
59095
59939
|
"user-agent",
|
|
59096
59940
|
[currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" ")
|
|
59097
59941
|
);
|
|
59098
|
-
return Object.fromEntries(normalizedHeaders);
|
|
59942
|
+
return Object.fromEntries(normalizedHeaders.entries());
|
|
59099
59943
|
}
|
|
59100
59944
|
var suspectProtoRx = /"__proto__"\s*:/;
|
|
59101
59945
|
var suspectConstructorRx = /"constructor"\s*:/;
|
|
@@ -59133,7 +59977,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
59133
59977
|
}
|
|
59134
59978
|
function secureJsonParse(text2) {
|
|
59135
59979
|
const { stackTraceLimit } = Error;
|
|
59136
|
-
|
|
59980
|
+
try {
|
|
59981
|
+
Error.stackTraceLimit = 0;
|
|
59982
|
+
} catch (e) {
|
|
59983
|
+
return _parse(text2);
|
|
59984
|
+
}
|
|
59137
59985
|
try {
|
|
59138
59986
|
return _parse(text2);
|
|
59139
59987
|
} finally {
|
|
@@ -60412,13 +61260,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
60412
61260
|
}
|
|
60413
61261
|
var __defProp = Object.defineProperty;
|
|
60414
61262
|
var __export = (target, all2) => {
|
|
60415
|
-
for (var
|
|
60416
|
-
__defProp(target,
|
|
61263
|
+
for (var name16 in all2)
|
|
61264
|
+
__defProp(target, name16, { get: all2[name16], enumerable: true });
|
|
60417
61265
|
};
|
|
60418
|
-
var
|
|
60419
|
-
var
|
|
60420
|
-
var
|
|
60421
|
-
var
|
|
61266
|
+
var name6 = "AI_NoObjectGeneratedError";
|
|
61267
|
+
var marker6 = `vercel.ai.error.${name6}`;
|
|
61268
|
+
var symbol6 = Symbol.for(marker6);
|
|
61269
|
+
var _a6;
|
|
60422
61270
|
var NoObjectGeneratedError = class extends AISDKError {
|
|
60423
61271
|
constructor({
|
|
60424
61272
|
message: message2 = "No object generated.",
|
|
@@ -60428,19 +61276,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
60428
61276
|
usage,
|
|
60429
61277
|
finishReason
|
|
60430
61278
|
}) {
|
|
60431
|
-
super({ name:
|
|
60432
|
-
this[
|
|
61279
|
+
super({ name: name6, message: message2, cause });
|
|
61280
|
+
this[_a6] = true;
|
|
60433
61281
|
this.text = text2;
|
|
60434
61282
|
this.response = response;
|
|
60435
61283
|
this.usage = usage;
|
|
60436
61284
|
this.finishReason = finishReason;
|
|
60437
61285
|
}
|
|
60438
61286
|
static isInstance(error) {
|
|
60439
|
-
return AISDKError.hasMarker(error,
|
|
61287
|
+
return AISDKError.hasMarker(error, marker6);
|
|
60440
61288
|
}
|
|
60441
61289
|
};
|
|
60442
|
-
|
|
60443
|
-
var VERSION = "5.0.
|
|
61290
|
+
_a6 = symbol6;
|
|
61291
|
+
var VERSION = "5.0.106";
|
|
60444
61292
|
var dataContentSchema = union([
|
|
60445
61293
|
string$2(),
|
|
60446
61294
|
_instanceof(Uint8Array),
|
|
@@ -60448,8 +61296,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
60448
61296
|
custom(
|
|
60449
61297
|
// Buffer might not be available in some environments such as CloudFlare:
|
|
60450
61298
|
(value2) => {
|
|
60451
|
-
var
|
|
60452
|
-
return (_b2 = (
|
|
61299
|
+
var _a16, _b2;
|
|
61300
|
+
return (_b2 = (_a16 = globalThis.Buffer) == null ? void 0 : _a16.isBuffer(value2)) != null ? _b2 : false;
|
|
60453
61301
|
},
|
|
60454
61302
|
{ message: "Must be a Buffer" }
|
|
60455
61303
|
)
|
|
@@ -60728,6 +61576,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
60728
61576
|
}),
|
|
60729
61577
|
strictObject({
|
|
60730
61578
|
type: literal("finish"),
|
|
61579
|
+
finishReason: _enum([
|
|
61580
|
+
"stop",
|
|
61581
|
+
"length",
|
|
61582
|
+
"content-filter",
|
|
61583
|
+
"tool-calls",
|
|
61584
|
+
"error",
|
|
61585
|
+
"other",
|
|
61586
|
+
"unknown"
|
|
61587
|
+
]).optional(),
|
|
60731
61588
|
messageMetadata: unknown().optional()
|
|
60732
61589
|
}),
|
|
60733
61590
|
strictObject({
|
|
@@ -61145,7 +62002,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61145
62002
|
new TransformStream({
|
|
61146
62003
|
async transform(chunk, controller) {
|
|
61147
62004
|
await runUpdateMessageJob(async ({ state, write }) => {
|
|
61148
|
-
var
|
|
62005
|
+
var _a16, _b2, _c, _d;
|
|
61149
62006
|
function getToolInvocation(toolCallId) {
|
|
61150
62007
|
const toolInvocations = state.message.parts.filter(isToolUIPart);
|
|
61151
62008
|
const toolInvocation = toolInvocations.find(
|
|
@@ -61173,7 +62030,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61173
62030
|
return toolInvocation;
|
|
61174
62031
|
}
|
|
61175
62032
|
function updateToolPart(options) {
|
|
61176
|
-
var
|
|
62033
|
+
var _a17;
|
|
61177
62034
|
const part = state.message.parts.find(
|
|
61178
62035
|
(part2) => isToolUIPart(part2) && part2.toolCallId === options.toolCallId
|
|
61179
62036
|
);
|
|
@@ -61186,7 +62043,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61186
62043
|
anyPart.errorText = anyOptions.errorText;
|
|
61187
62044
|
anyPart.rawInput = anyOptions.rawInput;
|
|
61188
62045
|
anyPart.preliminary = anyOptions.preliminary;
|
|
61189
|
-
anyPart.providerExecuted = (
|
|
62046
|
+
anyPart.providerExecuted = (_a17 = anyOptions.providerExecuted) != null ? _a17 : part.providerExecuted;
|
|
61190
62047
|
if (anyOptions.providerMetadata != null && part.state === "input-available") {
|
|
61191
62048
|
part.callProviderMetadata = anyOptions.providerMetadata;
|
|
61192
62049
|
}
|
|
@@ -61206,7 +62063,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61206
62063
|
}
|
|
61207
62064
|
}
|
|
61208
62065
|
function updateDynamicToolPart(options) {
|
|
61209
|
-
var
|
|
62066
|
+
var _a17, _b22;
|
|
61210
62067
|
const part = state.message.parts.find(
|
|
61211
62068
|
(part2) => part2.type === "dynamic-tool" && part2.toolCallId === options.toolCallId
|
|
61212
62069
|
);
|
|
@@ -61218,8 +62075,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61218
62075
|
anyPart.input = anyOptions.input;
|
|
61219
62076
|
anyPart.output = anyOptions.output;
|
|
61220
62077
|
anyPart.errorText = anyOptions.errorText;
|
|
61221
|
-
anyPart.rawInput = (
|
|
62078
|
+
anyPart.rawInput = (_a17 = anyOptions.rawInput) != null ? _a17 : anyPart.rawInput;
|
|
61222
62079
|
anyPart.preliminary = anyOptions.preliminary;
|
|
62080
|
+
anyPart.providerExecuted = (_b22 = anyOptions.providerExecuted) != null ? _b22 : part.providerExecuted;
|
|
61223
62081
|
if (anyOptions.providerMetadata != null && part.state === "input-available") {
|
|
61224
62082
|
part.callProviderMetadata = anyOptions.providerMetadata;
|
|
61225
62083
|
}
|
|
@@ -61233,6 +62091,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61233
62091
|
output: anyOptions.output,
|
|
61234
62092
|
errorText: anyOptions.errorText,
|
|
61235
62093
|
preliminary: anyOptions.preliminary,
|
|
62094
|
+
providerExecuted: anyOptions.providerExecuted,
|
|
61236
62095
|
...anyOptions.providerMetadata != null ? { callProviderMetadata: anyOptions.providerMetadata } : {}
|
|
61237
62096
|
});
|
|
61238
62097
|
}
|
|
@@ -61265,7 +62124,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61265
62124
|
case "text-delta": {
|
|
61266
62125
|
const textPart = state.activeTextParts[chunk.id];
|
|
61267
62126
|
textPart.text += chunk.delta;
|
|
61268
|
-
textPart.providerMetadata = (
|
|
62127
|
+
textPart.providerMetadata = (_a16 = chunk.providerMetadata) != null ? _a16 : textPart.providerMetadata;
|
|
61269
62128
|
write();
|
|
61270
62129
|
break;
|
|
61271
62130
|
}
|
|
@@ -61349,7 +62208,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61349
62208
|
toolCallId: chunk.toolCallId,
|
|
61350
62209
|
toolName: chunk.toolName,
|
|
61351
62210
|
state: "input-streaming",
|
|
61352
|
-
input: void 0
|
|
62211
|
+
input: void 0,
|
|
62212
|
+
providerExecuted: chunk.providerExecuted
|
|
61353
62213
|
});
|
|
61354
62214
|
} else {
|
|
61355
62215
|
updateToolPart({
|
|
@@ -61394,6 +62254,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61394
62254
|
toolName: chunk.toolName,
|
|
61395
62255
|
state: "input-available",
|
|
61396
62256
|
input: chunk.input,
|
|
62257
|
+
providerExecuted: chunk.providerExecuted,
|
|
61397
62258
|
providerMetadata: chunk.providerMetadata
|
|
61398
62259
|
});
|
|
61399
62260
|
} else {
|
|
@@ -61422,6 +62283,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61422
62283
|
state: "output-error",
|
|
61423
62284
|
input: chunk.input,
|
|
61424
62285
|
errorText: chunk.errorText,
|
|
62286
|
+
providerExecuted: chunk.providerExecuted,
|
|
61425
62287
|
providerMetadata: chunk.providerMetadata
|
|
61426
62288
|
});
|
|
61427
62289
|
} else {
|
|
@@ -61477,7 +62339,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61477
62339
|
toolName: toolInvocation.toolName,
|
|
61478
62340
|
state: "output-error",
|
|
61479
62341
|
input: toolInvocation.input,
|
|
61480
|
-
errorText: chunk.errorText
|
|
62342
|
+
errorText: chunk.errorText,
|
|
62343
|
+
providerExecuted: chunk.providerExecuted
|
|
61481
62344
|
});
|
|
61482
62345
|
} else {
|
|
61483
62346
|
const toolInvocation = getToolInvocation(chunk.toolCallId);
|
|
@@ -61487,7 +62350,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61487
62350
|
state: "output-error",
|
|
61488
62351
|
input: toolInvocation.input,
|
|
61489
62352
|
rawInput: toolInvocation.rawInput,
|
|
61490
|
-
errorText: chunk.errorText
|
|
62353
|
+
errorText: chunk.errorText,
|
|
62354
|
+
providerExecuted: chunk.providerExecuted
|
|
61491
62355
|
});
|
|
61492
62356
|
}
|
|
61493
62357
|
write();
|
|
@@ -61513,6 +62377,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61513
62377
|
break;
|
|
61514
62378
|
}
|
|
61515
62379
|
case "finish": {
|
|
62380
|
+
if (chunk.finishReason != null) {
|
|
62381
|
+
state.finishReason = chunk.finishReason;
|
|
62382
|
+
}
|
|
61516
62383
|
await updateMessageMetadata(chunk.messageMetadata);
|
|
61517
62384
|
if (chunk.messageMetadata != null) {
|
|
61518
62385
|
write();
|
|
@@ -61688,130 +62555,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61688
62555
|
}
|
|
61689
62556
|
};
|
|
61690
62557
|
};
|
|
61691
|
-
var ClientOrServerImplementationSchema = looseObject({
|
|
61692
|
-
name: string$2(),
|
|
61693
|
-
version: string$2()
|
|
61694
|
-
});
|
|
61695
|
-
var BaseParamsSchema = looseObject({
|
|
61696
|
-
_meta: optional(object$1({}).loose())
|
|
61697
|
-
});
|
|
61698
|
-
var ResultSchema = BaseParamsSchema;
|
|
61699
|
-
var RequestSchema = object$1({
|
|
61700
|
-
method: string$2(),
|
|
61701
|
-
params: optional(BaseParamsSchema)
|
|
61702
|
-
});
|
|
61703
|
-
var ServerCapabilitiesSchema = looseObject({
|
|
61704
|
-
experimental: optional(object$1({}).loose()),
|
|
61705
|
-
logging: optional(object$1({}).loose()),
|
|
61706
|
-
prompts: optional(
|
|
61707
|
-
looseObject({
|
|
61708
|
-
listChanged: optional(boolean$1())
|
|
61709
|
-
})
|
|
61710
|
-
),
|
|
61711
|
-
resources: optional(
|
|
61712
|
-
looseObject({
|
|
61713
|
-
subscribe: optional(boolean$1()),
|
|
61714
|
-
listChanged: optional(boolean$1())
|
|
61715
|
-
})
|
|
61716
|
-
),
|
|
61717
|
-
tools: optional(
|
|
61718
|
-
looseObject({
|
|
61719
|
-
listChanged: optional(boolean$1())
|
|
61720
|
-
})
|
|
61721
|
-
)
|
|
61722
|
-
});
|
|
61723
|
-
ResultSchema.extend({
|
|
61724
|
-
protocolVersion: string$2(),
|
|
61725
|
-
capabilities: ServerCapabilitiesSchema,
|
|
61726
|
-
serverInfo: ClientOrServerImplementationSchema,
|
|
61727
|
-
instructions: optional(string$2())
|
|
61728
|
-
});
|
|
61729
|
-
var PaginatedResultSchema = ResultSchema.extend({
|
|
61730
|
-
nextCursor: optional(string$2())
|
|
61731
|
-
});
|
|
61732
|
-
var ToolSchema = object$1({
|
|
61733
|
-
name: string$2(),
|
|
61734
|
-
description: optional(string$2()),
|
|
61735
|
-
inputSchema: object$1({
|
|
61736
|
-
type: literal("object"),
|
|
61737
|
-
properties: optional(object$1({}).loose())
|
|
61738
|
-
}).loose()
|
|
61739
|
-
}).loose();
|
|
61740
|
-
PaginatedResultSchema.extend({
|
|
61741
|
-
tools: array(ToolSchema)
|
|
61742
|
-
});
|
|
61743
|
-
var TextContentSchema = object$1({
|
|
61744
|
-
type: literal("text"),
|
|
61745
|
-
text: string$2()
|
|
61746
|
-
}).loose();
|
|
61747
|
-
var ImageContentSchema = object$1({
|
|
61748
|
-
type: literal("image"),
|
|
61749
|
-
data: base64(),
|
|
61750
|
-
mimeType: string$2()
|
|
61751
|
-
}).loose();
|
|
61752
|
-
var ResourceContentsSchema = object$1({
|
|
61753
|
-
/**
|
|
61754
|
-
* The URI of this resource.
|
|
61755
|
-
*/
|
|
61756
|
-
uri: string$2(),
|
|
61757
|
-
/**
|
|
61758
|
-
* The MIME type of this resource, if known.
|
|
61759
|
-
*/
|
|
61760
|
-
mimeType: optional(string$2())
|
|
61761
|
-
}).loose();
|
|
61762
|
-
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
61763
|
-
text: string$2()
|
|
61764
|
-
});
|
|
61765
|
-
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
61766
|
-
blob: base64()
|
|
61767
|
-
});
|
|
61768
|
-
var EmbeddedResourceSchema = object$1({
|
|
61769
|
-
type: literal("resource"),
|
|
61770
|
-
resource: union([TextResourceContentsSchema, BlobResourceContentsSchema])
|
|
61771
|
-
}).loose();
|
|
61772
|
-
ResultSchema.extend({
|
|
61773
|
-
content: array(
|
|
61774
|
-
union([TextContentSchema, ImageContentSchema, EmbeddedResourceSchema])
|
|
61775
|
-
),
|
|
61776
|
-
isError: boolean$1().default(false).optional()
|
|
61777
|
-
}).or(
|
|
61778
|
-
ResultSchema.extend({
|
|
61779
|
-
toolResult: unknown()
|
|
61780
|
-
})
|
|
61781
|
-
);
|
|
61782
|
-
var JSONRPC_VERSION = "2.0";
|
|
61783
|
-
var JSONRPCRequestSchema = object$1({
|
|
61784
|
-
jsonrpc: literal(JSONRPC_VERSION),
|
|
61785
|
-
id: union([string$2(), number$1().int()])
|
|
61786
|
-
}).merge(RequestSchema).strict();
|
|
61787
|
-
var JSONRPCResponseSchema = object$1({
|
|
61788
|
-
jsonrpc: literal(JSONRPC_VERSION),
|
|
61789
|
-
id: union([string$2(), number$1().int()]),
|
|
61790
|
-
result: ResultSchema
|
|
61791
|
-
}).strict();
|
|
61792
|
-
var JSONRPCErrorSchema = object$1({
|
|
61793
|
-
jsonrpc: literal(JSONRPC_VERSION),
|
|
61794
|
-
id: union([string$2(), number$1().int()]),
|
|
61795
|
-
error: object$1({
|
|
61796
|
-
code: number$1().int(),
|
|
61797
|
-
message: string$2(),
|
|
61798
|
-
data: optional(unknown())
|
|
61799
|
-
})
|
|
61800
|
-
}).strict();
|
|
61801
|
-
var JSONRPCNotificationSchema = object$1({
|
|
61802
|
-
jsonrpc: literal(JSONRPC_VERSION)
|
|
61803
|
-
}).merge(
|
|
61804
|
-
object$1({
|
|
61805
|
-
method: string$2(),
|
|
61806
|
-
params: optional(BaseParamsSchema)
|
|
61807
|
-
})
|
|
61808
|
-
).strict();
|
|
61809
|
-
union([
|
|
61810
|
-
JSONRPCRequestSchema,
|
|
61811
|
-
JSONRPCNotificationSchema,
|
|
61812
|
-
JSONRPCResponseSchema,
|
|
61813
|
-
JSONRPCErrorSchema
|
|
61814
|
-
]);
|
|
61815
62558
|
async function convertFileListToFileUIParts(files) {
|
|
61816
62559
|
if (files == null) {
|
|
61817
62560
|
return [];
|
|
@@ -61821,12 +62564,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61821
62564
|
}
|
|
61822
62565
|
return Promise.all(
|
|
61823
62566
|
Array.from(files).map(async (file) => {
|
|
61824
|
-
const { name:
|
|
62567
|
+
const { name: name16, type } = file;
|
|
61825
62568
|
const dataUrl = await new Promise((resolve2, reject) => {
|
|
61826
62569
|
const reader = new FileReader();
|
|
61827
62570
|
reader.onload = (readerEvent) => {
|
|
61828
|
-
var
|
|
61829
|
-
resolve2((
|
|
62571
|
+
var _a16;
|
|
62572
|
+
resolve2((_a16 = readerEvent.target) == null ? void 0 : _a16.result);
|
|
61830
62573
|
};
|
|
61831
62574
|
reader.onerror = (error) => reject(error);
|
|
61832
62575
|
reader.readAsDataURL(file);
|
|
@@ -61834,7 +62577,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61834
62577
|
return {
|
|
61835
62578
|
type: "file",
|
|
61836
62579
|
mediaType: type,
|
|
61837
|
-
filename:
|
|
62580
|
+
filename: name16,
|
|
61838
62581
|
url: dataUrl
|
|
61839
62582
|
};
|
|
61840
62583
|
})
|
|
@@ -61862,23 +62605,27 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61862
62605
|
abortSignal,
|
|
61863
62606
|
...options
|
|
61864
62607
|
}) {
|
|
61865
|
-
var
|
|
62608
|
+
var _a16, _b2, _c, _d, _e;
|
|
61866
62609
|
const resolvedBody = await resolve(this.body);
|
|
61867
62610
|
const resolvedHeaders = await resolve(this.headers);
|
|
61868
62611
|
const resolvedCredentials = await resolve(this.credentials);
|
|
61869
|
-
const
|
|
62612
|
+
const baseHeaders = {
|
|
62613
|
+
...normalizeHeaders(resolvedHeaders),
|
|
62614
|
+
...normalizeHeaders(options.headers)
|
|
62615
|
+
};
|
|
62616
|
+
const preparedRequest = await ((_a16 = this.prepareSendMessagesRequest) == null ? void 0 : _a16.call(this, {
|
|
61870
62617
|
api: this.api,
|
|
61871
62618
|
id: options.chatId,
|
|
61872
62619
|
messages: options.messages,
|
|
61873
62620
|
body: { ...resolvedBody, ...options.body },
|
|
61874
|
-
headers:
|
|
62621
|
+
headers: baseHeaders,
|
|
61875
62622
|
credentials: resolvedCredentials,
|
|
61876
62623
|
requestMetadata: options.metadata,
|
|
61877
62624
|
trigger: options.trigger,
|
|
61878
62625
|
messageId: options.messageId
|
|
61879
62626
|
}));
|
|
61880
62627
|
const api2 = (_b2 = preparedRequest == null ? void 0 : preparedRequest.api) != null ? _b2 : this.api;
|
|
61881
|
-
const headers = (preparedRequest == null ? void 0 : preparedRequest.headers) !== void 0 ? preparedRequest.headers :
|
|
62628
|
+
const headers = (preparedRequest == null ? void 0 : preparedRequest.headers) !== void 0 ? normalizeHeaders(preparedRequest.headers) : baseHeaders;
|
|
61882
62629
|
const body = (preparedRequest == null ? void 0 : preparedRequest.body) !== void 0 ? preparedRequest.body : {
|
|
61883
62630
|
...resolvedBody,
|
|
61884
62631
|
...options.body,
|
|
@@ -61914,20 +62661,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61914
62661
|
return this.processResponseStream(response.body);
|
|
61915
62662
|
}
|
|
61916
62663
|
async reconnectToStream(options) {
|
|
61917
|
-
var
|
|
62664
|
+
var _a16, _b2, _c, _d, _e;
|
|
61918
62665
|
const resolvedBody = await resolve(this.body);
|
|
61919
62666
|
const resolvedHeaders = await resolve(this.headers);
|
|
61920
62667
|
const resolvedCredentials = await resolve(this.credentials);
|
|
61921
|
-
const
|
|
62668
|
+
const baseHeaders = {
|
|
62669
|
+
...normalizeHeaders(resolvedHeaders),
|
|
62670
|
+
...normalizeHeaders(options.headers)
|
|
62671
|
+
};
|
|
62672
|
+
const preparedRequest = await ((_a16 = this.prepareReconnectToStreamRequest) == null ? void 0 : _a16.call(this, {
|
|
61922
62673
|
api: this.api,
|
|
61923
62674
|
id: options.chatId,
|
|
61924
62675
|
body: { ...resolvedBody, ...options.body },
|
|
61925
|
-
headers:
|
|
62676
|
+
headers: baseHeaders,
|
|
61926
62677
|
credentials: resolvedCredentials,
|
|
61927
62678
|
requestMetadata: options.metadata
|
|
61928
62679
|
}));
|
|
61929
62680
|
const api2 = (_b2 = preparedRequest == null ? void 0 : preparedRequest.api) != null ? _b2 : `${this.api}/${options.chatId}/stream`;
|
|
61930
|
-
const headers = (preparedRequest == null ? void 0 : preparedRequest.headers) !== void 0 ? preparedRequest.headers :
|
|
62681
|
+
const headers = (preparedRequest == null ? void 0 : preparedRequest.headers) !== void 0 ? normalizeHeaders(preparedRequest.headers) : baseHeaders;
|
|
61931
62682
|
const credentials2 = (_c = preparedRequest == null ? void 0 : preparedRequest.credentials) != null ? _c : resolvedCredentials;
|
|
61932
62683
|
const fetch2 = (_d = this.fetch) != null ? _d : globalThis.fetch;
|
|
61933
62684
|
const response = await fetch2(api2, {
|
|
@@ -61990,11 +62741,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61990
62741
|
this.activeResponse = void 0;
|
|
61991
62742
|
this.jobExecutor = new SerialJobExecutor();
|
|
61992
62743
|
this.sendMessage = async (message2, options) => {
|
|
61993
|
-
var
|
|
62744
|
+
var _a16, _b2, _c, _d;
|
|
61994
62745
|
if (message2 == null) {
|
|
61995
62746
|
await this.makeRequest({
|
|
61996
62747
|
trigger: "submit-message",
|
|
61997
|
-
messageId: (
|
|
62748
|
+
messageId: (_a16 = this.lastMessage) == null ? void 0 : _a16.id,
|
|
61998
62749
|
...options
|
|
61999
62750
|
});
|
|
62000
62751
|
return;
|
|
@@ -62072,14 +62823,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
62072
62823
|
this.setStatus({ status: "ready" });
|
|
62073
62824
|
}
|
|
62074
62825
|
};
|
|
62075
|
-
this.
|
|
62826
|
+
this.addToolOutput = async ({
|
|
62076
62827
|
state: state2 = "output-available",
|
|
62077
|
-
tool:
|
|
62828
|
+
tool: tool2,
|
|
62078
62829
|
toolCallId,
|
|
62079
62830
|
output,
|
|
62080
62831
|
errorText
|
|
62081
62832
|
}) => this.jobExecutor.run(async () => {
|
|
62082
|
-
var
|
|
62833
|
+
var _a16, _b2;
|
|
62083
62834
|
const messages = this.state.messages;
|
|
62084
62835
|
const lastMessage = messages[messages.length - 1];
|
|
62085
62836
|
this.state.replaceMessage(messages.length - 1, {
|
|
@@ -62098,18 +62849,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
62098
62849
|
} : part
|
|
62099
62850
|
);
|
|
62100
62851
|
}
|
|
62101
|
-
if (this.status !== "streaming" && this.status !== "submitted" && ((
|
|
62852
|
+
if (this.status !== "streaming" && this.status !== "submitted" && ((_a16 = this.sendAutomaticallyWhen) == null ? void 0 : _a16.call(this, { messages: this.state.messages }))) {
|
|
62102
62853
|
this.makeRequest({
|
|
62103
62854
|
trigger: "submit-message",
|
|
62104
62855
|
messageId: (_b2 = this.lastMessage) == null ? void 0 : _b2.id
|
|
62105
62856
|
});
|
|
62106
62857
|
}
|
|
62107
62858
|
});
|
|
62859
|
+
this.addToolResult = this.addToolOutput;
|
|
62108
62860
|
this.stop = async () => {
|
|
62109
|
-
var
|
|
62861
|
+
var _a16;
|
|
62110
62862
|
if (this.status !== "streaming" && this.status !== "submitted")
|
|
62111
62863
|
return;
|
|
62112
|
-
if ((
|
|
62864
|
+
if ((_a16 = this.activeResponse) == null ? void 0 : _a16.abortController) {
|
|
62113
62865
|
this.activeResponse.abortController.abort();
|
|
62114
62866
|
}
|
|
62115
62867
|
};
|
|
@@ -62164,7 +62916,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
62164
62916
|
body,
|
|
62165
62917
|
messageId
|
|
62166
62918
|
}) {
|
|
62167
|
-
var
|
|
62919
|
+
var _a16, _b2, _c, _d;
|
|
62168
62920
|
this.setStatus({ status: "submitted", error: void 0 });
|
|
62169
62921
|
const lastMessage = this.lastMessage;
|
|
62170
62922
|
let isAbort = false;
|
|
@@ -62213,9 +62965,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
62213
62965
|
() => job({
|
|
62214
62966
|
state: activeResponse.state,
|
|
62215
62967
|
write: () => {
|
|
62216
|
-
var
|
|
62968
|
+
var _a17;
|
|
62217
62969
|
this.setStatus({ status: "streaming" });
|
|
62218
|
-
const replaceLastMessage = activeResponse.state.message.id === ((
|
|
62970
|
+
const replaceLastMessage = activeResponse.state.message.id === ((_a17 = this.lastMessage) == null ? void 0 : _a17.id);
|
|
62219
62971
|
if (replaceLastMessage) {
|
|
62220
62972
|
this.state.replaceMessage(
|
|
62221
62973
|
this.state.messages.length - 1,
|
|
@@ -62261,22 +63013,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
62261
63013
|
this.setStatus({ status: "error", error: err });
|
|
62262
63014
|
} finally {
|
|
62263
63015
|
try {
|
|
62264
|
-
(
|
|
63016
|
+
(_b2 = this.onFinish) == null ? void 0 : _b2.call(this, {
|
|
62265
63017
|
message: this.activeResponse.state.message,
|
|
62266
63018
|
messages: this.state.messages,
|
|
62267
63019
|
isAbort,
|
|
62268
63020
|
isDisconnect,
|
|
62269
|
-
isError
|
|
63021
|
+
isError,
|
|
63022
|
+
finishReason: (_a16 = this.activeResponse) == null ? void 0 : _a16.state.finishReason
|
|
62270
63023
|
});
|
|
62271
63024
|
} catch (err) {
|
|
62272
63025
|
console.error(err);
|
|
62273
63026
|
}
|
|
62274
63027
|
this.activeResponse = void 0;
|
|
62275
63028
|
}
|
|
62276
|
-
if (((
|
|
63029
|
+
if (((_c = this.sendAutomaticallyWhen) == null ? void 0 : _c.call(this, { messages: this.state.messages })) && !isError) {
|
|
62277
63030
|
await this.makeRequest({
|
|
62278
63031
|
trigger: "submit-message",
|
|
62279
|
-
messageId: (
|
|
63032
|
+
messageId: (_d = this.lastMessage) == null ? void 0 : _d.id,
|
|
62280
63033
|
metadata,
|
|
62281
63034
|
headers,
|
|
62282
63035
|
body
|
|
@@ -62497,7 +63250,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
62497
63250
|
error,
|
|
62498
63251
|
resumeStream: chatRef.current.resumeStream,
|
|
62499
63252
|
status,
|
|
62500
|
-
|
|
63253
|
+
/**
|
|
63254
|
+
* @deprecated Use `addToolOutput` instead.
|
|
63255
|
+
*/
|
|
63256
|
+
addToolResult: chatRef.current.addToolOutput,
|
|
63257
|
+
addToolOutput: chatRef.current.addToolOutput
|
|
62501
63258
|
};
|
|
62502
63259
|
}
|
|
62503
63260
|
function ok$1() {
|
|
@@ -63732,12 +64489,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
63732
64489
|
function stringify(values2) {
|
|
63733
64490
|
return values2.join(" ").trim();
|
|
63734
64491
|
}
|
|
63735
|
-
var cjs$
|
|
63736
|
-
var
|
|
63737
|
-
var
|
|
63738
|
-
function
|
|
63739
|
-
if (
|
|
63740
|
-
|
|
64492
|
+
var cjs$2 = {};
|
|
64493
|
+
var cjs$1;
|
|
64494
|
+
var hasRequiredCjs$2;
|
|
64495
|
+
function requireCjs$2() {
|
|
64496
|
+
if (hasRequiredCjs$2) return cjs$1;
|
|
64497
|
+
hasRequiredCjs$2 = 1;
|
|
63741
64498
|
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
|
63742
64499
|
var NEWLINE_REGEX = /\n/g;
|
|
63743
64500
|
var WHITESPACE_REGEX = /^\s*/;
|
|
@@ -63752,7 +64509,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
63752
64509
|
var EMPTY_STRING = "";
|
|
63753
64510
|
var TYPE_COMMENT = "comment";
|
|
63754
64511
|
var TYPE_DECLARATION = "declaration";
|
|
63755
|
-
|
|
64512
|
+
function index2(style2, options) {
|
|
63756
64513
|
if (typeof style2 !== "string") {
|
|
63757
64514
|
throw new TypeError("First argument must be a string");
|
|
63758
64515
|
}
|
|
@@ -63865,22 +64622,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
63865
64622
|
}
|
|
63866
64623
|
whitespace2();
|
|
63867
64624
|
return declarations();
|
|
63868
|
-
}
|
|
64625
|
+
}
|
|
63869
64626
|
function trim2(str) {
|
|
63870
64627
|
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
|
|
63871
64628
|
}
|
|
63872
|
-
|
|
64629
|
+
cjs$1 = index2;
|
|
64630
|
+
return cjs$1;
|
|
63873
64631
|
}
|
|
63874
64632
|
var hasRequiredCjs$1;
|
|
63875
64633
|
function requireCjs$1() {
|
|
63876
|
-
if (hasRequiredCjs$1) return cjs$
|
|
64634
|
+
if (hasRequiredCjs$1) return cjs$2;
|
|
63877
64635
|
hasRequiredCjs$1 = 1;
|
|
63878
|
-
var __importDefault = cjs$
|
|
64636
|
+
var __importDefault = cjs$2 && cjs$2.__importDefault || function(mod) {
|
|
63879
64637
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
63880
64638
|
};
|
|
63881
|
-
Object.defineProperty(cjs$
|
|
63882
|
-
cjs$
|
|
63883
|
-
const inline_style_parser_1 = __importDefault(
|
|
64639
|
+
Object.defineProperty(cjs$2, "__esModule", { value: true });
|
|
64640
|
+
cjs$2.default = StyleToObject;
|
|
64641
|
+
const inline_style_parser_1 = __importDefault(requireCjs$2());
|
|
63884
64642
|
function StyleToObject(style2, iterator2) {
|
|
63885
64643
|
let styleObject = null;
|
|
63886
64644
|
if (!style2 || typeof style2 !== "string") {
|
|
@@ -63902,7 +64660,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
63902
64660
|
});
|
|
63903
64661
|
return styleObject;
|
|
63904
64662
|
}
|
|
63905
|
-
return cjs$
|
|
64663
|
+
return cjs$2;
|
|
63906
64664
|
}
|
|
63907
64665
|
var utilities = {};
|
|
63908
64666
|
var hasRequiredUtilities;
|
|
@@ -69299,8 +70057,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
69299
70057
|
function code$2(state, node2) {
|
|
69300
70058
|
const value2 = node2.value ? node2.value + "\n" : "";
|
|
69301
70059
|
const properties = {};
|
|
69302
|
-
|
|
69303
|
-
|
|
70060
|
+
const language = node2.lang ? node2.lang.split(/\s+/) : [];
|
|
70061
|
+
if (language.length > 0) {
|
|
70062
|
+
properties.className = ["language-" + language[0]];
|
|
69304
70063
|
}
|
|
69305
70064
|
let result = {
|
|
69306
70065
|
type: "element",
|
|
@@ -76806,8 +77565,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
76806
77565
|
return schema + "://" + this._hostname() + this._port() + this.opts.path + this._query(query);
|
|
76807
77566
|
}
|
|
76808
77567
|
_hostname() {
|
|
76809
|
-
const
|
|
76810
|
-
return
|
|
77568
|
+
const hostname = this.opts.hostname;
|
|
77569
|
+
return hostname.indexOf(":") === -1 ? hostname : "[" + hostname + "]";
|
|
76811
77570
|
}
|
|
76812
77571
|
_port() {
|
|
76813
77572
|
if (this.opts.port && (this.opts.secure && Number(this.opts.port !== 443) || !this.opts.secure && Number(this.opts.port) !== 80)) {
|