@revolugo/elements 6.8.0-beta.1 → 6.8.0-rc.1
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/dist/index.es.min.js +1 -4
- package/dist/index.es.min.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/{revolugo.banktransferdetails.D70RTc43.min.js → revolugo.banktransferdetails.BBkYrDrP.min.js} +9 -9
- package/dist/{revolugo.bdaterangepicker.B8BqSfrk.min.js → revolugo.bdaterangepicker.DSJE5n7Z.min.js} +6 -6
- package/dist/{revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.TjFyJK3o.min.js → revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.eoXMEkFJ.min.js} +2 -2
- package/dist/{revolugo.bhoteloffersfilterbar.DeYwgC-X.min.js → revolugo.bhoteloffersfilterbar.DwrYTxiv.min.js} +31 -31
- package/dist/{revolugo.bhotelroomsdetails.qOkb7bF4.min.js → revolugo.bhotelroomsdetails.jJmgFO6V.min.js} +6 -6
- package/dist/{revolugo.bhotelsearchbar.DS8JMdFX.min.js → revolugo.bhotelsearchbar.DgBdyH6X.min.js} +16 -16
- package/dist/{revolugo.bimagecarousel.EmC1mHXe.min.js → revolugo.bimagecarousel.DQXXM5CL.min.js} +9 -9
- package/dist/{revolugo.bookingdetailssidebar.lJaJEdFg.min.js → revolugo.bookingdetailssidebar.CKrtgLGZ.min.js} +4 -4
- package/dist/{revolugo.bookingdetailssidebar.OgMINhMq.min.js → revolugo.bookingdetailssidebar.Dm6EGehl.min.js} +11 -11
- package/dist/{revolugo.bookingmanager.m08SYP86.min.js → revolugo.bookingmanager.ra4Fie13.min.js} +20 -20
- package/dist/{revolugo.bpricesummaryskeleton.T6fWvVKX.min.js → revolugo.bpricesummaryskeleton.qpy47Wsi.min.js} +4 -4
- package/dist/{revolugo.bstarrating.vue_vue_type_script_setup_true_lang.M46KdeWM.min.js → revolugo.bstarrating.vue_vue_type_script_setup_true_lang.DD4SRw7w.min.js} +7 -7
- package/dist/{revolugo.btag.Cd9RL-Se.min.js → revolugo.btag.WMRlt8-8.min.js} +6 -6
- package/dist/{revolugo.cancellationpoliciesbadge.BAWLhoFE.min.js → revolugo.cancellationpoliciesbadge.BWHDapkN.min.js} +7 -7
- package/dist/{revolugo.cancellationpoliciesbadge.x9SgSKRO.min.js → revolugo.cancellationpoliciesbadge.C6zxRPaZ.min.js} +4 -4
- package/dist/{revolugo.cancellationpolicieslist.CXEi_O_B.min.js → revolugo.cancellationpolicieslist.B-nwKXUj.min.js} +4 -4
- package/dist/{revolugo.cancellationpolicieslist.kh5sahhd.min.js → revolugo.cancellationpolicieslist.CHhCIAQS.min.js} +4 -4
- package/dist/{revolugo.case-transformers.DfCc1sKY.min.js → revolugo.case-transformers.CEdbnlE-.min.js} +2 -2
- package/dist/{revolugo.creditcardform.ZqPrv4K6.min.js → revolugo.creditcardform.698oFnsf.min.js} +11 -11
- package/dist/{revolugo.creditcardform.Cz_EExR3.min.js → revolugo.creditcardform.CpSNG8oP.min.js} +4 -4
- package/dist/{revolugo.creditcardpayment.olC2sHv8.min.js → revolugo.creditcardpayment.6u4OCU4A.min.js} +13 -13
- package/dist/{revolugo.creditcardpayment.C47xZXR4.min.js → revolugo.creditcardpayment.BLosL1aA.min.js} +4 -4
- package/dist/{revolugo.currencypicker.D44ks2e0.min.js → revolugo.currencypicker.BXsQGdbF.min.js} +6 -6
- package/dist/{revolugo.currencypickerbtn.Da2NhlAu.min.js → revolugo.currencypickerbtn.D-42MaaK.min.js} +9 -9
- package/dist/{revolugo.currencypickerbtn.C2gt2Wvi.min.js → revolugo.currencypickerbtn.NVqcx7mQ.min.js} +4 -4
- package/dist/{revolugo.dialog-attach.C_5QvJAn.min.js → revolugo.dialog-attach.BuUfn9u6.min.js} +2 -2
- package/dist/{revolugo.dialog-transition.ksNwOfBf.min.js → revolugo.dialog-transition.2P5jpnv2.min.js} +3 -3
- package/dist/{revolugo.fastbookingflow.BIb9TBpX.min.js → revolugo.fastbookingflow.CFE4HRID.min.js} +4 -4
- package/dist/{revolugo.fullbookingflow.BVg0Q886.min.js → revolugo.fullbookingflow.DbPlQAXx.min.js} +17 -17
- package/dist/{revolugo.hoteldescriptionview.DflBNZtA.min.js → revolugo.hoteldescriptionview.DyHypnsO.min.js} +4 -4
- package/dist/{revolugo.hoteldescriptionview.BoCEWA7i.min.js → revolugo.hoteldescriptionview.FAMKFv9n.min.js} +19 -19
- package/dist/{revolugo.hotelofferitemlayout.B954A8ZU.min.js → revolugo.hotelofferitemlayout.BXdHFzt5.min.js} +6 -6
- package/dist/{revolugo.hotelofferlist.DkUtJZ29.min.js → revolugo.hotelofferlist.BsjYGZdX.min.js} +4 -4
- package/dist/{revolugo.hotelofferlist.VpDpWMAm.min.js → revolugo.hotelofferlist.D-sHFvFQ.min.js} +988 -1018
- package/dist/{revolugo.hotelofferrequestcreator.CrrP-Mjf.min.js → revolugo.hotelofferrequestcreator.oZhVIBxs.min.js} +4 -4
- package/dist/{revolugo.hoteloffersearchmenu.BD26Zl70.min.js → revolugo.hoteloffersearchmenu.Cun9amyl.min.js} +6 -6
- package/dist/{revolugo.hoteloffersmap.O73rRIrY.min.js → revolugo.hoteloffersmap.BP4Jp5xL.min.js} +4 -4
- package/dist/{revolugo.hoteloffersmap.599v6DtH.min.js → revolugo.hoteloffersmap.CVTv2jVD.min.js} +16 -16
- package/dist/{revolugo.hoteloffersview.BSuaPamT.min.js → revolugo.hoteloffersview.B5nONm_1.min.js} +14 -14
- package/dist/{revolugo.hoteloffersview.uFcA-Q8V.min.js → revolugo.hoteloffersview.DacCdu_b.min.js} +4 -4
- package/dist/{revolugo.hotelroomofferlist.047wvmlm.min.js → revolugo.hotelroomofferlist.DVGmJT59.min.js} +4 -4
- package/dist/{revolugo.hotelroomofferlist.hNh95LPc.min.js → revolugo.hotelroomofferlist.DmOEadSF.min.js} +23 -23
- package/dist/{revolugo.hotelroomofferrequestcreator.props.Ch20MI-1.min.js → revolugo.hotelroomofferrequestcreator.props.lNEhbaT9.min.js} +2 -2
- package/dist/{revolugo.hotelroomoffersbookingflow.CIga3epB.min.js → revolugo.hotelroomoffersbookingflow.KaGNZgT2.min.js} +17 -17
- package/dist/{revolugo.hotelroomoffersearchmenu.BqPoCOJV.min.js → revolugo.hotelroomoffersearchmenu.CCwlZB2o.min.js} +5 -5
- package/dist/{revolugo.hotelroomoffersearchmenu.SXEmMWNu.min.js → revolugo.hotelroomoffersearchmenu.DOJt4B9y.min.js} +7 -7
- package/dist/{revolugo.hotelroomoffersview.gzfKsSHa.min.js → revolugo.hotelroomoffersview.BkR60ueU.min.js} +4 -4
- package/dist/{revolugo.hotelroomoffersview.C29cidjz.min.js → revolugo.hotelroomoffersview.DHjinkWP.min.js} +12 -12
- package/dist/{revolugo.index.BaBMFwcZ.min.js → revolugo.index.B7z0g8al.min.js} +2 -2
- package/dist/{revolugo.index.MUWumuM5.min.js → revolugo.index.s-onPvC0.min.js} +4 -4
- package/dist/{revolugo.index.wc.hcj2tBQa.min.js → revolugo.index.wc.CsrQl9B8.min.js} +5012 -5100
- package/dist/{revolugo.langpicker.CTF21wTY.min.js → revolugo.langpicker.BiuzuhH0.min.js} +6 -6
- package/dist/{revolugo.langpickerbtn.DMWudtGn.min.js → revolugo.langpickerbtn.DagJBVfO.min.js} +4 -4
- package/dist/{revolugo.langpickerbtn.E0CLTwCX.min.js → revolugo.langpickerbtn.cw-Pilxv.min.js} +9 -9
- package/dist/revolugo.min.js +1 -1
- package/dist/{revolugo.position.mEwvDkCr.min.js → revolugo.position.DLEaIEKi.min.js} +4 -4
- package/dist/{revolugo.prebookform.Bi-sWZL0.min.js → revolugo.prebookform.CqX9sVfX.min.js} +4 -4
- package/dist/{revolugo.prebookform.BcktaxEc.min.js → revolugo.prebookform.YQbaVaOP.min.js} +18 -18
- package/dist/{revolugo.roominglisteditor.jO9FT_rG.min.js → revolugo.roominglisteditor.5YqKPUFg.min.js} +9 -9
- package/dist/{revolugo.roominglisteditor.BgDPCfkP.min.js → revolugo.roominglisteditor.CTnsjWFF.min.js} +4 -4
- package/dist/{revolugo.rounded.DGGd6U47.min.js → revolugo.rounded.M5NbwQ-2.min.js} +2 -2
- package/dist/{revolugo.ssrboot.RImRxJU9.min.js → revolugo.ssrboot.CPwQ4mY-.min.js} +2 -2
- package/dist/{revolugo.storybooktoolbar.cK-_oh_-.min.js → revolugo.storybooktoolbar.DU-Au-P6.min.js} +16 -16
- package/dist/{revolugo.termsandconditions.Bf8tOgI4.min.js → revolugo.termsandconditions.B8wFEMtY.min.js} +4 -4
- package/dist/{revolugo.termsandconditions.DrrQwLEt.min.js → revolugo.termsandconditions.DdvsS1Nr.min.js} +4 -4
- package/dist/{revolugo.use-breakpoint-service.C55UqJ8N.min.js → revolugo.use-breakpoint-service.CZ9QX96a.min.js} +2 -2
- package/dist/{revolugo.vautocomplete.X5OrrUPl.min.js → revolugo.vautocomplete.6G-7p4XB.min.js} +11 -11
- package/dist/{revolugo.vbadge.BeCXlcev.min.js → revolugo.vbadge.BxaNSjJA.min.js} +6 -6
- package/dist/{revolugo.vbtn.DSYh8Plf.min.js → revolugo.vbtn.BPIAO9U5.min.js} +6 -6
- package/dist/{revolugo.vcard.DrUjDHZJ.min.js → revolugo.vcard.BCX-G8mX.min.js} +6 -6
- package/dist/{revolugo.vcheckboxbtn.-WD79m_3.min.js → revolugo.vcheckboxbtn.Q30XKYRx.min.js} +8 -8
- package/dist/{revolugo.vdialog.C40-fld0.min.js → revolugo.vdialog.CMYISGau.min.js} +5 -5
- package/dist/{revolugo.vdivider.C8qKKweh.min.js → revolugo.vdivider.CLbZrEbe.min.js} +3 -3
- package/dist/{revolugo.vexpansionpanels.CPfBybl9.min.js → revolugo.vexpansionpanels.BD89Tllc.min.js} +5 -5
- package/dist/{revolugo.vform.Bxkhj0tA.min.js → revolugo.vform.Bk5MumIG.min.js} +4 -4
- package/dist/{revolugo.vinput.DkrPzK9V.min.js → revolugo.vinput.CSdGREv4.min.js} +4 -4
- package/dist/{revolugo.vlabel.Ra8-PR0S.min.js → revolugo.vlabel.D8YLLgkd.min.js} +3 -3
- package/dist/{revolugo.vlist.hjMTQUm_.min.js → revolugo.vlist.B_sxyWMf.min.js} +8 -8
- package/dist/{revolugo.vmenu.Df9qQOg5.min.js → revolugo.vmenu.B0HL9TEG.min.js} +5 -5
- package/dist/{revolugo.vselect.D58BjYst.min.js → revolugo.vselect.DjrnZ68P.min.js} +11 -11
- package/dist/{revolugo.vsheet.Be5_uKvN.min.js → revolugo.vsheet.cNM_MdEY.min.js} +5 -5
- package/dist/{revolugo.vskeletonloader.DLz_sBeT.min.js → revolugo.vskeletonloader.MnCR2qht.min.js} +4 -4
- package/dist/{revolugo.vsnackbar.DmI3K8dZ.min.js → revolugo.vsnackbar.CTGdiOPz.min.js} +6 -6
- package/dist/revolugo.vspacer.D6ZThXFV.min.js +7 -0
- package/dist/{revolugo.vtextarea.CE2P777C.min.js → revolugo.vtextarea._NoUVeyJ.min.js} +8 -8
- package/dist/{revolugo.vtextfield.B3H-uARB.min.js → revolugo.vtextfield.C5IuUTNN.min.js} +8 -8
- package/dist/{revolugo.vtoolbar.ZaD9QMMg.min.js → revolugo.vtoolbar.DkBiOuPH.min.js} +5 -5
- package/dist/{revolugo.vtooltip.CiaW90fk.min.js → revolugo.vtooltip.CNASNy8U.min.js} +4 -4
- package/dist/{revolugo.vwindowitem.BjNUE921.min.js → revolugo.vwindowitem.DWDP8yX4.min.js} +6 -6
- package/dist/{revolugo.watch-list.BLmFRUgU.min.js → revolugo.watch-list.DFagwB6N.min.js} +2 -2
- package/dist/{revolugo.webcomponentwrapper.D7s9Wt1u.min.js → revolugo.webcomponentwrapper.CyN0tjOk.min.js} +2 -2
- package/package.json +1 -1
- package/dist/revolugo.vspacer.D1ff4Ue6.min.js +0 -7
package/dist/{revolugo.hotelofferlist.VpDpWMAm.min.js → revolugo.hotelofferlist.D-sHFvFQ.min.js}
RENAMED
@@ -1,30 +1,30 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { Y as
|
5
|
-
import { h as
|
6
|
-
import { H as
|
7
|
-
import { H as
|
8
|
-
import { B as
|
9
|
-
import { u as Ye, b as
|
10
|
-
import { V as
|
11
|
-
import { V as Dn } from "./revolugo.vmenu.
|
12
|
-
import { a as ae } from "./revolugo.vbtn.
|
13
|
-
import { V as
|
14
|
-
import { a as
|
15
|
-
import { c as
|
16
|
-
import { V as Cn, m as
|
17
|
-
import { V as
|
18
|
-
import { V as
|
19
|
-
import { H as
|
20
|
-
import { B as
|
21
|
-
import { p as
|
22
|
-
import { w as
|
23
|
-
import { T as
|
24
|
-
import { u as
|
25
|
-
import { p as
|
26
|
-
import { V as
|
27
|
-
function
|
1
|
+
var Li = Object.defineProperty;
|
2
|
+
var wi = (t, e, n) => e in t ? Li(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
3
|
+
var P = (t, e, n) => wi(t, typeof e != "symbol" ? e + "" : e, n);
|
4
|
+
import { Y as Xe, d as gn, u as mn, k as xt, Z as Me, _ as Te, D as $, a as b, $ as yt, a0 as $i, a1 as ct, a2 as Le, a3 as bt, a4 as Ui, C as Zt, a5 as Et, M as ks, f as je, a6 as ot, a7 as Rs, a8 as Is, y as re, a9 as Ts, aa as Bi, V as Vi, R as Fi, ab as Hi, ac as xi, F as He, i as ge, w as C, e as en, t as xe, r as oe, o as M, b as Os, c as Q, g as Z, v as As, x as St, K as Gi, Q as ji, ad as qi, S as zi, ae as Ki, H as Yi, I as Wi, A as Qi } from "./revolugo.index.wc.CsrQl9B8.min.js";
|
5
|
+
import { h as Xi, H as Ji } from "./revolugo.hotelofferrequestcreator.oZhVIBxs.min.js";
|
6
|
+
import { H as Zi, D as er, B as tr, p as nr, b as sr, c as ir } from "./revolugo.bhoteloffersfilterbar.DwrYTxiv.min.js";
|
7
|
+
import { H as Ds } from "./revolugo.hotelofferitemlayout.BXdHFzt5.min.js";
|
8
|
+
import { B as rr, v as Ue, V as or } from "./revolugo.vtextarea._NoUVeyJ.min.js";
|
9
|
+
import { u as Ye, b as Cs, M as _s, _ as pn, V as st, a as Pe, B as ar } from "./revolugo.webcomponentwrapper.CyN0tjOk.min.js";
|
10
|
+
import { V as Je } from "./revolugo.vtextfield.C5IuUTNN.min.js";
|
11
|
+
import { V as Dn } from "./revolugo.vmenu.B0HL9TEG.min.js";
|
12
|
+
import { a as ae } from "./revolugo.vbtn.BPIAO9U5.min.js";
|
13
|
+
import { V as lr } from "./revolugo.vspacer.D6ZThXFV.min.js";
|
14
|
+
import { a as Bt, b as ur } from "./revolugo.index.s-onPvC0.min.js";
|
15
|
+
import { c as cr, V as dr } from "./revolugo.position.DLEaIEKi.min.js";
|
16
|
+
import { V as Cn, m as fr } from "./revolugo.vsheet.cNM_MdEY.min.js";
|
17
|
+
import { V as hr } from "./revolugo.vform.Bk5MumIG.min.js";
|
18
|
+
import { V as tn } from "./revolugo.vdivider.CLbZrEbe.min.js";
|
19
|
+
import { H as gr } from "./revolugo.hotelroomofferlist.DmOEadSF.min.js";
|
20
|
+
import { B as mr } from "./revolugo.bhotelsearchbar.DgBdyH6X.min.js";
|
21
|
+
import { p as pr } from "./revolugo.bstarrating.vue_vue_type_script_setup_true_lang.DD4SRw7w.min.js";
|
22
|
+
import { w as vr } from "./revolugo.watch-list.DFagwB6N.min.js";
|
23
|
+
import { T as yr } from "./revolugo.termsandconditions.B8wFEMtY.min.js";
|
24
|
+
import { u as br } from "./revolugo.hotelroomofferrequestcreator.props.lNEhbaT9.min.js";
|
25
|
+
import { p as Er, g as ye } from "./revolugo.use-breakpoint-service.CZ9QX96a.min.js";
|
26
|
+
import { V as Sr } from "./revolugo.bdaterangepicker.DSJE5n7Z.min.js";
|
27
|
+
function Mi(t) {
|
28
28
|
try {
|
29
29
|
if (typeof document < "u") {
|
30
30
|
window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
|
@@ -44,15 +44,15 @@ function Vi(t) {
|
|
44
44
|
console.error("[revolugo-elements] ", e);
|
45
45
|
}
|
46
46
|
}
|
47
|
-
const
|
47
|
+
const kr = {
|
48
48
|
FiltersBar: !0,
|
49
49
|
HotelOfferSearchMenu: !1,
|
50
50
|
TermsAndConditionsFooter: !0,
|
51
|
-
HotelOfferItem:
|
52
|
-
},
|
53
|
-
...
|
51
|
+
HotelOfferItem: Zi
|
52
|
+
}, Rr = {
|
53
|
+
...Xi,
|
54
54
|
features: {
|
55
|
-
default: () =>
|
55
|
+
default: () => kr,
|
56
56
|
type: [Object, String]
|
57
57
|
},
|
58
58
|
height: {
|
@@ -63,7 +63,7 @@ const Or = {
|
|
63
63
|
type: Number
|
64
64
|
},
|
65
65
|
limit: {
|
66
|
-
default:
|
66
|
+
default: er,
|
67
67
|
type: Number
|
68
68
|
},
|
69
69
|
loadingBarEnabled: {
|
@@ -82,7 +82,7 @@ const Or = {
|
|
82
82
|
function L(t) {
|
83
83
|
return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
|
84
84
|
}
|
85
|
-
function
|
85
|
+
function me(t) {
|
86
86
|
return function e(n) {
|
87
87
|
return arguments.length === 0 || L(n) ? e : t.apply(this, arguments);
|
88
88
|
};
|
@@ -93,19 +93,19 @@ function Ee(t) {
|
|
93
93
|
case 0:
|
94
94
|
return e;
|
95
95
|
case 1:
|
96
|
-
return L(n) ? e :
|
96
|
+
return L(n) ? e : me(function(i) {
|
97
97
|
return t(n, i);
|
98
98
|
});
|
99
99
|
default:
|
100
|
-
return L(n) && L(s) ? e : L(n) ?
|
100
|
+
return L(n) && L(s) ? e : L(n) ? me(function(i) {
|
101
101
|
return t(i, s);
|
102
|
-
}) : L(s) ?
|
102
|
+
}) : L(s) ? me(function(i) {
|
103
103
|
return t(n, i);
|
104
104
|
}) : t(n, s);
|
105
105
|
}
|
106
106
|
};
|
107
107
|
}
|
108
|
-
function
|
108
|
+
function vn(t) {
|
109
109
|
return function e(n, s, i) {
|
110
110
|
switch (arguments.length) {
|
111
111
|
case 0:
|
@@ -119,7 +119,7 @@ function pn(t) {
|
|
119
119
|
return t(r, s, a);
|
120
120
|
}) : L(s) ? Ee(function(r, a) {
|
121
121
|
return t(n, r, a);
|
122
|
-
}) :
|
122
|
+
}) : me(function(r) {
|
123
123
|
return t(n, s, r);
|
124
124
|
});
|
125
125
|
default:
|
@@ -129,40 +129,40 @@ function pn(t) {
|
|
129
129
|
return t(r, s, a);
|
130
130
|
}) : L(s) && L(i) ? Ee(function(r, a) {
|
131
131
|
return t(n, r, a);
|
132
|
-
}) : L(n) ?
|
132
|
+
}) : L(n) ? me(function(r) {
|
133
133
|
return t(r, s, i);
|
134
|
-
}) : L(s) ?
|
134
|
+
}) : L(s) ? me(function(r) {
|
135
135
|
return t(n, r, i);
|
136
|
-
}) : L(i) ?
|
136
|
+
}) : L(i) ? me(function(r) {
|
137
137
|
return t(n, s, r);
|
138
138
|
}) : t(n, s, i);
|
139
139
|
}
|
140
140
|
};
|
141
141
|
}
|
142
|
-
function
|
142
|
+
function gt(t, e) {
|
143
143
|
return Object.prototype.hasOwnProperty.call(e, t);
|
144
144
|
}
|
145
|
-
var
|
145
|
+
var Ir = /* @__PURE__ */ me(function(e) {
|
146
146
|
return e === null ? "Null" : e === void 0 ? "Undefined" : Object.prototype.toString.call(e).slice(8, -1);
|
147
147
|
});
|
148
148
|
function _n(t) {
|
149
149
|
return Object.prototype.toString.call(t) === "[object Object]";
|
150
150
|
}
|
151
|
-
const
|
151
|
+
const Tr = Number.isInteger || function(e) {
|
152
152
|
return e << 0 === e;
|
153
153
|
};
|
154
|
-
function
|
154
|
+
function Or(t) {
|
155
155
|
return Object.prototype.toString.call(t) === "[object String]";
|
156
156
|
}
|
157
|
-
function
|
157
|
+
function Ar(t, e) {
|
158
158
|
var n = t < 0 ? e.length + t : t;
|
159
|
-
return
|
159
|
+
return Or(e) ? e.charAt(n) : e[n];
|
160
160
|
}
|
161
|
-
function
|
161
|
+
function Dr(t) {
|
162
162
|
return new RegExp(t.source, t.flags ? t.flags : (t.global ? "g" : "") + (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.sticky ? "y" : "") + (t.unicode ? "u" : "") + (t.dotAll ? "s" : ""));
|
163
163
|
}
|
164
|
-
function
|
165
|
-
if (n || (n = new
|
164
|
+
function Ps(t, e, n) {
|
165
|
+
if (n || (n = new _r()), Cr(t))
|
166
166
|
return t;
|
167
167
|
var s = function(r) {
|
168
168
|
var a = n.get(t);
|
@@ -170,10 +170,10 @@ function Ls(t, e, n) {
|
|
170
170
|
return a;
|
171
171
|
n.set(t, r);
|
172
172
|
for (var u in t)
|
173
|
-
Object.prototype.hasOwnProperty.call(t, u) && (r[u] =
|
173
|
+
Object.prototype.hasOwnProperty.call(t, u) && (r[u] = Ps(t[u], !0, n));
|
174
174
|
return r;
|
175
175
|
};
|
176
|
-
switch (
|
176
|
+
switch (Ir(t)) {
|
177
177
|
case "Object":
|
178
178
|
return s(Object.create(Object.getPrototypeOf(t)));
|
179
179
|
case "Array":
|
@@ -181,7 +181,7 @@ function Ls(t, e, n) {
|
|
181
181
|
case "Date":
|
182
182
|
return new Date(t.valueOf());
|
183
183
|
case "RegExp":
|
184
|
-
return
|
184
|
+
return Dr(t);
|
185
185
|
case "Int8Array":
|
186
186
|
case "Uint8Array":
|
187
187
|
case "Uint8ClampedArray":
|
@@ -198,11 +198,11 @@ function Ls(t, e, n) {
|
|
198
198
|
return t;
|
199
199
|
}
|
200
200
|
}
|
201
|
-
function
|
201
|
+
function Cr(t) {
|
202
202
|
var e = typeof t;
|
203
203
|
return t == null || e != "object" && e != "function";
|
204
204
|
}
|
205
|
-
var
|
205
|
+
var _r = /* @__PURE__ */ function() {
|
206
206
|
function t() {
|
207
207
|
this.map = {}, this.length = 0;
|
208
208
|
}
|
@@ -232,41 +232,41 @@ var wr = /* @__PURE__ */ function() {
|
|
232
232
|
return i[1];
|
233
233
|
}
|
234
234
|
}, t;
|
235
|
-
}(),
|
236
|
-
return e != null && typeof e.clone == "function" ? e.clone() :
|
235
|
+
}(), T = /* @__PURE__ */ me(function(e) {
|
236
|
+
return e != null && typeof e.clone == "function" ? e.clone() : Ps(e);
|
237
237
|
});
|
238
|
-
function
|
238
|
+
function Pr(t, e) {
|
239
239
|
for (var n = e, s = 0; s < t.length; s += 1) {
|
240
240
|
if (n == null)
|
241
241
|
return;
|
242
242
|
var i = t[s];
|
243
|
-
|
243
|
+
Tr(i) ? n = Ar(i, n) : n = n[i];
|
244
244
|
}
|
245
245
|
return n;
|
246
246
|
}
|
247
|
-
var
|
247
|
+
var Nr = /* @__PURE__ */ vn(function(e, n, s) {
|
248
248
|
var i = {}, r;
|
249
249
|
n = n || {}, s = s || {};
|
250
250
|
for (r in n)
|
251
|
-
|
251
|
+
gt(r, n) && (i[r] = gt(r, s) ? e(r, n[r], s[r]) : n[r]);
|
252
252
|
for (r in s)
|
253
|
-
|
253
|
+
gt(r, s) && !gt(r, i) && (i[r] = s[r]);
|
254
254
|
return i;
|
255
|
-
}),
|
256
|
-
return
|
255
|
+
}), Lr = /* @__PURE__ */ vn(function t(e, n, s) {
|
256
|
+
return Nr(function(i, r, a) {
|
257
257
|
return _n(r) && _n(a) ? t(e, r, a) : e(i, r, a);
|
258
258
|
}, n, s);
|
259
|
-
}),
|
260
|
-
return
|
259
|
+
}), wr = /* @__PURE__ */ vn(function(e, n, s) {
|
260
|
+
return Lr(function(i, r, a) {
|
261
261
|
return e(r, a);
|
262
262
|
}, n, s);
|
263
|
-
}),
|
263
|
+
}), Mr = /* @__PURE__ */ Ee(Pr), Ns = /* @__PURE__ */ Ee(function(e, n) {
|
264
264
|
var s = {};
|
265
265
|
for (var i in n)
|
266
266
|
e(n[i], i, n) && (s[i] = n[i]);
|
267
267
|
return s;
|
268
268
|
});
|
269
|
-
const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply),
|
269
|
+
const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply), B = (t) => typeof t == "string", ne = (t) => t === null, G = (t) => typeof t > "u", le = (t) => ne(t) || G(t), $r = (t) => typeof t == "bigint", N = (t) => !G(t), qe = (t) => !le(t), Ur = (t) => qe(t) && t !== "", yn = (t) => {
|
270
270
|
switch (Object.prototype.toString.call(t)) {
|
271
271
|
case "[object Error]":
|
272
272
|
case "[object Exception]":
|
@@ -275,93 +275,93 @@ const S = (t) => typeof t == "function" && !!(t.constructor && t.call && t.apply
|
|
275
275
|
default:
|
276
276
|
return t instanceof Error;
|
277
277
|
}
|
278
|
-
},
|
278
|
+
}, nn = (t, e) => {
|
279
279
|
const n = e.split(".");
|
280
|
-
return
|
281
|
-
},
|
280
|
+
return Mr(n, t);
|
281
|
+
}, Br = (t, e) => !!nn(t, e), Vr = (t) => typeof t == "object", Fr = (t) => !ne(t) && Vr(t) && !Array.isArray(t), w = (t) => !ne(t) && Object.prototype.toString.call(t) === "[object Object]", Hr = (t, e) => {
|
282
282
|
if (!Array.isArray(t) || !Array.isArray(e))
|
283
|
-
return
|
284
|
-
const n =
|
283
|
+
return T(e);
|
284
|
+
const n = T(t);
|
285
285
|
return e.forEach((s, i) => {
|
286
|
-
n[i] = Array.isArray(s) ||
|
286
|
+
n[i] = Array.isArray(s) || Fr(s) ? (
|
287
287
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
288
|
-
|
288
|
+
H(n[i], s)
|
289
289
|
) : s;
|
290
290
|
}), n;
|
291
|
-
},
|
292
|
-
const e =
|
291
|
+
}, H = (t, e) => wr(Hr, t, e), Ie = (t) => w(t) && Object.keys(t).length > 0, et = (t) => {
|
292
|
+
const e = Ns(N, t);
|
293
293
|
return Object.keys(e).forEach((n) => {
|
294
294
|
const s = e[n];
|
295
|
-
w(s) && (e[n] =
|
295
|
+
w(s) && (e[n] = et(s));
|
296
296
|
}), e;
|
297
|
-
},
|
298
|
-
const e =
|
297
|
+
}, Pt = (t) => {
|
298
|
+
const e = Ns(qe, t);
|
299
299
|
return Object.keys(e).forEach((n) => {
|
300
300
|
const s = e[n];
|
301
|
-
w(s) && (e[n] =
|
301
|
+
w(s) && (e[n] = Pt(s));
|
302
302
|
}), e;
|
303
|
-
},
|
304
|
-
if (
|
305
|
-
return
|
306
|
-
}, ue = (t, e) => typeof t == "boolean" ? t : e,
|
303
|
+
}, be = (t) => {
|
304
|
+
if (Ie(t))
|
305
|
+
return Pt(t);
|
306
|
+
}, ue = (t, e) => typeof t == "boolean" ? t : e, xr = (t) => t.replace(/^\s+|\s+$/gm, ""), Pn = (t) => t.replace(/^\.+/, ""), Nt = (t) => {
|
307
307
|
let e = t;
|
308
|
-
if (!
|
308
|
+
if (!B(t) && !le(t))
|
309
309
|
try {
|
310
310
|
e = JSON.stringify(t);
|
311
311
|
} catch {
|
312
312
|
e = null;
|
313
313
|
}
|
314
314
|
return e;
|
315
|
-
},
|
315
|
+
}, Gr = (t) => {
|
316
316
|
const e = Array.from(t, (n) => String.fromCodePoint(n)).join("");
|
317
317
|
return globalThis.btoa(e);
|
318
|
-
},
|
318
|
+
}, jr = (t) => Gr(new TextEncoder().encode(t)), Lt = (t, e, n, s, i) => {
|
319
319
|
const r = { category: t, name: e, properties: n, options: s, callback: void 0 };
|
320
|
-
S(i) && (r.callback = i), S(s) && (r.category = t, r.name = e, r.properties = n, r.options = void 0, r.callback = s), S(n) && (r.category = t, r.name = e, r.properties = void 0, r.options = void 0, r.callback = n), S(e) && (r.category = t, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = e), S(t) && (r.category = void 0, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = t), w(t) ? (r.name = void 0, r.category = void 0, r.properties = t, S(e) ? r.options = void 0 : r.options = e) : w(e) && (r.name = void 0, r.properties = e, S(n) ? r.options = void 0 : r.options = n),
|
321
|
-
const a =
|
322
|
-
return r.properties =
|
323
|
-
},
|
320
|
+
S(i) && (r.callback = i), S(s) && (r.category = t, r.name = e, r.properties = n, r.options = void 0, r.callback = s), S(n) && (r.category = t, r.name = e, r.properties = void 0, r.options = void 0, r.callback = n), S(e) && (r.category = t, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = e), S(t) && (r.category = void 0, r.name = void 0, r.properties = void 0, r.options = void 0, r.callback = t), w(t) ? (r.name = void 0, r.category = void 0, r.properties = t, S(e) ? r.options = void 0 : r.options = e) : w(e) && (r.name = void 0, r.properties = e, S(n) ? r.options = void 0 : r.options = n), B(t) && !B(e) && (r.category = void 0, r.name = t), N(r.category) || (r.category = void 0), N(r.name) || (r.name = void 0), r.properties = r.properties ? T(r.properties) : {}, N(r.options) ? r.options = T(r.options) : r.options = void 0;
|
321
|
+
const a = B(r.name) ? r.name : r.properties.name, u = B(r.category) ? r.category : r.properties.category;
|
322
|
+
return r.properties = H(w(r.properties) ? r.properties : {}, { ...a && { name: a }, ...u && { category: u } }), r;
|
323
|
+
}, bn = (t, e, n, s) => {
|
324
324
|
const i = { name: t, properties: e, options: n, callback: void 0 };
|
325
|
-
return S(s) && (i.callback = s), S(n) && (i.properties = e, i.options = void 0, i.callback = n), S(e) && (i.properties = void 0, i.options = void 0, i.callback = e), i.properties = qe(i.properties) ?
|
326
|
-
},
|
325
|
+
return S(s) && (i.callback = s), S(n) && (i.properties = e, i.options = void 0, i.callback = n), S(e) && (i.properties = void 0, i.options = void 0, i.callback = e), i.properties = qe(i.properties) ? T(i.properties) : {}, N(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
326
|
+
}, Ls = (t, e, n, s) => {
|
327
327
|
const i = { userId: t, traits: e, options: n, callback: void 0 };
|
328
|
-
return S(s) && (i.callback = s), S(n) && (i.userId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.userId = t, i.traits = void 0, i.options = void 0, i.callback = e), (w(t) || ne(t)) && (i.userId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.userId =
|
329
|
-
},
|
328
|
+
return S(s) && (i.callback = s), S(n) && (i.userId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.userId = t, i.traits = void 0, i.options = void 0, i.callback = e), (w(t) || ne(t)) && (i.userId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.userId = Nt(i.userId), w(i.traits) ? i.traits = T(i.traits) : i.traits = void 0, N(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
329
|
+
}, ws = (t, e, n, s) => {
|
330
330
|
const i = { to: t, from: e, options: n, callback: void 0 };
|
331
|
-
return S(s) && (i.callback = s), S(n) && (i.to = t, i.from = e, i.options = void 0, i.callback = n), S(e) ? (i.to = t, i.from = void 0, i.options = void 0, i.callback = e) : (w(e) || ne(e)) && (i.to = t, i.from = void 0, i.options = e),
|
332
|
-
},
|
331
|
+
return S(s) && (i.callback = s), S(n) && (i.to = t, i.from = e, i.options = void 0, i.callback = n), S(e) ? (i.to = t, i.from = void 0, i.options = void 0, i.callback = e) : (w(e) || ne(e)) && (i.to = t, i.from = void 0, i.options = e), N(i.to) && (i.to = Nt(i.to)), N(i.from) ? i.from = Nt(i.from) : i.from = void 0, N(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
332
|
+
}, Ms = (t, e, n, s) => {
|
333
333
|
const i = { groupId: t, traits: e, options: n, callback: void 0 };
|
334
|
-
return S(s) && (i.callback = s), S(n) && (i.groupId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.groupId = t, i.traits = void 0, i.options = void 0, i.callback = e), (w(t) || ne(t)) && (i.groupId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.groupId =
|
334
|
+
return S(s) && (i.callback = s), S(n) && (i.groupId = t, i.traits = e, i.options = void 0, i.callback = n), S(e) && (i.groupId = t, i.traits = void 0, i.options = void 0, i.callback = e), (w(t) || ne(t)) && (i.groupId = null, i.traits = t, S(e) ? i.options = void 0 : i.options = e), i.groupId = Nt(i.groupId), w(i.traits) ? i.traits = T(i.traits) : i.traits = void 0, N(i.options) ? i.options = T(i.options) : i.options = void 0, i;
|
335
335
|
};
|
336
|
-
let
|
336
|
+
let Gt = /* @__PURE__ */ function(t) {
|
337
337
|
return t.UNLOADED = "Page Unloaded", t;
|
338
338
|
}({});
|
339
|
-
const
|
340
|
-
function
|
339
|
+
const En = "API", sn = "CapabilitiesManager", te = "ConfigManager", $s = "EventManager", mt = "PluginsManager", De = "UserSessionManager", tt = "ErrorHandler", Be = "PluginEngine", qr = "StoreManager", jt = `Ready${En}`, zr = `Load${En}`, Kr = "ExternalSrcLoader", Yr = "HttpClient", Wr = "RudderStackAnalytics", qt = "AnalyticsCore";
|
340
|
+
function Qr(t) {
|
341
341
|
return crypto.getRandomValues(new Uint8Array(t));
|
342
342
|
}
|
343
|
-
var Nn = 4096,
|
343
|
+
var Nn = 4096, kt = [], ke = 0, zt;
|
344
344
|
for (; ke < 256; ke++)
|
345
|
-
|
346
|
-
function
|
347
|
-
(!
|
345
|
+
kt[ke] = (ke + 256).toString(16).substring(1);
|
346
|
+
function Xr() {
|
347
|
+
(!zt || ke + 16 > Nn) && (zt = Qr(Nn), ke = 0);
|
348
348
|
for (var t = 0, e, n = ""; t < 16; t++)
|
349
|
-
e =
|
349
|
+
e = zt[ke + t], t == 6 ? n += kt[e & 15 | 64] : t == 8 ? n += kt[e & 63 | 128] : n += kt[e], t & 1 && t > 1 && t < 11 && (n += "-");
|
350
350
|
return ke += 16, n;
|
351
351
|
}
|
352
|
-
var Ne = 256,
|
353
|
-
for (; Ne--; )
|
354
|
-
function
|
352
|
+
var Ne = 256, Rt = [], pt;
|
353
|
+
for (; Ne--; ) Rt[Ne] = (Ne + 256).toString(16).substring(1);
|
354
|
+
function Jr() {
|
355
355
|
var t = 0, e, n = "";
|
356
|
-
if (!
|
357
|
-
for (
|
356
|
+
if (!pt || Ne + 16 > 256) {
|
357
|
+
for (pt = Array(t = 256); t--; ) pt[t] = 256 * Math.random() | 0;
|
358
358
|
t = Ne = 0;
|
359
359
|
}
|
360
360
|
for (; t < 16; t++)
|
361
|
-
e =
|
361
|
+
e = pt[Ne + t], t == 6 ? n += Rt[e & 15 | 64] : t == 8 ? n += Rt[e & 63 | 128] : n += Rt[e], t & 1 && t > 1 && t < 11 && (n += "-");
|
362
362
|
return Ne++, n;
|
363
363
|
}
|
364
|
-
const
|
364
|
+
const Zr = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues), Vt = () => Zr() ? Xr() : Jr(), eo = (t) => {
|
365
365
|
let e = !1, n = !1;
|
366
366
|
function s() {
|
367
367
|
e || (e = !0, t(n), setTimeout(() => {
|
@@ -379,7 +379,7 @@ const no = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues),
|
|
379
379
|
}), document.addEventListener("visibilitychange", () => {
|
380
380
|
n = !0, document.visibilityState === "hidden" ? s() : e = !1;
|
381
381
|
});
|
382
|
-
},
|
382
|
+
}, Us = (t) => t.toISOString(), to = () => Us(/* @__PURE__ */ new Date()), R = ":: ", no = (t) => `A script with the id "${t}" is already loaded. Skipping the loading of this script to prevent conflicts.`, Ln = (t, e) => `Failed to load the script with the id "${t}" from URL "${e}".`, so = (t, e, n) => `A timeout of ${n} ms occurred while trying to load the script with id "${t}" from URL "${e}".`, io = (t, e) => `${t}${R}A circular reference has been detected in the object and the property "${e}" has been dropped from the output.`, ro = "Failed to convert the value to a JSON string.", oo = "Failed to encode the cookie data.", ao = "JSONStringify", lo = "[BigInt]", Bs = "[Circular Reference]", uo = (t, e, n) => {
|
383
383
|
const s = [];
|
384
384
|
return function(i, r) {
|
385
385
|
if (!(e != null && e.includes(i)) && !(t && le(r))) {
|
@@ -387,71 +387,71 @@ const no = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues),
|
|
387
387
|
return r;
|
388
388
|
for (; s.length > 0 && s[s.length - 1] !== this; )
|
389
389
|
s.pop();
|
390
|
-
return s.includes(r) ? (n == null || n.warn(ao
|
390
|
+
return s.includes(r) ? (n == null || n.warn(io(ao, i)), Bs) : (s.push(r), r);
|
391
391
|
}
|
392
392
|
};
|
393
393
|
}, de = (t, e, n, s) => {
|
394
394
|
try {
|
395
|
-
return JSON.stringify(t,
|
395
|
+
return JSON.stringify(t, uo(e, n, s));
|
396
396
|
} catch (i) {
|
397
|
-
return s == null || s.warn(
|
397
|
+
return s == null || s.warn(ro, i), null;
|
398
398
|
}
|
399
|
-
},
|
399
|
+
}, co = (t) => {
|
400
400
|
const e = [];
|
401
401
|
return function(s, i) {
|
402
|
-
if (
|
403
|
-
return
|
402
|
+
if ($r(i))
|
403
|
+
return lo;
|
404
404
|
for (; e.length > 0 && e[e.length - 1] !== this; )
|
405
405
|
e.pop();
|
406
|
-
return e.includes(i) ?
|
406
|
+
return e.includes(i) ? Bs : (e.push(i), i);
|
407
407
|
};
|
408
|
-
},
|
408
|
+
}, Vs = (t, e) => {
|
409
409
|
const n = Array.isArray(t) ? [] : {};
|
410
410
|
for (const s in t)
|
411
411
|
if (Object.hasOwnProperty.call(t, s)) {
|
412
412
|
const i = t[s], r = e.call(t, s, i);
|
413
|
-
w(r) || Array.isArray(r) ? n[s] =
|
413
|
+
w(r) || Array.isArray(r) ? n[s] = Vs(r, e) : n[s] = r;
|
414
414
|
}
|
415
415
|
return n;
|
416
416
|
}, A = (t, e) => {
|
417
|
-
const n =
|
418
|
-
return w(t) || Array.isArray(t) ?
|
419
|
-
},
|
417
|
+
const n = co(), s = n.call(t, "", t);
|
418
|
+
return w(t) || Array.isArray(t) ? Vs(t, n) : s;
|
419
|
+
}, It = "[SDK DISPATCHED ERROR]", Sn = (t) => {
|
420
420
|
const { stack: e, stacktrace: n } = t, s = t["opera#sourceloc"], i = e ?? n ?? s;
|
421
421
|
if (i && typeof i == "string")
|
422
422
|
return i;
|
423
|
-
},
|
423
|
+
}, dt = (t, e) => {
|
424
424
|
let n = t;
|
425
|
-
return
|
426
|
-
},
|
427
|
-
if (
|
428
|
-
const e =
|
425
|
+
return yn(t) ? n.message = `${e}: ${t.message}` : n = new Error(`${e}: ${de(t)}`), n;
|
426
|
+
}, U = (t) => {
|
427
|
+
if (yn(t)) {
|
428
|
+
const e = Sn(t);
|
429
429
|
if (e) {
|
430
430
|
const { stack: n, stacktrace: s } = t, i = t["opera#sourceloc"];
|
431
431
|
switch (e) {
|
432
432
|
case n:
|
433
433
|
t.stack = `${n}
|
434
|
-
${
|
434
|
+
${It}`;
|
435
435
|
break;
|
436
436
|
case s:
|
437
437
|
t.stacktrace = `${s}
|
438
|
-
${
|
438
|
+
${It}`;
|
439
439
|
break;
|
440
440
|
case i:
|
441
441
|
default:
|
442
442
|
t["opera#sourceloc"] = `${i}
|
443
|
-
${
|
443
|
+
${It}`;
|
444
444
|
break;
|
445
445
|
}
|
446
446
|
}
|
447
447
|
}
|
448
448
|
globalThis.dispatchEvent(new ErrorEvent("error", { error: t, bubbles: !0, cancelable: !0, composed: !0 }));
|
449
|
-
}, wn = "RudderLabs JavaScript SDK",
|
449
|
+
}, wn = "RudderLabs JavaScript SDK", at = "3.19.0", fo = "com.rudderlabs.javascript", Fs = "npm", Mn = "RudderJS-Initiated", ho = "ad-block page request", go = "/ad-blocked", it = "preloadedEventsBuffer", mo = "Consent Management Interaction", po = "ajs_trait_", vo = "ajs_prop_", $n = "ajs_aid", Un = "ajs_uid", Bn = "ajs_event", yo = 10 * 1e3, bo = 31536e3 * 1e3, Vn = 12 * 60 * 60 * 1e3, rn = 30 * 60 * 1e3, Fn = 10 * 1e3, Eo = 10 * 1e3, So = 250, Hs = (t = "app") => {
|
450
450
|
globalThis.RudderStackGlobals || (globalThis.RudderStackGlobals = {}), globalThis.RudderStackGlobals[t] || (globalThis.RudderStackGlobals[t] = {});
|
451
|
-
},
|
452
|
-
|
453
|
-
},
|
454
|
-
function
|
451
|
+
}, lt = (t, e, n = "app") => {
|
452
|
+
Hs(n), globalThis.RudderStackGlobals[n][t] = e;
|
453
|
+
}, xs = (t, e = "app") => (Hs(e), globalThis.RudderStackGlobals[e][t]);
|
454
|
+
function ko(t, e, n = So) {
|
455
455
|
let s;
|
456
456
|
return (...i) => {
|
457
457
|
globalThis.clearTimeout(s), s = globalThis.setTimeout(() => {
|
@@ -459,7 +459,7 @@ function Io(t, e, n = To) {
|
|
459
459
|
}, n);
|
460
460
|
};
|
461
461
|
}
|
462
|
-
const
|
462
|
+
const Hn = (t, e) => {
|
463
463
|
const n = {};
|
464
464
|
return t.forEach((s, i) => {
|
465
465
|
if (i.startsWith(e)) {
|
@@ -467,45 +467,45 @@ const xn = (t, e) => {
|
|
467
467
|
n[r] = t.get(i);
|
468
468
|
}
|
469
469
|
}), n;
|
470
|
-
},
|
471
|
-
const e = { trait:
|
472
|
-
n.get(Bn) && t.unshift(["track", n.get(Bn),
|
473
|
-
},
|
470
|
+
}, Ro = (t = []) => {
|
471
|
+
const e = { trait: po, properties: vo }, n = new URLSearchParams(globalThis.location.search);
|
472
|
+
n.get(Bn) && t.unshift(["track", n.get(Bn), Hn(n, e.properties)]), n.get(Un) && t.unshift(["identify", n.get(Un), Hn(n, e.trait)]), n.get($n) && t.unshift(["setAnonymousId", n.get($n)]);
|
473
|
+
}, Io = (t) => {
|
474
474
|
const e = "load";
|
475
475
|
let n = [], s = 0;
|
476
476
|
for (; s < t.length; ) {
|
477
477
|
if (t[s] && t[s][0] === e) {
|
478
|
-
n =
|
478
|
+
n = T(t[s]), t.splice(s, 1);
|
479
479
|
break;
|
480
480
|
}
|
481
481
|
s += 1;
|
482
482
|
}
|
483
483
|
return n;
|
484
|
-
},
|
484
|
+
}, To = (t) => {
|
485
485
|
const e = "consent", n = t.filter((i) => i[0] === e), s = t.filter((i) => i[0] !== e);
|
486
486
|
t.splice(0, t.length, ...n, ...s);
|
487
|
-
},
|
488
|
-
const e =
|
489
|
-
|
490
|
-
},
|
487
|
+
}, Oo = (t) => {
|
488
|
+
const e = xs(it) || [];
|
489
|
+
Ro(e), e.length > 0 && (t.enqueuePreloadBufferEvents(e), lt(it, []));
|
490
|
+
}, Ao = (t, e) => {
|
491
491
|
const n = t.shift();
|
492
492
|
let s;
|
493
493
|
if (S(e[n])) {
|
494
494
|
switch (n) {
|
495
495
|
case "page":
|
496
|
-
s =
|
496
|
+
s = Lt(...t);
|
497
497
|
break;
|
498
498
|
case "track":
|
499
|
-
s =
|
499
|
+
s = bn(...t);
|
500
500
|
break;
|
501
501
|
case "identify":
|
502
|
-
s =
|
502
|
+
s = Ls(...t);
|
503
503
|
break;
|
504
504
|
case "alias":
|
505
|
-
s =
|
505
|
+
s = ws(...t);
|
506
506
|
break;
|
507
507
|
case "group":
|
508
|
-
s =
|
508
|
+
s = Ms(...t);
|
509
509
|
break;
|
510
510
|
default:
|
511
511
|
e[n](...t);
|
@@ -513,12 +513,12 @@ const xn = (t, e) => {
|
|
513
513
|
}
|
514
514
|
s && e[n](s);
|
515
515
|
}
|
516
|
-
},
|
516
|
+
}, Do = 10 * 1e3, Co = "RS_JS_SDK", _o = (t, e, n = !0, s = null, i = null, r = {}) => {
|
517
517
|
const a = document.createElement("script");
|
518
518
|
return a.type = "text/javascript", a.onload = s, a.onerror = i, a.src = t, a.id = e, a.async = n, Object.keys(r).forEach((u) => {
|
519
519
|
a.setAttribute(u, r[u]);
|
520
|
-
}), a.setAttribute("data-loader",
|
521
|
-
},
|
520
|
+
}), a.setAttribute("data-loader", Co), a;
|
521
|
+
}, Po = (t) => {
|
522
522
|
var r, a, u, l;
|
523
523
|
const e = document.getElementsByTagName("head");
|
524
524
|
if (e.length > 0) {
|
@@ -534,47 +534,53 @@ const xn = (t, e) => {
|
|
534
534
|
s.appendChild(t);
|
535
535
|
const i = document.getElementsByTagName("html")[0];
|
536
536
|
i == null || i.insertBefore(s, i.firstChild);
|
537
|
-
},
|
538
|
-
document.getElementById(e) && a(new Error(
|
537
|
+
}, No = (t, e, n, s = !0, i) => new Promise((r, a) => {
|
538
|
+
document.getElementById(e) && a(new Error(no(e)));
|
539
539
|
try {
|
540
540
|
let l;
|
541
|
-
|
541
|
+
Po(_o(t, e, s, () => {
|
542
542
|
globalThis.clearTimeout(l), r(e);
|
543
|
-
}, (
|
544
|
-
globalThis.clearTimeout(l), a(new Error(Ln(e, t
|
543
|
+
}, () => {
|
544
|
+
globalThis.clearTimeout(l), a(new Error(Ln(e, t)));
|
545
545
|
}, i)), l = globalThis.setTimeout(() => {
|
546
|
-
a(new Error(
|
546
|
+
a(new Error(so(e, t, n)));
|
547
547
|
}, n);
|
548
548
|
} catch (l) {
|
549
|
-
a(
|
549
|
+
a(dt(l, Ln(e, t)));
|
550
550
|
}
|
551
551
|
});
|
552
|
-
class
|
553
|
-
constructor(e, n =
|
554
|
-
this.
|
552
|
+
class Gs {
|
553
|
+
constructor(e, n, s = Do) {
|
554
|
+
this.errorHandler = e, this.logger = n, this.timeout = s, this.onError = this.onError.bind(this);
|
555
555
|
}
|
556
556
|
/**
|
557
557
|
* Load external resource of type javascript
|
558
558
|
*/
|
559
559
|
loadJSFile(e) {
|
560
560
|
const { url: n, id: s, timeout: i, async: r, callback: a, extraAttributes: u } = e, l = !S(a);
|
561
|
-
|
561
|
+
No(n, s, i || this.timeout, r, u).then((c) => {
|
562
562
|
l || a(c);
|
563
563
|
}).catch((c) => {
|
564
|
-
l || a(
|
564
|
+
this.onError(c), l || a();
|
565
565
|
});
|
566
566
|
}
|
567
|
+
/**
|
568
|
+
* Handle errors
|
569
|
+
*/
|
570
|
+
onError(e) {
|
571
|
+
this.errorHandler.onError(e, Kr);
|
572
|
+
}
|
567
573
|
}
|
568
|
-
var
|
569
|
-
function
|
574
|
+
var Lo = Symbol.for("preact-signals");
|
575
|
+
function Ft() {
|
570
576
|
if (Re > 1)
|
571
577
|
Re--;
|
572
578
|
else {
|
573
|
-
for (var t, e = !1;
|
574
|
-
var n =
|
575
|
-
for (
|
579
|
+
for (var t, e = !1; rt !== void 0; ) {
|
580
|
+
var n = rt;
|
581
|
+
for (rt = void 0, on++; n !== void 0; ) {
|
576
582
|
var s = n.o;
|
577
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
583
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && qs(n)) try {
|
578
584
|
n.c();
|
579
585
|
} catch (i) {
|
580
586
|
e || (t = i, e = !0);
|
@@ -582,7 +588,7 @@ function Vt() {
|
|
582
588
|
n = s;
|
583
589
|
}
|
584
590
|
}
|
585
|
-
if (
|
591
|
+
if (on = 0, Re--, e) throw t;
|
586
592
|
}
|
587
593
|
}
|
588
594
|
function j(t) {
|
@@ -591,21 +597,11 @@ function j(t) {
|
|
591
597
|
try {
|
592
598
|
return t();
|
593
599
|
} finally {
|
594
|
-
|
600
|
+
Ft();
|
595
601
|
}
|
596
602
|
}
|
597
|
-
var D = void 0;
|
598
|
-
function
|
599
|
-
var e = D;
|
600
|
-
D = void 0;
|
601
|
-
try {
|
602
|
-
return t();
|
603
|
-
} finally {
|
604
|
-
D = e;
|
605
|
-
}
|
606
|
-
}
|
607
|
-
var ot = void 0, Re = 0, rn = 0, Lt = 0;
|
608
|
-
function Ks(t) {
|
603
|
+
var D = void 0, rt = void 0, Re = 0, on = 0, wt = 0;
|
604
|
+
function js(t) {
|
609
605
|
if (D !== void 0) {
|
610
606
|
var e = t.n;
|
611
607
|
if (e === void 0 || e.t !== D)
|
@@ -614,33 +610,25 @@ function Ks(t) {
|
|
614
610
|
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = D.s, e.n = void 0, D.s.n = e, D.s = e), e;
|
615
611
|
}
|
616
612
|
}
|
617
|
-
function q(t
|
618
|
-
this.v = t, this.i = 0, this.n = void 0, this.t = void 0
|
613
|
+
function q(t) {
|
614
|
+
this.v = t, this.i = 0, this.n = void 0, this.t = void 0;
|
619
615
|
}
|
620
|
-
q.prototype.brand =
|
616
|
+
q.prototype.brand = Lo;
|
621
617
|
q.prototype.h = function() {
|
622
618
|
return !0;
|
623
619
|
};
|
624
620
|
q.prototype.S = function(t) {
|
625
|
-
|
626
|
-
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : zs(function() {
|
627
|
-
var s;
|
628
|
-
(s = e.W) == null || s.call(e);
|
629
|
-
}));
|
621
|
+
this.t !== t && t.e === void 0 && (t.x = this.t, this.t !== void 0 && (this.t.e = t), this.t = t);
|
630
622
|
};
|
631
623
|
q.prototype.U = function(t) {
|
632
|
-
var e = this;
|
633
624
|
if (this.t !== void 0) {
|
634
|
-
var
|
635
|
-
|
636
|
-
var i;
|
637
|
-
(i = e.Z) == null || i.call(e);
|
638
|
-
}));
|
625
|
+
var e = t.e, n = t.x;
|
626
|
+
e !== void 0 && (e.x = n, t.e = void 0), n !== void 0 && (n.e = e, t.x = void 0), t === this.t && (this.t = n);
|
639
627
|
}
|
640
628
|
};
|
641
629
|
q.prototype.subscribe = function(t) {
|
642
630
|
var e = this;
|
643
|
-
return
|
631
|
+
return pe(function() {
|
644
632
|
var n = e.value, s = D;
|
645
633
|
D = void 0;
|
646
634
|
try {
|
@@ -669,27 +657,27 @@ q.prototype.peek = function() {
|
|
669
657
|
}
|
670
658
|
};
|
671
659
|
Object.defineProperty(q.prototype, "value", { get: function() {
|
672
|
-
var t =
|
660
|
+
var t = js(this);
|
673
661
|
return t !== void 0 && (t.i = this.i), this.v;
|
674
662
|
}, set: function(t) {
|
675
663
|
if (t !== this.v) {
|
676
|
-
if (
|
677
|
-
this.v = t, this.i++,
|
664
|
+
if (on > 100) throw new Error("Cycle detected");
|
665
|
+
this.v = t, this.i++, wt++, Re++;
|
678
666
|
try {
|
679
667
|
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
|
680
668
|
} finally {
|
681
|
-
|
669
|
+
Ft();
|
682
670
|
}
|
683
671
|
}
|
684
672
|
} });
|
685
|
-
function p(t
|
686
|
-
return new q(t
|
673
|
+
function p(t) {
|
674
|
+
return new q(t);
|
687
675
|
}
|
688
|
-
function
|
676
|
+
function qs(t) {
|
689
677
|
for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
|
690
678
|
return !1;
|
691
679
|
}
|
692
|
-
function
|
680
|
+
function zs(t) {
|
693
681
|
for (var e = t.s; e !== void 0; e = e.n) {
|
694
682
|
var n = e.S.n;
|
695
683
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
@@ -698,58 +686,57 @@ function Ws(t) {
|
|
698
686
|
}
|
699
687
|
}
|
700
688
|
}
|
701
|
-
function
|
689
|
+
function Ks(t) {
|
702
690
|
for (var e = t.s, n = void 0; e !== void 0; ) {
|
703
691
|
var s = e.p;
|
704
692
|
e.i === -1 ? (e.S.U(e), s !== void 0 && (s.n = e.n), e.n !== void 0 && (e.n.p = s)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = s;
|
705
693
|
}
|
706
694
|
t.s = n;
|
707
695
|
}
|
708
|
-
function
|
709
|
-
q.call(this, void 0), this.x = t, this.s = void 0, this.g =
|
696
|
+
function ft(t) {
|
697
|
+
q.call(this, void 0), this.x = t, this.s = void 0, this.g = wt - 1, this.f = 4;
|
710
698
|
}
|
711
|
-
|
712
|
-
We.prototype.h = function() {
|
699
|
+
(ft.prototype = new q()).h = function() {
|
713
700
|
if (this.f &= -3, 1 & this.f) return !1;
|
714
|
-
if ((36 & this.f) == 32 || (this.f &= -5, this.g ===
|
715
|
-
if (this.g =
|
701
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === wt)) return !0;
|
702
|
+
if (this.g = wt, this.f |= 1, this.i > 0 && !qs(this))
|
716
703
|
return this.f &= -2, !0;
|
717
704
|
var t = D;
|
718
705
|
try {
|
719
|
-
|
706
|
+
zs(this), D = this;
|
720
707
|
var e = this.x();
|
721
708
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
722
709
|
} catch (n) {
|
723
710
|
this.v = n, this.f |= 16, this.i++;
|
724
711
|
}
|
725
|
-
return D = t,
|
712
|
+
return D = t, Ks(this), this.f &= -2, !0;
|
726
713
|
};
|
727
|
-
|
714
|
+
ft.prototype.S = function(t) {
|
728
715
|
if (this.t === void 0) {
|
729
716
|
this.f |= 36;
|
730
717
|
for (var e = this.s; e !== void 0; e = e.n) e.S.S(e);
|
731
718
|
}
|
732
719
|
q.prototype.S.call(this, t);
|
733
720
|
};
|
734
|
-
|
721
|
+
ft.prototype.U = function(t) {
|
735
722
|
if (this.t !== void 0 && (q.prototype.U.call(this, t), this.t === void 0)) {
|
736
723
|
this.f &= -33;
|
737
724
|
for (var e = this.s; e !== void 0; e = e.n) e.S.U(e);
|
738
725
|
}
|
739
726
|
};
|
740
|
-
|
727
|
+
ft.prototype.N = function() {
|
741
728
|
if (!(2 & this.f)) {
|
742
729
|
this.f |= 6;
|
743
730
|
for (var t = this.t; t !== void 0; t = t.x) t.t.N();
|
744
731
|
}
|
745
732
|
};
|
746
|
-
Object.defineProperty(
|
733
|
+
Object.defineProperty(ft.prototype, "value", { get: function() {
|
747
734
|
if (1 & this.f) throw new Error("Cycle detected");
|
748
|
-
var t =
|
735
|
+
var t = js(this);
|
749
736
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
750
737
|
return this.v;
|
751
738
|
} });
|
752
|
-
function
|
739
|
+
function Ys(t) {
|
753
740
|
var e = t.u;
|
754
741
|
if (t.u = void 0, typeof e == "function") {
|
755
742
|
Re++;
|
@@ -760,22 +747,22 @@ function Xs(t) {
|
|
760
747
|
} catch (s) {
|
761
748
|
throw t.f &= -2, t.f |= 8, kn(t), s;
|
762
749
|
} finally {
|
763
|
-
D = n,
|
750
|
+
D = n, Ft();
|
764
751
|
}
|
765
752
|
}
|
766
753
|
}
|
767
754
|
function kn(t) {
|
768
755
|
for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
|
769
|
-
t.x = void 0, t.s = void 0,
|
756
|
+
t.x = void 0, t.s = void 0, Ys(t);
|
770
757
|
}
|
771
|
-
function
|
758
|
+
function wo(t) {
|
772
759
|
if (D !== this) throw new Error("Out-of-order effect");
|
773
|
-
|
760
|
+
Ks(this), D = t, this.f &= -2, 8 & this.f && kn(this), Ft();
|
774
761
|
}
|
775
|
-
function
|
762
|
+
function ht(t) {
|
776
763
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
777
764
|
}
|
778
|
-
|
765
|
+
ht.prototype.c = function() {
|
779
766
|
var t = this.S();
|
780
767
|
try {
|
781
768
|
if (8 & this.f || this.x === void 0) return;
|
@@ -785,20 +772,20 @@ ft.prototype.c = function() {
|
|
785
772
|
t();
|
786
773
|
}
|
787
774
|
};
|
788
|
-
|
775
|
+
ht.prototype.S = function() {
|
789
776
|
if (1 & this.f) throw new Error("Cycle detected");
|
790
|
-
this.f |= 1, this.f &= -9,
|
777
|
+
this.f |= 1, this.f &= -9, Ys(this), zs(this), Re++;
|
791
778
|
var t = D;
|
792
|
-
return D = this,
|
779
|
+
return D = this, wo.bind(this, t);
|
793
780
|
};
|
794
|
-
|
795
|
-
2 & this.f || (this.f |= 2, this.o =
|
781
|
+
ht.prototype.N = function() {
|
782
|
+
2 & this.f || (this.f |= 2, this.o = rt, rt = this);
|
796
783
|
};
|
797
|
-
|
784
|
+
ht.prototype.d = function() {
|
798
785
|
this.f |= 8, 1 & this.f || kn(this);
|
799
786
|
};
|
800
|
-
function
|
801
|
-
var e = new
|
787
|
+
function pe(t) {
|
788
|
+
var e = new ht(t);
|
802
789
|
try {
|
803
790
|
e.c();
|
804
791
|
} catch (n) {
|
@@ -806,7 +793,7 @@ function ve(t) {
|
|
806
793
|
}
|
807
794
|
return e.d.bind(e);
|
808
795
|
}
|
809
|
-
class
|
796
|
+
class Mo {
|
810
797
|
constructor() {
|
811
798
|
this.items = [];
|
812
799
|
}
|
@@ -826,10 +813,10 @@ class Bo {
|
|
826
813
|
this.items = [];
|
827
814
|
}
|
828
815
|
}
|
829
|
-
const
|
830
|
-
class
|
831
|
-
constructor(e =
|
832
|
-
this.minLogLevel =
|
816
|
+
const vt = { LOG: 0, INFO: 1, DEBUG: 2, WARN: 3, ERROR: 4, NONE: 5 }, xn = "LOG", Ws = "ERROR", $o = "RS SDK", Uo = "font-weight: bold; background: black; color: white;", Bo = "font-weight: normal;";
|
817
|
+
class Vo {
|
818
|
+
constructor(e = xn, n = "", s = console) {
|
819
|
+
this.minLogLevel = vt[e], this.scope = n, this.logProvider = s;
|
833
820
|
}
|
834
821
|
log(...e) {
|
835
822
|
this.outputLog("LOG", e);
|
@@ -848,7 +835,7 @@ class Ho {
|
|
848
835
|
}
|
849
836
|
outputLog(e, n) {
|
850
837
|
var s, i;
|
851
|
-
this.minLogLevel <=
|
838
|
+
this.minLogLevel <= vt[e] && ((i = (s = this.logProvider)[e.toLowerCase()]) == null || i.call(s, ...this.formatLogData(n)));
|
852
839
|
}
|
853
840
|
setScope(e) {
|
854
841
|
this.scope = e || this.scope;
|
@@ -856,50 +843,50 @@ class Ho {
|
|
856
843
|
// TODO: should we allow to change the level via global variable on run time
|
857
844
|
// to assist on the fly debugging?
|
858
845
|
setMinLogLevel(e) {
|
859
|
-
this.minLogLevel =
|
846
|
+
this.minLogLevel = vt[e], G(this.minLogLevel) && (this.minLogLevel = vt[xn]);
|
860
847
|
}
|
861
848
|
/**
|
862
849
|
* Formats the console message using `scope` and styles
|
863
850
|
*/
|
864
851
|
formatLogData(e) {
|
865
852
|
if (Array.isArray(e) && e.length > 0) {
|
866
|
-
let n = `%c ${
|
853
|
+
let n = `%c ${$o}`;
|
867
854
|
this.scope && (n = `${n} - ${this.scope}`);
|
868
|
-
const s =
|
855
|
+
const s = B(e[0]) ? e[0].trim() : "";
|
869
856
|
n = `${n} %c ${s}`;
|
870
857
|
const i = [
|
871
858
|
n,
|
872
|
-
|
859
|
+
Uo,
|
873
860
|
// add style for the prefix
|
874
|
-
|
861
|
+
Bo
|
875
862
|
// reset the style for the actual message
|
876
863
|
];
|
877
|
-
return
|
864
|
+
return B(e[0]) || i.push(e[0]), i.push(...e.slice(1)), i;
|
878
865
|
}
|
879
866
|
return e;
|
880
867
|
}
|
881
868
|
}
|
882
|
-
const
|
883
|
-
let
|
869
|
+
const ve = new Vo();
|
870
|
+
let he = /* @__PURE__ */ function(t) {
|
884
871
|
return t.HANDLEDEXCEPTION = "handledException", t.UNHANDLEDEXCEPTION = "unhandledException", t.UNHANDLEDREJECTION = "unhandledPromiseRejection", t;
|
885
872
|
}({});
|
886
|
-
const
|
873
|
+
const Qs = ["localStorage", "memoryStorage", "cookieStorage", "sessionStorage", "none"], an = "cookieStorage", Gn = "Unable to process/parse source configuration response", Fo = "The source is disabled. Please enable the source in the dashboard to send events.", Ho = "Failed to prepare data for the request.", xo = "Failed to invoke plugin because the extension point name is missing.", Go = "Failed to invoke plugin because the extension point name is invalid.", jo = (t) => `${t}${R}The "getSourceConfig" load API option must be a function that returns valid source configuration data.`, qo = (t, e, n) => `${t}${R}The base URL "${n}" for ${e} is not valid.`, zo = (t, e, n) => `${t}${R}The consent manager "${e}" is not supported. Please choose one of the following supported consent managers: "${Object.keys(n)}".`, Ko = (t, e) => `${t}${R}Ignoring a non-error: ${e}.`, Yo = (t) => `${t}${R}Failed to log breadcrumb.`, Wo = (t) => `${t}${R}Failed to handle the error.`, Qo = (t) => `${t}${R}Plugin name is missing.`, Xo = (t, e) => `${t}${R}Plugin "${e}" already exists.`, Jo = (t, e) => `${t}${R}Plugin "${e}" not found.`, Zo = (t, e) => `${t}${R}Plugin "${e}" not found in plugins but found in byName. This indicates a bug in the plugin engine. Please report this issue to the development team.`, ea = (t, e, n) => `${t}${R}Plugin "${e}" could not be loaded because some of its dependencies "${n}" do not exist.`, ta = (t, e, n) => `${t}${R}Failed to invoke the "${e}" extension point of plugin "${n}".`, na = (t, e) => `${t}${R}The "${e}" storage type is `, jn = "Failed to fetch the source config", sa = (t, e) => `${t}${R}The write key "${e}" is invalid. It must be a non-empty string. Please check that the write key is correct and try again.`, ia = (t, e) => `${t}${R}The data plane URL "${e}" is invalid. It must be a valid URL string. Please check that the data plane URL is correct and try again.`, Xs = (t) => `${t}${R}The provided callback parameter is not a function.`, ra = (t, e, n, s, i) => `${t} with status ${e} (${n}) for URL: ${s}. Response: ${i.trim()}`, oa = (t, e, n) => `${t} due to timeout or no connection (${e ? e.type : ""}) at the client side for URL: ${n}`, aa = (t, e) => `${t} for URL: ${e}`, la = (t) => `Failed to save the value for "${t}" to storage`, ua = (t) => `Failed to retrieve or parse data for "${t}" from storage`, ca = (t) => `The server responded with status ${t} while setting the cookies. As a fallback, the cookies will be set client side.`, da = (t) => `The server failed to set the ${t} cookie. As a fallback, the cookies will be set client side.`, fa = "Failed to set/remove cookies via server. As a fallback, the cookies will be managed client side.", ha = (t, e, n) => `${t}${R}The storage type "${e}" is not supported. Please choose one of the following supported types: "${Qs}". The default type "${n}" will be used instead.`, ga = (t, e, n, s) => `${t}${R}The storage encryption version "${e}" is not supported. Please choose one of the following supported versions: "${Object.keys(n)}". The default version "${s}" will be used instead.`, ma = (t, e, n) => `${t}${R}The storage data migration has been disabled because the configured storage encryption version (${e}) is not the latest (${n}). To enable storage data migration, please update the storage encryption version to the latest version.`, pa = (t, e, n) => `${t}${R}The provided cookie domain (${e}) does not match the current webpage's domain (${n}). Hence, the cookies will be set client-side.`, va = (t, e, n, s) => `${t}${R}The "${e}" property defined under "${n}" is a reserved keyword. Please choose a different property name to avoid conflicts with reserved keywords (${s}).`, ya = (t) => `${t}${R}Please make sure that the "context" property in the event API's "options" argument is a valid object literal with key-value pairs.`, ba = (t) => `${t}${R}The Beacon API is not supported by your browser. The events will be sent using XHR instead.`, Ea = (t, e, n) => `${t}${R}The session timeout value "${e}" is not a number. The default timeout of ${n} ms will be used instead.`, Sa = (t, e, n) => `${t}${R}The session cut off duration value "${e}" is not a number. The default cut off duration of ${n} ms will be used instead.`, ka = (t, e, n) => `${t}${R}The session cut off duration value "${e}" ms is less than the session timeout value "${n}" ms. The cut off functionality will be disabled.`, Ra = (t) => `${t}${R}The session timeout value is 0, which disables the automatic session tracking feature. If you want to enable session tracking, please provide a positive integer value for the timeout.`, Ia = (t, e, n) => `${t}${R}The session timeout value ${e} ms is less than the recommended minimum of ${n} ms. Please consider increasing the timeout value to ensure optimal performance and reliability.`, Ta = (t, e, n) => `${t}${R}The provided session ID (${e}) is either invalid, not a positive integer, or not at least "${n}" digits long. A new session ID will be auto-generated instead.`, Oa = (t) => `${t}${R}The storage is either full or unavailable, so the data will not be persisted. Switching to in-memory storage.`, Aa = (t, e, n, s) => `${t}${R}The storage type "${n}" is not available for entry "${e}". The SDK will initialize the entry with "${s}" storage type instead.`, Da = (t) => `${t}${R}The callback threw an exception`, Ca = (t, e) => `${t}${R}The provided source config URL "${e}" is invalid. Using the default source config URL instead.`, _a = (t, e) => `Failed to load the polyfill script with ID "${t}" from URL ${e}.`, Pa = (t, e, n) => `${t}${R}The pre-consent storage strategy "${e}" is not supported. Please choose one of the following supported strategies: "none, session, anonymousId". The default strategy "${n}" will be used instead.`, Na = (t, e, n) => `${t}${R}The pre-consent events delivery type "${e}" is not supported. Please choose one of the following supported types: "immediate, buffer". The default type "${n}" will be used instead.`, La = (t, e) => `${t}${R}${e} plugin is deprecated. Please exclude it from the load API options.`, wa = (t, e, n, s) => {
|
887
874
|
const i = n.length === 1, r = i ? ` '${n[0]}' plugin was` : ` ['${n.join("', '")}'] plugins were`, a = `${t}${R}${e}, but${r} not configured to load.`;
|
888
875
|
return s ? `${a} So, ${i ? "the plugin" : "those plugins"} will be loaded automatically.` : `${a} Ignore if this was intentional. Otherwise, consider adding ${i ? "it" : "them"} to the 'plugins' load API option.`;
|
889
|
-
},
|
876
|
+
}, Ma = (t, e) => `${t}${R}The provided polyfill URL "${e}" is invalid. The default polyfill URL will be used instead.`, $a = (t) => `${t}${R}Page Unloaded event can only be tracked when the Beacon transport is active. Please enable "useBeacon" load API option.`, Ua = (t, e) => `${t}${R}Ignoring unknown plugins: ${e.join(", ")}.`, Js = { All: !0 }, Rn = "js-integrations", Zs = "plugins", Ba = new RegExp("^(https?:\\/\\/)(((([a-zA-Z\\d]([a-zA-Z\\d-]*[a-zA-Z\\d])*)\\.)+[a-zA-Z]{2,}|localhost|((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9]?)))(\\:\\d+)?(\\/[-a-zA-Z\\d%_.~+]*)*(\\?[;&a-zA-Z\\d%_.~+=-]*)?(\\#[-a-zA-Z\\d_]*)?$"), ut = "modern", Mt = "https://cdn.rudderlabs.com", In = "v3", ei = `${Mt}/${In}/${ut}/${Rn}`, ti = `${Mt}/${In}/${ut}/${Zs}`, ni = "https://api.rudderstack.com", Ce = "v3", Va = "xhr", ln = { iubenda: "IubendaConsentManager", oneTrust: "OneTrustConsentManager", ketch: "KetchConsentManager", custom: "CustomConsentManager" }, Tt = { [Ce]: "StorageEncryption", legacy: "StorageEncryptionLegacy" }, Fa = { [Va]: "XhrQueue", beacon: "BeaconQueue" }, Ha = "rsaRequest", xa = "rsaMetrics", Ga = { configUrl: ni, loadIntegration: !0, sessions: { autoTrack: !0, timeout: rn, cutOff: { enabled: !1 } }, sameSiteCookie: "Lax", polyfillIfRequired: !0, integrations: Js, useBeacon: !1, beaconQueueOptions: {}, destinationsQueueOptions: {}, queueOptions: {}, lockIntegrationsVersion: !0, lockPluginsVersion: !0, uaChTrackLevel: "none", plugins: [], useGlobalIntegrationsConfigInEvents: !1, bufferDataPlaneEventsUntilReady: !1, dataPlaneEventsBufferTimeout: Eo, storage: { encryption: { version: Ce }, migrate: !0, cookie: {} }, sendAdblockPage: !1, sameDomainCookiesOnly: !1, secureCookie: !1, sendAdblockPageOptions: {}, useServerSideCookies: !1 }, ja = p(T(Ga)), O = { userId: "", userTraits: {}, anonymousId: "", groupId: "", groupTraits: {}, initialReferrer: "", initialReferringDomain: "", sessionInfo: {}, authToken: null }, qa = 10, za = { userId: p(O.userId), userTraits: p(O.userTraits), anonymousId: p(O.anonymousId), groupId: p(O.groupId), groupTraits: p(O.groupTraits), initialReferrer: p(O.initialReferrer), initialReferringDomain: p(O.initialReferringDomain), sessionInfo: p(O.sessionInfo), authToken: p(O.authToken) }, Ka = { isOnline: p(!0), storage: { isLocalStorageAvailable: p(!1), isCookieStorageAvailable: p(!1), isSessionStorageAvailable: p(!1) }, isBeaconAvailable: p(!1), isLegacyDOM: p(!1), isUaCHAvailable: p(!1), isCryptoAvailable: p(!1), isIE11: p(!1), isAdBlocked: p(!1) }, Ya = { isErrorReportingEnabled: p(!1), isMetricsReportingEnabled: p(!1), breadcrumbs: p([]) }, Wa = p(void 0), Qa = { activeDataplaneUrl: p(void 0), integrationsCDNPath: p(ei), pluginsCDNPath: p(ti), sourceConfigUrl: p(void 0), status: p(void 0), initialized: p(!1), logLevel: p(Ws), loaded: p(!1), readyCallbacks: p([]), writeKey: p(void 0), dataPlaneUrl: p(void 0) }, Xa = { enabled: p(!1), initialized: p(!1), data: p({}), activeConsentManagerPluginName: p(void 0), preConsent: p({ enabled: !1 }), postConsent: p({}), resolutionStrategy: p("and"), provider: p(void 0), metadata: p(void 0) }, Ja = { retries: p(0), dropped: p(0), sent: p(0), queued: p(0), triggered: p(0), metricsServiceUrl: p(void 0) }, Za = { app: p({ name: wn, namespace: fo, version: at, installType: Fs }), traits: p(null), library: p({ name: wn, version: at, snippetVersion: globalThis.RudderSnippetVersion }), userAgent: p(null), device: p(null), network: p(null), os: p({ name: "", version: "" }), locale: p(null), screen: p({ density: 0, width: 0, height: 0, innerWidth: 0, innerHeight: 0 }), "ua-ch": p(void 0), timezone: p(void 0) }, el = { configuredDestinations: p([]), activeDestinations: p([]), loadOnlyIntegrations: p({}), failedDestinations: p([]), loadIntegration: p(!0), initializedDestinations: p([]), clientDestinationsReady: p(!1), integrationsConfig: p({}) }, tl = { toBeProcessedArray: p([]), readyCallbacksArray: p([]) }, nl = { ready: p(!1), loadedPlugins: p([]), failedPlugins: p([]), pluginsToLoadFromConfig: p([]), activePlugins: p([]), totalPluginsToLoad: p(0) }, sl = { encryptionPluginName: p(void 0), migrate: p(!1), type: p(void 0), cookie: p(void 0), entries: p({}), trulyAnonymousTracking: p(!1) }, il = { isEnabledServerSideCookies: p(!1), dataServiceUrl: p(void 0) }, rl = {
|
890
877
|
eventsQueuePluginName: p(void 0),
|
891
878
|
deliveryEnabled: p(!0)
|
892
879
|
// Delivery should always happen
|
893
|
-
},
|
894
|
-
function
|
880
|
+
}, ol = { enabled: p(!1), pageLifecycle: { enabled: p(!1), pageViewId: p(void 0), pageLoadedTimestamp: p(void 0) } }, al = { capabilities: Ka, consents: Xa, context: Za, eventBuffer: tl, lifecycle: Qa, loadOptions: ja, metrics: Ja, nativeDestinations: el, plugins: nl, reporting: Ya, session: za, source: Wa, storage: sl, serverCookies: il, dataPlaneEvents: rl, autoTrack: ol }, o = { ...T(al) };
|
881
|
+
function si(t) {
|
895
882
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
896
883
|
}
|
897
|
-
var
|
898
|
-
function
|
899
|
-
return
|
884
|
+
var Ot = { exports: {} }, At = { exports: {} }, ll = At.exports, qn;
|
885
|
+
function ul() {
|
886
|
+
return qn || (qn = 1, function(t, e) {
|
900
887
|
(function(n, s) {
|
901
888
|
t.exports = s();
|
902
|
-
})(
|
889
|
+
})(ll, function() {
|
903
890
|
function n(m) {
|
904
891
|
return !isNaN(parseFloat(m)) && isFinite(m);
|
905
892
|
}
|
@@ -936,10 +923,10 @@ function cl() {
|
|
936
923
|
var m = this.getFileName() || "", v = this.getLineNumber() || "", k = this.getColumnNumber() || "", E = this.getFunctionName() || "";
|
937
924
|
return this.getIsEval() ? m ? "[eval] (" + m + ":" + v + ":" + k + ")" : "[eval]:" + v + ":" + k : E ? E + " (" + m + ":" + v + ":" + k + ")" : m + ":" + v + ":" + k;
|
938
925
|
} }, h.fromString = function(v) {
|
939
|
-
var k = v.indexOf("("), E = v.lastIndexOf(")"),
|
940
|
-
if (
|
941
|
-
var J = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(
|
942
|
-
return new h({ functionName:
|
926
|
+
var k = v.indexOf("("), E = v.lastIndexOf(")"), _ = v.substring(0, k), z = v.substring(k + 1, E).split(","), x = v.substring(E + 1);
|
927
|
+
if (x.indexOf("@") === 0)
|
928
|
+
var J = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(x, ""), fe = J[1], Oe = J[2], I = J[3];
|
929
|
+
return new h({ functionName: _, args: z || void 0, fileName: fe, lineNumber: Oe || void 0, columnNumber: I || void 0 });
|
943
930
|
};
|
944
931
|
for (var y = 0; y < r.length; y++)
|
945
932
|
h.prototype["get" + s(r[y])] = i(r[y]), h.prototype["set" + s(r[y])] = /* @__PURE__ */ function(m) {
|
@@ -963,14 +950,14 @@ function cl() {
|
|
963
950
|
}(u[f]);
|
964
951
|
return h;
|
965
952
|
});
|
966
|
-
}(
|
953
|
+
}(At)), At.exports;
|
967
954
|
}
|
968
|
-
var
|
969
|
-
function
|
970
|
-
return
|
955
|
+
var cl = Ot.exports, zn;
|
956
|
+
function dl() {
|
957
|
+
return zn || (zn = 1, function(t, e) {
|
971
958
|
(function(n, s) {
|
972
|
-
t.exports = s(
|
973
|
-
})(
|
959
|
+
t.exports = s(ul());
|
960
|
+
})(cl, function(s) {
|
974
961
|
var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, a = /^(eval@)?(\[native code])?$/;
|
975
962
|
return {
|
976
963
|
/**
|
@@ -1057,16 +1044,16 @@ function fl() {
|
|
1057
1044
|
}
|
1058
1045
|
};
|
1059
1046
|
});
|
1060
|
-
}(
|
1047
|
+
}(Ot)), Ot.exports;
|
1061
1048
|
}
|
1062
|
-
var
|
1063
|
-
const
|
1064
|
-
const e = { file: t.fileName, method:
|
1065
|
-
return e.lineNumber && e.lineNumber > -1 && !e.file && !e.method && (e.file =
|
1066
|
-
},
|
1067
|
-
function
|
1068
|
-
return { errorClass:
|
1069
|
-
const a =
|
1049
|
+
var fl = dl();
|
1050
|
+
const hl = /* @__PURE__ */ si(fl), ii = "global code", gl = (t) => N(t) && /^global code$/i.test(t) ? ii : t, ml = (t) => {
|
1051
|
+
const e = { file: t.fileName, method: gl(t.functionName), lineNumber: t.lineNumber, columnNumber: t.columnNumber };
|
1052
|
+
return e.lineNumber && e.lineNumber > -1 && !e.file && !e.method && (e.file = ii), e;
|
1053
|
+
}, Kn = (t) => B(t) ? t : "";
|
1054
|
+
function Yn(t, e, n, s) {
|
1055
|
+
return { errorClass: Kn(t), message: `${n}${Kn(e)}`, type: "browserjs", stacktrace: s.reduce((i, r) => {
|
1056
|
+
const a = ml(r);
|
1070
1057
|
try {
|
1071
1058
|
return JSON.stringify(a) === "{}" ? i : i.concat(a);
|
1072
1059
|
} catch {
|
@@ -1074,38 +1061,38 @@ function Qn(t, e, n, s) {
|
|
1074
1061
|
}
|
1075
1062
|
}, []) };
|
1076
1063
|
}
|
1077
|
-
const
|
1064
|
+
const pl = (t, e) => {
|
1078
1065
|
let n;
|
1079
|
-
return
|
1066
|
+
return yn(t) && B(Sn(t)) ? n = t : (e.warn(Ko(tt, de(t))), n = void 0), n;
|
1080
1067
|
}, vl = (t, e) => {
|
1081
1068
|
try {
|
1082
|
-
const n =
|
1083
|
-
return
|
1069
|
+
const n = hl.parse(t);
|
1070
|
+
return Yn(t.name, t.message, e, n);
|
1084
1071
|
} catch {
|
1085
|
-
return
|
1072
|
+
return Yn(t.name, t.message, e, []);
|
1086
1073
|
}
|
1087
|
-
},
|
1074
|
+
}, Wn = (t, e) => {
|
1088
1075
|
try {
|
1089
1076
|
return JSON.parse(t || "");
|
1090
1077
|
} catch (n) {
|
1091
|
-
const s =
|
1078
|
+
const s = dt(n, "Failed to parse response data");
|
1092
1079
|
e(s);
|
1093
1080
|
}
|
1094
|
-
},
|
1095
|
-
const s =
|
1096
|
-
return n && (s.headers =
|
1097
|
-
},
|
1081
|
+
}, Dt = "The request failed", yl = [/Failed to fetch dynamically imported module: .*/], bl = [/Failed to load the script with the id .*/, /A timeout of \d+ ms occurred while trying to load the script with id .*/], El = [new RegExp(`${Dt}.*`), /A script with the id .* is already loaded\./], Sl = { headers: { Accept: "application/json", "Content-Type": "application/json;charset=UTF-8" }, method: "GET" }, Qn = (t, e, n) => {
|
1082
|
+
const s = H(Sl, e || {});
|
1083
|
+
return n && (s.headers = H(s.headers, { Authorization: n })), s.url = t, s;
|
1084
|
+
}, Xn = (t, e = yo, n) => new Promise((s, i) => {
|
1098
1085
|
let r;
|
1099
1086
|
if (t.sendRawData === !0)
|
1100
1087
|
r = t.data;
|
1101
1088
|
else if (r = de(t.data, !1, [], n), ne(r)) {
|
1102
|
-
i({ error: new Error(
|
1089
|
+
i({ error: new Error(Ho), undefined: void 0, options: t });
|
1103
1090
|
return;
|
1104
1091
|
}
|
1105
1092
|
const a = new XMLHttpRequest(), u = (c) => {
|
1106
|
-
i({ error: new Error(
|
1093
|
+
i({ error: new Error(ra(Dt, a.status, a.statusText, t.url, a.responseText)), xhr: a, options: t });
|
1107
1094
|
}, l = (c) => {
|
1108
|
-
i({ error: new Error(
|
1095
|
+
i({ error: new Error(oa(Dt, c, t.url)), xhr: a, options: t });
|
1109
1096
|
};
|
1110
1097
|
a.ontimeout = l, a.onerror = l, a.onload = () => {
|
1111
1098
|
a.status >= 200 && a.status < 400 ? s({ response: a.responseText, xhr: a, options: t }) : u();
|
@@ -1115,7 +1102,7 @@ const li = (t, e) => {
|
|
1115
1102
|
try {
|
1116
1103
|
a.send(r);
|
1117
1104
|
} catch (c) {
|
1118
|
-
i({ error:
|
1105
|
+
i({ error: dt(c, aa(Dt, t.url)), xhr: a, options: t });
|
1119
1106
|
}
|
1120
1107
|
});
|
1121
1108
|
class kl {
|
@@ -1131,8 +1118,8 @@ class kl {
|
|
1131
1118
|
async getData(e) {
|
1132
1119
|
const { url: n, options: s, timeout: i, isRawResponse: r } = e;
|
1133
1120
|
try {
|
1134
|
-
const a = await
|
1135
|
-
return { data: r ? a.response :
|
1121
|
+
const a = await Xn(Qn(n, s, this.basicAuthHeader), i, this.logger);
|
1122
|
+
return { data: r ? a.response : Wn(a.response, this.onError), details: a };
|
1136
1123
|
} catch (a) {
|
1137
1124
|
return { data: void 0, details: a };
|
1138
1125
|
}
|
@@ -1142,8 +1129,8 @@ class kl {
|
|
1142
1129
|
*/
|
1143
1130
|
getAsyncData(e) {
|
1144
1131
|
const { callback: n, url: s, options: i, timeout: r, isRawResponse: a } = e, u = !S(n);
|
1145
|
-
|
1146
|
-
u || n(a ? l.response :
|
1132
|
+
Xn(Qn(s, i, this.basicAuthHeader), r, this.logger).then((l) => {
|
1133
|
+
u || n(a ? l.response : Wn(l.response, this.onError), l);
|
1147
1134
|
}).catch((l) => {
|
1148
1135
|
u || n(void 0, l);
|
1149
1136
|
});
|
@@ -1151,15 +1138,15 @@ class kl {
|
|
1151
1138
|
/**
|
1152
1139
|
* Handle errors
|
1153
1140
|
*/
|
1154
|
-
onError(e
|
1155
|
-
var
|
1156
|
-
(
|
1141
|
+
onError(e) {
|
1142
|
+
var n;
|
1143
|
+
(n = this.errorHandler) == null || n.onError(e, Yr);
|
1157
1144
|
}
|
1158
1145
|
/**
|
1159
1146
|
* Set basic authentication header (eg writekey)
|
1160
1147
|
*/
|
1161
1148
|
setAuthHeader(e, n = !1) {
|
1162
|
-
const s = n ? e :
|
1149
|
+
const s = n ? e : jr(`${e}:`);
|
1163
1150
|
this.basicAuthHeader = `Basic ${s}`;
|
1164
1151
|
}
|
1165
1152
|
/**
|
@@ -1169,10 +1156,10 @@ class kl {
|
|
1169
1156
|
this.basicAuthHeader = void 0;
|
1170
1157
|
}
|
1171
1158
|
}
|
1172
|
-
const
|
1159
|
+
const ri = new kl(ve), Rl = "1", Il = () => [
|
1173
1160
|
"rsa"
|
1174
1161
|
// Prefix for all the SDK scripts including plugins and module federated chunks
|
1175
|
-
],
|
1162
|
+
], Tl = ["www.test-host.com", "localhost", "127.0.0.1", "[::1]"], Ol = [
|
1176
1163
|
"userId",
|
1177
1164
|
"userTraits",
|
1178
1165
|
"groupId",
|
@@ -1187,19 +1174,19 @@ const ui = new kl(ye), Rl = "1", Tl = () => [
|
|
1187
1174
|
"authToken"
|
1188
1175
|
], Al = "RudderStack JavaScript SDK", Dl = "__REPOSITORY_URL__", Cl = "js", _l = (t, e) => {
|
1189
1176
|
switch (e) {
|
1190
|
-
case
|
1177
|
+
case he.UNHANDLEDEXCEPTION: {
|
1191
1178
|
const { error: n } = t;
|
1192
1179
|
return n || t;
|
1193
1180
|
}
|
1194
|
-
case
|
1181
|
+
case he.UNHANDLEDREJECTION:
|
1195
1182
|
return t.reason;
|
1196
|
-
case
|
1183
|
+
case he.HANDLEDEXCEPTION:
|
1197
1184
|
default:
|
1198
1185
|
return t;
|
1199
1186
|
}
|
1200
1187
|
}, Pl = (t) => ({ type: "manual", name: t, timestamp: /* @__PURE__ */ new Date(), metaData: {} }), Nl = () => {
|
1201
1188
|
const t = globalThis.location.hostname;
|
1202
|
-
return !t || t &&
|
1189
|
+
return !t || t && Tl.includes(t) ? "development" : "production";
|
1203
1190
|
}, Ll = (t) => {
|
1204
1191
|
const e = de(t, !1, Ol);
|
1205
1192
|
return e !== null ? JSON.parse(e) : {};
|
@@ -1208,7 +1195,7 @@ const ui = new kl(ye), Rl = "1", Tl = () => [
|
|
1208
1195
|
return { id: `${((i = t.value) == null ? void 0 : i.id) ?? n.writeKey.value}..${e.sessionInfo.value.id ?? "NA"}..${s.pageLifecycle.pageViewId.value ?? "NA"}`, name: ((r = t.value) == null ? void 0 : r.name) ?? "NA" };
|
1209
1196
|
}, $l = (t, e) => ({ locale: t.value ?? "NA", userAgent: e.value ?? "NA", time: /* @__PURE__ */ new Date() }), Ul = (t, e, n, s) => {
|
1210
1197
|
const { context: i, lifecycle: r, session: a, source: u, reporting: l, autoTrack: c } = n, { app: d, locale: h, userAgent: y, timezone: g, screen: f, library: m } = i;
|
1211
|
-
return { payloadVersion: "5", notifier: { name: Al, version: d.value.version, url: Dl }, events: [{ exceptions: [
|
1198
|
+
return { payloadVersion: "5", notifier: { name: Al, version: d.value.version, url: Dl }, events: [{ exceptions: [T(t)], severity: e.severity, unhandled: e.unhandled, severityReason: e.severityReason, app: { version: d.value.version, releaseStage: Nl(), type: d.value.installType }, device: $l(h, y), request: { url: wl(), clientIp: "[NOT COLLECTED]" }, breadcrumbs: T(l.breadcrumbs.value), context: t.message, groupingHash: s, metaData: {
|
1212
1199
|
app: { snippetVersion: m.value.snippetVersion },
|
1213
1200
|
device: { ...f.value, timezone: g.value },
|
1214
1201
|
// Add rest of the state groups as metadata
|
@@ -1217,35 +1204,22 @@ const ui = new kl(ye), Rl = "1", Tl = () => [
|
|
1217
1204
|
}, user: Ml(u, a, r, c) }] };
|
1218
1205
|
}, Bl = (t) => {
|
1219
1206
|
const e = t.message;
|
1220
|
-
return yl.some((n) => n.test(e)) || bl.some((n) => n.test(e)) ? e.includes(
|
1207
|
+
return yl.some((n) => n.test(e)) || bl.some((n) => n.test(e)) ? e.includes(Mt) : !El.some((n) => n.test(e));
|
1221
1208
|
}, Vl = (t) => {
|
1222
1209
|
var r;
|
1223
1210
|
const e = (r = t.stacktrace[0]) == null ? void 0 : r.file;
|
1224
1211
|
if (!e || typeof e != "string")
|
1225
1212
|
return !1;
|
1226
1213
|
const n = e.substring(e.lastIndexOf("/") + 1), s = e.split("/");
|
1227
|
-
return s[s.length - 2] === Rn ||
|
1214
|
+
return s[s.length - 2] === Rn || Il().some((a) => n.startsWith(a) && n.endsWith(".js"));
|
1228
1215
|
}, Fl = (t, e) => {
|
1229
|
-
const n = { version: Rl, message_id:
|
1216
|
+
const n = { version: Rl, message_id: Vt(), source: { name: Cl, sdk_version: e.context.app.value.version, write_key: e.lifecycle.writeKey.value, install_type: e.context.app.value.installType }, errors: t };
|
1230
1217
|
return de(n);
|
1231
|
-
}, xl = (t, e, n, s) => {
|
1232
|
-
let i;
|
1233
|
-
if (n.context.app.value.installType !== "cdn")
|
1234
|
-
return i;
|
1235
|
-
if (!C(t))
|
1236
|
-
i = e;
|
1237
|
-
else if (U(t))
|
1238
|
-
i = t;
|
1239
|
-
else {
|
1240
|
-
const r = li(t, s);
|
1241
|
-
C(r) ? i = r.message : i = e;
|
1242
|
-
}
|
1243
|
-
return i;
|
1244
1218
|
};
|
1245
1219
|
class Hl {
|
1246
1220
|
// If no logger is passed errors will be thrown as unhandled error
|
1247
1221
|
constructor(e, n) {
|
1248
|
-
|
1222
|
+
P(this, "initialized", !1);
|
1249
1223
|
this.httpClient = e, this.logger = n;
|
1250
1224
|
}
|
1251
1225
|
/**
|
@@ -1260,35 +1234,33 @@ class Hl {
|
|
1260
1234
|
*/
|
1261
1235
|
attachErrorListeners() {
|
1262
1236
|
globalThis.addEventListener("error", (e) => {
|
1263
|
-
this.onError(
|
1237
|
+
this.onError(e, tt, void 0, he.UNHANDLEDEXCEPTION);
|
1264
1238
|
}), globalThis.addEventListener("unhandledrejection", (e) => {
|
1265
|
-
this.onError(
|
1239
|
+
this.onError(e, tt, void 0, he.UNHANDLEDREJECTION);
|
1266
1240
|
});
|
1267
1241
|
}
|
1268
1242
|
/**
|
1269
1243
|
* Handle errors
|
1270
|
-
* @param
|
1271
|
-
* @param
|
1272
|
-
* @param
|
1273
|
-
* @param
|
1274
|
-
* @param errorInfo.errorType - The type of the error (handled or unhandled)
|
1275
|
-
* @param errorInfo.groupingHash - The grouping hash of the error
|
1244
|
+
* @param error - The error to handle
|
1245
|
+
* @param context - The context of where the error occurred
|
1246
|
+
* @param customMessage - The custom message of the error
|
1247
|
+
* @param errorType - The type of the error (handled or unhandled)
|
1276
1248
|
*/
|
1277
|
-
onError(e) {
|
1249
|
+
onError(e, n = "", s = "", i = he.HANDLEDEXCEPTION) {
|
1278
1250
|
try {
|
1279
|
-
const
|
1280
|
-
if (G(
|
1251
|
+
const r = _l(e, i), a = pl(r, this.logger);
|
1252
|
+
if (G(a))
|
1281
1253
|
return;
|
1282
|
-
const
|
1283
|
-
if (!
|
1254
|
+
const u = s ? `${s} - ` : "", l = `${n}${R}${u}`, c = vl(a, l), h = Sn(a).includes(It);
|
1255
|
+
if (!h && !Vl(c) && i !== he.HANDLEDEXCEPTION)
|
1284
1256
|
return;
|
1285
|
-
if (o.reporting.isErrorReportingEnabled.value && Bl(
|
1286
|
-
const
|
1287
|
-
this.httpClient.getAsyncData({ url: o.metrics.metricsServiceUrl.value, options: { method: "POST", data: Fl(
|
1257
|
+
if (o.reporting.isErrorReportingEnabled.value && Bl(c)) {
|
1258
|
+
const y = { severity: "error", unhandled: i !== he.HANDLEDEXCEPTION, severityReason: { type: i } }, g = Ul(c, y, o);
|
1259
|
+
this.httpClient.getAsyncData({ url: o.metrics.metricsServiceUrl.value, options: { method: "POST", data: Fl(g, o), sendRawData: !0 }, isRawResponse: !0 });
|
1288
1260
|
}
|
1289
|
-
(
|
1290
|
-
} catch (
|
1291
|
-
this.logger.error(
|
1261
|
+
(i === he.HANDLEDEXCEPTION || h) && this.logger.error(c.message);
|
1262
|
+
} catch (r) {
|
1263
|
+
this.logger.error(Wo(tt), r);
|
1292
1264
|
}
|
1293
1265
|
}
|
1294
1266
|
/**
|
@@ -1301,29 +1273,29 @@ class Hl {
|
|
1301
1273
|
try {
|
1302
1274
|
o.reporting.breadcrumbs.value = [...o.reporting.breadcrumbs.value, Pl(e)];
|
1303
1275
|
} catch (n) {
|
1304
|
-
this.onError(
|
1276
|
+
this.onError(n, Yo(tt));
|
1305
1277
|
}
|
1306
1278
|
}
|
1307
1279
|
}
|
1308
|
-
const
|
1309
|
-
class
|
1280
|
+
const oi = new Hl(ri, ve);
|
1281
|
+
class xl {
|
1310
1282
|
constructor(e, n = {}) {
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1283
|
+
P(this, "plugins", []);
|
1284
|
+
P(this, "byName", {});
|
1285
|
+
P(this, "cache", {});
|
1286
|
+
P(this, "config", { throws: !0 });
|
1315
1287
|
this.config = { throws: !0, ...n }, this.logger = e;
|
1316
1288
|
}
|
1317
1289
|
register(e, n) {
|
1318
1290
|
if (!e.name) {
|
1319
|
-
const i =
|
1291
|
+
const i = Qo(Be);
|
1320
1292
|
if (this.config.throws)
|
1321
1293
|
throw new Error(i);
|
1322
1294
|
this.logger.error(i, e);
|
1323
1295
|
return;
|
1324
1296
|
}
|
1325
1297
|
if (this.byName[e.name]) {
|
1326
|
-
const i =
|
1298
|
+
const i = Xo(Be, e.name);
|
1327
1299
|
if (this.config.throws)
|
1328
1300
|
throw new Error(i);
|
1329
1301
|
this.logger.error(i);
|
@@ -1339,7 +1311,7 @@ class Gl {
|
|
1339
1311
|
unregister(e) {
|
1340
1312
|
const n = this.byName[e];
|
1341
1313
|
if (!n) {
|
1342
|
-
const i =
|
1314
|
+
const i = Jo(Be, e);
|
1343
1315
|
if (this.config.throws)
|
1344
1316
|
throw new Error(i);
|
1345
1317
|
this.logger.error(i);
|
@@ -1347,7 +1319,7 @@ class Gl {
|
|
1347
1319
|
}
|
1348
1320
|
const s = this.plugins.indexOf(n);
|
1349
1321
|
if (s === -1) {
|
1350
|
-
const i =
|
1322
|
+
const i = Zo(Be, e);
|
1351
1323
|
if (this.config.throws)
|
1352
1324
|
throw new Error(i);
|
1353
1325
|
this.logger.error(i);
|
@@ -1364,9 +1336,9 @@ class Gl {
|
|
1364
1336
|
var i;
|
1365
1337
|
if ((i = s.deps) != null && i.some((r) => !this.byName[r])) {
|
1366
1338
|
const r = s.deps.filter((a) => !this.byName[a]);
|
1367
|
-
return this.logger.error(
|
1339
|
+
return this.logger.error(ea(Be, s.name, r)), !1;
|
1368
1340
|
}
|
1369
|
-
return n === "." ? !0 :
|
1341
|
+
return n === "." ? !0 : Br(s, n);
|
1370
1342
|
})), this.cache[n];
|
1371
1343
|
}
|
1372
1344
|
// This method allows to process this.plugins so that it could
|
@@ -1377,23 +1349,23 @@ class Gl {
|
|
1377
1349
|
invoke(e, n = !0, ...s) {
|
1378
1350
|
let i = e;
|
1379
1351
|
if (!i)
|
1380
|
-
throw new Error(
|
1352
|
+
throw new Error(xo);
|
1381
1353
|
const r = i.startsWith("!"), a = this.config.throws ?? i.endsWith("!");
|
1382
1354
|
if (i = i.replace(/(^!|!$)/g, ""), !i)
|
1383
|
-
throw new Error(
|
1355
|
+
throw new Error(Go);
|
1384
1356
|
const u = i.split(".");
|
1385
1357
|
u.pop();
|
1386
1358
|
const l = u.join(".");
|
1387
1359
|
return (n ? this.getPlugins(i) : [this.getPlugins(i)[0]]).map((d) => {
|
1388
|
-
const h =
|
1360
|
+
const h = nn(d, i);
|
1389
1361
|
if (!S(h) || r)
|
1390
1362
|
return h;
|
1391
1363
|
try {
|
1392
|
-
return h.apply(
|
1364
|
+
return h.apply(nn(d, l), s);
|
1393
1365
|
} catch (y) {
|
1394
1366
|
if (a)
|
1395
1367
|
throw y;
|
1396
|
-
this.logger.error(
|
1368
|
+
this.logger.error(ta(Be, i, d.name), y);
|
1397
1369
|
}
|
1398
1370
|
return null;
|
1399
1371
|
});
|
@@ -1405,19 +1377,19 @@ class Gl {
|
|
1405
1377
|
return this.invoke(e, !0, ...n);
|
1406
1378
|
}
|
1407
1379
|
}
|
1408
|
-
const
|
1409
|
-
t.config.useNativeSDK === !0,
|
1380
|
+
const Gl = new xl(ve, { throws: !0 }), jl = (t) => t.config.connectionMode !== "cloud" || t.config.useNativeSDKToSend === !0 || // this is the older flag for hybrid mode destinations
|
1381
|
+
t.config.useNativeSDK === !0, ql = (t) => t.config.connectionMode === "hybrid" || t.config.useNativeSDKToSend === !0, Jn = (t) => t.filter(jl), ai = ["BeaconQueue", "CustomConsentManager", "DeviceModeDestinations", "DeviceModeTransformation", "ExternalAnonymousId", "GoogleLinker", "IubendaConsentManager", "KetchConsentManager", "NativeDestinationQueue", "OneTrustConsentManager", "StorageEncryption", "StorageEncryptionLegacy", "StorageMigrator", "XhrQueue"], zl = ["Bugsnag", "ErrorReporting"], Kl = {
|
1410
1382
|
rudderAnalyticsRemotePlugins: { url: () => Promise.resolve(window.RudderStackGlobals && window.RudderStackGlobals.app && window.RudderStackGlobals.app.pluginsCDNPath ? `${window.RudderStackGlobals.app.pluginsCDNPath}/rsa-plugins.js` : "https://cdn.rudderlabs.com/v3/modern/plugins//rsa-plugins.js"), format: "esm", from: "vite" }
|
1411
1383
|
};
|
1412
|
-
function
|
1384
|
+
function li(t, e) {
|
1413
1385
|
const n = Object.assign(t, e);
|
1414
1386
|
for (const s of Object.keys(n))
|
1415
|
-
typeof n[s] == "object" && typeof e[s] == "object" && (n[s] =
|
1387
|
+
typeof n[s] == "object" && typeof e[s] == "object" && (n[s] = li(n[s], e[s]));
|
1416
1388
|
return n;
|
1417
1389
|
}
|
1418
|
-
const
|
1419
|
-
async function
|
1420
|
-
const e =
|
1390
|
+
const Yl = (t) => li({}, (globalThis.__federation_shared__ || {}).default || {});
|
1391
|
+
async function Wl(t) {
|
1392
|
+
const e = Kl[t];
|
1421
1393
|
if (e.inited)
|
1422
1394
|
return e.lib;
|
1423
1395
|
if (["esm", "systemjs"].includes(e.format))
|
@@ -1429,7 +1401,7 @@ async function Ql(t) {
|
|
1429
1401
|
r
|
1430
1402
|
).then((a) => {
|
1431
1403
|
if (!e.inited) {
|
1432
|
-
const u =
|
1404
|
+
const u = Yl();
|
1433
1405
|
a.init(u), e.lib = a, e.lib.init(u), e.inited = !0;
|
1434
1406
|
}
|
1435
1407
|
n(e.lib);
|
@@ -1445,9 +1417,9 @@ function K(t, e) {
|
|
1445
1417
|
return t;
|
1446
1418
|
}
|
1447
1419
|
function Y(t, e) {
|
1448
|
-
return
|
1420
|
+
return Wl(t).then((n) => n.get(e).then((s) => s()));
|
1449
1421
|
}
|
1450
|
-
const
|
1422
|
+
const Ql = (t) => {
|
1451
1423
|
switch (t) {
|
1452
1424
|
case "BeaconQueue":
|
1453
1425
|
return () => Y("rudderAnalyticsRemotePlugins", "./BeaconQueue").then((e) => K(e, !0));
|
@@ -1480,16 +1452,16 @@ const Xl = (t) => {
|
|
1480
1452
|
default:
|
1481
1453
|
return;
|
1482
1454
|
}
|
1483
|
-
},
|
1455
|
+
}, Kt = (t) => {
|
1484
1456
|
const e = {};
|
1485
1457
|
return t.forEach((n) => {
|
1486
|
-
if (
|
1487
|
-
const s =
|
1458
|
+
if (ai.includes(n)) {
|
1459
|
+
const s = Ql(n);
|
1488
1460
|
s && (e[n] = s);
|
1489
1461
|
}
|
1490
1462
|
}), e;
|
1491
|
-
},
|
1492
|
-
class
|
1463
|
+
}, ui = () => ({}), Xl = () => ({}), Jl = (t) => (Kt == null ? void 0 : Kt(t)) || {}, Yt = { ...ui(), ...Xl() }, Zl = (t) => ({ ...Jl(t) });
|
1464
|
+
class eu {
|
1493
1465
|
constructor(e, n, s) {
|
1494
1466
|
this.engine = e, this.errorHandler = n, this.logger = s, this.onError = this.onError.bind(this);
|
1495
1467
|
}
|
@@ -1497,14 +1469,14 @@ class tu {
|
|
1497
1469
|
* Orchestrate the plugin loading and registering
|
1498
1470
|
*/
|
1499
1471
|
init() {
|
1500
|
-
o.lifecycle.status.value = "pluginsLoading",
|
1472
|
+
o.lifecycle.status.value = "pluginsLoading", lt("pluginsCDNPath", o.lifecycle.pluginsCDNPath.value), this.setActivePlugins(), this.registerLocalPlugins(), this.registerRemotePlugins(), this.attachEffects();
|
1501
1473
|
}
|
1502
1474
|
/**
|
1503
1475
|
* Update state based on plugin loaded status
|
1504
1476
|
*/
|
1505
1477
|
// eslint-disable-next-line class-methods-use-this
|
1506
1478
|
attachEffects() {
|
1507
|
-
|
1479
|
+
pe(() => {
|
1508
1480
|
(o.plugins.activePlugins.value.length === 0 || o.plugins.loadedPlugins.value.length + o.plugins.failedPlugins.value.length === o.plugins.totalPluginsToLoad.value) && j(() => {
|
1509
1481
|
o.plugins.ready.value = !0, o.lifecycle.status.value = "pluginsReady";
|
1510
1482
|
});
|
@@ -1518,30 +1490,30 @@ class tu {
|
|
1518
1490
|
let e = o.plugins.pluginsToLoadFromConfig.value;
|
1519
1491
|
if (!e)
|
1520
1492
|
return [];
|
1521
|
-
e = e.filter((i) =>
|
1522
|
-
const n = [{ configurationStatus: () =>
|
1493
|
+
e = e.filter((i) => zl.includes(i) ? (this.logger.warn(La(mt, i)), !1) : !0);
|
1494
|
+
const n = [{ configurationStatus: () => N(o.dataPlaneEvents.eventsQueuePluginName.value), configurationStatusStr: "Data plane events delivery is enabled", activePluginName: o.dataPlaneEvents.eventsQueuePluginName.value, supportedPlugins: Object.values(Fa), shouldAddMissingPlugins: !0 }, { configurationStatus: () => Jn(o.nativeDestinations.configuredDestinations.value).length > 0, configurationStatusStr: "Device mode destinations are connected to the source", supportedPlugins: ["DeviceModeDestinations", "NativeDestinationQueue"] }, { configurationStatus: () => Jn(o.nativeDestinations.configuredDestinations.value).some((i) => i.shouldApplyDeviceModeTransformation), configurationStatusStr: "Device mode transformations are enabled for at least one destination", supportedPlugins: ["DeviceModeTransformation"] }, { configurationStatus: () => N(o.consents.activeConsentManagerPluginName.value), configurationStatusStr: "Consent management is enabled", activePluginName: o.consents.activeConsentManagerPluginName.value, supportedPlugins: Object.values(ln) }, { configurationStatus: () => N(o.storage.encryptionPluginName.value), configurationStatusStr: "Storage encryption is enabled", activePluginName: o.storage.encryptionPluginName.value, supportedPlugins: Object.values(Tt) }, { configurationStatus: () => o.storage.migrate.value, configurationStatusStr: "Storage migration is enabled", supportedPlugins: ["StorageMigrator"] }], s = !1;
|
1523
1495
|
return n.forEach((i) => {
|
1524
1496
|
i.configurationStatus() ? (e = e.filter(
|
1525
|
-
i.activePluginName ? (r) => !(r !== i.activePluginName && i.supportedPlugins.includes(r)) : (r) =>
|
1497
|
+
i.activePluginName ? (r) => !(r !== i.activePluginName && i.supportedPlugins.includes(r)) : (r) => N(r)
|
1526
1498
|
// pass through
|
1527
1499
|
), this.addMissingPlugins(i, s, e)) : e = e.filter(i.basePlugins !== void 0 ? (r) => !(i.basePlugins.includes(r) || i.supportedPlugins.includes(r)) : (r) => !i.supportedPlugins.includes(r));
|
1528
|
-
}), [...Object.keys(
|
1500
|
+
}), [...Object.keys(ui()), ...e];
|
1529
1501
|
}
|
1530
1502
|
addMissingPlugins(e, n, s) {
|
1531
1503
|
const i = e.shouldAddMissingPlugins || n;
|
1532
1504
|
let r;
|
1533
1505
|
e.activePluginName ? r = [...e.basePlugins || [], e.activePluginName] : r = [...e.supportedPlugins];
|
1534
1506
|
const a = r.filter((u) => !s.includes(u));
|
1535
|
-
a.length > 0 && (i && s.push(...a), this.logger.warn(
|
1507
|
+
a.length > 0 && (i && s.push(...a), this.logger.warn(wa(mt, e.configurationStatusStr, a, i)));
|
1536
1508
|
}
|
1537
1509
|
/**
|
1538
1510
|
* Determine the list of plugins that should be activated
|
1539
1511
|
*/
|
1540
1512
|
setActivePlugins() {
|
1541
|
-
const e = this.getPluginsToLoadBasedOnConfig(), n = [...Object.keys(
|
1513
|
+
const e = this.getPluginsToLoadBasedOnConfig(), n = [...Object.keys(Yt), ...ai], s = [], i = [];
|
1542
1514
|
e.forEach((r) => {
|
1543
1515
|
n.includes(r) ? s.push(r) : i.push(r);
|
1544
|
-
}), i.length > 0 && this.logger.warn(
|
1516
|
+
}), i.length > 0 && this.logger.warn(Ua(mt, i)), j(() => {
|
1545
1517
|
o.plugins.totalPluginsToLoad.value = e.length, o.plugins.activePlugins.value = s, o.plugins.failedPlugins.value = i;
|
1546
1518
|
});
|
1547
1519
|
}
|
@@ -1549,7 +1521,7 @@ class tu {
|
|
1549
1521
|
* Register plugins that are direct imports to PluginEngine
|
1550
1522
|
*/
|
1551
1523
|
registerLocalPlugins() {
|
1552
|
-
Object.values(
|
1524
|
+
Object.values(Yt).forEach((e) => {
|
1553
1525
|
S(e) && o.plugins.activePlugins.value.includes(e().name) && this.register([e()]);
|
1554
1526
|
});
|
1555
1527
|
}
|
@@ -1557,10 +1529,10 @@ class tu {
|
|
1557
1529
|
* Register plugins that are dynamic imports to PluginEngine
|
1558
1530
|
*/
|
1559
1531
|
registerRemotePlugins() {
|
1560
|
-
const e =
|
1532
|
+
const e = Zl(o.plugins.activePlugins.value);
|
1561
1533
|
Promise.all(Object.keys(e).map(async (n) => {
|
1562
1534
|
await e[n]().then((s) => this.register([s.default()])).catch((s) => {
|
1563
|
-
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n], this.onError(s,
|
1535
|
+
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n], this.onError(s, n);
|
1564
1536
|
});
|
1565
1537
|
})).catch((n) => {
|
1566
1538
|
this.onError(n);
|
@@ -1594,71 +1566,71 @@ class tu {
|
|
1594
1566
|
try {
|
1595
1567
|
this.engine.register(n, o);
|
1596
1568
|
} catch (s) {
|
1597
|
-
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n.name], this.onError(s
|
1569
|
+
o.plugins.failedPlugins.value = [...o.plugins.failedPlugins.value, n.name], this.onError(s);
|
1598
1570
|
}
|
1599
1571
|
});
|
1600
1572
|
}
|
1601
1573
|
// TODO: Implement reset API instead
|
1602
1574
|
unregisterLocalPlugins() {
|
1603
|
-
Object.values(
|
1575
|
+
Object.values(Yt).forEach((e) => {
|
1604
1576
|
try {
|
1605
1577
|
this.engine.unregister(e().name);
|
1606
1578
|
} catch (n) {
|
1607
|
-
this.onError(n
|
1579
|
+
this.onError(n);
|
1608
1580
|
}
|
1609
1581
|
});
|
1610
1582
|
}
|
1611
1583
|
/**
|
1612
1584
|
* Handle errors
|
1613
1585
|
*/
|
1614
|
-
onError(e, n
|
1615
|
-
this.errorHandler.onError(
|
1586
|
+
onError(e, n) {
|
1587
|
+
this.errorHandler.onError(e, mt, n);
|
1616
1588
|
}
|
1617
1589
|
}
|
1618
|
-
const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memoryStorage", we = "none",
|
1590
|
+
const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memoryStorage", we = "none", tu = "rl_user_id", nu = "rl_trait", su = "rl_anonymous_id", iu = "rl_group_id", ru = "rl_group_trait", ou = "rl_page_init_referrer", au = "rl_page_init_referring_domain", lu = "rl_session", uu = "rl_auth_token", Ve = { userId: tu, userTraits: nu, anonymousId: su, groupId: iu, groupTraits: ru, initialReferrer: ou, initialReferringDomain: au, sessionInfo: lu, authToken: uu }, cu = "test_rudder_cookie", du = "test_rudder_ls", fu = "test_rudder_ss", hu = "__tld__", ci = "clientDataInCookie", di = "clientDataInLocalStorage", gu = "clientDataInMemory", fi = "clientDataInSessionStorage", hi = ["userId", "userTraits", "anonymousId", "groupId", "groupTraits", "initialReferrer", "initialReferringDomain", "sessionInfo", "authToken"], Fe = { [W]: ci, [X]: di, [ce]: gu, [ee]: fi }, Zn = (t, e) => {
|
1619
1591
|
try {
|
1620
1592
|
return encodeURIComponent(t);
|
1621
1593
|
} catch (n) {
|
1622
|
-
e == null || e.error(
|
1594
|
+
e == null || e.error(oo, n);
|
1623
1595
|
return;
|
1624
1596
|
}
|
1625
|
-
},
|
1597
|
+
}, es = (t) => {
|
1626
1598
|
try {
|
1627
1599
|
return decodeURIComponent(t);
|
1628
1600
|
} catch {
|
1629
1601
|
return;
|
1630
1602
|
}
|
1631
|
-
},
|
1603
|
+
}, mu = (t) => {
|
1632
1604
|
const e = {}, n = t.split(/\s*;\s*/);
|
1633
1605
|
let s;
|
1634
1606
|
return n[0] && n.forEach((i) => {
|
1635
1607
|
s = i.split("=");
|
1636
|
-
const r = s[0] ?
|
1637
|
-
r && (e[r] = s[1] ?
|
1608
|
+
const r = s[0] ? es(s[0]) : void 0;
|
1609
|
+
r && (e[r] = s[1] ? es(s[1]) : void 0);
|
1638
1610
|
}), e;
|
1639
|
-
},
|
1611
|
+
}, pu = (t, e, n, s) => {
|
1640
1612
|
const i = { ...n || {} };
|
1641
|
-
let r = `${
|
1613
|
+
let r = `${Zn(t, s)}=${Zn(e, s)}`;
|
1642
1614
|
ne(e) && (i.maxage = -1), i.maxage && (i.expires = new Date(+/* @__PURE__ */ new Date() + i.maxage)), i.path && (r += `; path=${i.path}`), i.domain && (r += `; domain=${i.domain}`), i.expires && (r += `; expires=${i.expires.toUTCString()}`), i.samesite && (r += `; samesite=${i.samesite}`), i.secure && (r += "; secure"), globalThis.document.cookie = r;
|
1643
|
-
},
|
1615
|
+
}, un = () => {
|
1644
1616
|
const t = globalThis.document.cookie;
|
1645
|
-
return
|
1646
|
-
},
|
1617
|
+
return mu(t);
|
1618
|
+
}, vu = (t) => un()[t], Se = function(t, e, n, s) {
|
1647
1619
|
switch (arguments.length) {
|
1648
1620
|
case 4:
|
1649
1621
|
case 3:
|
1650
1622
|
case 2:
|
1651
|
-
return
|
1623
|
+
return pu(t, e, n, s);
|
1652
1624
|
case 1:
|
1653
|
-
return t ?
|
1625
|
+
return t ? vu(t) : un();
|
1654
1626
|
default:
|
1655
|
-
return
|
1627
|
+
return un();
|
1656
1628
|
}
|
1657
|
-
},
|
1629
|
+
}, yu = (t) => {
|
1658
1630
|
const e = document.createElement("a");
|
1659
1631
|
return e.href = t, e.hostname;
|
1660
|
-
},
|
1661
|
-
const e = typeof globalThis.URL != "function" ?
|
1632
|
+
}, bu = (t) => {
|
1633
|
+
const e = typeof globalThis.URL != "function" ? yu(t) : new URL(t).hostname, n = (e == null ? void 0 : e.split(".")) ?? [], s = n[n.length - 1], i = [];
|
1662
1634
|
if (n.length === 4 && s && s === parseInt(s, 10).toString())
|
1663
1635
|
return i;
|
1664
1636
|
if (n.length <= 1)
|
@@ -1666,27 +1638,27 @@ const W = "cookieStorage", X = "localStorage", ee = "sessionStorage", ce = "memo
|
|
1666
1638
|
for (let r = n.length - 2; r >= 0; r -= 1)
|
1667
1639
|
i.push(n.slice(r).join("."));
|
1668
1640
|
return i;
|
1669
|
-
},
|
1670
|
-
const e =
|
1641
|
+
}, Eu = (t) => {
|
1642
|
+
const e = bu(t);
|
1671
1643
|
for (let n = 0; n < e.length; n += 1) {
|
1672
|
-
const s = e[n], i =
|
1644
|
+
const s = e[n], i = hu, r = { domain: `${s.indexOf("localhost") !== -1 ? "" : "."}${s}` };
|
1673
1645
|
if (Se(i, 1, r), Se(i))
|
1674
1646
|
return Se(i, null, r), s;
|
1675
1647
|
}
|
1676
1648
|
return "";
|
1677
|
-
},
|
1678
|
-
const t = `.${
|
1679
|
-
return { maxage:
|
1680
|
-
},
|
1681
|
-
class
|
1649
|
+
}, Su = () => {
|
1650
|
+
const t = `.${Eu(globalThis.location.href)}`;
|
1651
|
+
return { maxage: bo, path: "/", domain: !t || t === "." ? void 0 : t, samesite: "Lax", enabled: !0 };
|
1652
|
+
}, ku = () => ({ enabled: !0 }), Ru = () => ({ enabled: !0 }), Iu = () => ({ enabled: !0 });
|
1653
|
+
class Tu {
|
1682
1654
|
constructor(e) {
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1655
|
+
P(this, "isEnabled", !0);
|
1656
|
+
P(this, "length", 0);
|
1657
|
+
P(this, "data", {});
|
1686
1658
|
this.options = Iu(), this.logger = e;
|
1687
1659
|
}
|
1688
1660
|
configure(e) {
|
1689
|
-
return this.options =
|
1661
|
+
return this.options = H(this.options, e ?? {}), this.isEnabled = !!this.options.enabled, this.options;
|
1690
1662
|
}
|
1691
1663
|
setItem(e, n) {
|
1692
1664
|
return this.data[e] = n, this.length = Object.keys(this.data).length, n;
|
@@ -1707,13 +1679,13 @@ class Ou {
|
|
1707
1679
|
return Object.keys(this.data);
|
1708
1680
|
}
|
1709
1681
|
}
|
1710
|
-
const
|
1711
|
-
var
|
1712
|
-
function
|
1713
|
-
return
|
1682
|
+
const $t = new Tu(ve);
|
1683
|
+
var Ct = { exports: {} }, Ou = Ct.exports, ts;
|
1684
|
+
function Au() {
|
1685
|
+
return ts || (ts = 1, function(t, e) {
|
1714
1686
|
(function(n, s) {
|
1715
1687
|
t.exports = s();
|
1716
|
-
})(
|
1688
|
+
})(Ou, function() {
|
1717
1689
|
function n(g) {
|
1718
1690
|
return g = JSON.stringify(g), !!/^\{[\s\S]*\}$/.test(g);
|
1719
1691
|
}
|
@@ -1740,8 +1712,8 @@ function Du() {
|
|
1740
1712
|
g || (g = window.localStorage), g.setItem(f, m), g.removeItem(f);
|
1741
1713
|
} catch {
|
1742
1714
|
var v = {};
|
1743
|
-
v._data = {}, v.setItem = function(E,
|
1744
|
-
return v._data[E] = String(
|
1715
|
+
v._data = {}, v.setItem = function(E, _) {
|
1716
|
+
return v._data[E] = String(_);
|
1745
1717
|
}, v.getItem = function(E) {
|
1746
1718
|
return v._data.hasOwnProperty(E) ? v._data[E] : void 0;
|
1747
1719
|
}, v.removeItem = function(E) {
|
@@ -1768,15 +1740,15 @@ function Du() {
|
|
1768
1740
|
}, get: function(f) {
|
1769
1741
|
if (f === void 0) {
|
1770
1742
|
var m = {};
|
1771
|
-
return this.forEach(function(
|
1772
|
-
return m[
|
1743
|
+
return this.forEach(function(x, J) {
|
1744
|
+
return m[x] = J;
|
1773
1745
|
}), m;
|
1774
1746
|
}
|
1775
1747
|
if (f.charAt(0) === "?")
|
1776
1748
|
return this.has(f.substr(1));
|
1777
1749
|
var v = arguments;
|
1778
1750
|
if (v.length > 1) {
|
1779
|
-
for (var k = {}, E = 0,
|
1751
|
+
for (var k = {}, E = 0, _ = v.length; E < _; E++) {
|
1780
1752
|
var z = i(l.getItem(v[E]));
|
1781
1753
|
this.has(v[E]) && (k[v[E]] = z);
|
1782
1754
|
}
|
@@ -1829,10 +1801,10 @@ function Du() {
|
|
1829
1801
|
for (var y in c.prototype) h[y] = c.prototype[y];
|
1830
1802
|
return h;
|
1831
1803
|
});
|
1832
|
-
}(
|
1804
|
+
}(Ct)), Ct.exports;
|
1833
1805
|
}
|
1834
|
-
var
|
1835
|
-
const Ae = /* @__PURE__ */
|
1806
|
+
var Du = Au();
|
1807
|
+
const Ae = /* @__PURE__ */ si(Du), Cu = (t) => {
|
1836
1808
|
const e = new URL(o.lifecycle.sourceConfigUrl.value), n = `${e.origin}${e.pathname}?view=ad`;
|
1837
1809
|
t.getAsyncData({ url: n, options: {
|
1838
1810
|
// We actually don't need the response from the request, so we are using HEAD
|
@@ -1842,17 +1814,17 @@ const Ae = /* @__PURE__ */ oi(Cu), _u = (t) => {
|
|
1842
1814
|
var r;
|
1843
1815
|
o.capabilities.isAdBlocked.value = (i == null ? void 0 : i.error) !== void 0 || ((r = i == null ? void 0 : i.xhr) == null ? void 0 : r.responseURL) !== n;
|
1844
1816
|
} });
|
1845
|
-
},
|
1817
|
+
}, _u = () => !le(globalThis.crypto) && S(globalThis.crypto.getRandomValues), ns = () => !le(globalThis.navigator.userAgentData), Pu = () => !le(globalThis.navigator.sendBeacon) && S(globalThis.navigator.sendBeacon), Nu = () => !!globalThis.navigator.userAgent.match(/Trident.*rv:11\./), Lu = (t, e = "none") => {
|
1846
1818
|
var n;
|
1847
1819
|
e === "none" && t(void 0), e === "default" && t(navigator.userAgentData), e === "full" && ((n = navigator.userAgentData) == null || n.getHighEntropyValues(["architecture", "bitness", "brands", "mobile", "model", "platform", "platformVersion", "uaFullVersion", "fullVersionList", "wow64"]).then((s) => {
|
1848
1820
|
t(s);
|
1849
1821
|
}).catch(() => {
|
1850
1822
|
t();
|
1851
1823
|
}));
|
1852
|
-
},
|
1824
|
+
}, wu = () => {
|
1853
1825
|
const t = globalThis.document.createElement("div");
|
1854
1826
|
return t.setAttribute("data-a-b", "c"), t.dataset ? t.dataset.aB === "c" : !1;
|
1855
|
-
},
|
1827
|
+
}, cn = {
|
1856
1828
|
// Ideally, we should separate the checks for URL and URLSearchParams but
|
1857
1829
|
// the polyfill service serves them under the same feature name, "URL".
|
1858
1830
|
URL: () => !S(globalThis.URL) || !S(globalThis.URLSearchParams),
|
@@ -1871,7 +1843,7 @@ const Ae = /* @__PURE__ */ oi(Cu), _u = (t) => {
|
|
1871
1843
|
"Object.values": () => !S(globalThis.Object.values),
|
1872
1844
|
"Object.assign": () => !S(globalThis.Object.assign),
|
1873
1845
|
"Object.fromEntries": () => !S(globalThis.Object.fromEntries),
|
1874
|
-
"Element.prototype.dataset": () => !
|
1846
|
+
"Element.prototype.dataset": () => !wu(),
|
1875
1847
|
// Ideally, we should separate the checks for TextEncoder and TextDecoder but
|
1876
1848
|
// the polyfill service serves them under the same feature name, "TextEncoder".
|
1877
1849
|
TextEncoder: () => !S(globalThis.TextEncoder) || !S(globalThis.TextDecoder),
|
@@ -1882,39 +1854,39 @@ const Ae = /* @__PURE__ */ oi(Cu), _u = (t) => {
|
|
1882
1854
|
ArrayBuffer: () => !S(globalThis.Uint8Array),
|
1883
1855
|
Set: () => !S(globalThis.Set),
|
1884
1856
|
atob: () => !S(globalThis.atob)
|
1885
|
-
},
|
1886
|
-
const t = Object.keys(
|
1857
|
+
}, Mu = () => {
|
1858
|
+
const t = Object.keys(cn);
|
1887
1859
|
let e = !1;
|
1888
1860
|
for (let n = 0; n < t.length; n++) {
|
1889
|
-
const s =
|
1861
|
+
const s = cn[t[n]];
|
1890
1862
|
if (S(s) && s()) {
|
1891
1863
|
e = !0;
|
1892
1864
|
break;
|
1893
1865
|
}
|
1894
1866
|
}
|
1895
1867
|
return e;
|
1896
|
-
},
|
1868
|
+
}, ss = () => {
|
1897
1869
|
let t = { density: 0, width: 0, height: 0, innerWidth: 0, innerHeight: 0 };
|
1898
1870
|
return t = { width: globalThis.screen.width, height: globalThis.screen.height, density: globalThis.devicePixelRatio, innerWidth: globalThis.innerWidth, innerHeight: globalThis.innerHeight }, t;
|
1899
|
-
},
|
1871
|
+
}, gi = (t) => {
|
1900
1872
|
const e = ["QuotaExceededError", "NS_ERROR_DOM_QUOTA_REACHED"], n = [22, 1014], s = e.includes(t.name) || n.includes(t.code);
|
1901
1873
|
return t instanceof DOMException && s;
|
1902
1874
|
}, Ge = (t = X, e, n) => {
|
1903
1875
|
let s, i;
|
1904
|
-
const r =
|
1876
|
+
const r = na(sn, t);
|
1905
1877
|
let a = "unavailable", u = !0, l;
|
1906
1878
|
try {
|
1907
1879
|
switch (t) {
|
1908
1880
|
case ce:
|
1909
1881
|
return !0;
|
1910
1882
|
case W:
|
1911
|
-
s = e, i =
|
1883
|
+
s = e, i = cu;
|
1912
1884
|
break;
|
1913
1885
|
case X:
|
1914
|
-
s = e ?? globalThis.localStorage, i =
|
1886
|
+
s = e ?? globalThis.localStorage, i = du;
|
1915
1887
|
break;
|
1916
1888
|
case ee:
|
1917
|
-
s = e ?? globalThis.sessionStorage, i =
|
1889
|
+
s = e ?? globalThis.sessionStorage, i = fu;
|
1918
1890
|
break;
|
1919
1891
|
default:
|
1920
1892
|
return !1;
|
@@ -1923,19 +1895,19 @@ const Ae = /* @__PURE__ */ oi(Cu), _u = (t) => {
|
|
1923
1895
|
return s.removeItem(i), !0;
|
1924
1896
|
u = !1;
|
1925
1897
|
} catch (c) {
|
1926
|
-
u = !1, l = c,
|
1898
|
+
u = !1, l = c, gi(c) && (a = "full");
|
1927
1899
|
}
|
1928
1900
|
return u || n == null || n.warn(`${r}${a}.`, l), !1;
|
1929
1901
|
};
|
1930
|
-
class
|
1902
|
+
class $u {
|
1931
1903
|
constructor(e) {
|
1932
|
-
|
1933
|
-
|
1934
|
-
|
1935
|
-
this.options =
|
1904
|
+
P(this, "isSupportAvailable", !0);
|
1905
|
+
P(this, "isEnabled", !0);
|
1906
|
+
P(this, "length", 0);
|
1907
|
+
this.options = ku(), this.logger = e;
|
1936
1908
|
}
|
1937
1909
|
configure(e) {
|
1938
|
-
return this.options =
|
1910
|
+
return this.options = H(this.options, e ?? {}), this.isSupportAvailable = Ge(X), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
1939
1911
|
}
|
1940
1912
|
setItem(e, n) {
|
1941
1913
|
Ae.set(e, n), this.length = Ae.len();
|
@@ -1959,16 +1931,16 @@ class Uu {
|
|
1959
1931
|
return Ae.keys();
|
1960
1932
|
}
|
1961
1933
|
}
|
1962
|
-
const
|
1963
|
-
class
|
1934
|
+
const Tn = new $u(ve);
|
1935
|
+
class Uu {
|
1964
1936
|
constructor(e) {
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
this.options =
|
1937
|
+
P(this, "isSupportAvailable", !0);
|
1938
|
+
P(this, "isEnabled", !0);
|
1939
|
+
P(this, "length", 0);
|
1940
|
+
this.options = Ru(), this.logger = e;
|
1969
1941
|
}
|
1970
1942
|
configure(e) {
|
1971
|
-
return this.options =
|
1943
|
+
return this.options = H(this.options, e ?? {}), this.isSupportAvailable = Ge(ee), this.isSupportAvailable && (this.store = globalThis.sessionStorage), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
1972
1944
|
}
|
1973
1945
|
setItem(e, n) {
|
1974
1946
|
this.store && (this.store.setItem(e, n), this.length = this.store.length);
|
@@ -2001,16 +1973,16 @@ class Bu {
|
|
2001
1973
|
return e;
|
2002
1974
|
}
|
2003
1975
|
}
|
2004
|
-
const On = new
|
2005
|
-
class
|
1976
|
+
const On = new Uu(ve);
|
1977
|
+
class Bu {
|
2006
1978
|
constructor(e) {
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
1979
|
+
P(this, "isSupportAvailable", !0);
|
1980
|
+
P(this, "isEnabled", !0);
|
1981
|
+
P(this, "length", 0);
|
2010
1982
|
this.logger = e;
|
2011
1983
|
}
|
2012
1984
|
configure(e) {
|
2013
|
-
return this.options || (this.options =
|
1985
|
+
return this.options || (this.options = Su()), this.options = H(this.options, e ?? {}), this.options.sameDomainCookiesOnly && delete this.options.domain, this.isSupportAvailable = Ge(W, this), this.isEnabled = !!(this.options.enabled && this.isSupportAvailable), this.options;
|
2014
1986
|
}
|
2015
1987
|
setItem(e, n) {
|
2016
1988
|
return Se(e, n, this.options, this.logger), this.length = Object.keys(Se()).length, !0;
|
@@ -2035,32 +2007,32 @@ class Vu {
|
|
2035
2007
|
return Object.keys(Se());
|
2036
2008
|
}
|
2037
2009
|
}
|
2038
|
-
const An = new
|
2010
|
+
const An = new Bu(ve), ie = (t) => {
|
2039
2011
|
switch (t) {
|
2040
2012
|
case X:
|
2041
|
-
return
|
2013
|
+
return Tn;
|
2042
2014
|
case ee:
|
2043
2015
|
return On;
|
2044
2016
|
case ce:
|
2045
|
-
return
|
2017
|
+
return $t;
|
2046
2018
|
case W:
|
2047
2019
|
return An;
|
2048
2020
|
default:
|
2049
|
-
return
|
2021
|
+
return $t;
|
2050
2022
|
}
|
2051
|
-
},
|
2023
|
+
}, Vu = (t) => {
|
2052
2024
|
const e = An.configure(t);
|
2053
2025
|
o.storage.cookie.value = { maxage: e.maxage, path: e.path, domain: e.domain, samesite: e.samesite, expires: e.expires, secure: e.secure };
|
2054
|
-
},
|
2055
|
-
|
2026
|
+
}, Fu = (t) => {
|
2027
|
+
Tn.configure(t);
|
2056
2028
|
}, Hu = (t) => {
|
2057
|
-
|
2058
|
-
},
|
2029
|
+
$t.configure(t);
|
2030
|
+
}, xu = (t) => {
|
2059
2031
|
On.configure(t);
|
2060
|
-
},
|
2061
|
-
|
2032
|
+
}, Gu = (t = {}, e = {}, n = {}, s = {}) => {
|
2033
|
+
Vu(t), Fu(e), Hu(n), xu(s);
|
2062
2034
|
};
|
2063
|
-
class
|
2035
|
+
class ju {
|
2064
2036
|
constructor(e, n, s) {
|
2065
2037
|
this.id = e.id, this.name = e.name, this.isEncrypted = e.isEncrypted ?? !1, this.validKeys = e.validKeys ?? {}, this.engine = n, this.noKeyValidation = Object.keys(this.validKeys).length === 0, this.noCompoundKey = e.noCompoundKey, this.originalEngine = this.engine, this.errorHandler = e.errorHandler, this.logger = e.logger, this.pluginsManager = s;
|
2066
2038
|
}
|
@@ -2095,12 +2067,7 @@ class qu {
|
|
2095
2067
|
try {
|
2096
2068
|
this.engine.setItem(s, this.encrypt(de(n, !1, [], this.logger)));
|
2097
2069
|
} catch (i) {
|
2098
|
-
|
2099
|
-
this.logger.warn(Aa(`Store ${this.id}`)), this.swapQueueStoreToInMemoryEngine(), this.set(e, n);
|
2100
|
-
else {
|
2101
|
-
const r = ca(e);
|
2102
|
-
this.onError(i, r, r);
|
2103
|
-
}
|
2070
|
+
gi(i) ? (this.logger.warn(Oa(`Store ${this.id}`)), this.swapQueueStoreToInMemoryEngine(), this.set(e, n)) : this.onError(dt(i, la(e)));
|
2104
2071
|
}
|
2105
2072
|
}
|
2106
2073
|
/**
|
@@ -2110,10 +2077,9 @@ class qu {
|
|
2110
2077
|
const n = this.createValidKey(e);
|
2111
2078
|
let s;
|
2112
2079
|
try {
|
2113
|
-
return !n || (s = this.decrypt(this.engine.getItem(n)), le(s)
|
2080
|
+
return !n || (s = this.decrypt(this.engine.getItem(n)), le(s)) ? null : JSON.parse(s);
|
2114
2081
|
} catch (i) {
|
2115
|
-
|
2116
|
-
return this.onError(i, r, r), null;
|
2082
|
+
return this.onError(new Error(`${ua(e)}: ${i.message}`)), null;
|
2117
2083
|
}
|
2118
2084
|
}
|
2119
2085
|
/**
|
@@ -2145,7 +2111,7 @@ class qu {
|
|
2145
2111
|
* Extension point to use with encryption plugins
|
2146
2112
|
*/
|
2147
2113
|
crypto(e, n) {
|
2148
|
-
if (!this.isEncrypted || !e || typeof e != "string" ||
|
2114
|
+
if (!this.isEncrypted || !e || typeof e != "string" || xr(e) === "")
|
2149
2115
|
return e;
|
2150
2116
|
const i = `storage.${n}`, r = this.pluginsManager ? this.pluginsManager.invokeSingle(i, e) : e;
|
2151
2117
|
return typeof r > "u" ? e : r ?? "";
|
@@ -2153,11 +2119,11 @@ class qu {
|
|
2153
2119
|
/**
|
2154
2120
|
* Handle errors
|
2155
2121
|
*/
|
2156
|
-
onError(e
|
2157
|
-
this.errorHandler.onError(
|
2122
|
+
onError(e) {
|
2123
|
+
this.errorHandler.onError(e, `Store ${this.id}`);
|
2158
2124
|
}
|
2159
2125
|
}
|
2160
|
-
const
|
2126
|
+
const qu = (t, e) => {
|
2161
2127
|
var s;
|
2162
2128
|
let n;
|
2163
2129
|
if (t.consents.preConsent.value.enabled)
|
@@ -2174,10 +2140,10 @@ const zu = (t, e) => {
|
|
2174
2140
|
}
|
2175
2141
|
return n;
|
2176
2142
|
};
|
2177
|
-
class
|
2143
|
+
class zu {
|
2178
2144
|
constructor(e, n, s) {
|
2179
|
-
|
2180
|
-
|
2145
|
+
P(this, "stores", {});
|
2146
|
+
P(this, "isInitialized", !1);
|
2181
2147
|
this.errorHandler = n, this.logger = s, this.pluginsManager = e;
|
2182
2148
|
}
|
2183
2149
|
/**
|
@@ -2188,7 +2154,7 @@ class Ku {
|
|
2188
2154
|
if (this.isInitialized)
|
2189
2155
|
return;
|
2190
2156
|
const e = o.loadOptions.value, n = { cookieStorageOptions: { samesite: e.sameSiteCookie, secure: e.secureCookie, domain: e.setCookieDomain, sameDomainCookiesOnly: e.sameDomainCookiesOnly }, localStorageOptions: {}, inMemoryStorageOptions: {}, sessionStorageOptions: {} };
|
2191
|
-
|
2157
|
+
Gu(et(H(n.cookieStorageOptions ?? {}, ((s = o.storage.cookie) == null ? void 0 : s.value) ?? {})), et(n.localStorageOptions), et(n.inMemoryStorageOptions), et(n.sessionStorageOptions)), this.initClientDataStores(), this.isInitialized = !0;
|
2192
2158
|
}
|
2193
2159
|
/**
|
2194
2160
|
* Create store to persist data used by the SDK like session, used details etc
|
@@ -2203,11 +2169,11 @@ class Ku {
|
|
2203
2169
|
var a;
|
2204
2170
|
let e = o.storage.type.value, n = (a = o.loadOptions.value.storage) == null ? void 0 : a.entries;
|
2205
2171
|
const s = o.consents.postConsent.value.storage;
|
2206
|
-
(
|
2172
|
+
(N(s == null ? void 0 : s.type) || N(s == null ? void 0 : s.entries)) && (e = s == null ? void 0 : s.type, n = s == null ? void 0 : s.entries);
|
2207
2173
|
let i = !0, r = {};
|
2208
|
-
|
2174
|
+
hi.forEach((u) => {
|
2209
2175
|
var f;
|
2210
|
-
const l = u, c = u, d = (f = n == null ? void 0 : n[l]) == null ? void 0 : f.type, y =
|
2176
|
+
const l = u, c = u, d = (f = n == null ? void 0 : n[l]) == null ? void 0 : f.type, y = qu(o, u) ?? d ?? e ?? an, g = this.getResolvedStorageTypeForEntry(y, u);
|
2211
2177
|
g !== we && (i = !1), r = { ...r, [u]: { type: g, key: Ve[c] } };
|
2212
2178
|
}), j(() => {
|
2213
2179
|
o.storage.type.value = e, o.storage.entries.value = r, o.storage.trulyAnonymousTracking.value = i;
|
@@ -2231,14 +2197,14 @@ class Ku {
|
|
2231
2197
|
(a = ie(W)) != null && a.isEnabled ? s = W : (u = ie(X)) != null && u.isEnabled ? s = X : (l = ie(ee)) != null && l.isEnabled ? s = ee : s = ce;
|
2232
2198
|
break;
|
2233
2199
|
}
|
2234
|
-
return s !== e && this.logger.warn(
|
2200
|
+
return s !== e && this.logger.warn(Aa(qr, n, e, s)), s;
|
2235
2201
|
}
|
2236
2202
|
/**
|
2237
2203
|
* Create a new store
|
2238
2204
|
*/
|
2239
2205
|
setStore(e) {
|
2240
2206
|
const n = ie(e.type);
|
2241
|
-
return this.stores[e.id] = new
|
2207
|
+
return this.stores[e.id] = new ju(e, n, this.pluginsManager), this.stores[e.id];
|
2242
2208
|
}
|
2243
2209
|
/**
|
2244
2210
|
* Retrieve a store
|
@@ -2247,26 +2213,31 @@ class Ku {
|
|
2247
2213
|
return this.stores[e];
|
2248
2214
|
}
|
2249
2215
|
}
|
2250
|
-
const
|
2216
|
+
const Ku = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config) && Array.isArray(t.source.destinations), Yu = (t) => typeof t == "string" && Qs.includes(t), mi = (t) => {
|
2251
2217
|
const e = new URL(t), { host: n, protocol: s } = e, i = n.split(".");
|
2252
2218
|
let r;
|
2253
2219
|
return i.length > 2 ? r = `${i[i.length - 2]}.${i[i.length - 1]}` : r = n, { topDomain: r, protocol: s };
|
2254
|
-
},
|
2255
|
-
const { topDomain: e, protocol: n } =
|
2220
|
+
}, Wu = (t) => {
|
2221
|
+
const { topDomain: e, protocol: n } = mi(t);
|
2256
2222
|
return `${n}//${e}`;
|
2257
|
-
},
|
2258
|
-
const n = e ? window.location.origin :
|
2223
|
+
}, Qu = (t, e) => {
|
2224
|
+
const n = e ? window.location.origin : Wu(window.location.href), s = t.startsWith("/") ? t.substring(1) : t;
|
2259
2225
|
return `${n}/${s}`;
|
2260
|
-
},
|
2261
|
-
const { topDomain: e } =
|
2226
|
+
}, Xu = (t) => {
|
2227
|
+
const { topDomain: e } = mi(window.location.href);
|
2262
2228
|
return e === t;
|
2263
|
-
},
|
2229
|
+
}, Ju = (t) => {
|
2230
|
+
const e = [];
|
2231
|
+
return t.forEach((n) => {
|
2232
|
+
n.enabled && !n.deleted && e.push({ id: n.id, displayName: n.destinationDefinition.displayName, config: n.config, shouldApplyDeviceModeTransformation: n.shouldApplyDeviceModeTransformation || !1, propagateEventsUntransformedOnError: n.propagateEventsUntransformedOnError || !1, userFriendlyId: `${n.destinationDefinition.displayName.replaceAll(" ", "-")}___${n.id}` });
|
2233
|
+
}), e;
|
2234
|
+
}, ze = (t) => t != null && t.endsWith("/") ? ze(t.substring(0, t.length - 1)) : t, dn = (t) => {
|
2264
2235
|
try {
|
2265
2236
|
return new URL(t).host;
|
2266
2237
|
} catch {
|
2267
2238
|
return null;
|
2268
2239
|
}
|
2269
|
-
},
|
2240
|
+
}, pi = (t) => dn(t) ?? "", Zu = (t) => {
|
2270
2241
|
const e = {};
|
2271
2242
|
try {
|
2272
2243
|
const n = new URL(t), s = "utm_";
|
@@ -2288,17 +2259,17 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2288
2259
|
}
|
2289
2260
|
return e;
|
2290
2261
|
}, tc = (t) => t.replace(/\/{2,}/g, "/"), Ke = (t) => {
|
2291
|
-
if (!
|
2262
|
+
if (!B(t))
|
2292
2263
|
return !1;
|
2293
2264
|
try {
|
2294
|
-
return S(globalThis.URL) && new URL(t),
|
2265
|
+
return S(globalThis.URL) && new URL(t), Ba.test(t);
|
2295
2266
|
} catch {
|
2296
2267
|
return !1;
|
2297
2268
|
}
|
2298
2269
|
}, nc = () => {
|
2299
2270
|
var t, e;
|
2300
2271
|
return !!((e = (t = window.chrome) == null ? void 0 : t.runtime) != null && e.id);
|
2301
|
-
},
|
2272
|
+
}, Wt = "none", Qt = "immediate", sc = (t) => {
|
2302
2273
|
var e, n;
|
2303
2274
|
return ((n = (e = t == null ? void 0 : t.statsCollection) == null ? void 0 : e.errors) == null ? void 0 : n.enabled) === !0;
|
2304
2275
|
}, ic = (t) => {
|
@@ -2307,17 +2278,17 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2307
2278
|
}, rc = (t) => {
|
2308
2279
|
const e = { sendPageEvent: !1, trackConsent: !1, discardPreConsentEvents: !1 };
|
2309
2280
|
if (w(t)) {
|
2310
|
-
const n =
|
2311
|
-
e.storage = n.storage,
|
2281
|
+
const n = T(t);
|
2282
|
+
e.storage = n.storage, Ie(n.integrations) && (e.integrations = n.integrations), e.discardPreConsentEvents = n.discardPreConsentEvents === !0, e.sendPageEvent = n.sendPageEvent === !0, e.trackConsent = n.trackConsent === !0, Ie(n.consentManagement) && (e.consentManagement = H(n.consentManagement, { enabled: o.consents.enabled.value }));
|
2312
2283
|
}
|
2313
2284
|
return e;
|
2314
|
-
},
|
2285
|
+
}, is = (t) => Ie(t) || Array.isArray(t), oc = (t, e) => {
|
2315
2286
|
let { provider: n } = t;
|
2316
|
-
const s = n ?
|
2317
|
-
return n && !s && (e.error(
|
2318
|
-
},
|
2287
|
+
const s = n ? ln[n] : void 0;
|
2288
|
+
return n && !s && (e.error(zo(te, n, ln)), n = void 0), { provider: n, consentManagerPluginName: s };
|
2289
|
+
}, vi = (t, e) => {
|
2319
2290
|
let n, s = [], i = [], r = !1, a, u = (t == null ? void 0 : t.enabled) === !0;
|
2320
|
-
|
2291
|
+
Ie(t) && u && ({ provider: a, consentManagerPluginName: n } = oc(t, e), is(t.allowedConsentIds) && (s = t.allowedConsentIds, r = !0), is(t.deniedConsentIds) && (i = t.deniedConsentIds, r = !0));
|
2321
2292
|
const l = { allowedConsentIds: s, deniedConsentIds: i };
|
2322
2293
|
return u = u && !!n, { provider: a, consentManagerPluginName: n, initialized: r, enabled: u, consentsData: l };
|
2323
2294
|
}, ac = () => {
|
@@ -2337,11 +2308,11 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2337
2308
|
let a = s == null ? void 0 : s.cookie, u = !1, l;
|
2338
2309
|
if (e) {
|
2339
2310
|
u = e;
|
2340
|
-
const c = a.domain ?? i, d =
|
2311
|
+
const c = a.domain ?? i, d = N(c) && !Xu(Pn(c)) || r, h = Qu(n ?? Ha, d);
|
2341
2312
|
if (Ke(h)) {
|
2342
2313
|
l = ze(h);
|
2343
|
-
const y =
|
2344
|
-
y !== g && (a = { ...a, samesite: "None", secure: !0 }), !r && d && g !== Pn(c) && (u = !1, t.warn(
|
2314
|
+
const y = dn(window.location.href), g = dn(h);
|
2315
|
+
y !== g && (a = { ...a, samesite: "None", secure: !0 }), !r && d && g !== Pn(c) && (u = !1, t.warn(pa(te, c, g)));
|
2345
2316
|
} else
|
2346
2317
|
u = !1;
|
2347
2318
|
}
|
@@ -2350,25 +2321,25 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2350
2321
|
var d;
|
2351
2322
|
const { storage: e } = o.loadOptions.value;
|
2352
2323
|
let n = e == null ? void 0 : e.type;
|
2353
|
-
|
2324
|
+
N(n) && !Yu(n) && (t.warn(ha(te, n, an)), n = an);
|
2354
2325
|
let s = (d = e == null ? void 0 : e.encryption) == null ? void 0 : d.version;
|
2355
2326
|
const i = s && Tt[s];
|
2356
|
-
!G(s) && G(i) ? (t.warn(
|
2327
|
+
!G(s) && G(i) ? (t.warn(ga(te, s, Tt, Ce)), s = Ce) : G(s) && (s = Ce);
|
2357
2328
|
const r = e == null ? void 0 : e.migrate, a = r && s === Ce;
|
2358
|
-
r === !0 && a !== r && t.warn(
|
2329
|
+
r === !0 && a !== r && t.warn(ma(te, s, Ce));
|
2359
2330
|
const { sscEnabled: u, finalDataServiceUrl: l, cookieOptions: c } = uc(t);
|
2360
2331
|
j(() => {
|
2361
2332
|
o.storage.type.value = n, o.storage.cookie.value = c, o.serverCookies.isEnabledServerSideCookies.value = u, o.serverCookies.dataServiceUrl.value = l, o.storage.encryptionPluginName.value = Tt[s], o.storage.migrate.value = a;
|
2362
2333
|
});
|
2363
2334
|
}, dc = (t) => {
|
2364
2335
|
var h, y, g, f;
|
2365
|
-
const { provider: e, consentManagerPluginName: n, initialized: s, enabled: i, consentsData: r } =
|
2366
|
-
let u = ((h = a == null ? void 0 : a.storage) == null ? void 0 : h.strategy) ??
|
2336
|
+
const { provider: e, consentManagerPluginName: n, initialized: s, enabled: i, consentsData: r } = vi(o.loadOptions.value.consentManagement, t), a = o.loadOptions.value.preConsent;
|
2337
|
+
let u = ((h = a == null ? void 0 : a.storage) == null ? void 0 : h.strategy) ?? Wt;
|
2367
2338
|
const l = ["none", "session", "anonymousId"];
|
2368
|
-
|
2369
|
-
let c = ((g = a == null ? void 0 : a.events) == null ? void 0 : g.delivery) ??
|
2339
|
+
N(u) && !l.includes(u) && (u = Wt, t.warn(Pa(te, (y = a == null ? void 0 : a.storage) == null ? void 0 : y.strategy, Wt)));
|
2340
|
+
let c = ((g = a == null ? void 0 : a.events) == null ? void 0 : g.delivery) ?? Qt;
|
2370
2341
|
const d = ["immediate", "buffer"];
|
2371
|
-
|
2342
|
+
N(c) && !d.includes(c) && (c = Qt, t.warn(Na(te, (f = a == null ? void 0 : a.events) == null ? void 0 : f.delivery, Qt))), j(() => {
|
2372
2343
|
var m;
|
2373
2344
|
o.consents.activeConsentManagerPluginName.value = n, o.consents.initialized.value = s, o.consents.enabled.value = i, o.consents.data.value = r, o.consents.provider.value = e, o.consents.preConsent.value = {
|
2374
2345
|
// Only enable pre-consent if it is explicitly enabled and
|
@@ -2383,45 +2354,45 @@ const Yu = (t) => w(t) && w(t.source) && !le(t.source.id) && w(t.source.config)
|
|
2383
2354
|
var s;
|
2384
2355
|
let e = o.consents.resolutionStrategy.value, n;
|
2385
2356
|
w(t.consentManagementMetadata) && (o.consents.provider.value && (e = ((s = t.consentManagementMetadata.providers.find((i) => i.provider === o.consents.provider.value)) == null ? void 0 : s.resolutionStrategy) ?? o.consents.resolutionStrategy.value), n = t.consentManagementMetadata), o.consents.provider.value === "custom" && (e = void 0), j(() => {
|
2386
|
-
o.consents.metadata.value =
|
2357
|
+
o.consents.metadata.value = T(n), o.consents.resolutionStrategy.value = e;
|
2387
2358
|
});
|
2388
2359
|
}, hc = (t) => {
|
2389
2360
|
if (o.dataPlaneEvents.deliveryEnabled.value) {
|
2390
2361
|
const e = "XhrQueue";
|
2391
2362
|
let n = e;
|
2392
|
-
o.loadOptions.value.useBeacon && (o.capabilities.isBeaconAvailable.value ? n = "BeaconQueue" : (n = e, t.warn(
|
2363
|
+
o.loadOptions.value.useBeacon && (o.capabilities.isBeaconAvailable.value ? n = "BeaconQueue" : (n = e, t.warn(ba(te)))), j(() => {
|
2393
2364
|
o.dataPlaneEvents.eventsQueuePluginName.value = n;
|
2394
2365
|
});
|
2395
2366
|
}
|
2396
2367
|
}, gc = (t, e, n, s, i) => {
|
2397
|
-
const r = new URLSearchParams({ p:
|
2398
|
-
let a =
|
2368
|
+
const r = new URLSearchParams({ p: Fs, v: at, build: ut, writeKey: e, lockIntegrationsVersion: n.toString(), lockPluginsVersion: s.toString() });
|
2369
|
+
let a = ni, u = r, l = "/sourceConfig/", c = "";
|
2399
2370
|
if (Ke(t)) {
|
2400
2371
|
const d = new URL(t);
|
2401
2372
|
ze(d.pathname).endsWith("/sourceConfig") || (d.pathname = `${ze(d.pathname)}/sourceConfig/`), d.pathname = tc(d.pathname), r.forEach((h, y) => {
|
2402
2373
|
d.searchParams.get(y) === null && d.searchParams.set(y, h);
|
2403
2374
|
}), a = d.origin, l = d.pathname, u = d.searchParams, c = d.hash;
|
2404
2375
|
} else
|
2405
|
-
i.warn(
|
2376
|
+
i.warn(Ca(te, t));
|
2406
2377
|
return `${a}${l}?${u}${c}`;
|
2407
|
-
},
|
2378
|
+
}, yi = (t, e, n, s, i, r, a) => {
|
2408
2379
|
let u;
|
2409
2380
|
if (r) {
|
2410
2381
|
if (!Ke(r))
|
2411
|
-
return a.error(
|
2382
|
+
return a.error(qo(te, t, r)), null;
|
2412
2383
|
u = ze(r);
|
2413
2384
|
} else if (u = n, o.context.app.value.installType === "cdn") {
|
2414
2385
|
const l = ac();
|
2415
2386
|
l && (u = l.split("/").slice(0, -1).concat(e).join("/"));
|
2416
2387
|
}
|
2417
|
-
return i && (u = u.replace(new RegExp(`/${
|
2418
|
-
},
|
2419
|
-
class
|
2388
|
+
return i && (u = u.replace(new RegExp(`/${In}/${ut}/${e}$`), `/${s}/${ut}/${e}`)), u;
|
2389
|
+
}, mc = (t, e, n, s) => yi("integrations", Rn, ei, t, e, n, s), pc = (t, e, n, s) => yi("plugins", Zs, ti, t, e, n, s);
|
2390
|
+
class vc {
|
2420
2391
|
constructor(e, n, s) {
|
2421
2392
|
this.errorHandler = n, this.logger = s, this.httpClient = e, this.onError = this.onError.bind(this), this.processConfig = this.processConfig.bind(this);
|
2422
2393
|
}
|
2423
2394
|
attachEffects() {
|
2424
|
-
|
2395
|
+
pe(() => {
|
2425
2396
|
this.logger.setMinLogLevel(o.lifecycle.logLevel.value);
|
2426
2397
|
});
|
2427
2398
|
}
|
@@ -2430,46 +2401,46 @@ class yc {
|
|
2430
2401
|
* config related information in global state
|
2431
2402
|
*/
|
2432
2403
|
init() {
|
2433
|
-
const { logLevel: e, configUrl: n, lockIntegrationsVersion: s, lockPluginsVersion: i, destSDKBaseURL: r, pluginsSDKBaseURL: a, integrations: u } = o.loadOptions.value, l =
|
2404
|
+
const { logLevel: e, configUrl: n, lockIntegrationsVersion: s, lockPluginsVersion: i, destSDKBaseURL: r, pluginsSDKBaseURL: a, integrations: u } = o.loadOptions.value, l = mc(at, s, r, this.logger);
|
2434
2405
|
if (ne(l))
|
2435
2406
|
return;
|
2436
2407
|
let c;
|
2437
|
-
c =
|
2438
|
-
o.lifecycle.integrationsCDNPath.value = l, o.lifecycle.pluginsCDNPath.value = c, e && (o.lifecycle.logLevel.value = e), o.lifecycle.sourceConfigUrl.value = gc(n, o.lifecycle.writeKey.value, s, i, this.logger), o.metrics.metricsServiceUrl.value = `${o.lifecycle.activeDataplaneUrl.value}/${
|
2408
|
+
c = pc(at, i, a, this.logger), c !== null && (this.attachEffects(), o.lifecycle.activeDataplaneUrl.value = ze(o.lifecycle.dataPlaneUrl.value), cc(this.logger), dc(this.logger), hc(this.logger), j(() => {
|
2409
|
+
o.lifecycle.integrationsCDNPath.value = l, o.lifecycle.pluginsCDNPath.value = c, e && (o.lifecycle.logLevel.value = e), o.lifecycle.sourceConfigUrl.value = gc(n, o.lifecycle.writeKey.value, s, i, this.logger), o.metrics.metricsServiceUrl.value = `${o.lifecycle.activeDataplaneUrl.value}/${xa}`, o.nativeDestinations.loadOnlyIntegrations.value = u;
|
2439
2410
|
}), this.getConfig());
|
2440
2411
|
}
|
2441
2412
|
/**
|
2442
2413
|
* Handle errors
|
2443
2414
|
*/
|
2444
|
-
onError(e, n
|
2445
|
-
this.errorHandler.onError(
|
2415
|
+
onError(e, n) {
|
2416
|
+
this.errorHandler.onError(e, te, n);
|
2446
2417
|
}
|
2447
2418
|
/**
|
2448
2419
|
* A callback function that is executed once we fetch the source config response.
|
2449
2420
|
* Use to construct and store information that are dependent on the sourceConfig.
|
2450
2421
|
*/
|
2451
2422
|
processConfig(e, n) {
|
2452
|
-
if (!
|
2453
|
-
|
2423
|
+
if (!N(e)) {
|
2424
|
+
N(n) ? this.onError(n.error, jn) : this.onError(new Error(jn));
|
2454
2425
|
return;
|
2455
2426
|
}
|
2456
2427
|
let s;
|
2457
2428
|
try {
|
2458
|
-
|
2429
|
+
B(e) ? s = JSON.parse(e) : s = e;
|
2459
2430
|
} catch (r) {
|
2460
2431
|
this.onError(r, Gn);
|
2461
2432
|
return;
|
2462
2433
|
}
|
2463
|
-
if (!
|
2434
|
+
if (!Ku(s)) {
|
2464
2435
|
this.onError(new Error(Gn));
|
2465
2436
|
return;
|
2466
2437
|
}
|
2467
2438
|
if (s.source.enabled === !1) {
|
2468
|
-
this.logger.error(
|
2439
|
+
this.logger.error(Fo);
|
2469
2440
|
return;
|
2470
2441
|
}
|
2471
2442
|
lc(s);
|
2472
|
-
const i = s.source.destinations.length > 0 ?
|
2443
|
+
const i = s.source.destinations.length > 0 ? Ju(s.source.destinations) : [];
|
2473
2444
|
j(() => {
|
2474
2445
|
o.source.value = { config: s.source.config, name: s.source.name, id: s.source.id, workspaceId: s.source.workspaceId }, o.nativeDestinations.configuredDestinations.value = i, o.plugins.pluginsToLoadFromConfig.value = o.loadOptions.value.plugins ?? [], fc(s), o.lifecycle.status.value = "configured";
|
2475
2446
|
});
|
@@ -2483,7 +2454,7 @@ class yc {
|
|
2483
2454
|
const e = o.loadOptions.value.getSourceConfig;
|
2484
2455
|
if (e) {
|
2485
2456
|
if (!S(e)) {
|
2486
|
-
this.logger.error(
|
2457
|
+
this.logger.error(jo(te));
|
2487
2458
|
return;
|
2488
2459
|
}
|
2489
2460
|
const n = e();
|
@@ -2494,10 +2465,10 @@ class yc {
|
|
2494
2465
|
this.httpClient.getAsyncData({ url: o.lifecycle.sourceConfigUrl.value, options: { headers: { "Content-Type": void 0 } }, callback: this.processConfig });
|
2495
2466
|
}
|
2496
2467
|
}
|
2497
|
-
const
|
2468
|
+
const yc = () => {
|
2498
2469
|
const t = /([A-Z]+[+-]\d+)/.exec((/* @__PURE__ */ new Date()).toString());
|
2499
2470
|
return t != null && t[1] ? t[1] : "NA";
|
2500
|
-
},
|
2471
|
+
}, bi = () => (document == null ? void 0 : document.referrer) || "$direct", bc = () => {
|
2501
2472
|
const t = document.getElementsByTagName("link");
|
2502
2473
|
let e = "";
|
2503
2474
|
for (let n = 0; t[n]; n += 1) {
|
@@ -2508,7 +2479,7 @@ const bc = () => {
|
|
2508
2479
|
}
|
2509
2480
|
}
|
2510
2481
|
return e;
|
2511
|
-
},
|
2482
|
+
}, Ec = () => {
|
2512
2483
|
if (G(globalThis.navigator))
|
2513
2484
|
return null;
|
2514
2485
|
let { userAgent: t } = globalThis.navigator;
|
@@ -2518,8 +2489,8 @@ const bc = () => {
|
|
2518
2489
|
n && (t = `${t} Brave/${n[2]}`);
|
2519
2490
|
}
|
2520
2491
|
return t;
|
2521
|
-
},
|
2522
|
-
const t =
|
2492
|
+
}, Sc = () => G(globalThis.navigator) ? null : globalThis.navigator.language ?? globalThis.navigator.browserLanguage, Ei = () => {
|
2493
|
+
const t = bc();
|
2523
2494
|
let e = globalThis.location.pathname;
|
2524
2495
|
const { href: n } = globalThis.location;
|
2525
2496
|
let s = n;
|
@@ -2530,12 +2501,12 @@ const bc = () => {
|
|
2530
2501
|
l.search === "" ? s = t + i : s = t, e = l.pathname;
|
2531
2502
|
} catch {
|
2532
2503
|
}
|
2533
|
-
const r = ec(s), { title: a } = document, u =
|
2534
|
-
return { path: e, referrer: u, referring_domain:
|
2535
|
-
},
|
2504
|
+
const r = ec(s), { title: a } = document, u = bi();
|
2505
|
+
return { path: e, referrer: u, referring_domain: pi(u), search: i, title: a, url: r, tab_url: n };
|
2506
|
+
}, kc = `https://polyfill-fastly.io/v3/polyfill.min.js?version=3.111.0&features=${Object.keys(cn).join("%2C")}`, Rc = 10 * 1e3, rs = "rudderstackPolyfill";
|
2536
2507
|
class Ic {
|
2537
2508
|
constructor(e, n, s) {
|
2538
|
-
this.httpClient = e, this.errorHandler = n, this.logger = s, this.externalSrcLoader = new
|
2509
|
+
this.httpClient = e, this.errorHandler = n, this.logger = s, this.externalSrcLoader = new Gs(this.errorHandler, this.logger), this.onError = this.onError.bind(this), this.onReady = this.onReady.bind(this);
|
2539
2510
|
}
|
2540
2511
|
init() {
|
2541
2512
|
this.prepareBrowserCapabilities(), this.attachWindowListeners();
|
@@ -2546,21 +2517,21 @@ class Ic {
|
|
2546
2517
|
// eslint-disable-next-line class-methods-use-this
|
2547
2518
|
detectBrowserCapabilities() {
|
2548
2519
|
j(() => {
|
2549
|
-
o.capabilities.storage.isCookieStorageAvailable.value = Ge(W, ie(W), this.logger), o.capabilities.storage.isLocalStorageAvailable.value = Ge(X, void 0, this.logger), o.capabilities.storage.isSessionStorageAvailable.value = Ge(ee, void 0, this.logger), o.capabilities.isBeaconAvailable.value =
|
2520
|
+
o.capabilities.storage.isCookieStorageAvailable.value = Ge(W, ie(W), this.logger), o.capabilities.storage.isLocalStorageAvailable.value = Ge(X, void 0, this.logger), o.capabilities.storage.isSessionStorageAvailable.value = Ge(ee, void 0, this.logger), o.capabilities.isBeaconAvailable.value = Pu(), o.capabilities.isUaCHAvailable.value = ns(), o.capabilities.isCryptoAvailable.value = _u(), o.capabilities.isIE11.value = Nu(), o.capabilities.isOnline.value = globalThis.navigator.onLine, o.context.userAgent.value = Ec(), o.context.locale.value = Sc(), o.context.screen.value = ss(), o.context.timezone.value = yc(), ns() && Lu((e) => {
|
2550
2521
|
o.context["ua-ch"].value = e;
|
2551
2522
|
}, o.loadOptions.value.uaChTrackLevel);
|
2552
|
-
}),
|
2553
|
-
o.loadOptions.value.sendAdblockPage === !0 && o.lifecycle.sourceConfigUrl.value !== void 0 &&
|
2523
|
+
}), pe(() => {
|
2524
|
+
o.loadOptions.value.sendAdblockPage === !0 && o.lifecycle.sourceConfigUrl.value !== void 0 && Cu(this.httpClient);
|
2554
2525
|
});
|
2555
2526
|
}
|
2556
2527
|
/**
|
2557
2528
|
* Detect if polyfills are required and then load script from polyfill URL
|
2558
2529
|
*/
|
2559
2530
|
prepareBrowserCapabilities() {
|
2560
|
-
o.capabilities.isLegacyDOM.value =
|
2531
|
+
o.capabilities.isLegacyDOM.value = Mu();
|
2561
2532
|
const e = o.loadOptions.value.polyfillURL;
|
2562
|
-
let n =
|
2563
|
-
if (qe(e) && (Ke(e) ? n = e : this.logger.warn(
|
2533
|
+
let n = kc;
|
2534
|
+
if (qe(e) && (Ke(e) ? n = e : this.logger.warn(Ma(sn, e))), o.loadOptions.value.polyfillIfRequired && o.capabilities.isLegacyDOM.value && Ke(n)) {
|
2564
2535
|
const i = n !== o.loadOptions.value.polyfillURL;
|
2565
2536
|
if (i) {
|
2566
2537
|
const r = `RS_polyfillCallback_${o.lifecycle.writeKey.value}`, a = () => {
|
@@ -2568,8 +2539,8 @@ class Ic {
|
|
2568
2539
|
};
|
2569
2540
|
globalThis[r] = a, n = `${n}&callback=${r}`;
|
2570
2541
|
}
|
2571
|
-
this.externalSrcLoader.loadJSFile({ url: n, id:
|
2572
|
-
r ? i || this.onReady() : this.onError(new Error(
|
2542
|
+
this.externalSrcLoader.loadJSFile({ url: n, id: rs, async: !0, timeout: Rc, callback: (r) => {
|
2543
|
+
r ? i || this.onReady() : this.onError(new Error(_a(rs, n)));
|
2573
2544
|
} });
|
2574
2545
|
} else
|
2575
2546
|
this.onReady();
|
@@ -2582,8 +2553,8 @@ class Ic {
|
|
2582
2553
|
o.capabilities.isOnline.value = !1;
|
2583
2554
|
}), globalThis.addEventListener("online", () => {
|
2584
2555
|
o.capabilities.isOnline.value = !0;
|
2585
|
-
}), globalThis.addEventListener("resize",
|
2586
|
-
o.context.screen.value =
|
2556
|
+
}), globalThis.addEventListener("resize", ko(() => {
|
2557
|
+
o.context.screen.value = ss();
|
2587
2558
|
}, this));
|
2588
2559
|
}
|
2589
2560
|
/**
|
@@ -2597,17 +2568,17 @@ class Ic {
|
|
2597
2568
|
* Handles error
|
2598
2569
|
* @param error The error object
|
2599
2570
|
*/
|
2600
|
-
onError(e
|
2601
|
-
this.errorHandler.onError(
|
2571
|
+
onError(e) {
|
2572
|
+
this.errorHandler.onError(e, sn);
|
2602
2573
|
}
|
2603
2574
|
}
|
2604
|
-
const
|
2575
|
+
const Tc = "web", Oc = ["integrations", "anonymousId", "originalTimestamp"], os = ["library", "consentManagement", "userAgent", "ua-ch", "screen"], Xt = ["id", "anonymous_id", "user_id", "sent_at", "timestamp", "received_at", "original_timestamp", "event", "event_text", "channel", "context_ip", "context_request_ip", "context_passed_ip", "group_id", "previous_id"], Si = (t) => typeof t == "number" && !Number.isNaN(t), Ac = (t, e) => e.toString().length >= t, Ut = (t) => Si(t) && t >= 0 && Number.isInteger(t), as = 10, ki = (t) => {
|
2605
2576
|
const { cutOff: e } = t, n = Date.now();
|
2606
2577
|
return !!(e != null && e.enabled && e.expiresAt && n > e.expiresAt);
|
2607
|
-
},
|
2578
|
+
}, ls = (t) => !t.expiresAt || Date.now() > t.expiresAt || ki(t), Dc = () => Date.now(), Cc = (t, e) => !t || !Ut(t) || !Ac(as, t) ? (e.warn(Ta(De, t, as)), !1) : !0, _c = (t) => {
|
2608
2579
|
if (t != null && t.enabled)
|
2609
|
-
return t.expiresAt ?? (
|
2610
|
-
},
|
2580
|
+
return t.expiresAt ?? (Ut(t.duration) ? Date.now() + t.duration : void 0);
|
2581
|
+
}, Pc = (t) => {
|
2611
2582
|
const { timeout: e, cutOff: n } = t, s = Date.now();
|
2612
2583
|
return {
|
2613
2584
|
id: s,
|
@@ -2618,52 +2589,52 @@ const Oc = "web", Ac = ["integrations", "anonymousId", "originalTimestamp"], ls
|
|
2618
2589
|
autoTrack: !0,
|
2619
2590
|
...n && { cutOff: n }
|
2620
2591
|
};
|
2621
|
-
},
|
2622
|
-
const e =
|
2592
|
+
}, Nc = (t, e) => ({ id: Cc(t, e) ? t : Dc(), sessionStart: void 0, manualTrack: !0 }), nt = (t) => t === W || t === X || t === ee || t === ce, fn = () => Vt(), Lc = (t) => {
|
2593
|
+
const e = Ei(), n = {};
|
2623
2594
|
return Object.keys(e).forEach((s) => {
|
2624
2595
|
n[s] = (t == null ? void 0 : t[s]) || e[s];
|
2625
2596
|
}), n.initial_referrer = (t == null ? void 0 : t.initial_referrer) || o.session.initialReferrer.value, n.initial_referring_domain = (t == null ? void 0 : t.initial_referring_domain) || o.session.initialReferringDomain.value, n;
|
2626
|
-
},
|
2627
|
-
const n = (e == null ? void 0 : e.page) || {}, s = t, i =
|
2597
|
+
}, wc = (t, e) => {
|
2598
|
+
const n = (e == null ? void 0 : e.page) || {}, s = t, i = Ei();
|
2628
2599
|
return Object.keys(i).forEach((r) => {
|
2629
2600
|
G(s[r]) && (s[r] = n[r] || i[r]);
|
2630
2601
|
}), G(s.initial_referrer) && (s.initial_referrer = n.initial_referrer || o.session.initialReferrer.value), G(s.initial_referring_domain) && (s.initial_referring_domain = n.initial_referring_domain || o.session.initialReferringDomain.value), s;
|
2631
|
-
},
|
2602
|
+
}, Jt = (t, e, n) => {
|
2632
2603
|
w(t) && Object.keys(t).forEach((s) => {
|
2633
|
-
(
|
2604
|
+
(Xt.includes(s) || Xt.includes(s.toLowerCase())) && n.warn(va($s, s, e, Xt));
|
2634
2605
|
});
|
2635
|
-
},
|
2606
|
+
}, Mc = (t, e) => {
|
2636
2607
|
const { properties: n, traits: s, context: i } = t, { traits: r } = i;
|
2637
|
-
|
2638
|
-
},
|
2639
|
-
e.anonymousId &&
|
2640
|
-
},
|
2608
|
+
Jt(n, "properties", e), Jt(s, "traits", e), Jt(r, "context.traits", e);
|
2609
|
+
}, $c = (t, e) => {
|
2610
|
+
e.anonymousId && B(e.anonymousId) && (t.anonymousId = e.anonymousId), Ie(e.integrations) && (t.integrations = e.integrations), e.originalTimestamp && B(e.originalTimestamp) && (t.originalTimestamp = e.originalTimestamp);
|
2611
|
+
}, Uc = (t, e, n) => {
|
2641
2612
|
let s = t;
|
2642
2613
|
return Object.keys(e).forEach((i) => {
|
2643
|
-
if (!
|
2614
|
+
if (!Oc.includes(i) && !os.includes(i))
|
2644
2615
|
if (i !== "context")
|
2645
|
-
s =
|
2616
|
+
s = H(s, { [i]: e[i] });
|
2646
2617
|
else if (!G(e[i]) && w(e[i])) {
|
2647
2618
|
const r = {};
|
2648
2619
|
Object.keys(e[i]).forEach((a) => {
|
2649
|
-
|
2650
|
-
}), s =
|
2620
|
+
os.includes(a) || (r[a] = e[i][a]);
|
2621
|
+
}), s = H(s, { ...r });
|
2651
2622
|
} else
|
2652
|
-
n.warn(
|
2623
|
+
n.warn(ya($s));
|
2653
2624
|
}), s;
|
2654
|
-
},
|
2655
|
-
w(e) && (
|
2656
|
-
},
|
2625
|
+
}, Bc = (t, e, n) => {
|
2626
|
+
w(e) && ($c(t, e), t.context = Uc(t.context, e, n));
|
2627
|
+
}, Vc = (t) => {
|
2657
2628
|
let e;
|
2658
|
-
return o.loadOptions.value.useGlobalIntegrationsConfigInEvents ? e = o.consents.postConsent.value.integrations ?? o.nativeDestinations.loadOnlyIntegrations.value : t ? e = t : e =
|
2659
|
-
},
|
2629
|
+
return o.loadOptions.value.useGlobalIntegrationsConfigInEvents ? e = o.consents.postConsent.value.integrations ?? o.nativeDestinations.loadOnlyIntegrations.value : t ? e = t : e = Js, T(e);
|
2630
|
+
}, Ze = (t, e, n, s) => {
|
2660
2631
|
var a, u, l;
|
2661
|
-
const i = { channel:
|
2662
|
-
traits:
|
2632
|
+
const i = { channel: Tc, context: {
|
2633
|
+
traits: T(o.session.userTraits.value),
|
2663
2634
|
sessionId: o.session.sessionInfo.value.id || void 0,
|
2664
2635
|
sessionStart: o.session.sessionInfo.value.sessionStart || void 0,
|
2665
2636
|
// Add 'consentManagement' only if consent management is enabled
|
2666
|
-
...o.consents.enabled.value && { consentManagement: { deniedConsentIds:
|
2637
|
+
...o.consents.enabled.value && { consentManagement: { deniedConsentIds: T(o.consents.data.value.deniedConsentIds), allowedConsentIds: T(o.consents.data.value.allowedConsentIds), provider: o.consents.provider.value, resolutionStrategy: o.consents.resolutionStrategy.value } },
|
2667
2638
|
"ua-ch": o.context["ua-ch"].value,
|
2668
2639
|
app: o.context.app.value,
|
2669
2640
|
library: o.context.library.value,
|
@@ -2672,16 +2643,16 @@ const Oc = "web", Ac = ["integrations", "anonymousId", "originalTimestamp"], ls
|
|
2672
2643
|
locale: o.context.locale.value,
|
2673
2644
|
screen: o.context.screen.value,
|
2674
2645
|
campaign: Zu(globalThis.location.href),
|
2675
|
-
page:
|
2646
|
+
page: Lc(n),
|
2676
2647
|
timezone: o.context.timezone.value,
|
2677
2648
|
// Add auto tracking information
|
2678
2649
|
...o.autoTrack.enabled.value && { autoTrack: { ...o.autoTrack.pageLifecycle.enabled.value && { page: { pageViewId: o.autoTrack.pageLifecycle.pageViewId.value } } } }
|
2679
|
-
}, originalTimestamp:
|
2680
|
-
|
2681
|
-
const r =
|
2682
|
-
return r.event === void 0 && (r.event = null), r.properties === void 0 && (r.properties = null),
|
2650
|
+
}, originalTimestamp: to(), messageId: Vt(), userId: t.userId || o.session.userId.value };
|
2651
|
+
nt((a = o.storage.entries.value.anonymousId) == null ? void 0 : a.type) ? i.anonymousId = o.session.anonymousId.value : i.anonymousId = fn(), o.storage.trulyAnonymousTracking.value && (i.context.trulyAnonymousTracking = !0), t.type === "identify" && (i.context.traits = ((u = o.storage.entries.value.userTraits) == null ? void 0 : u.type) !== we ? T(o.session.userTraits.value) : t.context.traits), t.type === "group" && ((t.groupId || o.session.groupId.value) && (i.groupId = t.groupId || o.session.groupId.value), (t.traits || o.session.groupTraits.value) && (i.traits = ((l = o.storage.entries.value.groupTraits) == null ? void 0 : l.type) !== we ? T(o.session.groupTraits.value) : t.traits));
|
2652
|
+
const r = H(t, i);
|
2653
|
+
return r.event === void 0 && (r.event = null), r.properties === void 0 && (r.properties = null), Bc(r, e, s), Mc(r, s), r.integrations = Vc(r.integrations), r;
|
2683
2654
|
};
|
2684
|
-
class
|
2655
|
+
class Fc {
|
2685
2656
|
constructor(e) {
|
2686
2657
|
this.logger = e;
|
2687
2658
|
}
|
@@ -2694,7 +2665,7 @@ class xc {
|
|
2694
2665
|
*/
|
2695
2666
|
generatePageEvent(e, n, s, i) {
|
2696
2667
|
let r = s ?? {};
|
2697
|
-
return r =
|
2668
|
+
return r = wc(r, i), Ze({ properties: r, name: n, category: e, type: "page" }, i, r, this.logger);
|
2698
2669
|
}
|
2699
2670
|
/**
|
2700
2671
|
* Generate a 'track' event based on the user-input fields
|
@@ -2703,7 +2674,7 @@ class xc {
|
|
2703
2674
|
* @param options API options
|
2704
2675
|
*/
|
2705
2676
|
generateTrackEvent(e, n, s) {
|
2706
|
-
return
|
2677
|
+
return Ze({ properties: n, event: e, type: "track" }, s, void 0, this.logger);
|
2707
2678
|
}
|
2708
2679
|
/**
|
2709
2680
|
* Generate an 'identify' event based on the user-input fields
|
@@ -2712,7 +2683,7 @@ class xc {
|
|
2712
2683
|
* @param options API options
|
2713
2684
|
*/
|
2714
2685
|
generateIdentifyEvent(e, n, s) {
|
2715
|
-
return
|
2686
|
+
return Ze({ userId: e, type: "identify", context: { traits: n } }, s, void 0, this.logger);
|
2716
2687
|
}
|
2717
2688
|
/**
|
2718
2689
|
* Generate an 'alias' event based on the user-input fields
|
@@ -2721,7 +2692,7 @@ class xc {
|
|
2721
2692
|
* @param options API options
|
2722
2693
|
*/
|
2723
2694
|
generateAliasEvent(e, n, s) {
|
2724
|
-
const r =
|
2695
|
+
const r = Ze({ previousId: n, type: "alias" }, s, void 0, this.logger);
|
2725
2696
|
return r.userId = e ?? r.userId, r;
|
2726
2697
|
}
|
2727
2698
|
/**
|
@@ -2732,7 +2703,7 @@ class xc {
|
|
2732
2703
|
*/
|
2733
2704
|
generateGroupEvent(e, n, s) {
|
2734
2705
|
const i = { type: "group" };
|
2735
|
-
return e && (i.groupId = e), n && (i.traits = n),
|
2706
|
+
return e && (i.groupId = e), n && (i.traits = n), Ze(i, s, void 0, this.logger);
|
2736
2707
|
}
|
2737
2708
|
/**
|
2738
2709
|
* Generates a new RudderEvent object based on the user-input fields
|
@@ -2771,7 +2742,7 @@ class Hc {
|
|
2771
2742
|
* @param logger Logger object
|
2772
2743
|
*/
|
2773
2744
|
constructor(e, n, s, i) {
|
2774
|
-
this.eventRepository = e, this.userSessionManager = n, this.errorHandler = s, this.logger = i, this.eventFactory = new
|
2745
|
+
this.eventRepository = e, this.userSessionManager = n, this.errorHandler = s, this.logger = i, this.eventFactory = new Fc(this.logger);
|
2775
2746
|
}
|
2776
2747
|
/**
|
2777
2748
|
* Initializes the event manager
|
@@ -2792,7 +2763,7 @@ class Hc {
|
|
2792
2763
|
this.eventRepository.enqueue(n, e.callback);
|
2793
2764
|
}
|
2794
2765
|
}
|
2795
|
-
class
|
2766
|
+
class xc {
|
2796
2767
|
constructor(e, n, s, i, r) {
|
2797
2768
|
this.storeManager = n, this.pluginsManager = e, this.logger = r, this.errorHandler = i, this.httpClient = s, this.onError = this.onError.bind(this), this.serverSideCookieDebounceFuncs = {};
|
2798
2769
|
}
|
@@ -2832,13 +2803,13 @@ class Gc {
|
|
2832
2803
|
if (e && n)
|
2833
2804
|
this.setInitialReferrer(e), this.setInitialReferringDomain(n);
|
2834
2805
|
else {
|
2835
|
-
const s = e ||
|
2836
|
-
this.setInitialReferrer(s), this.setInitialReferringDomain(
|
2806
|
+
const s = e || bi();
|
2807
|
+
this.setInitialReferrer(s), this.setInitialReferringDomain(pi(s));
|
2837
2808
|
}
|
2838
2809
|
}
|
2839
2810
|
isPersistenceEnabledForStorageEntry(e) {
|
2840
2811
|
var n;
|
2841
|
-
return
|
2812
|
+
return nt((n = o.storage.entries.value[e]) == null ? void 0 : n.type);
|
2842
2813
|
}
|
2843
2814
|
migrateDataFromPreviousStorage() {
|
2844
2815
|
const e = o.storage.entries.value, n = [W, X, ee];
|
@@ -2850,25 +2821,25 @@ class Gc {
|
|
2850
2821
|
const d = (h = this.storeManager) == null ? void 0 : h.getStore(Fe[c]);
|
2851
2822
|
if (d && c !== r) {
|
2852
2823
|
const y = d.get(Ve[i]);
|
2853
|
-
|
2824
|
+
Ur(y) && a.set(Ve[i], y), d.remove(Ve[i]);
|
2854
2825
|
}
|
2855
2826
|
});
|
2856
2827
|
});
|
2857
2828
|
}
|
2858
|
-
migrateStorageIfNeeded(e
|
2829
|
+
migrateStorageIfNeeded(e) {
|
2859
2830
|
if (!o.storage.migrate.value)
|
2860
2831
|
return;
|
2861
|
-
let
|
2862
|
-
|
2863
|
-
var
|
2864
|
-
const
|
2865
|
-
|
2866
|
-
}),
|
2867
|
-
const
|
2868
|
-
|
2869
|
-
var
|
2870
|
-
const
|
2871
|
-
le(
|
2832
|
+
let n = e ?? [];
|
2833
|
+
n.length === 0 && [ci, di, fi].forEach((i) => {
|
2834
|
+
var a;
|
2835
|
+
const r = (a = this.storeManager) == null ? void 0 : a.getStore(i);
|
2836
|
+
r && n.push(r);
|
2837
|
+
}), Object.keys(Ve).forEach((s) => {
|
2838
|
+
const i = Ve[s];
|
2839
|
+
n.forEach((r) => {
|
2840
|
+
var u;
|
2841
|
+
const a = (u = this.pluginsManager) == null ? void 0 : u.invokeSingle("storage.migrate", i, r.engine, this.errorHandler, this.logger);
|
2842
|
+
le(a) || r.set(i, a);
|
2872
2843
|
});
|
2873
2844
|
});
|
2874
2845
|
}
|
@@ -2879,21 +2850,21 @@ class Gc {
|
|
2879
2850
|
return { autoTrack: e };
|
2880
2851
|
let n;
|
2881
2852
|
const s = (r = o.loadOptions.value.sessions) == null ? void 0 : r.timeout;
|
2882
|
-
|
2853
|
+
Ut(s) ? n = s : (this.logger.warn(Ea(De, s, rn)), n = rn), n === 0 && (this.logger.warn(Ra(De)), e = !1), n > 0 && n < Fn && this.logger.warn(Ia(De, n, Fn));
|
2883
2854
|
const i = this.getCutOffInfo(n);
|
2884
2855
|
return { timeout: n, autoTrack: e, cutOff: i };
|
2885
2856
|
}
|
2886
2857
|
getCutOffInfo(e) {
|
2887
2858
|
const n = o.loadOptions.value.sessions.cutOff;
|
2888
2859
|
let s, i = !1;
|
2889
|
-
return n.enabled === !0 && (s = n.duration, i = !0,
|
2860
|
+
return n.enabled === !0 && (s = n.duration, i = !0, Ut(s) ? s < e && (this.logger.warn(ka(De, s, e)), i = !1) : (this.logger.warn(Sa(De, s, Vn)), s = Vn)), { enabled: i, duration: s };
|
2890
2861
|
}
|
2891
2862
|
/**
|
2892
2863
|
* Handles error
|
2893
2864
|
* @param error The error object
|
2894
2865
|
*/
|
2895
|
-
onError(e, n
|
2896
|
-
this.errorHandler.onError(
|
2866
|
+
onError(e, n) {
|
2867
|
+
this.errorHandler.onError(e, De, n);
|
2897
2868
|
}
|
2898
2869
|
/**
|
2899
2870
|
* A function to encrypt the cookie value and return the encrypted data
|
@@ -2929,13 +2900,13 @@ class Gc {
|
|
2929
2900
|
var u, l;
|
2930
2901
|
((u = a == null ? void 0 : a.xhr) == null ? void 0 : u.status) === 200 ? e.forEach((c) => {
|
2931
2902
|
const d = s == null ? void 0 : s.get(c.name), h = de(c.value, !1, []);
|
2932
|
-
de(d, !1, []) !== h && (this.logger.error(
|
2933
|
-
}) : (this.logger.error(
|
2903
|
+
de(d, !1, []) !== h && (this.logger.error(da(c.name)), n && n(c.name, c.value));
|
2904
|
+
}) : (this.logger.error(ca((l = a == null ? void 0 : a.xhr) == null ? void 0 : l.status)), e.forEach((c) => {
|
2934
2905
|
n && n(c.name, c.value);
|
2935
2906
|
}));
|
2936
2907
|
});
|
2937
2908
|
} catch (i) {
|
2938
|
-
this.onError(i,
|
2909
|
+
this.onError(i, fa), e.forEach((r) => {
|
2939
2910
|
n && n(r.name, r.value);
|
2940
2911
|
});
|
2941
2912
|
}
|
@@ -2948,21 +2919,21 @@ class Gc {
|
|
2948
2919
|
syncValueToStorage(e, n) {
|
2949
2920
|
var r, a, u;
|
2950
2921
|
const s = o.storage.entries.value, i = (r = s[e]) == null ? void 0 : r.type;
|
2951
|
-
if (
|
2922
|
+
if (nt(i)) {
|
2952
2923
|
const l = (a = this.storeManager) == null ? void 0 : a.getStore(Fe[i]), c = (u = s[e]) == null ? void 0 : u.key;
|
2953
|
-
n && (
|
2924
|
+
n && (B(n) || Ie(n)) ? o.serverCookies.isEnabledServerSideCookies.value && i === W ? (this.serverSideCookieDebounceFuncs[e] && globalThis.clearTimeout(this.serverSideCookieDebounceFuncs[e]), this.serverSideCookieDebounceFuncs[e] = globalThis.setTimeout(() => {
|
2954
2925
|
this.setServerSideCookies([{ name: c, value: n }], (d, h) => {
|
2955
2926
|
l == null || l.set(d, h);
|
2956
2927
|
}, l);
|
2957
|
-
},
|
2928
|
+
}, qa)) : l == null || l.set(c, n) : l == null || l.remove(c);
|
2958
2929
|
}
|
2959
2930
|
}
|
2960
2931
|
/**
|
2961
2932
|
* Function to update storage whenever state value changes
|
2962
2933
|
*/
|
2963
2934
|
registerEffects() {
|
2964
|
-
|
2965
|
-
|
2935
|
+
hi.forEach((e) => {
|
2936
|
+
pe(() => {
|
2966
2937
|
this.syncValueToStorage(e, o.session[e].value);
|
2967
2938
|
});
|
2968
2939
|
});
|
@@ -2978,7 +2949,7 @@ class Gc {
|
|
2978
2949
|
setAnonymousId(e, n) {
|
2979
2950
|
var i;
|
2980
2951
|
let s = e;
|
2981
|
-
(!
|
2952
|
+
(!B(e) || !s) && (s = void 0), this.isPersistenceEnabledForStorageEntry("anonymousId") ? (!s && n && (s = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("userSession.anonymousIdGoogleLinker", n)), s = s || fn()) : s = O.anonymousId, o.session.anonymousId.value = s;
|
2982
2953
|
}
|
2983
2954
|
/**
|
2984
2955
|
* Fetches anonymousId
|
@@ -2988,18 +2959,18 @@ class Gc {
|
|
2988
2959
|
getAnonymousId(e) {
|
2989
2960
|
var s, i;
|
2990
2961
|
const n = (s = o.storage.entries.value.anonymousId) == null ? void 0 : s.type;
|
2991
|
-
if (
|
2962
|
+
if (nt(n)) {
|
2992
2963
|
let r = o.session.anonymousId.value;
|
2993
|
-
(!r || r === O.anonymousId) && (r = this.getEntryValue("anonymousId")), !r && e && (r = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("storage.getAnonymousId", ie, e)), o.session.anonymousId.value = r ||
|
2964
|
+
(!r || r === O.anonymousId) && (r = this.getEntryValue("anonymousId")), !r && e && (r = (i = this.pluginsManager) == null ? void 0 : i.invokeSingle("storage.getAnonymousId", ie, e)), o.session.anonymousId.value = r || fn();
|
2994
2965
|
}
|
2995
2966
|
return o.session.anonymousId.value;
|
2996
2967
|
}
|
2997
2968
|
getEntryValue(e) {
|
2998
2969
|
var i, r, a;
|
2999
2970
|
const n = o.storage.entries.value, s = (i = n[e]) == null ? void 0 : i.type;
|
3000
|
-
if (
|
2971
|
+
if (nt(s)) {
|
3001
2972
|
const u = (r = this.storeManager) == null ? void 0 : r.getStore(Fe[s]);
|
3002
|
-
this.migrateStorageIfNeeded([u]
|
2973
|
+
this.migrateStorageIfNeeded([u]);
|
3003
2974
|
const l = (a = n[e]) == null ? void 0 : a.key;
|
3004
2975
|
return (u == null ? void 0 : u.get(l)) ?? null;
|
3005
2976
|
}
|
@@ -3071,7 +3042,7 @@ class Gc {
|
|
3071
3042
|
*/
|
3072
3043
|
getSessionId() {
|
3073
3044
|
const e = this.getSessionInfo() ?? O.sessionInfo;
|
3074
|
-
return e.autoTrack && !
|
3045
|
+
return e.autoTrack && !ls(e) || e.manualTrack ? e.id ?? null : null;
|
3075
3046
|
}
|
3076
3047
|
/**
|
3077
3048
|
* A function to keep the session information up to date in the state
|
@@ -3109,7 +3080,7 @@ class Gc {
|
|
3109
3080
|
* @param traits
|
3110
3081
|
*/
|
3111
3082
|
setUserTraits(e) {
|
3112
|
-
o.session.userTraits.value = this.isPersistenceEnabledForStorageEntry("userTraits") && w(e) ?
|
3083
|
+
o.session.userTraits.value = this.isPersistenceEnabledForStorageEntry("userTraits") && w(e) ? H(o.session.userTraits.value ?? O.userTraits, e) : O.userTraits;
|
3113
3084
|
}
|
3114
3085
|
/**
|
3115
3086
|
* Set group Id
|
@@ -3123,7 +3094,7 @@ class Gc {
|
|
3123
3094
|
* @param traits
|
3124
3095
|
*/
|
3125
3096
|
setGroupTraits(e) {
|
3126
|
-
o.session.groupTraits.value = this.isPersistenceEnabledForStorageEntry("groupTraits") && w(e) ?
|
3097
|
+
o.session.groupTraits.value = this.isPersistenceEnabledForStorageEntry("groupTraits") && w(e) ? H(o.session.groupTraits.value ?? O.groupTraits, e) : O.groupTraits;
|
3127
3098
|
}
|
3128
3099
|
/**
|
3129
3100
|
* Set initial referrer
|
@@ -3144,14 +3115,14 @@ class Gc {
|
|
3144
3115
|
*/
|
3145
3116
|
startOrRenewAutoTracking(e) {
|
3146
3117
|
let n = e;
|
3147
|
-
if (
|
3148
|
-
n =
|
3118
|
+
if (ls(e))
|
3119
|
+
n = Pc(e);
|
3149
3120
|
else {
|
3150
3121
|
const s = Date.now(), i = e.timeout;
|
3151
3122
|
n.expiresAt = s + i;
|
3152
3123
|
}
|
3153
|
-
if (
|
3154
|
-
const s =
|
3124
|
+
if (ki(n) && (n.cutOff.expiresAt = void 0), n.cutOff) {
|
3125
|
+
const s = _c(n.cutOff);
|
3155
3126
|
n.cutOff.expiresAt = s;
|
3156
3127
|
}
|
3157
3128
|
o.session.sessionInfo.value = n;
|
@@ -3162,7 +3133,7 @@ class Gc {
|
|
3162
3133
|
* @returns
|
3163
3134
|
*/
|
3164
3135
|
start(e) {
|
3165
|
-
o.session.sessionInfo.value =
|
3136
|
+
o.session.sessionInfo.value = Nc(e, this.logger);
|
3166
3137
|
}
|
3167
3138
|
/**
|
3168
3139
|
* An internal function to start manual session
|
@@ -3184,31 +3155,31 @@ class Gc {
|
|
3184
3155
|
o.session.authToken.value = this.isPersistenceEnabledForStorageEntry("authToken") && e ? e : O.authToken;
|
3185
3156
|
}
|
3186
3157
|
}
|
3187
|
-
const
|
3158
|
+
const Gc = ["BeaconQueue", "CustomConsentManager", "DeviceModeDestinations", "DeviceModeTransformation", "ExternalAnonymousId", "GoogleLinker", "IubendaConsentManager", "KetchConsentManager", "NativeDestinationQueue", "OneTrustConsentManager", "StorageEncryption", "StorageEncryptionLegacy", "StorageMigrator", "XhrQueue"], jc = (t, e) => {
|
3188
3159
|
var a;
|
3189
|
-
const n =
|
3190
|
-
return
|
3191
|
-
},
|
3192
|
-
const i =
|
3160
|
+
const n = T(e);
|
3161
|
+
return B(n.setCookieDomain) || (n.setCookieDomain = void 0), ["Strict", "Lax", "None"].includes(n.sameSiteCookie) || (n.sameSiteCookie = void 0), n.secureCookie = ue(n.secureCookie, t.secureCookie), n.sameDomainCookiesOnly = ue(n.sameDomainCookiesOnly, t.sameDomainCookiesOnly), ["none", "default", "full"].includes(n.uaChTrackLevel) || (n.uaChTrackLevel = void 0), n.integrations = be(n.integrations), Array.isArray(n.plugins) || (n.plugins = Gc), n.useGlobalIntegrationsConfigInEvents = ue(n.useGlobalIntegrationsConfigInEvents, t.useGlobalIntegrationsConfigInEvents), n.bufferDataPlaneEventsUntilReady = ue(n.bufferDataPlaneEventsUntilReady, t.bufferDataPlaneEventsUntilReady), n.sendAdblockPage = ue(n.sendAdblockPage, t.sendAdblockPage), n.useServerSideCookies = ue(n.useServerSideCookies, t.useServerSideCookies), B(n.dataServiceEndpoint) || (n.dataServiceEndpoint = void 0), n.sendAdblockPageOptions = be(n.sendAdblockPageOptions), n.loadIntegration = ue(n.loadIntegration, t.loadIntegration), Ie(n.storage) ? (n.storage.migrate = ue(n.storage.migrate, (a = t.storage) == null ? void 0 : a.migrate), n.storage.cookie = be(n.storage.cookie), n.storage.encryption = be(n.storage.encryption), n.storage = Pt(n.storage)) : n.storage = void 0, n.destinationsQueueOptions = be(n.destinationsQueueOptions), n.queueOptions = be(n.queueOptions), n.lockIntegrationsVersion = ue(n.lockIntegrationsVersion, t.lockIntegrationsVersion), n.lockPluginsVersion = ue(n.lockPluginsVersion, t.lockPluginsVersion), Si(n.dataPlaneEventsBufferTimeout) || (n.dataPlaneEventsBufferTimeout = void 0), n.beaconQueueOptions = be(n.beaconQueueOptions), n.preConsent = be(n.preConsent), H(t, Pt(n));
|
3162
|
+
}, us = "dataplaneEventsQueue", cs = "destinationsEventsQueue", qc = "transformEvent", zc = (t, e) => Object.keys(t).filter((n) => t[n] !== !0 || !e[n]).reduce((n, s) => {
|
3163
|
+
const i = T(n);
|
3193
3164
|
return i[s] = t[s], i;
|
3194
|
-
}, {}),
|
3195
|
-
const n =
|
3196
|
-
return n.integrations =
|
3197
|
-
},
|
3165
|
+
}, {}), Kc = (t, e) => {
|
3166
|
+
const n = T(t), s = e.nativeDestinations.integrationsConfig.value, i = zc(t.integrations, s);
|
3167
|
+
return n.integrations = H(s, i), n;
|
3168
|
+
}, Yc = (t) => {
|
3198
3169
|
var e;
|
3199
3170
|
return t.consents.preConsent.value.enabled && ((e = t.consents.preConsent.value.events) == null ? void 0 : e.delivery) === "buffer";
|
3200
|
-
},
|
3201
|
-
if (
|
3171
|
+
}, _t = (t, e, n, s) => {
|
3172
|
+
if (N(t))
|
3202
3173
|
if (S(t))
|
3203
3174
|
try {
|
3204
3175
|
t(...e);
|
3205
3176
|
} catch (i) {
|
3206
|
-
s.error(
|
3177
|
+
s.error(Da(n), i);
|
3207
3178
|
}
|
3208
3179
|
else
|
3209
|
-
s.error(
|
3180
|
+
s.error(Xs(n));
|
3210
3181
|
};
|
3211
|
-
class
|
3182
|
+
class Wc {
|
3212
3183
|
/**
|
3213
3184
|
*
|
3214
3185
|
* @param pluginsManager Plugins manager instance
|
@@ -3223,16 +3194,16 @@ class Qc {
|
|
3223
3194
|
* Initializes the event repository
|
3224
3195
|
*/
|
3225
3196
|
init() {
|
3226
|
-
this.dataplaneEventsQueue = this.pluginsManager.invokeSingle(`${
|
3197
|
+
this.dataplaneEventsQueue = this.pluginsManager.invokeSingle(`${us}.init`, o, this.httpClient, this.storeManager, this.errorHandler, this.logger), this.dmtEventsQueue = this.pluginsManager.invokeSingle(`${qc}.init`, o, this.pluginsManager, this.httpClient, this.storeManager, this.errorHandler, this.logger), this.destinationsEventsQueue = this.pluginsManager.invokeSingle(`${cs}.init`, o, this.pluginsManager, this.storeManager, this.dmtEventsQueue, this.errorHandler, this.logger), pe(() => {
|
3227
3198
|
var s, i;
|
3228
3199
|
o.nativeDestinations.clientDestinationsReady.value === !0 && ((s = this.destinationsEventsQueue) == null || s.start(), (i = this.dmtEventsQueue) == null || i.start());
|
3229
3200
|
});
|
3230
|
-
const e =
|
3201
|
+
const e = Yc(o);
|
3231
3202
|
let n;
|
3232
|
-
|
3203
|
+
pe(() => {
|
3233
3204
|
var r, a;
|
3234
3205
|
const s = o.loadOptions.value.bufferDataPlaneEventsUntilReady === !0 && o.nativeDestinations.clientDestinationsReady.value === !1;
|
3235
|
-
(o.nativeDestinations.activeDestinations.value.some((u) =>
|
3206
|
+
(o.nativeDestinations.activeDestinations.value.some((u) => ql(u)) === !1 || s === !1) && !e && ((r = this.dataplaneEventsQueue) == null ? void 0 : r.scheduleTimeoutActive) !== !0 && (globalThis.clearTimeout(n), (a = this.dataplaneEventsQueue) == null || a.start());
|
3236
3207
|
}), o.loadOptions.value.bufferDataPlaneEventsUntilReady === !0 && (n = globalThis.setTimeout(() => {
|
3237
3208
|
var s, i;
|
3238
3209
|
((s = this.dataplaneEventsQueue) == null ? void 0 : s.scheduleTimeoutActive) !== !0 && ((i = this.dataplaneEventsQueue) == null || i.start());
|
@@ -3248,41 +3219,41 @@ class Qc {
|
|
3248
3219
|
* @param callback API callback function
|
3249
3220
|
*/
|
3250
3221
|
enqueue(e, n) {
|
3251
|
-
const s =
|
3252
|
-
this.pluginsManager.invokeSingle(`${
|
3253
|
-
const i =
|
3254
|
-
this.pluginsManager.invokeSingle(`${
|
3255
|
-
const r = `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}${
|
3256
|
-
|
3222
|
+
const s = Kc(e, o);
|
3223
|
+
this.pluginsManager.invokeSingle(`${us}.enqueue`, o, this.dataplaneEventsQueue, s, this.errorHandler, this.logger);
|
3224
|
+
const i = T(e);
|
3225
|
+
this.pluginsManager.invokeSingle(`${cs}.enqueue`, o, this.destinationsEventsQueue, i, this.errorHandler, this.logger);
|
3226
|
+
const r = `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}${En}`;
|
3227
|
+
_t(n, [s], r, this.logger);
|
3257
3228
|
}
|
3258
3229
|
}
|
3259
|
-
const
|
3230
|
+
const ds = (t) => {
|
3260
3231
|
const e = new CustomEvent(t, { detail: { analyticsInstance: globalThis.rudderanalytics }, bubbles: !0, cancelable: !0, composed: !0 });
|
3261
3232
|
globalThis.document.dispatchEvent(e);
|
3262
|
-
},
|
3263
|
-
class
|
3233
|
+
}, Qc = (t) => B(t) && t.trim().length > 0, Xc = (t) => Ke(t);
|
3234
|
+
class Jc {
|
3264
3235
|
/**
|
3265
3236
|
* Initialize services and components or use default ones if singletons
|
3266
3237
|
*/
|
3267
3238
|
constructor() {
|
3268
|
-
this.preloadBuffer = new
|
3239
|
+
this.preloadBuffer = new Mo(), this.initialized = !1, this.errorHandler = oi, this.logger = ve, this.externalSrcLoader = new Gs(this.errorHandler, this.logger), this.httpClient = ri, this.httpClient.init(this.errorHandler), this.capabilitiesManager = new Ic(this.httpClient, this.errorHandler, this.logger);
|
3269
3240
|
}
|
3270
3241
|
/**
|
3271
3242
|
* Start application lifecycle if not already started
|
3272
3243
|
*/
|
3273
3244
|
load(e, n, s = {}) {
|
3274
3245
|
if (!o.lifecycle.status.value) {
|
3275
|
-
if (!
|
3276
|
-
this.logger.error(
|
3246
|
+
if (!Qc(e)) {
|
3247
|
+
this.logger.error(sa(qt, e));
|
3277
3248
|
return;
|
3278
3249
|
}
|
3279
|
-
if (!
|
3280
|
-
this.logger.error(
|
3250
|
+
if (!Xc(n)) {
|
3251
|
+
this.logger.error(ia(qt, n));
|
3281
3252
|
return;
|
3282
3253
|
}
|
3283
3254
|
j(() => {
|
3284
|
-
o.lifecycle.writeKey.value =
|
3285
|
-
}), this.logger.setMinLogLevel(o.loadOptions.value.logLevel ??
|
3255
|
+
o.lifecycle.writeKey.value = T(e), o.lifecycle.dataPlaneUrl.value = T(n), o.loadOptions.value = jc(o.loadOptions.value, s), o.lifecycle.status.value = "mounted";
|
3256
|
+
}), this.logger.setMinLogLevel(o.loadOptions.value.logLevel ?? Ws), lt("state", o, e), this.startLifecycle();
|
3286
3257
|
}
|
3287
3258
|
}
|
3288
3259
|
// Start lifecycle methods
|
@@ -3290,7 +3261,7 @@ class Zc {
|
|
3290
3261
|
* Orchestrate the lifecycle of the application phases/status
|
3291
3262
|
*/
|
3292
3263
|
startLifecycle() {
|
3293
|
-
|
3264
|
+
pe(() => {
|
3294
3265
|
try {
|
3295
3266
|
switch (o.lifecycle.status.value) {
|
3296
3267
|
case "mounted":
|
@@ -3326,13 +3297,12 @@ class Zc {
|
|
3326
3297
|
break;
|
3327
3298
|
}
|
3328
3299
|
} catch (e) {
|
3329
|
-
|
3330
|
-
this.errorHandler.onError({ error: e, context: jt, customMessage: n, groupingHash: n });
|
3300
|
+
this.errorHandler.onError(dt(e, "Failed to load the SDK"), qt);
|
3331
3301
|
}
|
3332
3302
|
});
|
3333
3303
|
}
|
3334
3304
|
onBrowserCapabilitiesReady() {
|
3335
|
-
|
3305
|
+
Oo(this), this.prepareInternalServices(), this.loadConfig();
|
3336
3306
|
}
|
3337
3307
|
onLoaded() {
|
3338
3308
|
this.processBufferedEvents(), o.consents.preConsent.value.enabled === !0 ? o.lifecycle.status.value = "ready" : this.loadDestinations();
|
@@ -3347,7 +3317,7 @@ class Zc {
|
|
3347
3317
|
* Enqueue in SDK preload buffer events, used from preloadBuffer component
|
3348
3318
|
*/
|
3349
3319
|
enqueuePreloadBufferEvents(e) {
|
3350
|
-
Array.isArray(e) && e.forEach((n) => this.preloadBuffer.enqueue(
|
3320
|
+
Array.isArray(e) && e.forEach((n) => this.preloadBuffer.enqueue(T(n)));
|
3351
3321
|
}
|
3352
3322
|
/**
|
3353
3323
|
* Process the buffer preloaded events by passing their arguments to the respective facade methods
|
@@ -3355,11 +3325,11 @@ class Zc {
|
|
3355
3325
|
processDataInPreloadBuffer() {
|
3356
3326
|
for (; this.preloadBuffer.size() > 0; ) {
|
3357
3327
|
const e = this.preloadBuffer.dequeue();
|
3358
|
-
e &&
|
3328
|
+
e && Ao([...e], this);
|
3359
3329
|
}
|
3360
3330
|
}
|
3361
3331
|
prepareInternalServices() {
|
3362
|
-
this.pluginsManager = new
|
3332
|
+
this.pluginsManager = new eu(Gl, this.errorHandler, this.logger), this.storeManager = new zu(this.pluginsManager, this.errorHandler, this.logger), this.configManager = new vc(this.httpClient, this.errorHandler, this.logger), this.userSessionManager = new xc(this.pluginsManager, this.storeManager, this.httpClient, this.errorHandler, this.logger), this.eventRepository = new Wc(this.pluginsManager, this.storeManager, this.httpClient, this.errorHandler, this.logger), this.eventManager = new Hc(this.eventRepository, this.userSessionManager, this.errorHandler, this.logger);
|
3363
3333
|
}
|
3364
3334
|
/**
|
3365
3335
|
* Load configuration
|
@@ -3388,9 +3358,9 @@ class Zc {
|
|
3388
3358
|
onInitialized() {
|
3389
3359
|
this.processDataInPreloadBuffer();
|
3390
3360
|
const e = o.loadOptions.value.onLoaded;
|
3391
|
-
|
3361
|
+
_t(e, [globalThis.rudderanalytics], zr, this.logger), j(() => {
|
3392
3362
|
o.lifecycle.loaded.value = !0, o.lifecycle.status.value = "loaded";
|
3393
|
-
}), this.initialized = !0,
|
3363
|
+
}), this.initialized = !0, ds("RSA_Initialised");
|
3394
3364
|
}
|
3395
3365
|
/**
|
3396
3366
|
* Emit ready event
|
@@ -3398,8 +3368,8 @@ class Zc {
|
|
3398
3368
|
// eslint-disable-next-line class-methods-use-this
|
3399
3369
|
onReady() {
|
3400
3370
|
o.lifecycle.status.value = "readyExecuted", o.eventBuffer.readyCallbacksArray.value.forEach((e) => {
|
3401
|
-
|
3402
|
-
}),
|
3371
|
+
_t(e, [], jt, this.logger);
|
3372
|
+
}), ds("RSA_Ready");
|
3403
3373
|
}
|
3404
3374
|
/**
|
3405
3375
|
* Consume preloaded events buffer
|
@@ -3428,7 +3398,7 @@ class Zc {
|
|
3428
3398
|
o.lifecycle.status.value = "destinationsReady";
|
3429
3399
|
return;
|
3430
3400
|
}
|
3431
|
-
o.lifecycle.status.value = "destinationsLoading", (s = this.pluginsManager) == null || s.invokeSingle("nativeDestinations.load", o, this.externalSrcLoader, this.errorHandler, this.logger),
|
3401
|
+
o.lifecycle.status.value = "destinationsLoading", (s = this.pluginsManager) == null || s.invokeSingle("nativeDestinations.load", o, this.externalSrcLoader, this.errorHandler, this.logger), pe(() => {
|
3432
3402
|
(e === 0 || o.nativeDestinations.initializedDestinations.value.length + o.nativeDestinations.failedDestinations.value.length === e) && j(() => {
|
3433
3403
|
o.lifecycle.status.value = "destinationsReady", o.nativeDestinations.clientDestinationsReady.value = !0;
|
3434
3404
|
});
|
@@ -3450,10 +3420,10 @@ class Zc {
|
|
3450
3420
|
return;
|
3451
3421
|
}
|
3452
3422
|
if (this.errorHandler.leaveBreadcrumb(`New ${s} invocation`), !S(e)) {
|
3453
|
-
this.logger.error(
|
3423
|
+
this.logger.error(Xs(jt));
|
3454
3424
|
return;
|
3455
3425
|
}
|
3456
|
-
o.lifecycle.status.value === "readyExecuted" ?
|
3426
|
+
o.lifecycle.status.value === "readyExecuted" ? _t(e, [], jt, this.logger) : o.eventBuffer.readyCallbacksArray.value = [...o.eventBuffer.readyCallbacksArray.value, e];
|
3457
3427
|
}
|
3458
3428
|
page(e, n = !1) {
|
3459
3429
|
var i;
|
@@ -3462,10 +3432,10 @@ class Zc {
|
|
3462
3432
|
o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, [s, e]];
|
3463
3433
|
return;
|
3464
3434
|
}
|
3465
|
-
this.errorHandler.leaveBreadcrumb(`New ${s} event`), o.metrics.triggered.value += 1, (i = this.eventManager) == null || i.addEvent({ type: "page", category: e.category, name: e.name, properties: e.properties, options: e.options, callback: e.callback }), o.capabilities.isAdBlocked.value === !0 && e.category !== Mn && this.page(
|
3435
|
+
this.errorHandler.leaveBreadcrumb(`New ${s} event`), o.metrics.triggered.value += 1, (i = this.eventManager) == null || i.addEvent({ type: "page", category: e.category, name: e.name, properties: e.properties, options: e.options, callback: e.callback }), o.capabilities.isAdBlocked.value === !0 && e.category !== Mn && this.page(Lt(Mn, ho, {
|
3466
3436
|
// 'title' is intentionally omitted as it does not make sense
|
3467
3437
|
// in v3 implementation
|
3468
|
-
path:
|
3438
|
+
path: go
|
3469
3439
|
}, o.loadOptions.value.sendAdblockPageOptions));
|
3470
3440
|
}
|
3471
3441
|
track(e, n = !1) {
|
@@ -3576,17 +3546,17 @@ class Zc {
|
|
3576
3546
|
}
|
3577
3547
|
this.errorHandler.leaveBreadcrumb("New consent invocation"), j(() => {
|
3578
3548
|
o.consents.preConsent.value = { ...o.consents.preConsent.value, enabled: !1 }, o.consents.postConsent.value = rc(e);
|
3579
|
-
const { initialized: l, consentsData: c } =
|
3549
|
+
const { initialized: l, consentsData: c } = vi(o.consents.postConsent.value.consentManagement, this.logger);
|
3580
3550
|
o.consents.initialized.value = l, o.consents.data.value = c;
|
3581
3551
|
}), o.consents.enabled.value && !o.consents.initialized.value && ((i = this.pluginsManager) == null || i.invokeSingle("consentManager.updateConsentsInfo", o, this.storeManager, this.logger)), (r = this.storeManager) == null || r.initializeStorageState(), (a = this.userSessionManager) == null || a.syncStorageDataToState(), (u = this.eventManager) == null || u.resume(), this.loadDestinations(), this.sendTrackingEvents(n);
|
3582
3552
|
}
|
3583
3553
|
sendTrackingEvents(e) {
|
3584
3554
|
if (o.consents.postConsent.value.trackConsent) {
|
3585
|
-
const n =
|
3555
|
+
const n = bn(mo);
|
3586
3556
|
e ? o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, ["track", n]] : this.track(n);
|
3587
3557
|
}
|
3588
3558
|
if (o.consents.postConsent.value.sendPageEvent) {
|
3589
|
-
const n =
|
3559
|
+
const n = Lt();
|
3590
3560
|
e ? o.eventBuffer.toBeProcessedArray.value = [...o.eventBuffer.toBeProcessedArray.value, ["page", n]] : this.page(n);
|
3591
3561
|
}
|
3592
3562
|
}
|
@@ -3600,19 +3570,19 @@ const _e = class _e {
|
|
3600
3570
|
// Singleton with constructor bind methods
|
3601
3571
|
constructor() {
|
3602
3572
|
// END-NO-SONAR-SCAN
|
3603
|
-
|
3604
|
-
|
3605
|
-
|
3573
|
+
P(this, "analyticsInstances", {});
|
3574
|
+
P(this, "defaultAnalyticsKey", "");
|
3575
|
+
P(this, "logger", ve);
|
3606
3576
|
try {
|
3607
3577
|
if (_e.globalSingleton)
|
3608
3578
|
return _e.globalSingleton;
|
3609
|
-
_e.initializeGlobalResources(), this.setDefaultInstanceKey = this.setDefaultInstanceKey.bind(this), this.getAnalyticsInstance = this.getAnalyticsInstance.bind(this), this.load = this.load.bind(this), this.ready = this.ready.bind(this), this.triggerBufferedLoadEvent = this.triggerBufferedLoadEvent.bind(this), this.page = this.page.bind(this), this.track = this.track.bind(this), this.identify = this.identify.bind(this), this.alias = this.alias.bind(this), this.group = this.group.bind(this), this.reset = this.reset.bind(this), this.getAnonymousId = this.getAnonymousId.bind(this), this.setAnonymousId = this.setAnonymousId.bind(this), this.getUserId = this.getUserId.bind(this), this.getUserTraits = this.getUserTraits.bind(this), this.getGroupId = this.getGroupId.bind(this), this.getGroupTraits = this.getGroupTraits.bind(this), this.startSession = this.startSession.bind(this), this.endSession = this.endSession.bind(this), this.getSessionId = this.getSessionId.bind(this), this.setAuthToken = this.setAuthToken.bind(this), this.consent = this.consent.bind(this), _e.globalSingleton = this, o.autoTrack.pageLifecycle.pageViewId.value =
|
3579
|
+
_e.initializeGlobalResources(), this.setDefaultInstanceKey = this.setDefaultInstanceKey.bind(this), this.getAnalyticsInstance = this.getAnalyticsInstance.bind(this), this.load = this.load.bind(this), this.ready = this.ready.bind(this), this.triggerBufferedLoadEvent = this.triggerBufferedLoadEvent.bind(this), this.page = this.page.bind(this), this.track = this.track.bind(this), this.identify = this.identify.bind(this), this.alias = this.alias.bind(this), this.group = this.group.bind(this), this.reset = this.reset.bind(this), this.getAnonymousId = this.getAnonymousId.bind(this), this.setAnonymousId = this.setAnonymousId.bind(this), this.getUserId = this.getUserId.bind(this), this.getUserTraits = this.getUserTraits.bind(this), this.getGroupId = this.getGroupId.bind(this), this.getGroupTraits = this.getGroupTraits.bind(this), this.startSession = this.startSession.bind(this), this.endSession = this.endSession.bind(this), this.getSessionId = this.getSessionId.bind(this), this.setAuthToken = this.setAuthToken.bind(this), this.consent = this.consent.bind(this), _e.globalSingleton = this, o.autoTrack.pageLifecycle.pageViewId.value = Vt(), o.autoTrack.pageLifecycle.pageLoadedTimestamp.value = Date.now(), this.triggerBufferedLoadEvent(), globalThis.rudderanalytics = this;
|
3610
3580
|
} catch (e) {
|
3611
|
-
|
3581
|
+
U(e);
|
3612
3582
|
}
|
3613
3583
|
}
|
3614
3584
|
static initializeGlobalResources() {
|
3615
|
-
|
3585
|
+
oi.init(), An.configure(), Tn.configure(), On.configure(), $t.configure();
|
3616
3586
|
}
|
3617
3587
|
/**
|
3618
3588
|
* Set instance to use if no specific writeKey is provided in methods
|
@@ -3620,7 +3590,7 @@ const _e = class _e {
|
|
3620
3590
|
* TODO: to support multiple analytics instances in the near future
|
3621
3591
|
*/
|
3622
3592
|
setDefaultInstanceKey(e) {
|
3623
|
-
|
3593
|
+
B(e) && e && (this.defaultAnalyticsKey = e);
|
3624
3594
|
}
|
3625
3595
|
/**
|
3626
3596
|
* Retrieve an existing analytics instance
|
@@ -3628,9 +3598,9 @@ const _e = class _e {
|
|
3628
3598
|
getAnalyticsInstance(e) {
|
3629
3599
|
try {
|
3630
3600
|
let n = e;
|
3631
|
-
return (!
|
3601
|
+
return (!B(n) || !n) && (n = this.defaultAnalyticsKey), !!this.analyticsInstances[n] || (this.analyticsInstances[n] = new Jc()), this.analyticsInstances[n];
|
3632
3602
|
} catch (n) {
|
3633
|
-
|
3603
|
+
U(n);
|
3634
3604
|
return;
|
3635
3605
|
}
|
3636
3606
|
}
|
@@ -3647,10 +3617,10 @@ const _e = class _e {
|
|
3647
3617
|
if (this.analyticsInstances[e])
|
3648
3618
|
return;
|
3649
3619
|
this.setDefaultInstanceKey(e), this.trackPageLifecycleEvents(s);
|
3650
|
-
const r =
|
3651
|
-
|
3620
|
+
const r = xs(it);
|
3621
|
+
To(r), lt(it, T(r)), (i = this.getAnalyticsInstance(e)) == null || i.load(e, n, A(s));
|
3652
3622
|
} catch (r) {
|
3653
|
-
|
3623
|
+
U(r);
|
3654
3624
|
}
|
3655
3625
|
}
|
3656
3626
|
/**
|
@@ -3659,7 +3629,7 @@ const _e = class _e {
|
|
3659
3629
|
* @returns
|
3660
3630
|
*/
|
3661
3631
|
trackPageLifecycleEvents(e) {
|
3662
|
-
const { autoTrack: n, useBeacon: s } = e ?? {}, { enabled: i = !1, options: r = {}, pageLifecycle: a } = n ?? {}, { events: u = [
|
3632
|
+
const { autoTrack: n, useBeacon: s } = e ?? {}, { enabled: i = !1, options: r = {}, pageLifecycle: a } = n ?? {}, { events: u = [Gt.UNLOADED], enabled: l = i, options: c = r } = a ?? {};
|
3663
3633
|
o.autoTrack.pageLifecycle.enabled.value = l, o.autoTrack.enabled.value = i || l, l && this.setupPageUnloadTracking(u, s, c);
|
3664
3634
|
}
|
3665
3635
|
/**
|
@@ -3669,20 +3639,20 @@ const _e = class _e {
|
|
3669
3639
|
* @param options
|
3670
3640
|
*/
|
3671
3641
|
setupPageUnloadTracking(e, n, s) {
|
3672
|
-
(e.length === 0 || e.includes(
|
3642
|
+
(e.length === 0 || e.includes(Gt.UNLOADED)) && (n === !0 ? eo((i) => {
|
3673
3643
|
if (i === !1 && o.lifecycle.loaded.value) {
|
3674
3644
|
const r = Date.now(), a = r - o.autoTrack.pageLifecycle.pageLoadedTimestamp.value;
|
3675
|
-
this.track(
|
3645
|
+
this.track(Gt.UNLOADED, { timeOnPage: a }, { ...s, originalTimestamp: Us(new Date(r)) });
|
3676
3646
|
}
|
3677
|
-
}) : this.logger.warn(
|
3647
|
+
}) : this.logger.warn($a(Wr)));
|
3678
3648
|
}
|
3679
3649
|
/**
|
3680
3650
|
* Trigger load event in buffer queue if exists and stores the
|
3681
3651
|
* remaining preloaded events array in global object
|
3682
3652
|
*/
|
3683
3653
|
triggerBufferedLoadEvent() {
|
3684
|
-
const e = Array.isArray(globalThis.rudderanalytics) ? globalThis.rudderanalytics : [], n =
|
3685
|
-
|
3654
|
+
const e = Array.isArray(globalThis.rudderanalytics) ? globalThis.rudderanalytics : [], n = Io(e);
|
3655
|
+
lt(it, T([...e])), n.length > 0 && (n.shift(), this.load.apply(null, n));
|
3686
3656
|
}
|
3687
3657
|
/**
|
3688
3658
|
* Get ready callback arguments and forward to ready call
|
@@ -3692,7 +3662,7 @@ const _e = class _e {
|
|
3692
3662
|
try {
|
3693
3663
|
(n = this.getAnalyticsInstance()) == null || n.ready(A(e));
|
3694
3664
|
} catch (s) {
|
3695
|
-
|
3665
|
+
U(s);
|
3696
3666
|
}
|
3697
3667
|
}
|
3698
3668
|
/**
|
@@ -3702,9 +3672,9 @@ const _e = class _e {
|
|
3702
3672
|
page(e, n, s, i, r) {
|
3703
3673
|
var a;
|
3704
3674
|
try {
|
3705
|
-
(a = this.getAnalyticsInstance()) == null || a.page(
|
3675
|
+
(a = this.getAnalyticsInstance()) == null || a.page(Lt(A(e), A(n), A(s), A(i), A(r)));
|
3706
3676
|
} catch (u) {
|
3707
|
-
|
3677
|
+
U(u);
|
3708
3678
|
}
|
3709
3679
|
}
|
3710
3680
|
/**
|
@@ -3714,9 +3684,9 @@ const _e = class _e {
|
|
3714
3684
|
track(e, n, s, i) {
|
3715
3685
|
var r;
|
3716
3686
|
try {
|
3717
|
-
(r = this.getAnalyticsInstance()) == null || r.track(
|
3687
|
+
(r = this.getAnalyticsInstance()) == null || r.track(bn(A(e), A(n), A(s), A(i)));
|
3718
3688
|
} catch (a) {
|
3719
|
-
|
3689
|
+
U(a);
|
3720
3690
|
}
|
3721
3691
|
}
|
3722
3692
|
/**
|
@@ -3726,9 +3696,9 @@ const _e = class _e {
|
|
3726
3696
|
identify(e, n, s, i) {
|
3727
3697
|
var r;
|
3728
3698
|
try {
|
3729
|
-
(r = this.getAnalyticsInstance()) == null || r.identify(
|
3699
|
+
(r = this.getAnalyticsInstance()) == null || r.identify(Ls(A(e), A(n), A(s), A(i)));
|
3730
3700
|
} catch (a) {
|
3731
|
-
|
3701
|
+
U(a);
|
3732
3702
|
}
|
3733
3703
|
}
|
3734
3704
|
/**
|
@@ -3738,9 +3708,9 @@ const _e = class _e {
|
|
3738
3708
|
alias(e, n, s, i) {
|
3739
3709
|
var r;
|
3740
3710
|
try {
|
3741
|
-
(r = this.getAnalyticsInstance()) == null || r.alias(
|
3711
|
+
(r = this.getAnalyticsInstance()) == null || r.alias(ws(A(e), A(n), A(s), A(i)));
|
3742
3712
|
} catch (a) {
|
3743
|
-
|
3713
|
+
U(a);
|
3744
3714
|
}
|
3745
3715
|
}
|
3746
3716
|
/**
|
@@ -3750,9 +3720,9 @@ const _e = class _e {
|
|
3750
3720
|
group(e, n, s, i) {
|
3751
3721
|
var r;
|
3752
3722
|
try {
|
3753
|
-
(r = this.getAnalyticsInstance()) == null || r.group(
|
3723
|
+
(r = this.getAnalyticsInstance()) == null || r.group(Ms(A(e), A(n), A(s), A(i)));
|
3754
3724
|
} catch (a) {
|
3755
|
-
|
3725
|
+
U(a);
|
3756
3726
|
}
|
3757
3727
|
}
|
3758
3728
|
reset(e) {
|
@@ -3760,7 +3730,7 @@ const _e = class _e {
|
|
3760
3730
|
try {
|
3761
3731
|
(n = this.getAnalyticsInstance()) == null || n.reset(A(e));
|
3762
3732
|
} catch (s) {
|
3763
|
-
|
3733
|
+
U(s);
|
3764
3734
|
}
|
3765
3735
|
}
|
3766
3736
|
getAnonymousId(e) {
|
@@ -3768,7 +3738,7 @@ const _e = class _e {
|
|
3768
3738
|
try {
|
3769
3739
|
return (n = this.getAnalyticsInstance()) == null ? void 0 : n.getAnonymousId(A(e));
|
3770
3740
|
} catch (s) {
|
3771
|
-
|
3741
|
+
U(s);
|
3772
3742
|
return;
|
3773
3743
|
}
|
3774
3744
|
}
|
@@ -3777,7 +3747,7 @@ const _e = class _e {
|
|
3777
3747
|
try {
|
3778
3748
|
(s = this.getAnalyticsInstance()) == null || s.setAnonymousId(A(e), A(n));
|
3779
3749
|
} catch (i) {
|
3780
|
-
|
3750
|
+
U(i);
|
3781
3751
|
}
|
3782
3752
|
}
|
3783
3753
|
getUserId() {
|
@@ -3785,7 +3755,7 @@ const _e = class _e {
|
|
3785
3755
|
try {
|
3786
3756
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getUserId();
|
3787
3757
|
} catch (n) {
|
3788
|
-
|
3758
|
+
U(n);
|
3789
3759
|
return;
|
3790
3760
|
}
|
3791
3761
|
}
|
@@ -3794,7 +3764,7 @@ const _e = class _e {
|
|
3794
3764
|
try {
|
3795
3765
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getUserTraits();
|
3796
3766
|
} catch (n) {
|
3797
|
-
|
3767
|
+
U(n);
|
3798
3768
|
return;
|
3799
3769
|
}
|
3800
3770
|
}
|
@@ -3803,7 +3773,7 @@ const _e = class _e {
|
|
3803
3773
|
try {
|
3804
3774
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getGroupId();
|
3805
3775
|
} catch (n) {
|
3806
|
-
|
3776
|
+
U(n);
|
3807
3777
|
return;
|
3808
3778
|
}
|
3809
3779
|
}
|
@@ -3812,7 +3782,7 @@ const _e = class _e {
|
|
3812
3782
|
try {
|
3813
3783
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getGroupTraits();
|
3814
3784
|
} catch (n) {
|
3815
|
-
|
3785
|
+
U(n);
|
3816
3786
|
return;
|
3817
3787
|
}
|
3818
3788
|
}
|
@@ -3821,7 +3791,7 @@ const _e = class _e {
|
|
3821
3791
|
try {
|
3822
3792
|
(n = this.getAnalyticsInstance()) == null || n.startSession(A(e));
|
3823
3793
|
} catch (s) {
|
3824
|
-
|
3794
|
+
U(s);
|
3825
3795
|
}
|
3826
3796
|
}
|
3827
3797
|
endSession() {
|
@@ -3829,7 +3799,7 @@ const _e = class _e {
|
|
3829
3799
|
try {
|
3830
3800
|
(e = this.getAnalyticsInstance()) == null || e.endSession();
|
3831
3801
|
} catch (n) {
|
3832
|
-
|
3802
|
+
U(n);
|
3833
3803
|
}
|
3834
3804
|
}
|
3835
3805
|
getSessionId() {
|
@@ -3837,7 +3807,7 @@ const _e = class _e {
|
|
3837
3807
|
try {
|
3838
3808
|
return (e = this.getAnalyticsInstance()) == null ? void 0 : e.getSessionId();
|
3839
3809
|
} catch (n) {
|
3840
|
-
|
3810
|
+
U(n);
|
3841
3811
|
return;
|
3842
3812
|
}
|
3843
3813
|
}
|
@@ -3846,7 +3816,7 @@ const _e = class _e {
|
|
3846
3816
|
try {
|
3847
3817
|
(n = this.getAnalyticsInstance()) == null || n.setAuthToken(A(e));
|
3848
3818
|
} catch (s) {
|
3849
|
-
|
3819
|
+
U(s);
|
3850
3820
|
}
|
3851
3821
|
}
|
3852
3822
|
consent(e) {
|
@@ -3854,27 +3824,27 @@ const _e = class _e {
|
|
3854
3824
|
try {
|
3855
3825
|
(n = this.getAnalyticsInstance()) == null || n.consent(A(e));
|
3856
3826
|
} catch (s) {
|
3857
|
-
|
3827
|
+
U(s);
|
3858
3828
|
}
|
3859
3829
|
}
|
3860
3830
|
};
|
3861
3831
|
// START-NO-SONAR-SCAN
|
3862
3832
|
// eslint-disable-next-line sonarjs/public-static-readonly
|
3863
|
-
|
3864
|
-
let
|
3865
|
-
const
|
3866
|
-
[
|
3867
|
-
[
|
3868
|
-
[
|
3869
|
-
[
|
3870
|
-
[
|
3871
|
-
},
|
3833
|
+
P(_e, "globalSingleton", null);
|
3834
|
+
let hn = _e;
|
3835
|
+
const Zc = {
|
3836
|
+
[Xe.Production]: "2R6mT9xSJCcbvr6JkiEu7vbrUSW",
|
3837
|
+
[Xe.Sandbox]: "2R6mEpjiTJBErRIn724pt2MWyLA",
|
3838
|
+
[Xe.Staging]: "2R6llJi7YSuOeJToPXGlQfizt18",
|
3839
|
+
[Xe.CiCd]: "2QHmFAx84bL4Up6CDHRw0XkKJKC",
|
3840
|
+
[Xe.Local]: "2QHmFAx84bL4Up6CDHRw0XkKJKC"
|
3841
|
+
}, ed = "https://revolugohxxwg.dataplane.rudderstack.com", td = window.RevolugoElements.config.apiEnvironment, nd = Zc[td], Ri = new hn();
|
3872
3842
|
try {
|
3873
|
-
|
3843
|
+
Ri.load(nd, ed);
|
3874
3844
|
} catch (t) {
|
3875
3845
|
console.error(t);
|
3876
3846
|
}
|
3877
|
-
const
|
3847
|
+
const Ii = {
|
3878
3848
|
adultCount: {
|
3879
3849
|
type: Number
|
3880
3850
|
},
|
@@ -3890,10 +3860,10 @@ const Di = {
|
|
3890
3860
|
startDate: {
|
3891
3861
|
type: String
|
3892
3862
|
}
|
3893
|
-
},
|
3863
|
+
}, Ti = gn({
|
3894
3864
|
components: {
|
3895
|
-
BPhoneInput:
|
3896
|
-
BSearchLocationInput:
|
3865
|
+
BPhoneInput: rr,
|
3866
|
+
BSearchLocationInput: tr
|
3897
3867
|
},
|
3898
3868
|
data() {
|
3899
3869
|
return {
|
@@ -3941,7 +3911,7 @@ const Di = {
|
|
3941
3911
|
var e, n;
|
3942
3912
|
this.isSubmitting = !0;
|
3943
3913
|
let t = ((e = this.config.eventMetadata) == null ? void 0 : e.name) || "";
|
3944
|
-
(n = this.config.eventMetadata) != null && n.slug && (t += ` ${this.config.eventMetadata.slug}`),
|
3914
|
+
(n = this.config.eventMetadata) != null && n.slug && (t += ` ${this.config.eventMetadata.slug}`), Ri.track(
|
3945
3915
|
"accommodation-request",
|
3946
3916
|
{
|
3947
3917
|
data: {
|
@@ -3958,15 +3928,15 @@ const Di = {
|
|
3958
3928
|
}
|
3959
3929
|
},
|
3960
3930
|
name: "ContactForm",
|
3961
|
-
props:
|
3931
|
+
props: Ii,
|
3962
3932
|
setup() {
|
3963
|
-
const { t } =
|
3933
|
+
const { t } = mn();
|
3964
3934
|
return {
|
3965
3935
|
t
|
3966
3936
|
};
|
3967
3937
|
}
|
3968
3938
|
});
|
3969
|
-
function
|
3939
|
+
function fs(t) {
|
3970
3940
|
const e = t;
|
3971
3941
|
e.__i18n = e.__i18n || [], e.__i18n.push({
|
3972
3942
|
locale: "",
|
@@ -4135,7 +4105,7 @@ function gs(t) {
|
|
4135
4105
|
}
|
4136
4106
|
});
|
4137
4107
|
}
|
4138
|
-
const
|
4108
|
+
const Oi = Te({
|
4139
4109
|
active: {
|
4140
4110
|
type: [String, Array],
|
4141
4111
|
default: void 0
|
@@ -4145,15 +4115,15 @@ const _i = Ie({
|
|
4145
4115
|
default: null
|
4146
4116
|
},
|
4147
4117
|
nextIcon: {
|
4148
|
-
type:
|
4118
|
+
type: yt,
|
4149
4119
|
default: "$next"
|
4150
4120
|
},
|
4151
4121
|
prevIcon: {
|
4152
|
-
type:
|
4122
|
+
type: yt,
|
4153
4123
|
default: "$prev"
|
4154
4124
|
},
|
4155
4125
|
modeIcon: {
|
4156
|
-
type:
|
4126
|
+
type: yt,
|
4157
4127
|
default: "$subgroup"
|
4158
4128
|
},
|
4159
4129
|
text: String,
|
@@ -4161,9 +4131,9 @@ const _i = Ie({
|
|
4161
4131
|
type: String,
|
4162
4132
|
default: "month"
|
4163
4133
|
}
|
4164
|
-
}, "VDatePickerControls"),
|
4134
|
+
}, "VDatePickerControls"), hs = Me()({
|
4165
4135
|
name: "VDatePickerControls",
|
4166
|
-
props:
|
4136
|
+
props: Oi(),
|
4167
4137
|
emits: {
|
4168
4138
|
"click:year": () => !0,
|
4169
4139
|
"click:month": () => !0,
|
@@ -4206,7 +4176,7 @@ const _i = Ie({
|
|
4206
4176
|
icon: t.modeIcon,
|
4207
4177
|
variant: "text",
|
4208
4178
|
onClick: c
|
4209
|
-
}, null), b(
|
4179
|
+
}, null), b(lr, null, null), b("div", {
|
4210
4180
|
class: "v-date-picker-controls__month"
|
4211
4181
|
}, [b(ae, {
|
4212
4182
|
"data-testid": "prev-month",
|
@@ -4222,15 +4192,15 @@ const _i = Ie({
|
|
4222
4192
|
onClick: l
|
4223
4193
|
}, null)])])), {};
|
4224
4194
|
}
|
4225
|
-
}),
|
4226
|
-
appendIcon:
|
4195
|
+
}), sd = Te({
|
4196
|
+
appendIcon: yt,
|
4227
4197
|
color: String,
|
4228
4198
|
header: String,
|
4229
4199
|
transition: String,
|
4230
|
-
onClick:
|
4231
|
-
}, "VDatePickerHeader"),
|
4200
|
+
onClick: $i()
|
4201
|
+
}, "VDatePickerHeader"), gs = Me()({
|
4232
4202
|
name: "VDatePickerHeader",
|
4233
|
-
props:
|
4203
|
+
props: sd(),
|
4234
4204
|
emits: {
|
4235
4205
|
click: () => !0,
|
4236
4206
|
"click:append": () => !0
|
@@ -4243,7 +4213,7 @@ const _i = Ie({
|
|
4243
4213
|
const {
|
4244
4214
|
backgroundColorClasses: i,
|
4245
4215
|
backgroundColorStyles: r
|
4246
|
-
} =
|
4216
|
+
} = Cs(t, "color");
|
4247
4217
|
function a() {
|
4248
4218
|
n("click");
|
4249
4219
|
}
|
@@ -4261,7 +4231,7 @@ const _i = Ie({
|
|
4261
4231
|
}, [s.prepend && b("div", {
|
4262
4232
|
key: "prepend",
|
4263
4233
|
class: "v-date-picker-header__prepend"
|
4264
|
-
}, [s.prepend()]), l && b(
|
4234
|
+
}, [s.prepend()]), l && b(_s, {
|
4265
4235
|
key: "content",
|
4266
4236
|
name: t.transition
|
4267
4237
|
}, {
|
@@ -4274,7 +4244,7 @@ const _i = Ie({
|
|
4274
4244
|
}
|
4275
4245
|
}), c && b("div", {
|
4276
4246
|
class: "v-date-picker-header__append"
|
4277
|
-
}, [s.append ? b(
|
4247
|
+
}, [s.append ? b(Bt, {
|
4278
4248
|
key: "append-defaults",
|
4279
4249
|
disabled: !t.appendIcon,
|
4280
4250
|
defaults: {
|
@@ -4296,7 +4266,7 @@ const _i = Ie({
|
|
4296
4266
|
}, null)])]);
|
4297
4267
|
}), {};
|
4298
4268
|
}
|
4299
|
-
}),
|
4269
|
+
}), id = Te({
|
4300
4270
|
allowedDates: [Array, Function],
|
4301
4271
|
disabled: {
|
4302
4272
|
type: Boolean,
|
@@ -4319,8 +4289,8 @@ const _i = Ie({
|
|
4319
4289
|
},
|
4320
4290
|
firstDayOfWeek: [Number, String]
|
4321
4291
|
}, "calendar");
|
4322
|
-
function
|
4323
|
-
const e =
|
4292
|
+
function rd(t) {
|
4293
|
+
const e = ct(), n = Le(t, "modelValue", [], (f) => bt(f)), s = $(() => t.displayValue ? e.date(t.displayValue) : n.value.length > 0 ? e.date(n.value[0]) : t.min ? e.date(t.min) : Array.isArray(t.allowedDates) ? e.date(t.allowedDates[0]) : e.date()), i = Le(t, "year", void 0, (f) => {
|
4324
4294
|
const m = f != null ? Number(f) : e.getYear(s.value);
|
4325
4295
|
return e.startOfYear(e.setYear(e.date(), m));
|
4326
4296
|
}, (f) => e.getYear(f)), r = Le(t, "month", void 0, (f) => {
|
@@ -4334,14 +4304,14 @@ function od(t) {
|
|
4334
4304
|
if (t.weeksInMonth === "static" && m.length < v) {
|
4335
4305
|
const k = m[m.length - 1];
|
4336
4306
|
let E = [];
|
4337
|
-
for (let
|
4338
|
-
E.push(e.addDays(k,
|
4307
|
+
for (let _ = 1; _ <= v - m.length; _++)
|
4308
|
+
E.push(e.addDays(k, _)), _ % 7 === 0 && (f.push(E), E = []);
|
4339
4309
|
}
|
4340
4310
|
return f;
|
4341
4311
|
});
|
4342
4312
|
function c(f, m) {
|
4343
4313
|
return f.filter((v) => u.value.includes(e.toJsDate(v).getDay())).map((v, k) => {
|
4344
|
-
const E = e.toISO(v),
|
4314
|
+
const E = e.toISO(v), _ = !e.isSameMonth(v, r.value), z = e.isSameDay(v, e.startOfMonth(r.value)), x = e.isSameDay(v, e.endOfMonth(r.value)), J = e.isSameDay(v, r.value);
|
4345
4315
|
return {
|
4346
4316
|
date: v,
|
4347
4317
|
isoDate: E,
|
@@ -4352,11 +4322,11 @@ function od(t) {
|
|
4352
4322
|
isWeekStart: k % 7 === 0,
|
4353
4323
|
isWeekEnd: k % 7 === 6,
|
4354
4324
|
isToday: e.isSameDay(v, m),
|
4355
|
-
isAdjacent:
|
4356
|
-
isHidden:
|
4325
|
+
isAdjacent: _,
|
4326
|
+
isHidden: _ && !t.showAdjacentMonths,
|
4357
4327
|
isStart: z,
|
4358
4328
|
isSelected: n.value.some((fe) => e.isSameDay(v, fe)),
|
4359
|
-
isEnd:
|
4329
|
+
isEnd: x,
|
4360
4330
|
isSame: J,
|
4361
4331
|
localized: e.format(v, "dayOfMonth")
|
4362
4332
|
};
|
@@ -4371,7 +4341,7 @@ function od(t) {
|
|
4371
4341
|
}), h = $(() => {
|
4372
4342
|
const f = l.value.flat(), m = e.date();
|
4373
4343
|
return c(f, m);
|
4374
|
-
}), y = $(() => l.value.map((f) => f.length ?
|
4344
|
+
}), y = $(() => l.value.map((f) => f.length ? Ui(e, f[0]) : null));
|
4375
4345
|
function g(f) {
|
4376
4346
|
if (t.disabled) return !0;
|
4377
4347
|
const m = e.date(f);
|
@@ -4388,7 +4358,7 @@ function od(t) {
|
|
4388
4358
|
weekNumbers: y
|
4389
4359
|
};
|
4390
4360
|
}
|
4391
|
-
const
|
4361
|
+
const Ai = Te({
|
4392
4362
|
color: String,
|
4393
4363
|
hideWeekdays: Boolean,
|
4394
4364
|
multiple: [Boolean, Number, String],
|
@@ -4401,10 +4371,10 @@ const Pi = Ie({
|
|
4401
4371
|
type: String,
|
4402
4372
|
default: "picker-reverse-transition"
|
4403
4373
|
},
|
4404
|
-
...
|
4405
|
-
}, "VDatePickerMonth"),
|
4374
|
+
...ot(id(), ["displayValue"])
|
4375
|
+
}, "VDatePickerMonth"), ms = Me()({
|
4406
4376
|
name: "VDatePickerMonth",
|
4407
|
-
props:
|
4377
|
+
props: Ai(),
|
4408
4378
|
emits: {
|
4409
4379
|
"update:modelValue": (t) => !0,
|
4410
4380
|
"update:month": (t) => !0,
|
@@ -4415,17 +4385,17 @@ const Pi = Ie({
|
|
4415
4385
|
emit: n,
|
4416
4386
|
slots: s
|
4417
4387
|
} = e;
|
4418
|
-
const i =
|
4388
|
+
const i = Zt(), {
|
4419
4389
|
daysInMonth: r,
|
4420
4390
|
model: a,
|
4421
4391
|
weekNumbers: u
|
4422
|
-
} =
|
4392
|
+
} = rd(t), l = ct(), c = Et(), d = Et(), h = Et(!1), y = $(() => h.value ? t.reverseTransition : t.transition);
|
4423
4393
|
t.multiple === "range" && a.value.length > 0 && (c.value = a.value[0], a.value.length > 1 && (d.value = a.value[a.value.length - 1]));
|
4424
4394
|
const g = $(() => {
|
4425
4395
|
const k = ["number", "string"].includes(typeof t.multiple) ? Number(t.multiple) : 1 / 0;
|
4426
4396
|
return a.value.length >= k;
|
4427
4397
|
});
|
4428
|
-
|
4398
|
+
ks(r, (k, E) => {
|
4429
4399
|
E && (h.value = l.isBefore(k[0].date, E[0].date));
|
4430
4400
|
});
|
4431
4401
|
function f(k) {
|
@@ -4439,21 +4409,21 @@ const Pi = Ie({
|
|
4439
4409
|
c.value = void 0, a.value = [];
|
4440
4410
|
return;
|
4441
4411
|
} else l.isBefore(E, c.value) ? (d.value = l.endOfDay(c.value), c.value = E) : d.value = l.endOfDay(E);
|
4442
|
-
const
|
4443
|
-
for (let
|
4444
|
-
const J = l.addDays(c.value,
|
4412
|
+
const _ = l.getDiff(d.value, c.value, "days"), z = [c.value];
|
4413
|
+
for (let x = 1; x < _; x++) {
|
4414
|
+
const J = l.addDays(c.value, x);
|
4445
4415
|
z.push(J);
|
4446
4416
|
}
|
4447
4417
|
z.push(d.value), a.value = z;
|
4448
4418
|
}
|
4449
4419
|
}
|
4450
4420
|
function m(k) {
|
4451
|
-
const E = a.value.findIndex((
|
4421
|
+
const E = a.value.findIndex((_) => l.isSameDay(_, k));
|
4452
4422
|
if (E === -1)
|
4453
4423
|
a.value = [...a.value, k];
|
4454
4424
|
else {
|
4455
|
-
const
|
4456
|
-
|
4425
|
+
const _ = [...a.value];
|
4426
|
+
_.splice(E, 1), a.value = _;
|
4457
4427
|
}
|
4458
4428
|
}
|
4459
4429
|
function v(k) {
|
@@ -4469,7 +4439,7 @@ const Pi = Ie({
|
|
4469
4439
|
class: "v-date-picker-month__day"
|
4470
4440
|
}, [je(" ")]), u.value.map((k) => b("div", {
|
4471
4441
|
class: ["v-date-picker-month__day", "v-date-picker-month__day--adjacent"]
|
4472
|
-
}, [k]))]), b(
|
4442
|
+
}, [k]))]), b(_s, {
|
4473
4443
|
name: y.value
|
4474
4444
|
}, {
|
4475
4445
|
default: () => {
|
@@ -4480,13 +4450,13 @@ const Pi = Ie({
|
|
4480
4450
|
class: "v-date-picker-month__days"
|
4481
4451
|
}, [!t.hideWeekdays && l.getWeekdays(t.firstDayOfWeek).map((E) => b("div", {
|
4482
4452
|
class: ["v-date-picker-month__day", "v-date-picker-month__weekday"]
|
4483
|
-
}, [E])), r.value.map((E,
|
4453
|
+
}, [E])), r.value.map((E, _) => {
|
4484
4454
|
const z = {
|
4485
4455
|
props: {
|
4486
4456
|
onClick: () => v(E.date)
|
4487
4457
|
},
|
4488
4458
|
item: E,
|
4489
|
-
i:
|
4459
|
+
i: _
|
4490
4460
|
};
|
4491
4461
|
return g.value && !E.isSelected && (E.isDisabled = !0), b("div", {
|
4492
4462
|
class: ["v-date-picker-month__day", {
|
@@ -4497,7 +4467,7 @@ const Pi = Ie({
|
|
4497
4467
|
"v-date-picker-month__day--week-start": E.isWeekStart
|
4498
4468
|
}],
|
4499
4469
|
"data-v-date": E.isDisabled ? void 0 : E.isoDate
|
4500
|
-
}, [(t.showAdjacentMonths || !E.isAdjacent) && b(
|
4470
|
+
}, [(t.showAdjacentMonths || !E.isAdjacent) && b(Bt, {
|
4501
4471
|
defaults: {
|
4502
4472
|
VBtn: {
|
4503
4473
|
class: "v-date-picker-month__day-btn",
|
@@ -4512,24 +4482,24 @@ const Pi = Ie({
|
|
4512
4482
|
}
|
4513
4483
|
}, {
|
4514
4484
|
default: () => {
|
4515
|
-
var
|
4516
|
-
return [((
|
4485
|
+
var x;
|
4486
|
+
return [((x = s.day) == null ? void 0 : x.call(s, z)) ?? b(ae, z.props, null)];
|
4517
4487
|
}
|
4518
4488
|
})]);
|
4519
4489
|
})])];
|
4520
4490
|
}
|
4521
4491
|
})]);
|
4522
4492
|
}
|
4523
|
-
}),
|
4493
|
+
}), Di = Te({
|
4524
4494
|
color: String,
|
4525
4495
|
height: [String, Number],
|
4526
4496
|
min: null,
|
4527
4497
|
max: null,
|
4528
4498
|
modelValue: Number,
|
4529
4499
|
year: Number
|
4530
|
-
}, "VDatePickerMonths"),
|
4500
|
+
}, "VDatePickerMonths"), ps = Me()({
|
4531
4501
|
name: "VDatePickerMonths",
|
4532
|
-
props:
|
4502
|
+
props: Di(),
|
4533
4503
|
emits: {
|
4534
4504
|
"update:modelValue": (t) => !0
|
4535
4505
|
},
|
@@ -4538,9 +4508,9 @@ const Pi = Ie({
|
|
4538
4508
|
emit: n,
|
4539
4509
|
slots: s
|
4540
4510
|
} = e;
|
4541
|
-
const i =
|
4511
|
+
const i = ct(), r = Le(t, "modelValue"), a = $(() => {
|
4542
4512
|
let u = i.startOfYear(i.date());
|
4543
|
-
return t.year && (u = i.setYear(u, t.year)),
|
4513
|
+
return t.year && (u = i.setYear(u, t.year)), Rs(12).map((l) => {
|
4544
4514
|
const c = i.format(u, "monthShort"), d = !!(t.min && i.isAfter(i.startOfMonth(i.date(t.min)), u) || t.max && i.isAfter(u, i.startOfMonth(i.date(t.max))));
|
4545
4515
|
return u = i.getNextMonth(u), {
|
4546
4516
|
isDisabled: d,
|
@@ -4549,12 +4519,12 @@ const Pi = Ie({
|
|
4549
4519
|
};
|
4550
4520
|
});
|
4551
4521
|
});
|
4552
|
-
return
|
4522
|
+
return Is(() => {
|
4553
4523
|
r.value = r.value ?? i.getMonth(i.date());
|
4554
4524
|
}), Ye(() => b("div", {
|
4555
4525
|
class: "v-date-picker-months",
|
4556
4526
|
style: {
|
4557
|
-
height:
|
4527
|
+
height: Ts(t.height)
|
4558
4528
|
}
|
4559
4529
|
}, [b("div", {
|
4560
4530
|
class: "v-date-picker-months__content"
|
@@ -4585,15 +4555,15 @@ const Pi = Ie({
|
|
4585
4555
|
}, c), null);
|
4586
4556
|
})])])), {};
|
4587
4557
|
}
|
4588
|
-
}),
|
4558
|
+
}), Ci = Te({
|
4589
4559
|
color: String,
|
4590
4560
|
height: [String, Number],
|
4591
4561
|
min: null,
|
4592
4562
|
max: null,
|
4593
4563
|
modelValue: Number
|
4594
|
-
}, "VDatePickerYears"),
|
4564
|
+
}, "VDatePickerYears"), vs = Me()({
|
4595
4565
|
name: "VDatePickerYears",
|
4596
|
-
props:
|
4566
|
+
props: Ci(),
|
4597
4567
|
emits: {
|
4598
4568
|
"update:modelValue": (t) => !0
|
4599
4569
|
},
|
@@ -4602,12 +4572,12 @@ const Pi = Ie({
|
|
4602
4572
|
emit: n,
|
4603
4573
|
slots: s
|
4604
4574
|
} = e;
|
4605
|
-
const i =
|
4575
|
+
const i = ct(), r = Le(t, "modelValue"), a = $(() => {
|
4606
4576
|
const l = i.getYear(i.date());
|
4607
4577
|
let c = l - 100, d = l + 52;
|
4608
4578
|
t.min && (c = i.getYear(i.date(t.min))), t.max && (d = i.getYear(i.date(t.max)));
|
4609
4579
|
let h = i.startOfYear(i.date());
|
4610
|
-
return h = i.setYear(h, c),
|
4580
|
+
return h = i.setYear(h, c), Rs(d - c + 1, c).map((y) => {
|
4611
4581
|
const g = i.format(h, "year");
|
4612
4582
|
return h = i.setYear(h, i.getYear(h) + 1), {
|
4613
4583
|
text: g,
|
@@ -4615,19 +4585,19 @@ const Pi = Ie({
|
|
4615
4585
|
};
|
4616
4586
|
});
|
4617
4587
|
});
|
4618
|
-
|
4588
|
+
Is(() => {
|
4619
4589
|
r.value = r.value ?? i.getYear(i.date());
|
4620
4590
|
});
|
4621
|
-
const u =
|
4622
|
-
return
|
4591
|
+
const u = Bi();
|
4592
|
+
return Vi(async () => {
|
4623
4593
|
var l;
|
4624
|
-
await
|
4594
|
+
await Fi(), (l = u.el) == null || l.scrollIntoView({
|
4625
4595
|
block: "center"
|
4626
4596
|
});
|
4627
4597
|
}), Ye(() => b("div", {
|
4628
4598
|
class: "v-date-picker-years",
|
4629
4599
|
style: {
|
4630
|
-
height:
|
4600
|
+
height: Ts(t.height)
|
4631
4601
|
}
|
4632
4602
|
}, [b("div", {
|
4633
4603
|
class: "v-date-picker-years__content"
|
@@ -4657,15 +4627,15 @@ const Pi = Ie({
|
|
4657
4627
|
}, d), null);
|
4658
4628
|
})])])), {};
|
4659
4629
|
}
|
4660
|
-
}),
|
4630
|
+
}), od = cr("v-picker-title"), _i = Te({
|
4661
4631
|
bgColor: String,
|
4662
4632
|
landscape: Boolean,
|
4663
4633
|
title: String,
|
4664
4634
|
hideHeader: Boolean,
|
4665
|
-
...
|
4666
|
-
}, "VPicker"),
|
4635
|
+
...fr()
|
4636
|
+
}, "VPicker"), ys = Me()({
|
4667
4637
|
name: "VPicker",
|
4668
|
-
props:
|
4638
|
+
props: _i(),
|
4669
4639
|
setup(t, e) {
|
4670
4640
|
let {
|
4671
4641
|
slots: n
|
@@ -4673,7 +4643,7 @@ const Pi = Ie({
|
|
4673
4643
|
const {
|
4674
4644
|
backgroundColorClasses: s,
|
4675
4645
|
backgroundColorStyles: i
|
4676
|
-
} =
|
4646
|
+
} = Cs(Hi(t, "color"));
|
4677
4647
|
return Ye(() => {
|
4678
4648
|
const r = Cn.filterProps(t), a = !!(t.title || n.title);
|
4679
4649
|
return b(Cn, re(r, {
|
@@ -4690,7 +4660,7 @@ const Pi = Ie({
|
|
4690
4660
|
key: "header",
|
4691
4661
|
class: [s.value],
|
4692
4662
|
style: [i.value]
|
4693
|
-
}, [a && b(
|
4663
|
+
}, [a && b(od, {
|
4694
4664
|
key: "picker-title"
|
4695
4665
|
}, {
|
4696
4666
|
default: () => {
|
@@ -4701,7 +4671,7 @@ const Pi = Ie({
|
|
4701
4671
|
class: "v-picker__header"
|
4702
4672
|
}, [n.header()])]), b("div", {
|
4703
4673
|
class: "v-picker__body"
|
4704
|
-
}, [(u = n.default) == null ? void 0 : u.call(n)]), n.actions && b(
|
4674
|
+
}, [(u = n.default) == null ? void 0 : u.call(n)]), n.actions && b(Bt, {
|
4705
4675
|
defaults: {
|
4706
4676
|
VBtn: {
|
4707
4677
|
slim: !0,
|
@@ -4717,7 +4687,7 @@ const Pi = Ie({
|
|
4717
4687
|
});
|
4718
4688
|
}), {};
|
4719
4689
|
}
|
4720
|
-
}),
|
4690
|
+
}), ad = Te({
|
4721
4691
|
// TODO: implement in v3.5
|
4722
4692
|
// calendarIcon: {
|
4723
4693
|
// type: String,
|
@@ -4743,19 +4713,19 @@ const Pi = Ie({
|
|
4743
4713
|
type: String,
|
4744
4714
|
default: "$vuetify.datePicker.header"
|
4745
4715
|
},
|
4746
|
-
...
|
4747
|
-
...
|
4716
|
+
...Oi(),
|
4717
|
+
...Ai({
|
4748
4718
|
weeksInMonth: "static"
|
4749
4719
|
}),
|
4750
|
-
...
|
4751
|
-
...
|
4752
|
-
...
|
4720
|
+
...ot(Di(), ["modelValue"]),
|
4721
|
+
...ot(Ci(), ["modelValue"]),
|
4722
|
+
..._i({
|
4753
4723
|
title: "$vuetify.datePicker.title"
|
4754
4724
|
}),
|
4755
4725
|
modelValue: null
|
4756
|
-
}, "VDatePicker"),
|
4726
|
+
}, "VDatePicker"), bs = Me()({
|
4757
4727
|
name: "VDatePicker",
|
4758
|
-
props:
|
4728
|
+
props: ad(),
|
4759
4729
|
emits: {
|
4760
4730
|
"update:modelValue": (t) => !0,
|
4761
4731
|
"update:month": (t) => !0,
|
@@ -4768,72 +4738,72 @@ const Pi = Ie({
|
|
4768
4738
|
emit: n,
|
4769
4739
|
slots: s
|
4770
4740
|
} = e;
|
4771
|
-
const i =
|
4741
|
+
const i = ct(), {
|
4772
4742
|
t: r
|
4773
|
-
} =
|
4774
|
-
const
|
4775
|
-
return t.min && i.isValid(
|
4743
|
+
} = xi(), a = Le(t, "modelValue", void 0, (I) => bt(I), (I) => t.multiple ? I : I[0]), u = Le(t, "viewMode"), l = $(() => {
|
4744
|
+
const I = i.date(t.min);
|
4745
|
+
return t.min && i.isValid(I) ? I : null;
|
4776
4746
|
}), c = $(() => {
|
4777
|
-
const
|
4778
|
-
return t.max && i.isValid(
|
4747
|
+
const I = i.date(t.max);
|
4748
|
+
return t.max && i.isValid(I) ? I : null;
|
4779
4749
|
}), d = $(() => {
|
4780
4750
|
var se;
|
4781
|
-
const
|
4782
|
-
let V =
|
4783
|
-
return (se = a.value) != null && se[0] ? V = i.date(a.value[0]) : l.value && i.isBefore(
|
4784
|
-
}), h =
|
4785
|
-
let
|
4786
|
-
return
|
4751
|
+
const I = i.date();
|
4752
|
+
let V = I;
|
4753
|
+
return (se = a.value) != null && se[0] ? V = i.date(a.value[0]) : l.value && i.isBefore(I, l.value) ? V = l.value : c.value && i.isAfter(I, c.value) && (V = c.value), V && i.isValid(V) ? V : I;
|
4754
|
+
}), h = Zt(Number(t.month ?? i.getMonth(i.startOfMonth(d.value)))), y = Zt(Number(t.year ?? i.getYear(i.startOfYear(i.setMonth(d.value, h.value))))), g = Et(!1), f = $(() => t.multiple && a.value.length > 1 ? r("$vuetify.datePicker.itemsSelected", a.value.length) : a.value[0] && i.isValid(a.value[0]) ? i.format(i.date(a.value[0]), "normalDateWithWeekday") : r(t.header)), m = $(() => {
|
4755
|
+
let I = i.date();
|
4756
|
+
return I = i.setDate(I, 1), I = i.setMonth(I, h.value), I = i.setYear(I, y.value), i.format(I, "monthAndYear");
|
4787
4757
|
}), v = $(() => `date-picker-header${g.value ? "-reverse" : ""}-transition`), k = $(() => {
|
4788
4758
|
if (t.disabled) return !0;
|
4789
|
-
const
|
4759
|
+
const I = [];
|
4790
4760
|
if (u.value !== "month")
|
4791
|
-
|
4761
|
+
I.push("prev", "next");
|
4792
4762
|
else {
|
4793
4763
|
let V = i.date();
|
4794
4764
|
if (V = i.startOfMonth(V), V = i.setMonth(V, h.value), V = i.setYear(V, y.value), l.value) {
|
4795
4765
|
const se = i.addDays(i.startOfMonth(V), -1);
|
4796
|
-
i.isAfter(l.value, se) &&
|
4766
|
+
i.isAfter(l.value, se) && I.push("prev");
|
4797
4767
|
}
|
4798
4768
|
if (c.value) {
|
4799
4769
|
const se = i.addDays(i.endOfMonth(V), 1);
|
4800
|
-
i.isAfter(se, c.value) &&
|
4770
|
+
i.isAfter(se, c.value) && I.push("next");
|
4801
4771
|
}
|
4802
4772
|
}
|
4803
|
-
return
|
4773
|
+
return I;
|
4804
4774
|
});
|
4805
4775
|
function E() {
|
4806
4776
|
h.value < 11 ? h.value++ : (y.value++, h.value = 0, Oe(y.value)), fe(h.value);
|
4807
4777
|
}
|
4808
|
-
function
|
4778
|
+
function _() {
|
4809
4779
|
h.value > 0 ? h.value-- : (y.value--, h.value = 11, Oe(y.value)), fe(h.value);
|
4810
4780
|
}
|
4811
4781
|
function z() {
|
4812
4782
|
u.value = "month";
|
4813
4783
|
}
|
4814
|
-
function
|
4784
|
+
function x() {
|
4815
4785
|
u.value = u.value === "months" ? "month" : "months";
|
4816
4786
|
}
|
4817
4787
|
function J() {
|
4818
4788
|
u.value = u.value === "year" ? "month" : "year";
|
4819
4789
|
}
|
4820
|
-
function fe(
|
4821
|
-
u.value === "months" &&
|
4790
|
+
function fe(I) {
|
4791
|
+
u.value === "months" && x(), n("update:month", I);
|
4822
4792
|
}
|
4823
|
-
function Oe(
|
4824
|
-
u.value === "year" && J(), n("update:year",
|
4793
|
+
function Oe(I) {
|
4794
|
+
u.value === "year" && J(), n("update:year", I);
|
4825
4795
|
}
|
4826
|
-
return
|
4827
|
-
const se =
|
4828
|
-
if (!
|
4829
|
-
const
|
4830
|
-
$e !== h.value && (h.value = $e, fe(h.value)), F !== y.value && (y.value = F, Oe(y.value)), g.value = i.isBefore(
|
4796
|
+
return ks(a, (I, V) => {
|
4797
|
+
const se = bt(V), We = bt(I);
|
4798
|
+
if (!We.length) return;
|
4799
|
+
const Ht = i.date(se[se.length - 1]), Qe = i.date(We[We.length - 1]), $e = i.getMonth(Qe), F = i.getYear(Qe);
|
4800
|
+
$e !== h.value && (h.value = $e, fe(h.value)), F !== y.value && (y.value = F, Oe(y.value)), g.value = i.isBefore(Ht, Qe);
|
4831
4801
|
}), Ye(() => {
|
4832
|
-
const
|
4802
|
+
const I = ys.filterProps(t), V = hs.filterProps(t), se = gs.filterProps(t), We = ms.filterProps(t), Ht = ot(ps.filterProps(t), ["modelValue"]), Qe = ot(vs.filterProps(t), ["modelValue"]), $e = {
|
4833
4803
|
header: f.value,
|
4834
4804
|
transition: v.value
|
4835
4805
|
};
|
4836
|
-
return b(
|
4806
|
+
return b(ys, re(I, {
|
4837
4807
|
class: ["v-date-picker", `v-date-picker--${u.value}`, {
|
4838
4808
|
"v-date-picker--show-week": t.showWeek
|
4839
4809
|
}, t.class],
|
@@ -4845,7 +4815,7 @@ const Pi = Ie({
|
|
4845
4815
|
class: "v-date-picker__title"
|
4846
4816
|
}, [r(t.title)]);
|
4847
4817
|
},
|
4848
|
-
header: () => s.header ? b(
|
4818
|
+
header: () => s.header ? b(Bt, {
|
4849
4819
|
defaults: {
|
4850
4820
|
VDatePickerHeader: {
|
4851
4821
|
...$e
|
@@ -4856,7 +4826,7 @@ const Pi = Ie({
|
|
4856
4826
|
var F;
|
4857
4827
|
return [(F = s.header) == null ? void 0 : F.call(s, $e)];
|
4858
4828
|
}
|
4859
|
-
}) : b(
|
4829
|
+
}) : b(gs, re({
|
4860
4830
|
key: "header"
|
4861
4831
|
}, se, $e, {
|
4862
4832
|
onClick: u.value !== "month" ? z : void 0
|
@@ -4864,34 +4834,34 @@ const Pi = Ie({
|
|
4864
4834
|
...s,
|
4865
4835
|
default: void 0
|
4866
4836
|
}),
|
4867
|
-
default: () => b(
|
4837
|
+
default: () => b(He, null, [b(hs, re(V, {
|
4868
4838
|
disabled: k.value,
|
4869
4839
|
text: m.value,
|
4870
4840
|
"onClick:next": E,
|
4871
|
-
"onClick:prev":
|
4872
|
-
"onClick:month":
|
4841
|
+
"onClick:prev": _,
|
4842
|
+
"onClick:month": x,
|
4873
4843
|
"onClick:year": J
|
4874
|
-
}), null), b(
|
4844
|
+
}), null), b(ur, {
|
4875
4845
|
hideOnLeave: !0
|
4876
4846
|
}, {
|
4877
|
-
default: () => [u.value === "months" ? b(
|
4847
|
+
default: () => [u.value === "months" ? b(ps, re({
|
4878
4848
|
key: "date-picker-months"
|
4879
|
-
},
|
4849
|
+
}, Ht, {
|
4880
4850
|
modelValue: h.value,
|
4881
4851
|
"onUpdate:modelValue": [(F) => h.value = F, fe],
|
4882
4852
|
min: l.value,
|
4883
4853
|
max: c.value,
|
4884
4854
|
year: y.value
|
4885
|
-
}), null) : u.value === "year" ? b(
|
4855
|
+
}), null) : u.value === "year" ? b(vs, re({
|
4886
4856
|
key: "date-picker-years"
|
4887
|
-
},
|
4857
|
+
}, Qe, {
|
4888
4858
|
modelValue: y.value,
|
4889
4859
|
"onUpdate:modelValue": [(F) => y.value = F, Oe],
|
4890
4860
|
min: l.value,
|
4891
4861
|
max: c.value
|
4892
|
-
}), null) : b(
|
4862
|
+
}), null) : b(ms, re({
|
4893
4863
|
key: "date-picker-month"
|
4894
|
-
},
|
4864
|
+
}, We, {
|
4895
4865
|
modelValue: a.value,
|
4896
4866
|
"onUpdate:modelValue": (F) => a.value = F,
|
4897
4867
|
month: h.value,
|
@@ -4906,17 +4876,17 @@ const Pi = Ie({
|
|
4906
4876
|
});
|
4907
4877
|
}), {};
|
4908
4878
|
}
|
4909
|
-
}),
|
4910
|
-
function
|
4879
|
+
}), ld = { class: "d-flex justify-end" };
|
4880
|
+
function ud(t, e, n, s, i, r) {
|
4911
4881
|
const a = oe("BPhoneInput"), u = oe("BSearchLocationInput");
|
4912
|
-
return M(),
|
4913
|
-
b(
|
4882
|
+
return M(), ge("div", null, [
|
4883
|
+
b(hr, {
|
4914
4884
|
modelValue: t.isFormValid,
|
4915
4885
|
"onUpdate:modelValue": e[13] || (e[13] = (l) => t.isFormValid = l),
|
4916
4886
|
style: { gap: "8px", display: "flex", flexDirection: "column" }
|
4917
4887
|
}, {
|
4918
|
-
default:
|
4919
|
-
b(
|
4888
|
+
default: C(() => [
|
4889
|
+
b(Je, {
|
4920
4890
|
modelValue: t.formData.email,
|
4921
4891
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => t.formData.email = l),
|
4922
4892
|
density: "compact",
|
@@ -4926,8 +4896,8 @@ function cd(t, e, n, s, i, r) {
|
|
4926
4896
|
rules: t.rules.email,
|
4927
4897
|
color: "primary"
|
4928
4898
|
}, {
|
4929
|
-
message:
|
4930
|
-
je(
|
4899
|
+
message: C(({ message: l }) => [
|
4900
|
+
je(xe(t.t(l)), 1)
|
4931
4901
|
]),
|
4932
4902
|
_: 1
|
4933
4903
|
}, 8, ["modelValue", "label", "rules"]),
|
@@ -4936,10 +4906,10 @@ function cd(t, e, n, s, i, r) {
|
|
4936
4906
|
"onUpdate:modelValue": e[1] || (e[1] = (l) => t.formData.phoneData = l),
|
4937
4907
|
class: "mt-0"
|
4938
4908
|
}, null, 8, ["modelValue"]),
|
4939
|
-
b(
|
4940
|
-
default:
|
4909
|
+
b(st, { class: "mt-0" }, {
|
4910
|
+
default: C(() => [
|
4941
4911
|
b(Pe, null, {
|
4942
|
-
default:
|
4912
|
+
default: C(() => [
|
4943
4913
|
b(Dn, {
|
4944
4914
|
modelValue: t.menuStartDate,
|
4945
4915
|
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.menuStartDate = l),
|
@@ -4947,8 +4917,8 @@ function cd(t, e, n, s, i, r) {
|
|
4947
4917
|
"min-width": "auto",
|
4948
4918
|
transition: "scale-transition"
|
4949
4919
|
}, {
|
4950
|
-
activator:
|
4951
|
-
b(
|
4920
|
+
activator: C(({ props: l }) => [
|
4921
|
+
b(Je, re({
|
4952
4922
|
"model-value": t.formatDate(t.formData.startDate),
|
4953
4923
|
density: "compact",
|
4954
4924
|
"hide-details": "",
|
@@ -4958,8 +4928,8 @@ function cd(t, e, n, s, i, r) {
|
|
4958
4928
|
required: ""
|
4959
4929
|
}, l, { color: "primary" }), null, 16, ["model-value", "label"])
|
4960
4930
|
]),
|
4961
|
-
default:
|
4962
|
-
b(
|
4931
|
+
default: C(() => [
|
4932
|
+
b(bs, {
|
4963
4933
|
modelValue: t.formData.startDate,
|
4964
4934
|
"onUpdate:modelValue": [
|
4965
4935
|
e[2] || (e[2] = (l) => t.formData.startDate = l),
|
@@ -4973,7 +4943,7 @@ function cd(t, e, n, s, i, r) {
|
|
4973
4943
|
_: 1
|
4974
4944
|
}),
|
4975
4945
|
b(Pe, null, {
|
4976
|
-
default:
|
4946
|
+
default: C(() => [
|
4977
4947
|
b(Dn, {
|
4978
4948
|
modelValue: t.menuEndDate,
|
4979
4949
|
"onUpdate:modelValue": e[7] || (e[7] = (l) => t.menuEndDate = l),
|
@@ -4981,8 +4951,8 @@ function cd(t, e, n, s, i, r) {
|
|
4981
4951
|
"min-width": "auto",
|
4982
4952
|
transition: "scale-transition"
|
4983
4953
|
}, {
|
4984
|
-
activator:
|
4985
|
-
b(
|
4954
|
+
activator: C(({ props: l }) => [
|
4955
|
+
b(Je, re({
|
4986
4956
|
"model-value": t.formatDate(t.formData.endDate),
|
4987
4957
|
density: "compact",
|
4988
4958
|
"hide-details": "",
|
@@ -4992,8 +4962,8 @@ function cd(t, e, n, s, i, r) {
|
|
4992
4962
|
required: ""
|
4993
4963
|
}, l, { color: "primary" }), null, 16, ["model-value", "label"])
|
4994
4964
|
]),
|
4995
|
-
default:
|
4996
|
-
b(
|
4965
|
+
default: C(() => [
|
4966
|
+
b(bs, {
|
4997
4967
|
modelValue: t.formData.endDate,
|
4998
4968
|
"onUpdate:modelValue": [
|
4999
4969
|
e[5] || (e[5] = (l) => t.formData.endDate = l),
|
@@ -5009,11 +4979,11 @@ function cd(t, e, n, s, i, r) {
|
|
5009
4979
|
]),
|
5010
4980
|
_: 1
|
5011
4981
|
}),
|
5012
|
-
b(
|
5013
|
-
default:
|
4982
|
+
b(st, null, {
|
4983
|
+
default: C(() => [
|
5014
4984
|
b(Pe, null, {
|
5015
|
-
default:
|
5016
|
-
b(
|
4985
|
+
default: C(() => [
|
4986
|
+
b(Je, {
|
5017
4987
|
modelValue: t.formData.adultCount,
|
5018
4988
|
"onUpdate:modelValue": e[8] || (e[8] = (l) => t.formData.adultCount = l),
|
5019
4989
|
density: "compact",
|
@@ -5030,8 +5000,8 @@ function cd(t, e, n, s, i, r) {
|
|
5030
5000
|
_: 1
|
5031
5001
|
}),
|
5032
5002
|
b(Pe, null, {
|
5033
|
-
default:
|
5034
|
-
b(
|
5003
|
+
default: C(() => [
|
5004
|
+
b(Je, {
|
5035
5005
|
modelValue: t.formData.roomCount,
|
5036
5006
|
"onUpdate:modelValue": e[9] || (e[9] = (l) => t.formData.roomCount = l),
|
5037
5007
|
density: "compact",
|
@@ -5057,7 +5027,7 @@ function cd(t, e, n, s, i, r) {
|
|
5057
5027
|
variant: "outlined",
|
5058
5028
|
"with-details": ""
|
5059
5029
|
}, null, 8, ["modelValue"]),
|
5060
|
-
b(
|
5030
|
+
b(or, {
|
5061
5031
|
modelValue: t.formData.specificRequest,
|
5062
5032
|
"onUpdate:modelValue": e[11] || (e[11] = (l) => t.formData.specificRequest = l),
|
5063
5033
|
density: "compact",
|
@@ -5065,7 +5035,7 @@ function cd(t, e, n, s, i, r) {
|
|
5065
5035
|
variant: "outlined",
|
5066
5036
|
color: "primary"
|
5067
5037
|
}, null, 8, ["modelValue", "label"]),
|
5068
|
-
|
5038
|
+
en("div", ld, [
|
5069
5039
|
b(ae, {
|
5070
5040
|
color: t.isSuccess ? "green" : "primary",
|
5071
5041
|
"data-cy": "submit-button",
|
@@ -5074,8 +5044,8 @@ function cd(t, e, n, s, i, r) {
|
|
5074
5044
|
loading: t.isSubmitting,
|
5075
5045
|
onClick: e[12] || (e[12] = (l) => t.onSubmit())
|
5076
5046
|
}, {
|
5077
|
-
default:
|
5078
|
-
je(
|
5047
|
+
default: C(() => [
|
5048
|
+
je(xe(t.t("ContactForm.submit")), 1)
|
5079
5049
|
]),
|
5080
5050
|
_: 1
|
5081
5051
|
}, 8, ["color", "disabled", "loading"])
|
@@ -5085,9 +5055,9 @@ function cd(t, e, n, s, i, r) {
|
|
5085
5055
|
}, 8, ["modelValue"])
|
5086
5056
|
]);
|
5087
5057
|
}
|
5088
|
-
typeof
|
5089
|
-
const
|
5090
|
-
...
|
5058
|
+
typeof fs == "function" && fs(Ti);
|
5059
|
+
const cd = /* @__PURE__ */ pn(Ti, [["render", ud]]), dd = {
|
5060
|
+
...Ii,
|
5091
5061
|
boilerplateSkeleton: {
|
5092
5062
|
type: Boolean
|
5093
5063
|
},
|
@@ -5104,11 +5074,11 @@ const dd = /* @__PURE__ */ mn(Ci, [["render", cd]]), fd = {
|
|
5104
5074
|
type: {
|
5105
5075
|
type: String
|
5106
5076
|
}
|
5107
|
-
},
|
5077
|
+
}, Pi = gn({
|
5108
5078
|
components: {
|
5109
|
-
BErrorOverlay:
|
5110
|
-
ContactForm:
|
5111
|
-
HotelOfferItemLayout:
|
5079
|
+
BErrorOverlay: ar,
|
5080
|
+
ContactForm: cd,
|
5081
|
+
HotelOfferItemLayout: Ds
|
5112
5082
|
},
|
5113
5083
|
computed: {
|
5114
5084
|
wording() {
|
@@ -5177,11 +5147,11 @@ const dd = /* @__PURE__ */ mn(Ci, [["render", cd]]), fd = {
|
|
5177
5147
|
this.$emit("reset-filters");
|
5178
5148
|
}
|
5179
5149
|
},
|
5180
|
-
mixins: [
|
5150
|
+
mixins: [Os],
|
5181
5151
|
name: "HotelOfferListEmpty",
|
5182
|
-
props:
|
5152
|
+
props: dd,
|
5183
5153
|
setup() {
|
5184
|
-
const { t } =
|
5154
|
+
const { t } = mn();
|
5185
5155
|
return {
|
5186
5156
|
t
|
5187
5157
|
};
|
@@ -5195,7 +5165,7 @@ const dd = /* @__PURE__ */ mn(Ci, [["render", cd]]), fd = {
|
|
5195
5165
|
}
|
5196
5166
|
}
|
5197
5167
|
});
|
5198
|
-
function
|
5168
|
+
function Es(t) {
|
5199
5169
|
const e = t;
|
5200
5170
|
e.__i18n = e.__i18n || [], e.__i18n.push({
|
5201
5171
|
locale: "",
|
@@ -5371,31 +5341,31 @@ function ks(t) {
|
|
5371
5341
|
}
|
5372
5342
|
});
|
5373
5343
|
}
|
5374
|
-
const
|
5375
|
-
function
|
5344
|
+
const fd = { class: "position-relative" };
|
5345
|
+
function hd(t, e, n, s, i, r) {
|
5376
5346
|
const a = oe("HotelOfferItemLayout"), u = oe("ContactForm"), l = oe("BErrorOverlay");
|
5377
|
-
return M(),
|
5378
|
-
(M(),
|
5347
|
+
return M(), ge("div", fd, [
|
5348
|
+
(M(), ge(He, null, As(6, (c) => (M(), ge(He, { key: c }, [
|
5379
5349
|
b(a, {
|
5380
5350
|
boilerplate: t.boilerplateSkeleton,
|
5381
|
-
class:
|
5351
|
+
class: St({
|
5382
5352
|
"mt-0": c === 1,
|
5383
5353
|
"mb-0": c === t.itemCount,
|
5384
5354
|
"mb-2": t.$breakpointService.xs
|
5385
5355
|
})
|
5386
5356
|
}, null, 8, ["boilerplate", "class"]),
|
5387
|
-
t.$breakpointService.xs ? Z("", !0) : (M(), Q(
|
5357
|
+
t.$breakpointService.xs ? Z("", !0) : (M(), Q(tn, { key: 0 }))
|
5388
5358
|
], 64))), 64)),
|
5389
5359
|
t.typeData ? (M(), Q(l, {
|
5390
5360
|
key: 0,
|
5391
5361
|
"z-index": 0
|
5392
5362
|
}, {
|
5393
|
-
title:
|
5394
|
-
je(
|
5363
|
+
title: C(() => [
|
5364
|
+
je(xe(t.wording.title), 1)
|
5395
5365
|
]),
|
5396
|
-
description:
|
5397
|
-
|
5398
|
-
|
5366
|
+
description: C(() => [
|
5367
|
+
en("div", null, [
|
5368
|
+
en("p", null, xe(t.wording.description), 1),
|
5399
5369
|
t.typeData !== "noResultsFiltered" && t.typeData !== "accommodationSuccess" ? (M(), Q(u, {
|
5400
5370
|
key: 0,
|
5401
5371
|
"adult-count": t.adultCount,
|
@@ -5412,8 +5382,8 @@ function gd(t, e, n, s, i, r) {
|
|
5412
5382
|
size: "small",
|
5413
5383
|
onClick: t.onResetFilters
|
5414
5384
|
}, {
|
5415
|
-
default:
|
5416
|
-
je(
|
5385
|
+
default: C(() => [
|
5386
|
+
je(xe(t.t("HotelOfferListEmpty.noResultsFiltered.reset")), 1)
|
5417
5387
|
]),
|
5418
5388
|
_: 1
|
5419
5389
|
}, 8, ["onClick"])) : Z("", !0)
|
@@ -5423,36 +5393,36 @@ function gd(t, e, n, s, i, r) {
|
|
5423
5393
|
})) : Z("", !0)
|
5424
5394
|
]);
|
5425
5395
|
}
|
5426
|
-
typeof
|
5427
|
-
const
|
5396
|
+
typeof Es == "function" && Es(Pi);
|
5397
|
+
const gd = /* @__PURE__ */ pn(Pi, [["render", hd]]), Ni = gn({
|
5428
5398
|
components: {
|
5429
|
-
BHotelOffersFilterBar:
|
5430
|
-
BHotelSearchBar:
|
5431
|
-
HotelOfferItem:
|
5432
|
-
HotelOfferItemLayout:
|
5433
|
-
HotelOfferListEmpty:
|
5434
|
-
HotelRoomOfferList:
|
5435
|
-
TermsAndConditions:
|
5399
|
+
BHotelOffersFilterBar: ir,
|
5400
|
+
BHotelSearchBar: mr,
|
5401
|
+
HotelOfferItem: sr,
|
5402
|
+
HotelOfferItemLayout: Ds,
|
5403
|
+
HotelOfferListEmpty: gd,
|
5404
|
+
HotelRoomOfferList: gr,
|
5405
|
+
TermsAndConditions: yr
|
5436
5406
|
},
|
5437
5407
|
computed: {
|
5438
|
-
...
|
5439
|
-
|
5440
|
-
|
5441
|
-
|
5408
|
+
...Gi(
|
5409
|
+
Ki,
|
5410
|
+
br,
|
5411
|
+
zi
|
5442
5412
|
),
|
5443
|
-
areFiltersActive:
|
5413
|
+
areFiltersActive: ye("hotelOffers/areFiltersActive"),
|
5444
5414
|
displayFiltersMenu() {
|
5445
5415
|
return !!this.parsedFeatures.FiltersBar;
|
5446
5416
|
},
|
5447
|
-
filters:
|
5448
|
-
hasErrorHotelOffers:
|
5449
|
-
hotelOfferRequest:
|
5450
|
-
hotelOffers:
|
5451
|
-
hotelOffersCurrency:
|
5452
|
-
isPollingHotelOffers:
|
5417
|
+
filters: ye("hotelOffers/filters"),
|
5418
|
+
hasErrorHotelOffers: ye("hotelOffers/hasError"),
|
5419
|
+
hotelOfferRequest: ye("hotelOfferRequest"),
|
5420
|
+
hotelOffers: ye("hotelOffers/hotelOffers"),
|
5421
|
+
hotelOffersCurrency: ye("hotelOffers/hotelOffersCurrency"),
|
5422
|
+
isPollingHotelOffers: ye("hotelOffers/isPolling"),
|
5453
5423
|
isTopPicksSelected() {
|
5454
5424
|
var t;
|
5455
|
-
return ((t = this.filters.sort_by) == null ? void 0 : t.value) ===
|
5425
|
+
return ((t = this.filters.sort_by) == null ? void 0 : t.value) === qi.TopPicks;
|
5456
5426
|
},
|
5457
5427
|
showErrorMessage() {
|
5458
5428
|
return this.hotelOfferRequest.hasError || this.hasErrorHotelOffers;
|
@@ -5464,7 +5434,7 @@ const md = /* @__PURE__ */ mn(Mi, [["render", gd]]), $i = hn({
|
|
5464
5434
|
var t;
|
5465
5435
|
return !this.hotelOfferRequest.id || this.hotelOfferRequest.isFetching || this.isPollingHotelOffers && (!this.hotelOffers || ((t = this.hotelOffers) == null ? void 0 : t.length) === 0);
|
5466
5436
|
},
|
5467
|
-
startingAfter:
|
5437
|
+
startingAfter: ye("hotelOffers/startingAfter")
|
5468
5438
|
},
|
5469
5439
|
methods: {
|
5470
5440
|
onHotelOfferItemMouseleave() {
|
@@ -5495,23 +5465,23 @@ const md = /* @__PURE__ */ mn(Mi, [["render", gd]]), $i = hn({
|
|
5495
5465
|
}
|
5496
5466
|
},
|
5497
5467
|
mixins: [
|
5498
|
-
|
5499
|
-
|
5500
|
-
|
5468
|
+
Os,
|
5469
|
+
nr,
|
5470
|
+
vr(
|
5501
5471
|
["bookingApiClient", "config.currency", "config.lang"],
|
5502
5472
|
"retrieveHotelOffers"
|
5503
5473
|
),
|
5504
|
-
|
5505
|
-
|
5474
|
+
Ji,
|
5475
|
+
pr({
|
5506
5476
|
fallbackValue: {},
|
5507
5477
|
propsName: "features"
|
5508
5478
|
}),
|
5509
|
-
|
5479
|
+
Er()
|
5510
5480
|
],
|
5511
5481
|
name: "HotelOfferList",
|
5512
|
-
props:
|
5482
|
+
props: Rr,
|
5513
5483
|
setup() {
|
5514
|
-
const { t } =
|
5484
|
+
const { t } = mn();
|
5515
5485
|
return {
|
5516
5486
|
t
|
5517
5487
|
};
|
@@ -5520,7 +5490,7 @@ const md = /* @__PURE__ */ mn(Mi, [["render", gd]]), $i = hn({
|
|
5520
5490
|
filters: {
|
5521
5491
|
deep: !0,
|
5522
5492
|
async handler(t, e) {
|
5523
|
-
|
5493
|
+
ji(t, e) || await this.retrieveHotelOffers();
|
5524
5494
|
}
|
5525
5495
|
},
|
5526
5496
|
"hotelOfferRequest.id": {
|
@@ -5541,7 +5511,7 @@ const md = /* @__PURE__ */ mn(Mi, [["render", gd]]), $i = hn({
|
|
5541
5511
|
}
|
5542
5512
|
}
|
5543
5513
|
});
|
5544
|
-
function
|
5514
|
+
function Ss(t) {
|
5545
5515
|
const e = t;
|
5546
5516
|
e.__i18n = e.__i18n || [], e.__i18n.push({
|
5547
5517
|
locale: "",
|
@@ -5584,34 +5554,34 @@ function Rs(t) {
|
|
5584
5554
|
}
|
5585
5555
|
});
|
5586
5556
|
}
|
5587
|
-
const
|
5557
|
+
const md = {
|
5588
5558
|
key: 0,
|
5589
5559
|
class: "mx-n2"
|
5590
|
-
},
|
5560
|
+
}, pd = {
|
5591
5561
|
key: 1,
|
5592
5562
|
class: "d-flex justify-center align-center py-3"
|
5593
5563
|
};
|
5594
|
-
function
|
5564
|
+
function vd(t, e, n, s, i, r) {
|
5595
5565
|
const a = oe("BHotelSearchBar"), u = oe("BHotelOffersFilterBar"), l = oe("HotelOfferListEmpty"), c = oe("HotelRoomOfferList"), d = oe("HotelOfferItem"), h = oe("TermsAndConditions");
|
5596
|
-
return M(), Q(
|
5566
|
+
return M(), Q(Sr, {
|
5597
5567
|
ref: "hotel-offer-list-container",
|
5598
5568
|
class: "pa-0 bg-white",
|
5599
|
-
style:
|
5569
|
+
style: Qi([{ "min-height": "500px" }, {
|
5600
5570
|
height: t.parsedHeight,
|
5601
5571
|
maxHeight: t.maxHeight,
|
5602
5572
|
overflowY: "auto",
|
5603
5573
|
overflowX: "hidden"
|
5604
5574
|
}])
|
5605
5575
|
}, {
|
5606
|
-
default:
|
5607
|
-
t.parsedFeatures.HotelOfferSearchMenu ? (M(), Q(
|
5576
|
+
default: C(() => [
|
5577
|
+
t.parsedFeatures.HotelOfferSearchMenu ? (M(), Q(st, {
|
5608
5578
|
key: 0,
|
5609
|
-
class:
|
5579
|
+
class: St(["px-2 pt-4", t.$isCurrentBreakpointAboveOrEqual("md") ? "sticky" : ""]),
|
5610
5580
|
"no-gutters": ""
|
5611
5581
|
}, {
|
5612
|
-
default:
|
5582
|
+
default: C(() => [
|
5613
5583
|
b(Pe, null, {
|
5614
|
-
default:
|
5584
|
+
default: C(() => [
|
5615
5585
|
t.isBookingApiClientDefined ? (M(), Q(a, {
|
5616
5586
|
key: 0,
|
5617
5587
|
modelValue: t.hotelOfferRequestInternal,
|
@@ -5626,26 +5596,26 @@ function yd(t, e, n, s, i, r) {
|
|
5626
5596
|
]),
|
5627
5597
|
_: 1
|
5628
5598
|
}, 8, ["class"])) : Z("", !0),
|
5629
|
-
t.displayFiltersMenu && t.isBookingApiClientDefined ? (M(), Q(
|
5599
|
+
t.displayFiltersMenu && t.isBookingApiClientDefined ? (M(), Q(st, {
|
5630
5600
|
key: 1,
|
5631
|
-
class:
|
5601
|
+
class: St(t.$isCurrentBreakpointAboveOrEqual("md") ? "sticky" : ""),
|
5632
5602
|
"no-gutters": ""
|
5633
5603
|
}, {
|
5634
|
-
default:
|
5604
|
+
default: C(() => [
|
5635
5605
|
b(Pe, null, {
|
5636
|
-
default:
|
5606
|
+
default: C(() => [
|
5637
5607
|
b(u),
|
5638
|
-
t.$breakpointService.xs ? Z("", !0) : (M(), Q(
|
5608
|
+
t.$breakpointService.xs ? Z("", !0) : (M(), Q(tn, { key: 0 }))
|
5639
5609
|
]),
|
5640
5610
|
_: 1
|
5641
5611
|
})
|
5642
5612
|
]),
|
5643
5613
|
_: 1
|
5644
5614
|
}, 8, ["class"])) : Z("", !0),
|
5645
|
-
b(
|
5646
|
-
default:
|
5615
|
+
b(st, { "no-gutters": "" }, {
|
5616
|
+
default: C(() => [
|
5647
5617
|
b(Pe, null, {
|
5648
|
-
default:
|
5618
|
+
default: C(() => [
|
5649
5619
|
t.showSkeleton ? (M(), Q(l, { key: 0 })) : t.showErrorMessage ? (M(), Q(l, {
|
5650
5620
|
key: 1,
|
5651
5621
|
type: "internalError"
|
@@ -5661,18 +5631,18 @@ function yd(t, e, n, s, i, r) {
|
|
5661
5631
|
"source-market": t.hotelOfferRequest.sourceMarket,
|
5662
5632
|
type: "noResults",
|
5663
5633
|
onResetFilters: t.onResetFilters
|
5664
|
-
}, null, 8, ["address", "adult-count", "check-in-date", "check-out-date", "latitude", "longitude", "room-count", "source-market", "onResetFilters"])) : (M(),
|
5665
|
-
|
5634
|
+
}, null, 8, ["address", "adult-count", "check-in-date", "check-out-date", "latitude", "longitude", "room-count", "source-market", "onResetFilters"])) : (M(), ge(He, { key: 3 }, [
|
5635
|
+
Yi(b(dr, {
|
5666
5636
|
color: "primary",
|
5667
5637
|
indeterminate: ""
|
5668
5638
|
}, null, 512), [
|
5669
|
-
[
|
5639
|
+
[Wi, t.loadingBarEnabled && t.isPollingHotelOffers]
|
5670
5640
|
]),
|
5671
|
-
t.hotelOffers ? (M(!0),
|
5641
|
+
t.hotelOffers ? (M(!0), ge(He, { key: 0 }, As(t.hotelOffers, (y, g) => (M(), ge(He, {
|
5672
5642
|
key: y.id
|
5673
5643
|
}, [
|
5674
5644
|
b(d, {
|
5675
|
-
class:
|
5645
|
+
class: St(["pr-3", {
|
5676
5646
|
"mt-0": g === 0,
|
5677
5647
|
"mb-0": g === t.hotelOffers.length - 1
|
5678
5648
|
}]),
|
@@ -5682,10 +5652,10 @@ function yd(t, e, n, s, i, r) {
|
|
5682
5652
|
onMouseleave: t.onHotelOfferItemMouseleave,
|
5683
5653
|
onMouseover: (f) => t.onHotelOfferItemMouseover(y)
|
5684
5654
|
}, {
|
5685
|
-
default:
|
5655
|
+
default: C(() => {
|
5686
5656
|
var f;
|
5687
5657
|
return [
|
5688
|
-
(f = t.parsedFeatures.HotelOfferItem) != null && f.HotelRoomOfferList ? (M(),
|
5658
|
+
(f = t.parsedFeatures.HotelOfferItem) != null && f.HotelRoomOfferList ? (M(), ge("div", md, [
|
5689
5659
|
b(c, {
|
5690
5660
|
"adult-count": t.hotelOfferRequest.adultCount,
|
5691
5661
|
"check-in-date": t.hotelOfferRequest.checkInDate,
|
@@ -5702,9 +5672,9 @@ function yd(t, e, n, s, i, r) {
|
|
5702
5672
|
}),
|
5703
5673
|
_: 2
|
5704
5674
|
}, 1032, ["class", "features", "hotel-offer", "single-offer", "onMouseleave", "onMouseover"]),
|
5705
|
-
b(
|
5675
|
+
b(tn)
|
5706
5676
|
], 64))), 128)) : Z("", !0),
|
5707
|
-
t.startingAfter ? (M(),
|
5677
|
+
t.startingAfter ? (M(), ge("div", pd, [
|
5708
5678
|
b(ae, {
|
5709
5679
|
color: "primary",
|
5710
5680
|
variant: "flat",
|
@@ -5712,8 +5682,8 @@ function yd(t, e, n, s, i, r) {
|
|
5712
5682
|
loading: t.isPollingHotelOffers,
|
5713
5683
|
onClick: t.onSeeMoreClick
|
5714
5684
|
}, {
|
5715
|
-
default:
|
5716
|
-
je(
|
5685
|
+
default: C(() => [
|
5686
|
+
je(xe(t.t("HotelOfferList.showMore")), 1)
|
5717
5687
|
]),
|
5718
5688
|
_: 1
|
5719
5689
|
}, 8, ["disabled", "loading", "onClick"])
|
@@ -5733,12 +5703,12 @@ function yd(t, e, n, s, i, r) {
|
|
5733
5703
|
_: 1
|
5734
5704
|
}, 8, ["style"]);
|
5735
5705
|
}
|
5736
|
-
typeof
|
5737
|
-
const
|
5738
|
-
|
5706
|
+
typeof Ss == "function" && Ss(Ni);
|
5707
|
+
const xd = /* @__PURE__ */ pn(Ni, [["render", vd]]);
|
5708
|
+
Mi("css/revolugo.hotelofferlist.BkctzTMI.css");
|
5739
5709
|
export {
|
5740
|
-
|
5741
|
-
|
5742
|
-
|
5710
|
+
xd as H,
|
5711
|
+
kr as a,
|
5712
|
+
Rr as h
|
5743
5713
|
};
|
5744
|
-
//# sourceMappingURL=revolugo.hotelofferlist.
|
5714
|
+
//# sourceMappingURL=revolugo.hotelofferlist.D-sHFvFQ.min.js.map
|