@rudderstack/analytics-js 3.0.0-beta.6 → 3.0.0-beta.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,21 +8,24 @@
8
8
  * Represents the options parameter for anonymousId
9
9
  */ /**
10
10
  * Represents the beacon queue options parameter in loadOptions type
11
- */var CookieSameSite=/*#__PURE__*/function(CookieSameSite){CookieSameSite["Strict"]="Strict";CookieSameSite["Lax"]="Lax";CookieSameSite["None"]="None";return CookieSameSite;}({});/**
11
+ */ /**
12
12
  * Represents the queue options parameter in loadOptions type
13
13
  */ /**
14
14
  * Represents the destinations queue options parameter in loadOptions type
15
- */ /**
15
+ */var DeliveryType=/*#__PURE__*/function(DeliveryType){DeliveryType["Immediate"]="immediate";DeliveryType["Buffer"]="buffer";return DeliveryType;}({});var StorageStrategy=/*#__PURE__*/function(StorageStrategy){StorageStrategy["None"]="none";StorageStrategy["Session"]="session";StorageStrategy["AnonymousId"]="anonymousId";return StorageStrategy;}({});/**
16
16
  * Represents the options parameter in the load API
17
17
  */
18
18
 
19
+ var StorageEncryptionVersion=/*#__PURE__*/function(StorageEncryptionVersion){StorageEncryptionVersion["Legacy"]="legacy";StorageEncryptionVersion["V3"]="v3";return StorageEncryptionVersion;}({});// default
20
+ var SUPPORTED_STORAGE_TYPES=['localStorage','memoryStorage','cookieStorage','sessionStorage','none'];var DEFAULT_STORAGE_TYPE='cookieStorage';var CookieSameSite=/*#__PURE__*/function(CookieSameSite){CookieSameSite["Strict"]="Strict";CookieSameSite["Lax"]="Lax";CookieSameSite["None"]="None";return CookieSameSite;}({});
21
+
19
22
  /**
20
23
  * Represents residency server input the options
21
24
  */var ResidencyServerRegion=/*#__PURE__*/function(ResidencyServerRegion){ResidencyServerRegion["US"]="US";ResidencyServerRegion["EU"]="EU";return ResidencyServerRegion;}({});
22
25
 
23
26
  var LogLevel=/*#__PURE__*/function(LogLevel){LogLevel["Log"]="LOG";LogLevel["Info"]="INFO";LogLevel["Debug"]="DEBUG";LogLevel["Warn"]="WARN";LogLevel["Error"]="ERROR";LogLevel["None"]="NONE";return LogLevel;}({});
24
27
 
25
- var PluginName=/*#__PURE__*/function(PluginName){PluginName["BeaconQueue"]="BeaconQueue";PluginName["DeviceModeDestinations"]="DeviceModeDestinations";PluginName["DeviceModeTransformation"]="DeviceModeTransformation";PluginName["ErrorReporting"]="ErrorReporting";PluginName["ExternalAnonymousId"]="ExternalAnonymousId";PluginName["GoogleLinker"]="GoogleLinker";PluginName["NativeDestinationQueue"]="NativeDestinationQueue";PluginName["StorageEncryption"]="StorageEncryption";PluginName["StorageEncryptionLegacy"]="StorageEncryptionLegacy";PluginName["StorageMigrator"]="StorageMigrator";PluginName["XhrQueue"]="XhrQueue";PluginName["OneTrustConsentManager"]="OneTrustConsentManager";PluginName["KetchConsentManager"]="KetchConsentManager";PluginName["Bugsnag"]="Bugsnag";return PluginName;}({});
28
+ var PluginName=/*#__PURE__*/function(PluginName){PluginName["BeaconQueue"]="BeaconQueue";PluginName["Bugsnag"]="Bugsnag";PluginName["DeviceModeDestinations"]="DeviceModeDestinations";PluginName["DeviceModeTransformation"]="DeviceModeTransformation";PluginName["ErrorReporting"]="ErrorReporting";PluginName["ExternalAnonymousId"]="ExternalAnonymousId";PluginName["GoogleLinker"]="GoogleLinker";PluginName["KetchConsentManager"]="KetchConsentManager";PluginName["NativeDestinationQueue"]="NativeDestinationQueue";PluginName["OneTrustConsentManager"]="OneTrustConsentManager";PluginName["StorageEncryption"]="StorageEncryption";PluginName["StorageEncryptionLegacy"]="StorageEncryptionLegacy";PluginName["StorageMigrator"]="StorageMigrator";PluginName["XhrQueue"]="XhrQueue";return PluginName;}({});
26
29
 
27
30
  function ownKeys(e, r) {
28
31
  var t = Object.keys(e);
@@ -490,57 +493,8 @@
490
493
  * @return {Function} The curried function.
491
494
  */function _curry3(fn){return function f3(a,b,c){switch(arguments.length){case 0:return f3;case 1:return _isPlaceholder(a)?f3:_curry2(function(_b,_c){return fn(a,_b,_c);});case 2:return _isPlaceholder(a)&&_isPlaceholder(b)?f3:_isPlaceholder(a)?_curry2(function(_a,_c){return fn(_a,b,_c);}):_isPlaceholder(b)?_curry2(function(_b,_c){return fn(a,_b,_c);}):_curry1(function(_c){return fn(a,b,_c);});default:return _isPlaceholder(a)&&_isPlaceholder(b)&&_isPlaceholder(c)?f3:_isPlaceholder(a)&&_isPlaceholder(b)?_curry2(function(_a,_b){return fn(_a,_b,c);}):_isPlaceholder(a)&&_isPlaceholder(c)?_curry2(function(_a,_c){return fn(_a,b,_c);}):_isPlaceholder(b)&&_isPlaceholder(c)?_curry2(function(_b,_c){return fn(a,_b,_c);}):_isPlaceholder(a)?_curry1(function(_a){return fn(_a,b,c);}):_isPlaceholder(b)?_curry1(function(_b){return fn(a,_b,c);}):_isPlaceholder(c)?_curry1(function(_c){return fn(a,b,_c);}):fn(a,b,c);}};}
492
495
 
493
- /**
494
- * Tests whether or not an object is an array.
495
- *
496
- * @private
497
- * @param {*} val The object to test.
498
- * @return {Boolean} `true` if `val` is an array, `false` otherwise.
499
- * @example
500
- *
501
- * _isArray([]); //=> true
502
- * _isArray(null); //=> false
503
- * _isArray({}); //=> false
504
- */var _isArray = Array.isArray||function _isArray(val){return val!=null&&val.length>=0&&Object.prototype.toString.call(val)==='[object Array]';};
505
-
506
- function _arrayFromIterator(iter){var list=[];var next;while(!(next=iter.next()).done){list.push(next.value);}return list;}
507
-
508
- function _includesWith(pred,x,list){var idx=0;var len=list.length;while(idx<len){if(pred(x,list[idx])){return true;}idx+=1;}return false;}
509
-
510
- function _functionName(f){// String(x => x) evaluates to "x => x", so the pattern may not match.
511
- var match=String(f).match(/^function (\w*)/);return match==null?'':match[1];}
512
-
513
496
  function _has(prop,obj){return Object.prototype.hasOwnProperty.call(obj,prop);}
514
497
 
515
- // Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
516
- function _objectIs(a,b){// SameValue algorithm
517
- if(a===b){// Steps 1-5, 7-10
518
- // Steps 6.b-6.e: +0 != -0
519
- return a!==0||1/a===1/b;}else {// Step 6.a: NaN == NaN
520
- return a!==a&&b!==b;}}var _objectIs$1 = typeof Object.is==='function'?Object.is:_objectIs;
521
-
522
- var toString=Object.prototype.toString;var _isArguments=/*#__PURE__*/function(){return toString.call(arguments)==='[object Arguments]'?function _isArguments(x){return toString.call(x)==='[object Arguments]';}:function _isArguments(x){return _has('callee',x);};}();
523
-
524
- var hasEnumBug=!/*#__PURE__*/{toString:null}.propertyIsEnumerable('toString');var nonEnumerableProps=['constructor','valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'];// Safari bug
525
- var hasArgsEnumBug=/*#__PURE__*/function(){return arguments.propertyIsEnumerable('length');}();var contains=function contains(list,item){var idx=0;while(idx<list.length){if(list[idx]===item){return true;}idx+=1;}return false;};/**
526
- * Returns a list containing the names of all the enumerable own properties of
527
- * the supplied object.
528
- * Note that the order of the output array is not guaranteed to be consistent
529
- * across different JS platforms.
530
- *
531
- * @func
532
- * @memberOf R
533
- * @since v0.1.0
534
- * @category Object
535
- * @sig {k: v} -> [k]
536
- * @param {Object} obj The object to extract properties from
537
- * @return {Array} An array of the object's own properties.
538
- * @see R.keysIn, R.values, R.toPairs
539
- * @example
540
- *
541
- * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
542
- */var keys=typeof Object.keys==='function'&&!hasArgsEnumBug?/*#__PURE__*/_curry1(function keys(obj){return Object(obj)!==obj?[]:Object.keys(obj);}):/*#__PURE__*/_curry1(function keys(obj){if(Object(obj)!==obj){return [];}var prop,nIdx;var ks=[];var checkArgsLength=hasArgsEnumBug&&_isArguments(obj);for(prop in obj){if(_has(prop,obj)&&(!checkArgsLength||prop!=='length')){ks[ks.length]=prop;}}if(hasEnumBug){nIdx=nonEnumerableProps.length-1;while(nIdx>=0){prop=nonEnumerableProps[nIdx];if(_has(prop,obj)&&!contains(ks,prop)){ks[ks.length]=prop;}nIdx-=1;}}return ks;});
543
-
544
498
  /**
545
499
  * Gives a single-word string description of the (native) type of a value,
546
500
  * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not
@@ -567,45 +521,6 @@
567
521
  * R.type(undefined); //=> "Undefined"
568
522
  */var type=/*#__PURE__*/_curry1(function type(val){return val===null?'Null':val===undefined?'Undefined':Object.prototype.toString.call(val).slice(8,-1);});
569
523
 
570
- /**
571
- * private _uniqContentEquals function.
572
- * That function is checking equality of 2 iterator contents with 2 assumptions
573
- * - iterators lengths are the same
574
- * - iterators values are unique
575
- *
576
- * false-positive result will be returned for comparison of, e.g.
577
- * - [1,2,3] and [1,2,3,4]
578
- * - [1,1,1] and [1,2,3]
579
- * */function _uniqContentEquals(aIterator,bIterator,stackA,stackB){var a=_arrayFromIterator(aIterator);var b=_arrayFromIterator(bIterator);function eq(_a,_b){return _equals(_a,_b,stackA.slice(),stackB.slice());}// if *a* array contains any element that is not included in *b*
580
- return !_includesWith(function(b,aItem){return !_includesWith(eq,aItem,b);},b,a);}function _equals(a,b,stackA,stackB){if(_objectIs$1(a,b)){return true;}var typeA=type(a);if(typeA!==type(b)){return false;}if(typeof a['fantasy-land/equals']==='function'||typeof b['fantasy-land/equals']==='function'){return typeof a['fantasy-land/equals']==='function'&&a['fantasy-land/equals'](b)&&typeof b['fantasy-land/equals']==='function'&&b['fantasy-land/equals'](a);}if(typeof a.equals==='function'||typeof b.equals==='function'){return typeof a.equals==='function'&&a.equals(b)&&typeof b.equals==='function'&&b.equals(a);}switch(typeA){case'Arguments':case'Array':case'Object':if(typeof a.constructor==='function'&&_functionName(a.constructor)==='Promise'){return a===b;}break;case'Boolean':case'Number':case'String':if(!(_typeof(a)===_typeof(b)&&_objectIs$1(a.valueOf(),b.valueOf()))){return false;}break;case'Date':if(!_objectIs$1(a.valueOf(),b.valueOf())){return false;}break;case'Error':return a.name===b.name&&a.message===b.message;case'RegExp':if(!(a.source===b.source&&a.global===b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline&&a.sticky===b.sticky&&a.unicode===b.unicode)){return false;}break;}var idx=stackA.length-1;while(idx>=0){if(stackA[idx]===a){return stackB[idx]===b;}idx-=1;}switch(typeA){case'Map':if(a.size!==b.size){return false;}return _uniqContentEquals(a.entries(),b.entries(),stackA.concat([a]),stackB.concat([b]));case'Set':if(a.size!==b.size){return false;}return _uniqContentEquals(a.values(),b.values(),stackA.concat([a]),stackB.concat([b]));case'Arguments':case'Array':case'Object':case'Boolean':case'Number':case'String':case'Date':case'Error':case'RegExp':case'Int8Array':case'Uint8Array':case'Uint8ClampedArray':case'Int16Array':case'Uint16Array':case'Int32Array':case'Uint32Array':case'Float32Array':case'Float64Array':case'ArrayBuffer':break;default:// Values of other types are only equal if identical.
581
- return false;}var keysA=keys(a);if(keysA.length!==keys(b).length){return false;}var extendedStackA=stackA.concat([a]);var extendedStackB=stackB.concat([b]);idx=keysA.length-1;while(idx>=0){var key=keysA[idx];if(!(_has(key,b)&&_equals(b[key],a[key],extendedStackA,extendedStackB))){return false;}idx-=1;}return true;}
582
-
583
- /**
584
- * Returns `true` if its arguments are equivalent, `false` otherwise. Handles
585
- * cyclical data structures.
586
- *
587
- * Dispatches symmetrically to the `equals` methods of both arguments, if
588
- * present.
589
- *
590
- * @func
591
- * @memberOf R
592
- * @since v0.15.0
593
- * @category Relation
594
- * @sig a -> b -> Boolean
595
- * @param {*} a
596
- * @param {*} b
597
- * @return {Boolean}
598
- * @example
599
- *
600
- * R.equals(1, 1); //=> true
601
- * R.equals(1, '1'); //=> false
602
- * R.equals([1, 2, 3], [1, 2, 3]); //=> true
603
- *
604
- * const a = {}; a.v = a;
605
- * const b = {}; b.v = b;
606
- * R.equals(a, b); //=> true
607
- */var equals=/*#__PURE__*/_curry2(function equals(a,b){return _equals(a,b,[],[]);});
608
-
609
524
  function _isObject(x){return Object.prototype.toString.call(x)==='[object Object]';}
610
525
 
611
526
  /**
@@ -690,71 +605,6 @@
690
605
  * objects[0] === objectsClone[0]; //=> false
691
606
  */var clone=/*#__PURE__*/_curry1(function clone(value){return value!=null&&typeof value.clone==='function'?value.clone():_clone(value,true);});var clone$1 = clone;
692
607
 
693
- /**
694
- * Tests whether or not an object is a typed array.
695
- *
696
- * @private
697
- * @param {*} val The object to test.
698
- * @return {Boolean} `true` if `val` is a typed array, `false` otherwise.
699
- * @example
700
- *
701
- * _isTypedArray(new Uint8Array([])); //=> true
702
- * _isTypedArray(new Float32Array([])); //=> true
703
- * _isTypedArray([]); //=> false
704
- * _isTypedArray(null); //=> false
705
- * _isTypedArray({}); //=> false
706
- */function _isTypedArray(val){var type=Object.prototype.toString.call(val);return type==='[object Uint8ClampedArray]'||type==='[object Int8Array]'||type==='[object Uint8Array]'||type==='[object Int16Array]'||type==='[object Uint16Array]'||type==='[object Int32Array]'||type==='[object Uint32Array]'||type==='[object Float32Array]'||type==='[object Float64Array]'||type==='[object BigInt64Array]'||type==='[object BigUint64Array]';}
707
-
708
- /**
709
- * Returns the empty value of its argument's type. Ramda defines the empty
710
- * value of Array (`[]`), Object (`{}`), String (`''`),
711
- * TypedArray (`Uint8Array []`, `Float32Array []`, etc), and Arguments. Other
712
- * types are supported if they define `<Type>.empty`,
713
- * `<Type>.prototype.empty` or implement the
714
- * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).
715
- *
716
- * Dispatches to the `empty` method of the first argument, if present.
717
- *
718
- * @func
719
- * @memberOf R
720
- * @since v0.3.0
721
- * @category Function
722
- * @sig a -> a
723
- * @param {*} x
724
- * @return {*}
725
- * @example
726
- *
727
- * R.empty(Just(42)); //=> Nothing()
728
- * R.empty([1, 2, 3]); //=> []
729
- * R.empty('unicorns'); //=> ''
730
- * R.empty({x: 1, y: 2}); //=> {}
731
- * R.empty(Uint8Array.from('123')); //=> Uint8Array []
732
- */var empty=/*#__PURE__*/_curry1(function empty(x){return x!=null&&typeof x['fantasy-land/empty']==='function'?x['fantasy-land/empty']():x!=null&&x.constructor!=null&&typeof x.constructor['fantasy-land/empty']==='function'?x.constructor['fantasy-land/empty']():x!=null&&typeof x.empty==='function'?x.empty():x!=null&&x.constructor!=null&&typeof x.constructor.empty==='function'?x.constructor.empty():_isArray(x)?[]:_isString(x)?'':_isObject(x)?{}:_isArguments(x)?function(){return arguments;}():_isTypedArray(x)?x.constructor.from(''):void 0// else
733
- ;});
734
-
735
- /**
736
- * Returns `true` if the given value is its type's empty value; `false`
737
- * otherwise.
738
- *
739
- * @func
740
- * @memberOf R
741
- * @since v0.1.0
742
- * @category Logic
743
- * @sig a -> Boolean
744
- * @param {*} x
745
- * @return {Boolean}
746
- * @see R.empty
747
- * @example
748
- *
749
- * R.isEmpty([1, 2, 3]); //=> false
750
- * R.isEmpty([]); //=> true
751
- * R.isEmpty(''); //=> true
752
- * R.isEmpty(null); //=> false
753
- * R.isEmpty({}); //=> true
754
- * R.isEmpty({length: 0}); //=> false
755
- * R.isEmpty(Uint8Array.from('')); //=> true
756
- */var isEmpty=/*#__PURE__*/_curry1(function isEmpty(x){return x!=null&&equals(x,empty(x));});var isEmpty$1 = isEmpty;
757
-
758
608
  /**
759
609
  * Retrieves the values at given paths of an object.
760
610
  *
@@ -932,6 +782,10 @@
932
782
  * @param value input value
933
783
  * @returns boolean
934
784
  */var isDefinedAndNotNull=function isDefinedAndNotNull(value){return !isNullOrUndefined(value);};/**
785
+ * A function to check given value is defined and not null
786
+ * @param value input value
787
+ * @returns boolean
788
+ */var isDefinedNotNullAndNotEmptyString=function isDefinedNotNullAndNotEmptyString(value){return isDefinedAndNotNull(value)&&value!=='';};/**
935
789
  * Determines if the input is an instance of Error
936
790
  * @param obj input value
937
791
  * @returns true if the input is an instance of Error and false otherwise
@@ -1027,7 +881,7 @@
1027
881
 
1028
882
  var CAPABILITIES_MANAGER='CapabilitiesManager';var CONFIG_MANAGER='ConfigManager';var EVENT_MANAGER='EventManager';var PLUGINS_MANAGER='PluginsManager';var USER_SESSION_MANAGER='UserSessionManager';var ERROR_HANDLER='ErrorHandler';var PLUGIN_ENGINE='PluginEngine';var STORE_MANAGER='StoreManager';var READY_API='readyApi';var LOAD_CONFIGURATION='LoadConfiguration';var EVENT_REPOSITORY='EventRepository';var EXTERNAL_SRC_LOADER='ExternalSrcLoader';var HTTP_CLIENT='HttpClient';var RS_APP='RudderStackApplication';var ANALYTICS_CORE='AnalyticsCore';
1029
883
 
1030
- var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.0.0-beta.6';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';
884
+ var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.0.0-beta.8';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';
1031
885
 
1032
886
  var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
1033
887
 
@@ -1135,7 +989,7 @@
1135
989
  * Handle errors
1136
990
  */},{key:"onError",value:function onError(error){if(this.hasErrorHandler){var _this$errorHandler;(_this$errorHandler=this.errorHandler)===null||_this$errorHandler===void 0||_this$errorHandler.onError(error,EXTERNAL_SRC_LOADER);}else {throw error;}}}]);return ExternalSrcLoader;}();
1137
991
 
1138
- function i(){throw new Error("Cycle detected");}function t(){if(!(h>1)){var i,t=!1;while(void 0!==n){var o=n;n=void 0;s++;while(void 0!==o){var r=o.o;o.o=void 0;o.f&=-3;if(!(8&o.f)&&c(o))try{o.c();}catch(o){if(!t){i=o;t=!0;}}o=r;}}s=0;h--;if(t)throw i;}else h--;}function o(i){if(h>0)return i();h++;try{return i();}finally{t();}}var r=void 0,n=void 0,h=0,s=0,f=0;function v(i){if(void 0!==r){var t=i.n;if(void 0===t||t.t!==r){t={i:0,S:i,p:r.s,n:void 0,t:r,e:void 0,x:void 0,r:t};if(void 0!==r.s)r.s.n=t;r.s=t;i.n=t;if(32&r.f)i.S(t);return t;}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=r.s;t.n=void 0;r.s.n=t;r.s=t;}return t;}}}function e(i){this.v=i;this.i=0;this.n=void 0;this.t=void 0;}e.prototype.h=function(){return !0;};e.prototype.S=function(i){if(this.t!==i&&void 0===i.e){i.x=this.t;if(void 0!==this.t)this.t.e=i;this.t=i;}};e.prototype.U=function(i){if(void 0!==this.t){var t=i.e,o=i.x;if(void 0!==t){t.x=o;i.e=void 0;}if(void 0!==o){o.e=t;i.x=void 0;}if(i===this.t)this.t=o;}};e.prototype.subscribe=function(i){var t=this;return b(function(){var o=t.value,r=32&this.f;this.f&=-33;try{i(o);}finally{this.f|=r;}});};e.prototype.valueOf=function(){return this.value;};e.prototype.toString=function(){return this.value+"";};e.prototype.toJSON=function(){return this.value;};e.prototype.peek=function(){return this.v;};Object.defineProperty(e.prototype,"value",{get:function get(){var i=v(this);if(void 0!==i)i.i=this.i;return this.v;},set:function set(o){if(r instanceof l)!function(){throw new Error("Computed cannot have side-effects");}();if(o!==this.v){if(s>100)i();this.v=o;this.i++;f++;h++;try{for(var n=this.t;void 0!==n;n=n.x)n.t.N();}finally{t();}}}});function u(i){return new e(i);}function c(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return !0;return !1;}function d(i){for(var t=i.s;void 0!==t;t=t.n){var o=t.S.n;if(void 0!==o)t.r=o;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break;}}}function a(i){var t=i.s,o=void 0;while(void 0!==t){var r=t.p;if(-1===t.i){t.S.U(t);if(void 0!==r)r.n=t.n;if(void 0!==t.n)t.n.p=r;}else o=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=r;}i.s=o;}function l(i){e.call(this,void 0);this.x=i;this.s=void 0;this.g=f-1;this.f=4;}(l.prototype=new e()).h=function(){this.f&=-3;if(1&this.f)return !1;if(32==(36&this.f))return !0;this.f&=-5;if(this.g===f)return !0;this.g=f;this.f|=1;if(this.i>0&&!c(this)){this.f&=-2;return !0;}var i=r;try{d(this);r=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++;}}catch(i){this.v=i;this.f|=16;this.i++;}r=i;a(this);this.f&=-2;return !0;};l.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t);}e.prototype.S.call(this,i);};l.prototype.U=function(i){if(void 0!==this.t){e.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t);}}};l.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N();}};l.prototype.peek=function(){if(!this.h())i();if(16&this.f)throw this.v;return this.v;};Object.defineProperty(l.prototype,"value",{get:function get(){if(1&this.f)i();var t=v(this);this.h();if(void 0!==t)t.i=this.i;if(16&this.f)throw this.v;return this.v;}});function y(i){var o=i.u;i.u=void 0;if("function"==typeof o){h++;var n=r;r=void 0;try{o();}catch(t){i.f&=-2;i.f|=8;_(i);throw t;}finally{r=n;t();}}}function _(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;y(i);}function p(i){if(r!==this)throw new Error("Out-of-order effect");a(this);r=i;this.f&=-2;if(8&this.f)_(this);t();}function g(i){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32;}g.prototype.c=function(){var i=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();if("function"==typeof t)this.u=t;}finally{i();}};g.prototype.S=function(){if(1&this.f)i();this.f|=1;this.f&=-9;y(this);d(this);h++;var t=r;r=this;return p.bind(this,t);};g.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=n;n=this;}};g.prototype.d=function(){this.f|=8;if(!(1&this.f))_(this);};function b(i){var t=new g(i);try{t.c();}catch(i){t.d();throw i;}return t.d.bind(t);}
992
+ function i(){throw new Error("Cycle detected");}function t(){if(!(f>1)){var i,t=!1;while(void 0!==s){var r=s;s=void 0;v++;while(void 0!==r){var n=r.o;r.o=void 0;r.f&=-3;if(!(8&r.f)&&a(r))try{r.c();}catch(r){if(!t){i=r;t=!0;}}r=n;}}v=0;f--;if(t)throw i;}else f--;}function r(i){if(f>0)return i();f++;try{return i();}finally{t();}}var n=void 0;var s=void 0,f=0,v=0,e=0;function u(i){if(void 0!==n){var t=i.n;if(void 0===t||t.t!==n){t={i:0,S:i,p:n.s,n:void 0,t:n,e:void 0,x:void 0,r:t};if(void 0!==n.s)n.s.n=t;n.s=t;i.n=t;if(32&n.f)i.S(t);return t;}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=n.s;t.n=void 0;n.s.n=t;n.s=t;}return t;}}}function c(i){this.v=i;this.i=0;this.n=void 0;this.t=void 0;}c.prototype.h=function(){return !0;};c.prototype.S=function(i){if(this.t!==i&&void 0===i.e){i.x=this.t;if(void 0!==this.t)this.t.e=i;this.t=i;}};c.prototype.U=function(i){if(void 0!==this.t){var t=i.e,r=i.x;if(void 0!==t){t.x=r;i.e=void 0;}if(void 0!==r){r.e=t;i.x=void 0;}if(i===this.t)this.t=r;}};c.prototype.subscribe=function(i){var t=this;return E(function(){var r=t.value,n=32&this.f;this.f&=-33;try{i(r);}finally{this.f|=n;}});};c.prototype.valueOf=function(){return this.value;};c.prototype.toString=function(){return this.value+"";};c.prototype.toJSON=function(){return this.value;};c.prototype.peek=function(){return this.v;};Object.defineProperty(c.prototype,"value",{get:function get(){var i=u(this);if(void 0!==i)i.i=this.i;return this.v;},set:function set(r){if(n instanceof y)!function(){throw new Error("Computed cannot have side-effects");}();if(r!==this.v){if(v>100)i();this.v=r;this.i++;e++;f++;try{for(var o=this.t;void 0!==o;o=o.x)o.t.N();}finally{t();}}}});function d(i){return new c(i);}function a(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return !0;return !1;}function l(i){for(var t=i.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r)t.r=r;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break;}}}function w(i){var t=i.s,r=void 0;while(void 0!==t){var n=t.p;if(-1===t.i){t.S.U(t);if(void 0!==n)n.n=t.n;if(void 0!==t.n)t.n.p=n;}else r=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=n;}i.s=r;}function y(i){c.call(this,void 0);this.x=i;this.s=void 0;this.g=e-1;this.f=4;}(y.prototype=new c()).h=function(){this.f&=-3;if(1&this.f)return !1;if(32==(36&this.f))return !0;this.f&=-5;if(this.g===e)return !0;this.g=e;this.f|=1;if(this.i>0&&!a(this)){this.f&=-2;return !0;}var i=n;try{l(this);n=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++;}}catch(i){this.v=i;this.f|=16;this.i++;}n=i;w(this);this.f&=-2;return !0;};y.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t);}c.prototype.S.call(this,i);};y.prototype.U=function(i){if(void 0!==this.t){c.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t);}}};y.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N();}};y.prototype.peek=function(){if(!this.h())i();if(16&this.f)throw this.v;return this.v;};Object.defineProperty(y.prototype,"value",{get:function get(){if(1&this.f)i();var t=u(this);this.h();if(void 0!==t)t.i=this.i;if(16&this.f)throw this.v;return this.v;}});function p(i){var r=i.u;i.u=void 0;if("function"==typeof r){f++;var o=n;n=void 0;try{r();}catch(t){i.f&=-2;i.f|=8;g(i);throw t;}finally{n=o;t();}}}function g(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;p(i);}function b(i){if(n!==this)throw new Error("Out-of-order effect");w(this);n=i;this.f&=-2;if(8&this.f)g(this);t();}function x(i){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32;}x.prototype.c=function(){var i=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();if("function"==typeof t)this.u=t;}finally{i();}};x.prototype.S=function(){if(1&this.f)i();this.f|=1;this.f&=-9;p(this);l(this);f++;var t=n;n=this;return b.bind(this,t);};x.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=s;s=this;}};x.prototype.d=function(){this.f|=8;if(!(1&this.f))g(this);};function E(i){var t=new x(i);try{t.c();}catch(i){t.d();throw i;}return t.d.bind(t);}
1139
993
 
1140
994
  var LifecycleStatus=/*#__PURE__*/function(LifecycleStatus){LifecycleStatus["Mounted"]="mounted";LifecycleStatus["BrowserCapabilitiesReady"]="browserCapabilitiesReady";LifecycleStatus["Configured"]="configured";LifecycleStatus["PluginsLoading"]="pluginsLoading";LifecycleStatus["PluginsReady"]="pluginsReady";LifecycleStatus["Initialized"]="initialized";LifecycleStatus["Loaded"]="loaded";LifecycleStatus["DestinationsLoading"]="destinationsLoading";LifecycleStatus["DestinationsReady"]="destinationsReady";LifecycleStatus["Ready"]="ready";return LifecycleStatus;}({});
1141
995
 
@@ -1161,45 +1015,46 @@
1161
1015
  if(!isString(data[0])){styledLogArgs.push(data[0]);}// append rest of the original arguments
1162
1016
  styledLogArgs.push.apply(styledLogArgs,_toConsumableArray(data.slice(1)));return styledLogArgs;}return data;}}]);return Logger;}();var defaultLogger=new Logger();
1163
1017
 
1164
- var StorageEncryptionVersion=/*#__PURE__*/function(StorageEncryptionVersion){StorageEncryptionVersion["Legacy"]="legacy";StorageEncryptionVersion["V3"]="v3";return StorageEncryptionVersion;}({});// default
1165
- var SUPPORTED_STORAGE_TYPES=['localStorage','memoryStorage','cookieStorage','sessionStorage','none'];var DEFAULT_STORAGE_TYPE='cookieStorage';
1166
-
1167
1018
  var SOURCE_CONFIG_OPTION_ERROR="\"getSourceConfig\" must be a function. Please make sure that it is defined and returns a valid source configuration object.";var INTG_CDN_BASE_URL_ERROR="Failed to load the SDK as the CDN base URL for integrations is not valid.";var PLUGINS_CDN_BASE_URL_ERROR="Failed to load the SDK as the CDN base URL for plugins is not valid.";var DATA_PLANE_URL_ERROR="Failed to load the SDK as the data plane URL could not be determined. Please check that the data plane URL is set correctly and try again.";var XHR_PAYLOAD_PREP_ERROR="Failed to prepare data for the request.";var EVENT_OBJECT_GENERATION_ERROR="Failed to generate the event object.";var PLUGIN_EXT_POINT_MISSING_ERROR="Failed to invoke plugin because the extension point name is missing.";var PLUGIN_EXT_POINT_INVALID_ERROR="Failed to invoke plugin because the extension point name is invalid.";// ERROR
1168
1019
  var UNSUPPORTED_CONSENT_MANAGER_ERROR=function UNSUPPORTED_CONSENT_MANAGER_ERROR(context,selectedConsentManager,consentManagersToPluginNameMap){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The consent manager \"").concat(selectedConsentManager,"\" is not supported. Please choose one of the following supported consent managers: \"").concat(Object.keys(consentManagersToPluginNameMap),"\".");};var REPORTING_PLUGIN_INIT_FAILURE_ERROR=function REPORTING_PLUGIN_INIT_FAILURE_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Failed to initialize the error reporting plugin.");};var NOTIFY_FAILURE_ERROR=function NOTIFY_FAILURE_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Failed to notify the error.");};var PLUGIN_NAME_MISSING_ERROR=function PLUGIN_NAME_MISSING_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin name is missing.");};var PLUGIN_ALREADY_EXISTS_ERROR=function PLUGIN_ALREADY_EXISTS_ERROR(context,pluginName){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin \"").concat(pluginName,"\" already exists.");};var PLUGIN_NOT_FOUND_ERROR=function PLUGIN_NOT_FOUND_ERROR(context,pluginName){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin \"").concat(pluginName,"\" not found.");};var PLUGIN_ENGINE_BUG_ERROR=function PLUGIN_ENGINE_BUG_ERROR(context,pluginName){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin \"").concat(pluginName,"\" not found in plugins but found in byName. This indicates a bug in the plugin engine. Please report this issue to the development team.");};var PLUGIN_DEPS_ERROR=function PLUGIN_DEPS_ERROR(context,pluginName,notExistDeps){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin \"").concat(pluginName,"\" could not be loaded because some of its dependencies \"").concat(notExistDeps,"\" do not exist.");};var PLUGIN_INVOCATION_ERROR=function PLUGIN_INVOCATION_ERROR(context,extPoint,pluginName){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Failed to invoke the \"").concat(extPoint,"\" extension point of plugin \"").concat(pluginName,"\".");};var STORAGE_UNAVAILABILITY_ERROR_PREFIX=function STORAGE_UNAVAILABILITY_ERROR_PREFIX(context,storageType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The \"").concat(storageType,"\" storage type is ");};var SOURCE_CONFIG_FETCH_ERROR=function SOURCE_CONFIG_FETCH_ERROR(reason){return "Failed to fetch the source config. Reason: ".concat(reason);};var WRITE_KEY_VALIDATION_ERROR=function WRITE_KEY_VALIDATION_ERROR(writeKey){return "The write key \"".concat(writeKey,"\" is invalid. It must be a non-empty string. Please check that the write key is correct and try again.");};var DATA_PLANE_URL_VALIDATION_ERROR=function DATA_PLANE_URL_VALIDATION_ERROR(dataPlaneUrl){return "The data plane URL \"".concat(dataPlaneUrl,"\" is invalid. It must be a valid URL string. Please check that the data plane URL is correct and try again.");};var READY_API_CALLBACK_ERROR=function READY_API_CALLBACK_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The callback is not a function.");};var XHR_DELIVERY_ERROR=function XHR_DELIVERY_ERROR(prefix,status,statusText,url){return "".concat(prefix," with status: ").concat(status,", ").concat(statusText," for URL: ").concat(url,".");};var XHR_REQUEST_ERROR=function XHR_REQUEST_ERROR(prefix,e,url){return "".concat(prefix," due to timeout or no connection (").concat(e?e.type:'',") for URL: ").concat(url,".");};var XHR_SEND_ERROR=function XHR_SEND_ERROR(prefix,url){return "".concat(prefix," for URL: ").concat(url);};var STORE_DATA_SAVE_ERROR=function STORE_DATA_SAVE_ERROR(key){return "Failed to save the value for \"".concat(key,"\" to storage");};var STORE_DATA_FETCH_ERROR=function STORE_DATA_FETCH_ERROR(key){return "Failed to retrieve or parse data for \"".concat(key,"\" from storage");};// WARNING
1169
- var STORAGE_TYPE_VALIDATION_WARNING=function STORAGE_TYPE_VALIDATION_WARNING(context,storageType,defaultStorageType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage type \"").concat(storageType,"\" is not supported. Please choose one of the following supported storage types: \"").concat(SUPPORTED_STORAGE_TYPES,"\". The default storage \"").concat(defaultStorageType,"\" will be used instead.");};var UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING=function UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING(context,selectedErrorReportingProvider,errorReportingProvidersToPluginNameMap,defaultProvider){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The error reporting provider \"").concat(selectedErrorReportingProvider,"\" is not supported. Please choose one of the following supported providers: \"").concat(Object.keys(errorReportingProvidersToPluginNameMap),"\". The default provider \"").concat(defaultProvider,"\" will be used instead.");};var UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING=function UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING(context,selectedStorageEncryptionVersion,storageEncryptionVersionsToPluginNameMap,defaultVersion){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage encryption version \"").concat(selectedStorageEncryptionVersion,"\" is not supported. Please choose one of the following supported versions: \"").concat(Object.keys(storageEncryptionVersionsToPluginNameMap),"\". The default version \"").concat(defaultVersion,"\" will be used instead.");};var STORAGE_DATA_MIGRATION_OVERRIDE_WARNING=function STORAGE_DATA_MIGRATION_OVERRIDE_WARNING(context,storageEncryptionVersion,defaultVersion){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage data migration has been disabled because the configured storage encryption version (").concat(storageEncryptionVersion,") is not the latest (").concat(defaultVersion,"). To enable storage data migration, please update the storage encryption version to the latest version.");};var UNSUPPORTED_RESIDENCY_SERVER_REGION_WARNING=function UNSUPPORTED_RESIDENCY_SERVER_REGION_WARNING(context,selectedResidencyServerRegion,defaultRegion){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The residency server region \"").concat(selectedResidencyServerRegion,"\" is not supported. Please choose one of the following supported regions: \"").concat(Object.values(ResidencyServerRegion),"\". The default region \"").concat(defaultRegion,"\" will be used instead.");};var RESERVED_KEYWORD_WARNING=function RESERVED_KEYWORD_WARNING(context,property,parentKeyPath,reservedElements){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The \"").concat(property,"\" property defined under \"").concat(parentKeyPath,"\" is a reserved keyword. Please choose a different property name to avoid conflicts with reserved keywords (").concat(reservedElements,").");};var INVALID_CONTEXT_OBJECT_WARNING=function INVALID_CONTEXT_OBJECT_WARNING(logContext){return "".concat(logContext).concat(LOG_CONTEXT_SEPARATOR,"Please make sure that the \"context\" property in the event API's \"options\" argument is a valid object literal with key-value pairs.");};var UNSUPPORTED_BEACON_API_WARNING=function UNSUPPORTED_BEACON_API_WARNING(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The Beacon API is not supported by your browser. The events will be sent using XHR instead.");};var TIMEOUT_NOT_NUMBER_WARNING=function TIMEOUT_NOT_NUMBER_WARNING(context,timeout,defaultValue){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The session timeout value \"").concat(timeout,"\" is not a number. The default timeout of ").concat(defaultValue," ms will be used instead.");};var TIMEOUT_ZERO_WARNING=function TIMEOUT_ZERO_WARNING(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The session timeout value is 0, which disables the automatic session tracking feature. If you want to enable session tracking, please provide a positive integer value for the timeout.");};var TIMEOUT_NOT_RECOMMENDED_WARNING=function TIMEOUT_NOT_RECOMMENDED_WARNING(context,timeout,minTimeout){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The session timeout value ").concat(timeout," ms is less than the recommended minimum of ").concat(minTimeout," ms. Please consider increasing the timeout value to ensure optimal performance and reliability.");};var INVALID_SESSION_ID_WARNING=function INVALID_SESSION_ID_WARNING(context,sessionId,minSessionIdLength){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The provided session ID (").concat(sessionId,") is either invalid, not a positive integer, or not at least \"").concat(minSessionIdLength,"\" digits long. A new session ID will be auto-generated instead.");};var STORAGE_QUOTA_EXCEEDED_WARNING=function STORAGE_QUOTA_EXCEEDED_WARNING(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage is either full or unavailable, so the data will not be persisted. Switching to in-memory storage.");};var STORAGE_UNAVAILABLE_WARNING=function STORAGE_UNAVAILABLE_WARNING(context,selectedStorageType,finalStorageType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage type \"").concat(selectedStorageType,"\" is not available. The SDK will be initialized with \"").concat(finalStorageType,"\" instead.");};var WRITE_KEY_NOT_A_STRING_ERROR=function WRITE_KEY_NOT_A_STRING_ERROR(context,writeKey){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The write key \"").concat(writeKey,"\" is not a string. Please check that the write key is correct and try again.");};var EMPTY_GROUP_CALL_ERROR=function EMPTY_GROUP_CALL_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The group() method must be called with at least one argument.");};var READY_CALLBACK_INVOKE_ERROR="Failed to invoke the ready callback";var API_CALLBACK_INVOKE_ERROR="API Callback Invocation Failed";var INVALID_CONFIG_URL_WARNING=function INVALID_CONFIG_URL_WARNING(context,configUrl){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The provided config URL \"").concat(configUrl,"\" is invalid. Using the default value instead.");};var POLYFILL_SCRIPT_LOAD_ERROR=function POLYFILL_SCRIPT_LOAD_ERROR(scriptId,url){return "Failed to load the polyfill script with ID \"".concat(scriptId,"\" from URL ").concat(url,".");};var COOKIE_DATA_ENCODING_ERROR="Failed to encode the cookie data.";// DEBUG
1020
+ var STORAGE_TYPE_VALIDATION_WARNING=function STORAGE_TYPE_VALIDATION_WARNING(context,storageType,defaultStorageType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage type \"").concat(storageType,"\" is not supported. Please choose one of the following supported types: \"").concat(SUPPORTED_STORAGE_TYPES,"\". The default type \"").concat(defaultStorageType,"\" will be used instead.");};var UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING=function UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING(context,selectedErrorReportingProvider,errorReportingProvidersToPluginNameMap,defaultProvider){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The error reporting provider \"").concat(selectedErrorReportingProvider,"\" is not supported. Please choose one of the following supported providers: \"").concat(Object.keys(errorReportingProvidersToPluginNameMap),"\". The default provider \"").concat(defaultProvider,"\" will be used instead.");};var UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING=function UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING(context,selectedStorageEncryptionVersion,storageEncryptionVersionsToPluginNameMap,defaultVersion){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage encryption version \"").concat(selectedStorageEncryptionVersion,"\" is not supported. Please choose one of the following supported versions: \"").concat(Object.keys(storageEncryptionVersionsToPluginNameMap),"\". The default version \"").concat(defaultVersion,"\" will be used instead.");};var STORAGE_DATA_MIGRATION_OVERRIDE_WARNING=function STORAGE_DATA_MIGRATION_OVERRIDE_WARNING(context,storageEncryptionVersion,defaultVersion){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage data migration has been disabled because the configured storage encryption version (").concat(storageEncryptionVersion,") is not the latest (").concat(defaultVersion,"). To enable storage data migration, please update the storage encryption version to the latest version.");};var UNSUPPORTED_RESIDENCY_SERVER_REGION_WARNING=function UNSUPPORTED_RESIDENCY_SERVER_REGION_WARNING(context,selectedResidencyServerRegion,defaultRegion){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The residency server region \"").concat(selectedResidencyServerRegion,"\" is not supported. Please choose one of the following supported regions: \"").concat(Object.values(ResidencyServerRegion),"\". The default region \"").concat(defaultRegion,"\" will be used instead.");};var RESERVED_KEYWORD_WARNING=function RESERVED_KEYWORD_WARNING(context,property,parentKeyPath,reservedElements){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The \"").concat(property,"\" property defined under \"").concat(parentKeyPath,"\" is a reserved keyword. Please choose a different property name to avoid conflicts with reserved keywords (").concat(reservedElements,").");};var INVALID_CONTEXT_OBJECT_WARNING=function INVALID_CONTEXT_OBJECT_WARNING(logContext){return "".concat(logContext).concat(LOG_CONTEXT_SEPARATOR,"Please make sure that the \"context\" property in the event API's \"options\" argument is a valid object literal with key-value pairs.");};var UNSUPPORTED_BEACON_API_WARNING=function UNSUPPORTED_BEACON_API_WARNING(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The Beacon API is not supported by your browser. The events will be sent using XHR instead.");};var TIMEOUT_NOT_NUMBER_WARNING=function TIMEOUT_NOT_NUMBER_WARNING(context,timeout,defaultValue){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The session timeout value \"").concat(timeout,"\" is not a number. The default timeout of ").concat(defaultValue," ms will be used instead.");};var TIMEOUT_ZERO_WARNING=function TIMEOUT_ZERO_WARNING(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The session timeout value is 0, which disables the automatic session tracking feature. If you want to enable session tracking, please provide a positive integer value for the timeout.");};var TIMEOUT_NOT_RECOMMENDED_WARNING=function TIMEOUT_NOT_RECOMMENDED_WARNING(context,timeout,minTimeout){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The session timeout value ").concat(timeout," ms is less than the recommended minimum of ").concat(minTimeout," ms. Please consider increasing the timeout value to ensure optimal performance and reliability.");};var INVALID_SESSION_ID_WARNING=function INVALID_SESSION_ID_WARNING(context,sessionId,minSessionIdLength){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The provided session ID (").concat(sessionId,") is either invalid, not a positive integer, or not at least \"").concat(minSessionIdLength,"\" digits long. A new session ID will be auto-generated instead.");};var STORAGE_QUOTA_EXCEEDED_WARNING=function STORAGE_QUOTA_EXCEEDED_WARNING(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage is either full or unavailable, so the data will not be persisted. Switching to in-memory storage.");};var STORAGE_UNAVAILABLE_WARNING=function STORAGE_UNAVAILABLE_WARNING(context,selectedStorageType,finalStorageType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage type \"").concat(selectedStorageType,"\" is not available. The SDK will be initialized with \"").concat(finalStorageType,"\" instead.");};var WRITE_KEY_NOT_A_STRING_ERROR=function WRITE_KEY_NOT_A_STRING_ERROR(context,writeKey){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The write key \"").concat(writeKey,"\" is not a string. Please check that the write key is correct and try again.");};var EMPTY_GROUP_CALL_ERROR=function EMPTY_GROUP_CALL_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The group() method must be called with at least one argument.");};var READY_CALLBACK_INVOKE_ERROR="Failed to invoke the ready callback";var API_CALLBACK_INVOKE_ERROR="API Callback Invocation Failed";var INVALID_CONFIG_URL_WARNING=function INVALID_CONFIG_URL_WARNING(context,configUrl){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The provided config URL \"").concat(configUrl,"\" is invalid. Using the default value instead.");};var POLYFILL_SCRIPT_LOAD_ERROR=function POLYFILL_SCRIPT_LOAD_ERROR(scriptId,url){return "Failed to load the polyfill script with ID \"".concat(scriptId,"\" from URL ").concat(url,".");};var COOKIE_DATA_ENCODING_ERROR="Failed to encode the cookie data.";var UNSUPPORTED_PRE_CONSENT_STORAGE_STRATEGY=function UNSUPPORTED_PRE_CONSENT_STORAGE_STRATEGY(context,selectedStrategy,defaultStrategy){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The pre-consent storage strategy \"").concat(selectedStrategy,"\" is not supported. Please choose one of the following supported strategies: \"").concat(Object.values(StorageStrategy),"\". The default strategy \"").concat(defaultStrategy,"\" will be used instead.");};var UNSUPPORTED_PRE_CONSENT_EVENTS_DELIVERY_TYPE=function UNSUPPORTED_PRE_CONSENT_EVENTS_DELIVERY_TYPE(context,selectedDeliveryType,defaultDeliveryType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The pre-consent events delivery type \"").concat(selectedDeliveryType,"\" is not supported. Please choose one of the following supported types: \"").concat(Object.values(DeliveryType),"\". The default type \"").concat(defaultDeliveryType,"\" will be used instead.");};// DEBUG
1021
+
1022
+ var CDN_INT_DIR='js-integrations';var CDN_PLUGINS_DIR='plugins';
1170
1023
 
1171
- var BUILD_TYPE='legacy';var SDK_CDN_BASE_URL='https://cdn.rudderlabs.com';var CDN_ARCH_VERSION_DIR='v3';var CDN_INT_DIR='js-integrations';var CDN_PLUGINS_DIR='plugins';var DEST_SDK_BASE_URL="".concat(SDK_CDN_BASE_URL,"/beta/3.0.0-beta/").concat(BUILD_TYPE,"/").concat(CDN_INT_DIR);var PLUGINS_BASE_URL="".concat(SDK_CDN_BASE_URL,"/beta/3.0.0-beta/").concat(BUILD_TYPE,"/").concat(CDN_PLUGINS_DIR);// TODO: change the above to production URLs when beta phase is done
1024
+ var BUILD_TYPE='legacy';var SDK_CDN_BASE_URL='https://cdn.rudderlabs.com';var CDN_ARCH_VERSION_DIR='v3';var DEST_SDK_BASE_URL="".concat(SDK_CDN_BASE_URL,"/beta/3.0.0-beta/").concat(BUILD_TYPE,"/").concat(CDN_INT_DIR);var PLUGINS_BASE_URL="".concat(SDK_CDN_BASE_URL,"/beta/3.0.0-beta/").concat(BUILD_TYPE,"/").concat(CDN_PLUGINS_DIR);// TODO: change the above to production URLs when beta phase is done
1172
1025
  // const DEST_SDK_BASE_URL = `${SDK_CDN_BASE_URL}/latest/${CDN_ARCH_VERSION_DIR}/${BUILD_TYPE}/${CDN_INT_DIR}`;
1173
1026
  // const PLUGINS_BASE_URL = `${SDK_CDN_BASE_URL}/latest/${CDN_ARCH_VERSION_DIR}/${BUILD_TYPE}/${CDN_PLUGINS_DIR}`;
1174
1027
  var DEFAULT_CONFIG_BE_URL='https://api.rudderstack.com';
1175
1028
 
1176
1029
  var _StorageEncryptionVer;var DEFAULT_ERROR_REPORTING_PROVIDER='bugsnag';var DEFAULT_STORAGE_ENCRYPTION_VERSION=StorageEncryptionVersion.V3;var ConsentManagersToPluginNameMap={oneTrust:PluginName.OneTrustConsentManager,ketch:PluginName.KetchConsentManager};var ErrorReportingProvidersToPluginNameMap=_defineProperty({},DEFAULT_ERROR_REPORTING_PROVIDER,PluginName.Bugsnag);var StorageEncryptionVersionsToPluginNameMap=(_StorageEncryptionVer={},_defineProperty(_StorageEncryptionVer,DEFAULT_STORAGE_ENCRYPTION_VERSION,PluginName.StorageEncryption),_defineProperty(_StorageEncryptionVer,StorageEncryptionVersion.Legacy,PluginName.StorageEncryptionLegacy),_StorageEncryptionVer);
1177
1030
 
1178
- var defaultLoadOptions={logLevel:LogLevel.Error,configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:CookieSameSite.Lax,polyfillIfRequired:true,integrations:{All:true},useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:false,uaChTrackLevel:UaChTrackLevel.None,plugins:[],useGlobalIntegrationsConfigInEvents:false,bufferDataPlaneEventsUntilReady:false,dataPlaneEventsBufferTimeout:DEFAULT_DATA_PLANE_EVENTS_BUFFER_TIMEOUT_MS,storage:{encryption:{version:DEFAULT_STORAGE_ENCRYPTION_VERSION},migrate:false},sendAdblockPageOptions:{}};var loadOptionsState=u(clone$1(defaultLoadOptions));
1031
+ var defaultLoadOptions={logLevel:LogLevel.Error,configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:CookieSameSite.Lax,polyfillIfRequired:true,integrations:{All:true},useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:false,uaChTrackLevel:UaChTrackLevel.None,plugins:[],useGlobalIntegrationsConfigInEvents:false,bufferDataPlaneEventsUntilReady:false,dataPlaneEventsBufferTimeout:DEFAULT_DATA_PLANE_EVENTS_BUFFER_TIMEOUT_MS,storage:{encryption:{version:DEFAULT_STORAGE_ENCRYPTION_VERSION},migrate:false},sendAdblockPageOptions:{}};var loadOptionsState=d(clone$1(defaultLoadOptions));
1179
1032
 
1180
- var defaultSessionInfo={autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS};var sessionState={userId:u(undefined),userTraits:u(undefined),anonymousUserId:u(undefined),groupId:u(undefined),groupTraits:u(undefined),initialReferrer:u(undefined),initialReferringDomain:u(undefined),sessionInfo:u(_objectSpread2({},defaultSessionInfo))};
1033
+ var userSessionStorageKeys={userId:'rl_user_id',userTraits:'rl_trait',anonymousId:'rl_anonymous_id',groupId:'rl_group_id',groupTraits:'rl_group_trait',initialReferrer:'rl_page_init_referrer',initialReferringDomain:'rl_page_init_referring_domain',sessionInfo:'rl_session'};var defaultUserSessionValues={userId:'',userTraits:{},anonymousId:'',groupId:'',groupTraits:{},initialReferrer:'',initialReferringDomain:'',sessionInfo:{}};
1181
1034
 
1182
- var capabilitiesState={isOnline:u(true),storage:{isLocalStorageAvailable:u(false),isCookieStorageAvailable:u(false),isSessionStorageAvailable:u(false)},isBeaconAvailable:u(false),isLegacyDOM:u(false),isUaCHAvailable:u(false),isCryptoAvailable:u(false),isIE11:u(false),isAdBlocked:u(false)};
1035
+ var defaultSessionInfo={autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS};var sessionState={userId:d(defaultUserSessionValues.userId),userTraits:d(defaultUserSessionValues.userTraits),anonymousId:d(defaultUserSessionValues.anonymousId),groupId:d(defaultUserSessionValues.groupId),groupTraits:d(defaultUserSessionValues.groupTraits),initialReferrer:d(defaultUserSessionValues.initialReferrer),initialReferringDomain:d(defaultUserSessionValues.initialReferringDomain),sessionInfo:d(defaultUserSessionValues.sessionInfo)};
1183
1036
 
1184
- var reportingState={isErrorReportingEnabled:u(false),isMetricsReportingEnabled:u(false),errorReportingProviderPluginName:u(undefined)};
1037
+ var capabilitiesState={isOnline:d(true),storage:{isLocalStorageAvailable:d(false),isCookieStorageAvailable:d(false),isSessionStorageAvailable:d(false)},isBeaconAvailable:d(false),isLegacyDOM:d(false),isUaCHAvailable:d(false),isCryptoAvailable:d(false),isIE11:d(false),isAdBlocked:d(false)};
1185
1038
 
1186
- var sourceConfigState=u(undefined);
1039
+ var reportingState={isErrorReportingEnabled:d(false),isMetricsReportingEnabled:d(false),errorReportingProviderPluginName:d(undefined)};
1187
1040
 
1188
- var lifecycleState={activeDataplaneUrl:u(undefined),integrationsCDNPath:u(DEST_SDK_BASE_URL),pluginsCDNPath:u(PLUGINS_BASE_URL),sourceConfigUrl:u(undefined),status:u(undefined),initialized:u(false),logLevel:u(LogLevel.Error),loaded:u(false),readyCallbacks:u([]),writeKey:u(undefined),dataPlaneUrl:u(undefined)};
1041
+ var sourceConfigState=d(undefined);
1189
1042
 
1190
- var consentsState={data:u({initialized:false}),activeConsentManagerPluginName:u(undefined)};
1043
+ var lifecycleState={activeDataplaneUrl:d(undefined),integrationsCDNPath:d(DEST_SDK_BASE_URL),pluginsCDNPath:d(PLUGINS_BASE_URL),sourceConfigUrl:d(undefined),status:d(undefined),initialized:d(false),logLevel:d(LogLevel.Error),loaded:d(false),readyCallbacks:d([]),writeKey:d(undefined),dataPlaneUrl:d(undefined)};
1191
1044
 
1192
- var metricsState={retries:u(0),dropped:u(0),sent:u(0),queued:u(0),triggered:u(0)};
1045
+ var consentsState={data:d({initialized:false}),activeConsentManagerPluginName:d(undefined),preConsentOptions:d({enabled:false})};
1193
1046
 
1194
- var contextState={app:u({name:APP_NAME,namespace:APP_NAMESPACE,version:APP_VERSION}),traits:u(null),library:u({name:APP_NAME,version:APP_VERSION}),userAgent:u(''),device:u(null),network:u(null),os:u({name:'',version:''}),locale:u(null),screen:u({density:0,width:0,height:0,innerWidth:0,innerHeight:0}),'ua-ch':u(undefined)};
1047
+ var metricsState={retries:d(0),dropped:d(0),sent:d(0),queued:d(0),triggered:d(0)};
1195
1048
 
1196
- var nativeDestinationsState={configuredDestinations:u([]),activeDestinations:u([]),loadOnlyIntegrations:u({}),failedDestinations:u([]),loadIntegration:u(true),initializedDestinations:u([]),clientDestinationsReady:u(false),integrationsConfig:u({})};
1049
+ var contextState={app:d({name:APP_NAME,namespace:APP_NAMESPACE,version:APP_VERSION}),traits:d(null),library:d({name:APP_NAME,version:APP_VERSION}),userAgent:d(''),device:d(null),network:d(null),os:d({name:'',version:''}),locale:d(null),screen:d({density:0,width:0,height:0,innerWidth:0,innerHeight:0}),'ua-ch':d(undefined)};
1197
1050
 
1198
- var eventBufferState={toBeProcessedArray:u([]),readyCallbacksArray:u([])};
1051
+ var nativeDestinationsState={configuredDestinations:d([]),activeDestinations:d([]),loadOnlyIntegrations:d({}),failedDestinations:d([]),loadIntegration:d(true),initializedDestinations:d([]),clientDestinationsReady:d(false),integrationsConfig:d({})};
1199
1052
 
1200
- var pluginsState={ready:u(false),loadedPlugins:u([]),failedPlugins:u([]),pluginsToLoadFromConfig:u([]),activePlugins:u([]),totalPluginsToLoad:u(0)};
1053
+ var eventBufferState={toBeProcessedArray:d([]),readyCallbacksArray:d([])};
1201
1054
 
1202
- var storageState={encryptionPluginName:u(undefined),migrate:u(false),type:u(undefined)};
1055
+ var pluginsState={ready:d(false),loadedPlugins:d([]),failedPlugins:d([]),pluginsToLoadFromConfig:d([]),activePlugins:d([]),totalPluginsToLoad:d(0)};
1056
+
1057
+ var storageState={encryptionPluginName:d(undefined),migrate:d(false),type:d(undefined),cookie:d(undefined),entries:d({}),trulyAnonymousTracking:d(false)};
1203
1058
 
1204
1059
  var defaultStateValues={capabilities:capabilitiesState,consents:consentsState,context:contextState,eventBuffer:eventBufferState,lifecycle:lifecycleState,loadOptions:loadOptionsState,metrics:metricsState,nativeDestinations:nativeDestinationsState,plugins:pluginsState,reporting:reportingState,session:sessionState,source:sourceConfigState,storage:storageState};var state=_objectSpread2({},clone$1(defaultStateValues));
1205
1060
 
@@ -1265,173 +1120,6 @@
1265
1120
  * @returns ISO formatted timestamp string
1266
1121
  */var getCurrentTimeFormatted=function getCurrentTimeFormatted(){var curDateTime=new Date().toISOString();return curDateTime;};
1267
1122
 
1268
- function random(len){return crypto.getRandomValues(new Uint8Array(len));}
1269
-
1270
- var SIZE=4096,HEX$1=[],IDX$1=0,BUFFER$1;for(;IDX$1<256;IDX$1++){HEX$1[IDX$1]=(IDX$1+256).toString(16).substring(1);}function v4$1(){if(!BUFFER$1||IDX$1+16>SIZE){BUFFER$1=random(SIZE);IDX$1=0;}var i=0,tmp,out='';for(;i<16;i++){tmp=BUFFER$1[IDX$1+i];if(i==6)out+=HEX$1[tmp&15|64];else if(i==8)out+=HEX$1[tmp&63|128];else out+=HEX$1[tmp];if(i&1&&i>1&&i<11)out+='-';}IDX$1+=16;return out;}
1271
-
1272
- var IDX=256,HEX=[],BUFFER;while(IDX--)HEX[IDX]=(IDX+256).toString(16).substring(1);function v4(){var i=0,num,out='';if(!BUFFER||IDX+16>256){BUFFER=Array(i=256);while(i--)BUFFER[i]=256*Math.random()|0;i=IDX=0;}for(;i<16;i++){num=BUFFER[IDX+i];if(i==6)out+=HEX[num&15|64];else if(i==8)out+=HEX[num&63|128];else out+=HEX[num];if(i&1&&i>1&&i<11)out+='-';}IDX++;return out;}
1273
-
1274
- var hasCrypto$1=function hasCrypto(){return !isNullOrUndefined(globalThis.crypto)&&isFunction(globalThis.crypto.getRandomValues);};
1275
-
1276
- var generateUUID=function generateUUID(){if(hasCrypto$1()){return v4$1();}return v4();};
1277
-
1278
- var QueueStatuses={IN_PROGRESS:'inProgress',QUEUE:'queue',RECLAIM_START:'reclaimStart',RECLAIM_END:'reclaimEnd',ACK:'ack',BATCH_QUEUE:'batchQueue'};
1279
-
1280
- var _CNameMapping$18;var DIR_NAME$18='AdobeAnalytics';var NAME$18='ADOBE_ANALYTICS';var DISPLAY_NAME$18='Adobe Analytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$18=_defineProperty({},DISPLAY_NAME$18,DIR_NAME$18);var CNameMapping$18=(_CNameMapping$18={'Adobe Analytics':NAME$18,ADOBEANALYTICS:NAME$18,'ADOBE ANALYTICS':NAME$18},_defineProperty(_CNameMapping$18,NAME$18,NAME$18),_defineProperty(_CNameMapping$18,"AdobeAnalytics",NAME$18),_defineProperty(_CNameMapping$18,"adobeanalytics",NAME$18),_defineProperty(_CNameMapping$18,'adobe analytics',NAME$18),_defineProperty(_CNameMapping$18,'Adobe analytics',NAME$18),_defineProperty(_CNameMapping$18,'adobe Analytics',NAME$18),_CNameMapping$18);
1281
-
1282
- var _CNameMapping$17;var DIR_NAME$17='Amplitude';var NAME$17='AM';var DISPLAY_NAME$17='Amplitude';var DISPLAY_NAME_TO_DIR_NAME_MAP$17=_defineProperty({},DISPLAY_NAME$17,DIR_NAME$17);var CNameMapping$17=(_CNameMapping$17={},_defineProperty(_CNameMapping$17,NAME$17,NAME$17),_defineProperty(_CNameMapping$17,"AMPLITUDE",NAME$17),_defineProperty(_CNameMapping$17,"Amplitude",NAME$17),_defineProperty(_CNameMapping$17,"am",NAME$17),_CNameMapping$17);
1283
-
1284
- var _CNameMapping$16;var DIR_NAME$16='Appcues';var NAME$16='APPCUES';var DISPLAY_NAME$16='Appcues';var DISPLAY_NAME_TO_DIR_NAME_MAP$16=_defineProperty({},DISPLAY_NAME$16,DIR_NAME$16);var CNameMapping$16=(_CNameMapping$16={},_defineProperty(_CNameMapping$16,NAME$16,NAME$16),_defineProperty(_CNameMapping$16,"Appcues",NAME$16),_defineProperty(_CNameMapping$16,'App Cues',NAME$16),_defineProperty(_CNameMapping$16,"appcues",NAME$16),_CNameMapping$16);
1285
-
1286
- var _CNameMapping$15;var DIR_NAME$15='BingAds';var NAME$15='BINGADS';var DISPLAY_NAME$15='Bing Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$15=_defineProperty({},DISPLAY_NAME$15,DIR_NAME$15);var CNameMapping$15=(_CNameMapping$15={},_defineProperty(_CNameMapping$15,NAME$15,NAME$15),_defineProperty(_CNameMapping$15,"BingAds",NAME$15),_defineProperty(_CNameMapping$15,"bingads",NAME$15),_defineProperty(_CNameMapping$15,'Bing Ads',NAME$15),_defineProperty(_CNameMapping$15,'Bing ads',NAME$15),_defineProperty(_CNameMapping$15,'bing Ads',NAME$15),_defineProperty(_CNameMapping$15,'bing ads',NAME$15),_CNameMapping$15);
1287
-
1288
- var _CNameMapping$14;var DIR_NAME$14='Braze';var NAME$14='BRAZE';var DISPLAY_NAME$14='Braze';var DISPLAY_NAME_TO_DIR_NAME_MAP$14=_defineProperty({},DISPLAY_NAME$14,DIR_NAME$14);var CNameMapping$14=(_CNameMapping$14={},_defineProperty(_CNameMapping$14,NAME$14,NAME$14),_defineProperty(_CNameMapping$14,"Braze",NAME$14),_defineProperty(_CNameMapping$14,"braze",NAME$14),_CNameMapping$14);
1289
-
1290
- var _CNameMapping$13;var DIR_NAME$13='Bugsnag';var NAME$13='BUGSNAG';var DISPLAY_NAME$13='Bugsnag';var DISPLAY_NAME_TO_DIR_NAME_MAP$13=_defineProperty({},DISPLAY_NAME$13,DIR_NAME$13);var CNameMapping$13=(_CNameMapping$13={},_defineProperty(_CNameMapping$13,NAME$13,NAME$13),_defineProperty(_CNameMapping$13,"bugsnag",NAME$13),_defineProperty(_CNameMapping$13,"Bugsnag",NAME$13),_CNameMapping$13);
1291
-
1292
- var _CNameMapping$12;var DIR_NAME$12='Chartbeat';var NAME$12='CHARTBEAT';var DISPLAY_NAME$12='Chartbeat';var DISPLAY_NAME_TO_DIR_NAME_MAP$12=_defineProperty({},DISPLAY_NAME$12,DIR_NAME$12);var CNameMapping$12=(_CNameMapping$12={},_defineProperty(_CNameMapping$12,NAME$12,NAME$12),_defineProperty(_CNameMapping$12,"Chartbeat",NAME$12),_defineProperty(_CNameMapping$12,"chartbeat",NAME$12),_defineProperty(_CNameMapping$12,'Chart Beat',NAME$12),_defineProperty(_CNameMapping$12,'chart beat',NAME$12),_CNameMapping$12);
1293
-
1294
- var _CNameMapping$11;var DIR_NAME$11='Clevertap';var NAME$11='CLEVERTAP';var DISPLAY_NAME$11='CleverTap';var DISPLAY_NAME_TO_DIR_NAME_MAP$11=_defineProperty({},DISPLAY_NAME$11,DIR_NAME$11);var CNameMapping$11=(_CNameMapping$11={},_defineProperty(_CNameMapping$11,NAME$11,NAME$11),_defineProperty(_CNameMapping$11,"Clevertap",NAME$11),_defineProperty(_CNameMapping$11,"clevertap",NAME$11),_CNameMapping$11);
1295
-
1296
- var _CNameMapping$10;var DIR_NAME$10='Comscore';var NAME$10='COMSCORE';var DISPLAY_NAME$10='Comscore';var DISPLAY_NAME_TO_DIR_NAME_MAP$10=_defineProperty({},DISPLAY_NAME$10,DIR_NAME$10);var CNameMapping$10=(_CNameMapping$10={},_defineProperty(_CNameMapping$10,NAME$10,NAME$10),_defineProperty(_CNameMapping$10,"Comscore",NAME$10),_defineProperty(_CNameMapping$10,'Com Score',NAME$10),_defineProperty(_CNameMapping$10,'com Score',NAME$10),_defineProperty(_CNameMapping$10,'com score',NAME$10),_defineProperty(_CNameMapping$10,'Com score',NAME$10),_CNameMapping$10);
1297
-
1298
- var _CNameMapping$$;var DIR_NAME$$='Criteo';var NAME$$='CRITEO';var DISPLAY_NAME$$='Criteo';var DISPLAY_NAME_TO_DIR_NAME_MAP$$=_defineProperty({},DISPLAY_NAME$$,DIR_NAME$$);var CNameMapping$$=(_CNameMapping$$={},_defineProperty(_CNameMapping$$,NAME$$,NAME$$),_defineProperty(_CNameMapping$$,"Criteo",NAME$$),_defineProperty(_CNameMapping$$,"criteo",NAME$$),_CNameMapping$$);
1299
-
1300
- var _CNameMapping$_;var DIR_NAME$_='CustomerIO';var NAME$_='CUSTOMERIO';var DISPLAY_NAME$_='Customer IO';var DISPLAY_NAME_TO_DIR_NAME_MAP$_=_defineProperty({},DISPLAY_NAME$_,DIR_NAME$_);var CNameMapping$_=(_CNameMapping$_={},_defineProperty(_CNameMapping$_,NAME$_,NAME$_),_defineProperty(_CNameMapping$_,"Customerio",NAME$_),_defineProperty(_CNameMapping$_,'Customer.io',NAME$_),_defineProperty(_CNameMapping$_,'CUSTOMER.IO',NAME$_),_defineProperty(_CNameMapping$_,'customer.io',NAME$_),_CNameMapping$_);
1301
-
1302
- var _CNameMapping$Z;var DIR_NAME$Z='Drip';var NAME$Z='DRIP';var DISPLAY_NAME$Z='Drip';var DISPLAY_NAME_TO_DIR_NAME_MAP$Z=_defineProperty({},DISPLAY_NAME$Z,DIR_NAME$Z);var CNameMapping$Z=(_CNameMapping$Z={},_defineProperty(_CNameMapping$Z,NAME$Z,NAME$Z),_defineProperty(_CNameMapping$Z,"Drip",NAME$Z),_defineProperty(_CNameMapping$Z,"drip",NAME$Z),_CNameMapping$Z);
1303
-
1304
- var _CNameMapping$Y;var DIR_NAME$Y='FacebookPixel';var NAME$Y='FACEBOOK_PIXEL';var DISPLAY_NAME$Y='Facebook Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$Y=_defineProperty({},DISPLAY_NAME$Y,DIR_NAME$Y);var CNameMapping$Y=(_CNameMapping$Y={},_defineProperty(_CNameMapping$Y,NAME$Y,NAME$Y),_defineProperty(_CNameMapping$Y,'FB Pixel',NAME$Y),_defineProperty(_CNameMapping$Y,'Facebook Pixel',NAME$Y),_defineProperty(_CNameMapping$Y,'facebook pixel',NAME$Y),_defineProperty(_CNameMapping$Y,"fbpixel",NAME$Y),_defineProperty(_CNameMapping$Y,"FBPIXEL",NAME$Y),_defineProperty(_CNameMapping$Y,"FB_PIXEL",NAME$Y),_CNameMapping$Y);
1305
-
1306
- var _CNameMapping$X;var DIR_NAME$X='Fullstory';var NAME$X='FULLSTORY';var DISPLAY_NAME$X='Fullstory';var DISPLAY_NAME_TO_DIR_NAME_MAP$X=_defineProperty({},DISPLAY_NAME$X,DIR_NAME$X);var CNameMapping$X=(_CNameMapping$X={},_defineProperty(_CNameMapping$X,NAME$X,NAME$X),_defineProperty(_CNameMapping$X,"Fullstory",NAME$X),_defineProperty(_CNameMapping$X,"FullStory",NAME$X),_defineProperty(_CNameMapping$X,'full Story',NAME$X),_defineProperty(_CNameMapping$X,'Full Story',NAME$X),_defineProperty(_CNameMapping$X,'Full story',NAME$X),_defineProperty(_CNameMapping$X,'full story',NAME$X),_defineProperty(_CNameMapping$X,"fullstory",NAME$X),_CNameMapping$X);
1307
-
1308
- var _CNameMapping$W;var DIR_NAME$W='GA';var NAME$W='GA';var DISPLAY_NAME$W='Google Analytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$W=_defineProperty({},DISPLAY_NAME$W,DIR_NAME$W);var CNameMapping$W=(_CNameMapping$W={},_defineProperty(_CNameMapping$W,NAME$W,NAME$W),_defineProperty(_CNameMapping$W,'Google Analytics',NAME$W),_defineProperty(_CNameMapping$W,"GoogleAnalytics",NAME$W),_defineProperty(_CNameMapping$W,'GOOGLE ANALYTICS',NAME$W),_defineProperty(_CNameMapping$W,'google analytics',NAME$W),_CNameMapping$W);
1309
-
1310
- var _CNameMapping$V;var DIR_NAME$V='GA4';var NAME$V='GA4';var DISPLAY_NAME$V='Google Analytics 4 (GA4)';var DISPLAY_NAME_TO_DIR_NAME_MAP$V=_defineProperty({},DISPLAY_NAME$V,DIR_NAME$V);var CNameMapping$V=(_CNameMapping$V={},_defineProperty(_CNameMapping$V,NAME$V,NAME$V),_defineProperty(_CNameMapping$V,'Google Analytics 4',NAME$V),_defineProperty(_CNameMapping$V,'Google analytics 4',NAME$V),_defineProperty(_CNameMapping$V,'google analytics 4',NAME$V),_defineProperty(_CNameMapping$V,'Google Analytics4',NAME$V),_defineProperty(_CNameMapping$V,'Google analytics4',NAME$V),_defineProperty(_CNameMapping$V,'google analytics4',NAME$V),_defineProperty(_CNameMapping$V,"GoogleAnalytics4",NAME$V),_CNameMapping$V);
1311
-
1312
- var _CNameMapping$U;var DIR_NAME$U='GoogleAds';var NAME$U='GOOGLEADS';var DISPLAY_NAME$U='Google Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$U=_defineProperty({},DISPLAY_NAME$U,DIR_NAME$U);var CNameMapping$U=(_CNameMapping$U={},_defineProperty(_CNameMapping$U,NAME$U,NAME$U),_defineProperty(_CNameMapping$U,'Google Ads',NAME$U),_defineProperty(_CNameMapping$U,"GoogleAds",NAME$U),_defineProperty(_CNameMapping$U,'GOOGLE ADS',NAME$U),_defineProperty(_CNameMapping$U,'google ads',NAME$U),_defineProperty(_CNameMapping$U,"googleads",NAME$U),_CNameMapping$U);
1313
-
1314
- var _CNameMapping$T;var DIR_NAME$T='GoogleOptimize';var NAME$T='GOOGLE_OPTIMIZE';var DISPLAY_NAME$T='Google Optimize';var DISPLAY_NAME_TO_DIR_NAME_MAP$T=_defineProperty({},DISPLAY_NAME$T,DIR_NAME$T);var CNameMapping$T=(_CNameMapping$T={},_defineProperty(_CNameMapping$T,NAME$T,NAME$T),_defineProperty(_CNameMapping$T,'Google Optimize',NAME$T),_defineProperty(_CNameMapping$T,"GoogleOptimize",NAME$T),_defineProperty(_CNameMapping$T,"Googleoptimize",NAME$T),_defineProperty(_CNameMapping$T,"GOOGLEOPTIMIZE",NAME$T),_defineProperty(_CNameMapping$T,'google optimize',NAME$T),_defineProperty(_CNameMapping$T,'Google optimize',NAME$T),_defineProperty(_CNameMapping$T,'GOOGLE OPTIMIZE',NAME$T),_CNameMapping$T);
1315
-
1316
- var _CNameMapping$S;var DIR_NAME$S='GoogleTagManager';var NAME$S='GTM';var DISPLAY_NAME$S='Google Tag Manager';var DISPLAY_NAME_TO_DIR_NAME_MAP$S=_defineProperty({},DISPLAY_NAME$S,DIR_NAME$S);var CNameMapping$S=(_CNameMapping$S={},_defineProperty(_CNameMapping$S,NAME$S,NAME$S),_defineProperty(_CNameMapping$S,'Google Tag Manager',NAME$S),_defineProperty(_CNameMapping$S,'google tag manager',NAME$S),_defineProperty(_CNameMapping$S,'googletag manager',NAME$S),_defineProperty(_CNameMapping$S,"googletagmanager",NAME$S),_CNameMapping$S);
1317
-
1318
- var _CNameMapping$R;var DIR_NAME$R='Heap';var NAME$R='HEAP';var DISPLAY_NAME$R='Heap.io';var DISPLAY_NAME_TO_DIR_NAME_MAP$R=_defineProperty({},DISPLAY_NAME$R,DIR_NAME$R);var CNameMapping$R=(_CNameMapping$R={},_defineProperty(_CNameMapping$R,NAME$R,NAME$R),_defineProperty(_CNameMapping$R,"Heap",NAME$R),_defineProperty(_CNameMapping$R,"heap",NAME$R),_defineProperty(_CNameMapping$R,'Heap.io',NAME$R),_CNameMapping$R);
1319
-
1320
- var _CNameMapping$Q;var DIR_NAME$Q='Hotjar';var NAME$Q='HOTJAR';var DISPLAY_NAME$Q='Hotjar';var DISPLAY_NAME_TO_DIR_NAME_MAP$Q=_defineProperty({},DISPLAY_NAME$Q,DIR_NAME$Q);var CNameMapping$Q=(_CNameMapping$Q={},_defineProperty(_CNameMapping$Q,NAME$Q,NAME$Q),_defineProperty(_CNameMapping$Q,"Hotjar",NAME$Q),_defineProperty(_CNameMapping$Q,"hotjar",NAME$Q),_defineProperty(_CNameMapping$Q,'Hot Jar',NAME$Q),_defineProperty(_CNameMapping$Q,'hot jar',NAME$Q),_CNameMapping$Q);
1321
-
1322
- var _CNameMapping$P;var DIR_NAME$P='HubSpot';var NAME$P='HS';var DISPLAY_NAME$P='HubSpot';var DISPLAY_NAME_TO_DIR_NAME_MAP$P=_defineProperty({},DISPLAY_NAME$P,DIR_NAME$P);var CNameMapping$P=(_CNameMapping$P={},_defineProperty(_CNameMapping$P,NAME$P,NAME$P),_defineProperty(_CNameMapping$P,"Hubspot",NAME$P),_defineProperty(_CNameMapping$P,"HUBSPOT",NAME$P),_defineProperty(_CNameMapping$P,'hub spot',NAME$P),_defineProperty(_CNameMapping$P,'Hub Spot',NAME$P),_defineProperty(_CNameMapping$P,'Hub spot',NAME$P),_CNameMapping$P);
1323
-
1324
- var _CNameMapping$O;var DIR_NAME$O='INTERCOM';var NAME$O='INTERCOM';var DISPLAY_NAME$O='Intercom';var DISPLAY_NAME_TO_DIR_NAME_MAP$O=_defineProperty({},DISPLAY_NAME$O,DIR_NAME$O);var CNameMapping$O=(_CNameMapping$O={},_defineProperty(_CNameMapping$O,NAME$O,NAME$O),_defineProperty(_CNameMapping$O,"Intercom",NAME$O),_defineProperty(_CNameMapping$O,"intercom",NAME$O),_CNameMapping$O);
1325
-
1326
- var _CNameMapping$N;var DIR_NAME$N='Keen';var NAME$N='KEEN';var DISPLAY_NAME$N='Keen';var DISPLAY_NAME_TO_DIR_NAME_MAP$N=_defineProperty({},DISPLAY_NAME$N,DIR_NAME$N);var CNameMapping$N=(_CNameMapping$N={},_defineProperty(_CNameMapping$N,NAME$N,NAME$N),_defineProperty(_CNameMapping$N,"Keen",NAME$N),_defineProperty(_CNameMapping$N,'Keen.io',NAME$N),_defineProperty(_CNameMapping$N,"keen",NAME$N),_defineProperty(_CNameMapping$N,'keen.io',NAME$N),_CNameMapping$N);
1327
-
1328
- var _CNameMapping$M;var DIR_NAME$M='Kissmetrics';var NAME$M='KISSMETRICS';var DISPLAY_NAME$M='Kiss Metrics';var DISPLAY_NAME_TO_DIR_NAME_MAP$M=_defineProperty({},DISPLAY_NAME$M,DIR_NAME$M);var CNameMapping$M=(_CNameMapping$M={},_defineProperty(_CNameMapping$M,NAME$M,NAME$M),_defineProperty(_CNameMapping$M,"Kissmetrics",NAME$M),_defineProperty(_CNameMapping$M,"kissmetrics",NAME$M),_CNameMapping$M);
1329
-
1330
- var _CNameMapping$L;var DIR_NAME$L='Klaviyo';var NAME$L='KLAVIYO';var DISPLAY_NAME$L='Klaviyo';var DISPLAY_NAME_TO_DIR_NAME_MAP$L=_defineProperty({},DISPLAY_NAME$L,DIR_NAME$L);var CNameMapping$L=(_CNameMapping$L={},_defineProperty(_CNameMapping$L,NAME$L,NAME$L),_defineProperty(_CNameMapping$L,"Klaviyo",NAME$L),_defineProperty(_CNameMapping$L,"klaviyo",NAME$L),_CNameMapping$L);
1331
-
1332
- var _CNameMapping$K;var DIR_NAME$K='LaunchDarkly';var NAME$K='LAUNCHDARKLY';var DISPLAY_NAME$K='LaunchDarkly';var DISPLAY_NAME_TO_DIR_NAME_MAP$K=_defineProperty({},DISPLAY_NAME$K,DIR_NAME$K);var CNameMapping$K=(_CNameMapping$K={},_defineProperty(_CNameMapping$K,NAME$K,NAME$K),_defineProperty(_CNameMapping$K,"LaunchDarkly",NAME$K),_defineProperty(_CNameMapping$K,"Launch_Darkly",NAME$K),_defineProperty(_CNameMapping$K,'Launch Darkly',NAME$K),_defineProperty(_CNameMapping$K,"launchDarkly",NAME$K),_defineProperty(_CNameMapping$K,'launch darkly',NAME$K),_CNameMapping$K);
1333
-
1334
- var _CNameMapping$J;var DIR_NAME$J='LinkedInInsightTag';var NAME$J='LINKEDIN_INSIGHT_TAG';var DISPLAY_NAME$J='Linkedin Insight Tag';var DISPLAY_NAME_TO_DIR_NAME_MAP$J=_defineProperty({},DISPLAY_NAME$J,DIR_NAME$J);var CNameMapping$J=(_CNameMapping$J={},_defineProperty(_CNameMapping$J,NAME$J,NAME$J),_defineProperty(_CNameMapping$J,'LinkedIn Insight Tag',NAME$J),_defineProperty(_CNameMapping$J,'LinkedIn insight tag',NAME$J),_defineProperty(_CNameMapping$J,'linkedIn insight tag',NAME$J),_defineProperty(_CNameMapping$J,"Linkedin_insight_tag",NAME$J),_defineProperty(_CNameMapping$J,"LinkedinInsighttag",NAME$J),_defineProperty(_CNameMapping$J,"LinkedinInsightTag",NAME$J),_defineProperty(_CNameMapping$J,"LinkedInInsightTag",NAME$J),_defineProperty(_CNameMapping$J,"Linkedininsighttag",NAME$J),_defineProperty(_CNameMapping$J,"LINKEDININSIGHTTAG",NAME$J),_defineProperty(_CNameMapping$J,"linkedininsighttag",NAME$J),_CNameMapping$J);
1335
-
1336
- var _CNameMapping$I;var DIR_NAME$I='Lotame';var NAME$I='LOTAME';var DISPLAY_NAME$I='Lotame';var DISPLAY_NAME_TO_DIR_NAME_MAP$I=_defineProperty({},DISPLAY_NAME$I,DIR_NAME$I);var CNameMapping$I=(_CNameMapping$I={},_defineProperty(_CNameMapping$I,NAME$I,NAME$I),_defineProperty(_CNameMapping$I,"Lotame",NAME$I),_defineProperty(_CNameMapping$I,"lotame",NAME$I),_CNameMapping$I);
1337
-
1338
- var _CNameMapping$H;var DIR_NAME$H='Lytics';var NAME$H='LYTICS';var DISPLAY_NAME$H='Lytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$H=_defineProperty({},DISPLAY_NAME$H,DIR_NAME$H);var CNameMapping$H=(_CNameMapping$H={},_defineProperty(_CNameMapping$H,NAME$H,NAME$H),_defineProperty(_CNameMapping$H,"Lytics",NAME$H),_defineProperty(_CNameMapping$H,"lytics",NAME$H),_CNameMapping$H);
1339
-
1340
- var _CNameMapping$G;var DIR_NAME$G='Mixpanel';var NAME$G='MP';var DISPLAY_NAME$G='Mixpanel';var DISPLAY_NAME_TO_DIR_NAME_MAP$G=_defineProperty({},DISPLAY_NAME$G,DIR_NAME$G);var CNameMapping$G=(_CNameMapping$G={},_defineProperty(_CNameMapping$G,NAME$G,NAME$G),_defineProperty(_CNameMapping$G,"MIXPANEL",NAME$G),_defineProperty(_CNameMapping$G,"Mixpanel",NAME$G),_defineProperty(_CNameMapping$G,'MIX PANEL',NAME$G),_defineProperty(_CNameMapping$G,'Mix panel',NAME$G),_defineProperty(_CNameMapping$G,'Mix Panel',NAME$G),_CNameMapping$G);
1341
-
1342
- var _CNameMapping$F;var DIR_NAME$F='MoEngage';var NAME$F='MOENGAGE';var DISPLAY_NAME$F='MoEngage';var DISPLAY_NAME_TO_DIR_NAME_MAP$F=_defineProperty({},DISPLAY_NAME$F,DIR_NAME$F);var CNameMapping$F=(_CNameMapping$F={},_defineProperty(_CNameMapping$F,NAME$F,NAME$F),_defineProperty(_CNameMapping$F,"MoEngage",NAME$F),_defineProperty(_CNameMapping$F,"moengage",NAME$F),_defineProperty(_CNameMapping$F,"Moengage",NAME$F),_defineProperty(_CNameMapping$F,'Mo Engage',NAME$F),_defineProperty(_CNameMapping$F,'mo engage',NAME$F),_defineProperty(_CNameMapping$F,'Mo engage',NAME$F),_CNameMapping$F);
1343
-
1344
- var _CNameMapping$E;var DIR_NAME$E='Optimizely';var NAME$E='OPTIMIZELY';var DISPLAY_NAME$E='Optimizely Web';var DISPLAY_NAME_TO_DIR_NAME_MAP$E=_defineProperty({},DISPLAY_NAME$E,DIR_NAME$E);var CNameMapping$E=(_CNameMapping$E={},_defineProperty(_CNameMapping$E,NAME$E,NAME$E),_defineProperty(_CNameMapping$E,"Optimizely",NAME$E),_defineProperty(_CNameMapping$E,"optimizely",NAME$E),_CNameMapping$E);
1345
-
1346
- var _CNameMapping$D;var DIR_NAME$D='Pendo';var NAME$D='PENDO';var DISPLAY_NAME$D='Pendo';var DISPLAY_NAME_TO_DIR_NAME_MAP$D=_defineProperty({},DISPLAY_NAME$D,DIR_NAME$D);var CNameMapping$D=(_CNameMapping$D={},_defineProperty(_CNameMapping$D,NAME$D,NAME$D),_defineProperty(_CNameMapping$D,"Pendo",NAME$D),_defineProperty(_CNameMapping$D,"pendo",NAME$D),_CNameMapping$D);
1347
-
1348
- var _CNameMapping$C;var DIR_NAME$C='PinterestTag';var NAME$C='PINTEREST_TAG';var DISPLAY_NAME$C='Pinterest Tag';var DISPLAY_NAME_TO_DIR_NAME_MAP$C=_defineProperty({},DISPLAY_NAME$C,DIR_NAME$C);var CNameMapping$C=(_CNameMapping$C={},_defineProperty(_CNameMapping$C,NAME$C,NAME$C),_defineProperty(_CNameMapping$C,"PinterestTag",NAME$C),_defineProperty(_CNameMapping$C,"Pinterest_Tag",NAME$C),_defineProperty(_CNameMapping$C,"PINTERESTTAG",NAME$C),_defineProperty(_CNameMapping$C,"pinterest",NAME$C),_defineProperty(_CNameMapping$C,"PinterestAds",NAME$C),_defineProperty(_CNameMapping$C,"Pinterest_Ads",NAME$C),_defineProperty(_CNameMapping$C,"Pinterest",NAME$C),_defineProperty(_CNameMapping$C,'Pinterest Tag',NAME$C),_defineProperty(_CNameMapping$C,'Pinterest tag',NAME$C),_defineProperty(_CNameMapping$C,'PINTEREST TAG',NAME$C),_defineProperty(_CNameMapping$C,'pinterest tag',NAME$C),_defineProperty(_CNameMapping$C,'Pinterest Ads',NAME$C),_defineProperty(_CNameMapping$C,'Pinterest ads',NAME$C),_CNameMapping$C);
1349
-
1350
- var _CNameMapping$B;var DIR_NAME$B='PostAffiliatePro';var NAME$B='POST_AFFILIATE_PRO';var DISPLAY_NAME$B='Post Affiliate Pro';var DISPLAY_NAME_TO_DIR_NAME_MAP$B=_defineProperty({},DISPLAY_NAME$B,DIR_NAME$B);var CNameMapping$B=(_CNameMapping$B={},_defineProperty(_CNameMapping$B,NAME$B,NAME$B),_defineProperty(_CNameMapping$B,"PostAffiliatePro",NAME$B),_defineProperty(_CNameMapping$B,"Post_affiliate_pro",NAME$B),_defineProperty(_CNameMapping$B,'Post Affiliate Pro',NAME$B),_defineProperty(_CNameMapping$B,'Post affiliate pro',NAME$B),_defineProperty(_CNameMapping$B,'post affiliate pro',NAME$B),_defineProperty(_CNameMapping$B,"postaffiliatepro",NAME$B),_defineProperty(_CNameMapping$B,"POSTAFFILIATEPRO",NAME$B),_CNameMapping$B);
1351
-
1352
- var _CNameMapping$A;var DIR_NAME$A='Posthog';var NAME$A='POSTHOG';var DISPLAY_NAME$A='PostHog';var DISPLAY_NAME_TO_DIR_NAME_MAP$A=_defineProperty({},DISPLAY_NAME$A,DIR_NAME$A);var CNameMapping$A=(_CNameMapping$A={},_defineProperty(_CNameMapping$A,NAME$A,NAME$A),_defineProperty(_CNameMapping$A,"PostHog",NAME$A),_defineProperty(_CNameMapping$A,"Posthog",NAME$A),_defineProperty(_CNameMapping$A,"posthog",NAME$A),_defineProperty(_CNameMapping$A,'Post Hog',NAME$A),_defineProperty(_CNameMapping$A,'Post hog',NAME$A),_defineProperty(_CNameMapping$A,'post hog',NAME$A),_CNameMapping$A);
1353
-
1354
- var _CNameMapping$z;var DIR_NAME$z='ProfitWell';var NAME$z='PROFITWELL';var DISPLAY_NAME$z='ProfitWell';var DISPLAY_NAME_TO_DIR_NAME_MAP$z=_defineProperty({},DISPLAY_NAME$z,DIR_NAME$z);var CNameMapping$z=(_CNameMapping$z={},_defineProperty(_CNameMapping$z,NAME$z,NAME$z),_defineProperty(_CNameMapping$z,"ProfitWell",NAME$z),_defineProperty(_CNameMapping$z,"profitwell",NAME$z),_defineProperty(_CNameMapping$z,"Profitwell",NAME$z),_defineProperty(_CNameMapping$z,'Profit Well',NAME$z),_defineProperty(_CNameMapping$z,'profit well',NAME$z),_defineProperty(_CNameMapping$z,'Profit well',NAME$z),_CNameMapping$z);
1355
-
1356
- var _CNameMapping$y;var DIR_NAME$y='Qualtrics';var NAME$y='QUALTRICS';var DISPLAY_NAME$y='Qualtrics';var DISPLAY_NAME_TO_DIR_NAME_MAP$y=_defineProperty({},DISPLAY_NAME$y,DIR_NAME$y);var CNameMapping$y=(_CNameMapping$y={},_defineProperty(_CNameMapping$y,NAME$y,NAME$y),_defineProperty(_CNameMapping$y,"Qualtrics",NAME$y),_defineProperty(_CNameMapping$y,"qualtrics",NAME$y),_CNameMapping$y);
1357
-
1358
- var _CNameMapping$x;var DIR_NAME$x='QuantumMetric';var NAME$x='QUANTUMMETRIC';var DISPLAY_NAME$x='Quantum Metric';var DISPLAY_NAME_TO_DIR_NAME_MAP$x=_defineProperty({},DISPLAY_NAME$x,DIR_NAME$x);var CNameMapping$x=(_CNameMapping$x={},_defineProperty(_CNameMapping$x,NAME$x,NAME$x),_defineProperty(_CNameMapping$x,'Quantum Metric',NAME$x),_defineProperty(_CNameMapping$x,'quantum Metric',NAME$x),_defineProperty(_CNameMapping$x,'quantum metric',NAME$x),_defineProperty(_CNameMapping$x,"QuantumMetric",NAME$x),_defineProperty(_CNameMapping$x,"quantumMetric",NAME$x),_defineProperty(_CNameMapping$x,"quantummetric",NAME$x),_defineProperty(_CNameMapping$x,"Quantum_Metric",NAME$x),_CNameMapping$x);
1359
-
1360
- var _CNameMapping$w;var DIR_NAME$w='RedditPixel';var NAME$w='REDDIT_PIXEL';var DISPLAY_NAME$w='Reddit Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$w=_defineProperty({},DISPLAY_NAME$w,DIR_NAME$w);var CNameMapping$w=(_CNameMapping$w={},_defineProperty(_CNameMapping$w,NAME$w,NAME$w),_defineProperty(_CNameMapping$w,"Reddit_Pixel",NAME$w),_defineProperty(_CNameMapping$w,"RedditPixel",NAME$w),_defineProperty(_CNameMapping$w,"REDDITPIXEL",NAME$w),_defineProperty(_CNameMapping$w,"redditpixel",NAME$w),_defineProperty(_CNameMapping$w,'Reddit Pixel',NAME$w),_defineProperty(_CNameMapping$w,'REDDIT PIXEL',NAME$w),_defineProperty(_CNameMapping$w,'reddit pixel',NAME$w),_CNameMapping$w);
1361
-
1362
- var _CNameMapping$v;var DIR_NAME$v='Sentry';var NAME$v='SENTRY';var DISPLAY_NAME$v='Sentry';var DISPLAY_NAME_TO_DIR_NAME_MAP$v=_defineProperty({},DISPLAY_NAME$v,DIR_NAME$v);var CNameMapping$v=(_CNameMapping$v={},_defineProperty(_CNameMapping$v,NAME$v,NAME$v),_defineProperty(_CNameMapping$v,"sentry",NAME$v),_defineProperty(_CNameMapping$v,"Sentry",NAME$v),_CNameMapping$v);
1363
-
1364
- var _CNameMapping$u;var DIR_NAME$u='SnapPixel';var NAME$u='SNAP_PIXEL';var DISPLAY_NAME$u='Snap Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$u=_defineProperty({},DISPLAY_NAME$u,DIR_NAME$u);var CNameMapping$u=(_CNameMapping$u={},_defineProperty(_CNameMapping$u,NAME$u,NAME$u),_defineProperty(_CNameMapping$u,"Snap_Pixel",NAME$u),_defineProperty(_CNameMapping$u,"SnapPixel",NAME$u),_defineProperty(_CNameMapping$u,"SNAPPIXEL",NAME$u),_defineProperty(_CNameMapping$u,"snappixel",NAME$u),_defineProperty(_CNameMapping$u,'Snap Pixel',NAME$u),_defineProperty(_CNameMapping$u,'SNAP PIXEL',NAME$u),_defineProperty(_CNameMapping$u,'snap pixel',NAME$u),_CNameMapping$u);
1365
-
1366
- var _CNameMapping$t;var DIR_NAME$t='TVSquared';var NAME$t='TVSQUARED';var DISPLAY_NAME$t='TVSquared';var DISPLAY_NAME_TO_DIR_NAME_MAP$t=_defineProperty({},DISPLAY_NAME$t,DIR_NAME$t);var CNameMapping$t=(_CNameMapping$t={},_defineProperty(_CNameMapping$t,NAME$t,NAME$t),_defineProperty(_CNameMapping$t,"TVSquared",NAME$t),_defineProperty(_CNameMapping$t,"tvsquared",NAME$t),_defineProperty(_CNameMapping$t,"tvSquared",NAME$t),_defineProperty(_CNameMapping$t,"TvSquared",NAME$t),_defineProperty(_CNameMapping$t,"Tvsquared",NAME$t),_defineProperty(_CNameMapping$t,'TV Squared',NAME$t),_defineProperty(_CNameMapping$t,'tv squared',NAME$t),_defineProperty(_CNameMapping$t,'tv Squared',NAME$t),_CNameMapping$t);
1367
-
1368
- var _CNameMapping$s;var DIR_NAME$s='VWO';var NAME$s='VWO';var DISPLAY_NAME$s='VWO';var DISPLAY_NAME_TO_DIR_NAME_MAP$s=_defineProperty({},DISPLAY_NAME$s,DIR_NAME$s);var CNameMapping$s=(_CNameMapping$s={},_defineProperty(_CNameMapping$s,NAME$s,NAME$s),_defineProperty(_CNameMapping$s,"VisualWebsiteOptimizer",NAME$s),_defineProperty(_CNameMapping$s,"Visualwebsiteoptimizer",NAME$s),_defineProperty(_CNameMapping$s,"visualwebsiteoptimizer",NAME$s),_defineProperty(_CNameMapping$s,"vwo",NAME$s),_defineProperty(_CNameMapping$s,'Visual Website Optimizer',NAME$s),_defineProperty(_CNameMapping$s,'Visual website optimizer',NAME$s),_defineProperty(_CNameMapping$s,'visual website optimizer',NAME$s),_CNameMapping$s);
1369
-
1370
- var _CNameMapping$r;var DIR_NAME$r='GA360';var NAME$r='GA360';var DISPLAY_NAME$r='Google Analytics 360';var DISPLAY_NAME_TO_DIR_NAME_MAP$r=_defineProperty({},DISPLAY_NAME$r,DIR_NAME$r);var CNameMapping$r=(_CNameMapping$r={},_defineProperty(_CNameMapping$r,NAME$r,NAME$r),_defineProperty(_CNameMapping$r,'Google Analytics 360',NAME$r),_defineProperty(_CNameMapping$r,'Google analytics 360',NAME$r),_defineProperty(_CNameMapping$r,'google analytics 360',NAME$r),_defineProperty(_CNameMapping$r,'Google Analytics360',NAME$r),_defineProperty(_CNameMapping$r,'Google analytics360',NAME$r),_defineProperty(_CNameMapping$r,'google analytics360',NAME$r),_defineProperty(_CNameMapping$r,"GoogleAnalytics360",NAME$r),_defineProperty(_CNameMapping$r,'GA 360',NAME$r),_CNameMapping$r);
1371
-
1372
- var _CNameMapping$q;var DIR_NAME$q='Adroll';var NAME$q='ADROLL';var DISPLAY_NAME$q='Adroll';var DISPLAY_NAME_TO_DIR_NAME_MAP$q=_defineProperty({},DISPLAY_NAME$q,DIR_NAME$q);var CNameMapping$q=(_CNameMapping$q={},_defineProperty(_CNameMapping$q,NAME$q,NAME$q),_defineProperty(_CNameMapping$q,"Adroll",NAME$q),_defineProperty(_CNameMapping$q,'Ad roll',NAME$q),_defineProperty(_CNameMapping$q,'ad roll',NAME$q),_defineProperty(_CNameMapping$q,"adroll",NAME$q),_CNameMapping$q);
1373
-
1374
- var _CNameMapping$p;var DIR_NAME$p='DCMFloodlight';var NAME$p='DCM_FLOODLIGHT';var DISPLAY_NAME$p='DCM Floodlight';var DISPLAY_NAME_TO_DIR_NAME_MAP$p=_defineProperty({},DISPLAY_NAME$p,DIR_NAME$p);var CNameMapping$p=(_CNameMapping$p={},_defineProperty(_CNameMapping$p,NAME$p,NAME$p),_defineProperty(_CNameMapping$p,'DCM Floodlight',NAME$p),_defineProperty(_CNameMapping$p,'dcm floodlight',NAME$p),_defineProperty(_CNameMapping$p,'Dcm Floodlight',NAME$p),_defineProperty(_CNameMapping$p,"DCMFloodlight",NAME$p),_defineProperty(_CNameMapping$p,"dcmfloodlight",NAME$p),_defineProperty(_CNameMapping$p,"DcmFloodlight",NAME$p),_defineProperty(_CNameMapping$p,"dcm_floodlight",NAME$p),_defineProperty(_CNameMapping$p,"DCM_Floodlight",NAME$p),_CNameMapping$p);
1375
-
1376
- var _CNameMapping$o;var DIR_NAME$o='Matomo';var NAME$o='MATOMO';var DISPLAY_NAME$o='Matomo';var DISPLAY_NAME_TO_DIR_NAME_MAP$o=_defineProperty({},DISPLAY_NAME$o,DIR_NAME$o);var CNameMapping$o=(_CNameMapping$o={},_defineProperty(_CNameMapping$o,NAME$o,NAME$o),_defineProperty(_CNameMapping$o,"Matomo",NAME$o),_defineProperty(_CNameMapping$o,"matomo",NAME$o),_CNameMapping$o);
1377
-
1378
- var _CNameMapping$n;var DIR_NAME$n='Vero';var NAME$n='VERO';var DISPLAY_NAME$n='Vero';var DISPLAY_NAME_TO_DIR_NAME_MAP$n=_defineProperty({},DISPLAY_NAME$n,DIR_NAME$n);var CNameMapping$n=(_CNameMapping$n={},_defineProperty(_CNameMapping$n,NAME$n,NAME$n),_defineProperty(_CNameMapping$n,"Vero",NAME$n),_defineProperty(_CNameMapping$n,"vero",NAME$n),_CNameMapping$n);
1379
-
1380
- var _CNameMapping$m;var DIR_NAME$m='Mouseflow';var NAME$m='MOUSEFLOW';var DISPLAY_NAME$m='Mouseflow';var DISPLAY_NAME_TO_DIR_NAME_MAP$m=_defineProperty({},DISPLAY_NAME$m,DIR_NAME$m);var CNameMapping$m=(_CNameMapping$m={},_defineProperty(_CNameMapping$m,NAME$m,NAME$m),_defineProperty(_CNameMapping$m,"Mouseflow",NAME$m),_defineProperty(_CNameMapping$m,"mouseflow",NAME$m),_defineProperty(_CNameMapping$m,"mouseFlow",NAME$m),_defineProperty(_CNameMapping$m,"MouseFlow",NAME$m),_defineProperty(_CNameMapping$m,'Mouse flow',NAME$m),_defineProperty(_CNameMapping$m,'mouse flow',NAME$m),_defineProperty(_CNameMapping$m,'mouse Flow',NAME$m),_defineProperty(_CNameMapping$m,'Mouse Flow',NAME$m),_CNameMapping$m);
1381
-
1382
- var _CNameMapping$l;var DIR_NAME$l='Rockerbox';var NAME$l='ROCKERBOX';var DISPLAY_NAME$l='Rockerbox';var DISPLAY_NAME_TO_DIR_NAME_MAP$l=_defineProperty({},DISPLAY_NAME$l,DIR_NAME$l);var CNameMapping$l=(_CNameMapping$l={},_defineProperty(_CNameMapping$l,NAME$l,NAME$l),_defineProperty(_CNameMapping$l,"Rockerbox",NAME$l),_defineProperty(_CNameMapping$l,"rockerbox",NAME$l),_defineProperty(_CNameMapping$l,"RockerBox",NAME$l),_defineProperty(_CNameMapping$l,'Rocker box',NAME$l),_defineProperty(_CNameMapping$l,'rocker box',NAME$l),_defineProperty(_CNameMapping$l,'Rocker Box',NAME$l),_CNameMapping$l);
1383
-
1384
- var _CNameMapping$k;var DIR_NAME$k='ConvertFlow';var NAME$k='CONVERTFLOW';var DISPLAY_NAME$k='ConvertFlow';var DISPLAY_NAME_TO_DIR_NAME_MAP$k=_defineProperty({},DISPLAY_NAME$k,DIR_NAME$k);var CNameMapping$k=(_CNameMapping$k={},_defineProperty(_CNameMapping$k,NAME$k,NAME$k),_defineProperty(_CNameMapping$k,"Convertflow",NAME$k),_defineProperty(_CNameMapping$k,"convertflow",NAME$k),_defineProperty(_CNameMapping$k,"convertFlow",NAME$k),_defineProperty(_CNameMapping$k,"ConvertFlow",NAME$k),_defineProperty(_CNameMapping$k,'Convert flow',NAME$k),_defineProperty(_CNameMapping$k,'convert flow',NAME$k),_defineProperty(_CNameMapping$k,'convert Flow',NAME$k),_defineProperty(_CNameMapping$k,'Convert Flow',NAME$k),_defineProperty(_CNameMapping$k,'CONVERT FLOW',NAME$k),_CNameMapping$k);
1385
-
1386
- var _CNameMapping$j;var DIR_NAME$j='SnapEngage';var NAME$j='SNAPENGAGE';var DISPLAY_NAME$j='SnapEngage';var DISPLAY_NAME_TO_DIR_NAME_MAP$j=_defineProperty({},DISPLAY_NAME$j,DIR_NAME$j);var CNameMapping$j=(_CNameMapping$j={},_defineProperty(_CNameMapping$j,NAME$j,NAME$j),_defineProperty(_CNameMapping$j,"SnapEngage",NAME$j),_defineProperty(_CNameMapping$j,"Snap_Engage",NAME$j),_defineProperty(_CNameMapping$j,"snapengage",NAME$j),_defineProperty(_CNameMapping$j,'SNAP ENGAGE',NAME$j),_defineProperty(_CNameMapping$j,'Snap Engage',NAME$j),_defineProperty(_CNameMapping$j,'snap engage',NAME$j),_CNameMapping$j);
1387
-
1388
- var _CNameMapping$i;var DIR_NAME$i='LiveChat';var NAME$i='LIVECHAT';var DISPLAY_NAME$i='LiveChat';var DISPLAY_NAME_TO_DIR_NAME_MAP$i=_defineProperty({},DISPLAY_NAME$i,DIR_NAME$i);var CNameMapping$i=(_CNameMapping$i={},_defineProperty(_CNameMapping$i,NAME$i,NAME$i),_defineProperty(_CNameMapping$i,"LiveChat",NAME$i),_defineProperty(_CNameMapping$i,"Live_Chat",NAME$i),_defineProperty(_CNameMapping$i,"livechat",NAME$i),_defineProperty(_CNameMapping$i,'LIVE CHAT',NAME$i),_defineProperty(_CNameMapping$i,'Live Chat',NAME$i),_defineProperty(_CNameMapping$i,'live chat',NAME$i),_CNameMapping$i);
1389
-
1390
- var _CNameMapping$h;var DIR_NAME$h='Shynet';var NAME$h='SHYNET';var DISPLAY_NAME$h='Shynet';var DISPLAY_NAME_TO_DIR_NAME_MAP$h=_defineProperty({},DISPLAY_NAME$h,DIR_NAME$h);var CNameMapping$h=(_CNameMapping$h={},_defineProperty(_CNameMapping$h,NAME$h,NAME$h),_defineProperty(_CNameMapping$h,"shynet",NAME$h),_defineProperty(_CNameMapping$h,"ShyNet",NAME$h),_defineProperty(_CNameMapping$h,"shyNet",NAME$h),_defineProperty(_CNameMapping$h,"Shynet",NAME$h),_defineProperty(_CNameMapping$h,'shy net',NAME$h),_defineProperty(_CNameMapping$h,'Shy Net',NAME$h),_defineProperty(_CNameMapping$h,'shy Net',NAME$h),_defineProperty(_CNameMapping$h,'Shy net',NAME$h),_CNameMapping$h);
1391
-
1392
- var _CNameMapping$g;var DIR_NAME$g='Woopra';var NAME$g='WOOPRA';var DISPLAY_NAME$g='Woopra';var DISPLAY_NAME_TO_DIR_NAME_MAP$g=_defineProperty({},DISPLAY_NAME$g,DIR_NAME$g);var CNameMapping$g=(_CNameMapping$g={},_defineProperty(_CNameMapping$g,NAME$g,NAME$g),_defineProperty(_CNameMapping$g,"Woopra",NAME$g),_defineProperty(_CNameMapping$g,"woopra",NAME$g),_CNameMapping$g);
1393
-
1394
- var _CNameMapping$f;var DIR_NAME$f='RollBar';var NAME$f='ROLLBAR';var DISPLAY_NAME$f='RollBar';var DISPLAY_NAME_TO_DIR_NAME_MAP$f=_defineProperty({},DISPLAY_NAME$f,DIR_NAME$f);var CNameMapping$f=(_CNameMapping$f={},_defineProperty(_CNameMapping$f,NAME$f,NAME$f),_defineProperty(_CNameMapping$f,"RollBar",NAME$f),_defineProperty(_CNameMapping$f,"Roll_Bar",NAME$f),_defineProperty(_CNameMapping$f,"rollbar",NAME$f),_defineProperty(_CNameMapping$f,"Rollbar",NAME$f),_defineProperty(_CNameMapping$f,'ROLL BAR',NAME$f),_defineProperty(_CNameMapping$f,'Roll Bar',NAME$f),_defineProperty(_CNameMapping$f,'roll bar',NAME$f),_CNameMapping$f);
1395
-
1396
- var _CNameMapping$e;var DIR_NAME$e='QuoraPixel';var NAME$e='QUORA_PIXEL';var DISPLAY_NAME$e='Quora Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$e=_defineProperty({},DISPLAY_NAME$e,DIR_NAME$e);var CNameMapping$e=(_CNameMapping$e={},_defineProperty(_CNameMapping$e,NAME$e,NAME$e),_defineProperty(_CNameMapping$e,'Quora Pixel',NAME$e),_defineProperty(_CNameMapping$e,'Quora pixel',NAME$e),_defineProperty(_CNameMapping$e,'QUORA PIXEL',NAME$e),_defineProperty(_CNameMapping$e,"QuoraPixel",NAME$e),_defineProperty(_CNameMapping$e,"Quorapixel",NAME$e),_defineProperty(_CNameMapping$e,"QUORAPIXEL",NAME$e),_defineProperty(_CNameMapping$e,"Quora_Pixel",NAME$e),_defineProperty(_CNameMapping$e,"quora_pixel",NAME$e),_defineProperty(_CNameMapping$e,"Quora",NAME$e),_CNameMapping$e);
1397
-
1398
- var _CNameMapping$d;var DIR_NAME$d='June';var NAME$d='JUNE';var DISPLAY_NAME$d='June';var DISPLAY_NAME_TO_DIR_NAME_MAP$d=_defineProperty({},DISPLAY_NAME$d,DIR_NAME$d);var CNameMapping$d=(_CNameMapping$d={},_defineProperty(_CNameMapping$d,NAME$d,NAME$d),_defineProperty(_CNameMapping$d,"June",NAME$d),_defineProperty(_CNameMapping$d,"june",NAME$d),_CNameMapping$d);
1399
-
1400
- var _CNameMapping$c;var DIR_NAME$c='Engage';var NAME$c='ENGAGE';var DISPLAY_NAME$c='Engage';var DISPLAY_NAME_TO_DIR_NAME_MAP$c=_defineProperty({},DISPLAY_NAME$c,DIR_NAME$c);var CNameMapping$c=(_CNameMapping$c={},_defineProperty(_CNameMapping$c,NAME$c,NAME$c),_defineProperty(_CNameMapping$c,"Engage",NAME$c),_defineProperty(_CNameMapping$c,"engage",NAME$c),_CNameMapping$c);
1401
-
1402
- var _CNameMapping$b;var DIR_NAME$b='Iterable';var NAME$b='ITERABLE';var DISPLAY_NAME$b='Iterable';var DISPLAY_NAME_TO_DIR_NAME_MAP$b=_defineProperty({},DISPLAY_NAME$b,DIR_NAME$b);var CNameMapping$b=(_CNameMapping$b={},_defineProperty(_CNameMapping$b,NAME$b,NAME$b),_defineProperty(_CNameMapping$b,"Iterable",NAME$b),_defineProperty(_CNameMapping$b,"iterable",NAME$b),_CNameMapping$b);
1403
-
1404
- var _CNameMapping$a;var DIR_NAME$a='YandexMetrica';var NAME$a='YANDEX_METRICA';var DISPLAY_NAME$a='Yandex.Metrica';var DISPLAY_NAME_TO_DIR_NAME_MAP$a=_defineProperty({},DISPLAY_NAME$a,DIR_NAME$a);var CNameMapping$a=(_CNameMapping$a={},_defineProperty(_CNameMapping$a,NAME$a,NAME$a),_defineProperty(_CNameMapping$a,"Yandexmetrica",NAME$a),_defineProperty(_CNameMapping$a,"yandexmetrica",NAME$a),_defineProperty(_CNameMapping$a,"yandexMetrica",NAME$a),_defineProperty(_CNameMapping$a,"YandexMetrica",NAME$a),_CNameMapping$a);
1405
-
1406
- var _CNameMapping$9;var DIR_NAME$9='Refiner';var NAME$9='REFINER';var DISPLAY_NAME$9='Refiner';var DISPLAY_NAME_TO_DIR_NAME_MAP$9=_defineProperty({},DISPLAY_NAME$9,DIR_NAME$9);var CNameMapping$9=(_CNameMapping$9={},_defineProperty(_CNameMapping$9,NAME$9,NAME$9),_defineProperty(_CNameMapping$9,"Refiner",NAME$9),_defineProperty(_CNameMapping$9,"refiner",NAME$9),_CNameMapping$9);
1407
-
1408
- var _CNameMapping$8;var DIR_NAME$8='Qualaroo';var NAME$8='QUALAROO';var DISPLAY_NAME$8='Qualaroo';var DISPLAY_NAME_TO_DIR_NAME_MAP$8=_defineProperty({},DISPLAY_NAME$8,DIR_NAME$8);var CNameMapping$8=(_CNameMapping$8={},_defineProperty(_CNameMapping$8,NAME$8,NAME$8),_defineProperty(_CNameMapping$8,"Qualaroo",NAME$8),_defineProperty(_CNameMapping$8,"qualaroo",NAME$8),_CNameMapping$8);
1409
-
1410
- var _CNameMapping$7;var DIR_NAME$7='Podsights';var NAME$7='PODSIGHTS';var DISPLAY_NAME$7='Podsights';var DISPLAY_NAME_TO_DIR_NAME_MAP$7=_defineProperty({},DISPLAY_NAME$7,DIR_NAME$7);var CNameMapping$7=(_CNameMapping$7={},_defineProperty(_CNameMapping$7,NAME$7,NAME$7),_defineProperty(_CNameMapping$7,"Podsights",NAME$7),_defineProperty(_CNameMapping$7,"PodSights",NAME$7),_defineProperty(_CNameMapping$7,'pod Sights',NAME$7),_defineProperty(_CNameMapping$7,'Pod Sights',NAME$7),_defineProperty(_CNameMapping$7,'pod sights',NAME$7),_defineProperty(_CNameMapping$7,'POD SIGHTS',NAME$7),_defineProperty(_CNameMapping$7,'Pod sights',NAME$7),_CNameMapping$7);// default mapping for the events
1411
-
1412
- var _CNameMapping$6;var DIR_NAME$6='Axeptio';var NAME$6='AXEPTIO';var DISPLAY_NAME$6='Axeptio';var DISPLAY_NAME_TO_DIR_NAME_MAP$6=_defineProperty({},DISPLAY_NAME$6,DIR_NAME$6);var CNameMapping$6=(_CNameMapping$6={},_defineProperty(_CNameMapping$6,NAME$6,NAME$6),_defineProperty(_CNameMapping$6,"Axeptio",NAME$6),_defineProperty(_CNameMapping$6,"axeptio",NAME$6),_CNameMapping$6);
1413
-
1414
- var _CNameMapping$5;var DIR_NAME$5='Satismeter';var NAME$5='SATISMETER';var DISPLAY_NAME$5='Satismeter';var DISPLAY_NAME_TO_DIR_NAME_MAP$5=_defineProperty({},DISPLAY_NAME$5,DIR_NAME$5);var CNameMapping$5=(_CNameMapping$5={},_defineProperty(_CNameMapping$5,NAME$5,NAME$5),_defineProperty(_CNameMapping$5,"Satismeter",NAME$5),_defineProperty(_CNameMapping$5,"SatisMeter",NAME$5),_CNameMapping$5);
1415
-
1416
- var _CNameMapping$4;var DIR_NAME$4='MicrosoftClarity';var NAME$4='MICROSOFT_CLARITY';var DISPLAY_NAME$4='Microsoft Clarity';var DISPLAY_NAME_TO_DIR_NAME_MAP$4=_defineProperty({},DISPLAY_NAME$4,DIR_NAME$4);var CNameMapping$4=(_CNameMapping$4={},_defineProperty(_CNameMapping$4,NAME$4,NAME$4),_defineProperty(_CNameMapping$4,'Microsoft Clarity',NAME$4),_defineProperty(_CNameMapping$4,'Microsoft clarity',NAME$4),_defineProperty(_CNameMapping$4,'microsoft clarity',NAME$4),_defineProperty(_CNameMapping$4,"Microsoft_clarity",NAME$4),_defineProperty(_CNameMapping$4,"MicrosoftClarity",NAME$4),_defineProperty(_CNameMapping$4,"MICROSOFTCLARITY",NAME$4),_defineProperty(_CNameMapping$4,"microsoftclarity",NAME$4),_defineProperty(_CNameMapping$4,"microsoftClarity",NAME$4),_CNameMapping$4);
1417
-
1418
- var _CNameMapping$3;var DIR_NAME$3='Sendinblue';var NAME$3='SENDINBLUE';var DISPLAY_NAME$3='Sendinblue';var DISPLAY_NAME_TO_DIR_NAME_MAP$3=_defineProperty({},DISPLAY_NAME$3,DIR_NAME$3);var CNameMapping$3=(_CNameMapping$3={},_defineProperty(_CNameMapping$3,NAME$3,NAME$3),_defineProperty(_CNameMapping$3,"Sendinblue",NAME$3),_defineProperty(_CNameMapping$3,"sendinblue",NAME$3),_defineProperty(_CNameMapping$3,"SendinBlue",NAME$3),_CNameMapping$3);
1419
-
1420
- var _CNameMapping$2;var DIR_NAME$2='Olark';var NAME$2='OLARK';var DISPLAY_NAME$2='Olark';var DISPLAY_NAME_TO_DIR_NAME_MAP$2=_defineProperty({},DISPLAY_NAME$2,DIR_NAME$2);var CNameMapping$2=(_CNameMapping$2={},_defineProperty(_CNameMapping$2,NAME$2,NAME$2),_defineProperty(_CNameMapping$2,"Olark",NAME$2),_defineProperty(_CNameMapping$2,"olark",NAME$2),_CNameMapping$2);
1421
-
1422
- var _CNameMapping$1;var DIR_NAME$1='Lemnisk';var NAME$1='LEMNISK';var DISPLAY_NAME$1='Lemnisk';var DISPLAY_NAME_TO_DIR_NAME_MAP$1=_defineProperty({},DISPLAY_NAME$1,DIR_NAME$1);var CNameMapping$1=(_CNameMapping$1={},_defineProperty(_CNameMapping$1,NAME$1,NAME$1),_defineProperty(_CNameMapping$1,"LEMNISK_MARKETING_AUTOMATION",NAME$1),_defineProperty(_CNameMapping$1,'Lemnisk Marketing Automation',NAME$1),_defineProperty(_CNameMapping$1,"LemniskMarketingAutomation",NAME$1),_defineProperty(_CNameMapping$1,"lemniskmarketingautomation",NAME$1),_defineProperty(_CNameMapping$1,"lemniskMarketingAutomation",NAME$1),_defineProperty(_CNameMapping$1,"lemnisk",NAME$1),_defineProperty(_CNameMapping$1,"Lemnisk",NAME$1),_CNameMapping$1);
1423
-
1424
- var _CNameMapping;var DIR_NAME='TiktokAds';var NAME='TIKTOK_ADS';var DISPLAY_NAME='TikTok Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP=_defineProperty({},DISPLAY_NAME,DIR_NAME);var CNameMapping=(_CNameMapping={},_defineProperty(_CNameMapping,NAME,NAME),_defineProperty(_CNameMapping,"TiktokAds",NAME),_defineProperty(_CNameMapping,'Tiktok ads',NAME),_defineProperty(_CNameMapping,'Tiktok Ads',NAME),_defineProperty(_CNameMapping,'Tik Tok Ads',NAME),_defineProperty(_CNameMapping,'tik tok ads',NAME),_defineProperty(_CNameMapping,"tiktokads",NAME),_CNameMapping);
1425
-
1426
- var replaceValuesWithDisplayName=function replaceValuesWithDisplayName(CNameMapping,displayName){var updatedCNameMapping={};Object.keys(CNameMapping).forEach(function(key){updatedCNameMapping[key]=displayName;});return updatedCNameMapping;};// As the common names mapping in v1.1 is mapped to the definition name
1427
- // we're converting the definition name to display names temporarily
1428
- var destCNamesToDisplayNamesMap=_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},replaceValuesWithDisplayName(CNameMapping$18,DISPLAY_NAME$18)),replaceValuesWithDisplayName(CNameMapping$17,DISPLAY_NAME$17)),replaceValuesWithDisplayName(CNameMapping$16,DISPLAY_NAME$16)),replaceValuesWithDisplayName(CNameMapping$15,DISPLAY_NAME$15)),replaceValuesWithDisplayName(CNameMapping$14,DISPLAY_NAME$14)),replaceValuesWithDisplayName(CNameMapping$13,DISPLAY_NAME$13)),replaceValuesWithDisplayName(CNameMapping$12,DISPLAY_NAME$12)),replaceValuesWithDisplayName(CNameMapping$11,DISPLAY_NAME$11)),replaceValuesWithDisplayName(CNameMapping$10,DISPLAY_NAME$10)),replaceValuesWithDisplayName(CNameMapping$$,DISPLAY_NAME$$)),replaceValuesWithDisplayName(CNameMapping$_,DISPLAY_NAME$_)),replaceValuesWithDisplayName(CNameMapping$Z,DISPLAY_NAME$Z)),replaceValuesWithDisplayName(CNameMapping$Y,DISPLAY_NAME$Y)),replaceValuesWithDisplayName(CNameMapping$X,DISPLAY_NAME$X)),replaceValuesWithDisplayName(CNameMapping$W,DISPLAY_NAME$W)),replaceValuesWithDisplayName(CNameMapping$V,DISPLAY_NAME$V)),replaceValuesWithDisplayName(CNameMapping$r,DISPLAY_NAME$r)),replaceValuesWithDisplayName(CNameMapping$U,DISPLAY_NAME$U)),replaceValuesWithDisplayName(CNameMapping$T,DISPLAY_NAME$T)),replaceValuesWithDisplayName(CNameMapping$S,DISPLAY_NAME$S)),replaceValuesWithDisplayName(CNameMapping$R,DISPLAY_NAME$R)),replaceValuesWithDisplayName(CNameMapping$Q,DISPLAY_NAME$Q)),replaceValuesWithDisplayName(CNameMapping$P,DISPLAY_NAME$P)),replaceValuesWithDisplayName(CNameMapping$O,DISPLAY_NAME$O)),replaceValuesWithDisplayName(CNameMapping$N,DISPLAY_NAME$N)),replaceValuesWithDisplayName(CNameMapping$M,DISPLAY_NAME$M)),replaceValuesWithDisplayName(CNameMapping$L,DISPLAY_NAME$L)),replaceValuesWithDisplayName(CNameMapping$K,DISPLAY_NAME$K)),replaceValuesWithDisplayName(CNameMapping$J,DISPLAY_NAME$J)),replaceValuesWithDisplayName(CNameMapping$I,DISPLAY_NAME$I)),replaceValuesWithDisplayName(CNameMapping$H,DISPLAY_NAME$H)),replaceValuesWithDisplayName(CNameMapping$G,DISPLAY_NAME$G)),replaceValuesWithDisplayName(CNameMapping$F,DISPLAY_NAME$F)),replaceValuesWithDisplayName(CNameMapping$E,DISPLAY_NAME$E)),replaceValuesWithDisplayName(CNameMapping$D,DISPLAY_NAME$D)),replaceValuesWithDisplayName(CNameMapping$C,DISPLAY_NAME$C)),replaceValuesWithDisplayName(CNameMapping$B,DISPLAY_NAME$B)),replaceValuesWithDisplayName(CNameMapping$A,DISPLAY_NAME$A)),replaceValuesWithDisplayName(CNameMapping$z,DISPLAY_NAME$z)),replaceValuesWithDisplayName(CNameMapping$y,DISPLAY_NAME$y)),replaceValuesWithDisplayName(CNameMapping$x,DISPLAY_NAME$x)),replaceValuesWithDisplayName(CNameMapping$w,DISPLAY_NAME$w)),replaceValuesWithDisplayName(CNameMapping$v,DISPLAY_NAME$v)),replaceValuesWithDisplayName(CNameMapping$u,DISPLAY_NAME$u)),replaceValuesWithDisplayName(CNameMapping$t,DISPLAY_NAME$t)),replaceValuesWithDisplayName(CNameMapping$s,DISPLAY_NAME$s)),replaceValuesWithDisplayName(CNameMapping$q,DISPLAY_NAME$q)),replaceValuesWithDisplayName(CNameMapping$p,DISPLAY_NAME$p)),replaceValuesWithDisplayName(CNameMapping$o,DISPLAY_NAME$o)),replaceValuesWithDisplayName(CNameMapping$n,DISPLAY_NAME$n)),replaceValuesWithDisplayName(CNameMapping$m,DISPLAY_NAME$m)),replaceValuesWithDisplayName(CNameMapping$k,DISPLAY_NAME$k)),replaceValuesWithDisplayName(CNameMapping$j,DISPLAY_NAME$j)),replaceValuesWithDisplayName(CNameMapping$i,DISPLAY_NAME$i)),replaceValuesWithDisplayName(CNameMapping$h,DISPLAY_NAME$h)),replaceValuesWithDisplayName(CNameMapping$g,DISPLAY_NAME$g)),replaceValuesWithDisplayName(CNameMapping$f,DISPLAY_NAME$f)),replaceValuesWithDisplayName(CNameMapping$e,DISPLAY_NAME$e)),replaceValuesWithDisplayName(CNameMapping$d,DISPLAY_NAME$d)),replaceValuesWithDisplayName(CNameMapping$c,DISPLAY_NAME$c)),replaceValuesWithDisplayName(CNameMapping$b,DISPLAY_NAME$b)),replaceValuesWithDisplayName(CNameMapping$l,DISPLAY_NAME$l)),replaceValuesWithDisplayName(CNameMapping$a,DISPLAY_NAME$a)),replaceValuesWithDisplayName(CNameMapping$9,DISPLAY_NAME$9)),replaceValuesWithDisplayName(CNameMapping$8,DISPLAY_NAME$8)),replaceValuesWithDisplayName(CNameMapping$7,DISPLAY_NAME$7)),replaceValuesWithDisplayName(CNameMapping$6,DISPLAY_NAME$6)),replaceValuesWithDisplayName(CNameMapping$5,DISPLAY_NAME$5)),replaceValuesWithDisplayName(CNameMapping$4,DISPLAY_NAME$4)),replaceValuesWithDisplayName(CNameMapping$3,DISPLAY_NAME$3)),replaceValuesWithDisplayName(CNameMapping$2,DISPLAY_NAME$2)),replaceValuesWithDisplayName(CNameMapping$1,DISPLAY_NAME$1)),replaceValuesWithDisplayName(CNameMapping,DISPLAY_NAME));
1429
-
1430
- /**
1431
- * Converts the common names of the destinations to their display names
1432
- * @param intgOptions Load or API integration options
1433
- */var normalizeIntegrationOptions=function normalizeIntegrationOptions(intgOptions){var normalizedIntegrationOptions={};if(intgOptions){Object.keys(intgOptions).forEach(function(key){var destOpts=clone$1(intgOptions[key]);if(key==='All'){normalizedIntegrationOptions[key]=Boolean(destOpts);}else {var displayName=destCNamesToDisplayNamesMap[key];if(displayName){normalizedIntegrationOptions[displayName]=destOpts;}else {normalizedIntegrationOptions[key]=destOpts;}}});}if(isUndefined(normalizedIntegrationOptions.All)){normalizedIntegrationOptions.All=true;}return normalizedIntegrationOptions;};
1434
-
1435
1123
  var EVENT_PAYLOAD_SIZE_BYTES_LIMIT=32*1024;// 32 KB
1436
1124
 
1437
1125
  var INVALID_SOURCE_CONFIG_ERROR="Invalid source configuration or source id.";// ERROR
@@ -1449,20 +1137,13 @@
1449
1137
  * @param event RudderEvent object
1450
1138
  * @param logger Logger instance
1451
1139
  */var validateEventPayloadSize=function validateEventPayloadSize(event,logger){var payloadStr=getDeliveryPayload$1(event,logger);if(payloadStr){var payloadSize=payloadStr.length;if(payloadSize>EVENT_PAYLOAD_SIZE_BYTES_LIMIT){logger===null||logger===void 0||logger.warn(EVENT_PAYLOAD_SIZE_CHECK_FAIL_WARNING(QUEUE_UTILITIES,payloadSize,EVENT_PAYLOAD_SIZE_BYTES_LIMIT));}}else {logger===null||logger===void 0||logger.warn(EVENT_PAYLOAD_SIZE_VALIDATION_WARNING(QUEUE_UTILITIES));}};/**
1452
- * Filters and returns the user supplied integrations config that should take preference over the destination specific integrations config
1453
- * @param eventIntgConfig User supplied integrations config at event level
1454
- * @param destinationsIntgConfig Cumulative integrations config from all destinations
1455
- * @returns Filtered user supplied integrations config
1456
- */var getOverriddenIntegrationOptions=function getOverriddenIntegrationOptions(eventIntgConfig,destinationsIntgConfig){return Object.keys(eventIntgConfig).filter(function(intgName){return eventIntgConfig[intgName]!==true||!destinationsIntgConfig[intgName];}).reduce(function(obj,key){var retVal=clone$1(obj);retVal[key]=eventIntgConfig[key];return retVal;},{});};/**
1457
1140
  * Mutates the event and return final event for delivery
1458
1141
  * Updates certain parameters like sentAt timestamp, integrations config etc.
1459
1142
  * @param event RudderEvent object
1460
1143
  * @param state Application state
1461
1144
  * @returns Final event ready to be delivered
1462
- */var getFinalEventForDeliveryMutator=function getFinalEventForDeliveryMutator(event,state){var finalEvent=clone$1(event);// Update sentAt timestamp to the latest timestamp
1463
- finalEvent.sentAt=getCurrentTimeFormatted();// Merge the destination specific integrations config with the event's integrations config
1464
- // In general, the preference is given to the event's integrations config
1465
- var eventIntgConfig=normalizeIntegrationOptions(event.integrations);var destinationsIntgConfig=state.nativeDestinations.integrationsConfig.value;var overriddenIntgOpts=getOverriddenIntegrationOptions(eventIntgConfig,destinationsIntgConfig);finalEvent.integrations=mergeDeepRight(destinationsIntgConfig,overriddenIntgOpts);return finalEvent;};
1145
+ */var getFinalEventForDeliveryMutator=function getFinalEventForDeliveryMutator(event){var finalEvent=clone$1(event);// Update sentAt timestamp to the latest timestamp
1146
+ finalEvent.sentAt=getCurrentTimeFormatted();return finalEvent;};
1466
1147
 
1467
1148
  var removeDuplicateSlashes=function removeDuplicateSlashes(str){return str.replace(/\/{2,}/g,'/');};
1468
1149
 
@@ -1478,13 +1159,23 @@
1478
1159
  * @returns stringified events payload as Blob, undefined if error occurs.
1479
1160
  */var getDeliveryPayload=function getDeliveryPayload(events,logger){var data={batch:events};try{var blobPayload=stringifyWithoutCircular(data,true);var blobOptions={type:'text/plain'};if(blobPayload){return new Blob([blobPayload],blobOptions);}logger===null||logger===void 0||logger.error(BEACON_QUEUE_STRING_CONVERSION_FAILURE_ERROR(BEACON_QUEUE_PLUGIN));}catch(err){logger===null||logger===void 0||logger.error(BEACON_QUEUE_BLOB_CONVERSION_FAILURE_ERROR(BEACON_QUEUE_PLUGIN),err);}return undefined;};var getNormalizedBeaconQueueOptions=function getNormalizedBeaconQueueOptions(queueOpts){return mergeDeepRight(DEFAULT_BEACON_QUEUE_OPTIONS,queueOpts);};var getDeliveryUrl$1=function getDeliveryUrl(dataplaneUrl,writeKey){var dpUrl=new URL(dataplaneUrl);return new URL(removeDuplicateSlashes([dpUrl.pathname,'/','beacon','/',DATA_PLANE_API_VERSION$1,'/',"batch?writeKey=".concat(writeKey)].join('')),dpUrl).href;};
1480
1161
 
1162
+ function random(len){return crypto.getRandomValues(new Uint8Array(len));}
1163
+
1164
+ var SIZE=4096,HEX$1=[],IDX$1=0,BUFFER$1;for(;IDX$1<256;IDX$1++){HEX$1[IDX$1]=(IDX$1+256).toString(16).substring(1);}function v4$1(){if(!BUFFER$1||IDX$1+16>SIZE){BUFFER$1=random(SIZE);IDX$1=0;}var i=0,tmp,out='';for(;i<16;i++){tmp=BUFFER$1[IDX$1+i];if(i==6)out+=HEX$1[tmp&15|64];else if(i==8)out+=HEX$1[tmp&63|128];else out+=HEX$1[tmp];if(i&1&&i>1&&i<11)out+='-';}IDX$1+=16;return out;}
1165
+
1166
+ var IDX=256,HEX=[],BUFFER;while(IDX--)HEX[IDX]=(IDX+256).toString(16).substring(1);function v4(){var i=0,num,out='';if(!BUFFER||IDX+16>256){BUFFER=Array(i=256);while(i--)BUFFER[i]=256*Math.random()|0;i=IDX=0;}for(;i<16;i++){num=BUFFER[IDX+i];if(i==6)out+=HEX[num&15|64];else if(i==8)out+=HEX[num&63|128];else out+=HEX[num];if(i&1&&i>1&&i<11)out+='-';}IDX++;return out;}
1167
+
1168
+ var hasCrypto$1=function hasCrypto(){return !isNullOrUndefined(globalThis.crypto)&&isFunction(globalThis.crypto.getRandomValues);};
1169
+
1170
+ var generateUUID=function generateUUID(){if(hasCrypto$1()){return v4$1();}return v4();};
1171
+
1481
1172
  var COOKIE_STORAGE='cookieStorage';var LOCAL_STORAGE='localStorage';var SESSION_STORAGE='sessionStorage';var MEMORY_STORAGE='memoryStorage';var NO_STORAGE='none';
1482
1173
 
1483
1174
  var sortByTime$1=function sortByTime(a,b){return a.time-b.time;};var BeaconItemsQueue=/*#__PURE__*/function(){function BeaconItemsQueue(name,options,queueProcessCb,storeManager){var _options$maxItems,_options$flushQueueIn;var storageType=arguments.length>4&&arguments[4]!==undefined?arguments[4]:MEMORY_STORAGE;_classCallCheck(this,BeaconItemsQueue);this.storeManager=storeManager;this.name=name;this.id=generateUUID();this.processQueueCb=queueProcessCb;this.maxItems=(_options$maxItems=options.maxItems)!==null&&_options$maxItems!==void 0?_options$maxItems:DEFAULT_BEACON_QUEUE_OPTIONS.maxItems;this.timeouts={flushQueueTimeOutInterval:(_options$flushQueueIn=options.flushQueueInterval)!==null&&_options$flushQueueIn!==void 0?_options$flushQueueIn:DEFAULT_BEACON_QUEUE_OPTIONS.flushQueueInterval};this.flushInProgress=false;this.nextFlushPending=false;// Set up our empty queues
1484
1175
  this.store=this.storeManager.setStore({id:this.id,name:this.name,type:storageType});this.flushQueue=this.flushQueue.bind(this);this.attachListeners();this.flushQueueTimeOut=undefined;this.scheduleTimeoutActive=false;}_createClass(BeaconItemsQueue,[{key:"attachListeners",value:function attachListeners(){var _this=this;globalThis.addEventListener('visibilitychange',function(){if(document.visibilityState==='hidden'){_this.flushQueue();}});}},{key:"getQueue",value:function getQueue(name){var _this$store$get;return (_this$store$get=this.store.get(name!==null&&name!==void 0?name:this.name))!==null&&_this$store$get!==void 0?_this$store$get:[];}},{key:"setQueue",value:function setQueue(name,value){this.store.set(name!==null&&name!==void 0?name:this.name,value!==null&&value!==void 0?value:[]);}},{key:"start",value:function start(){if(!this.scheduleTimeoutActive){this.flushQueueTimeOut=globalThis.setTimeout(this.flushQueue,this.timeouts.flushQueueTimeOutInterval);this.scheduleTimeoutActive=true;}}},{key:"stop",value:function stop(){if(this.scheduleTimeoutActive){clearTimeout(this.flushQueueTimeOut);this.scheduleTimeoutActive=false;}}},{key:"enqueue",value:function enqueue(entry){var queue=this.getQueue();// Get max items from the queue minus one
1485
1176
  queue=queue.slice(-(this.maxItems-1));queue.push(entry);queue=queue.sort(sortByTime$1);// Calculate response payload size after the addition of new event
1486
1177
  var eventsToSend=queue.slice(0);var batchData=getDeliveryPayload(eventsToSend.map(function(queueItem){return queueItem.item.event;}));// Send events that existed in the queue if totaling more max payload size
1487
- var isExceededMaxPayloadSize=Boolean(batchData&&batchData.length>MAX_BATCH_PAYLOAD_SIZE_BYTES);if(isExceededMaxPayloadSize){// Flush all previous items
1178
+ var isExceededMaxPayloadSize=Boolean(batchData&&batchData.size>MAX_BATCH_PAYLOAD_SIZE_BYTES);if(isExceededMaxPayloadSize){// Flush all previous items
1488
1179
  eventsToSend=queue.slice(0,queue.length-1);this.flushQueue(eventsToSend);// Add only latest item in the remaining queue that is cleared appropriately in flushQueue
1489
1180
  queue=this.getQueue();queue.push(entry);}this.setQueue(this.name,queue);// If queue has total of max items then flush
1490
1181
  if(queue.length===this.maxItems){this.flushQueue();}this.start();}},{key:"addItem",value:function addItem(itemData){this.enqueue({item:itemData,attemptNumber:0,time:Date.now(),id:generateUUID()});}},{key:"flushQueue",value:function flushQueue(queueItems){var _this2=this;if(!this.flushInProgress){this.flushInProgress=true;var batchItems=queueItems!==null&&queueItems!==void 0?queueItems:this.getQueue();var batchData=batchItems&&batchItems.length>0?batchItems.slice(0,batchItems.length):[];// TODO: add retry mechanism here
@@ -1500,7 +1191,7 @@
1500
1191
  * @param errorHandler Error handler instance
1501
1192
  * @param logger Logger instance
1502
1193
  * @returns BeaconItemsQueue instance
1503
- */init:function init(state,httpClient,storeManager,errorHandler,logger){var _state$loadOptions$va;var writeKey=state.lifecycle.writeKey.value;var dataplaneUrl=state.lifecycle.activeDataplaneUrl.value;var url=getDeliveryUrl$1(dataplaneUrl,writeKey);var finalQOpts=getNormalizedBeaconQueueOptions((_state$loadOptions$va=state.loadOptions.value.beaconQueueOptions)!==null&&_state$loadOptions$va!==void 0?_state$loadOptions$va:{});var queueProcessCallback=function queueProcessCallback(queueItems,done){logger===null||logger===void 0||logger.debug(BEACON_PLUGIN_EVENTS_QUEUE_DEBUG(BEACON_QUEUE_PLUGIN));var finalEvents=queueItems.map(function(queueItem){return getFinalEventForDeliveryMutator(queueItem.item.event,state);});var data=getDeliveryPayload(finalEvents);if(data){try{var isEnqueuedInBeacon=navigator.sendBeacon(url,data);if(!isEnqueuedInBeacon){logger===null||logger===void 0||logger.error(BEACON_QUEUE_SEND_ERROR(BEACON_QUEUE_PLUGIN));}done(null,isEnqueuedInBeacon);}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,BEACON_QUEUE_PLUGIN,BEACON_QUEUE_DELIVERY_ERROR(url));done(err);}}else {// Mark the item as done so that it can be removed from the queue
1194
+ */init:function init(state,httpClient,storeManager,errorHandler,logger){var _state$loadOptions$va;var writeKey=state.lifecycle.writeKey.value;var dataplaneUrl=state.lifecycle.activeDataplaneUrl.value;var url=getDeliveryUrl$1(dataplaneUrl,writeKey);var finalQOpts=getNormalizedBeaconQueueOptions((_state$loadOptions$va=state.loadOptions.value.beaconQueueOptions)!==null&&_state$loadOptions$va!==void 0?_state$loadOptions$va:{});var queueProcessCallback=function queueProcessCallback(queueItems,done){logger===null||logger===void 0||logger.debug(BEACON_PLUGIN_EVENTS_QUEUE_DEBUG(BEACON_QUEUE_PLUGIN));var finalEvents=queueItems.map(function(queueItem){return getFinalEventForDeliveryMutator(queueItem.item.event);});var data=getDeliveryPayload(finalEvents);if(data){try{var isEnqueuedInBeacon=navigator.sendBeacon(url,data);if(!isEnqueuedInBeacon){logger===null||logger===void 0||logger.error(BEACON_QUEUE_SEND_ERROR(BEACON_QUEUE_PLUGIN));}done(null,isEnqueuedInBeacon);}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,BEACON_QUEUE_PLUGIN,BEACON_QUEUE_DELIVERY_ERROR(url));done(err);}}else {// Mark the item as done so that it can be removed from the queue
1504
1195
  done(null);}};var eventsQueue=new BeaconItemsQueue("".concat(QUEUE_NAME$2,"_").concat(writeKey,"}"),finalQOpts,queueProcessCallback,storeManager);return eventsQueue;},/**
1505
1196
  * Add event to the queue for delivery
1506
1197
  * @param state Application state
@@ -1513,24 +1204,24 @@
1513
1204
  // It'll be updated to the latest timestamp during actual delivery
1514
1205
  event.sentAt=getCurrentTimeFormatted();validateEventPayloadSize(event,logger);eventsQueue.addItem({event:event});}}};};
1515
1206
 
1516
- var destDisplayNamesToFileNamesMap=_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},DISPLAY_NAME_TO_DIR_NAME_MAP$P),DISPLAY_NAME_TO_DIR_NAME_MAP$W),DISPLAY_NAME_TO_DIR_NAME_MAP$Q),DISPLAY_NAME_TO_DIR_NAME_MAP$U),DISPLAY_NAME_TO_DIR_NAME_MAP$s),DISPLAY_NAME_TO_DIR_NAME_MAP$S),DISPLAY_NAME_TO_DIR_NAME_MAP$14),DISPLAY_NAME_TO_DIR_NAME_MAP$O),DISPLAY_NAME_TO_DIR_NAME_MAP$N),DISPLAY_NAME_TO_DIR_NAME_MAP$M),DISPLAY_NAME_TO_DIR_NAME_MAP$_),DISPLAY_NAME_TO_DIR_NAME_MAP$12),DISPLAY_NAME_TO_DIR_NAME_MAP$10),DISPLAY_NAME_TO_DIR_NAME_MAP$Y),DISPLAY_NAME_TO_DIR_NAME_MAP$I),DISPLAY_NAME_TO_DIR_NAME_MAP$E),DISPLAY_NAME_TO_DIR_NAME_MAP$13),DISPLAY_NAME_TO_DIR_NAME_MAP$X),DISPLAY_NAME_TO_DIR_NAME_MAP$t),DISPLAY_NAME_TO_DIR_NAME_MAP$V),DISPLAY_NAME_TO_DIR_NAME_MAP$F),DISPLAY_NAME_TO_DIR_NAME_MAP$17),DISPLAY_NAME_TO_DIR_NAME_MAP$D),DISPLAY_NAME_TO_DIR_NAME_MAP$H),DISPLAY_NAME_TO_DIR_NAME_MAP$16),DISPLAY_NAME_TO_DIR_NAME_MAP$A),DISPLAY_NAME_TO_DIR_NAME_MAP$L),DISPLAY_NAME_TO_DIR_NAME_MAP$11),DISPLAY_NAME_TO_DIR_NAME_MAP$15),DISPLAY_NAME_TO_DIR_NAME_MAP$C),DISPLAY_NAME_TO_DIR_NAME_MAP$18),DISPLAY_NAME_TO_DIR_NAME_MAP$J),DISPLAY_NAME_TO_DIR_NAME_MAP$w),DISPLAY_NAME_TO_DIR_NAME_MAP$Z),DISPLAY_NAME_TO_DIR_NAME_MAP$R),DISPLAY_NAME_TO_DIR_NAME_MAP$$),DISPLAY_NAME_TO_DIR_NAME_MAP$G),DISPLAY_NAME_TO_DIR_NAME_MAP$y),DISPLAY_NAME_TO_DIR_NAME_MAP$z),DISPLAY_NAME_TO_DIR_NAME_MAP$v),DISPLAY_NAME_TO_DIR_NAME_MAP$x),DISPLAY_NAME_TO_DIR_NAME_MAP$u),DISPLAY_NAME_TO_DIR_NAME_MAP$B),DISPLAY_NAME_TO_DIR_NAME_MAP$T),DISPLAY_NAME_TO_DIR_NAME_MAP$K),DISPLAY_NAME_TO_DIR_NAME_MAP$r),DISPLAY_NAME_TO_DIR_NAME_MAP$q),DISPLAY_NAME_TO_DIR_NAME_MAP$p),DISPLAY_NAME_TO_DIR_NAME_MAP$o),DISPLAY_NAME_TO_DIR_NAME_MAP$n),DISPLAY_NAME_TO_DIR_NAME_MAP$m),DISPLAY_NAME_TO_DIR_NAME_MAP$l),DISPLAY_NAME_TO_DIR_NAME_MAP$k),DISPLAY_NAME_TO_DIR_NAME_MAP$j),DISPLAY_NAME_TO_DIR_NAME_MAP$i),DISPLAY_NAME_TO_DIR_NAME_MAP$h),DISPLAY_NAME_TO_DIR_NAME_MAP$g),DISPLAY_NAME_TO_DIR_NAME_MAP$f),DISPLAY_NAME_TO_DIR_NAME_MAP$e),DISPLAY_NAME_TO_DIR_NAME_MAP$d),DISPLAY_NAME_TO_DIR_NAME_MAP$c),DISPLAY_NAME_TO_DIR_NAME_MAP$b),DISPLAY_NAME_TO_DIR_NAME_MAP$a),DISPLAY_NAME_TO_DIR_NAME_MAP$9),DISPLAY_NAME_TO_DIR_NAME_MAP$8),DISPLAY_NAME_TO_DIR_NAME_MAP$7),DISPLAY_NAME_TO_DIR_NAME_MAP$6),DISPLAY_NAME_TO_DIR_NAME_MAP$5),DISPLAY_NAME_TO_DIR_NAME_MAP$4),DISPLAY_NAME_TO_DIR_NAME_MAP$3),DISPLAY_NAME_TO_DIR_NAME_MAP$2),DISPLAY_NAME_TO_DIR_NAME_MAP$1),DISPLAY_NAME_TO_DIR_NAME_MAP);
1517
-
1518
1207
  var BUGSNAG_LIB_INSTANCE_GLOBAL_KEY_NAME='bugsnag';// For version 6 and below
1519
1208
  var BUGSNAG_LIB_V7_INSTANCE_GLOBAL_KEY_NAME='Bugsnag';var GLOBAL_LIBRARY_OBJECT_NAMES=[BUGSNAG_LIB_V7_INSTANCE_GLOBAL_KEY_NAME,BUGSNAG_LIB_INSTANCE_GLOBAL_KEY_NAME];var BUGSNAG_CDN_URL='https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js';var ERROR_REPORT_PROVIDER_NAME_BUGSNAG='rs-bugsnag';// This API key token is parsed in the CI pipeline
1520
1209
  var API_KEY='0d96a60df267f4a13f808bbaa54e535c';var BUGSNAG_VALID_MAJOR_VERSION='6';var SDK_LOAD_POLL_INTERVAL_MS=100;// ms
1521
1210
  var MAX_WAIT_FOR_SDK_LOAD_MS=100*SDK_LOAD_POLL_INTERVAL_MS;// ms
1522
1211
  // Errors from the below scripts are NOT allowed to reach Bugsnag
1523
- var SDK_FILE_NAME_PREFIXES=function SDK_FILE_NAME_PREFIXES(){return ['rsa'].concat(_toConsumableArray(Object.values(destDisplayNamesToFileNamesMap)));};var DEV_HOSTS=['www.test-host.com','localhost','127.0.0.1','[::1]'];// List of keys to exclude from the metadata
1212
+ var SDK_FILE_NAME_PREFIXES=function SDK_FILE_NAME_PREFIXES(){return ['rsa'// Prefix for all the SDK scripts including plugins and module federated chunks
1213
+ ];};var DEV_HOSTS=['www.test-host.com','localhost','127.0.0.1','[::1]'];// List of keys to exclude from the metadata
1524
1214
  // Potential PII or sensitive data
1525
1215
  var APP_STATE_EXCLUDE_KEYS=['userId','userTraits','groupId','groupTraits','anonymousId','config','instance',// destination instance objects
1526
- 'anonymousUserId','eventBuffer',// pre-load event buffer (may contain PII)
1216
+ 'eventBuffer',// pre-load event buffer (may contain PII)
1527
1217
  'traits'];var BUGSNAG_PLUGIN='BugsnagPlugin';
1528
1218
 
1529
1219
  var isValidVersion=function isValidVersion(globalLibInstance){var _globalLibInstance$_c;// For version 7
1530
1220
  // eslint-disable-next-line no-underscore-dangle
1531
1221
  var version=globalLibInstance===null||globalLibInstance===void 0||(_globalLibInstance$_c=globalLibInstance._client)===null||_globalLibInstance$_c===void 0||(_globalLibInstance$_c=_globalLibInstance$_c._notifier)===null||_globalLibInstance$_c===void 0?void 0:_globalLibInstance$_c.version;// For versions older than 7
1532
1222
  if(!version){var _tempInstance$notifie;var tempInstance=globalLibInstance({apiKey:API_KEY,releaseStage:'version-test',// eslint-disable-next-line func-names, object-shorthand
1533
- beforeSend:function beforeSend(){return false;}});version=(_tempInstance$notifie=tempInstance.notifier)===null||_tempInstance$notifie===void 0?void 0:_tempInstance$notifie.version;}return version&&version.charAt(0)===BUGSNAG_VALID_MAJOR_VERSION;};var isRudderSDKError=function isRudderSDKError(event){var _event$stacktrace;var errorOrigin=(_event$stacktrace=event.stacktrace)===null||_event$stacktrace===void 0||(_event$stacktrace=_event$stacktrace[0])===null||_event$stacktrace===void 0?void 0:_event$stacktrace.file;if(!errorOrigin||typeof errorOrigin!=='string'){return false;}var srcFileName=errorOrigin.substring(errorOrigin.lastIndexOf('/')+1);return SDK_FILE_NAME_PREFIXES().some(function(prefix){return srcFileName.startsWith(prefix)&&srcFileName.endsWith('.js');});};var enhanceErrorEventMutator=function enhanceErrorEventMutator(event,metadataSource){event.updateMetaData('source',{metadataSource:metadataSource});var errorMessage=event.errorMessage;// eslint-disable-next-line no-param-reassign
1223
+ beforeSend:function beforeSend(){return false;}});version=(_tempInstance$notifie=tempInstance.notifier)===null||_tempInstance$notifie===void 0?void 0:_tempInstance$notifie.version;}return version&&version.charAt(0)===BUGSNAG_VALID_MAJOR_VERSION;};var isRudderSDKError=function isRudderSDKError(event){var _event$stacktrace;var errorOrigin=(_event$stacktrace=event.stacktrace)===null||_event$stacktrace===void 0||(_event$stacktrace=_event$stacktrace[0])===null||_event$stacktrace===void 0?void 0:_event$stacktrace.file;if(!errorOrigin||typeof errorOrigin!=='string'){return false;}// Prefix folder for all the destination SDK scripts
1224
+ var isDestinationIntegrationBundle=errorOrigin.includes(CDN_INT_DIR);var srcFileName=errorOrigin.substring(errorOrigin.lastIndexOf('/')+1);return isDestinationIntegrationBundle||SDK_FILE_NAME_PREFIXES().some(function(prefix){return srcFileName.startsWith(prefix)&&srcFileName.endsWith('.js');});};var enhanceErrorEventMutator=function enhanceErrorEventMutator(event,metadataSource){event.updateMetaData('source',{metadataSource:metadataSource});var errorMessage=event.errorMessage;// eslint-disable-next-line no-param-reassign
1534
1225
  event.context=errorMessage;// Hack for easily grouping the script load errors
1535
1226
  // on the dashboard
1536
1227
  if(errorMessage.includes('error in script loading')){// eslint-disable-next-line no-param-reassign
@@ -1538,7 +1229,7 @@
1538
1229
  event.severity='error';};var onError=function onError(state){var _state$source$value;var metadataSource=(_state$source$value=state.source.value)===null||_state$source$value===void 0?void 0:_state$source$value.id;return function(event){try{// Discard the event if it's not originated at the SDK
1539
1230
  if(!isRudderSDKError(event)){return false;}enhanceErrorEventMutator(event,metadataSource);return true;}catch(_unused){// Drop the error event if it couldn't be filtered as
1540
1231
  // it is most likely a non-SDK error
1541
- return false;}};};var getReleaseStage=function getReleaseStage(){var host=globalThis.location.hostname;return host&&DEV_HOSTS.includes(host)?'development':'production';};var getGlobalBugsnagLibInstance=function getGlobalBugsnagLibInstance(){return globalThis[BUGSNAG_LIB_INSTANCE_GLOBAL_KEY_NAME];};var getNewClient=function getNewClient(state,logger){var globalBugsnagLibInstance=getGlobalBugsnagLibInstance();var clientConfig={apiKey:API_KEY,appVersion:'3.0.0-beta.6',// Set SDK version as the app version from build config
1232
+ return false;}};};var getReleaseStage=function getReleaseStage(){var host=globalThis.location.hostname;return host&&DEV_HOSTS.includes(host)?'development':'production';};var getGlobalBugsnagLibInstance=function getGlobalBugsnagLibInstance(){return globalThis[BUGSNAG_LIB_INSTANCE_GLOBAL_KEY_NAME];};var getNewClient=function getNewClient(state,logger){var globalBugsnagLibInstance=getGlobalBugsnagLibInstance();var clientConfig={apiKey:API_KEY,appVersion:'3.0.0-beta.8',// Set SDK version as the app version from build config
1542
1233
  metaData:{SDK:{name:'JS',installType:'npm'}},beforeSend:onError(state),autoCaptureSessions:false,// auto capture sessions is disabled
1543
1234
  collectUserIp:false,// collecting user's IP is disabled
1544
1235
  // enabledBreadcrumbTypes: ['error', 'log', 'user'], // for v7 and above
@@ -1548,12 +1239,162 @@
1548
1239
  var pluginName$c='Bugsnag';var Bugsnag=function Bugsnag(){return {name:pluginName$c,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$c]);},errorReportingProvider:{init:function init(state,externalSrcLoader,logger){return new Promise(function(resolve,reject){// If API key token is not parsed or invalid, don't proceed to initialize the client
1549
1240
  if(!isApiKeyValid(API_KEY)){reject(new Error(BUGSNAG_API_KEY_VALIDATION_ERROR(API_KEY)));return;}loadBugsnagSDK(externalSrcLoader,logger);initBugsnagClient(state,resolve,reject,logger);});},notify:function notify(client,error,state,logger){client===null||client===void 0||client.notify(error,{metaData:{state:getAppStateForMetadata(state)}});},breadcrumb:function breadcrumb(client,message,logger){client===null||client===void 0||client.leaveBreadcrumb(message);}}};};
1550
1241
 
1242
+ var _CNameMapping$19;var DIR_NAME$19='AdobeAnalytics';var NAME$19='ADOBE_ANALYTICS';var DISPLAY_NAME$19='Adobe Analytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$19=_defineProperty({},DISPLAY_NAME$19,DIR_NAME$19);(_CNameMapping$19={'Adobe Analytics':NAME$19,ADOBEANALYTICS:NAME$19,'ADOBE ANALYTICS':NAME$19},_defineProperty(_CNameMapping$19,NAME$19,NAME$19),_defineProperty(_CNameMapping$19,"AdobeAnalytics",NAME$19),_defineProperty(_CNameMapping$19,"adobeanalytics",NAME$19),_defineProperty(_CNameMapping$19,'adobe analytics',NAME$19),_defineProperty(_CNameMapping$19,'Adobe analytics',NAME$19),_defineProperty(_CNameMapping$19,'adobe Analytics',NAME$19),_CNameMapping$19);
1243
+
1244
+ var _CNameMapping$18;var DIR_NAME$18='Amplitude';var NAME$18='AM';var DISPLAY_NAME$18='Amplitude';var DISPLAY_NAME_TO_DIR_NAME_MAP$18=_defineProperty({},DISPLAY_NAME$18,DIR_NAME$18);(_CNameMapping$18={},_defineProperty(_CNameMapping$18,NAME$18,NAME$18),_defineProperty(_CNameMapping$18,"AMPLITUDE",NAME$18),_defineProperty(_CNameMapping$18,"Amplitude",NAME$18),_defineProperty(_CNameMapping$18,"am",NAME$18),_CNameMapping$18);
1245
+
1246
+ var _CNameMapping$17;var DIR_NAME$17='Appcues';var NAME$17='APPCUES';var DISPLAY_NAME$17='Appcues';var DISPLAY_NAME_TO_DIR_NAME_MAP$17=_defineProperty({},DISPLAY_NAME$17,DIR_NAME$17);(_CNameMapping$17={},_defineProperty(_CNameMapping$17,NAME$17,NAME$17),_defineProperty(_CNameMapping$17,"Appcues",NAME$17),_defineProperty(_CNameMapping$17,'App Cues',NAME$17),_defineProperty(_CNameMapping$17,"appcues",NAME$17),_CNameMapping$17);
1247
+
1248
+ var _CNameMapping$16;var DIR_NAME$16='BingAds';var NAME$16='BINGADS';var DISPLAY_NAME$16='Bing Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$16=_defineProperty({},DISPLAY_NAME$16,DIR_NAME$16);(_CNameMapping$16={},_defineProperty(_CNameMapping$16,NAME$16,NAME$16),_defineProperty(_CNameMapping$16,"BingAds",NAME$16),_defineProperty(_CNameMapping$16,"bingads",NAME$16),_defineProperty(_CNameMapping$16,'Bing Ads',NAME$16),_defineProperty(_CNameMapping$16,'Bing ads',NAME$16),_defineProperty(_CNameMapping$16,'bing Ads',NAME$16),_defineProperty(_CNameMapping$16,'bing ads',NAME$16),_CNameMapping$16);
1249
+
1250
+ var _CNameMapping$15;var DIR_NAME$15='Braze';var NAME$15='BRAZE';var DISPLAY_NAME$15='Braze';var DISPLAY_NAME_TO_DIR_NAME_MAP$15=_defineProperty({},DISPLAY_NAME$15,DIR_NAME$15);(_CNameMapping$15={},_defineProperty(_CNameMapping$15,NAME$15,NAME$15),_defineProperty(_CNameMapping$15,"Braze",NAME$15),_defineProperty(_CNameMapping$15,"braze",NAME$15),_CNameMapping$15);
1251
+
1252
+ var _CNameMapping$14;var DIR_NAME$14='Bugsnag';var NAME$14='BUGSNAG';var DISPLAY_NAME$14='Bugsnag';var DISPLAY_NAME_TO_DIR_NAME_MAP$14=_defineProperty({},DISPLAY_NAME$14,DIR_NAME$14);(_CNameMapping$14={},_defineProperty(_CNameMapping$14,NAME$14,NAME$14),_defineProperty(_CNameMapping$14,"bugsnag",NAME$14),_defineProperty(_CNameMapping$14,"Bugsnag",NAME$14),_CNameMapping$14);
1253
+
1254
+ var _CNameMapping$13;var DIR_NAME$13='Chartbeat';var NAME$13='CHARTBEAT';var DISPLAY_NAME$13='Chartbeat';var DISPLAY_NAME_TO_DIR_NAME_MAP$13=_defineProperty({},DISPLAY_NAME$13,DIR_NAME$13);(_CNameMapping$13={},_defineProperty(_CNameMapping$13,NAME$13,NAME$13),_defineProperty(_CNameMapping$13,"Chartbeat",NAME$13),_defineProperty(_CNameMapping$13,"chartbeat",NAME$13),_defineProperty(_CNameMapping$13,'Chart Beat',NAME$13),_defineProperty(_CNameMapping$13,'chart beat',NAME$13),_CNameMapping$13);
1255
+
1256
+ var _CNameMapping$12;var DIR_NAME$12='Clevertap';var NAME$12='CLEVERTAP';var DISPLAY_NAME$12='CleverTap';var DISPLAY_NAME_TO_DIR_NAME_MAP$12=_defineProperty({},DISPLAY_NAME$12,DIR_NAME$12);(_CNameMapping$12={},_defineProperty(_CNameMapping$12,NAME$12,NAME$12),_defineProperty(_CNameMapping$12,"Clevertap",NAME$12),_defineProperty(_CNameMapping$12,"clevertap",NAME$12),_CNameMapping$12);
1257
+
1258
+ var _CNameMapping$11;var DIR_NAME$11='Comscore';var NAME$11='COMSCORE';var DISPLAY_NAME$11='Comscore';var DISPLAY_NAME_TO_DIR_NAME_MAP$11=_defineProperty({},DISPLAY_NAME$11,DIR_NAME$11);(_CNameMapping$11={},_defineProperty(_CNameMapping$11,NAME$11,NAME$11),_defineProperty(_CNameMapping$11,"Comscore",NAME$11),_defineProperty(_CNameMapping$11,'Com Score',NAME$11),_defineProperty(_CNameMapping$11,'com Score',NAME$11),_defineProperty(_CNameMapping$11,'com score',NAME$11),_defineProperty(_CNameMapping$11,'Com score',NAME$11),_CNameMapping$11);
1259
+
1260
+ var _CNameMapping$10;var DIR_NAME$10='Criteo';var NAME$10='CRITEO';var DISPLAY_NAME$10='Criteo';var DISPLAY_NAME_TO_DIR_NAME_MAP$10=_defineProperty({},DISPLAY_NAME$10,DIR_NAME$10);(_CNameMapping$10={},_defineProperty(_CNameMapping$10,NAME$10,NAME$10),_defineProperty(_CNameMapping$10,"Criteo",NAME$10),_defineProperty(_CNameMapping$10,"criteo",NAME$10),_CNameMapping$10);
1261
+
1262
+ var _CNameMapping$$;var DIR_NAME$$='CustomerIO';var NAME$$='CUSTOMERIO';var DISPLAY_NAME$$='Customer IO';var DISPLAY_NAME_TO_DIR_NAME_MAP$$=_defineProperty({},DISPLAY_NAME$$,DIR_NAME$$);(_CNameMapping$$={},_defineProperty(_CNameMapping$$,NAME$$,NAME$$),_defineProperty(_CNameMapping$$,"Customerio",NAME$$),_defineProperty(_CNameMapping$$,'Customer.io',NAME$$),_defineProperty(_CNameMapping$$,'CUSTOMER.IO',NAME$$),_defineProperty(_CNameMapping$$,'customer.io',NAME$$),_CNameMapping$$);
1263
+
1264
+ var _CNameMapping$_;var DIR_NAME$_='Drip';var NAME$_='DRIP';var DISPLAY_NAME$_='Drip';var DISPLAY_NAME_TO_DIR_NAME_MAP$_=_defineProperty({},DISPLAY_NAME$_,DIR_NAME$_);(_CNameMapping$_={},_defineProperty(_CNameMapping$_,NAME$_,NAME$_),_defineProperty(_CNameMapping$_,"Drip",NAME$_),_defineProperty(_CNameMapping$_,"drip",NAME$_),_CNameMapping$_);
1265
+
1266
+ var _CNameMapping$Z;var DIR_NAME$Z='FacebookPixel';var NAME$Z='FACEBOOK_PIXEL';var DISPLAY_NAME$Z='Facebook Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$Z=_defineProperty({},DISPLAY_NAME$Z,DIR_NAME$Z);(_CNameMapping$Z={},_defineProperty(_CNameMapping$Z,NAME$Z,NAME$Z),_defineProperty(_CNameMapping$Z,'FB Pixel',NAME$Z),_defineProperty(_CNameMapping$Z,'Facebook Pixel',NAME$Z),_defineProperty(_CNameMapping$Z,'facebook pixel',NAME$Z),_defineProperty(_CNameMapping$Z,"fbpixel",NAME$Z),_defineProperty(_CNameMapping$Z,"FBPIXEL",NAME$Z),_defineProperty(_CNameMapping$Z,"FB_PIXEL",NAME$Z),_CNameMapping$Z);
1267
+
1268
+ var _CNameMapping$Y;var DIR_NAME$Y='Fullstory';var NAME$Y='FULLSTORY';var DISPLAY_NAME$Y='Fullstory';var DISPLAY_NAME_TO_DIR_NAME_MAP$Y=_defineProperty({},DISPLAY_NAME$Y,DIR_NAME$Y);(_CNameMapping$Y={},_defineProperty(_CNameMapping$Y,NAME$Y,NAME$Y),_defineProperty(_CNameMapping$Y,"Fullstory",NAME$Y),_defineProperty(_CNameMapping$Y,"FullStory",NAME$Y),_defineProperty(_CNameMapping$Y,'full Story',NAME$Y),_defineProperty(_CNameMapping$Y,'Full Story',NAME$Y),_defineProperty(_CNameMapping$Y,'Full story',NAME$Y),_defineProperty(_CNameMapping$Y,'full story',NAME$Y),_defineProperty(_CNameMapping$Y,"fullstory",NAME$Y),_CNameMapping$Y);
1269
+
1270
+ var _CNameMapping$X;var DIR_NAME$X='GA';var NAME$X='GA';var DISPLAY_NAME$X='Google Analytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$X=_defineProperty({},DISPLAY_NAME$X,DIR_NAME$X);(_CNameMapping$X={},_defineProperty(_CNameMapping$X,NAME$X,NAME$X),_defineProperty(_CNameMapping$X,'Google Analytics',NAME$X),_defineProperty(_CNameMapping$X,"GoogleAnalytics",NAME$X),_defineProperty(_CNameMapping$X,'GOOGLE ANALYTICS',NAME$X),_defineProperty(_CNameMapping$X,'google analytics',NAME$X),_CNameMapping$X);
1271
+
1272
+ var _CNameMapping$W;var DIR_NAME$W='GA4';var NAME$W='GA4';var DISPLAY_NAME$W='Google Analytics 4 (GA4)';var DISPLAY_NAME_TO_DIR_NAME_MAP$W=_defineProperty({},DISPLAY_NAME$W,DIR_NAME$W);(_CNameMapping$W={},_defineProperty(_CNameMapping$W,NAME$W,NAME$W),_defineProperty(_CNameMapping$W,'Google Analytics 4',NAME$W),_defineProperty(_CNameMapping$W,'Google analytics 4',NAME$W),_defineProperty(_CNameMapping$W,'google analytics 4',NAME$W),_defineProperty(_CNameMapping$W,'Google Analytics4',NAME$W),_defineProperty(_CNameMapping$W,'Google analytics4',NAME$W),_defineProperty(_CNameMapping$W,'google analytics4',NAME$W),_defineProperty(_CNameMapping$W,'Google Analytics 4 (GA4)',NAME$W),_defineProperty(_CNameMapping$W,'google analytics 4 (ga4)',NAME$W),_defineProperty(_CNameMapping$W,"GoogleAnalytics4",NAME$W),_CNameMapping$W);
1273
+
1274
+ var _CNameMapping$V;var DIR_NAME$V='GoogleAds';var NAME$V='GOOGLEADS';var DISPLAY_NAME$V='Google Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$V=_defineProperty({},DISPLAY_NAME$V,DIR_NAME$V);(_CNameMapping$V={},_defineProperty(_CNameMapping$V,NAME$V,NAME$V),_defineProperty(_CNameMapping$V,'Google Ads',NAME$V),_defineProperty(_CNameMapping$V,"GoogleAds",NAME$V),_defineProperty(_CNameMapping$V,'GOOGLE ADS',NAME$V),_defineProperty(_CNameMapping$V,'google ads',NAME$V),_defineProperty(_CNameMapping$V,"googleads",NAME$V),_CNameMapping$V);
1275
+
1276
+ var _CNameMapping$U;var DIR_NAME$U='GoogleOptimize';var NAME$U='GOOGLE_OPTIMIZE';var DISPLAY_NAME$U='Google Optimize';var DISPLAY_NAME_TO_DIR_NAME_MAP$U=_defineProperty({},DISPLAY_NAME$U,DIR_NAME$U);(_CNameMapping$U={},_defineProperty(_CNameMapping$U,NAME$U,NAME$U),_defineProperty(_CNameMapping$U,'Google Optimize',NAME$U),_defineProperty(_CNameMapping$U,"GoogleOptimize",NAME$U),_defineProperty(_CNameMapping$U,"Googleoptimize",NAME$U),_defineProperty(_CNameMapping$U,"GOOGLEOPTIMIZE",NAME$U),_defineProperty(_CNameMapping$U,'google optimize',NAME$U),_defineProperty(_CNameMapping$U,'Google optimize',NAME$U),_defineProperty(_CNameMapping$U,'GOOGLE OPTIMIZE',NAME$U),_CNameMapping$U);
1277
+
1278
+ var _CNameMapping$T;var DIR_NAME$T='GoogleTagManager';var NAME$T='GTM';var DISPLAY_NAME$T='Google Tag Manager';var DISPLAY_NAME_TO_DIR_NAME_MAP$T=_defineProperty({},DISPLAY_NAME$T,DIR_NAME$T);(_CNameMapping$T={},_defineProperty(_CNameMapping$T,NAME$T,NAME$T),_defineProperty(_CNameMapping$T,'Google Tag Manager',NAME$T),_defineProperty(_CNameMapping$T,'google tag manager',NAME$T),_defineProperty(_CNameMapping$T,'googletag manager',NAME$T),_defineProperty(_CNameMapping$T,"googletagmanager",NAME$T),_CNameMapping$T);
1279
+
1280
+ var _CNameMapping$S;var DIR_NAME$S='Heap';var NAME$S='HEAP';var DISPLAY_NAME$S='Heap.io';var DISPLAY_NAME_TO_DIR_NAME_MAP$S=_defineProperty({},DISPLAY_NAME$S,DIR_NAME$S);(_CNameMapping$S={},_defineProperty(_CNameMapping$S,NAME$S,NAME$S),_defineProperty(_CNameMapping$S,"Heap",NAME$S),_defineProperty(_CNameMapping$S,"heap",NAME$S),_defineProperty(_CNameMapping$S,'Heap.io',NAME$S),_CNameMapping$S);
1281
+
1282
+ var _CNameMapping$R;var DIR_NAME$R='Hotjar';var NAME$R='HOTJAR';var DISPLAY_NAME$R='Hotjar';var DISPLAY_NAME_TO_DIR_NAME_MAP$R=_defineProperty({},DISPLAY_NAME$R,DIR_NAME$R);(_CNameMapping$R={},_defineProperty(_CNameMapping$R,NAME$R,NAME$R),_defineProperty(_CNameMapping$R,"Hotjar",NAME$R),_defineProperty(_CNameMapping$R,"hotjar",NAME$R),_defineProperty(_CNameMapping$R,'Hot Jar',NAME$R),_defineProperty(_CNameMapping$R,'hot jar',NAME$R),_CNameMapping$R);
1283
+
1284
+ var _CNameMapping$Q;var DIR_NAME$Q='HubSpot';var NAME$Q='HS';var DISPLAY_NAME$Q='HubSpot';var DISPLAY_NAME_TO_DIR_NAME_MAP$Q=_defineProperty({},DISPLAY_NAME$Q,DIR_NAME$Q);(_CNameMapping$Q={},_defineProperty(_CNameMapping$Q,NAME$Q,NAME$Q),_defineProperty(_CNameMapping$Q,"Hubspot",NAME$Q),_defineProperty(_CNameMapping$Q,"HUBSPOT",NAME$Q),_defineProperty(_CNameMapping$Q,'hub spot',NAME$Q),_defineProperty(_CNameMapping$Q,'Hub Spot',NAME$Q),_defineProperty(_CNameMapping$Q,'Hub spot',NAME$Q),_CNameMapping$Q);
1285
+
1286
+ var _CNameMapping$P;var DIR_NAME$P='INTERCOM';var NAME$P='INTERCOM';var DISPLAY_NAME$P='Intercom';var DISPLAY_NAME_TO_DIR_NAME_MAP$P=_defineProperty({},DISPLAY_NAME$P,DIR_NAME$P);(_CNameMapping$P={},_defineProperty(_CNameMapping$P,NAME$P,NAME$P),_defineProperty(_CNameMapping$P,"Intercom",NAME$P),_defineProperty(_CNameMapping$P,"intercom",NAME$P),_CNameMapping$P);
1287
+
1288
+ var _CNameMapping$O;var DIR_NAME$O='Keen';var NAME$O='KEEN';var DISPLAY_NAME$O='Keen';var DISPLAY_NAME_TO_DIR_NAME_MAP$O=_defineProperty({},DISPLAY_NAME$O,DIR_NAME$O);(_CNameMapping$O={},_defineProperty(_CNameMapping$O,NAME$O,NAME$O),_defineProperty(_CNameMapping$O,"Keen",NAME$O),_defineProperty(_CNameMapping$O,'Keen.io',NAME$O),_defineProperty(_CNameMapping$O,"keen",NAME$O),_defineProperty(_CNameMapping$O,'keen.io',NAME$O),_CNameMapping$O);
1289
+
1290
+ var _CNameMapping$N;var DIR_NAME$N='Kissmetrics';var NAME$N='KISSMETRICS';var DISPLAY_NAME$N='Kiss Metrics';var DISPLAY_NAME_TO_DIR_NAME_MAP$N=_defineProperty({},DISPLAY_NAME$N,DIR_NAME$N);(_CNameMapping$N={},_defineProperty(_CNameMapping$N,NAME$N,NAME$N),_defineProperty(_CNameMapping$N,"Kissmetrics",NAME$N),_defineProperty(_CNameMapping$N,"kissmetrics",NAME$N),_CNameMapping$N);
1291
+
1292
+ var _CNameMapping$M;var DIR_NAME$M='Klaviyo';var NAME$M='KLAVIYO';var DISPLAY_NAME$M='Klaviyo';var DISPLAY_NAME_TO_DIR_NAME_MAP$M=_defineProperty({},DISPLAY_NAME$M,DIR_NAME$M);(_CNameMapping$M={},_defineProperty(_CNameMapping$M,NAME$M,NAME$M),_defineProperty(_CNameMapping$M,"Klaviyo",NAME$M),_defineProperty(_CNameMapping$M,"klaviyo",NAME$M),_CNameMapping$M);
1293
+
1294
+ var _CNameMapping$L;var DIR_NAME$L='LaunchDarkly';var NAME$L='LAUNCHDARKLY';var DISPLAY_NAME$L='LaunchDarkly';var DISPLAY_NAME_TO_DIR_NAME_MAP$L=_defineProperty({},DISPLAY_NAME$L,DIR_NAME$L);(_CNameMapping$L={},_defineProperty(_CNameMapping$L,NAME$L,NAME$L),_defineProperty(_CNameMapping$L,"LaunchDarkly",NAME$L),_defineProperty(_CNameMapping$L,"Launch_Darkly",NAME$L),_defineProperty(_CNameMapping$L,'Launch Darkly',NAME$L),_defineProperty(_CNameMapping$L,"launchDarkly",NAME$L),_defineProperty(_CNameMapping$L,'launch darkly',NAME$L),_CNameMapping$L);
1295
+
1296
+ var _CNameMapping$K;var DIR_NAME$K='LinkedInInsightTag';var NAME$K='LINKEDIN_INSIGHT_TAG';var DISPLAY_NAME$K='Linkedin Insight Tag';var DISPLAY_NAME_TO_DIR_NAME_MAP$K=_defineProperty({},DISPLAY_NAME$K,DIR_NAME$K);(_CNameMapping$K={},_defineProperty(_CNameMapping$K,NAME$K,NAME$K),_defineProperty(_CNameMapping$K,'LinkedIn Insight Tag',NAME$K),_defineProperty(_CNameMapping$K,'LinkedIn insight tag',NAME$K),_defineProperty(_CNameMapping$K,'linkedIn insight tag',NAME$K),_defineProperty(_CNameMapping$K,"Linkedin_insight_tag",NAME$K),_defineProperty(_CNameMapping$K,"LinkedinInsighttag",NAME$K),_defineProperty(_CNameMapping$K,"LinkedinInsightTag",NAME$K),_defineProperty(_CNameMapping$K,"LinkedInInsightTag",NAME$K),_defineProperty(_CNameMapping$K,"Linkedininsighttag",NAME$K),_defineProperty(_CNameMapping$K,"LINKEDININSIGHTTAG",NAME$K),_defineProperty(_CNameMapping$K,"linkedininsighttag",NAME$K),_CNameMapping$K);
1297
+
1298
+ var _CNameMapping$J;var DIR_NAME$J='Lotame';var NAME$J='LOTAME';var DISPLAY_NAME$J='Lotame';var DISPLAY_NAME_TO_DIR_NAME_MAP$J=_defineProperty({},DISPLAY_NAME$J,DIR_NAME$J);(_CNameMapping$J={},_defineProperty(_CNameMapping$J,NAME$J,NAME$J),_defineProperty(_CNameMapping$J,"Lotame",NAME$J),_defineProperty(_CNameMapping$J,"lotame",NAME$J),_CNameMapping$J);
1299
+
1300
+ var _CNameMapping$I;var DIR_NAME$I='Lytics';var NAME$I='LYTICS';var DISPLAY_NAME$I='Lytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$I=_defineProperty({},DISPLAY_NAME$I,DIR_NAME$I);(_CNameMapping$I={},_defineProperty(_CNameMapping$I,NAME$I,NAME$I),_defineProperty(_CNameMapping$I,"Lytics",NAME$I),_defineProperty(_CNameMapping$I,"lytics",NAME$I),_CNameMapping$I);
1301
+
1302
+ var _CNameMapping$H;var DIR_NAME$H='Mixpanel';var NAME$H='MP';var DISPLAY_NAME$H='Mixpanel';var DISPLAY_NAME_TO_DIR_NAME_MAP$H=_defineProperty({},DISPLAY_NAME$H,DIR_NAME$H);(_CNameMapping$H={},_defineProperty(_CNameMapping$H,NAME$H,NAME$H),_defineProperty(_CNameMapping$H,"MIXPANEL",NAME$H),_defineProperty(_CNameMapping$H,"Mixpanel",NAME$H),_defineProperty(_CNameMapping$H,'MIX PANEL',NAME$H),_defineProperty(_CNameMapping$H,'Mix panel',NAME$H),_defineProperty(_CNameMapping$H,'Mix Panel',NAME$H),_CNameMapping$H);
1303
+
1304
+ var _CNameMapping$G;var DIR_NAME$G='MoEngage';var NAME$G='MOENGAGE';var DISPLAY_NAME$G='MoEngage';var DISPLAY_NAME_TO_DIR_NAME_MAP$G=_defineProperty({},DISPLAY_NAME$G,DIR_NAME$G);(_CNameMapping$G={},_defineProperty(_CNameMapping$G,NAME$G,NAME$G),_defineProperty(_CNameMapping$G,"MoEngage",NAME$G),_defineProperty(_CNameMapping$G,"moengage",NAME$G),_defineProperty(_CNameMapping$G,"Moengage",NAME$G),_defineProperty(_CNameMapping$G,'Mo Engage',NAME$G),_defineProperty(_CNameMapping$G,'mo engage',NAME$G),_defineProperty(_CNameMapping$G,'Mo engage',NAME$G),_CNameMapping$G);
1305
+
1306
+ var _CNameMapping$F;var DIR_NAME$F='Optimizely';var NAME$F='OPTIMIZELY';var DISPLAY_NAME$F='Optimizely Web';var DISPLAY_NAME_TO_DIR_NAME_MAP$F=_defineProperty({},DISPLAY_NAME$F,DIR_NAME$F);(_CNameMapping$F={},_defineProperty(_CNameMapping$F,NAME$F,NAME$F),_defineProperty(_CNameMapping$F,"Optimizely",NAME$F),_defineProperty(_CNameMapping$F,"optimizely",NAME$F),_CNameMapping$F);
1307
+
1308
+ var _CNameMapping$E;var DIR_NAME$E='Pendo';var NAME$E='PENDO';var DISPLAY_NAME$E='Pendo';var DISPLAY_NAME_TO_DIR_NAME_MAP$E=_defineProperty({},DISPLAY_NAME$E,DIR_NAME$E);(_CNameMapping$E={},_defineProperty(_CNameMapping$E,NAME$E,NAME$E),_defineProperty(_CNameMapping$E,"Pendo",NAME$E),_defineProperty(_CNameMapping$E,"pendo",NAME$E),_CNameMapping$E);
1309
+
1310
+ var _CNameMapping$D;var DIR_NAME$D='PinterestTag';var NAME$D='PINTEREST_TAG';var DISPLAY_NAME$D='Pinterest Tag';var DISPLAY_NAME_TO_DIR_NAME_MAP$D=_defineProperty({},DISPLAY_NAME$D,DIR_NAME$D);(_CNameMapping$D={},_defineProperty(_CNameMapping$D,NAME$D,NAME$D),_defineProperty(_CNameMapping$D,"PinterestTag",NAME$D),_defineProperty(_CNameMapping$D,"Pinterest_Tag",NAME$D),_defineProperty(_CNameMapping$D,"PINTERESTTAG",NAME$D),_defineProperty(_CNameMapping$D,"pinterest",NAME$D),_defineProperty(_CNameMapping$D,"PinterestAds",NAME$D),_defineProperty(_CNameMapping$D,"Pinterest_Ads",NAME$D),_defineProperty(_CNameMapping$D,"Pinterest",NAME$D),_defineProperty(_CNameMapping$D,'Pinterest Tag',NAME$D),_defineProperty(_CNameMapping$D,'Pinterest tag',NAME$D),_defineProperty(_CNameMapping$D,'PINTEREST TAG',NAME$D),_defineProperty(_CNameMapping$D,'pinterest tag',NAME$D),_defineProperty(_CNameMapping$D,'Pinterest Ads',NAME$D),_defineProperty(_CNameMapping$D,'Pinterest ads',NAME$D),_CNameMapping$D);
1311
+
1312
+ var _CNameMapping$C;var DIR_NAME$C='PostAffiliatePro';var NAME$C='POST_AFFILIATE_PRO';var DISPLAY_NAME$C='Post Affiliate Pro';var DISPLAY_NAME_TO_DIR_NAME_MAP$C=_defineProperty({},DISPLAY_NAME$C,DIR_NAME$C);(_CNameMapping$C={},_defineProperty(_CNameMapping$C,NAME$C,NAME$C),_defineProperty(_CNameMapping$C,"PostAffiliatePro",NAME$C),_defineProperty(_CNameMapping$C,"Post_affiliate_pro",NAME$C),_defineProperty(_CNameMapping$C,'Post Affiliate Pro',NAME$C),_defineProperty(_CNameMapping$C,'Post affiliate pro',NAME$C),_defineProperty(_CNameMapping$C,'post affiliate pro',NAME$C),_defineProperty(_CNameMapping$C,"postaffiliatepro",NAME$C),_defineProperty(_CNameMapping$C,"POSTAFFILIATEPRO",NAME$C),_CNameMapping$C);
1313
+
1314
+ var _CNameMapping$B;var DIR_NAME$B='Posthog';var NAME$B='POSTHOG';var DISPLAY_NAME$B='PostHog';var DISPLAY_NAME_TO_DIR_NAME_MAP$B=_defineProperty({},DISPLAY_NAME$B,DIR_NAME$B);(_CNameMapping$B={},_defineProperty(_CNameMapping$B,NAME$B,NAME$B),_defineProperty(_CNameMapping$B,"PostHog",NAME$B),_defineProperty(_CNameMapping$B,"Posthog",NAME$B),_defineProperty(_CNameMapping$B,"posthog",NAME$B),_defineProperty(_CNameMapping$B,'Post Hog',NAME$B),_defineProperty(_CNameMapping$B,'Post hog',NAME$B),_defineProperty(_CNameMapping$B,'post hog',NAME$B),_CNameMapping$B);
1315
+
1316
+ var _CNameMapping$A;var DIR_NAME$A='ProfitWell';var NAME$A='PROFITWELL';var DISPLAY_NAME$A='ProfitWell';var DISPLAY_NAME_TO_DIR_NAME_MAP$A=_defineProperty({},DISPLAY_NAME$A,DIR_NAME$A);(_CNameMapping$A={},_defineProperty(_CNameMapping$A,NAME$A,NAME$A),_defineProperty(_CNameMapping$A,"ProfitWell",NAME$A),_defineProperty(_CNameMapping$A,"profitwell",NAME$A),_defineProperty(_CNameMapping$A,"Profitwell",NAME$A),_defineProperty(_CNameMapping$A,'Profit Well',NAME$A),_defineProperty(_CNameMapping$A,'profit well',NAME$A),_defineProperty(_CNameMapping$A,'Profit well',NAME$A),_CNameMapping$A);
1317
+
1318
+ var _CNameMapping$z;var DIR_NAME$z='Qualtrics';var NAME$z='QUALTRICS';var DISPLAY_NAME$z='Qualtrics';var DISPLAY_NAME_TO_DIR_NAME_MAP$z=_defineProperty({},DISPLAY_NAME$z,DIR_NAME$z);(_CNameMapping$z={},_defineProperty(_CNameMapping$z,NAME$z,NAME$z),_defineProperty(_CNameMapping$z,"Qualtrics",NAME$z),_defineProperty(_CNameMapping$z,"qualtrics",NAME$z),_CNameMapping$z);
1319
+
1320
+ var _CNameMapping$y;var DIR_NAME$y='QuantumMetric';var NAME$y='QUANTUMMETRIC';var DISPLAY_NAME$y='Quantum Metric';var DISPLAY_NAME_TO_DIR_NAME_MAP$y=_defineProperty({},DISPLAY_NAME$y,DIR_NAME$y);(_CNameMapping$y={},_defineProperty(_CNameMapping$y,NAME$y,NAME$y),_defineProperty(_CNameMapping$y,'Quantum Metric',NAME$y),_defineProperty(_CNameMapping$y,'quantum Metric',NAME$y),_defineProperty(_CNameMapping$y,'quantum metric',NAME$y),_defineProperty(_CNameMapping$y,"QuantumMetric",NAME$y),_defineProperty(_CNameMapping$y,"quantumMetric",NAME$y),_defineProperty(_CNameMapping$y,"quantummetric",NAME$y),_defineProperty(_CNameMapping$y,"Quantum_Metric",NAME$y),_CNameMapping$y);
1321
+
1322
+ var _CNameMapping$x;var DIR_NAME$x='RedditPixel';var NAME$x='REDDIT_PIXEL';var DISPLAY_NAME$x='Reddit Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$x=_defineProperty({},DISPLAY_NAME$x,DIR_NAME$x);(_CNameMapping$x={},_defineProperty(_CNameMapping$x,NAME$x,NAME$x),_defineProperty(_CNameMapping$x,"Reddit_Pixel",NAME$x),_defineProperty(_CNameMapping$x,"RedditPixel",NAME$x),_defineProperty(_CNameMapping$x,"REDDITPIXEL",NAME$x),_defineProperty(_CNameMapping$x,"redditpixel",NAME$x),_defineProperty(_CNameMapping$x,'Reddit Pixel',NAME$x),_defineProperty(_CNameMapping$x,'REDDIT PIXEL',NAME$x),_defineProperty(_CNameMapping$x,'reddit pixel',NAME$x),_CNameMapping$x);
1323
+
1324
+ var _CNameMapping$w;var DIR_NAME$w='Sentry';var NAME$w='SENTRY';var DISPLAY_NAME$w='Sentry';var DISPLAY_NAME_TO_DIR_NAME_MAP$w=_defineProperty({},DISPLAY_NAME$w,DIR_NAME$w);(_CNameMapping$w={},_defineProperty(_CNameMapping$w,NAME$w,NAME$w),_defineProperty(_CNameMapping$w,"sentry",NAME$w),_defineProperty(_CNameMapping$w,"Sentry",NAME$w),_CNameMapping$w);
1325
+
1326
+ var _CNameMapping$v;var DIR_NAME$v='SnapPixel';var NAME$v='SNAP_PIXEL';var DISPLAY_NAME$v='Snap Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$v=_defineProperty({},DISPLAY_NAME$v,DIR_NAME$v);(_CNameMapping$v={},_defineProperty(_CNameMapping$v,NAME$v,NAME$v),_defineProperty(_CNameMapping$v,"Snap_Pixel",NAME$v),_defineProperty(_CNameMapping$v,"SnapPixel",NAME$v),_defineProperty(_CNameMapping$v,"SNAPPIXEL",NAME$v),_defineProperty(_CNameMapping$v,"snappixel",NAME$v),_defineProperty(_CNameMapping$v,'Snap Pixel',NAME$v),_defineProperty(_CNameMapping$v,'SNAP PIXEL',NAME$v),_defineProperty(_CNameMapping$v,'snap pixel',NAME$v),_CNameMapping$v);
1327
+
1328
+ var _CNameMapping$u;var DIR_NAME$u='TVSquared';var NAME$u='TVSQUARED';var DISPLAY_NAME$u='TVSquared';var DISPLAY_NAME_TO_DIR_NAME_MAP$u=_defineProperty({},DISPLAY_NAME$u,DIR_NAME$u);(_CNameMapping$u={},_defineProperty(_CNameMapping$u,NAME$u,NAME$u),_defineProperty(_CNameMapping$u,"TVSquared",NAME$u),_defineProperty(_CNameMapping$u,"tvsquared",NAME$u),_defineProperty(_CNameMapping$u,"tvSquared",NAME$u),_defineProperty(_CNameMapping$u,"TvSquared",NAME$u),_defineProperty(_CNameMapping$u,"Tvsquared",NAME$u),_defineProperty(_CNameMapping$u,'TV Squared',NAME$u),_defineProperty(_CNameMapping$u,'tv squared',NAME$u),_defineProperty(_CNameMapping$u,'tv Squared',NAME$u),_CNameMapping$u);
1329
+
1330
+ var _CNameMapping$t;var DIR_NAME$t='VWO';var NAME$t='VWO';var DISPLAY_NAME$t='VWO';var DISPLAY_NAME_TO_DIR_NAME_MAP$t=_defineProperty({},DISPLAY_NAME$t,DIR_NAME$t);(_CNameMapping$t={},_defineProperty(_CNameMapping$t,NAME$t,NAME$t),_defineProperty(_CNameMapping$t,"VisualWebsiteOptimizer",NAME$t),_defineProperty(_CNameMapping$t,"Visualwebsiteoptimizer",NAME$t),_defineProperty(_CNameMapping$t,"visualwebsiteoptimizer",NAME$t),_defineProperty(_CNameMapping$t,"vwo",NAME$t),_defineProperty(_CNameMapping$t,'Visual Website Optimizer',NAME$t),_defineProperty(_CNameMapping$t,'Visual website optimizer',NAME$t),_defineProperty(_CNameMapping$t,'visual website optimizer',NAME$t),_CNameMapping$t);
1331
+
1332
+ var _CNameMapping$s;var DIR_NAME$s='GA360';var NAME$s='GA360';var DISPLAY_NAME$s='Google Analytics 360';var DISPLAY_NAME_TO_DIR_NAME_MAP$s=_defineProperty({},DISPLAY_NAME$s,DIR_NAME$s);(_CNameMapping$s={},_defineProperty(_CNameMapping$s,NAME$s,NAME$s),_defineProperty(_CNameMapping$s,'Google Analytics 360',NAME$s),_defineProperty(_CNameMapping$s,'Google analytics 360',NAME$s),_defineProperty(_CNameMapping$s,'google analytics 360',NAME$s),_defineProperty(_CNameMapping$s,'Google Analytics360',NAME$s),_defineProperty(_CNameMapping$s,'Google analytics360',NAME$s),_defineProperty(_CNameMapping$s,'google analytics360',NAME$s),_defineProperty(_CNameMapping$s,"GoogleAnalytics360",NAME$s),_defineProperty(_CNameMapping$s,'GA 360',NAME$s),_CNameMapping$s);
1333
+
1334
+ var _CNameMapping$r;var DIR_NAME$r='Adroll';var NAME$r='ADROLL';var DISPLAY_NAME$r='Adroll';var DISPLAY_NAME_TO_DIR_NAME_MAP$r=_defineProperty({},DISPLAY_NAME$r,DIR_NAME$r);(_CNameMapping$r={},_defineProperty(_CNameMapping$r,NAME$r,NAME$r),_defineProperty(_CNameMapping$r,"Adroll",NAME$r),_defineProperty(_CNameMapping$r,'Ad roll',NAME$r),_defineProperty(_CNameMapping$r,'ad roll',NAME$r),_defineProperty(_CNameMapping$r,"adroll",NAME$r),_CNameMapping$r);
1335
+
1336
+ var _CNameMapping$q;var DIR_NAME$q='DCMFloodlight';var NAME$q='DCM_FLOODLIGHT';var DISPLAY_NAME$q='DCM Floodlight';var DISPLAY_NAME_TO_DIR_NAME_MAP$q=_defineProperty({},DISPLAY_NAME$q,DIR_NAME$q);(_CNameMapping$q={},_defineProperty(_CNameMapping$q,NAME$q,NAME$q),_defineProperty(_CNameMapping$q,'DCM Floodlight',NAME$q),_defineProperty(_CNameMapping$q,'dcm floodlight',NAME$q),_defineProperty(_CNameMapping$q,'Dcm Floodlight',NAME$q),_defineProperty(_CNameMapping$q,"DCMFloodlight",NAME$q),_defineProperty(_CNameMapping$q,"dcmfloodlight",NAME$q),_defineProperty(_CNameMapping$q,"DcmFloodlight",NAME$q),_defineProperty(_CNameMapping$q,"dcm_floodlight",NAME$q),_defineProperty(_CNameMapping$q,"DCM_Floodlight",NAME$q),_CNameMapping$q);
1337
+
1338
+ var _CNameMapping$p;var DIR_NAME$p='Matomo';var NAME$p='MATOMO';var DISPLAY_NAME$p='Matomo';var DISPLAY_NAME_TO_DIR_NAME_MAP$p=_defineProperty({},DISPLAY_NAME$p,DIR_NAME$p);(_CNameMapping$p={},_defineProperty(_CNameMapping$p,NAME$p,NAME$p),_defineProperty(_CNameMapping$p,"Matomo",NAME$p),_defineProperty(_CNameMapping$p,"matomo",NAME$p),_CNameMapping$p);
1339
+
1340
+ var _CNameMapping$o;var DIR_NAME$o='Vero';var NAME$o='VERO';var DISPLAY_NAME$o='Vero';var DISPLAY_NAME_TO_DIR_NAME_MAP$o=_defineProperty({},DISPLAY_NAME$o,DIR_NAME$o);(_CNameMapping$o={},_defineProperty(_CNameMapping$o,NAME$o,NAME$o),_defineProperty(_CNameMapping$o,"Vero",NAME$o),_defineProperty(_CNameMapping$o,"vero",NAME$o),_CNameMapping$o);
1341
+
1342
+ var _CNameMapping$n;var DIR_NAME$n='Mouseflow';var NAME$n='MOUSEFLOW';var DISPLAY_NAME$n='Mouseflow';var DISPLAY_NAME_TO_DIR_NAME_MAP$n=_defineProperty({},DISPLAY_NAME$n,DIR_NAME$n);(_CNameMapping$n={},_defineProperty(_CNameMapping$n,NAME$n,NAME$n),_defineProperty(_CNameMapping$n,"Mouseflow",NAME$n),_defineProperty(_CNameMapping$n,"mouseflow",NAME$n),_defineProperty(_CNameMapping$n,"mouseFlow",NAME$n),_defineProperty(_CNameMapping$n,"MouseFlow",NAME$n),_defineProperty(_CNameMapping$n,'Mouse flow',NAME$n),_defineProperty(_CNameMapping$n,'mouse flow',NAME$n),_defineProperty(_CNameMapping$n,'mouse Flow',NAME$n),_defineProperty(_CNameMapping$n,'Mouse Flow',NAME$n),_CNameMapping$n);
1343
+
1344
+ var _CNameMapping$m;var DIR_NAME$m='Rockerbox';var NAME$m='ROCKERBOX';var DISPLAY_NAME$m='Rockerbox';var DISPLAY_NAME_TO_DIR_NAME_MAP$m=_defineProperty({},DISPLAY_NAME$m,DIR_NAME$m);(_CNameMapping$m={},_defineProperty(_CNameMapping$m,NAME$m,NAME$m),_defineProperty(_CNameMapping$m,"Rockerbox",NAME$m),_defineProperty(_CNameMapping$m,"rockerbox",NAME$m),_defineProperty(_CNameMapping$m,"RockerBox",NAME$m),_defineProperty(_CNameMapping$m,'Rocker box',NAME$m),_defineProperty(_CNameMapping$m,'rocker box',NAME$m),_defineProperty(_CNameMapping$m,'Rocker Box',NAME$m),_CNameMapping$m);
1345
+
1346
+ var _CNameMapping$l;var DIR_NAME$l='ConvertFlow';var NAME$l='CONVERTFLOW';var DISPLAY_NAME$l='ConvertFlow';var DISPLAY_NAME_TO_DIR_NAME_MAP$l=_defineProperty({},DISPLAY_NAME$l,DIR_NAME$l);(_CNameMapping$l={},_defineProperty(_CNameMapping$l,NAME$l,NAME$l),_defineProperty(_CNameMapping$l,"Convertflow",NAME$l),_defineProperty(_CNameMapping$l,"convertflow",NAME$l),_defineProperty(_CNameMapping$l,"convertFlow",NAME$l),_defineProperty(_CNameMapping$l,"ConvertFlow",NAME$l),_defineProperty(_CNameMapping$l,'Convert flow',NAME$l),_defineProperty(_CNameMapping$l,'convert flow',NAME$l),_defineProperty(_CNameMapping$l,'convert Flow',NAME$l),_defineProperty(_CNameMapping$l,'Convert Flow',NAME$l),_defineProperty(_CNameMapping$l,'CONVERT FLOW',NAME$l),_CNameMapping$l);
1347
+
1348
+ var _CNameMapping$k;var DIR_NAME$k='SnapEngage';var NAME$k='SNAPENGAGE';var DISPLAY_NAME$k='SnapEngage';var DISPLAY_NAME_TO_DIR_NAME_MAP$k=_defineProperty({},DISPLAY_NAME$k,DIR_NAME$k);(_CNameMapping$k={},_defineProperty(_CNameMapping$k,NAME$k,NAME$k),_defineProperty(_CNameMapping$k,"SnapEngage",NAME$k),_defineProperty(_CNameMapping$k,"Snap_Engage",NAME$k),_defineProperty(_CNameMapping$k,"snapengage",NAME$k),_defineProperty(_CNameMapping$k,'SNAP ENGAGE',NAME$k),_defineProperty(_CNameMapping$k,'Snap Engage',NAME$k),_defineProperty(_CNameMapping$k,'snap engage',NAME$k),_CNameMapping$k);
1349
+
1350
+ var _CNameMapping$j;var DIR_NAME$j='LiveChat';var NAME$j='LIVECHAT';var DISPLAY_NAME$j='LiveChat';var DISPLAY_NAME_TO_DIR_NAME_MAP$j=_defineProperty({},DISPLAY_NAME$j,DIR_NAME$j);(_CNameMapping$j={},_defineProperty(_CNameMapping$j,NAME$j,NAME$j),_defineProperty(_CNameMapping$j,"LiveChat",NAME$j),_defineProperty(_CNameMapping$j,"Live_Chat",NAME$j),_defineProperty(_CNameMapping$j,"livechat",NAME$j),_defineProperty(_CNameMapping$j,'LIVE CHAT',NAME$j),_defineProperty(_CNameMapping$j,'Live Chat',NAME$j),_defineProperty(_CNameMapping$j,'live chat',NAME$j),_CNameMapping$j);
1351
+
1352
+ var _CNameMapping$i;var DIR_NAME$i='Shynet';var NAME$i='SHYNET';var DISPLAY_NAME$i='Shynet';var DISPLAY_NAME_TO_DIR_NAME_MAP$i=_defineProperty({},DISPLAY_NAME$i,DIR_NAME$i);(_CNameMapping$i={},_defineProperty(_CNameMapping$i,NAME$i,NAME$i),_defineProperty(_CNameMapping$i,"shynet",NAME$i),_defineProperty(_CNameMapping$i,"ShyNet",NAME$i),_defineProperty(_CNameMapping$i,"shyNet",NAME$i),_defineProperty(_CNameMapping$i,"Shynet",NAME$i),_defineProperty(_CNameMapping$i,'shy net',NAME$i),_defineProperty(_CNameMapping$i,'Shy Net',NAME$i),_defineProperty(_CNameMapping$i,'shy Net',NAME$i),_defineProperty(_CNameMapping$i,'Shy net',NAME$i),_CNameMapping$i);
1353
+
1354
+ var _CNameMapping$h;var DIR_NAME$h='Woopra';var NAME$h='WOOPRA';var DISPLAY_NAME$h='Woopra';var DISPLAY_NAME_TO_DIR_NAME_MAP$h=_defineProperty({},DISPLAY_NAME$h,DIR_NAME$h);(_CNameMapping$h={},_defineProperty(_CNameMapping$h,NAME$h,NAME$h),_defineProperty(_CNameMapping$h,"Woopra",NAME$h),_defineProperty(_CNameMapping$h,"woopra",NAME$h),_CNameMapping$h);
1355
+
1356
+ var _CNameMapping$g;var DIR_NAME$g='RollBar';var NAME$g='ROLLBAR';var DISPLAY_NAME$g='RollBar';var DISPLAY_NAME_TO_DIR_NAME_MAP$g=_defineProperty({},DISPLAY_NAME$g,DIR_NAME$g);(_CNameMapping$g={},_defineProperty(_CNameMapping$g,NAME$g,NAME$g),_defineProperty(_CNameMapping$g,"RollBar",NAME$g),_defineProperty(_CNameMapping$g,"Roll_Bar",NAME$g),_defineProperty(_CNameMapping$g,"rollbar",NAME$g),_defineProperty(_CNameMapping$g,"Rollbar",NAME$g),_defineProperty(_CNameMapping$g,'ROLL BAR',NAME$g),_defineProperty(_CNameMapping$g,'Roll Bar',NAME$g),_defineProperty(_CNameMapping$g,'roll bar',NAME$g),_CNameMapping$g);
1357
+
1358
+ var _CNameMapping$f;var DIR_NAME$f='QuoraPixel';var NAME$f='QUORA_PIXEL';var DISPLAY_NAME$f='Quora Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$f=_defineProperty({},DISPLAY_NAME$f,DIR_NAME$f);(_CNameMapping$f={},_defineProperty(_CNameMapping$f,NAME$f,NAME$f),_defineProperty(_CNameMapping$f,'Quora Pixel',NAME$f),_defineProperty(_CNameMapping$f,'Quora pixel',NAME$f),_defineProperty(_CNameMapping$f,'QUORA PIXEL',NAME$f),_defineProperty(_CNameMapping$f,"QuoraPixel",NAME$f),_defineProperty(_CNameMapping$f,"Quorapixel",NAME$f),_defineProperty(_CNameMapping$f,"QUORAPIXEL",NAME$f),_defineProperty(_CNameMapping$f,"Quora_Pixel",NAME$f),_defineProperty(_CNameMapping$f,"quora_pixel",NAME$f),_defineProperty(_CNameMapping$f,"Quora",NAME$f),_CNameMapping$f);
1359
+
1360
+ var _CNameMapping$e;var DIR_NAME$e='June';var NAME$e='JUNE';var DISPLAY_NAME$e='June';var DISPLAY_NAME_TO_DIR_NAME_MAP$e=_defineProperty({},DISPLAY_NAME$e,DIR_NAME$e);(_CNameMapping$e={},_defineProperty(_CNameMapping$e,NAME$e,NAME$e),_defineProperty(_CNameMapping$e,"June",NAME$e),_defineProperty(_CNameMapping$e,"june",NAME$e),_CNameMapping$e);
1361
+
1362
+ var _CNameMapping$d;var DIR_NAME$d='Engage';var NAME$d='ENGAGE';var DISPLAY_NAME$d='Engage';var DISPLAY_NAME_TO_DIR_NAME_MAP$d=_defineProperty({},DISPLAY_NAME$d,DIR_NAME$d);(_CNameMapping$d={},_defineProperty(_CNameMapping$d,NAME$d,NAME$d),_defineProperty(_CNameMapping$d,"Engage",NAME$d),_defineProperty(_CNameMapping$d,"engage",NAME$d),_CNameMapping$d);
1363
+
1364
+ var _CNameMapping$c;var DIR_NAME$c='Iterable';var NAME$c='ITERABLE';var DISPLAY_NAME$c='Iterable';var DISPLAY_NAME_TO_DIR_NAME_MAP$c=_defineProperty({},DISPLAY_NAME$c,DIR_NAME$c);(_CNameMapping$c={},_defineProperty(_CNameMapping$c,NAME$c,NAME$c),_defineProperty(_CNameMapping$c,"Iterable",NAME$c),_defineProperty(_CNameMapping$c,"iterable",NAME$c),_CNameMapping$c);
1365
+
1366
+ var _CNameMapping$b;var DIR_NAME$b='YandexMetrica';var NAME$b='YANDEX_METRICA';var DISPLAY_NAME$b='Yandex.Metrica';var DISPLAY_NAME_TO_DIR_NAME_MAP$b=_defineProperty({},DISPLAY_NAME$b,DIR_NAME$b);(_CNameMapping$b={},_defineProperty(_CNameMapping$b,NAME$b,NAME$b),_defineProperty(_CNameMapping$b,"Yandexmetrica",NAME$b),_defineProperty(_CNameMapping$b,"yandexmetrica",NAME$b),_defineProperty(_CNameMapping$b,"yandexMetrica",NAME$b),_defineProperty(_CNameMapping$b,"YandexMetrica",NAME$b),_CNameMapping$b);
1367
+
1368
+ var _CNameMapping$a;var DIR_NAME$a='Refiner';var NAME$a='REFINER';var DISPLAY_NAME$a='Refiner';var DISPLAY_NAME_TO_DIR_NAME_MAP$a=_defineProperty({},DISPLAY_NAME$a,DIR_NAME$a);(_CNameMapping$a={},_defineProperty(_CNameMapping$a,NAME$a,NAME$a),_defineProperty(_CNameMapping$a,"Refiner",NAME$a),_defineProperty(_CNameMapping$a,"refiner",NAME$a),_CNameMapping$a);
1369
+
1370
+ var _CNameMapping$9;var DIR_NAME$9='Qualaroo';var NAME$9='QUALAROO';var DISPLAY_NAME$9='Qualaroo';var DISPLAY_NAME_TO_DIR_NAME_MAP$9=_defineProperty({},DISPLAY_NAME$9,DIR_NAME$9);(_CNameMapping$9={},_defineProperty(_CNameMapping$9,NAME$9,NAME$9),_defineProperty(_CNameMapping$9,"Qualaroo",NAME$9),_defineProperty(_CNameMapping$9,"qualaroo",NAME$9),_CNameMapping$9);
1371
+
1372
+ var _CNameMapping$8;var DIR_NAME$8='Podsights';var NAME$8='PODSIGHTS';var DISPLAY_NAME$8='Podsights';var DISPLAY_NAME_TO_DIR_NAME_MAP$8=_defineProperty({},DISPLAY_NAME$8,DIR_NAME$8);(_CNameMapping$8={},_defineProperty(_CNameMapping$8,NAME$8,NAME$8),_defineProperty(_CNameMapping$8,"Podsights",NAME$8),_defineProperty(_CNameMapping$8,"PodSights",NAME$8),_defineProperty(_CNameMapping$8,'pod Sights',NAME$8),_defineProperty(_CNameMapping$8,'Pod Sights',NAME$8),_defineProperty(_CNameMapping$8,'pod sights',NAME$8),_defineProperty(_CNameMapping$8,'POD SIGHTS',NAME$8),_defineProperty(_CNameMapping$8,'Pod sights',NAME$8),_CNameMapping$8);// default mapping for the events
1373
+
1374
+ var _CNameMapping$7;var DIR_NAME$7='Axeptio';var NAME$7='AXEPTIO';var DISPLAY_NAME$7='Axeptio';var DISPLAY_NAME_TO_DIR_NAME_MAP$7=_defineProperty({},DISPLAY_NAME$7,DIR_NAME$7);(_CNameMapping$7={},_defineProperty(_CNameMapping$7,NAME$7,NAME$7),_defineProperty(_CNameMapping$7,"Axeptio",NAME$7),_defineProperty(_CNameMapping$7,"axeptio",NAME$7),_CNameMapping$7);
1375
+
1376
+ var _CNameMapping$6;var DIR_NAME$6='Satismeter';var NAME$6='SATISMETER';var DISPLAY_NAME$6='Satismeter';var DISPLAY_NAME_TO_DIR_NAME_MAP$6=_defineProperty({},DISPLAY_NAME$6,DIR_NAME$6);(_CNameMapping$6={},_defineProperty(_CNameMapping$6,NAME$6,NAME$6),_defineProperty(_CNameMapping$6,"Satismeter",NAME$6),_defineProperty(_CNameMapping$6,"SatisMeter",NAME$6),_CNameMapping$6);
1377
+
1378
+ var _CNameMapping$5;var DIR_NAME$5='MicrosoftClarity';var NAME$5='MICROSOFT_CLARITY';var DISPLAY_NAME$5='Microsoft Clarity';var DISPLAY_NAME_TO_DIR_NAME_MAP$5=_defineProperty({},DISPLAY_NAME$5,DIR_NAME$5);(_CNameMapping$5={},_defineProperty(_CNameMapping$5,NAME$5,NAME$5),_defineProperty(_CNameMapping$5,'Microsoft Clarity',NAME$5),_defineProperty(_CNameMapping$5,'Microsoft clarity',NAME$5),_defineProperty(_CNameMapping$5,'microsoft clarity',NAME$5),_defineProperty(_CNameMapping$5,"Microsoft_clarity",NAME$5),_defineProperty(_CNameMapping$5,"MicrosoftClarity",NAME$5),_defineProperty(_CNameMapping$5,"MICROSOFTCLARITY",NAME$5),_defineProperty(_CNameMapping$5,"microsoftclarity",NAME$5),_defineProperty(_CNameMapping$5,"microsoftClarity",NAME$5),_CNameMapping$5);
1379
+
1380
+ var _CNameMapping$4;var DIR_NAME$4='Sendinblue';var NAME$4='SENDINBLUE';var DISPLAY_NAME$4='Sendinblue';var DISPLAY_NAME_TO_DIR_NAME_MAP$4=_defineProperty({},DISPLAY_NAME$4,DIR_NAME$4);(_CNameMapping$4={},_defineProperty(_CNameMapping$4,NAME$4,NAME$4),_defineProperty(_CNameMapping$4,"Sendinblue",NAME$4),_defineProperty(_CNameMapping$4,"sendinblue",NAME$4),_defineProperty(_CNameMapping$4,"SendinBlue",NAME$4),_CNameMapping$4);
1381
+
1382
+ var _CNameMapping$3;var DIR_NAME$3='Olark';var NAME$3='OLARK';var DISPLAY_NAME$3='Olark';var DISPLAY_NAME_TO_DIR_NAME_MAP$3=_defineProperty({},DISPLAY_NAME$3,DIR_NAME$3);(_CNameMapping$3={},_defineProperty(_CNameMapping$3,NAME$3,NAME$3),_defineProperty(_CNameMapping$3,"Olark",NAME$3),_defineProperty(_CNameMapping$3,"olark",NAME$3),_CNameMapping$3);
1383
+
1384
+ var _CNameMapping$2;var DIR_NAME$2='Lemnisk';var NAME$2='LEMNISK';var DISPLAY_NAME$2='Lemnisk';var DISPLAY_NAME_TO_DIR_NAME_MAP$2=_defineProperty({},DISPLAY_NAME$2,DIR_NAME$2);(_CNameMapping$2={},_defineProperty(_CNameMapping$2,NAME$2,NAME$2),_defineProperty(_CNameMapping$2,"LEMNISK_MARKETING_AUTOMATION",NAME$2),_defineProperty(_CNameMapping$2,'Lemnisk Marketing Automation',NAME$2),_defineProperty(_CNameMapping$2,"LemniskMarketingAutomation",NAME$2),_defineProperty(_CNameMapping$2,"lemniskmarketingautomation",NAME$2),_defineProperty(_CNameMapping$2,"lemniskMarketingAutomation",NAME$2),_defineProperty(_CNameMapping$2,"lemnisk",NAME$2),_defineProperty(_CNameMapping$2,"Lemnisk",NAME$2),_CNameMapping$2);
1385
+
1386
+ var _CNameMapping$1;var DIR_NAME$1='TiktokAds';var NAME$1='TIKTOK_ADS';var DISPLAY_NAME$1='TikTok Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$1=_defineProperty({},DISPLAY_NAME$1,DIR_NAME$1);(_CNameMapping$1={},_defineProperty(_CNameMapping$1,NAME$1,NAME$1),_defineProperty(_CNameMapping$1,"TiktokAds",NAME$1),_defineProperty(_CNameMapping$1,'Tiktok ads',NAME$1),_defineProperty(_CNameMapping$1,'Tiktok Ads',NAME$1),_defineProperty(_CNameMapping$1,'Tik Tok Ads',NAME$1),_defineProperty(_CNameMapping$1,'tik tok ads',NAME$1),_defineProperty(_CNameMapping$1,"tiktokads",NAME$1),_CNameMapping$1);
1387
+
1388
+ var _CNameMapping;var DIR_NAME='ActiveCampaign';var NAME='ACTIVE_CAMPAIGN';var DISPLAY_NAME='Active Campaign';var DISPLAY_NAME_TO_DIR_NAME_MAP=_defineProperty({},DISPLAY_NAME,DIR_NAME);(_CNameMapping={ActiveCampaign:NAME,'Active Campaign':NAME,'ACTIVE CAMPAIGN':NAME},_defineProperty(_CNameMapping,NAME,NAME),_defineProperty(_CNameMapping,"activecampaign",NAME),_defineProperty(_CNameMapping,'active campaign',NAME),_defineProperty(_CNameMapping,'Active campaign',NAME),_defineProperty(_CNameMapping,'active Campaign',NAME),_defineProperty(_CNameMapping,"active_campaign",NAME),_CNameMapping);
1389
+
1390
+ var destDisplayNamesToFileNamesMap=_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},DISPLAY_NAME_TO_DIR_NAME_MAP$Q),DISPLAY_NAME_TO_DIR_NAME_MAP$X),DISPLAY_NAME_TO_DIR_NAME_MAP$R),DISPLAY_NAME_TO_DIR_NAME_MAP$V),DISPLAY_NAME_TO_DIR_NAME_MAP$t),DISPLAY_NAME_TO_DIR_NAME_MAP$T),DISPLAY_NAME_TO_DIR_NAME_MAP$15),DISPLAY_NAME_TO_DIR_NAME_MAP$P),DISPLAY_NAME_TO_DIR_NAME_MAP$O),DISPLAY_NAME_TO_DIR_NAME_MAP$N),DISPLAY_NAME_TO_DIR_NAME_MAP$$),DISPLAY_NAME_TO_DIR_NAME_MAP$13),DISPLAY_NAME_TO_DIR_NAME_MAP$11),DISPLAY_NAME_TO_DIR_NAME_MAP$Z),DISPLAY_NAME_TO_DIR_NAME_MAP$J),DISPLAY_NAME_TO_DIR_NAME_MAP$F),DISPLAY_NAME_TO_DIR_NAME_MAP$14),DISPLAY_NAME_TO_DIR_NAME_MAP$Y),DISPLAY_NAME_TO_DIR_NAME_MAP$u),DISPLAY_NAME_TO_DIR_NAME_MAP$W),DISPLAY_NAME_TO_DIR_NAME_MAP$G),DISPLAY_NAME_TO_DIR_NAME_MAP$18),DISPLAY_NAME_TO_DIR_NAME_MAP$E),DISPLAY_NAME_TO_DIR_NAME_MAP$I),DISPLAY_NAME_TO_DIR_NAME_MAP$17),DISPLAY_NAME_TO_DIR_NAME_MAP$B),DISPLAY_NAME_TO_DIR_NAME_MAP$M),DISPLAY_NAME_TO_DIR_NAME_MAP$12),DISPLAY_NAME_TO_DIR_NAME_MAP$16),DISPLAY_NAME_TO_DIR_NAME_MAP$D),DISPLAY_NAME_TO_DIR_NAME_MAP$19),DISPLAY_NAME_TO_DIR_NAME_MAP$K),DISPLAY_NAME_TO_DIR_NAME_MAP$x),DISPLAY_NAME_TO_DIR_NAME_MAP$_),DISPLAY_NAME_TO_DIR_NAME_MAP$S),DISPLAY_NAME_TO_DIR_NAME_MAP$10),DISPLAY_NAME_TO_DIR_NAME_MAP$H),DISPLAY_NAME_TO_DIR_NAME_MAP$z),DISPLAY_NAME_TO_DIR_NAME_MAP$A),DISPLAY_NAME_TO_DIR_NAME_MAP$w),DISPLAY_NAME_TO_DIR_NAME_MAP$y),DISPLAY_NAME_TO_DIR_NAME_MAP$v),DISPLAY_NAME_TO_DIR_NAME_MAP$C),DISPLAY_NAME_TO_DIR_NAME_MAP$U),DISPLAY_NAME_TO_DIR_NAME_MAP$L),DISPLAY_NAME_TO_DIR_NAME_MAP$s),DISPLAY_NAME_TO_DIR_NAME_MAP$r),DISPLAY_NAME_TO_DIR_NAME_MAP$q),DISPLAY_NAME_TO_DIR_NAME_MAP$p),DISPLAY_NAME_TO_DIR_NAME_MAP$o),DISPLAY_NAME_TO_DIR_NAME_MAP$n),DISPLAY_NAME_TO_DIR_NAME_MAP$m),DISPLAY_NAME_TO_DIR_NAME_MAP$l),DISPLAY_NAME_TO_DIR_NAME_MAP$k),DISPLAY_NAME_TO_DIR_NAME_MAP$j),DISPLAY_NAME_TO_DIR_NAME_MAP$i),DISPLAY_NAME_TO_DIR_NAME_MAP$h),DISPLAY_NAME_TO_DIR_NAME_MAP$g),DISPLAY_NAME_TO_DIR_NAME_MAP$f),DISPLAY_NAME_TO_DIR_NAME_MAP$e),DISPLAY_NAME_TO_DIR_NAME_MAP$d),DISPLAY_NAME_TO_DIR_NAME_MAP$c),DISPLAY_NAME_TO_DIR_NAME_MAP$b),DISPLAY_NAME_TO_DIR_NAME_MAP$a),DISPLAY_NAME_TO_DIR_NAME_MAP$9),DISPLAY_NAME_TO_DIR_NAME_MAP$8),DISPLAY_NAME_TO_DIR_NAME_MAP$7),DISPLAY_NAME_TO_DIR_NAME_MAP$6),DISPLAY_NAME_TO_DIR_NAME_MAP$5),DISPLAY_NAME_TO_DIR_NAME_MAP$4),DISPLAY_NAME_TO_DIR_NAME_MAP$3),DISPLAY_NAME_TO_DIR_NAME_MAP$2),DISPLAY_NAME_TO_DIR_NAME_MAP$1),DISPLAY_NAME_TO_DIR_NAME_MAP);
1391
+
1392
+ var DEFAULT_INTEGRATIONS_CONFIG={All:true};
1393
+
1551
1394
  var READY_CHECK_TIMEOUT_MS=11*1000;// 11 seconds
1552
1395
  var SCRIPT_LOAD_TIMEOUT_MS=10*1000;// 10 seconds
1553
1396
  var DEVICE_MODE_DESTINATIONS_PLUGIN='DeviceModeDestinationsPlugin';
1554
1397
 
1555
- var isDestIntgConfigTruthy=function isDestIntgConfigTruthy(destIntgConfig){return !isUndefined(destIntgConfig)&&Boolean(destIntgConfig)===true;};var isDestIntgConfigFalsy=function isDestIntgConfigFalsy(destIntgConfig){return !isUndefined(destIntgConfig)&&Boolean(destIntgConfig)===false;};
1556
-
1557
1398
  /**
1558
1399
  * Determines if the destination SDK code is evaluated
1559
1400
  * @param destSDKIdentifier The name of the global globalThis object that contains the destination SDK
@@ -1561,23 +1402,25 @@
1561
1402
  * @param logger Logger instance
1562
1403
  * @returns true if the destination SDK code is evaluated, false otherwise
1563
1404
  */var isDestinationSDKMounted=function isDestinationSDKMounted(destSDKIdentifier,sdkTypeName,logger){return Boolean(globalThis[destSDKIdentifier]&&globalThis[destSDKIdentifier][sdkTypeName]&&globalThis[destSDKIdentifier][sdkTypeName].prototype&&typeof globalThis[destSDKIdentifier][sdkTypeName].prototype.constructor!=='undefined');};var createDestinationInstance=function createDestinationInstance(destSDKIdentifier,sdkTypeName,dest,state){var rAnalytics=globalThis.rudderanalytics;var analytics=rAnalytics.getAnalyticsInstance(state.lifecycle.writeKey.value);return new globalThis[destSDKIdentifier][sdkTypeName](clone$1(dest.config),{loadIntegration:state.nativeDestinations.loadIntegration.value,logLevel:state.lifecycle.logLevel.value,loadOnlyIntegrations:state.nativeDestinations.loadOnlyIntegrations.value,page:function page(category,name,properties,options,callback){return analytics.page(pageArgumentsToCallOptions(category,name,properties,options,callback));},track:function track(event,properties,options,callback){return analytics.track(trackArgumentsToCallOptions(event,properties,options,callback));},identify:function identify(userId,traits,options,callback){return analytics.identify(identifyArgumentsToCallOptions(userId,traits,options,callback));},alias:function alias(to,from,options,callback){return analytics.alias(aliasArgumentsToCallOptions(to,from,options,callback));},group:function group(groupId,traits,options,callback){return analytics.group(groupArgumentsToCallOptions(groupId,traits,options,callback));},getAnonymousId:function getAnonymousId(){return analytics.getAnonymousId();},getUserId:function getUserId(){return analytics.getUserId();},getUserTraits:function getUserTraits(){return analytics.getUserTraits();},getGroupId:function getGroupId(){return analytics.getGroupId();},getGroupTraits:function getGroupTraits(){return analytics.getGroupTraits();},getSessionId:function getSessionId(){return analytics.getSessionId();}},{shouldApplyDeviceModeTransformation:dest.shouldApplyDeviceModeTransformation,propagateEventsUntransformedOnError:dest.propagateEventsUntransformedOnError,destinationId:dest.id});};var isDestinationReady=function isDestinationReady(dest){return new Promise(function(resolve,reject){var instance=dest.instance;var handleNumber;var checkReady=function checkReady(){if(instance.isLoaded()&&(!instance.isReady||instance.isReady())){resolve(true);}else {handleNumber=globalThis.requestAnimationFrame(checkReady);}};checkReady();setTimeout(function(){globalThis.cancelAnimationFrame(handleNumber);reject(new Error(DESTINATION_READY_TIMEOUT_ERROR(READY_CHECK_TIMEOUT_MS,dest.userFriendlyId)));},READY_CHECK_TIMEOUT_MS);});};/**
1564
- * Filters the destinations that should not be loaded or forwarded events to based on the integration options (load or events API)
1565
- * @param intgOpts Integration options object
1566
- * @param destinations Destinations array
1567
- * @returns Destinations array filtered based on the integration options
1568
- */var filterDestinations=function filterDestinations(intgOpts,destinations){var allOptVal=intgOpts.All;return destinations.filter(function(dest){var destDisplayName=dest.displayName;var isDestEnabled;if(allOptVal){isDestEnabled=true;if(isDestIntgConfigFalsy(intgOpts[destDisplayName])){isDestEnabled=false;}}else {isDestEnabled=false;if(isDestIntgConfigTruthy(intgOpts[destDisplayName])){isDestEnabled=true;}}return isDestEnabled;});};/**
1569
1405
  * Extracts the integration config, if any, from the given destination
1570
1406
  * and merges it with the current integrations config
1571
1407
  * @param dest Destination object
1572
1408
  * @param curDestIntgConfig Current destinations integration config
1573
1409
  * @param logger Logger object
1574
1410
  * @returns Combined destinations integrations config
1575
- */var getCumulativeIntegrationsConfig=function getCumulativeIntegrationsConfig(dest,curDestIntgConfig,errorHandler){var _dest$instance;var integrationsConfig=curDestIntgConfig;if(isFunction((_dest$instance=dest.instance)===null||_dest$instance===void 0?void 0:_dest$instance.getDataForIntegrationsObject)){try{var _dest$instance2;integrationsConfig=mergeDeepRight(curDestIntgConfig,normalizeIntegrationOptions((_dest$instance2=dest.instance)===null||_dest$instance2===void 0?void 0:_dest$instance2.getDataForIntegrationsObject()));}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,DEVICE_MODE_DESTINATIONS_PLUGIN,DESTINATION_INTEGRATIONS_DATA_ERROR(dest.userFriendlyId));}}return integrationsConfig;};var initializeDestination=function initializeDestination(dest,state,destSDKIdentifier,sdkTypeName,errorHandler,logger){try{var initializedDestination=clone$1(dest);var destInstance=createDestinationInstance(destSDKIdentifier,sdkTypeName,dest,state);initializedDestination.instance=destInstance;destInstance.init();isDestinationReady(initializedDestination).then(function(){// Collect the integrations data for the hybrid mode destinations
1411
+ */var getCumulativeIntegrationsConfig=function getCumulativeIntegrationsConfig(dest,curDestIntgConfig,errorHandler){var _dest$instance;var integrationsConfig=curDestIntgConfig;if(isFunction((_dest$instance=dest.instance)===null||_dest$instance===void 0?void 0:_dest$instance.getDataForIntegrationsObject)){try{var _dest$instance2;integrationsConfig=mergeDeepRight(curDestIntgConfig,(_dest$instance2=dest.instance)===null||_dest$instance2===void 0?void 0:_dest$instance2.getDataForIntegrationsObject());}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,DEVICE_MODE_DESTINATIONS_PLUGIN,DESTINATION_INTEGRATIONS_DATA_ERROR(dest.userFriendlyId));}}return integrationsConfig;};var initializeDestination=function initializeDestination(dest,state,destSDKIdentifier,sdkTypeName,errorHandler,logger){try{var initializedDestination=clone$1(dest);var destInstance=createDestinationInstance(destSDKIdentifier,sdkTypeName,dest,state);initializedDestination.instance=destInstance;destInstance.init();isDestinationReady(initializedDestination).then(function(){// Collect the integrations data for the hybrid mode destinations
1576
1412
  if(isHybridModeDestination(initializedDestination)){state.nativeDestinations.integrationsConfig.value=getCumulativeIntegrationsConfig(initializedDestination,state.nativeDestinations.integrationsConfig.value,errorHandler);}state.nativeDestinations.initializedDestinations.value=[].concat(_toConsumableArray(state.nativeDestinations.initializedDestinations.value),[initializedDestination]);}).catch(function(err){state.nativeDestinations.failedDestinations.value=[].concat(_toConsumableArray(state.nativeDestinations.failedDestinations.value),[dest]);// The error message is already formatted in the isDestinationReady function
1577
1413
  logger===null||logger===void 0||logger.error(err);});}catch(err){state.nativeDestinations.failedDestinations.value=[].concat(_toConsumableArray(state.nativeDestinations.failedDestinations.value),[dest]);errorHandler===null||errorHandler===void 0||errorHandler.onError(err,DEVICE_MODE_DESTINATIONS_PLUGIN,DESTINATION_INIT_ERROR(dest.userFriendlyId));}};
1578
1414
 
1579
- var pluginName$b='DeviceModeDestinations';var DeviceModeDestinations=function DeviceModeDestinations(){return {name:pluginName$b,initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$b]);},nativeDestinations:{setActiveDestinations:function setActiveDestinations(state,pluginsManager,errorHandler,logger){// Normalize the integration options from the load API call
1580
- state.nativeDestinations.loadOnlyIntegrations.value=normalizeIntegrationOptions(state.loadOptions.value.integrations);state.nativeDestinations.loadIntegration.value=state.loadOptions.value.loadIntegration;// Filter destination that doesn't have mapping config-->Integration names
1415
+ var isDestIntgConfigTruthy=function isDestIntgConfigTruthy(destIntgConfig){return !isUndefined(destIntgConfig)&&Boolean(destIntgConfig)===true;};var isDestIntgConfigFalsy=function isDestIntgConfigFalsy(destIntgConfig){return !isUndefined(destIntgConfig)&&Boolean(destIntgConfig)===false;};/**
1416
+ * Filters the destinations that should not be loaded or forwarded events to based on the integration options (load or events API)
1417
+ * @param intgOpts Integration options object
1418
+ * @param destinations Destinations array
1419
+ * @returns Destinations array filtered based on the integration options
1420
+ */var filterDestinations=function filterDestinations(intgOpts,destinations){var allOptVal=intgOpts.All;return destinations.filter(function(dest){var destDisplayName=dest.displayName;var isDestEnabled;if(allOptVal){isDestEnabled=true;if(isDestIntgConfigFalsy(intgOpts[destDisplayName])){isDestEnabled=false;}}else {isDestEnabled=false;if(isDestIntgConfigTruthy(intgOpts[destDisplayName])){isDestEnabled=true;}}return isDestEnabled;});};
1421
+
1422
+ var pluginName$b='DeviceModeDestinations';var DeviceModeDestinations=function DeviceModeDestinations(){return {name:pluginName$b,initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$b]);},nativeDestinations:{setActiveDestinations:function setActiveDestinations(state,pluginsManager,errorHandler,logger){var _clone;// Normalize the integration options from the load API call
1423
+ state.nativeDestinations.loadOnlyIntegrations.value=(_clone=clone$1(state.loadOptions.value.integrations))!==null&&_clone!==void 0?_clone:DEFAULT_INTEGRATIONS_CONFIG;state.nativeDestinations.loadIntegration.value=state.loadOptions.value.loadIntegration;// Filter destination that doesn't have mapping config-->Integration names
1581
1424
  var configSupportedDestinations=state.nativeDestinations.configuredDestinations.value.filter(function(configDest){if(destDisplayNamesToFileNamesMap[configDest.displayName]){return true;}errorHandler===null||errorHandler===void 0||errorHandler.onError(new Error(DESTINATION_NOT_SUPPORTED_ERROR(configDest.userFriendlyId)),DEVICE_MODE_DESTINATIONS_PLUGIN);return false;});// Filter destinations that are disabled through load options
1582
1425
  var destinationsToLoad=filterDestinations(state.nativeDestinations.loadOnlyIntegrations.value,configSupportedDestinations);var consentedDestinations=destinationsToLoad.filter(function(dest){var _pluginsManager$invok;return(// if consent manager is not configured, then default to load the destination
1583
1426
  (_pluginsManager$invok=pluginsManager.invokeSingle("consentManager.isDestinationConsented",state,dest.config,errorHandler,logger))!==null&&_pluginsManager$invok!==void 0?_pluginsManager$invok:true);});state.nativeDestinations.activeDestinations.value=consentedDestinations;},load:function load(state,externalSrcLoader,errorHandler,logger,externalScriptOnLoad){var integrationsCDNPath=state.lifecycle.integrationsCDNPath.value;var activeDestinations=state.nativeDestinations.activeDestinations.value;activeDestinations.forEach(function(dest){var sdkName=destDisplayNamesToFileNamesMap[dest.displayName];var destSDKIdentifier="".concat(sdkName,"_RS");// this is the name of the object loaded on the window
@@ -1686,8 +1529,36 @@
1686
1529
  * @return {?Object<string, string>}
1687
1530
  */var parseLinker=function parseLinker(value){var linkerObj=parseLinkerParamValue(value);if(!linkerObj){return null;}var checksum=linkerObj.checksum,serializedIds=linkerObj.serializedIds;if(!isCheckSumValid(serializedIds,checksum)){return null;}return deserialize(serializedIds);};
1688
1531
 
1689
- var pluginName$7='GoogleLinker';// TODO: refactor this plugin and all related source code to be type-safe
1690
- var GoogleLinker=function GoogleLinker(){return {name:pluginName$7,initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$7]);},userSession:{anonymousIdGoogleLinker:function anonymousIdGoogleLinker(rudderAmpLinkerParam){if(!rudderAmpLinkerParam){return null;}var parsedAnonymousIdObj=rudderAmpLinkerParam?parseLinker(rudderAmpLinkerParam):null;return parsedAnonymousIdObj?parsedAnonymousIdObj[AMP_LINKER_ANONYMOUS_ID_KEY]:null;}}};};
1532
+ var pluginName$7='GoogleLinker';var GoogleLinker=function GoogleLinker(){return {name:pluginName$7,initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$7]);},userSession:{anonymousIdGoogleLinker:function anonymousIdGoogleLinker(rudderAmpLinkerParam){if(!rudderAmpLinkerParam){return null;}var parsedAnonymousIdObj=rudderAmpLinkerParam?parseLinker(rudderAmpLinkerParam):null;return parsedAnonymousIdObj?parsedAnonymousIdObj[AMP_LINKER_ANONYMOUS_ID_KEY]:null;}}};};
1533
+
1534
+ var KETCH_CONSENT_MANAGER_PLUGIN='KetchConsentManagerPlugin';var KETCH_CONSENT_COOKIE_NAME_V1='_ketch_consent_v1_';
1535
+
1536
+ /**
1537
+ * Gets the consent data from the Ketch's consent cookie
1538
+ * @param storeManager Store manager instance
1539
+ * @param logger Logger instance
1540
+ * @returns Consent data from the consent cookie
1541
+ */var getKetchConsentData=function getKetchConsentData(storeManager,logger){var rawConsentCookieData=null;try{// Create a data store instance to read the consent cookie
1542
+ var dataStore=storeManager===null||storeManager===void 0?void 0:storeManager.setStore({id:KETCH_CONSENT_MANAGER_PLUGIN,name:KETCH_CONSENT_MANAGER_PLUGIN,type:COOKIE_STORAGE});rawConsentCookieData=dataStore===null||dataStore===void 0?void 0:dataStore.engine.getItem(KETCH_CONSENT_COOKIE_NAME_V1);}catch(err){logger===null||logger===void 0||logger.error(KETCH_CONSENT_COOKIE_READ_ERROR(KETCH_CONSENT_MANAGER_PLUGIN),err);return undefined;}if(isNullOrUndefined(rawConsentCookieData)){return undefined;}// Decode and parse the cookie data to JSON
1543
+ var consentCookieData;try{consentCookieData=JSON.parse(fromBase64(rawConsentCookieData));}catch(err){logger===null||logger===void 0||logger.error(KETCH_CONSENT_COOKIE_PARSE_ERROR(KETCH_CONSENT_MANAGER_PLUGIN),err);return undefined;}if(!consentCookieData){return undefined;}// Convert the cookie data to consent data
1544
+ var consentPurposes={};Object.entries(consentCookieData).forEach(function(pEntry){var purposeCode=pEntry[0];var purposeValue=pEntry[1];consentPurposes[purposeCode]=(purposeValue===null||purposeValue===void 0?void 0:purposeValue.status)==='granted';});return consentPurposes;};/**
1545
+ * Gets the consent data in the format expected by the application state
1546
+ * @param ketchConsentData Consent data derived from the consent cookie
1547
+ * @returns Consent data
1548
+ */var getConsentData=function getConsentData(ketchConsentData){var allowedConsents=[];var deniedConsentIds=[];var initialized=false;if(ketchConsentData){Object.entries(ketchConsentData).forEach(function(e){var purposeCode=e[0];var isConsented=e[1];if(isConsented){allowedConsents.push(purposeCode);}else {deniedConsentIds.push(purposeCode);}});initialized=true;}return {initialized:initialized,allowedConsents:allowedConsents,deniedConsentIds:deniedConsentIds};};var updateConsentStateFromData=function updateConsentStateFromData(state,ketchConsentData){var consentData=getConsentData(ketchConsentData);state.consents.data.value=consentData;};
1549
+
1550
+ var pluginName$6='KetchConsentManager';var KetchConsentManager=function KetchConsentManager(){return {name:pluginName$6,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$6]);},consentManager:{init:function init(state,storeManager,logger){// getKetchUserConsentedPurposes returns current ketch opted-in purposes
1551
+ // This will be helpful for debugging
1552
+ globalThis.getKetchUserConsentedPurposes=function(){var _state$consents$data$;return (_state$consents$data$=state.consents.data.value.allowedConsents)===null||_state$consents$data$===void 0?void 0:_state$consents$data$.slice();};// getKetchUserDeniedPurposes returns current ketch opted-out purposes
1553
+ // This will be helpful for debugging
1554
+ globalThis.getKetchUserDeniedPurposes=function(){var _state$consents$data$2;return (_state$consents$data$2=state.consents.data.value.deniedConsentIds)===null||_state$consents$data$2===void 0?void 0:_state$consents$data$2.slice();};// updateKetchConsent callback function to update current consent purpose state
1555
+ // this will be called from ketch rudderstack plugin
1556
+ globalThis.updateKetchConsent=function(ketchConsentData){updateConsentStateFromData(state,ketchConsentData);};// retrieve consent data and update the state
1557
+ var ketchConsentData;if(!isUndefined(globalThis.ketchConsent)){ketchConsentData=globalThis.ketchConsent;}else {ketchConsentData=getKetchConsentData(storeManager,logger);}updateConsentStateFromData(state,ketchConsentData);},isDestinationConsented:function isDestinationConsented(state,destConfig,errorHandler,logger){var consentData=state.consents.data.value;if(!consentData.initialized){return true;}var allowedConsents=consentData.allowedConsents;try{var ketchConsentPurposes=destConfig.ketchConsentPurposes;// If the destination do not have this mapping events will be sent.
1558
+ if(!ketchConsentPurposes||ketchConsentPurposes.length===0){return true;}var purposes=ketchConsentPurposes.map(function(p){return p.purpose;}).filter(function(n){return n;});// Check if any of the destination's mapped ketch purposes are consented by the user in the browser.
1559
+ var containsAnyOfConsent=purposes.some(function(element){return allowedConsents.includes(element.trim());});return containsAnyOfConsent;}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,KETCH_CONSENT_MANAGER_PLUGIN,DESTINATION_CONSENT_STATUS_ERROR);return true;}}}};};
1560
+
1561
+ var QueueStatuses={IN_PROGRESS:'inProgress',QUEUE:'queue',RECLAIM_START:'reclaimStart',RECLAIM_END:'reclaimEnd',ACK:'ack',BATCH_QUEUE:'batchQueue'};
1691
1562
 
1692
1563
  var ScheduleModes=/*#__PURE__*/function(ScheduleModes){ScheduleModes[ScheduleModes["ASAP"]=1]="ASAP";ScheduleModes[ScheduleModes["RESCHEDULE"]=2]="RESCHEDULE";ScheduleModes[ScheduleModes["ABANDON"]=3]="ABANDON";return ScheduleModes;}({});var DEFAULT_CLOCK_LATE_FACTOR=2;var DEFAULT_CLOCK={setTimeout:function setTimeout(fn,ms){return globalThis.setTimeout(fn,ms);},clearTimeout:function clearTimeout(id){return globalThis.clearTimeout(id);},Date:globalThis.Date,clockLateFactor:DEFAULT_CLOCK_LATE_FACTOR};var Schedule=/*#__PURE__*/function(){function Schedule(){_classCallCheck(this,Schedule);_defineProperty(this,"tasks",{});_defineProperty(this,"nextId",1);_defineProperty(this,"clock",DEFAULT_CLOCK);}_createClass(Schedule,[{key:"now",value:function now(){return +new this.clock.Date();}},{key:"run",value:function run(task,timeout,mode){var id=(this.nextId+1).toString();this.tasks[id]=this.clock.setTimeout(this.handle(id,task,timeout,mode||ScheduleModes.ASAP),timeout);return id;}},{key:"handle",value:function handle(id,callback,timeout,mode){var _this=this;var start=this.now();return function(){delete _this.tasks[id];var elapsedTimeoutTime=start+timeout*(_this.clock.clockLateFactor||DEFAULT_CLOCK_LATE_FACTOR);var currentTime=_this.now();var notCompletedOrTimedOut=mode>=ScheduleModes.RESCHEDULE&&elapsedTimeoutTime<currentTime;if(notCompletedOrTimedOut){if(mode===ScheduleModes.RESCHEDULE){_this.run(callback,timeout,mode);}return undefined;}return callback();};}},{key:"cancel",value:function cancel(id){if(this.tasks[id]){this.clock.clearTimeout(this.tasks[id]);delete this.tasks[id];}}},{key:"cancelAll",value:function cancelAll(){Object.values(this.tasks).forEach(this.clock.clearTimeout);this.tasks={};}},{key:"setClock",value:function setClock(newClock){this.clock=newClock;}},{key:"resetClock",value:function resetClock(){this.clock=DEFAULT_CLOCK;}}]);return Schedule;}();
1693
1564
 
@@ -1762,7 +1633,7 @@
1762
1633
  // This will remain until we update the destinations to accept the event directly
1763
1634
  (_dest$instance=dest.instance)===null||_dest$instance===void 0||(_dest$instance$method=_dest$instance[methodName])===null||_dest$instance$method===void 0||_dest$instance$method.call(_dest$instance,{message:item});}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,NATIVE_DESTINATION_QUEUE_PLUGIN,DESTINATION_EVENT_FORWARDING_ERROR(dest.userFriendlyId));}};
1764
1635
 
1765
- var pluginName$6='NativeDestinationQueue';var NativeDestinationQueue=function NativeDestinationQueue(){return {name:pluginName$6,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$6]);},destinationsEventsQueue:{/**
1636
+ var pluginName$5='NativeDestinationQueue';var NativeDestinationQueue=function NativeDestinationQueue(){return {name:pluginName$5,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$5]);},destinationsEventsQueue:{/**
1766
1637
  * Initialize the queue for delivery to destinations
1767
1638
  * @param state Application state
1768
1639
  * @param pluginsManager PluginsManager instance
@@ -1786,7 +1657,7 @@
1786
1657
  * @param errorHandler Error handler instance
1787
1658
  * @param logger Logger instance
1788
1659
  * @returns none
1789
- */enqueue:function enqueue(state,eventsQueue,event,errorHandler,logger){event.integrations=normalizeIntegrationOptions(event.integrations);eventsQueue.addItem(event);},/**
1660
+ */enqueue:function enqueue(state,eventsQueue,event,errorHandler,logger){eventsQueue.addItem(event);},/**
1790
1661
  * This extension point is used to directly send the transformed event to the destination
1791
1662
  * @param state Application state
1792
1663
  * @param event RudderEvent Object
@@ -1797,7 +1668,7 @@
1797
1668
 
1798
1669
  var ONETRUST_CONSENT_MANAGER_PLUGIN='OneTrustConsentManagerPlugin';
1799
1670
 
1800
- var pluginName$5='OneTrustConsentManager';var OneTrustConsentManager=function OneTrustConsentManager(){return {name:pluginName$5,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$5]);},consentManager:{init:function init(state,storeManager,logger){if(!globalThis.OneTrust||!globalThis.OnetrustActiveGroups){logger===null||logger===void 0||logger.error(ONETRUST_ACCESS_ERROR(ONETRUST_CONSENT_MANAGER_PLUGIN));state.consents.data.value={initialized:false};return;}// OneTrustConsentManager SDK populates a data layer object OnetrustActiveGroups with
1671
+ var pluginName$4='OneTrustConsentManager';var OneTrustConsentManager=function OneTrustConsentManager(){return {name:pluginName$4,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$4]);},consentManager:{init:function init(state,storeManager,logger){if(!globalThis.OneTrust||!globalThis.OnetrustActiveGroups){logger===null||logger===void 0||logger.error(ONETRUST_ACCESS_ERROR(ONETRUST_CONSENT_MANAGER_PLUGIN));state.consents.data.value={initialized:false};return;}// OneTrustConsentManager SDK populates a data layer object OnetrustActiveGroups with
1801
1672
  // the cookie categories Ids that the user has consented to.
1802
1673
  // Eg: ',C0001,C0003,'
1803
1674
  // We split it and save it as an array.
@@ -1810,33 +1681,6 @@
1810
1681
  var validOneTrustCookieCategories=oneTrustCookieCategories.map(function(c){return c.oneTrustCookieCategory;}).filter(function(n){return n;});var containsAllConsent=true;// Check if all the destination's mapped cookie categories are consented by the user in the browser.
1811
1682
  containsAllConsent=validOneTrustCookieCategories.every(function(element){return Object.keys(allowedConsents).includes(element.trim())||Object.values(allowedConsents).includes(element.trim());});return containsAllConsent;}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,ONETRUST_CONSENT_MANAGER_PLUGIN,DESTINATION_CONSENT_STATUS_ERROR);return true;}}}};};
1812
1683
 
1813
- var KETCH_CONSENT_MANAGER_PLUGIN='KetchConsentManagerPlugin';var KETCH_CONSENT_COOKIE_NAME_V1='_ketch_consent_v1_';
1814
-
1815
- /**
1816
- * Gets the consent data from the Ketch's consent cookie
1817
- * @param storeManager Store manager instance
1818
- * @param logger Logger instance
1819
- * @returns Consent data from the consent cookie
1820
- */var getKetchConsentData=function getKetchConsentData(storeManager,logger){var rawConsentCookieData=null;try{// Create a data store instance to read the consent cookie
1821
- var dataStore=storeManager===null||storeManager===void 0?void 0:storeManager.setStore({id:KETCH_CONSENT_MANAGER_PLUGIN,name:KETCH_CONSENT_MANAGER_PLUGIN,type:COOKIE_STORAGE});rawConsentCookieData=dataStore===null||dataStore===void 0?void 0:dataStore.engine.getItem(KETCH_CONSENT_COOKIE_NAME_V1);}catch(err){logger===null||logger===void 0||logger.error(KETCH_CONSENT_COOKIE_READ_ERROR(KETCH_CONSENT_MANAGER_PLUGIN),err);return undefined;}if(isNullOrUndefined(rawConsentCookieData)){return undefined;}// Decode and parse the cookie data to JSON
1822
- var consentCookieData;try{consentCookieData=JSON.parse(fromBase64(rawConsentCookieData));}catch(err){logger===null||logger===void 0||logger.error(KETCH_CONSENT_COOKIE_PARSE_ERROR(KETCH_CONSENT_MANAGER_PLUGIN),err);return undefined;}if(!consentCookieData){return undefined;}// Convert the cookie data to consent data
1823
- var consentPurposes={};Object.entries(consentCookieData).forEach(function(pEntry){var purposeCode=pEntry[0];var purposeValue=pEntry[1];consentPurposes[purposeCode]=(purposeValue===null||purposeValue===void 0?void 0:purposeValue.status)==='granted';});return consentPurposes;};/**
1824
- * Gets the consent data in the format expected by the application state
1825
- * @param ketchConsentData Consent data derived from the consent cookie
1826
- * @returns Consent data
1827
- */var getConsentData=function getConsentData(ketchConsentData){var allowedConsents=[];var deniedConsentIds=[];var initialized=false;if(ketchConsentData){Object.entries(ketchConsentData).forEach(function(e){var purposeCode=e[0];var isConsented=e[1];if(isConsented){allowedConsents.push(purposeCode);}else {deniedConsentIds.push(purposeCode);}});initialized=true;}return {initialized:initialized,allowedConsents:allowedConsents,deniedConsentIds:deniedConsentIds};};var updateConsentStateFromData=function updateConsentStateFromData(state,ketchConsentData){var consentData=getConsentData(ketchConsentData);state.consents.data.value=consentData;};
1828
-
1829
- var pluginName$4='KetchConsentManager';var KetchConsentManager=function KetchConsentManager(){return {name:pluginName$4,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$4]);},consentManager:{init:function init(state,storeManager,logger){// getKetchUserConsentedPurposes returns current ketch opted-in purposes
1830
- // This will be helpful for debugging
1831
- globalThis.getKetchUserConsentedPurposes=function(){var _state$consents$data$;return (_state$consents$data$=state.consents.data.value.allowedConsents)===null||_state$consents$data$===void 0?void 0:_state$consents$data$.slice();};// getKetchUserDeniedPurposes returns current ketch opted-out purposes
1832
- // This will be helpful for debugging
1833
- globalThis.getKetchUserDeniedPurposes=function(){var _state$consents$data$2;return (_state$consents$data$2=state.consents.data.value.deniedConsentIds)===null||_state$consents$data$2===void 0?void 0:_state$consents$data$2.slice();};// updateKetchConsent callback function to update current consent purpose state
1834
- // this will be called from ketch rudderstack plugin
1835
- globalThis.updateKetchConsent=function(ketchConsentData){updateConsentStateFromData(state,ketchConsentData);};// retrieve consent data and update the state
1836
- var ketchConsentData;if(!isUndefined(globalThis.ketchConsent)){ketchConsentData=globalThis.ketchConsent;}else {ketchConsentData=getKetchConsentData(storeManager,logger);}updateConsentStateFromData(state,ketchConsentData);},isDestinationConsented:function isDestinationConsented(state,destConfig,errorHandler,logger){var consentData=state.consents.data.value;if(!consentData.initialized){return true;}var allowedConsents=consentData.allowedConsents;try{var ketchConsentPurposes=destConfig.ketchConsentPurposes;// If the destination do not have this mapping events will be sent.
1837
- if(!ketchConsentPurposes||ketchConsentPurposes.length===0){return true;}var purposes=ketchConsentPurposes.map(function(p){return p.purpose;}).filter(function(n){return n;});// Check if any of the destination's mapped ketch purposes are consented by the user in the browser.
1838
- var containsAnyOfConsent=purposes.some(function(element){return allowedConsents.includes(element.trim());});return containsAnyOfConsent;}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,KETCH_CONSENT_MANAGER_PLUGIN,DESTINATION_CONSENT_STATUS_ERROR);return true;}}}};};
1839
-
1840
1684
  var ENCRYPTION_PREFIX_V3='RS_ENC_v3_';
1841
1685
 
1842
1686
  var encrypt$1=function encrypt(value){return "".concat(ENCRYPTION_PREFIX_V3).concat(toBase64(value));};var decrypt$1=function decrypt(value){if(value.startsWith(ENCRYPTION_PREFIX_V3)){return fromBase64(value.substring(ENCRYPTION_PREFIX_V3.length));}return value;};
@@ -3017,7 +2861,7 @@
3017
2861
  var DEFAULT_RETRY_QUEUE_OPTIONS={maxRetryDelay:360000,minRetryDelay:1000,backoffFactor:2,maxAttempts:10,maxItems:100};var REQUEST_TIMEOUT_MS=10*1000;// 10 seconds
3018
2862
  var DATA_PLANE_API_VERSION='v1';var QUEUE_NAME='rudder';var XHR_QUEUE_PLUGIN='XhrQueuePlugin';
3019
2863
 
3020
- var getNormalizedQueueOptions=function getNormalizedQueueOptions(queueOpts){return mergeDeepRight(DEFAULT_RETRY_QUEUE_OPTIONS,queueOpts);};var getDeliveryUrl=function getDeliveryUrl(dataplaneUrl,endpoint){var dpUrl=new URL(dataplaneUrl);return new URL(removeDuplicateSlashes([dpUrl.pathname,'/',DATA_PLANE_API_VERSION,'/',endpoint].join('')),dpUrl).href;};var getBatchDeliveryUrl=function getBatchDeliveryUrl(dataplaneUrl){return getDeliveryUrl(dataplaneUrl,'batch');};var logErrorOnFailure=function logErrorOnFailure(details,url,willBeRetried,attemptNumber,maxRetryAttempts,logger){if(isUndefined(details===null||details===void 0?void 0:details.error)||isUndefined(logger)){return;}var isRetryableFailure=isErrRetryable(details);var errMsg=EVENT_DELIVERY_FAILURE_ERROR_PREFIX(XHR_QUEUE_PLUGIN,url);var dropMsg="The event(s) will be dropped.";if(isRetryableFailure){if(willBeRetried){errMsg="".concat(errMsg," It/they will be retried.");if(attemptNumber>0){errMsg="".concat(errMsg," Retry attempt ").concat(attemptNumber," of ").concat(maxRetryAttempts,".");}}else {errMsg="".concat(errMsg," Retries exhausted (").concat(maxRetryAttempts,"). ").concat(dropMsg);}}else {errMsg="".concat(errMsg," ").concat(dropMsg);}logger===null||logger===void 0||logger.error(errMsg);};var getRequestInfo=function getRequestInfo(itemData,state,logger){var data;var headers;var url;if(Array.isArray(itemData)){var finalEvents=itemData.map(function(queueItemData){return getFinalEventForDeliveryMutator(queueItemData.event,state);});data=getBatchDeliveryPayload(finalEvents,logger);headers=_objectSpread2({},itemData[0].headers);url=getBatchDeliveryUrl(state.lifecycle.activeDataplaneUrl.value);}else {var eventUrl=itemData.url,event=itemData.event,eventHeaders=itemData.headers;var finalEvent=getFinalEventForDeliveryMutator(event,state);data=getDeliveryPayload$1(finalEvent,logger);headers=_objectSpread2({},eventHeaders);url=eventUrl;}return {data:data,headers:headers,url:url};};
2864
+ var getNormalizedQueueOptions=function getNormalizedQueueOptions(queueOpts){return mergeDeepRight(DEFAULT_RETRY_QUEUE_OPTIONS,queueOpts);};var getDeliveryUrl=function getDeliveryUrl(dataplaneUrl,endpoint){var dpUrl=new URL(dataplaneUrl);return new URL(removeDuplicateSlashes([dpUrl.pathname,'/',DATA_PLANE_API_VERSION,'/',endpoint].join('')),dpUrl).href;};var getBatchDeliveryUrl=function getBatchDeliveryUrl(dataplaneUrl){return getDeliveryUrl(dataplaneUrl,'batch');};var logErrorOnFailure=function logErrorOnFailure(details,url,willBeRetried,attemptNumber,maxRetryAttempts,logger){if(isUndefined(details===null||details===void 0?void 0:details.error)||isUndefined(logger)){return;}var isRetryableFailure=isErrRetryable(details);var errMsg=EVENT_DELIVERY_FAILURE_ERROR_PREFIX(XHR_QUEUE_PLUGIN,url);var dropMsg="The event(s) will be dropped.";if(isRetryableFailure){if(willBeRetried){errMsg="".concat(errMsg," It/they will be retried.");if(attemptNumber>0){errMsg="".concat(errMsg," Retry attempt ").concat(attemptNumber," of ").concat(maxRetryAttempts,".");}}else {errMsg="".concat(errMsg," Retries exhausted (").concat(maxRetryAttempts,"). ").concat(dropMsg);}}else {errMsg="".concat(errMsg," ").concat(dropMsg);}logger===null||logger===void 0||logger.error(errMsg);};var getRequestInfo=function getRequestInfo(itemData,state,logger){var data;var headers;var url;if(Array.isArray(itemData)){var finalEvents=itemData.map(function(queueItemData){return getFinalEventForDeliveryMutator(queueItemData.event);});data=getBatchDeliveryPayload(finalEvents,logger);headers=_objectSpread2({},itemData[0].headers);url=getBatchDeliveryUrl(state.lifecycle.activeDataplaneUrl.value);}else {var eventUrl=itemData.url,event=itemData.event,eventHeaders=itemData.headers;var finalEvent=getFinalEventForDeliveryMutator(event);data=getDeliveryPayload$1(finalEvent,logger);headers=_objectSpread2({},eventHeaders);url=eventUrl;}return {data:data,headers:headers,url:url};};
3021
2865
 
3022
2866
  var pluginName='XhrQueue';var XhrQueue=function XhrQueue(){return {name:pluginName,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName]);},dataplaneEventsQueue:{/**
3023
2867
  * Initialize the queue for delivery
@@ -3044,10 +2888,9 @@
3044
2888
  var headers={// TODO: why do we need this header value?
3045
2889
  AnonymousId:toBase64(event.anonymousId)};eventsQueue.addItem({url:url,headers:headers,event:event});}}};};
3046
2890
 
3047
- // eslint-disable-next-line import/no-extraneous-dependencies
3048
2891
  /**
3049
2892
  * Map plugin names to direct code imports from plugins package
3050
- */var legacyBuildPluginImports=function legacyBuildPluginImports(){return {Bugsnag:Bugsnag,BeaconQueue:BeaconQueue,DeviceModeTransformation:DeviceModeTransformation,DeviceModeDestinations:DeviceModeDestinations,ErrorReporting:ErrorReporting,ExternalAnonymousId:ExternalAnonymousId,GoogleLinker:GoogleLinker,NativeDestinationQueue:NativeDestinationQueue,StorageEncryption:StorageEncryption,StorageEncryptionLegacy:StorageEncryptionLegacy,StorageMigrator:StorageMigrator,XhrQueue:XhrQueue,OneTrustConsentManager:OneTrustConsentManager,KetchConsentManager:KetchConsentManager};};
2893
+ */var legacyBuildPluginImports=function legacyBuildPluginImports(){return {BeaconQueue:BeaconQueue,Bugsnag:Bugsnag,DeviceModeDestinations:DeviceModeDestinations,DeviceModeTransformation:DeviceModeTransformation,ErrorReporting:ErrorReporting,ExternalAnonymousId:ExternalAnonymousId,GoogleLinker:GoogleLinker,KetchConsentManager:KetchConsentManager,NativeDestinationQueue:NativeDestinationQueue,OneTrustConsentManager:OneTrustConsentManager,StorageEncryption:StorageEncryption,StorageEncryptionLegacy:StorageEncryptionLegacy,StorageMigrator:StorageMigrator,XhrQueue:XhrQueue};};
3051
2894
 
3052
2895
  /**
3053
2896
  * Map of mandatory plugin names and direct imports
@@ -3065,7 +2908,7 @@
3065
2908
  this.setActivePlugins();this.registerLocalPlugins();this.registerRemotePlugins();this.attachEffects();}/**
3066
2909
  * Update state based on plugin loaded status
3067
2910
  */ // eslint-disable-next-line class-methods-use-this
3068
- },{key:"attachEffects",value:function attachEffects(){b(function(){var isAllPluginsReady=state.plugins.activePlugins.value.length===0||state.plugins.loadedPlugins.value.length+state.plugins.failedPlugins.value.length===state.plugins.totalPluginsToLoad.value;if(isAllPluginsReady){o(function(){state.plugins.ready.value=true;// TODO: decide what to do if a plugin fails to load for any reason.
2911
+ },{key:"attachEffects",value:function attachEffects(){E(function(){var isAllPluginsReady=state.plugins.activePlugins.value.length===0||state.plugins.loadedPlugins.value.length+state.plugins.failedPlugins.value.length===state.plugins.totalPluginsToLoad.value;if(isAllPluginsReady){r(function(){state.plugins.ready.value=true;// TODO: decide what to do if a plugin fails to load for any reason.
3069
2912
  // Should we stop here or should we progress?
3070
2913
  state.lifecycle.status.value=LifecycleStatus.PluginsReady;});}});}/**
3071
2914
  * Determine the list of plugins that should be loaded based on sourceConfig & load options
@@ -3080,7 +2923,7 @@
3080
2923
  if(!state.storage.migrate.value){pluginsToLoadFromConfig=pluginsToLoadFromConfig.filter(function(pluginName){return pluginName!==PluginName.StorageMigrator;});}return [].concat(_toConsumableArray(Object.keys(getMandatoryPluginsMap())),_toConsumableArray(pluginsToLoadFromConfig));}/**
3081
2924
  * Determine the list of plugins that should be activated
3082
2925
  */},{key:"setActivePlugins",value:function setActivePlugins(){var pluginsToLoad=this.getPluginsToLoadBasedOnConfig();// Merging available mandatory and optional plugin name list
3083
- var availablePlugins=[].concat(_toConsumableArray(Object.keys(pluginsInventory)),_toConsumableArray(remotePluginNames));var activePlugins=[];var failedPlugins=[];pluginsToLoad.forEach(function(pluginName){if(availablePlugins.includes(pluginName)){activePlugins.push(pluginName);}else {failedPlugins.push(pluginName);}});if(failedPlugins.length>0){this.onError(new Error("Ignoring loading of unknown plugins: ".concat(failedPlugins.join(','),". Mandatory plugins: ").concat(Object.keys(getMandatoryPluginsMap()).join(','),". Load option plugins: ").concat(state.plugins.pluginsToLoadFromConfig.value.join(','))));}o(function(){state.plugins.totalPluginsToLoad.value=pluginsToLoad.length;state.plugins.activePlugins.value=activePlugins;state.plugins.failedPlugins.value=failedPlugins;});}/**
2926
+ var availablePlugins=[].concat(_toConsumableArray(Object.keys(pluginsInventory)),_toConsumableArray(remotePluginNames));var activePlugins=[];var failedPlugins=[];pluginsToLoad.forEach(function(pluginName){if(availablePlugins.includes(pluginName)){activePlugins.push(pluginName);}else {failedPlugins.push(pluginName);}});if(failedPlugins.length>0){this.onError(new Error("Ignoring loading of unknown plugins: ".concat(failedPlugins.join(','),". Mandatory plugins: ").concat(Object.keys(getMandatoryPluginsMap()).join(','),". Load option plugins: ").concat(state.plugins.pluginsToLoadFromConfig.value.join(','))));}r(function(){state.plugins.totalPluginsToLoad.value=pluginsToLoad.length;state.plugins.activePlugins.value=activePlugins;state.plugins.failedPlugins.value=failedPlugins;});}/**
3084
2927
  * Register plugins that are direct imports to PluginEngine
3085
2928
  */},{key:"registerLocalPlugins",value:function registerLocalPlugins(){var _this=this;Object.values(pluginsInventory).forEach(function(localPlugin){if(state.plugins.activePlugins.value.includes(localPlugin().name)){_this.register([localPlugin()]);}});}/**
3086
2929
  * Register plugins that are dynamic imports to PluginEngine
@@ -3126,7 +2969,11 @@
3126
2969
  * Clear basic authentication header
3127
2970
  */},{key:"resetAuthHeader",value:function resetAuthHeader(){this.basicAuthHeader=undefined;}}]);return HttpClient;}();var defaultHttpClient=new HttpClient(defaultErrorHandler,defaultLogger);
3128
2971
 
3129
- var STORAGE_TEST_COOKIE='test_rudder_cookie';var STORAGE_TEST_LOCAL_STORAGE='test_rudder_ls';var STORAGE_TEST_SESSION_STORAGE='test_rudder_ss';var STORAGE_TEST_TOP_LEVEL_DOMAIN='__tld__';var CLIENT_DATA_STORE_NAME='clientData';
2972
+ var UserSessionKeys=/*#__PURE__*/function(UserSessionKeys){UserSessionKeys["userId"]="userId";UserSessionKeys["userTraits"]="userTraits";UserSessionKeys["anonymousId"]="anonymousId";UserSessionKeys["groupId"]="groupId";UserSessionKeys["groupTraits"]="groupTraits";UserSessionKeys["initialReferrer"]="initialReferrer";UserSessionKeys["initialReferringDomain"]="initialReferringDomain";UserSessionKeys["sessionInfo"]="sessionInfo";return UserSessionKeys;}({});
2973
+
2974
+ var STORAGE_TEST_COOKIE='test_rudder_cookie';var STORAGE_TEST_LOCAL_STORAGE='test_rudder_ls';var STORAGE_TEST_SESSION_STORAGE='test_rudder_ss';var STORAGE_TEST_TOP_LEVEL_DOMAIN='__tld__';var CLIENT_DATA_STORE_COOKIE='clientDataInCookie';var CLIENT_DATA_STORE_LS='clientDataInLocalStorage';var CLIENT_DATA_STORE_MEMORY='clientDataInMemory';
2975
+
2976
+ var _storageClientDataSto;var storageClientDataStoreNameMap=(_storageClientDataSto={},_defineProperty(_storageClientDataSto,COOKIE_STORAGE,CLIENT_DATA_STORE_COOKIE),_defineProperty(_storageClientDataSto,LOCAL_STORAGE,CLIENT_DATA_STORE_LS),_defineProperty(_storageClientDataSto,MEMORY_STORAGE,CLIENT_DATA_STORE_MEMORY),_storageClientDataSto);
3130
2977
 
3131
2978
  var detectAdBlockers=function detectAdBlockers(errorHandler,logger){// Apparently, '?view=ad' is a query param that is blocked by majority of adblockers
3132
2979
  // Use source config URL here as it is very unlikely to be blocked by adblockers
@@ -3281,12 +3128,14 @@
3281
3128
  * A service to manage stores & available storage client configurations
3282
3129
  */var StoreManager=/*#__PURE__*/function(){function StoreManager(pluginsManager,errorHandler,logger){_classCallCheck(this,StoreManager);_defineProperty(this,"stores",{});_defineProperty(this,"isInitialized",false);_defineProperty(this,"hasErrorHandler",false);this.errorHandler=errorHandler;this.logger=logger;this.hasErrorHandler=Boolean(this.errorHandler);this.pluginsManager=pluginsManager;this.onError=this.onError.bind(this);}/**
3283
3130
  * Configure available storage client instances
3284
- */_createClass(StoreManager,[{key:"init",value:function init(){if(this.isInitialized){return;}var config={cookieOptions:{samesite:state.loadOptions.value.sameSiteCookie,secure:state.loadOptions.value.secureCookie,domain:state.loadOptions.value.setCookieDomain,enabled:true},localStorageOptions:{enabled:true},inMemoryStorageOptions:{enabled:true}};configureStorageEngines(removeUndefinedValues(config.cookieOptions),removeUndefinedValues(config.localStorageOptions),removeUndefinedValues(config.inMemoryStorageOptions));this.initClientDataStore();this.isInitialized=true;}/**
3131
+ */_createClass(StoreManager,[{key:"init",value:function init(){var _state$storage$cookie;if(this.isInitialized){return;}var config={cookieOptions:{samesite:state.loadOptions.value.sameSiteCookie,secure:state.loadOptions.value.secureCookie,domain:state.loadOptions.value.setCookieDomain,enabled:true},localStorageOptions:{enabled:true},inMemoryStorageOptions:{enabled:true}};configureStorageEngines(removeUndefinedValues(mergeDeepRight(config.cookieOptions||{},((_state$storage$cookie=state.storage.cookie)===null||_state$storage$cookie===void 0?void 0:_state$storage$cookie.value)||{})),removeUndefinedValues(config.localStorageOptions),removeUndefinedValues(config.inMemoryStorageOptions));this.initClientDataStore();this.isInitialized=true;}/**
3285
3132
  * Create store to persist data used by the SDK like session, used details etc
3286
- */},{key:"initClientDataStore",value:function initClientDataStore(){var _getStorageEngine,_getStorageEngine2,_getStorageEngine3;var storageType=state.storage.type.value||COOKIE_STORAGE;var finalStorageType=storageType;switch(storageType){case LOCAL_STORAGE:if(!((_getStorageEngine=getStorageEngine(LOCAL_STORAGE))!==null&&_getStorageEngine!==void 0&&_getStorageEngine.isEnabled)){finalStorageType=MEMORY_STORAGE;}break;case MEMORY_STORAGE:finalStorageType=MEMORY_STORAGE;break;case NO_STORAGE:finalStorageType=NO_STORAGE;break;case COOKIE_STORAGE:default:// First try setting the storage to cookie else to local storage
3287
- if((_getStorageEngine2=getStorageEngine(COOKIE_STORAGE))!==null&&_getStorageEngine2!==void 0&&_getStorageEngine2.isEnabled){finalStorageType=COOKIE_STORAGE;}else if((_getStorageEngine3=getStorageEngine(LOCAL_STORAGE))!==null&&_getStorageEngine3!==void 0&&_getStorageEngine3.isEnabled){finalStorageType=LOCAL_STORAGE;}else {finalStorageType=MEMORY_STORAGE;}break;}if(finalStorageType!==storageType){var _this$logger;(_this$logger=this.logger)===null||_this$logger===void 0||_this$logger.warn(STORAGE_UNAVAILABLE_WARNING(STORE_MANAGER,storageType,finalStorageType));}// TODO: fill in extra config values and bring them in from StoreManagerOptions if needed
3133
+ */},{key:"initClientDataStore",value:function initClientDataStore(){var _state$loadOptions$va,_this=this,_getStorageEngine4,_getStorageEngine5;var globalStorageType=state.storage.type.value;var trulyAnonymousTracking=true;var entries=(_state$loadOptions$va=state.loadOptions.value.storage)===null||_state$loadOptions$va===void 0?void 0:_state$loadOptions$va.entries;Object.keys(UserSessionKeys).forEach(function(sessionKey){var _entries$key,_getStorageEngine,_getStorageEngine2,_getStorageEngine3;var key=sessionKey;var storageKey=sessionKey;var providedStorageType=entries===null||entries===void 0||(_entries$key=entries[key])===null||_entries$key===void 0?void 0:_entries$key.type;var storageType=providedStorageType||globalStorageType||DEFAULT_STORAGE_TYPE;var finalStorageType=storageType;switch(storageType){case LOCAL_STORAGE:if(!((_getStorageEngine=getStorageEngine(LOCAL_STORAGE))!==null&&_getStorageEngine!==void 0&&_getStorageEngine.isEnabled)){finalStorageType=MEMORY_STORAGE;}break;case MEMORY_STORAGE:case NO_STORAGE:break;case COOKIE_STORAGE:default:// First try setting the storage to cookie else to local storage
3134
+ if((_getStorageEngine2=getStorageEngine(COOKIE_STORAGE))!==null&&_getStorageEngine2!==void 0&&_getStorageEngine2.isEnabled){finalStorageType=COOKIE_STORAGE;}else if((_getStorageEngine3=getStorageEngine(LOCAL_STORAGE))!==null&&_getStorageEngine3!==void 0&&_getStorageEngine3.isEnabled){finalStorageType=LOCAL_STORAGE;}else {finalStorageType=MEMORY_STORAGE;}break;}if(finalStorageType!==storageType){var _this$logger;(_this$logger=_this.logger)===null||_this$logger===void 0||_this$logger.warn(STORAGE_UNAVAILABLE_WARNING(STORE_MANAGER,storageType,finalStorageType));}if(finalStorageType!==NO_STORAGE){trulyAnonymousTracking=false;}var storageState=state.storage.entries.value;state.storage.entries.value=_objectSpread2(_objectSpread2({},storageState),{},_defineProperty({},sessionKey,{type:finalStorageType,key:userSessionStorageKeys[storageKey]}));});state.storage.trulyAnonymousTracking.value=trulyAnonymousTracking;// TODO: fill in extra config values and bring them in from StoreManagerOptions if needed
3288
3135
  // TODO: should we pass the keys for all in order to validate or leave free as v1.1?
3289
- if(finalStorageType!==NO_STORAGE){this.setStore({id:CLIENT_DATA_STORE_NAME,name:CLIENT_DATA_STORE_NAME,isEncrypted:true,noCompoundKey:true,type:finalStorageType});}}/**
3136
+ // Initializing all the enabled store because previous user data might be in different storage
3137
+ // that needs auto migration
3138
+ var storageTypesRequiringInitialization=[MEMORY_STORAGE];if((_getStorageEngine4=getStorageEngine(LOCAL_STORAGE))!==null&&_getStorageEngine4!==void 0&&_getStorageEngine4.isEnabled){storageTypesRequiringInitialization.push(LOCAL_STORAGE);}if((_getStorageEngine5=getStorageEngine(COOKIE_STORAGE))!==null&&_getStorageEngine5!==void 0&&_getStorageEngine5.isEnabled){storageTypesRequiringInitialization.push(COOKIE_STORAGE);}storageTypesRequiringInitialization.forEach(function(storageType){_this.setStore({id:storageClientDataStoreNameMap[storageType],name:storageClientDataStoreNameMap[storageType],isEncrypted:true,noCompoundKey:true,type:storageType});});}/**
3290
3139
  * Create a new store
3291
3140
  */},{key:"setStore",value:function setStore(storeConfig){var storageEngine=getStorageEngine(storeConfig.type);this.stores[storeConfig.id]=new Store(storeConfig,storageEngine,this.pluginsManager);return this.stores[storeConfig.id];}/**
3292
3141
  * Retrieve a store
@@ -3339,8 +3188,8 @@
3339
3188
  * @returns boolean
3340
3189
  */var isPositiveInteger=function isPositiveInteger(num){return isNumber(num)&&num>=0&&Number.isInteger(num);};
3341
3190
 
3342
- var normalizeLoadOptions=function normalizeLoadOptions(loadOptionsFromState,loadOptions){var _normalizedLoadOpts$p;// TODO: Maybe add warnings for invalid values
3343
- var normalizedLoadOpts=clone$1(loadOptions);if(!isString(normalizedLoadOpts.setCookieDomain)){delete normalizedLoadOpts.setCookieDomain;}if(!getObjectValues(CookieSameSite).includes(normalizedLoadOpts.sameSiteCookie)){delete normalizedLoadOpts.sameSiteCookie;}normalizedLoadOpts.secureCookie=normalizedLoadOpts.secureCookie===true;if(!getObjectValues(UaChTrackLevel).includes(normalizedLoadOpts.uaChTrackLevel)){delete normalizedLoadOpts.uaChTrackLevel;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.integrations)){delete normalizedLoadOpts.integrations;}normalizedLoadOpts.plugins=(_normalizedLoadOpts$p=normalizedLoadOpts.plugins)!==null&&_normalizedLoadOpts$p!==void 0?_normalizedLoadOpts$p:defaultOptionalPluginsList;normalizedLoadOpts.useGlobalIntegrationsConfigInEvents=normalizedLoadOpts.useGlobalIntegrationsConfigInEvents===true;normalizedLoadOpts.bufferDataPlaneEventsUntilReady=normalizedLoadOpts.bufferDataPlaneEventsUntilReady===true;normalizedLoadOpts.sendAdblockPage=normalizedLoadOpts.sendAdblockPage===true;if(!isObjectLiteralAndNotNull(normalizedLoadOpts.sendAdblockPageOptions)){delete normalizedLoadOpts.sendAdblockPageOptions;}if(!isDefined(normalizedLoadOpts.loadIntegration)){delete normalizedLoadOpts.loadIntegration;}else {normalizedLoadOpts.loadIntegration=normalizedLoadOpts.loadIntegration===true;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.storage)){delete normalizedLoadOpts.storage;}else {var _normalizedLoadOpts$s;normalizedLoadOpts.storage=removeUndefinedAndNullValues(normalizedLoadOpts.storage);normalizedLoadOpts.storage.migrate=((_normalizedLoadOpts$s=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s===void 0?void 0:_normalizedLoadOpts$s.migrate)===true;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.beaconQueueOptions)){delete normalizedLoadOpts.beaconQueueOptions;}else {normalizedLoadOpts.beaconQueueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.beaconQueueOptions);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.destinationsQueueOptions)){delete normalizedLoadOpts.destinationsQueueOptions;}else {normalizedLoadOpts.destinationsQueueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.destinationsQueueOptions);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.queueOptions)){delete normalizedLoadOpts.queueOptions;}else {normalizedLoadOpts.queueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.queueOptions);}normalizedLoadOpts.lockIntegrationsVersion=normalizedLoadOpts.lockIntegrationsVersion===true;if(!isNumber(normalizedLoadOpts.dataPlaneEventsBufferTimeout)){delete normalizedLoadOpts.dataPlaneEventsBufferTimeout;}var mergedLoadOptions=mergeDeepRight(loadOptionsFromState,normalizedLoadOpts);return mergedLoadOptions;};var getSourceConfigURL=function getSourceConfigURL(configUrl,writeKey,lockIntegrationsVersion,logger){var defSearchParams=new URLSearchParams({p:MODULE_TYPE,v:APP_VERSION,build:BUILD_TYPE,writeKey:writeKey,lockIntegrationsVersion:lockIntegrationsVersion.toString()});var origin=DEFAULT_CONFIG_BE_URL;var searchParams=defSearchParams;var pathname='/sourceConfig/';var hash='';// Ideally, this check is not required but URL polyfill
3191
+ var normalizeLoadOptions=function normalizeLoadOptions(loadOptionsFromState,loadOptions){var _normalizedLoadOpts$p,_normalizedLoadOpts$s2;// TODO: Maybe add warnings for invalid values
3192
+ var normalizedLoadOpts=clone$1(loadOptions);if(!isString(normalizedLoadOpts.setCookieDomain)){delete normalizedLoadOpts.setCookieDomain;}if(!getObjectValues(CookieSameSite).includes(normalizedLoadOpts.sameSiteCookie)){delete normalizedLoadOpts.sameSiteCookie;}normalizedLoadOpts.secureCookie=normalizedLoadOpts.secureCookie===true;if(!getObjectValues(UaChTrackLevel).includes(normalizedLoadOpts.uaChTrackLevel)){delete normalizedLoadOpts.uaChTrackLevel;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.integrations)){delete normalizedLoadOpts.integrations;}normalizedLoadOpts.plugins=(_normalizedLoadOpts$p=normalizedLoadOpts.plugins)!==null&&_normalizedLoadOpts$p!==void 0?_normalizedLoadOpts$p:defaultOptionalPluginsList;normalizedLoadOpts.useGlobalIntegrationsConfigInEvents=normalizedLoadOpts.useGlobalIntegrationsConfigInEvents===true;normalizedLoadOpts.bufferDataPlaneEventsUntilReady=normalizedLoadOpts.bufferDataPlaneEventsUntilReady===true;normalizedLoadOpts.sendAdblockPage=normalizedLoadOpts.sendAdblockPage===true;if(!isObjectLiteralAndNotNull(normalizedLoadOpts.sendAdblockPageOptions)){delete normalizedLoadOpts.sendAdblockPageOptions;}if(!isDefined(normalizedLoadOpts.loadIntegration)){delete normalizedLoadOpts.loadIntegration;}else {normalizedLoadOpts.loadIntegration=normalizedLoadOpts.loadIntegration===true;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.storage)){delete normalizedLoadOpts.storage;}else {var _normalizedLoadOpts$s;normalizedLoadOpts.storage=removeUndefinedAndNullValues(normalizedLoadOpts.storage);normalizedLoadOpts.storage.migrate=((_normalizedLoadOpts$s=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s===void 0?void 0:_normalizedLoadOpts$s.migrate)===true;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.beaconQueueOptions)){delete normalizedLoadOpts.beaconQueueOptions;}else {normalizedLoadOpts.beaconQueueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.beaconQueueOptions);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.destinationsQueueOptions)){delete normalizedLoadOpts.destinationsQueueOptions;}else {normalizedLoadOpts.destinationsQueueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.destinationsQueueOptions);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.queueOptions)){delete normalizedLoadOpts.queueOptions;}else {normalizedLoadOpts.queueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.queueOptions);}normalizedLoadOpts.lockIntegrationsVersion=normalizedLoadOpts.lockIntegrationsVersion===true;if(!isNumber(normalizedLoadOpts.dataPlaneEventsBufferTimeout)){delete normalizedLoadOpts.dataPlaneEventsBufferTimeout;}if(!isObjectLiteralAndNotNull((_normalizedLoadOpts$s2=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s2===void 0?void 0:_normalizedLoadOpts$s2.cookie)){var _normalizedLoadOpts$s3;(_normalizedLoadOpts$s3=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s3===void 0||delete _normalizedLoadOpts$s3.cookie;}else {var _normalizedLoadOpts$s4;normalizedLoadOpts.storage.cookie=removeUndefinedAndNullValues((_normalizedLoadOpts$s4=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s4===void 0?void 0:_normalizedLoadOpts$s4.cookie);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.preConsent)){delete normalizedLoadOpts.preConsent;}else {normalizedLoadOpts.preConsent=removeUndefinedAndNullValues(normalizedLoadOpts.preConsent);}var mergedLoadOptions=mergeDeepRight(loadOptionsFromState,normalizedLoadOpts);return mergedLoadOptions;};var getSourceConfigURL=function getSourceConfigURL(configUrl,writeKey,lockIntegrationsVersion,logger){var defSearchParams=new URLSearchParams({p:MODULE_TYPE,v:APP_VERSION,build:BUILD_TYPE,writeKey:writeKey,lockIntegrationsVersion:lockIntegrationsVersion.toString()});var origin=DEFAULT_CONFIG_BE_URL;var searchParams=defSearchParams;var pathname='/sourceConfig/';var hash='';// Ideally, this check is not required but URL polyfill
3344
3193
  // doesn't seem to throw errors for empty URLs
3345
3194
  // TODO: Need to improve this check to find out if the URL is valid or not
3346
3195
  if(configUrl){try{var configUrlInstance=new URL(configUrl);if(!removeTrailingSlashes(configUrlInstance.pathname).endsWith('/sourceConfig')){configUrlInstance.pathname="".concat(removeTrailingSlashes(configUrlInstance.pathname),"/sourceConfig/");}configUrlInstance.pathname=removeDuplicateSlashes(configUrlInstance.pathname);defSearchParams.forEach(function(value,key){if(configUrlInstance.searchParams.get(key)===null){configUrlInstance.searchParams.set(key,value);}});origin=configUrlInstance.origin;pathname=configUrlInstance.pathname;searchParams=configUrlInstance.searchParams;hash=configUrlInstance.hash;}catch(err){logger===null||logger===void 0||logger.warn(INVALID_CONFIG_URL_WARNING(CONFIG_MANAGER,configUrl));}}return "".concat(origin).concat(pathname,"?").concat(searchParams).concat(hash);};
@@ -3368,21 +3217,39 @@
3368
3217
  if(serverUrl){return serverUrl;}// return undefined if data plane url can not be determined
3369
3218
  return undefined;};
3370
3219
 
3220
+ var DEFAULT_PRE_CONSENT_STORAGE_STRATEGY=StorageStrategy.None;var DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE=DeliveryType.Immediate;
3221
+
3371
3222
  var isErrorReportingEnabled=function isErrorReportingEnabled(sourceConfig){var _sourceConfig$statsCo;return (sourceConfig===null||sourceConfig===void 0||(_sourceConfig$statsCo=sourceConfig.statsCollection)===null||_sourceConfig$statsCo===void 0||(_sourceConfig$statsCo=_sourceConfig$statsCo.errors)===null||_sourceConfig$statsCo===void 0?void 0:_sourceConfig$statsCo.enabled)===true;};var getErrorReportingProviderNameFromConfig=function getErrorReportingProviderNameFromConfig(sourceConfig){var _sourceConfig$statsCo2;return sourceConfig===null||sourceConfig===void 0||(_sourceConfig$statsCo2=sourceConfig.statsCollection)===null||_sourceConfig$statsCo2===void 0||(_sourceConfig$statsCo2=_sourceConfig$statsCo2.errors)===null||_sourceConfig$statsCo2===void 0?void 0:_sourceConfig$statsCo2.provider;};var isMetricsReportingEnabled=function isMetricsReportingEnabled(sourceConfig){var _sourceConfig$statsCo3;return (sourceConfig===null||sourceConfig===void 0||(_sourceConfig$statsCo3=sourceConfig.statsCollection)===null||_sourceConfig$statsCo3===void 0||(_sourceConfig$statsCo3=_sourceConfig$statsCo3.metrics)===null||_sourceConfig$statsCo3===void 0?void 0:_sourceConfig$statsCo3.enabled)===true;};
3372
3223
 
3224
+ /**
3225
+ * A function to get the name of the consent manager with enabled true set in the load options
3226
+ * @param cookieConsentOptions Input provided as load option
3227
+ * @returns string|undefined
3228
+ *
3229
+ * Example input: {
3230
+ * oneTrust:{
3231
+ * enabled: true
3232
+ * }
3233
+ * }
3234
+ *
3235
+ * Output: 'oneTrust'
3236
+ */var getUserSelectedConsentManager=function getUserSelectedConsentManager(cookieConsentOptions){if(!isNonEmptyObject(cookieConsentOptions)){return undefined;}var validCookieConsentOptions=cookieConsentOptions;return Object.keys(validCookieConsentOptions).find(function(e){return e&&validCookieConsentOptions[e].enabled===true;});};
3237
+
3373
3238
  /**
3374
3239
  * Determines the SDK url
3375
3240
  * @returns sdkURL
3376
- */var getSDKUrl=function getSDKUrl(){var scripts=document.getElementsByTagName('script');var sdkURL;var scriptList=Array.prototype.slice.call(scripts);scriptList.some(function(script){var curScriptSrc=removeTrailingSlashes(script.getAttribute('src'));if(curScriptSrc){var urlMatches=curScriptSrc.match(/^.*rsa?(\.min)?\.js$/);if(urlMatches){sdkURL=curScriptSrc;return true;}}return false;});// TODO: Return the URL object instead of the plain URL string
3377
- return sdkURL;};/**
3241
+ */var getSDKUrl=function getSDKUrl(){var scripts=document.getElementsByTagName('script');var sdkURL;var scriptList=Array.prototype.slice.call(scripts);scriptList.some(function(script){var curScriptSrc=removeTrailingSlashes(script.getAttribute('src'));if(curScriptSrc){var urlMatches=curScriptSrc.match(/^.*rsa?(\.min)?\.js$/);if(urlMatches){sdkURL=curScriptSrc;return true;}}return false;});return sdkURL;};/**
3378
3242
  * Updates the reporting state variables from the source config data
3379
3243
  * @param res Source config
3380
3244
  * @param logger Logger instance
3381
3245
  */var updateReportingState=function updateReportingState(res,logger){state.reporting.isErrorReportingEnabled.value=isErrorReportingEnabled(res.source.config);state.reporting.isMetricsReportingEnabled.value=isMetricsReportingEnabled(res.source.config);if(state.reporting.isErrorReportingEnabled.value){var errReportingProvider=getErrorReportingProviderNameFromConfig(res.source.config);// Get the corresponding plugin name of the selected error reporting provider from the supported error reporting providers
3382
3246
  var errReportingProviderPlugin=errReportingProvider?ErrorReportingProvidersToPluginNameMap[errReportingProvider]:undefined;if(!isUndefined(errReportingProvider)&&!errReportingProviderPlugin){// set the default error reporting provider
3383
- logger===null||logger===void 0||logger.warn(UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING(CONFIG_MANAGER,errReportingProvider,ErrorReportingProvidersToPluginNameMap,DEFAULT_ERROR_REPORTING_PROVIDER));}state.reporting.errorReportingProviderPluginName.value=errReportingProviderPlugin!==null&&errReportingProviderPlugin!==void 0?errReportingProviderPlugin:ErrorReportingProvidersToPluginNameMap[DEFAULT_ERROR_REPORTING_PROVIDER];}};var updateStorageState=function updateStorageState(logger){var _state$loadOptions$va;var storageEncryptionVersion=(_state$loadOptions$va=state.loadOptions.value.storage)===null||_state$loadOptions$va===void 0||(_state$loadOptions$va=_state$loadOptions$va.encryption)===null||_state$loadOptions$va===void 0?void 0:_state$loadOptions$va.version;var encryptionPluginName=storageEncryptionVersion&&StorageEncryptionVersionsToPluginNameMap[storageEncryptionVersion];if(!isUndefined(storageEncryptionVersion)&&isUndefined(encryptionPluginName)){// set the default encryption plugin
3384
- logger===null||logger===void 0||logger.warn(UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING(CONFIG_MANAGER,storageEncryptionVersion,StorageEncryptionVersionsToPluginNameMap,DEFAULT_STORAGE_ENCRYPTION_VERSION));storageEncryptionVersion=DEFAULT_STORAGE_ENCRYPTION_VERSION;}else if(isUndefined(storageEncryptionVersion)){storageEncryptionVersion=DEFAULT_STORAGE_ENCRYPTION_VERSION;}o(function(){var _state$loadOptions$va2;state.storage.encryptionPluginName.value=StorageEncryptionVersionsToPluginNameMap[storageEncryptionVersion];// Allow migration only if the configured encryption version is the default encryption version
3385
- var configuredMigrationValue=(_state$loadOptions$va2=state.loadOptions.value.storage)===null||_state$loadOptions$va2===void 0?void 0:_state$loadOptions$va2.migrate;state.storage.migrate.value=configuredMigrationValue&&storageEncryptionVersion===DEFAULT_STORAGE_ENCRYPTION_VERSION;if(configuredMigrationValue===true&&state.storage.migrate.value!==configuredMigrationValue){logger===null||logger===void 0||logger.warn(STORAGE_DATA_MIGRATION_OVERRIDE_WARNING(CONFIG_MANAGER,storageEncryptionVersion,DEFAULT_STORAGE_ENCRYPTION_VERSION));}});};
3247
+ logger===null||logger===void 0||logger.warn(UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING(CONFIG_MANAGER,errReportingProvider,ErrorReportingProvidersToPluginNameMap,DEFAULT_ERROR_REPORTING_PROVIDER));}state.reporting.errorReportingProviderPluginName.value=errReportingProviderPlugin!==null&&errReportingProviderPlugin!==void 0?errReportingProviderPlugin:ErrorReportingProvidersToPluginNameMap[DEFAULT_ERROR_REPORTING_PROVIDER];}};var updateStorageState=function updateStorageState(logger){var _storageOptsFromLoad$;var storageOptsFromLoad=state.loadOptions.value.storage;var storageType=storageOptsFromLoad===null||storageOptsFromLoad===void 0?void 0:storageOptsFromLoad.type;if(isDefined(storageType)&&!isValidStorageType(storageType)){logger===null||logger===void 0||logger.warn(STORAGE_TYPE_VALIDATION_WARNING(CONFIG_MANAGER,storageType,DEFAULT_STORAGE_TYPE));storageType=DEFAULT_STORAGE_TYPE;}var storageEncryptionVersion=storageOptsFromLoad===null||storageOptsFromLoad===void 0||(_storageOptsFromLoad$=storageOptsFromLoad.encryption)===null||_storageOptsFromLoad$===void 0?void 0:_storageOptsFromLoad$.version;var encryptionPluginName=storageEncryptionVersion&&StorageEncryptionVersionsToPluginNameMap[storageEncryptionVersion];if(!isUndefined(storageEncryptionVersion)&&isUndefined(encryptionPluginName)){// set the default encryption plugin
3248
+ logger===null||logger===void 0||logger.warn(UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING(CONFIG_MANAGER,storageEncryptionVersion,StorageEncryptionVersionsToPluginNameMap,DEFAULT_STORAGE_ENCRYPTION_VERSION));storageEncryptionVersion=DEFAULT_STORAGE_ENCRYPTION_VERSION;}else if(isUndefined(storageEncryptionVersion)){storageEncryptionVersion=DEFAULT_STORAGE_ENCRYPTION_VERSION;}// Allow migration only if the configured encryption version is the default encryption version
3249
+ var configuredMigrationValue=storageOptsFromLoad===null||storageOptsFromLoad===void 0?void 0:storageOptsFromLoad.migrate;var finalMigrationVal=configuredMigrationValue&&storageEncryptionVersion===DEFAULT_STORAGE_ENCRYPTION_VERSION;if(configuredMigrationValue===true&&state.storage.migrate.value!==configuredMigrationValue){logger===null||logger===void 0||logger.warn(STORAGE_DATA_MIGRATION_OVERRIDE_WARNING(CONFIG_MANAGER,storageEncryptionVersion,DEFAULT_STORAGE_ENCRYPTION_VERSION));}r(function(){state.storage.type.value=storageType;state.storage.cookie.value=storageOptsFromLoad===null||storageOptsFromLoad===void 0?void 0:storageOptsFromLoad.cookie;state.storage.encryptionPluginName.value=StorageEncryptionVersionsToPluginNameMap[storageEncryptionVersion];state.storage.migrate.value=finalMigrationVal;});};var updateConsentsState=function updateConsentsState(logger){var _preConsentOpts$stora,_preConsentOpts$stora2,_preConsentOpts$event,_preConsentOpts$event2;// Get the consent manager if provided as load option
3250
+ var selectedConsentManager=getUserSelectedConsentManager(state.loadOptions.value.cookieConsentManager);var consentManagerPluginName;if(selectedConsentManager){// Get the corresponding plugin name of the selected consent manager from the supported consent managers
3251
+ consentManagerPluginName=ConsentManagersToPluginNameMap[selectedConsentManager];if(!consentManagerPluginName){logger===null||logger===void 0||logger.error(UNSUPPORTED_CONSENT_MANAGER_ERROR(CONFIG_MANAGER,selectedConsentManager,ConsentManagersToPluginNameMap));}}// Pre-consent
3252
+ var preConsentOpts=state.loadOptions.value.preConsent;var storageStrategy=(_preConsentOpts$stora=preConsentOpts===null||preConsentOpts===void 0||(_preConsentOpts$stora2=preConsentOpts.storage)===null||_preConsentOpts$stora2===void 0?void 0:_preConsentOpts$stora2.strategy)!==null&&_preConsentOpts$stora!==void 0?_preConsentOpts$stora:DEFAULT_PRE_CONSENT_STORAGE_STRATEGY;if(isDefined(storageStrategy)&&!Object.values(StorageStrategy).includes(storageStrategy)){var _preConsentOpts$stora3;storageStrategy=DEFAULT_PRE_CONSENT_STORAGE_STRATEGY;logger===null||logger===void 0||logger.warn(UNSUPPORTED_PRE_CONSENT_STORAGE_STRATEGY(CONFIG_MANAGER,preConsentOpts===null||preConsentOpts===void 0||(_preConsentOpts$stora3=preConsentOpts.storage)===null||_preConsentOpts$stora3===void 0?void 0:_preConsentOpts$stora3.strategy,DEFAULT_PRE_CONSENT_STORAGE_STRATEGY));}var eventsDeliveryType=(_preConsentOpts$event=preConsentOpts===null||preConsentOpts===void 0||(_preConsentOpts$event2=preConsentOpts.events)===null||_preConsentOpts$event2===void 0?void 0:_preConsentOpts$event2.delivery)!==null&&_preConsentOpts$event!==void 0?_preConsentOpts$event:DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE;if(isDefined(eventsDeliveryType)&&!Object.values(DeliveryType).includes(eventsDeliveryType)){var _preConsentOpts$event3;eventsDeliveryType=DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE;logger===null||logger===void 0||logger.warn(UNSUPPORTED_PRE_CONSENT_EVENTS_DELIVERY_TYPE(CONFIG_MANAGER,preConsentOpts===null||preConsentOpts===void 0||(_preConsentOpts$event3=preConsentOpts.events)===null||_preConsentOpts$event3===void 0?void 0:_preConsentOpts$event3.delivery,DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE));}r(function(){var _state$loadOptions$va,_state$loadOptions$va2;state.consents.activeConsentManagerPluginName.value=consentManagerPluginName;state.consents.preConsentOptions.value={enabled:((_state$loadOptions$va=state.loadOptions.value.preConsent)===null||_state$loadOptions$va===void 0?void 0:_state$loadOptions$va.enabled)===true,storage:{strategy:storageStrategy},events:{delivery:eventsDeliveryType},trackConsent:((_state$loadOptions$va2=state.loadOptions.value.preConsent)===null||_state$loadOptions$va2===void 0?void 0:_state$loadOptions$va2.trackConsent)===true};});};
3386
3253
 
3387
3254
  /**
3388
3255
  * A function that determines integration SDK loading path
@@ -3401,51 +3268,33 @@
3401
3268
  if(customPluginsCDNPath){pluginsCDNPath=removeTrailingSlashes(customPluginsCDNPath);if(!pluginsCDNPath||pluginsCDNPath&&!isValidUrl(pluginsCDNPath)){throw new Error(PLUGINS_CDN_BASE_URL_ERROR);}return pluginsCDNPath;}// Get the base path from the SDK script tag src attribute or use the default path
3402
3269
  var sdkURL=getSDKUrl();pluginsCDNPath=sdkURL&&isString(sdkURL)?sdkURL.split('/').slice(0,-1).concat(CDN_PLUGINS_DIR).join('/'):PLUGINS_BASE_URL;return pluginsCDNPath;};
3403
3270
 
3404
- /**
3405
- * A function to get the name of the consent manager with enabled true set in the load options
3406
- * @param cookieConsentOptions Input provided as load option
3407
- * @returns string|undefined
3408
- *
3409
- * Example input: {
3410
- * oneTrust:{
3411
- * enabled: true
3412
- * }
3413
- * }
3414
- *
3415
- * Output: 'oneTrust'
3416
- */var getUserSelectedConsentManager=function getUserSelectedConsentManager(cookieConsentOptions){if(!isNonEmptyObject(cookieConsentOptions)){return undefined;}var validCookieConsentOptions=cookieConsentOptions;return Object.keys(validCookieConsentOptions).find(function(e){return e&&validCookieConsentOptions[e].enabled===true;});};
3417
-
3418
- var ConfigManager=/*#__PURE__*/function(){function ConfigManager(httpClient,errorHandler,logger){_classCallCheck(this,ConfigManager);_defineProperty(this,"hasErrorHandler",false);this.errorHandler=errorHandler;this.logger=logger;this.httpClient=httpClient;this.hasErrorHandler=Boolean(this.errorHandler);this.onError=this.onError.bind(this);this.processConfig=this.processConfig.bind(this);}_createClass(ConfigManager,[{key:"attachEffects",value:function attachEffects(){var _this=this;b(function(){var _this$logger;(_this$logger=_this.logger)===null||_this$logger===void 0||_this$logger.setMinLogLevel(state.lifecycle.logLevel.value);});}/**
3271
+ var ConfigManager=/*#__PURE__*/function(){function ConfigManager(httpClient,errorHandler,logger){_classCallCheck(this,ConfigManager);_defineProperty(this,"hasErrorHandler",false);this.errorHandler=errorHandler;this.logger=logger;this.httpClient=httpClient;this.hasErrorHandler=Boolean(this.errorHandler);this.onError=this.onError.bind(this);this.processConfig=this.processConfig.bind(this);}_createClass(ConfigManager,[{key:"attachEffects",value:function attachEffects(){var _this=this;E(function(){var _this$logger;(_this$logger=_this.logger)===null||_this$logger===void 0||_this$logger.setMinLogLevel(state.lifecycle.logLevel.value);});}/**
3419
3272
  * A function to validate, construct and store loadOption, lifecycle, source and destination
3420
3273
  * config related information in global state
3421
- */},{key:"init",value:function init(){var _this2=this;var consentManagerPluginName;this.attachEffects();var lockIntegrationsVersion=state.loadOptions.value.lockIntegrationsVersion;validateLoadArgs(state.lifecycle.writeKey.value,state.lifecycle.dataPlaneUrl.value);// determine the path to fetch integration SDK from
3274
+ */},{key:"init",value:function init(){var _this2=this;this.attachEffects();var lockIntegrationsVersion=state.loadOptions.value.lockIntegrationsVersion;validateLoadArgs(state.lifecycle.writeKey.value,state.lifecycle.dataPlaneUrl.value);// determine the path to fetch integration SDK from
3422
3275
  var intgCdnUrl=getIntegrationsCDNPath(APP_VERSION,lockIntegrationsVersion,state.loadOptions.value.destSDKBaseURL);// determine the path to fetch remote plugins from
3423
- var pluginsCDNPath=getPluginsCDNPath(state.loadOptions.value.pluginsSDKBaseURL);// Get the consent manager if provided as load option
3424
- var selectedConsentManager=getUserSelectedConsentManager(state.loadOptions.value.cookieConsentManager);if(selectedConsentManager){// Get the corresponding plugin name of the selected consent manager from the supported consent managers
3425
- consentManagerPluginName=ConsentManagersToPluginNameMap[selectedConsentManager];if(!consentManagerPluginName){var _this$logger2;(_this$logger2=this.logger)===null||_this$logger2===void 0||_this$logger2.error(UNSUPPORTED_CONSENT_MANAGER_ERROR(CONFIG_MANAGER,selectedConsentManager,ConsentManagersToPluginNameMap));}}updateStorageState(this.logger);// set application lifecycle state in global state
3426
- o(function(){var _state$loadOptions$va;state.lifecycle.integrationsCDNPath.value=intgCdnUrl;state.lifecycle.pluginsCDNPath.value=pluginsCDNPath;if(state.loadOptions.value.logLevel){state.lifecycle.logLevel.value=state.loadOptions.value.logLevel;}state.lifecycle.sourceConfigUrl.value=getSourceConfigURL(state.loadOptions.value.configUrl,state.lifecycle.writeKey.value,lockIntegrationsVersion,_this2.logger);// Set consent manager plugin name in state
3427
- state.consents.activeConsentManagerPluginName.value=consentManagerPluginName;// set storage type in state
3428
- var storageType=(_state$loadOptions$va=state.loadOptions.value.storage)===null||_state$loadOptions$va===void 0?void 0:_state$loadOptions$va.type;if(!isValidStorageType(storageType)){var _this2$logger;(_this2$logger=_this2.logger)===null||_this2$logger===void 0||_this2$logger.warn(STORAGE_TYPE_VALIDATION_WARNING(CONFIG_MANAGER,storageType,DEFAULT_STORAGE_TYPE));state.storage.type.value=DEFAULT_STORAGE_TYPE;}else {state.storage.type.value=storageType;}});this.getConfig();}/**
3276
+ var pluginsCDNPath=getPluginsCDNPath(state.loadOptions.value.pluginsSDKBaseURL);updateStorageState(this.logger);updateConsentsState(this.logger);// set application lifecycle state in global state
3277
+ r(function(){state.lifecycle.integrationsCDNPath.value=intgCdnUrl;state.lifecycle.pluginsCDNPath.value=pluginsCDNPath;if(state.loadOptions.value.logLevel){state.lifecycle.logLevel.value=state.loadOptions.value.logLevel;}state.lifecycle.sourceConfigUrl.value=getSourceConfigURL(state.loadOptions.value.configUrl,state.lifecycle.writeKey.value,lockIntegrationsVersion,_this2.logger);});this.getConfig();}/**
3429
3278
  * Handle errors
3430
3279
  */},{key:"onError",value:function onError(error,customMessage,shouldAlwaysThrow){if(this.hasErrorHandler){var _this$errorHandler;(_this$errorHandler=this.errorHandler)===null||_this$errorHandler===void 0||_this$errorHandler.onError(error,CONFIG_MANAGER,customMessage,shouldAlwaysThrow);}else {throw error;}}/**
3431
3280
  * A callback function that is executed once we fetch the source config response.
3432
3281
  * Use to construct and store information that are dependent on the sourceConfig.
3433
- */},{key:"processConfig",value:function processConfig(response,details){var _this3=this;// TODO: add retry logic with backoff based on rejectionDetails.xhr.status
3282
+ */},{key:"processConfig",value:function processConfig(response,details){// TODO: add retry logic with backoff based on rejectionDetails.xhr.status
3434
3283
  // We can use isErrRetryable utility method
3435
- if(!response){this.onError(SOURCE_CONFIG_FETCH_ERROR(details===null||details===void 0?void 0:details.error));return;}var res;var errMessage='Unable to process/parse source config';try{if(isString(response)){res=JSON.parse(response);}else {res=response;}}catch(e){this.onError(e,errMessage,true);return;}if(!isValidSourceConfig(res)){this.onError(new Error(errMessage),undefined,true);return;}// determine the dataPlane url
3284
+ if(!response){this.onError(SOURCE_CONFIG_FETCH_ERROR(details===null||details===void 0?void 0:details.error));return;}var res;var errMessage='Unable to process/parse source config';try{if(isString(response)){res=JSON.parse(response);}else {res=response;}}catch(e){this.onError(e,errMessage,true);return;}if(!isValidSourceConfig(res)){this.onError(new Error(errMessage),undefined,true);return;}// set the values in state for reporting slice
3285
+ updateReportingState(res,this.logger);// determine the dataPlane url
3436
3286
  var dataPlaneUrl=resolveDataPlaneUrl(res.source.dataplanes,state.lifecycle.dataPlaneUrl.value,state.loadOptions.value.residencyServer,this.logger);if(!dataPlaneUrl){this.onError(new Error(DATA_PLANE_URL_ERROR),undefined,true);return;}var nativeDestinations=res.source.destinations.length>0?filterEnabledDestination(res.source.destinations):[];// set in the state --> source, destination, lifecycle, reporting
3437
- o(function(){var _state$loadOptions$va2;// set source related information in state
3287
+ r(function(){var _state$loadOptions$va;// set source related information in state
3438
3288
  state.source.value={config:res.source.config,id:res.source.id};// set device mode destination related information in state
3439
- state.nativeDestinations.configuredDestinations.value=nativeDestinations;// set the values in state for reporting slice
3440
- updateReportingState(res,_this3.logger);// set the desired optional plugins
3441
- state.plugins.pluginsToLoadFromConfig.value=(_state$loadOptions$va2=state.loadOptions.value.plugins)!==null&&_state$loadOptions$va2!==void 0?_state$loadOptions$va2:[];// set application lifecycle state
3289
+ state.nativeDestinations.configuredDestinations.value=nativeDestinations;// set the desired optional plugins
3290
+ state.plugins.pluginsToLoadFromConfig.value=(_state$loadOptions$va=state.loadOptions.value.plugins)!==null&&_state$loadOptions$va!==void 0?_state$loadOptions$va:[];// set application lifecycle state
3442
3291
  // Cast to string as we are sure that the value is not undefined
3443
3292
  state.lifecycle.activeDataplaneUrl.value=removeTrailingSlashes(dataPlaneUrl);state.lifecycle.status.value=LifecycleStatus.Configured;});}/**
3444
3293
  * A function to fetch source config either from /sourceConfig endpoint
3445
3294
  * or from getSourceConfig load option
3446
3295
  * @returns
3447
- */},{key:"getConfig",value:function getConfig(){var _this4=this;var sourceConfigFunc=state.loadOptions.value.getSourceConfig;if(sourceConfigFunc){if(!isFunction(sourceConfigFunc)){throw new Error(SOURCE_CONFIG_OPTION_ERROR);}// fetch source config from the function
3448
- var res=sourceConfigFunc();if(res instanceof Promise){res.then(function(pRes){return _this4.processConfig(pRes);}).catch(function(err){_this4.onError(err,'SourceConfig');});}else {this.processConfig(res);}}else {// fetch source config from config url API
3296
+ */},{key:"getConfig",value:function getConfig(){var _this3=this;var sourceConfigFunc=state.loadOptions.value.getSourceConfig;if(sourceConfigFunc){if(!isFunction(sourceConfigFunc)){throw new Error(SOURCE_CONFIG_OPTION_ERROR);}// fetch source config from the function
3297
+ var res=sourceConfigFunc();if(res instanceof Promise){res.then(function(pRes){return _this3.processConfig(pRes);}).catch(function(err){_this3.onError(err,'SourceConfig');});}else {this.processConfig(res);}}else {// fetch source config from config url API
3449
3298
  this.httpClient.getAsyncData({url:state.lifecycle.sourceConfigUrl.value,options:{headers:{'Content-Type':undefined}},callback:this.processConfig});}}}]);return ConfigManager;}();
3450
3299
 
3451
3300
  /**
@@ -3472,11 +3321,11 @@
3472
3321
  var CapabilitiesManager=/*#__PURE__*/function(){function CapabilitiesManager(errorHandler,logger){_classCallCheck(this,CapabilitiesManager);this.logger=logger;this.errorHandler=errorHandler;this.externalSrcLoader=new ExternalSrcLoader(this.errorHandler,this.logger);this.onError=this.onError.bind(this);this.onReady=this.onReady.bind(this);}_createClass(CapabilitiesManager,[{key:"init",value:function init(){try{this.prepareBrowserCapabilities();this.attachWindowListeners();}catch(err){this.onError(err);}}/**
3473
3322
  * Detect supported capabilities and set values in state
3474
3323
  */ // eslint-disable-next-line class-methods-use-this
3475
- },{key:"detectBrowserCapabilities",value:function detectBrowserCapabilities(){var _this=this;o(function(){// Storage related details
3324
+ },{key:"detectBrowserCapabilities",value:function detectBrowserCapabilities(){var _this=this;r(function(){// Storage related details
3476
3325
  state.capabilities.storage.isCookieStorageAvailable.value=isStorageAvailable(COOKIE_STORAGE,getStorageEngine(COOKIE_STORAGE),_this.logger);state.capabilities.storage.isLocalStorageAvailable.value=isStorageAvailable(LOCAL_STORAGE,undefined,_this.logger);state.capabilities.storage.isSessionStorageAvailable.value=isStorageAvailable(SESSION_STORAGE,undefined,_this.logger);// Browser feature detection details
3477
3326
  state.capabilities.isBeaconAvailable.value=hasBeacon();state.capabilities.isUaCHAvailable.value=hasUAClientHints();state.capabilities.isCryptoAvailable.value=hasCrypto();state.capabilities.isIE11.value=isIE11();state.capabilities.isOnline.value=globalThis.navigator.onLine;// Get page context details
3478
3327
  state.context.userAgent.value=getUserAgent();state.context.locale.value=getLanguage();state.context.screen.value=getScreenDetails();if(hasUAClientHints()){getUserAgentClientHint(function(uach){state.context['ua-ch'].value=uach;},state.loadOptions.value.uaChTrackLevel);}});// Ad blocker detection
3479
- b(function(){if(state.loadOptions.value.sendAdblockPage===true&&state.lifecycle.sourceConfigUrl.value!==undefined){detectAdBlockers(_this.errorHandler,_this.logger);}});}/**
3328
+ E(function(){if(state.loadOptions.value.sendAdblockPage===true&&state.lifecycle.sourceConfigUrl.value!==undefined){detectAdBlockers(_this.errorHandler,_this.logger);}});}/**
3480
3329
  * Detect if polyfills are required and then load script from polyfill URL
3481
3330
  */},{key:"prepareBrowserCapabilities",value:function prepareBrowserCapabilities(){var _state$loadOptions$va,_this2=this;state.capabilities.isLegacyDOM.value=isLegacyJSEngine();var polyfillUrl=(_state$loadOptions$va=state.loadOptions.value.polyfillURL)!==null&&_state$loadOptions$va!==void 0?_state$loadOptions$va:POLYFILL_URL;var shouldLoadPolyfill=state.loadOptions.value.polyfillIfRequired&&state.capabilities.isLegacyDOM.value&&Boolean(polyfillUrl);if(shouldLoadPolyfill){var _this$externalSrcLoad;var isDefaultPolyfillService=polyfillUrl!==state.loadOptions.value.polyfillURL;if(isDefaultPolyfillService){var polyfillCallback=function polyfillCallback(){return _this2.onReady();};// write key specific callback
3482
3331
  // NOTE: we're not putting this into RudderStackGlobals as providing the property path to the callback function in the polyfill URL is not possible
@@ -3495,7 +3344,7 @@
3495
3344
  var TOP_LEVEL_ELEMENTS=['integrations','anonymousId','originalTimestamp'];// Reserved elements in the context of standard RudderStack event spec
3496
3345
  // Typically, these elements are not allowed to be overridden by the user
3497
3346
  var CONTEXT_RESERVED_ELEMENTS=['library','consentManagement','userAgent','ua-ch','screen'];// Reserved elements in the standard RudderStack event spec
3498
- var RESERVED_ELEMENTS=['anonymousId','sentAt','receivedAt','timestamp','originalTimestamp','event','messageId','channel'];var DEFAULT_INTEGRATIONS_CONFIG={All:true};
3347
+ var RESERVED_ELEMENTS=['anonymousId','sentAt','receivedAt','timestamp','originalTimestamp','event','messageId','channel'];
3499
3348
 
3500
3349
  /**
3501
3350
  * To get the page properties for context object
@@ -3510,7 +3359,6 @@
3510
3359
  var curPageProps=getDefaultPageProperties();Object.keys(curPageProps).forEach(function(key){if(isUndefined(pageProps[key])){pageProps[key]=optionsPageProps[key]||curPageProps[key];}});if(isUndefined(pageProps.initial_referrer)){pageProps.initial_referrer=optionsPageProps.initial_referrer||state.session.initialReferrer.value;}if(isUndefined(pageProps.initial_referring_domain)){pageProps.initial_referring_domain=optionsPageProps.initial_referring_domain||state.session.initialReferringDomain.value;}return pageProps;};/**
3511
3360
  * Utility to check for reserved keys in the input object
3512
3361
  * @param obj Generic object
3513
- * @param eventType Rudder event type
3514
3362
  * @param parentKeyPath Object's parent key path
3515
3363
  * @param logger Logger instance
3516
3364
  */var checkForReservedElementsInObject=function checkForReservedElementsInObject(obj,parentKeyPath,logger){if(isObjectLiteralAndNotNull(obj)){Object.keys(obj).forEach(function(property){if(RESERVED_ELEMENTS.includes(property)||RESERVED_ELEMENTS.includes(property.toLowerCase())){logger===null||logger===void 0||logger.warn(RESERVED_KEYWORD_WARNING(EVENT_MANAGER,property,parentKeyPath,RESERVED_ELEMENTS));}});}};/**
@@ -3550,9 +3398,10 @@
3550
3398
  * @param pageProps Page properties
3551
3399
  * @param logger logger
3552
3400
  * @returns Enriched RudderEvent object
3553
- */var getEnrichedEvent=function getEnrichedEvent(rudderEvent,options,pageProps,logger){var commonEventData={channel:CHANNEL,context:{traits:clone$1(state.session.userTraits.value),sessionId:state.session.sessionInfo.value.id||undefined,sessionStart:state.session.sessionInfo.value.sessionStart||undefined,consentManagement:{deniedConsentIds:clone$1(state.consents.data.value.deniedConsentIds)},'ua-ch':state.context['ua-ch'].value,app:state.context.app.value,library:state.context.library.value,userAgent:state.context.userAgent.value,os:state.context.os.value,locale:state.context.locale.value,screen:state.context.screen.value,campaign:extractUTMParameters(globalThis.location.href),page:getContextPageProperties(pageProps)},originalTimestamp:getCurrentTimeFormatted(),integrations:DEFAULT_INTEGRATIONS_CONFIG,messageId:generateUUID(),userId:rudderEvent.userId||state.session.userId.value};if(state.storage.type.value===NO_STORAGE){// Generate new anonymous id for each request
3554
- commonEventData.anonymousId=generateUUID();commonEventData.context.anonymousTracking=true;}else {// Type casting to string as the user session manager will take care of initializing the value
3555
- commonEventData.anonymousId=state.session.anonymousUserId.value;}if(rudderEvent.type===RudderEventType.Identify){commonEventData.context.traits=state.storage.type.value!==NO_STORAGE?clone$1(state.session.userTraits.value):rudderEvent.context.traits;}if(rudderEvent.type===RudderEventType.Group){if(rudderEvent.groupId||state.session.groupId.value){commonEventData.groupId=rudderEvent.groupId||state.session.groupId.value;}if(rudderEvent.traits||state.session.groupTraits.value){commonEventData.traits=state.storage.type.value!==NO_STORAGE?clone$1(state.session.groupTraits.value):rudderEvent.traits;}}var processedEvent=mergeDeepRight(rudderEvent,commonEventData);// Set the default values for the event properties
3401
+ */var getEnrichedEvent=function getEnrichedEvent(rudderEvent,options,pageProps,logger){var _state$storage$entrie;var commonEventData={channel:CHANNEL,context:{traits:clone$1(state.session.userTraits.value),sessionId:state.session.sessionInfo.value.id||undefined,sessionStart:state.session.sessionInfo.value.sessionStart||undefined,consentManagement:{deniedConsentIds:clone$1(state.consents.data.value.deniedConsentIds)},'ua-ch':state.context['ua-ch'].value,app:state.context.app.value,library:state.context.library.value,userAgent:state.context.userAgent.value,os:state.context.os.value,locale:state.context.locale.value,screen:state.context.screen.value,campaign:extractUTMParameters(globalThis.location.href),page:getContextPageProperties(pageProps)},originalTimestamp:getCurrentTimeFormatted(),integrations:DEFAULT_INTEGRATIONS_CONFIG,messageId:generateUUID(),userId:rudderEvent.userId||state.session.userId.value};if(((_state$storage$entrie=state.storage.entries.value.anonymousId)===null||_state$storage$entrie===void 0?void 0:_state$storage$entrie.type)===NO_STORAGE){// Generate new anonymous id for each request
3402
+ commonEventData.anonymousId=generateUUID();}else {// Type casting to string as the user session manager will take care of initializing the value
3403
+ commonEventData.anonymousId=state.session.anonymousId.value;}// set truly anonymous tracking flag
3404
+ if(state.storage.trulyAnonymousTracking.value){commonEventData.context.trulyAnonymousTracking=true;}if(rudderEvent.type===RudderEventType.Identify){var _state$storage$entrie2;commonEventData.context.traits=((_state$storage$entrie2=state.storage.entries.value.userTraits)===null||_state$storage$entrie2===void 0?void 0:_state$storage$entrie2.type)!==NO_STORAGE?clone$1(state.session.userTraits.value):rudderEvent.context.traits;}if(rudderEvent.type===RudderEventType.Group){if(rudderEvent.groupId||state.session.groupId.value){commonEventData.groupId=rudderEvent.groupId||state.session.groupId.value;}if(rudderEvent.traits||state.session.groupTraits.value){var _state$storage$entrie3;commonEventData.traits=((_state$storage$entrie3=state.storage.entries.value.groupTraits)===null||_state$storage$entrie3===void 0?void 0:_state$storage$entrie3.type)!==NO_STORAGE?clone$1(state.session.groupTraits.value):rudderEvent.traits;}}var processedEvent=mergeDeepRight(rudderEvent,commonEventData);// Set the default values for the event properties
3556
3405
  // matching with v1.1 payload
3557
3406
  if(processedEvent.event===undefined){processedEvent.event=null;}if(processedEvent.properties===undefined){processedEvent.properties=null;}processOptions(processedEvent,options);// TODO: We might not need this check altogether
3558
3407
  checkForReservedElements(processedEvent,logger);// Update the integrations config for the event
@@ -3626,17 +3475,15 @@
3626
3475
  * @param id Provided sessionId
3627
3476
  * @param logger Logger module
3628
3477
  * @returns SessionInfo
3629
- */var generateManualTrackingSession=function generateManualTrackingSession(id,logger){var sessionId=isManualSessionIdValid(id,logger)?id:generateSessionId();return {id:sessionId,sessionStart:undefined,manualTrack:true};};
3478
+ */var generateManualTrackingSession=function generateManualTrackingSession(id,logger){var sessionId=isManualSessionIdValid(id,logger)?id:generateSessionId();return {id:sessionId,sessionStart:undefined,manualTrack:true};};var isStorageTypeValidForStoringData=function isStorageTypeValidForStoringData(storageType){return !!(storageType===COOKIE_STORAGE||storageType===LOCAL_STORAGE||storageType===MEMORY_STORAGE);};
3630
3479
 
3631
- var userSessionStorageKeys={userId:'rl_user_id',userTraits:'rl_trait',anonymousUserId:'rl_anonymous_id',groupId:'rl_group_id',groupTraits:'rl_group_trait',initialReferrer:'rl_page_init_referrer',initialReferringDomain:'rl_page_init_referring_domain',sessionInfo:'rl_session'};var defaultUserSessionValues={userId:'',userTraits:{},anonymousUserId:'',groupId:'',groupTraits:{},initialReferrer:'',initialReferringDomain:'',sessionInfo:{}};
3632
-
3633
- var UserSessionManager=/*#__PURE__*/function(){function UserSessionManager(errorHandler,logger,pluginsManager,store){_classCallCheck(this,UserSessionManager);this.store=store;this.pluginsManager=pluginsManager;this.logger=logger;this.errorHandler=errorHandler;this.onError=this.onError.bind(this);}/**
3480
+ var UserSessionManager=/*#__PURE__*/function(){function UserSessionManager(errorHandler,logger,pluginsManager,storeManager){_classCallCheck(this,UserSessionManager);this.storeManager=storeManager;this.pluginsManager=pluginsManager;this.logger=logger;this.errorHandler=errorHandler;this.onError=this.onError.bind(this);}/**
3634
3481
  * Initialize User session with values from storage
3635
3482
  * @param store Selected store
3636
- */_createClass(UserSessionManager,[{key:"init",value:function init(store){if(!store){this.setDefaultValues();}else {var _this$getUserId,_this$getUserTraits,_this$getGroupId,_this$getGroupTraits;this.store=store;this.migrateStorageIfNeeded();// get the values from storage and set it again
3637
- this.setUserId((_this$getUserId=this.getUserId())!==null&&_this$getUserId!==void 0?_this$getUserId:defaultUserSessionValues.userId);this.setUserTraits((_this$getUserTraits=this.getUserTraits())!==null&&_this$getUserTraits!==void 0?_this$getUserTraits:defaultUserSessionValues.userTraits);this.setGroupId((_this$getGroupId=this.getGroupId())!==null&&_this$getGroupId!==void 0?_this$getGroupId:defaultUserSessionValues.groupId);this.setGroupTraits((_this$getGroupTraits=this.getGroupTraits())!==null&&_this$getGroupTraits!==void 0?_this$getGroupTraits:defaultUserSessionValues.groupTraits);this.setAnonymousId(this.getAnonymousId(state.loadOptions.value.anonymousIdOptions));var initialReferrer=this.getInitialReferrer();var initialReferringDomain=this.getInitialReferringDomain();if(initialReferrer&&initialReferringDomain){this.setInitialReferrer(initialReferrer);this.setInitialReferringDomain(initialReferringDomain);}else if(initialReferrer){this.setInitialReferrer(initialReferrer);this.setInitialReferringDomain(getReferringDomain(initialReferrer));}else {var referrer=getReferrer();this.setInitialReferrer(referrer);this.setInitialReferringDomain(getReferringDomain(referrer));}// Initialize session tracking
3638
- this.initializeSessionTracking();// Register the effect to sync with storage
3639
- this.registerEffects();}}},{key:"setDefaultValues",value:function setDefaultValues(){o(function(){state.session.userId.value=defaultUserSessionValues.userId;state.session.userTraits.value=defaultUserSessionValues.userTraits;state.session.groupId.value=defaultUserSessionValues.groupId;state.session.groupTraits.value=defaultUserSessionValues.groupTraits;state.session.anonymousUserId.value=defaultUserSessionValues.anonymousUserId;state.session.initialReferrer.value=defaultUserSessionValues.initialReferrer;state.session.initialReferringDomain.value=defaultUserSessionValues.initialReferringDomain;state.session.sessionInfo.value=defaultUserSessionValues.sessionInfo;});}},{key:"migrateStorageIfNeeded",value:function migrateStorageIfNeeded(){var _this=this;if(!state.storage.migrate.value){return;}Object.values(userSessionStorageKeys).forEach(function(storageEntry){var _this$pluginsManager,_this$store;var migratedVal=(_this$pluginsManager=_this.pluginsManager)===null||_this$pluginsManager===void 0?void 0:_this$pluginsManager.invokeSingle('storage.migrate',storageEntry,(_this$store=_this.store)===null||_this$store===void 0?void 0:_this$store.engine,_this.errorHandler,_this.logger);_this.syncValueToStorage(storageEntry,migratedVal);});}/**
3483
+ */_createClass(UserSessionManager,[{key:"init",value:function init(){this.migrateStorageIfNeeded();this.migrateDataFromPreviousStorage();// get the values from storage and set it again
3484
+ var userId=this.getUserId();var userTraits=this.getUserTraits();var groupId=this.getGroupId();var groupTraits=this.getGroupTraits();var anonymousId=this.getAnonymousId();if(userId){this.setUserId(userId);}if(userTraits){this.setUserTraits(userTraits);}if(groupId){this.setGroupId(groupId);}if(groupTraits){this.setGroupTraits(groupTraits);}if(anonymousId){this.setAnonymousId(anonymousId);}var initialReferrer=this.getInitialReferrer();var initialReferringDomain=this.getInitialReferringDomain();if(initialReferrer&&initialReferringDomain){this.setInitialReferrer(initialReferrer);this.setInitialReferringDomain(initialReferringDomain);}else if(initialReferrer){this.setInitialReferrer(initialReferrer);this.setInitialReferringDomain(getReferringDomain(initialReferrer));}else {var referrer=getReferrer();this.setInitialReferrer(referrer);this.setInitialReferringDomain(getReferringDomain(referrer));}// Initialize session tracking
3485
+ if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.sessionInfo)){this.initializeSessionTracking();}// Register the effect to sync with storage
3486
+ this.registerEffects();}},{key:"isPersistenceEnabledForStorageEntry",value:function isPersistenceEnabledForStorageEntry(entryName){var _entries$entryName;var entries=state.storage.entries.value;return isStorageTypeValidForStoringData((_entries$entryName=entries[entryName])===null||_entries$entryName===void 0?void 0:_entries$entryName.type);}},{key:"migrateDataFromPreviousStorage",value:function migrateDataFromPreviousStorage(){var _this=this;var entries=state.storage.entries.value;Object.keys(entries).forEach(function(entry){var _entries$key,_this$storeManager;var key=entry;var currentStorage=(_entries$key=entries[key])===null||_entries$key===void 0?void 0:_entries$key.type;var curStore=(_this$storeManager=_this.storeManager)===null||_this$storeManager===void 0?void 0:_this$storeManager.getStore(storageClientDataStoreNameMap[currentStorage]);var storages=[COOKIE_STORAGE,LOCAL_STORAGE];storages.forEach(function(storage){var _this$storeManager2;var store=(_this$storeManager2=_this.storeManager)===null||_this$storeManager2===void 0?void 0:_this$storeManager2.getStore(storageClientDataStoreNameMap[storage]);if(storage!==currentStorage&&store){if(curStore){var value=store===null||store===void 0?void 0:store.get(userSessionStorageKeys[key]);if(isDefinedNotNullAndNotEmptyString(value)){curStore===null||curStore===void 0||curStore.set(userSessionStorageKeys[key],value);}}store===null||store===void 0||store.remove(userSessionStorageKeys[key]);}});});}},{key:"migrateStorageIfNeeded",value:function migrateStorageIfNeeded(){var _this$storeManager3,_this$storeManager4,_this2=this;if(!state.storage.migrate.value){return;}var cookieStorage=(_this$storeManager3=this.storeManager)===null||_this$storeManager3===void 0?void 0:_this$storeManager3.getStore(CLIENT_DATA_STORE_COOKIE);var localStorage=(_this$storeManager4=this.storeManager)===null||_this$storeManager4===void 0?void 0:_this$storeManager4.getStore(CLIENT_DATA_STORE_LS);var stores=[];if(cookieStorage){stores.push(cookieStorage);}if(localStorage){stores.push(localStorage);}Object.keys(userSessionStorageKeys).forEach(function(storageEntryKey){var key=storageEntryKey;var storageEntry=userSessionStorageKeys[key];stores.forEach(function(store){var _this2$pluginsManager;var migratedVal=(_this2$pluginsManager=_this2.pluginsManager)===null||_this2$pluginsManager===void 0?void 0:_this2$pluginsManager.invokeSingle('storage.migrate',storageEntry,store.engine,_this2.errorHandler,_this2.logger);if(migratedVal){store.set(storageEntry,migratedVal);}});});}/**
3640
3487
  * A function to initialize sessionTracking
3641
3488
  */},{key:"initializeSessionTracking",value:function initializeSessionTracking(){var _this$getSessionFromS;var sessionInfo=(_this$getSessionFromS=this.getSessionFromStorage())!==null&&_this$getSessionFromS!==void 0?_this$getSessionFromS:defaultSessionInfo;var finalAutoTrackingStatus=!(state.loadOptions.value.sessions.autoTrack===false||sessionInfo.manualTrack===true);var sessionTimeout;var configuredSessionTimeout=state.loadOptions.value.sessions.timeout;if(!isPositiveInteger(configuredSessionTimeout)){var _this$logger;(_this$logger=this.logger)===null||_this$logger===void 0||_this$logger.warn(TIMEOUT_NOT_NUMBER_WARNING(USER_SESSION_MANAGER,configuredSessionTimeout,DEFAULT_SESSION_TIMEOUT_MS));sessionTimeout=DEFAULT_SESSION_TIMEOUT_MS;}else {sessionTimeout=configuredSessionTimeout;}if(sessionTimeout===0){var _this$logger2;(_this$logger2=this.logger)===null||_this$logger2===void 0||_this$logger2.warn(TIMEOUT_ZERO_WARNING(USER_SESSION_MANAGER));finalAutoTrackingStatus=false;}// In case user provides a timeout value greater than 0 but less than 10 seconds SDK will show a warning
3642
3489
  // and will proceed with it
@@ -3648,87 +3495,90 @@
3648
3495
  * A function to sync values in storage
3649
3496
  * @param key
3650
3497
  * @param value
3651
- */},{key:"syncValueToStorage",value:function syncValueToStorage(key,value){if(value&&isString(value)||isNonEmptyObject(value)){var _this$store2;(_this$store2=this.store)===null||_this$store2===void 0||_this$store2.set(key,value);}else {var _this$store3;(_this$store3=this.store)===null||_this$store3===void 0||_this$store3.remove(key);}}/**
3498
+ */},{key:"syncValueToStorage",value:function syncValueToStorage(sessionKey,value){var _entries$sessionKey,_entries$sessionKey2;var entries=state.storage.entries.value;var storage=(_entries$sessionKey=entries[sessionKey])===null||_entries$sessionKey===void 0?void 0:_entries$sessionKey.type;var key=(_entries$sessionKey2=entries[sessionKey])===null||_entries$sessionKey2===void 0?void 0:_entries$sessionKey2.key;if(isStorageTypeValidForStoringData(storage)){var _this$storeManager5;var curStore=(_this$storeManager5=this.storeManager)===null||_this$storeManager5===void 0?void 0:_this$storeManager5.getStore(storageClientDataStoreNameMap[storage]);if(value&&isString(value)||isNonEmptyObject(value)){curStore===null||curStore===void 0||curStore.set(key,value);}else {curStore===null||curStore===void 0||curStore.remove(key);}}}/**
3652
3499
  * Function to update storage whenever state value changes
3653
- */},{key:"registerEffects",value:function registerEffects(){var _this2=this;/**
3500
+ */},{key:"registerEffects",value:function registerEffects(){var _this3=this;/**
3654
3501
  * Update userId in storage automatically when userId is updated in state
3655
- */b(function(){_this2.syncValueToStorage(userSessionStorageKeys.userId,state.session.userId.value);});/**
3502
+ */E(function(){_this3.syncValueToStorage(UserSessionKeys.userId,state.session.userId.value);});/**
3656
3503
  * Update user traits in storage automatically when it is updated in state
3657
- */b(function(){_this2.syncValueToStorage(userSessionStorageKeys.userTraits,state.session.userTraits.value);});/**
3504
+ */E(function(){_this3.syncValueToStorage(UserSessionKeys.userTraits,state.session.userTraits.value);});/**
3658
3505
  * Update group id in storage automatically when it is updated in state
3659
- */b(function(){_this2.syncValueToStorage(userSessionStorageKeys.groupId,state.session.groupId.value);});/**
3506
+ */E(function(){_this3.syncValueToStorage(UserSessionKeys.groupId,state.session.groupId.value);});/**
3660
3507
  * Update group traits in storage automatically when it is updated in state
3661
- */b(function(){_this2.syncValueToStorage(userSessionStorageKeys.groupTraits,state.session.groupTraits.value);});/**
3508
+ */E(function(){_this3.syncValueToStorage(UserSessionKeys.groupTraits,state.session.groupTraits.value);});/**
3662
3509
  * Update anonymous user id in storage automatically when it is updated in state
3663
- */b(function(){_this2.syncValueToStorage(userSessionStorageKeys.anonymousUserId,state.session.anonymousUserId.value);});/**
3510
+ */E(function(){_this3.syncValueToStorage(UserSessionKeys.anonymousId,state.session.anonymousId.value);});/**
3664
3511
  * Update initial referrer in storage automatically when it is updated in state
3665
- */b(function(){_this2.syncValueToStorage(userSessionStorageKeys.initialReferrer,state.session.initialReferrer.value);});/**
3512
+ */E(function(){_this3.syncValueToStorage(UserSessionKeys.initialReferrer,state.session.initialReferrer.value);});/**
3666
3513
  * Update initial referring domain in storage automatically when it is updated in state
3667
- */b(function(){_this2.syncValueToStorage(userSessionStorageKeys.initialReferringDomain,state.session.initialReferringDomain.value);});/**
3514
+ */E(function(){_this3.syncValueToStorage(UserSessionKeys.initialReferringDomain,state.session.initialReferringDomain.value);});/**
3668
3515
  * Update session tracking info in storage automatically when it is updated in state
3669
- */b(function(){_this2.syncValueToStorage(userSessionStorageKeys.sessionInfo,state.session.sessionInfo.value);});}/**
3516
+ */E(function(){_this3.syncValueToStorage(UserSessionKeys.sessionInfo,state.session.sessionInfo.value);});}/**
3670
3517
  * Sets anonymous id in the following precedence:
3671
3518
  *
3672
3519
  * 1. anonymousId: Id directly provided to the function.
3673
3520
  * 2. rudderAmpLinkerParam: value generated from linker query parm (rudderstack)
3674
3521
  * using parseLinker util.
3675
3522
  * 3. generateUUID: A new unique id is generated and assigned.
3676
- */},{key:"setAnonymousId",value:function setAnonymousId(anonymousId,rudderAmpLinkerParam){if(this.store){var finalAnonymousId=anonymousId;if(!finalAnonymousId&&rudderAmpLinkerParam){var _this$pluginsManager2;var linkerPluginsResult=(_this$pluginsManager2=this.pluginsManager)===null||_this$pluginsManager2===void 0?void 0:_this$pluginsManager2.invokeMultiple('userSession.anonymousIdGoogleLinker',rudderAmpLinkerParam);finalAnonymousId=linkerPluginsResult===null||linkerPluginsResult===void 0?void 0:linkerPluginsResult[0];}state.session.anonymousUserId.value=finalAnonymousId||this.generateAnonymousId();}}/**
3523
+ */},{key:"setAnonymousId",value:function setAnonymousId(anonymousId,rudderAmpLinkerParam){var _state$storage$entrie;var finalAnonymousId=anonymousId;var storage=(_state$storage$entrie=state.storage.entries.value.anonymousId)===null||_state$storage$entrie===void 0?void 0:_state$storage$entrie.type;if(isStorageTypeValidForStoringData(storage)){if(!finalAnonymousId&&rudderAmpLinkerParam){var _this$pluginsManager;var linkerPluginsResult=(_this$pluginsManager=this.pluginsManager)===null||_this$pluginsManager===void 0?void 0:_this$pluginsManager.invokeMultiple('userSession.anonymousIdGoogleLinker',rudderAmpLinkerParam);finalAnonymousId=linkerPluginsResult===null||linkerPluginsResult===void 0?void 0:linkerPluginsResult[0];}state.session.anonymousId.value=finalAnonymousId||this.generateAnonymousId();}}/**
3677
3524
  * Generate a new anonymousId
3678
3525
  * @returns string anonymousID
3679
3526
  */},{key:"generateAnonymousId",value:function generateAnonymousId(){return generateUUID();}/**
3680
3527
  * Fetches anonymousId
3681
3528
  * @param options option to fetch it from external source
3682
3529
  * @returns anonymousId
3683
- */},{key:"getAnonymousId",value:function getAnonymousId(options){var _this$store4;// fetch the anonymousUserId from storage
3684
- var persistedAnonymousId=(_this$store4=this.store)===null||_this$store4===void 0?void 0:_this$store4.get(userSessionStorageKeys.anonymousUserId);if(!persistedAnonymousId&&options){var _this$pluginsManager3;// fetch anonymousId from external source
3685
- var autoCapturedAnonymousId=(_this$pluginsManager3=this.pluginsManager)===null||_this$pluginsManager3===void 0?void 0:_this$pluginsManager3.invokeSingle('storage.getAnonymousId',getStorageEngine,options);persistedAnonymousId=autoCapturedAnonymousId;}state.session.anonymousUserId.value=persistedAnonymousId||this.generateAnonymousId();return state.session.anonymousUserId.value;}/**
3530
+ */},{key:"getAnonymousId",value:function getAnonymousId(options){var _state$storage$entrie2,_state$storage$entrie3;var storage=(_state$storage$entrie2=state.storage.entries.value.anonymousId)===null||_state$storage$entrie2===void 0?void 0:_state$storage$entrie2.type;var key=(_state$storage$entrie3=state.storage.entries.value.anonymousId)===null||_state$storage$entrie3===void 0?void 0:_state$storage$entrie3.key;var persistedAnonymousId;// fetch the anonymousId from storage
3531
+ if(isStorageTypeValidForStoringData(storage)){var _this$storeManager6;var store=(_this$storeManager6=this.storeManager)===null||_this$storeManager6===void 0?void 0:_this$storeManager6.getStore(storageClientDataStoreNameMap[storage]);persistedAnonymousId=store===null||store===void 0?void 0:store.get(key);if(!persistedAnonymousId&&options){var _this$pluginsManager2;// fetch anonymousId from external source
3532
+ var autoCapturedAnonymousId=(_this$pluginsManager2=this.pluginsManager)===null||_this$pluginsManager2===void 0?void 0:_this$pluginsManager2.invokeSingle('storage.getAnonymousId',getStorageEngine,options);persistedAnonymousId=autoCapturedAnonymousId;}state.session.anonymousId.value=persistedAnonymousId||this.generateAnonymousId();}return state.session.anonymousId.value;}},{key:"getItem",value:function getItem(sessionKey){var _entries$sessionKey3,_entries$sessionKey4;var entries=state.storage.entries.value;var storage=(_entries$sessionKey3=entries[sessionKey])===null||_entries$sessionKey3===void 0?void 0:_entries$sessionKey3.type;var key=(_entries$sessionKey4=entries[sessionKey])===null||_entries$sessionKey4===void 0?void 0:_entries$sessionKey4.key;if(isStorageTypeValidForStoringData(storage)){var _this$storeManager7,_store$get;var store=(_this$storeManager7=this.storeManager)===null||_this$storeManager7===void 0?void 0:_this$storeManager7.getStore(storageClientDataStoreNameMap[storage]);return (_store$get=store===null||store===void 0?void 0:store.get(key))!==null&&_store$get!==void 0?_store$get:null;}return null;}/**
3686
3533
  * Fetches User Id
3687
3534
  * @returns
3688
- */},{key:"getUserId",value:function getUserId(){var _this$store$get,_this$store5;return (_this$store$get=(_this$store5=this.store)===null||_this$store5===void 0?void 0:_this$store5.get(userSessionStorageKeys.userId))!==null&&_this$store$get!==void 0?_this$store$get:null;}/**
3535
+ */},{key:"getUserId",value:function getUserId(){return this.getItem(UserSessionKeys.userId);}/**
3689
3536
  * Fetches User Traits
3690
3537
  * @returns
3691
- */},{key:"getUserTraits",value:function getUserTraits(){var _this$store$get2,_this$store6;return (_this$store$get2=(_this$store6=this.store)===null||_this$store6===void 0?void 0:_this$store6.get(userSessionStorageKeys.userTraits))!==null&&_this$store$get2!==void 0?_this$store$get2:null;}/**
3538
+ */},{key:"getUserTraits",value:function getUserTraits(){return this.getItem(UserSessionKeys.userTraits);}/**
3692
3539
  * Fetches Group Id
3693
3540
  * @returns
3694
- */},{key:"getGroupId",value:function getGroupId(){var _this$store$get3,_this$store7;return (_this$store$get3=(_this$store7=this.store)===null||_this$store7===void 0?void 0:_this$store7.get(userSessionStorageKeys.groupId))!==null&&_this$store$get3!==void 0?_this$store$get3:null;}/**
3541
+ */},{key:"getGroupId",value:function getGroupId(){return this.getItem(UserSessionKeys.groupId);}/**
3695
3542
  * Fetches Group Traits
3696
3543
  * @returns
3697
- */},{key:"getGroupTraits",value:function getGroupTraits(){var _this$store$get4,_this$store8;return (_this$store$get4=(_this$store8=this.store)===null||_this$store8===void 0?void 0:_this$store8.get(userSessionStorageKeys.groupTraits))!==null&&_this$store$get4!==void 0?_this$store$get4:null;}/**
3544
+ */},{key:"getGroupTraits",value:function getGroupTraits(){return this.getItem(UserSessionKeys.groupTraits);}/**
3698
3545
  * Fetches Initial Referrer
3699
3546
  * @returns
3700
- */},{key:"getInitialReferrer",value:function getInitialReferrer(){var _this$store$get5,_this$store9;return (_this$store$get5=(_this$store9=this.store)===null||_this$store9===void 0?void 0:_this$store9.get(userSessionStorageKeys.initialReferrer))!==null&&_this$store$get5!==void 0?_this$store$get5:null;}/**
3547
+ */},{key:"getInitialReferrer",value:function getInitialReferrer(){return this.getItem(UserSessionKeys.initialReferrer);}/**
3701
3548
  * Fetches Initial Referring domain
3702
3549
  * @returns
3703
- */},{key:"getInitialReferringDomain",value:function getInitialReferringDomain(){var _this$store$get6,_this$store10;return (_this$store$get6=(_this$store10=this.store)===null||_this$store10===void 0?void 0:_this$store10.get(userSessionStorageKeys.initialReferringDomain))!==null&&_this$store$get6!==void 0?_this$store$get6:null;}/**
3550
+ */},{key:"getInitialReferringDomain",value:function getInitialReferringDomain(){return this.getItem(UserSessionKeys.initialReferringDomain);}/**
3704
3551
  * Fetches session tracking information from storage
3705
3552
  * @returns
3706
- */},{key:"getSessionFromStorage",value:function getSessionFromStorage(){var _this$store$get7,_this$store11;return (_this$store$get7=(_this$store11=this.store)===null||_this$store11===void 0?void 0:_this$store11.get(userSessionStorageKeys.sessionInfo))!==null&&_this$store$get7!==void 0?_this$store$get7:null;}/**
3553
+ */},{key:"getSessionFromStorage",value:function getSessionFromStorage(){return this.getItem(UserSessionKeys.sessionInfo);}/**
3554
+ * If session is active it returns the sessionId
3555
+ * @returns
3556
+ */},{key:"getSessionId",value:function getSessionId(){if(state.session.sessionInfo.value.autoTrack&&!hasSessionExpired(state.session.sessionInfo.value.expiresAt)||state.session.sessionInfo.value.manualTrack){return state.session.sessionInfo.value.id||null;}return null;}/**
3707
3557
  * A function to update current session info after each event call
3708
3558
  */},{key:"refreshSession",value:function refreshSession(){if(state.session.sessionInfo.value.autoTrack||state.session.sessionInfo.value.manualTrack){if(state.session.sessionInfo.value.autoTrack){this.startOrRenewAutoTracking();}if(state.session.sessionInfo.value.sessionStart===undefined){state.session.sessionInfo.value=_objectSpread2(_objectSpread2({},state.session.sessionInfo.value),{},{sessionStart:true});}else if(state.session.sessionInfo.value.sessionStart){state.session.sessionInfo.value=_objectSpread2(_objectSpread2({},state.session.sessionInfo.value),{},{sessionStart:false});}}}/**
3709
3559
  * Reset state values
3710
3560
  * @param resetAnonymousId
3711
3561
  * @param noNewSessionStart
3712
3562
  * @returns
3713
- */},{key:"reset",value:function reset(resetAnonymousId,noNewSessionStart){var _this3=this;var _state$session$sessio=state.session.sessionInfo.value,manualTrack=_state$session$sessio.manualTrack,autoTrack=_state$session$sessio.autoTrack;o(function(){state.session.userId.value='';state.session.userTraits.value={};state.session.groupId.value='';state.session.groupTraits.value={};if(resetAnonymousId){state.session.anonymousUserId.value='';}if(noNewSessionStart){return;}if(autoTrack){state.session.sessionInfo.value={};_this3.startOrRenewAutoTracking();}else if(manualTrack){_this3.startManualTrackingInternal();}});}/**
3563
+ */},{key:"reset",value:function reset(resetAnonymousId,noNewSessionStart){var _this4=this;var _state$session$sessio=state.session.sessionInfo.value,manualTrack=_state$session$sessio.manualTrack,autoTrack=_state$session$sessio.autoTrack;r(function(){state.session.userId.value=defaultUserSessionValues.userId;state.session.userTraits.value=defaultUserSessionValues.userTraits;state.session.groupId.value=defaultUserSessionValues.groupId;state.session.groupTraits.value=defaultUserSessionValues.groupTraits;if(resetAnonymousId){state.session.anonymousId.value=defaultUserSessionValues.anonymousId;}if(noNewSessionStart){return;}if(autoTrack){state.session.sessionInfo.value=defaultUserSessionValues.sessionInfo;_this4.startOrRenewAutoTracking();}else if(manualTrack){_this4.startManualTrackingInternal();}});}/**
3714
3564
  * Set user Id
3715
3565
  * @param userId
3716
- */},{key:"setUserId",value:function setUserId(userId){if(this.store){state.session.userId.value=userId;}}/**
3566
+ */},{key:"setUserId",value:function setUserId(userId){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.userId)){state.session.userId.value=userId;}}/**
3717
3567
  * Set user traits
3718
3568
  * @param traits
3719
- */},{key:"setUserTraits",value:function setUserTraits(traits){if(traits&&this.store){var _state$session$userTr;state.session.userTraits.value=mergeDeepRight((_state$session$userTr=state.session.userTraits.value)!==null&&_state$session$userTr!==void 0?_state$session$userTr:{},traits);}}/**
3569
+ */},{key:"setUserTraits",value:function setUserTraits(traits){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.userTraits)&&traits){var _state$session$userTr;state.session.userTraits.value=mergeDeepRight((_state$session$userTr=state.session.userTraits.value)!==null&&_state$session$userTr!==void 0?_state$session$userTr:{},traits);}}/**
3720
3570
  * Set group Id
3721
3571
  * @param groupId
3722
- */},{key:"setGroupId",value:function setGroupId(groupId){if(this.store){state.session.groupId.value=groupId;}}/**
3572
+ */},{key:"setGroupId",value:function setGroupId(groupId){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.groupId)){state.session.groupId.value=groupId;}}/**
3723
3573
  * Set group traits
3724
3574
  * @param traits
3725
- */},{key:"setGroupTraits",value:function setGroupTraits(traits){if(traits&&this.store){var _state$session$groupT;state.session.groupTraits.value=mergeDeepRight((_state$session$groupT=state.session.groupTraits.value)!==null&&_state$session$groupT!==void 0?_state$session$groupT:{},traits);}}/**
3575
+ */},{key:"setGroupTraits",value:function setGroupTraits(traits){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.groupTraits)&&traits){var _state$session$groupT;state.session.groupTraits.value=mergeDeepRight((_state$session$groupT=state.session.groupTraits.value)!==null&&_state$session$groupT!==void 0?_state$session$groupT:{},traits);}}/**
3726
3576
  * Set initial referrer
3727
3577
  * @param referrer
3728
- */},{key:"setInitialReferrer",value:function setInitialReferrer(referrer){if(this.store){state.session.initialReferrer.value=referrer;}}/**
3578
+ */},{key:"setInitialReferrer",value:function setInitialReferrer(referrer){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.initialReferrer)){state.session.initialReferrer.value=referrer;}}/**
3729
3579
  * Set initial referring domain
3730
3580
  * @param referrer
3731
- */},{key:"setInitialReferringDomain",value:function setInitialReferringDomain(referrer){if(this.store){state.session.initialReferringDomain.value=referrer;}}/**
3581
+ */},{key:"setInitialReferringDomain",value:function setInitialReferringDomain(referringDomain){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.initialReferringDomain)){state.session.initialReferringDomain.value=referringDomain;}}/**
3732
3582
  * A function to check for existing session details and depending on that create a new session.
3733
3583
  */},{key:"startOrRenewAutoTracking",value:function startOrRenewAutoTracking(){if(hasSessionExpired(state.session.sessionInfo.value.expiresAt)){state.session.sessionInfo.value=generateAutoTrackingSession(state.session.sessionInfo.value.timeout);}else {var timestamp=Date.now();var timeout=state.session.sessionInfo.value.timeout;state.session.sessionInfo.value=mergeDeepRight(state.session.sessionInfo.value,{expiresAt:timestamp+timeout// set the expiry time of the session
3734
3584
  });}}/**
@@ -3739,10 +3589,7 @@
3739
3589
  * An internal function to start manual session
3740
3590
  */},{key:"startManualTrackingInternal",value:function startManualTrackingInternal(){this.start(Date.now());}/**
3741
3591
  * A public method to end an ongoing session.
3742
- */},{key:"end",value:function end(){state.session.sessionInfo.value={};}/**
3743
- * Clear storage
3744
- * @param resetAnonymousId
3745
- */},{key:"clearUserSessionStorage",value:function clearUserSessionStorage(resetAnonymousId){var _this$store12,_this$store13,_this$store14,_this$store15;(_this$store12=this.store)===null||_this$store12===void 0||_this$store12.remove(userSessionStorageKeys.userId);(_this$store13=this.store)===null||_this$store13===void 0||_this$store13.remove(userSessionStorageKeys.userTraits);(_this$store14=this.store)===null||_this$store14===void 0||_this$store14.remove(userSessionStorageKeys.groupId);(_this$store15=this.store)===null||_this$store15===void 0||_this$store15.remove(userSessionStorageKeys.groupTraits);if(resetAnonymousId){var _this$store16;(_this$store16=this.store)===null||_this$store16===void 0||_this$store16.remove(userSessionStorageKeys.anonymousUserId);}}}]);return UserSessionManager;}();
3592
+ */},{key:"end",value:function end(){state.session.sessionInfo.value={};}}]);return UserSessionManager;}();
3746
3593
 
3747
3594
  /**
3748
3595
  * A buffer queue to serve as a store for any type of data
@@ -3750,6 +3597,20 @@
3750
3597
 
3751
3598
  var DATA_PLANE_QUEUE_EXT_POINT_PREFIX='dataplaneEventsQueue';var DESTINATIONS_QUEUE_EXT_POINT_PREFIX='destinationsEventsQueue';
3752
3599
 
3600
+ /**
3601
+ * Filters and returns the user supplied integrations config that should take preference over the destination specific integrations config
3602
+ * @param eventIntgConfig User supplied integrations config at event level
3603
+ * @param destinationsIntgConfig Cumulative integrations config from all destinations
3604
+ * @returns Filtered user supplied integrations config
3605
+ */var getOverriddenIntegrationOptions=function getOverriddenIntegrationOptions(eventIntgConfig,destinationsIntgConfig){return Object.keys(eventIntgConfig).filter(function(intgName){return eventIntgConfig[intgName]!==true||!destinationsIntgConfig[intgName];}).reduce(function(obj,key){var retVal=clone$1(obj);retVal[key]=eventIntgConfig[key];return retVal;},{});};/**
3606
+ * Returns the event object with final integrations config
3607
+ * @param event RudderEvent object
3608
+ * @param state Application state
3609
+ * @returns Mutated event with final integrations config
3610
+ */var getFinalEvent=function getFinalEvent(event,state){var _event$integrations;var finalEvent=clone$1(event);// Merge the destination specific integrations config with the event's integrations config
3611
+ // In general, the preference is given to the event's integrations config
3612
+ var eventIntgConfig=(_event$integrations=event.integrations)!==null&&_event$integrations!==void 0?_event$integrations:DEFAULT_INTEGRATIONS_CONFIG;var destinationsIntgConfig=state.nativeDestinations.integrationsConfig.value;var overriddenIntgOpts=getOverriddenIntegrationOptions(eventIntgConfig,destinationsIntgConfig);finalEvent.integrations=mergeDeepRight(destinationsIntgConfig,overriddenIntgOpts);return finalEvent;};
3613
+
3753
3614
  /**
3754
3615
  * Event repository class responsible for queuing events for further processing and delivery
3755
3616
  */var EventRepository=/*#__PURE__*/function(){/**
@@ -3761,16 +3622,16 @@
3761
3622
  */function EventRepository(pluginsManager,storeManager,errorHandler,logger){_classCallCheck(this,EventRepository);this.pluginsManager=pluginsManager;this.errorHandler=errorHandler;this.logger=logger;this.httpClient=new HttpClient(errorHandler,logger);this.storeManager=storeManager;this.onError=this.onError.bind(this);}/**
3762
3623
  * Initializes the event repository
3763
3624
  */_createClass(EventRepository,[{key:"init",value:function init(){var _this=this;this.dataplaneEventsQueue=this.pluginsManager.invokeSingle("".concat(DATA_PLANE_QUEUE_EXT_POINT_PREFIX,".init"),state,this.httpClient,this.storeManager,this.errorHandler,this.logger);this.destinationsEventsQueue=this.pluginsManager.invokeSingle("".concat(DESTINATIONS_QUEUE_EXT_POINT_PREFIX,".init"),state,this.pluginsManager,this.storeManager,this.errorHandler,this.logger);// Start the queue once the client destinations are ready
3764
- b(function(){if(state.nativeDestinations.clientDestinationsReady.value===true){var _this$destinationsEve;(_this$destinationsEve=_this.destinationsEventsQueue)===null||_this$destinationsEve===void 0||_this$destinationsEve.start();}});// Start the queue processing only when the destinations are ready or hybrid mode destinations exist
3625
+ E(function(){if(state.nativeDestinations.clientDestinationsReady.value===true){var _this$destinationsEve;(_this$destinationsEve=_this.destinationsEventsQueue)===null||_this$destinationsEve===void 0||_this$destinationsEve.start();}});// Start the queue processing only when the destinations are ready or hybrid mode destinations exist
3765
3626
  // However, events will be enqueued for now.
3766
3627
  // At the time of processing the events, the integrations config data from destinations
3767
3628
  // is merged into the event object
3768
- var timeoutId;b(function(){var _this$dataplaneEvents;var shouldBufferDpEvents=state.loadOptions.value.bufferDataPlaneEventsUntilReady===true&&state.nativeDestinations.clientDestinationsReady.value===false;var hybridDestExist=state.nativeDestinations.activeDestinations.value.some(function(dest){return isHybridModeDestination(dest);});if((hybridDestExist===false||shouldBufferDpEvents===false)&&((_this$dataplaneEvents=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents===void 0?void 0:_this$dataplaneEvents.scheduleTimeoutActive)!==true){var _this$dataplaneEvents2;globalThis.clearTimeout(timeoutId);(_this$dataplaneEvents2=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents2===void 0||_this$dataplaneEvents2.start();}});// Force start the data plane events queue processing after a timeout
3629
+ var timeoutId;E(function(){var _this$dataplaneEvents;var shouldBufferDpEvents=state.loadOptions.value.bufferDataPlaneEventsUntilReady===true&&state.nativeDestinations.clientDestinationsReady.value===false;var hybridDestExist=state.nativeDestinations.activeDestinations.value.some(function(dest){return isHybridModeDestination(dest);});if((hybridDestExist===false||shouldBufferDpEvents===false)&&((_this$dataplaneEvents=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents===void 0?void 0:_this$dataplaneEvents.scheduleTimeoutActive)!==true){var _this$dataplaneEvents2;globalThis.clearTimeout(timeoutId);(_this$dataplaneEvents2=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents2===void 0||_this$dataplaneEvents2.start();}});// Force start the data plane events queue processing after a timeout
3769
3630
  if(state.loadOptions.value.bufferDataPlaneEventsUntilReady===true){timeoutId=globalThis.setTimeout(function(){var _this$dataplaneEvents3;if(((_this$dataplaneEvents3=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents3===void 0?void 0:_this$dataplaneEvents3.scheduleTimeoutActive)!==true){var _this$dataplaneEvents4;(_this$dataplaneEvents4=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents4===void 0||_this$dataplaneEvents4.start();}},state.loadOptions.value.dataPlaneEventsBufferTimeout);}}/**
3770
3631
  * Enqueues the event for processing
3771
3632
  * @param event RudderEvent object
3772
3633
  * @param callback API callback function
3773
- */},{key:"enqueue",value:function enqueue(event,callback){var dpQEvent=clone$1(event);this.pluginsManager.invokeSingle("".concat(DATA_PLANE_QUEUE_EXT_POINT_PREFIX,".enqueue"),state,this.dataplaneEventsQueue,dpQEvent,this.errorHandler,this.logger);var dQEvent=clone$1(event);this.pluginsManager.invokeSingle("".concat(DESTINATIONS_QUEUE_EXT_POINT_PREFIX,".enqueue"),state,this.destinationsEventsQueue,dQEvent,this.errorHandler,this.logger);// Invoke the callback if it exists
3634
+ */},{key:"enqueue",value:function enqueue(event,callback){var dpQEvent=getFinalEvent(event,state);this.pluginsManager.invokeSingle("".concat(DATA_PLANE_QUEUE_EXT_POINT_PREFIX,".enqueue"),state,this.dataplaneEventsQueue,dpQEvent,this.errorHandler,this.logger);var dQEvent=clone$1(event);this.pluginsManager.invokeSingle("".concat(DESTINATIONS_QUEUE_EXT_POINT_PREFIX,".enqueue"),state,this.destinationsEventsQueue,dQEvent,this.errorHandler,this.logger);// Invoke the callback if it exists
3774
3635
  try{// Using the event sent to the data plane queue here
3775
3636
  // to ensure the mutated (if any) event is sent to the callback
3776
3637
  callback===null||callback===void 0||callback(dpQEvent);}catch(error){this.onError(error,API_CALLBACK_INVOKE_ERROR);}}/**
@@ -3788,25 +3649,25 @@
3788
3649
  * Start application lifecycle if not already started
3789
3650
  */_createClass(Analytics,[{key:"load",value:function load(writeKey,dataPlaneUrl){var loadOptions=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(state.lifecycle.status.value){return;}var clonedDataPlaneUrl=clone$1(dataPlaneUrl);var clonedLoadOptions=clone$1(loadOptions);// dataPlaneUrl is not provided
3790
3651
  if(isObjectAndNotNull(dataPlaneUrl)){clonedLoadOptions=dataPlaneUrl;clonedDataPlaneUrl=undefined;}// Set initial state values
3791
- o(function(){state.lifecycle.writeKey.value=writeKey;state.lifecycle.dataPlaneUrl.value=clonedDataPlaneUrl;state.loadOptions.value=normalizeLoadOptions(state.loadOptions.value,clonedLoadOptions);state.lifecycle.status.value=LifecycleStatus.Mounted;});// Expose state to global objects
3652
+ r(function(){state.lifecycle.writeKey.value=writeKey;state.lifecycle.dataPlaneUrl.value=clonedDataPlaneUrl;state.loadOptions.value=normalizeLoadOptions(state.loadOptions.value,clonedLoadOptions);state.lifecycle.status.value=LifecycleStatus.Mounted;});// Expose state to global objects
3792
3653
  setExposedGlobal('state',state,writeKey);// Configure initial config of any services or components here
3793
3654
  // State application lifecycle
3794
3655
  this.startLifecycle();}// Start lifecycle methods
3795
3656
  /**
3796
3657
  * Orchestrate the lifecycle of the application phases/status
3797
- */},{key:"startLifecycle",value:function startLifecycle(){var _this=this;b(function(){try{switch(state.lifecycle.status.value){case LifecycleStatus.Mounted:_this.prepareBrowserCapabilities();break;case LifecycleStatus.BrowserCapabilitiesReady:// initialize the preloaded events enqueuing
3658
+ */},{key:"startLifecycle",value:function startLifecycle(){var _this=this;E(function(){try{switch(state.lifecycle.status.value){case LifecycleStatus.Mounted:_this.prepareBrowserCapabilities();break;case LifecycleStatus.BrowserCapabilitiesReady:// initialize the preloaded events enqueuing
3798
3659
  retrievePreloadBufferEvents(_this);_this.prepareInternalServices();_this.loadConfig();break;case LifecycleStatus.Configured:_this.loadPlugins();break;case LifecycleStatus.PluginsLoading:break;case LifecycleStatus.PluginsReady:_this.init();break;case LifecycleStatus.Initialized:_this.onInitialized();break;case LifecycleStatus.Loaded:_this.loadDestinations();_this.processBufferedEvents();break;case LifecycleStatus.DestinationsLoading:break;case LifecycleStatus.DestinationsReady:_this.onDestinationsReady();break;case LifecycleStatus.Ready:_this.onReady();break;default:break;}}catch(err){var issue='Failed to load the SDK';_this.errorHandler.onError(getMutatedError(err,issue),ANALYTICS_CORE);}});}/**
3799
3660
  * Load browser polyfill if required
3800
3661
  */},{key:"prepareBrowserCapabilities",value:function prepareBrowserCapabilities(){this.capabilitiesManager.init();}/**
3801
3662
  * Enqueue in SDK preload buffer events, used from preloadBuffer component
3802
3663
  */},{key:"enqueuePreloadBufferEvents",value:function enqueuePreloadBufferEvents(bufferedEvents){var _this2=this;if(Array.isArray(bufferedEvents)){bufferedEvents.forEach(function(bufferedEvent){return _this2.preloadBuffer.enqueue(clone$1(bufferedEvent));});}}/**
3803
3664
  * Process the buffer preloaded events by passing their arguments to the respective facade methods
3804
- */},{key:"processDataInPreloadBuffer",value:function processDataInPreloadBuffer(){while(this.preloadBuffer.size()>0){var eventToProcess=this.preloadBuffer.dequeue();if(eventToProcess){consumePreloadBufferedEvent(_toConsumableArray(eventToProcess),this);}}}},{key:"prepareInternalServices",value:function prepareInternalServices(){this.pluginsManager=new PluginsManager(defaultPluginEngine,this.errorHandler,this.logger);this.storeManager=new StoreManager(this.pluginsManager,this.errorHandler,this.logger);this.configManager=new ConfigManager(this.httpClient,this.errorHandler,this.logger);this.userSessionManager=new UserSessionManager(this.errorHandler,this.logger,this.pluginsManager);this.eventRepository=new EventRepository(this.pluginsManager,this.storeManager,this.errorHandler,this.logger);this.eventManager=new EventManager(this.eventRepository,this.userSessionManager,this.errorHandler,this.logger);}/**
3665
+ */},{key:"processDataInPreloadBuffer",value:function processDataInPreloadBuffer(){while(this.preloadBuffer.size()>0){var eventToProcess=this.preloadBuffer.dequeue();if(eventToProcess){consumePreloadBufferedEvent(_toConsumableArray(eventToProcess),this);}}}},{key:"prepareInternalServices",value:function prepareInternalServices(){this.pluginsManager=new PluginsManager(defaultPluginEngine,this.errorHandler,this.logger);this.storeManager=new StoreManager(this.pluginsManager,this.errorHandler,this.logger);this.configManager=new ConfigManager(this.httpClient,this.errorHandler,this.logger);this.userSessionManager=new UserSessionManager(this.errorHandler,this.logger,this.pluginsManager,this.storeManager);this.eventRepository=new EventRepository(this.pluginsManager,this.storeManager,this.errorHandler,this.logger);this.eventManager=new EventManager(this.eventRepository,this.userSessionManager,this.errorHandler,this.logger);}/**
3805
3666
  * Load configuration
3806
3667
  */},{key:"loadConfig",value:function loadConfig(){var _this$configManager;if(!state.lifecycle.writeKey.value){this.errorHandler.onError(new Error('A write key is required to load the SDK. Please provide a valid write key.'),LOAD_CONFIGURATION);return;}this.httpClient.setAuthHeader(state.lifecycle.writeKey.value);(_this$configManager=this.configManager)===null||_this$configManager===void 0||_this$configManager.init();}/**
3807
3668
  * Initialize the storage and event queue
3808
- */},{key:"init",value:function init(){var _this$storeManager,_this$storeManager2,_this$userSessionMana,_this$eventManager;this.errorHandler.init(this.externalSrcLoader);// Initialize storage
3809
- (_this$storeManager=this.storeManager)===null||_this$storeManager===void 0||_this$storeManager.init();this.clientDataStore=(_this$storeManager2=this.storeManager)===null||_this$storeManager2===void 0?void 0:_this$storeManager2.getStore(CLIENT_DATA_STORE_NAME);(_this$userSessionMana=this.userSessionManager)===null||_this$userSessionMana===void 0||_this$userSessionMana.init(this.clientDataStore);// Initialize consent manager
3669
+ */},{key:"init",value:function init(){var _this$storeManager,_this$userSessionMana,_this$eventManager;this.errorHandler.init(this.externalSrcLoader);// Initialize storage
3670
+ (_this$storeManager=this.storeManager)===null||_this$storeManager===void 0||_this$storeManager.init();(_this$userSessionMana=this.userSessionManager)===null||_this$userSessionMana===void 0||_this$userSessionMana.init();// Initialize consent manager
3810
3671
  if(state.consents.activeConsentManagerPluginName.value){var _this$pluginsManager;(_this$pluginsManager=this.pluginsManager)===null||_this$pluginsManager===void 0||_this$pluginsManager.invokeSingle("consentManager.init",state,this.storeManager,this.logger);}// Initialize event manager
3811
3672
  (_this$eventManager=this.eventManager)===null||_this$eventManager===void 0||_this$eventManager.init();// Mark the SDK as initialized
3812
3673
  state.lifecycle.status.value=LifecycleStatus.Initialized;}/**
@@ -3820,7 +3681,7 @@
3820
3681
  // as this will prevent us from supporting multiple SDK instances in the same page
3821
3682
  // Execute onLoaded callback if provided in load options
3822
3683
  if(isFunction(state.loadOptions.value.onLoaded)){state.loadOptions.value.onLoaded(globalThis.rudderanalytics);}// Set lifecycle state
3823
- o(function(){state.lifecycle.loaded.value=true;state.lifecycle.status.value=LifecycleStatus.Loaded;});this.initialized=true;// Emit an event to use as substitute to the onLoaded callback
3684
+ r(function(){state.lifecycle.loaded.value=true;state.lifecycle.status.value=LifecycleStatus.Loaded;});this.initialized=true;// Emit an event to use as substitute to the onLoaded callback
3824
3685
  var initializedEvent=new CustomEvent('RSA_Initialised',{detail:{analyticsInstance:globalThis.rudderanalytics},bubbles:true,cancelable:true,composed:true});globalThis.document.dispatchEvent(initializedEvent);}/**
3825
3686
  * Emit ready event
3826
3687
  */ // eslint-disable-next-line class-methods-use-this
@@ -3833,7 +3694,7 @@
3833
3694
  */},{key:"loadDestinations",value:function loadDestinations(){var _this$pluginsManager3,_this$pluginsManager4;// Set in state the desired activeDestinations to inject in DOM
3834
3695
  (_this$pluginsManager3=this.pluginsManager)===null||_this$pluginsManager3===void 0||_this$pluginsManager3.invokeSingle('nativeDestinations.setActiveDestinations',state,this.pluginsManager,this.errorHandler,this.logger);var totalDestinationsToLoad=state.nativeDestinations.activeDestinations.value.length;if(totalDestinationsToLoad===0){state.lifecycle.status.value=LifecycleStatus.DestinationsReady;return;}// Start loading native integration scripts and create instances
3835
3696
  state.lifecycle.status.value=LifecycleStatus.DestinationsLoading;(_this$pluginsManager4=this.pluginsManager)===null||_this$pluginsManager4===void 0||_this$pluginsManager4.invokeSingle('nativeDestinations.load',state,this.externalSrcLoader,this.errorHandler,this.logger);// Progress to next lifecycle phase if all native destinations are initialized or failed
3836
- b(function(){var areAllDestinationsReady=totalDestinationsToLoad===0||state.nativeDestinations.initializedDestinations.value.length+state.nativeDestinations.failedDestinations.value.length===totalDestinationsToLoad;if(areAllDestinationsReady){o(function(){state.lifecycle.status.value=LifecycleStatus.DestinationsReady;state.nativeDestinations.clientDestinationsReady.value=true;});}});}/**
3697
+ E(function(){var areAllDestinationsReady=totalDestinationsToLoad===0||state.nativeDestinations.initializedDestinations.value.length+state.nativeDestinations.failedDestinations.value.length===totalDestinationsToLoad;if(areAllDestinationsReady){r(function(){state.lifecycle.status.value=LifecycleStatus.DestinationsReady;state.nativeDestinations.clientDestinationsReady.value=true;});}});}/**
3837
3698
  * Invoke the ready callbacks if any exist
3838
3699
  */ // eslint-disable-next-line class-methods-use-this
3839
3700
  },{key:"onDestinationsReady",value:function onDestinationsReady(){var _this4=this;state.eventBuffer.readyCallbacksArray.value.forEach(function(callback){try{callback();}catch(err){_this4.errorHandler.onError(err,ANALYTICS_CORE,READY_CALLBACK_INVOKE_ERROR);}});state.lifecycle.status.value=LifecycleStatus.Ready;}// End lifecycle methods
@@ -3855,7 +3716,7 @@
3855
3716
  },{key:"getUserTraits",value:function getUserTraits(){return state.session.userTraits.value;}// eslint-disable-next-line class-methods-use-this
3856
3717
  },{key:"getGroupId",value:function getGroupId(){return state.session.groupId.value;}// eslint-disable-next-line class-methods-use-this
3857
3718
  },{key:"getGroupTraits",value:function getGroupTraits(){return state.session.groupTraits.value;}},{key:"startSession",value:function startSession(sessionId){var _this$userSessionMana11;var type='startSession';this.errorHandler.leaveBreadcrumb("New ".concat(type," invocation"));if(!state.lifecycle.loaded.value){state.eventBuffer.toBeProcessedArray.value.push([type,sessionId]);return;}(_this$userSessionMana11=this.userSessionManager)===null||_this$userSessionMana11===void 0||_this$userSessionMana11.start(sessionId);}},{key:"endSession",value:function endSession(){var _this$userSessionMana12;var type='endSession';this.errorHandler.leaveBreadcrumb("New ".concat(type," invocation"));if(!state.lifecycle.loaded.value){state.eventBuffer.toBeProcessedArray.value.push([type]);return;}(_this$userSessionMana12=this.userSessionManager)===null||_this$userSessionMana12===void 0||_this$userSessionMana12.end();}// eslint-disable-next-line class-methods-use-this
3858
- },{key:"getSessionId",value:function getSessionId(){var _this$userSessionMana13,_state$session$sessio,_state$session$sessio2;(_this$userSessionMana13=this.userSessionManager)===null||_this$userSessionMana13===void 0||_this$userSessionMana13.refreshSession();return (_state$session$sessio=(_state$session$sessio2=state.session.sessionInfo.value)===null||_state$session$sessio2===void 0?void 0:_state$session$sessio2.id)!==null&&_state$session$sessio!==void 0?_state$session$sessio:null;}// End consumer exposed methods
3719
+ },{key:"getSessionId",value:function getSessionId(){var _this$userSessionMana13;var sessionId=(_this$userSessionMana13=this.userSessionManager)===null||_this$userSessionMana13===void 0?void 0:_this$userSessionMana13.getSessionId();return sessionId!==null&&sessionId!==void 0?sessionId:null;}// End consumer exposed methods
3859
3720
  }]);return Analytics;}();
3860
3721
 
3861
3722
  /*
@@ -3873,7 +3734,7 @@
3873
3734
  * Set instance to use if no specific writeKey is provided in methods
3874
3735
  * automatically for the first created instance
3875
3736
  * TODO: to support multiple analytics instances in the near future
3876
- */_createClass(RudderAnalytics,[{key:"setDefaultInstanceKey",value:function setDefaultInstanceKey(writeKey){if(isEmpty$1(this.analyticsInstances)){this.defaultAnalyticsKey=writeKey;}}/**
3737
+ */_createClass(RudderAnalytics,[{key:"setDefaultInstanceKey",value:function setDefaultInstanceKey(writeKey){if(writeKey){this.defaultAnalyticsKey=writeKey;}}/**
3877
3738
  * Retrieve an existing analytics instance
3878
3739
  */},{key:"getAnalyticsInstance",value:function getAnalyticsInstance(writeKey){var instanceId=writeKey!==null&&writeKey!==void 0?writeKey:this.defaultAnalyticsKey;var analyticsInstanceExists=Boolean(this.analyticsInstances[instanceId]);if(!analyticsInstanceExists){this.analyticsInstances[instanceId]=new Analytics();}return this.analyticsInstances[instanceId];}/**
3879
3740
  * Create new analytics instance and trigger application lifecycle start