@lvce-editor/preview-sandbox-worker 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/previewSandBoxWorkerMain.js +102 -102
- package/package.json +1 -1
|
@@ -2232,7 +2232,7 @@ var hasRequiredLib;
|
|
|
2232
2232
|
function requireLib () {
|
|
2233
2233
|
if (hasRequiredLib) return lib;
|
|
2234
2234
|
hasRequiredLib = 1;
|
|
2235
|
-
(function (exports
|
|
2235
|
+
(function (exports) {
|
|
2236
2236
|
|
|
2237
2237
|
function makeException(ErrorType, message, options) {
|
|
2238
2238
|
if (options.globals) {
|
|
@@ -2367,51 +2367,51 @@ function requireLib () {
|
|
|
2367
2367
|
return Number(xBigInt);
|
|
2368
2368
|
};
|
|
2369
2369
|
}
|
|
2370
|
-
exports
|
|
2370
|
+
exports.any = value => {
|
|
2371
2371
|
return value;
|
|
2372
2372
|
};
|
|
2373
|
-
exports
|
|
2373
|
+
exports.undefined = () => {
|
|
2374
2374
|
return undefined;
|
|
2375
2375
|
};
|
|
2376
|
-
exports
|
|
2376
|
+
exports.boolean = value => {
|
|
2377
2377
|
return Boolean(value);
|
|
2378
2378
|
};
|
|
2379
|
-
exports
|
|
2379
|
+
exports.byte = createIntegerConversion(8, {
|
|
2380
2380
|
unsigned: false
|
|
2381
2381
|
});
|
|
2382
|
-
exports
|
|
2382
|
+
exports.octet = createIntegerConversion(8, {
|
|
2383
2383
|
unsigned: true
|
|
2384
2384
|
});
|
|
2385
|
-
exports
|
|
2385
|
+
exports.short = createIntegerConversion(16, {
|
|
2386
2386
|
unsigned: false
|
|
2387
2387
|
});
|
|
2388
|
-
exports
|
|
2388
|
+
exports["unsigned short"] = createIntegerConversion(16, {
|
|
2389
2389
|
unsigned: true
|
|
2390
2390
|
});
|
|
2391
|
-
exports
|
|
2391
|
+
exports.long = createIntegerConversion(32, {
|
|
2392
2392
|
unsigned: false
|
|
2393
2393
|
});
|
|
2394
|
-
exports
|
|
2394
|
+
exports["unsigned long"] = createIntegerConversion(32, {
|
|
2395
2395
|
unsigned: true
|
|
2396
2396
|
});
|
|
2397
|
-
exports
|
|
2397
|
+
exports["long long"] = createLongLongConversion(64, {
|
|
2398
2398
|
unsigned: false
|
|
2399
2399
|
});
|
|
2400
|
-
exports
|
|
2400
|
+
exports["unsigned long long"] = createLongLongConversion(64, {
|
|
2401
2401
|
unsigned: true
|
|
2402
2402
|
});
|
|
2403
|
-
exports
|
|
2403
|
+
exports.double = (value, options = {}) => {
|
|
2404
2404
|
const x = toNumber(value, options);
|
|
2405
2405
|
if (!Number.isFinite(x)) {
|
|
2406
2406
|
throw makeException(TypeError, "is not a finite floating-point value", options);
|
|
2407
2407
|
}
|
|
2408
2408
|
return x;
|
|
2409
2409
|
};
|
|
2410
|
-
exports
|
|
2410
|
+
exports["unrestricted double"] = (value, options = {}) => {
|
|
2411
2411
|
const x = toNumber(value, options);
|
|
2412
2412
|
return x;
|
|
2413
2413
|
};
|
|
2414
|
-
exports
|
|
2414
|
+
exports.float = (value, options = {}) => {
|
|
2415
2415
|
const x = toNumber(value, options);
|
|
2416
2416
|
if (!Number.isFinite(x)) {
|
|
2417
2417
|
throw makeException(TypeError, "is not a finite floating-point value", options);
|
|
@@ -2425,7 +2425,7 @@ function requireLib () {
|
|
|
2425
2425
|
}
|
|
2426
2426
|
return y;
|
|
2427
2427
|
};
|
|
2428
|
-
exports
|
|
2428
|
+
exports["unrestricted float"] = (value, options = {}) => {
|
|
2429
2429
|
const x = toNumber(value, options);
|
|
2430
2430
|
if (isNaN(x)) {
|
|
2431
2431
|
return x;
|
|
@@ -2435,7 +2435,7 @@ function requireLib () {
|
|
|
2435
2435
|
}
|
|
2436
2436
|
return Math.fround(x);
|
|
2437
2437
|
};
|
|
2438
|
-
exports
|
|
2438
|
+
exports.DOMString = (value, options = {}) => {
|
|
2439
2439
|
if (options.treatNullAsEmptyString && value === null) {
|
|
2440
2440
|
return "";
|
|
2441
2441
|
}
|
|
@@ -2445,8 +2445,8 @@ function requireLib () {
|
|
|
2445
2445
|
const StringCtor = options.globals ? options.globals.String : String;
|
|
2446
2446
|
return StringCtor(value);
|
|
2447
2447
|
};
|
|
2448
|
-
exports
|
|
2449
|
-
const x = exports
|
|
2448
|
+
exports.ByteString = (value, options = {}) => {
|
|
2449
|
+
const x = exports.DOMString(value, options);
|
|
2450
2450
|
let c;
|
|
2451
2451
|
for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {
|
|
2452
2452
|
if (c > 255) {
|
|
@@ -2455,8 +2455,8 @@ function requireLib () {
|
|
|
2455
2455
|
}
|
|
2456
2456
|
return x;
|
|
2457
2457
|
};
|
|
2458
|
-
exports
|
|
2459
|
-
const S = exports
|
|
2458
|
+
exports.USVString = (value, options = {}) => {
|
|
2459
|
+
const S = exports.DOMString(value, options);
|
|
2460
2460
|
const n = S.length;
|
|
2461
2461
|
const U = [];
|
|
2462
2462
|
for (let i = 0; i < n; ++i) {
|
|
@@ -2481,7 +2481,7 @@ function requireLib () {
|
|
|
2481
2481
|
}
|
|
2482
2482
|
return U.join("");
|
|
2483
2483
|
};
|
|
2484
|
-
exports
|
|
2484
|
+
exports.object = (value, options = {}) => {
|
|
2485
2485
|
if (value === null || typeof value !== "object" && typeof value !== "function") {
|
|
2486
2486
|
throw makeException(TypeError, "is not an object", options);
|
|
2487
2487
|
}
|
|
@@ -2516,7 +2516,7 @@ function requireLib () {
|
|
|
2516
2516
|
return true;
|
|
2517
2517
|
}
|
|
2518
2518
|
}
|
|
2519
|
-
exports
|
|
2519
|
+
exports.ArrayBuffer = (value, options = {}) => {
|
|
2520
2520
|
if (!isNonSharedArrayBuffer(value)) {
|
|
2521
2521
|
if (options.allowShared && !isSharedArrayBuffer(value)) {
|
|
2522
2522
|
throw makeException(TypeError, "is not an ArrayBuffer or SharedArrayBuffer", options);
|
|
@@ -2529,7 +2529,7 @@ function requireLib () {
|
|
|
2529
2529
|
return value;
|
|
2530
2530
|
};
|
|
2531
2531
|
const dvByteLengthGetter = Object.getOwnPropertyDescriptor(DataView.prototype, "byteLength").get;
|
|
2532
|
-
exports
|
|
2532
|
+
exports.DataView = (value, options = {}) => {
|
|
2533
2533
|
try {
|
|
2534
2534
|
dvByteLengthGetter.call(value);
|
|
2535
2535
|
} catch (e) {
|
|
@@ -2554,7 +2554,7 @@ function requireLib () {
|
|
|
2554
2554
|
name
|
|
2555
2555
|
} = func;
|
|
2556
2556
|
const article = /^[AEIOU]/u.test(name) ? "an" : "a";
|
|
2557
|
-
exports
|
|
2557
|
+
exports[name] = (value, options = {}) => {
|
|
2558
2558
|
if (!ArrayBuffer.isView(value) || typedArrayNameGetter.call(value) !== name) {
|
|
2559
2559
|
throw makeException(TypeError, `is not ${article} ${name} object`, options);
|
|
2560
2560
|
}
|
|
@@ -2570,7 +2570,7 @@ function requireLib () {
|
|
|
2570
2570
|
|
|
2571
2571
|
// Common definitions
|
|
2572
2572
|
|
|
2573
|
-
exports
|
|
2573
|
+
exports.ArrayBufferView = (value, options = {}) => {
|
|
2574
2574
|
if (!ArrayBuffer.isView(value)) {
|
|
2575
2575
|
throw makeException(TypeError, "is not a view on an ArrayBuffer or SharedArrayBuffer", options);
|
|
2576
2576
|
}
|
|
@@ -2582,7 +2582,7 @@ function requireLib () {
|
|
|
2582
2582
|
}
|
|
2583
2583
|
return value;
|
|
2584
2584
|
};
|
|
2585
|
-
exports
|
|
2585
|
+
exports.BufferSource = (value, options = {}) => {
|
|
2586
2586
|
if (ArrayBuffer.isView(value)) {
|
|
2587
2587
|
if (!options.allowShared && isSharedArrayBuffer(value.buffer)) {
|
|
2588
2588
|
throw makeException(TypeError, "is a view on a SharedArrayBuffer, which is not allowed", options);
|
|
@@ -2603,7 +2603,7 @@ function requireLib () {
|
|
|
2603
2603
|
}
|
|
2604
2604
|
return value;
|
|
2605
2605
|
};
|
|
2606
|
-
exports
|
|
2606
|
+
exports.DOMTimeStamp = exports["unsigned long long"];
|
|
2607
2607
|
} (lib));
|
|
2608
2608
|
return lib;
|
|
2609
2609
|
}
|
|
@@ -2615,7 +2615,7 @@ var hasRequiredUtils$1;
|
|
|
2615
2615
|
function requireUtils$1 () {
|
|
2616
2616
|
if (hasRequiredUtils$1) return utils$1.exports;
|
|
2617
2617
|
hasRequiredUtils$1 = 1;
|
|
2618
|
-
(function (module, exports
|
|
2618
|
+
(function (module, exports) {
|
|
2619
2619
|
|
|
2620
2620
|
// Returns "Type(value) is Object" in ES terminology.
|
|
2621
2621
|
function isObject(value) {
|
|
@@ -53754,7 +53754,7 @@ var hasRequiredURLSearchParams;
|
|
|
53754
53754
|
function requireURLSearchParams () {
|
|
53755
53755
|
if (hasRequiredURLSearchParams) return URLSearchParams;
|
|
53756
53756
|
hasRequiredURLSearchParams = 1;
|
|
53757
|
-
(function (exports
|
|
53757
|
+
(function (exports) {
|
|
53758
53758
|
|
|
53759
53759
|
const conversions = requireLib();
|
|
53760
53760
|
const utils = requireUtils$1();
|
|
@@ -53763,21 +53763,21 @@ function requireURLSearchParams () {
|
|
|
53763
53763
|
const implSymbol = utils.implSymbol;
|
|
53764
53764
|
const ctorRegistrySymbol = utils.ctorRegistrySymbol;
|
|
53765
53765
|
const interfaceName = "URLSearchParams";
|
|
53766
|
-
exports
|
|
53766
|
+
exports.is = value => {
|
|
53767
53767
|
return utils.isObject(value) && utils.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;
|
|
53768
53768
|
};
|
|
53769
|
-
exports
|
|
53769
|
+
exports.isImpl = value => {
|
|
53770
53770
|
return utils.isObject(value) && value instanceof Impl.implementation;
|
|
53771
53771
|
};
|
|
53772
|
-
exports
|
|
53772
|
+
exports.convert = (globalObject, value, {
|
|
53773
53773
|
context = "The provided value"
|
|
53774
53774
|
} = {}) => {
|
|
53775
|
-
if (exports
|
|
53775
|
+
if (exports.is(value)) {
|
|
53776
53776
|
return utils.implForWrapper(value);
|
|
53777
53777
|
}
|
|
53778
53778
|
throw new globalObject.TypeError(`${context} is not of type 'URLSearchParams'.`);
|
|
53779
53779
|
};
|
|
53780
|
-
exports
|
|
53780
|
+
exports.createDefaultIterator = (globalObject, target, kind) => {
|
|
53781
53781
|
const ctorRegistry = globalObject[ctorRegistrySymbol];
|
|
53782
53782
|
const iteratorPrototype = ctorRegistry["URLSearchParams Iterator"];
|
|
53783
53783
|
const iterator = Object.create(iteratorPrototype);
|
|
@@ -53801,18 +53801,18 @@ function requireURLSearchParams () {
|
|
|
53801
53801
|
}
|
|
53802
53802
|
return Object.create(proto);
|
|
53803
53803
|
}
|
|
53804
|
-
exports
|
|
53804
|
+
exports.create = (globalObject, constructorArgs, privateData) => {
|
|
53805
53805
|
const wrapper = makeWrapper(globalObject);
|
|
53806
|
-
return exports
|
|
53806
|
+
return exports.setup(wrapper, globalObject, constructorArgs, privateData);
|
|
53807
53807
|
};
|
|
53808
|
-
exports
|
|
53809
|
-
const wrapper = exports
|
|
53808
|
+
exports.createImpl = (globalObject, constructorArgs, privateData) => {
|
|
53809
|
+
const wrapper = exports.create(globalObject, constructorArgs, privateData);
|
|
53810
53810
|
return utils.implForWrapper(wrapper);
|
|
53811
53811
|
};
|
|
53812
|
-
exports
|
|
53813
|
-
exports
|
|
53812
|
+
exports._internalSetup = (wrapper, globalObject) => {};
|
|
53813
|
+
exports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {
|
|
53814
53814
|
privateData.wrapper = wrapper;
|
|
53815
|
-
exports
|
|
53815
|
+
exports._internalSetup(wrapper, globalObject);
|
|
53816
53816
|
Object.defineProperty(wrapper, implSymbol, {
|
|
53817
53817
|
value: new Impl.implementation(globalObject, constructorArgs, privateData),
|
|
53818
53818
|
configurable: true
|
|
@@ -53823,9 +53823,9 @@ function requireURLSearchParams () {
|
|
|
53823
53823
|
}
|
|
53824
53824
|
return wrapper;
|
|
53825
53825
|
};
|
|
53826
|
-
exports
|
|
53826
|
+
exports.new = (globalObject, newTarget) => {
|
|
53827
53827
|
const wrapper = makeWrapper(globalObject, newTarget);
|
|
53828
|
-
exports
|
|
53828
|
+
exports._internalSetup(wrapper, globalObject);
|
|
53829
53829
|
Object.defineProperty(wrapper, implSymbol, {
|
|
53830
53830
|
value: Object.create(Impl.implementation.prototype),
|
|
53831
53831
|
configurable: true
|
|
@@ -53837,7 +53837,7 @@ function requireURLSearchParams () {
|
|
|
53837
53837
|
return wrapper[implSymbol];
|
|
53838
53838
|
};
|
|
53839
53839
|
const exposed = new Set(["Window", "Worker"]);
|
|
53840
|
-
exports
|
|
53840
|
+
exports.install = (globalObject, globalNames) => {
|
|
53841
53841
|
if (!globalNames.some(globalName => exposed.has(globalName))) {
|
|
53842
53842
|
return;
|
|
53843
53843
|
}
|
|
@@ -53909,11 +53909,11 @@ function requireURLSearchParams () {
|
|
|
53909
53909
|
}
|
|
53910
53910
|
args.push(curArg);
|
|
53911
53911
|
}
|
|
53912
|
-
return exports
|
|
53912
|
+
return exports.setup(Object.create(new.target.prototype), globalObject, args);
|
|
53913
53913
|
}
|
|
53914
53914
|
append(name, value) {
|
|
53915
53915
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
53916
|
-
if (!exports
|
|
53916
|
+
if (!exports.is(esValue)) {
|
|
53917
53917
|
throw new globalObject.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");
|
|
53918
53918
|
}
|
|
53919
53919
|
if (arguments.length < 2) {
|
|
@@ -53940,7 +53940,7 @@ function requireURLSearchParams () {
|
|
|
53940
53940
|
}
|
|
53941
53941
|
delete(name) {
|
|
53942
53942
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
53943
|
-
if (!exports
|
|
53943
|
+
if (!exports.is(esValue)) {
|
|
53944
53944
|
throw new globalObject.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");
|
|
53945
53945
|
}
|
|
53946
53946
|
if (arguments.length < 1) {
|
|
@@ -53969,7 +53969,7 @@ function requireURLSearchParams () {
|
|
|
53969
53969
|
}
|
|
53970
53970
|
get(name) {
|
|
53971
53971
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
53972
|
-
if (!exports
|
|
53972
|
+
if (!exports.is(esValue)) {
|
|
53973
53973
|
throw new globalObject.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");
|
|
53974
53974
|
}
|
|
53975
53975
|
if (arguments.length < 1) {
|
|
@@ -53988,7 +53988,7 @@ function requireURLSearchParams () {
|
|
|
53988
53988
|
}
|
|
53989
53989
|
getAll(name) {
|
|
53990
53990
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
53991
|
-
if (!exports
|
|
53991
|
+
if (!exports.is(esValue)) {
|
|
53992
53992
|
throw new globalObject.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");
|
|
53993
53993
|
}
|
|
53994
53994
|
if (arguments.length < 1) {
|
|
@@ -54007,7 +54007,7 @@ function requireURLSearchParams () {
|
|
|
54007
54007
|
}
|
|
54008
54008
|
has(name) {
|
|
54009
54009
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54010
|
-
if (!exports
|
|
54010
|
+
if (!exports.is(esValue)) {
|
|
54011
54011
|
throw new globalObject.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");
|
|
54012
54012
|
}
|
|
54013
54013
|
if (arguments.length < 1) {
|
|
@@ -54036,7 +54036,7 @@ function requireURLSearchParams () {
|
|
|
54036
54036
|
}
|
|
54037
54037
|
set(name, value) {
|
|
54038
54038
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54039
|
-
if (!exports
|
|
54039
|
+
if (!exports.is(esValue)) {
|
|
54040
54040
|
throw new globalObject.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");
|
|
54041
54041
|
}
|
|
54042
54042
|
if (arguments.length < 2) {
|
|
@@ -54063,38 +54063,38 @@ function requireURLSearchParams () {
|
|
|
54063
54063
|
}
|
|
54064
54064
|
sort() {
|
|
54065
54065
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54066
|
-
if (!exports
|
|
54066
|
+
if (!exports.is(esValue)) {
|
|
54067
54067
|
throw new globalObject.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");
|
|
54068
54068
|
}
|
|
54069
54069
|
return utils.tryWrapperForImpl(esValue[implSymbol].sort());
|
|
54070
54070
|
}
|
|
54071
54071
|
toString() {
|
|
54072
54072
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54073
|
-
if (!exports
|
|
54073
|
+
if (!exports.is(esValue)) {
|
|
54074
54074
|
throw new globalObject.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");
|
|
54075
54075
|
}
|
|
54076
54076
|
return esValue[implSymbol].toString();
|
|
54077
54077
|
}
|
|
54078
54078
|
keys() {
|
|
54079
|
-
if (!exports
|
|
54079
|
+
if (!exports.is(this)) {
|
|
54080
54080
|
throw new globalObject.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");
|
|
54081
54081
|
}
|
|
54082
|
-
return exports
|
|
54082
|
+
return exports.createDefaultIterator(globalObject, this, "key");
|
|
54083
54083
|
}
|
|
54084
54084
|
values() {
|
|
54085
|
-
if (!exports
|
|
54085
|
+
if (!exports.is(this)) {
|
|
54086
54086
|
throw new globalObject.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");
|
|
54087
54087
|
}
|
|
54088
|
-
return exports
|
|
54088
|
+
return exports.createDefaultIterator(globalObject, this, "value");
|
|
54089
54089
|
}
|
|
54090
54090
|
entries() {
|
|
54091
|
-
if (!exports
|
|
54091
|
+
if (!exports.is(this)) {
|
|
54092
54092
|
throw new globalObject.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");
|
|
54093
54093
|
}
|
|
54094
|
-
return exports
|
|
54094
|
+
return exports.createDefaultIterator(globalObject, this, "key+value");
|
|
54095
54095
|
}
|
|
54096
54096
|
forEach(callback) {
|
|
54097
|
-
if (!exports
|
|
54097
|
+
if (!exports.is(this)) {
|
|
54098
54098
|
throw new globalObject.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");
|
|
54099
54099
|
}
|
|
54100
54100
|
if (arguments.length < 1) {
|
|
@@ -54115,7 +54115,7 @@ function requireURLSearchParams () {
|
|
|
54115
54115
|
}
|
|
54116
54116
|
get size() {
|
|
54117
54117
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54118
|
-
if (!exports
|
|
54118
|
+
if (!exports.is(esValue)) {
|
|
54119
54119
|
throw new globalObject.TypeError("'get size' called on an object that is not a valid instance of URLSearchParams.");
|
|
54120
54120
|
}
|
|
54121
54121
|
return esValue[implSymbol]["size"];
|
|
@@ -54439,23 +54439,23 @@ var hasRequiredURL;
|
|
|
54439
54439
|
function requireURL () {
|
|
54440
54440
|
if (hasRequiredURL) return URL$2;
|
|
54441
54441
|
hasRequiredURL = 1;
|
|
54442
|
-
(function (exports
|
|
54442
|
+
(function (exports) {
|
|
54443
54443
|
|
|
54444
54444
|
const conversions = requireLib();
|
|
54445
54445
|
const utils = requireUtils$1();
|
|
54446
54446
|
const implSymbol = utils.implSymbol;
|
|
54447
54447
|
const ctorRegistrySymbol = utils.ctorRegistrySymbol;
|
|
54448
54448
|
const interfaceName = "URL";
|
|
54449
|
-
exports
|
|
54449
|
+
exports.is = value => {
|
|
54450
54450
|
return utils.isObject(value) && utils.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;
|
|
54451
54451
|
};
|
|
54452
|
-
exports
|
|
54452
|
+
exports.isImpl = value => {
|
|
54453
54453
|
return utils.isObject(value) && value instanceof Impl.implementation;
|
|
54454
54454
|
};
|
|
54455
|
-
exports
|
|
54455
|
+
exports.convert = (globalObject, value, {
|
|
54456
54456
|
context = "The provided value"
|
|
54457
54457
|
} = {}) => {
|
|
54458
|
-
if (exports
|
|
54458
|
+
if (exports.is(value)) {
|
|
54459
54459
|
return utils.implForWrapper(value);
|
|
54460
54460
|
}
|
|
54461
54461
|
throw new globalObject.TypeError(`${context} is not of type 'URL'.`);
|
|
@@ -54470,18 +54470,18 @@ function requireURL () {
|
|
|
54470
54470
|
}
|
|
54471
54471
|
return Object.create(proto);
|
|
54472
54472
|
}
|
|
54473
|
-
exports
|
|
54473
|
+
exports.create = (globalObject, constructorArgs, privateData) => {
|
|
54474
54474
|
const wrapper = makeWrapper(globalObject);
|
|
54475
|
-
return exports
|
|
54475
|
+
return exports.setup(wrapper, globalObject, constructorArgs, privateData);
|
|
54476
54476
|
};
|
|
54477
|
-
exports
|
|
54478
|
-
const wrapper = exports
|
|
54477
|
+
exports.createImpl = (globalObject, constructorArgs, privateData) => {
|
|
54478
|
+
const wrapper = exports.create(globalObject, constructorArgs, privateData);
|
|
54479
54479
|
return utils.implForWrapper(wrapper);
|
|
54480
54480
|
};
|
|
54481
|
-
exports
|
|
54482
|
-
exports
|
|
54481
|
+
exports._internalSetup = (wrapper, globalObject) => {};
|
|
54482
|
+
exports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {
|
|
54483
54483
|
privateData.wrapper = wrapper;
|
|
54484
|
-
exports
|
|
54484
|
+
exports._internalSetup(wrapper, globalObject);
|
|
54485
54485
|
Object.defineProperty(wrapper, implSymbol, {
|
|
54486
54486
|
value: new Impl.implementation(globalObject, constructorArgs, privateData),
|
|
54487
54487
|
configurable: true
|
|
@@ -54492,9 +54492,9 @@ function requireURL () {
|
|
|
54492
54492
|
}
|
|
54493
54493
|
return wrapper;
|
|
54494
54494
|
};
|
|
54495
|
-
exports
|
|
54495
|
+
exports.new = (globalObject, newTarget) => {
|
|
54496
54496
|
const wrapper = makeWrapper(globalObject, newTarget);
|
|
54497
|
-
exports
|
|
54497
|
+
exports._internalSetup(wrapper, globalObject);
|
|
54498
54498
|
Object.defineProperty(wrapper, implSymbol, {
|
|
54499
54499
|
value: Object.create(Impl.implementation.prototype),
|
|
54500
54500
|
configurable: true
|
|
@@ -54506,7 +54506,7 @@ function requireURL () {
|
|
|
54506
54506
|
return wrapper[implSymbol];
|
|
54507
54507
|
};
|
|
54508
54508
|
const exposed = new Set(["Window", "Worker"]);
|
|
54509
|
-
exports
|
|
54509
|
+
exports.install = (globalObject, globalNames) => {
|
|
54510
54510
|
if (!globalNames.some(globalName => exposed.has(globalName))) {
|
|
54511
54511
|
return;
|
|
54512
54512
|
}
|
|
@@ -54535,25 +54535,25 @@ function requireURL () {
|
|
|
54535
54535
|
}
|
|
54536
54536
|
args.push(curArg);
|
|
54537
54537
|
}
|
|
54538
|
-
return exports
|
|
54538
|
+
return exports.setup(Object.create(new.target.prototype), globalObject, args);
|
|
54539
54539
|
}
|
|
54540
54540
|
toJSON() {
|
|
54541
54541
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54542
|
-
if (!exports
|
|
54542
|
+
if (!exports.is(esValue)) {
|
|
54543
54543
|
throw new globalObject.TypeError("'toJSON' called on an object that is not a valid instance of URL.");
|
|
54544
54544
|
}
|
|
54545
54545
|
return esValue[implSymbol].toJSON();
|
|
54546
54546
|
}
|
|
54547
54547
|
get href() {
|
|
54548
54548
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54549
|
-
if (!exports
|
|
54549
|
+
if (!exports.is(esValue)) {
|
|
54550
54550
|
throw new globalObject.TypeError("'get href' called on an object that is not a valid instance of URL.");
|
|
54551
54551
|
}
|
|
54552
54552
|
return esValue[implSymbol]["href"];
|
|
54553
54553
|
}
|
|
54554
54554
|
set href(V) {
|
|
54555
54555
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54556
|
-
if (!exports
|
|
54556
|
+
if (!exports.is(esValue)) {
|
|
54557
54557
|
throw new globalObject.TypeError("'set href' called on an object that is not a valid instance of URL.");
|
|
54558
54558
|
}
|
|
54559
54559
|
V = conversions["USVString"](V, {
|
|
@@ -54564,28 +54564,28 @@ function requireURL () {
|
|
|
54564
54564
|
}
|
|
54565
54565
|
toString() {
|
|
54566
54566
|
const esValue = this;
|
|
54567
|
-
if (!exports
|
|
54567
|
+
if (!exports.is(esValue)) {
|
|
54568
54568
|
throw new globalObject.TypeError("'toString' called on an object that is not a valid instance of URL.");
|
|
54569
54569
|
}
|
|
54570
54570
|
return esValue[implSymbol]["href"];
|
|
54571
54571
|
}
|
|
54572
54572
|
get origin() {
|
|
54573
54573
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54574
|
-
if (!exports
|
|
54574
|
+
if (!exports.is(esValue)) {
|
|
54575
54575
|
throw new globalObject.TypeError("'get origin' called on an object that is not a valid instance of URL.");
|
|
54576
54576
|
}
|
|
54577
54577
|
return esValue[implSymbol]["origin"];
|
|
54578
54578
|
}
|
|
54579
54579
|
get protocol() {
|
|
54580
54580
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54581
|
-
if (!exports
|
|
54581
|
+
if (!exports.is(esValue)) {
|
|
54582
54582
|
throw new globalObject.TypeError("'get protocol' called on an object that is not a valid instance of URL.");
|
|
54583
54583
|
}
|
|
54584
54584
|
return esValue[implSymbol]["protocol"];
|
|
54585
54585
|
}
|
|
54586
54586
|
set protocol(V) {
|
|
54587
54587
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54588
|
-
if (!exports
|
|
54588
|
+
if (!exports.is(esValue)) {
|
|
54589
54589
|
throw new globalObject.TypeError("'set protocol' called on an object that is not a valid instance of URL.");
|
|
54590
54590
|
}
|
|
54591
54591
|
V = conversions["USVString"](V, {
|
|
@@ -54596,14 +54596,14 @@ function requireURL () {
|
|
|
54596
54596
|
}
|
|
54597
54597
|
get username() {
|
|
54598
54598
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54599
|
-
if (!exports
|
|
54599
|
+
if (!exports.is(esValue)) {
|
|
54600
54600
|
throw new globalObject.TypeError("'get username' called on an object that is not a valid instance of URL.");
|
|
54601
54601
|
}
|
|
54602
54602
|
return esValue[implSymbol]["username"];
|
|
54603
54603
|
}
|
|
54604
54604
|
set username(V) {
|
|
54605
54605
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54606
|
-
if (!exports
|
|
54606
|
+
if (!exports.is(esValue)) {
|
|
54607
54607
|
throw new globalObject.TypeError("'set username' called on an object that is not a valid instance of URL.");
|
|
54608
54608
|
}
|
|
54609
54609
|
V = conversions["USVString"](V, {
|
|
@@ -54614,14 +54614,14 @@ function requireURL () {
|
|
|
54614
54614
|
}
|
|
54615
54615
|
get password() {
|
|
54616
54616
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54617
|
-
if (!exports
|
|
54617
|
+
if (!exports.is(esValue)) {
|
|
54618
54618
|
throw new globalObject.TypeError("'get password' called on an object that is not a valid instance of URL.");
|
|
54619
54619
|
}
|
|
54620
54620
|
return esValue[implSymbol]["password"];
|
|
54621
54621
|
}
|
|
54622
54622
|
set password(V) {
|
|
54623
54623
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54624
|
-
if (!exports
|
|
54624
|
+
if (!exports.is(esValue)) {
|
|
54625
54625
|
throw new globalObject.TypeError("'set password' called on an object that is not a valid instance of URL.");
|
|
54626
54626
|
}
|
|
54627
54627
|
V = conversions["USVString"](V, {
|
|
@@ -54632,14 +54632,14 @@ function requireURL () {
|
|
|
54632
54632
|
}
|
|
54633
54633
|
get host() {
|
|
54634
54634
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54635
|
-
if (!exports
|
|
54635
|
+
if (!exports.is(esValue)) {
|
|
54636
54636
|
throw new globalObject.TypeError("'get host' called on an object that is not a valid instance of URL.");
|
|
54637
54637
|
}
|
|
54638
54638
|
return esValue[implSymbol]["host"];
|
|
54639
54639
|
}
|
|
54640
54640
|
set host(V) {
|
|
54641
54641
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54642
|
-
if (!exports
|
|
54642
|
+
if (!exports.is(esValue)) {
|
|
54643
54643
|
throw new globalObject.TypeError("'set host' called on an object that is not a valid instance of URL.");
|
|
54644
54644
|
}
|
|
54645
54645
|
V = conversions["USVString"](V, {
|
|
@@ -54650,14 +54650,14 @@ function requireURL () {
|
|
|
54650
54650
|
}
|
|
54651
54651
|
get hostname() {
|
|
54652
54652
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54653
|
-
if (!exports
|
|
54653
|
+
if (!exports.is(esValue)) {
|
|
54654
54654
|
throw new globalObject.TypeError("'get hostname' called on an object that is not a valid instance of URL.");
|
|
54655
54655
|
}
|
|
54656
54656
|
return esValue[implSymbol]["hostname"];
|
|
54657
54657
|
}
|
|
54658
54658
|
set hostname(V) {
|
|
54659
54659
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54660
|
-
if (!exports
|
|
54660
|
+
if (!exports.is(esValue)) {
|
|
54661
54661
|
throw new globalObject.TypeError("'set hostname' called on an object that is not a valid instance of URL.");
|
|
54662
54662
|
}
|
|
54663
54663
|
V = conversions["USVString"](V, {
|
|
@@ -54668,14 +54668,14 @@ function requireURL () {
|
|
|
54668
54668
|
}
|
|
54669
54669
|
get port() {
|
|
54670
54670
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54671
|
-
if (!exports
|
|
54671
|
+
if (!exports.is(esValue)) {
|
|
54672
54672
|
throw new globalObject.TypeError("'get port' called on an object that is not a valid instance of URL.");
|
|
54673
54673
|
}
|
|
54674
54674
|
return esValue[implSymbol]["port"];
|
|
54675
54675
|
}
|
|
54676
54676
|
set port(V) {
|
|
54677
54677
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54678
|
-
if (!exports
|
|
54678
|
+
if (!exports.is(esValue)) {
|
|
54679
54679
|
throw new globalObject.TypeError("'set port' called on an object that is not a valid instance of URL.");
|
|
54680
54680
|
}
|
|
54681
54681
|
V = conversions["USVString"](V, {
|
|
@@ -54686,14 +54686,14 @@ function requireURL () {
|
|
|
54686
54686
|
}
|
|
54687
54687
|
get pathname() {
|
|
54688
54688
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54689
|
-
if (!exports
|
|
54689
|
+
if (!exports.is(esValue)) {
|
|
54690
54690
|
throw new globalObject.TypeError("'get pathname' called on an object that is not a valid instance of URL.");
|
|
54691
54691
|
}
|
|
54692
54692
|
return esValue[implSymbol]["pathname"];
|
|
54693
54693
|
}
|
|
54694
54694
|
set pathname(V) {
|
|
54695
54695
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54696
|
-
if (!exports
|
|
54696
|
+
if (!exports.is(esValue)) {
|
|
54697
54697
|
throw new globalObject.TypeError("'set pathname' called on an object that is not a valid instance of URL.");
|
|
54698
54698
|
}
|
|
54699
54699
|
V = conversions["USVString"](V, {
|
|
@@ -54704,14 +54704,14 @@ function requireURL () {
|
|
|
54704
54704
|
}
|
|
54705
54705
|
get search() {
|
|
54706
54706
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54707
|
-
if (!exports
|
|
54707
|
+
if (!exports.is(esValue)) {
|
|
54708
54708
|
throw new globalObject.TypeError("'get search' called on an object that is not a valid instance of URL.");
|
|
54709
54709
|
}
|
|
54710
54710
|
return esValue[implSymbol]["search"];
|
|
54711
54711
|
}
|
|
54712
54712
|
set search(V) {
|
|
54713
54713
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54714
|
-
if (!exports
|
|
54714
|
+
if (!exports.is(esValue)) {
|
|
54715
54715
|
throw new globalObject.TypeError("'set search' called on an object that is not a valid instance of URL.");
|
|
54716
54716
|
}
|
|
54717
54717
|
V = conversions["USVString"](V, {
|
|
@@ -54722,7 +54722,7 @@ function requireURL () {
|
|
|
54722
54722
|
}
|
|
54723
54723
|
get searchParams() {
|
|
54724
54724
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54725
|
-
if (!exports
|
|
54725
|
+
if (!exports.is(esValue)) {
|
|
54726
54726
|
throw new globalObject.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");
|
|
54727
54727
|
}
|
|
54728
54728
|
return utils.getSameObject(this, "searchParams", () => {
|
|
@@ -54731,14 +54731,14 @@ function requireURL () {
|
|
|
54731
54731
|
}
|
|
54732
54732
|
get hash() {
|
|
54733
54733
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54734
|
-
if (!exports
|
|
54734
|
+
if (!exports.is(esValue)) {
|
|
54735
54735
|
throw new globalObject.TypeError("'get hash' called on an object that is not a valid instance of URL.");
|
|
54736
54736
|
}
|
|
54737
54737
|
return esValue[implSymbol]["hash"];
|
|
54738
54738
|
}
|
|
54739
54739
|
set hash(V) {
|
|
54740
54740
|
const esValue = this !== null && this !== undefined ? this : globalObject;
|
|
54741
|
-
if (!exports
|
|
54741
|
+
if (!exports.is(esValue)) {
|
|
54742
54742
|
throw new globalObject.TypeError("'set hash' called on an object that is not a valid instance of URL.");
|
|
54743
54743
|
}
|
|
54744
54744
|
V = conversions["USVString"](V, {
|