rozmova-analytics 1.1.52 → 1.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -23
- package/dist/index.cjs +10 -31
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +10 -31
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,7 +72,6 @@ Initializes the analytics library, setting up Mixpanel, Google Analytics, Custom
|
|
|
72
72
|
- `config.locale?: string` - The locale for analytics data (default: auto-detected or "uk")
|
|
73
73
|
- `config.platform?: string` - The platform identifier (default: "web")
|
|
74
74
|
- `config.isClearly?: boolean` - Whether to enable Clearly-specific features like cookie consent banner
|
|
75
|
-
- `config.trackPageScroll?: boolean` - Whether to automatically track page scroll to bottom (default: true)
|
|
76
75
|
- `config.config?: object` - Initial configuration object with userId and email
|
|
77
76
|
- `config.config.userId?: string` - Initial user ID
|
|
78
77
|
- `config.config.email?: string` - Initial user email
|
|
@@ -188,28 +187,6 @@ Updates the locale for analytics data.
|
|
|
188
187
|
Analytics.setLocale("es");
|
|
189
188
|
```
|
|
190
189
|
|
|
191
|
-
### `trackPageScroll(bodyElementQuerySelector?)`
|
|
192
|
-
|
|
193
|
-
Tracks a `page_scroll` event in Mixpanel when the user scrolls to the bottom of the page. Called automatically during `init()` unless `trackPageScroll` is set to `false`.
|
|
194
|
-
|
|
195
|
-
**Parameters:**
|
|
196
|
-
- `customElement?: HTMLElement` - Optional scrollable HTML element to track. If not provided, defaults to tracking the window scroll against `document.body`.
|
|
197
|
-
|
|
198
|
-
**Returns:** `() => void` - A cleanup function that removes the scroll listener.
|
|
199
|
-
|
|
200
|
-
**Example:**
|
|
201
|
-
```javascript
|
|
202
|
-
// Automatically tracked during init (default behavior)
|
|
203
|
-
Analytics.init({ locale: "en", platform: "web" });
|
|
204
|
-
|
|
205
|
-
// Disable automatic tracking and call manually
|
|
206
|
-
Analytics.init({ locale: "en", trackPageScroll: false });
|
|
207
|
-
const cleanup = Analytics.trackPageScroll(document.querySelector(".main-content"));
|
|
208
|
-
|
|
209
|
-
// Remove the scroll listener when no longer needed
|
|
210
|
-
cleanup();
|
|
211
|
-
```
|
|
212
|
-
|
|
213
190
|
### `trackPageView(options?)`
|
|
214
191
|
|
|
215
192
|
Tracks a page view event with current page information including title, location, and referrer.
|
package/dist/index.cjs
CHANGED
|
@@ -251,8 +251,8 @@ function b64EncodeUnicode(str) {
|
|
|
251
251
|
)
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
|
-
var getAPIEndpoint = (isProd, endpoint) => {
|
|
255
|
-
const baseURL = isProd ? "https://trp.rozmova.me" : "https://stage.trp.rozmova.me";
|
|
254
|
+
var getAPIEndpoint = (isProd, isClearly, endpoint) => {
|
|
255
|
+
const baseURL = isProd ? isClearly ? "https://trp.clearly.help" : "https://trp.rozmova.me" : isClearly ? "https://stage.trp.clearly.help" : "https://stage.trp.rozmova.me";
|
|
256
256
|
return baseURL + endpoint;
|
|
257
257
|
};
|
|
258
258
|
var isNewSession = (prevSessionIdKey) => {
|
|
@@ -652,8 +652,8 @@ var initCookieConsentBanner = (lng, isClearly) => {
|
|
|
652
652
|
--cc-font-family: "Inter", sans-serif;
|
|
653
653
|
|
|
654
654
|
/** Change button primary color to black **/
|
|
655
|
-
--cc-btn-primary-bg: #
|
|
656
|
-
--cc-btn-primary-border-color: #
|
|
655
|
+
--cc-btn-primary-bg: #486AF1;
|
|
656
|
+
--cc-btn-primary-border-color: #486AF1;
|
|
657
657
|
}
|
|
658
658
|
`;
|
|
659
659
|
document.head.appendChild(style);
|
|
@@ -669,13 +669,13 @@ var Analytics = class {
|
|
|
669
669
|
dataLayer = [];
|
|
670
670
|
lastGConfig = {};
|
|
671
671
|
mxDistinctId = null;
|
|
672
|
+
isClearly = false;
|
|
672
673
|
async init({
|
|
673
674
|
isProd,
|
|
674
675
|
locale,
|
|
675
676
|
platform,
|
|
676
677
|
isClearly,
|
|
677
678
|
config,
|
|
678
|
-
trackPageScroll = true,
|
|
679
679
|
mixpanelConfig = {}
|
|
680
680
|
} = {}) {
|
|
681
681
|
insertCustomerIOScript();
|
|
@@ -685,6 +685,7 @@ var Analytics = class {
|
|
|
685
685
|
setQueryParam(USER_ID_KEY, userId);
|
|
686
686
|
}
|
|
687
687
|
if (typeof isProd === "boolean") this.isProd = isProd;
|
|
688
|
+
if (typeof isClearly === "boolean") this.isClearly = isClearly;
|
|
688
689
|
if (locale) this.locale = locale;
|
|
689
690
|
else this.locale = getLocaleFromURL(isClearly);
|
|
690
691
|
if (platform) this.platform = platform;
|
|
@@ -701,7 +702,6 @@ var Analytics = class {
|
|
|
701
702
|
this.setConfig(config);
|
|
702
703
|
this.trackPageView();
|
|
703
704
|
initialLoginEvent(this.trackEvent.bind(this));
|
|
704
|
-
if (trackPageScroll) this.trackPageScroll();
|
|
705
705
|
this.initialized = true;
|
|
706
706
|
this.processDataLayer();
|
|
707
707
|
}
|
|
@@ -711,12 +711,12 @@ var Analytics = class {
|
|
|
711
711
|
const eventIndex = this.dataLayer.findIndex((event) => event.eventName === priorityEvent);
|
|
712
712
|
if (eventIndex !== -1) {
|
|
713
713
|
const event = this.dataLayer.splice(eventIndex, 1)[0];
|
|
714
|
-
this.trackEvent(event.eventName, event.eventParams);
|
|
714
|
+
this.trackEvent(event.eventName, event.eventParams, event.services);
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
while (this.dataLayer.length > 0) {
|
|
718
718
|
const event = this.dataLayer.shift();
|
|
719
|
-
this.trackEvent(event?.eventName, event?.eventParams);
|
|
719
|
+
this.trackEvent(event?.eventName, event?.eventParams, event?.services);
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
async getGAClientId() {
|
|
@@ -729,7 +729,7 @@ var Analytics = class {
|
|
|
729
729
|
customerIO: true
|
|
730
730
|
}) {
|
|
731
731
|
if (!this.initialized) {
|
|
732
|
-
this.dataLayer.push({ eventName, eventParams: properties });
|
|
732
|
+
this.dataLayer.push({ eventName, eventParams: properties, services });
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
735
|
const commonParams = this.getCommonParams();
|
|
@@ -892,27 +892,6 @@ var Analytics = class {
|
|
|
892
892
|
}
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
|
-
trackPageScroll(customElement) {
|
|
896
|
-
const handleScroll = () => {
|
|
897
|
-
const scrollTop = customElement ? customElement.scrollTop : window.scrollY || document.documentElement.scrollTop;
|
|
898
|
-
const scrollHeight = customElement ? customElement.scrollHeight : document.documentElement.scrollHeight;
|
|
899
|
-
const clientHeight = customElement ? customElement.clientHeight : window.innerHeight;
|
|
900
|
-
if (scrollTop + clientHeight >= scrollHeight) {
|
|
901
|
-
this.trackEvent(
|
|
902
|
-
"page_scroll",
|
|
903
|
-
{
|
|
904
|
-
page_path: location.pathname,
|
|
905
|
-
page_title: document.title,
|
|
906
|
-
scroll_depth: 100
|
|
907
|
-
},
|
|
908
|
-
{ mixpanel: true }
|
|
909
|
-
);
|
|
910
|
-
}
|
|
911
|
-
};
|
|
912
|
-
const scrollTarget = customElement || window;
|
|
913
|
-
scrollTarget.addEventListener("scroll", handleScroll);
|
|
914
|
-
return () => scrollTarget.removeEventListener("scroll", handleScroll);
|
|
915
|
-
}
|
|
916
895
|
start_session_recording = () => import_mixpanel_browser.default.start_session_recording();
|
|
917
896
|
stop_session_recording = () => import_mixpanel_browser.default.stop_session_recording();
|
|
918
897
|
async trackFirstPartyEvent(eventName, properties, forcedAttributionProperties) {
|
|
@@ -923,7 +902,7 @@ var Analytics = class {
|
|
|
923
902
|
"X-Attribution": attributionJSONbase64,
|
|
924
903
|
"Content-Type": "application/json"
|
|
925
904
|
});
|
|
926
|
-
const endpoint = getAPIEndpoint(this.isProd, "/api/analytics/track");
|
|
905
|
+
const endpoint = getAPIEndpoint(this.isProd, this.isClearly, "/api/analytics/track");
|
|
927
906
|
return await fetch(endpoint, {
|
|
928
907
|
body: JSON.stringify({ eventName, eventParams: properties }),
|
|
929
908
|
method: "POST",
|
package/dist/index.d.cts
CHANGED
|
@@ -70,6 +70,11 @@ type ForcedAttributionProperties = {
|
|
|
70
70
|
funnelName?: string;
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
type EventServices = {
|
|
74
|
+
ga?: boolean;
|
|
75
|
+
mixpanel?: boolean;
|
|
76
|
+
customerIO?: boolean;
|
|
77
|
+
};
|
|
73
78
|
type GConfig = {
|
|
74
79
|
userId?: string;
|
|
75
80
|
email?: string;
|
|
@@ -82,23 +87,19 @@ declare class Analytics {
|
|
|
82
87
|
private dataLayer;
|
|
83
88
|
private lastGConfig;
|
|
84
89
|
private mxDistinctId;
|
|
85
|
-
|
|
90
|
+
private isClearly;
|
|
91
|
+
init({ isProd, locale, platform, isClearly, config, mixpanelConfig, }?: {
|
|
86
92
|
isProd?: boolean;
|
|
87
93
|
locale?: string;
|
|
88
94
|
platform?: string;
|
|
89
95
|
isClearly?: boolean;
|
|
90
96
|
config?: GConfig;
|
|
91
|
-
trackPageScroll?: boolean;
|
|
92
97
|
mixpanelConfig?: Partial<Config>;
|
|
93
98
|
}): Promise<void>;
|
|
94
99
|
private processDataLayer;
|
|
95
100
|
getGAClientId(): Promise<string | null>;
|
|
96
101
|
setGAClientId: (clientId: string) => void;
|
|
97
|
-
trackEvent(eventName: string, properties?: EventParams, services?:
|
|
98
|
-
ga?: boolean;
|
|
99
|
-
mixpanel?: boolean;
|
|
100
|
-
customerIO?: boolean;
|
|
101
|
-
}): Promise<void>;
|
|
102
|
+
trackEvent(eventName: string, properties?: EventParams, services?: EventServices): Promise<void>;
|
|
102
103
|
private setConfig;
|
|
103
104
|
trackPageView({ referrer }?: {
|
|
104
105
|
referrer?: string;
|
|
@@ -118,7 +119,6 @@ declare class Analytics {
|
|
|
118
119
|
resetUser(): void;
|
|
119
120
|
getUserId: () => string;
|
|
120
121
|
getAttributionProperties(forcedAttributionProperties?: ForcedAttributionProperties): Promise<UserAttributionProperties>;
|
|
121
|
-
trackPageScroll(customElement?: HTMLElement): () => void;
|
|
122
122
|
start_session_recording: () => void;
|
|
123
123
|
stop_session_recording: () => void;
|
|
124
124
|
trackFirstPartyEvent(eventName: string, properties?: EventParams, forcedAttributionProperties?: ForcedAttributionProperties): Promise<Response>;
|
package/dist/index.d.ts
CHANGED
|
@@ -70,6 +70,11 @@ type ForcedAttributionProperties = {
|
|
|
70
70
|
funnelName?: string;
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
type EventServices = {
|
|
74
|
+
ga?: boolean;
|
|
75
|
+
mixpanel?: boolean;
|
|
76
|
+
customerIO?: boolean;
|
|
77
|
+
};
|
|
73
78
|
type GConfig = {
|
|
74
79
|
userId?: string;
|
|
75
80
|
email?: string;
|
|
@@ -82,23 +87,19 @@ declare class Analytics {
|
|
|
82
87
|
private dataLayer;
|
|
83
88
|
private lastGConfig;
|
|
84
89
|
private mxDistinctId;
|
|
85
|
-
|
|
90
|
+
private isClearly;
|
|
91
|
+
init({ isProd, locale, platform, isClearly, config, mixpanelConfig, }?: {
|
|
86
92
|
isProd?: boolean;
|
|
87
93
|
locale?: string;
|
|
88
94
|
platform?: string;
|
|
89
95
|
isClearly?: boolean;
|
|
90
96
|
config?: GConfig;
|
|
91
|
-
trackPageScroll?: boolean;
|
|
92
97
|
mixpanelConfig?: Partial<Config>;
|
|
93
98
|
}): Promise<void>;
|
|
94
99
|
private processDataLayer;
|
|
95
100
|
getGAClientId(): Promise<string | null>;
|
|
96
101
|
setGAClientId: (clientId: string) => void;
|
|
97
|
-
trackEvent(eventName: string, properties?: EventParams, services?:
|
|
98
|
-
ga?: boolean;
|
|
99
|
-
mixpanel?: boolean;
|
|
100
|
-
customerIO?: boolean;
|
|
101
|
-
}): Promise<void>;
|
|
102
|
+
trackEvent(eventName: string, properties?: EventParams, services?: EventServices): Promise<void>;
|
|
102
103
|
private setConfig;
|
|
103
104
|
trackPageView({ referrer }?: {
|
|
104
105
|
referrer?: string;
|
|
@@ -118,7 +119,6 @@ declare class Analytics {
|
|
|
118
119
|
resetUser(): void;
|
|
119
120
|
getUserId: () => string;
|
|
120
121
|
getAttributionProperties(forcedAttributionProperties?: ForcedAttributionProperties): Promise<UserAttributionProperties>;
|
|
121
|
-
trackPageScroll(customElement?: HTMLElement): () => void;
|
|
122
122
|
start_session_recording: () => void;
|
|
123
123
|
stop_session_recording: () => void;
|
|
124
124
|
trackFirstPartyEvent(eventName: string, properties?: EventParams, forcedAttributionProperties?: ForcedAttributionProperties): Promise<Response>;
|
package/dist/index.js
CHANGED
|
@@ -217,8 +217,8 @@ function b64EncodeUnicode(str) {
|
|
|
217
217
|
)
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
|
-
var getAPIEndpoint = (isProd, endpoint) => {
|
|
221
|
-
const baseURL = isProd ? "https://trp.rozmova.me" : "https://stage.trp.rozmova.me";
|
|
220
|
+
var getAPIEndpoint = (isProd, isClearly, endpoint) => {
|
|
221
|
+
const baseURL = isProd ? isClearly ? "https://trp.clearly.help" : "https://trp.rozmova.me" : isClearly ? "https://stage.trp.clearly.help" : "https://stage.trp.rozmova.me";
|
|
222
222
|
return baseURL + endpoint;
|
|
223
223
|
};
|
|
224
224
|
var isNewSession = (prevSessionIdKey) => {
|
|
@@ -618,8 +618,8 @@ var initCookieConsentBanner = (lng, isClearly) => {
|
|
|
618
618
|
--cc-font-family: "Inter", sans-serif;
|
|
619
619
|
|
|
620
620
|
/** Change button primary color to black **/
|
|
621
|
-
--cc-btn-primary-bg: #
|
|
622
|
-
--cc-btn-primary-border-color: #
|
|
621
|
+
--cc-btn-primary-bg: #486AF1;
|
|
622
|
+
--cc-btn-primary-border-color: #486AF1;
|
|
623
623
|
}
|
|
624
624
|
`;
|
|
625
625
|
document.head.appendChild(style);
|
|
@@ -635,13 +635,13 @@ var Analytics = class {
|
|
|
635
635
|
dataLayer = [];
|
|
636
636
|
lastGConfig = {};
|
|
637
637
|
mxDistinctId = null;
|
|
638
|
+
isClearly = false;
|
|
638
639
|
async init({
|
|
639
640
|
isProd,
|
|
640
641
|
locale,
|
|
641
642
|
platform,
|
|
642
643
|
isClearly,
|
|
643
644
|
config,
|
|
644
|
-
trackPageScroll = true,
|
|
645
645
|
mixpanelConfig = {}
|
|
646
646
|
} = {}) {
|
|
647
647
|
insertCustomerIOScript();
|
|
@@ -651,6 +651,7 @@ var Analytics = class {
|
|
|
651
651
|
setQueryParam(USER_ID_KEY, userId);
|
|
652
652
|
}
|
|
653
653
|
if (typeof isProd === "boolean") this.isProd = isProd;
|
|
654
|
+
if (typeof isClearly === "boolean") this.isClearly = isClearly;
|
|
654
655
|
if (locale) this.locale = locale;
|
|
655
656
|
else this.locale = getLocaleFromURL(isClearly);
|
|
656
657
|
if (platform) this.platform = platform;
|
|
@@ -667,7 +668,6 @@ var Analytics = class {
|
|
|
667
668
|
this.setConfig(config);
|
|
668
669
|
this.trackPageView();
|
|
669
670
|
initialLoginEvent(this.trackEvent.bind(this));
|
|
670
|
-
if (trackPageScroll) this.trackPageScroll();
|
|
671
671
|
this.initialized = true;
|
|
672
672
|
this.processDataLayer();
|
|
673
673
|
}
|
|
@@ -677,12 +677,12 @@ var Analytics = class {
|
|
|
677
677
|
const eventIndex = this.dataLayer.findIndex((event) => event.eventName === priorityEvent);
|
|
678
678
|
if (eventIndex !== -1) {
|
|
679
679
|
const event = this.dataLayer.splice(eventIndex, 1)[0];
|
|
680
|
-
this.trackEvent(event.eventName, event.eventParams);
|
|
680
|
+
this.trackEvent(event.eventName, event.eventParams, event.services);
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
while (this.dataLayer.length > 0) {
|
|
684
684
|
const event = this.dataLayer.shift();
|
|
685
|
-
this.trackEvent(event?.eventName, event?.eventParams);
|
|
685
|
+
this.trackEvent(event?.eventName, event?.eventParams, event?.services);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
async getGAClientId() {
|
|
@@ -695,7 +695,7 @@ var Analytics = class {
|
|
|
695
695
|
customerIO: true
|
|
696
696
|
}) {
|
|
697
697
|
if (!this.initialized) {
|
|
698
|
-
this.dataLayer.push({ eventName, eventParams: properties });
|
|
698
|
+
this.dataLayer.push({ eventName, eventParams: properties, services });
|
|
699
699
|
return;
|
|
700
700
|
}
|
|
701
701
|
const commonParams = this.getCommonParams();
|
|
@@ -858,27 +858,6 @@ var Analytics = class {
|
|
|
858
858
|
}
|
|
859
859
|
};
|
|
860
860
|
}
|
|
861
|
-
trackPageScroll(customElement) {
|
|
862
|
-
const handleScroll = () => {
|
|
863
|
-
const scrollTop = customElement ? customElement.scrollTop : window.scrollY || document.documentElement.scrollTop;
|
|
864
|
-
const scrollHeight = customElement ? customElement.scrollHeight : document.documentElement.scrollHeight;
|
|
865
|
-
const clientHeight = customElement ? customElement.clientHeight : window.innerHeight;
|
|
866
|
-
if (scrollTop + clientHeight >= scrollHeight) {
|
|
867
|
-
this.trackEvent(
|
|
868
|
-
"page_scroll",
|
|
869
|
-
{
|
|
870
|
-
page_path: location.pathname,
|
|
871
|
-
page_title: document.title,
|
|
872
|
-
scroll_depth: 100
|
|
873
|
-
},
|
|
874
|
-
{ mixpanel: true }
|
|
875
|
-
);
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
const scrollTarget = customElement || window;
|
|
879
|
-
scrollTarget.addEventListener("scroll", handleScroll);
|
|
880
|
-
return () => scrollTarget.removeEventListener("scroll", handleScroll);
|
|
881
|
-
}
|
|
882
861
|
start_session_recording = () => mixpanel.start_session_recording();
|
|
883
862
|
stop_session_recording = () => mixpanel.stop_session_recording();
|
|
884
863
|
async trackFirstPartyEvent(eventName, properties, forcedAttributionProperties) {
|
|
@@ -889,7 +868,7 @@ var Analytics = class {
|
|
|
889
868
|
"X-Attribution": attributionJSONbase64,
|
|
890
869
|
"Content-Type": "application/json"
|
|
891
870
|
});
|
|
892
|
-
const endpoint = getAPIEndpoint(this.isProd, "/api/analytics/track");
|
|
871
|
+
const endpoint = getAPIEndpoint(this.isProd, this.isClearly, "/api/analytics/track");
|
|
893
872
|
return await fetch(endpoint, {
|
|
894
873
|
body: JSON.stringify({ eventName, eventParams: properties }),
|
|
895
874
|
method: "POST",
|
package/dist/index.umd.js
CHANGED
|
@@ -90,7 +90,7 @@ End of stack for Error object`:u.name+": "+u.message}return u});function o(a){re
|
|
|
90
90
|
`+h+"]":"["+g.join(",")+"]",s=h,l}for(c in d)Ko.call(d,c)&&(l=e(c,d),l&&g.push(i(c)+(s?": ":":")+l));return l=g.length===0?"{}":s?"{"+g.join(",")+h+"}":"{"+g.join(",")+"}",s=h,l}};return e("",{"":n})}})();p.JSONDecode=(function(){var t,n,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
91
91
|
`,r:"\r",t:" "},e,r=function(g){var d=new SyntaxError(g);throw d.at=t,d.text=e,d},o=function(g){return g&&g!==n&&r("Expected '"+g+"' instead of '"+n+"'"),n=e.charAt(t),t+=1,n},s=function(){var g,d="";for(n==="-"&&(d="-",o("-"));n>="0"&&n<="9";)d+=n,o();if(n===".")for(d+=".";o()&&n>="0"&&n<="9";)d+=n;if(n==="e"||n==="E")for(d+=n,o(),(n==="-"||n==="+")&&(d+=n,o());n>="0"&&n<="9";)d+=n,o();if(g=+d,!isFinite(g))r("Bad number");else return g},a=function(){var g,d,m="",v;if(n==='"')for(;o();){if(n==='"')return o(),m;if(n==="\\")if(o(),n==="u"){for(v=0,d=0;d<4&&(g=parseInt(o(),16),!!isFinite(g));d+=1)v=v*16+g;m+=String.fromCharCode(v)}else if(typeof i[n]=="string")m+=i[n];else break;else m+=n}r("Bad string")},u=function(){for(;n&&n<=" ";)o()},c=function(){switch(n){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}r('Unexpected "'+n+'"')},l,f=function(){var g=[];if(n==="["){if(o("["),u(),n==="]")return o("]"),g;for(;n;){if(g.push(l()),u(),n==="]")return o("]"),g;o(","),u()}}r("Bad array")},h=function(){var g,d={};if(n==="{"){if(o("{"),u(),n==="}")return o("}"),d;for(;n;){if(g=a(),u(),o(":"),Object.hasOwnProperty.call(d,g)&&r('Duplicate key "'+g+'"'),d[g]=l(),u(),n==="}")return o("}"),d;o(","),u()}}r("Bad object")};return l=function(){switch(u(),n){case"{":return h();case"[":return f();case'"':return a();case"-":return s();default:return n>="0"&&n<="9"?s():c()}},function(g){var d;return e=g,t=0,n=" ",d=l(),u(),n&&r("Syntax error"),d}})();p.base64Encode=function(t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i,e,r,o,s,a,u,c,l=0,f=0,h="",g=[];if(!t)return t;t=p.utf8Encode(t);do i=t.charCodeAt(l++),e=t.charCodeAt(l++),r=t.charCodeAt(l++),c=i<<16|e<<8|r,o=c>>18&63,s=c>>12&63,a=c>>6&63,u=c&63,g[f++]=n.charAt(o)+n.charAt(s)+n.charAt(a)+n.charAt(u);while(l<t.length);switch(h=g.join(""),t.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"=";break}return h};p.utf8Encode=function(t){t=(t+"").replace(/\r\n/g,`
|
|
92
92
|
`).replace(/\r/g,`
|
|
93
|
-
`);var n="",i,e,r=0,o;for(i=e=0,r=t.length,o=0;o<r;o++){var s=t.charCodeAt(o),a=null;s<128?e++:s>127&&s<2048?a=String.fromCharCode(s>>6|192,s&63|128):a=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),a!==null&&(e>i&&(n+=t.substring(i,e)),n+=a,i=e=o+1)}return e>i&&(n+=t.substring(i,t.length)),n};p.UUID=function(){try{return E.crypto.randomUUID()}catch{for(var t=new Array(36),n=0;n<36;n++)t[n]=Math.floor(Math.random()*16);return t[14]=4,t[19]=t[19]&=-5,t[19]=t[19]|=8,t[8]=t[13]=t[18]=t[23]="-",p.map(t,function(e){return e.toString(16)}).join("")}};var cf=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];p.isBlockedUA=function(t){var n;for(t=t.toLowerCase(),n=0;n<cf.length;n++)if(t.indexOf(cf[n])!==-1)return!0;return!1};p.HTTPBuildQuery=function(t,n){var i,e,r=[];return p.isUndefined(n)&&(n="&"),p.each(t,function(o,s){i=encodeURIComponent(o.toString()),e=encodeURIComponent(s),r[r.length]=e+"="+i}),r.join(n)};p.getQueryParam=function(t,n){n=n.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var i="[\\?&]"+n+"=([^&#]*)",e=new RegExp(i),r=e.exec(t);if(r===null||r&&typeof r[1]!="string"&&r[1].length)return"";var o=r[1];try{o=decodeURIComponent(o)}catch{V.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")};p.cookie={get:function(t){for(var n=t+"=",i=W.cookie.split(";"),e=0;e<i.length;e++){for(var r=i[e];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(n)===0)return decodeURIComponent(r.substring(n.length,r.length))}return null},parse:function(t){var n;try{n=p.JSONDecode(p.cookie.get(t))||{}}catch{}return n},set_seconds:function(t,n,i,e,r,o,s){var a="",u="",c="";if(s)a="; domain="+s;else if(e){var l=lf(W.location.hostname);a=l?"; domain=."+l:""}if(i){var f=new Date;f.setTime(f.getTime()+i*1e3),u="; expires="+f.toGMTString()}o&&(r=!0,c="; SameSite=None"),r&&(c+="; secure"),W.cookie=t+"="+encodeURIComponent(n)+u+"; path=/"+a+c},set:function(t,n,i,e,r,o,s){var a="",u="",c="";if(s)a="; domain="+s;else if(e){var l=lf(W.location.hostname);a=l?"; domain=."+l:""}if(i){var f=new Date;f.setTime(f.getTime()+i*24*60*60*1e3),u="; expires="+f.toGMTString()}o&&(r=!0,c="; SameSite=None"),r&&(c+="; secure");var h=t+"="+encodeURIComponent(n)+u+"; path=/"+a+c;return W.cookie=h,h},remove:function(t,n,i){p.cookie.set(t,"",-1,n,!1,!1,i)}};var rd=function(t){var n=!0;try{var i="__mplss_"+Bu(8),e="xyz";t.setItem(i,e),t.getItem(i)!==e&&(n=!1),t.removeItem(i)}catch{n=!1}return n},Ns=null,Un=function(t,n){return Ns!==null&&!n?Ns:Ns=rd(t||E.localStorage)},Ds=null,dE=function(t,n){return Ds!==null&&!n?Ds:Ds=rd(t||E.sessionStorage)};function nd(t,n,i){var e=function(r){V.error(n+" error: "+r)};return{is_supported:function(r){var o=i(t,r);return o||V.error(n+" unsupported"),o},error:e,get:function(r){try{return t.getItem(r)}catch(o){e(o)}return null},parse:function(r){try{return p.JSONDecode(t.getItem(r))||{}}catch{}return null},set:function(r,o){try{t.setItem(r,o)}catch(s){e(s)}},remove:function(r){try{t.removeItem(r)}catch(o){e(o)}}}}var id=null,od=null;try{id=E.localStorage,od=E.sessionStorage}catch{}p.localStorage=nd(id,"localStorage",Un);p.sessionStorage=nd(od,"sessionStorage",dE);p.register_event=(function(){var t=function(e,r,o,s,a){if(!e){V.error("No valid element provided to register_event");return}if(e.addEventListener&&!s)e.addEventListener(r,o,!!a);else{var u="on"+r,c=e[u];e[u]=n(e,o,c)}};function n(e,r,o){var s=function(a){if(a=a||i(E.event),!!a){var u=!0,c,l;return p.isFunction(o)&&(c=o(a)),l=r.call(e,a),(c===!1||l===!1)&&(u=!1),u}};return s}function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation),e}return i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0},t})();var vE=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');p.dom_query=(function(){function t(r){return r.all?r.all:r.getElementsByTagName("*")}var n=/[\t\r\n]/g;function i(r,o){var s=" "+o+" ";return(" "+r.className+" ").replace(n," ").indexOf(s)>=0}function e(r){if(!W.getElementsByTagName)return[];var o=r.split(" "),s,a,u,c,l,f,h,g,d,m,v=[W];for(f=0;f<o.length;f++){if(s=o[f].replace(/^\s+/,"").replace(/\s+$/,""),s.indexOf("#")>-1){a=s.split("#"),u=a[0];var y=a[1],_=W.getElementById(y);if(!_||u&&_.nodeName.toLowerCase()!=u)return[];v=[_];continue}if(s.indexOf(".")>-1){a=s.split("."),u=a[0];var w=a[1];for(u||(u="*"),c=[],l=0,h=0;h<v.length;h++)for(u=="*"?d=t(v[h]):d=v[h].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];for(v=[],m=0,h=0;h<c.length;h++)c[h].className&&p.isString(c[h].className)&&i(c[h],w)&&(v[m++]=c[h]);continue}var b=s.match(vE);if(b){u=b[1];var C=b[2],k=b[3],x=b[4];for(u||(u="*"),c=[],l=0,h=0;h<v.length;h++)for(u=="*"?d=t(v[h]):d=v[h].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];v=[],m=0;var A;switch(k){case"=":A=function(P){return P.getAttribute(C)==x};break;case"~":A=function(P){return P.getAttribute(C).match(new RegExp("\\b"+x+"\\b"))};break;case"|":A=function(P){return P.getAttribute(C).match(new RegExp("^"+x+"-?"))};break;case"^":A=function(P){return P.getAttribute(C).indexOf(x)===0};break;case"$":A=function(P){return P.getAttribute(C).lastIndexOf(x)==P.getAttribute(C).length-x.length};break;case"*":A=function(P){return P.getAttribute(C).indexOf(x)>-1};break;default:A=function(P){return P.getAttribute(C)}}for(v=[],m=0,h=0;h<c.length;h++)A(c[h])&&(v[m++]=c[h]);continue}for(u=s,c=[],l=0,h=0;h<v.length;h++)for(d=v[h].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];v=c}return v}return function(r){return p.isElement(r)?[r]:p.isObject(r)&&!p.isUndefined(r.length)?r:e.call(this,r)}})();var gE=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],mE=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];p.info={campaignParams:function(t){var n="",i={};return p.each(gE,function(e){n=p.getQueryParam(W.URL,e),n.length?i[e]=n:t!==void 0&&(i[e]=t)}),i},clickParams:function(){var t="",n={};return p.each(mE,function(i){t=p.getQueryParam(W.URL,i),t.length&&(n[i]=t)}),n},marketingParams:function(){return p.extend(p.info.campaignParams(),p.info.clickParams())},searchEngine:function(t){return t.search("https?://(.*)google.([^/?]*)")===0?"google":t.search("https?://(.*)bing.com")===0?"bing":t.search("https?://(.*)yahoo.com")===0?"yahoo":t.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(t){var n=p.info.searchEngine(t),i=n!="yahoo"?"q":"p",e={};if(n!==null){e.$search_engine=n;var r=p.getQueryParam(t,i);r.length&&(e.mp_keyword=r)}return e},browser:function(t,n,i){return n=n||"",i||p.includes(t," OPR/")?p.includes(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":p.includes(t,"IEMobile")||p.includes(t,"WPDesktop")?"Internet Explorer Mobile":p.includes(t,"SamsungBrowser/")?"Samsung Internet":p.includes(t,"Edge")||p.includes(t,"Edg/")?"Microsoft Edge":p.includes(t,"FBIOS")?"Facebook Mobile":p.includes(t,"Whale/")?"Whale Browser":p.includes(t,"Chrome")?"Chrome":p.includes(t,"CriOS")?"Chrome iOS":p.includes(t,"UCWEB")||p.includes(t,"UCBrowser")?"UC Browser":p.includes(t,"FxiOS")?"Firefox iOS":p.includes(n,"Apple")?p.includes(t,"Mobile")?"Mobile Safari":"Safari":p.includes(t,"Android")?"Android Mobile":p.includes(t,"Konqueror")?"Konqueror":p.includes(t,"Firefox")?"Firefox":p.includes(t,"MSIE")||p.includes(t,"Trident/")?"Internet Explorer":p.includes(t,"Gecko")?"Mozilla":""},browserVersion:function(t,n,i){var e=p.info.browser(t,n,i),r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},o=r[e];if(o===void 0)return null;var s=t.match(o);return s?parseFloat(s[s.length-2]):null},os:function(){var t=It;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)?"Android":""},referringDomain:function(t){var n=t.split("/");return n.length>=3?n[2]:""},currentUrl:function(){return E.location.href},properties:function(t){return typeof t!="object"&&(t={}),p.extend(p.strip_empty_properties({$os:p.info.os(),$browser:p.info.browser(It,Ft.vendor,vn),$referrer:W.referrer,$referring_domain:p.info.referringDomain(W.referrer),$device:p.info.device(It)}),{$current_url:p.info.currentUrl(),$browser_version:p.info.browserVersion(It,Ft.vendor,vn),$screen_height:of.height,$screen_width:of.width,mp_lib:"web",$lib_version:nt.LIB_VERSION,$insert_id:Bu(),time:p.timestamp()/1e3},p.strip_empty_properties(t))},people_properties:function(){return p.extend(p.strip_empty_properties({$os:p.info.os(),$browser:p.info.browser(It,Ft.vendor,vn)}),{$browser_version:p.info.browserVersion(It,Ft.vendor,vn)})},mpPageViewProperties:function(){return p.strip_empty_properties({current_page_title:W.title,current_domain:E.location.hostname,current_url_path:E.location.pathname,current_url_protocol:E.location.protocol,current_url_search:E.location.search})}};var yE=function(t,n){var i=null,e=[];return function(r){var o=this;return e.push(r),i||(i=new H(function(s){setTimeout(function(){var a=t.apply(o,[e]);i=null,e=[],s(a)},n)})),i}},Bu=function(t){var n=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return t?n.substring(0,t):n},sd=function(){var t=p.UUID().replace(/-/g,""),n=p.UUID().replace(/-/g,"").substring(0,16),i="01";return"00-"+t+"-"+n+"-"+i},_E=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,wE=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,lf=function(t){var n=wE,i=t.split("."),e=i[i.length-1];(e.length>4||e==="com"||e==="org")&&(n=_E);var r=t.match(n);return r?r[0]:""},bE=function(){var t=E.navigator.onLine;return p.isUndefined(t)||t},Jt=function(){},go=function(t,n){for(var i=!1,e=0;e<n.length;e++)if(t.match(n[e])){i=!0;break}return i},Xr=null,mo=null;typeof JSON<"u"&&(Xr=JSON.stringify,mo=JSON.parse);Xr=Xr||p.JSONEncode;mo=mo||p.JSONDecode;var SE=function(t,n,i){if(!E.CompressionStream)return!1;var e=p.info.browser(t,n,i),r=p.info.browserVersion(t,n,i);return!((e==="Safari"||e==="Mobile Safari")&&r>=16.4&&r<16.6)};p.info=p.info;p.info.browser=p.info.browser;p.info.browserVersion=p.info.browserVersion;p.info.device=p.info.device;p.info.properties=p.info.properties;p.isBlockedUA=p.isBlockedUA;p.isEmptyObject=p.isEmptyObject;p.isObject=p.isObject;p.JSONDecode=p.JSONDecode;p.JSONEncode=p.JSONEncode;p.toArray=p.toArray;p.NPO=sr;var CE="mixpanelBrowserDb",ad="mixpanelRecordingEvents",zu="mixpanelRecordingRegistry",EE=1,IE=[ad,zu],vt=function(t){this.dbPromise=null,this.storeName=t};vt.prototype._openDb=function(){return new H(function(t,n){var i=E.indexedDB.open(CE,EE);i.onerror=function(){n(i.error)},i.onsuccess=function(){t(i.result)},i.onupgradeneeded=function(e){var r=e.target.result;IE.forEach(function(o){r.createObjectStore(o)})}})};vt.prototype.init=function(){return E.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(t){return t instanceof E.IDBDatabase?H.resolve():H.reject(t)})):H.reject("indexedDB is not supported in this browser")};vt.prototype.isInitialized=function(){return!!this.dbPromise};vt.prototype.makeTransaction=function(t,n){var i=this.storeName,e=function(r){return new H(function(o,s){var a=r.transaction(i,t);a.oncomplete=function(){o(a)},a.onabort=a.onerror=function(){s(a.error)},n(a.objectStore(i))})};return this.dbPromise.then(e).catch(function(r){return r&&r.name==="InvalidStateError"?(this.dbPromise=this._openDb(),this.dbPromise.then(e)):H.reject(r)}.bind(this))};vt.prototype.setItem=function(t,n){return this.makeTransaction("readwrite",function(i){i.put(n,t)})};vt.prototype.getItem=function(t){var n;return this.makeTransaction("readonly",function(i){n=i.get(t)}).then(function(){return n.result})};vt.prototype.removeItem=function(t){return this.makeTransaction("readwrite",function(n){n.delete(t)})};vt.prototype.getAll=function(){var t;return this.makeTransaction("readonly",function(n){t=n.getAll()}).then(function(){return t.result})};var kE="__mp_opt_in_out_";function OE(t,n){ld(!0,t,n)}function xE(t,n){ld(!1,t,n)}function RE(t,n){return cd(t,n)==="1"}function ud(t,n){if(ME(n))return V.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var i=cd(t,n)==="0";return i&&V.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),i}function ar(t){return Gu(t,function(n){return this.get_config(n)})}function ur(t){return Gu(t,function(n){return this._get_config(n)})}function en(t){return Gu(t,function(n){return this._get_config(n)})}function AE(t,n){n=n||{},qu(n).remove(ju(t,n),!!n.crossSubdomainCookie,n.cookieDomain)}function qu(t){return t=t||{},t.persistenceType==="localStorage"?p.localStorage:p.cookie}function ju(t,n){return n=n||{},(n.persistencePrefix||kE)+t}function cd(t,n){return qu(n).get(ju(t,n))}function ME(t){if(t&&t.ignoreDnt)return!1;var n=t&&t.window||E,i=n.navigator||{},e=!1;return p.each([i.doNotTrack,i.msDoNotTrack,n.doNotTrack],function(r){p.includes([!0,1,"1","yes"],r)&&(e=!0)}),e}function ld(t,n,i){if(!p.isString(n)||!n.length){V.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token");return}i=i||{},qu(i).set(ju(n,i),t?1:0,p.isNumber(i.cookieExpiration)?i.cookieExpiration:null,!!i.crossSubdomainCookie,!!i.secureCookie,!!i.crossSiteCookie,i.cookieDomain),i.track&&t&&i.track(i.trackEventName||"$opt_in",i.trackProperties,{send_immediately:!0})}function Gu(t,n){return function(){var i=!1;try{var e=n.call(this,"token"),r=n.call(this,"ignore_dnt"),o=n.call(this,"opt_out_tracking_persistence_type"),s=n.call(this,"opt_out_tracking_cookie_prefix"),a=n.call(this,"window");e&&(i=ud(e,{ignoreDnt:r,persistenceType:o,persistencePrefix:s,window:a}))}catch(c){V.error("Unexpected error when checking tracking opt-out status: "+c)}if(!i)return t.apply(this,arguments);var u=arguments[arguments.length-1];typeof u=="function"&&u(0)}}var TE=Gt("lock"),fd=function(t,n){n=n||{},this.storageKey=t,this.storage=n.storage||E.localStorage,this.pollIntervalMS=n.pollIntervalMS||100,this.timeoutMS=n.timeoutMS||2e3,this.promiseImpl=n.promiseImpl||H};fd.prototype.withLock=function(t,n){var i=this.promiseImpl;return new i(p.bind(function(e,r){var o=n||new Date().getTime()+"|"+Math.random(),s=new Date().getTime(),a=this.storageKey,u=this.pollIntervalMS,c=this.timeoutMS,l=this.storage,f=a+":X",h=a+":Y",g=a+":Z",d=function(w){if(new Date().getTime()-s>c){TE.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+o+"]"),l.removeItem(g),l.removeItem(h),y();return}setTimeout(function(){try{w()}catch(b){r(b)}},u*(Math.random()+.1))},m=function(w,b){w()?b():d(function(){m(w,b)})},v=function(){var w=l.getItem(h);return w&&w!==o?!1:(l.setItem(h,o),l.getItem(h)===o?!0:(Un(l,!0)||r(new Error("localStorage support dropped while acquiring lock")),!1))},y=function(){l.setItem(f,o),m(v,function(){if(l.getItem(f)===o){_();return}d(function(){if(l.getItem(h)!==o){y();return}m(function(){return!l.getItem(g)},_)})})},_=function(){l.setItem(g,"1");var w=function(){l.removeItem(g),l.getItem(h)===o&&l.removeItem(h),l.getItem(f)===o&&l.removeItem(f)};t().then(function(b){w(),e(b)}).catch(function(b){w(),r(b)})};try{if(Un(l,!0))y();else throw new Error("localStorage support check failed")}catch(w){r(w)}},this))};var tn=function(t){this.storage=t||E.localStorage};tn.prototype.init=function(){return H.resolve()};tn.prototype.isInitialized=function(){return!0};tn.prototype.setItem=function(t,n){return new H(p.bind(function(i,e){try{this.storage.setItem(t,Xr(n))}catch(r){e(r)}i()},this))};tn.prototype.getItem=function(t){return new H(p.bind(function(n,i){var e;try{e=mo(this.storage.getItem(t))}catch(r){i(r)}n(e)},this))};tn.prototype.removeItem=function(t){return new H(p.bind(function(n,i){try{this.storage.removeItem(t)}catch(e){i(e)}n()},this))};var ff=Gt("batch"),Rt=function(t,n){n=n||{},this.storageKey=t,this.usePersistence=n.usePersistence,this.usePersistence&&(this.queueStorage=n.queueStorage||new tn,this.lock=new fd(t,{storage:n.sharedLockStorage||E.localStorage,timeoutMS:n.sharedLockTimeoutMS})),this.reportError=n.errorReporter||p.bind(ff.error,ff),this.pid=n.pid||null,this.memQueue=[],this.initialized=!1,n.enqueueThrottleMs?this.enqueuePersisted=yE(p.bind(this._enqueuePersisted,this),n.enqueueThrottleMs):this.enqueuePersisted=p.bind(function(i){return this._enqueuePersisted([i])},this)};Rt.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?H.resolve():this.queueStorage.init().then(p.bind(function(){this.initialized=!0},this)).catch(p.bind(function(t){this.reportError("Error initializing queue persistence. Disabling persistence",t),this.initialized=!0,this.usePersistence=!1},this))};Rt.prototype.enqueue=function(t,n){var i={id:Bu(),flushAfter:new Date().getTime()+n*2,payload:t};return this.usePersistence?this.enqueuePersisted(i):(this.memQueue.push(i),H.resolve(!0))};Rt.prototype._enqueuePersisted=function(t){var n=p.bind(function(){return this.ensureInit().then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(i){return this.saveToStorage(i.concat(t))},this)).then(p.bind(function(i){return i&&(this.memQueue=this.memQueue.concat(t)),i},this)).catch(p.bind(function(i){return this.reportError("Error enqueueing items",i,t),!1},this))},this);return this.lock.withLock(n,this.pid).catch(p.bind(function(i){return this.reportError("Error acquiring storage lock",i),!1},this))};Rt.prototype.fillBatch=function(t){var n=this.memQueue.slice(0,t);return this.usePersistence&&n.length<t?this.ensureInit().then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(i){if(i.length){var e={};p.each(n,function(s){e[s.id]=!0});for(var r=0;r<i.length;r++){var o=i[r];if(new Date().getTime()>o.flushAfter&&!e[o.id]&&(o.orphaned=!0,n.push(o),n.length>=t))break}}return n},this)):H.resolve(n)};var hf=function(t,n){var i=[];return p.each(t,function(e){e.id&&!n[e.id]&&i.push(e)}),i};Rt.prototype.removeItemsByID=function(t){var n={};if(p.each(t,function(e){n[e]=!0}),this.memQueue=hf(this.memQueue,n),this.usePersistence){var i=p.bind(function(){return this.ensureInit().then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(e){return e=hf(e,n),this.saveToStorage(e)},this)).then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(e){for(var r=0;r<e.length;r++){var o=e[r];if(o.id&&n[o.id])throw new Error("Item not removed from storage")}return!0},this)).catch(p.bind(function(e){return this.reportError("Error removing items",e,t),!1},this))},this);return this.lock.withLock(i,this.pid).catch(p.bind(function(e){return this.reportError("Error acquiring storage lock",e),Un(this.lock.storage,!0)?!1:i().then(p.bind(function(r){return r||this.queueStorage.removeItem(this.storageKey).then(function(){return r})},this)).catch(p.bind(function(r){return this.reportError("Error clearing queue",r),!1},this))},this))}else return H.resolve(!0)};var pf=function(t,n){var i=[];return p.each(t,function(e){var r=e.id;if(r in n){var o=n[r];o!==null&&(e.payload=o,i.push(e))}else i.push(e)}),i};Rt.prototype.updatePayloads=function(t){return this.memQueue=pf(this.memQueue,t),this.usePersistence?this.lock.withLock(p.bind(function(){return this.ensureInit().then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(i){return i=pf(i,t),this.saveToStorage(i)},this)).catch(p.bind(function(i){return this.reportError("Error updating items",t,i),!1},this))},this),this.pid).catch(p.bind(function(n){return this.reportError("Error acquiring storage lock",n),!1},this)):H.resolve(!0)};Rt.prototype.readFromStorage=function(){return this.ensureInit().then(p.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(p.bind(function(t){return t&&(p.isArray(t)||(this.reportError("Invalid storage entry:",t),t=null)),t||[]},this)).catch(p.bind(function(t){return this.reportError("Error retrieving queue",t),[]},this))};Rt.prototype.saveToStorage=function(t){return this.ensureInit().then(p.bind(function(){return this.queueStorage.setItem(this.storageKey,t)},this)).then(function(){return!0}).catch(p.bind(function(n){return this.reportError("Error saving queue",n),!1},this))};Rt.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(p.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):H.resolve()};var PE=600*1e3,bn=Gt("batch"),ct=function(t,n){this.errorReporter=n.errorReporter,this.queue=new Rt(t,{errorReporter:p.bind(this.reportError,this),queueStorage:n.queueStorage,sharedLockStorage:n.sharedLockStorage,sharedLockTimeoutMS:n.sharedLockTimeoutMS,usePersistence:n.usePersistence,enqueueThrottleMs:n.enqueueThrottleMs}),this.libConfig=n.libConfig,this.sendRequest=n.sendRequestFunc,this.beforeSendHook=n.beforeSendHook,this.stopAllBatching=n.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=n.flushOnlyOnInterval||!1,this._flushPromise=null};ct.prototype.enqueue=function(t){return this.queue.enqueue(t,this.flushInterval)};ct.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()};ct.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)};ct.prototype.clear=function(){return this.queue.clear()};ct.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size};ct.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)};ct.prototype.scheduleFlush=function(t){this.flushInterval=t,this.stopped||(this.timeoutID=setTimeout(p.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))};ct.prototype.sendRequestPromise=function(t,n){return new H(p.bind(function(i){this.sendRequest(t,n,i)},this))};ct.prototype.flush=function(t){if(this.requestInProgress)return bn.log("Flush: Request already in progress"),H.resolve();this.requestInProgress=!0,t=t||{};var n=this.libConfig.batch_request_timeout_ms,i=new Date().getTime(),e=this.batchSize;return this.queue.fillBatch(e).then(p.bind(function(r){var o=r.length===e,s=[],a={};if(p.each(r,function(f){var h=f.payload;if(this.beforeSendHook&&!f.orphaned&&(h=this.beforeSendHook(h)),h){h.event&&h.properties&&(h.properties=p.extend({},h.properties,{mp_sent_by_lib_version:nt.LIB_VERSION}));var g=!0,d=f.id;d?(this.itemIdsSentSuccessfully[d]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:f,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[d]}),g=!1):this.reportError("[dupe] found item with no ID",{item:f}),g&&s.push(h)}a[f.id]=h},this),s.length<1)return this.requestInProgress=!1,this.resetFlush(),H.resolve();var u=p.bind(function(){return this.queue.removeItemsByID(p.map(r,function(f){return f.id})).then(p.bind(function(f){return p.each(r,p.bind(function(h){var g=h.id;g?(this.itemIdsSentSuccessfully[g]=this.itemIdsSentSuccessfully[g]||0,this.itemIdsSentSuccessfully[g]++,this.itemIdsSentSuccessfully[g]>5&&this.reportError("[dupe] item ID sent too many times",{item:h,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[g]})):this.reportError("[dupe] found item with no ID while removing",{item:h})},this)),f?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?(this.resetFlush(),H.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),H.resolve())},this))},this),c=p.bind(function(f){this.requestInProgress=!1;try{if(t.unloading)return this.queue.updatePayloads(a);if(p.isObject(f)&&f.error==="timeout"&&new Date().getTime()-i>=n)return this.reportError("Network timeout; retrying"),this.flush();if(p.isObject(f)&&(f.httpStatusCode>=500||f.httpStatusCode===429||f.httpStatusCode<=0&&!bE()||f.error==="timeout")){var h=this.flushInterval*2;return f.retryAfter&&(h=parseInt(f.retryAfter,10)*1e3||h),h=Math.min(PE,h),this.reportError("Error; retry in "+h+" ms"),this.scheduleFlush(h),H.resolve()}else if(p.isObject(f)&&f.httpStatusCode===413)if(r.length>1){var g=Math.max(1,Math.floor(e/2));return this.batchSize=Math.min(this.batchSize,g,r.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),H.resolve()}else return this.reportError("Single-event request too large; dropping",r),this.resetBatchSize(),u();else return u()}catch(d){this.reportError("Error handling API response",d),this.resetFlush()}},this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:n};return t.unloading&&(l.transport="sendBeacon"),bn.log("MIXPANEL REQUEST:",s),this.sendRequestPromise(s,l).then(c)},this)).catch(p.bind(function(r){this.reportError("Error flushing request queue",r),this.resetFlush()},this))};ct.prototype.reportError=function(t,n){if(bn.error.apply(bn.error,arguments),this.errorReporter)try{n instanceof Error||(n=new Error(t)),this.errorReporter(t,n)}catch(i){bn.error(i)}};var Wu=function(t){var n=Date.now();return!t||n>t.maxExpires||n>t.idleExpires},$E=250,hd=function(t,n){if(!p.isArray(t))return t&&n.critical("record_allowed_iframe_origins must be an array of origin strings, cross-origin recording will be disabled."),[];for(var i=[],e=0;e<t.length;e++)try{var r=new URL(t[e]).origin;if(r==="null"){n.critical(t[e]+" has an opaque origin. Skipping this entry.");continue}i.push(r)}catch{n.critical(t[e]+" is not a valid origin URL. Skipping this entry.")}return i},Bn="change",jt="click",Ga="hashchange",LE="input",df="load",Kt="mp_locationchange",vf="popstate",Jo="scrollend",Vu="scroll",NE="select",yo="submit",DE="toggle",gf="visibilitychange",FE=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],mf=["mp-include"],Wa=["mp-no-track"],yf=Wa.concat(["mp-sensitive"]),UE=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],BE={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},zE={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},qE={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},_f=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],jE=5,ge=Gt("autocapture");function Va(t){for(var n={},i=pd(t).split(" "),e=0;e<i.length;e++){var r=i[e];r&&(n[r]=!0)}return n}function pd(t){switch(typeof t.className){case"string":return t.className;case"object":return t.className.baseVal||t.getAttribute("class")||"";default:return""}}function GE(t){if(t.previousElementSibling)return t.previousElementSibling;do t=t.previousSibling;while(t&&!dd(t));return t}function wf(t,n,i,e,r,o){var s={$classes:pd(t).split(" "),$tag_name:t.tagName.toLowerCase()},a=t.id;a&&(s.$id=a),Hu(t,n,r,o)&&p.each(UE.concat(e),function(f){if(t.hasAttribute(f)&&!i[f]){var h=t.getAttribute(f);_o(h)&&(s["$attr-"+f]=h)}});for(var u=1,c=1,l=t;l=GE(l);)u++,l.tagName===t.tagName&&c++;return s.$nth_child=u,s.$nth_of_type=c,s}function WE(t,n){var i=n.allowElementCallback,e=n.allowSelectors||[],r=n.blockAttrs||[],o=n.blockElementCallback,s=n.blockSelectors||[],a=n.captureTextContent||!1,u=n.captureExtraAttrs||[],c=n.capturedForHeatMap||!1,l={};p.each(r,function(C){l[C]=!0});var f=null,h=typeof t.target>"u"?t.srcElement:t.target;if(vd(h)&&(h=h.parentNode),KE(h,t)&&Ha(h,t,i,e)&&!Fs(h,t,o,s)){for(var g=[h],d=h;d.parentNode&&!Ot(d,"body");)g.push(d.parentNode),d=d.parentNode;var m=[],v,y=!1;if(p.each(g,function(C){var k=Hu(C,t,i,e);!l.href&&C.tagName.toLowerCase()==="a"&&(v=C.getAttribute("href"),v=k&&_o(v)&&v),Fs(C,t,o,s)&&(y=!0),m.push(wf(C,t,l,u,i,e))},this),!y){var _=W.documentElement;if(f={$event_type:t.type,$host:E.location.host,$pathname:E.location.pathname,$elements:m,$el_attr__href:v,$viewportHeight:Math.max(_.clientHeight,E.innerHeight||0),$viewportWidth:Math.max(_.clientWidth,E.innerWidth||0),$pageHeight:W.body.offsetHeight||0,$pageWidth:W.body.offsetWidth||0},p.each(u,function(C){if(!l[C]&&h.hasAttribute(C)){var k=h.getAttribute(C);_o(k)&&(f["$el_attr__"+C]=k)}}),a&&(w=bf(h,t,i,e),w&&w.length&&(f.$el_text=w)),t.type===jt&&(p.each(FE,function(C){C in t&&(f["$"+C]=t[C])}),c&&(f.$captured_for_heatmap=!0),h=VE(t)),a){var w=bf(h,t,i,e);w&&w.length&&(f.$el_text=w)}if(h){if(!Ha(h,t,i,e)||Fs(h,t,o,s))return null;var b=wf(h,t,l,u,i,e);f.$target=b,f.$el_classes=b.$classes,p.extend(f,p.strip_empty_properties({$el_id:b.$id,$el_tag_name:b.$tag_name}))}}}return f}function bf(t,n,i,e){var r="";return Hu(t,n,i,e)&&t.childNodes&&t.childNodes.length&&p.each(t.childNodes,function(o){vd(o)&&o.textContent&&(r+=p.trim(o.textContent).split(/(\s+)/).filter(_o).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),p.trim(r)}function VE(t){for(var n=t.target,i=t.composedPath(),e=0;e<i.length;e++){var r=i[e];if(Ot(r,"a")||Ot(r,"button")||Ot(r,"input")||Ot(r,"select")||r.getAttribute&&r.getAttribute("role")==="button"){n=r;break}if(r===n)break}return n}function Ha(t,n,i,e){if(i)try{if(!i(t,n))return!1}catch(s){return ge.critical("Error while checking element in allowElementCallback",s),!1}if(!e.length)return!0;for(var r=0;r<e.length;r++){var o=e[r];try{if(t.matches(o))return!0}catch(s){ge.critical("Error while checking selector: "+o,s)}}return!1}function Fs(t,n,i,e){var r;if(i)try{if(i(t,n))return!0}catch(a){return ge.critical("Error while checking element in blockElementCallback",a),!0}if(e&&e.length)for(r=0;r<e.length;r++){var o=e[r];try{if(t.matches(o))return!0}catch(a){ge.critical("Error while checking selector: "+o,a)}}var s=Va(t);for(r=0;r<Wa.length;r++)if(s[Wa[r]])return!0;return!1}function dd(t){return t&&t.nodeType===1}function Ot(t,n){return t&&t.tagName&&t.tagName.toLowerCase()===n.toLowerCase()}function vd(t){return t&&t.nodeType===3}function HE(){try{var t=W.createElement("div");return!!t.matches}catch{return!1}}function YE(){return typeof WeakSet<"u"}function KE(t,n){if(!t||Ot(t,"html")||!dd(t))return!1;var i=t.tagName.toLowerCase();switch(i){case"form":return n.type===yo;case"input":return["button","submit"].indexOf(t.getAttribute("type"))===-1?n.type===Bn:n.type===jt;case"select":case"textarea":return n.type===Bn;default:return n.type===jt}}function gd(t){var n=(t.name||t.id||"").toString().toLowerCase();if(typeof n=="string"){var i=/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i;if(i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!0}return!1}function Hu(t,n,i,e){var r;if(!Ha(t,n,i,e))return!1;for(var o=t;o.parentNode&&!Ot(o,"body");o=o.parentNode){var s=Va(o);for(r=0;r<yf.length;r++)if(s[yf[r]])return!1}var a=Va(t);for(r=0;r<mf.length;r++)if(a[mf[r]])return!0;if(Ot(t,"input")||Ot(t,"select")||Ot(t,"textarea")||t.getAttribute("contenteditable")==="true")return!1;var u=t.type||"";if(typeof u=="string")switch(u.toLowerCase()){case"hidden":return!1;case"password":return!1}return!gd(t)}function _o(t){if(t===null||p.isUndefined(t))return!1;if(typeof t=="string"){t=p.trim(t);var n=/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/;if(n.test((t||"").replace(/[- ]/g,"")))return!1;var i=/(^\d{3}-?\d{2}-?\d{4}$)/;if(i.test(t))return!1}return!0}function md(t){var n="onscrollend"in E,i=Jr(t),e=Jo;if(!n){var r=null,o=100;i=Jr(function(){clearTimeout(r),r=setTimeout(t,o)}),e=Vu}return{listener:i,eventType:e}}function JE(t){for(var n=0;n<_f.length;n++)if(t.hasAttribute(_f[n]))return!0;return!1}function XE(t){var n=t.getAttribute("role");if(!n)return!1;var i=n.trim().split(/\s+/)[0].toLowerCase();return BE[i]}function Us(t){var n=t.tagName.toLowerCase();return!!(n==="button"||n==="input"||n==="select"||n==="textarea"||n==="details"||n==="dialog"||t.isContentEditable||t.onclick||t.onmousedown||t.onmouseup||t.ontouchstart||t.ontouchend||JE(t)||XE(t)||n==="a"&&t.hasAttribute("href")||t.hasAttribute("tabindex"))}function yd(t){if(!t||!t.tagName)return!0;var n=t.tagName.toLowerCase();if(zE[n])return!0;if(Us(t))return!1;for(var i=t.parentElement,e=0;i&&e<jE;){if(Us(i))return!1;if(i.getRootNode&&i.getRootNode()!==W){var r=i.getRootNode();if(r.host&&Us(r.host))return!1}i=i.parentElement,e++}return!!qE[n]}function _d(t){return"composedPath"in t?t.composedPath():[]}function wd(t){var n=_d(t);return n&&n.length>0?n[0]:t.target||t.srcElement}var bd=".mp-mask, .fs-mask, .amp-mask, .rr-mask, .ph-mask",ZE="data-rr-is-password",QE=["password","email","tel","hidden"];function Fi(t){return t?Array.isArray(t)?t:[t]:[]}function e0(t){var n={input:{maskingSelector:"",unmaskingSelector:"",maskAll:!0},text:{maskingSelector:"",unmaskingSelector:"",maskAll:!0}},i=t.get_config("record_mask_input_selector"),e=t.get_config("record_unmask_input_selector"),r=t.get_config("record_mask_all_inputs");n.input.maskingSelector=Fi(i).join(","),n.input.unmaskingSelector=Fi(e).join(","),r!==void 0&&(n.input.maskAll=r);var o=t.get_config("record_mask_text_selector"),s=t.get_config("record_unmask_text_selector"),a=t.get_config("record_mask_all_text"),u=t.get_config("record_mask_text_class"),c=Fi(o);if(u)if(u instanceof RegExp)n.text._legacyClassRegex=u;else{var l="."+u;c.indexOf(l)===-1&&c.push(l)}return n.text.maskingSelector=c.join(","),n.text.unmaskingSelector=Fi(s).join(","),a===void 0&&o!==void 0?n.text.maskAll=!1:a!==void 0&&(n.text.maskAll=a),n}function Fr(t,n){return n?!!t.closest(n):!1}function t0(t,n){var i=(t.getAttribute("type")||"").toLowerCase();if(QE.indexOf(i)!==-1)return!0;var e=(t.getAttribute("autocomplete")||"").toLowerCase();return e&&e!==""&&e!=="off"||t.hasAttribute(ZE)||gd(t)?!0:n.input.maskAll?!Fr(t,n.input.unmaskingSelector):!!(Fr(t,n.input.maskingSelector)||Fr(t,bd))}function r0(t,n){return t?n.text._legacyClassRegex&&Ea(t,n.text._legacyClassRegex)?!0:n.text.maskAll?!Fr(t,n.text.unmaskingSelector):!!(Fr(t,n.text.maskingSelector)||Fr(t,bd)):!1}var _r=Gt("network-plugin");function wo(t){return Math.round(Date.now()-t.performance.now())}var Bs={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],ignoreRequestFn:function(){return!1},recordHeaders:{request:[],response:[]},recordBodyUrls:{request:[],response:[]},recordInitialRequests:!1};function n0(t){return t.entryType==="navigation"}function Ya(t){return t.entryType==="resource"}function i0(t,n){for(var i=t.length,e=i-1;e>=0;e-=1)if(n(t[e]))return t[e]}function Sd(t,n,i){if(!(n in t)||typeof t[n]!="function")return function(){};var e=t[n],r=i(e);return t[n]=r,function(){t[n]=e}}var zs=1024*1024;function Cd(t){return!t||typeof t!="string"?t:t.length>zs?(_r.error("Body truncated from "+t.length+" to "+zs+" characters"),t.substring(0,zs)+"... [truncated]"):t}function o0(t,n,i){if(!n.PerformanceObserver)return _r.error("PerformanceObserver not supported"),function(){};if(i.recordInitialRequests){var e=n.performance.getEntries().filter(function(o){return n0(o)||Ya(o)&&i.initiatorTypes.includes(o.initiatorType)});t({requests:e.map(function(o){return{url:o.name,initiatorType:o.initiatorType,status:"responseStatus"in o?o.responseStatus:void 0,startTime:Math.round(o.startTime),endTime:Math.round(o.responseEnd),timeOrigin:wo(n)}}),isInitial:!0})}var r=new n.PerformanceObserver(function(o){var s=o.getEntries().filter(function(a){return Ya(a)&&i.initiatorTypes.includes(a.initiatorType)&&a.initiatorType!=="xmlhttprequest"&&a.initiatorType!=="fetch"});t({requests:s.map(function(a){return{url:a.name,initiatorType:a.initiatorType,status:"responseStatus"in a?a.responseStatus:void 0,startTime:Math.round(a.startTime),endTime:Math.round(a.responseEnd),timeOrigin:wo(n)}})})});return r.observe({entryTypes:["navigation","resource"]}),function(){r.disconnect()}}function bo(t,n,i){return!n[t]||n[t].length===0?!1:n[t].includes(i.toLowerCase())}function So(t,n,i){return!n[t]||n[t].length===0?!1:go(i,n[t])}function Sf(t){if(t==null)return null;var n;if(typeof t=="string")n=t;else if(t instanceof Document)n=t.textContent;else if(t instanceof FormData)n=p.HTTPBuildQuery(t);else if(p.isObject(t))try{n=JSON.stringify(t)}catch{return"Failed to stringify response object"}else return"Cannot read body of type "+typeof t;return Cd(n)}function Cf(t){return new Promise(function(n){var i=setTimeout(function(){n("Timeout while trying to read body")},500);try{t.clone().text().then(function(e){clearTimeout(i),n(Cd(e))},function(e){clearTimeout(i),n("Failed to read body: "+String(e))})}catch(e){clearTimeout(i),n("Failed to read body: "+String(e))}})}function Yu(t,n,i,e,r,o){if(o===void 0&&(o=0),o>10)return _r.error("Cannot find performance entry"),Promise.resolve(null);var s=t.performance.getEntriesByName(i),a=i0(s,function(u){return Ya(u)&&u.initiatorType===n&&(!e||u.startTime>=e)&&(!r||u.startTime<=r)});return a?Promise.resolve(a):new Promise(function(u){setTimeout(u,50*o)}).then(function(){return Yu(t,n,i,e,r,o+1)})}function s0(t,n,i){if(!i.initiatorTypes.includes("xmlhttprequest"))return function(){};var e=Sd(n.XMLHttpRequest.prototype,"open",function(r){return function(o,s,a,u,c){a===void 0&&(a=!0);var l=this,f=new Request(s,{method:o}),h={},g,d,m={},v=l.setRequestHeader.bind(l);l.setRequestHeader=function(_,w){return bo("request",i.recordHeaders,_)&&(m[_]=w),v(_,w)},h.requestHeaders=m;var y=l.send.bind(l);l.send=function(_){return So("request",i.recordBodyUrls,f.url)&&(h.requestBody=Sf(_)),g=n.performance.now(),y(_)},l.addEventListener("readystatechange",function(){if(l.readyState===l.DONE){d=n.performance.now();var _={},w=l.getAllResponseHeaders();if(w){var b=w.trim().split(/[\r\n]+/);b.forEach(function(C){if(C){var k=C.indexOf(": ");if(k!==-1){var x=C.substring(0,k),A=C.substring(k+2);x&&bo("response",i.recordHeaders,x)&&(_[x]=A)}}})}h.responseHeaders=_,So("response",i.recordBodyUrls,f.url)&&(h.responseBody=Sf(l.response)),Yu(n,"xmlhttprequest",f.url,g,d).then(function(C){if(!C){_r.error("Failed to get performance entry for XHR request to "+f.url);return}var k={url:C.name,method:f.method,initiatorType:C.initiatorType,status:l.status,startTime:Math.round(C.startTime),endTime:Math.round(C.responseEnd),timeOrigin:wo(n),requestHeaders:h.requestHeaders,requestBody:h.requestBody,responseHeaders:h.responseHeaders,responseBody:h.responseBody};t({requests:[k]})}).catch(function(C){_r.error("Error recording XHR request to "+f.url+": "+String(C))})}}),r.call(l,o,s,a,u,c)}});return function(){e()}}function a0(t,n,i){if(!i.initiatorTypes.includes("fetch"))return function(){};var e=Sd(n,"fetch",function(r){return function(){var o=new Request(arguments[0],arguments[1]),s,a={},u,c,l,f=Promise.resolve(void 0),h=Promise.resolve(void 0);try{var g={};o.headers.forEach(function(d,m){bo("request",i.recordHeaders,m)&&(g[m]=d)}),a.requestHeaders=g,So("request",i.recordBodyUrls,o.url)&&(f=Cf(o).then(function(d){a.requestBody=d})),u=n.performance.now(),l=r.apply(n,arguments).then(function(d){s=d,c=n.performance.now();var m={};return s.headers.forEach(function(v,y){bo("response",i.recordHeaders,y)&&(m[y]=v)}),a.responseHeaders=m,So("response",i.recordBodyUrls,o.url)&&(h=Cf(s).then(function(v){a.responseBody=v})),s})}catch(d){l=Promise.reject(d)}return Promise.all([f,h,l]).then(function(){return Yu(n,"fetch",o.url,u,c)}).then(function(d){if(!d){_r.error("Failed to get performance entry for fetch request to "+o.url);return}var m={url:d.name,method:o.method,initiatorType:d.initiatorType,status:s?s.status:void 0,startTime:Math.round(d.startTime),endTime:Math.round(d.responseEnd),timeOrigin:wo(n),requestHeaders:a.requestHeaders,requestBody:a.requestBody,responseHeaders:a.responseHeaders,responseBody:a.responseBody};t({requests:[m]})}).catch(function(d){_r.error("Error recording fetch request to "+o.url+": "+String(d))}),l}});return function(){e()}}function u0(t,n,i){if(!("performance"in n))return function(){};var e=Object.assign({},Bs.recordHeaders,i.recordHeaders||{}),r=Object.assign({},Bs.recordBodyUrls,i.recordBodyUrls||{});i=Object.assign({},i,{recordHeaders:e,recordBodyUrls:r});var o=Object.assign({},Bs,i),s=function(l){var f=l.requests.filter(function(h){var g=go(h.url,o.ignoreRequestUrls||[]);return!g&&!o.ignoreRequestFn(h)});(f.length>0||l.isInitial)&&t(Object.assign({},l,{requests:f}))},a=o0(s,n,o),u=s0(s,n,o),c=a0(s,n,o);return function(){a(),u(),c()}}var c0="rrweb/network@1.mp",l0=function(t){return{name:c0,observer:u0,options:t}},vr=Gt("recorder"),f0=E.CompressionStream,h0={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},p0=new Set([G.MouseMove,G.MouseInteraction,G.Scroll,G.ViewportResize,G.Input,G.TouchMove,G.MediaInteraction,G.Drag,G.Selection]);function d0(t){return t.type===te.IncrementalSnapshot&&p0.has(t.data.source)}var Pe=function(t){this._mixpanel=t.mixpanelInstance,this._onIdleTimeout=t.onIdleTimeout||Jt,this._onMaxLengthReached=t.onMaxLengthReached||Jt,this._onBatchSent=t.onBatchSent||Jt,this._rrwebRecord=t.rrwebRecord||null,this._stopRecording=null,this.replayId=t.replayId,this.batchStartUrl=t.batchStartUrl||null,this.replayStartUrl=t.replayStartUrl||null,this.idleExpires=t.idleExpires||null,this.maxExpires=t.maxExpires||null,this.replayStartTime=t.replayStartTime||null,this.lastEventTimestamp=t.lastEventTimestamp||null,this.seqNo=t.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=wn,this.recordMinMs=0;var n=Un(t.sharedLockStorage,!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new vt(ad),this.batcher=new ct(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:h0,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:t.sharedLockStorage,usePersistence:n,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:$E,sharedLockTimeoutMS:10*1e3})};Pe.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var t={distinct_id:String(this._mixpanel.get_distinct_id())},n=this._mixpanel.get_property("$device_id");n&&(t.$device_id=n);var i=this._mixpanel.get_property("$user_id");return i&&(t.$user_id=i),t};Pe.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.queueStorage.init().catch(function(){this.reportError("Error initializing IndexedDB storage for unloading persisted data.")}.bind(this)).then(function(){return this.getDurationMs()<this._getRecordMinMs()?this.queueStorage.removeItem(this.batcherKey):this.batcher.flush().then(function(){return this.queueStorage.removeItem(this.batcherKey)}.bind(this))}.bind(this))};Pe.prototype.getConfig=function(t){return this._mixpanel.get_config(t)};Pe.prototype.get_config=function(t){return this.getConfig(t)};Pe.prototype.startRecording=function(t){if(this._rrwebRecord===null){this.reportError("rrweb record function not provided. ");return}if(this._stopRecording!==null){vr.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>wn&&(this.recordMaxMs=wn,vr.critical("record_max_ms cannot be greater than "+wn+"ms. Capping value.")),this.maxExpires||(this.maxExpires=new Date().getTime()+this.recordMaxMs),this.recordMinMs=this._getRecordMinMs(),this.replayStartTime||(this.replayStartTime=new Date().getTime(),this.batchStartUrl=p.info.currentUrl(),this.replayStartUrl=p.info.currentUrl()),t||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var n=function(){clearTimeout(this.idleTimeoutId);var c=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,c),this.idleExpires=new Date().getTime()+c}.bind(this);n();var i=this.getConfig("record_block_selector");(i===""||i===null)&&(i=void 0);var e=e0(this._mixpanel),r=[];if(this.getConfig("record_network")){var o=this.getConfig("record_network_options")||{},s=(o.ignoreRequestUrls||[]).slice();s.push(this._getApiRoute()),o.ignoreRequestUrls=s,r.push(l0(o))}this.getConfig("record_console")&&r.push(uE({stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:50,depthOfLimit:2}}));var a=hd(this.getConfig("record_allowed_iframe_origins"),vr);try{this._stopRecording=this._rrwebRecord({emit:function(c){if(this.idleExpires&&this.idleExpires<c.timestamp){this._onIdleTimeout();return}d0(c)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),n()),this.__enqueuePromise=this.batcher.enqueue(c),(this.lastEventTimestamp===null||c.timestamp>this.lastEventTimestamp)&&(this.lastEventTimestamp=c.timestamp)}.bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:i,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextSelector:"*",maskInputFn:this._getMaskFn(t0,e),maskTextFn:this._getMaskFn(r0,e),recordCrossOriginIframes:a.length>0,allowedIframeOrigins:a,recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15},plugins:r})}catch(c){this.reportError("Unexpected error when starting rrweb recording.",c)}if(typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}var u=this.maxExpires-new Date().getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),u)};Pe.prototype.stopRecording=function(t){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(i){this.reportError("Error with rrweb stopRecording",i)}this._stopRecording=null}var n;return this.batcher.stopped?n=this.batcher.clear():t||(n=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),n};Pe.prototype.isRrwebStopped=function(){return this._stopRecording===null};Pe.prototype.flushEventsWithOptOut=function(t,n,i){var e=function(r){r===0&&(this.stopRecording(),i({error:"Tracking has been opted out, stopping recording."}))}.bind(this);this._flushEvents(t,n,i,e)};Pe.prototype.serialize=function(){var t;try{t=this._mixpanel.get_tab_id()}catch(n){this.reportError("Error getting tab ID for serialization ",n),t=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,lastEventTimestamp:this.lastEventTimestamp,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:t}};Pe.deserialize=function(t,n){var i=new Pe(p.extend({},n,{replayId:t.replayId,batchStartUrl:t.batchStartUrl,replayStartUrl:t.replayStartUrl,idleExpires:t.idleExpires,maxExpires:t.maxExpires,replayStartTime:t.replayStartTime,lastEventTimestamp:t.lastEventTimestamp,seqNo:t.seqNo,sharedLockStorage:n.sharedLockStorage}));return i};Pe.prototype._getApiRoute=function(){return this.getConfig("api_routes").record};Pe.prototype._sendRequest=function(t,n,i,e){var r=function(s,a){s.status===200&&this.replayId===t&&(this.seqNo++,this.batchStartUrl=p.info.currentUrl()),this._onBatchSent(),e({status:0,httpStatusCode:s.status,responseBody:a,retryAfter:s.headers.get("Retry-After")})}.bind(this),o=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");E.fetch(o+"/"+this._getApiRoute()+"?"+new URLSearchParams(n),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:i}).then(function(s){s.json().then(function(a){r(s,a)}).catch(function(a){e({error:a})})}).catch(function(s){e({error:s,httpStatusCode:0})})};Pe.prototype._flushEvents=ar(function(t,n,i){var e=t.length;if(e>0){for(var r=this.replayId,o=1/0,s=-1/0,a=!1,u=0;u<e;u++)o=Math.min(o,t[u].timestamp),s=Math.max(s,t[u].timestamp),t[u].type===te.FullSnapshot&&(a=!0);if(this.seqNo===0){if(!a){i({error:"First batch does not contain a full snapshot. Aborting recording."}),this.stopRecording(!0);return}this.replayStartTime=o}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var c=s-this.replayStartTime,l={$current_url:this.batchStartUrl,$lib_version:nt.LIB_VERSION,batch_start_time:o/1e3,mp_lib:"web",replay_id:r,replay_length_ms:c,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},f=JSON.stringify(t);if(Object.assign(l,this.getUserIdInfo()),SE(It,Ft.vendor,vn)){var h=new Blob([f],{type:"application/json"}).stream(),g=h.pipeThrough(new f0("gzip"));new Response(g).blob().then(function(d){l.format="gzip",this._sendRequest(r,l,d,i)}.bind(this))}else l.format="body",this._sendRequest(r,l,f,i)}});Pe.prototype.reportError=function(t,n){vr.error.apply(vr.error,arguments);try{!n&&!(t instanceof Error)&&(t=new Error(t)),this.getConfig("error_reporter")(t,n)}catch(i){vr.error(i)}};Pe.prototype.getDurationMs=function(){return this.replayStartTime===null?0:this.lastEventTimestamp===null?new Date().getTime()-this.replayStartTime:this.lastEventTimestamp-this.replayStartTime};Pe.prototype._getRecordMinMs=function(){var t=this.getConfig("record_min_ms");return t>Ps?(vr.critical("record_min_ms cannot be greater than "+Ps+"ms. Capping value."),Ps):t};Pe.prototype._getMaskFn=function(t,n){return function(i,e){if(!i.trim().length)return"";var r=!0;try{r=t(e,n)}catch(s){this.reportError("Error checking if text should be masked, defaulting to masked",s)}if(r){var o=Math.min(i.length,1e4);return"*".repeat(o)}else return i}.bind(this)};var Wt=function(t){this.idb=new vt(zu),this.errorReporter=t.errorReporter,this.mixpanelInstance=t.mixpanelInstance,this.sharedLockStorage=t.sharedLockStorage};Wt.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")};Wt.prototype.handleError=function(t){this.errorReporter("IndexedDB error: ",t)};Wt.prototype.setActiveRecording=function(t){if(!this.isPersistenceEnabled())return H.resolve();var n=t.tabId;return n?this.idb.init().then(function(){return this.idb.setItem(n,t)}.bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),H.resolve())};Wt.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}.bind(this)).then(function(t){return Wu(t)?null:t}.bind(this)).catch(this.handleError.bind(this)):H.resolve(null)};Wt.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()};Wt.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then(function(t){if(t)return t.maxExpires=0,this.setActiveRecording(t)}.bind(this)).catch(this.handleError.bind(this))};Wt.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):H.resolve()};Wt.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getAll()}.bind(this)).then(function(t){var n=t.filter(function(i){return Wu(i)}).map(function(i){var e=Pe.deserialize(i,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage});return e.unloadPersistedData().then(function(){return this.idb.removeItem(i.tabId)}.bind(this)).catch(this.handleError.bind(this))}.bind(this));return H.all(n)}.bind(this)).catch(this.handleError.bind(this)):H.resolve([])};var Sn=Gt("recorder"),At=function(t,n,i){this.mixpanelInstance=t,this.rrwebRecord=n||nr,this.sharedLockStorage=i,this.recordingRegistry=new Wt({mixpanelInstance:this.mixpanelInstance,errorReporter:Sn.error,sharedLockStorage:i}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};At.prototype.startRecording=function(t){if(t=t||{},this.activeRecording&&!this.activeRecording.isRrwebStopped()){Sn.log("Recording already in progress, skipping startRecording.");return}var n=function(){Sn.log("Idle timeout reached, restarting recording."),this.resetRecording()}.bind(this),i=function(){Sn.log("Max recording length reached, stopping recording."),this.resetRecording()}.bind(this),e=function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}.bind(this),r={mixpanelInstance:this.mixpanelInstance,onBatchSent:e,onIdleTimeout:n,onMaxLengthReached:i,replayId:p.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return t.activeSerializedRecording?this.activeRecording=Pe.deserialize(t.activeSerializedRecording,r):this.activeRecording=new Pe(r),this.activeRecording.startRecording(t.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())};At.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then(function(){return this.recordingRegistry.clearActiveRecording()}.bind(this)).then(function(){this.stopRecordingInProgress=!1}.bind(this))};At.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)};At.prototype._stopCurrentRecording=function(t,n){if(this.activeRecording){var i=this.activeRecording.stopRecording(t);return n&&(this.activeRecording=null),i}return H.resolve()};At.prototype.resumeRecording=function(t){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),H.resolve(null)):this.recordingRegistry.getActiveRecording().then(function(n){return n&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:n}):t?this.startRecording({shouldStopBatcher:!1}):(Sn.log("No resumable recording found."),null)}.bind(this))};At.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})};At.prototype.isRecording=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()};At.prototype.getActiveReplayId=function(){return this.isRecording()?this.activeRecording.replayId:null};Object.defineProperty(At.prototype,"replayId",{get:function(){return this.getActiveReplayId()}});E[qs]=At;function v0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yi={exports:{}},g0=Yi.exports,Ef;function m0(){return Ef||(Ef=1,(function(t,n){(function(i,e){t.exports=e()})(g0,function(){Array.isArray||(Array.isArray=function(o){return Object.prototype.toString.call(o)==="[object Array]"});function i(o){for(var s=[],a=0,u=o.length;a<u;a++)s.indexOf(o[a])===-1&&s.push(o[a]);return s}var e={},r={"==":function(o,s){return o==s},"===":function(o,s){return o===s},"!=":function(o,s){return o!=s},"!==":function(o,s){return o!==s},">":function(o,s){return o>s},">=":function(o,s){return o>=s},"<":function(o,s,a){return a===void 0?o<s:o<s&&s<a},"<=":function(o,s,a){return a===void 0?o<=s:o<=s&&s<=a},"!!":function(o){return e.truthy(o)},"!":function(o){return!e.truthy(o)},"%":function(o,s){return o%s},log:function(o){return console.log(o),o},in:function(o,s){return!s||typeof s.indexOf>"u"?!1:s.indexOf(o)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(o,s,a){if(a<0){var u=String(o).substr(s);return u.substr(0,u.length+a)}return String(o).substr(s,a)},"+":function(){return Array.prototype.reduce.call(arguments,function(o,s){return parseFloat(o,10)+parseFloat(s,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(o,s){return parseFloat(o,10)*parseFloat(s,10)})},"-":function(o,s){return s===void 0?-o:o-s},"/":function(o,s){return o/s},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(o,s){return o.concat(s)},[])},var:function(o,s){var a=s===void 0?null:s,u=this;if(typeof o>"u"||o===""||o===null)return u;for(var c=String(o).split("."),l=0;l<c.length;l++)if(u==null||(u=u[c[l]],u===void 0))return a;return u},missing:function(){for(var o=[],s=Array.isArray(arguments[0])?arguments[0]:arguments,a=0;a<s.length;a++){var u=s[a],c=e.apply({var:u},this);(c===null||c==="")&&o.push(u)}return o},missing_some:function(o,s){var a=e.apply({missing:s},this);return s.length-a.length>=o?[]:a}};return e.is_logic=function(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.keys(o).length===1},e.truthy=function(o){return Array.isArray(o)&&o.length===0?!1:!!o},e.get_operator=function(o){return Object.keys(o)[0]},e.get_values=function(o){return o[e.get_operator(o)]},e.apply=function(o,s){if(Array.isArray(o))return o.map(function(v){return e.apply(v,s)});if(!e.is_logic(o))return o;var a=e.get_operator(o),u=o[a],c,l,f,h,g;if(Array.isArray(u)||(u=[u]),a==="if"||a=="?:"){for(c=0;c<u.length-1;c+=2)if(e.truthy(e.apply(u[c],s)))return e.apply(u[c+1],s);return u.length===c+1?e.apply(u[c],s):null}else if(a==="and"){for(c=0;c<u.length;c+=1)if(l=e.apply(u[c],s),!e.truthy(l))return l;return l}else if(a==="or"){for(c=0;c<u.length;c+=1)if(l=e.apply(u[c],s),e.truthy(l))return l;return l}else{if(a==="filter")return h=e.apply(u[0],s),f=u[1],Array.isArray(h)?h.filter(function(v){return e.truthy(e.apply(f,v))}):[];if(a==="map")return h=e.apply(u[0],s),f=u[1],Array.isArray(h)?h.map(function(v){return e.apply(f,v)}):[];if(a==="reduce")return h=e.apply(u[0],s),f=u[1],g=typeof u[2]<"u"?e.apply(u[2],s):null,Array.isArray(h)?h.reduce(function(v,y){return e.apply(f,{current:y,accumulator:v})},g):g;if(a==="all"){if(h=e.apply(u[0],s),f=u[1],!Array.isArray(h)||!h.length)return!1;for(c=0;c<h.length;c+=1)if(!e.truthy(e.apply(f,h[c])))return!1;return!0}else if(a==="none"){if(h=e.apply(u[0],s),f=u[1],!Array.isArray(h)||!h.length)return!0;for(c=0;c<h.length;c+=1)if(e.truthy(e.apply(f,h[c])))return!1;return!0}else if(a==="some"){if(h=e.apply(u[0],s),f=u[1],!Array.isArray(h)||!h.length)return!1;for(c=0;c<h.length;c+=1)if(e.truthy(e.apply(f,h[c])))return!0;return!1}}if(u=u.map(function(v){return e.apply(v,s)}),r.hasOwnProperty(a)&&typeof r[a]=="function")return r[a].apply(s,u);if(a.indexOf(".")>0){var d=String(a).split("."),m=r;for(c=0;c<d.length;c++){if(!m.hasOwnProperty(d[c]))throw new Error("Unrecognized operation "+a+" (failed at "+d.slice(0,c+1).join(".")+")");m=m[d[c]]}return m.apply(s,u)}throw new Error("Unrecognized operation "+a)},e.uses_data=function(o){var s=[];if(e.is_logic(o)){var a=e.get_operator(o),u=o[a];Array.isArray(u)||(u=[u]),a==="var"?s.push(u[0]):u.forEach(function(c){s.push.apply(s,e.uses_data(c))})}return i(s)},e.add_operation=function(o,s){r[o]=s},e.rm_operation=function(o){delete r[o]},e.rule_like=function(o,s){if(s===o||s==="@")return!0;if(s==="number")return typeof o=="number";if(s==="string")return typeof o=="string";if(s==="array")return Array.isArray(o)&&!e.is_logic(o);if(e.is_logic(s)){if(e.is_logic(o)){var a=e.get_operator(s),u=e.get_operator(o);if(a==="@"||a===u)return e.rule_like(e.get_values(o,!1),e.get_values(s,!1))}return!1}if(Array.isArray(s))if(Array.isArray(o)){if(s.length!==o.length)return!1;for(var c=0;c<s.length;c+=1)if(!e.rule_like(o[c],s[c]))return!1;return!0}else return!1;return!1},e})})(Yi)),Yi.exports}var y0=m0(),_0=v0(y0),w0=function(t,n,i){if(t!==i.event_name)return{matches:!1};var e=i.property_filters,r=!0;if(e&&!p.isEmptyObject(e))try{r=_0.apply(e,n||{})}catch(o){return{matches:!1,error:o.toString()}}return{matches:r}},Ed={};Ed.eventMatchesCriteria=w0;E[pt]=Promise.resolve(Ed);var b0=30,S0=1e3,C0=4,E0=!1;function Id(){this.clicks=[]}Id.prototype.isRageClick=function(t,n){n=n||{};var i=n.threshold_px||b0,e=n.timeout_ms||S0,r=n.click_count||C0,o=n.interactive_elements_only||E0;if(o){var s=wd(t);if(!s||yd(s))return!1}var a=Date.now(),u=t.pageX,c=t.pageY,l=this.clicks[this.clicks.length-1];if(l&&a-l.timestamp<e&&Math.sqrt(Math.pow(u-l.x,2)+Math.pow(c-l.y,2))<i){if(this.clicks.push({x:u,y:c,timestamp:a}),this.clicks.length>=r)return this.clicks=[],!0}else this.clicks=[{x:u,y:c,timestamp:a}];return!1};function rn(t,n){this.changeCallback=t||function(){},this.observerConfig=n,this.observedShadowRoots=null,this.shadowObservers=[]}rn.prototype.getEventTarget=function(t){if(this.observedShadowRoots)return wd(t)};rn.prototype.observeFromEvent=function(t){if(this.observedShadowRoots)for(var n=_d(t),i=0;i<n.length;i++){var e=n[i];e&&e.shadowRoot&&this.observeShadowRoot(e.shadowRoot)}};rn.prototype.observeShadowRoot=function(t){if(!(!this.observedShadowRoots||this.observedShadowRoots.has(t))){var n=this;try{this.observedShadowRoots.add(t);var i=new window.MutationObserver(function(){n.changeCallback()});i.observe(t,this.observerConfig),this.shadowObservers.push(i)}catch(e){ge.critical("Error while observing shadow root",e)}}};rn.prototype.start=function(){if(!this.observedShadowRoots){if(!YE()){ge.critical("Shadow DOM observation unavailable: WeakSet not supported");return}this.observedShadowRoots=new WeakSet}};rn.prototype.stop=function(){if(this.observedShadowRoots){for(var t=0;t<this.shadowObservers.length;t++)try{this.shadowObservers[t].disconnect()}catch(n){ge.critical("Error while disconnecting shadow DOM observer",n)}this.shadowObservers=[],this.observedShadowRoots=null}};var I0=500,k0=[Bn,LE,yo,NE,DE],O0=[Jo],x0=[Ga],If={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden","checked","selected","value","display","visibility"]};function Mt(t){this.eventListeners=[],this.mutationObserver=null,this.shadowDOMObserver=null,this.isTracking=!1,this.lastChangeEventTimestamp=0,this.pendingClicks=[],this.onDeadClickCallback=t,this.processingActive=!1,this.processingTimeout=null}Mt.prototype.addClick=function(t){var n=this.shadowDOMObserver&&this.shadowDOMObserver.getEventTarget(t);return n||(n=t.target||t.srcElement),!n||yd(n)?!1:(this.shadowDOMObserver&&this.shadowDOMObserver.observeFromEvent(t),this.pendingClicks.push({element:n,event:t,timestamp:Date.now()}),!0)};Mt.prototype.trackClick=function(t,n){if(!this.isTracking)return!1;var i=this.addClick(t);return i&&this.triggerProcessing(n),i};Mt.prototype.getDeadClicks=function(t){if(this.pendingClicks.length===0)return[];var n=t.timeout_ms,i=Date.now(),e=this.pendingClicks.slice();this.pendingClicks=[];for(var r=[],o=0;o<e.length;o++){var s=e[o];i-s.timestamp>=n?this.hasChangesAfter(s.timestamp)||r.push(s):this.pendingClicks.push(s)}return r};Mt.prototype.hasChangesAfter=function(t){return this.lastChangeEventTimestamp>=t-100};Mt.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()};Mt.prototype.triggerProcessing=function(t){this.processingActive||(this.processingActive=!0,this.processRecursively(t))};Mt.prototype.processRecursively=function(t){if(!this.isTracking||!this.onDeadClickCallback){this.processingActive=!1;return}var n=t.timeout_ms,i=this;this.processingTimeout=setTimeout(function(){if(i.processingActive){for(var e=i.getDeadClicks(t),r=0;r<e.length;r++)i.onDeadClickCallback(e[r].event);i.pendingClicks.length>0?i.processRecursively(t):i.processingActive=!1}},n)};Mt.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var t=this;k0.forEach(function(i){var e=function(){t.recordChangeEvent()};document.addEventListener(i,e,{capture:!0,passive:!0}),t.eventListeners.push({target:document,event:i,handler:e,options:{capture:!0,passive:!0}})}),x0.forEach(function(i){var e=function(){t.recordChangeEvent()};window.addEventListener(i,e),t.eventListeners.push({target:window,event:i,handler:e})}),O0.forEach(function(i){var e=function(){t.recordChangeEvent()};window.addEventListener(i,e,{passive:!0}),t.eventListeners.push({target:window,event:i,handler:e,options:{passive:!0}})});var n=function(){t.recordChangeEvent()};if(document.addEventListener("selectionchange",n),t.eventListeners.push({target:document,event:"selectionchange",handler:n}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){t.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,If)}catch(i){ge.critical("Error while setting up mutation observer",i)}if(window.customElements)try{this.shadowDOMObserver=new rn(function(){t.recordChangeEvent()},If),this.shadowDOMObserver.start()}catch(i){ge.critical("Error while setting up shadow DOM observer",i),this.shadowDOMObserver=null}}};Mt.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var t=0;t<this.eventListeners.length;t++){var n=this.eventListeners[t];try{n.target.removeEventListener(n.event,n.handler,n.options)}catch(i){ge.critical("Error while removing event listener",i)}}if(this.eventListeners=[],this.mutationObserver){try{this.mutationObserver.disconnect()}catch(i){ge.critical("Error while disconnecting mutation observer",i)}this.mutationObserver=null}if(this.shadowDOMObserver){try{this.shadowDOMObserver.stop()}catch(i){ge.critical("Error while stopping shadow DOM observer",i)}this.shadowDOMObserver=null}}};var kd="autocapture",R0="track_pageview",Od="full-url",A0="url-with-path-and-query-string",M0="url-with-path",T0="allow_element_callback",xd="allow_selectors",Rd="allow_url_regexes",Ad="block_attrs",Md="block_element_callback",Td="block_selectors",Pd="block_url_regexes",$d="capture_extra_attrs",Ld="capture_text_content",Nd="scroll_capture_all",Dd="scroll_depth_percent_checkpoints",Co="click",Eo="dead_click",Ka="input",Fd="pageview",Io="rage_click",Ja="scroll",Xo="page_leave",Xa="submit",Be={};Be[xd]=[];Be[Rd]=[];Be[Ad]=[];Be[Md]=null;Be[Td]=[];Be[Pd]=[];Be[$d]=[];Be[Ld]=!1;Be[Nd]=!1;Be[Dd]=[25,50,75,100];Be[Co]=!0;Be[Eo]=!0;Be[Ka]=!0;Be[Fd]=Od;Be[Io]=!0;Be[Ja]=!0;Be[Xo]=!1;Be[Xa]=!0;var zn={$mp_autocapture:!0},Ud="$mp_click",Bd="$mp_dead_click",P0="$mp_input_change",zd="$mp_rage_click",$0="$mp_scroll",L0="$mp_submit",N0="$mp_page_leave",De=function(t){this.mp=t,this.maxScrollViewDepth=0,this.hasTrackedScrollSession=!1,this.previousScrollHeight=0};De.prototype.init=function(){if(!HE()){ge.critical("Autocapture unavailable: missing required DOM APIs");return}this.initPageListeners(),this.initPageviewTracking(),this.initClickTracking(),this.initDeadClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking(),this.initPageLeaveTracking()};De.prototype.getFullConfig=function(){var t=this.mp.get_config(kd);return t?p.isObject(t)?p.extend({},Be,t):Be:{}};De.prototype.getConfig=function(t){return this.getFullConfig()[t]};De.prototype.currentUrlBlocked=function(){var t=p.info.currentUrl(),n=this.getConfig(Rd)||[];if(n.length)try{return!go(t,n)}catch(e){return ge.critical("Error while checking block URL regexes: ",e),!0}var i=this.getConfig(Pd)||[];if(!i||!i.length)return!1;try{return go(t,i)}catch(e){return ge.critical("Error while checking block URL regexes: ",e),!0}};De.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(kd)?this.getConfig(Fd):this.mp.get_config(R0)};De.prototype.trackDomEvent=function(t,n){if(!this.currentUrlBlocked()){var i=this.mp.is_recording_heatmap_data()&&(n===Ud&&!this.getConfig(Co)||n===zd&&!this._getClickTrackingConfig(Io)||n===Bd&&!this._getClickTrackingConfig(Eo)),e=WE(t,{allowElementCallback:this.getConfig(T0),allowSelectors:this.getConfig(xd),blockAttrs:this.getConfig(Ad),blockElementCallback:this.getConfig(Md),blockSelectors:this.getConfig(Td),captureExtraAttrs:this.getConfig($d),captureTextContent:this.getConfig(Ld),capturedForHeatMap:i});e&&(p.extend(e,zn),this.mp.track(n,e))}};De.prototype.initPageListeners=function(){if(E.removeEventListener(vf,this.listenerPopstate),E.removeEventListener(Ga,this.listenerHashchange),!(!this.pageviewTrackingConfig()&&!this.getConfig(Xo)&&!this.mp.get_config("record_heatmap_data"))){this.listenerPopstate=function(){E.dispatchEvent(new Event(Kt))},this.listenerHashchange=function(){E.dispatchEvent(new Event(Kt))},E.addEventListener(vf,this.listenerPopstate),E.addEventListener(Ga,this.listenerHashchange);var t=E.history.pushState;typeof t=="function"&&(E.history.pushState=function(i,e,r){t.call(E.history,i,e,r),E.dispatchEvent(new Event(Kt))});var n=E.history.replaceState;typeof n=="function"&&(E.history.replaceState=function(i,e,r){n.call(E.history,i,e,r),E.dispatchEvent(new Event(Kt))})}};De.prototype._getClickTrackingConfig=function(t){var n=this.getConfig(t);return n?n===!0?{}:typeof n=="object"?n:{}:null};De.prototype._trackPageLeave=function(t,n,i){if(!this.hasTrackedScrollSession&&!(!this.getConfig(Xo)&&!this.mp.is_recording_heatmap_data())){this.hasTrackedScrollSession=!0;var e=Math.max(W.documentElement.clientHeight,E.innerHeight||0),r=Math.round(Math.max(this.maxScrollViewDepth-e,0)/(i-e)*100),o=Math.round(e/i*100);i<=e&&(r=100,o=100);var s=p.extend({$max_scroll_view_depth:this.maxScrollViewDepth,$max_scroll_percentage:r,$fold_line_percentage:o,$scroll_height:i,$event_type:t.type,$current_url:n||p.info.currentUrl(),$viewportHeight:e,$viewportWidth:Math.max(W.documentElement.clientWidth,E.innerWidth||0),$captured_for_heatmap:this.mp.is_recording_heatmap_data()},zn);this.mp.track(N0,s,{transport:"sendBeacon"})}};De.prototype._initScrollDepthTracking=function(){if(E.removeEventListener(Vu,this.listenerScrollDepth),E.removeEventListener(Jo,this.listenerScrollDepth),!!this.mp.get_config("record_heatmap_data")){ge.log("Initializing scroll depth tracking"),this.maxScrollViewDepth=Math.max(W.documentElement.clientHeight,E.innerHeight||0);var t=function(){if(!this.currentUrlBlocked()){var i=Math.max(W.documentElement.clientHeight,E.innerHeight||0)+E.scrollY;i>this.maxScrollViewDepth&&(this.maxScrollViewDepth=i),this.previousScrollHeight=W.body.scrollHeight}}.bind(this),n=md(t);this.listenerScrollDepth=n.listener,E.addEventListener(n.eventType,this.listenerScrollDepth)}};De.prototype.initClickTracking=function(){E.removeEventListener(jt,this.listenerClick),!(!this.getConfig(Co)&&!this.mp.get_config("record_heatmap_data"))&&(ge.log("Initializing click tracking"),this.listenerClick=function(t){!this.getConfig(Co)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(t,Ud)}.bind(this),E.addEventListener(jt,this.listenerClick))};De.prototype.initDeadClickTracking=function(){var t=this._getClickTrackingConfig(Eo);if(!t&&!this.mp.get_config("record_heatmap_data")){this.stopDeadClickTracking();return}ge.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new Mt(function(n){this.trackDomEvent(n,Bd)}.bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=function(n){var i=this._getClickTrackingConfig(Eo);if(!(!i&&!this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var e=i||{};e.timeout_ms||(e.timeout_ms=I0),this._deadClickTracker.trackClick(n,e)}}.bind(this),E.addEventListener(jt,this.listenerDeadClick))};De.prototype.initInputTracking=function(){E.removeEventListener(Bn,this.listenerChange),this.getConfig(Ka)&&(ge.log("Initializing input tracking"),this.listenerChange=function(t){this.getConfig(Ka)&&this.trackDomEvent(t,P0)}.bind(this),E.addEventListener(Bn,this.listenerChange))};De.prototype.initPageviewTracking=function(){if(E.removeEventListener(Kt,this.listenerLocationchange),!!this.pageviewTrackingConfig()){ge.log("Initializing pageview tracking");var t="",n=!1;this.currentUrlBlocked()||(n=this.mp.track_pageview(zn)),n&&(t=p.info.currentUrl()),this.listenerLocationchange=Jr(function(){if(!this.currentUrlBlocked()){var i=p.info.currentUrl(),e=!1,r=i.split("#")[0].split("?")[0]!==t.split("#")[0].split("?")[0],o=this.pageviewTrackingConfig();if(o===Od?e=i!==t:o===A0?e=i.split("#")[0]!==t.split("#")[0]:o===M0&&(e=r),e){var s=this.mp.track_pageview(zn);s&&(t=i),r&&(this.lastScrollCheckpoint=0,ge.log("Path change: re-initializing scroll depth checkpoints"))}}}.bind(this)),E.addEventListener(Kt,this.listenerLocationchange)}};De.prototype.initRageClickTracking=function(){E.removeEventListener(jt,this.listenerRageClick);var t=this._getClickTrackingConfig(Io);!t&&!this.mp.get_config("record_heatmap_data")||(ge.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new Id),this.listenerRageClick=function(n){var i=this._getClickTrackingConfig(Io);!i&&!this.mp.is_recording_heatmap_data()||this.currentUrlBlocked()||this._rageClickTracker.isRageClick(n,i)&&this.trackDomEvent(n,zd)}.bind(this),E.addEventListener(jt,this.listenerRageClick))};De.prototype.initScrollTracking=function(){if(E.removeEventListener(Jo,this.listenerScroll),E.removeEventListener(Vu,this.listenerScroll),!!this.getConfig(Ja)){ge.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var t=function(){if(this.getConfig(Ja)&&!this.currentUrlBlocked()){var i=this.getConfig(Nd),e=(this.getConfig(Dd)||[]).slice().sort(function(l,f){return l-f}),r=E.scrollY,o=p.extend({$scroll_top:r},zn);try{var s=W.body.scrollHeight,a=Math.round(r/(s-E.innerHeight)*100);if(o.$scroll_height=s,o.$scroll_percentage=a,a>this.lastScrollCheckpoint)for(var u=0;u<e.length;u++){var c=e[u];a>=c&&this.lastScrollCheckpoint<c&&(o.$scroll_checkpoint=c,this.lastScrollCheckpoint=c,i=!0)}}catch(l){ge.critical("Error while calculating scroll percentage",l)}i&&this.mp.track($0,o)}}.bind(this),n=md(t);this.listenerScroll=n.listener,E.addEventListener(n.eventType,this.listenerScroll)}};De.prototype.initSubmitTracking=function(){E.removeEventListener(yo,this.listenerSubmit),this.getConfig(Xa)&&(ge.log("Initializing submit tracking"),this.listenerSubmit=function(t){this.getConfig(Xa)&&this.trackDomEvent(t,L0)}.bind(this),E.addEventListener(yo,this.listenerSubmit))};De.prototype.initPageLeaveTracking=function(){if(W.removeEventListener(gf,this.listenerPageLeaveVisibilitychange),E.removeEventListener(Kt,this.listenerPageLeaveLocationchange),E.removeEventListener(df,this.listenerPageLoad),!(!this.getConfig(Xo)&&!this.mp.get_config("record_heatmap_data"))){ge.log("Initializing page visibility tracking."),this._initScrollDepthTracking();var t=p.info.currentUrl();this.listenerPageLoad=function(){this.previousScrollHeight=W.body.scrollHeight}.bind(this),E.addEventListener(df,this.listenerPageLoad),this.listenerPageLeaveLocationchange=Jr(function(n){if(!this.currentUrlBlocked()){var i=p.info.currentUrl(),e=i!==t;e&&(this._trackPageLeave(n,t,this.previousScrollHeight),t=i,this.maxScrollViewDepth=Math.max(W.documentElement.clientHeight,E.innerHeight||0),this.previousScrollHeight=W.body.scrollHeight,this.hasTrackedScrollSession=!1)}}.bind(this)),E.addEventListener(Kt,this.listenerPageLeaveLocationchange),this.listenerPageLeaveVisibilitychange=function(n){W.hidden&&this._trackPageLeave(n,t,this.previousScrollHeight)}.bind(this),W.addEventListener(gf,this.listenerPageLeaveVisibilitychange)}};De.prototype.stopDeadClickTracking=function(){this.listenerDeadClick&&(E.removeEventListener(jt,this.listenerDeadClick),this.listenerDeadClick=null),this._deadClickTracker&&(this._deadClickTracker.stopTracking(),this._deadClickTracker=null)};Uu(De);var qd=function(t,n){return E[pt]&&typeof E[pt].then=="function"||(E[pt]=new Promise(function(i){t(n,i)}).then(function(){var i=E[pt];if(i&&typeof i.then=="function")return i;throw new Error("targeting failed to load")}).catch(function(i){throw delete E[pt],i})),E[pt]},Ce=Gt("flags"),ko="flags",Oo="context",Za={};Za[Oo]={};var D0=function(t,n){return t+":"+n},F0=function(t){return t.split(":")[0]},F=function(t){this.fetch=E.fetch,this.getFullApiRoute=t.getFullApiRoute,this.getMpConfig=t.getConfigFunc,this.setMpConfig=t.setConfigFunc,this.getMpProperty=t.getPropertyFunc,this.track=t.trackingFunc,this.loadExtraBundle=t.loadExtraBundle||function(){},this.targetingSrc=t.targetingSrc||""};F.prototype.init=function(){if(!this.minApisSupported()){Ce.critical("Feature Flags unavailable: missing minimum required APIs");return}this.flags=null,this.fetchFlags().catch(function(){Ce.error("Error fetching flags during init")}),this.trackedFeatures=new Set,this.pendingFirstTimeEvents={},this.activatedFirstTimeEvents={}};F.prototype.getFullConfig=function(){var t=this.getMpConfig(ko);return t?p.isObject(t)?p.extend({},Za,t):Za:{}};F.prototype.getConfig=function(t){return this.getFullConfig()[t]};F.prototype.isSystemEnabled=function(){return!!this.getMpConfig(ko)};F.prototype.updateContext=function(t,n){if(!this.isSystemEnabled())return Ce.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var i=this.getMpConfig(ko);p.isObject(i)||(i={});var e=n&&n.replace?{}:this.getConfig(Oo);i[Oo]=p.extend({},e,t);var r={};return r[ko]=i,this.setMpConfig(r),this.fetchFlags().catch(function(){Ce.error("Error fetching flags during updateContext")})};F.prototype.areFlagsReady=function(){return this.isSystemEnabled()||Ce.error("Feature Flags not enabled"),!!this.flags};F.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var t=this.getMpProperty("distinct_id"),n=this.getMpProperty("$device_id"),i=sd();Ce.log("Fetching flags for distinct ID: "+t);var e=p.extend({distinct_id:t,device_id:n},this.getConfig(Oo)),r=new URLSearchParams;r.set("context",JSON.stringify(e)),r.set("token",this.getMpConfig("token")),r.set("mp_lib","web"),r.set("$lib_version",nt.LIB_VERSION);var o=this.getFullApiRoute()+"?"+r.toString();return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=this.fetch.call(E,o,{method:"GET",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:i}}).then(function(s){return this.markFetchComplete(),s.json()}.bind(this)).then(function(s){var a=s.flags;if(!a)throw new Error("No flags in API response");var u=new Map,c={};p.each(a,function(f,h){var g=!1,d=h+":";if(p.each(this.activatedFirstTimeEvents,function(v,y){y.startsWith(d)&&(g=!0)}),g){var m=this.flags&&this.flags.get(h);m&&u.set(h,m)}else u.set(h,{key:f.variant_key,value:f.variant_value,experiment_id:f.experiment_id,is_experiment_active:f.is_experiment_active,is_qa_tester:f.is_qa_tester})},this);var l=s.pending_first_time_events;l&&l.length>0&&p.each(l,function(f){var h=f.flag_key,g=D0(h,f.first_time_event_hash);this.activatedFirstTimeEvents[g]||(c[g]={flag_key:h,flag_id:f.flag_id,project_id:f.project_id,first_time_event_hash:f.first_time_event_hash,event_name:f.event_name,property_filters:f.property_filters,pending_variant:f.pending_variant})},this),this.activatedFirstTimeEvents&&p.each(this.activatedFirstTimeEvents,function(f,h){var g=F0(h);f&&!u.has(g)&&this.flags&&this.flags.has(g)&&u.set(g,this.flags.get(g))},this),this.flags=u,this.pendingFirstTimeEvents=c,this._traceparent=i,this._loadTargetingIfNeeded()}.bind(this)).catch(function(s){throw this._fetchInProgressStartTime&&this.markFetchComplete(),Ce.error(s),s}.bind(this)),this.fetchPromise};F.prototype.loadFlags=function(){return this.isSystemEnabled()?this.trackedFeatures?this._fetchInProgressStartTime?this.fetchPromise:this.fetchFlags():(Ce.error("loadFlags called before init"),Promise.resolve()):Promise.resolve()};F.prototype.markFetchComplete=function(){if(!this._fetchInProgressStartTime){Ce.error("Fetch in progress started time not set, cannot mark fetch complete");return}this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null};F.prototype._loadTargetingIfNeeded=function(){var t=!1;p.each(this.pendingFirstTimeEvents,function(n){n.property_filters&&!p.isEmptyObject(n.property_filters)&&(t=!0)}),t&&this.getTargeting().then(function(){Ce.log("targeting loaded for property filter evaluation")})};F.prototype.getTargeting=function(){return qd(this.loadExtraBundle.bind(this),this.targetingSrc).catch(function(t){Ce.error("Failed to load targeting: "+t)}.bind(this))};F.prototype.checkFirstTimeEvents=function(t,n){!this.pendingFirstTimeEvents||p.isEmptyObject(this.pendingFirstTimeEvents)||(E[pt]&&p.isFunction(E[pt].then)?E[pt].then(function(i){this._processFirstTimeEventCheck(t,n,i)}.bind(this)).catch(function(){this._processFirstTimeEventCheck(t,n,null)}.bind(this)):this._processFirstTimeEventCheck(t,n,null))};F.prototype._processFirstTimeEventCheck=function(t,n,i){p.each(this.pendingFirstTimeEvents,function(e,r){if(!this.activatedFirstTimeEvents[r]){var o=e.flag_key,s;if(!i&&e.property_filters&&!p.isEmptyObject(e.property_filters)){Ce.warn('Skipping event check for "'+o+'" - property filters require targeting library');return}if(!i)s={matches:t===e.event_name,error:null};else{var a={event_name:e.event_name,property_filters:e.property_filters};s=i.eventMatchesCriteria(t,n,a)}if(s.error){Ce.error('Error checking first-time event for flag "'+o+'": '+s.error);return}if(s.matches){Ce.log('First-time event matched for flag "'+o+'": '+t);var u={key:e.pending_variant.variant_key,value:e.pending_variant.variant_value,experiment_id:e.pending_variant.experiment_id,is_experiment_active:e.pending_variant.is_experiment_active};this.flags.set(o,u),this.activatedFirstTimeEvents[r]=!0,this.recordFirstTimeEvent(e.flag_id,e.project_id,e.first_time_event_hash)}}},this)};F.prototype.getFirstTimeEventApiRoute=function(t){return this.getFullApiRoute()+"/"+t+"/first-time-events"};F.prototype.recordFirstTimeEvent=function(t,n,i){var e=this.getMpProperty("distinct_id"),r=sd(),o=new URLSearchParams;o.set("mp_lib","web"),o.set("$lib_version",nt.LIB_VERSION);var s=this.getFirstTimeEventApiRoute(t)+"?"+o.toString(),a={distinct_id:e,project_id:n,first_time_event_hash:i};Ce.log("Recording first-time event for flag: "+t),this.fetch.call(E,s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:r},body:JSON.stringify(a)}).catch(function(u){Ce.error("Failed to record first-time event for flag "+t+": "+u)})};F.prototype.getVariant=function(t,n){return this.fetchPromise?this.fetchPromise.then(function(){return this.getVariantSync(t,n)}.bind(this)).catch(function(i){return Ce.error(i),n}):new Promise(function(i){Ce.critical("Feature Flags not initialized"),i(n)})};F.prototype.getVariantSync=function(t,n){if(!this.areFlagsReady())return Ce.log("Flags not loaded yet"),n;var i=this.flags.get(t);return i?(this.trackFeatureCheck(t,i),i):(Ce.log('No flag found: "'+t+'"'),n)};F.prototype.getVariantValue=function(t,n){return this.getVariant(t,{value:n}).then(function(i){return i.value}).catch(function(i){return Ce.error(i),n})};F.prototype.getFeatureData=function(t,n){return Ce.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(t,n)};F.prototype.getVariantValueSync=function(t,n){return this.getVariantSync(t,{value:n}).value};F.prototype.isEnabled=function(t,n){return this.getVariantValue(t).then(function(){return this.isEnabledSync(t,n)}.bind(this)).catch(function(i){return Ce.error(i),n})};F.prototype.isEnabledSync=function(t,n){n=n||!1;var i=this.getVariantValueSync(t,n);return i!==!0&&i!==!1&&(Ce.error('Feature flag "'+t+'" value: '+i+" is not a boolean; returning fallback value: "+n),i=n),i};F.prototype.trackFeatureCheck=function(t,n){if(!this.trackedFeatures.has(t)){this.trackedFeatures.add(t);var i={"Experiment name":t,"Variant name":n.key,$experiment_type:"feature_flag","Variant fetch start time":new Date(this._fetchStartTime).toISOString(),"Variant fetch complete time":new Date(this._fetchCompleteTime).toISOString(),"Variant fetch latency (ms)":this._fetchLatency,"Variant fetch traceparent":this._traceparent};n.experiment_id!=="undefined"&&(i.$experiment_id=n.experiment_id),n.is_experiment_active!=="undefined"&&(i.$is_experiment_active=n.is_experiment_active),n.is_qa_tester!=="undefined"&&(i.$is_qa_tester=n.is_qa_tester),this.track("$experiment_started",i)}};F.prototype.whenReady=function(){return this.fetchPromise?this.fetchPromise:Promise.resolve()};F.prototype.minApisSupported=function(){return!!this.fetch&&typeof Promise<"u"&&typeof Map<"u"&&typeof Set<"u"};Uu(F);F.prototype.are_flags_ready=F.prototype.areFlagsReady;F.prototype.get_variant=F.prototype.getVariant;F.prototype.get_variant_sync=F.prototype.getVariantSync;F.prototype.get_variant_value=F.prototype.getVariantValue;F.prototype.get_variant_value_sync=F.prototype.getVariantValueSync;F.prototype.is_enabled=F.prototype.isEnabled;F.prototype.is_enabled_sync=F.prototype.isEnabledSync;F.prototype.load_flags=F.prototype.loadFlags;F.prototype.update_context=F.prototype.updateContext;F.prototype.when_ready=F.prototype.whenReady;F.prototype.get_feature_data=F.prototype.getFeatureData;F.prototype.getTargeting=F.prototype.getTargeting;var U0=Gt("recorder"),jd="mp_iframe_handshake_request",Gd="mp_iframe_handshake_response",qe=function(t){this.mixpanelInstance=t.mixpanelInstance,this.getMpConfig=t.getConfigFunc,this.getTabId=t.getTabIdFunc,this.reportError=t.reportErrorFunc,this.getDistinctId=t.getDistinctIdFunc,this.loadExtraBundle=t.loadExtraBundle,this.recorderSrc=t.recorderSrc,this.targetingSrc=t.targetingSrc,this.libBasePath=t.libBasePath,this._recorder=null,this._parentReplayId=null,this._parentFrameRetryInterval=null};qe.prototype.shouldLoadRecorder=function(){if(this.getMpConfig("disable_persistence"))return V.log("Load recorder check skipped due to disable_persistence config"),H.resolve(!1);var t=new vt(zu),n=this.getTabId();return t.init().then(function(){return t.getAll()}).then(function(i){for(var e=0;e<i.length;e++)if(Wu(i[e])||i[e].tabId===n)return!0;return!1}).catch(p.bind(function(i){return this.reportError("Error checking recording registry",i),!1},this))};qe.prototype.checkAndStartSessionRecording=function(t,n){if(!E.MutationObserver)return V.critical("Browser does not support MutationObserver; skipping session recording"),H.resolve();var i=p.bind(function(a){return new H(p.bind(function(u){var c=Jr(p.bind(function(){this._recorder=this._recorder||new E[qs](this.mixpanelInstance),this._recorder.resumeRecording(a),u()},this));if(p.isUndefined(E[qs])){var l=this.recorderSrc||this.libBasePath+Cg;this.loadExtraBundle(l,c)}else c()},this))},this),e=hd(this.getMpConfig("record_allowed_iframe_origins"),U0),r=e.length>0;if(r&&(this._setupParentFrameListener(e),E.parent!==E))return this._setupChildFrameListener(e,i),this._sendParentFrameRequestWithRetry(e),H.resolve();var o=p.isUndefined(n)?this.getMpConfig("record_sessions_percent"):n,s=o>0&&Math.random()*100<=o;return t||s?i(!0):this.shouldLoadRecorder().then(p.bind(function(a){return a?i(!1):H.resolve()},this))};qe.prototype.isRecording=function(){if(!this._recorder||!p.isFunction(this._recorder.isRecording))return!1;try{return this._recorder.isRecording()}catch(t){return this.reportError("Error checking if recording is active",t),!1}};qe.prototype.startRecordingOnEvent=function(t,n){var i=this.isRecording(),e=this.getMpConfig("recording_event_triggers");if(!i&&e){var r=e[t];if(r&&typeof r.percentage=="number"){var o=r.percentage,s=r.property_filters;if(s&&!p.isEmptyObject(s)){var a=this.targetingSrc||this.libBasePath+kf;qd(this.loadExtraBundle,a).then(function(u){try{var c=u.eventMatchesCriteria(t,n,{event_name:t,property_filters:s});c.matches&&this.checkAndStartSessionRecording(!1,o)}catch(l){V.critical("Could not parse recording event trigger properties logic:",l)}}.bind(this)).catch(function(u){V.critical("Failed to load targeting library:",u)})}else this.checkAndStartSessionRecording(!1,o)}}};qe.prototype.stopSessionRecording=function(){return this._recorder?this._recorder.stopRecording():H.resolve()};qe.prototype.pauseSessionRecording=function(){return this._recorder?this._recorder.pauseRecording():H.resolve()};qe.prototype.resumeSessionRecording=function(){return this._recorder?this._recorder.resumeRecording():H.resolve()};qe.prototype.isRecordingHeatmapData=function(){return this.getSessionReplayId()&&this.getMpConfig("record_heatmap_data")};qe.prototype.getSessionRecordingProperties=function(){var t={},n=this.getSessionReplayId();return n&&(t.$mp_replay_id=n),t};qe.prototype.getSessionReplayUrl=function(){var t=null,n=this.getSessionReplayId();if(n){var i=p.HTTPBuildQuery({replay_id:n,distinct_id:this.getDistinctId(),token:this.getMpConfig("token")});t="https://mixpanel.com/projects/replay-redirect?"+i}return t};qe.prototype.getSessionReplayId=function(){if(this._parentReplayId)return this._parentReplayId;var t=null;return this._recorder&&(t=this._recorder.replayId),t||null};qe.prototype.getRecorder=function(){return this._recorder};qe.prototype._setupChildFrameListener=function(t,n){if(!this._childFrameMessageHandler){var i=this;this._childFrameMessageHandler=function(e){if(t.indexOf(e.origin)!==-1){var r=e.data;r&&r.type===Gd&&r.token===i.getMpConfig("token")&&r.replayId&&(i._parentReplayId=r.replayId,r.distinctId&&i.mixpanelInstance.identify(r.distinctId),i._parentFrameRetryActive=!1,E.removeEventListener("message",i._childFrameMessageHandler),i._childFrameMessageHandler=null,n(!0))}},E.addEventListener("message",this._childFrameMessageHandler)}};qe.prototype._sendParentFrameRequest=function(t){var n={};n.type=jd,n.token=this.getMpConfig("token");for(var i=0;i<t.length;i++)try{E.parent.postMessage(n,t[i])}catch{}};qe.prototype._sendParentFrameRequestWithRetry=function(t){var n=this,i=10,e=0,r=50;this._parentFrameRetryActive=!0,this._sendParentFrameRequest(t);function o(){setTimeout(function(){!n._parentFrameRetryActive||n._parentReplayId||++e>=i||(n._sendParentFrameRequest(t),r*=2,o())},r)}o()};qe.prototype._setupParentFrameListener=function(t){if(!this._parentFrameMessageHandler){var n=this;this._parentFrameMessageHandler=function(i){if(t.indexOf(i.origin)!==-1){var e=i.data;if(e&&e.type===jd&&e.token===n.getMpConfig("token")){var r=n.getSessionReplayId();if(r){var o={};o.type=Gd,o.token=n.getMpConfig("token"),o.replayId=r,o.distinctId=n.getDistinctId(),i.source.postMessage(o,i.origin)}}}},E.addEventListener("message",this._parentFrameMessageHandler)}};Uu(qe);var Vt=function(){};Vt.prototype.create_properties=function(){};Vt.prototype.event_handler=function(){};Vt.prototype.after_track_handler=function(){};Vt.prototype.init=function(t){return this.mp=t,this};Vt.prototype.track=function(t,n,i,e){var r=this,o=p.dom_query(t);if(o.length===0){V.error("The DOM query ("+t+") returned 0 elements");return}return p.each(o,function(s){p.register_event(s,this.override_event,function(a){var u={},c=r.create_properties(i,this),l=r.mp.get_config("track_links_timeout");r.event_handler(a,this,u),window.setTimeout(r.track_callback(e,c,u,!0),l),r.mp.track(n,c,r.track_callback(e,c,u))})},this),!0};Vt.prototype.track_callback=function(t,n,i,e){e=e||!1;var r=this;return function(){i.callback_fired||(i.callback_fired=!0,!(t&&t(e,n)===!1)&&r.after_track_handler(n,i,e))}};Vt.prototype.create_properties=function(t,n){var i;return typeof t=="function"?i=t(n):i=p.extend({},t),i};var Zr=function(){this.override_event="click"};p.inherit(Zr,Vt);Zr.prototype.create_properties=function(t,n){var i=Zr.superclass.create_properties.apply(this,arguments);return n.href&&(i.url=n.href),i};Zr.prototype.event_handler=function(t,n,i){i.new_tab=t.which===2||t.metaKey||t.ctrlKey||n.target==="_blank",i.href=n.href,i.new_tab||t.preventDefault()};Zr.prototype.after_track_handler=function(t,n){n.new_tab||setTimeout(function(){window.location=n.href},0)};var Zo=function(){this.override_event="submit"};p.inherit(Zo,Vt);Zo.prototype.event_handler=function(t,n,i){i.element=n,t.preventDefault()};Zo.prototype.after_track_handler=function(t,n){setTimeout(function(){n.element.submit()},0)};var Zt="$set",Qr="$set_once",dt="$unset",wr="$add",xt="$append",br="$union",Ut="$remove",B0="$delete",Wd={set_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=r)},this):e[t]=n,i[Zt]=e,i},unset_action:function(t){var n={},i=[];return p.isArray(t)||(t=[t]),p.each(t,function(e){this._is_reserved_property(e)||i.push(e)},this),n[dt]=i,n},set_once_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=r)},this):e[t]=n,i[Qr]=e,i},union_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=p.isArray(r)?r:[r])},this):e[t]=p.isArray(n)?n:[n],i[br]=e,i},append_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=r)},this):e[t]=n,i[xt]=e,i},remove_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=r)},this):e[t]=n,i[Ut]=e,i},delete_action:function(){var t={};return t[B0]="",t}},we=function(){};p.extend(we.prototype,Wd);we.prototype._init=function(t,n,i){this._mixpanel=t,this._group_key=n,this._group_id=i};we.prototype.set=en(function(t,n,i){var e=this.set_action(t,n);return p.isObject(t)&&(i=n),this._send_request(e,i)});we.prototype.set_once=en(function(t,n,i){var e=this.set_once_action(t,n);return p.isObject(t)&&(i=n),this._send_request(e,i)});we.prototype.unset=en(function(t,n){var i=this.unset_action(t);return this._send_request(i,n)});we.prototype.union=en(function(t,n,i){p.isObject(t)&&(i=n);var e=this.union_action(t,n);return this._send_request(e,i)});we.prototype.delete=en(function(t){var n=this.delete_action();return this._send_request(n,t)});we.prototype.remove=en(function(t,n,i){var e=this.remove_action(t,n);return this._send_request(e,i)});we.prototype._send_request=function(t,n){t.$group_key=this._group_key,t.$group_id=this._group_id,t.$token=this._get_config("token");var i=p.encodeDates(t);return this._mixpanel._track_or_batch({type:"groups",data:i,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},n)};we.prototype._is_reserved_property=function(t){return t==="$group_key"||t==="$group_id"};we.prototype._get_config=function(t){return this._mixpanel.get_config(t)};we.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};we.prototype.remove=we.prototype.remove;we.prototype.set=we.prototype.set;we.prototype.set_once=we.prototype.set_once;we.prototype.union=we.prototype.union;we.prototype.unset=we.prototype.unset;we.prototype.toString=we.prototype.toString;var Y=function(){};p.extend(Y.prototype,Wd);Y.prototype._init=function(t){this._mixpanel=t};Y.prototype.set=ur(function(t,n,i){var e=this.set_action(t,n);return p.isObject(t)&&(i=n),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),e[Zt]=p.extend({},p.info.people_properties(),e[Zt]),this._send_request(e,i)});Y.prototype.set_once=ur(function(t,n,i){var e=this.set_once_action(t,n);return p.isObject(t)&&(i=n),this._send_request(e,i)});Y.prototype.unset=ur(function(t,n){var i=this.unset_action(t);return this._send_request(i,n)});Y.prototype.increment=ur(function(t,n,i){var e={},r={};return p.isObject(t)?(p.each(t,function(o,s){if(!this._is_reserved_property(s))if(isNaN(parseFloat(o))){V.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else r[s]=o},this),i=n):(p.isUndefined(n)&&(n=1),r[t]=n),e[wr]=r,this._send_request(e,i)});Y.prototype.append=ur(function(t,n,i){p.isObject(t)&&(i=n);var e=this.append_action(t,n);return this._send_request(e,i)});Y.prototype.remove=ur(function(t,n,i){p.isObject(t)&&(i=n);var e=this.remove_action(t,n);return this._send_request(e,i)});Y.prototype.union=ur(function(t,n,i){p.isObject(t)&&(i=n);var e=this.union_action(t,n);return this._send_request(e,i)});Y.prototype.track_charge=ur(function(){V.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")});Y.prototype.clear_charges=function(t){return this.set("$transactions",[],t)};Y.prototype.delete_user=function(){if(!this._identify_called()){V.error("mixpanel.people.delete_user() requires you to call identify() first");return}var t={$delete:this._mixpanel.get_distinct_id()};return this._send_request(t)};Y.prototype.toString=function(){return this._mixpanel.toString()+".people"};Y.prototype._send_request=function(t,n){t.$token=this._get_config("token"),t.$distinct_id=this._mixpanel.get_distinct_id();var i=this._mixpanel.get_property("$device_id"),e=this._mixpanel.get_property("$user_id"),r=this._mixpanel.get_property("$had_persisted_distinct_id");i&&(t.$device_id=i),e&&(t.$user_id=e),r&&(t.$had_persisted_distinct_id=r);var o=p.encodeDates(t);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},n):(this._enqueue(t),p.isUndefined(n)||(this._get_config("verbose")?n({status:-1,error:null}):n(-1)),p.truncate(o,255))};Y.prototype._get_config=function(t){return this._mixpanel.get_config(t)};Y.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};Y.prototype._enqueue=function(t){Zt in t?this._mixpanel.persistence._add_to_people_queue(Zt,t):Qr in t?this._mixpanel.persistence._add_to_people_queue(Qr,t):dt in t?this._mixpanel.persistence._add_to_people_queue(dt,t):wr in t?this._mixpanel.persistence._add_to_people_queue(wr,t):xt in t?this._mixpanel.persistence._add_to_people_queue(xt,t):Ut in t?this._mixpanel.persistence._add_to_people_queue(Ut,t):br in t?this._mixpanel.persistence._add_to_people_queue(br,t):V.error("Invalid call to _enqueue():",t)};Y.prototype._flush_one_queue=function(t,n,i,e){var r=this,o=p.extend({},this._mixpanel.persistence.load_queue(t)),s=o;!p.isUndefined(o)&&p.isObject(o)&&!p.isEmptyObject(o)&&(r._mixpanel.persistence._pop_from_people_queue(t,o),r._mixpanel.persistence.save(),e&&(s=e(o)),n.call(r,s,function(a,u){a===0&&r._mixpanel.persistence._add_to_people_queue(t,o),p.isUndefined(i)||i(a,u)}))};Y.prototype._flush=function(t,n,i,e,r,o,s){var a=this;this._flush_one_queue(Zt,this.set,t),this._flush_one_queue(Qr,this.set_once,e),this._flush_one_queue(dt,this.unset,o,function(v){return p.keys(v)}),this._flush_one_queue(wr,this.increment,n),this._flush_one_queue(br,this.union,r);var u=this._mixpanel.persistence.load_queue(xt);if(!p.isUndefined(u)&&p.isArray(u)&&u.length)for(var c,l=function(v,y){v===0&&a._mixpanel.persistence._add_to_people_queue(xt,c),p.isUndefined(i)||i(v,y)},f=u.length-1;f>=0;f--)u=this._mixpanel.persistence.load_queue(xt),c=u.pop(),a._mixpanel.persistence.save(),p.isEmptyObject(c)||a.append(c,l);var h=this._mixpanel.persistence.load_queue(Ut);if(!p.isUndefined(h)&&p.isArray(h)&&h.length)for(var g,d=function(v,y){v===0&&a._mixpanel.persistence._add_to_people_queue(Ut,g),p.isUndefined(s)||s(v,y)},m=h.length-1;m>=0;m--)h=this._mixpanel.persistence.load_queue(Ut),g=h.pop(),a._mixpanel.persistence.save(),p.isEmptyObject(g)||a.remove(g,d)};Y.prototype._is_reserved_property=function(t){return t==="$distinct_id"||t==="$token"||t==="$device_id"||t==="$user_id"||t==="$had_persisted_distinct_id"};Y.prototype.set=Y.prototype.set;Y.prototype.set_once=Y.prototype.set_once;Y.prototype.unset=Y.prototype.unset;Y.prototype.increment=Y.prototype.increment;Y.prototype.append=Y.prototype.append;Y.prototype.remove=Y.prototype.remove;Y.prototype.union=Y.prototype.union;Y.prototype.track_charge=Y.prototype.track_charge;Y.prototype.clear_charges=Y.prototype.clear_charges;Y.prototype.delete_user=Y.prototype.delete_user;Y.prototype.toString=Y.prototype.toString;var Ku="__mps",Ju="__mpso",Xu="__mpus",Zu="__mpa",Qu="__mpap",ec="__mpr",tc="__mpu",Vd="$people_distinct_id",xo="__alias",qn="__timers",z0=[Ku,Ju,Xu,Zu,Qu,ec,tc,Vd,xo,qn],X=function(t){this.props={},this.campaign_params_saved=!1,t.persistence_name?this.name="mp_"+t.persistence_name:this.name="mp_"+t.token+"_mixpanel";var n=t.persistence;n!=="cookie"&&n!=="localStorage"&&(V.critical("Unknown persistence type "+n+"; falling back to cookie"),n=t.persistence="cookie"),n==="localStorage"&&p.localStorage.is_supported()?this.storage=p.localStorage:this.storage=p.cookie,this.load(),this.update_config(t),this.upgrade(),this.save()};X.prototype.properties=function(){var t={};return this.load(),p.each(this.props,function(n,i){p.include(z0,i)||(t[i]=n)}),t};X.prototype.load=function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=p.extend({},t))}};X.prototype.upgrade=function(){var t,n;this.storage===p.localStorage?(t=p.cookie.parse(this.name),p.cookie.remove(this.name),p.cookie.remove(this.name,!0),t&&this.register_once(t)):this.storage===p.cookie&&(n=p.localStorage.parse(this.name),p.localStorage.remove(this.name),n&&this.register_once(n))};X.prototype.save=function(){this.disabled||this.storage.set(this.name,Xr(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};X.prototype.load_prop=function(t){return this.load(),this.props[t]};X.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};X.prototype.clear=function(){this.remove(),this.props={}};X.prototype.register_once=function(t,n,i){return p.isObject(t)?(typeof n>"u"&&(n="None"),this.expire_days=typeof i>"u"?this.default_expiry:i,this.load(),p.each(t,function(e,r){(!this.props.hasOwnProperty(r)||this.props[r]===n)&&(this.props[r]=e)},this),this.save(),!0):!1};X.prototype.register=function(t,n){return p.isObject(t)?(this.expire_days=typeof n>"u"?this.default_expiry:n,this.load(),p.extend(this.props,t),this.save(),!0):!1};X.prototype.unregister=function(t){this.load(),t in this.props&&(delete this.props[t],this.save())};X.prototype.update_search_keyword=function(t){this.register(p.info.searchInfo(t))};X.prototype.update_referrer_info=function(t){this.register_once({$initial_referrer:t||"$direct",$initial_referring_domain:p.info.referringDomain(t)||"$direct"},"")};X.prototype.get_referrer_info=function(){return p.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};X.prototype.update_config=function(t){this.default_expiry=this.expire_days=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cookie_domain(t.cookie_domain),this.set_cross_site(t.cross_site_cookie),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie)};X.prototype.set_disabled=function(t){this.disabled=t,this.disabled?this.remove():this.save()};X.prototype.set_cookie_domain=function(t){t!==this.cookie_domain&&(this.remove(),this.cookie_domain=t,this.save())};X.prototype.set_cross_site=function(t){t!==this.cross_site&&(this.cross_site=t,this.remove(),this.save())};X.prototype.set_cross_subdomain=function(t){t!==this.cross_subdomain&&(this.cross_subdomain=t,this.remove(),this.save())};X.prototype.get_cross_subdomain=function(){return this.cross_subdomain};X.prototype.set_secure=function(t){t!==this.secure&&(this.secure=!!t,this.remove(),this.save())};X.prototype._add_to_people_queue=function(t,n){var i=this._get_queue_key(t),e=n[t],r=this._get_or_create_queue(Zt),o=this._get_or_create_queue(Qr),s=this._get_or_create_queue(dt),a=this._get_or_create_queue(wr),u=this._get_or_create_queue(br),c=this._get_or_create_queue(Ut,[]),l=this._get_or_create_queue(xt,[]);i===Ku?(p.extend(r,e),this._pop_from_people_queue(wr,e),this._pop_from_people_queue(br,e),this._pop_from_people_queue(dt,e)):i===Ju?(p.each(e,function(f,h){h in o||(o[h]=f)}),this._pop_from_people_queue(dt,e)):i===Xu?p.each(e,function(f){p.each([r,o,a,u],function(h){f in h&&delete h[f]}),p.each(l,function(h){f in h&&delete h[f]}),s[f]=!0}):i===Zu?(p.each(e,function(f,h){h in r?r[h]+=f:(h in a||(a[h]=0),a[h]+=f)},this),this._pop_from_people_queue(dt,e)):i===tc?(p.each(e,function(f,h){p.isArray(f)&&(h in u||(u[h]=[]),p.each(f,function(g){p.include(u[h],g)||u[h].push(g)}))}),this._pop_from_people_queue(dt,e)):i===ec?(c.push(e),this._pop_from_people_queue(xt,e)):i===Qu&&(l.push(e),this._pop_from_people_queue(dt,e)),V.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),V.log(n),this.save()};X.prototype._pop_from_people_queue=function(t,n){var i=this.props[this._get_queue_key(t)];p.isUndefined(i)||p.each(n,function(e,r){t===xt||t===Ut?p.each(i,function(o){o[r]===e&&delete o[r]}):delete i[r]},this)};X.prototype.load_queue=function(t){return this.load_prop(this._get_queue_key(t))};X.prototype._get_queue_key=function(t){if(t===Zt)return Ku;if(t===Qr)return Ju;if(t===dt)return Xu;if(t===wr)return Zu;if(t===xt)return Qu;if(t===Ut)return ec;if(t===br)return tc;V.error("Invalid queue:",t)};X.prototype._get_or_create_queue=function(t,n){var i=this._get_queue_key(t);return n=p.isUndefined(n)?{}:n,this.props[i]||(this.props[i]=n)};X.prototype.set_event_timer=function(t,n){var i=this.load_prop(qn)||{};i[t]=n,this.props[qn]=i,this.save()};X.prototype.remove_event_timer=function(t){var n=this.load_prop(qn)||{},i=n[t];return p.isUndefined(i)||(delete this.props[qn][t],this.save()),i};var Ro,Qa=function(t,n){throw new Error(t+" not available in this build.")},Ve,eu=0,q0=1,ut="mixpanel",Hd="base64",j0="json",rc="$device:",G0="strict",W0="fallback",V0="disabled",Ur=E.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Yd=!Ur&&It.indexOf("MSIE")===-1&&It.indexOf("Mozilla")===-1,Ao=null;Ft.sendBeacon&&(Ao=function(){return Ft.sendBeacon.apply(Ft,arguments)});var Kd={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/",settings:"settings/"},tu={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Kd,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:Hd,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Jt,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Jt,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_allowed_iframe_origins:[],record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,recording_event_triggers:{},record_idle_timeout_ms:1800*1e3,record_mask_inputs:!0,record_max_ms:wn,record_min_ms:0,record_network:!1,record_network_options:{},record_sessions_percent:0,recorder_src:null,targeting_src:null,lib_base_path:"https://cdn.mxpnl.com/libs/",remote_settings_mode:V0},Jd=!1,S=function(){},ru=function(t,n,i){var e,r=i===ut?Ve:Ve[i];if(r&&Ro===eu)e=r;else{if(r&&!p.isArray(r)){V.error("You have already initialized "+i);return}e=new S}if(e._cached_groups={},e._init(t,n,i),e.people=new Y,e.people._init(e),!e.get_config("skip_first_touch_marketing")){var o=p.info.campaignParams(null),s={},a=!1;p.each(o,function(c,l){s["initial_"+l]=c,c&&(a=!0)}),a&&e.people.set_once(s)}nt.DEBUG=nt.DEBUG||e.get_config("debug");var u=Ro===eu?"module":"snippet";return E.dispatchEvent(new E.CustomEvent("$mp_sdk_to_extension_event",{detail:{instance:e,source:u,token:t,name:i,info:p.info}})),!p.isUndefined(r)&&p.isArray(r)&&(e._execute_array.call(e.people,r.people),e._execute_array(r)),e};S.prototype.init=function(t,n,i){if(p.isUndefined(i)){this.report_error("You must name your new library: init(token, config, name)");return}if(i===ut){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var e=ru(t,n,i);return Ve[i]=e,e._loaded(),e};S.prototype._init=function(t,n,i){n=n||{},this.__loaded=!0,this.config={};var e={};if(!("api_payload_format"in n)){var r=n.api_host||tu.api_host;r.match(/\.mixpanel\.com/)&&(e.api_payload_format=j0)}if(this.hooks={},this.set_config(p.extend({},tu,e,n,{name:i,token:t,callback_fn:(i===ut?i:ut+"."+i)+"._jsc"})),this.recorderManager=new qe({mixpanelInstance:this,getConfigFunc:p.bind(this.get_config,this),setConfigFunc:p.bind(this.set_config,this),getTabIdFunc:p.bind(this.get_tab_id,this),reportErrorFunc:p.bind(this.report_error,this),getDistinctIdFunc:p.bind(this.get_distinct_id,this),recorderSrc:this.get_config("recorder_src"),targetingSrc:this.get_config("targeting_src"),libBasePath:this.get_config("lib_base_path"),loadExtraBundle:Qa}),this._jsc=Jt,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!p.localStorage.is_supported(!0)||!Ur)this._batch_requests=!1,V.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),p.each(this.get_batcher_configs(),function(u){V.log("Clearing batch queue "+u.queue_key),p.localStorage.remove(u.queue_key)});else if(this.init_batchers(),Ao&&E.addEventListener){var o=p.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);E.addEventListener("pagehide",function(u){u.persisted&&o()}),E.addEventListener("visibilitychange",function(){W.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new X(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=p.UUID();this.get_distinct_id()||this.register_once({distinct_id:rc+s,$device_id:s},""),this.flags=new F({getFullApiRoute:p.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:p.bind(this.get_config,this),setConfigFunc:p.bind(this.set_config,this),getPropertyFunc:p.bind(this.get_property,this),trackingFunc:p.bind(this.track,this),loadExtraBundle:Qa,targetingSrc:this.get_config("targeting_src")||this.get_config("lib_base_path")+kf}),this.flags.init(),this.flags=this.flags,this.autocapture=new De(this),this.autocapture.init(),this._init_tab_id();var a=this.get_config("remote_settings_mode");a===G0||a===W0?this.__session_recording_init_promise=this._fetch_remote_settings(a).then(p.bind(function(){return this._check_and_start_session_recording()},this)):this.__session_recording_init_promise=this._check_and_start_session_recording()};S.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))V.log("Tab ID initialization skipped due to disable_persistence config");else if(p.sessionStorage.is_supported())try{var t=this.get_config("name")+"_"+this.get_config("token"),n="mp_tab_id_"+t,i="mp_gen_new_tab_id_"+t;(p.sessionStorage.get(i)||!p.sessionStorage.get(n))&&p.sessionStorage.set(n,"$tab-"+p.UUID()),p.sessionStorage.set(i,"1"),this.tab_id=p.sessionStorage.get(n),E.addEventListener("beforeunload",function(){p.sessionStorage.remove(i)})}catch(e){this.report_error("Error initializing tab id",e)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")};S.prototype.get_tab_id=function(){return this.tab_id||null};S.prototype._check_and_start_session_recording=ar(function(t){return this.recorderManager.checkAndStartSessionRecording(t)});S.prototype._start_recording_on_event=function(t,n){return this.recorderManager.startRecordingOnEvent(t,n)};S.prototype.start_session_recording=function(){return this._check_and_start_session_recording(!0)};S.prototype.stop_session_recording=function(){return this.recorderManager.stopSessionRecording()};S.prototype.pause_session_recording=function(){return this.recorderManager.pauseSessionRecording()};S.prototype.resume_session_recording=function(){return this.recorderManager.resumeSessionRecording()};S.prototype.is_recording_heatmap_data=function(){return this.recorderManager.isRecordingHeatmapData()};S.prototype.get_session_recording_properties=function(){return this.recorderManager.getSessionRecordingProperties()};S.prototype.get_session_replay_url=function(){return this.recorderManager.getSessionReplayUrl()};S.prototype.__get_recorder=function(){return this.recorderManager.getRecorder()};S.prototype.__get_recording_init_promise=function(){return this.__session_recording_init_promise};S.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var t=p.info.campaignParams(null);p.each(t,function(n,i){this.unregister(i)}.bind(this))}};S.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(W.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(p.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(W.referrer)};S.prototype._dom_loaded=function(){p.each(this.__dom_loaded_queue,function(t){this._track_dom.apply(this,t)},this),this.has_opted_out_tracking()||p.each(this.__request_queue,function(t){this._send_request.apply(this,t)},this),delete this.__dom_loaded_queue,delete this.__request_queue};S.prototype._track_dom=function(t,n){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Jd)return this.__dom_loaded_queue.push([t,n]),!1;var i=new t().init(this);return i.track.apply(i,n)};S.prototype._prepare_callback=function(t,n){if(p.isUndefined(t))return null;if(Ur){var i=function(s){t(s,n)};return i}else{var e=this._jsc,r=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+r+"]";return e[r]=function(s){delete e[r],t(s,n)},o}};S.prototype._send_request=function(t,n,i,e){var r=!0;if(Yd)return this.__request_queue.push(arguments),r;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!e&&(p.isFunction(i)||typeof i=="string")&&(e=i,i=null),i=p.extend(o,i||{}),Ur||(i.method="GET");var a=i.method==="POST",u=Ao&&a&&i.transport.toLowerCase()==="sendbeacon",c=i.verbose;n.verbose&&(c=!0),this.get_config("test")&&(n.test=1),c&&(n.verbose=1),this.get_config("img")&&(n.img=1),Ur||(e?n.callback=e:(c||this.get_config("test"))&&(n.callback="(function(){})")),n.ip=this.get_config("ip")?1:0,n._=new Date().getTime().toString(),a&&(s="data="+encodeURIComponent(n.data),delete n.data),p.extend(n,this.get_config("api_extra_query_params")),t+="?"+p.HTTPBuildQuery(n);var l=this;if("img"in n){var f=W.createElement("img");f.src=t,W.body.appendChild(f)}else if(u){try{r=Ao(t,s)}catch(y){l.report_error(y),r=!1}try{e&&e(r?1:0)}catch(y){l.report_error(y)}}else if(Ur)try{var h=new XMLHttpRequest;h.open(i.method,t,!0);var g=this.get_config("xhr_headers");if(a&&(g["Content-Type"]="application/x-www-form-urlencoded"),p.each(g,function(y,_){h.setRequestHeader(_,y)}),i.timeout_ms&&typeof h.timeout<"u"){h.timeout=i.timeout_ms;var d=new Date().getTime()}h.withCredentials=!0,h.onreadystatechange=function(){if(h.readyState===4)if(h.status===200){if(e)if(c){var y;try{y=p.JSONDecode(h.responseText)}catch(b){if(l.report_error(b),i.ignore_json_errors)y=h.responseText;else return}e(y)}else e(Number(h.responseText))}else{var _;if(h.timeout&&!h.status&&new Date().getTime()-d>=h.timeout?_="timeout":_="Bad HTTP status: "+h.status+" "+h.statusText,l.report_error(_),e)if(c){var w=h.responseHeaders||{};e({status:0,httpStatusCode:h.status,error:_,retryAfter:w["Retry-After"]})}else e(0)}},h.send(s)}catch(y){l.report_error(y),r=!1}else{var m=W.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=t;var v=W.getElementsByTagName("script")[0];v.parentNode.insertBefore(m,v)}return r};S.prototype._fetch_remote_settings=function(t){var n=this,i=function(){t==="strict"&&n.set_config({record_sessions_percent:0})};if(!E.AbortController)return V.critical("Remote settings unavailable: missing minimum required APIs"),i(),Promise.resolve();var e=this.get_api_host("settings")+"/"+this.get_config("api_routes").settings,r={$lib_version:nt.LIB_VERSION,mp_lib:"web",sdk_config:"1"},o=p.HTTPBuildQuery(r),s=e+"?"+o,a=new AbortController,u=setTimeout(function(){a.abort()},500),c={method:"GET",headers:{Authorization:"Basic "+btoa(n.get_config("token")+":")},signal:a.signal};return E.fetch(s,c).then(function(l){if(clearTimeout(u),!l.ok){V.critical("Network response was not ok"),i();return}return l.json()}).then(function(l){if(l&&l.sdk_config&&l.sdk_config.config){var f=l.sdk_config.config,h={};p.each(f,function(g,d){tu.hasOwnProperty(d)&&(h[d]=g)}),p.isEmptyObject(h)?(V.critical("No valid config keys found in remote settings."),i()):n.set_config(h)}else i()}).catch(function(l){clearTimeout(u),V.critical("Failed to fetch remote settings",l),i()})};S.prototype._execute_array=function(t){var n,i=[],e=[],r=[];p.each(t,function(s){s&&(n=s[0],p.isArray(n)?r.push(s):typeof s=="function"?s.call(this):p.isArray(s)&&n==="alias"?i.push(s):p.isArray(s)&&n.indexOf("track")!==-1&&typeof this[n]=="function"?r.push(s):e.push(s))},this);var o=function(s,a){p.each(s,function(u){if(p.isArray(u[0])){var c=a;p.each(u,function(l){c=c[l[0]].apply(c,l.slice(1))})}else this[u[0]].apply(this,u.slice(1))},a)};o(i,this),o(e,this),o(r,this)};S.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};S.prototype.get_batcher_configs=function(){var t="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:t+"_ev"},people:{type:"people",api_name:"engage",queue_key:t+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:t+"_gr"}},this._batcher_configs};S.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var t=p.bind(function(i){return new ct(i.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:p.bind(function(e,r,o){var s=this.get_config("api_routes");this._send_request(this.get_api_host(i.api_name)+"/"+s[i.api_name],this._encode_data_for_request(e),r,this._prepare_callback(o,e))},this),beforeSendHook:p.bind(function(e){var r=this._run_hook("before_send_"+i.type,e);return r?r[0]:null},this),stopAllBatchingFunc:p.bind(this.stop_batch_senders,this),usePersistence:!0})},this),n=this.get_batcher_configs();this.request_batchers={events:t(n.events),people:t(n.people),groups:t(n.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()};S.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,p.each(this.request_batchers,function(t){t.start()}))};S.prototype.stop_batch_senders=function(){this._batch_requests=!1,p.each(this.request_batchers,function(t){t.stop(),t.clear()})};S.prototype.push=function(t){this._execute_array([t])};S.prototype.enable=function(t){var n,i,e,r;if(typeof t>"u")this._flags.disable_all_events=!1;else{for(n={},i=[],e=0;e<t.length;e++)n[t[e]]=!0;for(r=0;r<this.__disabled_events.length;r++)n[this.__disabled_events[r]]||i.push(this.__disabled_events[r]);this.__disabled_events=i}};S.prototype.disable=function(t){typeof t>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(t)};S.prototype._encode_data_for_request=function(t){var n=Xr(t);return this.get_config("api_payload_format")===Hd&&(n=p.base64Encode(n)),{data:n}};S.prototype._track_or_batch=function(t,n){var i=p.truncate(t.data,255),e=t.endpoint,r=t.batcher,o=t.should_send_immediately,s=t.send_request_options||{};n=n||Jt;var a=!0,u=p.bind(function(){return s.skip_hooks||(i=this._run_hook("before_send_"+t.type,i),i&&(i=i[0])),i?(V.log("MIXPANEL REQUEST:"),V.log(i),this._send_request(e,this._encode_data_for_request(i),s,this._prepare_callback(n,i))):null},this);return this._batch_requests&&!o?r.enqueue(i).then(function(c){c?n(1,i):u()}):a=u(),a&&i};S.prototype.track=ar(function(t,n,i,e){var r;if(!(i&&i.skip_hooks)){if(r=this._run_hook("before_track",t,n),r===null)return;t=r[0],n=r[1]}!e&&typeof i=="function"&&(e=i,i=null),i=i||{};var o=i.transport;o&&(i.transport=o);var s=i.send_immediately;if(typeof e!="function"&&(e=Jt),p.isUndefined(t)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(t)){e(0);return}n=p.extend({},n),n.token=this.get_config("token");var a=this.persistence.remove_event_timer(t);if(!p.isUndefined(a)){var u=new Date().getTime()-a;n.$duration=parseFloat((u/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?p.info.marketingParams():{};n=p.extend({},p.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),n);var l=this.get_config("property_blacklist");p.isArray(l)?p.each(l,function(h){delete n[h]}):this.report_error("Invalid value for property_blacklist config: "+l),this._start_recording_on_event(t,n);var f={event:t,properties:n};return r=this._track_or_batch({type:"events",data:f,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:s,send_request_options:i},e),this.flags&&this.flags.checkFirstTimeEvents&&this.flags.checkFirstTimeEvents(t,n),r});S.prototype.set_group=ar(function(t,n,i){p.isArray(n)||(n=[n]);var e={};return e[t]=n,this.register(e),this.people.set(t,n,i)});S.prototype.add_group=ar(function(t,n,i){var e=this.get_property(t),r={};return e===void 0?(r[t]=[n],this.register(r)):e.indexOf(n)===-1&&(e.push(n),r[t]=e,this.register(r)),this.people.union(t,n,i)});S.prototype.remove_group=ar(function(t,n,i){var e=this.get_property(t);if(e!==void 0){var r=e.indexOf(n);r>-1&&(e.splice(r,1),this.register({group_key:e})),e.length===0&&this.unregister(t)}return this.people.remove(t,n,i)});S.prototype.track_with_groups=ar(function(t,n,i,e){var r=p.extend({},n||{});return p.each(i,function(o,s){o!=null&&(r[s]=o)}),this.track(t,r,e)});S.prototype._create_map_key=function(t,n){return t+"_"+JSON.stringify(n)};S.prototype._remove_group_from_cache=function(t,n){delete this._cached_groups[this._create_map_key(t,n)]};S.prototype.get_group=function(t,n){var i=this._create_map_key(t,n),e=this._cached_groups[i];return(e===void 0||e._group_key!==t||e._group_id!==n)&&(e=new we,e._init(this,t,n),this._cached_groups[i]=e),e};S.prototype.track_pageview=ar(function(t,n){typeof t!="object"&&(t={}),n=n||{};var i=n.event_name||"$mp_web_page_view",e=p.extend(p.info.mpPageViewProperties(),p.info.campaignParams(),p.info.clickParams()),r=p.extend({},e,t);return this.track(i,r)});S.prototype.track_links=function(){return this._track_dom.call(this,Zr,arguments)};S.prototype.track_forms=function(){return this._track_dom.call(this,Zo,arguments)};S.prototype.time_event=function(t){if(p.isUndefined(t)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(t)||this.persistence.set_event_timer(t,new Date().getTime())};var H0={persistent:!0},nc=function(t){var n;return p.isObject(t)?n=t:p.isUndefined(t)?n={}:n={days:t},p.extend({},H0,n)};S.prototype.register=function(t,n){var i=this._run_hook("before_register",t,n);if(i!==null){t=i[0],n=i[1];var e=nc(n);e.persistent?this.persistence.register(t,e.days):p.extend(this.unpersisted_superprops,t)}};S.prototype.register_once=function(t,n,i){var e=this._run_hook("before_register_once",t,n,i);if(e!==null){t=e[0],n=e[1],i=e[2];var r=nc(i);r.persistent?this.persistence.register_once(t,n,r.days):(typeof n>"u"&&(n="None"),p.each(t,function(o,s){(!this.unpersisted_superprops.hasOwnProperty(s)||this.unpersisted_superprops[s]===n)&&(this.unpersisted_superprops[s]=o)},this))}};S.prototype.unregister=function(t,n){var i=this._run_hook("before_unregister",t,n);i!==null&&(t=i[0],n=i[1],n=nc(n),n.persistent?this.persistence.unregister(t):delete this.unpersisted_superprops[t])};S.prototype._register_single=function(t,n){var i={};i[t]=n,this.register(i)};S.prototype.identify=function(t,n,i,e,r,o,s,a){var u=this._run_hook("before_identify",t);if(u===null)return-1;t=u[0];var c=this.get_distinct_id();if(t&&c!==t){if(typeof t=="string"&&t.indexOf(rc)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:t})}if(!this.get_property("$device_id")){var l=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:l},"")}t!==c&&t!==this.get_property(xo)&&(this.unregister(xo),this.register({distinct_id:t})),this._flags.identify_called=!0,this.people._flush(n,i,e,r,o,s,a),t!==c&&this.track("$identify",{distinct_id:t,$anon_distinct_id:c},{skip_hooks:!0}),t!==c&&this.flags.fetchFlags().catch(function(){V.error("[flags] Error fetching flags during identify")})};S.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var t=p.UUID();this.register_once({distinct_id:rc+t,$device_id:t},""),this._check_and_start_session_recording()};S.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};S.prototype.alias=function(t,n){if(t===this.get_property(Vd))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var i=this;return p.isUndefined(n)&&(n=this.get_distinct_id()),t!==n?(this._register_single(xo,t),this.track("$create_alias",{alias:t,distinct_id:n},{skip_hooks:!0},function(){i.identify(t)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(t),-1)};S.prototype.name_tag=function(t){this._register_single("mp_name_tag",t)};S.prototype.set_config=function(t){if(p.isObject(t)){p.extend(this.config,t);var n=t.batch_size;n&&p.each(this.request_batchers,function(i){i.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),nt.DEBUG=nt.DEBUG||this.get_config("debug"),("autocapture"in t||"record_heatmap_data"in t)&&this.autocapture&&this.autocapture.init(),p.isObject(t.hooks)&&(this.hooks={},p.each(t.hooks,function(i,e){if(p.isFunction(i))this.hooks[e]=[i];else if(p.isArray(i)){this.hooks[e]=[];for(var r=0;r<i.length;r++)p.isFunction(i[r])||V.critical("Invalid hook added. Hook is not a function"),this.hooks[e].push(i[r])}else V.critical("Invalid hooks added. Ensure that the hook values passed into config.hooks are functions or arrays of functions.")},this))}};S.prototype.get_config=function(t){return this.config[t]};S.prototype._run_hook=function(t){var n=Yt.call(arguments,1);return p.each(this.hooks[t],function(i){if(n===null)return null;var e=i.apply(this,n);typeof e>"u"?(this.report_error(t+" hook did not return a valid value"),n=null):(p.isArray(e)||(e=[e]),n.splice.apply(n,[0,e.length].concat(e)))},this),n};S.prototype.get_property=function(t){return this.persistence.load_prop([t])};S.prototype.get_api_host=function(t){return this.get_config("api_hosts")[t]||this.get_config("api_host")};S.prototype.toString=function(){var t=this.get_config("name");return t!==ut&&(t=ut+"."+t),t};S.prototype._event_is_disabled=function(t){return p.isBlockedUA(It)||this._flags.disable_all_events||p.include(this.__disabled_events,t)};S.prototype._gdpr_init=function(){var t=this.get_config("opt_out_tracking_persistence_type")==="localStorage";t&&p.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||p.cookie.get("mp_optout"))&&(p.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};S.prototype._gdpr_update_persistence=function(t){var n;if(t&&t.clear_persistence)n=!0;else if(t&&t.enable_persistence)n=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==n&&this.persistence.set_disabled(n),n?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()};S.prototype._gdpr_call_func=function(t,n){return n=p.extend({track:p.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},n),p.localStorage.is_supported()||(n.persistence_type="cookie"),t(this.get_config("token"),{track:n.track,trackEventName:n.track_event_name,trackProperties:n.track_properties,persistenceType:n.persistence_type,persistencePrefix:n.cookie_prefix,cookieDomain:n.cookie_domain,cookieExpiration:n.cookie_expiration,crossSiteCookie:n.cross_site_cookie,crossSubdomainCookie:n.cross_subdomain_cookie,secureCookie:n.secure_cookie,ignoreDnt:n.ignore_dnt})};S.prototype.opt_in_tracking=function(t){t=p.extend({enable_persistence:!0},t),this._gdpr_call_func(OE,t),this._gdpr_update_persistence(t)};S.prototype.opt_out_tracking=function(t){t=p.extend({clear_persistence:!0,delete_user:!0},t),t.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(xE,t),this._gdpr_update_persistence(t)};S.prototype.has_opted_in_tracking=function(t){return this._gdpr_call_func(RE,t)};S.prototype.has_opted_out_tracking=function(t){return this._gdpr_call_func(ud,t)};S.prototype.clear_opt_in_out_tracking=function(t){t=p.extend({enable_persistence:!0},t),this._gdpr_call_func(AE,t),this._gdpr_update_persistence(t)};S.prototype.report_error=function(t,n){V.error.apply(V.error,arguments);try{!n&&!(t instanceof Error)&&(t=new Error(t)),this.get_config("error_reporter")(t,n)}catch(i){V.error(i)}};S.prototype.add_hook=function(t,n){this.hooks[t]||(this.hooks[t]=[]),this.hooks[t].push(n)};S.prototype.remove_hook=function(t,n){var i;this.hooks[t]&&(i=this.hooks[t].indexOf(n),i!==-1?this.hooks[t].splice(i,1):V.log("remove_hook failed. Matching hook was not found"))};S.prototype.init=S.prototype.init;S.prototype.reset=S.prototype.reset;S.prototype.enable=S.prototype.enable;S.prototype.disable=S.prototype.disable;S.prototype.time_event=S.prototype.time_event;S.prototype.track=S.prototype.track;S.prototype.track_links=S.prototype.track_links;S.prototype.track_forms=S.prototype.track_forms;S.prototype.track_pageview=S.prototype.track_pageview;S.prototype.register=S.prototype.register;S.prototype.register_once=S.prototype.register_once;S.prototype.unregister=S.prototype.unregister;S.prototype.identify=S.prototype.identify;S.prototype.alias=S.prototype.alias;S.prototype.name_tag=S.prototype.name_tag;S.prototype.set_config=S.prototype.set_config;S.prototype.get_config=S.prototype.get_config;S.prototype.get_api_host=S.prototype.get_api_host;S.prototype.get_property=S.prototype.get_property;S.prototype.get_distinct_id=S.prototype.get_distinct_id;S.prototype.toString=S.prototype.toString;S.prototype.opt_out_tracking=S.prototype.opt_out_tracking;S.prototype.opt_in_tracking=S.prototype.opt_in_tracking;S.prototype.has_opted_out_tracking=S.prototype.has_opted_out_tracking;S.prototype.has_opted_in_tracking=S.prototype.has_opted_in_tracking;S.prototype.clear_opt_in_out_tracking=S.prototype.clear_opt_in_out_tracking;S.prototype.get_group=S.prototype.get_group;S.prototype.set_group=S.prototype.set_group;S.prototype.add_group=S.prototype.add_group;S.prototype.remove_group=S.prototype.remove_group;S.prototype.add_hook=S.prototype.add_hook;S.prototype.remove_hook=S.prototype.remove_hook;S.prototype.track_with_groups=S.prototype.track_with_groups;S.prototype.start_batch_senders=S.prototype.start_batch_senders;S.prototype.stop_batch_senders=S.prototype.stop_batch_senders;S.prototype.start_session_recording=S.prototype.start_session_recording;S.prototype.stop_session_recording=S.prototype.stop_session_recording;S.prototype.pause_session_recording=S.prototype.pause_session_recording;S.prototype.resume_session_recording=S.prototype.resume_session_recording;S.prototype.get_session_recording_properties=S.prototype.get_session_recording_properties;S.prototype.get_session_replay_url=S.prototype.get_session_replay_url;S.prototype.get_tab_id=S.prototype.get_tab_id;S.prototype.DEFAULT_API_ROUTES=Kd;S.prototype.__get_recorder=S.prototype.__get_recorder;S.prototype.__get_recording_init_promise=S.prototype.__get_recording_init_promise;X.prototype.properties=X.prototype.properties;X.prototype.update_search_keyword=X.prototype.update_search_keyword;X.prototype.update_referrer_info=X.prototype.update_referrer_info;X.prototype.get_cross_subdomain=X.prototype.get_cross_subdomain;X.prototype.clear=X.prototype.clear;var Dr={},Y0=function(){p.each(Dr,function(t,n){n!==ut&&(Ve[n]=t)}),Ve._=p},K0=function(){Ve.init=function(t,n,i){if(i)return Ve[i]||(Ve[i]=Dr[i]=ru(t,n,i),Ve[i]._loaded()),Ve[i];var e=Ve;Dr[ut]?e=Dr[ut]:t&&(e=ru(t,n,ut),e._loaded(),Dr[ut]=e),Ve=e,Ro===q0&&(E[ut]=Ve),Y0()}},J0=function(){function t(){t.done||(t.done=!0,Jd=!0,Yd=!1,p.each(Dr,function(e){e._dom_loaded()}))}function n(){try{W.documentElement.doScroll("left")}catch{setTimeout(n,1);return}t()}if(W.addEventListener)W.readyState==="complete"?t():W.addEventListener("DOMContentLoaded",t,!1);else if(W.attachEvent){W.attachEvent("onreadystatechange",t);var i=!1;try{i=E.frameElement===null}catch{}W.documentElement.doScroll&&i&&n()}p.register_event(E,"load",t,!0)};function X0(t){return Qa=t,Ro=eu,Ve=new S,K0(),Ve.init(),J0(),Ve}function Z0(t,n){n()}var cr=X0(Z0);var Xd=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((n,i)=>(i&=63,i<36?n+=i.toString(36):i<62?n+=(i-26).toString(36).toUpperCase():i>62?n+="-":n+="_",n),"");var ic="rozmovaAnalyticsParams",oc=["utm_source","utm_medium","utm_campaign","utm_campaign_id","utm_advertiser_id","utm_adset_id","utm_adset_name","utm_ad_id","utm_ad_name","utm_keyword"],Zd="G-GYQLL028VQ";var Qd="9d4cb3d213e5aee689ea01dd68ad65ad",ev="e6d009719c77519432c3",tv=["en","uk","pl","es","ru"],rv=["view_item_list","select_item","view_item","begin_checkout","add_payment_info"],nv=["rozmova.me","clearly.help","uptech.team"],iv="createTherapyPlacementPage",ov="rankingSessionId";var sv=(t,n)=>{let i=new URL(window.location.href);i.searchParams.set(t,n),window.history.replaceState({path:i.toString()},"",i.toString())},sc=t=>new URLSearchParams(window.location.search).get(t),av=()=>(navigator.userAgent||navigator.vendor||window.opera).match(/FBAN|FBAV|Instagram/i),uv=()=>window.navigator.language;function cv(){let t=navigator.userAgent;return t.indexOf("Edg")>-1?"Microsoft Edge":t.indexOf("Chrome")>-1?"Chrome":t.indexOf("Firefox")>-1?"Firefox":t.indexOf("Safari")>-1?"Safari":t.indexOf("Opera")>-1?"Opera":t.indexOf("Trident")>-1||t.indexOf("MSIE")>-1?"Internet Explorer":"Unknown"}function lv(){let t=navigator.userAgent;return/Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)?"Mobile":"Desktop"}function fv(){let t=navigator.userAgent;return t.includes("Win")?"Windows":t.includes("Mac")?"macOS":t.includes("X11")||t.includes("Linux")?"Linux":t.includes("Android")?"Android":t.includes("like Mac")?"iOS":"Unknown OS"}var lt=()=>{let t=window.location.hostname.split("."),n=t.length;return t.length===1?t[0]:t.slice(n-2,n).join(".")},Q0=["accounts.google.com","appleid.apple.com","checkout.stripe.com"],ac=()=>{let t=document.referrer;if(t){let n=new URL(t);if([...Q0,lt()].some(i=>n.hostname.includes(i)))return null}return t};function hv(){let t=ac();if(!t)return null;let n={"google.com":"q","bing.com":"q","yahoo.com":"p","duckduckgo.com":"q","ask.com":"q","baidu.com":"wd","yandex.com":"text"},i=new URL(t);for(let[e,r]of Object.entries(n))if(i.hostname.includes(e)){let o=i.searchParams.get(r);return o?decodeURIComponent(o):null}return null}var Qo=()=>{let t=Te.get("_ga");if(!t)return null;let n=t.split(".");return n.length<4?null:`${n[2]}.${n[3]}`},pv=()=>new Promise(t=>{let n=!1,i=()=>{n||(n=!0,t(Qo()))};if(typeof window<"u"&&typeof gtag=="function")try{gtag("get",Zd,"client_id",e=>{n||(n=!0,t(e||Qo()))}),setTimeout(i,1e3)}catch{i()}else i()});function uc(){let t=Te.get("_ga_GYQLL028VQ");if(!t)return null;let n=t.split("."),i=n[0];if(i==="GS1"&&n.length>=3)return n[2];if(i==="GS2"){let e=t.match(/s(\d+)/);if(e)return e[1]}return null}var dv=t=>{if(!t)return;let i="GA1.1."+t,e=730,r=new Date(Date.now()+e*864e5).toUTCString();document.cookie=`_ga=${i}; expires=${r}; path=/; Secure; SameSite=Lax`},vv=t=>{let i=window.location.pathname.split("/")[1];return tv.includes(i)?i:t?"en":"uk"},gv=t=>t&&nv.some(i=>t.includes(i))?"internal":"external";function mv(t,n){let i=Object.keys(t),e=Object.keys(n);return i.length!==e.length?!1:i.every(r=>t[r]===n[r])}function yv(t){let n=Number(t);return isNaN(n)?null:n}function _v(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(n,i)=>String.fromCharCode(parseInt(i,16))))}var wv=(t,n)=>(t?"https://trp.rozmova.me":"https://stage.trp.rozmova.me")+n,cc=t=>{let n=Te.get(t),i=uc(),e=n!==i;if(e){let r=lt();i&&Te.set(t,i,{domain:r})}return e};function bv(){let t=`
|
|
93
|
+
`);var n="",i,e,r=0,o;for(i=e=0,r=t.length,o=0;o<r;o++){var s=t.charCodeAt(o),a=null;s<128?e++:s>127&&s<2048?a=String.fromCharCode(s>>6|192,s&63|128):a=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),a!==null&&(e>i&&(n+=t.substring(i,e)),n+=a,i=e=o+1)}return e>i&&(n+=t.substring(i,t.length)),n};p.UUID=function(){try{return E.crypto.randomUUID()}catch{for(var t=new Array(36),n=0;n<36;n++)t[n]=Math.floor(Math.random()*16);return t[14]=4,t[19]=t[19]&=-5,t[19]=t[19]|=8,t[8]=t[13]=t[18]=t[23]="-",p.map(t,function(e){return e.toString(16)}).join("")}};var cf=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];p.isBlockedUA=function(t){var n;for(t=t.toLowerCase(),n=0;n<cf.length;n++)if(t.indexOf(cf[n])!==-1)return!0;return!1};p.HTTPBuildQuery=function(t,n){var i,e,r=[];return p.isUndefined(n)&&(n="&"),p.each(t,function(o,s){i=encodeURIComponent(o.toString()),e=encodeURIComponent(s),r[r.length]=e+"="+i}),r.join(n)};p.getQueryParam=function(t,n){n=n.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var i="[\\?&]"+n+"=([^&#]*)",e=new RegExp(i),r=e.exec(t);if(r===null||r&&typeof r[1]!="string"&&r[1].length)return"";var o=r[1];try{o=decodeURIComponent(o)}catch{V.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")};p.cookie={get:function(t){for(var n=t+"=",i=W.cookie.split(";"),e=0;e<i.length;e++){for(var r=i[e];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(n)===0)return decodeURIComponent(r.substring(n.length,r.length))}return null},parse:function(t){var n;try{n=p.JSONDecode(p.cookie.get(t))||{}}catch{}return n},set_seconds:function(t,n,i,e,r,o,s){var a="",u="",c="";if(s)a="; domain="+s;else if(e){var l=lf(W.location.hostname);a=l?"; domain=."+l:""}if(i){var f=new Date;f.setTime(f.getTime()+i*1e3),u="; expires="+f.toGMTString()}o&&(r=!0,c="; SameSite=None"),r&&(c+="; secure"),W.cookie=t+"="+encodeURIComponent(n)+u+"; path=/"+a+c},set:function(t,n,i,e,r,o,s){var a="",u="",c="";if(s)a="; domain="+s;else if(e){var l=lf(W.location.hostname);a=l?"; domain=."+l:""}if(i){var f=new Date;f.setTime(f.getTime()+i*24*60*60*1e3),u="; expires="+f.toGMTString()}o&&(r=!0,c="; SameSite=None"),r&&(c+="; secure");var h=t+"="+encodeURIComponent(n)+u+"; path=/"+a+c;return W.cookie=h,h},remove:function(t,n,i){p.cookie.set(t,"",-1,n,!1,!1,i)}};var rd=function(t){var n=!0;try{var i="__mplss_"+Bu(8),e="xyz";t.setItem(i,e),t.getItem(i)!==e&&(n=!1),t.removeItem(i)}catch{n=!1}return n},Ns=null,Un=function(t,n){return Ns!==null&&!n?Ns:Ns=rd(t||E.localStorage)},Ds=null,dE=function(t,n){return Ds!==null&&!n?Ds:Ds=rd(t||E.sessionStorage)};function nd(t,n,i){var e=function(r){V.error(n+" error: "+r)};return{is_supported:function(r){var o=i(t,r);return o||V.error(n+" unsupported"),o},error:e,get:function(r){try{return t.getItem(r)}catch(o){e(o)}return null},parse:function(r){try{return p.JSONDecode(t.getItem(r))||{}}catch{}return null},set:function(r,o){try{t.setItem(r,o)}catch(s){e(s)}},remove:function(r){try{t.removeItem(r)}catch(o){e(o)}}}}var id=null,od=null;try{id=E.localStorage,od=E.sessionStorage}catch{}p.localStorage=nd(id,"localStorage",Un);p.sessionStorage=nd(od,"sessionStorage",dE);p.register_event=(function(){var t=function(e,r,o,s,a){if(!e){V.error("No valid element provided to register_event");return}if(e.addEventListener&&!s)e.addEventListener(r,o,!!a);else{var u="on"+r,c=e[u];e[u]=n(e,o,c)}};function n(e,r,o){var s=function(a){if(a=a||i(E.event),!!a){var u=!0,c,l;return p.isFunction(o)&&(c=o(a)),l=r.call(e,a),(c===!1||l===!1)&&(u=!1),u}};return s}function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation),e}return i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0},t})();var vE=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');p.dom_query=(function(){function t(r){return r.all?r.all:r.getElementsByTagName("*")}var n=/[\t\r\n]/g;function i(r,o){var s=" "+o+" ";return(" "+r.className+" ").replace(n," ").indexOf(s)>=0}function e(r){if(!W.getElementsByTagName)return[];var o=r.split(" "),s,a,u,c,l,f,h,g,d,m,v=[W];for(f=0;f<o.length;f++){if(s=o[f].replace(/^\s+/,"").replace(/\s+$/,""),s.indexOf("#")>-1){a=s.split("#"),u=a[0];var y=a[1],_=W.getElementById(y);if(!_||u&&_.nodeName.toLowerCase()!=u)return[];v=[_];continue}if(s.indexOf(".")>-1){a=s.split("."),u=a[0];var w=a[1];for(u||(u="*"),c=[],l=0,h=0;h<v.length;h++)for(u=="*"?d=t(v[h]):d=v[h].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];for(v=[],m=0,h=0;h<c.length;h++)c[h].className&&p.isString(c[h].className)&&i(c[h],w)&&(v[m++]=c[h]);continue}var b=s.match(vE);if(b){u=b[1];var C=b[2],k=b[3],x=b[4];for(u||(u="*"),c=[],l=0,h=0;h<v.length;h++)for(u=="*"?d=t(v[h]):d=v[h].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];v=[],m=0;var A;switch(k){case"=":A=function(P){return P.getAttribute(C)==x};break;case"~":A=function(P){return P.getAttribute(C).match(new RegExp("\\b"+x+"\\b"))};break;case"|":A=function(P){return P.getAttribute(C).match(new RegExp("^"+x+"-?"))};break;case"^":A=function(P){return P.getAttribute(C).indexOf(x)===0};break;case"$":A=function(P){return P.getAttribute(C).lastIndexOf(x)==P.getAttribute(C).length-x.length};break;case"*":A=function(P){return P.getAttribute(C).indexOf(x)>-1};break;default:A=function(P){return P.getAttribute(C)}}for(v=[],m=0,h=0;h<c.length;h++)A(c[h])&&(v[m++]=c[h]);continue}for(u=s,c=[],l=0,h=0;h<v.length;h++)for(d=v[h].getElementsByTagName(u),g=0;g<d.length;g++)c[l++]=d[g];v=c}return v}return function(r){return p.isElement(r)?[r]:p.isObject(r)&&!p.isUndefined(r.length)?r:e.call(this,r)}})();var gE=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],mE=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];p.info={campaignParams:function(t){var n="",i={};return p.each(gE,function(e){n=p.getQueryParam(W.URL,e),n.length?i[e]=n:t!==void 0&&(i[e]=t)}),i},clickParams:function(){var t="",n={};return p.each(mE,function(i){t=p.getQueryParam(W.URL,i),t.length&&(n[i]=t)}),n},marketingParams:function(){return p.extend(p.info.campaignParams(),p.info.clickParams())},searchEngine:function(t){return t.search("https?://(.*)google.([^/?]*)")===0?"google":t.search("https?://(.*)bing.com")===0?"bing":t.search("https?://(.*)yahoo.com")===0?"yahoo":t.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(t){var n=p.info.searchEngine(t),i=n!="yahoo"?"q":"p",e={};if(n!==null){e.$search_engine=n;var r=p.getQueryParam(t,i);r.length&&(e.mp_keyword=r)}return e},browser:function(t,n,i){return n=n||"",i||p.includes(t," OPR/")?p.includes(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":p.includes(t,"IEMobile")||p.includes(t,"WPDesktop")?"Internet Explorer Mobile":p.includes(t,"SamsungBrowser/")?"Samsung Internet":p.includes(t,"Edge")||p.includes(t,"Edg/")?"Microsoft Edge":p.includes(t,"FBIOS")?"Facebook Mobile":p.includes(t,"Whale/")?"Whale Browser":p.includes(t,"Chrome")?"Chrome":p.includes(t,"CriOS")?"Chrome iOS":p.includes(t,"UCWEB")||p.includes(t,"UCBrowser")?"UC Browser":p.includes(t,"FxiOS")?"Firefox iOS":p.includes(n,"Apple")?p.includes(t,"Mobile")?"Mobile Safari":"Safari":p.includes(t,"Android")?"Android Mobile":p.includes(t,"Konqueror")?"Konqueror":p.includes(t,"Firefox")?"Firefox":p.includes(t,"MSIE")||p.includes(t,"Trident/")?"Internet Explorer":p.includes(t,"Gecko")?"Mozilla":""},browserVersion:function(t,n,i){var e=p.info.browser(t,n,i),r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},o=r[e];if(o===void 0)return null;var s=t.match(o);return s?parseFloat(s[s.length-2]):null},os:function(){var t=It;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)?"Android":""},referringDomain:function(t){var n=t.split("/");return n.length>=3?n[2]:""},currentUrl:function(){return E.location.href},properties:function(t){return typeof t!="object"&&(t={}),p.extend(p.strip_empty_properties({$os:p.info.os(),$browser:p.info.browser(It,Ft.vendor,vn),$referrer:W.referrer,$referring_domain:p.info.referringDomain(W.referrer),$device:p.info.device(It)}),{$current_url:p.info.currentUrl(),$browser_version:p.info.browserVersion(It,Ft.vendor,vn),$screen_height:of.height,$screen_width:of.width,mp_lib:"web",$lib_version:nt.LIB_VERSION,$insert_id:Bu(),time:p.timestamp()/1e3},p.strip_empty_properties(t))},people_properties:function(){return p.extend(p.strip_empty_properties({$os:p.info.os(),$browser:p.info.browser(It,Ft.vendor,vn)}),{$browser_version:p.info.browserVersion(It,Ft.vendor,vn)})},mpPageViewProperties:function(){return p.strip_empty_properties({current_page_title:W.title,current_domain:E.location.hostname,current_url_path:E.location.pathname,current_url_protocol:E.location.protocol,current_url_search:E.location.search})}};var yE=function(t,n){var i=null,e=[];return function(r){var o=this;return e.push(r),i||(i=new H(function(s){setTimeout(function(){var a=t.apply(o,[e]);i=null,e=[],s(a)},n)})),i}},Bu=function(t){var n=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return t?n.substring(0,t):n},sd=function(){var t=p.UUID().replace(/-/g,""),n=p.UUID().replace(/-/g,"").substring(0,16),i="01";return"00-"+t+"-"+n+"-"+i},_E=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,wE=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,lf=function(t){var n=wE,i=t.split("."),e=i[i.length-1];(e.length>4||e==="com"||e==="org")&&(n=_E);var r=t.match(n);return r?r[0]:""},bE=function(){var t=E.navigator.onLine;return p.isUndefined(t)||t},Jt=function(){},go=function(t,n){for(var i=!1,e=0;e<n.length;e++)if(t.match(n[e])){i=!0;break}return i},Xr=null,mo=null;typeof JSON<"u"&&(Xr=JSON.stringify,mo=JSON.parse);Xr=Xr||p.JSONEncode;mo=mo||p.JSONDecode;var SE=function(t,n,i){if(!E.CompressionStream)return!1;var e=p.info.browser(t,n,i),r=p.info.browserVersion(t,n,i);return!((e==="Safari"||e==="Mobile Safari")&&r>=16.4&&r<16.6)};p.info=p.info;p.info.browser=p.info.browser;p.info.browserVersion=p.info.browserVersion;p.info.device=p.info.device;p.info.properties=p.info.properties;p.isBlockedUA=p.isBlockedUA;p.isEmptyObject=p.isEmptyObject;p.isObject=p.isObject;p.JSONDecode=p.JSONDecode;p.JSONEncode=p.JSONEncode;p.toArray=p.toArray;p.NPO=sr;var CE="mixpanelBrowserDb",ad="mixpanelRecordingEvents",zu="mixpanelRecordingRegistry",EE=1,IE=[ad,zu],vt=function(t){this.dbPromise=null,this.storeName=t};vt.prototype._openDb=function(){return new H(function(t,n){var i=E.indexedDB.open(CE,EE);i.onerror=function(){n(i.error)},i.onsuccess=function(){t(i.result)},i.onupgradeneeded=function(e){var r=e.target.result;IE.forEach(function(o){r.createObjectStore(o)})}})};vt.prototype.init=function(){return E.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(t){return t instanceof E.IDBDatabase?H.resolve():H.reject(t)})):H.reject("indexedDB is not supported in this browser")};vt.prototype.isInitialized=function(){return!!this.dbPromise};vt.prototype.makeTransaction=function(t,n){var i=this.storeName,e=function(r){return new H(function(o,s){var a=r.transaction(i,t);a.oncomplete=function(){o(a)},a.onabort=a.onerror=function(){s(a.error)},n(a.objectStore(i))})};return this.dbPromise.then(e).catch(function(r){return r&&r.name==="InvalidStateError"?(this.dbPromise=this._openDb(),this.dbPromise.then(e)):H.reject(r)}.bind(this))};vt.prototype.setItem=function(t,n){return this.makeTransaction("readwrite",function(i){i.put(n,t)})};vt.prototype.getItem=function(t){var n;return this.makeTransaction("readonly",function(i){n=i.get(t)}).then(function(){return n.result})};vt.prototype.removeItem=function(t){return this.makeTransaction("readwrite",function(n){n.delete(t)})};vt.prototype.getAll=function(){var t;return this.makeTransaction("readonly",function(n){t=n.getAll()}).then(function(){return t.result})};var kE="__mp_opt_in_out_";function OE(t,n){ld(!0,t,n)}function xE(t,n){ld(!1,t,n)}function RE(t,n){return cd(t,n)==="1"}function ud(t,n){if(ME(n))return V.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var i=cd(t,n)==="0";return i&&V.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),i}function ar(t){return Gu(t,function(n){return this.get_config(n)})}function ur(t){return Gu(t,function(n){return this._get_config(n)})}function en(t){return Gu(t,function(n){return this._get_config(n)})}function AE(t,n){n=n||{},qu(n).remove(ju(t,n),!!n.crossSubdomainCookie,n.cookieDomain)}function qu(t){return t=t||{},t.persistenceType==="localStorage"?p.localStorage:p.cookie}function ju(t,n){return n=n||{},(n.persistencePrefix||kE)+t}function cd(t,n){return qu(n).get(ju(t,n))}function ME(t){if(t&&t.ignoreDnt)return!1;var n=t&&t.window||E,i=n.navigator||{},e=!1;return p.each([i.doNotTrack,i.msDoNotTrack,n.doNotTrack],function(r){p.includes([!0,1,"1","yes"],r)&&(e=!0)}),e}function ld(t,n,i){if(!p.isString(n)||!n.length){V.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token");return}i=i||{},qu(i).set(ju(n,i),t?1:0,p.isNumber(i.cookieExpiration)?i.cookieExpiration:null,!!i.crossSubdomainCookie,!!i.secureCookie,!!i.crossSiteCookie,i.cookieDomain),i.track&&t&&i.track(i.trackEventName||"$opt_in",i.trackProperties,{send_immediately:!0})}function Gu(t,n){return function(){var i=!1;try{var e=n.call(this,"token"),r=n.call(this,"ignore_dnt"),o=n.call(this,"opt_out_tracking_persistence_type"),s=n.call(this,"opt_out_tracking_cookie_prefix"),a=n.call(this,"window");e&&(i=ud(e,{ignoreDnt:r,persistenceType:o,persistencePrefix:s,window:a}))}catch(c){V.error("Unexpected error when checking tracking opt-out status: "+c)}if(!i)return t.apply(this,arguments);var u=arguments[arguments.length-1];typeof u=="function"&&u(0)}}var TE=Gt("lock"),fd=function(t,n){n=n||{},this.storageKey=t,this.storage=n.storage||E.localStorage,this.pollIntervalMS=n.pollIntervalMS||100,this.timeoutMS=n.timeoutMS||2e3,this.promiseImpl=n.promiseImpl||H};fd.prototype.withLock=function(t,n){var i=this.promiseImpl;return new i(p.bind(function(e,r){var o=n||new Date().getTime()+"|"+Math.random(),s=new Date().getTime(),a=this.storageKey,u=this.pollIntervalMS,c=this.timeoutMS,l=this.storage,f=a+":X",h=a+":Y",g=a+":Z",d=function(w){if(new Date().getTime()-s>c){TE.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+o+"]"),l.removeItem(g),l.removeItem(h),y();return}setTimeout(function(){try{w()}catch(b){r(b)}},u*(Math.random()+.1))},m=function(w,b){w()?b():d(function(){m(w,b)})},v=function(){var w=l.getItem(h);return w&&w!==o?!1:(l.setItem(h,o),l.getItem(h)===o?!0:(Un(l,!0)||r(new Error("localStorage support dropped while acquiring lock")),!1))},y=function(){l.setItem(f,o),m(v,function(){if(l.getItem(f)===o){_();return}d(function(){if(l.getItem(h)!==o){y();return}m(function(){return!l.getItem(g)},_)})})},_=function(){l.setItem(g,"1");var w=function(){l.removeItem(g),l.getItem(h)===o&&l.removeItem(h),l.getItem(f)===o&&l.removeItem(f)};t().then(function(b){w(),e(b)}).catch(function(b){w(),r(b)})};try{if(Un(l,!0))y();else throw new Error("localStorage support check failed")}catch(w){r(w)}},this))};var tn=function(t){this.storage=t||E.localStorage};tn.prototype.init=function(){return H.resolve()};tn.prototype.isInitialized=function(){return!0};tn.prototype.setItem=function(t,n){return new H(p.bind(function(i,e){try{this.storage.setItem(t,Xr(n))}catch(r){e(r)}i()},this))};tn.prototype.getItem=function(t){return new H(p.bind(function(n,i){var e;try{e=mo(this.storage.getItem(t))}catch(r){i(r)}n(e)},this))};tn.prototype.removeItem=function(t){return new H(p.bind(function(n,i){try{this.storage.removeItem(t)}catch(e){i(e)}n()},this))};var ff=Gt("batch"),Rt=function(t,n){n=n||{},this.storageKey=t,this.usePersistence=n.usePersistence,this.usePersistence&&(this.queueStorage=n.queueStorage||new tn,this.lock=new fd(t,{storage:n.sharedLockStorage||E.localStorage,timeoutMS:n.sharedLockTimeoutMS})),this.reportError=n.errorReporter||p.bind(ff.error,ff),this.pid=n.pid||null,this.memQueue=[],this.initialized=!1,n.enqueueThrottleMs?this.enqueuePersisted=yE(p.bind(this._enqueuePersisted,this),n.enqueueThrottleMs):this.enqueuePersisted=p.bind(function(i){return this._enqueuePersisted([i])},this)};Rt.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?H.resolve():this.queueStorage.init().then(p.bind(function(){this.initialized=!0},this)).catch(p.bind(function(t){this.reportError("Error initializing queue persistence. Disabling persistence",t),this.initialized=!0,this.usePersistence=!1},this))};Rt.prototype.enqueue=function(t,n){var i={id:Bu(),flushAfter:new Date().getTime()+n*2,payload:t};return this.usePersistence?this.enqueuePersisted(i):(this.memQueue.push(i),H.resolve(!0))};Rt.prototype._enqueuePersisted=function(t){var n=p.bind(function(){return this.ensureInit().then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(i){return this.saveToStorage(i.concat(t))},this)).then(p.bind(function(i){return i&&(this.memQueue=this.memQueue.concat(t)),i},this)).catch(p.bind(function(i){return this.reportError("Error enqueueing items",i,t),!1},this))},this);return this.lock.withLock(n,this.pid).catch(p.bind(function(i){return this.reportError("Error acquiring storage lock",i),!1},this))};Rt.prototype.fillBatch=function(t){var n=this.memQueue.slice(0,t);return this.usePersistence&&n.length<t?this.ensureInit().then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(i){if(i.length){var e={};p.each(n,function(s){e[s.id]=!0});for(var r=0;r<i.length;r++){var o=i[r];if(new Date().getTime()>o.flushAfter&&!e[o.id]&&(o.orphaned=!0,n.push(o),n.length>=t))break}}return n},this)):H.resolve(n)};var hf=function(t,n){var i=[];return p.each(t,function(e){e.id&&!n[e.id]&&i.push(e)}),i};Rt.prototype.removeItemsByID=function(t){var n={};if(p.each(t,function(e){n[e]=!0}),this.memQueue=hf(this.memQueue,n),this.usePersistence){var i=p.bind(function(){return this.ensureInit().then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(e){return e=hf(e,n),this.saveToStorage(e)},this)).then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(e){for(var r=0;r<e.length;r++){var o=e[r];if(o.id&&n[o.id])throw new Error("Item not removed from storage")}return!0},this)).catch(p.bind(function(e){return this.reportError("Error removing items",e,t),!1},this))},this);return this.lock.withLock(i,this.pid).catch(p.bind(function(e){return this.reportError("Error acquiring storage lock",e),Un(this.lock.storage,!0)?!1:i().then(p.bind(function(r){return r||this.queueStorage.removeItem(this.storageKey).then(function(){return r})},this)).catch(p.bind(function(r){return this.reportError("Error clearing queue",r),!1},this))},this))}else return H.resolve(!0)};var pf=function(t,n){var i=[];return p.each(t,function(e){var r=e.id;if(r in n){var o=n[r];o!==null&&(e.payload=o,i.push(e))}else i.push(e)}),i};Rt.prototype.updatePayloads=function(t){return this.memQueue=pf(this.memQueue,t),this.usePersistence?this.lock.withLock(p.bind(function(){return this.ensureInit().then(p.bind(function(){return this.readFromStorage()},this)).then(p.bind(function(i){return i=pf(i,t),this.saveToStorage(i)},this)).catch(p.bind(function(i){return this.reportError("Error updating items",t,i),!1},this))},this),this.pid).catch(p.bind(function(n){return this.reportError("Error acquiring storage lock",n),!1},this)):H.resolve(!0)};Rt.prototype.readFromStorage=function(){return this.ensureInit().then(p.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(p.bind(function(t){return t&&(p.isArray(t)||(this.reportError("Invalid storage entry:",t),t=null)),t||[]},this)).catch(p.bind(function(t){return this.reportError("Error retrieving queue",t),[]},this))};Rt.prototype.saveToStorage=function(t){return this.ensureInit().then(p.bind(function(){return this.queueStorage.setItem(this.storageKey,t)},this)).then(function(){return!0}).catch(p.bind(function(n){return this.reportError("Error saving queue",n),!1},this))};Rt.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(p.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):H.resolve()};var PE=600*1e3,bn=Gt("batch"),ct=function(t,n){this.errorReporter=n.errorReporter,this.queue=new Rt(t,{errorReporter:p.bind(this.reportError,this),queueStorage:n.queueStorage,sharedLockStorage:n.sharedLockStorage,sharedLockTimeoutMS:n.sharedLockTimeoutMS,usePersistence:n.usePersistence,enqueueThrottleMs:n.enqueueThrottleMs}),this.libConfig=n.libConfig,this.sendRequest=n.sendRequestFunc,this.beforeSendHook=n.beforeSendHook,this.stopAllBatching=n.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=n.flushOnlyOnInterval||!1,this._flushPromise=null};ct.prototype.enqueue=function(t){return this.queue.enqueue(t,this.flushInterval)};ct.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()};ct.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)};ct.prototype.clear=function(){return this.queue.clear()};ct.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size};ct.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)};ct.prototype.scheduleFlush=function(t){this.flushInterval=t,this.stopped||(this.timeoutID=setTimeout(p.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))};ct.prototype.sendRequestPromise=function(t,n){return new H(p.bind(function(i){this.sendRequest(t,n,i)},this))};ct.prototype.flush=function(t){if(this.requestInProgress)return bn.log("Flush: Request already in progress"),H.resolve();this.requestInProgress=!0,t=t||{};var n=this.libConfig.batch_request_timeout_ms,i=new Date().getTime(),e=this.batchSize;return this.queue.fillBatch(e).then(p.bind(function(r){var o=r.length===e,s=[],a={};if(p.each(r,function(f){var h=f.payload;if(this.beforeSendHook&&!f.orphaned&&(h=this.beforeSendHook(h)),h){h.event&&h.properties&&(h.properties=p.extend({},h.properties,{mp_sent_by_lib_version:nt.LIB_VERSION}));var g=!0,d=f.id;d?(this.itemIdsSentSuccessfully[d]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:f,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[d]}),g=!1):this.reportError("[dupe] found item with no ID",{item:f}),g&&s.push(h)}a[f.id]=h},this),s.length<1)return this.requestInProgress=!1,this.resetFlush(),H.resolve();var u=p.bind(function(){return this.queue.removeItemsByID(p.map(r,function(f){return f.id})).then(p.bind(function(f){return p.each(r,p.bind(function(h){var g=h.id;g?(this.itemIdsSentSuccessfully[g]=this.itemIdsSentSuccessfully[g]||0,this.itemIdsSentSuccessfully[g]++,this.itemIdsSentSuccessfully[g]>5&&this.reportError("[dupe] item ID sent too many times",{item:h,batchSize:r.length,timesSent:this.itemIdsSentSuccessfully[g]})):this.reportError("[dupe] found item with no ID while removing",{item:h})},this)),f?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?(this.resetFlush(),H.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),H.resolve())},this))},this),c=p.bind(function(f){this.requestInProgress=!1;try{if(t.unloading)return this.queue.updatePayloads(a);if(p.isObject(f)&&f.error==="timeout"&&new Date().getTime()-i>=n)return this.reportError("Network timeout; retrying"),this.flush();if(p.isObject(f)&&(f.httpStatusCode>=500||f.httpStatusCode===429||f.httpStatusCode<=0&&!bE()||f.error==="timeout")){var h=this.flushInterval*2;return f.retryAfter&&(h=parseInt(f.retryAfter,10)*1e3||h),h=Math.min(PE,h),this.reportError("Error; retry in "+h+" ms"),this.scheduleFlush(h),H.resolve()}else if(p.isObject(f)&&f.httpStatusCode===413)if(r.length>1){var g=Math.max(1,Math.floor(e/2));return this.batchSize=Math.min(this.batchSize,g,r.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),H.resolve()}else return this.reportError("Single-event request too large; dropping",r),this.resetBatchSize(),u();else return u()}catch(d){this.reportError("Error handling API response",d),this.resetFlush()}},this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:n};return t.unloading&&(l.transport="sendBeacon"),bn.log("MIXPANEL REQUEST:",s),this.sendRequestPromise(s,l).then(c)},this)).catch(p.bind(function(r){this.reportError("Error flushing request queue",r),this.resetFlush()},this))};ct.prototype.reportError=function(t,n){if(bn.error.apply(bn.error,arguments),this.errorReporter)try{n instanceof Error||(n=new Error(t)),this.errorReporter(t,n)}catch(i){bn.error(i)}};var Wu=function(t){var n=Date.now();return!t||n>t.maxExpires||n>t.idleExpires},$E=250,hd=function(t,n){if(!p.isArray(t))return t&&n.critical("record_allowed_iframe_origins must be an array of origin strings, cross-origin recording will be disabled."),[];for(var i=[],e=0;e<t.length;e++)try{var r=new URL(t[e]).origin;if(r==="null"){n.critical(t[e]+" has an opaque origin. Skipping this entry.");continue}i.push(r)}catch{n.critical(t[e]+" is not a valid origin URL. Skipping this entry.")}return i},Bn="change",jt="click",Ga="hashchange",LE="input",df="load",Kt="mp_locationchange",vf="popstate",Jo="scrollend",Vu="scroll",NE="select",yo="submit",DE="toggle",gf="visibilitychange",FE=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],mf=["mp-include"],Wa=["mp-no-track"],yf=Wa.concat(["mp-sensitive"]),UE=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],BE={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},zE={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},qE={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},_f=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],jE=5,ge=Gt("autocapture");function Va(t){for(var n={},i=pd(t).split(" "),e=0;e<i.length;e++){var r=i[e];r&&(n[r]=!0)}return n}function pd(t){switch(typeof t.className){case"string":return t.className;case"object":return t.className.baseVal||t.getAttribute("class")||"";default:return""}}function GE(t){if(t.previousElementSibling)return t.previousElementSibling;do t=t.previousSibling;while(t&&!dd(t));return t}function wf(t,n,i,e,r,o){var s={$classes:pd(t).split(" "),$tag_name:t.tagName.toLowerCase()},a=t.id;a&&(s.$id=a),Hu(t,n,r,o)&&p.each(UE.concat(e),function(f){if(t.hasAttribute(f)&&!i[f]){var h=t.getAttribute(f);_o(h)&&(s["$attr-"+f]=h)}});for(var u=1,c=1,l=t;l=GE(l);)u++,l.tagName===t.tagName&&c++;return s.$nth_child=u,s.$nth_of_type=c,s}function WE(t,n){var i=n.allowElementCallback,e=n.allowSelectors||[],r=n.blockAttrs||[],o=n.blockElementCallback,s=n.blockSelectors||[],a=n.captureTextContent||!1,u=n.captureExtraAttrs||[],c=n.capturedForHeatMap||!1,l={};p.each(r,function(C){l[C]=!0});var f=null,h=typeof t.target>"u"?t.srcElement:t.target;if(vd(h)&&(h=h.parentNode),KE(h,t)&&Ha(h,t,i,e)&&!Fs(h,t,o,s)){for(var g=[h],d=h;d.parentNode&&!Ot(d,"body");)g.push(d.parentNode),d=d.parentNode;var m=[],v,y=!1;if(p.each(g,function(C){var k=Hu(C,t,i,e);!l.href&&C.tagName.toLowerCase()==="a"&&(v=C.getAttribute("href"),v=k&&_o(v)&&v),Fs(C,t,o,s)&&(y=!0),m.push(wf(C,t,l,u,i,e))},this),!y){var _=W.documentElement;if(f={$event_type:t.type,$host:E.location.host,$pathname:E.location.pathname,$elements:m,$el_attr__href:v,$viewportHeight:Math.max(_.clientHeight,E.innerHeight||0),$viewportWidth:Math.max(_.clientWidth,E.innerWidth||0),$pageHeight:W.body.offsetHeight||0,$pageWidth:W.body.offsetWidth||0},p.each(u,function(C){if(!l[C]&&h.hasAttribute(C)){var k=h.getAttribute(C);_o(k)&&(f["$el_attr__"+C]=k)}}),a&&(w=bf(h,t,i,e),w&&w.length&&(f.$el_text=w)),t.type===jt&&(p.each(FE,function(C){C in t&&(f["$"+C]=t[C])}),c&&(f.$captured_for_heatmap=!0),h=VE(t)),a){var w=bf(h,t,i,e);w&&w.length&&(f.$el_text=w)}if(h){if(!Ha(h,t,i,e)||Fs(h,t,o,s))return null;var b=wf(h,t,l,u,i,e);f.$target=b,f.$el_classes=b.$classes,p.extend(f,p.strip_empty_properties({$el_id:b.$id,$el_tag_name:b.$tag_name}))}}}return f}function bf(t,n,i,e){var r="";return Hu(t,n,i,e)&&t.childNodes&&t.childNodes.length&&p.each(t.childNodes,function(o){vd(o)&&o.textContent&&(r+=p.trim(o.textContent).split(/(\s+)/).filter(_o).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),p.trim(r)}function VE(t){for(var n=t.target,i=t.composedPath(),e=0;e<i.length;e++){var r=i[e];if(Ot(r,"a")||Ot(r,"button")||Ot(r,"input")||Ot(r,"select")||r.getAttribute&&r.getAttribute("role")==="button"){n=r;break}if(r===n)break}return n}function Ha(t,n,i,e){if(i)try{if(!i(t,n))return!1}catch(s){return ge.critical("Error while checking element in allowElementCallback",s),!1}if(!e.length)return!0;for(var r=0;r<e.length;r++){var o=e[r];try{if(t.matches(o))return!0}catch(s){ge.critical("Error while checking selector: "+o,s)}}return!1}function Fs(t,n,i,e){var r;if(i)try{if(i(t,n))return!0}catch(a){return ge.critical("Error while checking element in blockElementCallback",a),!0}if(e&&e.length)for(r=0;r<e.length;r++){var o=e[r];try{if(t.matches(o))return!0}catch(a){ge.critical("Error while checking selector: "+o,a)}}var s=Va(t);for(r=0;r<Wa.length;r++)if(s[Wa[r]])return!0;return!1}function dd(t){return t&&t.nodeType===1}function Ot(t,n){return t&&t.tagName&&t.tagName.toLowerCase()===n.toLowerCase()}function vd(t){return t&&t.nodeType===3}function HE(){try{var t=W.createElement("div");return!!t.matches}catch{return!1}}function YE(){return typeof WeakSet<"u"}function KE(t,n){if(!t||Ot(t,"html")||!dd(t))return!1;var i=t.tagName.toLowerCase();switch(i){case"form":return n.type===yo;case"input":return["button","submit"].indexOf(t.getAttribute("type"))===-1?n.type===Bn:n.type===jt;case"select":case"textarea":return n.type===Bn;default:return n.type===jt}}function gd(t){var n=(t.name||t.id||"").toString().toLowerCase();if(typeof n=="string"){var i=/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i;if(i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!0}return!1}function Hu(t,n,i,e){var r;if(!Ha(t,n,i,e))return!1;for(var o=t;o.parentNode&&!Ot(o,"body");o=o.parentNode){var s=Va(o);for(r=0;r<yf.length;r++)if(s[yf[r]])return!1}var a=Va(t);for(r=0;r<mf.length;r++)if(a[mf[r]])return!0;if(Ot(t,"input")||Ot(t,"select")||Ot(t,"textarea")||t.getAttribute("contenteditable")==="true")return!1;var u=t.type||"";if(typeof u=="string")switch(u.toLowerCase()){case"hidden":return!1;case"password":return!1}return!gd(t)}function _o(t){if(t===null||p.isUndefined(t))return!1;if(typeof t=="string"){t=p.trim(t);var n=/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/;if(n.test((t||"").replace(/[- ]/g,"")))return!1;var i=/(^\d{3}-?\d{2}-?\d{4}$)/;if(i.test(t))return!1}return!0}function md(t){var n="onscrollend"in E,i=Jr(t),e=Jo;if(!n){var r=null,o=100;i=Jr(function(){clearTimeout(r),r=setTimeout(t,o)}),e=Vu}return{listener:i,eventType:e}}function JE(t){for(var n=0;n<_f.length;n++)if(t.hasAttribute(_f[n]))return!0;return!1}function XE(t){var n=t.getAttribute("role");if(!n)return!1;var i=n.trim().split(/\s+/)[0].toLowerCase();return BE[i]}function Us(t){var n=t.tagName.toLowerCase();return!!(n==="button"||n==="input"||n==="select"||n==="textarea"||n==="details"||n==="dialog"||t.isContentEditable||t.onclick||t.onmousedown||t.onmouseup||t.ontouchstart||t.ontouchend||JE(t)||XE(t)||n==="a"&&t.hasAttribute("href")||t.hasAttribute("tabindex"))}function yd(t){if(!t||!t.tagName)return!0;var n=t.tagName.toLowerCase();if(zE[n])return!0;if(Us(t))return!1;for(var i=t.parentElement,e=0;i&&e<jE;){if(Us(i))return!1;if(i.getRootNode&&i.getRootNode()!==W){var r=i.getRootNode();if(r.host&&Us(r.host))return!1}i=i.parentElement,e++}return!!qE[n]}function _d(t){return"composedPath"in t?t.composedPath():[]}function wd(t){var n=_d(t);return n&&n.length>0?n[0]:t.target||t.srcElement}var bd=".mp-mask, .fs-mask, .amp-mask, .rr-mask, .ph-mask",ZE="data-rr-is-password",QE=["password","email","tel","hidden"];function Fi(t){return t?Array.isArray(t)?t:[t]:[]}function e0(t){var n={input:{maskingSelector:"",unmaskingSelector:"",maskAll:!0},text:{maskingSelector:"",unmaskingSelector:"",maskAll:!0}},i=t.get_config("record_mask_input_selector"),e=t.get_config("record_unmask_input_selector"),r=t.get_config("record_mask_all_inputs");n.input.maskingSelector=Fi(i).join(","),n.input.unmaskingSelector=Fi(e).join(","),r!==void 0&&(n.input.maskAll=r);var o=t.get_config("record_mask_text_selector"),s=t.get_config("record_unmask_text_selector"),a=t.get_config("record_mask_all_text"),u=t.get_config("record_mask_text_class"),c=Fi(o);if(u)if(u instanceof RegExp)n.text._legacyClassRegex=u;else{var l="."+u;c.indexOf(l)===-1&&c.push(l)}return n.text.maskingSelector=c.join(","),n.text.unmaskingSelector=Fi(s).join(","),a===void 0&&o!==void 0?n.text.maskAll=!1:a!==void 0&&(n.text.maskAll=a),n}function Fr(t,n){return n?!!t.closest(n):!1}function t0(t,n){var i=(t.getAttribute("type")||"").toLowerCase();if(QE.indexOf(i)!==-1)return!0;var e=(t.getAttribute("autocomplete")||"").toLowerCase();return e&&e!==""&&e!=="off"||t.hasAttribute(ZE)||gd(t)?!0:n.input.maskAll?!Fr(t,n.input.unmaskingSelector):!!(Fr(t,n.input.maskingSelector)||Fr(t,bd))}function r0(t,n){return t?n.text._legacyClassRegex&&Ea(t,n.text._legacyClassRegex)?!0:n.text.maskAll?!Fr(t,n.text.unmaskingSelector):!!(Fr(t,n.text.maskingSelector)||Fr(t,bd)):!1}var _r=Gt("network-plugin");function wo(t){return Math.round(Date.now()-t.performance.now())}var Bs={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],ignoreRequestFn:function(){return!1},recordHeaders:{request:[],response:[]},recordBodyUrls:{request:[],response:[]},recordInitialRequests:!1};function n0(t){return t.entryType==="navigation"}function Ya(t){return t.entryType==="resource"}function i0(t,n){for(var i=t.length,e=i-1;e>=0;e-=1)if(n(t[e]))return t[e]}function Sd(t,n,i){if(!(n in t)||typeof t[n]!="function")return function(){};var e=t[n],r=i(e);return t[n]=r,function(){t[n]=e}}var zs=1024*1024;function Cd(t){return!t||typeof t!="string"?t:t.length>zs?(_r.error("Body truncated from "+t.length+" to "+zs+" characters"),t.substring(0,zs)+"... [truncated]"):t}function o0(t,n,i){if(!n.PerformanceObserver)return _r.error("PerformanceObserver not supported"),function(){};if(i.recordInitialRequests){var e=n.performance.getEntries().filter(function(o){return n0(o)||Ya(o)&&i.initiatorTypes.includes(o.initiatorType)});t({requests:e.map(function(o){return{url:o.name,initiatorType:o.initiatorType,status:"responseStatus"in o?o.responseStatus:void 0,startTime:Math.round(o.startTime),endTime:Math.round(o.responseEnd),timeOrigin:wo(n)}}),isInitial:!0})}var r=new n.PerformanceObserver(function(o){var s=o.getEntries().filter(function(a){return Ya(a)&&i.initiatorTypes.includes(a.initiatorType)&&a.initiatorType!=="xmlhttprequest"&&a.initiatorType!=="fetch"});t({requests:s.map(function(a){return{url:a.name,initiatorType:a.initiatorType,status:"responseStatus"in a?a.responseStatus:void 0,startTime:Math.round(a.startTime),endTime:Math.round(a.responseEnd),timeOrigin:wo(n)}})})});return r.observe({entryTypes:["navigation","resource"]}),function(){r.disconnect()}}function bo(t,n,i){return!n[t]||n[t].length===0?!1:n[t].includes(i.toLowerCase())}function So(t,n,i){return!n[t]||n[t].length===0?!1:go(i,n[t])}function Sf(t){if(t==null)return null;var n;if(typeof t=="string")n=t;else if(t instanceof Document)n=t.textContent;else if(t instanceof FormData)n=p.HTTPBuildQuery(t);else if(p.isObject(t))try{n=JSON.stringify(t)}catch{return"Failed to stringify response object"}else return"Cannot read body of type "+typeof t;return Cd(n)}function Cf(t){return new Promise(function(n){var i=setTimeout(function(){n("Timeout while trying to read body")},500);try{t.clone().text().then(function(e){clearTimeout(i),n(Cd(e))},function(e){clearTimeout(i),n("Failed to read body: "+String(e))})}catch(e){clearTimeout(i),n("Failed to read body: "+String(e))}})}function Yu(t,n,i,e,r,o){if(o===void 0&&(o=0),o>10)return _r.error("Cannot find performance entry"),Promise.resolve(null);var s=t.performance.getEntriesByName(i),a=i0(s,function(u){return Ya(u)&&u.initiatorType===n&&(!e||u.startTime>=e)&&(!r||u.startTime<=r)});return a?Promise.resolve(a):new Promise(function(u){setTimeout(u,50*o)}).then(function(){return Yu(t,n,i,e,r,o+1)})}function s0(t,n,i){if(!i.initiatorTypes.includes("xmlhttprequest"))return function(){};var e=Sd(n.XMLHttpRequest.prototype,"open",function(r){return function(o,s,a,u,c){a===void 0&&(a=!0);var l=this,f=new Request(s,{method:o}),h={},g,d,m={},v=l.setRequestHeader.bind(l);l.setRequestHeader=function(_,w){return bo("request",i.recordHeaders,_)&&(m[_]=w),v(_,w)},h.requestHeaders=m;var y=l.send.bind(l);l.send=function(_){return So("request",i.recordBodyUrls,f.url)&&(h.requestBody=Sf(_)),g=n.performance.now(),y(_)},l.addEventListener("readystatechange",function(){if(l.readyState===l.DONE){d=n.performance.now();var _={},w=l.getAllResponseHeaders();if(w){var b=w.trim().split(/[\r\n]+/);b.forEach(function(C){if(C){var k=C.indexOf(": ");if(k!==-1){var x=C.substring(0,k),A=C.substring(k+2);x&&bo("response",i.recordHeaders,x)&&(_[x]=A)}}})}h.responseHeaders=_,So("response",i.recordBodyUrls,f.url)&&(h.responseBody=Sf(l.response)),Yu(n,"xmlhttprequest",f.url,g,d).then(function(C){if(!C){_r.error("Failed to get performance entry for XHR request to "+f.url);return}var k={url:C.name,method:f.method,initiatorType:C.initiatorType,status:l.status,startTime:Math.round(C.startTime),endTime:Math.round(C.responseEnd),timeOrigin:wo(n),requestHeaders:h.requestHeaders,requestBody:h.requestBody,responseHeaders:h.responseHeaders,responseBody:h.responseBody};t({requests:[k]})}).catch(function(C){_r.error("Error recording XHR request to "+f.url+": "+String(C))})}}),r.call(l,o,s,a,u,c)}});return function(){e()}}function a0(t,n,i){if(!i.initiatorTypes.includes("fetch"))return function(){};var e=Sd(n,"fetch",function(r){return function(){var o=new Request(arguments[0],arguments[1]),s,a={},u,c,l,f=Promise.resolve(void 0),h=Promise.resolve(void 0);try{var g={};o.headers.forEach(function(d,m){bo("request",i.recordHeaders,m)&&(g[m]=d)}),a.requestHeaders=g,So("request",i.recordBodyUrls,o.url)&&(f=Cf(o).then(function(d){a.requestBody=d})),u=n.performance.now(),l=r.apply(n,arguments).then(function(d){s=d,c=n.performance.now();var m={};return s.headers.forEach(function(v,y){bo("response",i.recordHeaders,y)&&(m[y]=v)}),a.responseHeaders=m,So("response",i.recordBodyUrls,o.url)&&(h=Cf(s).then(function(v){a.responseBody=v})),s})}catch(d){l=Promise.reject(d)}return Promise.all([f,h,l]).then(function(){return Yu(n,"fetch",o.url,u,c)}).then(function(d){if(!d){_r.error("Failed to get performance entry for fetch request to "+o.url);return}var m={url:d.name,method:o.method,initiatorType:d.initiatorType,status:s?s.status:void 0,startTime:Math.round(d.startTime),endTime:Math.round(d.responseEnd),timeOrigin:wo(n),requestHeaders:a.requestHeaders,requestBody:a.requestBody,responseHeaders:a.responseHeaders,responseBody:a.responseBody};t({requests:[m]})}).catch(function(d){_r.error("Error recording fetch request to "+o.url+": "+String(d))}),l}});return function(){e()}}function u0(t,n,i){if(!("performance"in n))return function(){};var e=Object.assign({},Bs.recordHeaders,i.recordHeaders||{}),r=Object.assign({},Bs.recordBodyUrls,i.recordBodyUrls||{});i=Object.assign({},i,{recordHeaders:e,recordBodyUrls:r});var o=Object.assign({},Bs,i),s=function(l){var f=l.requests.filter(function(h){var g=go(h.url,o.ignoreRequestUrls||[]);return!g&&!o.ignoreRequestFn(h)});(f.length>0||l.isInitial)&&t(Object.assign({},l,{requests:f}))},a=o0(s,n,o),u=s0(s,n,o),c=a0(s,n,o);return function(){a(),u(),c()}}var c0="rrweb/network@1.mp",l0=function(t){return{name:c0,observer:u0,options:t}},vr=Gt("recorder"),f0=E.CompressionStream,h0={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},p0=new Set([G.MouseMove,G.MouseInteraction,G.Scroll,G.ViewportResize,G.Input,G.TouchMove,G.MediaInteraction,G.Drag,G.Selection]);function d0(t){return t.type===te.IncrementalSnapshot&&p0.has(t.data.source)}var Pe=function(t){this._mixpanel=t.mixpanelInstance,this._onIdleTimeout=t.onIdleTimeout||Jt,this._onMaxLengthReached=t.onMaxLengthReached||Jt,this._onBatchSent=t.onBatchSent||Jt,this._rrwebRecord=t.rrwebRecord||null,this._stopRecording=null,this.replayId=t.replayId,this.batchStartUrl=t.batchStartUrl||null,this.replayStartUrl=t.replayStartUrl||null,this.idleExpires=t.idleExpires||null,this.maxExpires=t.maxExpires||null,this.replayStartTime=t.replayStartTime||null,this.lastEventTimestamp=t.lastEventTimestamp||null,this.seqNo=t.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=wn,this.recordMinMs=0;var n=Un(t.sharedLockStorage,!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new vt(ad),this.batcher=new ct(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:h0,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:t.sharedLockStorage,usePersistence:n,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:$E,sharedLockTimeoutMS:10*1e3})};Pe.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var t={distinct_id:String(this._mixpanel.get_distinct_id())},n=this._mixpanel.get_property("$device_id");n&&(t.$device_id=n);var i=this._mixpanel.get_property("$user_id");return i&&(t.$user_id=i),t};Pe.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.queueStorage.init().catch(function(){this.reportError("Error initializing IndexedDB storage for unloading persisted data.")}.bind(this)).then(function(){return this.getDurationMs()<this._getRecordMinMs()?this.queueStorage.removeItem(this.batcherKey):this.batcher.flush().then(function(){return this.queueStorage.removeItem(this.batcherKey)}.bind(this))}.bind(this))};Pe.prototype.getConfig=function(t){return this._mixpanel.get_config(t)};Pe.prototype.get_config=function(t){return this.getConfig(t)};Pe.prototype.startRecording=function(t){if(this._rrwebRecord===null){this.reportError("rrweb record function not provided. ");return}if(this._stopRecording!==null){vr.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>wn&&(this.recordMaxMs=wn,vr.critical("record_max_ms cannot be greater than "+wn+"ms. Capping value.")),this.maxExpires||(this.maxExpires=new Date().getTime()+this.recordMaxMs),this.recordMinMs=this._getRecordMinMs(),this.replayStartTime||(this.replayStartTime=new Date().getTime(),this.batchStartUrl=p.info.currentUrl(),this.replayStartUrl=p.info.currentUrl()),t||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var n=function(){clearTimeout(this.idleTimeoutId);var c=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,c),this.idleExpires=new Date().getTime()+c}.bind(this);n();var i=this.getConfig("record_block_selector");(i===""||i===null)&&(i=void 0);var e=e0(this._mixpanel),r=[];if(this.getConfig("record_network")){var o=this.getConfig("record_network_options")||{},s=(o.ignoreRequestUrls||[]).slice();s.push(this._getApiRoute()),o.ignoreRequestUrls=s,r.push(l0(o))}this.getConfig("record_console")&&r.push(uE({stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:50,depthOfLimit:2}}));var a=hd(this.getConfig("record_allowed_iframe_origins"),vr);try{this._stopRecording=this._rrwebRecord({emit:function(c){if(this.idleExpires&&this.idleExpires<c.timestamp){this._onIdleTimeout();return}d0(c)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),n()),this.__enqueuePromise=this.batcher.enqueue(c),(this.lastEventTimestamp===null||c.timestamp>this.lastEventTimestamp)&&(this.lastEventTimestamp=c.timestamp)}.bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:i,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextSelector:"*",maskInputFn:this._getMaskFn(t0,e),maskTextFn:this._getMaskFn(r0,e),recordCrossOriginIframes:a.length>0,allowedIframeOrigins:a,recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15},plugins:r})}catch(c){this.reportError("Unexpected error when starting rrweb recording.",c)}if(typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}var u=this.maxExpires-new Date().getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),u)};Pe.prototype.stopRecording=function(t){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(i){this.reportError("Error with rrweb stopRecording",i)}this._stopRecording=null}var n;return this.batcher.stopped?n=this.batcher.clear():t||(n=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),n};Pe.prototype.isRrwebStopped=function(){return this._stopRecording===null};Pe.prototype.flushEventsWithOptOut=function(t,n,i){var e=function(r){r===0&&(this.stopRecording(),i({error:"Tracking has been opted out, stopping recording."}))}.bind(this);this._flushEvents(t,n,i,e)};Pe.prototype.serialize=function(){var t;try{t=this._mixpanel.get_tab_id()}catch(n){this.reportError("Error getting tab ID for serialization ",n),t=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,lastEventTimestamp:this.lastEventTimestamp,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:t}};Pe.deserialize=function(t,n){var i=new Pe(p.extend({},n,{replayId:t.replayId,batchStartUrl:t.batchStartUrl,replayStartUrl:t.replayStartUrl,idleExpires:t.idleExpires,maxExpires:t.maxExpires,replayStartTime:t.replayStartTime,lastEventTimestamp:t.lastEventTimestamp,seqNo:t.seqNo,sharedLockStorage:n.sharedLockStorage}));return i};Pe.prototype._getApiRoute=function(){return this.getConfig("api_routes").record};Pe.prototype._sendRequest=function(t,n,i,e){var r=function(s,a){s.status===200&&this.replayId===t&&(this.seqNo++,this.batchStartUrl=p.info.currentUrl()),this._onBatchSent(),e({status:0,httpStatusCode:s.status,responseBody:a,retryAfter:s.headers.get("Retry-After")})}.bind(this),o=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");E.fetch(o+"/"+this._getApiRoute()+"?"+new URLSearchParams(n),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:i}).then(function(s){s.json().then(function(a){r(s,a)}).catch(function(a){e({error:a})})}).catch(function(s){e({error:s,httpStatusCode:0})})};Pe.prototype._flushEvents=ar(function(t,n,i){var e=t.length;if(e>0){for(var r=this.replayId,o=1/0,s=-1/0,a=!1,u=0;u<e;u++)o=Math.min(o,t[u].timestamp),s=Math.max(s,t[u].timestamp),t[u].type===te.FullSnapshot&&(a=!0);if(this.seqNo===0){if(!a){i({error:"First batch does not contain a full snapshot. Aborting recording."}),this.stopRecording(!0);return}this.replayStartTime=o}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var c=s-this.replayStartTime,l={$current_url:this.batchStartUrl,$lib_version:nt.LIB_VERSION,batch_start_time:o/1e3,mp_lib:"web",replay_id:r,replay_length_ms:c,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},f=JSON.stringify(t);if(Object.assign(l,this.getUserIdInfo()),SE(It,Ft.vendor,vn)){var h=new Blob([f],{type:"application/json"}).stream(),g=h.pipeThrough(new f0("gzip"));new Response(g).blob().then(function(d){l.format="gzip",this._sendRequest(r,l,d,i)}.bind(this))}else l.format="body",this._sendRequest(r,l,f,i)}});Pe.prototype.reportError=function(t,n){vr.error.apply(vr.error,arguments);try{!n&&!(t instanceof Error)&&(t=new Error(t)),this.getConfig("error_reporter")(t,n)}catch(i){vr.error(i)}};Pe.prototype.getDurationMs=function(){return this.replayStartTime===null?0:this.lastEventTimestamp===null?new Date().getTime()-this.replayStartTime:this.lastEventTimestamp-this.replayStartTime};Pe.prototype._getRecordMinMs=function(){var t=this.getConfig("record_min_ms");return t>Ps?(vr.critical("record_min_ms cannot be greater than "+Ps+"ms. Capping value."),Ps):t};Pe.prototype._getMaskFn=function(t,n){return function(i,e){if(!i.trim().length)return"";var r=!0;try{r=t(e,n)}catch(s){this.reportError("Error checking if text should be masked, defaulting to masked",s)}if(r){var o=Math.min(i.length,1e4);return"*".repeat(o)}else return i}.bind(this)};var Wt=function(t){this.idb=new vt(zu),this.errorReporter=t.errorReporter,this.mixpanelInstance=t.mixpanelInstance,this.sharedLockStorage=t.sharedLockStorage};Wt.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")};Wt.prototype.handleError=function(t){this.errorReporter("IndexedDB error: ",t)};Wt.prototype.setActiveRecording=function(t){if(!this.isPersistenceEnabled())return H.resolve();var n=t.tabId;return n?this.idb.init().then(function(){return this.idb.setItem(n,t)}.bind(this)).catch(this.handleError.bind(this)):(console.warn("No tab ID is set, cannot persist recording metadata."),H.resolve())};Wt.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}.bind(this)).then(function(t){return Wu(t)?null:t}.bind(this)).catch(this.handleError.bind(this)):H.resolve(null)};Wt.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()};Wt.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then(function(t){if(t)return t.maxExpires=0,this.setActiveRecording(t)}.bind(this)).catch(this.handleError.bind(this))};Wt.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):H.resolve()};Wt.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getAll()}.bind(this)).then(function(t){var n=t.filter(function(i){return Wu(i)}).map(function(i){var e=Pe.deserialize(i,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage});return e.unloadPersistedData().then(function(){return this.idb.removeItem(i.tabId)}.bind(this)).catch(this.handleError.bind(this))}.bind(this));return H.all(n)}.bind(this)).catch(this.handleError.bind(this)):H.resolve([])};var Sn=Gt("recorder"),At=function(t,n,i){this.mixpanelInstance=t,this.rrwebRecord=n||nr,this.sharedLockStorage=i,this.recordingRegistry=new Wt({mixpanelInstance:this.mixpanelInstance,errorReporter:Sn.error,sharedLockStorage:i}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};At.prototype.startRecording=function(t){if(t=t||{},this.activeRecording&&!this.activeRecording.isRrwebStopped()){Sn.log("Recording already in progress, skipping startRecording.");return}var n=function(){Sn.log("Idle timeout reached, restarting recording."),this.resetRecording()}.bind(this),i=function(){Sn.log("Max recording length reached, stopping recording."),this.resetRecording()}.bind(this),e=function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}.bind(this),r={mixpanelInstance:this.mixpanelInstance,onBatchSent:e,onIdleTimeout:n,onMaxLengthReached:i,replayId:p.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return t.activeSerializedRecording?this.activeRecording=Pe.deserialize(t.activeSerializedRecording,r):this.activeRecording=new Pe(r),this.activeRecording.startRecording(t.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())};At.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then(function(){return this.recordingRegistry.clearActiveRecording()}.bind(this)).then(function(){this.stopRecordingInProgress=!1}.bind(this))};At.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)};At.prototype._stopCurrentRecording=function(t,n){if(this.activeRecording){var i=this.activeRecording.stopRecording(t);return n&&(this.activeRecording=null),i}return H.resolve()};At.prototype.resumeRecording=function(t){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),H.resolve(null)):this.recordingRegistry.getActiveRecording().then(function(n){return n&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:n}):t?this.startRecording({shouldStopBatcher:!1}):(Sn.log("No resumable recording found."),null)}.bind(this))};At.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})};At.prototype.isRecording=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()};At.prototype.getActiveReplayId=function(){return this.isRecording()?this.activeRecording.replayId:null};Object.defineProperty(At.prototype,"replayId",{get:function(){return this.getActiveReplayId()}});E[qs]=At;function v0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yi={exports:{}},g0=Yi.exports,Ef;function m0(){return Ef||(Ef=1,(function(t,n){(function(i,e){t.exports=e()})(g0,function(){Array.isArray||(Array.isArray=function(o){return Object.prototype.toString.call(o)==="[object Array]"});function i(o){for(var s=[],a=0,u=o.length;a<u;a++)s.indexOf(o[a])===-1&&s.push(o[a]);return s}var e={},r={"==":function(o,s){return o==s},"===":function(o,s){return o===s},"!=":function(o,s){return o!=s},"!==":function(o,s){return o!==s},">":function(o,s){return o>s},">=":function(o,s){return o>=s},"<":function(o,s,a){return a===void 0?o<s:o<s&&s<a},"<=":function(o,s,a){return a===void 0?o<=s:o<=s&&s<=a},"!!":function(o){return e.truthy(o)},"!":function(o){return!e.truthy(o)},"%":function(o,s){return o%s},log:function(o){return console.log(o),o},in:function(o,s){return!s||typeof s.indexOf>"u"?!1:s.indexOf(o)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(o,s,a){if(a<0){var u=String(o).substr(s);return u.substr(0,u.length+a)}return String(o).substr(s,a)},"+":function(){return Array.prototype.reduce.call(arguments,function(o,s){return parseFloat(o,10)+parseFloat(s,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(o,s){return parseFloat(o,10)*parseFloat(s,10)})},"-":function(o,s){return s===void 0?-o:o-s},"/":function(o,s){return o/s},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(o,s){return o.concat(s)},[])},var:function(o,s){var a=s===void 0?null:s,u=this;if(typeof o>"u"||o===""||o===null)return u;for(var c=String(o).split("."),l=0;l<c.length;l++)if(u==null||(u=u[c[l]],u===void 0))return a;return u},missing:function(){for(var o=[],s=Array.isArray(arguments[0])?arguments[0]:arguments,a=0;a<s.length;a++){var u=s[a],c=e.apply({var:u},this);(c===null||c==="")&&o.push(u)}return o},missing_some:function(o,s){var a=e.apply({missing:s},this);return s.length-a.length>=o?[]:a}};return e.is_logic=function(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.keys(o).length===1},e.truthy=function(o){return Array.isArray(o)&&o.length===0?!1:!!o},e.get_operator=function(o){return Object.keys(o)[0]},e.get_values=function(o){return o[e.get_operator(o)]},e.apply=function(o,s){if(Array.isArray(o))return o.map(function(v){return e.apply(v,s)});if(!e.is_logic(o))return o;var a=e.get_operator(o),u=o[a],c,l,f,h,g;if(Array.isArray(u)||(u=[u]),a==="if"||a=="?:"){for(c=0;c<u.length-1;c+=2)if(e.truthy(e.apply(u[c],s)))return e.apply(u[c+1],s);return u.length===c+1?e.apply(u[c],s):null}else if(a==="and"){for(c=0;c<u.length;c+=1)if(l=e.apply(u[c],s),!e.truthy(l))return l;return l}else if(a==="or"){for(c=0;c<u.length;c+=1)if(l=e.apply(u[c],s),e.truthy(l))return l;return l}else{if(a==="filter")return h=e.apply(u[0],s),f=u[1],Array.isArray(h)?h.filter(function(v){return e.truthy(e.apply(f,v))}):[];if(a==="map")return h=e.apply(u[0],s),f=u[1],Array.isArray(h)?h.map(function(v){return e.apply(f,v)}):[];if(a==="reduce")return h=e.apply(u[0],s),f=u[1],g=typeof u[2]<"u"?e.apply(u[2],s):null,Array.isArray(h)?h.reduce(function(v,y){return e.apply(f,{current:y,accumulator:v})},g):g;if(a==="all"){if(h=e.apply(u[0],s),f=u[1],!Array.isArray(h)||!h.length)return!1;for(c=0;c<h.length;c+=1)if(!e.truthy(e.apply(f,h[c])))return!1;return!0}else if(a==="none"){if(h=e.apply(u[0],s),f=u[1],!Array.isArray(h)||!h.length)return!0;for(c=0;c<h.length;c+=1)if(e.truthy(e.apply(f,h[c])))return!1;return!0}else if(a==="some"){if(h=e.apply(u[0],s),f=u[1],!Array.isArray(h)||!h.length)return!1;for(c=0;c<h.length;c+=1)if(e.truthy(e.apply(f,h[c])))return!0;return!1}}if(u=u.map(function(v){return e.apply(v,s)}),r.hasOwnProperty(a)&&typeof r[a]=="function")return r[a].apply(s,u);if(a.indexOf(".")>0){var d=String(a).split("."),m=r;for(c=0;c<d.length;c++){if(!m.hasOwnProperty(d[c]))throw new Error("Unrecognized operation "+a+" (failed at "+d.slice(0,c+1).join(".")+")");m=m[d[c]]}return m.apply(s,u)}throw new Error("Unrecognized operation "+a)},e.uses_data=function(o){var s=[];if(e.is_logic(o)){var a=e.get_operator(o),u=o[a];Array.isArray(u)||(u=[u]),a==="var"?s.push(u[0]):u.forEach(function(c){s.push.apply(s,e.uses_data(c))})}return i(s)},e.add_operation=function(o,s){r[o]=s},e.rm_operation=function(o){delete r[o]},e.rule_like=function(o,s){if(s===o||s==="@")return!0;if(s==="number")return typeof o=="number";if(s==="string")return typeof o=="string";if(s==="array")return Array.isArray(o)&&!e.is_logic(o);if(e.is_logic(s)){if(e.is_logic(o)){var a=e.get_operator(s),u=e.get_operator(o);if(a==="@"||a===u)return e.rule_like(e.get_values(o,!1),e.get_values(s,!1))}return!1}if(Array.isArray(s))if(Array.isArray(o)){if(s.length!==o.length)return!1;for(var c=0;c<s.length;c+=1)if(!e.rule_like(o[c],s[c]))return!1;return!0}else return!1;return!1},e})})(Yi)),Yi.exports}var y0=m0(),_0=v0(y0),w0=function(t,n,i){if(t!==i.event_name)return{matches:!1};var e=i.property_filters,r=!0;if(e&&!p.isEmptyObject(e))try{r=_0.apply(e,n||{})}catch(o){return{matches:!1,error:o.toString()}}return{matches:r}},Ed={};Ed.eventMatchesCriteria=w0;E[pt]=Promise.resolve(Ed);var b0=30,S0=1e3,C0=4,E0=!1;function Id(){this.clicks=[]}Id.prototype.isRageClick=function(t,n){n=n||{};var i=n.threshold_px||b0,e=n.timeout_ms||S0,r=n.click_count||C0,o=n.interactive_elements_only||E0;if(o){var s=wd(t);if(!s||yd(s))return!1}var a=Date.now(),u=t.pageX,c=t.pageY,l=this.clicks[this.clicks.length-1];if(l&&a-l.timestamp<e&&Math.sqrt(Math.pow(u-l.x,2)+Math.pow(c-l.y,2))<i){if(this.clicks.push({x:u,y:c,timestamp:a}),this.clicks.length>=r)return this.clicks=[],!0}else this.clicks=[{x:u,y:c,timestamp:a}];return!1};function rn(t,n){this.changeCallback=t||function(){},this.observerConfig=n,this.observedShadowRoots=null,this.shadowObservers=[]}rn.prototype.getEventTarget=function(t){if(this.observedShadowRoots)return wd(t)};rn.prototype.observeFromEvent=function(t){if(this.observedShadowRoots)for(var n=_d(t),i=0;i<n.length;i++){var e=n[i];e&&e.shadowRoot&&this.observeShadowRoot(e.shadowRoot)}};rn.prototype.observeShadowRoot=function(t){if(!(!this.observedShadowRoots||this.observedShadowRoots.has(t))){var n=this;try{this.observedShadowRoots.add(t);var i=new window.MutationObserver(function(){n.changeCallback()});i.observe(t,this.observerConfig),this.shadowObservers.push(i)}catch(e){ge.critical("Error while observing shadow root",e)}}};rn.prototype.start=function(){if(!this.observedShadowRoots){if(!YE()){ge.critical("Shadow DOM observation unavailable: WeakSet not supported");return}this.observedShadowRoots=new WeakSet}};rn.prototype.stop=function(){if(this.observedShadowRoots){for(var t=0;t<this.shadowObservers.length;t++)try{this.shadowObservers[t].disconnect()}catch(n){ge.critical("Error while disconnecting shadow DOM observer",n)}this.shadowObservers=[],this.observedShadowRoots=null}};var I0=500,k0=[Bn,LE,yo,NE,DE],O0=[Jo],x0=[Ga],If={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden","checked","selected","value","display","visibility"]};function Mt(t){this.eventListeners=[],this.mutationObserver=null,this.shadowDOMObserver=null,this.isTracking=!1,this.lastChangeEventTimestamp=0,this.pendingClicks=[],this.onDeadClickCallback=t,this.processingActive=!1,this.processingTimeout=null}Mt.prototype.addClick=function(t){var n=this.shadowDOMObserver&&this.shadowDOMObserver.getEventTarget(t);return n||(n=t.target||t.srcElement),!n||yd(n)?!1:(this.shadowDOMObserver&&this.shadowDOMObserver.observeFromEvent(t),this.pendingClicks.push({element:n,event:t,timestamp:Date.now()}),!0)};Mt.prototype.trackClick=function(t,n){if(!this.isTracking)return!1;var i=this.addClick(t);return i&&this.triggerProcessing(n),i};Mt.prototype.getDeadClicks=function(t){if(this.pendingClicks.length===0)return[];var n=t.timeout_ms,i=Date.now(),e=this.pendingClicks.slice();this.pendingClicks=[];for(var r=[],o=0;o<e.length;o++){var s=e[o];i-s.timestamp>=n?this.hasChangesAfter(s.timestamp)||r.push(s):this.pendingClicks.push(s)}return r};Mt.prototype.hasChangesAfter=function(t){return this.lastChangeEventTimestamp>=t-100};Mt.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()};Mt.prototype.triggerProcessing=function(t){this.processingActive||(this.processingActive=!0,this.processRecursively(t))};Mt.prototype.processRecursively=function(t){if(!this.isTracking||!this.onDeadClickCallback){this.processingActive=!1;return}var n=t.timeout_ms,i=this;this.processingTimeout=setTimeout(function(){if(i.processingActive){for(var e=i.getDeadClicks(t),r=0;r<e.length;r++)i.onDeadClickCallback(e[r].event);i.pendingClicks.length>0?i.processRecursively(t):i.processingActive=!1}},n)};Mt.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var t=this;k0.forEach(function(i){var e=function(){t.recordChangeEvent()};document.addEventListener(i,e,{capture:!0,passive:!0}),t.eventListeners.push({target:document,event:i,handler:e,options:{capture:!0,passive:!0}})}),x0.forEach(function(i){var e=function(){t.recordChangeEvent()};window.addEventListener(i,e),t.eventListeners.push({target:window,event:i,handler:e})}),O0.forEach(function(i){var e=function(){t.recordChangeEvent()};window.addEventListener(i,e,{passive:!0}),t.eventListeners.push({target:window,event:i,handler:e,options:{passive:!0}})});var n=function(){t.recordChangeEvent()};if(document.addEventListener("selectionchange",n),t.eventListeners.push({target:document,event:"selectionchange",handler:n}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){t.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,If)}catch(i){ge.critical("Error while setting up mutation observer",i)}if(window.customElements)try{this.shadowDOMObserver=new rn(function(){t.recordChangeEvent()},If),this.shadowDOMObserver.start()}catch(i){ge.critical("Error while setting up shadow DOM observer",i),this.shadowDOMObserver=null}}};Mt.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var t=0;t<this.eventListeners.length;t++){var n=this.eventListeners[t];try{n.target.removeEventListener(n.event,n.handler,n.options)}catch(i){ge.critical("Error while removing event listener",i)}}if(this.eventListeners=[],this.mutationObserver){try{this.mutationObserver.disconnect()}catch(i){ge.critical("Error while disconnecting mutation observer",i)}this.mutationObserver=null}if(this.shadowDOMObserver){try{this.shadowDOMObserver.stop()}catch(i){ge.critical("Error while stopping shadow DOM observer",i)}this.shadowDOMObserver=null}}};var kd="autocapture",R0="track_pageview",Od="full-url",A0="url-with-path-and-query-string",M0="url-with-path",T0="allow_element_callback",xd="allow_selectors",Rd="allow_url_regexes",Ad="block_attrs",Md="block_element_callback",Td="block_selectors",Pd="block_url_regexes",$d="capture_extra_attrs",Ld="capture_text_content",Nd="scroll_capture_all",Dd="scroll_depth_percent_checkpoints",Co="click",Eo="dead_click",Ka="input",Fd="pageview",Io="rage_click",Ja="scroll",Xo="page_leave",Xa="submit",Be={};Be[xd]=[];Be[Rd]=[];Be[Ad]=[];Be[Md]=null;Be[Td]=[];Be[Pd]=[];Be[$d]=[];Be[Ld]=!1;Be[Nd]=!1;Be[Dd]=[25,50,75,100];Be[Co]=!0;Be[Eo]=!0;Be[Ka]=!0;Be[Fd]=Od;Be[Io]=!0;Be[Ja]=!0;Be[Xo]=!1;Be[Xa]=!0;var zn={$mp_autocapture:!0},Ud="$mp_click",Bd="$mp_dead_click",P0="$mp_input_change",zd="$mp_rage_click",$0="$mp_scroll",L0="$mp_submit",N0="$mp_page_leave",De=function(t){this.mp=t,this.maxScrollViewDepth=0,this.hasTrackedScrollSession=!1,this.previousScrollHeight=0};De.prototype.init=function(){if(!HE()){ge.critical("Autocapture unavailable: missing required DOM APIs");return}this.initPageListeners(),this.initPageviewTracking(),this.initClickTracking(),this.initDeadClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking(),this.initPageLeaveTracking()};De.prototype.getFullConfig=function(){var t=this.mp.get_config(kd);return t?p.isObject(t)?p.extend({},Be,t):Be:{}};De.prototype.getConfig=function(t){return this.getFullConfig()[t]};De.prototype.currentUrlBlocked=function(){var t=p.info.currentUrl(),n=this.getConfig(Rd)||[];if(n.length)try{return!go(t,n)}catch(e){return ge.critical("Error while checking block URL regexes: ",e),!0}var i=this.getConfig(Pd)||[];if(!i||!i.length)return!1;try{return go(t,i)}catch(e){return ge.critical("Error while checking block URL regexes: ",e),!0}};De.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(kd)?this.getConfig(Fd):this.mp.get_config(R0)};De.prototype.trackDomEvent=function(t,n){if(!this.currentUrlBlocked()){var i=this.mp.is_recording_heatmap_data()&&(n===Ud&&!this.getConfig(Co)||n===zd&&!this._getClickTrackingConfig(Io)||n===Bd&&!this._getClickTrackingConfig(Eo)),e=WE(t,{allowElementCallback:this.getConfig(T0),allowSelectors:this.getConfig(xd),blockAttrs:this.getConfig(Ad),blockElementCallback:this.getConfig(Md),blockSelectors:this.getConfig(Td),captureExtraAttrs:this.getConfig($d),captureTextContent:this.getConfig(Ld),capturedForHeatMap:i});e&&(p.extend(e,zn),this.mp.track(n,e))}};De.prototype.initPageListeners=function(){if(E.removeEventListener(vf,this.listenerPopstate),E.removeEventListener(Ga,this.listenerHashchange),!(!this.pageviewTrackingConfig()&&!this.getConfig(Xo)&&!this.mp.get_config("record_heatmap_data"))){this.listenerPopstate=function(){E.dispatchEvent(new Event(Kt))},this.listenerHashchange=function(){E.dispatchEvent(new Event(Kt))},E.addEventListener(vf,this.listenerPopstate),E.addEventListener(Ga,this.listenerHashchange);var t=E.history.pushState;typeof t=="function"&&(E.history.pushState=function(i,e,r){t.call(E.history,i,e,r),E.dispatchEvent(new Event(Kt))});var n=E.history.replaceState;typeof n=="function"&&(E.history.replaceState=function(i,e,r){n.call(E.history,i,e,r),E.dispatchEvent(new Event(Kt))})}};De.prototype._getClickTrackingConfig=function(t){var n=this.getConfig(t);return n?n===!0?{}:typeof n=="object"?n:{}:null};De.prototype._trackPageLeave=function(t,n,i){if(!this.hasTrackedScrollSession&&!(!this.getConfig(Xo)&&!this.mp.is_recording_heatmap_data())){this.hasTrackedScrollSession=!0;var e=Math.max(W.documentElement.clientHeight,E.innerHeight||0),r=Math.round(Math.max(this.maxScrollViewDepth-e,0)/(i-e)*100),o=Math.round(e/i*100);i<=e&&(r=100,o=100);var s=p.extend({$max_scroll_view_depth:this.maxScrollViewDepth,$max_scroll_percentage:r,$fold_line_percentage:o,$scroll_height:i,$event_type:t.type,$current_url:n||p.info.currentUrl(),$viewportHeight:e,$viewportWidth:Math.max(W.documentElement.clientWidth,E.innerWidth||0),$captured_for_heatmap:this.mp.is_recording_heatmap_data()},zn);this.mp.track(N0,s,{transport:"sendBeacon"})}};De.prototype._initScrollDepthTracking=function(){if(E.removeEventListener(Vu,this.listenerScrollDepth),E.removeEventListener(Jo,this.listenerScrollDepth),!!this.mp.get_config("record_heatmap_data")){ge.log("Initializing scroll depth tracking"),this.maxScrollViewDepth=Math.max(W.documentElement.clientHeight,E.innerHeight||0);var t=function(){if(!this.currentUrlBlocked()){var i=Math.max(W.documentElement.clientHeight,E.innerHeight||0)+E.scrollY;i>this.maxScrollViewDepth&&(this.maxScrollViewDepth=i),this.previousScrollHeight=W.body.scrollHeight}}.bind(this),n=md(t);this.listenerScrollDepth=n.listener,E.addEventListener(n.eventType,this.listenerScrollDepth)}};De.prototype.initClickTracking=function(){E.removeEventListener(jt,this.listenerClick),!(!this.getConfig(Co)&&!this.mp.get_config("record_heatmap_data"))&&(ge.log("Initializing click tracking"),this.listenerClick=function(t){!this.getConfig(Co)&&!this.mp.is_recording_heatmap_data()||this.trackDomEvent(t,Ud)}.bind(this),E.addEventListener(jt,this.listenerClick))};De.prototype.initDeadClickTracking=function(){var t=this._getClickTrackingConfig(Eo);if(!t&&!this.mp.get_config("record_heatmap_data")){this.stopDeadClickTracking();return}ge.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new Mt(function(n){this.trackDomEvent(n,Bd)}.bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=function(n){var i=this._getClickTrackingConfig(Eo);if(!(!i&&!this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var e=i||{};e.timeout_ms||(e.timeout_ms=I0),this._deadClickTracker.trackClick(n,e)}}.bind(this),E.addEventListener(jt,this.listenerDeadClick))};De.prototype.initInputTracking=function(){E.removeEventListener(Bn,this.listenerChange),this.getConfig(Ka)&&(ge.log("Initializing input tracking"),this.listenerChange=function(t){this.getConfig(Ka)&&this.trackDomEvent(t,P0)}.bind(this),E.addEventListener(Bn,this.listenerChange))};De.prototype.initPageviewTracking=function(){if(E.removeEventListener(Kt,this.listenerLocationchange),!!this.pageviewTrackingConfig()){ge.log("Initializing pageview tracking");var t="",n=!1;this.currentUrlBlocked()||(n=this.mp.track_pageview(zn)),n&&(t=p.info.currentUrl()),this.listenerLocationchange=Jr(function(){if(!this.currentUrlBlocked()){var i=p.info.currentUrl(),e=!1,r=i.split("#")[0].split("?")[0]!==t.split("#")[0].split("?")[0],o=this.pageviewTrackingConfig();if(o===Od?e=i!==t:o===A0?e=i.split("#")[0]!==t.split("#")[0]:o===M0&&(e=r),e){var s=this.mp.track_pageview(zn);s&&(t=i),r&&(this.lastScrollCheckpoint=0,ge.log("Path change: re-initializing scroll depth checkpoints"))}}}.bind(this)),E.addEventListener(Kt,this.listenerLocationchange)}};De.prototype.initRageClickTracking=function(){E.removeEventListener(jt,this.listenerRageClick);var t=this._getClickTrackingConfig(Io);!t&&!this.mp.get_config("record_heatmap_data")||(ge.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new Id),this.listenerRageClick=function(n){var i=this._getClickTrackingConfig(Io);!i&&!this.mp.is_recording_heatmap_data()||this.currentUrlBlocked()||this._rageClickTracker.isRageClick(n,i)&&this.trackDomEvent(n,zd)}.bind(this),E.addEventListener(jt,this.listenerRageClick))};De.prototype.initScrollTracking=function(){if(E.removeEventListener(Jo,this.listenerScroll),E.removeEventListener(Vu,this.listenerScroll),!!this.getConfig(Ja)){ge.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var t=function(){if(this.getConfig(Ja)&&!this.currentUrlBlocked()){var i=this.getConfig(Nd),e=(this.getConfig(Dd)||[]).slice().sort(function(l,f){return l-f}),r=E.scrollY,o=p.extend({$scroll_top:r},zn);try{var s=W.body.scrollHeight,a=Math.round(r/(s-E.innerHeight)*100);if(o.$scroll_height=s,o.$scroll_percentage=a,a>this.lastScrollCheckpoint)for(var u=0;u<e.length;u++){var c=e[u];a>=c&&this.lastScrollCheckpoint<c&&(o.$scroll_checkpoint=c,this.lastScrollCheckpoint=c,i=!0)}}catch(l){ge.critical("Error while calculating scroll percentage",l)}i&&this.mp.track($0,o)}}.bind(this),n=md(t);this.listenerScroll=n.listener,E.addEventListener(n.eventType,this.listenerScroll)}};De.prototype.initSubmitTracking=function(){E.removeEventListener(yo,this.listenerSubmit),this.getConfig(Xa)&&(ge.log("Initializing submit tracking"),this.listenerSubmit=function(t){this.getConfig(Xa)&&this.trackDomEvent(t,L0)}.bind(this),E.addEventListener(yo,this.listenerSubmit))};De.prototype.initPageLeaveTracking=function(){if(W.removeEventListener(gf,this.listenerPageLeaveVisibilitychange),E.removeEventListener(Kt,this.listenerPageLeaveLocationchange),E.removeEventListener(df,this.listenerPageLoad),!(!this.getConfig(Xo)&&!this.mp.get_config("record_heatmap_data"))){ge.log("Initializing page visibility tracking."),this._initScrollDepthTracking();var t=p.info.currentUrl();this.listenerPageLoad=function(){this.previousScrollHeight=W.body.scrollHeight}.bind(this),E.addEventListener(df,this.listenerPageLoad),this.listenerPageLeaveLocationchange=Jr(function(n){if(!this.currentUrlBlocked()){var i=p.info.currentUrl(),e=i!==t;e&&(this._trackPageLeave(n,t,this.previousScrollHeight),t=i,this.maxScrollViewDepth=Math.max(W.documentElement.clientHeight,E.innerHeight||0),this.previousScrollHeight=W.body.scrollHeight,this.hasTrackedScrollSession=!1)}}.bind(this)),E.addEventListener(Kt,this.listenerPageLeaveLocationchange),this.listenerPageLeaveVisibilitychange=function(n){W.hidden&&this._trackPageLeave(n,t,this.previousScrollHeight)}.bind(this),W.addEventListener(gf,this.listenerPageLeaveVisibilitychange)}};De.prototype.stopDeadClickTracking=function(){this.listenerDeadClick&&(E.removeEventListener(jt,this.listenerDeadClick),this.listenerDeadClick=null),this._deadClickTracker&&(this._deadClickTracker.stopTracking(),this._deadClickTracker=null)};Uu(De);var qd=function(t,n){return E[pt]&&typeof E[pt].then=="function"||(E[pt]=new Promise(function(i){t(n,i)}).then(function(){var i=E[pt];if(i&&typeof i.then=="function")return i;throw new Error("targeting failed to load")}).catch(function(i){throw delete E[pt],i})),E[pt]},Ce=Gt("flags"),ko="flags",Oo="context",Za={};Za[Oo]={};var D0=function(t,n){return t+":"+n},F0=function(t){return t.split(":")[0]},F=function(t){this.fetch=E.fetch,this.getFullApiRoute=t.getFullApiRoute,this.getMpConfig=t.getConfigFunc,this.setMpConfig=t.setConfigFunc,this.getMpProperty=t.getPropertyFunc,this.track=t.trackingFunc,this.loadExtraBundle=t.loadExtraBundle||function(){},this.targetingSrc=t.targetingSrc||""};F.prototype.init=function(){if(!this.minApisSupported()){Ce.critical("Feature Flags unavailable: missing minimum required APIs");return}this.flags=null,this.fetchFlags().catch(function(){Ce.error("Error fetching flags during init")}),this.trackedFeatures=new Set,this.pendingFirstTimeEvents={},this.activatedFirstTimeEvents={}};F.prototype.getFullConfig=function(){var t=this.getMpConfig(ko);return t?p.isObject(t)?p.extend({},Za,t):Za:{}};F.prototype.getConfig=function(t){return this.getFullConfig()[t]};F.prototype.isSystemEnabled=function(){return!!this.getMpConfig(ko)};F.prototype.updateContext=function(t,n){if(!this.isSystemEnabled())return Ce.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var i=this.getMpConfig(ko);p.isObject(i)||(i={});var e=n&&n.replace?{}:this.getConfig(Oo);i[Oo]=p.extend({},e,t);var r={};return r[ko]=i,this.setMpConfig(r),this.fetchFlags().catch(function(){Ce.error("Error fetching flags during updateContext")})};F.prototype.areFlagsReady=function(){return this.isSystemEnabled()||Ce.error("Feature Flags not enabled"),!!this.flags};F.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var t=this.getMpProperty("distinct_id"),n=this.getMpProperty("$device_id"),i=sd();Ce.log("Fetching flags for distinct ID: "+t);var e=p.extend({distinct_id:t,device_id:n},this.getConfig(Oo)),r=new URLSearchParams;r.set("context",JSON.stringify(e)),r.set("token",this.getMpConfig("token")),r.set("mp_lib","web"),r.set("$lib_version",nt.LIB_VERSION);var o=this.getFullApiRoute()+"?"+r.toString();return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=this.fetch.call(E,o,{method:"GET",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:i}}).then(function(s){return this.markFetchComplete(),s.json()}.bind(this)).then(function(s){var a=s.flags;if(!a)throw new Error("No flags in API response");var u=new Map,c={};p.each(a,function(f,h){var g=!1,d=h+":";if(p.each(this.activatedFirstTimeEvents,function(v,y){y.startsWith(d)&&(g=!0)}),g){var m=this.flags&&this.flags.get(h);m&&u.set(h,m)}else u.set(h,{key:f.variant_key,value:f.variant_value,experiment_id:f.experiment_id,is_experiment_active:f.is_experiment_active,is_qa_tester:f.is_qa_tester})},this);var l=s.pending_first_time_events;l&&l.length>0&&p.each(l,function(f){var h=f.flag_key,g=D0(h,f.first_time_event_hash);this.activatedFirstTimeEvents[g]||(c[g]={flag_key:h,flag_id:f.flag_id,project_id:f.project_id,first_time_event_hash:f.first_time_event_hash,event_name:f.event_name,property_filters:f.property_filters,pending_variant:f.pending_variant})},this),this.activatedFirstTimeEvents&&p.each(this.activatedFirstTimeEvents,function(f,h){var g=F0(h);f&&!u.has(g)&&this.flags&&this.flags.has(g)&&u.set(g,this.flags.get(g))},this),this.flags=u,this.pendingFirstTimeEvents=c,this._traceparent=i,this._loadTargetingIfNeeded()}.bind(this)).catch(function(s){throw this._fetchInProgressStartTime&&this.markFetchComplete(),Ce.error(s),s}.bind(this)),this.fetchPromise};F.prototype.loadFlags=function(){return this.isSystemEnabled()?this.trackedFeatures?this._fetchInProgressStartTime?this.fetchPromise:this.fetchFlags():(Ce.error("loadFlags called before init"),Promise.resolve()):Promise.resolve()};F.prototype.markFetchComplete=function(){if(!this._fetchInProgressStartTime){Ce.error("Fetch in progress started time not set, cannot mark fetch complete");return}this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null};F.prototype._loadTargetingIfNeeded=function(){var t=!1;p.each(this.pendingFirstTimeEvents,function(n){n.property_filters&&!p.isEmptyObject(n.property_filters)&&(t=!0)}),t&&this.getTargeting().then(function(){Ce.log("targeting loaded for property filter evaluation")})};F.prototype.getTargeting=function(){return qd(this.loadExtraBundle.bind(this),this.targetingSrc).catch(function(t){Ce.error("Failed to load targeting: "+t)}.bind(this))};F.prototype.checkFirstTimeEvents=function(t,n){!this.pendingFirstTimeEvents||p.isEmptyObject(this.pendingFirstTimeEvents)||(E[pt]&&p.isFunction(E[pt].then)?E[pt].then(function(i){this._processFirstTimeEventCheck(t,n,i)}.bind(this)).catch(function(){this._processFirstTimeEventCheck(t,n,null)}.bind(this)):this._processFirstTimeEventCheck(t,n,null))};F.prototype._processFirstTimeEventCheck=function(t,n,i){p.each(this.pendingFirstTimeEvents,function(e,r){if(!this.activatedFirstTimeEvents[r]){var o=e.flag_key,s;if(!i&&e.property_filters&&!p.isEmptyObject(e.property_filters)){Ce.warn('Skipping event check for "'+o+'" - property filters require targeting library');return}if(!i)s={matches:t===e.event_name,error:null};else{var a={event_name:e.event_name,property_filters:e.property_filters};s=i.eventMatchesCriteria(t,n,a)}if(s.error){Ce.error('Error checking first-time event for flag "'+o+'": '+s.error);return}if(s.matches){Ce.log('First-time event matched for flag "'+o+'": '+t);var u={key:e.pending_variant.variant_key,value:e.pending_variant.variant_value,experiment_id:e.pending_variant.experiment_id,is_experiment_active:e.pending_variant.is_experiment_active};this.flags.set(o,u),this.activatedFirstTimeEvents[r]=!0,this.recordFirstTimeEvent(e.flag_id,e.project_id,e.first_time_event_hash)}}},this)};F.prototype.getFirstTimeEventApiRoute=function(t){return this.getFullApiRoute()+"/"+t+"/first-time-events"};F.prototype.recordFirstTimeEvent=function(t,n,i){var e=this.getMpProperty("distinct_id"),r=sd(),o=new URLSearchParams;o.set("mp_lib","web"),o.set("$lib_version",nt.LIB_VERSION);var s=this.getFirstTimeEventApiRoute(t)+"?"+o.toString(),a={distinct_id:e,project_id:n,first_time_event_hash:i};Ce.log("Recording first-time event for flag: "+t),this.fetch.call(E,s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:r},body:JSON.stringify(a)}).catch(function(u){Ce.error("Failed to record first-time event for flag "+t+": "+u)})};F.prototype.getVariant=function(t,n){return this.fetchPromise?this.fetchPromise.then(function(){return this.getVariantSync(t,n)}.bind(this)).catch(function(i){return Ce.error(i),n}):new Promise(function(i){Ce.critical("Feature Flags not initialized"),i(n)})};F.prototype.getVariantSync=function(t,n){if(!this.areFlagsReady())return Ce.log("Flags not loaded yet"),n;var i=this.flags.get(t);return i?(this.trackFeatureCheck(t,i),i):(Ce.log('No flag found: "'+t+'"'),n)};F.prototype.getVariantValue=function(t,n){return this.getVariant(t,{value:n}).then(function(i){return i.value}).catch(function(i){return Ce.error(i),n})};F.prototype.getFeatureData=function(t,n){return Ce.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(t,n)};F.prototype.getVariantValueSync=function(t,n){return this.getVariantSync(t,{value:n}).value};F.prototype.isEnabled=function(t,n){return this.getVariantValue(t).then(function(){return this.isEnabledSync(t,n)}.bind(this)).catch(function(i){return Ce.error(i),n})};F.prototype.isEnabledSync=function(t,n){n=n||!1;var i=this.getVariantValueSync(t,n);return i!==!0&&i!==!1&&(Ce.error('Feature flag "'+t+'" value: '+i+" is not a boolean; returning fallback value: "+n),i=n),i};F.prototype.trackFeatureCheck=function(t,n){if(!this.trackedFeatures.has(t)){this.trackedFeatures.add(t);var i={"Experiment name":t,"Variant name":n.key,$experiment_type:"feature_flag","Variant fetch start time":new Date(this._fetchStartTime).toISOString(),"Variant fetch complete time":new Date(this._fetchCompleteTime).toISOString(),"Variant fetch latency (ms)":this._fetchLatency,"Variant fetch traceparent":this._traceparent};n.experiment_id!=="undefined"&&(i.$experiment_id=n.experiment_id),n.is_experiment_active!=="undefined"&&(i.$is_experiment_active=n.is_experiment_active),n.is_qa_tester!=="undefined"&&(i.$is_qa_tester=n.is_qa_tester),this.track("$experiment_started",i)}};F.prototype.whenReady=function(){return this.fetchPromise?this.fetchPromise:Promise.resolve()};F.prototype.minApisSupported=function(){return!!this.fetch&&typeof Promise<"u"&&typeof Map<"u"&&typeof Set<"u"};Uu(F);F.prototype.are_flags_ready=F.prototype.areFlagsReady;F.prototype.get_variant=F.prototype.getVariant;F.prototype.get_variant_sync=F.prototype.getVariantSync;F.prototype.get_variant_value=F.prototype.getVariantValue;F.prototype.get_variant_value_sync=F.prototype.getVariantValueSync;F.prototype.is_enabled=F.prototype.isEnabled;F.prototype.is_enabled_sync=F.prototype.isEnabledSync;F.prototype.load_flags=F.prototype.loadFlags;F.prototype.update_context=F.prototype.updateContext;F.prototype.when_ready=F.prototype.whenReady;F.prototype.get_feature_data=F.prototype.getFeatureData;F.prototype.getTargeting=F.prototype.getTargeting;var U0=Gt("recorder"),jd="mp_iframe_handshake_request",Gd="mp_iframe_handshake_response",qe=function(t){this.mixpanelInstance=t.mixpanelInstance,this.getMpConfig=t.getConfigFunc,this.getTabId=t.getTabIdFunc,this.reportError=t.reportErrorFunc,this.getDistinctId=t.getDistinctIdFunc,this.loadExtraBundle=t.loadExtraBundle,this.recorderSrc=t.recorderSrc,this.targetingSrc=t.targetingSrc,this.libBasePath=t.libBasePath,this._recorder=null,this._parentReplayId=null,this._parentFrameRetryInterval=null};qe.prototype.shouldLoadRecorder=function(){if(this.getMpConfig("disable_persistence"))return V.log("Load recorder check skipped due to disable_persistence config"),H.resolve(!1);var t=new vt(zu),n=this.getTabId();return t.init().then(function(){return t.getAll()}).then(function(i){for(var e=0;e<i.length;e++)if(Wu(i[e])||i[e].tabId===n)return!0;return!1}).catch(p.bind(function(i){return this.reportError("Error checking recording registry",i),!1},this))};qe.prototype.checkAndStartSessionRecording=function(t,n){if(!E.MutationObserver)return V.critical("Browser does not support MutationObserver; skipping session recording"),H.resolve();var i=p.bind(function(a){return new H(p.bind(function(u){var c=Jr(p.bind(function(){this._recorder=this._recorder||new E[qs](this.mixpanelInstance),this._recorder.resumeRecording(a),u()},this));if(p.isUndefined(E[qs])){var l=this.recorderSrc||this.libBasePath+Cg;this.loadExtraBundle(l,c)}else c()},this))},this),e=hd(this.getMpConfig("record_allowed_iframe_origins"),U0),r=e.length>0;if(r&&(this._setupParentFrameListener(e),E.parent!==E))return this._setupChildFrameListener(e,i),this._sendParentFrameRequestWithRetry(e),H.resolve();var o=p.isUndefined(n)?this.getMpConfig("record_sessions_percent"):n,s=o>0&&Math.random()*100<=o;return t||s?i(!0):this.shouldLoadRecorder().then(p.bind(function(a){return a?i(!1):H.resolve()},this))};qe.prototype.isRecording=function(){if(!this._recorder||!p.isFunction(this._recorder.isRecording))return!1;try{return this._recorder.isRecording()}catch(t){return this.reportError("Error checking if recording is active",t),!1}};qe.prototype.startRecordingOnEvent=function(t,n){var i=this.isRecording(),e=this.getMpConfig("recording_event_triggers");if(!i&&e){var r=e[t];if(r&&typeof r.percentage=="number"){var o=r.percentage,s=r.property_filters;if(s&&!p.isEmptyObject(s)){var a=this.targetingSrc||this.libBasePath+kf;qd(this.loadExtraBundle,a).then(function(u){try{var c=u.eventMatchesCriteria(t,n,{event_name:t,property_filters:s});c.matches&&this.checkAndStartSessionRecording(!1,o)}catch(l){V.critical("Could not parse recording event trigger properties logic:",l)}}.bind(this)).catch(function(u){V.critical("Failed to load targeting library:",u)})}else this.checkAndStartSessionRecording(!1,o)}}};qe.prototype.stopSessionRecording=function(){return this._recorder?this._recorder.stopRecording():H.resolve()};qe.prototype.pauseSessionRecording=function(){return this._recorder?this._recorder.pauseRecording():H.resolve()};qe.prototype.resumeSessionRecording=function(){return this._recorder?this._recorder.resumeRecording():H.resolve()};qe.prototype.isRecordingHeatmapData=function(){return this.getSessionReplayId()&&this.getMpConfig("record_heatmap_data")};qe.prototype.getSessionRecordingProperties=function(){var t={},n=this.getSessionReplayId();return n&&(t.$mp_replay_id=n),t};qe.prototype.getSessionReplayUrl=function(){var t=null,n=this.getSessionReplayId();if(n){var i=p.HTTPBuildQuery({replay_id:n,distinct_id:this.getDistinctId(),token:this.getMpConfig("token")});t="https://mixpanel.com/projects/replay-redirect?"+i}return t};qe.prototype.getSessionReplayId=function(){if(this._parentReplayId)return this._parentReplayId;var t=null;return this._recorder&&(t=this._recorder.replayId),t||null};qe.prototype.getRecorder=function(){return this._recorder};qe.prototype._setupChildFrameListener=function(t,n){if(!this._childFrameMessageHandler){var i=this;this._childFrameMessageHandler=function(e){if(t.indexOf(e.origin)!==-1){var r=e.data;r&&r.type===Gd&&r.token===i.getMpConfig("token")&&r.replayId&&(i._parentReplayId=r.replayId,r.distinctId&&i.mixpanelInstance.identify(r.distinctId),i._parentFrameRetryActive=!1,E.removeEventListener("message",i._childFrameMessageHandler),i._childFrameMessageHandler=null,n(!0))}},E.addEventListener("message",this._childFrameMessageHandler)}};qe.prototype._sendParentFrameRequest=function(t){var n={};n.type=jd,n.token=this.getMpConfig("token");for(var i=0;i<t.length;i++)try{E.parent.postMessage(n,t[i])}catch{}};qe.prototype._sendParentFrameRequestWithRetry=function(t){var n=this,i=10,e=0,r=50;this._parentFrameRetryActive=!0,this._sendParentFrameRequest(t);function o(){setTimeout(function(){!n._parentFrameRetryActive||n._parentReplayId||++e>=i||(n._sendParentFrameRequest(t),r*=2,o())},r)}o()};qe.prototype._setupParentFrameListener=function(t){if(!this._parentFrameMessageHandler){var n=this;this._parentFrameMessageHandler=function(i){if(t.indexOf(i.origin)!==-1){var e=i.data;if(e&&e.type===jd&&e.token===n.getMpConfig("token")){var r=n.getSessionReplayId();if(r){var o={};o.type=Gd,o.token=n.getMpConfig("token"),o.replayId=r,o.distinctId=n.getDistinctId(),i.source.postMessage(o,i.origin)}}}},E.addEventListener("message",this._parentFrameMessageHandler)}};Uu(qe);var Vt=function(){};Vt.prototype.create_properties=function(){};Vt.prototype.event_handler=function(){};Vt.prototype.after_track_handler=function(){};Vt.prototype.init=function(t){return this.mp=t,this};Vt.prototype.track=function(t,n,i,e){var r=this,o=p.dom_query(t);if(o.length===0){V.error("The DOM query ("+t+") returned 0 elements");return}return p.each(o,function(s){p.register_event(s,this.override_event,function(a){var u={},c=r.create_properties(i,this),l=r.mp.get_config("track_links_timeout");r.event_handler(a,this,u),window.setTimeout(r.track_callback(e,c,u,!0),l),r.mp.track(n,c,r.track_callback(e,c,u))})},this),!0};Vt.prototype.track_callback=function(t,n,i,e){e=e||!1;var r=this;return function(){i.callback_fired||(i.callback_fired=!0,!(t&&t(e,n)===!1)&&r.after_track_handler(n,i,e))}};Vt.prototype.create_properties=function(t,n){var i;return typeof t=="function"?i=t(n):i=p.extend({},t),i};var Zr=function(){this.override_event="click"};p.inherit(Zr,Vt);Zr.prototype.create_properties=function(t,n){var i=Zr.superclass.create_properties.apply(this,arguments);return n.href&&(i.url=n.href),i};Zr.prototype.event_handler=function(t,n,i){i.new_tab=t.which===2||t.metaKey||t.ctrlKey||n.target==="_blank",i.href=n.href,i.new_tab||t.preventDefault()};Zr.prototype.after_track_handler=function(t,n){n.new_tab||setTimeout(function(){window.location=n.href},0)};var Zo=function(){this.override_event="submit"};p.inherit(Zo,Vt);Zo.prototype.event_handler=function(t,n,i){i.element=n,t.preventDefault()};Zo.prototype.after_track_handler=function(t,n){setTimeout(function(){n.element.submit()},0)};var Zt="$set",Qr="$set_once",dt="$unset",wr="$add",xt="$append",br="$union",Ut="$remove",B0="$delete",Wd={set_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=r)},this):e[t]=n,i[Zt]=e,i},unset_action:function(t){var n={},i=[];return p.isArray(t)||(t=[t]),p.each(t,function(e){this._is_reserved_property(e)||i.push(e)},this),n[dt]=i,n},set_once_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=r)},this):e[t]=n,i[Qr]=e,i},union_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=p.isArray(r)?r:[r])},this):e[t]=p.isArray(n)?n:[n],i[br]=e,i},append_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=r)},this):e[t]=n,i[xt]=e,i},remove_action:function(t,n){var i={},e={};return p.isObject(t)?p.each(t,function(r,o){this._is_reserved_property(o)||(e[o]=r)},this):e[t]=n,i[Ut]=e,i},delete_action:function(){var t={};return t[B0]="",t}},we=function(){};p.extend(we.prototype,Wd);we.prototype._init=function(t,n,i){this._mixpanel=t,this._group_key=n,this._group_id=i};we.prototype.set=en(function(t,n,i){var e=this.set_action(t,n);return p.isObject(t)&&(i=n),this._send_request(e,i)});we.prototype.set_once=en(function(t,n,i){var e=this.set_once_action(t,n);return p.isObject(t)&&(i=n),this._send_request(e,i)});we.prototype.unset=en(function(t,n){var i=this.unset_action(t);return this._send_request(i,n)});we.prototype.union=en(function(t,n,i){p.isObject(t)&&(i=n);var e=this.union_action(t,n);return this._send_request(e,i)});we.prototype.delete=en(function(t){var n=this.delete_action();return this._send_request(n,t)});we.prototype.remove=en(function(t,n,i){var e=this.remove_action(t,n);return this._send_request(e,i)});we.prototype._send_request=function(t,n){t.$group_key=this._group_key,t.$group_id=this._group_id,t.$token=this._get_config("token");var i=p.encodeDates(t);return this._mixpanel._track_or_batch({type:"groups",data:i,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},n)};we.prototype._is_reserved_property=function(t){return t==="$group_key"||t==="$group_id"};we.prototype._get_config=function(t){return this._mixpanel.get_config(t)};we.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};we.prototype.remove=we.prototype.remove;we.prototype.set=we.prototype.set;we.prototype.set_once=we.prototype.set_once;we.prototype.union=we.prototype.union;we.prototype.unset=we.prototype.unset;we.prototype.toString=we.prototype.toString;var Y=function(){};p.extend(Y.prototype,Wd);Y.prototype._init=function(t){this._mixpanel=t};Y.prototype.set=ur(function(t,n,i){var e=this.set_action(t,n);return p.isObject(t)&&(i=n),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),e[Zt]=p.extend({},p.info.people_properties(),e[Zt]),this._send_request(e,i)});Y.prototype.set_once=ur(function(t,n,i){var e=this.set_once_action(t,n);return p.isObject(t)&&(i=n),this._send_request(e,i)});Y.prototype.unset=ur(function(t,n){var i=this.unset_action(t);return this._send_request(i,n)});Y.prototype.increment=ur(function(t,n,i){var e={},r={};return p.isObject(t)?(p.each(t,function(o,s){if(!this._is_reserved_property(s))if(isNaN(parseFloat(o))){V.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else r[s]=o},this),i=n):(p.isUndefined(n)&&(n=1),r[t]=n),e[wr]=r,this._send_request(e,i)});Y.prototype.append=ur(function(t,n,i){p.isObject(t)&&(i=n);var e=this.append_action(t,n);return this._send_request(e,i)});Y.prototype.remove=ur(function(t,n,i){p.isObject(t)&&(i=n);var e=this.remove_action(t,n);return this._send_request(e,i)});Y.prototype.union=ur(function(t,n,i){p.isObject(t)&&(i=n);var e=this.union_action(t,n);return this._send_request(e,i)});Y.prototype.track_charge=ur(function(){V.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")});Y.prototype.clear_charges=function(t){return this.set("$transactions",[],t)};Y.prototype.delete_user=function(){if(!this._identify_called()){V.error("mixpanel.people.delete_user() requires you to call identify() first");return}var t={$delete:this._mixpanel.get_distinct_id()};return this._send_request(t)};Y.prototype.toString=function(){return this._mixpanel.toString()+".people"};Y.prototype._send_request=function(t,n){t.$token=this._get_config("token"),t.$distinct_id=this._mixpanel.get_distinct_id();var i=this._mixpanel.get_property("$device_id"),e=this._mixpanel.get_property("$user_id"),r=this._mixpanel.get_property("$had_persisted_distinct_id");i&&(t.$device_id=i),e&&(t.$user_id=e),r&&(t.$had_persisted_distinct_id=r);var o=p.encodeDates(t);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},n):(this._enqueue(t),p.isUndefined(n)||(this._get_config("verbose")?n({status:-1,error:null}):n(-1)),p.truncate(o,255))};Y.prototype._get_config=function(t){return this._mixpanel.get_config(t)};Y.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};Y.prototype._enqueue=function(t){Zt in t?this._mixpanel.persistence._add_to_people_queue(Zt,t):Qr in t?this._mixpanel.persistence._add_to_people_queue(Qr,t):dt in t?this._mixpanel.persistence._add_to_people_queue(dt,t):wr in t?this._mixpanel.persistence._add_to_people_queue(wr,t):xt in t?this._mixpanel.persistence._add_to_people_queue(xt,t):Ut in t?this._mixpanel.persistence._add_to_people_queue(Ut,t):br in t?this._mixpanel.persistence._add_to_people_queue(br,t):V.error("Invalid call to _enqueue():",t)};Y.prototype._flush_one_queue=function(t,n,i,e){var r=this,o=p.extend({},this._mixpanel.persistence.load_queue(t)),s=o;!p.isUndefined(o)&&p.isObject(o)&&!p.isEmptyObject(o)&&(r._mixpanel.persistence._pop_from_people_queue(t,o),r._mixpanel.persistence.save(),e&&(s=e(o)),n.call(r,s,function(a,u){a===0&&r._mixpanel.persistence._add_to_people_queue(t,o),p.isUndefined(i)||i(a,u)}))};Y.prototype._flush=function(t,n,i,e,r,o,s){var a=this;this._flush_one_queue(Zt,this.set,t),this._flush_one_queue(Qr,this.set_once,e),this._flush_one_queue(dt,this.unset,o,function(v){return p.keys(v)}),this._flush_one_queue(wr,this.increment,n),this._flush_one_queue(br,this.union,r);var u=this._mixpanel.persistence.load_queue(xt);if(!p.isUndefined(u)&&p.isArray(u)&&u.length)for(var c,l=function(v,y){v===0&&a._mixpanel.persistence._add_to_people_queue(xt,c),p.isUndefined(i)||i(v,y)},f=u.length-1;f>=0;f--)u=this._mixpanel.persistence.load_queue(xt),c=u.pop(),a._mixpanel.persistence.save(),p.isEmptyObject(c)||a.append(c,l);var h=this._mixpanel.persistence.load_queue(Ut);if(!p.isUndefined(h)&&p.isArray(h)&&h.length)for(var g,d=function(v,y){v===0&&a._mixpanel.persistence._add_to_people_queue(Ut,g),p.isUndefined(s)||s(v,y)},m=h.length-1;m>=0;m--)h=this._mixpanel.persistence.load_queue(Ut),g=h.pop(),a._mixpanel.persistence.save(),p.isEmptyObject(g)||a.remove(g,d)};Y.prototype._is_reserved_property=function(t){return t==="$distinct_id"||t==="$token"||t==="$device_id"||t==="$user_id"||t==="$had_persisted_distinct_id"};Y.prototype.set=Y.prototype.set;Y.prototype.set_once=Y.prototype.set_once;Y.prototype.unset=Y.prototype.unset;Y.prototype.increment=Y.prototype.increment;Y.prototype.append=Y.prototype.append;Y.prototype.remove=Y.prototype.remove;Y.prototype.union=Y.prototype.union;Y.prototype.track_charge=Y.prototype.track_charge;Y.prototype.clear_charges=Y.prototype.clear_charges;Y.prototype.delete_user=Y.prototype.delete_user;Y.prototype.toString=Y.prototype.toString;var Ku="__mps",Ju="__mpso",Xu="__mpus",Zu="__mpa",Qu="__mpap",ec="__mpr",tc="__mpu",Vd="$people_distinct_id",xo="__alias",qn="__timers",z0=[Ku,Ju,Xu,Zu,Qu,ec,tc,Vd,xo,qn],X=function(t){this.props={},this.campaign_params_saved=!1,t.persistence_name?this.name="mp_"+t.persistence_name:this.name="mp_"+t.token+"_mixpanel";var n=t.persistence;n!=="cookie"&&n!=="localStorage"&&(V.critical("Unknown persistence type "+n+"; falling back to cookie"),n=t.persistence="cookie"),n==="localStorage"&&p.localStorage.is_supported()?this.storage=p.localStorage:this.storage=p.cookie,this.load(),this.update_config(t),this.upgrade(),this.save()};X.prototype.properties=function(){var t={};return this.load(),p.each(this.props,function(n,i){p.include(z0,i)||(t[i]=n)}),t};X.prototype.load=function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=p.extend({},t))}};X.prototype.upgrade=function(){var t,n;this.storage===p.localStorage?(t=p.cookie.parse(this.name),p.cookie.remove(this.name),p.cookie.remove(this.name,!0),t&&this.register_once(t)):this.storage===p.cookie&&(n=p.localStorage.parse(this.name),p.localStorage.remove(this.name),n&&this.register_once(n))};X.prototype.save=function(){this.disabled||this.storage.set(this.name,Xr(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};X.prototype.load_prop=function(t){return this.load(),this.props[t]};X.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};X.prototype.clear=function(){this.remove(),this.props={}};X.prototype.register_once=function(t,n,i){return p.isObject(t)?(typeof n>"u"&&(n="None"),this.expire_days=typeof i>"u"?this.default_expiry:i,this.load(),p.each(t,function(e,r){(!this.props.hasOwnProperty(r)||this.props[r]===n)&&(this.props[r]=e)},this),this.save(),!0):!1};X.prototype.register=function(t,n){return p.isObject(t)?(this.expire_days=typeof n>"u"?this.default_expiry:n,this.load(),p.extend(this.props,t),this.save(),!0):!1};X.prototype.unregister=function(t){this.load(),t in this.props&&(delete this.props[t],this.save())};X.prototype.update_search_keyword=function(t){this.register(p.info.searchInfo(t))};X.prototype.update_referrer_info=function(t){this.register_once({$initial_referrer:t||"$direct",$initial_referring_domain:p.info.referringDomain(t)||"$direct"},"")};X.prototype.get_referrer_info=function(){return p.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};X.prototype.update_config=function(t){this.default_expiry=this.expire_days=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cookie_domain(t.cookie_domain),this.set_cross_site(t.cross_site_cookie),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie)};X.prototype.set_disabled=function(t){this.disabled=t,this.disabled?this.remove():this.save()};X.prototype.set_cookie_domain=function(t){t!==this.cookie_domain&&(this.remove(),this.cookie_domain=t,this.save())};X.prototype.set_cross_site=function(t){t!==this.cross_site&&(this.cross_site=t,this.remove(),this.save())};X.prototype.set_cross_subdomain=function(t){t!==this.cross_subdomain&&(this.cross_subdomain=t,this.remove(),this.save())};X.prototype.get_cross_subdomain=function(){return this.cross_subdomain};X.prototype.set_secure=function(t){t!==this.secure&&(this.secure=!!t,this.remove(),this.save())};X.prototype._add_to_people_queue=function(t,n){var i=this._get_queue_key(t),e=n[t],r=this._get_or_create_queue(Zt),o=this._get_or_create_queue(Qr),s=this._get_or_create_queue(dt),a=this._get_or_create_queue(wr),u=this._get_or_create_queue(br),c=this._get_or_create_queue(Ut,[]),l=this._get_or_create_queue(xt,[]);i===Ku?(p.extend(r,e),this._pop_from_people_queue(wr,e),this._pop_from_people_queue(br,e),this._pop_from_people_queue(dt,e)):i===Ju?(p.each(e,function(f,h){h in o||(o[h]=f)}),this._pop_from_people_queue(dt,e)):i===Xu?p.each(e,function(f){p.each([r,o,a,u],function(h){f in h&&delete h[f]}),p.each(l,function(h){f in h&&delete h[f]}),s[f]=!0}):i===Zu?(p.each(e,function(f,h){h in r?r[h]+=f:(h in a||(a[h]=0),a[h]+=f)},this),this._pop_from_people_queue(dt,e)):i===tc?(p.each(e,function(f,h){p.isArray(f)&&(h in u||(u[h]=[]),p.each(f,function(g){p.include(u[h],g)||u[h].push(g)}))}),this._pop_from_people_queue(dt,e)):i===ec?(c.push(e),this._pop_from_people_queue(xt,e)):i===Qu&&(l.push(e),this._pop_from_people_queue(dt,e)),V.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),V.log(n),this.save()};X.prototype._pop_from_people_queue=function(t,n){var i=this.props[this._get_queue_key(t)];p.isUndefined(i)||p.each(n,function(e,r){t===xt||t===Ut?p.each(i,function(o){o[r]===e&&delete o[r]}):delete i[r]},this)};X.prototype.load_queue=function(t){return this.load_prop(this._get_queue_key(t))};X.prototype._get_queue_key=function(t){if(t===Zt)return Ku;if(t===Qr)return Ju;if(t===dt)return Xu;if(t===wr)return Zu;if(t===xt)return Qu;if(t===Ut)return ec;if(t===br)return tc;V.error("Invalid queue:",t)};X.prototype._get_or_create_queue=function(t,n){var i=this._get_queue_key(t);return n=p.isUndefined(n)?{}:n,this.props[i]||(this.props[i]=n)};X.prototype.set_event_timer=function(t,n){var i=this.load_prop(qn)||{};i[t]=n,this.props[qn]=i,this.save()};X.prototype.remove_event_timer=function(t){var n=this.load_prop(qn)||{},i=n[t];return p.isUndefined(i)||(delete this.props[qn][t],this.save()),i};var Ro,Qa=function(t,n){throw new Error(t+" not available in this build.")},Ve,eu=0,q0=1,ut="mixpanel",Hd="base64",j0="json",rc="$device:",G0="strict",W0="fallback",V0="disabled",Ur=E.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Yd=!Ur&&It.indexOf("MSIE")===-1&&It.indexOf("Mozilla")===-1,Ao=null;Ft.sendBeacon&&(Ao=function(){return Ft.sendBeacon.apply(Ft,arguments)});var Kd={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/",settings:"settings/"},tu={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:Kd,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:Hd,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Jt,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Jt,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_allowed_iframe_origins:[],record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,recording_event_triggers:{},record_idle_timeout_ms:1800*1e3,record_mask_inputs:!0,record_max_ms:wn,record_min_ms:0,record_network:!1,record_network_options:{},record_sessions_percent:0,recorder_src:null,targeting_src:null,lib_base_path:"https://cdn.mxpnl.com/libs/",remote_settings_mode:V0},Jd=!1,S=function(){},ru=function(t,n,i){var e,r=i===ut?Ve:Ve[i];if(r&&Ro===eu)e=r;else{if(r&&!p.isArray(r)){V.error("You have already initialized "+i);return}e=new S}if(e._cached_groups={},e._init(t,n,i),e.people=new Y,e.people._init(e),!e.get_config("skip_first_touch_marketing")){var o=p.info.campaignParams(null),s={},a=!1;p.each(o,function(c,l){s["initial_"+l]=c,c&&(a=!0)}),a&&e.people.set_once(s)}nt.DEBUG=nt.DEBUG||e.get_config("debug");var u=Ro===eu?"module":"snippet";return E.dispatchEvent(new E.CustomEvent("$mp_sdk_to_extension_event",{detail:{instance:e,source:u,token:t,name:i,info:p.info}})),!p.isUndefined(r)&&p.isArray(r)&&(e._execute_array.call(e.people,r.people),e._execute_array(r)),e};S.prototype.init=function(t,n,i){if(p.isUndefined(i)){this.report_error("You must name your new library: init(token, config, name)");return}if(i===ut){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var e=ru(t,n,i);return Ve[i]=e,e._loaded(),e};S.prototype._init=function(t,n,i){n=n||{},this.__loaded=!0,this.config={};var e={};if(!("api_payload_format"in n)){var r=n.api_host||tu.api_host;r.match(/\.mixpanel\.com/)&&(e.api_payload_format=j0)}if(this.hooks={},this.set_config(p.extend({},tu,e,n,{name:i,token:t,callback_fn:(i===ut?i:ut+"."+i)+"._jsc"})),this.recorderManager=new qe({mixpanelInstance:this,getConfigFunc:p.bind(this.get_config,this),setConfigFunc:p.bind(this.set_config,this),getTabIdFunc:p.bind(this.get_tab_id,this),reportErrorFunc:p.bind(this.report_error,this),getDistinctIdFunc:p.bind(this.get_distinct_id,this),recorderSrc:this.get_config("recorder_src"),targetingSrc:this.get_config("targeting_src"),libBasePath:this.get_config("lib_base_path"),loadExtraBundle:Qa}),this._jsc=Jt,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!p.localStorage.is_supported(!0)||!Ur)this._batch_requests=!1,V.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),p.each(this.get_batcher_configs(),function(u){V.log("Clearing batch queue "+u.queue_key),p.localStorage.remove(u.queue_key)});else if(this.init_batchers(),Ao&&E.addEventListener){var o=p.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);E.addEventListener("pagehide",function(u){u.persisted&&o()}),E.addEventListener("visibilitychange",function(){W.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new X(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=p.UUID();this.get_distinct_id()||this.register_once({distinct_id:rc+s,$device_id:s},""),this.flags=new F({getFullApiRoute:p.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:p.bind(this.get_config,this),setConfigFunc:p.bind(this.set_config,this),getPropertyFunc:p.bind(this.get_property,this),trackingFunc:p.bind(this.track,this),loadExtraBundle:Qa,targetingSrc:this.get_config("targeting_src")||this.get_config("lib_base_path")+kf}),this.flags.init(),this.flags=this.flags,this.autocapture=new De(this),this.autocapture.init(),this._init_tab_id();var a=this.get_config("remote_settings_mode");a===G0||a===W0?this.__session_recording_init_promise=this._fetch_remote_settings(a).then(p.bind(function(){return this._check_and_start_session_recording()},this)):this.__session_recording_init_promise=this._check_and_start_session_recording()};S.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))V.log("Tab ID initialization skipped due to disable_persistence config");else if(p.sessionStorage.is_supported())try{var t=this.get_config("name")+"_"+this.get_config("token"),n="mp_tab_id_"+t,i="mp_gen_new_tab_id_"+t;(p.sessionStorage.get(i)||!p.sessionStorage.get(n))&&p.sessionStorage.set(n,"$tab-"+p.UUID()),p.sessionStorage.set(i,"1"),this.tab_id=p.sessionStorage.get(n),E.addEventListener("beforeunload",function(){p.sessionStorage.remove(i)})}catch(e){this.report_error("Error initializing tab id",e)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")};S.prototype.get_tab_id=function(){return this.tab_id||null};S.prototype._check_and_start_session_recording=ar(function(t){return this.recorderManager.checkAndStartSessionRecording(t)});S.prototype._start_recording_on_event=function(t,n){return this.recorderManager.startRecordingOnEvent(t,n)};S.prototype.start_session_recording=function(){return this._check_and_start_session_recording(!0)};S.prototype.stop_session_recording=function(){return this.recorderManager.stopSessionRecording()};S.prototype.pause_session_recording=function(){return this.recorderManager.pauseSessionRecording()};S.prototype.resume_session_recording=function(){return this.recorderManager.resumeSessionRecording()};S.prototype.is_recording_heatmap_data=function(){return this.recorderManager.isRecordingHeatmapData()};S.prototype.get_session_recording_properties=function(){return this.recorderManager.getSessionRecordingProperties()};S.prototype.get_session_replay_url=function(){return this.recorderManager.getSessionReplayUrl()};S.prototype.__get_recorder=function(){return this.recorderManager.getRecorder()};S.prototype.__get_recording_init_promise=function(){return this.__session_recording_init_promise};S.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var t=p.info.campaignParams(null);p.each(t,function(n,i){this.unregister(i)}.bind(this))}};S.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(W.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(p.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(W.referrer)};S.prototype._dom_loaded=function(){p.each(this.__dom_loaded_queue,function(t){this._track_dom.apply(this,t)},this),this.has_opted_out_tracking()||p.each(this.__request_queue,function(t){this._send_request.apply(this,t)},this),delete this.__dom_loaded_queue,delete this.__request_queue};S.prototype._track_dom=function(t,n){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Jd)return this.__dom_loaded_queue.push([t,n]),!1;var i=new t().init(this);return i.track.apply(i,n)};S.prototype._prepare_callback=function(t,n){if(p.isUndefined(t))return null;if(Ur){var i=function(s){t(s,n)};return i}else{var e=this._jsc,r=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+r+"]";return e[r]=function(s){delete e[r],t(s,n)},o}};S.prototype._send_request=function(t,n,i,e){var r=!0;if(Yd)return this.__request_queue.push(arguments),r;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!e&&(p.isFunction(i)||typeof i=="string")&&(e=i,i=null),i=p.extend(o,i||{}),Ur||(i.method="GET");var a=i.method==="POST",u=Ao&&a&&i.transport.toLowerCase()==="sendbeacon",c=i.verbose;n.verbose&&(c=!0),this.get_config("test")&&(n.test=1),c&&(n.verbose=1),this.get_config("img")&&(n.img=1),Ur||(e?n.callback=e:(c||this.get_config("test"))&&(n.callback="(function(){})")),n.ip=this.get_config("ip")?1:0,n._=new Date().getTime().toString(),a&&(s="data="+encodeURIComponent(n.data),delete n.data),p.extend(n,this.get_config("api_extra_query_params")),t+="?"+p.HTTPBuildQuery(n);var l=this;if("img"in n){var f=W.createElement("img");f.src=t,W.body.appendChild(f)}else if(u){try{r=Ao(t,s)}catch(y){l.report_error(y),r=!1}try{e&&e(r?1:0)}catch(y){l.report_error(y)}}else if(Ur)try{var h=new XMLHttpRequest;h.open(i.method,t,!0);var g=this.get_config("xhr_headers");if(a&&(g["Content-Type"]="application/x-www-form-urlencoded"),p.each(g,function(y,_){h.setRequestHeader(_,y)}),i.timeout_ms&&typeof h.timeout<"u"){h.timeout=i.timeout_ms;var d=new Date().getTime()}h.withCredentials=!0,h.onreadystatechange=function(){if(h.readyState===4)if(h.status===200){if(e)if(c){var y;try{y=p.JSONDecode(h.responseText)}catch(b){if(l.report_error(b),i.ignore_json_errors)y=h.responseText;else return}e(y)}else e(Number(h.responseText))}else{var _;if(h.timeout&&!h.status&&new Date().getTime()-d>=h.timeout?_="timeout":_="Bad HTTP status: "+h.status+" "+h.statusText,l.report_error(_),e)if(c){var w=h.responseHeaders||{};e({status:0,httpStatusCode:h.status,error:_,retryAfter:w["Retry-After"]})}else e(0)}},h.send(s)}catch(y){l.report_error(y),r=!1}else{var m=W.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=t;var v=W.getElementsByTagName("script")[0];v.parentNode.insertBefore(m,v)}return r};S.prototype._fetch_remote_settings=function(t){var n=this,i=function(){t==="strict"&&n.set_config({record_sessions_percent:0})};if(!E.AbortController)return V.critical("Remote settings unavailable: missing minimum required APIs"),i(),Promise.resolve();var e=this.get_api_host("settings")+"/"+this.get_config("api_routes").settings,r={$lib_version:nt.LIB_VERSION,mp_lib:"web",sdk_config:"1"},o=p.HTTPBuildQuery(r),s=e+"?"+o,a=new AbortController,u=setTimeout(function(){a.abort()},500),c={method:"GET",headers:{Authorization:"Basic "+btoa(n.get_config("token")+":")},signal:a.signal};return E.fetch(s,c).then(function(l){if(clearTimeout(u),!l.ok){V.critical("Network response was not ok"),i();return}return l.json()}).then(function(l){if(l&&l.sdk_config&&l.sdk_config.config){var f=l.sdk_config.config,h={};p.each(f,function(g,d){tu.hasOwnProperty(d)&&(h[d]=g)}),p.isEmptyObject(h)?(V.critical("No valid config keys found in remote settings."),i()):n.set_config(h)}else i()}).catch(function(l){clearTimeout(u),V.critical("Failed to fetch remote settings",l),i()})};S.prototype._execute_array=function(t){var n,i=[],e=[],r=[];p.each(t,function(s){s&&(n=s[0],p.isArray(n)?r.push(s):typeof s=="function"?s.call(this):p.isArray(s)&&n==="alias"?i.push(s):p.isArray(s)&&n.indexOf("track")!==-1&&typeof this[n]=="function"?r.push(s):e.push(s))},this);var o=function(s,a){p.each(s,function(u){if(p.isArray(u[0])){var c=a;p.each(u,function(l){c=c[l[0]].apply(c,l.slice(1))})}else this[u[0]].apply(this,u.slice(1))},a)};o(i,this),o(e,this),o(r,this)};S.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};S.prototype.get_batcher_configs=function(){var t="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:t+"_ev"},people:{type:"people",api_name:"engage",queue_key:t+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:t+"_gr"}},this._batcher_configs};S.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var t=p.bind(function(i){return new ct(i.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:p.bind(function(e,r,o){var s=this.get_config("api_routes");this._send_request(this.get_api_host(i.api_name)+"/"+s[i.api_name],this._encode_data_for_request(e),r,this._prepare_callback(o,e))},this),beforeSendHook:p.bind(function(e){var r=this._run_hook("before_send_"+i.type,e);return r?r[0]:null},this),stopAllBatchingFunc:p.bind(this.stop_batch_senders,this),usePersistence:!0})},this),n=this.get_batcher_configs();this.request_batchers={events:t(n.events),people:t(n.people),groups:t(n.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()};S.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,p.each(this.request_batchers,function(t){t.start()}))};S.prototype.stop_batch_senders=function(){this._batch_requests=!1,p.each(this.request_batchers,function(t){t.stop(),t.clear()})};S.prototype.push=function(t){this._execute_array([t])};S.prototype.enable=function(t){var n,i,e,r;if(typeof t>"u")this._flags.disable_all_events=!1;else{for(n={},i=[],e=0;e<t.length;e++)n[t[e]]=!0;for(r=0;r<this.__disabled_events.length;r++)n[this.__disabled_events[r]]||i.push(this.__disabled_events[r]);this.__disabled_events=i}};S.prototype.disable=function(t){typeof t>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(t)};S.prototype._encode_data_for_request=function(t){var n=Xr(t);return this.get_config("api_payload_format")===Hd&&(n=p.base64Encode(n)),{data:n}};S.prototype._track_or_batch=function(t,n){var i=p.truncate(t.data,255),e=t.endpoint,r=t.batcher,o=t.should_send_immediately,s=t.send_request_options||{};n=n||Jt;var a=!0,u=p.bind(function(){return s.skip_hooks||(i=this._run_hook("before_send_"+t.type,i),i&&(i=i[0])),i?(V.log("MIXPANEL REQUEST:"),V.log(i),this._send_request(e,this._encode_data_for_request(i),s,this._prepare_callback(n,i))):null},this);return this._batch_requests&&!o?r.enqueue(i).then(function(c){c?n(1,i):u()}):a=u(),a&&i};S.prototype.track=ar(function(t,n,i,e){var r;if(!(i&&i.skip_hooks)){if(r=this._run_hook("before_track",t,n),r===null)return;t=r[0],n=r[1]}!e&&typeof i=="function"&&(e=i,i=null),i=i||{};var o=i.transport;o&&(i.transport=o);var s=i.send_immediately;if(typeof e!="function"&&(e=Jt),p.isUndefined(t)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(t)){e(0);return}n=p.extend({},n),n.token=this.get_config("token");var a=this.persistence.remove_event_timer(t);if(!p.isUndefined(a)){var u=new Date().getTime()-a;n.$duration=parseFloat((u/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?p.info.marketingParams():{};n=p.extend({},p.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),n);var l=this.get_config("property_blacklist");p.isArray(l)?p.each(l,function(h){delete n[h]}):this.report_error("Invalid value for property_blacklist config: "+l),this._start_recording_on_event(t,n);var f={event:t,properties:n};return r=this._track_or_batch({type:"events",data:f,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:s,send_request_options:i},e),this.flags&&this.flags.checkFirstTimeEvents&&this.flags.checkFirstTimeEvents(t,n),r});S.prototype.set_group=ar(function(t,n,i){p.isArray(n)||(n=[n]);var e={};return e[t]=n,this.register(e),this.people.set(t,n,i)});S.prototype.add_group=ar(function(t,n,i){var e=this.get_property(t),r={};return e===void 0?(r[t]=[n],this.register(r)):e.indexOf(n)===-1&&(e.push(n),r[t]=e,this.register(r)),this.people.union(t,n,i)});S.prototype.remove_group=ar(function(t,n,i){var e=this.get_property(t);if(e!==void 0){var r=e.indexOf(n);r>-1&&(e.splice(r,1),this.register({group_key:e})),e.length===0&&this.unregister(t)}return this.people.remove(t,n,i)});S.prototype.track_with_groups=ar(function(t,n,i,e){var r=p.extend({},n||{});return p.each(i,function(o,s){o!=null&&(r[s]=o)}),this.track(t,r,e)});S.prototype._create_map_key=function(t,n){return t+"_"+JSON.stringify(n)};S.prototype._remove_group_from_cache=function(t,n){delete this._cached_groups[this._create_map_key(t,n)]};S.prototype.get_group=function(t,n){var i=this._create_map_key(t,n),e=this._cached_groups[i];return(e===void 0||e._group_key!==t||e._group_id!==n)&&(e=new we,e._init(this,t,n),this._cached_groups[i]=e),e};S.prototype.track_pageview=ar(function(t,n){typeof t!="object"&&(t={}),n=n||{};var i=n.event_name||"$mp_web_page_view",e=p.extend(p.info.mpPageViewProperties(),p.info.campaignParams(),p.info.clickParams()),r=p.extend({},e,t);return this.track(i,r)});S.prototype.track_links=function(){return this._track_dom.call(this,Zr,arguments)};S.prototype.track_forms=function(){return this._track_dom.call(this,Zo,arguments)};S.prototype.time_event=function(t){if(p.isUndefined(t)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(t)||this.persistence.set_event_timer(t,new Date().getTime())};var H0={persistent:!0},nc=function(t){var n;return p.isObject(t)?n=t:p.isUndefined(t)?n={}:n={days:t},p.extend({},H0,n)};S.prototype.register=function(t,n){var i=this._run_hook("before_register",t,n);if(i!==null){t=i[0],n=i[1];var e=nc(n);e.persistent?this.persistence.register(t,e.days):p.extend(this.unpersisted_superprops,t)}};S.prototype.register_once=function(t,n,i){var e=this._run_hook("before_register_once",t,n,i);if(e!==null){t=e[0],n=e[1],i=e[2];var r=nc(i);r.persistent?this.persistence.register_once(t,n,r.days):(typeof n>"u"&&(n="None"),p.each(t,function(o,s){(!this.unpersisted_superprops.hasOwnProperty(s)||this.unpersisted_superprops[s]===n)&&(this.unpersisted_superprops[s]=o)},this))}};S.prototype.unregister=function(t,n){var i=this._run_hook("before_unregister",t,n);i!==null&&(t=i[0],n=i[1],n=nc(n),n.persistent?this.persistence.unregister(t):delete this.unpersisted_superprops[t])};S.prototype._register_single=function(t,n){var i={};i[t]=n,this.register(i)};S.prototype.identify=function(t,n,i,e,r,o,s,a){var u=this._run_hook("before_identify",t);if(u===null)return-1;t=u[0];var c=this.get_distinct_id();if(t&&c!==t){if(typeof t=="string"&&t.indexOf(rc)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:t})}if(!this.get_property("$device_id")){var l=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:l},"")}t!==c&&t!==this.get_property(xo)&&(this.unregister(xo),this.register({distinct_id:t})),this._flags.identify_called=!0,this.people._flush(n,i,e,r,o,s,a),t!==c&&this.track("$identify",{distinct_id:t,$anon_distinct_id:c},{skip_hooks:!0}),t!==c&&this.flags.fetchFlags().catch(function(){V.error("[flags] Error fetching flags during identify")})};S.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var t=p.UUID();this.register_once({distinct_id:rc+t,$device_id:t},""),this._check_and_start_session_recording()};S.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};S.prototype.alias=function(t,n){if(t===this.get_property(Vd))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var i=this;return p.isUndefined(n)&&(n=this.get_distinct_id()),t!==n?(this._register_single(xo,t),this.track("$create_alias",{alias:t,distinct_id:n},{skip_hooks:!0},function(){i.identify(t)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(t),-1)};S.prototype.name_tag=function(t){this._register_single("mp_name_tag",t)};S.prototype.set_config=function(t){if(p.isObject(t)){p.extend(this.config,t);var n=t.batch_size;n&&p.each(this.request_batchers,function(i){i.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),nt.DEBUG=nt.DEBUG||this.get_config("debug"),("autocapture"in t||"record_heatmap_data"in t)&&this.autocapture&&this.autocapture.init(),p.isObject(t.hooks)&&(this.hooks={},p.each(t.hooks,function(i,e){if(p.isFunction(i))this.hooks[e]=[i];else if(p.isArray(i)){this.hooks[e]=[];for(var r=0;r<i.length;r++)p.isFunction(i[r])||V.critical("Invalid hook added. Hook is not a function"),this.hooks[e].push(i[r])}else V.critical("Invalid hooks added. Ensure that the hook values passed into config.hooks are functions or arrays of functions.")},this))}};S.prototype.get_config=function(t){return this.config[t]};S.prototype._run_hook=function(t){var n=Yt.call(arguments,1);return p.each(this.hooks[t],function(i){if(n===null)return null;var e=i.apply(this,n);typeof e>"u"?(this.report_error(t+" hook did not return a valid value"),n=null):(p.isArray(e)||(e=[e]),n.splice.apply(n,[0,e.length].concat(e)))},this),n};S.prototype.get_property=function(t){return this.persistence.load_prop([t])};S.prototype.get_api_host=function(t){return this.get_config("api_hosts")[t]||this.get_config("api_host")};S.prototype.toString=function(){var t=this.get_config("name");return t!==ut&&(t=ut+"."+t),t};S.prototype._event_is_disabled=function(t){return p.isBlockedUA(It)||this._flags.disable_all_events||p.include(this.__disabled_events,t)};S.prototype._gdpr_init=function(){var t=this.get_config("opt_out_tracking_persistence_type")==="localStorage";t&&p.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||p.cookie.get("mp_optout"))&&(p.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};S.prototype._gdpr_update_persistence=function(t){var n;if(t&&t.clear_persistence)n=!0;else if(t&&t.enable_persistence)n=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==n&&this.persistence.set_disabled(n),n?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()};S.prototype._gdpr_call_func=function(t,n){return n=p.extend({track:p.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},n),p.localStorage.is_supported()||(n.persistence_type="cookie"),t(this.get_config("token"),{track:n.track,trackEventName:n.track_event_name,trackProperties:n.track_properties,persistenceType:n.persistence_type,persistencePrefix:n.cookie_prefix,cookieDomain:n.cookie_domain,cookieExpiration:n.cookie_expiration,crossSiteCookie:n.cross_site_cookie,crossSubdomainCookie:n.cross_subdomain_cookie,secureCookie:n.secure_cookie,ignoreDnt:n.ignore_dnt})};S.prototype.opt_in_tracking=function(t){t=p.extend({enable_persistence:!0},t),this._gdpr_call_func(OE,t),this._gdpr_update_persistence(t)};S.prototype.opt_out_tracking=function(t){t=p.extend({clear_persistence:!0,delete_user:!0},t),t.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(xE,t),this._gdpr_update_persistence(t)};S.prototype.has_opted_in_tracking=function(t){return this._gdpr_call_func(RE,t)};S.prototype.has_opted_out_tracking=function(t){return this._gdpr_call_func(ud,t)};S.prototype.clear_opt_in_out_tracking=function(t){t=p.extend({enable_persistence:!0},t),this._gdpr_call_func(AE,t),this._gdpr_update_persistence(t)};S.prototype.report_error=function(t,n){V.error.apply(V.error,arguments);try{!n&&!(t instanceof Error)&&(t=new Error(t)),this.get_config("error_reporter")(t,n)}catch(i){V.error(i)}};S.prototype.add_hook=function(t,n){this.hooks[t]||(this.hooks[t]=[]),this.hooks[t].push(n)};S.prototype.remove_hook=function(t,n){var i;this.hooks[t]&&(i=this.hooks[t].indexOf(n),i!==-1?this.hooks[t].splice(i,1):V.log("remove_hook failed. Matching hook was not found"))};S.prototype.init=S.prototype.init;S.prototype.reset=S.prototype.reset;S.prototype.enable=S.prototype.enable;S.prototype.disable=S.prototype.disable;S.prototype.time_event=S.prototype.time_event;S.prototype.track=S.prototype.track;S.prototype.track_links=S.prototype.track_links;S.prototype.track_forms=S.prototype.track_forms;S.prototype.track_pageview=S.prototype.track_pageview;S.prototype.register=S.prototype.register;S.prototype.register_once=S.prototype.register_once;S.prototype.unregister=S.prototype.unregister;S.prototype.identify=S.prototype.identify;S.prototype.alias=S.prototype.alias;S.prototype.name_tag=S.prototype.name_tag;S.prototype.set_config=S.prototype.set_config;S.prototype.get_config=S.prototype.get_config;S.prototype.get_api_host=S.prototype.get_api_host;S.prototype.get_property=S.prototype.get_property;S.prototype.get_distinct_id=S.prototype.get_distinct_id;S.prototype.toString=S.prototype.toString;S.prototype.opt_out_tracking=S.prototype.opt_out_tracking;S.prototype.opt_in_tracking=S.prototype.opt_in_tracking;S.prototype.has_opted_out_tracking=S.prototype.has_opted_out_tracking;S.prototype.has_opted_in_tracking=S.prototype.has_opted_in_tracking;S.prototype.clear_opt_in_out_tracking=S.prototype.clear_opt_in_out_tracking;S.prototype.get_group=S.prototype.get_group;S.prototype.set_group=S.prototype.set_group;S.prototype.add_group=S.prototype.add_group;S.prototype.remove_group=S.prototype.remove_group;S.prototype.add_hook=S.prototype.add_hook;S.prototype.remove_hook=S.prototype.remove_hook;S.prototype.track_with_groups=S.prototype.track_with_groups;S.prototype.start_batch_senders=S.prototype.start_batch_senders;S.prototype.stop_batch_senders=S.prototype.stop_batch_senders;S.prototype.start_session_recording=S.prototype.start_session_recording;S.prototype.stop_session_recording=S.prototype.stop_session_recording;S.prototype.pause_session_recording=S.prototype.pause_session_recording;S.prototype.resume_session_recording=S.prototype.resume_session_recording;S.prototype.get_session_recording_properties=S.prototype.get_session_recording_properties;S.prototype.get_session_replay_url=S.prototype.get_session_replay_url;S.prototype.get_tab_id=S.prototype.get_tab_id;S.prototype.DEFAULT_API_ROUTES=Kd;S.prototype.__get_recorder=S.prototype.__get_recorder;S.prototype.__get_recording_init_promise=S.prototype.__get_recording_init_promise;X.prototype.properties=X.prototype.properties;X.prototype.update_search_keyword=X.prototype.update_search_keyword;X.prototype.update_referrer_info=X.prototype.update_referrer_info;X.prototype.get_cross_subdomain=X.prototype.get_cross_subdomain;X.prototype.clear=X.prototype.clear;var Dr={},Y0=function(){p.each(Dr,function(t,n){n!==ut&&(Ve[n]=t)}),Ve._=p},K0=function(){Ve.init=function(t,n,i){if(i)return Ve[i]||(Ve[i]=Dr[i]=ru(t,n,i),Ve[i]._loaded()),Ve[i];var e=Ve;Dr[ut]?e=Dr[ut]:t&&(e=ru(t,n,ut),e._loaded(),Dr[ut]=e),Ve=e,Ro===q0&&(E[ut]=Ve),Y0()}},J0=function(){function t(){t.done||(t.done=!0,Jd=!0,Yd=!1,p.each(Dr,function(e){e._dom_loaded()}))}function n(){try{W.documentElement.doScroll("left")}catch{setTimeout(n,1);return}t()}if(W.addEventListener)W.readyState==="complete"?t():W.addEventListener("DOMContentLoaded",t,!1);else if(W.attachEvent){W.attachEvent("onreadystatechange",t);var i=!1;try{i=E.frameElement===null}catch{}W.documentElement.doScroll&&i&&n()}p.register_event(E,"load",t,!0)};function X0(t){return Qa=t,Ro=eu,Ve=new S,K0(),Ve.init(),J0(),Ve}function Z0(t,n){n()}var cr=X0(Z0);var Xd=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((n,i)=>(i&=63,i<36?n+=i.toString(36):i<62?n+=(i-26).toString(36).toUpperCase():i>62?n+="-":n+="_",n),"");var ic="rozmovaAnalyticsParams",oc=["utm_source","utm_medium","utm_campaign","utm_campaign_id","utm_advertiser_id","utm_adset_id","utm_adset_name","utm_ad_id","utm_ad_name","utm_keyword"],Zd="G-GYQLL028VQ";var Qd="9d4cb3d213e5aee689ea01dd68ad65ad",ev="e6d009719c77519432c3",tv=["en","uk","pl","es","ru"],rv=["view_item_list","select_item","view_item","begin_checkout","add_payment_info"],nv=["rozmova.me","clearly.help","uptech.team"],iv="createTherapyPlacementPage",ov="rankingSessionId";var sv=(t,n)=>{let i=new URL(window.location.href);i.searchParams.set(t,n),window.history.replaceState({path:i.toString()},"",i.toString())},sc=t=>new URLSearchParams(window.location.search).get(t),av=()=>(navigator.userAgent||navigator.vendor||window.opera).match(/FBAN|FBAV|Instagram/i),uv=()=>window.navigator.language;function cv(){let t=navigator.userAgent;return t.indexOf("Edg")>-1?"Microsoft Edge":t.indexOf("Chrome")>-1?"Chrome":t.indexOf("Firefox")>-1?"Firefox":t.indexOf("Safari")>-1?"Safari":t.indexOf("Opera")>-1?"Opera":t.indexOf("Trident")>-1||t.indexOf("MSIE")>-1?"Internet Explorer":"Unknown"}function lv(){let t=navigator.userAgent;return/Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)?"Mobile":"Desktop"}function fv(){let t=navigator.userAgent;return t.includes("Win")?"Windows":t.includes("Mac")?"macOS":t.includes("X11")||t.includes("Linux")?"Linux":t.includes("Android")?"Android":t.includes("like Mac")?"iOS":"Unknown OS"}var lt=()=>{let t=window.location.hostname.split("."),n=t.length;return t.length===1?t[0]:t.slice(n-2,n).join(".")},Q0=["accounts.google.com","appleid.apple.com","checkout.stripe.com"],ac=()=>{let t=document.referrer;if(t){let n=new URL(t);if([...Q0,lt()].some(i=>n.hostname.includes(i)))return null}return t};function hv(){let t=ac();if(!t)return null;let n={"google.com":"q","bing.com":"q","yahoo.com":"p","duckduckgo.com":"q","ask.com":"q","baidu.com":"wd","yandex.com":"text"},i=new URL(t);for(let[e,r]of Object.entries(n))if(i.hostname.includes(e)){let o=i.searchParams.get(r);return o?decodeURIComponent(o):null}return null}var Qo=()=>{let t=Te.get("_ga");if(!t)return null;let n=t.split(".");return n.length<4?null:`${n[2]}.${n[3]}`},pv=()=>new Promise(t=>{let n=!1,i=()=>{n||(n=!0,t(Qo()))};if(typeof window<"u"&&typeof gtag=="function")try{gtag("get",Zd,"client_id",e=>{n||(n=!0,t(e||Qo()))}),setTimeout(i,1e3)}catch{i()}else i()});function uc(){let t=Te.get("_ga_GYQLL028VQ");if(!t)return null;let n=t.split("."),i=n[0];if(i==="GS1"&&n.length>=3)return n[2];if(i==="GS2"){let e=t.match(/s(\d+)/);if(e)return e[1]}return null}var dv=t=>{if(!t)return;let i="GA1.1."+t,e=730,r=new Date(Date.now()+e*864e5).toUTCString();document.cookie=`_ga=${i}; expires=${r}; path=/; Secure; SameSite=Lax`},vv=t=>{let i=window.location.pathname.split("/")[1];return tv.includes(i)?i:t?"en":"uk"},gv=t=>t&&nv.some(i=>t.includes(i))?"internal":"external";function mv(t,n){let i=Object.keys(t),e=Object.keys(n);return i.length!==e.length?!1:i.every(r=>t[r]===n[r])}function yv(t){let n=Number(t);return isNaN(n)?null:n}function _v(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(n,i)=>String.fromCharCode(parseInt(i,16))))}var wv=(t,n,i)=>(t?n?"https://trp.clearly.help":"https://trp.rozmova.me":n?"https://stage.trp.clearly.help":"https://stage.trp.rozmova.me")+i,cc=t=>{let n=Te.get(t),i=uc(),e=n!==i;if(e){let r=lt();i&&Te.set(t,i,{domain:r})}return e};function bv(){let t=`
|
|
94
94
|
(function(){
|
|
95
95
|
var analytics = window.analytics = window.analytics || [];
|
|
96
96
|
if (!analytics.initialize)
|
|
@@ -132,10 +132,10 @@ End of stack for Error object`:u.name+": "+u.message}return u});function o(a){re
|
|
|
132
132
|
--cc-font-family: "Inter", sans-serif;
|
|
133
133
|
|
|
134
134
|
/** Change button primary color to black **/
|
|
135
|
-
--cc-btn-primary-bg: #
|
|
136
|
-
--cc-btn-primary-border-color: #
|
|
135
|
+
--cc-btn-primary-bg: #486AF1;
|
|
136
|
+
--cc-btn-primary-border-color: #486AF1;
|
|
137
137
|
}
|
|
138
|
-
`,document.head.appendChild(e),ug(wI(t,n))};var kc=class{initialized=!1;locale="uk";platform="web";isProd=!0;dataLayer=[];lastGConfig={};mxDistinctId=null;async init({isProd:n,locale:i,platform:e,isClearly:r,config:o,
|
|
138
|
+
`,document.head.appendChild(e),ug(wI(t,n))};var kc=class{initialized=!1;locale="uk";platform="web";isProd=!0;dataLayer=[];lastGConfig={};mxDistinctId=null;isClearly=!1;async init({isProd:n,locale:i,platform:e,isClearly:r,config:o,mixpanelConfig:s={}}={}){bv(),Ev();let a=nn();av()&&sv("rid",a),typeof n=="boolean"&&(this.isProd=n),typeof r=="boolean"&&(this.isClearly=r),i?this.locale=i:this.locale=vv(r),e&&(this.platform=e),this.platform==="web"&&r&&cg(this.locale,r),cr.init(Qd,{debug:!1,track_pageview:"url-with-path",persistence:"cookie",api_host:"https://api-eu.mixpanel.com",batch_requests:!1,loaded:u=>this.mxDistinctId=u.get_distinct_id(),...s}),this.setConfig(o),this.trackPageView(),Iv(this.trackEvent.bind(this)),this.initialized=!0,this.processDataLayer()}processDataLayer(){let n=["g_config","page_view"];for(let i of n){let e=this.dataLayer.findIndex(r=>r.eventName===i);if(e!==-1){let r=this.dataLayer.splice(e,1)[0];this.trackEvent(r.eventName,r.eventParams,r.services)}}for(;this.dataLayer.length>0;){let i=this.dataLayer.shift();this.trackEvent(i?.eventName,i?.eventParams,i?.services)}}async getGAClientId(){return await pv()}setGAClientId=dv;async trackEvent(n,i,e={ga:!0,mixpanel:!0,customerIO:!0}){if(!this.initialized){this.dataLayer.push({eventName:n,eventParams:i,services:e});return}let r=this.getCommonParams(),o={...r,...i};if(e.mixpanel)try{cr.track(n,o)}catch(s){console.log(s)}if(e.ga)try{let s={funnel_name:r.funnel_name,...i};rv.includes(n)&&window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:n,...s})}catch(s){console.log(s)}if(e.customerIO)try{window.analytics.track(n,o)}catch(s){console.log(s)}}setConfig(n={userId:es(),email:Rv()}){if(mv(n,this.lastGConfig))return;this.lastGConfig=n;let{userId:i,email:e}=n,r={user_id:i,is_logged:i?"yes":"no",locale:this.locale,platform:this.platform,user_type:gv(e),rid:nn()},o=this.getCommonParams();window.dataLayer.push({event:"g_config",...r})}trackPageView({referrer:n}={}){let i={page_title:document.title,page_location:window.location.href,page_referrer:n||document.referrer},e=this.getCommonParams();window.dataLayer.push({event:"page_view",...i})}setUser(n,i){let{email:e,name:r,phone:o,isB2B:s,CIOParams:a={},mixpanelParams:u={}}=i;this.setConfig({userId:n,email:e}),cr.identify(n),cr.people.set({$email:e,name:r,phone:o,isB2B:s,...u}),window.analytics.identify(n,{...i,...a}),kv(n),xv(e),this.trackEvent("login",{logged:"yes",uid:n},{ga:!0})}getCommonParams(){let n=Cv(),i=Qo();return{...n,fbc:Te.get("_fbc"),fbp:Te.get("_fbp"),session_id:uc(),user_pseudo_id:i,rid:nn(),funnel_name:Te.get("funnel_name"),language:uv(),platform:this.platform,url:window.location.href,device:lv(),browser:cv(),system:fv(),locale:this.locale,logged_in:!!es(),user_id:es()}}setLocale(n){this.locale=n}resetUser(){cr.reset(),window.analytics.reset(),Ov(),Av(),this.setConfig(),this.trackEvent("login",{logged:"no"},{ga:!0}),this.init()}getUserId=nn;async getAttributionProperties(n){let i=await this.getGAClientId(),{listName:e,index:r}=Mv(),o=localStorage.getItem(iv),s=sessionStorage.getItem(ov),a=this.getCommonParams();return{funnelInfo:{funnelName:n?.funnelName||a.funnel_name,funnelType:null,listName:e,platform:this.platform,index:yv(r),placement:o,rankingSessionId:s},trackingParams:{source:a.utm_source,medium:a.utm_medium,advertiserId:a.utm_advertiser_id,campaignId:a.utm_campaign_id,campaignName:a.utm_campaign,adsetId:a.utm_adset_id,adId:a.utm_ad_id,adName:a.utm_ad_name,keyword:a.utm_keyword,searchQuery:a.search_query,referrer:a.referrer,landingPageUrl:a.landing_page_url,pathname:window.location.pathname},externalAnalyticsUserInfo:{gaClientId:i,gaSessionId:a.session_id,rid:nn(),fbp:a.fbp,fbc:a.fbc,mxDistinctId:this.mxDistinctId,cioAnonId:window.analytics?.user?.().anonymousId?.()}}}start_session_recording=()=>cr.start_session_recording();stop_session_recording=()=>cr.stop_session_recording();async trackFirstPartyEvent(n,i,e){let r=await this.getAttributionProperties(e),o=JSON.stringify(r),s=_v(o),a=new Headers({"X-Attribution":s,"Content-Type":"application/json"}),u=wv(this.isProd,this.isClearly,"/api/analytics/track");return await fetch(u,{body:JSON.stringify({eventName:n,eventParams:i}),method:"POST",headers:a})}},SI=new kc;return bg(CI);})();
|
|
139
139
|
/*! Bundled license information:
|
|
140
140
|
|
|
141
141
|
js-cookie/dist/js.cookie.mjs:
|