@adobe/alloy 2.20.0-alpha.1 → 2.20.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +83 -65
- package/libEs5/baseCode/index.js +0 -62
- package/libEs5/components/ActivityCollector/attachClickActivityCollector.js +0 -54
- package/libEs5/components/ActivityCollector/configValidators.js +0 -24
- package/libEs5/components/ActivityCollector/createGetLinkDetails.js +0 -69
- package/libEs5/components/ActivityCollector/createLinkClick.js +0 -39
- package/libEs5/components/ActivityCollector/getLinkName.js +0 -140
- package/libEs5/components/ActivityCollector/getLinkRegion.js +0 -62
- package/libEs5/components/ActivityCollector/index.js +0 -79
- package/libEs5/components/ActivityCollector/utils.js +0 -114
- package/libEs5/components/Audiences/index.js +0 -50
- package/libEs5/components/Audiences/injectProcessDestinations.js +0 -65
- package/libEs5/components/Audiences/injectProcessResponse.js +0 -39
- package/libEs5/components/Context/createComponent.js +0 -40
- package/libEs5/components/Context/implementationDetails.js +0 -28
- package/libEs5/components/Context/index.js +0 -57
- package/libEs5/components/Context/injectDevice.js +0 -67
- package/libEs5/components/Context/injectEnvironment.js +0 -41
- package/libEs5/components/Context/injectHighEntropyUserAgentHints.js +0 -59
- package/libEs5/components/Context/injectPlaceContext.js +0 -33
- package/libEs5/components/Context/injectTimestamp.js +0 -24
- package/libEs5/components/Context/injectWeb.js +0 -31
- package/libEs5/components/DataCollector/index.js +0 -111
- package/libEs5/components/DataCollector/validateApplyResponse.js +0 -36
- package/libEs5/components/DataCollector/validateUserEventOptions.js +0 -51
- package/libEs5/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +0 -32
- package/libEs5/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +0 -25
- package/libEs5/components/DecisioningEngine/constants.js +0 -31
- package/libEs5/components/DecisioningEngine/createApplyResponse.js +0 -36
- package/libEs5/components/DecisioningEngine/createConsequenceAdapter.js +0 -29
- package/libEs5/components/DecisioningEngine/createContextProvider.js +0 -93
- package/libEs5/components/DecisioningEngine/createDecisionHistory.js +0 -28
- package/libEs5/components/DecisioningEngine/createDecisionProvider.js +0 -51
- package/libEs5/components/DecisioningEngine/createEvaluableRulesetPayload.js +0 -80
- package/libEs5/components/DecisioningEngine/createEvaluateRulesetsCommand.js +0 -49
- package/libEs5/components/DecisioningEngine/createEventRegistry.js +0 -130
- package/libEs5/components/DecisioningEngine/createOnResponseHandler.js +0 -46
- package/libEs5/components/DecisioningEngine/createSubscribeRulesetItems.js +0 -87
- package/libEs5/components/DecisioningEngine/index.js +0 -119
- package/libEs5/components/DecisioningEngine/utils.js +0 -90
- package/libEs5/components/EventMerge/createComponent.js +0 -25
- package/libEs5/components/EventMerge/createEventMergeId.js +0 -21
- package/libEs5/components/EventMerge/index.js +0 -25
- package/libEs5/components/Identity/addEcidQueryToPayload.js +0 -23
- package/libEs5/components/Identity/addEcidToPayload.js +0 -21
- package/libEs5/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js +0 -26
- package/libEs5/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +0 -46
- package/libEs5/components/Identity/configValidators.js +0 -22
- package/libEs5/components/Identity/constants/authState.js +0 -21
- package/libEs5/components/Identity/constants/defaultIdSyncTtlMinutes.js +0 -16
- package/libEs5/components/Identity/createComponent.js +0 -98
- package/libEs5/components/Identity/createLegacyIdentity.js +0 -70
- package/libEs5/components/Identity/getEcidFromResponse.js +0 -24
- package/libEs5/components/Identity/getIdentity/createGetIdentity.js +0 -36
- package/libEs5/components/Identity/getIdentity/createIdentityRequest.js +0 -30
- package/libEs5/components/Identity/getIdentity/createIdentityRequestPayload.js +0 -30
- package/libEs5/components/Identity/getIdentity/getIdentityOptionsValidator.js +0 -28
- package/libEs5/components/Identity/index.js +0 -129
- package/libEs5/components/Identity/injectAddLegacyEcidToPayload.js +0 -32
- package/libEs5/components/Identity/injectAddQueryStringIdentityToPayload.js +0 -65
- package/libEs5/components/Identity/injectAwaitIdentityCookie.js +0 -57
- package/libEs5/components/Identity/injectEnsureSingleIdentity.js +0 -98
- package/libEs5/components/Identity/injectHandleResponseForIdSyncs.js +0 -21
- package/libEs5/components/Identity/injectProcessIdSyncs.js +0 -42
- package/libEs5/components/Identity/injectSetDomainForInitialIdentityPayload.js +0 -34
- package/libEs5/components/Identity/visitorService/awaitVisitorOptIn.js +0 -35
- package/libEs5/components/Identity/visitorService/getVisitor.js +0 -20
- package/libEs5/components/Identity/visitorService/injectGetEcidFromVisitor.js +0 -50
- package/libEs5/components/LegacyMediaAnalytics/createMediaAnalyticsTracker.js +0 -272
- package/libEs5/components/LegacyMediaAnalytics/createMediaHelper.js +0 -188
- package/libEs5/components/LegacyMediaAnalytics/index.js +0 -48
- package/libEs5/components/LegacyMediaAnalytics/media/constants.js +0 -154
- package/libEs5/components/LegacyMediaAnalytics/media/mediaKeysToXdmConverter.js +0 -51
- package/libEs5/components/LibraryInfo/index.js +0 -64
- package/libEs5/components/MachineLearning/index.js +0 -27
- package/libEs5/components/MachineLearning/processResponse.js +0 -20
- package/libEs5/components/MediaCollection/constants/eventTypes.js +0 -25
- package/libEs5/components/MediaCollection/createHeartbeatEngine.js +0 -63
- package/libEs5/components/MediaCollection/createMediaEventManager.js +0 -109
- package/libEs5/components/MediaCollection/createMediaRequest.js +0 -30
- package/libEs5/components/MediaCollection/createMediaSessionCacheManager.js +0 -62
- package/libEs5/components/MediaCollection/createUpdateMediaSessionState.js +0 -31
- package/libEs5/components/MediaCollection/index.js +0 -165
- package/libEs5/components/MediaCollection/validateMediaEventOptions.js +0 -35
- package/libEs5/components/MediaCollection/validateMediaSessionOptions.js +0 -36
- package/libEs5/components/Personalization/constants/loggerMessage.js +0 -18
- package/libEs5/components/Personalization/constants/scopeType.js +0 -21
- package/libEs5/components/Personalization/constants/surface.js +0 -23
- package/libEs5/components/Personalization/createActionsProvider.js +0 -72
- package/libEs5/components/Personalization/createApplyPropositions.js +0 -113
- package/libEs5/components/Personalization/createClickStorage.js +0 -62
- package/libEs5/components/Personalization/createCollect.js +0 -54
- package/libEs5/components/Personalization/createComponent.js +0 -142
- package/libEs5/components/Personalization/createFetchDataHandler.js +0 -84
- package/libEs5/components/Personalization/createGetPageLocation.js +0 -21
- package/libEs5/components/Personalization/createNotificationHandler.js +0 -33
- package/libEs5/components/Personalization/createOnClickHandler.js +0 -52
- package/libEs5/components/Personalization/createOnDecisionHandler.js +0 -44
- package/libEs5/components/Personalization/createPersonalizationDetails.js +0 -105
- package/libEs5/components/Personalization/createPreprocessors.js +0 -21
- package/libEs5/components/Personalization/createSetTargetMigration.js +0 -29
- package/libEs5/components/Personalization/createViewCacheManager.js +0 -91
- package/libEs5/components/Personalization/createViewChangeHandler.js +0 -46
- package/libEs5/components/Personalization/dom-actions/action.js +0 -121
- package/libEs5/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +0 -42
- package/libEs5/components/Personalization/dom-actions/appendHtml.js +0 -33
- package/libEs5/components/Personalization/dom-actions/clicks/collectClicks.js +0 -109
- package/libEs5/components/Personalization/dom-actions/createPreprocess.js +0 -26
- package/libEs5/components/Personalization/dom-actions/createRedirect.js +0 -30
- package/libEs5/components/Personalization/dom-actions/dom/createFragment.js +0 -22
- package/libEs5/components/Personalization/dom-actions/dom/getAttribute.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/getChildNodes.js +0 -23
- package/libEs5/components/Personalization/dom-actions/dom/getChildren.js +0 -23
- package/libEs5/components/Personalization/dom-actions/dom/getElementById.js +0 -25
- package/libEs5/components/Personalization/dom-actions/dom/getFirstChild.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/getNextSibling.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/getNonce.js +0 -37
- package/libEs5/components/Personalization/dom-actions/dom/getParent.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/helperForEq.js +0 -26
- package/libEs5/components/Personalization/dom-actions/dom/index.js +0 -100
- package/libEs5/components/Personalization/dom-actions/dom/insertAfter.js +0 -26
- package/libEs5/components/Personalization/dom-actions/dom/insertBefore.js +0 -25
- package/libEs5/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +0 -38
- package/libEs5/components/Personalization/dom-actions/dom/removeAttribute.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/selectNodesWithEq.js +0 -107
- package/libEs5/components/Personalization/dom-actions/dom/setAttribute.js +0 -18
- package/libEs5/components/Personalization/dom-actions/dom/setStyle.js +0 -24
- package/libEs5/components/Personalization/dom-actions/images.js +0 -39
- package/libEs5/components/Personalization/dom-actions/index.js +0 -9
- package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +0 -36
- package/libEs5/components/Personalization/dom-actions/insertHtmlAfter.js +0 -32
- package/libEs5/components/Personalization/dom-actions/insertHtmlBefore.js +0 -32
- package/libEs5/components/Personalization/dom-actions/prependHtml.js +0 -46
- package/libEs5/components/Personalization/dom-actions/rearrangeChildren.js +0 -33
- package/libEs5/components/Personalization/dom-actions/remapCustomCodeOffers.js +0 -37
- package/libEs5/components/Personalization/dom-actions/remapHeadOffers.js +0 -55
- package/libEs5/components/Personalization/dom-actions/replaceHtml.js +0 -21
- package/libEs5/components/Personalization/dom-actions/scripts.js +0 -92
- package/libEs5/components/Personalization/dom-actions/setAttributes.js +0 -21
- package/libEs5/components/Personalization/dom-actions/setHtml.js +0 -28
- package/libEs5/components/Personalization/dom-actions/setStyles.js +0 -26
- package/libEs5/components/Personalization/dom-actions/setText.js +0 -18
- package/libEs5/components/Personalization/dom-actions/swapImage.js +0 -32
- package/libEs5/components/Personalization/event.js +0 -48
- package/libEs5/components/Personalization/flicker/index.js +0 -87
- package/libEs5/components/Personalization/handlers/createProcessDomAction.js +0 -69
- package/libEs5/components/Personalization/handlers/createProcessHtmlContent.js +0 -44
- package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +0 -76
- package/libEs5/components/Personalization/handlers/createProcessPropositions.js +0 -195
- package/libEs5/components/Personalization/handlers/createProcessRedirect.js +0 -46
- package/libEs5/components/Personalization/handlers/injectCreateProposition.js +0 -116
- package/libEs5/components/Personalization/handlers/processDefaultContent.js +0 -21
- package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +0 -288
- package/libEs5/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +0 -23
- package/libEs5/components/Personalization/in-app-message-actions/utils.js +0 -53
- package/libEs5/components/Personalization/index.js +0 -153
- package/libEs5/components/Personalization/utils/addRenderAttemptedToDecisions.js +0 -25
- package/libEs5/components/Personalization/utils/createAsyncArray.js +0 -39
- package/libEs5/components/Personalization/utils/isAuthoringModeEnabled.js +0 -19
- package/libEs5/components/Personalization/utils/surfaceUtils.js +0 -102
- package/libEs5/components/Personalization/validateApplyPropositionsOptions.js +0 -36
- package/libEs5/components/Privacy/computeConsentHash.js +0 -34
- package/libEs5/components/Privacy/createComponent.js +0 -86
- package/libEs5/components/Privacy/createConsentHashStore.js +0 -60
- package/libEs5/components/Privacy/createConsentRequest.js +0 -30
- package/libEs5/components/Privacy/createConsentRequestPayload.js +0 -34
- package/libEs5/components/Privacy/createStoredConsent.js +0 -32
- package/libEs5/components/Privacy/index.js +0 -64
- package/libEs5/components/Privacy/injectSendSetConsentRequest.js +0 -48
- package/libEs5/components/Privacy/parseConsentCookie.js +0 -38
- package/libEs5/components/Privacy/validateSetConsentOptions.js +0 -22
- package/libEs5/constants/apiVersion.js +0 -16
- package/libEs5/constants/browser.js +0 -29
- package/libEs5/constants/consentPurpose.js +0 -17
- package/libEs5/constants/consentStatus.js +0 -21
- package/libEs5/constants/contentType.js +0 -18
- package/libEs5/constants/cookieNameKey.js +0 -21
- package/libEs5/constants/cookieNamePrefix.js +0 -17
- package/libEs5/constants/coreCommands.js +0 -19
- package/libEs5/constants/debugQueryParam.js +0 -16
- package/libEs5/constants/decisionProvider.js +0 -16
- package/libEs5/constants/domain.js +0 -19
- package/libEs5/constants/ecidNamespace.js +0 -16
- package/libEs5/constants/edgeBasePath.js +0 -16
- package/libEs5/constants/elementAttribute.js +0 -17
- package/libEs5/constants/eventType.js +0 -25
- package/libEs5/constants/handle.js +0 -16
- package/libEs5/constants/highEntropyUserAgentClientHints.js +0 -16
- package/libEs5/constants/httpHeaderNames.js +0 -19
- package/libEs5/constants/httpStatusCode.js +0 -25
- package/libEs5/constants/identityMapAuthenticatedState.js +0 -20
- package/libEs5/constants/legacyCookies.js +0 -21
- package/libEs5/constants/libraryName.js +0 -16
- package/libEs5/constants/libraryVersion.js +0 -18
- package/libEs5/constants/namespace.js +0 -16
- package/libEs5/constants/pageWideScope.js +0 -16
- package/libEs5/constants/propositionEventType.js +0 -33
- package/libEs5/constants/queryStringIdentityParam.js +0 -16
- package/libEs5/constants/schema.js +0 -35
- package/libEs5/constants/shadowSeparator.js +0 -16
- package/libEs5/constants/tagName.js +0 -29
- package/libEs5/core/buildAndValidateConfig.js +0 -113
- package/libEs5/core/componentCreators.js +0 -34
- package/libEs5/core/config/createConfig.js +0 -21
- package/libEs5/core/config/createCoreConfigs.js +0 -32
- package/libEs5/core/consent/createConsent.js +0 -59
- package/libEs5/core/consent/createConsentStateMachine.js +0 -109
- package/libEs5/core/createComponentRegistry.js +0 -84
- package/libEs5/core/createCookieTransfer.js +0 -81
- package/libEs5/core/createEvent.js +0 -171
- package/libEs5/core/createEventManager.js +0 -142
- package/libEs5/core/createInstanceFunction.js +0 -28
- package/libEs5/core/createLifecycle.js +0 -75
- package/libEs5/core/createLogController.js +0 -71
- package/libEs5/core/createLogger.js +0 -104
- package/libEs5/core/edgeNetwork/handleRequestFailure.js +0 -28
- package/libEs5/core/edgeNetwork/injectApplyResponse.js +0 -67
- package/libEs5/core/edgeNetwork/injectExtractEdgeInfo.js +0 -43
- package/libEs5/core/edgeNetwork/injectGetLocationHint.js +0 -36
- package/libEs5/core/edgeNetwork/injectProcessWarningsAndErrors.js +0 -43
- package/libEs5/core/edgeNetwork/injectSendEdgeNetworkRequest.js +0 -100
- package/libEs5/core/edgeNetwork/mergeLifecycleResponses.js +0 -29
- package/libEs5/core/index.js +0 -240
- package/libEs5/core/initializeComponents.js +0 -42
- package/libEs5/core/injectCreateResponse.js +0 -78
- package/libEs5/core/injectExecuteCommand.js +0 -105
- package/libEs5/core/injectHandleError.js +0 -37
- package/libEs5/core/injectShouldTransferCookie.js +0 -29
- package/libEs5/core/network/getRequestRetryDelay.js +0 -74
- package/libEs5/core/network/injectSendNetworkRequest.js +0 -100
- package/libEs5/core/network/isRequestRetryable.js +0 -28
- package/libEs5/core/network/requestMethods/injectSendBeaconRequest.js +0 -40
- package/libEs5/core/network/requestMethods/injectSendFetchRequest.js +0 -45
- package/libEs5/core/network/requestMethods/injectSendXhrRequest.js +0 -51
- package/libEs5/core/validateCommandOptions.js +0 -35
- package/libEs5/index.js +0 -60
- package/libEs5/utils/areThirdPartyCookiesSupportedByDefault.js +0 -25
- package/libEs5/utils/assign.js +0 -17
- package/libEs5/utils/assignConcatArrayValues.js +0 -49
- package/libEs5/utils/assignIf.js +0 -22
- package/libEs5/utils/clone.js +0 -23
- package/libEs5/utils/cookieJar.js +0 -22
- package/libEs5/utils/crc32.js +0 -37
- package/libEs5/utils/createCallbackAggregator.js +0 -39
- package/libEs5/utils/createLoggingCookieJar.js +0 -31
- package/libEs5/utils/createMerger.js +0 -34
- package/libEs5/utils/createSubscription.js +0 -91
- package/libEs5/utils/createTaskQueue.js +0 -51
- package/libEs5/utils/debounce.js +0 -30
- package/libEs5/utils/deduplicateArray.js +0 -32
- package/libEs5/utils/deepAssign.js +0 -49
- package/libEs5/utils/defer.js +0 -27
- package/libEs5/utils/dom/appendNode.js +0 -18
- package/libEs5/utils/dom/awaitSelector.js +0 -111
- package/libEs5/utils/dom/createNode.js +0 -48
- package/libEs5/utils/dom/index.js +0 -58
- package/libEs5/utils/dom/isShadowSelector.js +0 -19
- package/libEs5/utils/dom/matchesSelector.js +0 -29
- package/libEs5/utils/dom/querySelectorAll.js +0 -33
- package/libEs5/utils/dom/removeNode.js +0 -22
- package/libEs5/utils/dom/selectNodes.js +0 -31
- package/libEs5/utils/dom/selectNodesWithShadow.js +0 -67
- package/libEs5/utils/endsWith.js +0 -24
- package/libEs5/utils/filterObject.js +0 -53
- package/libEs5/utils/find.js +0 -31
- package/libEs5/utils/fireImage.js +0 -39
- package/libEs5/utils/flatMap.js +0 -18
- package/libEs5/utils/flattenArray.js +0 -37
- package/libEs5/utils/flattenObject.js +0 -43
- package/libEs5/utils/getApexDomain.js +0 -46
- package/libEs5/utils/getBrowser.js +0 -34
- package/libEs5/utils/getLastArrayItems.js +0 -24
- package/libEs5/utils/getNamespacedCookieName.js +0 -20
- package/libEs5/utils/groupBy.js +0 -32
- package/libEs5/utils/includes.js +0 -24
- package/libEs5/utils/index.js +0 -408
- package/libEs5/utils/injectDoesIdentityCookieExist.js +0 -28
- package/libEs5/utils/injectFireReferrerHideableImage.js +0 -76
- package/libEs5/utils/injectStorage.js +0 -75
- package/libEs5/utils/intersection.js +0 -27
- package/libEs5/utils/isBlankString.js +0 -24
- package/libEs5/utils/isBoolean.js +0 -23
- package/libEs5/utils/isEmptyObject.js +0 -24
- package/libEs5/utils/isFunction.js +0 -23
- package/libEs5/utils/isInteger.js +0 -25
- package/libEs5/utils/isNamespacedCookieName.js +0 -27
- package/libEs5/utils/isNil.js +0 -23
- package/libEs5/utils/isNonEmptyArray.js +0 -23
- package/libEs5/utils/isNonEmptyString.js +0 -24
- package/libEs5/utils/isNumber.js +0 -24
- package/libEs5/utils/isObject.js +0 -24
- package/libEs5/utils/isString.js +0 -23
- package/libEs5/utils/isUnique.js +0 -31
- package/libEs5/utils/isValidRegExp.js +0 -27
- package/libEs5/utils/memoize.js +0 -37
- package/libEs5/utils/noop.js +0 -19
- package/libEs5/utils/padStart.js +0 -28
- package/libEs5/utils/parseUrl.js +0 -70
- package/libEs5/utils/prepareConfigOverridesForEdge.js +0 -53
- package/libEs5/utils/querystring.js +0 -17
- package/libEs5/utils/request/createAddIdentity.js +0 -23
- package/libEs5/utils/request/createDataCollectionRequest.js +0 -69
- package/libEs5/utils/request/createDataCollectionRequestPayload.js +0 -36
- package/libEs5/utils/request/createGetAssuranceValidationTokenParams.js +0 -45
- package/libEs5/utils/request/createHasIdentity.js +0 -20
- package/libEs5/utils/request/createRequest.js +0 -63
- package/libEs5/utils/request/createRequestParams.js +0 -45
- package/libEs5/utils/request/createRequestPayload.js +0 -37
- package/libEs5/utils/request/index.js +0 -58
- package/libEs5/utils/sanitizeOrgIdForCookieName.js +0 -18
- package/libEs5/utils/stackError.js +0 -35
- package/libEs5/utils/startsWith.js +0 -24
- package/libEs5/utils/stringToBoolean.js +0 -19
- package/libEs5/utils/toArray.js +0 -24
- package/libEs5/utils/toError.js +0 -24
- package/libEs5/utils/toISOStringLocal.js +0 -40
- package/libEs5/utils/toInteger.js +0 -32
- package/libEs5/utils/updateErrorMessage.js +0 -25
- package/libEs5/utils/uuid.js +0 -17
- package/libEs5/utils/validateConfigOverride.js +0 -17
- package/libEs5/utils/validateIdentityMap.js +0 -26
- package/libEs5/utils/validation/booleanValidator.js +0 -21
- package/libEs5/utils/validation/callbackValidator.js +0 -21
- package/libEs5/utils/validation/createAnyOfValidator.js +0 -33
- package/libEs5/utils/validation/createArrayOfValidator.js +0 -35
- package/libEs5/utils/validation/createDefaultValidator.js +0 -23
- package/libEs5/utils/validation/createDeprecatedValidator.js +0 -45
- package/libEs5/utils/validation/createLiteralValidator.js +0 -22
- package/libEs5/utils/validation/createMapOfValuesValidator.js +0 -41
- package/libEs5/utils/validation/createMaximumValidator.js +0 -22
- package/libEs5/utils/validation/createMinimumValidator.js +0 -22
- package/libEs5/utils/validation/createNoUnknownFieldsValidator.js +0 -30
- package/libEs5/utils/validation/createNonEmptyValidator.js +0 -28
- package/libEs5/utils/validation/createObjectOfValidator.js +0 -49
- package/libEs5/utils/validation/createUniqueItemsValidator.js +0 -22
- package/libEs5/utils/validation/createUniqueValidator.js +0 -24
- package/libEs5/utils/validation/domainValidator.js +0 -22
- package/libEs5/utils/validation/index.js +0 -247
- package/libEs5/utils/validation/integerValidator.js +0 -21
- package/libEs5/utils/validation/matchesRegexpValidator.js +0 -22
- package/libEs5/utils/validation/numberValidator.js +0 -21
- package/libEs5/utils/validation/regexpValidator.js +0 -21
- package/libEs5/utils/validation/requiredValidator.js +0 -21
- package/libEs5/utils/validation/stringValidator.js +0 -21
- package/libEs5/utils/validation/utils.js +0 -141
- package/libEs5/utils/values.js +0 -26
- package/libEs6/baseCode/index.js +0 -61
- package/libEs6/components/ActivityCollector/attachClickActivityCollector.js +0 -52
- package/libEs6/components/ActivityCollector/configValidators.js +0 -19
- package/libEs6/components/ActivityCollector/createGetLinkDetails.js +0 -70
- package/libEs6/components/ActivityCollector/createLinkClick.js +0 -37
- package/libEs6/components/ActivityCollector/getLinkName.js +0 -136
- package/libEs6/components/ActivityCollector/getLinkRegion.js +0 -58
- package/libEs6/components/ActivityCollector/index.js +0 -81
- package/libEs6/components/ActivityCollector/utils.js +0 -104
- package/libEs6/components/Audiences/index.js +0 -47
- package/libEs6/components/Audiences/injectProcessDestinations.js +0 -60
- package/libEs6/components/Audiences/injectProcessResponse.js +0 -38
- package/libEs6/components/Context/createComponent.js +0 -34
- package/libEs6/components/Context/implementationDetails.js +0 -24
- package/libEs6/components/Context/index.js +0 -52
- package/libEs6/components/Context/injectDevice.js +0 -70
- package/libEs6/components/Context/injectEnvironment.js +0 -42
- package/libEs6/components/Context/injectHighEntropyUserAgentHints.js +0 -45
- package/libEs6/components/Context/injectPlaceContext.js +0 -29
- package/libEs6/components/Context/injectTimestamp.js +0 -21
- package/libEs6/components/Context/injectWeb.js +0 -28
- package/libEs6/components/DataCollector/index.js +0 -106
- package/libEs6/components/DataCollector/validateApplyResponse.js +0 -33
- package/libEs6/components/DataCollector/validateUserEventOptions.js +0 -49
- package/libEs6/components/DecisioningEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js +0 -30
- package/libEs6/components/DecisioningEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js +0 -24
- package/libEs6/components/DecisioningEngine/constants.js +0 -25
- package/libEs6/components/DecisioningEngine/createApplyResponse.js +0 -31
- package/libEs6/components/DecisioningEngine/createConsequenceAdapter.js +0 -29
- package/libEs6/components/DecisioningEngine/createContextProvider.js +0 -95
- package/libEs6/components/DecisioningEngine/createDecisionHistory.js +0 -25
- package/libEs6/components/DecisioningEngine/createDecisionProvider.js +0 -41
- package/libEs6/components/DecisioningEngine/createEvaluableRulesetPayload.js +0 -79
- package/libEs6/components/DecisioningEngine/createEvaluateRulesetsCommand.js +0 -45
- package/libEs6/components/DecisioningEngine/createEventRegistry.js +0 -120
- package/libEs6/components/DecisioningEngine/createOnResponseHandler.js +0 -45
- package/libEs6/components/DecisioningEngine/createSubscribeRulesetItems.js +0 -79
- package/libEs6/components/DecisioningEngine/index.js +0 -124
- package/libEs6/components/DecisioningEngine/utils.js +0 -83
- package/libEs6/components/EventMerge/createComponent.js +0 -23
- package/libEs6/components/EventMerge/createEventMergeId.js +0 -18
- package/libEs6/components/EventMerge/index.js +0 -21
- package/libEs6/components/Identity/addEcidQueryToPayload.js +0 -20
- package/libEs6/components/Identity/addEcidToPayload.js +0 -18
- package/libEs6/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js +0 -23
- package/libEs6/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js +0 -31
- package/libEs6/components/Identity/configValidators.js +0 -18
- package/libEs6/components/Identity/constants/authState.js +0 -15
- package/libEs6/components/Identity/constants/defaultIdSyncTtlMinutes.js +0 -13
- package/libEs6/components/Identity/createComponent.js +0 -97
- package/libEs6/components/Identity/createLegacyIdentity.js +0 -69
- package/libEs6/components/Identity/getEcidFromResponse.js +0 -19
- package/libEs6/components/Identity/getIdentity/createGetIdentity.js +0 -34
- package/libEs6/components/Identity/getIdentity/createIdentityRequest.js +0 -28
- package/libEs6/components/Identity/getIdentity/createIdentityRequestPayload.js +0 -27
- package/libEs6/components/Identity/getIdentity/getIdentityOptionsValidator.js +0 -25
- package/libEs6/components/Identity/index.js +0 -124
- package/libEs6/components/Identity/injectAddLegacyEcidToPayload.js +0 -30
- package/libEs6/components/Identity/injectAddQueryStringIdentityToPayload.js +0 -55
- package/libEs6/components/Identity/injectAwaitIdentityCookie.js +0 -56
- package/libEs6/components/Identity/injectEnsureSingleIdentity.js +0 -97
- package/libEs6/components/Identity/injectHandleResponseForIdSyncs.js +0 -19
- package/libEs6/components/Identity/injectProcessIdSyncs.js +0 -34
- package/libEs6/components/Identity/injectSetDomainForInitialIdentityPayload.js +0 -32
- package/libEs6/components/Identity/visitorService/awaitVisitorOptIn.js +0 -33
- package/libEs6/components/Identity/visitorService/getVisitor.js +0 -17
- package/libEs6/components/Identity/visitorService/injectGetEcidFromVisitor.js +0 -48
- package/libEs6/components/LegacyMediaAnalytics/createMediaAnalyticsTracker.js +0 -276
- package/libEs6/components/LegacyMediaAnalytics/createMediaHelper.js +0 -186
- package/libEs6/components/LegacyMediaAnalytics/index.js +0 -45
- package/libEs6/components/LegacyMediaAnalytics/media/constants.js +0 -140
- package/libEs6/components/LegacyMediaAnalytics/media/mediaKeysToXdmConverter.js +0 -46
- package/libEs6/components/LibraryInfo/index.js +0 -57
- package/libEs6/components/MachineLearning/index.js +0 -23
- package/libEs6/components/MachineLearning/processResponse.js +0 -18
- package/libEs6/components/MediaCollection/constants/eventTypes.js +0 -21
- package/libEs6/components/MediaCollection/createHeartbeatEngine.js +0 -64
- package/libEs6/components/MediaCollection/createMediaEventManager.js +0 -115
- package/libEs6/components/MediaCollection/createMediaRequest.js +0 -28
- package/libEs6/components/MediaCollection/createMediaSessionCacheManager.js +0 -63
- package/libEs6/components/MediaCollection/createUpdateMediaSessionState.js +0 -30
- package/libEs6/components/MediaCollection/index.js +0 -164
- package/libEs6/components/MediaCollection/validateMediaEventOptions.js +0 -32
- package/libEs6/components/MediaCollection/validateMediaSessionOptions.js +0 -34
- package/libEs6/components/Personalization/constants/loggerMessage.js +0 -13
- package/libEs6/components/Personalization/constants/scopeType.js +0 -15
- package/libEs6/components/Personalization/constants/surface.js +0 -16
- package/libEs6/components/Personalization/createActionsProvider.js +0 -70
- package/libEs6/components/Personalization/createApplyPropositions.js +0 -103
- package/libEs6/components/Personalization/createClickStorage.js +0 -58
- package/libEs6/components/Personalization/createCollect.js +0 -48
- package/libEs6/components/Personalization/createComponent.js +0 -129
- package/libEs6/components/Personalization/createFetchDataHandler.js +0 -74
- package/libEs6/components/Personalization/createGetPageLocation.js +0 -17
- package/libEs6/components/Personalization/createNotificationHandler.js +0 -29
- package/libEs6/components/Personalization/createOnClickHandler.js +0 -52
- package/libEs6/components/Personalization/createOnDecisionHandler.js +0 -42
- package/libEs6/components/Personalization/createPersonalizationDetails.js +0 -94
- package/libEs6/components/Personalization/createPreprocessors.js +0 -19
- package/libEs6/components/Personalization/createSetTargetMigration.js +0 -27
- package/libEs6/components/Personalization/createViewCacheManager.js +0 -81
- package/libEs6/components/Personalization/createViewChangeHandler.js +0 -47
- package/libEs6/components/Personalization/dom-actions/action.js +0 -49
- package/libEs6/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +0 -36
- package/libEs6/components/Personalization/dom-actions/appendHtml.js +0 -30
- package/libEs6/components/Personalization/dom-actions/clicks/collectClicks.js +0 -91
- package/libEs6/components/Personalization/dom-actions/createPreprocess.js +0 -18
- package/libEs6/components/Personalization/dom-actions/createRedirect.js +0 -22
- package/libEs6/components/Personalization/dom-actions/dom/createFragment.js +0 -19
- package/libEs6/components/Personalization/dom-actions/dom/getAttribute.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/getChildNodes.js +0 -22
- package/libEs6/components/Personalization/dom-actions/dom/getChildren.js +0 -22
- package/libEs6/components/Personalization/dom-actions/dom/getElementById.js +0 -21
- package/libEs6/components/Personalization/dom-actions/dom/getFirstChild.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/getNextSibling.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/getNonce.js +0 -33
- package/libEs6/components/Personalization/dom-actions/dom/getParent.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/helperForEq.js +0 -19
- package/libEs6/components/Personalization/dom-actions/dom/index.js +0 -26
- package/libEs6/components/Personalization/dom-actions/dom/insertAfter.js +0 -23
- package/libEs6/components/Personalization/dom-actions/dom/insertBefore.js +0 -22
- package/libEs6/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +0 -35
- package/libEs6/components/Personalization/dom-actions/dom/removeAttribute.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/selectNodesWithEq.js +0 -102
- package/libEs6/components/Personalization/dom-actions/dom/setAttribute.js +0 -15
- package/libEs6/components/Personalization/dom-actions/dom/setStyle.js +0 -21
- package/libEs6/components/Personalization/dom-actions/images.js +0 -31
- package/libEs6/components/Personalization/dom-actions/index.js +0 -13
- package/libEs6/components/Personalization/dom-actions/initDomActionsModules.js +0 -33
- package/libEs6/components/Personalization/dom-actions/insertHtmlAfter.js +0 -29
- package/libEs6/components/Personalization/dom-actions/insertHtmlBefore.js +0 -29
- package/libEs6/components/Personalization/dom-actions/prependHtml.js +0 -45
- package/libEs6/components/Personalization/dom-actions/rearrangeChildren.js +0 -31
- package/libEs6/components/Personalization/dom-actions/remapCustomCodeOffers.js +0 -34
- package/libEs6/components/Personalization/dom-actions/remapHeadOffers.js +0 -51
- package/libEs6/components/Personalization/dom-actions/replaceHtml.js +0 -18
- package/libEs6/components/Personalization/dom-actions/scripts.js +0 -85
- package/libEs6/components/Personalization/dom-actions/setAttributes.js +0 -18
- package/libEs6/components/Personalization/dom-actions/setHtml.js +0 -24
- package/libEs6/components/Personalization/dom-actions/setStyles.js +0 -22
- package/libEs6/components/Personalization/dom-actions/setText.js +0 -15
- package/libEs6/components/Personalization/dom-actions/swapImage.js +0 -29
- package/libEs6/components/Personalization/event.js +0 -45
- package/libEs6/components/Personalization/flicker/index.js +0 -82
- package/libEs6/components/Personalization/handlers/createProcessDomAction.js +0 -61
- package/libEs6/components/Personalization/handlers/createProcessHtmlContent.js +0 -40
- package/libEs6/components/Personalization/handlers/createProcessInAppMessage.js +0 -77
- package/libEs6/components/Personalization/handlers/createProcessPropositions.js +0 -175
- package/libEs6/components/Personalization/handlers/createProcessRedirect.js +0 -42
- package/libEs6/components/Personalization/handlers/injectCreateProposition.js +0 -110
- package/libEs6/components/Personalization/handlers/processDefaultContent.js +0 -17
- package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +0 -291
- package/libEs6/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +0 -17
- package/libEs6/components/Personalization/in-app-message-actions/utils.js +0 -49
- package/libEs6/components/Personalization/index.js +0 -159
- package/libEs6/components/Personalization/utils/addRenderAttemptedToDecisions.js +0 -21
- package/libEs6/components/Personalization/utils/createAsyncArray.js +0 -35
- package/libEs6/components/Personalization/utils/isAuthoringModeEnabled.js +0 -15
- package/libEs6/components/Personalization/utils/surfaceUtils.js +0 -74
- package/libEs6/components/Personalization/validateApplyPropositionsOptions.js +0 -31
- package/libEs6/components/Privacy/computeConsentHash.js +0 -30
- package/libEs6/components/Privacy/createComponent.js +0 -85
- package/libEs6/components/Privacy/createConsentHashStore.js +0 -57
- package/libEs6/components/Privacy/createConsentRequest.js +0 -28
- package/libEs6/components/Privacy/createConsentRequestPayload.js +0 -31
- package/libEs6/components/Privacy/createStoredConsent.js +0 -30
- package/libEs6/components/Privacy/index.js +0 -63
- package/libEs6/components/Privacy/injectSendSetConsentRequest.js +0 -45
- package/libEs6/components/Privacy/parseConsentCookie.js +0 -26
- package/libEs6/components/Privacy/validateSetConsentOptions.js +0 -18
- package/libEs6/constants/apiVersion.js +0 -12
- package/libEs6/constants/browser.js +0 -19
- package/libEs6/constants/consentPurpose.js +0 -13
- package/libEs6/constants/consentStatus.js +0 -15
- package/libEs6/constants/contentType.js +0 -13
- package/libEs6/constants/cookieNameKey.js +0 -15
- package/libEs6/constants/cookieNamePrefix.js +0 -14
- package/libEs6/constants/coreCommands.js +0 -14
- package/libEs6/constants/debugQueryParam.js +0 -13
- package/libEs6/constants/decisionProvider.js +0 -12
- package/libEs6/constants/domain.js +0 -14
- package/libEs6/constants/ecidNamespace.js +0 -13
- package/libEs6/constants/edgeBasePath.js +0 -12
- package/libEs6/constants/elementAttribute.js +0 -13
- package/libEs6/constants/eventType.js +0 -17
- package/libEs6/constants/handle.js +0 -12
- package/libEs6/constants/highEntropyUserAgentClientHints.js +0 -13
- package/libEs6/constants/httpHeaderNames.js +0 -14
- package/libEs6/constants/httpStatusCode.js +0 -17
- package/libEs6/constants/identityMapAuthenticatedState.js +0 -14
- package/libEs6/constants/legacyCookies.js +0 -15
- package/libEs6/constants/libraryName.js +0 -13
- package/libEs6/constants/libraryVersion.js +0 -16
- package/libEs6/constants/namespace.js +0 -13
- package/libEs6/constants/pageWideScope.js +0 -13
- package/libEs6/constants/propositionEventType.js +0 -33
- package/libEs6/constants/queryStringIdentityParam.js +0 -13
- package/libEs6/constants/schema.js +0 -22
- package/libEs6/constants/shadowSeparator.js +0 -13
- package/libEs6/constants/tagName.js +0 -19
- package/libEs6/core/buildAndValidateConfig.js +0 -94
- package/libEs6/core/componentCreators.js +0 -31
- package/libEs6/core/config/createConfig.js +0 -17
- package/libEs6/core/config/createCoreConfigs.js +0 -27
- package/libEs6/core/consent/createConsent.js +0 -57
- package/libEs6/core/consent/createConsentStateMachine.js +0 -91
- package/libEs6/core/createComponentRegistry.js +0 -80
- package/libEs6/core/createCookieTransfer.js +0 -78
- package/libEs6/core/createEvent.js +0 -161
- package/libEs6/core/createEventManager.js +0 -135
- package/libEs6/core/createInstanceFunction.js +0 -25
- package/libEs6/core/createLifecycle.js +0 -65
- package/libEs6/core/createLogController.js +0 -68
- package/libEs6/core/createLogger.js +0 -99
- package/libEs6/core/edgeNetwork/handleRequestFailure.js +0 -24
- package/libEs6/core/edgeNetwork/injectApplyResponse.js +0 -58
- package/libEs6/core/edgeNetwork/injectExtractEdgeInfo.js +0 -39
- package/libEs6/core/edgeNetwork/injectGetLocationHint.js +0 -32
- package/libEs6/core/edgeNetwork/injectProcessWarningsAndErrors.js +0 -42
- package/libEs6/core/edgeNetwork/injectSendEdgeNetworkRequest.js +0 -100
- package/libEs6/core/edgeNetwork/mergeLifecycleResponses.js +0 -21
- package/libEs6/core/index.js +0 -236
- package/libEs6/core/initializeComponents.js +0 -40
- package/libEs6/core/injectCreateResponse.js +0 -70
- package/libEs6/core/injectExecuteCommand.js +0 -100
- package/libEs6/core/injectHandleError.js +0 -33
- package/libEs6/core/injectShouldTransferCookie.js +0 -25
- package/libEs6/core/network/getRequestRetryDelay.js +0 -72
- package/libEs6/core/network/injectSendNetworkRequest.js +0 -96
- package/libEs6/core/network/isRequestRetryable.js +0 -25
- package/libEs6/core/network/requestMethods/injectSendBeaconRequest.js +0 -38
- package/libEs6/core/network/requestMethods/injectSendFetchRequest.js +0 -41
- package/libEs6/core/network/requestMethods/injectSendXhrRequest.js +0 -49
- package/libEs6/core/validateCommandOptions.js +0 -33
- package/libEs6/index.js +0 -55
- package/libEs6/utils/areThirdPartyCookiesSupportedByDefault.js +0 -20
- package/libEs6/utils/assign.js +0 -14
- package/libEs6/utils/assignConcatArrayValues.js +0 -36
- package/libEs6/utils/assignIf.js +0 -19
- package/libEs6/utils/clone.js +0 -18
- package/libEs6/utils/cookieJar.js +0 -19
- package/libEs6/utils/crc32.js +0 -33
- package/libEs6/utils/createCallbackAggregator.js +0 -31
- package/libEs6/utils/createLoggingCookieJar.js +0 -28
- package/libEs6/utils/createMerger.js +0 -30
- package/libEs6/utils/createSubscription.js +0 -70
- package/libEs6/utils/createTaskQueue.js +0 -48
- package/libEs6/utils/debounce.js +0 -22
- package/libEs6/utils/deduplicateArray.js +0 -23
- package/libEs6/utils/deepAssign.js +0 -40
- package/libEs6/utils/defer.js +0 -24
- package/libEs6/utils/dom/appendNode.js +0 -15
- package/libEs6/utils/dom/awaitSelector.js +0 -98
- package/libEs6/utils/dom/createNode.js +0 -38
- package/libEs6/utils/dom/index.js +0 -20
- package/libEs6/utils/dom/isShadowSelector.js +0 -14
- package/libEs6/utils/dom/matchesSelector.js +0 -26
- package/libEs6/utils/dom/querySelectorAll.js +0 -29
- package/libEs6/utils/dom/removeNode.js +0 -19
- package/libEs6/utils/dom/selectNodes.js +0 -28
- package/libEs6/utils/dom/selectNodesWithShadow.js +0 -63
- package/libEs6/utils/endsWith.js +0 -19
- package/libEs6/utils/filterObject.js +0 -55
- package/libEs6/utils/find.js +0 -28
- package/libEs6/utils/fireImage.js +0 -37
- package/libEs6/utils/flatMap.js +0 -14
- package/libEs6/utils/flattenArray.js +0 -26
- package/libEs6/utils/flattenObject.js +0 -28
- package/libEs6/utils/getApexDomain.js +0 -42
- package/libEs6/utils/getBrowser.js +0 -65
- package/libEs6/utils/getLastArrayItems.js +0 -19
- package/libEs6/utils/getNamespacedCookieName.js +0 -15
- package/libEs6/utils/groupBy.js +0 -29
- package/libEs6/utils/includes.js +0 -21
- package/libEs6/utils/index.js +0 -71
- package/libEs6/utils/injectDoesIdentityCookieExist.js +0 -24
- package/libEs6/utils/injectFireReferrerHideableImage.js +0 -65
- package/libEs6/utils/injectStorage.js +0 -69
- package/libEs6/utils/intersection.js +0 -21
- package/libEs6/utils/isBlankString.js +0 -20
- package/libEs6/utils/isBoolean.js +0 -18
- package/libEs6/utils/isEmptyObject.js +0 -20
- package/libEs6/utils/isFunction.js +0 -18
- package/libEs6/utils/isInteger.js +0 -23
- package/libEs6/utils/isNamespacedCookieName.js +0 -23
- package/libEs6/utils/isNil.js +0 -18
- package/libEs6/utils/isNonEmptyArray.js +0 -18
- package/libEs6/utils/isNonEmptyString.js +0 -20
- package/libEs6/utils/isNumber.js +0 -19
- package/libEs6/utils/isObject.js +0 -20
- package/libEs6/utils/isString.js +0 -18
- package/libEs6/utils/isUnique.js +0 -27
- package/libEs6/utils/isValidRegExp.js +0 -24
- package/libEs6/utils/memoize.js +0 -34
- package/libEs6/utils/noop.js +0 -16
- package/libEs6/utils/padStart.js +0 -25
- package/libEs6/utils/parseUrl.js +0 -62
- package/libEs6/utils/prepareConfigOverridesForEdge.js +0 -50
- package/libEs6/utils/querystring.js +0 -14
- package/libEs6/utils/request/createAddIdentity.js +0 -19
- package/libEs6/utils/request/createDataCollectionRequest.js +0 -69
- package/libEs6/utils/request/createDataCollectionRequestPayload.js +0 -30
- package/libEs6/utils/request/createGetAssuranceValidationTokenParams.js +0 -42
- package/libEs6/utils/request/createHasIdentity.js +0 -15
- package/libEs6/utils/request/createRequest.js +0 -63
- package/libEs6/utils/request/createRequestParams.js +0 -40
- package/libEs6/utils/request/createRequestPayload.js +0 -35
- package/libEs6/utils/request/index.js +0 -20
- package/libEs6/utils/sanitizeOrgIdForCookieName.js +0 -13
- package/libEs6/utils/stackError.js +0 -34
- package/libEs6/utils/startsWith.js +0 -19
- package/libEs6/utils/stringToBoolean.js +0 -15
- package/libEs6/utils/toArray.js +0 -21
- package/libEs6/utils/toError.js +0 -21
- package/libEs6/utils/toISOStringLocal.js +0 -37
- package/libEs6/utils/toInteger.js +0 -30
- package/libEs6/utils/updateErrorMessage.js +0 -23
- package/libEs6/utils/uuid.js +0 -14
- package/libEs6/utils/validateConfigOverride.js +0 -14
- package/libEs6/utils/validateIdentityMap.js +0 -23
- package/libEs6/utils/validation/booleanValidator.js +0 -18
- package/libEs6/utils/validation/callbackValidator.js +0 -17
- package/libEs6/utils/validation/createAnyOfValidator.js +0 -26
- package/libEs6/utils/validation/createArrayOfValidator.js +0 -28
- package/libEs6/utils/validation/createDefaultValidator.js +0 -18
- package/libEs6/utils/validation/createDeprecatedValidator.js +0 -37
- package/libEs6/utils/validation/createLiteralValidator.js +0 -16
- package/libEs6/utils/validation/createMapOfValuesValidator.js +0 -35
- package/libEs6/utils/validation/createMaximumValidator.js +0 -16
- package/libEs6/utils/validation/createMinimumValidator.js +0 -16
- package/libEs6/utils/validation/createNoUnknownFieldsValidator.js +0 -25
- package/libEs6/utils/validation/createNonEmptyValidator.js +0 -23
- package/libEs6/utils/validation/createObjectOfValidator.js +0 -43
- package/libEs6/utils/validation/createUniqueItemsValidator.js +0 -18
- package/libEs6/utils/validation/createUniqueValidator.js +0 -21
- package/libEs6/utils/validation/domainValidator.js +0 -17
- package/libEs6/utils/validation/index.js +0 -232
- package/libEs6/utils/validation/integerValidator.js +0 -18
- package/libEs6/utils/validation/matchesRegexpValidator.js +0 -17
- package/libEs6/utils/validation/numberValidator.js +0 -18
- package/libEs6/utils/validation/regexpValidator.js +0 -18
- package/libEs6/utils/validation/requiredValidator.js +0 -18
- package/libEs6/utils/validation/stringValidator.js +0 -17
- package/libEs6/utils/validation/utils.js +0 -127
- package/libEs6/utils/values.js +0 -21
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _validation = require("../../utils/validation");
|
|
5
|
-
var _createComponent = require("./createComponent");
|
|
6
|
-
var _domActions = require("./dom-actions");
|
|
7
|
-
var _createCollect = require("./createCollect");
|
|
8
|
-
var _flicker = require("./flicker");
|
|
9
|
-
var _createFetchDataHandler = require("./createFetchDataHandler");
|
|
10
|
-
var _collectClicks = require("./dom-actions/clicks/collectClicks");
|
|
11
|
-
var _isAuthoringModeEnabled = require("./utils/isAuthoringModeEnabled");
|
|
12
|
-
var _event = require("./event");
|
|
13
|
-
var _createOnClickHandler = require("./createOnClickHandler");
|
|
14
|
-
var _createViewCacheManager = require("./createViewCacheManager");
|
|
15
|
-
var _createViewChangeHandler = require("./createViewChangeHandler");
|
|
16
|
-
var _createClickStorage2 = require("./createClickStorage");
|
|
17
|
-
var _createApplyPropositions = require("./createApplyPropositions");
|
|
18
|
-
var _createGetPageLocation = require("./createGetPageLocation");
|
|
19
|
-
var _createSetTargetMigration = require("./createSetTargetMigration");
|
|
20
|
-
var _remapCustomCodeOffers = require("./dom-actions/remapCustomCodeOffers");
|
|
21
|
-
var _remapHeadOffers = require("./dom-actions/remapHeadOffers");
|
|
22
|
-
var _createPreprocess = require("./dom-actions/createPreprocess");
|
|
23
|
-
var _injectCreateProposition = require("./handlers/injectCreateProposition");
|
|
24
|
-
var _createAsyncArray = require("./utils/createAsyncArray");
|
|
25
|
-
var schema = require("../../constants/schema");
|
|
26
|
-
var _processDefaultContent = require("./handlers/processDefaultContent");
|
|
27
|
-
var _surfaceUtils = require("./utils/surfaceUtils");
|
|
28
|
-
var _createProcessDomAction = require("./handlers/createProcessDomAction");
|
|
29
|
-
var _createProcessHtmlContent = require("./handlers/createProcessHtmlContent");
|
|
30
|
-
var _createProcessRedirect = require("./handlers/createProcessRedirect");
|
|
31
|
-
var _createProcessPropositions = require("./handlers/createProcessPropositions");
|
|
32
|
-
var _createOnDecisionHandler = require("./createOnDecisionHandler");
|
|
33
|
-
var _createProcessInAppMessage = require("./handlers/createProcessInAppMessage");
|
|
34
|
-
var _initInAppMessageActionsModules = require("./in-app-message-actions/initInAppMessageActionsModules");
|
|
35
|
-
var _createRedirect = require("./dom-actions/createRedirect");
|
|
36
|
-
var _createNotificationHandler = require("./createNotificationHandler");
|
|
37
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /*
|
|
38
|
-
Copyright 2019 Adobe. All rights reserved.
|
|
39
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
40
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
41
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
42
|
-
|
|
43
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
44
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
45
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
46
|
-
governing permissions and limitations under the License.
|
|
47
|
-
*/
|
|
48
|
-
var createPersonalization = function createPersonalization(_ref) {
|
|
49
|
-
var _schemaProcessors;
|
|
50
|
-
var config = _ref.config,
|
|
51
|
-
logger = _ref.logger,
|
|
52
|
-
eventManager = _ref.eventManager;
|
|
53
|
-
var targetMigrationEnabled = config.targetMigrationEnabled,
|
|
54
|
-
prehidingStyle = config.prehidingStyle;
|
|
55
|
-
var collect = (0, _createCollect.default)({
|
|
56
|
-
eventManager: eventManager,
|
|
57
|
-
mergeDecisionsMeta: _event.mergeDecisionsMeta
|
|
58
|
-
});
|
|
59
|
-
var _createClickStorage = (0, _createClickStorage2.default)(),
|
|
60
|
-
getClickMetasBySelector = _createClickStorage.getClickMetasBySelector,
|
|
61
|
-
getClickSelectors = _createClickStorage.getClickSelectors,
|
|
62
|
-
storeClickMetrics = _createClickStorage.storeClickMetrics;
|
|
63
|
-
var getPageLocation = (0, _createGetPageLocation.default)({
|
|
64
|
-
window: window
|
|
65
|
-
});
|
|
66
|
-
var domActionsModules = (0, _domActions.initDomActionsModules)();
|
|
67
|
-
var preprocess = (0, _createPreprocess.default)([_remapHeadOffers.default, _remapCustomCodeOffers.default]);
|
|
68
|
-
var createProposition = (0, _injectCreateProposition.default)({
|
|
69
|
-
preprocess: preprocess,
|
|
70
|
-
isPageWideSurface: _surfaceUtils.isPageWideSurface
|
|
71
|
-
});
|
|
72
|
-
var viewCache = (0, _createViewCacheManager.default)({
|
|
73
|
-
createProposition: createProposition
|
|
74
|
-
});
|
|
75
|
-
var executeRedirect = (0, _createRedirect.default)(window);
|
|
76
|
-
var schemaProcessors = (_schemaProcessors = {}, _defineProperty(_schemaProcessors, schema.DEFAULT_CONTENT_ITEM, _processDefaultContent.default), _defineProperty(_schemaProcessors, schema.DOM_ACTION, (0, _createProcessDomAction.default)({
|
|
77
|
-
modules: domActionsModules,
|
|
78
|
-
logger: logger,
|
|
79
|
-
storeClickMetrics: storeClickMetrics
|
|
80
|
-
})), _defineProperty(_schemaProcessors, schema.HTML_CONTENT_ITEM, (0, _createProcessHtmlContent.default)({
|
|
81
|
-
modules: domActionsModules,
|
|
82
|
-
logger: logger
|
|
83
|
-
})), _defineProperty(_schemaProcessors, schema.REDIRECT_ITEM, (0, _createProcessRedirect.default)({
|
|
84
|
-
logger: logger,
|
|
85
|
-
executeRedirect: executeRedirect,
|
|
86
|
-
collect: collect
|
|
87
|
-
})), _defineProperty(_schemaProcessors, schema.MESSAGE_IN_APP, (0, _createProcessInAppMessage.default)({
|
|
88
|
-
modules: (0, _initInAppMessageActionsModules.default)(collect),
|
|
89
|
-
logger: logger
|
|
90
|
-
})), _schemaProcessors);
|
|
91
|
-
var processPropositions = (0, _createProcessPropositions.default)({
|
|
92
|
-
schemaProcessors: schemaProcessors,
|
|
93
|
-
logger: logger
|
|
94
|
-
});
|
|
95
|
-
var renderedPropositions = (0, _createAsyncArray.default)();
|
|
96
|
-
var notificationHandler = (0, _createNotificationHandler.default)(collect, renderedPropositions);
|
|
97
|
-
var fetchDataHandler = (0, _createFetchDataHandler.default)({
|
|
98
|
-
prehidingStyle: prehidingStyle,
|
|
99
|
-
showContainers: _flicker.showContainers,
|
|
100
|
-
hideContainers: _flicker.hideContainers,
|
|
101
|
-
mergeQuery: _event.mergeQuery,
|
|
102
|
-
processPropositions: processPropositions,
|
|
103
|
-
createProposition: createProposition,
|
|
104
|
-
notificationHandler: notificationHandler
|
|
105
|
-
});
|
|
106
|
-
var onClickHandler = (0, _createOnClickHandler.default)({
|
|
107
|
-
mergeDecisionsMeta: _event.mergeDecisionsMeta,
|
|
108
|
-
collectClicks: _collectClicks.default,
|
|
109
|
-
getClickSelectors: getClickSelectors,
|
|
110
|
-
getClickMetasBySelector: getClickMetasBySelector
|
|
111
|
-
});
|
|
112
|
-
var viewChangeHandler = (0, _createViewChangeHandler.default)({
|
|
113
|
-
processPropositions: processPropositions,
|
|
114
|
-
viewCache: viewCache
|
|
115
|
-
});
|
|
116
|
-
var applyPropositions = (0, _createApplyPropositions.default)({
|
|
117
|
-
processPropositions: processPropositions,
|
|
118
|
-
createProposition: createProposition,
|
|
119
|
-
renderedPropositions: renderedPropositions,
|
|
120
|
-
viewCache: viewCache
|
|
121
|
-
});
|
|
122
|
-
var setTargetMigration = (0, _createSetTargetMigration.default)({
|
|
123
|
-
targetMigrationEnabled: targetMigrationEnabled
|
|
124
|
-
});
|
|
125
|
-
var onDecisionHandler = (0, _createOnDecisionHandler.default)({
|
|
126
|
-
processPropositions: processPropositions,
|
|
127
|
-
createProposition: createProposition,
|
|
128
|
-
notificationHandler: notificationHandler
|
|
129
|
-
});
|
|
130
|
-
return (0, _createComponent.default)({
|
|
131
|
-
getPageLocation: getPageLocation,
|
|
132
|
-
logger: logger,
|
|
133
|
-
fetchDataHandler: fetchDataHandler,
|
|
134
|
-
viewChangeHandler: viewChangeHandler,
|
|
135
|
-
onClickHandler: onClickHandler,
|
|
136
|
-
isAuthoringModeEnabled: _isAuthoringModeEnabled.default,
|
|
137
|
-
mergeQuery: _event.mergeQuery,
|
|
138
|
-
viewCache: viewCache,
|
|
139
|
-
showContainers: _flicker.showContainers,
|
|
140
|
-
applyPropositions: applyPropositions,
|
|
141
|
-
setTargetMigration: setTargetMigration,
|
|
142
|
-
mergeDecisionsMeta: _event.mergeDecisionsMeta,
|
|
143
|
-
renderedPropositions: renderedPropositions,
|
|
144
|
-
onDecisionHandler: onDecisionHandler
|
|
145
|
-
});
|
|
146
|
-
};
|
|
147
|
-
createPersonalization.namespace = "Personalization";
|
|
148
|
-
createPersonalization.configValidators = (0, _validation.objectOf)({
|
|
149
|
-
prehidingStyle: (0, _validation.string)().nonEmpty(),
|
|
150
|
-
targetMigrationEnabled: (0, _validation.boolean)().default(false)
|
|
151
|
-
});
|
|
152
|
-
var _default = createPersonalization;
|
|
153
|
-
exports.default = _default;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _utils = require("../../../utils");
|
|
5
|
-
/*
|
|
6
|
-
Copyright 2021 Adobe. All rights reserved.
|
|
7
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
|
|
11
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
var _default = function _default(_ref) {
|
|
17
|
-
var decisions = _ref.decisions,
|
|
18
|
-
renderAttempted = _ref.renderAttempted;
|
|
19
|
-
return decisions.map(function (decision) {
|
|
20
|
-
return (0, _utils.assign)({
|
|
21
|
-
renderAttempted: renderAttempted
|
|
22
|
-
}, decision);
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
exports.default = _default;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
/*
|
|
5
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
6
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
-
governing permissions and limitations under the License.
|
|
14
|
-
*/
|
|
15
|
-
var _default = function _default() {
|
|
16
|
-
var latest = Promise.resolve([]);
|
|
17
|
-
return {
|
|
18
|
-
concat: function concat(promise) {
|
|
19
|
-
latest = latest.then(function (existingPropositions) {
|
|
20
|
-
return promise.then(function (newPropositions) {
|
|
21
|
-
return existingPropositions.concat(newPropositions);
|
|
22
|
-
}).catch(function () {
|
|
23
|
-
return existingPropositions;
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
},
|
|
27
|
-
/**
|
|
28
|
-
* Clears the saved propositions, waiting until the next propositions are resolved and available.
|
|
29
|
-
*
|
|
30
|
-
* @returns {Promise<Array>} A promise that resolves to the latest propositions.
|
|
31
|
-
*/
|
|
32
|
-
clear: function clear() {
|
|
33
|
-
var oldLatest = latest;
|
|
34
|
-
latest = Promise.resolve([]);
|
|
35
|
-
return oldLatest;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
exports.default = _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
/*
|
|
5
|
-
Copyright 2019 Adobe. All rights reserved.
|
|
6
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
-
governing permissions and limitations under the License.
|
|
14
|
-
*/
|
|
15
|
-
var _default = function _default() {
|
|
16
|
-
var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
|
|
17
|
-
return doc.location.href.indexOf("adobe_authoring_enabled") !== -1;
|
|
18
|
-
};
|
|
19
|
-
exports.default = _default;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.normalizeSurfaces = exports.isPageWideSurface = exports.buildPageSurface = void 0;
|
|
4
|
-
var _surface = require("../constants/surface");
|
|
5
|
-
var _utils = require("../../../utils");
|
|
6
|
-
/*
|
|
7
|
-
Copyright 2022 Adobe. All rights reserved.
|
|
8
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
10
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
13
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
15
|
-
governing permissions and limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
var SURFACE_REGEX = /^(\w+):\/\/([^/#]+)(\/[^#]*)?(#.*)?$/;
|
|
19
|
-
var AUTHORITY_REGEX = /^(?:.*@)?(?:[a-z\d\u00a1-\uffff.-]+|\[[a-f\d:]+])(?::\d+)?$/;
|
|
20
|
-
var PATH_REGEX = /^\/(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})*$/;
|
|
21
|
-
var FRAGMENT_REGEX = /^#(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})+$/;
|
|
22
|
-
var normalizePath = function normalizePath() {
|
|
23
|
-
var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "/";
|
|
24
|
-
var end = path.length;
|
|
25
|
-
while (end > 0 && "/".indexOf(path.charAt(end - 1)) !== -1) {
|
|
26
|
-
end -= 1;
|
|
27
|
-
}
|
|
28
|
-
return path.substring(0, end) || "/";
|
|
29
|
-
};
|
|
30
|
-
var getSurfaceType = function getSurfaceType(surfaceTypeMatch) {
|
|
31
|
-
return (0, _utils.isNonEmptyString)(surfaceTypeMatch) ? surfaceTypeMatch.toLowerCase() : "";
|
|
32
|
-
};
|
|
33
|
-
var getAuthority = function getAuthority(authorityMatch) {
|
|
34
|
-
return (0, _utils.isNonEmptyString)(authorityMatch) ? authorityMatch.toLowerCase() : "";
|
|
35
|
-
};
|
|
36
|
-
var getPath = function getPath(pathMatch) {
|
|
37
|
-
return (0, _utils.isNonEmptyString)(pathMatch) ? normalizePath(pathMatch) : "/";
|
|
38
|
-
};
|
|
39
|
-
var parseSurface = function parseSurface(surfaceString) {
|
|
40
|
-
var matched = surfaceString.match(SURFACE_REGEX);
|
|
41
|
-
return matched ? {
|
|
42
|
-
surfaceType: getSurfaceType(matched[1]),
|
|
43
|
-
authority: getAuthority(matched[2]),
|
|
44
|
-
path: getPath(matched[3]),
|
|
45
|
-
fragment: matched[4]
|
|
46
|
-
} : null;
|
|
47
|
-
};
|
|
48
|
-
var stringifySurface = function stringifySurface(surface) {
|
|
49
|
-
return "" + surface.surfaceType + _surface.SURFACE_TYPE_DELIMITER + surface.authority + (surface.path || "") + (surface.fragment || "");
|
|
50
|
-
};
|
|
51
|
-
var buildPageSurface = function buildPageSurface(getPageLocation) {
|
|
52
|
-
var location = getPageLocation();
|
|
53
|
-
var host = location.host.toLowerCase();
|
|
54
|
-
var path = location.pathname;
|
|
55
|
-
return _surface.WEB + _surface.SURFACE_TYPE_DELIMITER + host + normalizePath(path);
|
|
56
|
-
};
|
|
57
|
-
exports.buildPageSurface = buildPageSurface;
|
|
58
|
-
var expandFragmentSurface = function expandFragmentSurface(surface, getPageLocation) {
|
|
59
|
-
return (0, _utils.startsWith)(surface, _surface.FRAGMENT_DELIMITER) ? buildPageSurface(getPageLocation) + surface : surface;
|
|
60
|
-
};
|
|
61
|
-
var validateSurface = function validateSurface(surface, getPageLocation, logger) {
|
|
62
|
-
var invalidateSurface = function invalidateSurface(validationError) {
|
|
63
|
-
logger.warn(validationError);
|
|
64
|
-
return null;
|
|
65
|
-
};
|
|
66
|
-
if (!(0, _utils.isNonEmptyString)(surface)) {
|
|
67
|
-
return invalidateSurface("Invalid surface: " + surface);
|
|
68
|
-
}
|
|
69
|
-
var expanded = expandFragmentSurface(surface, getPageLocation);
|
|
70
|
-
var parsed = parseSurface(expanded);
|
|
71
|
-
if (parsed === null) {
|
|
72
|
-
return invalidateSurface("Invalid surface: " + surface);
|
|
73
|
-
}
|
|
74
|
-
if (!(0, _utils.includes)([_surface.WEB, _surface.WEBAPP], parsed.surfaceType)) {
|
|
75
|
-
return invalidateSurface("Unsupported surface type " + parsed.surfaceType + " in surface: " + surface);
|
|
76
|
-
}
|
|
77
|
-
if (!parsed.authority || !AUTHORITY_REGEX.test(parsed.authority)) {
|
|
78
|
-
return invalidateSurface("Invalid authority " + parsed.authority + " in surface: " + surface);
|
|
79
|
-
}
|
|
80
|
-
if (parsed.path && !PATH_REGEX.test(parsed.path)) {
|
|
81
|
-
return invalidateSurface("Invalid path " + parsed.path + " in surface: " + surface);
|
|
82
|
-
}
|
|
83
|
-
if (parsed.fragment && !FRAGMENT_REGEX.test(parsed.fragment)) {
|
|
84
|
-
return invalidateSurface("Invalid fragment " + parsed.fragment + " in surface: " + surface);
|
|
85
|
-
}
|
|
86
|
-
return parsed;
|
|
87
|
-
};
|
|
88
|
-
var isPageWideSurface = function isPageWideSurface(scope) {
|
|
89
|
-
return !!scope && scope.indexOf(_surface.WEB + _surface.SURFACE_TYPE_DELIMITER) === 0 && scope.indexOf(_surface.FRAGMENT_DELIMITER) === -1;
|
|
90
|
-
};
|
|
91
|
-
exports.isPageWideSurface = isPageWideSurface;
|
|
92
|
-
var normalizeSurfaces = function normalizeSurfaces() {
|
|
93
|
-
var surfaces = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
94
|
-
var getPageLocation = arguments.length > 1 ? arguments[1] : undefined;
|
|
95
|
-
var logger = arguments.length > 2 ? arguments[2] : undefined;
|
|
96
|
-
return surfaces.map(function (surface) {
|
|
97
|
-
return validateSurface(surface, getPageLocation, logger);
|
|
98
|
-
}).filter(function (surface) {
|
|
99
|
-
return !(0, _utils.isNil)(surface);
|
|
100
|
-
}).map(stringifySurface);
|
|
101
|
-
};
|
|
102
|
-
exports.normalizeSurfaces = normalizeSurfaces;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = exports.EMPTY_PROPOSITIONS = void 0;
|
|
4
|
-
var _validation = require("../../utils/validation");
|
|
5
|
-
/*
|
|
6
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
7
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
|
|
11
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
var EMPTY_PROPOSITIONS = {
|
|
18
|
-
propositions: []
|
|
19
|
-
};
|
|
20
|
-
exports.EMPTY_PROPOSITIONS = EMPTY_PROPOSITIONS;
|
|
21
|
-
var _default = function _default(_ref) {
|
|
22
|
-
var logger = _ref.logger,
|
|
23
|
-
options = _ref.options;
|
|
24
|
-
var applyPropositionsOptionsValidator = (0, _validation.objectOf)({
|
|
25
|
-
propositions: (0, _validation.arrayOf)((0, _validation.objectOf)((0, _validation.anything)())),
|
|
26
|
-
metadata: (0, _validation.objectOf)((0, _validation.anything)()),
|
|
27
|
-
viewName: (0, _validation.string)()
|
|
28
|
-
}).required();
|
|
29
|
-
try {
|
|
30
|
-
return applyPropositionsOptionsValidator(options);
|
|
31
|
-
} catch (e) {
|
|
32
|
-
logger.warn("Invalid options for applyPropositions. No propositions will be applied.", e);
|
|
33
|
-
return EMPTY_PROPOSITIONS;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
exports.default = _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _utils = require("../../utils");
|
|
5
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } /*
|
|
6
|
-
Copyright 2020 Adobe. All rights reserved.
|
|
7
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
|
|
11
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
// serialize an object with a consistent ordering
|
|
17
|
-
var serialize = function serialize(obj) {
|
|
18
|
-
if (Array.isArray(obj)) {
|
|
19
|
-
return obj.map(function (i) {
|
|
20
|
-
return serialize(i);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
if (_typeof(obj) === "object" && obj !== null) {
|
|
24
|
-
return Object.keys(obj).sort().reduce(function (memo, key) {
|
|
25
|
-
memo[key] = serialize(obj[key]);
|
|
26
|
-
return memo;
|
|
27
|
-
}, {});
|
|
28
|
-
}
|
|
29
|
-
return obj;
|
|
30
|
-
};
|
|
31
|
-
var _default = function _default(obj) {
|
|
32
|
-
return (0, _utils.crc32)(JSON.stringify(serialize(obj)));
|
|
33
|
-
};
|
|
34
|
-
exports.default = _default;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _consentPurpose = require("../../constants/consentPurpose");
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /*
|
|
6
|
-
Copyright 2020 Adobe. All rights reserved.
|
|
7
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
|
|
11
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
var _default = function _default(_ref) {
|
|
17
|
-
var storedConsent = _ref.storedConsent,
|
|
18
|
-
taskQueue = _ref.taskQueue,
|
|
19
|
-
defaultConsent = _ref.defaultConsent,
|
|
20
|
-
consent = _ref.consent,
|
|
21
|
-
sendSetConsentRequest = _ref.sendSetConsentRequest,
|
|
22
|
-
validateSetConsentOptions = _ref.validateSetConsentOptions,
|
|
23
|
-
consentHashStore = _ref.consentHashStore,
|
|
24
|
-
doesIdentityCookieExist = _ref.doesIdentityCookieExist;
|
|
25
|
-
var defaultConsentByPurpose = _defineProperty({}, _consentPurpose.GENERAL, defaultConsent);
|
|
26
|
-
var storedConsentByPurpose = storedConsent.read();
|
|
27
|
-
var identityCookieExists = doesIdentityCookieExist();
|
|
28
|
-
var consentCookieExists = storedConsentByPurpose[_consentPurpose.GENERAL] !== undefined;
|
|
29
|
-
if (!identityCookieExists || !consentCookieExists) {
|
|
30
|
-
consentHashStore.clear();
|
|
31
|
-
}
|
|
32
|
-
// If the identity cookie is gone, remove the consent cookie because the
|
|
33
|
-
// consent info is tied to the identity.
|
|
34
|
-
if (!identityCookieExists) {
|
|
35
|
-
storedConsent.clear();
|
|
36
|
-
storedConsentByPurpose = {};
|
|
37
|
-
}
|
|
38
|
-
consent.initializeConsent(defaultConsentByPurpose, storedConsentByPurpose);
|
|
39
|
-
var readCookieIfQueueEmpty = function readCookieIfQueueEmpty() {
|
|
40
|
-
if (taskQueue.length === 0) {
|
|
41
|
-
var storedConsentObject = storedConsent.read();
|
|
42
|
-
// Only read cookies when there are no outstanding setConsent
|
|
43
|
-
// requests. This helps with race conditions.
|
|
44
|
-
if (storedConsentObject[_consentPurpose.GENERAL] !== undefined) {
|
|
45
|
-
consent.setConsent(storedConsentObject);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
return {
|
|
50
|
-
commands: {
|
|
51
|
-
setConsent: {
|
|
52
|
-
optionsValidator: validateSetConsentOptions,
|
|
53
|
-
run: function run(_ref2) {
|
|
54
|
-
var consentOptions = _ref2.consent,
|
|
55
|
-
identityMap = _ref2.identityMap,
|
|
56
|
-
edgeConfigOverrides = _ref2.edgeConfigOverrides;
|
|
57
|
-
consent.suspend();
|
|
58
|
-
var consentHashes = consentHashStore.lookup(consentOptions);
|
|
59
|
-
return taskQueue.addTask(function () {
|
|
60
|
-
if (consentHashes.isNew()) {
|
|
61
|
-
return sendSetConsentRequest({
|
|
62
|
-
consentOptions: consentOptions,
|
|
63
|
-
identityMap: identityMap,
|
|
64
|
-
edgeConfigOverrides: edgeConfigOverrides
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
return Promise.resolve();
|
|
68
|
-
}).then(function () {
|
|
69
|
-
return consentHashes.save();
|
|
70
|
-
}).finally(readCookieIfQueueEmpty);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
lifecycle: {
|
|
75
|
-
// Read the cookie here too because the consent cookie may change on any request
|
|
76
|
-
onResponse: readCookieIfQueueEmpty,
|
|
77
|
-
// Even when we get a failure HTTP status code, the consent cookie can
|
|
78
|
-
// still get updated. This could happen, for example, if the user is
|
|
79
|
-
// opted out in AudienceManager, but no consent cookie exists on the
|
|
80
|
-
// client. The request will be sent and the server will respond with a
|
|
81
|
-
// 403 Forbidden and a consent cookie.
|
|
82
|
-
onRequestFailure: readCookieIfQueueEmpty
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
exports.default = _default;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _computeConsentHash = require("./computeConsentHash");
|
|
5
|
-
var _excluded = ["standard", "version"];
|
|
6
|
-
/*
|
|
7
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
8
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
10
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
13
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
15
|
-
governing permissions and limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
|
-
var getKey = function getKey(_ref) {
|
|
20
|
-
var standard = _ref.standard,
|
|
21
|
-
version = _ref.version;
|
|
22
|
-
return standard + "." + version;
|
|
23
|
-
};
|
|
24
|
-
var _default = function _default(_ref2) {
|
|
25
|
-
var storage = _ref2.storage;
|
|
26
|
-
return {
|
|
27
|
-
clear: function clear() {
|
|
28
|
-
storage.clear();
|
|
29
|
-
},
|
|
30
|
-
lookup: function lookup(consentObjects) {
|
|
31
|
-
var currentHashes = {};
|
|
32
|
-
var getCurrentHash = function getCurrentHash(consentObject) {
|
|
33
|
-
var key = getKey(consentObject);
|
|
34
|
-
var standard = consentObject.standard,
|
|
35
|
-
version = consentObject.version,
|
|
36
|
-
rest = _objectWithoutProperties(consentObject, _excluded);
|
|
37
|
-
if (!currentHashes[key]) {
|
|
38
|
-
currentHashes[key] = (0, _computeConsentHash.default)(rest).toString();
|
|
39
|
-
}
|
|
40
|
-
return currentHashes[key];
|
|
41
|
-
};
|
|
42
|
-
return {
|
|
43
|
-
isNew: function isNew() {
|
|
44
|
-
return consentObjects.some(function (consentObject) {
|
|
45
|
-
var key = getKey(consentObject);
|
|
46
|
-
var previousHash = storage.getItem(key);
|
|
47
|
-
return previousHash === null || previousHash !== getCurrentHash(consentObject);
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
save: function save() {
|
|
51
|
-
consentObjects.forEach(function (consentObject) {
|
|
52
|
-
var key = getKey(consentObject);
|
|
53
|
-
storage.setItem(key, getCurrentHash(consentObject));
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
exports.default = _default;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _request = require("../../utils/request");
|
|
5
|
-
/*
|
|
6
|
-
Copyright 2020 Adobe. All rights reserved.
|
|
7
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
|
|
11
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
var _default = function _default(_ref) {
|
|
17
|
-
var payload = _ref.payload,
|
|
18
|
-
datastreamIdOverride = _ref.datastreamIdOverride;
|
|
19
|
-
return (0, _request.createRequest)({
|
|
20
|
-
payload: payload,
|
|
21
|
-
datastreamIdOverride: datastreamIdOverride,
|
|
22
|
-
getAction: function getAction() {
|
|
23
|
-
return "privacy/set-consent";
|
|
24
|
-
},
|
|
25
|
-
getUseSendBeacon: function getUseSendBeacon() {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
exports.default = _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var _request = require("../../utils/request");
|
|
5
|
-
/*
|
|
6
|
-
Copyright 2019 Adobe. All rights reserved.
|
|
7
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
9
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
|
|
11
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
12
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
14
|
-
governing permissions and limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
var _default = function _default() {
|
|
17
|
-
var content = {};
|
|
18
|
-
var payload = (0, _request.createRequestPayload)({
|
|
19
|
-
content: content,
|
|
20
|
-
addIdentity: function addIdentity(namespaceCode, identity) {
|
|
21
|
-
content.identityMap = content.identityMap || {};
|
|
22
|
-
content.identityMap[namespaceCode] = content.identityMap[namespaceCode] || [];
|
|
23
|
-
content.identityMap[namespaceCode].push(identity);
|
|
24
|
-
},
|
|
25
|
-
hasIdentity: function hasIdentity(namespaceCode) {
|
|
26
|
-
return (content.identityMap && content.identityMap[namespaceCode]) !== undefined;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
payload.setConsent = function (consent) {
|
|
30
|
-
content.consent = consent;
|
|
31
|
-
};
|
|
32
|
-
return payload;
|
|
33
|
-
};
|
|
34
|
-
exports.default = _default;
|