@lwrjs/client-modules 0.13.0-alpha.1 → 0.13.0-alpha.10
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/lockerDefine/lockerDefine.js +61 -30
- package/build/modules/lwr/lockerSandbox/lockerSandbox.js +61 -30
- package/build/modules/lwr/serverDataCallback/serverDataCallback.js +16 -0
- package/build/modules/lwr/servicesESM/servicesESM.js +2 -4
- package/package.json +7 -6
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=[];let o;const n=globalThis.LWR;
|
|
1
|
+
const e=[];let o;const n=globalThis.LWR;n.define||n.env?globalThis.LWR=Object.freeze({define:n.define,env:n.env}):delete globalThis.LWR;const t={addLoaderPlugin:()=>{console.warn("API is not supported in ESM format")},handleStaleModule:function(n){e.push(n),o||(o=new WebSocket(`ws://${location.host}`),o.addEventListener("message",(async({data:o})=>{const n=JSON.parse(o);if("moduleUpdate"===n.eventType){const{oldHash:o,newHash:t,module:{specifier:a}}=n.payload;for(let n=0;n<e.length;n++){if(null!==(0,e[n])({name:a,oldHash:o,newHash:t}))break}}})))},appMetadata:function(){const{appId:e,bootstrapModule:o,rootComponent:t,rootComponents:a}=n;return{appId:e,bootstrapModule:o,rootComponent:t,rootComponents:a}}(),addServerDataCallback:function(e){}};export{t as services};
|
|
2
2
|
//# sourceMappingURL=servicesESM.js.map
|
|
@@ -1329,6 +1329,10 @@ const {
|
|
|
1329
1329
|
function consoleWarn$LWS(...args$LWS) {
|
|
1330
1330
|
ReflectApply$LWS$1(consoleWarnRef$LWS, consoleRef$LWS, args$LWS);
|
|
1331
1331
|
}
|
|
1332
|
+
let gaterEnabledFeatures$LWS = [];
|
|
1333
|
+
function isGaterEnabledFeature$LWS(featureName$LWS) {
|
|
1334
|
+
return gaterEnabledFeatures$LWS.includes(`com.salesforce.locker.${featureName$LWS}`);
|
|
1335
|
+
}
|
|
1332
1336
|
const trackedLiveTargets$LWS = toSafeWeakSet$LWS$1(new WeakSetCtor$LWS$1());
|
|
1333
1337
|
function isTargetLive$LWS(target$LWS, targetTraits$LWS = 0 /* TargetTraits.None */) {
|
|
1334
1338
|
if (targetTraits$LWS & 1 /* TargetTraits.IsArray */ || targetTraits$LWS & 2 /* TargetTraits.IsArrayBufferView */ || targetTraits$LWS & 64 /* TargetTraits.Revoked */ || target$LWS === null || target$LWS === undefined || target$LWS === ObjectProto$LWS$1 || target$LWS === RegExpProto$LWS$1) {
|
|
@@ -1453,7 +1457,7 @@ const {
|
|
|
1453
1457
|
} = PromiseCtor$LWS.prototype;
|
|
1454
1458
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1455
1459
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1456
|
-
/*! version: 0.
|
|
1460
|
+
/*! version: 0.22.2 */
|
|
1457
1461
|
|
|
1458
1462
|
/*!
|
|
1459
1463
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2112,7 +2116,7 @@ const {
|
|
|
2112
2116
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2113
2117
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2114
2118
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2115
|
-
/*! version: 0.
|
|
2119
|
+
/*! version: 0.22.2 */
|
|
2116
2120
|
|
|
2117
2121
|
/*!
|
|
2118
2122
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2171,7 +2175,7 @@ function sanitizeURLForElement$LWS(url$LWS) {
|
|
|
2171
2175
|
function sanitizeURLString$LWS(urlString$LWS) {
|
|
2172
2176
|
return urlString$LWS === '' ? urlString$LWS : ReflectApply$LWS$1(StringProtoReplace$LWS, urlString$LWS, [newlinesAndTabsRegExp$LWS, '']);
|
|
2173
2177
|
}
|
|
2174
|
-
/*! version: 0.
|
|
2178
|
+
/*! version: 0.22.2 */
|
|
2175
2179
|
|
|
2176
2180
|
/*! @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
2181
|
|
|
@@ -3857,15 +3861,17 @@ try {
|
|
|
3857
3861
|
// swallow
|
|
3858
3862
|
}
|
|
3859
3863
|
const trusted = createPolicy('trusted', policyOptions);
|
|
3860
|
-
/*! version: 0.
|
|
3864
|
+
/*! version: 0.22.2 */
|
|
3861
3865
|
|
|
3862
3866
|
/*!
|
|
3863
3867
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
3864
3868
|
*/
|
|
3865
|
-
const additionalAttributes$LWS = ['role', 'target'];
|
|
3869
|
+
const additionalAttributes$LWS = ['role', 'part', 'target'];
|
|
3866
3870
|
const htmlTags$LWS = ['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'caption', 'canvas', 'center', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del', 'details', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'fieldset', 'figure', 'figcaption', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'i', 'iframe', 'img', 'input', 'ins', 'keygen', 'kbd', 'label', 'legend', 'li', 'map', 'mark', 'menu', 'meter', 'nav', 'ol', 'optgroup', 'option', 'output', 'p', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr'];
|
|
3871
|
+
const miscTags$LWS = ['#comment', '#document-fragment'];
|
|
3867
3872
|
const svgTags$LWS = ['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'audio', 'canvas', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'video', 'view', 'vkern', 'use'];
|
|
3868
|
-
const
|
|
3873
|
+
const allHTMLTags$LWS = ArrayConcat$LWS(htmlTags$LWS, svgTags$LWS, miscTags$LWS);
|
|
3874
|
+
const allSVGTags$LWS = ArrayConcat$LWS(svgTags$LWS, miscTags$LWS);
|
|
3869
3875
|
const CUSTOM_ELEMENT_HANDLING$LWS = {
|
|
3870
3876
|
attributeNameCheck: /.+/,
|
|
3871
3877
|
allowCustomizedBuiltInElements: false,
|
|
@@ -3881,7 +3887,7 @@ const NODE_ALL_IN_PLACE$LWS = {
|
|
|
3881
3887
|
// Add '#document-fragment' to ALLOWED_TAGS to avoid a forbidden root node
|
|
3882
3888
|
// exception.
|
|
3883
3889
|
// https://github.com/cure53/DOMPurify/issues/664
|
|
3884
|
-
ALLOWED_TAGS:
|
|
3890
|
+
ALLOWED_TAGS: shallowCloneArray$LWS(allHTMLTags$LWS),
|
|
3885
3891
|
CUSTOM_ELEMENT_HANDLING: ObjectAssign$LWS$1({}, CUSTOM_ELEMENT_HANDLING$LWS),
|
|
3886
3892
|
IN_PLACE: true,
|
|
3887
3893
|
// @ts-ignore this type is on DOMPurifyConfig
|
|
@@ -3891,7 +3897,7 @@ const NODE_ALL_IN_PLACE$LWS = {
|
|
|
3891
3897
|
// fragment.
|
|
3892
3898
|
const NODE_SVG$LWS = {
|
|
3893
3899
|
ADD_ATTR: shallowCloneArray$LWS(additionalAttributes$LWS),
|
|
3894
|
-
ALLOWED_TAGS: shallowCloneArray$LWS(
|
|
3900
|
+
ALLOWED_TAGS: shallowCloneArray$LWS(allSVGTags$LWS),
|
|
3895
3901
|
CUSTOM_ELEMENT_HANDLING: ObjectAssign$LWS$1({}, CUSTOM_ELEMENT_HANDLING$LWS),
|
|
3896
3902
|
RETURN_DOM_FRAGMENT: true,
|
|
3897
3903
|
SANITIZE_DOM: false,
|
|
@@ -3901,7 +3907,7 @@ const NODE_SVG$LWS = {
|
|
|
3901
3907
|
// A config to use only tags allowed for blob and file.
|
|
3902
3908
|
const STRING_BLOB_HTML$LWS = {
|
|
3903
3909
|
ADD_ATTR: shallowCloneArray$LWS(additionalAttributes$LWS),
|
|
3904
|
-
ALLOWED_TAGS: ReflectApply$LWS$1(ArrayProtoFilter$LWS$1,
|
|
3910
|
+
ALLOWED_TAGS: ReflectApply$LWS$1(ArrayProtoFilter$LWS$1, allHTMLTags$LWS, [tag$LWS => tag$LWS !== 'iframe']),
|
|
3905
3911
|
CUSTOM_ELEMENT_HANDLING: ObjectAssign$LWS$1({}, CUSTOM_ELEMENT_HANDLING$LWS),
|
|
3906
3912
|
SANITIZE_DOM: false,
|
|
3907
3913
|
// @ts-ignore this type is on DOMPurifyConfig
|
|
@@ -4098,6 +4104,14 @@ function uponSanitizeAttribute$LWS(node$LWS, data$LWS, _config$LWS) {
|
|
|
4098
4104
|
if (attrValue$LWS && ReflectApply$LWS$1(StringProtoToUpperCase$LWS, ReflectApply$LWS$1(NodeProtoNodeNameGetter$LWS, node$LWS, []), []) === 'USE' && SANITIZE_ATTRIBUTES_LIST$LWS.includes(attrName$LWS)) {
|
|
4099
4105
|
data$LWS.attrValue = sanitizeSvgHref$LWS(attrValue$LWS);
|
|
4100
4106
|
}
|
|
4107
|
+
// To support Lit, we must tell DOMPurify that attributes starting with "@", ".", or "?" are allowed.
|
|
4108
|
+
// Ref:
|
|
4109
|
+
// https://lit.dev/docs/components/events/
|
|
4110
|
+
// https://lit.dev/docs/templates/expressions/#property-expressions
|
|
4111
|
+
// https://lit.dev/docs/templates/expressions/#boolean-attribute-expressions
|
|
4112
|
+
if (attrName$LWS && (ReflectApply$LWS$1(StringProtoStartsWith$LWS, attrName$LWS, ['@']) || ReflectApply$LWS$1(StringProtoStartsWith$LWS, attrName$LWS, ['.']) || ReflectApply$LWS$1(StringProtoStartsWith$LWS, attrName$LWS, ['?']))) {
|
|
4113
|
+
data$LWS.forceKeepAttr = true;
|
|
4114
|
+
}
|
|
4101
4115
|
return data$LWS;
|
|
4102
4116
|
}
|
|
4103
4117
|
function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
@@ -4106,7 +4120,7 @@ function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
|
4106
4120
|
}
|
|
4107
4121
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
4108
4122
|
}
|
|
4109
|
-
/*! version: 0.
|
|
4123
|
+
/*! version: 0.22.2 */
|
|
4110
4124
|
|
|
4111
4125
|
/*!
|
|
4112
4126
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -4304,7 +4318,7 @@ function encloseSrcSetter$LWS(targetElement$LWS) {
|
|
|
4304
4318
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
4305
4319
|
};
|
|
4306
4320
|
}
|
|
4307
|
-
/*! version: 0.
|
|
4321
|
+
/*! version: 0.22.2 */
|
|
4308
4322
|
|
|
4309
4323
|
/*!
|
|
4310
4324
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -9064,6 +9078,9 @@ function createDistortionHrefAttributeFactoryInitializer$LWS(attributeName$LWS)
|
|
|
9064
9078
|
}
|
|
9065
9079
|
const initDistortionSVGUseElementHrefAttribute$LWS = createDistortionHrefAttributeFactoryInitializer$LWS('href');
|
|
9066
9080
|
const initDistortionSVGUseElementXlinkHrefAttribute$LWS = createDistortionHrefAttributeFactoryInitializer$LWS('xlink:href');
|
|
9081
|
+
function createTrustedTypesError$LWS(name$LWS = '') {
|
|
9082
|
+
return `Cannot create TrustedTypePolicy with '${name$LWS}' policy name.`;
|
|
9083
|
+
}
|
|
9067
9084
|
function initDistortionTrustedTypePolicyFactoryCreatePolicy$LWS({
|
|
9068
9085
|
globalObject: {
|
|
9069
9086
|
TrustedTypePolicyFactory: TrustedTypePolicyFactory$LWS
|
|
@@ -9080,10 +9097,16 @@ function initDistortionTrustedTypePolicyFactoryCreatePolicy$LWS({
|
|
|
9080
9097
|
const name$LWS = args$LWS.length ? args$LWS[0] : /* istanbul ignore next: needs default platform behavior test */undefined;
|
|
9081
9098
|
// istanbul ignore else: needs default platform behavior test
|
|
9082
9099
|
if (name$LWS === 'default') {
|
|
9083
|
-
throw new LockerSecurityError$LWS(
|
|
9100
|
+
throw new LockerSecurityError$LWS(createTrustedTypesError$LWS(name$LWS));
|
|
9084
9101
|
}
|
|
9085
|
-
//
|
|
9086
|
-
|
|
9102
|
+
// If the policy is one of the CSP policies, it should be allowed
|
|
9103
|
+
try {
|
|
9104
|
+
// istanbul ignore next: needs default platform behavior test
|
|
9105
|
+
return ReflectApply$LWS$1(originalCreatePolicy$LWS, this, args$LWS);
|
|
9106
|
+
} catch (_unused3$LWS) {
|
|
9107
|
+
consoleWarn$LWS(`${createTrustedTypesError$LWS(name$LWS)} Substituting with Lightning Web Security policy.`);
|
|
9108
|
+
}
|
|
9109
|
+
return trusted;
|
|
9087
9110
|
}];
|
|
9088
9111
|
return function distortionTrustedTypePolicyFactoryCreatePolicy$LWS() {
|
|
9089
9112
|
return distortionEntry$LWS;
|
|
@@ -9147,7 +9170,7 @@ function initDistortionURLCreateObjectURL$LWS({
|
|
|
9147
9170
|
ReflectApply$LWS$1(XhrProtoOpen$LWS, xhr$LWS, ['GET', outURL$LWS, false]);
|
|
9148
9171
|
try {
|
|
9149
9172
|
ReflectApply$LWS$1(XhrProtoSend$LWS, xhr$LWS, []);
|
|
9150
|
-
} catch (
|
|
9173
|
+
} catch (_unused4$LWS) {
|
|
9151
9174
|
throw new LockerSecurityError$LWS(`Unable to verify ${toSafeTemplateStringValue$LWS(blobObject$LWS)} is secure.`);
|
|
9152
9175
|
}
|
|
9153
9176
|
const responseText$LWS = ReflectApply$LWS$1(XhrProtoResponseTextGetter$LWS, xhr$LWS, []);
|
|
@@ -9897,7 +9920,7 @@ const SVGElementBlockedProperties$LWS = ['nonce'];
|
|
|
9897
9920
|
const UIEventBlockedProperties$LWS = ['rangeParent'];
|
|
9898
9921
|
const WindowBlockedProperties$LWS = ['find', 'requestFileSystem', 'webkitRequestFileSystem'];
|
|
9899
9922
|
const XSLTProcessorBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
9900
|
-
/*! version: 0.
|
|
9923
|
+
/*! version: 0.22.2 */
|
|
9901
9924
|
|
|
9902
9925
|
/*!
|
|
9903
9926
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -12010,7 +12033,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
12010
12033
|
if (!('prototype' in distortionTarget$LWS)) {
|
|
12011
12034
|
targetTraits$LWS |= 8 /* TargetTraits.IsArrowFunction */;
|
|
12012
12035
|
}
|
|
12013
|
-
|
|
12014
12036
|
const safeLengthDesc$LWS = ReflectGetOwnPropertyDescriptor$LWS(originalTarget$LWS, 'length');
|
|
12015
12037
|
if (safeLengthDesc$LWS) {
|
|
12016
12038
|
ReflectSetPrototypeOf$LWS(safeLengthDesc$LWS, null);
|
|
@@ -12047,7 +12069,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
12047
12069
|
targetTraits$LWS = 64 /* TargetTraits.Revoked */;
|
|
12048
12070
|
}
|
|
12049
12071
|
}
|
|
12050
|
-
|
|
12051
12072
|
proxyPointer$LWS = foreignCallablePusher$LWS(createPointer$LWS(distortionTarget$LWS), targetTraits$LWS, targetFunctionArity$LWS, targetFunctionName$LWS, targetTypedArrayLength$LWS);
|
|
12052
12073
|
proxyPointerCache$LWS.set(originalTarget$LWS, proxyPointer$LWS);
|
|
12053
12074
|
return proxyPointer$LWS;
|
|
@@ -12779,7 +12800,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
12779
12800
|
}
|
|
12780
12801
|
result$LWS = !(resultEnum$LWS & 2 /* PreventExtensionsResult.False */);
|
|
12781
12802
|
}
|
|
12782
|
-
|
|
12783
12803
|
return result$LWS;
|
|
12784
12804
|
}
|
|
12785
12805
|
static passthruSetPrototypeOfTrap(_shadowTarget$LWS, proto$LWS) {
|
|
@@ -13728,11 +13748,9 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
13728
13748
|
if (ObjectIsFrozen$LWS(target$LWS)) {
|
|
13729
13749
|
return 4 /* TargetIntegrityTraits.IsFrozen */ & 2 /* TargetIntegrityTraits.IsSealed */ & 1 /* TargetIntegrityTraits.IsNotExtensible */;
|
|
13730
13750
|
}
|
|
13731
|
-
|
|
13732
13751
|
if (ObjectIsSealed$LWS(target$LWS)) {
|
|
13733
13752
|
return 2 /* TargetIntegrityTraits.IsSealed */ & 1 /* TargetIntegrityTraits.IsNotExtensible */;
|
|
13734
13753
|
}
|
|
13735
|
-
|
|
13736
13754
|
return 1 /* TargetIntegrityTraits.IsNotExtensible */;
|
|
13737
13755
|
}
|
|
13738
13756
|
} catch (_unused30$LWS) {
|
|
@@ -13742,7 +13760,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
13742
13760
|
return 8 /* TargetIntegrityTraits.Revoked */;
|
|
13743
13761
|
}
|
|
13744
13762
|
}
|
|
13745
|
-
|
|
13746
13763
|
return 0 /* TargetIntegrityTraits.None */;
|
|
13747
13764
|
} : () => 0 /* TargetIntegrityTraits.None */,
|
|
13748
13765
|
// callableGetToStringTagOfTarget
|
|
@@ -14110,7 +14127,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
14110
14127
|
};
|
|
14111
14128
|
/* eslint-enable prefer-object-spread */
|
|
14112
14129
|
}
|
|
14113
|
-
|
|
14114
14130
|
const createMembraneMarshallSourceInStrictMode$LWS = `
|
|
14115
14131
|
'use strict';
|
|
14116
14132
|
(${createMembraneMarshall$LWS})`;
|
|
@@ -14461,7 +14477,6 @@ function getESGlobalKeys$LWS(remapTypedArrays$LWS = true) {
|
|
|
14461
14477
|
// *** ECMA-402
|
|
14462
14478
|
// 'Intl', // Remapped
|
|
14463
14479
|
];
|
|
14464
|
-
|
|
14465
14480
|
if (remapTypedArrays$LWS === false) {
|
|
14466
14481
|
ESGlobalKeys$LWS.push('ArrayBuffer', 'BigInt64Array', 'BigUint64Array', 'DataView', 'Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'SharedArrayBuffer', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array');
|
|
14467
14482
|
}
|
|
@@ -15116,7 +15131,7 @@ function toSourceText$LWS(value$LWS, sourceType$LWS) {
|
|
|
15116
15131
|
// tools from mistaking the regexp or the replacement string for an
|
|
15117
15132
|
// actual source mapping URL.
|
|
15118
15133
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
15119
|
-
sourceText$LWS = `\n//# LWS Version = "0.
|
|
15134
|
+
sourceText$LWS = `\n//# LWS Version = "0.22.2"\n${sourceText$LWS}`;
|
|
15120
15135
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
15121
15136
|
// Append "'use strict'" to the extracted function body so it is
|
|
15122
15137
|
// evaluated in strict mode.
|
|
@@ -15315,7 +15330,6 @@ function createVirtualEnvironment$LWS(record$LWS) {
|
|
|
15315
15330
|
function getDefaultType$LWS(key$LWS) {
|
|
15316
15331
|
return key$LWS === CORE_SANDBOX_KEY$LWS ? 1 /* SandboxType.Internal */ : 0 /* SandboxType.External */;
|
|
15317
15332
|
}
|
|
15318
|
-
|
|
15319
15333
|
function createRootWindowSandboxRecord$LWS({
|
|
15320
15334
|
// istanbul ignore next: destructured default assignments are not correctly instrumented
|
|
15321
15335
|
context: context$LWS = EMPTY_OBJECT$LWS,
|
|
@@ -15767,9 +15781,26 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15767
15781
|
return secureDep$LWS;
|
|
15768
15782
|
}
|
|
15769
15783
|
secureDep$LWS = {
|
|
15770
|
-
loadScript: (thisArg$LWS, url$LWS) =>
|
|
15771
|
-
|
|
15772
|
-
|
|
15784
|
+
loadScript: (thisArg$LWS, url$LWS, config$LWS) => {
|
|
15785
|
+
const sandbox$LWS = createRootWindowSandboxRecord$LWS({
|
|
15786
|
+
key: key$LWS
|
|
15787
|
+
});
|
|
15788
|
+
if (isGaterEnabledFeature$LWS('enableTrustedMode') && config$LWS != null && config$LWS.trustedMode) {
|
|
15789
|
+
const trustedGlobals$LWS = config$LWS.trustedGlobals;
|
|
15790
|
+
if ((trustedGlobals$LWS == null ? void 0 : trustedGlobals$LWS.length) > 0) {
|
|
15791
|
+
return dep$LWS.loadScript(thisArg$LWS, url$LWS).then(() => {
|
|
15792
|
+
const installGlobals$LWS = sandbox$LWS.virtualEnvironmentEvaluator(`(list) => list.forEach(([key, value]) => window[key] = value)`);
|
|
15793
|
+
const globals$LWS = [];
|
|
15794
|
+
for (let i$LWS = 0; i$LWS < trustedGlobals$LWS.length; i$LWS++) {
|
|
15795
|
+
globals$LWS.push([trustedGlobals$LWS[i$LWS], window[trustedGlobals$LWS[i$LWS]]]);
|
|
15796
|
+
}
|
|
15797
|
+
installGlobals$LWS(globals$LWS);
|
|
15798
|
+
});
|
|
15799
|
+
}
|
|
15800
|
+
return dep$LWS.loadScript(thisArg$LWS, url$LWS);
|
|
15801
|
+
}
|
|
15802
|
+
return sandbox$LWS.helpers.loadScript(thisArg$LWS, url$LWS);
|
|
15803
|
+
},
|
|
15773
15804
|
loadStyle: (thisArg$LWS, url$LWS) => createRootWindowSandboxRecord$LWS({
|
|
15774
15805
|
key: key$LWS
|
|
15775
15806
|
}).helpers.loadStyle(thisArg$LWS, url$LWS)
|
|
@@ -15777,7 +15808,7 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15777
15808
|
depRegistry$LWS.set(dep$LWS, secureDep$LWS);
|
|
15778
15809
|
return secureDep$LWS;
|
|
15779
15810
|
}
|
|
15780
|
-
/*! version: 0.
|
|
15811
|
+
/*! version: 0.22.2 */
|
|
15781
15812
|
|
|
15782
15813
|
const loaderDefine = globalThis.LWR.define;
|
|
15783
15814
|
|
|
@@ -1329,6 +1329,10 @@ const {
|
|
|
1329
1329
|
function consoleWarn$LWS(...args$LWS) {
|
|
1330
1330
|
ReflectApply$LWS$1(consoleWarnRef$LWS, consoleRef$LWS, args$LWS);
|
|
1331
1331
|
}
|
|
1332
|
+
let gaterEnabledFeatures$LWS = [];
|
|
1333
|
+
function isGaterEnabledFeature$LWS(featureName$LWS) {
|
|
1334
|
+
return gaterEnabledFeatures$LWS.includes(`com.salesforce.locker.${featureName$LWS}`);
|
|
1335
|
+
}
|
|
1332
1336
|
const trackedLiveTargets$LWS = toSafeWeakSet$LWS$1(new WeakSetCtor$LWS$1());
|
|
1333
1337
|
function isTargetLive$LWS(target$LWS, targetTraits$LWS = 0 /* TargetTraits.None */) {
|
|
1334
1338
|
if (targetTraits$LWS & 1 /* TargetTraits.IsArray */ || targetTraits$LWS & 2 /* TargetTraits.IsArrayBufferView */ || targetTraits$LWS & 64 /* TargetTraits.Revoked */ || target$LWS === null || target$LWS === undefined || target$LWS === ObjectProto$LWS$1 || target$LWS === RegExpProto$LWS$1) {
|
|
@@ -1453,7 +1457,7 @@ const {
|
|
|
1453
1457
|
} = PromiseCtor$LWS.prototype;
|
|
1454
1458
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1455
1459
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1456
|
-
/*! version: 0.
|
|
1460
|
+
/*! version: 0.22.2 */
|
|
1457
1461
|
|
|
1458
1462
|
/*!
|
|
1459
1463
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2112,7 +2116,7 @@ const {
|
|
|
2112
2116
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2113
2117
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2114
2118
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2115
|
-
/*! version: 0.
|
|
2119
|
+
/*! version: 0.22.2 */
|
|
2116
2120
|
|
|
2117
2121
|
/*!
|
|
2118
2122
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2171,7 +2175,7 @@ function sanitizeURLForElement$LWS(url$LWS) {
|
|
|
2171
2175
|
function sanitizeURLString$LWS(urlString$LWS) {
|
|
2172
2176
|
return urlString$LWS === '' ? urlString$LWS : ReflectApply$LWS$1(StringProtoReplace$LWS, urlString$LWS, [newlinesAndTabsRegExp$LWS, '']);
|
|
2173
2177
|
}
|
|
2174
|
-
/*! version: 0.
|
|
2178
|
+
/*! version: 0.22.2 */
|
|
2175
2179
|
|
|
2176
2180
|
/*! @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
2181
|
|
|
@@ -3857,15 +3861,17 @@ try {
|
|
|
3857
3861
|
// swallow
|
|
3858
3862
|
}
|
|
3859
3863
|
const trusted = createPolicy('trusted', policyOptions);
|
|
3860
|
-
/*! version: 0.
|
|
3864
|
+
/*! version: 0.22.2 */
|
|
3861
3865
|
|
|
3862
3866
|
/*!
|
|
3863
3867
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
3864
3868
|
*/
|
|
3865
|
-
const additionalAttributes$LWS = ['role', 'target'];
|
|
3869
|
+
const additionalAttributes$LWS = ['role', 'part', 'target'];
|
|
3866
3870
|
const htmlTags$LWS = ['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'caption', 'canvas', 'center', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del', 'details', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'fieldset', 'figure', 'figcaption', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'i', 'iframe', 'img', 'input', 'ins', 'keygen', 'kbd', 'label', 'legend', 'li', 'map', 'mark', 'menu', 'meter', 'nav', 'ol', 'optgroup', 'option', 'output', 'p', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr'];
|
|
3871
|
+
const miscTags$LWS = ['#comment', '#document-fragment'];
|
|
3867
3872
|
const svgTags$LWS = ['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'audio', 'canvas', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'video', 'view', 'vkern', 'use'];
|
|
3868
|
-
const
|
|
3873
|
+
const allHTMLTags$LWS = ArrayConcat$LWS(htmlTags$LWS, svgTags$LWS, miscTags$LWS);
|
|
3874
|
+
const allSVGTags$LWS = ArrayConcat$LWS(svgTags$LWS, miscTags$LWS);
|
|
3869
3875
|
const CUSTOM_ELEMENT_HANDLING$LWS = {
|
|
3870
3876
|
attributeNameCheck: /.+/,
|
|
3871
3877
|
allowCustomizedBuiltInElements: false,
|
|
@@ -3881,7 +3887,7 @@ const NODE_ALL_IN_PLACE$LWS = {
|
|
|
3881
3887
|
// Add '#document-fragment' to ALLOWED_TAGS to avoid a forbidden root node
|
|
3882
3888
|
// exception.
|
|
3883
3889
|
// https://github.com/cure53/DOMPurify/issues/664
|
|
3884
|
-
ALLOWED_TAGS:
|
|
3890
|
+
ALLOWED_TAGS: shallowCloneArray$LWS(allHTMLTags$LWS),
|
|
3885
3891
|
CUSTOM_ELEMENT_HANDLING: ObjectAssign$LWS$1({}, CUSTOM_ELEMENT_HANDLING$LWS),
|
|
3886
3892
|
IN_PLACE: true,
|
|
3887
3893
|
// @ts-ignore this type is on DOMPurifyConfig
|
|
@@ -3891,7 +3897,7 @@ const NODE_ALL_IN_PLACE$LWS = {
|
|
|
3891
3897
|
// fragment.
|
|
3892
3898
|
const NODE_SVG$LWS = {
|
|
3893
3899
|
ADD_ATTR: shallowCloneArray$LWS(additionalAttributes$LWS),
|
|
3894
|
-
ALLOWED_TAGS: shallowCloneArray$LWS(
|
|
3900
|
+
ALLOWED_TAGS: shallowCloneArray$LWS(allSVGTags$LWS),
|
|
3895
3901
|
CUSTOM_ELEMENT_HANDLING: ObjectAssign$LWS$1({}, CUSTOM_ELEMENT_HANDLING$LWS),
|
|
3896
3902
|
RETURN_DOM_FRAGMENT: true,
|
|
3897
3903
|
SANITIZE_DOM: false,
|
|
@@ -3901,7 +3907,7 @@ const NODE_SVG$LWS = {
|
|
|
3901
3907
|
// A config to use only tags allowed for blob and file.
|
|
3902
3908
|
const STRING_BLOB_HTML$LWS = {
|
|
3903
3909
|
ADD_ATTR: shallowCloneArray$LWS(additionalAttributes$LWS),
|
|
3904
|
-
ALLOWED_TAGS: ReflectApply$LWS$1(ArrayProtoFilter$LWS$1,
|
|
3910
|
+
ALLOWED_TAGS: ReflectApply$LWS$1(ArrayProtoFilter$LWS$1, allHTMLTags$LWS, [tag$LWS => tag$LWS !== 'iframe']),
|
|
3905
3911
|
CUSTOM_ELEMENT_HANDLING: ObjectAssign$LWS$1({}, CUSTOM_ELEMENT_HANDLING$LWS),
|
|
3906
3912
|
SANITIZE_DOM: false,
|
|
3907
3913
|
// @ts-ignore this type is on DOMPurifyConfig
|
|
@@ -4098,6 +4104,14 @@ function uponSanitizeAttribute$LWS(node$LWS, data$LWS, _config$LWS) {
|
|
|
4098
4104
|
if (attrValue$LWS && ReflectApply$LWS$1(StringProtoToUpperCase$LWS, ReflectApply$LWS$1(NodeProtoNodeNameGetter$LWS, node$LWS, []), []) === 'USE' && SANITIZE_ATTRIBUTES_LIST$LWS.includes(attrName$LWS)) {
|
|
4099
4105
|
data$LWS.attrValue = sanitizeSvgHref$LWS(attrValue$LWS);
|
|
4100
4106
|
}
|
|
4107
|
+
// To support Lit, we must tell DOMPurify that attributes starting with "@", ".", or "?" are allowed.
|
|
4108
|
+
// Ref:
|
|
4109
|
+
// https://lit.dev/docs/components/events/
|
|
4110
|
+
// https://lit.dev/docs/templates/expressions/#property-expressions
|
|
4111
|
+
// https://lit.dev/docs/templates/expressions/#boolean-attribute-expressions
|
|
4112
|
+
if (attrName$LWS && (ReflectApply$LWS$1(StringProtoStartsWith$LWS, attrName$LWS, ['@']) || ReflectApply$LWS$1(StringProtoStartsWith$LWS, attrName$LWS, ['.']) || ReflectApply$LWS$1(StringProtoStartsWith$LWS, attrName$LWS, ['?']))) {
|
|
4113
|
+
data$LWS.forceKeepAttr = true;
|
|
4114
|
+
}
|
|
4101
4115
|
return data$LWS;
|
|
4102
4116
|
}
|
|
4103
4117
|
function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
@@ -4106,7 +4120,7 @@ function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
|
4106
4120
|
}
|
|
4107
4121
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
4108
4122
|
}
|
|
4109
|
-
/*! version: 0.
|
|
4123
|
+
/*! version: 0.22.2 */
|
|
4110
4124
|
|
|
4111
4125
|
/*!
|
|
4112
4126
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -4304,7 +4318,7 @@ function encloseSrcSetter$LWS(targetElement$LWS) {
|
|
|
4304
4318
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
4305
4319
|
};
|
|
4306
4320
|
}
|
|
4307
|
-
/*! version: 0.
|
|
4321
|
+
/*! version: 0.22.2 */
|
|
4308
4322
|
|
|
4309
4323
|
/*!
|
|
4310
4324
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -9064,6 +9078,9 @@ function createDistortionHrefAttributeFactoryInitializer$LWS(attributeName$LWS)
|
|
|
9064
9078
|
}
|
|
9065
9079
|
const initDistortionSVGUseElementHrefAttribute$LWS = createDistortionHrefAttributeFactoryInitializer$LWS('href');
|
|
9066
9080
|
const initDistortionSVGUseElementXlinkHrefAttribute$LWS = createDistortionHrefAttributeFactoryInitializer$LWS('xlink:href');
|
|
9081
|
+
function createTrustedTypesError$LWS(name$LWS = '') {
|
|
9082
|
+
return `Cannot create TrustedTypePolicy with '${name$LWS}' policy name.`;
|
|
9083
|
+
}
|
|
9067
9084
|
function initDistortionTrustedTypePolicyFactoryCreatePolicy$LWS({
|
|
9068
9085
|
globalObject: {
|
|
9069
9086
|
TrustedTypePolicyFactory: TrustedTypePolicyFactory$LWS
|
|
@@ -9080,10 +9097,16 @@ function initDistortionTrustedTypePolicyFactoryCreatePolicy$LWS({
|
|
|
9080
9097
|
const name$LWS = args$LWS.length ? args$LWS[0] : /* istanbul ignore next: needs default platform behavior test */undefined;
|
|
9081
9098
|
// istanbul ignore else: needs default platform behavior test
|
|
9082
9099
|
if (name$LWS === 'default') {
|
|
9083
|
-
throw new LockerSecurityError$LWS(
|
|
9100
|
+
throw new LockerSecurityError$LWS(createTrustedTypesError$LWS(name$LWS));
|
|
9084
9101
|
}
|
|
9085
|
-
//
|
|
9086
|
-
|
|
9102
|
+
// If the policy is one of the CSP policies, it should be allowed
|
|
9103
|
+
try {
|
|
9104
|
+
// istanbul ignore next: needs default platform behavior test
|
|
9105
|
+
return ReflectApply$LWS$1(originalCreatePolicy$LWS, this, args$LWS);
|
|
9106
|
+
} catch (_unused3$LWS) {
|
|
9107
|
+
consoleWarn$LWS(`${createTrustedTypesError$LWS(name$LWS)} Substituting with Lightning Web Security policy.`);
|
|
9108
|
+
}
|
|
9109
|
+
return trusted;
|
|
9087
9110
|
}];
|
|
9088
9111
|
return function distortionTrustedTypePolicyFactoryCreatePolicy$LWS() {
|
|
9089
9112
|
return distortionEntry$LWS;
|
|
@@ -9147,7 +9170,7 @@ function initDistortionURLCreateObjectURL$LWS({
|
|
|
9147
9170
|
ReflectApply$LWS$1(XhrProtoOpen$LWS, xhr$LWS, ['GET', outURL$LWS, false]);
|
|
9148
9171
|
try {
|
|
9149
9172
|
ReflectApply$LWS$1(XhrProtoSend$LWS, xhr$LWS, []);
|
|
9150
|
-
} catch (
|
|
9173
|
+
} catch (_unused4$LWS) {
|
|
9151
9174
|
throw new LockerSecurityError$LWS(`Unable to verify ${toSafeTemplateStringValue$LWS(blobObject$LWS)} is secure.`);
|
|
9152
9175
|
}
|
|
9153
9176
|
const responseText$LWS = ReflectApply$LWS$1(XhrProtoResponseTextGetter$LWS, xhr$LWS, []);
|
|
@@ -9897,7 +9920,7 @@ const SVGElementBlockedProperties$LWS = ['nonce'];
|
|
|
9897
9920
|
const UIEventBlockedProperties$LWS = ['rangeParent'];
|
|
9898
9921
|
const WindowBlockedProperties$LWS = ['find', 'requestFileSystem', 'webkitRequestFileSystem'];
|
|
9899
9922
|
const XSLTProcessorBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
9900
|
-
/*! version: 0.
|
|
9923
|
+
/*! version: 0.22.2 */
|
|
9901
9924
|
|
|
9902
9925
|
/*!
|
|
9903
9926
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -12012,7 +12035,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
12012
12035
|
if (!('prototype' in distortionTarget$LWS)) {
|
|
12013
12036
|
targetTraits$LWS |= 8 /* TargetTraits.IsArrowFunction */;
|
|
12014
12037
|
}
|
|
12015
|
-
|
|
12016
12038
|
const safeLengthDesc$LWS = ReflectGetOwnPropertyDescriptor$LWS(originalTarget$LWS, 'length');
|
|
12017
12039
|
if (safeLengthDesc$LWS) {
|
|
12018
12040
|
ReflectSetPrototypeOf$LWS(safeLengthDesc$LWS, null);
|
|
@@ -12049,7 +12071,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
12049
12071
|
targetTraits$LWS = 64 /* TargetTraits.Revoked */;
|
|
12050
12072
|
}
|
|
12051
12073
|
}
|
|
12052
|
-
|
|
12053
12074
|
proxyPointer$LWS = foreignCallablePusher$LWS(createPointer$LWS(distortionTarget$LWS), targetTraits$LWS, targetFunctionArity$LWS, targetFunctionName$LWS, targetTypedArrayLength$LWS);
|
|
12054
12075
|
proxyPointerCache$LWS.set(originalTarget$LWS, proxyPointer$LWS);
|
|
12055
12076
|
return proxyPointer$LWS;
|
|
@@ -12781,7 +12802,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
12781
12802
|
}
|
|
12782
12803
|
result$LWS = !(resultEnum$LWS & 2 /* PreventExtensionsResult.False */);
|
|
12783
12804
|
}
|
|
12784
|
-
|
|
12785
12805
|
return result$LWS;
|
|
12786
12806
|
}
|
|
12787
12807
|
static passthruSetPrototypeOfTrap(_shadowTarget$LWS, proto$LWS) {
|
|
@@ -13730,11 +13750,9 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
13730
13750
|
if (ObjectIsFrozen$LWS(target$LWS)) {
|
|
13731
13751
|
return 4 /* TargetIntegrityTraits.IsFrozen */ & 2 /* TargetIntegrityTraits.IsSealed */ & 1 /* TargetIntegrityTraits.IsNotExtensible */;
|
|
13732
13752
|
}
|
|
13733
|
-
|
|
13734
13753
|
if (ObjectIsSealed$LWS(target$LWS)) {
|
|
13735
13754
|
return 2 /* TargetIntegrityTraits.IsSealed */ & 1 /* TargetIntegrityTraits.IsNotExtensible */;
|
|
13736
13755
|
}
|
|
13737
|
-
|
|
13738
13756
|
return 1 /* TargetIntegrityTraits.IsNotExtensible */;
|
|
13739
13757
|
}
|
|
13740
13758
|
} catch (_unused30$LWS) {
|
|
@@ -13744,7 +13762,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
13744
13762
|
return 8 /* TargetIntegrityTraits.Revoked */;
|
|
13745
13763
|
}
|
|
13746
13764
|
}
|
|
13747
|
-
|
|
13748
13765
|
return 0 /* TargetIntegrityTraits.None */;
|
|
13749
13766
|
} : () => 0 /* TargetIntegrityTraits.None */,
|
|
13750
13767
|
// callableGetToStringTagOfTarget
|
|
@@ -14112,7 +14129,6 @@ function createMembraneMarshall$LWS(globalObject$LWS) {
|
|
|
14112
14129
|
};
|
|
14113
14130
|
/* eslint-enable prefer-object-spread */
|
|
14114
14131
|
}
|
|
14115
|
-
|
|
14116
14132
|
const createMembraneMarshallSourceInStrictMode$LWS = `
|
|
14117
14133
|
'use strict';
|
|
14118
14134
|
(${createMembraneMarshall$LWS})`;
|
|
@@ -14463,7 +14479,6 @@ function getESGlobalKeys$LWS(remapTypedArrays$LWS = true) {
|
|
|
14463
14479
|
// *** ECMA-402
|
|
14464
14480
|
// 'Intl', // Remapped
|
|
14465
14481
|
];
|
|
14466
|
-
|
|
14467
14482
|
if (remapTypedArrays$LWS === false) {
|
|
14468
14483
|
ESGlobalKeys$LWS.push('ArrayBuffer', 'BigInt64Array', 'BigUint64Array', 'DataView', 'Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'SharedArrayBuffer', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array');
|
|
14469
14484
|
}
|
|
@@ -15118,7 +15133,7 @@ function toSourceText$LWS(value$LWS, sourceType$LWS) {
|
|
|
15118
15133
|
// tools from mistaking the regexp or the replacement string for an
|
|
15119
15134
|
// actual source mapping URL.
|
|
15120
15135
|
/\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
|
|
15121
|
-
sourceText$LWS = `\n//# LWS Version = "0.
|
|
15136
|
+
sourceText$LWS = `\n//# LWS Version = "0.22.2"\n${sourceText$LWS}`;
|
|
15122
15137
|
return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
|
|
15123
15138
|
// Append "'use strict'" to the extracted function body so it is
|
|
15124
15139
|
// evaluated in strict mode.
|
|
@@ -15317,7 +15332,6 @@ function createVirtualEnvironment$LWS(record$LWS) {
|
|
|
15317
15332
|
function getDefaultType$LWS(key$LWS) {
|
|
15318
15333
|
return key$LWS === CORE_SANDBOX_KEY$LWS ? 1 /* SandboxType.Internal */ : 0 /* SandboxType.External */;
|
|
15319
15334
|
}
|
|
15320
|
-
|
|
15321
15335
|
function createRootWindowSandboxRecord$LWS({
|
|
15322
15336
|
// istanbul ignore next: destructured default assignments are not correctly instrumented
|
|
15323
15337
|
context: context$LWS = EMPTY_OBJECT$LWS,
|
|
@@ -15799,9 +15813,26 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15799
15813
|
return secureDep$LWS;
|
|
15800
15814
|
}
|
|
15801
15815
|
secureDep$LWS = {
|
|
15802
|
-
loadScript: (thisArg$LWS, url$LWS) =>
|
|
15803
|
-
|
|
15804
|
-
|
|
15816
|
+
loadScript: (thisArg$LWS, url$LWS, config$LWS) => {
|
|
15817
|
+
const sandbox$LWS = createRootWindowSandboxRecord$LWS({
|
|
15818
|
+
key: key$LWS
|
|
15819
|
+
});
|
|
15820
|
+
if (isGaterEnabledFeature$LWS('enableTrustedMode') && config$LWS != null && config$LWS.trustedMode) {
|
|
15821
|
+
const trustedGlobals$LWS = config$LWS.trustedGlobals;
|
|
15822
|
+
if ((trustedGlobals$LWS == null ? void 0 : trustedGlobals$LWS.length) > 0) {
|
|
15823
|
+
return dep$LWS.loadScript(thisArg$LWS, url$LWS).then(() => {
|
|
15824
|
+
const installGlobals$LWS = sandbox$LWS.virtualEnvironmentEvaluator(`(list) => list.forEach(([key, value]) => window[key] = value)`);
|
|
15825
|
+
const globals$LWS = [];
|
|
15826
|
+
for (let i$LWS = 0; i$LWS < trustedGlobals$LWS.length; i$LWS++) {
|
|
15827
|
+
globals$LWS.push([trustedGlobals$LWS[i$LWS], window[trustedGlobals$LWS[i$LWS]]]);
|
|
15828
|
+
}
|
|
15829
|
+
installGlobals$LWS(globals$LWS);
|
|
15830
|
+
});
|
|
15831
|
+
}
|
|
15832
|
+
return dep$LWS.loadScript(thisArg$LWS, url$LWS);
|
|
15833
|
+
}
|
|
15834
|
+
return sandbox$LWS.helpers.loadScript(thisArg$LWS, url$LWS);
|
|
15835
|
+
},
|
|
15805
15836
|
loadStyle: (thisArg$LWS, url$LWS) => createRootWindowSandboxRecord$LWS({
|
|
15806
15837
|
key: key$LWS
|
|
15807
15838
|
}).helpers.loadStyle(thisArg$LWS, url$LWS)
|
|
@@ -15809,7 +15840,7 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15809
15840
|
depRegistry$LWS.set(dep$LWS, secureDep$LWS);
|
|
15810
15841
|
return secureDep$LWS;
|
|
15811
15842
|
}
|
|
15812
|
-
/*! version: 0.
|
|
15843
|
+
/*! version: 0.22.2 */
|
|
15813
15844
|
|
|
15814
15845
|
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 };
|
|
15815
15846
|
//# sourceMappingURL=lockerSandbox.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side module implementation of the serverDataCallback bootstrap service.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const serverDataCallbacks = [];
|
|
6
|
+
export function registerServerDataCallbacks(hook) {
|
|
7
|
+
serverDataCallbacks.push(hook);
|
|
8
|
+
}
|
|
9
|
+
export function evaluateServerDataCallbacks(serverData) {
|
|
10
|
+
// now that we have server data, run the server data hooks
|
|
11
|
+
for (const serverDataCallback of serverDataCallbacks) {
|
|
12
|
+
serverDataCallback({
|
|
13
|
+
serverData
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { registerHandleStaleModuleHook } from './handleStaleModuleESM';
|
|
2
2
|
import { getClientBootstrapConfig } from 'lwr/preInit';
|
|
3
|
+
import { registerServerDataCallbacks } from 'lwr/serverDataCallback';
|
|
3
4
|
const noop = () => {
|
|
4
5
|
console.warn('API is not supported in ESM format');
|
|
5
6
|
};
|
|
@@ -17,13 +18,10 @@ function getAppMetadata() {
|
|
|
17
18
|
rootComponents
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
|
-
function getServerData() {
|
|
21
|
-
return getClientBootstrapConfig().serverData;
|
|
22
|
-
}
|
|
23
21
|
export const services = {
|
|
24
22
|
// addLoaderPlugin is only supported in AMD
|
|
25
23
|
addLoaderPlugin: noop,
|
|
26
24
|
handleStaleModule: registerHandleStaleModuleHook,
|
|
27
25
|
appMetadata: getAppMetadata(),
|
|
28
|
-
|
|
26
|
+
addServerDataCallback: registerServerDataCallbacks
|
|
29
27
|
};
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.13.0-alpha.
|
|
7
|
+
"version": "0.13.0-alpha.10",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"build:platform": "node scripts/strip-for-core.js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@locker/sandbox": "0.
|
|
37
|
-
"@lwrjs/shared-utils": "0.13.0-alpha.
|
|
36
|
+
"@locker/sandbox": "0.22.2",
|
|
37
|
+
"@lwrjs/shared-utils": "0.13.0-alpha.10"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lwrjs/types": "0.13.0-alpha.
|
|
40
|
+
"@lwrjs/types": "0.13.0-alpha.10",
|
|
41
41
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
42
42
|
"@rollup/plugin-sucrase": "^5.0.2",
|
|
43
43
|
"@rollup/plugin-terser": "^0.4.4",
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
"lwr/lockerDefine",
|
|
61
61
|
"lwr/lockerSandbox",
|
|
62
62
|
"lwr/metrics",
|
|
63
|
-
"lwr/profiler"
|
|
63
|
+
"lwr/profiler",
|
|
64
|
+
"lwr/serverDataCallback"
|
|
64
65
|
]
|
|
65
66
|
},
|
|
66
67
|
"engines": {
|
|
@@ -69,5 +70,5 @@
|
|
|
69
70
|
"volta": {
|
|
70
71
|
"extends": "../../../package.json"
|
|
71
72
|
},
|
|
72
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "53e2a825868b4c9b1662419b531c80be13afd779"
|
|
73
74
|
}
|