@lwrjs/client-modules 0.12.0-alpha.8 → 0.12.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/build/bundle/prod/lwr/lockerDefine/lockerDefine.js +1 -1
- package/build/bundle/prod/lwr/servicesESM/servicesESM.js +1 -1
- package/build/modules/lwr/environment/environment.js +6 -6
- package/build/modules/lwr/lockerDefine/lockerDefine.js +270 -289
- package/build/modules/lwr/lockerSandbox/lockerSandbox.js +273 -290
- package/build/modules/lwr/preInit/preInit.js +3 -2
- package/package.json +6 -6
|
@@ -699,24 +699,24 @@ const {
|
|
|
699
699
|
delete: SetProtoDelete$LWS,
|
|
700
700
|
entries: SetProtoEntries$LWS,
|
|
701
701
|
forEach: SetProtoForEach$LWS,
|
|
702
|
-
has: SetProtoHas$LWS,
|
|
702
|
+
has: SetProtoHas$LWS$1,
|
|
703
703
|
keys: SetProtoKeys$LWS,
|
|
704
704
|
[SymbolIterator$LWS$1]: SetProtoSymbolIterator$LWS,
|
|
705
705
|
[SymbolToStringTag$LWS$1]: SetProtoSymbolToStringTag$LWS
|
|
706
706
|
} = SetProto$LWS$1;
|
|
707
707
|
const {
|
|
708
|
-
add: SetProtoAdd$LWS,
|
|
709
|
-
values: SetProtoValues$LWS
|
|
708
|
+
add: SetProtoAdd$LWS$1,
|
|
709
|
+
values: SetProtoValues$LWS$1
|
|
710
710
|
} = SetProto$LWS$1;
|
|
711
711
|
const SetProtoSizeGetter$LWS = ObjectLookupOwnGetter$LWS$1(SetProto$LWS$1, 'size');
|
|
712
712
|
function toSafeSet$LWS(set$LWS) {
|
|
713
713
|
ReflectSetPrototypeOf$LWS$1(set$LWS, null);
|
|
714
|
-
set$LWS.add = SetProtoAdd$LWS;
|
|
714
|
+
set$LWS.add = SetProtoAdd$LWS$1;
|
|
715
715
|
set$LWS.clear = SetProtoClear$LWS;
|
|
716
716
|
set$LWS.delete = SetProtoDelete$LWS;
|
|
717
717
|
set$LWS.entries = SetProtoEntries$LWS;
|
|
718
718
|
set$LWS.forEach = SetProtoForEach$LWS;
|
|
719
|
-
set$LWS.has = SetProtoHas$LWS;
|
|
719
|
+
set$LWS.has = SetProtoHas$LWS$1;
|
|
720
720
|
set$LWS.keys = SetProtoKeys$LWS;
|
|
721
721
|
ReflectDefineProperty$LWS$1(set$LWS, 'size', {
|
|
722
722
|
__proto__: null,
|
|
@@ -725,7 +725,7 @@ function toSafeSet$LWS(set$LWS) {
|
|
|
725
725
|
get: SetProtoSizeGetter$LWS,
|
|
726
726
|
set: undefined
|
|
727
727
|
});
|
|
728
|
-
set$LWS.values = SetProtoValues$LWS;
|
|
728
|
+
set$LWS.values = SetProtoValues$LWS$1;
|
|
729
729
|
set$LWS[SymbolIterator$LWS$1] = SetProtoSymbolIterator$LWS;
|
|
730
730
|
set$LWS[SymbolToStringTag$LWS$1] = SetProtoSymbolToStringTag$LWS;
|
|
731
731
|
ReflectSetPrototypeOf$LWS$1(set$LWS, SetProto$LWS$1);
|
|
@@ -1073,7 +1073,7 @@ function cloneSet$LWS(set$LWS, queue$LWS) {
|
|
|
1073
1073
|
// Step 26.2.1: Let copiedList be a new empty List.
|
|
1074
1074
|
const clone$LWS = new SetCtor$LWS$1();
|
|
1075
1075
|
// Step 26.2.2: For each entry of value.[[SetData]]...
|
|
1076
|
-
const valuesIterable$LWS = ReflectApply$LWS$1(SetProtoValues$LWS, set$LWS, []);
|
|
1076
|
+
const valuesIterable$LWS = ReflectApply$LWS$1(SetProtoValues$LWS$1, set$LWS, []);
|
|
1077
1077
|
// Step 26.2.3: For each entry of copiedList:
|
|
1078
1078
|
let {
|
|
1079
1079
|
length: queueOffset$LWS
|
|
@@ -1089,7 +1089,7 @@ function cloneSet$LWS(set$LWS, queue$LWS) {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
// Step 26.2.3.1: Let serializedEntry be ? StructuredSerializeInternal(entry, forStorage, memory).
|
|
1091
1091
|
queue$LWS[queueOffset$LWS++] = [subCloneValue$LWS => {
|
|
1092
|
-
ReflectApply$LWS$1(SetProtoAdd$LWS, clone$LWS, [subCloneValue$LWS]);
|
|
1092
|
+
ReflectApply$LWS$1(SetProtoAdd$LWS$1, clone$LWS, [subCloneValue$LWS]);
|
|
1093
1093
|
}, subValue$LWS];
|
|
1094
1094
|
}
|
|
1095
1095
|
return clone$LWS;
|
|
@@ -1453,7 +1453,7 @@ const {
|
|
|
1453
1453
|
} = PromiseCtor$LWS.prototype;
|
|
1454
1454
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1455
1455
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1456
|
-
/*! version: 0.21.
|
|
1456
|
+
/*! version: 0.21.4 */
|
|
1457
1457
|
|
|
1458
1458
|
/*!
|
|
1459
1459
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2112,7 +2112,7 @@ const {
|
|
|
2112
2112
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2113
2113
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2114
2114
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2115
|
-
/*! version: 0.21.
|
|
2115
|
+
/*! version: 0.21.4 */
|
|
2116
2116
|
|
|
2117
2117
|
/*!
|
|
2118
2118
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2135,7 +2135,7 @@ function isMIMETypeAllowed$LWS(mimeType$LWS) {
|
|
|
2135
2135
|
}
|
|
2136
2136
|
const DISALLOWED_ENDPOINTS_LIST$LWS = ['/aura', '/webruntime'];
|
|
2137
2137
|
const TRUSTED_DOMAINS_REG_EXP$LWS = /\.(force|salesforce|visualforce|documentforce|my\.site|salesforce-sites)\.com$/;
|
|
2138
|
-
const URL_SCHEMES_LIST$LWS = toSafeArray$LWS$1(['http:', 'https:']);
|
|
2138
|
+
const URL_SCHEMES_LIST$LWS = toSafeArray$LWS$1(['about:', 'http:', 'https:']);
|
|
2139
2139
|
const newlinesAndTabsRegExp$LWS = /[\u2028\u2029\n\r\t]/g;
|
|
2140
2140
|
const normalizerAnchor$LWS = ReflectApply$LWS$1(DocumentProtoCreateElement$LWS$1, rootDocument$LWS, ['a']);
|
|
2141
2141
|
// @TODO: W-7302311 Make paths and domains configurable.
|
|
@@ -2171,7 +2171,7 @@ function sanitizeURLForElement$LWS(url$LWS) {
|
|
|
2171
2171
|
function sanitizeURLString$LWS(urlString$LWS) {
|
|
2172
2172
|
return urlString$LWS === '' ? urlString$LWS : ReflectApply$LWS$1(StringProtoReplace$LWS, urlString$LWS, [newlinesAndTabsRegExp$LWS, '']);
|
|
2173
2173
|
}
|
|
2174
|
-
/*! version: 0.21.
|
|
2174
|
+
/*! version: 0.21.4 */
|
|
2175
2175
|
|
|
2176
2176
|
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
|
|
2177
2177
|
|
|
@@ -3857,7 +3857,7 @@ try {
|
|
|
3857
3857
|
// swallow
|
|
3858
3858
|
}
|
|
3859
3859
|
const trusted = createPolicy('trusted', policyOptions);
|
|
3860
|
-
/*! version: 0.21.
|
|
3860
|
+
/*! version: 0.21.4 */
|
|
3861
3861
|
|
|
3862
3862
|
/*!
|
|
3863
3863
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -4106,7 +4106,7 @@ function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
|
4106
4106
|
}
|
|
4107
4107
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
4108
4108
|
}
|
|
4109
|
-
/*! version: 0.21.
|
|
4109
|
+
/*! version: 0.21.4 */
|
|
4110
4110
|
|
|
4111
4111
|
/*!
|
|
4112
4112
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -4304,7 +4304,7 @@ function encloseSrcSetter$LWS(targetElement$LWS) {
|
|
|
4304
4304
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
4305
4305
|
};
|
|
4306
4306
|
}
|
|
4307
|
-
/*! version: 0.21.
|
|
4307
|
+
/*! version: 0.21.4 */
|
|
4308
4308
|
|
|
4309
4309
|
/*!
|
|
4310
4310
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -4356,6 +4356,15 @@ class VirtualRegistry$LWS {
|
|
|
4356
4356
|
PivotCtor$LWS = createPivotingClass$LWS(this._document, this._originalHTMLElementCtor, definition$LWS, tagName$LWS);
|
|
4357
4357
|
// Register a pivoting class which will handle global registry initializations.
|
|
4358
4358
|
ReflectApply$LWS$1(CustomElementRegistryProtoDefine$LWS, cer$LWS, [tagName$LWS, PivotCtor$LWS]);
|
|
4359
|
+
} else {
|
|
4360
|
+
// When there is already a PivotCtor for the given tagName, we need to ensure that
|
|
4361
|
+
// this definition doesn't have a conflicting formAssociated value for that tagName.
|
|
4362
|
+
const {
|
|
4363
|
+
formAssociated: formAssociated$LWS = false
|
|
4364
|
+
} = definition$LWS;
|
|
4365
|
+
if (PivotCtor$LWS.formAssociated !== formAssociated$LWS) {
|
|
4366
|
+
throw new LockerSecurityError$LWS(`Cannot create a definition for <${tagName$LWS}> with "formAssociated = ${formAssociated$LWS}". Either use "formAssociated = ${PivotCtor$LWS.formAssociated}" for this component or rename the component to not conflict with <${tagName$LWS}>`);
|
|
4367
|
+
}
|
|
4359
4368
|
}
|
|
4360
4369
|
// We MUST keep track of the constructor used to define custom elements
|
|
4361
4370
|
// to prevent accidental re-use of constructors in userland code.
|
|
@@ -4710,7 +4719,12 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4710
4719
|
ReflectApply$LWS$1(formStateRestoreCallback$LWS, this, [state$LWS, reason$LWS]);
|
|
4711
4720
|
}
|
|
4712
4721
|
}
|
|
4713
|
-
},
|
|
4722
|
+
},
|
|
4723
|
+
// This ensures that the first-come definition for the given tagName gets
|
|
4724
|
+
// to define the formAssociated-ness of the tag. In the likely case
|
|
4725
|
+
// that formAssociated is not explicitly defined, coerce the "undefined"
|
|
4726
|
+
// value to a boolean to ensure we get a true or false.
|
|
4727
|
+
_a$LWS.formAssociated = Boolean(originalDefinition$LWS.formAssociated), _a$LWS.observedAttributes = originalDefinition$LWS.observedAttributes ? shallowCloneArray$LWS(originalDefinition$LWS.observedAttributes) : [], _a$LWS;
|
|
4714
4728
|
}
|
|
4715
4729
|
function getCurrentRegistry$LWS() {
|
|
4716
4730
|
const registry$LWS = currentRegistry$LWS;
|
|
@@ -5887,7 +5901,7 @@ function initDistortionDocumentExecCommand$LWS({
|
|
|
5887
5901
|
if (length$LWS >= 1) {
|
|
5888
5902
|
const command$LWS = toString$LWS(args$LWS[0]);
|
|
5889
5903
|
const loweredCommand$LWS = ReflectApply$LWS$1(StringProtoToLowerCase$LWS, command$LWS, []);
|
|
5890
|
-
if (
|
|
5904
|
+
if (loweredCommand$LWS === 'selectall' && this === rootDocument$LWS) {
|
|
5891
5905
|
throwLockerSecurityError$LWS(command$LWS, this);
|
|
5892
5906
|
}
|
|
5893
5907
|
if (length$LWS > 2) {
|
|
@@ -6106,7 +6120,25 @@ function initDistortionElementAppend$LWS({
|
|
|
6106
6120
|
return distortionEntry$LWS;
|
|
6107
6121
|
};
|
|
6108
6122
|
}
|
|
6109
|
-
const
|
|
6123
|
+
const elementShadowRootBySandboxKeyRegistry$LWS = {
|
|
6124
|
+
__proto__: null
|
|
6125
|
+
};
|
|
6126
|
+
function registerShadowRootInSandbox$LWS(sandboxKey$LWS, shadowRoot$LWS) {
|
|
6127
|
+
const {
|
|
6128
|
+
[sandboxKey$LWS]: elementShadowRootRegistry$LWS = toSafeWeakSet$LWS$1(new WeakSetCtor$LWS$1())
|
|
6129
|
+
} = elementShadowRootBySandboxKeyRegistry$LWS;
|
|
6130
|
+
elementShadowRootRegistry$LWS.add(shadowRoot$LWS);
|
|
6131
|
+
if (!elementShadowRootBySandboxKeyRegistry$LWS[sandboxKey$LWS]) {
|
|
6132
|
+
elementShadowRootBySandboxKeyRegistry$LWS[sandboxKey$LWS] = elementShadowRootRegistry$LWS;
|
|
6133
|
+
}
|
|
6134
|
+
}
|
|
6135
|
+
function isShadowRootAccessibleInThisSandbox$LWS(sandboxKey$LWS, shadowRoot$LWS) {
|
|
6136
|
+
const elementShadowRootRegistry$LWS = elementShadowRootBySandboxKeyRegistry$LWS[sandboxKey$LWS];
|
|
6137
|
+
if (!elementShadowRootRegistry$LWS) {
|
|
6138
|
+
return false;
|
|
6139
|
+
}
|
|
6140
|
+
return elementShadowRootRegistry$LWS.has(shadowRoot$LWS);
|
|
6141
|
+
}
|
|
6110
6142
|
function initDistortionElementAttachShadow$LWS({
|
|
6111
6143
|
globalObject: {
|
|
6112
6144
|
Element: {
|
|
@@ -6116,37 +6148,14 @@ function initDistortionElementAttachShadow$LWS({
|
|
|
6116
6148
|
}
|
|
6117
6149
|
}
|
|
6118
6150
|
}) {
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
// Snapshot shadowRootInit to avoid getter poisoning.
|
|
6128
|
-
const clonedShadowRootInit$LWS = shallowCloneOptions$LWS(originalShadowRootInit$LWS);
|
|
6129
|
-
if (clonedShadowRootInit$LWS.mode !== FORCED_MODE$LWS) {
|
|
6130
|
-
const {
|
|
6131
|
-
mode: mode$LWS
|
|
6132
|
-
} = clonedShadowRootInit$LWS;
|
|
6133
|
-
consoleWarn$LWS(`Lightning Web Security: changing shadow root's mode from '${mode$LWS}' to '${FORCED_MODE$LWS}'`);
|
|
6134
|
-
}
|
|
6135
|
-
// Override the user defined shadowRoot mode to ensure that it is always closed
|
|
6136
|
-
clonedShadowRootInit$LWS.mode = FORCED_MODE$LWS;
|
|
6137
|
-
// Set the prototype of shadowRootInit after assignment
|
|
6138
|
-
// of mode to avoid complications with inherited
|
|
6139
|
-
// non-configurable/non-writable mode properties.
|
|
6140
|
-
const originalShadowRootInitProto$LWS = ReflectGetPrototypeOf$LWS$1(originalShadowRootInit$LWS);
|
|
6141
|
-
ReflectSetPrototypeOf$LWS$1(clonedShadowRootInit$LWS, originalShadowRootInitProto$LWS);
|
|
6142
|
-
// Replace shadowRootInit parameter.
|
|
6143
|
-
args$LWS[0] = clonedShadowRootInit$LWS;
|
|
6144
|
-
}
|
|
6145
|
-
}
|
|
6146
|
-
return ReflectApply$LWS$1(originalAttachShadow$LWS, this, args$LWS);
|
|
6147
|
-
}];
|
|
6148
|
-
return function distortionElementAttachShadow$LWS() {
|
|
6149
|
-
return distortionEntry$LWS;
|
|
6151
|
+
return function distortionElementAttachShadow$LWS({
|
|
6152
|
+
key: key$LWS
|
|
6153
|
+
}) {
|
|
6154
|
+
return [originalAttachShadow$LWS, function attachShadow$LWS(...args$LWS) {
|
|
6155
|
+
const shadowRoot$LWS = ReflectApply$LWS$1(originalAttachShadow$LWS, this, args$LWS);
|
|
6156
|
+
registerShadowRootInSandbox$LWS(key$LWS, shadowRoot$LWS);
|
|
6157
|
+
return shadowRoot$LWS;
|
|
6158
|
+
}];
|
|
6150
6159
|
};
|
|
6151
6160
|
}
|
|
6152
6161
|
const namedNodeMapToElementCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
@@ -6241,6 +6250,13 @@ function initDistortionElementGetInnerHTML$LWS({
|
|
|
6241
6250
|
const clonedOptions$LWS = shallowCloneOptions$LWS(options$LWS);
|
|
6242
6251
|
clonedOptions$LWS.includeShadowRoots = false;
|
|
6243
6252
|
args$LWS[0] = clonedOptions$LWS;
|
|
6253
|
+
} else {
|
|
6254
|
+
// If there was an argument, but it wasn't "object like",
|
|
6255
|
+
// it is considered invalid, so override it.
|
|
6256
|
+
args$LWS[0] = {
|
|
6257
|
+
__proto__: null,
|
|
6258
|
+
includeShadowRoots: false
|
|
6259
|
+
};
|
|
6244
6260
|
}
|
|
6245
6261
|
} else {
|
|
6246
6262
|
args$LWS[0] = {
|
|
@@ -6774,18 +6790,22 @@ function initDistortionElementSetHTML$LWS({
|
|
|
6774
6790
|
}];
|
|
6775
6791
|
};
|
|
6776
6792
|
}
|
|
6777
|
-
function alwaysNull$LWS() {
|
|
6778
|
-
return null;
|
|
6779
|
-
}
|
|
6780
6793
|
function initDistortionElementShadowRootGetter$LWS({
|
|
6781
6794
|
globalObject: {
|
|
6782
6795
|
Element: Element$LWS
|
|
6783
6796
|
}
|
|
6784
6797
|
}) {
|
|
6785
6798
|
const originalShadowRootGetter$LWS = ObjectLookupOwnGetter$LWS$1(Element$LWS.prototype, 'shadowRoot');
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6799
|
+
return function distortionShadowRootGetter$LWS({
|
|
6800
|
+
key: key$LWS
|
|
6801
|
+
}) {
|
|
6802
|
+
return [originalShadowRootGetter$LWS, function shadowRoot$LWS() {
|
|
6803
|
+
const realShadowRoot$LWS = ReflectApply$LWS$1(originalShadowRootGetter$LWS, this, []);
|
|
6804
|
+
if (isShadowRootAccessibleInThisSandbox$LWS(key$LWS, realShadowRoot$LWS)) {
|
|
6805
|
+
return realShadowRoot$LWS;
|
|
6806
|
+
}
|
|
6807
|
+
return null;
|
|
6808
|
+
}];
|
|
6789
6809
|
};
|
|
6790
6810
|
}
|
|
6791
6811
|
function initDistortionElementToggleAttribute$LWS({
|
|
@@ -6842,10 +6862,7 @@ function initDistortionEval$LWS({
|
|
|
6842
6862
|
return [originalEval$LWS, sourceText$LWS => sandboxEvaluator$LWS(transformSourceText$LWS(toString$LWS(sourceText$LWS)), UNCOMPILED_CONTEXT$LWS)];
|
|
6843
6863
|
};
|
|
6844
6864
|
}
|
|
6845
|
-
function
|
|
6846
|
-
return createDistortedComposedPath$LWS(this);
|
|
6847
|
-
}
|
|
6848
|
-
function createDistortedComposedPath$LWS(event$LWS) {
|
|
6865
|
+
function createDistortedComposedPath$LWS(event$LWS, sandboxKey$LWS) {
|
|
6849
6866
|
const currentTarget$LWS = ReflectApply$LWS$1(EventProtoCurrentTargetGetter$LWS, event$LWS, []);
|
|
6850
6867
|
const {
|
|
6851
6868
|
composedPath: originalComposedPath$LWS
|
|
@@ -6854,8 +6871,10 @@ function createDistortedComposedPath$LWS(event$LWS) {
|
|
|
6854
6871
|
const currentTargetIndex$LWS = ReflectApply$LWS$1(ArrayProtoIndexOf$LWS$1, rawComposedPath$LWS, [currentTarget$LWS]);
|
|
6855
6872
|
let distortedComposedPath$LWS = rawComposedPath$LWS;
|
|
6856
6873
|
for (let i$LWS = currentTargetIndex$LWS; i$LWS > -1; i$LWS -= 1) {
|
|
6857
|
-
const
|
|
6858
|
-
if (
|
|
6874
|
+
const objectThatMightBeAShadowRoot$LWS = rawComposedPath$LWS[i$LWS];
|
|
6875
|
+
if (objectThatMightBeAShadowRoot$LWS instanceof ShadowRoot &&
|
|
6876
|
+
// Only interfere if this sandbox is not allowed to access this shadowRoot
|
|
6877
|
+
!isShadowRootAccessibleInThisSandbox$LWS(sandboxKey$LWS, objectThatMightBeAShadowRoot$LWS)) {
|
|
6859
6878
|
// If we reach an instance of ShadowRoot, we don't want
|
|
6860
6879
|
// to include it in the returned path list. This matches
|
|
6861
6880
|
// the behavior of mode: closed.
|
|
@@ -6874,18 +6893,14 @@ function initDistortionEventComposedPath$LWS({
|
|
|
6874
6893
|
}
|
|
6875
6894
|
}
|
|
6876
6895
|
}) {
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6896
|
+
return function distortionEventComposedPath$LWS({
|
|
6897
|
+
key: key$LWS
|
|
6898
|
+
}) {
|
|
6899
|
+
return [originalComposedPath$LWS, function composedPath$LWS() {
|
|
6900
|
+
return createDistortedComposedPath$LWS(this, key$LWS);
|
|
6901
|
+
}];
|
|
6880
6902
|
};
|
|
6881
6903
|
}
|
|
6882
|
-
|
|
6883
|
-
// Chromium 109 removed Event.prototype.path
|
|
6884
|
-
// https://chromestatus.com/feature/5726124632965120
|
|
6885
|
-
// istanbul ignore next: currently unreachable via tests
|
|
6886
|
-
function path$LWS() {
|
|
6887
|
-
return createDistortedComposedPath$LWS(this);
|
|
6888
|
-
}
|
|
6889
6904
|
function initDistortionEventPathGetter$LWS({
|
|
6890
6905
|
globalObject: {
|
|
6891
6906
|
Event: Event$LWS
|
|
@@ -6897,10 +6912,16 @@ function initDistortionEventPathGetter$LWS({
|
|
|
6897
6912
|
return noop$LWS$1;
|
|
6898
6913
|
}
|
|
6899
6914
|
// istanbul ignore next: currently unreachable via tests
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
return
|
|
6915
|
+
return function distortionEventPathGetter$LWS({
|
|
6916
|
+
key: key$LWS
|
|
6917
|
+
}) {
|
|
6918
|
+
return [originalPathGetter$LWS,
|
|
6919
|
+
// Chromium 109 removed Event.prototype.path
|
|
6920
|
+
// https://chromestatus.com/feature/5726124632965120
|
|
6921
|
+
// istanbul ignore next: currently unreachable via tests
|
|
6922
|
+
function path$LWS() {
|
|
6923
|
+
return createDistortedComposedPath$LWS(this, key$LWS);
|
|
6924
|
+
}];
|
|
6904
6925
|
};
|
|
6905
6926
|
}
|
|
6906
6927
|
function initDistortionEventTargetAddEventListener$LWS({
|
|
@@ -7202,7 +7223,7 @@ function initDistortionIFrameElementContentWindowGetter$LWS({
|
|
|
7202
7223
|
function src$LWS(value$LWS) {
|
|
7203
7224
|
const urlString$LWS = sanitizeURLForElement$LWS(value$LWS);
|
|
7204
7225
|
if (!isValidURLScheme$LWS(urlString$LWS)) {
|
|
7205
|
-
throw new LockerSecurityError$LWS('HTMLIFrameElement.src supports http://, https:// schemes
|
|
7226
|
+
throw new LockerSecurityError$LWS('HTMLIFrameElement.src supports http://, https:// schemes, relative urls and about:blank.');
|
|
7206
7227
|
}
|
|
7207
7228
|
ReflectApply$LWS$1(HTMLIFrameElementProtoSrcSetter$LWS, this, [urlString$LWS]);
|
|
7208
7229
|
}
|
|
@@ -7271,7 +7292,7 @@ function initDistortionHTMLObjectElementDataSetter$LWS({
|
|
|
7271
7292
|
function data$LWS(value$LWS) {
|
|
7272
7293
|
const urlString$LWS = sanitizeURLForElement$LWS(value$LWS);
|
|
7273
7294
|
if (!isValidURLScheme$LWS(urlString$LWS)) {
|
|
7274
|
-
throw new LockerSecurityError$LWS('HTMLObjectElement.data supports http://, https:// schemes
|
|
7295
|
+
throw new LockerSecurityError$LWS('HTMLObjectElement.data supports http://, https:// schemes, relative urls and about:blank.');
|
|
7275
7296
|
}
|
|
7276
7297
|
const parsedURL$LWS = parseURL$LWS(urlString$LWS);
|
|
7277
7298
|
if (!isValidURL$LWS(parsedURL$LWS)) {
|
|
@@ -8407,20 +8428,6 @@ function initDistortionShadowRootInnerHTMLSetter$LWS({
|
|
|
8407
8428
|
}];
|
|
8408
8429
|
};
|
|
8409
8430
|
}
|
|
8410
|
-
function mode$LWS() {
|
|
8411
|
-
return 'closed';
|
|
8412
|
-
}
|
|
8413
|
-
function initDistortionShadowRootModeGetter$LWS({
|
|
8414
|
-
globalObject: {
|
|
8415
|
-
ShadowRoot: ShadowRoot$LWS
|
|
8416
|
-
}
|
|
8417
|
-
}) {
|
|
8418
|
-
const originalModeGetter$LWS = ObjectLookupOwnGetter$LWS$1(ShadowRoot$LWS.prototype, 'mode');
|
|
8419
|
-
const distortionEntry$LWS = [originalModeGetter$LWS, mode$LWS];
|
|
8420
|
-
return function distortionShadowRootModeGetter$LWS() {
|
|
8421
|
-
return distortionEntry$LWS;
|
|
8422
|
-
};
|
|
8423
|
-
}
|
|
8424
8431
|
function SharedWorker$LWS(scriptURL$LWS) {
|
|
8425
8432
|
throw new LockerSecurityError$LWS(`Cannot create SharedWorker with ${toSafeTemplateStringValue$LWS(scriptURL$LWS)}.`);
|
|
8426
8433
|
}
|
|
@@ -9754,7 +9761,7 @@ initDistortionCSSStyleRuleStyleGetter$LWS,
|
|
|
9754
9761
|
// Document
|
|
9755
9762
|
initDistortionDocumentDomainSetter$LWS, initDistortionDocumentOnsecuritypolicyviolation$LWS, initDistortionDocumentOpen$LWS,
|
|
9756
9763
|
// Element
|
|
9757
|
-
|
|
9764
|
+
initDistortionElementAttributesGetter$LWS, initDistortionElementGetInnerHTML$LWS, initDistortionElementRemove$LWS, initDistortionElementReplaceChildren$LWS, initDistortionElementReplaceWith$LWS,
|
|
9758
9765
|
// Function
|
|
9759
9766
|
initDistortionFunction$LWS,
|
|
9760
9767
|
// History
|
|
@@ -9789,8 +9796,6 @@ initDistortionRangeDeleteContents$LWS, initDistortionRangeExtractContents$LWS, i
|
|
|
9789
9796
|
initDistortionSelectionCollapse$LWS, initDistortionSelectionExtend$LWS, initDistortionSelectionSelectAllChildren$LWS, initDistortionSelectionSetBaseAndExtent$LWS, initDistortionSelectionSetPosition$LWS,
|
|
9790
9797
|
// ServiceWorkerContainer
|
|
9791
9798
|
initDistortionServiceWorkerContainerProto$LWS,
|
|
9792
|
-
// ShadowRoot
|
|
9793
|
-
initDistortionShadowRootModeGetter$LWS,
|
|
9794
9799
|
// SharedWorker
|
|
9795
9800
|
initDistortionSharedWorkerCtor$LWS, initDistortionSharedWorkerProto$LWS,
|
|
9796
9801
|
// Storage
|
|
@@ -9827,7 +9832,7 @@ initDistortionDocumentCookieGetter$LWS, initDistortionDocumentCookieSetter$LWS,
|
|
|
9827
9832
|
// DOMParser
|
|
9828
9833
|
initDistortionDOMParserParseFromString$LWS,
|
|
9829
9834
|
// Element
|
|
9830
|
-
initDistortionElementInnerHTMLSetter$LWS, initDistortionElementInsertAdjacentHTML$LWS, initDistortionElementOuterHTMLSetter$LWS, initDistortionElementSetAttribute$LWS, initDistortionElementSetAttributeNode$LWS, initDistortionElementSetAttributeNodeNS$LWS, initDistortionElementSetAttributeNS$LWS, initDistortionElementSetHTML$LWS, initDistortionElementToggleAttribute$LWS,
|
|
9835
|
+
initDistortionElementAttachShadow$LWS, initDistortionElementInnerHTMLSetter$LWS, initDistortionElementInsertAdjacentHTML$LWS, initDistortionElementOuterHTMLSetter$LWS, initDistortionElementSetAttribute$LWS, initDistortionElementSetAttributeNode$LWS, initDistortionElementSetAttributeNodeNS$LWS, initDistortionElementSetAttributeNS$LWS, initDistortionElementSetHTML$LWS, initDistortionElementShadowRootGetter$LWS, initDistortionElementToggleAttribute$LWS,
|
|
9831
9836
|
// Eval
|
|
9832
9837
|
initDistortionEval$LWS,
|
|
9833
9838
|
// Event
|
|
@@ -9866,14 +9871,14 @@ initDistortionWindowOnrejectionhandled$LWS, initDistortionWindowOnsecuritypolicy
|
|
|
9866
9871
|
initDistortionXMLHttpRequestResponseGetter$LWS, initDistortionXMLHttpRequestResponseXMLGetter$LWS];
|
|
9867
9872
|
const externalDistortionFactoryInitializers$LWS = ArrayConcat$LWS(internalDistortionFactoryInitializers$LWS, [
|
|
9868
9873
|
// Element
|
|
9869
|
-
initDistortionElementAfter$LWS, initDistortionElementAppend$LWS, initDistortionElementBefore$LWS, initDistortionElementInsertAdjacentElement$LWS, initDistortionElementPrepend$LWS,
|
|
9874
|
+
initDistortionElementAfter$LWS, initDistortionElementAppend$LWS, initDistortionElementBefore$LWS, initDistortionElementInsertAdjacentElement$LWS, initDistortionElementPrepend$LWS,
|
|
9870
9875
|
// Node
|
|
9871
9876
|
// The initDistortionNodeAppendChild distortion is temporarily disabled
|
|
9872
9877
|
// until W-10409618 is resolved..
|
|
9873
9878
|
// initDistortionNodeAppendChild,
|
|
9874
9879
|
initDistortionNodeInsertBefore$LWS]);
|
|
9875
9880
|
const externalKeyedDistortionFactoryInitializers$LWS = internalKeyedDistortionFactoryInitializers$LWS;
|
|
9876
|
-
toSafeMap$LWS$1(new MapCtor$LWS$1([[initDistortionDocumentCookieGetter$LWS, 'documentCookie'], [initDistortionDocumentCookieSetter$LWS, 'documentCookie']]));
|
|
9881
|
+
toSafeMap$LWS$1(new MapCtor$LWS$1([[initDistortionCacheStorageDelete$LWS, 'caches'], [initDistortionCacheStorageHas$LWS, 'caches'], [initDistortionCacheStorageKeys$LWS, 'caches'], [initDistortionCacheStorageMatch$LWS, 'caches'], [initDistortionCacheStorageOpen$LWS, 'caches'], [initDistortionCookieStoreDelete$LWS, 'cookieStore'], [initDistortionCookieStoreGet$LWS, 'cookieStore'], [initDistortionCookieStoreGetAll$LWS, 'cookieStore'], [initDistortionCookieStoreOnChange$LWS, 'cookieStore'], [initDistortionCookieStoreSet$LWS, 'cookieStore'], [initDistortionCSSStyleRuleStyleGetter$LWS, 'style'], [initDistortionCustomElementRegistryDefine$LWS, 'customElements'], [initDistortionCustomElementRegistryGet$LWS, 'customElements'], [initDistortionCustomElementRegistryUpgrade$LWS, 'customElements'], [initDistortionCustomElementRegistryWhenDefined$LWS, 'customElements'], [initDistortionDocumentCookieGetter$LWS, 'documentCookie'], [initDistortionDocumentCookieSetter$LWS, 'documentCookie'], [initDistortionDocumentDomainSetter$LWS, 'documentDomain'], [initDistortionDocumentExecCommand$LWS, 'documentExecCommand'], [initDistortionDOMParserParseFromString$LWS, 'domParserParseFromString'], [initDistortionElementAfter$LWS, 'element'], [initDistortionElementAppend$LWS, 'element'], [initDistortionElementAttributesGetter$LWS, 'attributes'], [initDistortionElementBefore$LWS, 'element'], [initDistortionElementGetInnerHTML$LWS, 'innerHTML'], [initDistortionElementInnerHTMLSetter$LWS, 'innerHTML'], [initDistortionElementInsertAdjacentElement$LWS, 'element'], [initDistortionElementInsertAdjacentHTML$LWS, 'element'], [initDistortionElementOuterHTMLSetter$LWS, 'element'], [initDistortionElementPrepend$LWS, 'element'], [initDistortionElementRemove$LWS, 'element'], [initDistortionElementReplaceChildren$LWS, 'element'], [initDistortionElementReplaceWith$LWS, 'element'], [initDistortionElementSetAttribute$LWS, 'attributes'], [initDistortionElementSetAttributeNode$LWS, 'attributes'], [initDistortionElementSetAttributeNodeNS$LWS, 'attributes'], [initDistortionElementSetAttributeNS$LWS, 'attributes'], [initDistortionElementSetHTML$LWS, 'element'], [initDistortionElementToggleAttribute$LWS, 'attributes'], [initDistortionHistoryPushState$LWS, 'history'], [initDistortionHistoryReplaceState$LWS, 'history'], [initDistortionHTMLElementDatasetGetter$LWS, 'dataset'], [initDistortionHTMLElementStyleGetter$LWS, 'style'], [initDistortionIDBObjectStoreAdd$LWS, 'indexedDB'], [initDistortionIDBObjectStorePut$LWS, 'indexedDB'], [initDistortionLocalStorage$LWS, 'storage'], [initDistortionMessagePortPostMessage$LWS, 'postMessage'], [initDistortionNamedNodeMapSetNamedItem$LWS, 'attributes'], [initDistortionNamedNodeMapSetNamedItemNS$LWS, 'attributes'], [initDistortionNavigatorSendBeacon$LWS, 'navigatorSendBeacon'], [initDistortionNodeInsertBefore$LWS, 'node'], [initDistortionNodeRemoveChild$LWS, 'node'], [initDistortionNodeReplaceChild$LWS, 'node'], [initDistortionNodeTextContentGetter$LWS, 'node'], [initDistortionNodeTextContentSetter$LWS, 'node'], [initDistortionNodeValueSetter$LWS, 'node'], [initDistortionNotificationCtor$LWS, 'notification'], [initDistortionPerformanceMark$LWS, 'performance'], [initDistortionPerformanceMarkCtor$LWS, 'performance'], [initDistortionPerformanceMeasure$LWS, 'performance'], [initDistortionRangeCreateContextualFragment$LWS, 'range'], [initDistortionRangeDeleteContents$LWS, 'range'], [initDistortionRangeExtractContents$LWS, 'range'], [initDistortionRangeInsertNode$LWS, 'range'], [initDistortionRangeSelectNode$LWS, 'range'], [initDistortionRangeSelectNodeContents$LWS, 'range'], [initDistortionRangeSetEnd$LWS, 'range'], [initDistortionRangeSetEndAfter$LWS, 'range'], [initDistortionRangeSetEndBefore$LWS, 'range'], [initDistortionRangeSetStart$LWS, 'range'], [initDistortionRangeSetStartAfter$LWS, 'range'], [initDistortionRangeSetStartBefore$LWS, 'range'], [initDistortionRangeSurroundContents$LWS, 'range'], [initDistortionSelectionCollapse$LWS, 'selection'], [initDistortionSelectionExtend$LWS, 'selection'], [initDistortionSelectionSelectAllChildren$LWS, 'selection'], [initDistortionSelectionSetBaseAndExtent$LWS, 'selection'], [initDistortionSelectionSetPosition$LWS, 'selection'], [initDistortionSessionStorage$LWS, 'storage'], [initDistortionShadowRootInnerHTMLSetter$LWS, 'innerHTML'], [initDistortionStorage$LWS, 'storage'], [initDistortionStorageClear$LWS, 'storage'], [initDistortionStorageGetItem$LWS, 'storage'], [initDistortionStorageKey$LWS, 'storage'], [initDistortionStorageLength$LWS, 'storage'], [initDistortionStorageRemoveItem$LWS, 'storage'], [initDistortionStorageSetItem$LWS, 'storage'], [initDistortionWindowFetch$LWS, 'windowFetch'], [initDistortionWindowFramesGetter$LWS, 'windowFrames'], [initDistortionWindowGetComputedStyle$LWS, 'style'], [initDistortionWindowLengthGetter$LWS, 'windowFrames'], [initDistortionWindowPostMessage$LWS, 'postMessage'], [initDistortionWindowSetInterval$LWS, 'setInterval'], [initDistortionWindowSetTimeout$LWS, 'setTimeout']]));
|
|
9877
9882
|
const DocumentBlockedProperties$LWS = ['createProcessingInstruction', 'exitFullscreen', 'fullscreen', 'fullscreenElement', 'fullscreenEnabled', 'mozCancelFullScreen', 'mozFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'onfullscreenchange', 'onfullscreenerror', 'onmozfullscreenchange', 'onmozfullscreenerror', 'onrejectionhandled', 'onunhandledrejection', 'releaseCapture', 'releaseEvents', 'webkitFullScreenKeyboardInputAllowed', 'write', 'writeln'];
|
|
9878
9883
|
const ElementBlockedProperties$LWS = ['mozRequestFullScreen', 'onfullscreenchange', 'onfullscreenerror', 'requestFullscreen', 'webkitRequestFullScreen', 'webkitRequestFullscreen'];
|
|
9879
9884
|
const EventBlockedProperties$LWS = ['originalTarget', 'explicitOriginalTarget'];
|
|
@@ -9887,46 +9892,62 @@ const HTMLIFrameElementBlockedProperties$LWS = ['getSVGDocument', 'srcdoc'];
|
|
|
9887
9892
|
const HTMLObjectElementBlockedProperties$LWS = ['getSVGDocument'];
|
|
9888
9893
|
const HTMLScriptElementBlockedAttributes$LWS = ['nonce'];
|
|
9889
9894
|
const HTMLScriptElementBlockedProperties$LWS = ['nonce'];
|
|
9890
|
-
const LightningWebSecurity$LWS = {
|
|
9891
|
-
__proto__: null
|
|
9892
|
-
};
|
|
9893
|
-
const distortions$LWS = {
|
|
9894
|
-
__proto__: null,
|
|
9895
|
-
documentCookie: true
|
|
9896
|
-
};
|
|
9897
|
-
ReflectDefineProperty$LWS$1(LightningWebSecurity$LWS, 'distortions', {
|
|
9898
|
-
__proto__: null,
|
|
9899
|
-
enumerable: false,
|
|
9900
|
-
configurable: false,
|
|
9901
|
-
writable: false,
|
|
9902
|
-
value: distortions$LWS
|
|
9903
|
-
});
|
|
9904
|
-
ReflectDefineProperty$LWS$1(window, '$LWS', {
|
|
9905
|
-
__proto__: null,
|
|
9906
|
-
enumerable: false,
|
|
9907
|
-
configurable: false,
|
|
9908
|
-
writable: false,
|
|
9909
|
-
value: LightningWebSecurity$LWS
|
|
9910
|
-
});
|
|
9911
|
-
ObjectFreeze$LWS$1(LightningWebSecurity$LWS);
|
|
9912
|
-
ObjectPreventExtensions$LWS(distortions$LWS);
|
|
9913
9895
|
const SVGElementBlockedAttributes$LWS = ['nonce'];
|
|
9914
9896
|
const SVGElementBlockedProperties$LWS = ['nonce'];
|
|
9915
9897
|
const UIEventBlockedProperties$LWS = ['rangeParent'];
|
|
9916
|
-
const WindowBlockedProperties$LWS = ['find'];
|
|
9898
|
+
const WindowBlockedProperties$LWS = ['find', 'requestFileSystem', 'webkitRequestFileSystem'];
|
|
9917
9899
|
const XSLTProcessorBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
9918
|
-
/*! version: 0.21.
|
|
9900
|
+
/*! version: 0.21.4 */
|
|
9919
9901
|
|
|
9920
9902
|
/*!
|
|
9921
9903
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
9922
9904
|
*/
|
|
9923
|
-
const
|
|
9905
|
+
const rootSandboxRegistry$LWS = {
|
|
9906
|
+
__proto__: null
|
|
9907
|
+
};
|
|
9908
|
+
const documentSandboxRegistryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1([[rootDocument$LWS, rootSandboxRegistry$LWS]]));
|
|
9909
|
+
const opaqueWindowSandboxRegistryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
9910
|
+
function getOpaqueSandboxRegistry$LWS(globalObject$LWS) {
|
|
9911
|
+
// Use the `document` as the key because a window object maintains its
|
|
9912
|
+
// identity continuity when its location changes and while the
|
|
9913
|
+
// non-configurable document property does not.
|
|
9914
|
+
let sandboxRegistry$LWS = opaqueWindowSandboxRegistryCache$LWS.get(globalObject$LWS);
|
|
9915
|
+
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
9916
|
+
if (sandboxRegistry$LWS === undefined) {
|
|
9917
|
+
sandboxRegistry$LWS = {
|
|
9918
|
+
__proto__: null
|
|
9919
|
+
};
|
|
9920
|
+
opaqueWindowSandboxRegistryCache$LWS.set(globalObject$LWS, sandboxRegistry$LWS);
|
|
9921
|
+
}
|
|
9922
|
+
return sandboxRegistry$LWS;
|
|
9923
|
+
}
|
|
9924
|
+
function getSandboxRegistry$LWS(document$LWS) {
|
|
9925
|
+
// Use the `document` as the key because a window object maintains its
|
|
9926
|
+
// identity continuity when its location changes and while the
|
|
9927
|
+
// non-configurable document property does not.
|
|
9928
|
+
let sandboxRegistry$LWS = documentSandboxRegistryCache$LWS.get(document$LWS);
|
|
9929
|
+
if (sandboxRegistry$LWS === undefined) {
|
|
9930
|
+
sandboxRegistry$LWS = {
|
|
9931
|
+
__proto__: null
|
|
9932
|
+
};
|
|
9933
|
+
documentSandboxRegistryCache$LWS.set(document$LWS, sandboxRegistry$LWS);
|
|
9934
|
+
}
|
|
9935
|
+
return sandboxRegistry$LWS;
|
|
9936
|
+
}
|
|
9937
|
+
const LightningWebSecurity$LWS = {
|
|
9938
|
+
__proto__: null
|
|
9939
|
+
};
|
|
9940
|
+
toSafeMap$LWS$1(new MapCtor$LWS$1());
|
|
9941
|
+
ObjectFreeze$LWS$1(LightningWebSecurity$LWS);
|
|
9942
|
+
// If ENABLE_DISTORTION_TOGGLE_SWITCHES = false, this will just be undefined
|
|
9943
|
+
const $LWS = window.$LWS;
|
|
9924
9944
|
const distortionFactoriesCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
9925
9945
|
const opaqueWindowPostMessageDistortionFactoryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
9926
9946
|
// WebKit based browsers have a bug that prematurely removes distortion entries
|
|
9927
9947
|
// from the distortions weak map.
|
|
9928
9948
|
const SUPPORTS_DISTORTIONS_WEAK_MAP$LWS = !IS_WEBKIT_BROWSER$LWS;
|
|
9929
9949
|
function createDistortionEntries$LWS(record$LWS, factories$LWS) {
|
|
9950
|
+
toSafeMap$LWS$1(new MapCtor$LWS$1());
|
|
9930
9951
|
const entries$LWS = [];
|
|
9931
9952
|
for (let i$LWS = 0, {
|
|
9932
9953
|
length: length$LWS
|
|
@@ -9940,11 +9961,12 @@ function createDistortionEntries$LWS(record$LWS, factories$LWS) {
|
|
|
9940
9961
|
} = entry$LWS;
|
|
9941
9962
|
if (typeof originalValue$LWS === 'function') {
|
|
9942
9963
|
const proxyMaskedFunctionDistortion$LWS = proxyMaskFunctionDistortion$LWS(record$LWS, factory$LWS, distortedValue$LWS, originalValue$LWS);
|
|
9943
|
-
distortionFactoryToggleSwitchesCache$LWS.get(factory$LWS);
|
|
9944
9964
|
entries$LWS[entries$LWS.length] = [originalValue$LWS, proxyMaskedFunctionDistortion$LWS];
|
|
9945
9965
|
} else {
|
|
9946
9966
|
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
9947
9967
|
if (typeof originalValue$LWS === 'object' && originalValue$LWS !== null) {
|
|
9968
|
+
// TODO: we may need to make this assigned value a proxy when ENABLE_DISTORTION_TOGGLE_SWITCHES is true,
|
|
9969
|
+
// allowing us to change which value is provided for the distortion.
|
|
9948
9970
|
entries$LWS[entries$LWS.length] = entry$LWS;
|
|
9949
9971
|
}
|
|
9950
9972
|
}
|
|
@@ -10028,18 +10050,13 @@ function getOpaqueWindowPostMessageDistortionFactory$LWS(record$LWS) {
|
|
|
10028
10050
|
return opaqueWindowPostMessageDistortionFactory$LWS;
|
|
10029
10051
|
}
|
|
10030
10052
|
function proxyMaskFunctionDistortion$LWS({
|
|
10031
|
-
BASIC_INSTRUMENTATION_DATA: BASIC_INSTRUMENTATION_DATA$LWS,
|
|
10032
10053
|
LOCKER_VERBOSE_INSTRUMENTATION_FLAG: LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS,
|
|
10033
10054
|
instrumentation: instrumentation$LWS,
|
|
10034
10055
|
key: sandboxKey$LWS
|
|
10035
10056
|
}, distortionFactory$LWS, distortionFunc$LWS, maskFunc$LWS) {
|
|
10036
10057
|
let activityName$LWS;
|
|
10037
|
-
let startActivity$LWS;
|
|
10038
10058
|
// istanbul ignore if: this is a safety precaution that is unreachable via tests
|
|
10039
10059
|
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10040
|
-
({
|
|
10041
|
-
startActivity: startActivity$LWS
|
|
10042
|
-
} = instrumentation$LWS);
|
|
10043
10060
|
const {
|
|
10044
10061
|
name: factoryName$LWS
|
|
10045
10062
|
} = distortionFactory$LWS;
|
|
@@ -10047,51 +10064,33 @@ function proxyMaskFunctionDistortion$LWS({
|
|
|
10047
10064
|
}
|
|
10048
10065
|
return maskFunction$LWS(distortionFunc$LWS, maskFunc$LWS, {
|
|
10049
10066
|
apply: function (target$LWS, thisArg$LWS, args$LWS) {
|
|
10050
|
-
|
|
10051
|
-
// istanbul ignore if: this is a safety precaution that is unreachable via tests
|
|
10052
|
-
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10053
|
-
activity$LWS = startActivity$LWS(activityName$LWS, BASIC_INSTRUMENTATION_DATA$LWS);
|
|
10054
|
-
}
|
|
10067
|
+
const activity$LWS = LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS ? instrumentation$LWS == null || instrumentation$LWS.startActivity == null ? void 0 : instrumentation$LWS.startActivity(activityName$LWS) : undefined;
|
|
10055
10068
|
try {
|
|
10056
10069
|
return ReflectApply$LWS$1(target$LWS, thisArg$LWS, args$LWS);
|
|
10057
10070
|
} catch (error) {
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
});
|
|
10064
|
-
}
|
|
10071
|
+
activity$LWS == null || activity$LWS.error({
|
|
10072
|
+
sandboxKey: sandboxKey$LWS,
|
|
10073
|
+
error
|
|
10074
|
+
});
|
|
10075
|
+
activity$LWS == null || activity$LWS.stop();
|
|
10065
10076
|
throw error;
|
|
10066
10077
|
} finally {
|
|
10067
|
-
|
|
10068
|
-
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10069
|
-
activity$LWS.stop();
|
|
10070
|
-
}
|
|
10078
|
+
activity$LWS == null || activity$LWS.stop();
|
|
10071
10079
|
}
|
|
10072
10080
|
},
|
|
10073
10081
|
construct: function (target$LWS, args$LWS, newTarget$LWS) {
|
|
10074
|
-
|
|
10075
|
-
// istanbul ignore if: this is a safety precaution that is unreachable via tests
|
|
10076
|
-
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10077
|
-
activity$LWS = startActivity$LWS(activityName$LWS, BASIC_INSTRUMENTATION_DATA$LWS);
|
|
10078
|
-
}
|
|
10082
|
+
const activity$LWS = LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS ? instrumentation$LWS == null || instrumentation$LWS.startActivity == null ? void 0 : instrumentation$LWS.startActivity(activityName$LWS) : undefined;
|
|
10079
10083
|
try {
|
|
10080
10084
|
return ReflectConstruct$LWS(target$LWS, args$LWS, newTarget$LWS);
|
|
10081
10085
|
} catch (error) {
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
});
|
|
10088
|
-
}
|
|
10086
|
+
activity$LWS == null || activity$LWS.error({
|
|
10087
|
+
sandboxKey: sandboxKey$LWS,
|
|
10088
|
+
error
|
|
10089
|
+
});
|
|
10090
|
+
activity$LWS == null || activity$LWS.stop();
|
|
10089
10091
|
throw error;
|
|
10090
10092
|
} finally {
|
|
10091
|
-
|
|
10092
|
-
if (LOCKER_VERBOSE_INSTRUMENTATION_FLAG$LWS) {
|
|
10093
|
-
activity$LWS.stop();
|
|
10094
|
-
}
|
|
10093
|
+
activity$LWS == null || activity$LWS.stop();
|
|
10095
10094
|
}
|
|
10096
10095
|
}
|
|
10097
10096
|
});
|
|
@@ -10366,6 +10365,11 @@ const SetCtor$LWS = Set;
|
|
|
10366
10365
|
const {
|
|
10367
10366
|
prototype: SetProto$LWS
|
|
10368
10367
|
} = SetCtor$LWS;
|
|
10368
|
+
const {
|
|
10369
|
+
add: SetProtoAdd$LWS,
|
|
10370
|
+
has: SetProtoHas$LWS,
|
|
10371
|
+
values: SetProtoValues$LWS
|
|
10372
|
+
} = SetProto$LWS;
|
|
10369
10373
|
ObjectLookupOwnGetter$LWS(SetProto$LWS, 'size');
|
|
10370
10374
|
const StringCtor$LWS = String;
|
|
10371
10375
|
const {
|
|
@@ -14417,66 +14421,61 @@ class VirtualEnvironment$LWS {
|
|
|
14417
14421
|
* problematic, and requires a lot more work to guarantee that objects from both sides
|
|
14418
14422
|
* can be considered equivalents (without identity discontinuity).
|
|
14419
14423
|
*/
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
//
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
//
|
|
14428
|
-
// '
|
|
14429
|
-
// '
|
|
14430
|
-
'BigInt',
|
|
14431
|
-
// '
|
|
14432
|
-
// '
|
|
14433
|
-
'
|
|
14434
|
-
|
|
14435
|
-
// '
|
|
14436
|
-
// '
|
|
14437
|
-
|
|
14438
|
-
'
|
|
14439
|
-
//
|
|
14440
|
-
//
|
|
14441
|
-
// '
|
|
14442
|
-
// '
|
|
14443
|
-
// '
|
|
14444
|
-
// '
|
|
14445
|
-
|
|
14446
|
-
'
|
|
14447
|
-
|
|
14448
|
-
//
|
|
14449
|
-
//
|
|
14450
|
-
// '
|
|
14451
|
-
// '
|
|
14452
|
-
// '
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
// '
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
//
|
|
14460
|
-
// '
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
// *** 18.4 Other Properties of the Global Object
|
|
14469
|
-
// 'Atomics', // Remapped
|
|
14470
|
-
'JSON', 'Math', 'Reflect',
|
|
14471
|
-
// *** Annex B
|
|
14472
|
-
'escape', 'unescape'
|
|
14473
|
-
// *** ECMA-402
|
|
14474
|
-
// 'Intl', // Remapped
|
|
14475
|
-
];
|
|
14424
|
+
function getESGlobalKeys$LWS(remapTypedArrays$LWS = true) {
|
|
14425
|
+
const ESGlobalKeys$LWS = [
|
|
14426
|
+
// *** 19.1 Value Properties of the Global Object
|
|
14427
|
+
'globalThis', 'Infinity', 'NaN', 'undefined',
|
|
14428
|
+
// *** 19.2 Function Properties of the Global Object
|
|
14429
|
+
// 'eval', // dangerous & Reflective
|
|
14430
|
+
'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent',
|
|
14431
|
+
// *** 19.3 Constructor Properties of the Global Object
|
|
14432
|
+
// 'AggregateError', // Reflective
|
|
14433
|
+
// 'Array', // Reflective
|
|
14434
|
+
'BigInt', 'Boolean',
|
|
14435
|
+
// 'Date', // Remapped
|
|
14436
|
+
// 'Error', // Reflective
|
|
14437
|
+
// 'EvalError', // Reflective
|
|
14438
|
+
'FinalizationRegistry',
|
|
14439
|
+
// 'Function', // dangerous & Reflective
|
|
14440
|
+
// 'Map', // Remapped
|
|
14441
|
+
'Number',
|
|
14442
|
+
// 'Object', // Reflective
|
|
14443
|
+
// Allow blue `Promise` constructor to overwrite the Red one so that promises
|
|
14444
|
+
// created by the `Promise` constructor or APIs like `fetch` will work.
|
|
14445
|
+
// 'Promise', // Remapped
|
|
14446
|
+
// 'Proxy', // Reflective
|
|
14447
|
+
// 'RangeError', // Reflective
|
|
14448
|
+
// 'ReferenceError', // Reflective
|
|
14449
|
+
'RegExp',
|
|
14450
|
+
// 'Set', // Remapped
|
|
14451
|
+
'String', 'Symbol',
|
|
14452
|
+
// 'SyntaxError', // Reflective
|
|
14453
|
+
// 'TypeError', // Reflective
|
|
14454
|
+
// 'URIError', // Reflective
|
|
14455
|
+
// 'WeakMap', // Remapped
|
|
14456
|
+
// 'WeakSet', // Remapped
|
|
14457
|
+
'WeakRef',
|
|
14458
|
+
// *** 18.4 Other Properties of the Global Object
|
|
14459
|
+
// 'Atomics', // Remapped
|
|
14460
|
+
'JSON', 'Math', 'Reflect',
|
|
14461
|
+
// *** Annex B
|
|
14462
|
+
'escape', 'unescape'
|
|
14463
|
+
// *** ECMA-402
|
|
14464
|
+
// 'Intl', // Remapped
|
|
14465
|
+
];
|
|
14466
|
+
|
|
14467
|
+
if (remapTypedArrays$LWS === false) {
|
|
14468
|
+
ESGlobalKeys$LWS.push('ArrayBuffer', 'BigInt64Array', 'BigUint64Array', 'DataView', 'Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'SharedArrayBuffer', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array');
|
|
14469
|
+
}
|
|
14470
|
+
return ESGlobalKeys$LWS;
|
|
14471
|
+
}
|
|
14476
14472
|
// These are foundational things that should never be wrapped but are equivalent
|
|
14477
14473
|
// @TODO: Revisit this list.
|
|
14478
14474
|
const ReflectiveIntrinsicObjectNames$LWS = ['AggregateError', 'Array', 'Error', 'EvalError', 'Function', 'Object', 'Proxy', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', 'eval', 'globalThis'];
|
|
14479
|
-
|
|
14475
|
+
function getESGlobalsAndReflectiveIntrinsicObjectNames$LWS(remapTypedArrays$LWS = true) {
|
|
14476
|
+
const ESGlobalKeys$LWS = getESGlobalKeys$LWS(remapTypedArrays$LWS);
|
|
14477
|
+
return toSafeArray$LWS([...ESGlobalKeys$LWS, ...ReflectiveIntrinsicObjectNames$LWS]);
|
|
14478
|
+
}
|
|
14480
14479
|
function getGlobalObjectOwnKeys$LWS(source$LWS) {
|
|
14481
14480
|
const ownKeys$LWS = ReflectOwnKeys$LWS(source$LWS);
|
|
14482
14481
|
// WKWebView incorrectly excludes the 'webkit' own property of the global
|
|
@@ -14487,8 +14486,9 @@ function getGlobalObjectOwnKeys$LWS(source$LWS) {
|
|
|
14487
14486
|
}
|
|
14488
14487
|
return ownKeys$LWS;
|
|
14489
14488
|
}
|
|
14490
|
-
function assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(descs$LWS, source$LWS) {
|
|
14489
|
+
function assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(descs$LWS, source$LWS, includeTypedArrays$LWS) {
|
|
14491
14490
|
const ownKeys$LWS = getGlobalObjectOwnKeys$LWS(source$LWS);
|
|
14491
|
+
const ESGlobalsAndReflectiveIntrinsicObjectNames$LWS = getESGlobalsAndReflectiveIntrinsicObjectNames$LWS(includeTypedArrays$LWS);
|
|
14492
14492
|
for (let i$LWS = 0, {
|
|
14493
14493
|
length: length$LWS
|
|
14494
14494
|
} = ownKeys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
@@ -14511,10 +14511,11 @@ function assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(descs$LWS,
|
|
|
14511
14511
|
}
|
|
14512
14512
|
return descs$LWS;
|
|
14513
14513
|
}
|
|
14514
|
-
function getFilteredGlobalOwnKeys$LWS(source$LWS) {
|
|
14514
|
+
function getFilteredGlobalOwnKeys$LWS(source$LWS, includeTypedArrays$LWS) {
|
|
14515
14515
|
const result$LWS = [];
|
|
14516
14516
|
let resultOffset$LWS = 0;
|
|
14517
14517
|
const ownKeys$LWS = getGlobalObjectOwnKeys$LWS(source$LWS);
|
|
14518
|
+
const ESGlobalsAndReflectiveIntrinsicObjectNames$LWS = getESGlobalsAndReflectiveIntrinsicObjectNames$LWS(includeTypedArrays$LWS);
|
|
14518
14519
|
for (let i$LWS = 0, {
|
|
14519
14520
|
length: length$LWS
|
|
14520
14521
|
} = ownKeys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
@@ -14588,20 +14589,28 @@ function getCachedGlobalObjectReferences$LWS(globalObject$LWS) {
|
|
|
14588
14589
|
blueDocumentToRecordMap$LWS.set(document$LWS, record$LWS);
|
|
14589
14590
|
return record$LWS;
|
|
14590
14591
|
}
|
|
14591
|
-
function filterWindowKeys$LWS(keys$LWS) {
|
|
14592
|
+
function filterWindowKeys$LWS(keys$LWS, remapTypedArrays$LWS) {
|
|
14593
|
+
const excludedKeys$LWS = new SetCtor$LWS(['document', 'location', 'top', 'window']);
|
|
14594
|
+
// Crypto and typed arrays must be from the same global object
|
|
14595
|
+
if (remapTypedArrays$LWS === false) {
|
|
14596
|
+
excludedKeys$LWS.add('crypto');
|
|
14597
|
+
excludedKeys$LWS.add('Crypto');
|
|
14598
|
+
excludedKeys$LWS.add('SubtleCrypto');
|
|
14599
|
+
excludedKeys$LWS.add('Blob');
|
|
14600
|
+
excludedKeys$LWS.add('File');
|
|
14601
|
+
excludedKeys$LWS.add('FileReader');
|
|
14602
|
+
excludedKeys$LWS.add('URL');
|
|
14603
|
+
}
|
|
14592
14604
|
const result$LWS = [];
|
|
14593
14605
|
let resultOffset$LWS = 0;
|
|
14594
14606
|
for (let i$LWS = 0, {
|
|
14595
14607
|
length: length$LWS
|
|
14596
14608
|
} = keys$LWS; i$LWS < length$LWS; i$LWS += 1) {
|
|
14597
14609
|
const key$LWS = keys$LWS[i$LWS];
|
|
14598
|
-
if (
|
|
14599
|
-
|
|
14600
|
-
key$LWS !== 'document' && key$LWS !== 'location ' && key$LWS !== 'top' && key$LWS !== 'window' &&
|
|
14601
|
-
// Remove other browser specific unforgeables.
|
|
14602
|
-
key$LWS !== 'chrome') {
|
|
14603
|
-
result$LWS[resultOffset$LWS++] = key$LWS;
|
|
14610
|
+
if (ReflectApply$LWS(SetProtoHas$LWS, excludedKeys$LWS, [key$LWS])) {
|
|
14611
|
+
continue;
|
|
14604
14612
|
}
|
|
14613
|
+
result$LWS[resultOffset$LWS++] = key$LWS;
|
|
14605
14614
|
}
|
|
14606
14615
|
return result$LWS;
|
|
14607
14616
|
}
|
|
@@ -14632,7 +14641,7 @@ function filterWindowKeys$LWS(keys$LWS) {
|
|
|
14632
14641
|
* that will be installed (via the membrane) as global descriptors in
|
|
14633
14642
|
* the red realm.
|
|
14634
14643
|
*/
|
|
14635
|
-
function removeWindowDescriptors$LWS(unsafeDescs$LWS) {
|
|
14644
|
+
function removeWindowDescriptors$LWS(unsafeDescs$LWS, remapTypedArrays$LWS) {
|
|
14636
14645
|
// Remove unforgeable descriptors that cannot be installed.
|
|
14637
14646
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'document');
|
|
14638
14647
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'location');
|
|
@@ -14640,6 +14649,16 @@ function removeWindowDescriptors$LWS(unsafeDescs$LWS) {
|
|
|
14640
14649
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'window');
|
|
14641
14650
|
// Remove other browser specific unforgeables.
|
|
14642
14651
|
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'chrome');
|
|
14652
|
+
// Crypto and typed arrays must be from the same global object
|
|
14653
|
+
if (remapTypedArrays$LWS === false) {
|
|
14654
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'crypto');
|
|
14655
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'Crypto');
|
|
14656
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'SubtleCrypto');
|
|
14657
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'Blob');
|
|
14658
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'File');
|
|
14659
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'FileReader');
|
|
14660
|
+
ReflectDeleteProperty$LWS(unsafeDescs$LWS, 'URL');
|
|
14661
|
+
}
|
|
14643
14662
|
return unsafeDescs$LWS;
|
|
14644
14663
|
}
|
|
14645
14664
|
/**
|
|
@@ -14652,7 +14671,6 @@ getCachedGlobalObjectReferences$LWS(rootWindow$LWS);
|
|
|
14652
14671
|
const IFRAME_SANDBOX_ATTRIBUTE_VALUE$LWS = 'allow-same-origin allow-scripts';
|
|
14653
14672
|
const revoked$LWS = toSafeWeakSet$LWS(new WeakSetCtor$LWS());
|
|
14654
14673
|
const blueCreateHooksCallbackCache$LWS = toSafeWeakMap$LWS(new WeakMapCtor$LWS());
|
|
14655
|
-
let defaultGlobalOwnKeys$LWS = null;
|
|
14656
14674
|
function createDetachableIframe$LWS(doc$LWS) {
|
|
14657
14675
|
var _ReflectApply$LWS;
|
|
14658
14676
|
const iframe$LWS = ReflectApply$LWS(DocumentProtoCreateElement$LWS, doc$LWS, ['iframe']);
|
|
@@ -14681,6 +14699,7 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14681
14699
|
instrumentation: instrumentation$LWS,
|
|
14682
14700
|
keepAlive: keepAlive$LWS = true,
|
|
14683
14701
|
liveTargetCallback: liveTargetCallback$LWS,
|
|
14702
|
+
remapTypedArrays: remapTypedArrays$LWS = true,
|
|
14684
14703
|
signSourceCallback: signSourceCallback$LWS
|
|
14685
14704
|
// eslint-disable-next-line prefer-object-spread
|
|
14686
14705
|
} = ObjectAssign$LWS({
|
|
@@ -14689,9 +14708,7 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14689
14708
|
const iframe$LWS = createDetachableIframe$LWS(blueRefs$LWS.document);
|
|
14690
14709
|
const redWindow$LWS = ReflectApply$LWS(HTMLIFrameElementProtoContentWindowGetter$LWS, iframe$LWS, []);
|
|
14691
14710
|
const shouldUseDefaultGlobalOwnKeys$LWS = typeof globalObjectShape$LWS !== 'object' || globalObjectShape$LWS === null;
|
|
14692
|
-
|
|
14693
|
-
defaultGlobalOwnKeys$LWS = filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(redWindow$LWS));
|
|
14694
|
-
}
|
|
14711
|
+
const defaultGlobalOwnKeys$LWS = filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(redWindow$LWS, remapTypedArrays$LWS), remapTypedArrays$LWS);
|
|
14695
14712
|
let blueConnector$LWS = blueCreateHooksCallbackCache$LWS.get(blueRefs$LWS.document);
|
|
14696
14713
|
if (blueConnector$LWS === undefined) {
|
|
14697
14714
|
blueConnector$LWS = createBlueConnector$LWS(globalObject$LWS);
|
|
@@ -14732,7 +14749,7 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14732
14749
|
// window.__proto__.__proto__.__proto__ (aka EventTarget.prototype)
|
|
14733
14750
|
env$LWS.link('__proto__', '__proto__', '__proto__');
|
|
14734
14751
|
env$LWS.remapProto(blueRefs$LWS.document, blueRefs$LWS.DocumentProto);
|
|
14735
|
-
env$LWS.lazyRemapProperties(blueRefs$LWS.window, shouldUseDefaultGlobalOwnKeys$LWS ? defaultGlobalOwnKeys$LWS : filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(globalObjectShape$LWS)),
|
|
14752
|
+
env$LWS.lazyRemapProperties(blueRefs$LWS.window, shouldUseDefaultGlobalOwnKeys$LWS ? defaultGlobalOwnKeys$LWS : filterWindowKeys$LWS(getFilteredGlobalOwnKeys$LWS(globalObjectShape$LWS), remapTypedArrays$LWS),
|
|
14736
14753
|
// Chromium based browsers have a bug that nulls the result of `window`
|
|
14737
14754
|
// getters in detached iframes when the property descriptor of `window.window`
|
|
14738
14755
|
// is retrieved.
|
|
@@ -14740,8 +14757,8 @@ function createIframeVirtualEnvironment$LWS(globalObject$LWS, providedOptions$LW
|
|
|
14740
14757
|
keepAlive$LWS ? undefined : unforgeablePoisonedWindowKeys$LWS);
|
|
14741
14758
|
if (endowments$LWS) {
|
|
14742
14759
|
const filteredEndowments$LWS = {};
|
|
14743
|
-
assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(filteredEndowments$LWS, endowments$LWS);
|
|
14744
|
-
removeWindowDescriptors$LWS(filteredEndowments$LWS);
|
|
14760
|
+
assignFilteredGlobalDescriptorsFromPropertyDescriptorMap$LWS(filteredEndowments$LWS, endowments$LWS, remapTypedArrays$LWS);
|
|
14761
|
+
removeWindowDescriptors$LWS(filteredEndowments$LWS, remapTypedArrays$LWS);
|
|
14745
14762
|
env$LWS.remapProperties(blueRefs$LWS.window, filteredEndowments$LWS);
|
|
14746
14763
|
}
|
|
14747
14764
|
// We intentionally skip remapping Window.prototype because there is nothing
|
|
@@ -15101,44 +15118,12 @@ function toSourceText$LWS(value$LWS, sourceType$LWS) {
|
|
|
15101
15118
|
// tools from mistaking the regexp or the replacement string for an
|
|
15102
15119
|
// actual source mapping URL.
|
|
15103
15120
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
15104
|
-
sourceText$LWS = `\n//# LWS Version = "0.21.
|
|
15121
|
+
sourceText$LWS = `\n//# LWS Version = "0.21.4"\n${sourceText$LWS}`;
|
|
15105
15122
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
15106
15123
|
// Append "'use strict'" to the extracted function body so it is
|
|
15107
15124
|
// evaluated in strict mode.
|
|
15108
15125
|
`'use strict';${sourceText$LWS}` : sourceText$LWS;
|
|
15109
15126
|
}
|
|
15110
|
-
const rootSandboxRegistry$LWS = {
|
|
15111
|
-
__proto__: null
|
|
15112
|
-
};
|
|
15113
|
-
const documentSandboxRegistryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1([[rootDocument$LWS, rootSandboxRegistry$LWS]]));
|
|
15114
|
-
const opaqueWindowSandboxRegistryCache$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
15115
|
-
function getOpaqueSandboxRegistry$LWS(globalObject$LWS) {
|
|
15116
|
-
// Use the `document` as the key because a window object maintains its
|
|
15117
|
-
// identity continuity when its location changes and while the
|
|
15118
|
-
// non-configurable document property does not.
|
|
15119
|
-
let sandboxRegistry$LWS = opaqueWindowSandboxRegistryCache$LWS.get(globalObject$LWS);
|
|
15120
|
-
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
15121
|
-
if (sandboxRegistry$LWS === undefined) {
|
|
15122
|
-
sandboxRegistry$LWS = {
|
|
15123
|
-
__proto__: null
|
|
15124
|
-
};
|
|
15125
|
-
opaqueWindowSandboxRegistryCache$LWS.set(globalObject$LWS, sandboxRegistry$LWS);
|
|
15126
|
-
}
|
|
15127
|
-
return sandboxRegistry$LWS;
|
|
15128
|
-
}
|
|
15129
|
-
function getSandboxRegistry$LWS(document$LWS) {
|
|
15130
|
-
// Use the `document` as the key because a window object maintains its
|
|
15131
|
-
// identity continuity when its location changes and while the
|
|
15132
|
-
// non-configurable document property does not.
|
|
15133
|
-
let sandboxRegistry$LWS = documentSandboxRegistryCache$LWS.get(document$LWS);
|
|
15134
|
-
if (sandboxRegistry$LWS === undefined) {
|
|
15135
|
-
sandboxRegistry$LWS = {
|
|
15136
|
-
__proto__: null
|
|
15137
|
-
};
|
|
15138
|
-
documentSandboxRegistryCache$LWS.set(document$LWS, sandboxRegistry$LWS);
|
|
15139
|
-
}
|
|
15140
|
-
return sandboxRegistry$LWS;
|
|
15141
|
-
}
|
|
15142
15127
|
|
|
15143
15128
|
// Flag whether the iframe should remain connected to the DOM.
|
|
15144
15129
|
const IFRAME_KEEP_ALIVE_FLAG$LWS = LOCKER_UNMINIFIED_FLAG$LWS$1 && !false;
|
|
@@ -15216,7 +15201,6 @@ function createSandboxEvaluator$LWS({
|
|
|
15216
15201
|
}
|
|
15217
15202
|
function createVirtualEnvironment$LWS(record$LWS) {
|
|
15218
15203
|
const {
|
|
15219
|
-
LOCKER_VERBOSE_INSTRUMENTATION_FLAG: verboseInstrumentation$LWS,
|
|
15220
15204
|
endowments: endowments$LWS,
|
|
15221
15205
|
globalObject: globalObject$LWS,
|
|
15222
15206
|
instrumentation: instrumentation$LWS,
|
|
@@ -15227,6 +15211,13 @@ function createVirtualEnvironment$LWS(record$LWS) {
|
|
|
15227
15211
|
},
|
|
15228
15212
|
type: type$LWS
|
|
15229
15213
|
} = record$LWS;
|
|
15214
|
+
// only Omnistudio test namespaces 'devopsimpkg*' or exact 'omnistudio' name
|
|
15215
|
+
let remapTypedArrays$LWS = true;
|
|
15216
|
+
if (key$LWS === 'omnistudio') {
|
|
15217
|
+
remapTypedArrays$LWS = false;
|
|
15218
|
+
} else if (ReflectApply$LWS$1(StringProtoStartsWith$LWS, key$LWS, ['devopsimpkg'])) {
|
|
15219
|
+
remapTypedArrays$LWS = false;
|
|
15220
|
+
}
|
|
15230
15221
|
return createIframeVirtualEnvironment$LWS(globalObject$LWS, {
|
|
15231
15222
|
defaultPolicy: {
|
|
15232
15223
|
createScript:
|
|
@@ -15315,7 +15306,8 @@ function createVirtualEnvironment$LWS(record$LWS) {
|
|
|
15315
15306
|
// and the default endowments descriptors so they can be
|
|
15316
15307
|
// accessible from inside the sandbox.
|
|
15317
15308
|
ObjectAssign$LWS$1({}, DEFAULT_ENDOWMENTS_DESCRIPTOR_MAP$LWS, ObjectGetOwnPropertyDescriptors$LWS(endowments$LWS)) : DEFAULT_ENDOWMENTS_DESCRIPTOR_MAP$LWS,
|
|
15318
|
-
instrumentation:
|
|
15309
|
+
instrumentation: instrumentation$LWS,
|
|
15310
|
+
remapTypedArrays: remapTypedArrays$LWS,
|
|
15319
15311
|
keepAlive: IFRAME_KEEP_ALIVE_FLAG$LWS,
|
|
15320
15312
|
liveTargetCallback: isTargetLive$LWS,
|
|
15321
15313
|
signSourceCallback: sourceText$LWS => trusted.createScript(sourceText$LWS)
|
|
@@ -15622,7 +15614,6 @@ function internalEvaluateInSandbox$LWS(evaluateOptions$LWS) {
|
|
|
15622
15614
|
throw new LockerSecurityError$LWS(ERR_INVALID_SANDBOX_KEY$LWS);
|
|
15623
15615
|
}
|
|
15624
15616
|
const {
|
|
15625
|
-
BASIC_INSTRUMENTATION_DATA: BASIC_INSTRUMENTATION_DATA$LWS,
|
|
15626
15617
|
LOCKER_INSTRUMENTATION_FLAG: LOCKER_INSTRUMENTATION_FLAG$LWS,
|
|
15627
15618
|
helpers: helpers$LWS,
|
|
15628
15619
|
virtualEnvironmentEvaluator: virtualEnvironmentEvaluator$LWS
|
|
@@ -15650,33 +15641,25 @@ function internalEvaluateInSandbox$LWS(evaluateOptions$LWS) {
|
|
|
15650
15641
|
}
|
|
15651
15642
|
let result$LWS;
|
|
15652
15643
|
const sourceText$LWS = toSourceText$LWS(source$LWS, sourceType$LWS);
|
|
15653
|
-
const
|
|
15654
|
-
let activity$LWS;
|
|
15655
|
-
// istanbul ignore else: this is a safety precaution that is unreachable via tests
|
|
15656
|
-
if (LOCKER_INSTRUMENTATION_FLAG$LWS) {
|
|
15657
|
-
activity$LWS = startActivity$LWS('evaluateInSandbox', BASIC_INSTRUMENTATION_DATA$LWS);
|
|
15658
|
-
}
|
|
15644
|
+
const activity$LWS = LOCKER_INSTRUMENTATION_FLAG$LWS ? instrumentation$LWS == null ? void 0 : instrumentation$LWS.startActivity('lws.evaluate') : undefined;
|
|
15659
15645
|
try {
|
|
15660
15646
|
// Protecting against errors during evaluation can guarantee the state
|
|
15661
15647
|
// of the EvalContext to avoid leaking context values
|
|
15662
15648
|
result$LWS = virtualEnvironmentEvaluator$LWS(sourceText$LWS);
|
|
15649
|
+
instrumentation$LWS == null || instrumentation$LWS.incrementCounter == null || instrumentation$LWS.incrementCounter('lws.evaluate', 1, false);
|
|
15663
15650
|
} catch (error) {
|
|
15664
|
-
|
|
15665
|
-
|
|
15666
|
-
|
|
15667
|
-
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
}
|
|
15651
|
+
instrumentation$LWS == null || instrumentation$LWS.incrementCounter == null || instrumentation$LWS.incrementCounter('lws.evaluate', 1, true);
|
|
15652
|
+
activity$LWS == null || activity$LWS.error({
|
|
15653
|
+
sandboxKey: key$LWS,
|
|
15654
|
+
error
|
|
15655
|
+
});
|
|
15656
|
+
activity$LWS == null || activity$LWS.stop();
|
|
15671
15657
|
throw error;
|
|
15672
15658
|
} finally {
|
|
15673
15659
|
clearEvalContext$LWS();
|
|
15674
15660
|
clearEvalHelpers$LWS();
|
|
15675
15661
|
}
|
|
15676
|
-
|
|
15677
|
-
if (LOCKER_INSTRUMENTATION_FLAG$LWS) {
|
|
15678
|
-
activity$LWS.stop();
|
|
15679
|
-
}
|
|
15662
|
+
activity$LWS == null || activity$LWS.stop();
|
|
15680
15663
|
return result$LWS;
|
|
15681
15664
|
}
|
|
15682
15665
|
|
|
@@ -15826,7 +15809,7 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15826
15809
|
depRegistry$LWS.set(dep$LWS, secureDep$LWS);
|
|
15827
15810
|
return secureDep$LWS;
|
|
15828
15811
|
}
|
|
15829
|
-
/*! version: 0.21.
|
|
15812
|
+
/*! version: 0.21.4 */
|
|
15830
15813
|
|
|
15831
|
-
export { CORE_SANDBOX_KEY$LWS as CORE_SANDBOX_KEY, createRootWindowSandboxRecord$LWS as createRootWindowSandboxRecord, evaluateFunction$LWS as evaluateFunction, evaluateInCoreSandbox$LWS as evaluateInCoreSandbox, evaluateInSandbox$LWS as evaluateInSandbox, trusted, wrapDependency$LWS as wrapDependency };
|
|
15814
|
+
export { $LWS, CORE_SANDBOX_KEY$LWS as CORE_SANDBOX_KEY, createRootWindowSandboxRecord$LWS as createRootWindowSandboxRecord, evaluateFunction$LWS as evaluateFunction, evaluateInCoreSandbox$LWS as evaluateInCoreSandbox, evaluateInSandbox$LWS as evaluateInSandbox, trusted, wrapDependency$LWS as wrapDependency };
|
|
15832
15815
|
//# sourceMappingURL=lockerSandbox.js.map
|