@snowplow/tracker-core
Advanced tools
Comparing version 3.0.0-beta.5 to 3.0.0
@@ -0,1 +1,2 @@ | ||
declare const version: string; | ||
/** | ||
@@ -27,4 +28,4 @@ * Type for a Payload dictionary | ||
* Adds an entry to the Payload | ||
* @param key Key for Payload dictionary entry | ||
* @param value Value for Payload dictionaty entry | ||
* @param key - Key for Payload dictionary entry | ||
* @param value - Value for Payload dictionaty entry | ||
*/ | ||
@@ -34,3 +35,3 @@ add: (key: string, value: unknown) => void; | ||
* Merges a payload into the existing payload | ||
* @param dict The payload to merge | ||
* @param dict - The payload to merge | ||
*/ | ||
@@ -40,5 +41,5 @@ addDict: (dict: Payload) => void; | ||
* Caches a JSON object to be added to payload on build | ||
* @param keyIfEncoded key if base64 encoding is enabled | ||
* @param keyIfNotEncoded key if base64 encoding is disabled | ||
* @param json The json to be stringified and added to the payload | ||
* @param keyIfEncoded - key if base64 encoding is enabled | ||
* @param keyIfNotEncoded - key if base64 encoding is disabled | ||
* @param json - The json to be stringified and added to the payload | ||
*/ | ||
@@ -57,3 +58,3 @@ addJson: (keyIfEncoded: string, keyIfNotEncoded: string, json: Record<string, unknown>) => void; | ||
* the payload to process the JSON which has been added to this payload | ||
* @param jsonProcessor The JsonProcessor function for this builder | ||
* @param jsonProcessor - The JsonProcessor function for this builder | ||
*/ | ||
@@ -63,3 +64,3 @@ withJsonProcessor: (jsonProcessor: JsonProcessor) => void; | ||
* Builds and returns the Payload | ||
* @param base64Encode configures if unprocessed, cached json should be encoded | ||
* @param base64Encode - configures if unprocessed, cached json should be encoded | ||
*/ | ||
@@ -78,3 +79,3 @@ build: () => Payload; | ||
* Is property a non-empty JSON? | ||
* @param property Checks if object is non-empty json | ||
* @param property - Checks if object is non-empty json | ||
*/ | ||
@@ -84,3 +85,3 @@ declare function isNonEmptyJson(property?: Record<string, unknown>): boolean; | ||
* Is property a JSON? | ||
* @param property Checks if object is json | ||
* @param property - Checks if object is json | ||
*/ | ||
@@ -116,3 +117,3 @@ declare function isJson(property?: Record<string, unknown>): boolean; | ||
* Called just before the trackerCore callback fires | ||
* @param payloadBuilder The payloadBuilder which will be sent to the callback, can be modified | ||
* @param payloadBuilder - The payloadBuilder which will be sent to the callback, can be modified | ||
*/ | ||
@@ -122,3 +123,3 @@ beforeTrack?: (payloadBuilder: PayloadBuilder) => void; | ||
* Called just after the trackerCore callback fires | ||
* @param payload The final built payload | ||
* @param payload - The final built payload | ||
*/ | ||
@@ -201,5 +202,5 @@ afterTrack?: (payload: Payload) => void; | ||
* | ||
* @param pb Payload | ||
* @param context Custom contexts relating to the event | ||
* @param timestamp Timestamp of the event | ||
* @param pb - Payload | ||
* @param context - Custom contexts relating to the event | ||
* @param timestamp - Timestamp of the event | ||
* @return Payload after the callback is applied | ||
@@ -214,4 +215,4 @@ */ | ||
* | ||
* @param key Field name | ||
* @param value Field value | ||
* @param key - Field name | ||
* @param value - Field value | ||
*/ | ||
@@ -226,3 +227,3 @@ addPayloadPair: (key: string, value: string | number) => void; | ||
* | ||
* @param encode Whether to encode payload | ||
* @param encode - Whether to encode payload | ||
*/ | ||
@@ -233,3 +234,3 @@ setBase64Encoding(encode: boolean): void; | ||
* | ||
* @param dict Adds a new payload dictionary to the existing one | ||
* @param dict - Adds a new payload dictionary to the existing one | ||
*/ | ||
@@ -240,3 +241,3 @@ addPayloadDict(dict: Payload): void; | ||
* | ||
* @param dict Resets all current payload pairs with a new dictionary of pairs | ||
* @param dict - Resets all current payload pairs with a new dictionary of pairs | ||
*/ | ||
@@ -247,3 +248,3 @@ resetPayloadPairs(dict: Payload): void; | ||
* | ||
* @param version The version of the current tracker | ||
* @param version - The version of the current tracker | ||
*/ | ||
@@ -254,3 +255,3 @@ setTrackerVersion(version: string): void; | ||
* | ||
* @param name The trackers namespace | ||
* @param name - The trackers namespace | ||
*/ | ||
@@ -261,3 +262,3 @@ setTrackerNamespace(name: string): void; | ||
* | ||
* @param appId An application ID which identifies the current application | ||
* @param appId - An application ID which identifies the current application | ||
*/ | ||
@@ -268,3 +269,3 @@ setAppId(appId: string): void; | ||
* | ||
* @param value A valid Snowplow platform value | ||
* @param value - A valid Snowplow platform value | ||
*/ | ||
@@ -275,3 +276,3 @@ setPlatform(value: string): void; | ||
* | ||
* @param userId The custom user id | ||
* @param userId - The custom user id | ||
*/ | ||
@@ -282,4 +283,4 @@ setUserId(userId: string): void; | ||
* | ||
* @param width screen resolution width | ||
* @param height screen resolution height | ||
* @param width - screen resolution width | ||
* @param height - screen resolution height | ||
*/ | ||
@@ -290,4 +291,4 @@ setScreenResolution(width: string, height: string): void; | ||
* | ||
* @param width viewport width | ||
* @param height viewport height | ||
* @param width - viewport width | ||
* @param height - viewport height | ||
*/ | ||
@@ -298,3 +299,3 @@ setViewport(width: string, height: string): void; | ||
* | ||
* @param depth A color depth value as string | ||
* @param depth - A color depth value as string | ||
*/ | ||
@@ -305,3 +306,3 @@ setColorDepth(depth: string): void; | ||
* | ||
* @param timezone A timezone string | ||
* @param timezone - A timezone string | ||
*/ | ||
@@ -312,3 +313,3 @@ setTimezone(timezone: string): void; | ||
* | ||
* @param lang A language string e.g. 'en-UK' | ||
* @param lang - A language string e.g. 'en-UK' | ||
*/ | ||
@@ -319,3 +320,3 @@ setLang(lang: string): void; | ||
* | ||
* @param ip An IP Address string | ||
* @param ip - An IP Address string | ||
*/ | ||
@@ -326,3 +327,3 @@ setIpAddress(ip: string): void; | ||
* | ||
* @param useragent A useragent string | ||
* @param useragent - A useragent string | ||
*/ | ||
@@ -332,3 +333,3 @@ setUseragent(useragent: string): void; | ||
* Adds contexts globally, contexts added here will be attached to all applicable events | ||
* @param contexts An array containing either contexts or a conditional contexts | ||
* @param contexts - An array containing either contexts or a conditional contexts | ||
*/ | ||
@@ -342,3 +343,3 @@ addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Removes previously added global context, performs a deep comparison of the contexts or conditional contexts | ||
* @param contexts An array containing either contexts or a conditional contexts | ||
* @param contexts - An array containing either contexts or a conditional contexts | ||
*/ | ||
@@ -348,3 +349,3 @@ removeGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Add a plugin into the plugin collection after Core has already been initialised | ||
* @param configuration The plugin to add | ||
* @param configuration - The plugin to add | ||
*/ | ||
@@ -374,5 +375,5 @@ addPlugin(configuration: CorePluginConfiguration): void; | ||
* | ||
* @param base64 Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins The core plugins to be processed with each event | ||
* @param callback Function applied to every payload dictionary object | ||
* @param base64 - Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins - The core plugins to be processed with each event | ||
* @param callback - Function applied to every payload dictionary object | ||
* @return Tracker core | ||
@@ -395,3 +396,3 @@ */ | ||
* | ||
* @param event Contains the properties and schema location for the event | ||
* @param event - Contains the properties and schema location for the event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -420,3 +421,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page View event | ||
* @param event - Contains the properties for the Page View event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -447,3 +448,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page Ping event | ||
* @param event - Contains the properties for the Page Ping event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -471,3 +472,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Structured event | ||
* @param event - Contains the properties for the Structured event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -506,3 +507,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transactoion event | ||
* @param event - Contains the properties for the Ecommerce Transactoion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -537,3 +538,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transaction Item event | ||
* @param event - Contains the properties for the Ecommerce Transaction Item event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -560,3 +561,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Screen View event. One or more properties must be included. | ||
* @param event - Contains the properties for the Screen View event. One or more properties must be included. | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -585,3 +586,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Link Click event | ||
* @param event - Contains the properties for the Link Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -622,3 +623,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Impression event | ||
* @param event - Contains the properties for the Ad Impression event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -661,3 +662,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Click event | ||
* @param event - Contains the properties for the Ad Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -700,3 +701,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Conversion event | ||
* @param event - Contains the properties for the Ad Conversion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -725,3 +726,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Social Interaction event | ||
* @param event - Contains the properties for the Social Interaction event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -754,3 +755,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Add To Cart event | ||
* @param event - Contains the properties for the Add To Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -783,3 +784,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Remove From Cart event | ||
* @param event - Contains the properties for the Remove From Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -814,3 +815,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Focus or Change Form event | ||
* @param event - Contains the properties for the Form Focus or Change Form event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -848,3 +849,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Submission event | ||
* @param event - Contains the properties for the Form Submission event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -871,3 +872,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Site Search event | ||
* @param event - Contains the properties for the Site Search event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -896,3 +897,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Withdrawn event | ||
* @param event - Contains the properties for the Consent Withdrawn event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -927,3 +928,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Granted event | ||
* @param event - Contains the properties for the Consent Granted event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -956,3 +957,3 @@ */ | ||
* to allow an additional context to be dynamically attached to the event | ||
* @param args - Object which contains the event information to help decide what should be included in the returned Context | ||
* @param args - - Object which contains the event information to help decide what should be included in the returned Context | ||
*/ | ||
@@ -963,3 +964,3 @@ type ContextGenerator = (args?: ContextEvent) => SelfDescribingJson; | ||
* to determine if the context associated with the filter should be attached to the event | ||
* @param args - Object that contains: event, eventType, eventSchema | ||
* @param args - - Object that contains: event, eventType, eventSchema | ||
*/ | ||
@@ -1016,3 +1017,3 @@ type ContextFilter = (args?: ContextEvent) => boolean; | ||
* Adds conditional or primitive global contexts | ||
* @param contexts An Array of either Conditional Contexts or Primitive Contexts | ||
* @param contexts - An Array of either Conditional Contexts or Primitive Contexts | ||
*/ | ||
@@ -1026,3 +1027,3 @@ addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Removes previously added global context, performs a deep comparison of the contexts or conditional contexts | ||
* @param contexts An Array of either Condition Contexts or Primitive Contexts | ||
* @param contexts - An Array of either Condition Contexts or Primitive Contexts | ||
*/ | ||
@@ -1032,3 +1033,3 @@ removeGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Returns all applicable global contexts for a specified event | ||
* @param event The event to check for applicable global contexts for | ||
* @param event - The event to check for applicable global contexts for | ||
*/ | ||
@@ -1052,4 +1053,4 @@ getApplicableContexts(event: PayloadBuilder): Array<SelfDescribingJson>; | ||
* | ||
* @param dynamicOrStaticContexts Array of custom context Objects or custom context generating functions | ||
* @param Parameters to pass to dynamic context callbacks | ||
* @param dynamicOrStaticContexts - Array of custom context Objects or custom context generating functions | ||
* @param Parameters - to pass to dynamic context callbacks | ||
* @returns An array of Self Describing JSON context | ||
@@ -1060,3 +1061,3 @@ */ | ||
* Slices a schema into its composite parts. Useful for ruleset filtering. | ||
* @param input A schema string | ||
* @param input - A schema string | ||
* @returns The vendor, schema name, major, minor and patch information of a schema string | ||
@@ -1067,3 +1068,3 @@ */ | ||
* Validates the vendor section of a schema string contains allowed wildcard values | ||
* @param parts Array of parts from a schema string | ||
* @param parts - Array of parts from a schema string | ||
* @returns Whether the vendor validation parts are a valid combination | ||
@@ -1074,3 +1075,3 @@ */ | ||
* Validates the vendor part of a schema string is valid for a rule set | ||
* @param input Vendor part of a schema string | ||
* @param input - Vendor part of a schema string | ||
* @returns Whether the vendor validation string is valid | ||
@@ -1081,3 +1082,3 @@ */ | ||
* Checks for validity of input and returns all the sections of a schema string that are used to match rules in a ruleset | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns The sections of a schema string that are used to match rules in a ruleset | ||
@@ -1088,3 +1089,3 @@ */ | ||
* Ensures the rules specified in a schema string of a ruleset are valid | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns if there rule is valid | ||
@@ -1095,3 +1096,3 @@ */ | ||
* Check if a variable is an Array containing only strings | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if the input is an array containing only strings | ||
@@ -1102,3 +1103,3 @@ */ | ||
* Validates whether a rule set is an array of valid ruleset strings | ||
* @param input The Array of rule set arguments | ||
* @param input - The Array of rule set arguments | ||
* @returns True is the input is an array of valid rules | ||
@@ -1109,3 +1110,3 @@ */ | ||
* Check if a variable is a valid, non-empty Self Describing JSON | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if a valid Self Describing JSON | ||
@@ -1116,3 +1117,3 @@ */ | ||
* Validates if the input object contains the expected properties of a ruleset | ||
* @param input The object containing a rule set | ||
* @param input - The object containing a rule set | ||
* @returns True if a valid rule set | ||
@@ -1123,3 +1124,3 @@ */ | ||
* Validates if the function can be a valid context generator function | ||
* @param input The function to be validated | ||
* @param input - The function to be validated | ||
*/ | ||
@@ -1129,3 +1130,3 @@ declare function isContextCallbackFunction(input: unknown): boolean; | ||
* Validates if the function can be a valid context primitive function or self describing json | ||
* @param input The function or orbject to be validated | ||
* @param input - The function or orbject to be validated | ||
* @returns True if either a Context Generator or Self Describing JSON | ||
@@ -1136,3 +1137,3 @@ */ | ||
* Validates if an array is a valid shape to be a Filter Provider | ||
* @param input The Array of Context filter callbacks | ||
* @param input - The Array of Context filter callbacks | ||
*/ | ||
@@ -1142,3 +1143,3 @@ declare function isFilterProvider(input: unknown): boolean; | ||
* Validates if an array is a valid shape to be an array of rule sets | ||
* @param input The Array of Rule Sets | ||
* @param input - The Array of Rule Sets | ||
*/ | ||
@@ -1148,3 +1149,3 @@ declare function isRuleSetProvider(input: unknown): boolean; | ||
* Checks if an input array is either a filter provider or a rule set provider | ||
* @param input An array of filter providers or rule set providers | ||
* @param input - An array of filter providers or rule set providers | ||
* @returns Whether the array is a valid {@link ConditionalContextProvider} | ||
@@ -1155,4 +1156,4 @@ */ | ||
* Checks if a given schema matches any rules within the provided rule set | ||
* @param ruleSet The rule set containing rules to match schema against | ||
* @param schema The schema to be matched against the rule set | ||
* @param ruleSet - The rule set containing rules to match schema against | ||
* @param schema - The schema to be matched against the rule set | ||
*/ | ||
@@ -1162,7 +1163,6 @@ declare function matchSchemaAgainstRuleSet(ruleSet: RuleSet, schema: string): boolean; | ||
* Checks if a given schema matches a specific rule from a rule set | ||
* @param rule The rule to match schema against | ||
* @param schema The schema to be matched against the rule | ||
* @param rule - The rule to match schema against | ||
* @param schema - The schema to be matched against the rule | ||
*/ | ||
declare function matchSchemaAgainstRule(rule: string, schema: string): boolean; | ||
export { ContextEvent, ContextGenerator, ContextFilter, ContextPrimitive, FilterProvider, RuleSet, RuleSetProvider, ConditionalContextProvider, DynamicContext, GlobalContexts, globalContexts, PluginContexts, pluginContexts, resolveDynamicContext, getSchemaParts, validateVendorParts, validateVendor, getRuleParts, isValidRule, isStringArray, isValidRuleSetArg, isSelfDescribingJson, isRuleSet, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isRuleSetProvider, isConditionalContextProvider, matchSchemaAgainstRuleSet, matchSchemaAgainstRule, CorePlugin, Payload, EventJsonWithKeys, EventJson, JsonProcessor, PayloadBuilder, payloadBuilder, payloadJsonProcessor, isNonEmptyJson, isJson, SelfDescribingJson, SelfDescribingJsonArray, Timestamp, TrueTimestamp, DeviceTimestamp, CommonEventProperties, TrackerCore, CoreConfiguration, CorePluginConfiguration, trackerCore, SelfDescribingEvent, buildSelfDescribingEvent, PageViewEvent, buildPageView, PagePingEvent, buildPagePing, StructuredEvent, buildStructEvent, EcommerceTransactionEvent, buildEcommerceTransaction, EcommerceTransactionItemEvent, buildEcommerceTransactionItem, ScreenViewEvent, buildScreenView, LinkClickEvent, buildLinkClick, AdImpressionEvent, buildAdImpression, AdClickEvent, buildAdClick, AdConversionEvent, buildAdConversion, SocialInteractionEvent, buildSocialInteraction, AddToCartEvent, buildAddToCart, RemoveFromCartEvent, buildRemoveFromCart, FormFocusOrChangeEvent, buildFormFocusOrChange, FormElement, FormSubmissionEvent, buildFormSubmission, SiteSearchEvent, buildSiteSearch, ConsentWithdrawnEvent, buildConsentWithdrawn, ConsentGrantedEvent, buildConsentGranted, LOG_LEVEL, Logger, LOG }; | ||
export { version } from "package"; | ||
export { version, ContextEvent, ContextGenerator, ContextFilter, ContextPrimitive, FilterProvider, RuleSet, RuleSetProvider, ConditionalContextProvider, DynamicContext, GlobalContexts, globalContexts, PluginContexts, pluginContexts, resolveDynamicContext, getSchemaParts, validateVendorParts, validateVendor, getRuleParts, isValidRule, isStringArray, isValidRuleSetArg, isSelfDescribingJson, isRuleSet, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isRuleSetProvider, isConditionalContextProvider, matchSchemaAgainstRuleSet, matchSchemaAgainstRule, CorePlugin, Payload, EventJsonWithKeys, EventJson, JsonProcessor, PayloadBuilder, payloadBuilder, payloadJsonProcessor, isNonEmptyJson, isJson, SelfDescribingJson, SelfDescribingJsonArray, Timestamp, TrueTimestamp, DeviceTimestamp, CommonEventProperties, TrackerCore, CoreConfiguration, CorePluginConfiguration, trackerCore, SelfDescribingEvent, buildSelfDescribingEvent, PageViewEvent, buildPageView, PagePingEvent, buildPagePing, StructuredEvent, buildStructEvent, EcommerceTransactionEvent, buildEcommerceTransaction, EcommerceTransactionItemEvent, buildEcommerceTransactionItem, ScreenViewEvent, buildScreenView, LinkClickEvent, buildLinkClick, AdImpressionEvent, buildAdImpression, AdClickEvent, buildAdClick, AdConversionEvent, buildAdConversion, SocialInteractionEvent, buildSocialInteraction, AddToCartEvent, buildAddToCart, RemoveFromCartEvent, buildRemoveFromCart, FormFocusOrChangeEvent, buildFormFocusOrChange, FormElement, FormSubmissionEvent, buildFormSubmission, SiteSearchEvent, buildSiteSearch, ConsentWithdrawnEvent, buildConsentWithdrawn, ConsentGrantedEvent, buildConsentGranted, LOG_LEVEL, Logger, LOG }; |
/*! | ||
* Core functionality for Snowplow JavaScript trackers v3.0.0-beta.5 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow JavaScript trackers v3.0.0 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -14,2 +14,4 @@ * Licensed under BSD-3-Clause | ||
var version$1 = "3.0.0"; | ||
/* | ||
@@ -40,3 +42,3 @@ * Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) | ||
* @remark See: {@link http://tools.ietf.org/html/rfc4648#page-7} | ||
* @param data String to encode | ||
* @param data - String to encode | ||
* @returns The url safe Base 64 string | ||
@@ -56,3 +58,3 @@ */ | ||
* | ||
* @param data string to encode | ||
* @param data - string to encode | ||
* @returns base64-encoded string | ||
@@ -189,3 +191,3 @@ */ | ||
* Is property a non-empty JSON? | ||
* @param property Checks if object is non-empty json | ||
* @param property - Checks if object is non-empty json | ||
*/ | ||
@@ -205,3 +207,3 @@ function isNonEmptyJson(property) { | ||
* Is property a JSON? | ||
* @param property Checks if object is json | ||
* @param property - Checks if object is json | ||
*/ | ||
@@ -363,3 +365,3 @@ function isJson(property) { | ||
* Returns all applicable global contexts for a specified event | ||
* @param event The event to check for applicable global contexts for | ||
* @param event - The event to check for applicable global contexts for | ||
* @returns An array of contexts | ||
@@ -426,3 +428,3 @@ */ | ||
* | ||
* @param array additionalContexts List of user-defined contexts | ||
* @param array - additionalContexts List of user-defined contexts | ||
* @return userContexts combined with commonContexts | ||
@@ -451,4 +453,4 @@ */ | ||
* | ||
* @param dynamicOrStaticContexts Array of custom context Objects or custom context generating functions | ||
* @param Parameters to pass to dynamic context callbacks | ||
* @param dynamicOrStaticContexts - Array of custom context Objects or custom context generating functions | ||
* @param Parameters - to pass to dynamic context callbacks | ||
* @returns An array of Self Describing JSON context | ||
@@ -479,3 +481,3 @@ */ | ||
* Slices a schema into its composite parts. Useful for ruleset filtering. | ||
* @param input A schema string | ||
* @param input - A schema string | ||
* @returns The vendor, schema name, major, minor and patch information of a schema string | ||
@@ -492,3 +494,3 @@ */ | ||
* Validates the vendor section of a schema string contains allowed wildcard values | ||
* @param parts Array of parts from a schema string | ||
* @param parts - Array of parts from a schema string | ||
* @returns Whether the vendor validation parts are a valid combination | ||
@@ -519,3 +521,3 @@ */ | ||
* Validates the vendor part of a schema string is valid for a rule set | ||
* @param input Vendor part of a schema string | ||
* @param input - Vendor part of a schema string | ||
* @returns Whether the vendor validation string is valid | ||
@@ -531,3 +533,3 @@ */ | ||
* Checks for validity of input and returns all the sections of a schema string that are used to match rules in a ruleset | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns The sections of a schema string that are used to match rules in a ruleset | ||
@@ -544,3 +546,3 @@ */ | ||
* Ensures the rules specified in a schema string of a ruleset are valid | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns if there rule is valid | ||
@@ -558,3 +560,3 @@ */ | ||
* Check if a variable is an Array containing only strings | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if the input is an array containing only strings | ||
@@ -570,3 +572,3 @@ */ | ||
* Validates whether a rule set is an array of valid ruleset strings | ||
* @param input The Array of rule set arguments | ||
* @param input - The Array of rule set arguments | ||
* @returns True is the input is an array of valid rules | ||
@@ -585,3 +587,3 @@ */ | ||
* Check if a variable is a valid, non-empty Self Describing JSON | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if a valid Self Describing JSON | ||
@@ -598,3 +600,3 @@ */ | ||
* Validates if the input object contains the expected properties of a ruleset | ||
* @param input The object containing a rule set | ||
* @param input - The object containing a rule set | ||
* @returns True if a valid rule set | ||
@@ -630,3 +632,3 @@ */ | ||
* Validates if the function can be a valid context generator function | ||
* @param input The function to be validated | ||
* @param input - The function to be validated | ||
*/ | ||
@@ -638,3 +640,3 @@ function isContextCallbackFunction(input) { | ||
* Validates if the function can be a valid context primitive function or self describing json | ||
* @param input The function or orbject to be validated | ||
* @param input - The function or orbject to be validated | ||
* @returns True if either a Context Generator or Self Describing JSON | ||
@@ -647,3 +649,3 @@ */ | ||
* Validates if an array is a valid shape to be a Filter Provider | ||
* @param input The Array of Context filter callbacks | ||
* @param input - The Array of Context filter callbacks | ||
*/ | ||
@@ -663,3 +665,3 @@ function isFilterProvider(input) { | ||
* Validates if an array is a valid shape to be an array of rule sets | ||
* @param input The Array of Rule Sets | ||
* @param input - The Array of Rule Sets | ||
*/ | ||
@@ -678,3 +680,3 @@ function isRuleSetProvider(input) { | ||
* Checks if an input array is either a filter provider or a rule set provider | ||
* @param input An array of filter providers or rule set providers | ||
* @param input - An array of filter providers or rule set providers | ||
* @returns Whether the array is a valid {@link ConditionalContextProvider} | ||
@@ -687,4 +689,4 @@ */ | ||
* Checks if a given schema matches any rules within the provided rule set | ||
* @param ruleSet The rule set containing rules to match schema against | ||
* @param schema The schema to be matched against the rule set | ||
* @param ruleSet - The rule set containing rules to match schema against | ||
* @param schema - The schema to be matched against the rule set | ||
*/ | ||
@@ -726,4 +728,4 @@ function matchSchemaAgainstRuleSet(ruleSet, schema) { | ||
* Checks if a given schema matches a specific rule from a rule set | ||
* @param rule The rule to match schema against | ||
* @param schema The schema to be matched against the rule | ||
* @param rule - The rule to match schema against | ||
* @param schema - The schema to be matched against the rule | ||
*/ | ||
@@ -917,3 +919,3 @@ function matchSchemaAgainstRule(rule, schema) { | ||
* | ||
* @param timestamp optional number or timestamp object | ||
* @param timestamp - optional number or timestamp object | ||
* @returns correct timestamp object | ||
@@ -939,5 +941,5 @@ */ | ||
* | ||
* @param base64 Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins The core plugins to be processed with each event | ||
* @param callback Function applied to every payload dictionary object | ||
* @param base64 - Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins - The core plugins to be processed with each event | ||
* @param callback - Function applied to every payload dictionary object | ||
* @return Tracker core | ||
@@ -953,3 +955,3 @@ */ | ||
* | ||
* @param contexts Array of custom context self-describing JSONs | ||
* @param contexts - Array of custom context self-describing JSONs | ||
* @return Outer JSON | ||
@@ -969,4 +971,4 @@ */ | ||
* | ||
* @param pb PayloadData | ||
* @param contexts Custom contexts relating to the event | ||
* @param pb - PayloadData | ||
* @param contexts - Custom contexts relating to the event | ||
*/ | ||
@@ -989,5 +991,5 @@ function attachGlobalContexts(pb, contexts) { | ||
* | ||
* @param pb Payload | ||
* @param context Custom contexts relating to the event | ||
* @param timestamp Timestamp of the event | ||
* @param pb - Payload | ||
* @param context - Custom contexts relating to the event | ||
* @param timestamp - Timestamp of the event | ||
* @return Payload after the callback is applied | ||
@@ -1035,4 +1037,4 @@ */ | ||
* | ||
* @param key Field name | ||
* @param value Field value | ||
* @param key - Field name | ||
* @param value - Field value | ||
*/ | ||
@@ -1128,3 +1130,3 @@ function addPayloadPair(key, value) { | ||
* | ||
* @param event Contains the properties and schema location for the event | ||
* @param event - Contains the properties and schema location for the event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1148,3 +1150,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page View event | ||
* @param event - Contains the properties for the Page View event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1166,3 +1168,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page Ping event | ||
* @param event - Contains the properties for the Page Ping event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1192,3 +1194,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Structured event | ||
* @param event - Contains the properties for the Structured event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1211,3 +1213,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transactoion event | ||
* @param event - Contains the properties for the Ecommerce Transactoion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1234,3 +1236,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transaction Item event | ||
* @param event - Contains the properties for the Ecommerce Transaction Item event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1256,3 +1258,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Screen View event. One or more properties must be included. | ||
* @param event - Contains the properties for the Screen View event. One or more properties must be included. | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1273,3 +1275,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Link Click event | ||
* @param event - Contains the properties for the Link Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1292,3 +1294,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Impression event | ||
* @param event - Contains the properties for the Ad Impression event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1320,3 +1322,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Click event | ||
* @param event - Contains the properties for the Ad Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1349,3 +1351,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Conversion event | ||
* @param event - Contains the properties for the Ad Conversion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1377,3 +1379,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Social Interaction event | ||
* @param event - Contains the properties for the Social Interaction event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1394,3 +1396,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Add To Cart event | ||
* @param event - Contains the properties for the Add To Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1419,3 +1421,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Remove From Cart event | ||
* @param event - Contains the properties for the Remove From Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1444,3 +1446,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Focus or Change Form event | ||
* @param event - Contains the properties for the Form Focus or Change Form event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1471,3 +1473,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Submission event | ||
* @param event - Contains the properties for the Form Submission event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1488,3 +1490,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Site Search event | ||
* @param event - Contains the properties for the Site Search event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1505,3 +1507,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Withdrawn event | ||
* @param event - Contains the properties for the Consent Withdrawn event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -1531,3 +1533,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Granted event | ||
* @param event - Contains the properties for the Consent Granted event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -1556,4 +1558,4 @@ */ | ||
* | ||
* @param event JSON object to clean | ||
* @param exemptFields Set of fields which should not be removed even if empty | ||
* @param event - JSON object to clean | ||
* @param exemptFields - Set of fields which should not be removed even if empty | ||
* @return A cleaned copy of eventJson | ||
@@ -1572,3 +1574,32 @@ */ | ||
var version = "3.0.0-beta.5"; | ||
/* | ||
* Copyright (c) 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* 3. Neither the name of the copyright holder nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
var version = version$1; | ||
@@ -1575,0 +1606,0 @@ exports.LOG = LOG; |
@@ -0,1 +1,2 @@ | ||
declare const version: string; | ||
/** | ||
@@ -27,4 +28,4 @@ * Type for a Payload dictionary | ||
* Adds an entry to the Payload | ||
* @param key Key for Payload dictionary entry | ||
* @param value Value for Payload dictionaty entry | ||
* @param key - Key for Payload dictionary entry | ||
* @param value - Value for Payload dictionaty entry | ||
*/ | ||
@@ -34,3 +35,3 @@ add: (key: string, value: unknown) => void; | ||
* Merges a payload into the existing payload | ||
* @param dict The payload to merge | ||
* @param dict - The payload to merge | ||
*/ | ||
@@ -40,5 +41,5 @@ addDict: (dict: Payload) => void; | ||
* Caches a JSON object to be added to payload on build | ||
* @param keyIfEncoded key if base64 encoding is enabled | ||
* @param keyIfNotEncoded key if base64 encoding is disabled | ||
* @param json The json to be stringified and added to the payload | ||
* @param keyIfEncoded - key if base64 encoding is enabled | ||
* @param keyIfNotEncoded - key if base64 encoding is disabled | ||
* @param json - The json to be stringified and added to the payload | ||
*/ | ||
@@ -57,3 +58,3 @@ addJson: (keyIfEncoded: string, keyIfNotEncoded: string, json: Record<string, unknown>) => void; | ||
* the payload to process the JSON which has been added to this payload | ||
* @param jsonProcessor The JsonProcessor function for this builder | ||
* @param jsonProcessor - The JsonProcessor function for this builder | ||
*/ | ||
@@ -63,3 +64,3 @@ withJsonProcessor: (jsonProcessor: JsonProcessor) => void; | ||
* Builds and returns the Payload | ||
* @param base64Encode configures if unprocessed, cached json should be encoded | ||
* @param base64Encode - configures if unprocessed, cached json should be encoded | ||
*/ | ||
@@ -78,3 +79,3 @@ build: () => Payload; | ||
* Is property a non-empty JSON? | ||
* @param property Checks if object is non-empty json | ||
* @param property - Checks if object is non-empty json | ||
*/ | ||
@@ -84,3 +85,3 @@ declare function isNonEmptyJson(property?: Record<string, unknown>): boolean; | ||
* Is property a JSON? | ||
* @param property Checks if object is json | ||
* @param property - Checks if object is json | ||
*/ | ||
@@ -116,3 +117,3 @@ declare function isJson(property?: Record<string, unknown>): boolean; | ||
* Called just before the trackerCore callback fires | ||
* @param payloadBuilder The payloadBuilder which will be sent to the callback, can be modified | ||
* @param payloadBuilder - The payloadBuilder which will be sent to the callback, can be modified | ||
*/ | ||
@@ -122,3 +123,3 @@ beforeTrack?: (payloadBuilder: PayloadBuilder) => void; | ||
* Called just after the trackerCore callback fires | ||
* @param payload The final built payload | ||
* @param payload - The final built payload | ||
*/ | ||
@@ -201,5 +202,5 @@ afterTrack?: (payload: Payload) => void; | ||
* | ||
* @param pb Payload | ||
* @param context Custom contexts relating to the event | ||
* @param timestamp Timestamp of the event | ||
* @param pb - Payload | ||
* @param context - Custom contexts relating to the event | ||
* @param timestamp - Timestamp of the event | ||
* @return Payload after the callback is applied | ||
@@ -214,4 +215,4 @@ */ | ||
* | ||
* @param key Field name | ||
* @param value Field value | ||
* @param key - Field name | ||
* @param value - Field value | ||
*/ | ||
@@ -226,3 +227,3 @@ addPayloadPair: (key: string, value: string | number) => void; | ||
* | ||
* @param encode Whether to encode payload | ||
* @param encode - Whether to encode payload | ||
*/ | ||
@@ -233,3 +234,3 @@ setBase64Encoding(encode: boolean): void; | ||
* | ||
* @param dict Adds a new payload dictionary to the existing one | ||
* @param dict - Adds a new payload dictionary to the existing one | ||
*/ | ||
@@ -240,3 +241,3 @@ addPayloadDict(dict: Payload): void; | ||
* | ||
* @param dict Resets all current payload pairs with a new dictionary of pairs | ||
* @param dict - Resets all current payload pairs with a new dictionary of pairs | ||
*/ | ||
@@ -247,3 +248,3 @@ resetPayloadPairs(dict: Payload): void; | ||
* | ||
* @param version The version of the current tracker | ||
* @param version - The version of the current tracker | ||
*/ | ||
@@ -254,3 +255,3 @@ setTrackerVersion(version: string): void; | ||
* | ||
* @param name The trackers namespace | ||
* @param name - The trackers namespace | ||
*/ | ||
@@ -261,3 +262,3 @@ setTrackerNamespace(name: string): void; | ||
* | ||
* @param appId An application ID which identifies the current application | ||
* @param appId - An application ID which identifies the current application | ||
*/ | ||
@@ -268,3 +269,3 @@ setAppId(appId: string): void; | ||
* | ||
* @param value A valid Snowplow platform value | ||
* @param value - A valid Snowplow platform value | ||
*/ | ||
@@ -275,3 +276,3 @@ setPlatform(value: string): void; | ||
* | ||
* @param userId The custom user id | ||
* @param userId - The custom user id | ||
*/ | ||
@@ -282,4 +283,4 @@ setUserId(userId: string): void; | ||
* | ||
* @param width screen resolution width | ||
* @param height screen resolution height | ||
* @param width - screen resolution width | ||
* @param height - screen resolution height | ||
*/ | ||
@@ -290,4 +291,4 @@ setScreenResolution(width: string, height: string): void; | ||
* | ||
* @param width viewport width | ||
* @param height viewport height | ||
* @param width - viewport width | ||
* @param height - viewport height | ||
*/ | ||
@@ -298,3 +299,3 @@ setViewport(width: string, height: string): void; | ||
* | ||
* @param depth A color depth value as string | ||
* @param depth - A color depth value as string | ||
*/ | ||
@@ -305,3 +306,3 @@ setColorDepth(depth: string): void; | ||
* | ||
* @param timezone A timezone string | ||
* @param timezone - A timezone string | ||
*/ | ||
@@ -312,3 +313,3 @@ setTimezone(timezone: string): void; | ||
* | ||
* @param lang A language string e.g. 'en-UK' | ||
* @param lang - A language string e.g. 'en-UK' | ||
*/ | ||
@@ -319,3 +320,3 @@ setLang(lang: string): void; | ||
* | ||
* @param ip An IP Address string | ||
* @param ip - An IP Address string | ||
*/ | ||
@@ -326,3 +327,3 @@ setIpAddress(ip: string): void; | ||
* | ||
* @param useragent A useragent string | ||
* @param useragent - A useragent string | ||
*/ | ||
@@ -332,3 +333,3 @@ setUseragent(useragent: string): void; | ||
* Adds contexts globally, contexts added here will be attached to all applicable events | ||
* @param contexts An array containing either contexts or a conditional contexts | ||
* @param contexts - An array containing either contexts or a conditional contexts | ||
*/ | ||
@@ -342,3 +343,3 @@ addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Removes previously added global context, performs a deep comparison of the contexts or conditional contexts | ||
* @param contexts An array containing either contexts or a conditional contexts | ||
* @param contexts - An array containing either contexts or a conditional contexts | ||
*/ | ||
@@ -348,3 +349,3 @@ removeGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Add a plugin into the plugin collection after Core has already been initialised | ||
* @param configuration The plugin to add | ||
* @param configuration - The plugin to add | ||
*/ | ||
@@ -374,5 +375,5 @@ addPlugin(configuration: CorePluginConfiguration): void; | ||
* | ||
* @param base64 Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins The core plugins to be processed with each event | ||
* @param callback Function applied to every payload dictionary object | ||
* @param base64 - Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins - The core plugins to be processed with each event | ||
* @param callback - Function applied to every payload dictionary object | ||
* @return Tracker core | ||
@@ -395,3 +396,3 @@ */ | ||
* | ||
* @param event Contains the properties and schema location for the event | ||
* @param event - Contains the properties and schema location for the event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -420,3 +421,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page View event | ||
* @param event - Contains the properties for the Page View event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -447,3 +448,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page Ping event | ||
* @param event - Contains the properties for the Page Ping event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -471,3 +472,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Structured event | ||
* @param event - Contains the properties for the Structured event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -506,3 +507,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transactoion event | ||
* @param event - Contains the properties for the Ecommerce Transactoion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -537,3 +538,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transaction Item event | ||
* @param event - Contains the properties for the Ecommerce Transaction Item event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -560,3 +561,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Screen View event. One or more properties must be included. | ||
* @param event - Contains the properties for the Screen View event. One or more properties must be included. | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -585,3 +586,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Link Click event | ||
* @param event - Contains the properties for the Link Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -622,3 +623,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Impression event | ||
* @param event - Contains the properties for the Ad Impression event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -661,3 +662,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Click event | ||
* @param event - Contains the properties for the Ad Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -700,3 +701,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Conversion event | ||
* @param event - Contains the properties for the Ad Conversion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -725,3 +726,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Social Interaction event | ||
* @param event - Contains the properties for the Social Interaction event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -754,3 +755,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Add To Cart event | ||
* @param event - Contains the properties for the Add To Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -783,3 +784,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Remove From Cart event | ||
* @param event - Contains the properties for the Remove From Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -814,3 +815,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Focus or Change Form event | ||
* @param event - Contains the properties for the Form Focus or Change Form event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -848,3 +849,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Submission event | ||
* @param event - Contains the properties for the Form Submission event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -871,3 +872,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Site Search event | ||
* @param event - Contains the properties for the Site Search event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -896,3 +897,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Withdrawn event | ||
* @param event - Contains the properties for the Consent Withdrawn event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -927,3 +928,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Granted event | ||
* @param event - Contains the properties for the Consent Granted event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -956,3 +957,3 @@ */ | ||
* to allow an additional context to be dynamically attached to the event | ||
* @param args - Object which contains the event information to help decide what should be included in the returned Context | ||
* @param args - - Object which contains the event information to help decide what should be included in the returned Context | ||
*/ | ||
@@ -963,3 +964,3 @@ type ContextGenerator = (args?: ContextEvent) => SelfDescribingJson; | ||
* to determine if the context associated with the filter should be attached to the event | ||
* @param args - Object that contains: event, eventType, eventSchema | ||
* @param args - - Object that contains: event, eventType, eventSchema | ||
*/ | ||
@@ -1016,3 +1017,3 @@ type ContextFilter = (args?: ContextEvent) => boolean; | ||
* Adds conditional or primitive global contexts | ||
* @param contexts An Array of either Conditional Contexts or Primitive Contexts | ||
* @param contexts - An Array of either Conditional Contexts or Primitive Contexts | ||
*/ | ||
@@ -1026,3 +1027,3 @@ addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Removes previously added global context, performs a deep comparison of the contexts or conditional contexts | ||
* @param contexts An Array of either Condition Contexts or Primitive Contexts | ||
* @param contexts - An Array of either Condition Contexts or Primitive Contexts | ||
*/ | ||
@@ -1032,3 +1033,3 @@ removeGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Returns all applicable global contexts for a specified event | ||
* @param event The event to check for applicable global contexts for | ||
* @param event - The event to check for applicable global contexts for | ||
*/ | ||
@@ -1052,4 +1053,4 @@ getApplicableContexts(event: PayloadBuilder): Array<SelfDescribingJson>; | ||
* | ||
* @param dynamicOrStaticContexts Array of custom context Objects or custom context generating functions | ||
* @param Parameters to pass to dynamic context callbacks | ||
* @param dynamicOrStaticContexts - Array of custom context Objects or custom context generating functions | ||
* @param Parameters - to pass to dynamic context callbacks | ||
* @returns An array of Self Describing JSON context | ||
@@ -1060,3 +1061,3 @@ */ | ||
* Slices a schema into its composite parts. Useful for ruleset filtering. | ||
* @param input A schema string | ||
* @param input - A schema string | ||
* @returns The vendor, schema name, major, minor and patch information of a schema string | ||
@@ -1067,3 +1068,3 @@ */ | ||
* Validates the vendor section of a schema string contains allowed wildcard values | ||
* @param parts Array of parts from a schema string | ||
* @param parts - Array of parts from a schema string | ||
* @returns Whether the vendor validation parts are a valid combination | ||
@@ -1074,3 +1075,3 @@ */ | ||
* Validates the vendor part of a schema string is valid for a rule set | ||
* @param input Vendor part of a schema string | ||
* @param input - Vendor part of a schema string | ||
* @returns Whether the vendor validation string is valid | ||
@@ -1081,3 +1082,3 @@ */ | ||
* Checks for validity of input and returns all the sections of a schema string that are used to match rules in a ruleset | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns The sections of a schema string that are used to match rules in a ruleset | ||
@@ -1088,3 +1089,3 @@ */ | ||
* Ensures the rules specified in a schema string of a ruleset are valid | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns if there rule is valid | ||
@@ -1095,3 +1096,3 @@ */ | ||
* Check if a variable is an Array containing only strings | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if the input is an array containing only strings | ||
@@ -1102,3 +1103,3 @@ */ | ||
* Validates whether a rule set is an array of valid ruleset strings | ||
* @param input The Array of rule set arguments | ||
* @param input - The Array of rule set arguments | ||
* @returns True is the input is an array of valid rules | ||
@@ -1109,3 +1110,3 @@ */ | ||
* Check if a variable is a valid, non-empty Self Describing JSON | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if a valid Self Describing JSON | ||
@@ -1116,3 +1117,3 @@ */ | ||
* Validates if the input object contains the expected properties of a ruleset | ||
* @param input The object containing a rule set | ||
* @param input - The object containing a rule set | ||
* @returns True if a valid rule set | ||
@@ -1123,3 +1124,3 @@ */ | ||
* Validates if the function can be a valid context generator function | ||
* @param input The function to be validated | ||
* @param input - The function to be validated | ||
*/ | ||
@@ -1129,3 +1130,3 @@ declare function isContextCallbackFunction(input: unknown): boolean; | ||
* Validates if the function can be a valid context primitive function or self describing json | ||
* @param input The function or orbject to be validated | ||
* @param input - The function or orbject to be validated | ||
* @returns True if either a Context Generator or Self Describing JSON | ||
@@ -1136,3 +1137,3 @@ */ | ||
* Validates if an array is a valid shape to be a Filter Provider | ||
* @param input The Array of Context filter callbacks | ||
* @param input - The Array of Context filter callbacks | ||
*/ | ||
@@ -1142,3 +1143,3 @@ declare function isFilterProvider(input: unknown): boolean; | ||
* Validates if an array is a valid shape to be an array of rule sets | ||
* @param input The Array of Rule Sets | ||
* @param input - The Array of Rule Sets | ||
*/ | ||
@@ -1148,3 +1149,3 @@ declare function isRuleSetProvider(input: unknown): boolean; | ||
* Checks if an input array is either a filter provider or a rule set provider | ||
* @param input An array of filter providers or rule set providers | ||
* @param input - An array of filter providers or rule set providers | ||
* @returns Whether the array is a valid {@link ConditionalContextProvider} | ||
@@ -1155,4 +1156,4 @@ */ | ||
* Checks if a given schema matches any rules within the provided rule set | ||
* @param ruleSet The rule set containing rules to match schema against | ||
* @param schema The schema to be matched against the rule set | ||
* @param ruleSet - The rule set containing rules to match schema against | ||
* @param schema - The schema to be matched against the rule set | ||
*/ | ||
@@ -1162,7 +1163,6 @@ declare function matchSchemaAgainstRuleSet(ruleSet: RuleSet, schema: string): boolean; | ||
* Checks if a given schema matches a specific rule from a rule set | ||
* @param rule The rule to match schema against | ||
* @param schema The schema to be matched against the rule | ||
* @param rule - The rule to match schema against | ||
* @param schema - The schema to be matched against the rule | ||
*/ | ||
declare function matchSchemaAgainstRule(rule: string, schema: string): boolean; | ||
export { ContextEvent, ContextGenerator, ContextFilter, ContextPrimitive, FilterProvider, RuleSet, RuleSetProvider, ConditionalContextProvider, DynamicContext, GlobalContexts, globalContexts, PluginContexts, pluginContexts, resolveDynamicContext, getSchemaParts, validateVendorParts, validateVendor, getRuleParts, isValidRule, isStringArray, isValidRuleSetArg, isSelfDescribingJson, isRuleSet, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isRuleSetProvider, isConditionalContextProvider, matchSchemaAgainstRuleSet, matchSchemaAgainstRule, CorePlugin, Payload, EventJsonWithKeys, EventJson, JsonProcessor, PayloadBuilder, payloadBuilder, payloadJsonProcessor, isNonEmptyJson, isJson, SelfDescribingJson, SelfDescribingJsonArray, Timestamp, TrueTimestamp, DeviceTimestamp, CommonEventProperties, TrackerCore, CoreConfiguration, CorePluginConfiguration, trackerCore, SelfDescribingEvent, buildSelfDescribingEvent, PageViewEvent, buildPageView, PagePingEvent, buildPagePing, StructuredEvent, buildStructEvent, EcommerceTransactionEvent, buildEcommerceTransaction, EcommerceTransactionItemEvent, buildEcommerceTransactionItem, ScreenViewEvent, buildScreenView, LinkClickEvent, buildLinkClick, AdImpressionEvent, buildAdImpression, AdClickEvent, buildAdClick, AdConversionEvent, buildAdConversion, SocialInteractionEvent, buildSocialInteraction, AddToCartEvent, buildAddToCart, RemoveFromCartEvent, buildRemoveFromCart, FormFocusOrChangeEvent, buildFormFocusOrChange, FormElement, FormSubmissionEvent, buildFormSubmission, SiteSearchEvent, buildSiteSearch, ConsentWithdrawnEvent, buildConsentWithdrawn, ConsentGrantedEvent, buildConsentGranted, LOG_LEVEL, Logger, LOG }; | ||
export { version } from "package"; | ||
export { version, ContextEvent, ContextGenerator, ContextFilter, ContextPrimitive, FilterProvider, RuleSet, RuleSetProvider, ConditionalContextProvider, DynamicContext, GlobalContexts, globalContexts, PluginContexts, pluginContexts, resolveDynamicContext, getSchemaParts, validateVendorParts, validateVendor, getRuleParts, isValidRule, isStringArray, isValidRuleSetArg, isSelfDescribingJson, isRuleSet, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isRuleSetProvider, isConditionalContextProvider, matchSchemaAgainstRuleSet, matchSchemaAgainstRule, CorePlugin, Payload, EventJsonWithKeys, EventJson, JsonProcessor, PayloadBuilder, payloadBuilder, payloadJsonProcessor, isNonEmptyJson, isJson, SelfDescribingJson, SelfDescribingJsonArray, Timestamp, TrueTimestamp, DeviceTimestamp, CommonEventProperties, TrackerCore, CoreConfiguration, CorePluginConfiguration, trackerCore, SelfDescribingEvent, buildSelfDescribingEvent, PageViewEvent, buildPageView, PagePingEvent, buildPagePing, StructuredEvent, buildStructEvent, EcommerceTransactionEvent, buildEcommerceTransaction, EcommerceTransactionItemEvent, buildEcommerceTransactionItem, ScreenViewEvent, buildScreenView, LinkClickEvent, buildLinkClick, AdImpressionEvent, buildAdImpression, AdClickEvent, buildAdClick, AdConversionEvent, buildAdConversion, SocialInteractionEvent, buildSocialInteraction, AddToCartEvent, buildAddToCart, RemoveFromCartEvent, buildRemoveFromCart, FormFocusOrChangeEvent, buildFormFocusOrChange, FormElement, FormSubmissionEvent, buildFormSubmission, SiteSearchEvent, buildSiteSearch, ConsentWithdrawnEvent, buildConsentWithdrawn, ConsentGrantedEvent, buildConsentGranted, LOG_LEVEL, Logger, LOG }; |
/*! | ||
* Core functionality for Snowplow JavaScript trackers v3.0.0-beta.5 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow JavaScript trackers v3.0.0 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -7,3 +7,3 @@ * Licensed under BSD-3-Clause | ||
"use strict";!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowTrackerCore={})}(this,(function(e){function n(e){if(!e)return e;var n=0,t=0,r=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(n++),a=e.charCodeAt(n++),i=e.charCodeAt(n++),c=o<<16|a<<8|i;o=c>>18&63,a=c>>12&63,i=c>>6&63,c&=63,r[t++]=S.charAt(o)+S.charAt(a)+S.charAt(i)+S.charAt(c)}while(n<e.length);n=r.join(""),e=((e=e.length%3)?n.slice(0,e-3):n)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function t(){var e,n={},t=[],r=[],a=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:a,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a(n,e[n])},addJson:function(e,n,a){a&&o(a)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:a},r.push(e),t.push(e))},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,r),n}}}function r(e){return function(t,r){for(var o=0;o<r.length;o++){var a=r[o],i=JSON.stringify(a.json);e?t.add(a.keyIfEncoded,n(i)):t.add(a.keyIfNotEncoded,i)}r.length=0}}function o(e){if(!a(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function a(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function i(e,n){for(var t=0,r=n.length,o=e.length;t<r;t++,o++)e[o]=n[t];return e}function c(){var e=[],n=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return n},addGlobalContexts:function(t){for(var r=[],o=[],a=0;a<t.length;a++){var i=t[a];C(i)?r.push(i):w(i)&&o.push(i)}e=e.concat(o),n=n.concat(r)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var r=function(t){C(t)?n=n.filter((function(e){return JSON.stringify(e)===JSON.stringify(t)})):w(t)&&(e=e.filter((function(e){return JSON.stringify(e)===JSON.stringify(t)})))},o=0;o<t.length;o++)r(t[o])},getApplicableContexts:function(t){e:{for(var r=0,o=t.getJson();r<o.length;r++){var a=o[r];if("ue_px"===a.keyIfEncoded&&"object"==typeof a.json.data&&"string"==typeof(a=a.json.data.schema)){r=a;break e}}r=""}a="string"==typeof(o=t.getPayload().e)?o:"",o=[];var i=P(e,t,a,r);return o.push.apply(o,i),t=function(e,n,t,r){var o;return e=k(e).map((function(e){e:{if(b(e)){var o=e[0],a=!1;try{a=o({event:n.getPayload(),eventType:t,eventSchema:r})}catch(e){a=!1}if(!0===a){e=P(e[1],n,t,r);break e}}else if(_(e)&&I(e[0],r)){e=P(e[1],n,t,r);break e}e=[]}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,a,r),o.push.apply(o,t),o}}}function s(e){return{addPluginContexts:function(n){var t=null!=n?n:[];return e.forEach((function(e){try{e.contexts&&t.push.apply(t,e.contexts())}catch(e){V.error("Error adding plugin contexts",e)}})),t}}}function l(e){if(null!==(e=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(e)))return e.slice(1,6)}function u(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var n=!1,t=0;for(e=e.slice(2);t<e.length;t++)if("*"===e[t])n=!0;else if(n)return!1;return!0}return 2==e.length}function d(e){return!!((e=e.split("."))&&1<e.length)&&u(e)}function f(e){if(null!==(e=/^iglu:((?:(?:[a-zA-Z0-9-_]+|\*).)+(?:[a-zA-Z0-9-_]+|\*))\/([a-zA-Z0-9-_.]+|\*)\/jsonschema\/([1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)$/.exec(e))&&d(e[1]))return e.slice(1,6)}function p(e){if(e=f(e)){var n=e[0];return 5===e.length&&d(n)}return!1}function m(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}function y(e){return m(e)?e.every((function(e){return p(e)})):"string"==typeof e&&p(e)}function v(e){return!!(o(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function g(e){var n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!y(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!y(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}function h(e){return"function"==typeof e&&1>=e.length}function w(e){return h(e)||v(e)}function b(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?h(e[0])&&e[1].every(w):h(e[0])&&w(e[1]))}function _(e){return!(!Array.isArray(e)||2!==e.length)&&(!!g(e[0])&&(Array.isArray(e[1])?e[1].every(w):w(e[1])))}function C(e){return b(e)||_(e)}function I(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return A(e,n)}))&&r++:"string"==typeof o&&A(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return A(e,n)}))&&t++:"string"==typeof o&&A(o,n)&&t++,0<r&&0===t}function A(e,n){if(!p(e))return!1;if(e=f(e),n=l(n),e&&n){if(!function(e,n){if(n=n.split("."),e=e.split("."),n&&e){if(n.length!==e.length)return!1;for(var t=0;t<e.length;t++)if(!x(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!x(e[t],n[t]))return!1;return!0}return!1}function x(e,n){return e&&n&&"*"===e||e===n}function k(e){return Array.isArray(e)?e:[e]}function P(e,n,t,r){var o;return e=k(e).map((function(e){e:if(v(e))e=[e];else{if(h(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(v)||v(o)){var a=o;break n}a=void 0;break n}catch(e){}a=void 0}if(v(a)){e=[a];break e}if(Array.isArray(a)){e=a;break e}}e=void 0}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function j(e){var n=e.event;return e={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:e=n.schema,data:n.data}},(n=t()).add("e","ue"),n.addJson("ue_px","ue_pr",e),n}function E(e,n){void 0===n&&(n={});var t,r={};for(t in e)(n[t]||null!==e[t]&&void 0!==e[t])&&(r[t]=e[t]);return r}var L,O,S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",T=function(){return(T=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};e.LOG_LEVEL=void 0,(L=e.LOG_LEVEL||(e.LOG_LEVEL={}))[L.none=0]="none",L[L.error=1]="error",L[L.warn=2]="warn",L[L.debug=3]="debug",L[L.info=4]="info";for(var V=function(n){return void 0===n&&(n=e.LOG_LEVEL.warn),{setLogLevel:function(t){n=e.LOG_LEVEL[t]?t:e.LOG_LEVEL.warn},warn:function(t,r){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];n>=e.LOG_LEVEL.warn&&"undefined"!=typeof console&&(a="Snowplow: "+t,r?console.warn.apply(console,i([a+"\n",r],o)):console.warn.apply(console,i([a],o)))},error:function(t,r){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];n>=e.LOG_LEVEL.error&&"undefined"!=typeof console&&(a="Snowplow: "+t+"\n",r?console.error.apply(console,i([a+"\n",r],o)):console.error.apply(console,i([a],o)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];n>=e.LOG_LEVEL.debug&&"undefined"!=typeof console&&console.debug.apply(console,i(["Snowplow: "+t],r))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];n>=e.LOG_LEVEL.info&&"undefined"!=typeof console&&console.info.apply(console,i(["Snowplow: "+t],r))}}}(),N=(O=void 0,function(e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=Array(16);e.exports=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}}(O={exports:{}}),O.exports),G=[],R=0;256>R;++R)G[R]=(R+256).toString(16).substr(1);var J,U,z=function(e,n){return n=n||0,[G[e[n++]],G[e[n++]],G[e[n++]],G[e[n++]],"-",G[e[n++]],G[e[n++]],"-",G[e[n++]],G[e[n++]],"-",G[e[n++]],G[e[n++]],"-",G[e[n++]],G[e[n++]],G[e[n++]],G[e[n++]],G[e[n++]],G[e[n++]]].join("")},D=0,q=0,M=function(e,n,t){if(t=n&&t||0,"string"==typeof e&&(n="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||N)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var r=0;16>r;++r)n[t+r]=e[r];return n||z(e)};M.v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||J,a=void 0!==e.clockseq?e.clockseq:U;if(null==o||null==a){var i=N();null==o&&(o=J=[1|i[0],i[1],i[2],i[3],i[4],i[5]]),null==a&&(a=U=16383&(i[6]<<8|i[7]))}i=void 0!==e.msecs?e.msecs:(new Date).getTime();var c=void 0!==e.nsecs?e.nsecs:q+1,s=i-D+(c-q)/1e4;if(0>s&&void 0===e.clockseq&&(a=a+1&16383),(0>s||i>D)&&void 0===e.nsecs&&(c=0),1e4<=c)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(D=i,q=c,U=a,e=(1e4*(268435455&(i+=122192928e5))+c)%4294967296,r[t++]=e>>>24&255,r[t++]=e>>>16&255,r[t++]=e>>>8&255,r[t++]=255&e,e=i/4294967296*1e4&268435455,r[t++]=e>>>8&255,r[t++]=255&e,r[t++]=e>>>24&15|16,r[t++]=e>>>16&255,r[t++]=a>>>8|128,r[t++]=255&a,a=0;6>a;++a)r[t+a]=o[a];return n||z(r)},M.v4=M,e.LOG=V,e.buildAdClick=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/ad_click/jsonschema/1-0-0",data:E({targetUrl:e.targetUrl,clickId:e.clickId,costModel:e.costModel,cost:e.cost,bannerId:e.bannerId,zoneId:e.zoneId,impressionId:e.impressionId,advertiserId:e.advertiserId,campaignId:e.campaignId})}})},e.buildAdConversion=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/ad_conversion/jsonschema/1-0-0",data:E({conversionId:e.conversionId,costModel:e.costModel,cost:e.cost,category:e.category,action:e.action,property:e.property,initialValue:e.initialValue,advertiserId:e.advertiserId,campaignId:e.campaignId})}})},e.buildAdImpression=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/ad_impression/jsonschema/1-0-0",data:E({impressionId:e.impressionId,costModel:e.costModel,cost:e.cost,targetUrl:e.targetUrl,bannerId:e.bannerId,zoneId:e.zoneId,advertiserId:e.advertiserId,campaignId:e.campaignId})}})},e.buildAddToCart=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/add_to_cart/jsonschema/1-0-0",data:E({sku:e.sku,quantity:e.quantity,name:e.name,category:e.category,unitPrice:e.unitPrice,currency:e.currency})}})},e.buildConsentGranted=function(e){var n=e.expiry;return e={schema:"iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0",data:E({id:e.id,version:e.version,name:e.name,description:e.description})},{event:j({event:{schema:"iglu:com.snowplowanalytics.snowplow/consent_granted/jsonschema/1-0-0",data:E({expiry:n})}}),context:[e]}},e.buildConsentWithdrawn=function(e){var n=e.all;return e={schema:"iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0",data:E({id:e.id,version:e.version,name:e.name,description:e.description})},{event:j({event:{schema:"iglu:com.snowplowanalytics.snowplow/consent_withdrawn/jsonschema/1-0-0",data:E({all:n})}}),context:[e]}},e.buildEcommerceTransaction=function(e){var n=e.orderId,r=e.total,o=e.affiliation,a=e.tax,i=e.shipping,c=e.city,s=e.state,l=e.country;e=e.currency;var u=t();return u.add("e","tr"),u.add("tr_id",n),u.add("tr_af",o),u.add("tr_tt",r),u.add("tr_tx",a),u.add("tr_sh",i),u.add("tr_ci",c),u.add("tr_st",s),u.add("tr_co",l),u.add("tr_cu",e),u},e.buildEcommerceTransactionItem=function(e){var n=e.orderId,r=e.sku,o=e.price,a=e.name,i=e.category,c=e.quantity;e=e.currency;var s=t();return s.add("e","ti"),s.add("ti_id",n),s.add("ti_sk",r),s.add("ti_nm",a),s.add("ti_ca",i),s.add("ti_pr",o),s.add("ti_qu",c),s.add("ti_cu",e),s},e.buildFormFocusOrChange=function(e){var n="",t=e.schema,r=e.type;return e={formId:e.formId,elementId:e.elementId,nodeName:e.nodeName,elementClasses:e.elementClasses,value:e.value},"change_form"===t?(n="iglu:com.snowplowanalytics.snowplow/change_form/jsonschema/1-0-0",e.type=r):"focus_form"===t&&(n="iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0",e.elementType=r),j({event:{schema:n,data:E(e,{value:!0})}})},e.buildFormSubmission=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/submit_form/jsonschema/1-0-0",data:E({formId:e.formId,formClasses:e.formClasses,elements:e.elements})}})},e.buildLinkClick=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1",data:E({targetUrl:e.targetUrl,elementId:e.elementId,elementClasses:e.elementClasses,elementTarget:e.elementTarget,elementContent:e.elementContent})}})},e.buildPagePing=function(e){var n=e.pageUrl,r=e.pageTitle,o=e.referrer,a=e.minXOffset,i=e.maxXOffset,c=e.minYOffset;e=e.maxYOffset;var s=t();return s.add("e","pp"),s.add("url",n),s.add("page",r),s.add("refr",o),a&&!isNaN(Number(a))&&s.add("pp_mix",a.toString()),i&&!isNaN(Number(i))&&s.add("pp_max",i.toString()),c&&!isNaN(Number(c))&&s.add("pp_miy",c.toString()),e&&!isNaN(Number(e))&&s.add("pp_may",e.toString()),s},e.buildPageView=function(e){var n=e.pageUrl,r=e.pageTitle;e=e.referrer;var o=t();return o.add("e","pv"),o.add("url",n),o.add("page",r),o.add("refr",e),o},e.buildRemoveFromCart=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/remove_from_cart/jsonschema/1-0-0",data:E({sku:e.sku,quantity:e.quantity,name:e.name,category:e.category,unitPrice:e.unitPrice,currency:e.currency})}})},e.buildScreenView=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0",data:E({name:e.name,id:e.id})}})},e.buildSelfDescribingEvent=j,e.buildSiteSearch=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0",data:E({terms:e.terms,filters:e.filters,totalResults:e.totalResults,pageResults:e.pageResults})}})},e.buildSocialInteraction=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/social_interaction/jsonschema/1-0-0",data:E({action:e.action,network:e.network,target:e.target})}})},e.buildStructEvent=function(e){var n=e.category,r=e.action,o=e.label,a=e.property;e=e.value;var i=t();return i.add("e","se"),i.add("se_ca",n),i.add("se_ac",r),i.add("se_la",o),i.add("se_pr",a),i.add("se_va",null==e?void 0:e.toString()),i},e.getRuleParts=f,e.getSchemaParts=l,e.globalContexts=c,e.isConditionalContextProvider=C,e.isContextCallbackFunction=h,e.isContextPrimitive=w,e.isFilterProvider=b,e.isJson=a,e.isNonEmptyJson=o,e.isRuleSet=g,e.isRuleSetProvider=_,e.isSelfDescribingJson=v,e.isStringArray=m,e.isValidRule=p,e.isValidRuleSetArg=y,e.matchSchemaAgainstRule=A,e.matchSchemaAgainstRuleSet=I,e.payloadBuilder=t,e.payloadJsonProcessor=r,e.pluginContexts=s,e.resolveDynamicContext=function(e){for(var n,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return null!==(n=null==e?void 0:e.map((function(e){if("function"!=typeof e)return e;try{return e.apply(void 0,t)}catch(e){}})).filter(Boolean))&&void 0!==n?n:[]},e.trackerCore=function(e){void 0===e&&(e={});var n=e.base64,t=e.corePlugins,o=null!=t?t:[];e=function(e,n,t){function o(e,n){e=l.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}var i=s(n),l=c(),u=e,d={};return{track:function(e,a,c){e.withJsonProcessor(r(u)),e.add("eid",M.v4()),e.addDict(d),c=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(c),e.add(c.type,c.value.toString()),void 0!==(a=(a=o(e,i.addPluginContexts(a)))&&a.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:a}:void 0)&&e.addJson("cx","co",a),n.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){V.error("Plugin beforeTrack",e)}})),"function"==typeof t&&t(e);var s=e.build();return n.forEach((function(e){try{e.afterTrack&&e.afterTrack(s)}catch(e){V.error("Plugin afterTrack",e)}})),s},addPayloadPair:function(e,n){d[e]=n},getBase64Encoding:function(){return u},setBase64Encoding:function(e){u=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(d[n]=e[n])},resetPayloadPairs:function(e){d=a(e)?e:{}},setTrackerVersion:function(e){d.tv=e},setTrackerNamespace:function(e){d.tna=e},setAppId:function(e){d.aid=e},setPlatform:function(e){d.p=e},setUserId:function(e){d.uid=e},setScreenResolution:function(e,n){d.res=e+"x"+n},setViewport:function(e,n){d.vp=e+"x"+n},setColorDepth:function(e){d.cd=e},setTimezone:function(e){d.tz=e},setLang:function(e){d.lang=e},setIpAddress:function(e){d.ip=e},setUseragent:function(e){d.ua=e},addGlobalContexts:function(e){l.addGlobalContexts(e)},clearGlobalContexts:function(){l.clearGlobalContexts()},removeGlobalContexts:function(e){l.removeGlobalContexts(e)}}}(null==n||n,o,e.callback);var i=T(T({},e),{addPlugin:function(e){var n,t;e=e.plugin,o.push(e),null===(n=e.logger)||void 0===n||n.call(e,V),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,i)}});return null==o||o.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,V),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,i)})),i},e.validateVendor=d,e.validateVendorParts=u,e.version="3.0.0-beta.5",Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowTrackerCore={})}(this,(function(e){function n(e){if(!e)return e;var n=0,t=0,r=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(n++),a=e.charCodeAt(n++),i=e.charCodeAt(n++),c=o<<16|a<<8|i;o=c>>18&63,a=c>>12&63,i=c>>6&63,c&=63,r[t++]=S.charAt(o)+S.charAt(a)+S.charAt(i)+S.charAt(c)}while(n<e.length);n=r.join(""),e=((e=e.length%3)?n.slice(0,e-3):n)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function t(){var e,n={},t=[],r=[],a=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:a,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a(n,e[n])},addJson:function(e,n,a){a&&o(a)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:a},r.push(e),t.push(e))},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,r),n}}}function r(e){return function(t,r){for(var o=0;o<r.length;o++){var a=r[o],i=JSON.stringify(a.json);e?t.add(a.keyIfEncoded,n(i)):t.add(a.keyIfNotEncoded,i)}r.length=0}}function o(e){if(!a(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function a(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function i(e,n){for(var t=0,r=n.length,o=e.length;t<r;t++,o++)e[o]=n[t];return e}function c(){var e=[],n=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return n},addGlobalContexts:function(t){for(var r=[],o=[],a=0;a<t.length;a++){var i=t[a];C(i)?r.push(i):w(i)&&o.push(i)}e=e.concat(o),n=n.concat(r)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var r=function(t){C(t)?n=n.filter((function(e){return JSON.stringify(e)===JSON.stringify(t)})):w(t)&&(e=e.filter((function(e){return JSON.stringify(e)===JSON.stringify(t)})))},o=0;o<t.length;o++)r(t[o])},getApplicableContexts:function(t){e:{for(var r=0,o=t.getJson();r<o.length;r++){var a=o[r];if("ue_px"===a.keyIfEncoded&&"object"==typeof a.json.data&&"string"==typeof(a=a.json.data.schema)){r=a;break e}}r=""}a="string"==typeof(o=t.getPayload().e)?o:"",o=[];var i=P(e,t,a,r);return o.push.apply(o,i),t=function(e,n,t,r){var o;return e=k(e).map((function(e){e:{if(b(e)){var o=e[0],a=!1;try{a=o({event:n.getPayload(),eventType:t,eventSchema:r})}catch(e){a=!1}if(!0===a){e=P(e[1],n,t,r);break e}}else if(_(e)&&I(e[0],r)){e=P(e[1],n,t,r);break e}e=[]}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,a,r),o.push.apply(o,t),o}}}function s(e){return{addPluginContexts:function(n){var t=null!=n?n:[];return e.forEach((function(e){try{e.contexts&&t.push.apply(t,e.contexts())}catch(e){V.error("Error adding plugin contexts",e)}})),t}}}function l(e){if(null!==(e=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(e)))return e.slice(1,6)}function u(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var n=!1,t=0;for(e=e.slice(2);t<e.length;t++)if("*"===e[t])n=!0;else if(n)return!1;return!0}return 2==e.length}function d(e){return!!((e=e.split("."))&&1<e.length)&&u(e)}function f(e){if(null!==(e=/^iglu:((?:(?:[a-zA-Z0-9-_]+|\*).)+(?:[a-zA-Z0-9-_]+|\*))\/([a-zA-Z0-9-_.]+|\*)\/jsonschema\/([1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)$/.exec(e))&&d(e[1]))return e.slice(1,6)}function p(e){if(e=f(e)){var n=e[0];return 5===e.length&&d(n)}return!1}function m(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}function y(e){return m(e)?e.every((function(e){return p(e)})):"string"==typeof e&&p(e)}function v(e){return!!(o(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function g(e){var n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!y(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!y(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}function h(e){return"function"==typeof e&&1>=e.length}function w(e){return h(e)||v(e)}function b(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?h(e[0])&&e[1].every(w):h(e[0])&&w(e[1]))}function _(e){return!(!Array.isArray(e)||2!==e.length)&&(!!g(e[0])&&(Array.isArray(e[1])?e[1].every(w):w(e[1])))}function C(e){return b(e)||_(e)}function I(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return A(e,n)}))&&r++:"string"==typeof o&&A(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return A(e,n)}))&&t++:"string"==typeof o&&A(o,n)&&t++,0<r&&0===t}function A(e,n){if(!p(e))return!1;if(e=f(e),n=l(n),e&&n){if(!function(e,n){if(n=n.split("."),e=e.split("."),n&&e){if(n.length!==e.length)return!1;for(var t=0;t<e.length;t++)if(!x(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!x(e[t],n[t]))return!1;return!0}return!1}function x(e,n){return e&&n&&"*"===e||e===n}function k(e){return Array.isArray(e)?e:[e]}function P(e,n,t,r){var o;return e=k(e).map((function(e){e:if(v(e))e=[e];else{if(h(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(v)||v(o)){var a=o;break n}a=void 0;break n}catch(e){}a=void 0}if(v(a)){e=[a];break e}if(Array.isArray(a)){e=a;break e}}e=void 0}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function j(e){var n=e.event;return e={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:e=n.schema,data:n.data}},(n=t()).add("e","ue"),n.addJson("ue_px","ue_pr",e),n}function E(e,n){void 0===n&&(n={});var t,r={};for(t in e)(n[t]||null!==e[t]&&void 0!==e[t])&&(r[t]=e[t]);return r}var L,O,S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",T=function(){return(T=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};e.LOG_LEVEL=void 0,(L=e.LOG_LEVEL||(e.LOG_LEVEL={}))[L.none=0]="none",L[L.error=1]="error",L[L.warn=2]="warn",L[L.debug=3]="debug",L[L.info=4]="info";for(var V=function(n){return void 0===n&&(n=e.LOG_LEVEL.warn),{setLogLevel:function(t){n=e.LOG_LEVEL[t]?t:e.LOG_LEVEL.warn},warn:function(t,r){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];n>=e.LOG_LEVEL.warn&&"undefined"!=typeof console&&(a="Snowplow: "+t,r?console.warn.apply(console,i([a+"\n",r],o)):console.warn.apply(console,i([a],o)))},error:function(t,r){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];n>=e.LOG_LEVEL.error&&"undefined"!=typeof console&&(a="Snowplow: "+t+"\n",r?console.error.apply(console,i([a+"\n",r],o)):console.error.apply(console,i([a],o)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];n>=e.LOG_LEVEL.debug&&"undefined"!=typeof console&&console.debug.apply(console,i(["Snowplow: "+t],r))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];n>=e.LOG_LEVEL.info&&"undefined"!=typeof console&&console.info.apply(console,i(["Snowplow: "+t],r))}}}(),N=(O=void 0,function(e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=Array(16);e.exports=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}}(O={exports:{}}),O.exports),G=[],R=0;256>R;++R)G[R]=(R+256).toString(16).substr(1);var J,U,z=function(e,n){return n=n||0,[G[e[n++]],G[e[n++]],G[e[n++]],G[e[n++]],"-",G[e[n++]],G[e[n++]],"-",G[e[n++]],G[e[n++]],"-",G[e[n++]],G[e[n++]],"-",G[e[n++]],G[e[n++]],G[e[n++]],G[e[n++]],G[e[n++]],G[e[n++]]].join("")},D=0,q=0,M=function(e,n,t){if(t=n&&t||0,"string"==typeof e&&(n="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||N)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var r=0;16>r;++r)n[t+r]=e[r];return n||z(e)};M.v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||J,a=void 0!==e.clockseq?e.clockseq:U;if(null==o||null==a){var i=N();null==o&&(o=J=[1|i[0],i[1],i[2],i[3],i[4],i[5]]),null==a&&(a=U=16383&(i[6]<<8|i[7]))}i=void 0!==e.msecs?e.msecs:(new Date).getTime();var c=void 0!==e.nsecs?e.nsecs:q+1,s=i-D+(c-q)/1e4;if(0>s&&void 0===e.clockseq&&(a=a+1&16383),(0>s||i>D)&&void 0===e.nsecs&&(c=0),1e4<=c)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(D=i,q=c,U=a,e=(1e4*(268435455&(i+=122192928e5))+c)%4294967296,r[t++]=e>>>24&255,r[t++]=e>>>16&255,r[t++]=e>>>8&255,r[t++]=255&e,e=i/4294967296*1e4&268435455,r[t++]=e>>>8&255,r[t++]=255&e,r[t++]=e>>>24&15|16,r[t++]=e>>>16&255,r[t++]=a>>>8|128,r[t++]=255&a,a=0;6>a;++a)r[t+a]=o[a];return n||z(r)},M.v4=M,e.LOG=V,e.buildAdClick=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/ad_click/jsonschema/1-0-0",data:E({targetUrl:e.targetUrl,clickId:e.clickId,costModel:e.costModel,cost:e.cost,bannerId:e.bannerId,zoneId:e.zoneId,impressionId:e.impressionId,advertiserId:e.advertiserId,campaignId:e.campaignId})}})},e.buildAdConversion=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/ad_conversion/jsonschema/1-0-0",data:E({conversionId:e.conversionId,costModel:e.costModel,cost:e.cost,category:e.category,action:e.action,property:e.property,initialValue:e.initialValue,advertiserId:e.advertiserId,campaignId:e.campaignId})}})},e.buildAdImpression=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/ad_impression/jsonschema/1-0-0",data:E({impressionId:e.impressionId,costModel:e.costModel,cost:e.cost,targetUrl:e.targetUrl,bannerId:e.bannerId,zoneId:e.zoneId,advertiserId:e.advertiserId,campaignId:e.campaignId})}})},e.buildAddToCart=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/add_to_cart/jsonschema/1-0-0",data:E({sku:e.sku,quantity:e.quantity,name:e.name,category:e.category,unitPrice:e.unitPrice,currency:e.currency})}})},e.buildConsentGranted=function(e){var n=e.expiry;return e={schema:"iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0",data:E({id:e.id,version:e.version,name:e.name,description:e.description})},{event:j({event:{schema:"iglu:com.snowplowanalytics.snowplow/consent_granted/jsonschema/1-0-0",data:E({expiry:n})}}),context:[e]}},e.buildConsentWithdrawn=function(e){var n=e.all;return e={schema:"iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0",data:E({id:e.id,version:e.version,name:e.name,description:e.description})},{event:j({event:{schema:"iglu:com.snowplowanalytics.snowplow/consent_withdrawn/jsonschema/1-0-0",data:E({all:n})}}),context:[e]}},e.buildEcommerceTransaction=function(e){var n=e.orderId,r=e.total,o=e.affiliation,a=e.tax,i=e.shipping,c=e.city,s=e.state,l=e.country;e=e.currency;var u=t();return u.add("e","tr"),u.add("tr_id",n),u.add("tr_af",o),u.add("tr_tt",r),u.add("tr_tx",a),u.add("tr_sh",i),u.add("tr_ci",c),u.add("tr_st",s),u.add("tr_co",l),u.add("tr_cu",e),u},e.buildEcommerceTransactionItem=function(e){var n=e.orderId,r=e.sku,o=e.price,a=e.name,i=e.category,c=e.quantity;e=e.currency;var s=t();return s.add("e","ti"),s.add("ti_id",n),s.add("ti_sk",r),s.add("ti_nm",a),s.add("ti_ca",i),s.add("ti_pr",o),s.add("ti_qu",c),s.add("ti_cu",e),s},e.buildFormFocusOrChange=function(e){var n="",t=e.schema,r=e.type;return e={formId:e.formId,elementId:e.elementId,nodeName:e.nodeName,elementClasses:e.elementClasses,value:e.value},"change_form"===t?(n="iglu:com.snowplowanalytics.snowplow/change_form/jsonschema/1-0-0",e.type=r):"focus_form"===t&&(n="iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0",e.elementType=r),j({event:{schema:n,data:E(e,{value:!0})}})},e.buildFormSubmission=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/submit_form/jsonschema/1-0-0",data:E({formId:e.formId,formClasses:e.formClasses,elements:e.elements})}})},e.buildLinkClick=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1",data:E({targetUrl:e.targetUrl,elementId:e.elementId,elementClasses:e.elementClasses,elementTarget:e.elementTarget,elementContent:e.elementContent})}})},e.buildPagePing=function(e){var n=e.pageUrl,r=e.pageTitle,o=e.referrer,a=e.minXOffset,i=e.maxXOffset,c=e.minYOffset;e=e.maxYOffset;var s=t();return s.add("e","pp"),s.add("url",n),s.add("page",r),s.add("refr",o),a&&!isNaN(Number(a))&&s.add("pp_mix",a.toString()),i&&!isNaN(Number(i))&&s.add("pp_max",i.toString()),c&&!isNaN(Number(c))&&s.add("pp_miy",c.toString()),e&&!isNaN(Number(e))&&s.add("pp_may",e.toString()),s},e.buildPageView=function(e){var n=e.pageUrl,r=e.pageTitle;e=e.referrer;var o=t();return o.add("e","pv"),o.add("url",n),o.add("page",r),o.add("refr",e),o},e.buildRemoveFromCart=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/remove_from_cart/jsonschema/1-0-0",data:E({sku:e.sku,quantity:e.quantity,name:e.name,category:e.category,unitPrice:e.unitPrice,currency:e.currency})}})},e.buildScreenView=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0",data:E({name:e.name,id:e.id})}})},e.buildSelfDescribingEvent=j,e.buildSiteSearch=function(e){return j({event:{schema:"iglu:com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0",data:E({terms:e.terms,filters:e.filters,totalResults:e.totalResults,pageResults:e.pageResults})}})},e.buildSocialInteraction=function(e){return j({event:e={schema:"iglu:com.snowplowanalytics.snowplow/social_interaction/jsonschema/1-0-0",data:E({action:e.action,network:e.network,target:e.target})}})},e.buildStructEvent=function(e){var n=e.category,r=e.action,o=e.label,a=e.property;e=e.value;var i=t();return i.add("e","se"),i.add("se_ca",n),i.add("se_ac",r),i.add("se_la",o),i.add("se_pr",a),i.add("se_va",null==e?void 0:e.toString()),i},e.getRuleParts=f,e.getSchemaParts=l,e.globalContexts=c,e.isConditionalContextProvider=C,e.isContextCallbackFunction=h,e.isContextPrimitive=w,e.isFilterProvider=b,e.isJson=a,e.isNonEmptyJson=o,e.isRuleSet=g,e.isRuleSetProvider=_,e.isSelfDescribingJson=v,e.isStringArray=m,e.isValidRule=p,e.isValidRuleSetArg=y,e.matchSchemaAgainstRule=A,e.matchSchemaAgainstRuleSet=I,e.payloadBuilder=t,e.payloadJsonProcessor=r,e.pluginContexts=s,e.resolveDynamicContext=function(e){for(var n,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return null!==(n=null==e?void 0:e.map((function(e){if("function"!=typeof e)return e;try{return e.apply(void 0,t)}catch(e){}})).filter(Boolean))&&void 0!==n?n:[]},e.trackerCore=function(e){void 0===e&&(e={});var n=e.base64,t=e.corePlugins,o=null!=t?t:[];e=function(e,n,t){function o(e,n){e=l.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}var i=s(n),l=c(),u=e,d={};return{track:function(e,a,c){e.withJsonProcessor(r(u)),e.add("eid",M.v4()),e.addDict(d),c=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(c),e.add(c.type,c.value.toString()),void 0!==(a=(a=o(e,i.addPluginContexts(a)))&&a.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:a}:void 0)&&e.addJson("cx","co",a),n.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){V.error("Plugin beforeTrack",e)}})),"function"==typeof t&&t(e);var s=e.build();return n.forEach((function(e){try{e.afterTrack&&e.afterTrack(s)}catch(e){V.error("Plugin afterTrack",e)}})),s},addPayloadPair:function(e,n){d[e]=n},getBase64Encoding:function(){return u},setBase64Encoding:function(e){u=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(d[n]=e[n])},resetPayloadPairs:function(e){d=a(e)?e:{}},setTrackerVersion:function(e){d.tv=e},setTrackerNamespace:function(e){d.tna=e},setAppId:function(e){d.aid=e},setPlatform:function(e){d.p=e},setUserId:function(e){d.uid=e},setScreenResolution:function(e,n){d.res=e+"x"+n},setViewport:function(e,n){d.vp=e+"x"+n},setColorDepth:function(e){d.cd=e},setTimezone:function(e){d.tz=e},setLang:function(e){d.lang=e},setIpAddress:function(e){d.ip=e},setUseragent:function(e){d.ua=e},addGlobalContexts:function(e){l.addGlobalContexts(e)},clearGlobalContexts:function(){l.clearGlobalContexts()},removeGlobalContexts:function(e){l.removeGlobalContexts(e)}}}(null==n||n,o,e.callback);var i=T(T({},e),{addPlugin:function(e){var n,t;e=e.plugin,o.push(e),null===(n=e.logger)||void 0===n||n.call(e,V),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,i)}});return null==o||o.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,V),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,i)})),i},e.validateVendor=d,e.validateVendorParts=u,e.version="3.0.0",Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.min.js.map |
@@ -0,1 +1,2 @@ | ||
declare const version: string; | ||
/** | ||
@@ -27,4 +28,4 @@ * Type for a Payload dictionary | ||
* Adds an entry to the Payload | ||
* @param key Key for Payload dictionary entry | ||
* @param value Value for Payload dictionaty entry | ||
* @param key - Key for Payload dictionary entry | ||
* @param value - Value for Payload dictionaty entry | ||
*/ | ||
@@ -34,3 +35,3 @@ add: (key: string, value: unknown) => void; | ||
* Merges a payload into the existing payload | ||
* @param dict The payload to merge | ||
* @param dict - The payload to merge | ||
*/ | ||
@@ -40,5 +41,5 @@ addDict: (dict: Payload) => void; | ||
* Caches a JSON object to be added to payload on build | ||
* @param keyIfEncoded key if base64 encoding is enabled | ||
* @param keyIfNotEncoded key if base64 encoding is disabled | ||
* @param json The json to be stringified and added to the payload | ||
* @param keyIfEncoded - key if base64 encoding is enabled | ||
* @param keyIfNotEncoded - key if base64 encoding is disabled | ||
* @param json - The json to be stringified and added to the payload | ||
*/ | ||
@@ -57,3 +58,3 @@ addJson: (keyIfEncoded: string, keyIfNotEncoded: string, json: Record<string, unknown>) => void; | ||
* the payload to process the JSON which has been added to this payload | ||
* @param jsonProcessor The JsonProcessor function for this builder | ||
* @param jsonProcessor - The JsonProcessor function for this builder | ||
*/ | ||
@@ -63,3 +64,3 @@ withJsonProcessor: (jsonProcessor: JsonProcessor) => void; | ||
* Builds and returns the Payload | ||
* @param base64Encode configures if unprocessed, cached json should be encoded | ||
* @param base64Encode - configures if unprocessed, cached json should be encoded | ||
*/ | ||
@@ -78,3 +79,3 @@ build: () => Payload; | ||
* Is property a non-empty JSON? | ||
* @param property Checks if object is non-empty json | ||
* @param property - Checks if object is non-empty json | ||
*/ | ||
@@ -84,3 +85,3 @@ declare function isNonEmptyJson(property?: Record<string, unknown>): boolean; | ||
* Is property a JSON? | ||
* @param property Checks if object is json | ||
* @param property - Checks if object is json | ||
*/ | ||
@@ -116,3 +117,3 @@ declare function isJson(property?: Record<string, unknown>): boolean; | ||
* Called just before the trackerCore callback fires | ||
* @param payloadBuilder The payloadBuilder which will be sent to the callback, can be modified | ||
* @param payloadBuilder - The payloadBuilder which will be sent to the callback, can be modified | ||
*/ | ||
@@ -122,3 +123,3 @@ beforeTrack?: (payloadBuilder: PayloadBuilder) => void; | ||
* Called just after the trackerCore callback fires | ||
* @param payload The final built payload | ||
* @param payload - The final built payload | ||
*/ | ||
@@ -201,5 +202,5 @@ afterTrack?: (payload: Payload) => void; | ||
* | ||
* @param pb Payload | ||
* @param context Custom contexts relating to the event | ||
* @param timestamp Timestamp of the event | ||
* @param pb - Payload | ||
* @param context - Custom contexts relating to the event | ||
* @param timestamp - Timestamp of the event | ||
* @return Payload after the callback is applied | ||
@@ -214,4 +215,4 @@ */ | ||
* | ||
* @param key Field name | ||
* @param value Field value | ||
* @param key - Field name | ||
* @param value - Field value | ||
*/ | ||
@@ -226,3 +227,3 @@ addPayloadPair: (key: string, value: string | number) => void; | ||
* | ||
* @param encode Whether to encode payload | ||
* @param encode - Whether to encode payload | ||
*/ | ||
@@ -233,3 +234,3 @@ setBase64Encoding(encode: boolean): void; | ||
* | ||
* @param dict Adds a new payload dictionary to the existing one | ||
* @param dict - Adds a new payload dictionary to the existing one | ||
*/ | ||
@@ -240,3 +241,3 @@ addPayloadDict(dict: Payload): void; | ||
* | ||
* @param dict Resets all current payload pairs with a new dictionary of pairs | ||
* @param dict - Resets all current payload pairs with a new dictionary of pairs | ||
*/ | ||
@@ -247,3 +248,3 @@ resetPayloadPairs(dict: Payload): void; | ||
* | ||
* @param version The version of the current tracker | ||
* @param version - The version of the current tracker | ||
*/ | ||
@@ -254,3 +255,3 @@ setTrackerVersion(version: string): void; | ||
* | ||
* @param name The trackers namespace | ||
* @param name - The trackers namespace | ||
*/ | ||
@@ -261,3 +262,3 @@ setTrackerNamespace(name: string): void; | ||
* | ||
* @param appId An application ID which identifies the current application | ||
* @param appId - An application ID which identifies the current application | ||
*/ | ||
@@ -268,3 +269,3 @@ setAppId(appId: string): void; | ||
* | ||
* @param value A valid Snowplow platform value | ||
* @param value - A valid Snowplow platform value | ||
*/ | ||
@@ -275,3 +276,3 @@ setPlatform(value: string): void; | ||
* | ||
* @param userId The custom user id | ||
* @param userId - The custom user id | ||
*/ | ||
@@ -282,4 +283,4 @@ setUserId(userId: string): void; | ||
* | ||
* @param width screen resolution width | ||
* @param height screen resolution height | ||
* @param width - screen resolution width | ||
* @param height - screen resolution height | ||
*/ | ||
@@ -290,4 +291,4 @@ setScreenResolution(width: string, height: string): void; | ||
* | ||
* @param width viewport width | ||
* @param height viewport height | ||
* @param width - viewport width | ||
* @param height - viewport height | ||
*/ | ||
@@ -298,3 +299,3 @@ setViewport(width: string, height: string): void; | ||
* | ||
* @param depth A color depth value as string | ||
* @param depth - A color depth value as string | ||
*/ | ||
@@ -305,3 +306,3 @@ setColorDepth(depth: string): void; | ||
* | ||
* @param timezone A timezone string | ||
* @param timezone - A timezone string | ||
*/ | ||
@@ -312,3 +313,3 @@ setTimezone(timezone: string): void; | ||
* | ||
* @param lang A language string e.g. 'en-UK' | ||
* @param lang - A language string e.g. 'en-UK' | ||
*/ | ||
@@ -319,3 +320,3 @@ setLang(lang: string): void; | ||
* | ||
* @param ip An IP Address string | ||
* @param ip - An IP Address string | ||
*/ | ||
@@ -326,3 +327,3 @@ setIpAddress(ip: string): void; | ||
* | ||
* @param useragent A useragent string | ||
* @param useragent - A useragent string | ||
*/ | ||
@@ -332,3 +333,3 @@ setUseragent(useragent: string): void; | ||
* Adds contexts globally, contexts added here will be attached to all applicable events | ||
* @param contexts An array containing either contexts or a conditional contexts | ||
* @param contexts - An array containing either contexts or a conditional contexts | ||
*/ | ||
@@ -342,3 +343,3 @@ addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Removes previously added global context, performs a deep comparison of the contexts or conditional contexts | ||
* @param contexts An array containing either contexts or a conditional contexts | ||
* @param contexts - An array containing either contexts or a conditional contexts | ||
*/ | ||
@@ -348,3 +349,3 @@ removeGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Add a plugin into the plugin collection after Core has already been initialised | ||
* @param configuration The plugin to add | ||
* @param configuration - The plugin to add | ||
*/ | ||
@@ -374,5 +375,5 @@ addPlugin(configuration: CorePluginConfiguration): void; | ||
* | ||
* @param base64 Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins The core plugins to be processed with each event | ||
* @param callback Function applied to every payload dictionary object | ||
* @param base64 - Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins - The core plugins to be processed with each event | ||
* @param callback - Function applied to every payload dictionary object | ||
* @return Tracker core | ||
@@ -395,3 +396,3 @@ */ | ||
* | ||
* @param event Contains the properties and schema location for the event | ||
* @param event - Contains the properties and schema location for the event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -420,3 +421,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page View event | ||
* @param event - Contains the properties for the Page View event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -447,3 +448,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page Ping event | ||
* @param event - Contains the properties for the Page Ping event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -471,3 +472,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Structured event | ||
* @param event - Contains the properties for the Structured event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -506,3 +507,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transactoion event | ||
* @param event - Contains the properties for the Ecommerce Transactoion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -537,3 +538,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transaction Item event | ||
* @param event - Contains the properties for the Ecommerce Transaction Item event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -560,3 +561,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Screen View event. One or more properties must be included. | ||
* @param event - Contains the properties for the Screen View event. One or more properties must be included. | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -585,3 +586,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Link Click event | ||
* @param event - Contains the properties for the Link Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -622,3 +623,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Impression event | ||
* @param event - Contains the properties for the Ad Impression event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -661,3 +662,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Click event | ||
* @param event - Contains the properties for the Ad Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -700,3 +701,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Conversion event | ||
* @param event - Contains the properties for the Ad Conversion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -725,3 +726,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Social Interaction event | ||
* @param event - Contains the properties for the Social Interaction event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -754,3 +755,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Add To Cart event | ||
* @param event - Contains the properties for the Add To Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -783,3 +784,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Remove From Cart event | ||
* @param event - Contains the properties for the Remove From Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -814,3 +815,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Focus or Change Form event | ||
* @param event - Contains the properties for the Form Focus or Change Form event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -848,3 +849,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Submission event | ||
* @param event - Contains the properties for the Form Submission event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -871,3 +872,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Site Search event | ||
* @param event - Contains the properties for the Site Search event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -896,3 +897,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Withdrawn event | ||
* @param event - Contains the properties for the Consent Withdrawn event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -927,3 +928,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Granted event | ||
* @param event - Contains the properties for the Consent Granted event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -956,3 +957,3 @@ */ | ||
* to allow an additional context to be dynamically attached to the event | ||
* @param args - Object which contains the event information to help decide what should be included in the returned Context | ||
* @param args - - Object which contains the event information to help decide what should be included in the returned Context | ||
*/ | ||
@@ -963,3 +964,3 @@ type ContextGenerator = (args?: ContextEvent) => SelfDescribingJson; | ||
* to determine if the context associated with the filter should be attached to the event | ||
* @param args - Object that contains: event, eventType, eventSchema | ||
* @param args - - Object that contains: event, eventType, eventSchema | ||
*/ | ||
@@ -1016,3 +1017,3 @@ type ContextFilter = (args?: ContextEvent) => boolean; | ||
* Adds conditional or primitive global contexts | ||
* @param contexts An Array of either Conditional Contexts or Primitive Contexts | ||
* @param contexts - An Array of either Conditional Contexts or Primitive Contexts | ||
*/ | ||
@@ -1026,3 +1027,3 @@ addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Removes previously added global context, performs a deep comparison of the contexts or conditional contexts | ||
* @param contexts An Array of either Condition Contexts or Primitive Contexts | ||
* @param contexts - An Array of either Condition Contexts or Primitive Contexts | ||
*/ | ||
@@ -1032,3 +1033,3 @@ removeGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive>): void; | ||
* Returns all applicable global contexts for a specified event | ||
* @param event The event to check for applicable global contexts for | ||
* @param event - The event to check for applicable global contexts for | ||
*/ | ||
@@ -1052,4 +1053,4 @@ getApplicableContexts(event: PayloadBuilder): Array<SelfDescribingJson>; | ||
* | ||
* @param dynamicOrStaticContexts Array of custom context Objects or custom context generating functions | ||
* @param Parameters to pass to dynamic context callbacks | ||
* @param dynamicOrStaticContexts - Array of custom context Objects or custom context generating functions | ||
* @param Parameters - to pass to dynamic context callbacks | ||
* @returns An array of Self Describing JSON context | ||
@@ -1060,3 +1061,3 @@ */ | ||
* Slices a schema into its composite parts. Useful for ruleset filtering. | ||
* @param input A schema string | ||
* @param input - A schema string | ||
* @returns The vendor, schema name, major, minor and patch information of a schema string | ||
@@ -1067,3 +1068,3 @@ */ | ||
* Validates the vendor section of a schema string contains allowed wildcard values | ||
* @param parts Array of parts from a schema string | ||
* @param parts - Array of parts from a schema string | ||
* @returns Whether the vendor validation parts are a valid combination | ||
@@ -1074,3 +1075,3 @@ */ | ||
* Validates the vendor part of a schema string is valid for a rule set | ||
* @param input Vendor part of a schema string | ||
* @param input - Vendor part of a schema string | ||
* @returns Whether the vendor validation string is valid | ||
@@ -1081,3 +1082,3 @@ */ | ||
* Checks for validity of input and returns all the sections of a schema string that are used to match rules in a ruleset | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns The sections of a schema string that are used to match rules in a ruleset | ||
@@ -1088,3 +1089,3 @@ */ | ||
* Ensures the rules specified in a schema string of a ruleset are valid | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns if there rule is valid | ||
@@ -1095,3 +1096,3 @@ */ | ||
* Check if a variable is an Array containing only strings | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if the input is an array containing only strings | ||
@@ -1102,3 +1103,3 @@ */ | ||
* Validates whether a rule set is an array of valid ruleset strings | ||
* @param input The Array of rule set arguments | ||
* @param input - The Array of rule set arguments | ||
* @returns True is the input is an array of valid rules | ||
@@ -1109,3 +1110,3 @@ */ | ||
* Check if a variable is a valid, non-empty Self Describing JSON | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if a valid Self Describing JSON | ||
@@ -1116,3 +1117,3 @@ */ | ||
* Validates if the input object contains the expected properties of a ruleset | ||
* @param input The object containing a rule set | ||
* @param input - The object containing a rule set | ||
* @returns True if a valid rule set | ||
@@ -1123,3 +1124,3 @@ */ | ||
* Validates if the function can be a valid context generator function | ||
* @param input The function to be validated | ||
* @param input - The function to be validated | ||
*/ | ||
@@ -1129,3 +1130,3 @@ declare function isContextCallbackFunction(input: unknown): boolean; | ||
* Validates if the function can be a valid context primitive function or self describing json | ||
* @param input The function or orbject to be validated | ||
* @param input - The function or orbject to be validated | ||
* @returns True if either a Context Generator or Self Describing JSON | ||
@@ -1136,3 +1137,3 @@ */ | ||
* Validates if an array is a valid shape to be a Filter Provider | ||
* @param input The Array of Context filter callbacks | ||
* @param input - The Array of Context filter callbacks | ||
*/ | ||
@@ -1142,3 +1143,3 @@ declare function isFilterProvider(input: unknown): boolean; | ||
* Validates if an array is a valid shape to be an array of rule sets | ||
* @param input The Array of Rule Sets | ||
* @param input - The Array of Rule Sets | ||
*/ | ||
@@ -1148,3 +1149,3 @@ declare function isRuleSetProvider(input: unknown): boolean; | ||
* Checks if an input array is either a filter provider or a rule set provider | ||
* @param input An array of filter providers or rule set providers | ||
* @param input - An array of filter providers or rule set providers | ||
* @returns Whether the array is a valid {@link ConditionalContextProvider} | ||
@@ -1155,4 +1156,4 @@ */ | ||
* Checks if a given schema matches any rules within the provided rule set | ||
* @param ruleSet The rule set containing rules to match schema against | ||
* @param schema The schema to be matched against the rule set | ||
* @param ruleSet - The rule set containing rules to match schema against | ||
* @param schema - The schema to be matched against the rule set | ||
*/ | ||
@@ -1162,7 +1163,6 @@ declare function matchSchemaAgainstRuleSet(ruleSet: RuleSet, schema: string): boolean; | ||
* Checks if a given schema matches a specific rule from a rule set | ||
* @param rule The rule to match schema against | ||
* @param schema The schema to be matched against the rule | ||
* @param rule - The rule to match schema against | ||
* @param schema - The schema to be matched against the rule | ||
*/ | ||
declare function matchSchemaAgainstRule(rule: string, schema: string): boolean; | ||
export { ContextEvent, ContextGenerator, ContextFilter, ContextPrimitive, FilterProvider, RuleSet, RuleSetProvider, ConditionalContextProvider, DynamicContext, GlobalContexts, globalContexts, PluginContexts, pluginContexts, resolveDynamicContext, getSchemaParts, validateVendorParts, validateVendor, getRuleParts, isValidRule, isStringArray, isValidRuleSetArg, isSelfDescribingJson, isRuleSet, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isRuleSetProvider, isConditionalContextProvider, matchSchemaAgainstRuleSet, matchSchemaAgainstRule, CorePlugin, Payload, EventJsonWithKeys, EventJson, JsonProcessor, PayloadBuilder, payloadBuilder, payloadJsonProcessor, isNonEmptyJson, isJson, SelfDescribingJson, SelfDescribingJsonArray, Timestamp, TrueTimestamp, DeviceTimestamp, CommonEventProperties, TrackerCore, CoreConfiguration, CorePluginConfiguration, trackerCore, SelfDescribingEvent, buildSelfDescribingEvent, PageViewEvent, buildPageView, PagePingEvent, buildPagePing, StructuredEvent, buildStructEvent, EcommerceTransactionEvent, buildEcommerceTransaction, EcommerceTransactionItemEvent, buildEcommerceTransactionItem, ScreenViewEvent, buildScreenView, LinkClickEvent, buildLinkClick, AdImpressionEvent, buildAdImpression, AdClickEvent, buildAdClick, AdConversionEvent, buildAdConversion, SocialInteractionEvent, buildSocialInteraction, AddToCartEvent, buildAddToCart, RemoveFromCartEvent, buildRemoveFromCart, FormFocusOrChangeEvent, buildFormFocusOrChange, FormElement, FormSubmissionEvent, buildFormSubmission, SiteSearchEvent, buildSiteSearch, ConsentWithdrawnEvent, buildConsentWithdrawn, ConsentGrantedEvent, buildConsentGranted, LOG_LEVEL, Logger, LOG }; | ||
export { version } from "package"; | ||
export { version, ContextEvent, ContextGenerator, ContextFilter, ContextPrimitive, FilterProvider, RuleSet, RuleSetProvider, ConditionalContextProvider, DynamicContext, GlobalContexts, globalContexts, PluginContexts, pluginContexts, resolveDynamicContext, getSchemaParts, validateVendorParts, validateVendor, getRuleParts, isValidRule, isStringArray, isValidRuleSetArg, isSelfDescribingJson, isRuleSet, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isRuleSetProvider, isConditionalContextProvider, matchSchemaAgainstRuleSet, matchSchemaAgainstRule, CorePlugin, Payload, EventJsonWithKeys, EventJson, JsonProcessor, PayloadBuilder, payloadBuilder, payloadJsonProcessor, isNonEmptyJson, isJson, SelfDescribingJson, SelfDescribingJsonArray, Timestamp, TrueTimestamp, DeviceTimestamp, CommonEventProperties, TrackerCore, CoreConfiguration, CorePluginConfiguration, trackerCore, SelfDescribingEvent, buildSelfDescribingEvent, PageViewEvent, buildPageView, PagePingEvent, buildPagePing, StructuredEvent, buildStructEvent, EcommerceTransactionEvent, buildEcommerceTransaction, EcommerceTransactionItemEvent, buildEcommerceTransactionItem, ScreenViewEvent, buildScreenView, LinkClickEvent, buildLinkClick, AdImpressionEvent, buildAdImpression, AdClickEvent, buildAdClick, AdConversionEvent, buildAdConversion, SocialInteractionEvent, buildSocialInteraction, AddToCartEvent, buildAddToCart, RemoveFromCartEvent, buildRemoveFromCart, FormFocusOrChangeEvent, buildFormFocusOrChange, FormElement, FormSubmissionEvent, buildFormSubmission, SiteSearchEvent, buildSiteSearch, ConsentWithdrawnEvent, buildConsentWithdrawn, ConsentGrantedEvent, buildConsentGranted, LOG_LEVEL, Logger, LOG }; |
/*! | ||
* Core functionality for Snowplow JavaScript trackers v3.0.0-beta.5 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow JavaScript trackers v3.0.0 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -10,2 +10,4 @@ * Licensed under BSD-3-Clause | ||
var version$1 = "3.0.0"; | ||
/* | ||
@@ -36,3 +38,3 @@ * Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) | ||
* @remark See: {@link http://tools.ietf.org/html/rfc4648#page-7} | ||
* @param data String to encode | ||
* @param data - String to encode | ||
* @returns The url safe Base 64 string | ||
@@ -52,3 +54,3 @@ */ | ||
* | ||
* @param data string to encode | ||
* @param data - string to encode | ||
* @returns base64-encoded string | ||
@@ -185,3 +187,3 @@ */ | ||
* Is property a non-empty JSON? | ||
* @param property Checks if object is non-empty json | ||
* @param property - Checks if object is non-empty json | ||
*/ | ||
@@ -201,3 +203,3 @@ function isNonEmptyJson(property) { | ||
* Is property a JSON? | ||
* @param property Checks if object is json | ||
* @param property - Checks if object is json | ||
*/ | ||
@@ -359,3 +361,3 @@ function isJson(property) { | ||
* Returns all applicable global contexts for a specified event | ||
* @param event The event to check for applicable global contexts for | ||
* @param event - The event to check for applicable global contexts for | ||
* @returns An array of contexts | ||
@@ -422,3 +424,3 @@ */ | ||
* | ||
* @param array additionalContexts List of user-defined contexts | ||
* @param array - additionalContexts List of user-defined contexts | ||
* @return userContexts combined with commonContexts | ||
@@ -447,4 +449,4 @@ */ | ||
* | ||
* @param dynamicOrStaticContexts Array of custom context Objects or custom context generating functions | ||
* @param Parameters to pass to dynamic context callbacks | ||
* @param dynamicOrStaticContexts - Array of custom context Objects or custom context generating functions | ||
* @param Parameters - to pass to dynamic context callbacks | ||
* @returns An array of Self Describing JSON context | ||
@@ -475,3 +477,3 @@ */ | ||
* Slices a schema into its composite parts. Useful for ruleset filtering. | ||
* @param input A schema string | ||
* @param input - A schema string | ||
* @returns The vendor, schema name, major, minor and patch information of a schema string | ||
@@ -488,3 +490,3 @@ */ | ||
* Validates the vendor section of a schema string contains allowed wildcard values | ||
* @param parts Array of parts from a schema string | ||
* @param parts - Array of parts from a schema string | ||
* @returns Whether the vendor validation parts are a valid combination | ||
@@ -515,3 +517,3 @@ */ | ||
* Validates the vendor part of a schema string is valid for a rule set | ||
* @param input Vendor part of a schema string | ||
* @param input - Vendor part of a schema string | ||
* @returns Whether the vendor validation string is valid | ||
@@ -527,3 +529,3 @@ */ | ||
* Checks for validity of input and returns all the sections of a schema string that are used to match rules in a ruleset | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns The sections of a schema string that are used to match rules in a ruleset | ||
@@ -540,3 +542,3 @@ */ | ||
* Ensures the rules specified in a schema string of a ruleset are valid | ||
* @param input A Schema string | ||
* @param input - A Schema string | ||
* @returns if there rule is valid | ||
@@ -554,3 +556,3 @@ */ | ||
* Check if a variable is an Array containing only strings | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if the input is an array containing only strings | ||
@@ -566,3 +568,3 @@ */ | ||
* Validates whether a rule set is an array of valid ruleset strings | ||
* @param input The Array of rule set arguments | ||
* @param input - The Array of rule set arguments | ||
* @returns True is the input is an array of valid rules | ||
@@ -581,3 +583,3 @@ */ | ||
* Check if a variable is a valid, non-empty Self Describing JSON | ||
* @param input The variable to validate | ||
* @param input - The variable to validate | ||
* @returns True if a valid Self Describing JSON | ||
@@ -594,3 +596,3 @@ */ | ||
* Validates if the input object contains the expected properties of a ruleset | ||
* @param input The object containing a rule set | ||
* @param input - The object containing a rule set | ||
* @returns True if a valid rule set | ||
@@ -626,3 +628,3 @@ */ | ||
* Validates if the function can be a valid context generator function | ||
* @param input The function to be validated | ||
* @param input - The function to be validated | ||
*/ | ||
@@ -634,3 +636,3 @@ function isContextCallbackFunction(input) { | ||
* Validates if the function can be a valid context primitive function or self describing json | ||
* @param input The function or orbject to be validated | ||
* @param input - The function or orbject to be validated | ||
* @returns True if either a Context Generator or Self Describing JSON | ||
@@ -643,3 +645,3 @@ */ | ||
* Validates if an array is a valid shape to be a Filter Provider | ||
* @param input The Array of Context filter callbacks | ||
* @param input - The Array of Context filter callbacks | ||
*/ | ||
@@ -659,3 +661,3 @@ function isFilterProvider(input) { | ||
* Validates if an array is a valid shape to be an array of rule sets | ||
* @param input The Array of Rule Sets | ||
* @param input - The Array of Rule Sets | ||
*/ | ||
@@ -674,3 +676,3 @@ function isRuleSetProvider(input) { | ||
* Checks if an input array is either a filter provider or a rule set provider | ||
* @param input An array of filter providers or rule set providers | ||
* @param input - An array of filter providers or rule set providers | ||
* @returns Whether the array is a valid {@link ConditionalContextProvider} | ||
@@ -683,4 +685,4 @@ */ | ||
* Checks if a given schema matches any rules within the provided rule set | ||
* @param ruleSet The rule set containing rules to match schema against | ||
* @param schema The schema to be matched against the rule set | ||
* @param ruleSet - The rule set containing rules to match schema against | ||
* @param schema - The schema to be matched against the rule set | ||
*/ | ||
@@ -722,4 +724,4 @@ function matchSchemaAgainstRuleSet(ruleSet, schema) { | ||
* Checks if a given schema matches a specific rule from a rule set | ||
* @param rule The rule to match schema against | ||
* @param schema The schema to be matched against the rule | ||
* @param rule - The rule to match schema against | ||
* @param schema - The schema to be matched against the rule | ||
*/ | ||
@@ -913,3 +915,3 @@ function matchSchemaAgainstRule(rule, schema) { | ||
* | ||
* @param timestamp optional number or timestamp object | ||
* @param timestamp - optional number or timestamp object | ||
* @returns correct timestamp object | ||
@@ -935,5 +937,5 @@ */ | ||
* | ||
* @param base64 Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins The core plugins to be processed with each event | ||
* @param callback Function applied to every payload dictionary object | ||
* @param base64 - Whether to base 64 encode contexts and self describing event JSONs | ||
* @param corePlugins - The core plugins to be processed with each event | ||
* @param callback - Function applied to every payload dictionary object | ||
* @return Tracker core | ||
@@ -949,3 +951,3 @@ */ | ||
* | ||
* @param contexts Array of custom context self-describing JSONs | ||
* @param contexts - Array of custom context self-describing JSONs | ||
* @return Outer JSON | ||
@@ -965,4 +967,4 @@ */ | ||
* | ||
* @param pb PayloadData | ||
* @param contexts Custom contexts relating to the event | ||
* @param pb - PayloadData | ||
* @param contexts - Custom contexts relating to the event | ||
*/ | ||
@@ -985,5 +987,5 @@ function attachGlobalContexts(pb, contexts) { | ||
* | ||
* @param pb Payload | ||
* @param context Custom contexts relating to the event | ||
* @param timestamp Timestamp of the event | ||
* @param pb - Payload | ||
* @param context - Custom contexts relating to the event | ||
* @param timestamp - Timestamp of the event | ||
* @return Payload after the callback is applied | ||
@@ -1031,4 +1033,4 @@ */ | ||
* | ||
* @param key Field name | ||
* @param value Field value | ||
* @param key - Field name | ||
* @param value - Field value | ||
*/ | ||
@@ -1124,3 +1126,3 @@ function addPayloadPair(key, value) { | ||
* | ||
* @param event Contains the properties and schema location for the event | ||
* @param event - Contains the properties and schema location for the event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1144,3 +1146,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page View event | ||
* @param event - Contains the properties for the Page View event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1162,3 +1164,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Page Ping event | ||
* @param event - Contains the properties for the Page Ping event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1188,3 +1190,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Structured event | ||
* @param event - Contains the properties for the Structured event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1207,3 +1209,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transactoion event | ||
* @param event - Contains the properties for the Ecommerce Transactoion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1230,3 +1232,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ecommerce Transaction Item event | ||
* @param event - Contains the properties for the Ecommerce Transaction Item event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1252,3 +1254,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Screen View event. One or more properties must be included. | ||
* @param event - Contains the properties for the Screen View event. One or more properties must be included. | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1269,3 +1271,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Link Click event | ||
* @param event - Contains the properties for the Link Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1288,3 +1290,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Impression event | ||
* @param event - Contains the properties for the Ad Impression event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1316,3 +1318,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Click event | ||
* @param event - Contains the properties for the Ad Click event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1345,3 +1347,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Ad Conversion event | ||
* @param event - Contains the properties for the Ad Conversion event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1373,3 +1375,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Social Interaction event | ||
* @param event - Contains the properties for the Social Interaction event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1390,3 +1392,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Add To Cart event | ||
* @param event - Contains the properties for the Add To Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1415,3 +1417,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Remove From Cart event | ||
* @param event - Contains the properties for the Remove From Cart event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1440,3 +1442,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Focus or Change Form event | ||
* @param event - Contains the properties for the Form Focus or Change Form event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1467,3 +1469,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Form Submission event | ||
* @param event - Contains the properties for the Form Submission event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1484,3 +1486,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Site Search event | ||
* @param event - Contains the properties for the Site Search event | ||
* @return PayloadBuilder to be sent to {@link Core.track()} | ||
@@ -1501,3 +1503,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Withdrawn event | ||
* @param event - Contains the properties for the Consent Withdrawn event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -1527,3 +1529,3 @@ */ | ||
* | ||
* @param event Contains the properties for the Consent Granted event | ||
* @param event - Contains the properties for the Consent Granted event | ||
* @return An object containing the PayloadBuilder to be sent to {@link Core.track()} and a 'consent_document' context | ||
@@ -1552,4 +1554,4 @@ */ | ||
* | ||
* @param event JSON object to clean | ||
* @param exemptFields Set of fields which should not be removed even if empty | ||
* @param event - JSON object to clean | ||
* @param exemptFields - Set of fields which should not be removed even if empty | ||
* @return A cleaned copy of eventJson | ||
@@ -1568,5 +1570,34 @@ */ | ||
var version = "3.0.0-beta.5"; | ||
/* | ||
* Copyright (c) 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* 3. Neither the name of the copyright holder nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
var version = version$1; | ||
export { LOG, LOG_LEVEL, buildAdClick, buildAdConversion, buildAdImpression, buildAddToCart, buildConsentGranted, buildConsentWithdrawn, buildEcommerceTransaction, buildEcommerceTransactionItem, buildFormFocusOrChange, buildFormSubmission, buildLinkClick, buildPagePing, buildPageView, buildRemoveFromCart, buildScreenView, buildSelfDescribingEvent, buildSiteSearch, buildSocialInteraction, buildStructEvent, getRuleParts, getSchemaParts, globalContexts, isConditionalContextProvider, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isJson, isNonEmptyJson, isRuleSet, isRuleSetProvider, isSelfDescribingJson, isStringArray, isValidRule, isValidRuleSetArg, matchSchemaAgainstRule, matchSchemaAgainstRuleSet, payloadBuilder, payloadJsonProcessor, pluginContexts, resolveDynamicContext, trackerCore, validateVendor, validateVendorParts, version }; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@snowplow/tracker-core", | ||
"version": "3.0.0-beta.5", | ||
"version": "3.0.0", | ||
"description": "Core functionality for Snowplow JavaScript trackers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
643387
14
6611
0