rudder-sdk-js 2.45.0 → 2.45.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/dist/npm/index.cjs.js +1 -1
- package/dist/npm/index.es.js +1 -1
- package/dist/npm/index.js +1 -1
- package/package.json +1 -1
package/dist/npm/index.cjs.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}var p={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}p.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}();var g=p.exports,y=f(g);function v(e){return null!=e&&"object"===n(e)&&!0===e["@@functional/placeholder"]}function m(e){return function t(n){return 0===arguments.length||v(n)?t:e.apply(this,arguments)}}function I(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return v(n)?t:m((function(t){return e(n,t)}));default:return v(n)&&v(r)?t:v(n)?m((function(t){return e(t,r)})):v(r)?m((function(t){return e(n,t)})):e(n,r)}}}function A(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return v(n)?t:I((function(t,r){return e(n,t,r)}));case 2:return v(n)&&v(r)?t:v(n)?I((function(t,n){return e(t,r,n)})):v(r)?I((function(t,r){return e(n,t,r)})):m((function(t){return e(n,r,t)}));default:return v(n)&&v(r)&&v(i)?t:v(n)&&v(r)?I((function(t,n){return e(t,n,i)})):v(n)&&v(i)?I((function(t,n){return e(t,r,n)})):v(r)&&v(i)?I((function(t,r){return e(n,t,r)})):v(n)?m((function(t){return e(t,r,i)})):v(r)?m((function(t){return e(n,t,i)})):v(i)?m((function(t){return e(n,r,t)})):e(n,r,i)}}}function k(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var b=m((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e,t,r){if(r||(r=new O),function(e){var t=n(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var i,o=function(n){var i=r.get(e);if(i)return i;for(var o in r.set(e,n),e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=t?C(e[o],!0,r):e[o]);return n};switch(b(e)){case"Object":return o(Object.create(Object.getPrototypeOf(e)));case"Array":return o([]);case"Date":return new Date(e.valueOf());case"RegExp":return i=e,new RegExp(i.source,i.flags?i.flags:(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.sticky?"y":"")+(i.unicode?"u":"")+(i.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var S,O=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1){var i=n[r];if(i[0]===e)return i[1]}else{var o=this.hash(e),s=this.map[o];if(s)for(var a=0;a<s.length;a+=1){var u=s[a];if(u[0]===e)return u[1]}}},e}(),T=m((function(e){return null!=e&&"function"==typeof e.clone?e.clone():C(e,!0)})),w=A((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})k(r,t)&&(i[r]=k(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)k(r,n)&&!k(r,i)&&(i[r]=n[r]);return i})),_=A((function e(t,n,r){return w((function(n,r,i){return E(r)&&E(i)?e(t,r,i):t(n,r,i)}),n,r)})),R=A((function(e,t,n){return _((function(t,n,r){return e(n,r)}),t,n)})),P={HS:"HubSpot",GA:"GA",HOTJAR:"Hotjar",GOOGLEADS:"GoogleAds",VWO:"VWO",GTM:"GoogleTagManager",BRAZE:"Braze",INTERCOM:"INTERCOM",KEEN:"Keen",KISSMETRICS:"Kissmetrics",CUSTOMERIO:"CustomerIO",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",FACEBOOK_PIXEL:"FacebookPixel",LOTAME:"Lotame",OPTIMIZELY:"Optimizely",BUGSNAG:"Bugsnag",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"GA4",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"Posthog",KLAVIYO:"Klaviyo",CLEVERTAP:"Clevertap",BINGADS:"BingAds",PINTEREST_TAG:"PinterestTag",ADOBE_ANALYTICS:"AdobeAnalytics",LINKEDIN_INSIGHT_TAG:"LinkedInInsightTag",REDDIT_PIXEL:"RedditPixel",DRIP:"Drip",HEAP:"Heap",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",PROFITWELL:"ProfitWell",SENTRY:"Sentry",QUANTUMMETRIC:"QuantumMetric",SNAP_PIXEL:"SnapPixel",POST_AFFILIATE_PRO:"PostAffiliatePro",GOOGLE_OPTIMIZE:"GoogleOptimize",LAUNCHDARKLY:"LaunchDarkly",GA360:"GA360",ADROLL:"Adroll",DCM_FLOODLIGHT:"DCMFloodlight",MATOMO:"Matomo",VERO:"Vero",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"QuoraPixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"YandexMetrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"MicrosoftClarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TiktokAds",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig"},D="ADOBE_ANALYTICS";s({},"Adobe Analytics","AdobeAnalytics");var x,L=(s(S={"Adobe Analytics":D,ADOBEANALYTICS:D,"ADOBE ANALYTICS":D},D,D),s(S,"AdobeAnalytics",D),s(S,"adobeanalytics",D),s(S,"adobe analytics",D),s(S,"Adobe analytics",D),s(S,"adobe Analytics",D),S),M="AM";s({},"Amplitude","Amplitude");var B,N=(s(x={},M,M),s(x,"AMPLITUDE",M),s(x,"Amplitude",M),s(x,"am",M),x),G="APPCUES";s({},"Appcues","Appcues");var F,U=(s(B={},G,G),s(B,"Appcues",G),s(B,"App Cues",G),s(B,"appcues",G),B),j="BINGADS";s({},"Bing Ads","BingAds");var K,Q=(s(F={},j,j),s(F,"BingAds",j),s(F,"bingads",j),s(F,"Bing Ads",j),s(F,"Bing ads",j),s(F,"bing Ads",j),s(F,"bing ads",j),F),z="BRAZE";s({},"Braze","Braze");var H,q=(s(K={},z,z),s(K,"Braze",z),s(K,"braze",z),K),V="BUGSNAG";s({},"Bugsnag","Bugsnag");var W,Y=(s(H={},V,V),s(H,"bugsnag",V),s(H,"Bugsnag",V),H),X="CHARTBEAT";s({},"Chartbeat","Chartbeat");var J,$=(s(W={},X,X),s(W,"Chartbeat",X),s(W,"chartbeat",X),s(W,"Chart Beat",X),s(W,"chart beat",X),W),Z="CLEVERTAP";s({},"CleverTap","Clevertap");var ee,te=(s(J={},Z,Z),s(J,"Clevertap",Z),s(J,"clevertap",Z),J),ne="COMSCORE";s({},"Comscore","Comscore");var re,ie=(s(ee={},ne,ne),s(ee,"Comscore",ne),s(ee,"Com Score",ne),s(ee,"com Score",ne),s(ee,"com score",ne),s(ee,"Com score",ne),ee),oe="CRITEO";s({},"Criteo","Criteo");var se,ae=(s(re={},oe,oe),s(re,"Criteo",oe),s(re,"criteo",oe),re),ue="CUSTOMERIO";s({},"Customer IO","CustomerIO");var ce,le=(s(se={},ue,ue),s(se,"Customerio",ue),s(se,"Customer.io",ue),s(se,"CUSTOMER.IO",ue),s(se,"customer.io",ue),se),he="DRIP";s({},"Drip","Drip");var fe,de=(s(ce={},he,he),s(ce,"Drip",he),s(ce,"drip",he),ce),pe="FACEBOOK_PIXEL";s({},"Facebook Pixel","FacebookPixel");var ge,ye=(s(fe={},pe,pe),s(fe,"FB Pixel",pe),s(fe,"Facebook Pixel",pe),s(fe,"facebook pixel",pe),s(fe,"fbpixel",pe),s(fe,"FBPIXEL",pe),s(fe,"FB_PIXEL",pe),fe),ve="FULLSTORY";s({},"Fullstory","Fullstory");var me,Ie=(s(ge={},ve,ve),s(ge,"Fullstory",ve),s(ge,"FullStory",ve),s(ge,"full Story",ve),s(ge,"Full Story",ve),s(ge,"Full story",ve),s(ge,"full story",ve),s(ge,"fullstory",ve),ge),Ae="GA";s({},"Google Analytics","GA");var ke,be=(s(me={},Ae,Ae),s(me,"Google Analytics",Ae),s(me,"GoogleAnalytics",Ae),s(me,"GOOGLE ANALYTICS",Ae),s(me,"google analytics",Ae),me),Ee="GA4";s({},"Google Analytics 4 (GA4)","GA4");var Ce,Se=(s(ke={},Ee,Ee),s(ke,"Google Analytics 4",Ee),s(ke,"Google analytics 4",Ee),s(ke,"google analytics 4",Ee),s(ke,"Google Analytics4",Ee),s(ke,"Google analytics4",Ee),s(ke,"google analytics4",Ee),s(ke,"Google Analytics 4 (GA4)",Ee),s(ke,"google analytics 4 (ga4)",Ee),s(ke,"GoogleAnalytics4",Ee),ke),Oe="GOOGLEADS";s({},"Google Ads","GoogleAds");var Te,we=(s(Ce={},Oe,Oe),s(Ce,"Google Ads",Oe),s(Ce,"GoogleAds",Oe),s(Ce,"GOOGLE ADS",Oe),s(Ce,"google ads",Oe),s(Ce,"googleads",Oe),Ce),_e="GOOGLE_OPTIMIZE";s({},"Google Optimize","GoogleOptimize");var Re,Pe=(s(Te={},_e,_e),s(Te,"Google Optimize",_e),s(Te,"GoogleOptimize",_e),s(Te,"Googleoptimize",_e),s(Te,"GOOGLEOPTIMIZE",_e),s(Te,"google optimize",_e),s(Te,"Google optimize",_e),s(Te,"GOOGLE OPTIMIZE",_e),Te),De="GTM";s({},"Google Tag Manager","GoogleTagManager");var xe,Le=(s(Re={},De,De),s(Re,"Google Tag Manager",De),s(Re,"google tag manager",De),s(Re,"googletag manager",De),s(Re,"googletagmanager",De),Re),Me="HEAP";s({},"Heap.io","Heap");var Be,Ne=(s(xe={},Me,Me),s(xe,"Heap",Me),s(xe,"heap",Me),s(xe,"Heap.io",Me),xe),Ge="HOTJAR";s({},"Hotjar","Hotjar");var Fe,Ue=(s(Be={},Ge,Ge),s(Be,"Hotjar",Ge),s(Be,"hotjar",Ge),s(Be,"Hot Jar",Ge),s(Be,"hot jar",Ge),Be),je="HS";s({},"HubSpot","HubSpot");var Ke,Qe=(s(Fe={},je,je),s(Fe,"Hubspot",je),s(Fe,"HUBSPOT",je),s(Fe,"hub spot",je),s(Fe,"Hub Spot",je),s(Fe,"Hub spot",je),Fe),ze="INTERCOM";s({},"Intercom","INTERCOM");var He,qe=(s(Ke={},ze,ze),s(Ke,"Intercom",ze),s(Ke,"intercom",ze),Ke),Ve="KEEN";s({},"Keen","Keen");var We,Ye=(s(He={},Ve,Ve),s(He,"Keen",Ve),s(He,"Keen.io",Ve),s(He,"keen",Ve),s(He,"keen.io",Ve),He),Xe="KISSMETRICS";s({},"Kiss Metrics","Kissmetrics");var Je,$e=(s(We={},Xe,Xe),s(We,"Kissmetrics",Xe),s(We,"kissmetrics",Xe),We),Ze="KLAVIYO";s({},"Klaviyo","Klaviyo");var et,tt=(s(Je={},Ze,Ze),s(Je,"Klaviyo",Ze),s(Je,"klaviyo",Ze),Je),nt="LAUNCHDARKLY";s({},"LaunchDarkly","LaunchDarkly");var rt,it=(s(et={},nt,nt),s(et,"LaunchDarkly",nt),s(et,"Launch_Darkly",nt),s(et,"Launch Darkly",nt),s(et,"launchDarkly",nt),s(et,"launch darkly",nt),et),ot="LINKEDIN_INSIGHT_TAG";s({},"Linkedin Insight Tag","LinkedInInsightTag");var st,at=(s(rt={},ot,ot),s(rt,"LinkedIn Insight Tag",ot),s(rt,"LinkedIn insight tag",ot),s(rt,"linkedIn insight tag",ot),s(rt,"Linkedin_insight_tag",ot),s(rt,"LinkedinInsighttag",ot),s(rt,"LinkedinInsightTag",ot),s(rt,"LinkedInInsightTag",ot),s(rt,"Linkedininsighttag",ot),s(rt,"LINKEDININSIGHTTAG",ot),s(rt,"linkedininsighttag",ot),rt),ut="LOTAME";s({},"Lotame","Lotame");var ct,lt=(s(st={},ut,ut),s(st,"Lotame",ut),s(st,"lotame",ut),st),ht="LYTICS";s({},"Lytics","Lytics");var ft,dt=(s(ct={},ht,ht),s(ct,"Lytics",ht),s(ct,"lytics",ht),ct),pt="MP";s({},"Mixpanel","Mixpanel");var gt,yt=(s(ft={},pt,pt),s(ft,"MIXPANEL",pt),s(ft,"Mixpanel",pt),s(ft,"MIX PANEL",pt),s(ft,"Mix panel",pt),s(ft,"Mix Panel",pt),ft),vt="MOENGAGE";s({},"MoEngage","MoEngage");var mt,It=(s(gt={},vt,vt),s(gt,"MoEngage",vt),s(gt,"moengage",vt),s(gt,"Moengage",vt),s(gt,"Mo Engage",vt),s(gt,"mo engage",vt),s(gt,"Mo engage",vt),gt),At="OPTIMIZELY";s({},"Optimizely Web","Optimizely");var kt,bt=(s(mt={},At,At),s(mt,"Optimizely",At),s(mt,"optimizely",At),mt),Et="PENDO";s({},"Pendo","Pendo");var Ct,St=(s(kt={},Et,Et),s(kt,"Pendo",Et),s(kt,"pendo",Et),kt),Ot="PINTEREST_TAG";s({},"Pinterest Tag","PinterestTag");var Tt,wt=(s(Ct={},Ot,Ot),s(Ct,"PinterestTag",Ot),s(Ct,"Pinterest_Tag",Ot),s(Ct,"PINTERESTTAG",Ot),s(Ct,"pinterest",Ot),s(Ct,"PinterestAds",Ot),s(Ct,"Pinterest_Ads",Ot),s(Ct,"Pinterest",Ot),s(Ct,"Pinterest Tag",Ot),s(Ct,"Pinterest tag",Ot),s(Ct,"PINTEREST TAG",Ot),s(Ct,"pinterest tag",Ot),s(Ct,"Pinterest Ads",Ot),s(Ct,"Pinterest ads",Ot),Ct),_t="POST_AFFILIATE_PRO";s({},"Post Affiliate Pro","PostAffiliatePro");var Rt,Pt=(s(Tt={},_t,_t),s(Tt,"PostAffiliatePro",_t),s(Tt,"Post_affiliate_pro",_t),s(Tt,"Post Affiliate Pro",_t),s(Tt,"Post affiliate pro",_t),s(Tt,"post affiliate pro",_t),s(Tt,"postaffiliatepro",_t),s(Tt,"POSTAFFILIATEPRO",_t),Tt),Dt="POSTHOG";s({},"PostHog","Posthog");var xt,Lt=(s(Rt={},Dt,Dt),s(Rt,"PostHog",Dt),s(Rt,"Posthog",Dt),s(Rt,"posthog",Dt),s(Rt,"Post Hog",Dt),s(Rt,"Post hog",Dt),s(Rt,"post hog",Dt),Rt),Mt="PROFITWELL";s({},"ProfitWell","ProfitWell");var Bt,Nt=(s(xt={},Mt,Mt),s(xt,"ProfitWell",Mt),s(xt,"profitwell",Mt),s(xt,"Profitwell",Mt),s(xt,"Profit Well",Mt),s(xt,"profit well",Mt),s(xt,"Profit well",Mt),xt),Gt="QUALTRICS";s({},"Qualtrics","Qualtrics");var Ft,Ut=(s(Bt={},Gt,Gt),s(Bt,"Qualtrics",Gt),s(Bt,"qualtrics",Gt),Bt),jt="QUANTUMMETRIC";s({},"Quantum Metric","QuantumMetric");var Kt,Qt=(s(Ft={},jt,jt),s(Ft,"Quantum Metric",jt),s(Ft,"quantum Metric",jt),s(Ft,"quantum metric",jt),s(Ft,"QuantumMetric",jt),s(Ft,"quantumMetric",jt),s(Ft,"quantummetric",jt),s(Ft,"Quantum_Metric",jt),Ft),zt="REDDIT_PIXEL";s({},"Reddit Pixel","RedditPixel");var Ht,qt=(s(Kt={},zt,zt),s(Kt,"Reddit_Pixel",zt),s(Kt,"RedditPixel",zt),s(Kt,"REDDITPIXEL",zt),s(Kt,"redditpixel",zt),s(Kt,"Reddit Pixel",zt),s(Kt,"REDDIT PIXEL",zt),s(Kt,"reddit pixel",zt),Kt),Vt="SENTRY";s({},"Sentry","Sentry");var Wt,Yt=(s(Ht={},Vt,Vt),s(Ht,"sentry",Vt),s(Ht,"Sentry",Vt),Ht),Xt="SNAP_PIXEL";s({},"Snap Pixel","SnapPixel");var Jt,$t=(s(Wt={},Xt,Xt),s(Wt,"Snap_Pixel",Xt),s(Wt,"SnapPixel",Xt),s(Wt,"SNAPPIXEL",Xt),s(Wt,"snappixel",Xt),s(Wt,"Snap Pixel",Xt),s(Wt,"SNAP PIXEL",Xt),s(Wt,"snap pixel",Xt),Wt),Zt="TVSQUARED";s({},"TVSquared","TVSquared");var en,tn=(s(Jt={},Zt,Zt),s(Jt,"TVSquared",Zt),s(Jt,"tvsquared",Zt),s(Jt,"tvSquared",Zt),s(Jt,"TvSquared",Zt),s(Jt,"Tvsquared",Zt),s(Jt,"TV Squared",Zt),s(Jt,"tv squared",Zt),s(Jt,"tv Squared",Zt),Jt),nn="VWO";s({},"VWO","VWO");var rn,on=(s(en={},nn,nn),s(en,"VisualWebsiteOptimizer",nn),s(en,"Visualwebsiteoptimizer",nn),s(en,"visualwebsiteoptimizer",nn),s(en,"vwo",nn),s(en,"Visual Website Optimizer",nn),s(en,"Visual website optimizer",nn),s(en,"visual website optimizer",nn),en),sn="GA360";s({},"Google Analytics 360","GA360");var an,un=(s(rn={},sn,sn),s(rn,"Google Analytics 360",sn),s(rn,"Google analytics 360",sn),s(rn,"google analytics 360",sn),s(rn,"Google Analytics360",sn),s(rn,"Google analytics360",sn),s(rn,"google analytics360",sn),s(rn,"GoogleAnalytics360",sn),s(rn,"GA 360",sn),rn),cn="ADROLL";s({},"Adroll","Adroll");var ln,hn=(s(an={},cn,cn),s(an,"Adroll",cn),s(an,"Ad roll",cn),s(an,"ad roll",cn),s(an,"adroll",cn),an),fn="DCM_FLOODLIGHT";s({},"DCM Floodlight","DCMFloodlight");var dn,pn=(s(ln={},fn,fn),s(ln,"DCM Floodlight",fn),s(ln,"dcm floodlight",fn),s(ln,"Dcm Floodlight",fn),s(ln,"DCMFloodlight",fn),s(ln,"dcmfloodlight",fn),s(ln,"DcmFloodlight",fn),s(ln,"dcm_floodlight",fn),s(ln,"DCM_Floodlight",fn),ln),gn="MATOMO";s({},"Matomo","Matomo");var yn,vn=(s(dn={},gn,gn),s(dn,"Matomo",gn),s(dn,"matomo",gn),dn),mn="VERO";s({},"Vero","Vero");var In,An=(s(yn={},mn,mn),s(yn,"Vero",mn),s(yn,"vero",mn),yn),kn="MOUSEFLOW";s({},"Mouseflow","Mouseflow");var bn,En=(s(In={},kn,kn),s(In,"Mouseflow",kn),s(In,"mouseflow",kn),s(In,"mouseFlow",kn),s(In,"MouseFlow",kn),s(In,"Mouse flow",kn),s(In,"mouse flow",kn),s(In,"mouse Flow",kn),s(In,"Mouse Flow",kn),In),Cn="ROCKERBOX";s({},"Rockerbox","Rockerbox");var Sn,On=(s(bn={},Cn,Cn),s(bn,"Rockerbox",Cn),s(bn,"rockerbox",Cn),s(bn,"RockerBox",Cn),s(bn,"Rocker box",Cn),s(bn,"rocker box",Cn),s(bn,"Rocker Box",Cn),bn),Tn="CONVERTFLOW";s({},"ConvertFlow","ConvertFlow");var wn,_n=(s(Sn={},Tn,Tn),s(Sn,"Convertflow",Tn),s(Sn,"convertflow",Tn),s(Sn,"convertFlow",Tn),s(Sn,"ConvertFlow",Tn),s(Sn,"Convert flow",Tn),s(Sn,"convert flow",Tn),s(Sn,"convert Flow",Tn),s(Sn,"Convert Flow",Tn),s(Sn,"CONVERT FLOW",Tn),Sn),Rn="SNAPENGAGE";s({},"SnapEngage","SnapEngage");var Pn,Dn=(s(wn={},Rn,Rn),s(wn,"SnapEngage",Rn),s(wn,"Snap_Engage",Rn),s(wn,"snapengage",Rn),s(wn,"SNAP ENGAGE",Rn),s(wn,"Snap Engage",Rn),s(wn,"snap engage",Rn),wn),xn="LIVECHAT";s({},"LiveChat","LiveChat");var Ln,Mn=(s(Pn={},xn,xn),s(Pn,"LiveChat",xn),s(Pn,"Live_Chat",xn),s(Pn,"livechat",xn),s(Pn,"LIVE CHAT",xn),s(Pn,"Live Chat",xn),s(Pn,"live chat",xn),Pn),Bn="SHYNET";s({},"Shynet","Shynet");var Nn,Gn=(s(Ln={},Bn,Bn),s(Ln,"shynet",Bn),s(Ln,"ShyNet",Bn),s(Ln,"shyNet",Bn),s(Ln,"Shynet",Bn),s(Ln,"shy net",Bn),s(Ln,"Shy Net",Bn),s(Ln,"shy Net",Bn),s(Ln,"Shy net",Bn),Ln),Fn="WOOPRA";s({},"Woopra","Woopra");var Un,jn=(s(Nn={},Fn,Fn),s(Nn,"Woopra",Fn),s(Nn,"woopra",Fn),Nn),Kn="ROLLBAR";s({},"RollBar","RollBar");var Qn,zn=(s(Un={},Kn,Kn),s(Un,"RollBar",Kn),s(Un,"Roll_Bar",Kn),s(Un,"rollbar",Kn),s(Un,"Rollbar",Kn),s(Un,"ROLL BAR",Kn),s(Un,"Roll Bar",Kn),s(Un,"roll bar",Kn),Un),Hn="QUORA_PIXEL";s({},"Quora Pixel","QuoraPixel");var qn,Vn=(s(Qn={},Hn,Hn),s(Qn,"Quora Pixel",Hn),s(Qn,"Quora pixel",Hn),s(Qn,"QUORA PIXEL",Hn),s(Qn,"QuoraPixel",Hn),s(Qn,"Quorapixel",Hn),s(Qn,"QUORAPIXEL",Hn),s(Qn,"Quora_Pixel",Hn),s(Qn,"quora_pixel",Hn),s(Qn,"Quora",Hn),Qn),Wn="JUNE";s({},"June","June");var Yn,Xn=(s(qn={},Wn,Wn),s(qn,"June",Wn),s(qn,"june",Wn),qn),Jn="ENGAGE";s({},"Engage","Engage");var $n,Zn=(s(Yn={},Jn,Jn),s(Yn,"Engage",Jn),s(Yn,"engage",Jn),Yn),er="ITERABLE";s({},"Iterable","Iterable");var tr,nr=(s($n={},er,er),s($n,"Iterable",er),s($n,"iterable",er),$n),rr="YANDEX_METRICA";s({},"Yandex.Metrica","YandexMetrica");var ir,or=(s(tr={},rr,rr),s(tr,"Yandexmetrica",rr),s(tr,"yandexmetrica",rr),s(tr,"yandexMetrica",rr),s(tr,"YandexMetrica",rr),tr),sr="REFINER";s({},"Refiner","Refiner");var ar,ur=(s(ir={},sr,sr),s(ir,"Refiner",sr),s(ir,"refiner",sr),ir),cr="QUALAROO";s({},"Qualaroo","Qualaroo");var lr,hr=(s(ar={},cr,cr),s(ar,"Qualaroo",cr),s(ar,"qualaroo",cr),ar),fr="PODSIGHTS";s({},"Podsights","Podsights");var dr,pr=(s(lr={},fr,fr),s(lr,"Podsights",fr),s(lr,"PodSights",fr),s(lr,"pod Sights",fr),s(lr,"Pod Sights",fr),s(lr,"pod sights",fr),s(lr,"POD SIGHTS",fr),s(lr,"Pod sights",fr),lr),gr="AXEPTIO";s({},"Axeptio","Axeptio");var yr,vr=(s(dr={},gr,gr),s(dr,"Axeptio",gr),s(dr,"axeptio",gr),dr),mr="SATISMETER";s({},"Satismeter","Satismeter");var Ir,Ar=(s(yr={},mr,mr),s(yr,"Satismeter",mr),s(yr,"SatisMeter",mr),yr),kr="MICROSOFT_CLARITY";s({},"Microsoft Clarity","MicrosoftClarity");var br,Er=(s(Ir={},kr,kr),s(Ir,"Microsoft Clarity",kr),s(Ir,"Microsoft clarity",kr),s(Ir,"microsoft clarity",kr),s(Ir,"Microsoft_clarity",kr),s(Ir,"MicrosoftClarity",kr),s(Ir,"MICROSOFTCLARITY",kr),s(Ir,"microsoftclarity",kr),s(Ir,"microsoftClarity",kr),Ir),Cr="SENDINBLUE";s({},"Sendinblue","Sendinblue");var Sr,Or=(s(br={},Cr,Cr),s(br,"Sendinblue",Cr),s(br,"sendinblue",Cr),s(br,"SendinBlue",Cr),br),Tr="OLARK";s({},"Olark","Olark");var wr,_r=(s(Sr={},Tr,Tr),s(Sr,"Olark",Tr),s(Sr,"olark",Tr),Sr),Rr="LEMNISK";s({},"Lemnisk","Lemnisk");var Pr,Dr=(s(wr={},Rr,Rr),s(wr,"LEMNISK_MARKETING_AUTOMATION",Rr),s(wr,"Lemnisk Marketing Automation",Rr),s(wr,"LemniskMarketingAutomation",Rr),s(wr,"lemniskmarketingautomation",Rr),s(wr,"lemniskMarketingAutomation",Rr),s(wr,"lemnisk",Rr),s(wr,"Lemnisk",Rr),wr),xr="TIKTOK_ADS";s({},"TikTok Ads","TiktokAds");var Lr,Mr=(s(Pr={},xr,xr),s(Pr,"TiktokAds",xr),s(Pr,"Tiktok ads",xr),s(Pr,"Tiktok Ads",xr),s(Pr,"Tik Tok Ads",xr),s(Pr,"tik tok ads",xr),s(Pr,"tiktokads",xr),Pr),Br="ACTIVE_CAMPAIGN";s({},"Active Campaign","ActiveCampaign");var Nr,Gr=(s(Lr={ActiveCampaign:Br,"Active Campaign":Br,"ACTIVE CAMPAIGN":Br},Br,Br),s(Lr,"activecampaign",Br),s(Lr,"active campaign",Br),s(Lr,"Active campaign",Br),s(Lr,"active Campaign",Br),s(Lr,"active_campaign",Br),Lr),Fr="SPRIG";s({},"Sprig","Sprig");var Ur=(s(Nr={},Fr,Fr),s(Nr,"Sprig",Fr),s(Nr,"sprig",Fr),Nr),jr=t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t({All:"All"},L),N),U),Q),q),Y),$),te),ie),ae),le),de),ye),Ie),be),Se),un),we),Pe),Le),Ne),Ue),Qe),qe),Ye),$e),tt),it),at),lt),dt),yt),It),bt),St),wt),Pt),Lt),Nt),Ut),Qt),qt),Yt),$t),tn),on),hn),pn),vn),An),En),_n),Dn),Mn),Gn),jn),zn),Vn),Xn),Zn),nr),On),or),ur),hr),pr),vr),Ar),Er),Or),_r),Dr),Mr),Gr),Ur),Kr=4,Qr={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":Kr=1;break;case"DEBUG":Kr=2;break;case"WARN":Kr=3;break;default:Kr=4}},info:function(){var e;Kr<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;Kr<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;Kr<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;Kr<=4&&(e=console).error.apply(e,arguments)}},zr=1e4,Hr=1e3,qr="RS_JS_SDK",Vr="Request failed with status:",Wr=[Vr],Yr="errorReporting",Xr=function(e){var t=window.RudderStackGlobals&&window.RudderStackGlobals[Yr];t&&e instanceof Error&&t.notify(e)},Jr=function(e,t){return JSON.stringify(e,function(e){var t=[];return function(r,i){if(!e||null!=i){if("object"!==n(i)||null===i)return i;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(i)?(Qr.debug("Circular Reference detected for key: ".concat(r)),"[Circular Reference]"):(t.push(i),i)}}}(t))},$r=function(e,t,r){var i,o;try{i="string"==typeof e?e:e instanceof Error||e.message?e.message:Jr(e)}catch(e){i=""}if("object"===n(o=e)&&null!==o&&"target"in o){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&(e.target.dataset.loader!==qr||"true"!==e.target.dataset.isnonnativesdk))return"";if(i="error in script loading:: src:: ".concat(e.target.src," id:: ").concat(e.target.id),"ad-block"===e.target.id)return r.page("RudderJS-Initiated","ad-block page request",{path:"/ad-blocked",title:i},r.sendAdblockPageOptions),""}return"[handleError]::".concat(t||"",' "').concat(i,'"')},Zr=function(e,t,n){var r;try{r=$r(e,t,n)}catch(t){Qr.error("[handleError] Exception:: ",t),Qr.error("[handleError] Original error:: ",Jr(e)),Xr(t)}r&&(Qr.error(r),function(e){return!e.message||!Wr.some((function(t){return e.message.includes(t)}))}(e)&&Xr(e))},ei={exports:{}};var ti,ni={exports:{}},ri=d(Object.freeze({__proto__:null,default:{}}));function ii(){return ti||(ti=1,ni.exports=(e=e||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==h&&h.crypto&&(n=h.crypto),!n)try{n=ri}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=o.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},d=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}});var g=o.algo={};return o}(Math),e)),ni.exports;var e}var oi,si={exports:{}};function ai(){return oi||(oi=1,si.exports=(e=ii(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),si.exports;var e}var ui,ci={exports:{}};function li(){return ui||(ui=1,ci.exports=(e=ii(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],y=e[t+5],v=e[t+6],m=e[t+7],I=e[t+8],A=e[t+9],k=e[t+10],b=e[t+11],E=e[t+12],C=e[t+13],S=e[t+14],O=e[t+15],T=o[0],w=o[1],_=o[2],R=o[3];T=c(T,w,_,R,s,7,a[0]),R=c(R,T,w,_,u,12,a[1]),_=c(_,R,T,w,d,17,a[2]),w=c(w,_,R,T,p,22,a[3]),T=c(T,w,_,R,g,7,a[4]),R=c(R,T,w,_,y,12,a[5]),_=c(_,R,T,w,v,17,a[6]),w=c(w,_,R,T,m,22,a[7]),T=c(T,w,_,R,I,7,a[8]),R=c(R,T,w,_,A,12,a[9]),_=c(_,R,T,w,k,17,a[10]),w=c(w,_,R,T,b,22,a[11]),T=c(T,w,_,R,E,7,a[12]),R=c(R,T,w,_,C,12,a[13]),_=c(_,R,T,w,S,17,a[14]),T=l(T,w=c(w,_,R,T,O,22,a[15]),_,R,u,5,a[16]),R=l(R,T,w,_,v,9,a[17]),_=l(_,R,T,w,b,14,a[18]),w=l(w,_,R,T,s,20,a[19]),T=l(T,w,_,R,y,5,a[20]),R=l(R,T,w,_,k,9,a[21]),_=l(_,R,T,w,O,14,a[22]),w=l(w,_,R,T,g,20,a[23]),T=l(T,w,_,R,A,5,a[24]),R=l(R,T,w,_,S,9,a[25]),_=l(_,R,T,w,p,14,a[26]),w=l(w,_,R,T,I,20,a[27]),T=l(T,w,_,R,C,5,a[28]),R=l(R,T,w,_,d,9,a[29]),_=l(_,R,T,w,m,14,a[30]),T=h(T,w=l(w,_,R,T,E,20,a[31]),_,R,y,4,a[32]),R=h(R,T,w,_,I,11,a[33]),_=h(_,R,T,w,b,16,a[34]),w=h(w,_,R,T,S,23,a[35]),T=h(T,w,_,R,u,4,a[36]),R=h(R,T,w,_,g,11,a[37]),_=h(_,R,T,w,m,16,a[38]),w=h(w,_,R,T,k,23,a[39]),T=h(T,w,_,R,C,4,a[40]),R=h(R,T,w,_,s,11,a[41]),_=h(_,R,T,w,p,16,a[42]),w=h(w,_,R,T,v,23,a[43]),T=h(T,w,_,R,A,4,a[44]),R=h(R,T,w,_,E,11,a[45]),_=h(_,R,T,w,O,16,a[46]),T=f(T,w=h(w,_,R,T,d,23,a[47]),_,R,s,6,a[48]),R=f(R,T,w,_,m,10,a[49]),_=f(_,R,T,w,S,15,a[50]),w=f(w,_,R,T,y,21,a[51]),T=f(T,w,_,R,E,6,a[52]),R=f(R,T,w,_,p,10,a[53]),_=f(_,R,T,w,k,15,a[54]),w=f(w,_,R,T,u,21,a[55]),T=f(T,w,_,R,I,6,a[56]),R=f(R,T,w,_,O,10,a[57]),_=f(_,R,T,w,v,15,a[58]),w=f(w,_,R,T,C,21,a[59]),T=f(T,w,_,R,g,6,a[60]),R=f(R,T,w,_,b,10,a[61]),_=f(_,R,T,w,d,15,a[62]),w=f(w,_,R,T,A,21,a[63]),o[0]=o[0]+T|0,o[1]=o[1]+w|0,o[2]=o[2]+_|0,o[3]=o[3]+R|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5)),ci.exports;var e}var hi,fi={exports:{}},di={exports:{}};function pi(){return hi||(hi=1,di.exports=(a=ii(),t=(e=a).lib,n=t.WordArray,r=t.Hasher,i=e.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var l=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=l<<1|l>>>31}var h=(r<<5|r>>>27)+u+o[c];h+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),a.SHA1)),di.exports;var e,t,n,r,i,o,s,a}var gi,yi,vi={exports:{}};function mi(){return yi||(yi=1,fi.exports=function(e){return n=(t=e).lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),s=i.create(),a=s.words,u=r.keySize,c=r.iterations;a.length<u;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var l=1;l<c;l++)n=o.finalize(n),o.reset();s.concat(n)}return s.sigBytes=4*u,s}}),t.EvpKDF=function(e,t,n){return a.create(n).compute(e,t)},e.EvpKDF;var t,n,r,i,o,s,a}(ii(),pi(),(gi||(gi=1,vi.exports=(e=ii(),void function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())),vi.exports))),fi.exports;var e}var Ii,Ai,ki={exports:{}};ei.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],h=[],f=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],y=e[g],v=e[y],m=257*e[p]^16843008*p;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*v^65537*y^257*g^16843008*n,l[p]=m<<24|m>>>8,h[p]=m<<16|m>>>16,f[p]=m<<8|m>>>24,d[p]=m,n?(n=g^e[e[e[v^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var c=o[s];else c=o[s-4];a[u]=u<4||s<=4?c:l[i[c>>>24]]^h[i[c>>>16&255]]^f[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[h>>>8&255]^s[255&f]^n[d++],y=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^s[255&c]^n[d++],v=r[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[f>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&h]^n[d++];c=g,l=y,h=v,f=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[d++],y=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[d++],v=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=v,e[t+3]=m},keySize:8});t.AES=n._createHelper(g)}(),e.AES}(ii(),ai(),li(),mi(),Ii||(Ii=1,ki.exports=(Ai=ii(),mi(),void(Ai.lib.Cipher||function(e){var t=Ai,n=t.lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var a=s.Base64,u=t.algo.EvpKDF,c=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?m:y}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});n.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},h=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=l.CBC=function(){var t=h.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),d=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(o);var u=i.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:f,padding:d}),reset:function(){var e;c.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var p=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?i.create([1398893684,1701076831]).concat(n).concat(t):t).toString(a)},parse:function(e){var t,n=a.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=i.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),p.create({ciphertext:n,salt:t})}},y=n.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return p.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(t.kdf={}).OpenSSL={execute:function(e,t,n,r,o){if(r||(r=i.random(8)),o)s=u.create({keySize:t+n,hasher:o}).compute(e,r);else var s=u.create({keySize:t+n}).compute(e,r);var a=i.create(s.words.slice(t),4*n);return s.sigBytes=4*t,p.create({key:s,iv:a,salt:r})}},m=n.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:v}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=y.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,y.decrypt.call(this,e,t,i.key,r)}})}()))));var bi=f(ei.exports),Ei={exports:{}};Ei.exports=function(e){return e.enc.Utf8}(ii());var Ci=f(Ei.exports),Si=function(e){return null!=e&&"object"===n(e)&&!1===Array.isArray(e)},Oi=function(e,t,n){if(Si(n)||(n={default:n}),!_i(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));var r=Array.isArray(t),i="string"==typeof t,o=n.separator||".",s=n.joinChar||("string"==typeof o?o:".");if(!i&&!r)return e;if(i&&t in e)return wi(t,e,n)?e[t]:n.default;var a=r?t:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(t,o,n),u=a.length,c=0;do{var l=a[c];for("number"==typeof l&&(l=String(l));l&&"\\"===l.slice(-1);)l=Ti([l.slice(0,-1),a[++c]||""],s,n);if(l in e){if(!wi(l,e,n))return n.default;e=e[l]}else{for(var h=!1,f=c+1;f<u;)if(h=(l=Ti([l,a[f++]],s,n))in e){if(!wi(l,e,n))return n.default;e=e[l],c=f-1;break}if(!h)return n.default}}while(++c<u&&_i(e));return c===u?e:n.default};function Ti(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function wi(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function _i(e){return Si(e)||Array.isArray(e)||"function"==typeof e}var Ri,Pi,Di=f(Oi),xi={exports:{}};function Li(){if(Pi)return Ri;Pi=1;var e=1e3,t=60*e,r=60*t,i=24*r,o=7*i,s=365.25*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return Ri=function(u,c){c=c||{};var l=n(u);if("string"===l&&u.length>0)return function(n){if((n=String(n)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(u);if("number"===l&&isFinite(u))return c.long?function(n){var o=Math.abs(n);if(o>=i)return a(n,o,i,"day");if(o>=r)return a(n,o,r,"hour");if(o>=t)return a(n,o,t,"minute");if(o>=e)return a(n,o,e,"second");return n+" ms"}(u):function(n){var o=Math.abs(n);if(o>=i)return Math.round(n/i)+"d";if(o>=r)return Math.round(n/r)+"h";if(o>=t)return Math.round(n/t)+"m";if(o>=e)return Math.round(n/e)+"s";return n+"ms"}(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))},Ri}var Mi=function(e){function t(e){var r,i,o,s=null;function a(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(a.enabled){var o=a,s=Number(new Date),u=s-(r||s);o.diff=u,o.prev=r,o.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";c++;var i=t.formatters[r];if("function"==typeof i){var s=n[c];e=i.call(o,s),n.splice(c,1),c--}return e})),t.formatArgs.call(o,n),(o.log||t.log).apply(o,n)}}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(u(t.names.map(r)),u(t.skips.map(r).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Li(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t};!function(e,t){var n;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=Mi(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(xi,xi.exports);var Bi=xi.exports,Ni=Bi("cookie");function Gi(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[Ui((t=r[i].split("="))[0])]=Ui(t[1]);return n}(e)}function Fi(e){try{return encodeURIComponent(e)}catch(t){Ni("error `encode(%o)` - %o",e,t)}}function Ui(e){try{return decodeURIComponent(e)}catch(t){Ni("error `decode(%o)` - %o",e,t)}}var ji=f((function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=Fi(e)+"="+Fi(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.samesite&&(r+="; samesite="+n.samesite);n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return Gi()[e]}(e);default:return Gi()}})),Ki={exports:{}},Qi=Math.max,zi=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=Qi(Number(e)||0,0),i=Qi(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},Hi=Math.max,qi=function(e){if(null==e||!e.length)return[];for(var t=new Array(Hi(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},Vi=zi,Wi=qi,Yi=Object.prototype.hasOwnProperty,Xi=Object.prototype.toString,Ji=function(e){return Boolean(e)&&"[object Object]"===Xi.call(e)},$i=function(e,t,n,r){return Yi.call(t,r)&&void 0===e[r]&&(e[r]=n),t},Zi=function(e,t,n,r){return Yi.call(t,r)&&(Ji(e[r])&&Ji(n)?e[r]=to(e[r],n):void 0===e[r]&&(e[r]=n)),t},eo=function(e,t){if(r=t,!Boolean(r)||"object"!==n(r))return t;var r;e=e||$i;for(var i=Vi(2,arguments),o=0;o<i.length;o+=1)for(var s in i[o])e(t,i[o],i[o][s],s);return t},to=function(e){return eo.apply(null,[Zi,e].concat(Wi(arguments)))};Ki.exports=function(e){return eo.apply(null,[null,e].concat(Wi(arguments)))},Ki.exports.deep=to;var no=f(Ki.exports),ro={exports:{}},io=Bi("cookie"),oo=function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=ao(e)+"="+ao(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return so()[e]}(e);default:return so()}};function so(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[uo((t=r[i].split("="))[0])]=uo(t[1]);return n}(e)}function ao(e){try{return encodeURIComponent(e)}catch(t){io("error `encode(%o)` - %o",e,t)}}function uo(e){try{return decodeURIComponent(e)}catch(t){io("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=oo;function r(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}r.levels=function(e){var t,n,r=("function"!=typeof window.URL?(t=e,(n=document.createElement("a")).href=t,n.hostname):new URL(e).hostname).split("."),i=r[r.length-1],o=[];if(4===r.length&&i===parseInt(i,10))return o;if(r.length<=1)return o;for(var s=r.length-2;s>=0;--s)o.push(r.slice(s).join("."));return o},r.cookie=n,t=e.exports=r}(ro,ro.exports);var co=f(ro.exports),lo=new(function(){function e(t){r(this,e),this.cOpts={},this.options(t),this.isSupportAvailable=this.checkSupportAvailability()}return o(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===arguments.length)return this.cOpts;var t=".".concat(co(window.location.href));return"."===t&&(t=null),this.cOpts=no(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),e.sameDomainCookiesOnly&&delete this.cOpts.domain,this.cOpts}},{key:"set",value:function(e,t){try{return ji(e,t,T(this.cOpts)),!0}catch(e){return Qr.error(e),!1}}},{key:"get",value:function(e){return ji(e)}},{key:"remove",value:function(e){try{return ji(e,null,T(this.cOpts)),!0}catch(e){return!1}}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_cookie";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}())({}),ho={exports:{}};ho.exports=function(){function e(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function t(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}function n(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function r(e){return"[object Function]"==={}.toString.call(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){var t="_Is_Incognit",n="yes";try{e||(e=window.localStorage),e.setItem(t,n),e.removeItem(t)}catch(t){var r={_data:{},setItem:function(e,t){return r._data[e]=String(t)},getItem:function(e){return r._data.hasOwnProperty(e)?r._data[e]:void 0},removeItem:function(e){return delete r._data[e]},clear:function(){return r._data={}}};e=r}finally{e.getItem(t)===n&&e.removeItem(t)}return e}var s=o();function a(){if(!(this instanceof a))return new a}a.prototype={set:function(n,r){if(n&&!e(n))s.setItem(n,t(r));else if(e(n))for(var i in n)this.set(i,n[i]);return this},get:function(e){if(void 0===e){var t={};return this.forEach((function(e,n){return t[e]=n})),t}if("?"===e.charAt(0))return this.has(e.substr(1));var r=arguments;if(r.length>1){for(var i={},o=0,a=r.length;o<a;o++){var u=n(s.getItem(r[o]));this.has(r[o])&&(i[r[o]]=u)}return i}return n(s.getItem(e))},clear:function(){return s.clear(),this},remove:function(e){var t=this.get(e);return s.removeItem(e),t},has:function(e){return{}.hasOwnProperty.call(this.get(),e)},keys:function(){var e=[];return this.forEach((function(t){e.push(t)})),e},forEach:function(e){for(var t=0,n=s.length;t<n;t++){var r=s.key(t);e(r,this.get(r))}return this},search:function(e){for(var t=this.keys(),n={},r=0,i=t.length;r<i;r++)t[r].indexOf(e)>-1&&(n[t[r]]=this.get(t[r]));return n}};var u=null;function c(t,n){var o=arguments,s=null;if(u||(u=a()),0===o.length)return u.get();if(1===o.length){if("string"==typeof t)return u.get(t);if(e(t))return u.set(t)}if(2===o.length&&"string"==typeof t){if(!n)return u.remove(t);if(n&&"string"==typeof n)return u.set(t,n);n&&r(n)&&(s=null,s=n(t,u.get(t)),c.set(t,s))}if(2===o.length&&i(t)&&r(n))for(var l=0,h=t.length;l<h;l++)s=n(t[l],u.get(t[l])),c.set(t[l],s);return c}for(var l in a.prototype)c[l]=a.prototype[l];return c}();var fo=f(ho.exports),po=new(function(){function e(t){r(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(t)}return o(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(no(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return fo.set(e,t)}},{key:"get",value:function(e){return fo.get(e)}},{key:"remove",value:function(e){return fo.remove(e)}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}())({}),go=function(e){return(new TextDecoder).decode((t=e,n=globalThis.atob(t).split("").map((function(e){return e.charCodeAt(0)})),new Uint8Array(n)));var t,n},yo="rl_user_id",vo="rl_trait",mo="rl_anonymous_id",Io="rl_group_id",Ao="rl_group_trait",ko="rl_page_init_referrer",bo="rl_page_init_referring_domain",Eo="rl_session",Co="rl_auth_token",So="RudderEncrypt:",Oo="RS_ENC_v3_",To="Rudder",wo={segment:"ajs_anonymous_id"};function _o(e){try{return e?JSON.parse(e):null}catch(t){return Qr.error(t),e||null}}function Ro(e){return e.replace(/^\s+|\s+$/gm,"")}function Po(e){return e&&"string"==typeof e&&""!==Ro(e)?e.substring(0,So.length)===So?bi.decrypt(e.substring(So.length),To).toString(Ci):e.substring(0,Oo.length)===Oo?go(e.substring(Oo.length)):e:e}for(var Do,xo=function(){function e(){r(this,e),lo.isSupportAvailable?this.storage=lo:(po.enabled&&(this.storage=po),this.storage||Qr.error("No storage is available :: initializing the SDK without storage"))}return o(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.storage.options(e)}},{key:"setItem",value:function(e,t){this.storage.set(e,function(e){return""===Ro(e)?e:"".concat(So).concat(bi.encrypt(e,To).toString())}(function(e){return JSON.stringify(e)}(t)))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):Qr.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(yo,e)}},{key:"setUserTraits",value:function(e){this.setItem(vo,e)}},{key:"setGroupId",value:function(e){this.setStringItem(Io,e)}},{key:"setGroupTraits",value:function(e){this.setItem(Ao,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(mo,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(ko,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(bo,e)}},{key:"setSessionInfo",value:function(e){this.setItem(Eo,e)}},{key:"setAuthToken",value:function(e){this.setItem(Co,e)}},{key:"getItem",value:function(e){return _o(Po(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(yo)}},{key:"getUserTraits",value:function(){return this.getItem(vo)}},{key:"getGroupId",value:function(){return this.getItem(Io)}},{key:"getGroupTraits",value:function(){return this.getItem(Ao)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(wo).includes(n)&&"segment"===n?(po.enabled&&(t=po.get(wo[n])),!t&&lo.isSupportAvailable&&(t=lo.get(wo[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=_o(Po(this.storage.get(mo)));if(t)return t;var n=Di(e,"autoCapture.source");if(!0===Di(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(ko)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(bo)}},{key:"getSessionInfo",value:function(){return this.getItem(Eo)}},{key:"getAuthToken",value:function(){return this.getItem(Co)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(Eo)}},{key:"clear",value:function(e){this.storage.remove(yo),this.storage.remove(vo),this.storage.remove(Io),this.storage.remove(Ao),this.storage.remove(Co),e&&this.storage.remove(mo)}}]),e}(),Lo=new xo,Mo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(document.getElementById(e))return;var r=document.createElement("script");r.src=t,r.async=void 0===n.async||n.async,r.type="text/javascript",r.id=e,!0!==n.skipDatasetAttributes&&(r.setAttribute("data-loader",qr),void 0!==n.isNonNativeSDK&&r.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var i=document.getElementsByTagName("head");if(i.length>0)i[0].insertBefore(r,i[0].firstChild);else{var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}catch(o){Zr(o)}},Bo=function(e){return null===e},No=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return T(t);var r=T(e);return t.forEach((function(e,t){r[t]=Array.isArray(e)||function(e){return!Bo(e)&&"object"===n(e)&&!Array.isArray(e)}(e)?Go(r[t],e):e})),r},Go=function(e,t){return R(No,e,t)},Fo=function(e){return function(e){return!Bo(e)&&"[object Object]"===Object.prototype.toString.call(e)}(e)&&Object.keys(e).length>0},Uo=256,jo=[];Uo--;)jo[Uo]=(Uo+256).toString(16).substring(1);for(var Ko,Qo=4096,zo=[],Ho=0;Ho<256;Ho++)zo[Ho]=(Ho+256).toString(16).substring(1);function qo(){var e;(!Ko||Ho+16>Qo)&&(e=Qo,Ko=crypto.getRandomValues(new Uint8Array(e)),Ho=0);for(var t,n=0,r="";n<16;n++)t=Ko[Ho+n],r+=6==n?zo[15&t|64]:8==n?zo[63&t|128]:zo[t],1&n&&n>1&&n<11&&(r+="-");return Ho+=16,r}var Vo={All:"All",GA:"Google Analytics",GOOGLEADS:"Google Ads",BRAZE:"Braze",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",CUSTOMERIO:"Customer IO",DCM_Floodlight:"DCM Floodlight",FACEBOOK_PIXEL:"Facebook Pixel",GTM:"Google Tag Manager",HOTJAR:"Hotjar",HS:"HubSpot",INTERCOM:"Intercom",KEEN:"Keen",KISSMETRICS:"Kiss Metrics",LOTAME:"Lotame",VWO:"VWO",OPTIMIZELY:"Optimizely Web",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"Google Analytics 4 (GA4)",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"PostHog",PROFITWELL:"ProfitWell",KLAVIYO:"Klaviyo",CLEVERTAP:"CleverTap",BINGADS:"Bing Ads",PINTEREST_TAG:"Pinterest Tag",SNAP_PIXEL:"Snap Pixel",LINKEDIN_INSIGHT_TAG:"Linkedin Insight Tag",REDDIT_PIXEL:"Reddit Pixel",DRIP:"Drip",HEAP:"Heap.io",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",SENTRY:"Sentry",GOOGLE_OPTIMIZE:"Google Optimize",POST_AFFILIATE_PRO:"Post Affiliate Pro",LAUNCHDARKLY:"LaunchDarkly",GA360:"Google Analytics 360",ADROLL:"Adroll",VERO:"Vero",MATOMO:"Matomo",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"Quora Pixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"Yandex.Metrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"Microsoft Clarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TikTok Ads",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig"},Wo=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],Yo="https://api.rudderstack.com/sourceConfig/?p=npm&v=2.45.0",Xo="v1.1",Jo="js-integrations",$o="".concat("https://cdn.rudderlabs.com","/").concat(Xo,"/").concat(Jo),Zo=["Lax","None","Strict"],es=["US","EU"],ts=["oneTrust","ketch"],ns=["library","consentManagement"],rs=["none","default","full"],is={All:!0};function os(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function ss(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?qo():function(){var e,t=0,n="";if(!Do||Uo+16>256){for(Do=Array(t=256);t--;)Do[t]=256*Math.random()|0;t=Uo=0}for(;t<16;t++)e=Do[Uo+t],n+=6==t?jo[15&e|64]:8==t?jo[63&e|128]:jo[e],1&t&&t>1&&t<11&&(n+="-");return Uo++,n}()}function as(){return(new Date).toISOString()}function us(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!==n&&void 0!==t[n]&&t[n]!==n&&delete e[n])}))}function cs(e){us(e,jr)}function ls(e){us(e,Vo)}function hs(e,t){var r=[];if(!t||0===t.length)return r;var i=!0;void 0!==e.All&&(i=e.All);var o=[];return"string"==typeof t[0]?t.forEach((function(e){o.push({intgName:e,intObj:e})})):"object"===n(t[0])&&t.forEach((function(e){o.push({intgName:e.name,intObj:e})})),o.forEach((function(t){var n=t.intgName,o=t.intObj;if(i){var s=!0;void 0!==e[n]&&!1===Boolean(e[n])&&(s=!1),s&&r.push(o)}else void 0!==e[n]&&!0===Boolean(e[n])&&r.push(o)})),r}var fs=function(e){return"string"==typeof e||null==e?e:JSON.stringify(e)},ds=function(e){return"string"==typeof e&&e.trim().length>0},ps=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length>0){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&es.includes(t.toUpperCase())?t.toUpperCase():void Qr.error("Invalid residencyServer input")}(n),o=r[i]||r.US;if(o){var s=function(e){if(Array.isArray(e)&&e.length>0){var t=e.find((function(e){return!0===e.default}));if(t&&ds(t.url))return t.url}}(o);if(s)return s}}if(ds(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}};function gs(){var e;return(null===(e=document)||void 0===e?void 0:e.referrer)||"$direct"}function ys(e){var t=e.split("/");return t.length>=3?t[2]:""}function vs(){for(var e=document.getElementsByTagName("link"),t=0;e[t];t+=1){var n=e[t];if("canonical"===n.getAttribute("rel"))return n.getAttribute("href")}}function ms(){var e=vs(),t=window.location.pathname;if(e)try{t=new URL(e).pathname}catch(e){}var n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=vs(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=gs();return{path:t,referrer:u,referring_domain:ys(u),search:r,title:o,url:s,tab_url:a,initial_referrer:Lo.getInitialReferrer()||"",initial_referring_domain:Lo.getInitialReferringDomain()||""}}for(var Is,As=o((function e(){r(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.45.0"})),ks=o((function e(){r(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.45.0"})),bs=o((function e(){r(this,e),this.name="",this.version=""})),Es=o((function e(){r(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),Cs=o((function e(){var t,n;r(this,e),this.app=new As,this.traits=null,this.library=new ks,this.userAgent=function(){if("undefined"==typeof navigator)return null;var e=navigator.userAgent,t=navigator.brave;if(t&&Object.getPrototypeOf(t).isBrave){var n=e.match(/(chrome)\/([\w.]+)/i);n&&(e="".concat(e," Brave/").concat(n[2]))}return e}(),this.device=null,this.network=null,this.os=new bs,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(t=new Es,"undefined"==typeof window||(t.width=window.screen.width,t.height=window.screen.height,t.density=window.devicePixelRatio,t.innerWidth=window.innerWidth,t.innerHeight=window.innerHeight),t),this.timezone=(n=(new Date).toString().match(/([A-Z]+[+-]\d+)/))&&n[1]?n[1]:"NA"})),Ss=function(){function e(){r(this,e),this.channel="web",this.context=new Cs,this.type=null,this.messageId=ss(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={}}return o(e,[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}]),e}(),Os=function(){function e(){r(this,e),this.message=new Ss}return o(e,[{key:"setType",value:function(e){this.message.type=e}},{key:"setProperty",value:function(e){this.message.properties=e}},{key:"setUserProperty",value:function(e){this.message.user_properties=e}},{key:"setUserId",value:function(e){this.message.userId=e}},{key:"setEventName",value:function(e){this.message.event=e}},{key:"getElementContent",value:function(){return this.message}}]),e}(),Ts=function(){function e(){r(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}return o(e,[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new Os;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}]),e}(),ws={},_s=256,Rs=[];_s--;)Rs[_s]=(_s+256).toString(16).substring(1);ws.v4=function(){var e,t=0,n="";if(!Is||_s+16>256){for(Is=Array(t=256);t--;)Is[t]=256*Math.random()|0;t=_s=0}for(;t<16;t++)e=Is[_s+t],n+=6==t?Rs[15&e|64]:8==t?Rs[63&e|128]:Rs[e],1&t&&t>1&&t<11&&(n+="-");return _s++,n};var Ps={},Ds=Object.prototype.hasOwnProperty,xs=String.prototype.charAt,Ls=Object.prototype.toString,Ms=function(e,t){return xs.call(e,t)},Bs=function(e,t){return Ds.call(e,t)},Ns=function(e,t){t=t||Bs;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},Gs=function(e){return null==e?[]:(t=e,"[object String]"===Ls.call(t)?Ns(e,Ms):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?Ns(e,Bs):function(e,t){t=t||Bs;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},Fs=Gs,Us=ws.v4,js={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=Fs(this._data).length,t},getItem:function(e){return e in this._data?this._data[e]:null},removeItem:function(e){return e in this._data&&delete this._data[e],this.length=Fs(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return Fs(this._data)[e]}};Ps.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=Us();window.localStorage.setItem(e,"test_value");var t=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test_value"===t}catch(e){return!1}}()?window.localStorage:js,Ps.inMemoryEngine=js;var Ks=Gs,Qs=Object.prototype.toString,zs="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Qs.call(e)},Hs=function(e){return null!=e&&(zs(e)||"function"!==e&&function(e){var t=n(e);return"number"===t||"object"===t&&"[object Number]"===Qs.call(e)}(e.length))},qs=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},Vs=function(e,t){for(var n=Ks(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},Ws=function(e,t){return(Hs(t)?qs:Vs).call(this,e,t)},Ys=Ps.defaultEngine,Xs=Ps.inMemoryEngine,Js=Ws,$s=Gs,Zs=JSON;function ea(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||Ys,this.originalEngine=this.engine}ea.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,Zs.stringify(t))}catch(n){(function(e){var t=!1;if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t})(n)&&(this._swapEngine(),this.set(e,t))}},ea.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:Zs.parse(t)}catch(e){return null}},ea.prototype.getOriginalEngine=function(){return this.originalEngine},ea.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},ea.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return $s(this.keys).length?(Js((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},ea.prototype._swapEngine=function(){var e=this;Js((function(t){var n=e.get(t);Xs.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=Xs};var ta=ea;var na=Ws,ra={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},ia=ra,oa={ASAP:1,RESCHEDULE:2,ABANDON:3};function sa(){this.tasks={},this.nextId=1}sa.prototype.now=function(){return+new ia.Date},sa.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=ia.setTimeout(this._handle(r,e,t,n||oa.ASAP),t),r},sa.prototype.cancel=function(e){this.tasks[e]&&(ia.clearTimeout(this.tasks[e]),delete this.tasks[e])},sa.prototype.cancelAll=function(){na(ia.clearTimeout,this.tasks),this.tasks={}},sa.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=oa.RESCHEDULE&&o+2*n<i.now()))return t();r===oa.RESCHEDULE&&i.run(t,n,r)}},sa.setClock=function(e){ia=e},sa.resetClock=function(){ia=ra},sa.Modes=oa;var aa=sa,ua=ws.v4,ca=ta,la=Ws,ha=aa,fa=Bi("localstorage-retry");function da(e,t){return function(){return e.apply(t,arguments)}}function pa(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=ua(),this.fn=n,this.maxItems=t.maxItems||1/0,this.maxAttempts=t.maxAttempts||1/0,this.backoff={MIN_RETRY_DELAY:t.minRetryDelay||1e3,MAX_RETRY_DELAY:t.maxRetryDelay||3e4,FACTOR:t.backoffFactor||2,JITTER:t.backoffJitter||0},this.timeouts={ACK_TIMER:1e3,RECLAIM_TIMER:3e3,RECLAIM_TIMEOUT:1e4,RECLAIM_WAIT:500},this.keys={IN_PROGRESS:"inProgress",QUEUE:"queue",RECLAIM_START:"reclaimStart",RECLAIM_END:"reclaimEnd",ACK:"ack"},this._schedule=new ha,this._processId=0,this._store=new ca(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=da(this._ack,this),this._checkReclaim=da(this._checkReclaim,this),this._processHead=da(this._processHead,this),this._running=!1}g(pa.prototype),pa.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},pa.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},pa.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},pa.prototype.getDelay=function(e){var t=this.backoff.MIN_RETRY_DELAY*Math.pow(this.backoff.FACTOR,e);if(this.backoff.JITTER){var n=Math.random(),r=Math.floor(n*this.backoff.JITTER*t);Math.floor(10*n)<5?t-=r:t+=r}return Number(Math.min(t,this.backoff.MAX_RETRY_DELAY).toPrecision(1))},pa.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:ua()})},pa.prototype.requeue=function(e,t,n,r){this.shouldRetry(e,t,n)?this._enqueue({item:e,attemptNumber:t,time:this._schedule.now()+this.getDelay(t),id:r||ua()}):this.emit("discard",e,t)},pa.prototype._enqueue=function(e){var t=this._store.get(this.keys.QUEUE)||[];(t=t.slice(-(this.maxItems-1))).push(e),t=t.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,t),this._running&&this._processHead()},pa.prototype._processHead=function(){var e=this,t=this._store;this._schedule.cancel(this._processId);var n=t.get(this.keys.QUEUE)||[],r=t.get(this.keys.IN_PROGRESS)||{},i=this._schedule.now(),o=[];function s(n,r){o.push({item:n.item,done:function(i,o){var s=t.get(e.keys.IN_PROGRESS)||{};delete s[r],t.set(e.keys.IN_PROGRESS,s),e.emit("processed",i,o,n.item),i&&e.requeue(n.item,n.attemptNumber+1,i,n.id)}})}for(var a=Object.keys(r).length;n.length&&n[0].time<=i&&a++<e.maxItems;){var u=n.shift(),c=ua();r[c]={item:u.item,attemptNumber:u.attemptNumber,time:e._schedule.now()},s(u,c)}t.set(this.keys.QUEUE,n),t.set(this.keys.IN_PROGRESS,r),la((function(t){try{e.fn(t.item,t.done)}catch(e){fa("Process function threw error: "+e)}}),o),n=t.get(this.keys.QUEUE)||[],this._schedule.cancel(this._processId),n.length>0&&(this._processId=this._schedule.run(this._processHead,n[0].time-i,ha.Modes.ASAP))},pa.prototype._ack=function(){this._store.set(this.keys.ACK,this._schedule.now()),this._store.set(this.keys.RECLAIM_START,null),this._store.set(this.keys.RECLAIM_END,null),this._schedule.run(this._ack,this.timeouts.ACK_TIMER,ha.Modes.ASAP)},pa.prototype._checkReclaim=function(){var e=this;la((function(t){t.id!==e.id&&(e._schedule.now()-t.get(e.keys.ACK)<e.timeouts.RECLAIM_TIMEOUT||function(t){t.set(e.keys.RECLAIM_START,e.id),t.set(e.keys.ACK,e._schedule.now()),e._schedule.run((function(){t.get(e.keys.RECLAIM_START)===e.id&&(t.set(e.keys.RECLAIM_END,e.id),e._schedule.run((function(){t.get(e.keys.RECLAIM_END)===e.id&&t.get(e.keys.RECLAIM_START)===e.id&&e._reclaim(t.id)}),e.timeouts.RECLAIM_WAIT,ha.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,ha.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i);if(null!==o){var s=o.split(".");3===s.length&&s[0]===t&&"ack"===s[2]&&n.push(new ca(t,s[1],e.keys))}}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,ha.Modes.RESCHEDULE)},pa.prototype._reclaim=function(e){var t=this,n=new ca(this.name,e,this.keys),r={queue:this._store.get(this.keys.QUEUE)||[]},i={inProgress:n.get(this.keys.IN_PROGRESS)||{},queue:n.get(this.keys.QUEUE)||[]},o=[],s=function(e,n){la((function(e){var i=e.id||ua();o.indexOf(i)>=0?t.emit("duplication",e.item,e.attemptNumber):(r.queue.push({item:e.item,attemptNumber:e.attemptNumber+n,time:t._schedule.now(),id:i}),o.push(i))}),e)};s(i.queue,0),s(i.inProgress,1),r.queue=r.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,r.queue);try{this._clearOtherQueue(n,1)}catch(e){if("NS_ERROR_STORAGE_BUSY"===e.name||"NS_ERROR_STORAGE_BUSY"===e.code||2153971713===e.code)try{this._clearOtherQueue(n,40)}catch(e){console.error(e)}else console.error(e)}this._processHead()},pa.prototype._clearOtherQueue=function(e,t){var n=this;setTimeout((function(){e.remove(n.keys.IN_PROGRESS),setTimeout((function(){e.remove(n.keys.QUEUE),setTimeout((function(){e.remove(n.keys.RECLAIM_START),setTimeout((function(){e.remove(n.keys.RECLAIM_END),setTimeout((function(){e.remove(n.keys.ACK)}),t)}),t)}),t)}),t)}),t)};var ga=f(pa),ya={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},va=function(){function e(){r(this,e),this.url="",this.writeKey=""}return o(e,[{key:"init",value:function(e,t,n){var r=this;this.url=t,this.writeKey=e,n&&a(ya,n),this.payloadQueue=new ga("rudder",ya,(function(e,t){e.message.sentAt=as(),r.processQueueElement(e.url,e.headers,e.message,1e4,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){if(4===o.readyState)if(429===o.status||o.status>=500&&o.status<600){var t="".concat(Vr,' "').concat(o.status,'" status text: "').concat(o.statusText,'" for URL: "').concat(e,'"'),n=new Error(t);Zr(n),i(n)}else i(null,o.status)},o.send(Jr(n,!0))}catch(e){i(e)}}},{key:"enqueue",value:function(e,t){var n={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(this.writeKey,":"))),AnonymousId:btoa(e.anonymousId)};this.payloadQueue.addItem({url:"".concat(this.url,"/v1/").concat(t),headers:n,message:e})}}]),e}(),ma="queue",Ia=64e3,Aa=function(){function e(){r(this,e),this.storage=po,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(ma,".").concat(Date.now())}return o(e,[{key:"sendQueueDataForBeacon",value:function(){this.sendDataFromQueueAndDestroyQueue()}},{key:"init",value:function(e,t,n){this.url=t,this.writekey=e,n.maxItems&&(this.maxItems=n.maxItems),n.flushQueueInterval&&(this.flushQueueTimeOutInterval=n.flushQueueInterval),this.sendQueueDataForBeacon=this.sendQueueDataForBeacon.bind(this),this.attachListeners()}},{key:"attachListeners",value:function(){var e=this;window.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.sendQueueDataForBeacon()}))}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0);Jr({batch:n},!0).length>Ia&&(n=t.slice(0,t.length-1),this.flushQueue(n),(t=this.getQueue()).push(e)),this.setQueue(t),this.setTimer(),t.length===this.maxItems&&this.flushQueue(n)}},{key:"sendDataFromQueueAndDestroyQueue",value:function(){this.sendDataFromQueue(),this.storage.remove(this.queueName)}},{key:"sendDataFromQueue",value:function(){var e=this.getQueue();if(e&&e.length>0){var t=e.slice(0,e.length);this.flushQueue(t)}}},{key:"flushQueue",value:function(e){if(e&&e.length>0){e.forEach((function(e){e.sentAt=(new Date).toISOString()}));var t=Jr({batch:e},!0),n=new Blob([t],{type:"text/plain"}),r="".concat(this.url,"?writeKey=").concat(this.writekey);try{"function"!=typeof navigator.sendBeacon&&Zr(new Error("Beacon API is not supported by browser")),navigator.sendBeacon(r,n)||Zr(new Error("Unable to queue data to browser's beacon queue"))}catch(e){e.message="".concat(e.message," - While sending Beacon data to: ").concat(r),Zr(e)}}this.setQueue([]),this.clearTimer()}},{key:"setTimer",value:function(){this.timeOutActive||(this.flushQueueTimeOut=setTimeout(this.sendDataFromQueue.bind(this),this.flushQueueTimeOutInterval),this.timeOutActive=!0)}},{key:"clearTimer",value:function(){this.timeOutActive&&(clearTimeout(this.flushQueueTimeOut),this.timeOutActive=!1)}}]),e}(),ka=function(){function e(){r(this,e),this.queue=void 0}return o(e,[{key:"initialize",value:function(e,t,r){var i={},o=os(t);r&&r.useBeacon&&navigator.sendBeacon?(r.beaconQueueOptions&&null!=r.beaconQueueOptions&&"object"===n(r.beaconQueueOptions)&&(i=r.beaconQueueOptions),o="".concat(o,"/beacon/v1/batch"),this.queue=new Aa):(r&&r.useBeacon&&Qr.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),r&&r.queueOptions&&null!=r.queueOptions&&"object"===n(r.queueOptions)&&(i=r.queueOptions),this.queue=new va),this.queue.init(e,o,i)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||as(),n.sentAt=as(),Jr(n,!0).length>32e3&&Qr.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}]),e}(),ba=new ka,Ea={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:1/0},Ca=function(){function e(){r(this,e),this.callback=void 0,this.processQueueElements=!1}return o(e,[{key:"init",value:function(e,t){var n=this;e&&a(Ea,e),t&&(this.callback=t),this.payloadQueue=new ga("rs_events",Ea,(function(e,t){n.processQueueElement(e.type,e.rudderElement,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"activateProcessor",value:function(){this.processQueueElements=!0}},{key:"processQueueElement",value:function(e,t,n){try{this.processQueueElements?(Object.setPrototypeOf(t,Os.prototype),this.callback(e,t),n(null)):n(new Error("The queue elements are not ready to be processed yet"))}catch(e){n(e)}}},{key:"enqueue",value:function(e,t){this.payloadQueue.addItem({type:e,rudderElement:t})}}]),e}(),Sa=function(e){for(var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),n=-1,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return(-1^n)>>>0},Oa={getUserLanguage:function(){return navigator&&navigator.language},getUserAgent:function(){return navigator&&navigator.userAgent}};function Ta(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.endsWith("..")?e.substr(0,e.length-2):e,decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}var wa=/^[a-zA-Z0-9\-_.]+$/,_a=1,Ra=1,Pa="*";function Da(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(Pa)}(n,r),o=t||0,s=Math.floor(Date.now()/6e4)-o;return Sa([i,s,e].join(Pa)).toString(36)}function xa(e){var t=function(e){var t=e.split(Pa),n=t.length%2==0;return t.length<4||!n||Number(t.shift())!==Ra?null:{checksum:t.shift(),serializedIds:t.join(Pa)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=Oa.getUserAgent(),r=Oa.getUserLanguage(),i=0;i<=_a;i+=1)if(Da(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(Pa),r=0;r<n.length;r+=2){var i=n[r];if(wa.test(i)){var o=Ta(n[r+1]);t[i]=o}}return t}(r):null}var La=function(){function e(){var t=this;if(r(this,e),s(this,"isInitialized",!1),window.OneTrust&&window.OnetrustActiveGroups){this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var n=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],n.forEach((function(e){var n=e.CustomGroupId,r=e.GroupName;t.userSetConsentGroupIds.includes(n)?t.userSetConsentGroupNames.push(r.toUpperCase().trim()):t.userDeniedConsentGroupIds.push(n)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()})),this.isInitialized=!0}else Qr.error("OneTrust resources are not accessible.")}return o(e,[{key:"isEnabled",value:function(e){var t=this;try{if(!this.isInitialized)return!0;var n=e.oneTrustCookieCategories;if(!n)return!0;var r=n.map((function(e){return e.oneTrustCookieCategory})).filter((function(e){return e}));return r.every((function(e){return t.userSetConsentGroupIds.includes(e.toUpperCase().trim())||t.userSetConsentGroupNames.includes(e.toUpperCase().trim())}))}catch(e){return Qr.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.isInitialized?this.userDeniedConsentGroupIds:[]}}]),e}(),Ma=function(){function e(){var t=this;if(r(this,e),s(this,"updatePurposes",(function(e){e&&Object.entries(e).forEach((function(e){var n=e[0];e[1]?t.userConsentedPurposes.push(n):t.userDeniedPurposes.push(n)}))})),this.userConsentedPurposes=[],this.userDeniedPurposes=[],window.updateKetchConsent=function(e){e&&(t.userConsentedPurposes=[],t.userDeniedPurposes=[],t.updatePurposes(e))},window.getKetchUserConsentedPurposes=function(){return t.userConsentedPurposes.slice()},window.getKetchUserDeniedPurposes=function(){return t.userDeniedPurposes.slice()},window.ketchConsent)this.updatePurposes(window.ketchConsent);else{var n=this.getConsent();this.updatePurposes(n)}}return o(e,[{key:"isEnabled",value:function(e){var t=this;try{var n=e.ketchConsentPurposes;if(!n||0===n.length)return!0;var r=n.map((function(e){return e.purpose})).filter((function(e){return e}));return r.some((function(e){return t.userConsentedPurposes.includes(e.trim())}))}catch(e){return Qr.error("Error occured checking ketch consent state ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedPurposes}},{key:"getConsent",value:function(){var e=lo.get("_ketch_consent_v1_");if(e){var t;try{t=JSON.parse(atob(e))}catch(e){return void Qr.error("Error occurred while parsing consent cookie ".concat(e))}if(t){var n={};return Object.entries(t).forEach((function(e){var t=e[0],r=e[1];r&&r.status&&(n[t]="granted"===r.status)})),n}}}}]),e}(),Ba=function(e){var t,n;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new La:null!=e&&null!==(n=e.ketch)&&void 0!==n&&n.enabled?new Ma:null},Na=function(){function e(){r(this,e),this.storage=Lo,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}return o(e,[{key:"initialize",value:function(e){try{var t;if(this.sessionInfo.autoTrack=!(!1===(null==e||null===(t=e.sessions)||void 0===t?void 0:t.autoTrack)||this.sessionInfo.manualTrack),null!=e&&e.sessions&&!isNaN(e.sessions.timeout)){var n=e.sessions.timeout;0===n&&(Qr.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&Qr.warn('[Session]:: It is not advised to set "timeout" less than 10 seconds'),this.timeout=n}this.sessionInfo.autoTrack?this.startAutoTracking():!1!==this.sessionInfo.autoTrack||this.sessionInfo.manualTrack||this.end()}catch(e){Zr(e)}}},{key:"isValidSession",value:function(e){return e<=this.sessionInfo.expiresAt}},{key:"generateSessionId",value:function(){return Date.now()}},{key:"startAutoTracking",value:function(){var e=Date.now();this.isValidSession(e)||(this.sessionInfo={},this.sessionInfo.id=e,this.sessionInfo.expiresAt=e+this.timeout,this.sessionInfo.sessionStart=!0,this.sessionInfo.autoTrack=!0),this.storage.setSessionInfo(this.sessionInfo)}},{key:"validateSessionId",value:function(e){if("number"==typeof e&&e%1==0){var t;if(!(((t=e)?t.toString().length:0)<10))return e;Qr.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else Qr.error('[Session]:: "sessionId" should only be a positive integer')}},{key:"start",value:function(e){var t=e?this.validateSessionId(e):this.generateSessionId();this.sessionInfo={id:t||this.generateSessionId(),sessionStart:!0,manualTrack:!0},this.storage.setSessionInfo(this.sessionInfo)}},{key:"getSessionId",value:function(){return this.sessionInfo.autoTrack&&this.isValidSession(Date.now())||this.sessionInfo.manualTrack?this.sessionInfo.id:null}},{key:"end",value:function(){this.sessionInfo={},this.storage.removeSessionInfo()}},{key:"getSessionInfo",value:function(){var e={};if(this.sessionInfo.autoTrack||this.sessionInfo.manualTrack){if(this.sessionInfo.autoTrack){var t=Date.now();this.isValidSession(t)?this.sessionInfo.expiresAt=t+this.timeout:this.startAutoTracking()}this.sessionInfo.sessionStart&&(e.sessionStart=!0,this.sessionInfo.sessionStart=!1),e.sessionId=this.sessionInfo.id,this.storage.setSessionInfo(this.sessionInfo)}return e}},{key:"reset",value:function(){var e=this.sessionInfo,t=e.manualTrack;e.autoTrack?(this.sessionInfo={},this.startAutoTracking()):t&&this.start()}}]),e}(),Ga=new Na,Fa=["integrations","anonymousId","originalTimestamp"],Ua=function(e,t,n){var r="";if(n){if(!(r=os(n))){var i="CDN base URL for integrations is not valid";throw Zr({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=function(){for(var e,t=document.getElementsByTagName("script"),n=0;n<t.length;n+=1){var r=os(t[n].getAttribute("src"));if(r&&r.match(/^.*rudder-analytics?(\.min)?\.js$/)){e=r;break}}return{sdkURL:e}}(),s=o.sdkURL;return r=s?s.split("/").slice(0,-1).concat(Jo).join("/"):$o,t&&(r=r.replace(Xo,e)),r},ja="rs-bugsnag",Ka="bugsnag",Qa=["Bugsnag",Ka],za="0d96a60df267f4a13f808bbaa54e535c",Ha=["rudder-analytics.min.js","rudder-analytics.js"].concat(u(Object.keys(P).map((function(e){return"".concat(P[e],".min.js")}))),u(Object.keys(P).map((function(e){return"".concat(P[e],".js")})))),qa=function(e){var t=e&&e._client&&e._client._notifier&&e._client._notifier.version;if(!t){var n=e({apiKey:za,releaseStage:"version-test",beforeSend:function(){return!1}});t=n.notifier&&n.notifier.version,n=void 0}return t&&"6"===t.charAt(0)},Va=function(e){Qa.every((function(e){return!function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}(window,e)}))&&Mo(e,"https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js",{isNonNativeSDK:"true",skipDatasetAttributes:!0})},Wa=function(){function e(t,n){r(this,e),this.pluginName=ja,this.sourceId=t,this.onClientReady=n,this.initClientOnLibReadyInterval=void 0,this.init()}return o(e,[{key:"init",value:function(){var e=this;if(!window.RudderStackGlobals||!window.RudderStackGlobals[Yr]){if(!za.match(/{{.+}}/)){Va(this.pluginName);var t=window[Ka];"function"!=typeof t?(this.initClientOnLibReadyInterval=setInterval((function(){var t=window[Ka];"function"==typeof t&&(qa(t)&&e.initClient(),clearInterval(e.initClientOnLibReadyInterval))}),100),setTimeout((function(){clearInterval(e.initClientOnLibReadyInterval)}),zr)):qa(t)&&this.initClient()}}}},{key:"initClient",value:function(){var e,t=window[Ka];this.client=t({apiKey:za,appVersion:"2.45.0",metaData:{SDK:{name:"JS",installType:"npm"}},beforeSend:this.onError(),autoTrackSessions:!1,collectUserIp:!1,enabledBreadcrumbTypes:["error","log","user"],maxEvents:100,releaseStage:(e=window.location.hostname,e&&["www.test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production"),networkBreadcrumbsEnabled:!1}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=Di(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return Ha.includes(n)}(t)&&(function(e,t){e.updateMetaData("source",{metadataSource:t});var n=e.errorMessage;e.context=n,n.includes("error in script loading")&&(e.context="Script load failures"),e.severity="error"}(t,e),!0)}catch(e){return!1}}}},{key:"notify",value:function(e){this.client&&this.client.notify(e)}},{key:"leaveBreadcrumb",value:function(e){this.client&&this.client.leaveBreadcrumb(e)}}]),e}(),Ya=ja,Xa=[ja],Ja=function(){function e(t){r(this,e),this.isEnabled=!1,this.providerName=Ya,this.provider=void 0,this.logger=t,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}return o(e,[{key:"init",value:function(e,t){e&&t?!0===function(e){return Di(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return Di(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t)):this.disable():this.logger.error("[Analytics] ErrorReporting :: Invalid configuration or missing source id provided.")}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"setProviderName",value:function(e){e?!e||Xa.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(Xa.join(","))):this.providerName=Ya}},{key:"initProvider",value:function(e,t){if(this.providerName===ja)this.provider=new Wa(t,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.RudderStackGlobals||(window.RudderStackGlobals={}),window.RudderStackGlobals[Yr]=this}},{key:"leaveBreadcrumb",value:function(e){if(this.provider)try{this.provider.leaveBreadcrumb(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: leaveBreadcrumb method ".concat(e.toString()))}}},{key:"notify",value:function(e){if(this.provider)try{this.provider.notify(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: notify method ".concat(e.toString()))}}}]),e}(),$a=new(function(){function e(){r(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}return o(e,[{key:"init",value:function(e,t,n){this.dataPlaneUrl=os(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t,n){this.queue.push({event:e,destinationIds:t,cb:n})}},{key:"sendEventForTransformation",value:function(e,t){var n=this;return new Promise((function(r,i){var o="".concat(n.dataPlaneUrl,"/transform"),s={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(n.writeKey,":")))};try{var a=new XMLHttpRequest;a.open("POST",o,!0),Object.keys(s).forEach((function(e){return a.setRequestHeader(e,s[e])})),a.timeout=1e4,a.onreadystatechange=function(){if(4===a.readyState)try{var o=a.status,s=a.response;switch(o){case 200:return s=JSON.parse(s),void r({status:o,transformedPayload:s.transformedBatch});case 400:var u=s?"".concat(s):"Invalid request payload";return void r({status:o,errorMessage:u});case 404:return void r({status:o});default:if(t>0){var c=t-1;setTimeout((function(){return n.sendEventForTransformation(e,c).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-c))}else r({status:o,errorMessage:"Retries exhausted"})}}catch(e){i(e)}},a.send(Jr(e,!0))}catch(e){i(e)}}))}},{key:"checkQueueLengthAndProcess",value:function(){this.queue.length>0&&this.process()}},{key:"process",value:function(){var e=this;this.isTransformationProcessing=!0;var t,n,r=this.queue.shift(),i=(t=r.event,n=r.destinationIds,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),destinationIds:n,event:t.message}]});this.sendEventForTransformation(i,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,r.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){Zr("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,r.cb({status:0}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}]),e}()),Za=function(){function e(){r(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=Lo,this.eventRepository=ba,this.preProcessQueue=new Ca,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.bufferDataPlaneEventsUntilReady=!1,this.dataPlaneEventsBufferTimeout=1e4,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=$o,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=Ga,this.version="2.45.0",this.lockIntegrationsVersion=!1,this.errorReporting=new Ja(Qr),this.deniedConsentIds=[],this.transformationHandler=$a}return o(e,[{key:"initializeUser",value:function(e){this.userId=this.storage.getUserId()||"",this.storage.setUserId(this.userId),this.userTraits=this.storage.getUserTraits()||{},this.storage.setUserTraits(this.userTraits),this.groupId=this.storage.getGroupId()||"",this.storage.setGroupId(this.groupId),this.groupTraits=this.storage.getGroupTraits()||{},this.storage.setGroupTraits(this.groupTraits),this.anonymousId=this.getAnonymousId(e),this.storage.setAnonymousId(this.anonymousId)}},{key:"setInitialPageProperties",value:function(){if(null==this.storage.getInitialReferrer()&&null==this.storage.getInitialReferringDomain()){var e=gs();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(ys(e))}}},{key:"allModulesInitialized",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(n){e.clientIntegrations.every((function(t){return null!=e.dynamicallyLoadedIntegrations["".concat(P[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(Hr).then((function(){return e.allModulesInitialized(t+Hr).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){return window[e]&&window[e][t]&&window[e][t].prototype&&void 0!==window[e][t].prototype.constructor}},{key:"processResponse",value:function(e,t){var r=this;try{var i=t;try{if("string"==typeof t&&(i=JSON.parse(t)),!i||"object"!==n(i)||Array.isArray(i))return void Qr.error("Invalid source configuration")}catch(e){return void Zr(e)}try{this.errorReporting.init(i.source.config,i.source.id)}catch(e){Zr(e)}if(this.serverUrl=ps(i,this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),i.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config,destinationInfo:{shouldApplyDeviceModeTransformation:e.shouldApplyDeviceModeTransformation||!1,propagateEventsUntransformedOnError:e.propagateEventsUntransformedOnError||!1,destinationId:e.id}})}),this),this.clientIntegrations=hs(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var o=Ba(this.cookieConsentOptions);this.deniedConsentIds=o&&o.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!o||o&&o.isEnabled(e.config)}))}catch(e){Zr(e)}this.loaded=!0,this.options&&"function"==typeof this.options.onLoaded&&this.options.onLoaded(this),function(e){if(e.toBeProcessedArray.length>0)for(;e.toBeProcessedArray.length>0;){var t=u(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,u(t))}}(this),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!!P[e.name]||(Qr.error("[Analytics] Integration:: ".concat(e.name," not available for initialization")),!1)})),this.bufferDataPlaneEventsUntilReady&&setTimeout((function(){r.processBufferedCloudModeEvents()}),this.dataPlaneEventsBufferTimeout),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=P[e.name],n="".concat(t).concat("_RS"),i="".concat(r.destSDKBaseURL,"/").concat(t,".min.js");window.hasOwnProperty(n)||Mo(n,i,{isNonNativeSDK:!0});var o=r,s=setInterval((function(){if(o.integrationSDKLoaded(n,t)){var i,a=window[n];clearInterval(s);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(n);r.errorReporting.leaveBreadcrumb(u),(i=new a[t](e.config,o,e.destinationInfo)).init(),o.isInitialized(i).then((function(){o.dynamicallyLoadedIntegrations[n]=a[t]}))}catch(e){var c="[Analytics] 'integration.init()' failed :: ".concat(n," :: ").concat(e.message);Zr(e,c),o.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(s)}),zr)}));var s=this;this.allModulesInitialized().then((function(){if(!s.clientIntegrations||0===s.clientIntegrations.length)return r.clientIntegrationsReady=!0,r.executeReadyCallback(),void(r.toBeProcessedByIntegrationArray=[]);s.replayEvents(s)}))}catch(e){Zr(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=T(t);e[n](r)}}catch(t){var i="[sendToNative]:: [Destination: ".concat(e.name,"]:: ");Zr(t,i)}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{ls(t.message.integrations);var i=e.map((function(e){return e.destinationId}));this.transformationHandler.enqueue(t,i,(function(i){var o=i.status,s=i.transformedPayload,a=i.errorMessage;e.forEach((function(e){try{switch(o){case 200:var i=s.find((function(t){return t.id===e.destinationId})),u=[];null==i||i.payload.forEach((function(n){if("200"===n.status)u.push(n);else{var r='[DMT]:: Event transformation unsuccessful for destination "'.concat(e.name,'". Reason: '),i="Unknown";"410"===n.status&&(i="Transformation is not available");var o="Dropping the event",s=Qr.error;!0===e.propagateEventsUntransformedOnError&&(o="Sending untransformed event to the destination",s=Qr.warn,u.push({event:t.message})),s("".concat(r," ").concat(i,". ").concat(o,"."))}})),null==u||u.forEach((function(t){Fo(t.event)&&r.sendDataToDestination(e,{message:t.event},n)}));break;case 404:Qr.warn("[DMT]:: Transformation server access is denied. The configuration data seems to be out of sync. Sending untransformed event to the destination."),r.sendDataToDestination(e,t,n);break;default:!0===e.propagateEventsUntransformedOnError?(Qr.warn("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Sending untransformed event.")),r.sendDataToDestination(e,t,n)):Qr.error("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Dropping the event."))}}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),Zr(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),Zr(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],o=[];e.forEach((function(e){!r.IsEventBlackListed(t.message.event,e.name)&&(e.shouldApplyDeviceModeTransformation?o.push(e):i.push(e))})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"queueEventForDataPlane",value:function(e,t){var n=t.message.integrations||{All:!0};t.message.integrations=function(e,t){var n=T(e),r=Object.keys(t).filter((function(e){return!(!0===t[e]&&n[e])})).reduce((function(e,n){return e[n]=t[n],e}),{});return Go(n,r)}(this.integrationsData,n),this.eventRepository.enqueue(t,e)}},{key:"processBufferedCloudModeEvents",value:function(){this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.activateProcessor()}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration,e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=T(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=Go(r,e.getDataForIntegrationsObject())}catch(e){Qr.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback()),this.processBufferedCloudModeEvents(),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&cs(t[0].message.integrations);var r=hs(t[0].message.integrations,e.clientIntegrationObjects);i.processAndSendEventsToDeviceMode(r,t[0],n)})),e.toBeProcessedByIntegrationArray=[]}},{key:"pause",value:function(e){return new Promise((function(t){setTimeout(t,e)}))}},{key:"isInitialized",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(r){e.isLoaded()?(t.successfullyLoadedIntegration.push(e),r(t)):n>=zr?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(Hr).then((function(){return t.isInitialized(e,n+Hr).then(r)}))}))}},{key:"page",value:function(e,t,r,i,o){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof i&&(o=i,i=null),"function"==typeof r&&(o=r,i=r=null),"function"==typeof t&&(o=t,i=r=t=null),"function"==typeof e&&(o=e,i=r=t=e=null),"object"===n(e)&&null!=e&&null!=e&&(i=t,r=e,t=e=null),"object"===n(t)&&null!=t&&null!=t&&(i=r,r=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!=e&&this.sendSampleRequest();var s=T(r),a=T(i),u=(new Ts).setType("page").build();s||(s={}),t&&(u.message.name=s.name=t),e&&(u.message.category=s.category=e),u.message.properties=this.getPageProperties(s),this.processAndSendDataToDestinations("page",u,a,o)}else this.toBeProcessedArray.push(["page"].concat(Array.prototype.slice.call(arguments)))}},{key:"track",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Track event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null);var i=T(t),o=T(n),s=(new Ts).setType("track").build();e&&s.setEventName(e),s.setProperty(i||{}),this.processAndSendDataToDestinations("track",s,o,r)}else this.toBeProcessedArray.push(["track"].concat(Array.prototype.slice.call(arguments)))}},{key:"identify",value:function(e,t,r,i){if(this.errorReporting.leaveBreadcrumb("Identify event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(e)&&(r=t,t=e,e=this.userId);var o=fs(e);o&&this.userId&&o!==this.userId&&this.reset(),this.userId=o,this.storage.setUserId(this.userId);var s=T(t),a=T(r);if(s){for(var u in s)this.userTraits[u]=s[u];this.storage.setUserTraits(this.userTraits)}var c=(new Ts).setType("identify").build();this.processAndSendDataToDestinations("identify",c,a,i)}else this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)))}},{key:"alias",value:function(e,t,r,i){if(this.errorReporting.leaveBreadcrumb("Alias event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"function"==typeof e&&(i=e,r=null,t=null,e=null),"object"===n(t)&&(r=t,t=null),"object"===n(e)&&(r=e,t=null,e=null);var o=(new Ts).setType("alias").build();o.message.previousId=fs(t)||(this.userId?this.userId:this.getAnonymousId()),o.message.userId=fs(e);var s=T(r);this.processAndSendDataToDestinations("alias",o,s,i)}else this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)))}},{key:"group",value:function(e,t,r,i){if(this.errorReporting.leaveBreadcrumb("Group event"),this.loaded){if(0!==arguments.length){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(e)&&(r=t,t=e,e=this.groupId),"function"==typeof e&&(i=e,r=null,t=null,e=this.groupId),this.groupId=fs(e),this.storage.setGroupId(this.groupId);var o=T(t),s=T(r),a=(new Ts).setType("group").build();if(o)for(var u in o)this.groupTraits[u]=o[u];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",a,s,i)}}else this.toBeProcessedArray.push(["group"].concat(Array.prototype.slice.call(arguments)))}},{key:"IsEventBlackListed",value:function(e,t){if(!e||"string"!=typeof e)return!1;var n=jr[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&i.some((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||!o.some((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"shouldUseGlobalIntegrationsConfigInEvents",value:function(){return this.useGlobalIntegrationsConfigInEvents&&this.loadOnlyIntegrations&&Object.keys(this.loadOnlyIntegrations).length>0}},{key:"processAndSendDataToDestinations",value:function(e,n,r,i){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),n.message.context.traits=t({},this.userTraits),n.message.anonymousId=this.anonymousId,n.message.userId=n.message.userId?n.message.userId:this.userId,"group"==e&&(this.groupId&&(n.message.groupId=this.groupId),this.groupTraits&&(n.message.traits=t({},this.groupTraits)));try{var o=this.uSession.getSessionInfo(),s=o.sessionId,a=o.sessionStart;n.message.context.sessionId=s,a&&(n.message.context.sessionStart=!0)}catch(e){Zr(e)}h=this.cookieConsentOptions,f=!1,Object.keys(h).forEach((function(e){ts.includes(e)&&"boolean"==typeof h[e].enabled&&!0===h[e].enabled&&(f=!0)})),f&&(n.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds||[]}),this.processOptionsParam(n,r),function(e,t){var n=e.properties,r=e.traits,i=e.context;n&&Object.keys(n).forEach((function(e){Wo.indexOf(e.toLowerCase())>=0&&Qr.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){Wo.indexOf(e.toLowerCase())>=0&&Qr.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var o=i.traits;o&&Object.keys(o).forEach((function(e){Wo.indexOf(e.toLowerCase())>=0&&Qr.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(n.message,e);var u=n.message.integrations;u?cs(u):u=this.shouldUseGlobalIntegrationsConfigInEvents()?this.loadOnlyIntegrations:is,n.message.integrations=u;try{n.message.context["ua-ch"]=this.uach}catch(e){Zr(e)}if(this.clientIntegrationObjects){var c=hs(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,n,e)}else this.toBeProcessedByIntegrationArray.push([e,n]);var l=T(n);ls(l.message.integrations),!this.bufferDataPlaneEventsUntilReady||this.clientIntegrationObjects?this.queueEventForDataPlane(e,l):this.preProcessQueue.enqueue(e,l),i&&"function"==typeof i&&i(l)}catch(e){Zr(e)}var h,f}},{key:"utm",value:function(e){var t={};try{var n=new URL(e),r="utm_";n.searchParams.forEach((function(e,n){if(n.startsWith(r)){var i=n.substring(4);"campaign"===i&&(i="name"),t[i]=e}}))}catch(e){}return t}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;t&&"object"===n(t)&&(e.message.context.campaign=this.utm(window.location.href))}},{key:"processOptionsParam",value:function(e,r){var i=e.message,o=i.type,a=i.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===o?a:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===n(t)&&null!==t&&Object.keys(t).forEach((function(n){Fa.includes(n)&&(e[n]=t[n])}))}(e.message,r),e.message.context=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.context;return"object"!==n(r)||null===r||Object.keys(r).forEach((function(e){if(!Fa.includes(e)&&!ns.includes(e))if("context"!==e)i=Go(i,s({},e,r[e]));else if("object"===n(r[e])&&null!==r[e]){var o={};Object.keys(r[e]).forEach((function(t){ns.includes(t)||(o[t]=r[e][t])})),i=Go(i,t({},o))}else Qr.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),i}(e.message,r)}},{key:"getPageProperties",value:function(e,t){var n=ms(),r=t&&t.page||{};for(var i in n)void 0===e[i]&&(e[i]=r[i]||n[i]);return e}},{key:"getContextPageProperties",value:function(e){var t=ms(),n={};for(var r in t)n[r]=e&&e[r]?e[r]:t[r];return n}},{key:"reset",value:function(e){this.errorReporting.leaveBreadcrumb("reset API :: flag: ".concat(e)),this.loaded?(e&&(this.anonymousId=""),this.userId="",this.userTraits={},this.groupId="",this.groupTraits={},this.uSession.reset(),this.storage.clear(e)):this.toBeProcessedArray.push(["reset",e])}},{key:"getAnonymousId",value:function(e){return this.anonymousId=this.storage.getAnonymousId(e),this.anonymousId||this.setAnonymousId(),this.anonymousId}},{key:"getUserId",value:function(){return this.userId}},{key:"getSessionId",value:function(){return this.uSession.getSessionId()}},{key:"getUserTraits",value:function(){return this.userTraits}},{key:"getGroupId",value:function(){return this.groupId}},{key:"getGroupTraits",value:function(){return this.groupTraits}},{key:"setAnonymousId",value:function(e,t){var n=t?xa(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||ss(),this.storage.setAnonymousId(this.anonymousId)}},{key:"isValidWriteKey",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isValidServerUrl",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isDatasetAvailable",value:function(){var e=document.createElement("div");return e.setAttribute("data-a-b","c"),!!e.dataset&&"c"===e.dataset.aB}},{key:"loadAfterPolyfill",value:function(e,r,i){var o=this;if("object"===n(r)&&null!==r&&(i=r,r=null),i&&i.logLevel&&(this.logLevel=i.logLevel,Qr.setLogLevel(i.logLevel)),!this.isValidWriteKey(e))throw Error("Unable to load the SDK due to invalid writeKey");if(!this.storage||0===Object.keys(this.storage).length)throw Error("Cannot proceed as no storage is available");i&&i.cookieConsentManager&&(this.cookieConsentOptions=i.cookieConsentManager),this.writeKey=e,this.serverUrl=r,this.options=i;var s={};if(i&&i.setCookieDomain&&(s=t(t({},s),{},{domain:i.setCookieDomain})),i&&"boolean"==typeof i.secureCookie&&(s=t(t({},s),{},{secure:i.secureCookie})),i&&"boolean"==typeof i.sameDomainCookiesOnly&&(s=t(t({},s),{},{sameDomainCookiesOnly:i.sameDomainCookiesOnly})),i&&-1!==Zo.indexOf(i.sameSiteCookie)&&(s=t(t({},s),{},{samesite:i.sameSiteCookie})),this.storage.options(s),i&&"string"==typeof i.uaChTrackLevel&&rs.includes(i.uaChTrackLevel)&&(this.uaChTrackLevel=i.uaChTrackLevel),navigator.userAgentData&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";"none"===t&&e(void 0),"default"===t&&e(navigator.userAgentData),"full"===t&&navigator.userAgentData.getHighEntropyValues(["architecture","bitness","brands","mobile","model","platform","platformVersion","uaFullVersion","fullVersionList","wow64"]).then((function(t){e(t)}))}((function(e){o.uach=e}),this.uaChTrackLevel),i&&i.integrations&&(a(this.loadOnlyIntegrations,i.integrations),cs(this.loadOnlyIntegrations)),this.useGlobalIntegrationsConfigInEvents=i&&!0===i.useGlobalIntegrationsConfigInEvents,i&&i.sendAdblockPage&&(this.sendAdblockPage=!0),i&&i.sendAdblockPageOptions&&"object"===n(i.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=i.sendAdblockPageOptions),this.uSession.initialize(i),i&&i.clientSuppliedCallbacks){var u={};Object.keys(this.methodToCallbackMapping).forEach((function(e){o.methodToCallbackMapping.hasOwnProperty(e)&&i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]]&&(u[e]=i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]])})),a(this.clientSuppliedCallbacks,u),this.registerCallbacks(!0)}if(i&&null!=i.loadIntegration&&(this.loadIntegration=!!i.loadIntegration),i&&"boolean"==typeof i.bufferDataPlaneEventsUntilReady&&(this.bufferDataPlaneEventsUntilReady=!0===i.bufferDataPlaneEventsUntilReady,this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.init(this.options,this.queueEventForDataPlane.bind(this))),i&&"number"==typeof i.dataPlaneEventsBufferTimeout&&(this.dataPlaneEventsBufferTimeout=i.dataPlaneEventsBufferTimeout),i&&void 0!==i.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===i.lockIntegrationsVersion),this.initializeUser(i?i.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.destSDKBaseURL=Ua(this.version,this.lockIntegrationsVersion,i&&i.destSDKBaseURL),i&&i.getSourceConfig)if("function"!=typeof i.getSourceConfig)Zr(new Error('option "getSourceConfig" must be a function'));else{var c=i.getSourceConfig();c instanceof Promise?c.then((function(e){return o.processResponse(200,e)})).catch(Zr):this.processResponse(200,c)}else{var l=function(e){return Yo.concat(Yo.includes("?")?"&":"?").concat(e?"writeKey=".concat(e):"")}(e);i&&i.configUrl&&(l=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(os(n),"/sourceConfig/")),n="/"===n.slice(-1)?n:"".concat(n,"/");var r=t.split("?")[1],i=n.split("?");return i.length>1&&i[1]!==r?"".concat(i[0],"?").concat(r):"".concat(n,"?").concat(r)}(i.configUrl,l));try{!function(e,t,n,r){var i=r.bind(e),o=new XMLHttpRequest;o.open("GET",t,!0),o.setRequestHeader("Authorization","Basic ".concat(btoa("".concat(n,":")))),o.onload=function(){var e=o.status,n=o.responseText;200===e?i(200,n):(Zr(new Error("".concat(Vr," ").concat(e," for url: ").concat(t))),i(e))},o.send()}(this,l,e,this.processResponse)}catch(e){Zr(e)}}}},{key:"arePolyfillsRequired",value:function(e){return(!e||"boolean"!=typeof e.polyfillIfRequired||e.polyfillIfRequired)&&(!String.prototype.endsWith||!String.prototype.startsWith||!String.prototype.includes||!Array.prototype.find||!Array.prototype.includes||"function"!=typeof window.URL||"undefined"==typeof Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable()||"function"!=typeof TextDecoder||"function"!=typeof Uint8Array)}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=T(n);if(this.arePolyfillsRequired(r)){var i="polyfill";Mo(i,"https://polyfill.io/v3/polyfill.min.js?features=Number.isNaN%2CURL%2CArray.prototype.find%2CArray.prototype.includes%2CPromise%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CObject.entries%2CObject.values%2CElement.prototype.dataset%2CString.prototype.replaceAll%2CTextDecoder%2Cnavigator.sendBeacon",{skipDatasetAttributes:!0});var o=this,s=setInterval((function(){!window.hasOwnProperty(i)&&null===document.getElementById(i)||"undefined"==typeof Promise||(clearInterval(s),o.loadAfterPolyfill(e,t,r))}),100);setTimeout((function(){clearInterval(s)}),zr)}else this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?Qr.error("ready callback is not a function"):this.clientIntegrationsReady?e():this.readyCallbacks.push(e):this.toBeProcessedArray.push(["ready",e])}},{key:"initializeCallbacks",value:function(){var e=this;Object.keys(this.methodToCallbackMapping).forEach((function(t){e.methodToCallbackMapping.hasOwnProperty(t)&&e.on(t,(function(){}))}))}},{key:"registerCallbacks",value:function(e){var t=this;e||Object.keys(this.methodToCallbackMapping).forEach((function(e){t.methodToCallbackMapping.hasOwnProperty(e)&&window.rudderanalytics&&"function"==typeof window.rudderanalytics[t.methodToCallbackMapping[e]]&&(t.clientSuppliedCallbacks[e]=window.rudderanalytics[t.methodToCallbackMapping[e]])})),Object.keys(this.clientSuppliedCallbacks).forEach((function(e){t.clientSuppliedCallbacks.hasOwnProperty(e)&&t.on(e,t.clientSuppliedCallbacks[e])}))}},{key:"sendSampleRequest",value:function(){Mo("ad-block","//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",{isNonNativeSDK:!0})}},{key:"startSession",value:function(e){this.uSession.start(e)}},{key:"endSession",value:function(){this.uSession.end()}},{key:"setAuthToken",value:function(e){"string"==typeof e?(this.storage.setAuthToken(e),this.transformationHandler.setAuthToken(e)):Qr.error("Provided input should be in string format")}}]),e}(),eu=new Za;y(eu),window.addEventListener("error",(function(e){Zr(e,void 0,eu)}),!0),eu.initializeCallbacks(),eu.registerCallbacks(!1);var tu,nu="load",ru=window.rudderanalytics,iu=Array.isArray(ru);if(iu)for(var ou=0;ou<ru.length;){if(ru[ou]&&ru[ou][0]===nu){tu=ru[ou],ru.splice(ou,1);break}ou+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=function(e){var t={};try{new URL(e).searchParams.forEach((function(e,n){t[n]=e}))}catch(e){}return t}(e);i.ajs_aid&&eu.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&eu.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&eu.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.href),iu&&ru.forEach((function(e){return eu.toBeProcessedArray.push(e)})),tu&&tu.length>0&&(tu.shift(),eu[nu].apply(eu,u(tu)));var su=eu.ready.bind(eu),au=eu.identify.bind(eu),uu=eu.page.bind(eu),cu=eu.track.bind(eu),lu=eu.alias.bind(eu),hu=eu.group.bind(eu),fu=eu.reset.bind(eu),du=eu.load.bind(eu),pu=eu.initialized=!0,gu=eu.getUserId.bind(eu),yu=eu.getSessionId.bind(eu),vu=eu.getUserTraits.bind(eu),mu=eu.getAnonymousId.bind(eu),Iu=eu.setAnonymousId.bind(eu),Au=eu.getGroupId.bind(eu),ku=eu.getGroupTraits.bind(eu),bu=eu.startSession.bind(eu),Eu=eu.endSession.bind(eu),Cu=eu.setAuthToken.bind(eu);exports.alias=lu,exports.endSession=Eu,exports.getAnonymousId=mu,exports.getGroupId=Au,exports.getGroupTraits=ku,exports.getSessionId=yu,exports.getUserId=gu,exports.getUserTraits=vu,exports.group=hu,exports.identify=au,exports.initialized=pu,exports.load=du,exports.page=uu,exports.ready=su,exports.reset=fu,exports.setAnonymousId=Iu,exports.setAuthToken=Cu,exports.startSession=bu,exports.track=cu;
|
1
|
+
"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}var p={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}p.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}();var g=p.exports,v=f(g);function y(e){return null!=e&&"object"===n(e)&&!0===e["@@functional/placeholder"]}function m(e){return function t(n){return 0===arguments.length||y(n)?t:e.apply(this,arguments)}}function I(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return y(n)?t:m((function(t){return e(n,t)}));default:return y(n)&&y(r)?t:y(n)?m((function(t){return e(t,r)})):y(r)?m((function(t){return e(n,t)})):e(n,r)}}}function A(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return y(n)?t:I((function(t,r){return e(n,t,r)}));case 2:return y(n)&&y(r)?t:y(n)?I((function(t,n){return e(t,r,n)})):y(r)?I((function(t,r){return e(n,t,r)})):m((function(t){return e(n,r,t)}));default:return y(n)&&y(r)&&y(i)?t:y(n)&&y(r)?I((function(t,n){return e(t,n,i)})):y(n)&&y(i)?I((function(t,n){return e(t,r,n)})):y(r)&&y(i)?I((function(t,r){return e(n,t,r)})):y(n)?m((function(t){return e(t,r,i)})):y(r)?m((function(t){return e(n,t,i)})):y(i)?m((function(t){return e(n,r,t)})):e(n,r,i)}}}function k(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var b=m((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e,t,r){if(r||(r=new S),function(e){var t=n(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var i,o=function(n){var i=r.get(e);if(i)return i;for(var o in r.set(e,n),e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=t?C(e[o],!0,r):e[o]);return n};switch(b(e)){case"Object":return o(Object.create(Object.getPrototypeOf(e)));case"Array":return o([]);case"Date":return new Date(e.valueOf());case"RegExp":return i=e,new RegExp(i.source,i.flags?i.flags:(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.sticky?"y":"")+(i.unicode?"u":"")+(i.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var S=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1){var i=n[r];if(i[0]===e)return i[1]}else{var o=this.hash(e),s=this.map[o];if(s)for(var a=0;a<s.length;a+=1){var u=s[a];if(u[0]===e)return u[1]}}},e}(),O=m((function(e){return null!=e&&"function"==typeof e.clone?e.clone():C(e,!0)})),T=A((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})k(r,t)&&(i[r]=k(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)k(r,n)&&!k(r,i)&&(i[r]=n[r]);return i})),w=A((function e(t,n,r){return T((function(n,r,i){return E(r)&&E(i)?e(t,r,i):t(n,r,i)}),n,r)})),_=A((function(e,t,n){return w((function(t,n,r){return e(n,r)}),t,n)})),R={HS:"HubSpot",GA:"GA",HOTJAR:"Hotjar",GOOGLEADS:"GoogleAds",VWO:"VWO",GTM:"GoogleTagManager",BRAZE:"Braze",INTERCOM:"INTERCOM",KEEN:"Keen",KISSMETRICS:"Kissmetrics",CUSTOMERIO:"CustomerIO",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",FACEBOOK_PIXEL:"FacebookPixel",LOTAME:"Lotame",OPTIMIZELY:"Optimizely",BUGSNAG:"Bugsnag",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"GA4",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"Posthog",KLAVIYO:"Klaviyo",CLEVERTAP:"Clevertap",BINGADS:"BingAds",PINTEREST_TAG:"PinterestTag",ADOBE_ANALYTICS:"AdobeAnalytics",LINKEDIN_INSIGHT_TAG:"LinkedInInsightTag",REDDIT_PIXEL:"RedditPixel",DRIP:"Drip",HEAP:"Heap",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",PROFITWELL:"ProfitWell",SENTRY:"Sentry",QUANTUMMETRIC:"QuantumMetric",SNAP_PIXEL:"SnapPixel",POST_AFFILIATE_PRO:"PostAffiliatePro",GOOGLE_OPTIMIZE:"GoogleOptimize",LAUNCHDARKLY:"LaunchDarkly",GA360:"GA360",ADROLL:"Adroll",DCM_FLOODLIGHT:"DCMFloodlight",MATOMO:"Matomo",VERO:"Vero",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"QuoraPixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"YandexMetrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"MicrosoftClarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TiktokAds",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig"},P="ADOBE_ANALYTICS";s({},"Adobe Analytics","AdobeAnalytics");var D=s(s(s(s(s(s({"Adobe Analytics":P,ADOBEANALYTICS:P,"ADOBE ANALYTICS":P},P,P),"AdobeAnalytics",P),"adobeanalytics",P),"adobe analytics",P),"Adobe analytics",P),"adobe Analytics",P),x="AM";s({},"Amplitude","Amplitude");var L=s(s(s(s({},x,x),"AMPLITUDE",x),"Amplitude",x),"am",x),M="APPCUES";s({},"Appcues","Appcues");var B=s(s(s(s({},M,M),"Appcues",M),"App Cues",M),"appcues",M),N="BINGADS";s({},"Bing Ads","BingAds");var G=s(s(s(s(s(s(s({},N,N),"BingAds",N),"bingads",N),"Bing Ads",N),"Bing ads",N),"bing Ads",N),"bing ads",N),F="BRAZE";s({},"Braze","Braze");var U=s(s(s({},F,F),"Braze",F),"braze",F),j="BUGSNAG";s({},"Bugsnag","Bugsnag");var K=s(s(s({},j,j),"bugsnag",j),"Bugsnag",j),Q="CHARTBEAT";s({},"Chartbeat","Chartbeat");var z=s(s(s(s(s({},Q,Q),"Chartbeat",Q),"chartbeat",Q),"Chart Beat",Q),"chart beat",Q),H="CLEVERTAP";s({},"CleverTap","Clevertap");var q=s(s(s({},H,H),"Clevertap",H),"clevertap",H),V="COMSCORE";s({},"Comscore","Comscore");var W=s(s(s(s(s(s({},V,V),"Comscore",V),"Com Score",V),"com Score",V),"com score",V),"Com score",V),Y="CRITEO";s({},"Criteo","Criteo");var X=s(s(s({},Y,Y),"Criteo",Y),"criteo",Y),J="CUSTOMERIO";s({},"Customer IO","CustomerIO");var $=s(s(s(s(s({},J,J),"Customerio",J),"Customer.io",J),"CUSTOMER.IO",J),"customer.io",J),Z="DRIP";s({},"Drip","Drip");var ee=s(s(s({},Z,Z),"Drip",Z),"drip",Z),te="FACEBOOK_PIXEL";s({},"Facebook Pixel","FacebookPixel");var ne=s(s(s(s(s(s(s({},te,te),"FB Pixel",te),"Facebook Pixel",te),"facebook pixel",te),"fbpixel",te),"FBPIXEL",te),"FB_PIXEL",te),re="FULLSTORY";s({},"Fullstory","Fullstory");var ie=s(s(s(s(s(s(s(s({},re,re),"Fullstory",re),"FullStory",re),"full Story",re),"Full Story",re),"Full story",re),"full story",re),"fullstory",re),oe="GA";s({},"Google Analytics","GA");var se=s(s(s(s(s({},oe,oe),"Google Analytics",oe),"GoogleAnalytics",oe),"GOOGLE ANALYTICS",oe),"google analytics",oe),ae="GA4";s({},"Google Analytics 4 (GA4)","GA4");var ue=s(s(s(s(s(s(s(s(s(s({},ae,ae),"Google Analytics 4",ae),"Google analytics 4",ae),"google analytics 4",ae),"Google Analytics4",ae),"Google analytics4",ae),"google analytics4",ae),"Google Analytics 4 (GA4)",ae),"google analytics 4 (ga4)",ae),"GoogleAnalytics4",ae),ce="GOOGLEADS";s({},"Google Ads","GoogleAds");var le=s(s(s(s(s(s({},ce,ce),"Google Ads",ce),"GoogleAds",ce),"GOOGLE ADS",ce),"google ads",ce),"googleads",ce),he="GOOGLE_OPTIMIZE";s({},"Google Optimize","GoogleOptimize");var fe=s(s(s(s(s(s(s(s({},he,he),"Google Optimize",he),"GoogleOptimize",he),"Googleoptimize",he),"GOOGLEOPTIMIZE",he),"google optimize",he),"Google optimize",he),"GOOGLE OPTIMIZE",he),de="GTM";s({},"Google Tag Manager","GoogleTagManager");var pe=s(s(s(s(s({},de,de),"Google Tag Manager",de),"google tag manager",de),"googletag manager",de),"googletagmanager",de),ge="HEAP";s({},"Heap.io","Heap");var ve=s(s(s(s({},ge,ge),"Heap",ge),"heap",ge),"Heap.io",ge),ye="HOTJAR";s({},"Hotjar","Hotjar");var me=s(s(s(s(s({},ye,ye),"Hotjar",ye),"hotjar",ye),"Hot Jar",ye),"hot jar",ye),Ie="HS";s({},"HubSpot","HubSpot");var Ae=s(s(s(s(s(s({},Ie,Ie),"Hubspot",Ie),"HUBSPOT",Ie),"hub spot",Ie),"Hub Spot",Ie),"Hub spot",Ie),ke="INTERCOM";s({},"Intercom","INTERCOM");var be=s(s(s({},ke,ke),"Intercom",ke),"intercom",ke),Ee="KEEN";s({},"Keen","Keen");var Ce=s(s(s(s(s({},Ee,Ee),"Keen",Ee),"Keen.io",Ee),"keen",Ee),"keen.io",Ee),Se="KISSMETRICS";s({},"Kiss Metrics","Kissmetrics");var Oe=s(s(s({},Se,Se),"Kissmetrics",Se),"kissmetrics",Se),Te="KLAVIYO";s({},"Klaviyo","Klaviyo");var we=s(s(s({},Te,Te),"Klaviyo",Te),"klaviyo",Te),_e="LAUNCHDARKLY";s({},"LaunchDarkly","LaunchDarkly");var Re,Pe=s(s(s(s(s(s({},_e,_e),"LaunchDarkly",_e),"Launch_Darkly",_e),"Launch Darkly",_e),"launchDarkly",_e),"launch darkly",_e),De="LINKEDIN_INSIGHT_TAG";s({},"Linkedin Insight Tag","LinkedInInsightTag");var xe=(s(s(s(s(s(s(s(s(s(s(Re={},De,De),"LinkedIn Insight Tag",De),"LinkedIn insight tag",De),"linkedIn insight tag",De),"Linkedin_insight_tag",De),"LinkedinInsighttag",De),"LinkedinInsightTag",De),"LinkedInInsightTag",De),"Linkedininsighttag",De),"LINKEDININSIGHTTAG",De),s(Re,"linkedininsighttag",De)),Le="LOTAME";s({},"Lotame","Lotame");var Me=s(s(s({},Le,Le),"Lotame",Le),"lotame",Le),Be="LYTICS";s({},"Lytics","Lytics");var Ne=s(s(s({},Be,Be),"Lytics",Be),"lytics",Be),Ge="MP";s({},"Mixpanel","Mixpanel");var Fe=s(s(s(s(s(s({},Ge,Ge),"MIXPANEL",Ge),"Mixpanel",Ge),"MIX PANEL",Ge),"Mix panel",Ge),"Mix Panel",Ge),Ue="MOENGAGE";s({},"MoEngage","MoEngage");var je=s(s(s(s(s(s(s({},Ue,Ue),"MoEngage",Ue),"moengage",Ue),"Moengage",Ue),"Mo Engage",Ue),"mo engage",Ue),"Mo engage",Ue),Ke="OPTIMIZELY";s({},"Optimizely Web","Optimizely");var Qe=s(s(s({},Ke,Ke),"Optimizely",Ke),"optimizely",Ke),ze="PENDO";s({},"Pendo","Pendo");var He,qe=s(s(s({},ze,ze),"Pendo",ze),"pendo",ze),Ve="PINTEREST_TAG";s({},"Pinterest Tag","PinterestTag");var We=(s(s(s(s(s(s(s(s(s(s(He={},Ve,Ve),"PinterestTag",Ve),"Pinterest_Tag",Ve),"PINTERESTTAG",Ve),"pinterest",Ve),"PinterestAds",Ve),"Pinterest_Ads",Ve),"Pinterest",Ve),"Pinterest Tag",Ve),"Pinterest tag",Ve),s(s(s(s(He,"PINTEREST TAG",Ve),"pinterest tag",Ve),"Pinterest Ads",Ve),"Pinterest ads",Ve)),Ye="POST_AFFILIATE_PRO";s({},"Post Affiliate Pro","PostAffiliatePro");var Xe=s(s(s(s(s(s(s(s({},Ye,Ye),"PostAffiliatePro",Ye),"Post_affiliate_pro",Ye),"Post Affiliate Pro",Ye),"Post affiliate pro",Ye),"post affiliate pro",Ye),"postaffiliatepro",Ye),"POSTAFFILIATEPRO",Ye),Je="POSTHOG";s({},"PostHog","Posthog");var $e=s(s(s(s(s(s(s({},Je,Je),"PostHog",Je),"Posthog",Je),"posthog",Je),"Post Hog",Je),"Post hog",Je),"post hog",Je),Ze="PROFITWELL";s({},"ProfitWell","ProfitWell");var et=s(s(s(s(s(s(s({},Ze,Ze),"ProfitWell",Ze),"profitwell",Ze),"Profitwell",Ze),"Profit Well",Ze),"profit well",Ze),"Profit well",Ze),tt="QUALTRICS";s({},"Qualtrics","Qualtrics");var nt=s(s(s({},tt,tt),"Qualtrics",tt),"qualtrics",tt),rt="QUANTUMMETRIC";s({},"Quantum Metric","QuantumMetric");var it=s(s(s(s(s(s(s(s({},rt,rt),"Quantum Metric",rt),"quantum Metric",rt),"quantum metric",rt),"QuantumMetric",rt),"quantumMetric",rt),"quantummetric",rt),"Quantum_Metric",rt),ot="REDDIT_PIXEL";s({},"Reddit Pixel","RedditPixel");var st=s(s(s(s(s(s(s(s({},ot,ot),"Reddit_Pixel",ot),"RedditPixel",ot),"REDDITPIXEL",ot),"redditpixel",ot),"Reddit Pixel",ot),"REDDIT PIXEL",ot),"reddit pixel",ot),at="SENTRY";s({},"Sentry","Sentry");var ut=s(s(s({},at,at),"sentry",at),"Sentry",at),ct="SNAP_PIXEL";s({},"Snap Pixel","SnapPixel");var lt=s(s(s(s(s(s(s(s({},ct,ct),"Snap_Pixel",ct),"SnapPixel",ct),"SNAPPIXEL",ct),"snappixel",ct),"Snap Pixel",ct),"SNAP PIXEL",ct),"snap pixel",ct),ht="TVSQUARED";s({},"TVSquared","TVSquared");var ft=s(s(s(s(s(s(s(s(s({},ht,ht),"TVSquared",ht),"tvsquared",ht),"tvSquared",ht),"TvSquared",ht),"Tvsquared",ht),"TV Squared",ht),"tv squared",ht),"tv Squared",ht),dt="VWO";s({},"VWO","VWO");var pt=s(s(s(s(s(s(s(s({},dt,dt),"VisualWebsiteOptimizer",dt),"Visualwebsiteoptimizer",dt),"visualwebsiteoptimizer",dt),"vwo",dt),"Visual Website Optimizer",dt),"Visual website optimizer",dt),"visual website optimizer",dt),gt="GA360";s({},"Google Analytics 360","GA360");var vt=s(s(s(s(s(s(s(s(s({},gt,gt),"Google Analytics 360",gt),"Google analytics 360",gt),"google analytics 360",gt),"Google Analytics360",gt),"Google analytics360",gt),"google analytics360",gt),"GoogleAnalytics360",gt),"GA 360",gt),yt="ADROLL";s({},"Adroll","Adroll");var mt=s(s(s(s(s({},yt,yt),"Adroll",yt),"Ad roll",yt),"ad roll",yt),"adroll",yt),It="DCM_FLOODLIGHT";s({},"DCM Floodlight","DCMFloodlight");var At=s(s(s(s(s(s(s(s(s({},It,It),"DCM Floodlight",It),"dcm floodlight",It),"Dcm Floodlight",It),"DCMFloodlight",It),"dcmfloodlight",It),"DcmFloodlight",It),"dcm_floodlight",It),"DCM_Floodlight",It),kt="MATOMO";s({},"Matomo","Matomo");var bt=s(s(s({},kt,kt),"Matomo",kt),"matomo",kt),Et="VERO";s({},"Vero","Vero");var Ct=s(s(s({},Et,Et),"Vero",Et),"vero",Et),St="MOUSEFLOW";s({},"Mouseflow","Mouseflow");var Ot=s(s(s(s(s(s(s(s(s({},St,St),"Mouseflow",St),"mouseflow",St),"mouseFlow",St),"MouseFlow",St),"Mouse flow",St),"mouse flow",St),"mouse Flow",St),"Mouse Flow",St),Tt="ROCKERBOX";s({},"Rockerbox","Rockerbox");var wt=s(s(s(s(s(s(s({},Tt,Tt),"Rockerbox",Tt),"rockerbox",Tt),"RockerBox",Tt),"Rocker box",Tt),"rocker box",Tt),"Rocker Box",Tt),_t="CONVERTFLOW";s({},"ConvertFlow","ConvertFlow");var Rt=s(s(s(s(s(s(s(s(s(s({},_t,_t),"Convertflow",_t),"convertflow",_t),"convertFlow",_t),"ConvertFlow",_t),"Convert flow",_t),"convert flow",_t),"convert Flow",_t),"Convert Flow",_t),"CONVERT FLOW",_t),Pt="SNAPENGAGE";s({},"SnapEngage","SnapEngage");var Dt=s(s(s(s(s(s(s({},Pt,Pt),"SnapEngage",Pt),"Snap_Engage",Pt),"snapengage",Pt),"SNAP ENGAGE",Pt),"Snap Engage",Pt),"snap engage",Pt),xt="LIVECHAT";s({},"LiveChat","LiveChat");var Lt=s(s(s(s(s(s(s({},xt,xt),"LiveChat",xt),"Live_Chat",xt),"livechat",xt),"LIVE CHAT",xt),"Live Chat",xt),"live chat",xt),Mt="SHYNET";s({},"Shynet","Shynet");var Bt=s(s(s(s(s(s(s(s(s({},Mt,Mt),"shynet",Mt),"ShyNet",Mt),"shyNet",Mt),"Shynet",Mt),"shy net",Mt),"Shy Net",Mt),"shy Net",Mt),"Shy net",Mt),Nt="WOOPRA";s({},"Woopra","Woopra");var Gt=s(s(s({},Nt,Nt),"Woopra",Nt),"woopra",Nt),Ft="ROLLBAR";s({},"RollBar","RollBar");var Ut=s(s(s(s(s(s(s(s({},Ft,Ft),"RollBar",Ft),"Roll_Bar",Ft),"rollbar",Ft),"Rollbar",Ft),"ROLL BAR",Ft),"Roll Bar",Ft),"roll bar",Ft),jt="QUORA_PIXEL";s({},"Quora Pixel","QuoraPixel");var Kt=s(s(s(s(s(s(s(s(s(s({},jt,jt),"Quora Pixel",jt),"Quora pixel",jt),"QUORA PIXEL",jt),"QuoraPixel",jt),"Quorapixel",jt),"QUORAPIXEL",jt),"Quora_Pixel",jt),"quora_pixel",jt),"Quora",jt),Qt="JUNE";s({},"June","June");var zt=s(s(s({},Qt,Qt),"June",Qt),"june",Qt),Ht="ENGAGE";s({},"Engage","Engage");var qt=s(s(s({},Ht,Ht),"Engage",Ht),"engage",Ht),Vt="ITERABLE";s({},"Iterable","Iterable");var Wt=s(s(s({},Vt,Vt),"Iterable",Vt),"iterable",Vt),Yt="YANDEX_METRICA";s({},"Yandex.Metrica","YandexMetrica");var Xt=s(s(s(s(s({},Yt,Yt),"Yandexmetrica",Yt),"yandexmetrica",Yt),"yandexMetrica",Yt),"YandexMetrica",Yt),Jt="REFINER";s({},"Refiner","Refiner");var $t=s(s(s({},Jt,Jt),"Refiner",Jt),"refiner",Jt),Zt="QUALAROO";s({},"Qualaroo","Qualaroo");var en=s(s(s({},Zt,Zt),"Qualaroo",Zt),"qualaroo",Zt),tn="PODSIGHTS";s({},"Podsights","Podsights");var nn=s(s(s(s(s(s(s(s({},tn,tn),"Podsights",tn),"PodSights",tn),"pod Sights",tn),"Pod Sights",tn),"pod sights",tn),"POD SIGHTS",tn),"Pod sights",tn),rn="AXEPTIO";s({},"Axeptio","Axeptio");var on=s(s(s({},rn,rn),"Axeptio",rn),"axeptio",rn),sn="SATISMETER";s({},"Satismeter","Satismeter");var an=s(s(s({},sn,sn),"Satismeter",sn),"SatisMeter",sn),un="MICROSOFT_CLARITY";s({},"Microsoft Clarity","MicrosoftClarity");var cn=s(s(s(s(s(s(s(s(s({},un,un),"Microsoft Clarity",un),"Microsoft clarity",un),"microsoft clarity",un),"Microsoft_clarity",un),"MicrosoftClarity",un),"MICROSOFTCLARITY",un),"microsoftclarity",un),"microsoftClarity",un),ln="SENDINBLUE";s({},"Sendinblue","Sendinblue");var hn=s(s(s(s({},ln,ln),"Sendinblue",ln),"sendinblue",ln),"SendinBlue",ln),fn="OLARK";s({},"Olark","Olark");var dn=s(s(s({},fn,fn),"Olark",fn),"olark",fn),pn="LEMNISK";s({},"Lemnisk","Lemnisk");var gn=s(s(s(s(s(s(s(s({},pn,pn),"LEMNISK_MARKETING_AUTOMATION",pn),"Lemnisk Marketing Automation",pn),"LemniskMarketingAutomation",pn),"lemniskmarketingautomation",pn),"lemniskMarketingAutomation",pn),"lemnisk",pn),"Lemnisk",pn),vn="TIKTOK_ADS";s({},"TikTok Ads","TiktokAds");var yn=s(s(s(s(s(s(s({},vn,vn),"TiktokAds",vn),"Tiktok ads",vn),"Tiktok Ads",vn),"Tik Tok Ads",vn),"tik tok ads",vn),"tiktokads",vn),mn="ACTIVE_CAMPAIGN";s({},"Active Campaign","ActiveCampaign");var In=s(s(s(s(s(s({ActiveCampaign:mn,"Active Campaign":mn,"ACTIVE CAMPAIGN":mn},mn,mn),"activecampaign",mn),"active campaign",mn),"Active campaign",mn),"active Campaign",mn),"active_campaign",mn),An="SPRIG";s({},"Sprig","Sprig");var kn=s(s(s({},An,An),"Sprig",An),"sprig",An),bn=t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t({All:"All"},D),L),B),G),U),K),z),q),W),X),$),ee),ne),ie),se),ue),vt),le),fe),pe),ve),me),Ae),be),Ce),Oe),we),Pe),xe),Me),Ne),Fe),je),Qe),qe),We),Xe),$e),et),nt),it),st),ut),lt),ft),pt),mt),At),bt),Ct),Ot),Rt),Dt),Lt),Bt),Gt),Ut),Kt),zt),qt),Wt),wt),Xt),$t),en),nn),on),an),cn),hn),dn),gn),yn),In),kn),En=4,Cn={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":En=1;break;case"DEBUG":En=2;break;case"WARN":En=3;break;default:En=4}},info:function(){var e;En<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;En<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;En<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;En<=4&&(e=console).error.apply(e,arguments)}},Sn=1e4,On=1e3,Tn="RS_JS_SDK",wn="Request failed with status:",_n=[wn],Rn="errorReporting",Pn=function(e){var t=window.RudderStackGlobals&&window.RudderStackGlobals[Rn];t&&e instanceof Error&&t.notify(e)},Dn=function(e,t){try{return JSON.stringify(e,function(e){var t=[];return function(r,i){if(!e||null!=i){if("object"!==n(i)||null===i)return i;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(i)?(Cn.debug("Circular Reference detected for key: ".concat(r)),"[Circular Reference]"):(t.push(i),i)}}}(t))}catch(e){return Cn.warn("Failed to convert the value to a JSON string."),null}},xn=function(e,t,r){var i,o;try{i="string"==typeof e?e:e instanceof Error||e.message?e.message:Dn(e)}catch(e){i=""}if("object"===n(o=e)&&null!==o&&"target"in o){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&(e.target.dataset.loader!==Tn||"true"!==e.target.dataset.isnonnativesdk))return"";if(i="error in script loading:: src:: ".concat(e.target.src," id:: ").concat(e.target.id),"ad-block"===e.target.id)return r.page("RudderJS-Initiated","ad-block page request",{path:"/ad-blocked",title:i},r.sendAdblockPageOptions),""}return"[handleError]::".concat(t||"",' "').concat(i,'"')},Ln=function(e,t,n){var r;try{r=xn(e,t,n)}catch(t){Cn.error("[handleError] Exception:: ",t),Cn.error("[handleError] Original error:: ",Dn(e)),Pn(t)}r&&(Cn.error(r),function(e){return!e.message||!_n.some((function(t){return e.message.includes(t)}))}(e)&&Pn(e))},Mn={exports:{}};var Bn,Nn={exports:{}},Gn=d(Object.freeze({__proto__:null,default:{}}));function Fn(){return Bn||(Bn=1,Nn.exports=(e=e||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==h&&h.crypto&&(n=h.crypto),!n)try{n=Gn}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=o.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},d=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}});var g=o.algo={};return o}(Math),e)),Nn.exports;var e}var Un,jn={exports:{}};function Kn(){return Un||(Un=1,jn.exports=(e=Fn(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),jn.exports;var e}var Qn,zn={exports:{}};function Hn(){return Qn||(Qn=1,zn.exports=(e=Fn(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],y=e[t+6],m=e[t+7],I=e[t+8],A=e[t+9],k=e[t+10],b=e[t+11],E=e[t+12],C=e[t+13],S=e[t+14],O=e[t+15],T=o[0],w=o[1],_=o[2],R=o[3];T=c(T,w,_,R,s,7,a[0]),R=c(R,T,w,_,u,12,a[1]),_=c(_,R,T,w,d,17,a[2]),w=c(w,_,R,T,p,22,a[3]),T=c(T,w,_,R,g,7,a[4]),R=c(R,T,w,_,v,12,a[5]),_=c(_,R,T,w,y,17,a[6]),w=c(w,_,R,T,m,22,a[7]),T=c(T,w,_,R,I,7,a[8]),R=c(R,T,w,_,A,12,a[9]),_=c(_,R,T,w,k,17,a[10]),w=c(w,_,R,T,b,22,a[11]),T=c(T,w,_,R,E,7,a[12]),R=c(R,T,w,_,C,12,a[13]),_=c(_,R,T,w,S,17,a[14]),T=l(T,w=c(w,_,R,T,O,22,a[15]),_,R,u,5,a[16]),R=l(R,T,w,_,y,9,a[17]),_=l(_,R,T,w,b,14,a[18]),w=l(w,_,R,T,s,20,a[19]),T=l(T,w,_,R,v,5,a[20]),R=l(R,T,w,_,k,9,a[21]),_=l(_,R,T,w,O,14,a[22]),w=l(w,_,R,T,g,20,a[23]),T=l(T,w,_,R,A,5,a[24]),R=l(R,T,w,_,S,9,a[25]),_=l(_,R,T,w,p,14,a[26]),w=l(w,_,R,T,I,20,a[27]),T=l(T,w,_,R,C,5,a[28]),R=l(R,T,w,_,d,9,a[29]),_=l(_,R,T,w,m,14,a[30]),T=h(T,w=l(w,_,R,T,E,20,a[31]),_,R,v,4,a[32]),R=h(R,T,w,_,I,11,a[33]),_=h(_,R,T,w,b,16,a[34]),w=h(w,_,R,T,S,23,a[35]),T=h(T,w,_,R,u,4,a[36]),R=h(R,T,w,_,g,11,a[37]),_=h(_,R,T,w,m,16,a[38]),w=h(w,_,R,T,k,23,a[39]),T=h(T,w,_,R,C,4,a[40]),R=h(R,T,w,_,s,11,a[41]),_=h(_,R,T,w,p,16,a[42]),w=h(w,_,R,T,y,23,a[43]),T=h(T,w,_,R,A,4,a[44]),R=h(R,T,w,_,E,11,a[45]),_=h(_,R,T,w,O,16,a[46]),T=f(T,w=h(w,_,R,T,d,23,a[47]),_,R,s,6,a[48]),R=f(R,T,w,_,m,10,a[49]),_=f(_,R,T,w,S,15,a[50]),w=f(w,_,R,T,v,21,a[51]),T=f(T,w,_,R,E,6,a[52]),R=f(R,T,w,_,p,10,a[53]),_=f(_,R,T,w,k,15,a[54]),w=f(w,_,R,T,u,21,a[55]),T=f(T,w,_,R,I,6,a[56]),R=f(R,T,w,_,O,10,a[57]),_=f(_,R,T,w,y,15,a[58]),w=f(w,_,R,T,C,21,a[59]),T=f(T,w,_,R,g,6,a[60]),R=f(R,T,w,_,b,10,a[61]),_=f(_,R,T,w,d,15,a[62]),w=f(w,_,R,T,A,21,a[63]),o[0]=o[0]+T|0,o[1]=o[1]+w|0,o[2]=o[2]+_|0,o[3]=o[3]+R|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5)),zn.exports;var e}var qn,Vn={exports:{}},Wn={exports:{}};function Yn(){return qn||(qn=1,Wn.exports=(a=Fn(),t=(e=a).lib,n=t.WordArray,r=t.Hasher,i=e.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var l=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=l<<1|l>>>31}var h=(r<<5|r>>>27)+u+o[c];h+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),a.SHA1)),Wn.exports;var e,t,n,r,i,o,s,a}var Xn,Jn,$n={exports:{}};function Zn(){return Jn||(Jn=1,Vn.exports=function(e){return n=(t=e).lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),s=i.create(),a=s.words,u=r.keySize,c=r.iterations;a.length<u;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var l=1;l<c;l++)n=o.finalize(n),o.reset();s.concat(n)}return s.sigBytes=4*u,s}}),t.EvpKDF=function(e,t,n){return a.create(n).compute(e,t)},e.EvpKDF;var t,n,r,i,o,s,a}(Fn(),Yn(),(Xn||(Xn=1,$n.exports=(e=Fn(),void function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())),$n.exports))),Vn.exports;var e}var er,tr,nr={exports:{}};Mn.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],h=[],f=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],v=e[g],y=e[v],m=257*e[p]^16843008*p;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*y^65537*v^257*g^16843008*n,l[p]=m<<24|m>>>8,h[p]=m<<16|m>>>16,f[p]=m<<8|m>>>24,d[p]=m,n?(n=g^e[e[e[y^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var c=o[s];else c=o[s-4];a[u]=u<4||s<=4?c:l[i[c>>>24]]^h[i[c>>>16&255]]^f[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[h>>>8&255]^s[255&f]^n[d++],v=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^s[255&c]^n[d++],y=r[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[f>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&h]^n[d++];c=g,l=v,h=y,f=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[d++],v=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[d++],y=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[d++],e[t]=g,e[t+1]=v,e[t+2]=y,e[t+3]=m},keySize:8});t.AES=n._createHelper(g)}(),e.AES}(Fn(),Kn(),Hn(),Zn(),er||(er=1,nr.exports=(tr=Fn(),Zn(),void(tr.lib.Cipher||function(e){var t=tr,n=t.lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var a=s.Base64,u=t.algo.EvpKDF,c=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?m:v}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});n.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},h=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=l.CBC=function(){var t=h.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),d=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(o);var u=i.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:f,padding:d}),reset:function(){var e;c.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var p=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?i.create([1398893684,1701076831]).concat(n).concat(t):t).toString(a)},parse:function(e){var t,n=a.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=i.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),p.create({ciphertext:n,salt:t})}},v=n.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return p.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,n,r,o){if(r||(r=i.random(8)),o)s=u.create({keySize:t+n,hasher:o}).compute(e,r);else var s=u.create({keySize:t+n}).compute(e,r);var a=i.create(s.words.slice(t),4*n);return s.sigBytes=4*t,p.create({key:s,iv:a,salt:r})}},m=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))));var rr=f(Mn.exports),ir={exports:{}};ir.exports=function(e){return e.enc.Utf8}(Fn());var or=f(ir.exports),sr=function(e){return null!=e&&"object"===n(e)&&!1===Array.isArray(e)},ar=function(e,t,n){if(sr(n)||(n={default:n}),!lr(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));var r=Array.isArray(t),i="string"==typeof t,o=n.separator||".",s=n.joinChar||("string"==typeof o?o:".");if(!i&&!r)return e;if(i&&t in e)return cr(t,e,n)?e[t]:n.default;var a=r?t:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(t,o,n),u=a.length,c=0;do{var l=a[c];for("number"==typeof l&&(l=String(l));l&&"\\"===l.slice(-1);)l=ur([l.slice(0,-1),a[++c]||""],s,n);if(l in e){if(!cr(l,e,n))return n.default;e=e[l]}else{for(var h=!1,f=c+1;f<u;)if(h=(l=ur([l,a[f++]],s,n))in e){if(!cr(l,e,n))return n.default;e=e[l],c=f-1;break}if(!h)return n.default}}while(++c<u&&lr(e));return c===u?e:n.default};function ur(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function cr(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function lr(e){return sr(e)||Array.isArray(e)||"function"==typeof e}var hr,fr,dr=f(ar),pr={exports:{}};function gr(){if(fr)return hr;fr=1;var e=1e3,t=60*e,r=60*t,i=24*r,o=7*i,s=365.25*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return hr=function(u,c){c=c||{};var l=n(u);if("string"===l&&u.length>0)return function(n){if((n=String(n)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(u);if("number"===l&&isFinite(u))return c.long?function(n){var o=Math.abs(n);if(o>=i)return a(n,o,i,"day");if(o>=r)return a(n,o,r,"hour");if(o>=t)return a(n,o,t,"minute");if(o>=e)return a(n,o,e,"second");return n+" ms"}(u):function(n){var o=Math.abs(n);if(o>=i)return Math.round(n/i)+"d";if(o>=r)return Math.round(n/r)+"h";if(o>=t)return Math.round(n/t)+"m";if(o>=e)return Math.round(n/e)+"s";return n+"ms"}(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))},hr}var vr=function(e){function t(e){var r,i,o,s=null;function a(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(a.enabled){var o=a,s=Number(new Date),u=s-(r||s);o.diff=u,o.prev=r,o.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";c++;var i=t.formatters[r];if("function"==typeof i){var s=n[c];e=i.call(o,s),n.splice(c,1),c--}return e})),t.formatArgs.call(o,n),(o.log||t.log).apply(o,n)}}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(u(t.names.map(r)),u(t.skips.map(r).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=gr(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t};!function(e,t){var n;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=vr(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(pr,pr.exports);var yr=pr.exports,mr=yr("cookie");function Ir(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[kr((t=r[i].split("="))[0])]=kr(t[1]);return n}(e)}function Ar(e){try{return encodeURIComponent(e)}catch(t){mr("error `encode(%o)` - %o",e,t)}}function kr(e){try{return decodeURIComponent(e)}catch(t){mr("error `decode(%o)` - %o",e,t)}}var br=f((function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=Ar(e)+"="+Ar(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.samesite&&(r+="; samesite="+n.samesite);n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return Ir()[e]}(e);default:return Ir()}})),Er={exports:{}},Cr=Math.max,Sr=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=Cr(Number(e)||0,0),i=Cr(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},Or=Math.max,Tr=function(e){if(null==e||!e.length)return[];for(var t=new Array(Or(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},wr=Sr,_r=Tr,Rr=Object.prototype.hasOwnProperty,Pr=Object.prototype.toString,Dr=function(e){return Boolean(e)&&"[object Object]"===Pr.call(e)},xr=function(e,t,n,r){return Rr.call(t,r)&&void 0===e[r]&&(e[r]=n),t},Lr=function(e,t,n,r){return Rr.call(t,r)&&(Dr(e[r])&&Dr(n)?e[r]=Br(e[r],n):void 0===e[r]&&(e[r]=n)),t},Mr=function(e,t){if(r=t,!Boolean(r)||"object"!==n(r))return t;var r;e=e||xr;for(var i=wr(2,arguments),o=0;o<i.length;o+=1)for(var s in i[o])e(t,i[o],i[o][s],s);return t},Br=function(e){return Mr.apply(null,[Lr,e].concat(_r(arguments)))};Er.exports=function(e){return Mr.apply(null,[null,e].concat(_r(arguments)))},Er.exports.deep=Br;var Nr=f(Er.exports),Gr={exports:{}},Fr=yr("cookie"),Ur=function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=Kr(e)+"="+Kr(t);null==t&&(n.maxage=-1);n.maxage&&(n.expires=new Date(+new Date+n.maxage));n.path&&(r+="; path="+n.path);n.domain&&(r+="; domain="+n.domain);n.expires&&(r+="; expires="+n.expires.toUTCString());n.secure&&(r+="; secure");document.cookie=r}(e,t,n);case 1:return function(e){return jr()[e]}(e);default:return jr()}};function jr(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[Qr((t=r[i].split("="))[0])]=Qr(t[1]);return n}(e)}function Kr(e){try{return encodeURIComponent(e)}catch(t){Fr("error `encode(%o)` - %o",e,t)}}function Qr(e){try{return decodeURIComponent(e)}catch(t){Fr("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=Ur;function r(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}r.levels=function(e){var t,n,r=("function"!=typeof window.URL?(t=e,(n=document.createElement("a")).href=t,n.hostname):new URL(e).hostname).split("."),i=r[r.length-1],o=[];if(4===r.length&&i===parseInt(i,10))return o;if(r.length<=1)return o;for(var s=r.length-2;s>=0;--s)o.push(r.slice(s).join("."));return o},r.cookie=n,t=e.exports=r}(Gr,Gr.exports);var zr=f(Gr.exports),Hr=new(function(){function e(t){r(this,e),this.cOpts={},this.options(t),this.isSupportAvailable=this.checkSupportAvailability()}return o(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===arguments.length)return this.cOpts;var t=".".concat(zr(window.location.href));return"."===t&&(t=null),this.cOpts=Nr(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),e.sameDomainCookiesOnly&&delete this.cOpts.domain,this.cOpts}},{key:"set",value:function(e,t){try{return br(e,t,O(this.cOpts)),!0}catch(e){return Cn.error(e),!1}}},{key:"get",value:function(e){return br(e)}},{key:"remove",value:function(e){try{return br(e,null,O(this.cOpts)),!0}catch(e){return!1}}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_cookie";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}())({}),qr={exports:{}};qr.exports=function(){function e(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function t(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}function n(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function r(e){return"[object Function]"==={}.toString.call(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){var t="_Is_Incognit",n="yes";try{e||(e=window.localStorage),e.setItem(t,n),e.removeItem(t)}catch(t){var r={_data:{},setItem:function(e,t){return r._data[e]=String(t)},getItem:function(e){return r._data.hasOwnProperty(e)?r._data[e]:void 0},removeItem:function(e){return delete r._data[e]},clear:function(){return r._data={}}};e=r}finally{e.getItem(t)===n&&e.removeItem(t)}return e}var s=o();function a(){if(!(this instanceof a))return new a}a.prototype={set:function(n,r){if(n&&!e(n))s.setItem(n,t(r));else if(e(n))for(var i in n)this.set(i,n[i]);return this},get:function(e){if(void 0===e){var t={};return this.forEach((function(e,n){return t[e]=n})),t}if("?"===e.charAt(0))return this.has(e.substr(1));var r=arguments;if(r.length>1){for(var i={},o=0,a=r.length;o<a;o++){var u=n(s.getItem(r[o]));this.has(r[o])&&(i[r[o]]=u)}return i}return n(s.getItem(e))},clear:function(){return s.clear(),this},remove:function(e){var t=this.get(e);return s.removeItem(e),t},has:function(e){return{}.hasOwnProperty.call(this.get(),e)},keys:function(){var e=[];return this.forEach((function(t){e.push(t)})),e},forEach:function(e){for(var t=0,n=s.length;t<n;t++){var r=s.key(t);e(r,this.get(r))}return this},search:function(e){for(var t=this.keys(),n={},r=0,i=t.length;r<i;r++)t[r].indexOf(e)>-1&&(n[t[r]]=this.get(t[r]));return n}};var u=null;function c(t,n){var o=arguments,s=null;if(u||(u=a()),0===o.length)return u.get();if(1===o.length){if("string"==typeof t)return u.get(t);if(e(t))return u.set(t)}if(2===o.length&&"string"==typeof t){if(!n)return u.remove(t);if(n&&"string"==typeof n)return u.set(t,n);n&&r(n)&&(s=null,s=n(t,u.get(t)),c.set(t,s))}if(2===o.length&&i(t)&&r(n))for(var l=0,h=t.length;l<h;l++)s=n(t[l],u.get(t[l])),c.set(t[l],s);return c}for(var l in a.prototype)c[l]=a.prototype[l];return c}();var Vr=f(qr.exports),Wr=new(function(){function e(t){r(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(t)}return o(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(Nr(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return Vr.set(e,t)}},{key:"get",value:function(e){return Vr.get(e)}},{key:"remove",value:function(e){return Vr.remove(e)}},{key:"checkSupportAvailability",value:function(){try{var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}catch(e){return!1}}}]),e}())({}),Yr=function(e){return(new TextDecoder).decode((t=e,n=globalThis.atob(t).split("").map((function(e){return e.charCodeAt(0)})),new Uint8Array(n)));var t,n},Xr="rl_user_id",Jr="rl_trait",$r="rl_anonymous_id",Zr="rl_group_id",ei="rl_group_trait",ti="rl_page_init_referrer",ni="rl_page_init_referring_domain",ri="rl_session",ii="rl_auth_token",oi="RudderEncrypt:",si="RS_ENC_v3_",ai="Rudder",ui={segment:"ajs_anonymous_id"};function ci(e){try{return e?JSON.parse(e):null}catch(t){return Cn.error(t),e||null}}function li(e){return e.replace(/^\s+|\s+$/gm,"")}function hi(e){return e&&"string"==typeof e&&""!==li(e)?e.substring(0,oi.length)===oi?rr.decrypt(e.substring(oi.length),ai).toString(or):e.substring(0,si.length)===si?Yr(e.substring(si.length)):e:e}for(var fi,di=function(){function e(){r(this,e),Hr.isSupportAvailable?this.storage=Hr:(Wr.enabled&&(this.storage=Wr),this.storage||Cn.error("No storage is available :: initializing the SDK without storage"))}return o(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.storage.options(e)}},{key:"setItem",value:function(e,t){var n=Dn(t);null!==n&&this.storage.set(e,function(e){return""===li(e)?e:"".concat(oi).concat(rr.encrypt(e,ai).toString())}(n))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):Cn.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(Xr,e)}},{key:"setUserTraits",value:function(e){this.setItem(Jr,e)}},{key:"setGroupId",value:function(e){this.setStringItem(Zr,e)}},{key:"setGroupTraits",value:function(e){this.setItem(ei,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem($r,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(ti,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(ni,e)}},{key:"setSessionInfo",value:function(e){this.setItem(ri,e)}},{key:"setAuthToken",value:function(e){this.setItem(ii,e)}},{key:"getItem",value:function(e){return ci(hi(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(Xr)}},{key:"getUserTraits",value:function(){return this.getItem(Jr)}},{key:"getGroupId",value:function(){return this.getItem(Zr)}},{key:"getGroupTraits",value:function(){return this.getItem(ei)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(ui).includes(n)&&"segment"===n?(Wr.enabled&&(t=Wr.get(ui[n])),!t&&Hr.isSupportAvailable&&(t=Hr.get(ui[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=ci(hi(this.storage.get($r)));if(t)return t;var n=dr(e,"autoCapture.source");if(!0===dr(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(ti)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(ni)}},{key:"getSessionInfo",value:function(){return this.getItem(ri)}},{key:"getAuthToken",value:function(){return this.getItem(ii)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(ri)}},{key:"clear",value:function(e){this.storage.remove(Xr),this.storage.remove(Jr),this.storage.remove(Zr),this.storage.remove(ei),this.storage.remove(ii),e&&this.storage.remove($r)}}]),e}(),pi=new di,gi=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(document.getElementById(e))return;var r=document.createElement("script");r.src=t,r.async=void 0===n.async||n.async,r.type="text/javascript",r.id=e,!0!==n.skipDatasetAttributes&&(r.setAttribute("data-loader",Tn),void 0!==n.isNonNativeSDK&&r.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var i=document.getElementsByTagName("head");if(i.length>0)i[0].insertBefore(r,i[0].firstChild);else{var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}catch(o){Ln(o)}},vi=function(e){return null===e},yi=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return O(t);var r=O(e);return t.forEach((function(e,t){r[t]=Array.isArray(e)||function(e){return!vi(e)&&"object"===n(e)&&!Array.isArray(e)}(e)?mi(r[t],e):e})),r},mi=function(e,t){return _(yi,e,t)},Ii=function(e){return function(e){return!vi(e)&&"[object Object]"===Object.prototype.toString.call(e)}(e)&&Object.keys(e).length>0},Ai=256,ki=[];Ai--;)ki[Ai]=(Ai+256).toString(16).substring(1);for(var bi,Ei=4096,Ci=[],Si=0;Si<256;Si++)Ci[Si]=(Si+256).toString(16).substring(1);function Oi(){var e;(!bi||Si+16>Ei)&&(e=Ei,bi=crypto.getRandomValues(new Uint8Array(e)),Si=0);for(var t,n=0,r="";n<16;n++)t=bi[Si+n],r+=6==n?Ci[15&t|64]:8==n?Ci[63&t|128]:Ci[t],1&n&&n>1&&n<11&&(r+="-");return Si+=16,r}var Ti={All:"All",GA:"Google Analytics",GOOGLEADS:"Google Ads",BRAZE:"Braze",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",CUSTOMERIO:"Customer IO",DCM_Floodlight:"DCM Floodlight",FACEBOOK_PIXEL:"Facebook Pixel",GTM:"Google Tag Manager",HOTJAR:"Hotjar",HS:"HubSpot",INTERCOM:"Intercom",KEEN:"Keen",KISSMETRICS:"Kiss Metrics",LOTAME:"Lotame",VWO:"VWO",OPTIMIZELY:"Optimizely Web",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"Google Analytics 4 (GA4)",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"PostHog",PROFITWELL:"ProfitWell",KLAVIYO:"Klaviyo",CLEVERTAP:"CleverTap",BINGADS:"Bing Ads",PINTEREST_TAG:"Pinterest Tag",SNAP_PIXEL:"Snap Pixel",LINKEDIN_INSIGHT_TAG:"Linkedin Insight Tag",REDDIT_PIXEL:"Reddit Pixel",DRIP:"Drip",HEAP:"Heap.io",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",SENTRY:"Sentry",GOOGLE_OPTIMIZE:"Google Optimize",POST_AFFILIATE_PRO:"Post Affiliate Pro",LAUNCHDARKLY:"LaunchDarkly",GA360:"Google Analytics 360",ADROLL:"Adroll",VERO:"Vero",MATOMO:"Matomo",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"Quora Pixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"Yandex.Metrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"Microsoft Clarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TikTok Ads",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig"},wi=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],_i="https://api.rudderstack.com/sourceConfig/?p=npm&v=2.45.1",Ri="v1.1",Pi="js-integrations",Di="".concat("https://cdn.rudderlabs.com","/").concat(Ri,"/").concat(Pi),xi=["Lax","None","Strict"],Li=["US","EU"],Mi=["oneTrust","ketch"],Bi=["library","consentManagement"],Ni=["none","default","full"],Gi={All:!0};function Fi(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function Ui(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?Oi():function(){var e,t=0,n="";if(!fi||Ai+16>256){for(fi=Array(t=256);t--;)fi[t]=256*Math.random()|0;t=Ai=0}for(;t<16;t++)e=fi[Ai+t],n+=6==t?ki[15&e|64]:8==t?ki[63&e|128]:ki[e],1&t&&t>1&&t<11&&(n+="-");return Ai++,n}()}function ji(){return(new Date).toISOString()}function Ki(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!==n&&void 0!==t[n]&&t[n]!==n&&delete e[n])}))}function Qi(e){Ki(e,bn)}function zi(e){Ki(e,Ti)}function Hi(e,t){var r=[];if(!t||0===t.length)return r;var i=!0;void 0!==e.All&&(i=e.All);var o=[];return"string"==typeof t[0]?t.forEach((function(e){o.push({intgName:e,intObj:e})})):"object"===n(t[0])&&t.forEach((function(e){o.push({intgName:e.name,intObj:e})})),o.forEach((function(t){var n=t.intgName,o=t.intObj;if(i){var s=!0;void 0!==e[n]&&!1===Boolean(e[n])&&(s=!1),s&&r.push(o)}else void 0!==e[n]&&!0===Boolean(e[n])&&r.push(o)})),r}var qi=function(e){return"string"==typeof e||null==e?e:Dn(e)},Vi=function(e){return"string"==typeof e&&e.trim().length>0},Wi=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length>0){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&Li.includes(t.toUpperCase())?t.toUpperCase():void Cn.error("Invalid residencyServer input")}(n),o=r[i]||r.US;if(o){var s=function(e){if(Array.isArray(e)&&e.length>0){var t=e.find((function(e){return!0===e.default}));if(t&&Vi(t.url))return t.url}}(o);if(s)return s}}if(Vi(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}};function Yi(){var e;return(null===(e=document)||void 0===e?void 0:e.referrer)||"$direct"}function Xi(e){var t=e.split("/");return t.length>=3?t[2]:""}function Ji(){for(var e=document.getElementsByTagName("link"),t=0;e[t];t+=1){var n=e[t];if("canonical"===n.getAttribute("rel"))return n.getAttribute("href")}}function $i(){var e=Ji(),t=window.location.pathname;if(e)try{t=new URL(e).pathname}catch(e){}var n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=Ji(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=Yi();return{path:t,referrer:u,referring_domain:Xi(u),search:r,title:o,url:s,tab_url:a,initial_referrer:pi.getInitialReferrer()||"",initial_referring_domain:pi.getInitialReferringDomain()||""}}for(var Zi,eo=o((function e(){r(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.45.1"})),to=o((function e(){r(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.45.1"})),no=o((function e(){r(this,e),this.name="",this.version=""})),ro=o((function e(){r(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),io=o((function e(){var t,n;r(this,e),this.app=new eo,this.traits=null,this.library=new to,this.userAgent=function(){if("undefined"==typeof navigator)return null;var e=navigator.userAgent,t=navigator.brave;if(t&&Object.getPrototypeOf(t).isBrave){var n=e.match(/(chrome)\/([\w.]+)/i);n&&(e="".concat(e," Brave/").concat(n[2]))}return e}(),this.device=null,this.network=null,this.os=new no,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(t=new ro,"undefined"==typeof window||(t.width=window.screen.width,t.height=window.screen.height,t.density=window.devicePixelRatio,t.innerWidth=window.innerWidth,t.innerHeight=window.innerHeight),t),this.timezone=(n=(new Date).toString().match(/([A-Z]+[+-]\d+)/))&&n[1]?n[1]:"NA"})),oo=function(){function e(){r(this,e),this.channel="web",this.context=new io,this.type=null,this.messageId=Ui(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={}}return o(e,[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}]),e}(),so=function(){function e(){r(this,e),this.message=new oo}return o(e,[{key:"setType",value:function(e){this.message.type=e}},{key:"setProperty",value:function(e){this.message.properties=e}},{key:"setUserProperty",value:function(e){this.message.user_properties=e}},{key:"setUserId",value:function(e){this.message.userId=e}},{key:"setEventName",value:function(e){this.message.event=e}},{key:"getElementContent",value:function(){return this.message}}]),e}(),ao=function(){function e(){r(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}return o(e,[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new so;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}]),e}(),uo={},co=256,lo=[];co--;)lo[co]=(co+256).toString(16).substring(1);uo.v4=function(){var e,t=0,n="";if(!Zi||co+16>256){for(Zi=Array(t=256);t--;)Zi[t]=256*Math.random()|0;t=co=0}for(;t<16;t++)e=Zi[co+t],n+=6==t?lo[15&e|64]:8==t?lo[63&e|128]:lo[e],1&t&&t>1&&t<11&&(n+="-");return co++,n};var ho={},fo=Object.prototype.hasOwnProperty,po=String.prototype.charAt,go=Object.prototype.toString,vo=function(e,t){return po.call(e,t)},yo=function(e,t){return fo.call(e,t)},mo=function(e,t){t=t||yo;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},Io=function(e){return null==e?[]:(t=e,"[object String]"===go.call(t)?mo(e,vo):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?mo(e,yo):function(e,t){t=t||yo;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},Ao=Io,ko=uo.v4,bo={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=Ao(this._data).length,t},getItem:function(e){return e in this._data?this._data[e]:null},removeItem:function(e){return e in this._data&&delete this._data[e],this.length=Ao(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return Ao(this._data)[e]}};ho.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=ko();window.localStorage.setItem(e,"test_value");var t=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test_value"===t}catch(e){return!1}}()?window.localStorage:bo,ho.inMemoryEngine=bo;var Eo=Io,Co=Object.prototype.toString,So="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Co.call(e)},Oo=function(e){return null!=e&&(So(e)||"function"!==e&&function(e){var t=n(e);return"number"===t||"object"===t&&"[object Number]"===Co.call(e)}(e.length))},To=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},wo=function(e,t){for(var n=Eo(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},_o=function(e,t){return(Oo(t)?To:wo).call(this,e,t)},Ro=ho.defaultEngine,Po=ho.inMemoryEngine,Do=_o,xo=Io,Lo=JSON;function Mo(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||Ro,this.originalEngine=this.engine}function Bo(e){try{return JSON.stringify(e,(t=[],function(e,r){if("object"!==n(r)||null===r)return r;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(r)?"[Circular Reference]":(t.push(r),r)}))}catch(e){return null}var t}Mo.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,Bo(t))}catch(n){(function(e){var t=!1;if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t})(n)&&(this._swapEngine(),this.set(e,t))}},Mo.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:Lo.parse(t)}catch(e){return null}},Mo.prototype.getOriginalEngine=function(){return this.originalEngine},Mo.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},Mo.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return xo(this.keys).length?(Do((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},Mo.prototype._swapEngine=function(){var e=this;Do((function(t){var n=e.get(t);Po.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=Po};var No=Mo;var Go=_o,Fo={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},Uo=Fo,jo={ASAP:1,RESCHEDULE:2,ABANDON:3};function Ko(){this.tasks={},this.nextId=1}Ko.prototype.now=function(){return+new Uo.Date},Ko.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=Uo.setTimeout(this._handle(r,e,t,n||jo.ASAP),t),r},Ko.prototype.cancel=function(e){this.tasks[e]&&(Uo.clearTimeout(this.tasks[e]),delete this.tasks[e])},Ko.prototype.cancelAll=function(){Go(Uo.clearTimeout,this.tasks),this.tasks={}},Ko.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=jo.RESCHEDULE&&o+2*n<i.now()))return t();r===jo.RESCHEDULE&&i.run(t,n,r)}},Ko.setClock=function(e){Uo=e},Ko.resetClock=function(){Uo=Fo},Ko.Modes=jo;var Qo=Ko,zo=uo.v4,Ho=No,qo=_o,Vo=Qo,Wo=yr("localstorage-retry");function Yo(e,t){return function(){return e.apply(t,arguments)}}function Xo(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=zo(),this.fn=n,this.maxItems=t.maxItems||1/0,this.maxAttempts=t.maxAttempts||1/0,this.backoff={MIN_RETRY_DELAY:t.minRetryDelay||1e3,MAX_RETRY_DELAY:t.maxRetryDelay||3e4,FACTOR:t.backoffFactor||2,JITTER:t.backoffJitter||0},this.timeouts={ACK_TIMER:1e3,RECLAIM_TIMER:3e3,RECLAIM_TIMEOUT:1e4,RECLAIM_WAIT:500},this.keys={IN_PROGRESS:"inProgress",QUEUE:"queue",RECLAIM_START:"reclaimStart",RECLAIM_END:"reclaimEnd",ACK:"ack"},this._schedule=new Vo,this._processId=0,this._store=new Ho(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=Yo(this._ack,this),this._checkReclaim=Yo(this._checkReclaim,this),this._processHead=Yo(this._processHead,this),this._running=!1}g(Xo.prototype),Xo.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},Xo.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},Xo.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},Xo.prototype.getDelay=function(e){var t=this.backoff.MIN_RETRY_DELAY*Math.pow(this.backoff.FACTOR,e);if(this.backoff.JITTER){var n=Math.random(),r=Math.floor(n*this.backoff.JITTER*t);Math.floor(10*n)<5?t-=r:t+=r}return Number(Math.min(t,this.backoff.MAX_RETRY_DELAY).toPrecision(1))},Xo.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:zo()})},Xo.prototype.requeue=function(e,t,n,r){this.shouldRetry(e,t,n)?this._enqueue({item:e,attemptNumber:t,time:this._schedule.now()+this.getDelay(t),id:r||zo()}):this.emit("discard",e,t)},Xo.prototype._enqueue=function(e){var t=this._store.get(this.keys.QUEUE)||[];(t=t.slice(-(this.maxItems-1))).push(e),t=t.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,t),this._running&&this._processHead()},Xo.prototype._processHead=function(){var e=this,t=this._store;this._schedule.cancel(this._processId);var n=t.get(this.keys.QUEUE)||[],r=t.get(this.keys.IN_PROGRESS)||{},i=this._schedule.now(),o=[];function s(n,r){o.push({item:n.item,done:function(i,o){var s=t.get(e.keys.IN_PROGRESS)||{};delete s[r],t.set(e.keys.IN_PROGRESS,s),e.emit("processed",i,o,n.item),i&&e.requeue(n.item,n.attemptNumber+1,i,n.id)}})}for(var a=Object.keys(r).length;n.length&&n[0].time<=i&&a++<e.maxItems;){var u=n.shift(),c=zo();r[c]={item:u.item,attemptNumber:u.attemptNumber,time:e._schedule.now()},s(u,c)}t.set(this.keys.QUEUE,n),t.set(this.keys.IN_PROGRESS,r),qo((function(t){try{e.fn(t.item,t.done)}catch(e){Wo("Process function threw error: "+e)}}),o),n=t.get(this.keys.QUEUE)||[],this._schedule.cancel(this._processId),n.length>0&&(this._processId=this._schedule.run(this._processHead,n[0].time-i,Vo.Modes.ASAP))},Xo.prototype._ack=function(){this._store.set(this.keys.ACK,this._schedule.now()),this._store.set(this.keys.RECLAIM_START,null),this._store.set(this.keys.RECLAIM_END,null),this._schedule.run(this._ack,this.timeouts.ACK_TIMER,Vo.Modes.ASAP)},Xo.prototype._checkReclaim=function(){var e=this;qo((function(t){t.id!==e.id&&(e._schedule.now()-t.get(e.keys.ACK)<e.timeouts.RECLAIM_TIMEOUT||function(t){t.set(e.keys.RECLAIM_START,e.id),t.set(e.keys.ACK,e._schedule.now()),e._schedule.run((function(){t.get(e.keys.RECLAIM_START)===e.id&&(t.set(e.keys.RECLAIM_END,e.id),e._schedule.run((function(){t.get(e.keys.RECLAIM_END)===e.id&&t.get(e.keys.RECLAIM_START)===e.id&&e._reclaim(t.id)}),e.timeouts.RECLAIM_WAIT,Vo.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,Vo.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i);if(null!==o){var s=o.split(".");3===s.length&&s[0]===t&&"ack"===s[2]&&n.push(new Ho(t,s[1],e.keys))}}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,Vo.Modes.RESCHEDULE)},Xo.prototype._reclaim=function(e){var t=this,n=new Ho(this.name,e,this.keys),r={queue:this._store.get(this.keys.QUEUE)||[]},i={inProgress:n.get(this.keys.IN_PROGRESS)||{},queue:n.get(this.keys.QUEUE)||[]},o=[],s=function(e,n){qo((function(e){var i=e.id||zo();o.indexOf(i)>=0?t.emit("duplication",e.item,e.attemptNumber):(r.queue.push({item:e.item,attemptNumber:e.attemptNumber+n,time:t._schedule.now(),id:i}),o.push(i))}),e)};s(i.queue,0),s(i.inProgress,1),r.queue=r.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,r.queue);try{this._clearOtherQueue(n,1)}catch(e){if("NS_ERROR_STORAGE_BUSY"===e.name||"NS_ERROR_STORAGE_BUSY"===e.code||2153971713===e.code)try{this._clearOtherQueue(n,40)}catch(e){console.error(e)}else console.error(e)}this._processHead()},Xo.prototype._clearOtherQueue=function(e,t){var n=this;setTimeout((function(){e.remove(n.keys.IN_PROGRESS),setTimeout((function(){e.remove(n.keys.QUEUE),setTimeout((function(){e.remove(n.keys.RECLAIM_START),setTimeout((function(){e.remove(n.keys.RECLAIM_END),setTimeout((function(){e.remove(n.keys.ACK)}),t)}),t)}),t)}),t)}),t)};var Jo=f(Xo),$o={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},Zo=function(){function e(){r(this,e),this.url="",this.writeKey=""}return o(e,[{key:"init",value:function(e,t,n){var r=this;this.url=t,this.writeKey=e,n&&a($o,n),this.payloadQueue=new Jo("rudder",$o,(function(e,t){e.message.sentAt=ji(),r.processQueueElement(e.url,e.headers,e.message,1e4,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){if(4===o.readyState)if(429===o.status||o.status>=500&&o.status<600){var t="".concat(wn,' "').concat(o.status,'" status text: "').concat(o.statusText,'" for URL: "').concat(e,'"'),n=new Error(t);Ln(n),i(n)}else i(null,o.status)};var a=Dn(n,!0);a?o.send(a):Cn.error("Invalid payload: Event dropped")}catch(e){i(e)}}},{key:"enqueue",value:function(e,t){var n={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(this.writeKey,":"))),AnonymousId:btoa(e.anonymousId)};this.payloadQueue.addItem({url:"".concat(this.url,"/v1/").concat(t),headers:n,message:e})}}]),e}(),es="queue",ts=64e3,ns=function(){function e(){r(this,e),this.storage=Wr,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(es,".").concat(Date.now())}return o(e,[{key:"sendQueueDataForBeacon",value:function(){this.sendDataFromQueueAndDestroyQueue()}},{key:"init",value:function(e,t,n){this.url=t,this.writekey=e,n.maxItems&&(this.maxItems=n.maxItems),n.flushQueueInterval&&(this.flushQueueTimeOutInterval=n.flushQueueInterval),this.sendQueueDataForBeacon=this.sendQueueDataForBeacon.bind(this),this.attachListeners()}},{key:"attachListeners",value:function(){var e=this;window.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.sendQueueDataForBeacon()}))}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0),r=Dn({batch:n},!0);r&&r.length>ts&&(n=t.slice(0,t.length-1),this.flushQueue(n),(t=this.getQueue()).push(e)),this.setQueue(t),this.setTimer(),t.length===this.maxItems&&this.flushQueue(n)}},{key:"sendDataFromQueueAndDestroyQueue",value:function(){this.sendDataFromQueue(),this.storage.remove(this.queueName)}},{key:"sendDataFromQueue",value:function(){var e=this.getQueue();if(e&&e.length>0){var t=e.slice(0,e.length);this.flushQueue(t)}}},{key:"flushQueue",value:function(e){if(e&&e.length>0){e.forEach((function(e){e.sentAt=(new Date).toISOString()}));var t=Dn({batch:e},!0);if(null!==t){var n=new Blob([t],{type:"text/plain"}),r="".concat(this.url,"?writeKey=").concat(this.writekey);try{"function"!=typeof navigator.sendBeacon&&Ln(new Error("Beacon API is not supported by browser")),navigator.sendBeacon(r,n)||Ln(new Error("Unable to queue data to browser's beacon queue"))}catch(e){e.message="".concat(e.message," - While sending Beacon data to: ").concat(r),Ln(e)}}else Cn.error("Invalid payload: Event dropped")}this.setQueue([]),this.clearTimer()}},{key:"setTimer",value:function(){this.timeOutActive||(this.flushQueueTimeOut=setTimeout(this.sendDataFromQueue.bind(this),this.flushQueueTimeOutInterval),this.timeOutActive=!0)}},{key:"clearTimer",value:function(){this.timeOutActive&&(clearTimeout(this.flushQueueTimeOut),this.timeOutActive=!1)}}]),e}(),rs=function(){function e(){r(this,e),this.queue=void 0}return o(e,[{key:"initialize",value:function(e,t,r){var i={},o=Fi(t);r&&r.useBeacon&&navigator.sendBeacon?(r.beaconQueueOptions&&null!=r.beaconQueueOptions&&"object"===n(r.beaconQueueOptions)&&(i=r.beaconQueueOptions),o="".concat(o,"/beacon/v1/batch"),this.queue=new ns):(r&&r.useBeacon&&Cn.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),r&&r.queueOptions&&null!=r.queueOptions&&"object"===n(r.queueOptions)&&(i=r.queueOptions),this.queue=new Zo),this.queue.init(e,o,i)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||ji(),n.sentAt=ji();var r=Dn(n,!0);r&&r.length>32e3&&Cn.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}]),e}(),is=new rs,os={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:1/0},ss=function(){function e(){r(this,e),this.callback=void 0,this.processQueueElements=!1}return o(e,[{key:"init",value:function(e,t){var n=this;e&&a(os,e),t&&(this.callback=t),this.payloadQueue=new Jo("rs_events",os,(function(e,t){n.processQueueElement(e.type,e.rudderElement,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"activateProcessor",value:function(){this.processQueueElements=!0}},{key:"processQueueElement",value:function(e,t,n){try{this.processQueueElements?(Object.setPrototypeOf(t,so.prototype),this.callback(e,t),n(null)):n(new Error("The queue elements are not ready to be processed yet"))}catch(e){n(e)}}},{key:"enqueue",value:function(e,t){this.payloadQueue.addItem({type:e,rudderElement:t})}}]),e}(),as=function(e){for(var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),n=-1,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return(-1^n)>>>0},us={getUserLanguage:function(){return navigator&&navigator.language},getUserAgent:function(){return navigator&&navigator.userAgent}};function cs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.endsWith("..")?e.substr(0,e.length-2):e,decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}var ls=/^[a-zA-Z0-9\-_.]+$/,hs=1,fs=1,ds="*";function ps(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(ds)}(n,r),o=t||0,s=Math.floor(Date.now()/6e4)-o;return as([i,s,e].join(ds)).toString(36)}function gs(e){var t=function(e){var t=e.split(ds),n=t.length%2==0;return t.length<4||!n||Number(t.shift())!==fs?null:{checksum:t.shift(),serializedIds:t.join(ds)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=us.getUserAgent(),r=us.getUserLanguage(),i=0;i<=hs;i+=1)if(ps(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(ds),r=0;r<n.length;r+=2){var i=n[r];if(ls.test(i)){var o=cs(n[r+1]);t[i]=o}}return t}(r):null}var vs=function(){function e(){var t=this;if(r(this,e),s(this,"isInitialized",!1),window.OneTrust&&window.OnetrustActiveGroups){this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var n=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],n.forEach((function(e){var n=e.CustomGroupId,r=e.GroupName;t.userSetConsentGroupIds.includes(n)?t.userSetConsentGroupNames.push(r.toUpperCase().trim()):t.userDeniedConsentGroupIds.push(n)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()})),this.isInitialized=!0}else Cn.error("OneTrust resources are not accessible.")}return o(e,[{key:"isEnabled",value:function(e){var t=this;try{if(!this.isInitialized)return!0;var n=e.oneTrustCookieCategories;if(!n)return!0;var r=n.map((function(e){return e.oneTrustCookieCategory})).filter((function(e){return e}));return r.every((function(e){return t.userSetConsentGroupIds.includes(e.toUpperCase().trim())||t.userSetConsentGroupNames.includes(e.toUpperCase().trim())}))}catch(e){return Cn.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.isInitialized?this.userDeniedConsentGroupIds:[]}}]),e}(),ys=function(){function e(){var t=this;if(r(this,e),s(this,"updatePurposes",(function(e){e&&Object.entries(e).forEach((function(e){var n=e[0];e[1]?t.userConsentedPurposes.push(n):t.userDeniedPurposes.push(n)}))})),this.userConsentedPurposes=[],this.userDeniedPurposes=[],window.updateKetchConsent=function(e){e&&(t.userConsentedPurposes=[],t.userDeniedPurposes=[],t.updatePurposes(e))},window.getKetchUserConsentedPurposes=function(){return t.userConsentedPurposes.slice()},window.getKetchUserDeniedPurposes=function(){return t.userDeniedPurposes.slice()},window.ketchConsent)this.updatePurposes(window.ketchConsent);else{var n=this.getConsent();this.updatePurposes(n)}}return o(e,[{key:"isEnabled",value:function(e){var t=this;try{var n=e.ketchConsentPurposes;if(!n||0===n.length)return!0;var r=n.map((function(e){return e.purpose})).filter((function(e){return e}));return r.some((function(e){return t.userConsentedPurposes.includes(e.trim())}))}catch(e){return Cn.error("Error occured checking ketch consent state ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedPurposes}},{key:"getConsent",value:function(){var e=Hr.get("_ketch_consent_v1_");if(e){var t;try{t=JSON.parse(atob(e))}catch(e){return void Cn.error("Error occurred while parsing consent cookie ".concat(e))}if(t){var n={};return Object.entries(t).forEach((function(e){var t=e[0],r=e[1];r&&r.status&&(n[t]="granted"===r.status)})),n}}}}]),e}(),ms=function(e){var t,n;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new vs:null!=e&&null!==(n=e.ketch)&&void 0!==n&&n.enabled?new ys:null},Is=function(){function e(){r(this,e),this.storage=pi,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}return o(e,[{key:"initialize",value:function(e){try{var t;if(this.sessionInfo.autoTrack=!(!1===(null==e||null===(t=e.sessions)||void 0===t?void 0:t.autoTrack)||this.sessionInfo.manualTrack),null!=e&&e.sessions&&!isNaN(e.sessions.timeout)){var n=e.sessions.timeout;0===n&&(Cn.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&Cn.warn('[Session]:: It is not advised to set "timeout" less than 10 seconds'),this.timeout=n}this.sessionInfo.autoTrack?this.startAutoTracking():!1!==this.sessionInfo.autoTrack||this.sessionInfo.manualTrack||this.end()}catch(e){Ln(e)}}},{key:"isValidSession",value:function(e){return e<=this.sessionInfo.expiresAt}},{key:"generateSessionId",value:function(){return Date.now()}},{key:"startAutoTracking",value:function(){var e=Date.now();this.isValidSession(e)||(this.sessionInfo={},this.sessionInfo.id=e,this.sessionInfo.expiresAt=e+this.timeout,this.sessionInfo.sessionStart=!0,this.sessionInfo.autoTrack=!0),this.storage.setSessionInfo(this.sessionInfo)}},{key:"validateSessionId",value:function(e){if("number"==typeof e&&e%1==0){var t;if(!(((t=e)?t.toString().length:0)<10))return e;Cn.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else Cn.error('[Session]:: "sessionId" should only be a positive integer')}},{key:"start",value:function(e){var t=e?this.validateSessionId(e):this.generateSessionId();this.sessionInfo={id:t||this.generateSessionId(),sessionStart:!0,manualTrack:!0},this.storage.setSessionInfo(this.sessionInfo)}},{key:"getSessionId",value:function(){return this.sessionInfo.autoTrack&&this.isValidSession(Date.now())||this.sessionInfo.manualTrack?this.sessionInfo.id:null}},{key:"end",value:function(){this.sessionInfo={},this.storage.removeSessionInfo()}},{key:"getSessionInfo",value:function(){var e={};if(this.sessionInfo.autoTrack||this.sessionInfo.manualTrack){if(this.sessionInfo.autoTrack){var t=Date.now();this.isValidSession(t)?this.sessionInfo.expiresAt=t+this.timeout:this.startAutoTracking()}this.sessionInfo.sessionStart&&(e.sessionStart=!0,this.sessionInfo.sessionStart=!1),e.sessionId=this.sessionInfo.id,this.storage.setSessionInfo(this.sessionInfo)}return e}},{key:"reset",value:function(){var e=this.sessionInfo,t=e.manualTrack;e.autoTrack?(this.sessionInfo={},this.startAutoTracking()):t&&this.start()}}]),e}(),As=new Is,ks=["integrations","anonymousId","originalTimestamp"],bs=function(e,t,n){var r="";if(n){if(!(r=Fi(n))){var i="CDN base URL for integrations is not valid";throw Ln({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=function(){for(var e,t=document.getElementsByTagName("script"),n=0;n<t.length;n+=1){var r=Fi(t[n].getAttribute("src"));if(r&&r.match(/^.*rudder-analytics?(\.min)?\.js$/)){e=r;break}}return{sdkURL:e}}(),s=o.sdkURL;return r=s?s.split("/").slice(0,-1).concat(Pi).join("/"):Di,t&&(r=r.replace(Ri,e)),r},Es="rs-bugsnag",Cs="bugsnag",Ss=["Bugsnag",Cs],Os="0d96a60df267f4a13f808bbaa54e535c",Ts=["rudder-analytics.min.js","rudder-analytics.js"].concat(u(Object.keys(R).map((function(e){return"".concat(R[e],".min.js")}))),u(Object.keys(R).map((function(e){return"".concat(R[e],".js")})))),ws=function(e){var t=e&&e._client&&e._client._notifier&&e._client._notifier.version;if(!t){var n=e({apiKey:Os,releaseStage:"version-test",beforeSend:function(){return!1}});t=n.notifier&&n.notifier.version,n=void 0}return t&&"6"===t.charAt(0)},_s=function(e){Ss.every((function(e){return!function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}(window,e)}))&&gi(e,"https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js",{isNonNativeSDK:"true",skipDatasetAttributes:!0})},Rs=function(){function e(t,n){r(this,e),this.pluginName=Es,this.sourceId=t,this.onClientReady=n,this.initClientOnLibReadyInterval=void 0,this.init()}return o(e,[{key:"init",value:function(){var e=this;if(!window.RudderStackGlobals||!window.RudderStackGlobals[Rn]){if(!Os.match(/{{.+}}/)){_s(this.pluginName);var t=window[Cs];"function"!=typeof t?(this.initClientOnLibReadyInterval=setInterval((function(){var t=window[Cs];"function"==typeof t&&(ws(t)&&e.initClient(),clearInterval(e.initClientOnLibReadyInterval))}),100),setTimeout((function(){clearInterval(e.initClientOnLibReadyInterval)}),Sn)):ws(t)&&this.initClient()}}}},{key:"initClient",value:function(){var e,t=window[Cs];this.client=t({apiKey:Os,appVersion:"2.45.1",metaData:{SDK:{name:"JS",installType:"npm"}},beforeSend:this.onError(),autoTrackSessions:!1,collectUserIp:!1,enabledBreadcrumbTypes:["error","log","user"],maxEvents:100,releaseStage:(e=window.location.hostname,e&&["www.test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production"),networkBreadcrumbsEnabled:!1}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=dr(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return Ts.includes(n)}(t)&&(function(e,t){e.updateMetaData("source",{metadataSource:t});var n=e.errorMessage;e.context=n,n.includes("error in script loading")&&(e.context="Script load failures"),e.severity="error"}(t,e),!0)}catch(e){return!1}}}},{key:"notify",value:function(e){this.client&&this.client.notify(e)}},{key:"leaveBreadcrumb",value:function(e){this.client&&this.client.leaveBreadcrumb(e)}}]),e}(),Ps=Es,Ds=[Es],xs=function(){function e(t){r(this,e),this.isEnabled=!1,this.providerName=Ps,this.provider=void 0,this.logger=t,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}return o(e,[{key:"init",value:function(e,t){e&&t?!0===function(e){return dr(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return dr(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t)):this.disable():this.logger.error("[Analytics] ErrorReporting :: Invalid configuration or missing source id provided.")}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"setProviderName",value:function(e){e?!e||Ds.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(Ds.join(","))):this.providerName=Ps}},{key:"initProvider",value:function(e,t){if(this.providerName===Es)this.provider=new Rs(t,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.RudderStackGlobals||(window.RudderStackGlobals={}),window.RudderStackGlobals[Rn]=this}},{key:"leaveBreadcrumb",value:function(e){if(this.provider)try{this.provider.leaveBreadcrumb(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: leaveBreadcrumb method ".concat(e.toString()))}}},{key:"notify",value:function(e){if(this.provider)try{this.provider.notify(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: notify method ".concat(e.toString()))}}}]),e}(),Ls=new(function(){function e(){r(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}return o(e,[{key:"init",value:function(e,t,n){this.dataPlaneUrl=Fi(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t,n){this.queue.push({event:e,destinationIds:t,cb:n})}},{key:"sendEventForTransformation",value:function(e,t){var n=this;return new Promise((function(r,i){var o="".concat(n.dataPlaneUrl,"/transform"),s={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(n.writeKey,":")))};try{var a=new XMLHttpRequest;a.open("POST",o,!0),Object.keys(s).forEach((function(e){return a.setRequestHeader(e,s[e])})),a.timeout=1e4,a.onreadystatechange=function(){if(4===a.readyState)try{var o=a.status,s=a.response;switch(o){case 200:return s=JSON.parse(s),void r({status:o,transformedPayload:s.transformedBatch});case 400:var u=s?"".concat(s):"Invalid request payload";return void r({status:o,errorMessage:u});case 404:return void r({status:o});default:if(t>0){var c=t-1;setTimeout((function(){return n.sendEventForTransformation(e,c).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-c))}else r({status:o,errorMessage:"Retries exhausted"})}}catch(e){i(e)}};var u=Dn(e,!0);u?a.send(u):Cn.error("Invalid payload: Event dropped")}catch(e){i(e)}}))}},{key:"checkQueueLengthAndProcess",value:function(){this.queue.length>0&&this.process()}},{key:"process",value:function(){var e=this;this.isTransformationProcessing=!0;var t,n,r=this.queue.shift(),i=(t=r.event,n=r.destinationIds,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),destinationIds:n,event:t.message}]});this.sendEventForTransformation(i,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,r.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){Ln("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,r.cb({status:0}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}]),e}()),Ms=function(){function e(){r(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=pi,this.eventRepository=is,this.preProcessQueue=new ss,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.bufferDataPlaneEventsUntilReady=!1,this.dataPlaneEventsBufferTimeout=1e4,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=Di,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=As,this.version="2.45.1",this.lockIntegrationsVersion=!1,this.errorReporting=new xs(Cn),this.deniedConsentIds=[],this.transformationHandler=Ls}return o(e,[{key:"initializeUser",value:function(e){this.userId=this.storage.getUserId()||"",this.storage.setUserId(this.userId),this.userTraits=this.storage.getUserTraits()||{},this.storage.setUserTraits(this.userTraits),this.groupId=this.storage.getGroupId()||"",this.storage.setGroupId(this.groupId),this.groupTraits=this.storage.getGroupTraits()||{},this.storage.setGroupTraits(this.groupTraits),this.anonymousId=this.getAnonymousId(e),this.storage.setAnonymousId(this.anonymousId)}},{key:"setInitialPageProperties",value:function(){if(null==this.storage.getInitialReferrer()&&null==this.storage.getInitialReferringDomain()){var e=Yi();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(Xi(e))}}},{key:"allModulesInitialized",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(n){e.clientIntegrations.every((function(t){return null!=e.dynamicallyLoadedIntegrations["".concat(R[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(On).then((function(){return e.allModulesInitialized(t+On).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){return window[e]&&window[e][t]&&window[e][t].prototype&&void 0!==window[e][t].prototype.constructor}},{key:"processResponse",value:function(e,t){var r=this;try{var i=t;try{if("string"==typeof t&&(i=JSON.parse(t)),!i||"object"!==n(i)||Array.isArray(i))return void Cn.error("Invalid source configuration")}catch(e){return void Ln(e)}try{window.chrome&&window.chrome.runtime&&window.chrome.runtime.id||this.errorReporting.init(i.source.config,i.source.id)}catch(e){Ln(e)}if(this.serverUrl=Wi(i,this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),i.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config,destinationInfo:{shouldApplyDeviceModeTransformation:e.shouldApplyDeviceModeTransformation||!1,propagateEventsUntransformedOnError:e.propagateEventsUntransformedOnError||!1,destinationId:e.id}})}),this),this.clientIntegrations=Hi(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var o=ms(this.cookieConsentOptions);this.deniedConsentIds=o&&o.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!o||o&&o.isEnabled(e.config)}))}catch(e){Ln(e)}this.loaded=!0,this.options&&"function"==typeof this.options.onLoaded&&this.options.onLoaded(this),function(e){if(e.toBeProcessedArray.length>0)for(;e.toBeProcessedArray.length>0;){var t=u(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,u(t))}}(this),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!!R[e.name]||(Cn.error("[Analytics] Integration:: ".concat(e.name," not available for initialization")),!1)})),this.bufferDataPlaneEventsUntilReady&&setTimeout((function(){r.processBufferedCloudModeEvents()}),this.dataPlaneEventsBufferTimeout),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=R[e.name],n="".concat(t).concat("_RS"),i="".concat(r.destSDKBaseURL,"/").concat(t,".min.js");window.hasOwnProperty(n)||gi(n,i,{isNonNativeSDK:!0});var o=r,s=setInterval((function(){if(o.integrationSDKLoaded(n,t)){var i,a=window[n];clearInterval(s);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(n);r.errorReporting.leaveBreadcrumb(u),(i=new a[t](e.config,o,e.destinationInfo)).init(),o.isInitialized(i).then((function(){o.dynamicallyLoadedIntegrations[n]=a[t]}))}catch(e){var c="[Analytics] 'integration.init()' failed :: ".concat(n," :: ").concat(e.message);Ln(e,c),o.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(s)}),Sn)}));var s=this;this.allModulesInitialized().then((function(){if(!s.clientIntegrations||0===s.clientIntegrations.length)return r.clientIntegrationsReady=!0,r.executeReadyCallback(),void(r.toBeProcessedByIntegrationArray=[]);s.replayEvents(s)}))}catch(e){Ln(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=O(t);e[n](r)}}catch(t){var i="[sendToNative]:: [Destination: ".concat(e.name,"]:: ");Ln(t,i)}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{zi(t.message.integrations);var i=e.map((function(e){return e.destinationId}));this.transformationHandler.enqueue(t,i,(function(i){var o=i.status,s=i.transformedPayload,a=i.errorMessage;e.forEach((function(e){try{switch(o){case 200:var i=s.find((function(t){return t.id===e.destinationId})),u=[];null==i||i.payload.forEach((function(n){if("200"===n.status)u.push(n);else{var r='[DMT]:: Event transformation unsuccessful for destination "'.concat(e.name,'". Reason: '),i="Unknown";"410"===n.status&&(i="Transformation is not available");var o="Dropping the event",s=Cn.error;!0===e.propagateEventsUntransformedOnError&&(o="Sending untransformed event to the destination",s=Cn.warn,u.push({event:t.message})),s("".concat(r," ").concat(i,". ").concat(o,"."))}})),null==u||u.forEach((function(t){Ii(t.event)&&r.sendDataToDestination(e,{message:t.event},n)}));break;case 404:Cn.warn("[DMT]:: Transformation server access is denied. The configuration data seems to be out of sync. Sending untransformed event to the destination."),r.sendDataToDestination(e,t,n);break;default:!0===e.propagateEventsUntransformedOnError?(Cn.warn("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Sending untransformed event.")),r.sendDataToDestination(e,t,n)):Cn.error("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Dropping the event."))}}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),Ln(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),Ln(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],o=[];e.forEach((function(e){!r.IsEventBlackListed(t.message.event,e.name)&&(e.shouldApplyDeviceModeTransformation?o.push(e):i.push(e))})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"queueEventForDataPlane",value:function(e,t){var n=t.message.integrations||{All:!0};t.message.integrations=function(e,t){var n=O(e),r=Object.keys(t).filter((function(e){return!(!0===t[e]&&n[e])})).reduce((function(e,n){return e[n]=t[n],e}),{});return mi(n,r)}(this.integrationsData,n),this.eventRepository.enqueue(t,e)}},{key:"processBufferedCloudModeEvents",value:function(){this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.activateProcessor()}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration,e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=O(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=mi(r,e.getDataForIntegrationsObject())}catch(e){Cn.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback()),this.processBufferedCloudModeEvents(),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&Qi(t[0].message.integrations);var r=Hi(t[0].message.integrations,e.clientIntegrationObjects);i.processAndSendEventsToDeviceMode(r,t[0],n)})),e.toBeProcessedByIntegrationArray=[]}},{key:"pause",value:function(e){return new Promise((function(t){setTimeout(t,e)}))}},{key:"isInitialized",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(r){e.isLoaded()?(t.successfullyLoadedIntegration.push(e),r(t)):n>=Sn?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(On).then((function(){return t.isInitialized(e,n+On).then(r)}))}))}},{key:"page",value:function(e,t,r,i,o){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof i&&(o=i,i=null),"function"==typeof r&&(o=r,i=r=null),"function"==typeof t&&(o=t,i=r=t=null),"function"==typeof e&&(o=e,i=r=t=e=null),"object"===n(e)&&null!=e&&null!=e&&(i=t,r=e,t=e=null),"object"===n(t)&&null!=t&&null!=t&&(i=r,r=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!=e&&this.sendSampleRequest();var s=O(r),a=O(i),u=(new ao).setType("page").build();s||(s={}),t&&(u.message.name=s.name=t),e&&(u.message.category=s.category=e),u.message.properties=this.getPageProperties(s),this.processAndSendDataToDestinations("page",u,a,o)}else this.toBeProcessedArray.push(["page"].concat(Array.prototype.slice.call(arguments)))}},{key:"track",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Track event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null);var i=O(t),o=O(n),s=(new ao).setType("track").build();e&&s.setEventName(e),s.setProperty(i||{}),this.processAndSendDataToDestinations("track",s,o,r)}else this.toBeProcessedArray.push(["track"].concat(Array.prototype.slice.call(arguments)))}},{key:"identify",value:function(e,t,r,i){if(this.errorReporting.leaveBreadcrumb("Identify event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(e)&&(r=t,t=e,e=this.userId);var o=qi(e);o&&this.userId&&o!==this.userId&&this.reset(),this.userId=o,this.storage.setUserId(this.userId);var s=O(t),a=O(r);if(s){for(var u in s)this.userTraits[u]=s[u];this.storage.setUserTraits(this.userTraits)}var c=(new ao).setType("identify").build();this.processAndSendDataToDestinations("identify",c,a,i)}else this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)))}},{key:"alias",value:function(e,t,r,i){if(this.errorReporting.leaveBreadcrumb("Alias event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"function"==typeof e&&(i=e,r=null,t=null,e=null),"object"===n(t)&&(r=t,t=null),"object"===n(e)&&(r=e,t=null,e=null);var o=(new ao).setType("alias").build();o.message.previousId=qi(t)||(this.userId?this.userId:this.getAnonymousId()),o.message.userId=qi(e);var s=O(r);this.processAndSendDataToDestinations("alias",o,s,i)}else this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)))}},{key:"group",value:function(e,t,r,i){if(this.errorReporting.leaveBreadcrumb("Group event"),this.loaded){if(0!==arguments.length){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(e)&&(r=t,t=e,e=this.groupId),"function"==typeof e&&(i=e,r=null,t=null,e=this.groupId),this.groupId=qi(e),this.storage.setGroupId(this.groupId);var o=O(t),s=O(r),a=(new ao).setType("group").build();if(o)for(var u in o)this.groupTraits[u]=o[u];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",a,s,i)}}else this.toBeProcessedArray.push(["group"].concat(Array.prototype.slice.call(arguments)))}},{key:"IsEventBlackListed",value:function(e,t){if(!e||"string"!=typeof e)return!1;var n=bn[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&i.some((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||!o.some((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"shouldUseGlobalIntegrationsConfigInEvents",value:function(){return this.useGlobalIntegrationsConfigInEvents&&this.loadOnlyIntegrations&&Object.keys(this.loadOnlyIntegrations).length>0}},{key:"processAndSendDataToDestinations",value:function(e,n,r,i){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),n.message.context.traits=t({},this.userTraits),n.message.anonymousId=this.anonymousId,n.message.userId=n.message.userId?n.message.userId:this.userId,"group"==e&&(this.groupId&&(n.message.groupId=this.groupId),this.groupTraits&&(n.message.traits=t({},this.groupTraits)));try{var o=this.uSession.getSessionInfo(),s=o.sessionId,a=o.sessionStart;n.message.context.sessionId=s,a&&(n.message.context.sessionStart=!0)}catch(e){Ln(e)}h=this.cookieConsentOptions,f=!1,Object.keys(h).forEach((function(e){Mi.includes(e)&&"boolean"==typeof h[e].enabled&&!0===h[e].enabled&&(f=!0)})),f&&(n.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds||[]}),this.processOptionsParam(n,r),function(e,t){var n=e.properties,r=e.traits,i=e.context;n&&Object.keys(n).forEach((function(e){wi.indexOf(e.toLowerCase())>=0&&Cn.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){wi.indexOf(e.toLowerCase())>=0&&Cn.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var o=i.traits;o&&Object.keys(o).forEach((function(e){wi.indexOf(e.toLowerCase())>=0&&Cn.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(n.message,e);var u=n.message.integrations;u?Qi(u):u=this.shouldUseGlobalIntegrationsConfigInEvents()?this.loadOnlyIntegrations:Gi,n.message.integrations=u;try{n.message.context["ua-ch"]=this.uach}catch(e){Ln(e)}if(this.clientIntegrationObjects){var c=Hi(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,n,e)}else this.toBeProcessedByIntegrationArray.push([e,n]);var l=O(n);zi(l.message.integrations),!this.bufferDataPlaneEventsUntilReady||this.clientIntegrationObjects?this.queueEventForDataPlane(e,l):this.preProcessQueue.enqueue(e,l),i&&"function"==typeof i&&i(l)}catch(e){Ln(e)}var h,f}},{key:"utm",value:function(e){var t={};try{var n=new URL(e),r="utm_";n.searchParams.forEach((function(e,n){if(n.startsWith(r)){var i=n.substring(4);"campaign"===i&&(i="name"),t[i]=e}}))}catch(e){}return t}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;t&&"object"===n(t)&&(e.message.context.campaign=this.utm(window.location.href))}},{key:"processOptionsParam",value:function(e,r){var i=e.message,o=i.type,a=i.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===o?a:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===n(t)&&null!==t&&Object.keys(t).forEach((function(n){ks.includes(n)&&(e[n]=t[n])}))}(e.message,r),e.message.context=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.context;return"object"!==n(r)||null===r||Object.keys(r).forEach((function(e){if(!ks.includes(e)&&!Bi.includes(e))if("context"!==e)i=mi(i,s({},e,r[e]));else if("object"===n(r[e])&&null!==r[e]){var o={};Object.keys(r[e]).forEach((function(t){Bi.includes(t)||(o[t]=r[e][t])})),i=mi(i,t({},o))}else Cn.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),i}(e.message,r)}},{key:"getPageProperties",value:function(e,t){var n=$i(),r=t&&t.page||{};for(var i in n)void 0===e[i]&&(e[i]=r[i]||n[i]);return e}},{key:"getContextPageProperties",value:function(e){var t=$i(),n={};for(var r in t)n[r]=e&&e[r]?e[r]:t[r];return n}},{key:"reset",value:function(e){this.errorReporting.leaveBreadcrumb("reset API :: flag: ".concat(e)),this.loaded?(e&&(this.anonymousId=""),this.userId="",this.userTraits={},this.groupId="",this.groupTraits={},this.uSession.reset(),this.storage.clear(e)):this.toBeProcessedArray.push(["reset",e])}},{key:"getAnonymousId",value:function(e){return this.anonymousId=this.storage.getAnonymousId(e),this.anonymousId||this.setAnonymousId(),this.anonymousId}},{key:"getUserId",value:function(){return this.userId}},{key:"getSessionId",value:function(){return this.uSession.getSessionId()}},{key:"getUserTraits",value:function(){return this.userTraits}},{key:"getGroupId",value:function(){return this.groupId}},{key:"getGroupTraits",value:function(){return this.groupTraits}},{key:"setAnonymousId",value:function(e,t){var n=t?gs(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||Ui(),this.storage.setAnonymousId(this.anonymousId)}},{key:"isValidWriteKey",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isValidServerUrl",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isDatasetAvailable",value:function(){var e=document.createElement("div");return e.setAttribute("data-a-b","c"),!!e.dataset&&"c"===e.dataset.aB}},{key:"loadAfterPolyfill",value:function(e,r,i){var o=this;if("object"===n(r)&&null!==r&&(i=r,r=null),i&&i.logLevel&&(this.logLevel=i.logLevel,Cn.setLogLevel(i.logLevel)),!this.isValidWriteKey(e))throw Error("Unable to load the SDK due to invalid writeKey");if(!this.storage||0===Object.keys(this.storage).length)throw Error("Cannot proceed as no storage is available");i&&i.cookieConsentManager&&(this.cookieConsentOptions=i.cookieConsentManager),this.writeKey=e,this.serverUrl=r,this.options=i;var s={};if(i&&i.setCookieDomain&&(s=t(t({},s),{},{domain:i.setCookieDomain})),i&&"boolean"==typeof i.secureCookie&&(s=t(t({},s),{},{secure:i.secureCookie})),i&&"boolean"==typeof i.sameDomainCookiesOnly&&(s=t(t({},s),{},{sameDomainCookiesOnly:i.sameDomainCookiesOnly})),i&&-1!==xi.indexOf(i.sameSiteCookie)&&(s=t(t({},s),{},{samesite:i.sameSiteCookie})),this.storage.options(s),i&&"string"==typeof i.uaChTrackLevel&&Ni.includes(i.uaChTrackLevel)&&(this.uaChTrackLevel=i.uaChTrackLevel),navigator.userAgentData&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";"none"===t&&e(void 0),"default"===t&&e(navigator.userAgentData),"full"===t&&navigator.userAgentData.getHighEntropyValues(["architecture","bitness","brands","mobile","model","platform","platformVersion","uaFullVersion","fullVersionList","wow64"]).then((function(t){e(t)}))}((function(e){o.uach=e}),this.uaChTrackLevel),i&&i.integrations&&(a(this.loadOnlyIntegrations,i.integrations),Qi(this.loadOnlyIntegrations)),this.useGlobalIntegrationsConfigInEvents=i&&!0===i.useGlobalIntegrationsConfigInEvents,i&&i.sendAdblockPage&&(this.sendAdblockPage=!0),i&&i.sendAdblockPageOptions&&"object"===n(i.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=i.sendAdblockPageOptions),this.uSession.initialize(i),i&&i.clientSuppliedCallbacks){var u={};Object.keys(this.methodToCallbackMapping).forEach((function(e){o.methodToCallbackMapping.hasOwnProperty(e)&&i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]]&&(u[e]=i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]])})),a(this.clientSuppliedCallbacks,u),this.registerCallbacks(!0)}if(i&&null!=i.loadIntegration&&(this.loadIntegration=!!i.loadIntegration),i&&"boolean"==typeof i.bufferDataPlaneEventsUntilReady&&(this.bufferDataPlaneEventsUntilReady=!0===i.bufferDataPlaneEventsUntilReady,this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.init(this.options,this.queueEventForDataPlane.bind(this))),i&&"number"==typeof i.dataPlaneEventsBufferTimeout&&(this.dataPlaneEventsBufferTimeout=i.dataPlaneEventsBufferTimeout),i&&void 0!==i.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===i.lockIntegrationsVersion),this.initializeUser(i?i.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.destSDKBaseURL=bs(this.version,this.lockIntegrationsVersion,i&&i.destSDKBaseURL),i&&i.getSourceConfig)if("function"!=typeof i.getSourceConfig)Ln(new Error('option "getSourceConfig" must be a function'));else{var c=i.getSourceConfig();c instanceof Promise?c.then((function(e){return o.processResponse(200,e)})).catch(Ln):this.processResponse(200,c)}else{var l=function(e){return _i.concat(_i.includes("?")?"&":"?").concat(e?"writeKey=".concat(e):"")}(e);i&&i.configUrl&&(l=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(Fi(n),"/sourceConfig/")),n="/"===n.slice(-1)?n:"".concat(n,"/");var r=t.split("?")[1],i=n.split("?");return i.length>1&&i[1]!==r?"".concat(i[0],"?").concat(r):"".concat(n,"?").concat(r)}(i.configUrl,l));try{!function(e,t,n,r){var i=r.bind(e),o=new XMLHttpRequest;o.open("GET",t,!0),o.setRequestHeader("Authorization","Basic ".concat(btoa("".concat(n,":")))),o.onload=function(){var e=o.status,n=o.responseText;200===e?i(200,n):(Ln(new Error("".concat(wn," ").concat(e," for url: ").concat(t))),i(e))},o.send()}(this,l,e,this.processResponse)}catch(e){Ln(e)}}}},{key:"arePolyfillsRequired",value:function(e){return(!e||"boolean"!=typeof e.polyfillIfRequired||e.polyfillIfRequired)&&(!String.prototype.endsWith||!String.prototype.startsWith||!String.prototype.includes||!Array.prototype.find||!Array.prototype.includes||"function"!=typeof window.URL||"undefined"==typeof Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable()||"function"!=typeof TextDecoder||"function"!=typeof TextEncoder)}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=O(n);if(this.arePolyfillsRequired(r)){var i="polyfill";gi(i,"https://polyfill.io/v3/polyfill.min.js?version=3.111.0&features=Number.isNaN%2CURL%2CArray.prototype.find%2CArray.prototype.includes%2CPromise%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CObject.entries%2CObject.values%2CElement.prototype.dataset%2CString.prototype.replaceAll%2CTextEncoder%2Cnavigator.sendBeacon",{skipDatasetAttributes:!0});var o=this,s=setInterval((function(){!window.hasOwnProperty(i)&&null===document.getElementById(i)||"undefined"==typeof Promise||(clearInterval(s),o.loadAfterPolyfill(e,t,r))}),100);setTimeout((function(){clearInterval(s)}),Sn)}else this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?Cn.error("ready callback is not a function"):this.clientIntegrationsReady?e():this.readyCallbacks.push(e):this.toBeProcessedArray.push(["ready",e])}},{key:"initializeCallbacks",value:function(){var e=this;Object.keys(this.methodToCallbackMapping).forEach((function(t){e.methodToCallbackMapping.hasOwnProperty(t)&&e.on(t,(function(){}))}))}},{key:"registerCallbacks",value:function(e){var t=this;e||Object.keys(this.methodToCallbackMapping).forEach((function(e){t.methodToCallbackMapping.hasOwnProperty(e)&&window.rudderanalytics&&"function"==typeof window.rudderanalytics[t.methodToCallbackMapping[e]]&&(t.clientSuppliedCallbacks[e]=window.rudderanalytics[t.methodToCallbackMapping[e]])})),Object.keys(this.clientSuppliedCallbacks).forEach((function(e){t.clientSuppliedCallbacks.hasOwnProperty(e)&&t.on(e,t.clientSuppliedCallbacks[e])}))}},{key:"sendSampleRequest",value:function(){gi("ad-block","//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",{isNonNativeSDK:!0})}},{key:"startSession",value:function(e){this.uSession.start(e)}},{key:"endSession",value:function(){this.uSession.end()}},{key:"setAuthToken",value:function(e){"string"==typeof e?(this.storage.setAuthToken(e),this.transformationHandler.setAuthToken(e)):Cn.error("Provided input should be in string format")}}]),e}(),Bs=new Ms;v(Bs),window.addEventListener("error",(function(e){Ln(e,void 0,Bs)}),!0),Bs.initializeCallbacks(),Bs.registerCallbacks(!1);var Ns,Gs="load",Fs=window.rudderanalytics,Us=Array.isArray(Fs);if(Us)for(var js=0;js<Fs.length;){if(Fs[js]&&Fs[js][0]===Gs){Ns=Fs[js],Fs.splice(js,1);break}js+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=function(e){var t={};try{new URL(e).searchParams.forEach((function(e,n){t[n]=e}))}catch(e){}return t}(e);i.ajs_aid&&Bs.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&Bs.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&Bs.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.href),Us&&Fs.forEach((function(e){return Bs.toBeProcessedArray.push(e)})),Ns&&Ns.length>0&&(Ns.shift(),Bs[Gs].apply(Bs,u(Ns)));var Ks=Bs.ready.bind(Bs),Qs=Bs.identify.bind(Bs),zs=Bs.page.bind(Bs),Hs=Bs.track.bind(Bs),qs=Bs.alias.bind(Bs),Vs=Bs.group.bind(Bs),Ws=Bs.reset.bind(Bs),Ys=Bs.load.bind(Bs),Xs=Bs.initialized=!0,Js=Bs.getUserId.bind(Bs),$s=Bs.getSessionId.bind(Bs),Zs=Bs.getUserTraits.bind(Bs),ea=Bs.getAnonymousId.bind(Bs),ta=Bs.setAnonymousId.bind(Bs),na=Bs.getGroupId.bind(Bs),ra=Bs.getGroupTraits.bind(Bs),ia=Bs.startSession.bind(Bs),oa=Bs.endSession.bind(Bs),sa=Bs.setAuthToken.bind(Bs);exports.alias=qs,exports.endSession=oa,exports.getAnonymousId=ea,exports.getGroupId=na,exports.getGroupTraits=ra,exports.getSessionId=$s,exports.getUserId=Js,exports.getUserTraits=Zs,exports.group=Vs,exports.identify=Qs,exports.initialized=Xs,exports.load=Ys,exports.page=zs,exports.ready=Ks,exports.reset=Ws,exports.setAnonymousId=ta,exports.setAuthToken=sa,exports.startSession=ia,exports.track=Hs;
|