@revolugo/elements 5.5.2-beta.3 → 5.5.2-beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3779 +0,0 @@
1
- import { Z as $i } from "./revolugo.booking-api-client.sLozEu8x.min.js";
2
- import { b as Wi, g as Ee, d as lt } from "./revolugo.store.CrqNkSlz.min.js";
3
- import { h as Yi, H as Xi } from "./revolugo.hotelofferrequestcreator.BDI8RIzt.min.js";
4
- import { H as Ji, B as Zi, b as eo, c as to, p as no } from "./revolugo.parsed-height.C9EDOdpc.min.js";
5
- import { H as fi } from "./revolugo.hotelofferitemlayout.Tqhfw-aC.min.js";
6
- import { R as ro, V as hi, S as We, a as io } from "./revolugo.i18n.CyGKqo0B.min.js";
7
- import { B as oo, _ as so } from "./revolugo.bphoneinput.BD5yV30G.min.js";
8
- import { l as Jn, n as Zn, _ as gn, a as ct, B as ao } from "./revolugo.webcomponentwrapper.C4B-n-nK.min.js";
9
- import { _ as uo } from "./revolugo.vform.B2Cw_jFG.min.js";
10
- import { _ as ft } from "./revolugo.vtextfield.Bz_46CYU.min.js";
11
- import { _ as cr } from "./revolugo.vmenu.DVIyMqmT.min.js";
12
- import { a as lr, _ as co } from "./revolugo.bdaterangepicker.Bn7furEJ.min.js";
13
- import { _ as er } from "./revolugo.vbtn.BnwFj80Q.min.js";
14
- import { b as di } from "./revolugo.breakpoint-service.CligvfbR.min.js";
15
- import { _ as Kn, p as lo } from "./revolugo.parsed-props.DLM9lIFH.min.js";
16
- import { H as fo } from "./revolugo.hotelroomofferlist.CahCySw9.min.js";
17
- import { w as ho } from "./revolugo.watch-list.B0bwqcfr.min.js";
18
- import { t as po } from "./revolugo.typed-mixins.D4p2Nb8x.min.js";
19
- import { T as go } from "./revolugo.termsandconditions.gfMYAJC9.min.js";
20
- import { _ as mo } from "./revolugo.index.DEJEDSDi.min.js";
21
- const yo = {
22
- FiltersBar: !0,
23
- TermsAndConditionsFooter: !0,
24
- HotelOfferItem: Ji
25
- }, vo = {
26
- ...Yi,
27
- features: {
28
- default: () => yo,
29
- type: [Object, String]
30
- },
31
- height: {
32
- default: "600px",
33
- type: [Number, String]
34
- },
35
- hotelRoomOffersLimit: {
36
- type: Number
37
- },
38
- loadingBarEnabled: {
39
- type: Boolean,
40
- default: !0
41
- },
42
- limit: {
43
- type: Number,
44
- default: ro
45
- },
46
- maxHeight: {
47
- default: "90vh",
48
- type: [Number, String]
49
- },
50
- rounded: {
51
- type: Boolean,
52
- default: !0
53
- }
54
- };
55
- function fr(n, e) {
56
- var t = Object.keys(n);
57
- if (Object.getOwnPropertySymbols) {
58
- var r = Object.getOwnPropertySymbols(n);
59
- e && (r = r.filter(function(o) {
60
- return Object.getOwnPropertyDescriptor(n, o).enumerable;
61
- })), t.push.apply(t, r);
62
- }
63
- return t;
64
- }
65
- function E(n) {
66
- for (var e = 1; e < arguments.length; e++) {
67
- var t = arguments[e] != null ? arguments[e] : {};
68
- e % 2 ? fr(Object(t), !0).forEach(function(r) {
69
- i(n, r, t[r]);
70
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : fr(Object(t)).forEach(function(r) {
71
- Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
72
- });
73
- }
74
- return n;
75
- }
76
- function pi(n) {
77
- var e = function(t, r) {
78
- if (typeof t != "object" || !t)
79
- return t;
80
- var o = t[Symbol.toPrimitive];
81
- if (o !== void 0) {
82
- var s = o.call(t, r || "default");
83
- if (typeof s != "object")
84
- return s;
85
- throw new TypeError("@@toPrimitive must return a primitive value.");
86
- }
87
- return (r === "string" ? String : Number)(t);
88
- }(n, "string");
89
- return typeof e == "symbol" ? e : String(e);
90
- }
91
- function L(n) {
92
- return L = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
93
- return typeof e;
94
- } : function(e) {
95
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
96
- }, L(n);
97
- }
98
- function B(n, e) {
99
- if (!(n instanceof e))
100
- throw new TypeError("Cannot call a class as a function");
101
- }
102
- function hr(n, e) {
103
- for (var t = 0; t < e.length; t++) {
104
- var r = e[t];
105
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, pi(r.key), r);
106
- }
107
- }
108
- function N(n, e, t) {
109
- return e && hr(n.prototype, e), t && hr(n, t), Object.defineProperty(n, "prototype", { writable: !1 }), n;
110
- }
111
- function i(n, e, t) {
112
- return (e = pi(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
113
- }
114
- function $e() {
115
- return $e = Object.assign ? Object.assign.bind() : function(n) {
116
- for (var e = 1; e < arguments.length; e++) {
117
- var t = arguments[e];
118
- for (var r in t)
119
- Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]);
120
- }
121
- return n;
122
- }, $e.apply(this, arguments);
123
- }
124
- function bo(n, e) {
125
- return function(t) {
126
- if (Array.isArray(t))
127
- return t;
128
- }(n) || function(t, r) {
129
- var o = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
130
- if (o != null) {
131
- var s, u, a, c, l = [], h = !0, f = !1;
132
- try {
133
- if (a = (o = o.call(t)).next, r === 0) {
134
- if (Object(o) !== o)
135
- return;
136
- h = !1;
137
- } else
138
- for (; !(h = (s = a.call(o)).done) && (l.push(s.value), l.length !== r); h = !0)
139
- ;
140
- } catch (m) {
141
- f = !0, u = m;
142
- } finally {
143
- try {
144
- if (!h && o.return != null && (c = o.return(), Object(c) !== c))
145
- return;
146
- } finally {
147
- if (f)
148
- throw u;
149
- }
150
- }
151
- return l;
152
- }
153
- }(n, e) || tr(n, e) || function() {
154
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
155
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
156
- }();
157
- }
158
- function Me(n) {
159
- return function(e) {
160
- if (Array.isArray(e))
161
- return Qn(e);
162
- }(n) || function(e) {
163
- if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
164
- return Array.from(e);
165
- }(n) || tr(n) || function() {
166
- throw new TypeError(`Invalid attempt to spread non-iterable instance.
167
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
168
- }();
169
- }
170
- function tr(n, e) {
171
- if (n) {
172
- if (typeof n == "string")
173
- return Qn(n, e);
174
- var t = Object.prototype.toString.call(n).slice(8, -1);
175
- return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Qn(n, e) : void 0;
176
- }
177
- }
178
- function Qn(n, e) {
179
- (e == null || e > n.length) && (e = n.length);
180
- for (var t = 0, r = new Array(e); t < e; t++)
181
- r[t] = n[t];
182
- return r;
183
- }
184
- function bn(n, e) {
185
- var t = typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
186
- if (!t) {
187
- if (Array.isArray(n) || (t = tr(n)) || e && n && typeof n.length == "number") {
188
- t && (n = t);
189
- var r = 0, o = function() {
190
- };
191
- return { s: o, n: function() {
192
- return r >= n.length ? { done: !0 } : { done: !1, value: n[r++] };
193
- }, e: function(c) {
194
- throw c;
195
- }, f: o };
196
- }
197
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
198
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
199
- }
200
- var s, u = !0, a = !1;
201
- return { s: function() {
202
- t = t.call(n);
203
- }, n: function() {
204
- var c = t.next();
205
- return u = c.done, c;
206
- }, e: function(c) {
207
- a = !0, s = c;
208
- }, f: function() {
209
- try {
210
- u || t.return == null || t.return();
211
- } finally {
212
- if (a)
213
- throw s;
214
- }
215
- } };
216
- }
217
- var kn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
218
- function ve(n) {
219
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
220
- }
221
- function ko(n) {
222
- return n && Object.prototype.hasOwnProperty.call(n, "default") && Object.keys(n).length === 1 ? n.default : n;
223
- }
224
- var gi = { exports: {} };
225
- (function(n) {
226
- function e(t) {
227
- if (t)
228
- return function(r) {
229
- return $e(r, e.prototype), r._callbacks = /* @__PURE__ */ new Map(), r;
230
- }(t);
231
- this._callbacks = /* @__PURE__ */ new Map();
232
- }
233
- e.prototype.on = function(t, r) {
234
- var o, s = (o = this._callbacks.get(t)) !== null && o !== void 0 ? o : [];
235
- return s.push(r), this._callbacks.set(t, s), this;
236
- }, e.prototype.once = function(t, r) {
237
- var o = this, s = function u() {
238
- o.off(t, u);
239
- for (var a = arguments.length, c = new Array(a), l = 0; l < a; l++)
240
- c[l] = arguments[l];
241
- r.apply(o, c);
242
- };
243
- return s.fn = r, this.on(t, s), this;
244
- }, e.prototype.off = function(t, r) {
245
- if (t === void 0 && r === void 0)
246
- return this._callbacks.clear(), this;
247
- if (r === void 0)
248
- return this._callbacks.delete(t), this;
249
- var o = this._callbacks.get(t);
250
- if (o) {
251
- var s, u = bn(o.entries());
252
- try {
253
- for (u.s(); !(s = u.n()).done; ) {
254
- var a = bo(s.value, 2), c = a[0], l = a[1];
255
- if (l === r || l.fn === r) {
256
- o.splice(c, 1);
257
- break;
258
- }
259
- }
260
- } catch (h) {
261
- u.e(h);
262
- } finally {
263
- u.f();
264
- }
265
- o.length === 0 ? this._callbacks.delete(t) : this._callbacks.set(t, o);
266
- }
267
- return this;
268
- }, e.prototype.emit = function(t) {
269
- var r = this._callbacks.get(t);
270
- if (r) {
271
- for (var o = Me(r), s = arguments.length, u = new Array(s > 1 ? s - 1 : 0), a = 1; a < s; a++)
272
- u[a - 1] = arguments[a];
273
- var c, l = bn(o);
274
- try {
275
- for (l.s(); !(c = l.n()).done; )
276
- c.value.apply(this, u);
277
- } catch (h) {
278
- l.e(h);
279
- } finally {
280
- l.f();
281
- }
282
- }
283
- return this;
284
- }, e.prototype.listeners = function(t) {
285
- var r;
286
- return (r = this._callbacks.get(t)) !== null && r !== void 0 ? r : [];
287
- }, e.prototype.listenerCount = function(t) {
288
- if (t)
289
- return this.listeners(t).length;
290
- var r, o = 0, s = bn(this._callbacks.values());
291
- try {
292
- for (s.s(); !(r = s.n()).done; )
293
- o += r.value.length;
294
- } catch (u) {
295
- s.e(u);
296
- } finally {
297
- s.f();
298
- }
299
- return o;
300
- }, e.prototype.hasListeners = function(t) {
301
- return this.listenerCount(t) > 0;
302
- }, e.prototype.addEventListener = e.prototype.on, e.prototype.removeListener = e.prototype.off, e.prototype.removeEventListener = e.prototype.off, e.prototype.removeAllListeners = e.prototype.off, n.exports = e;
303
- })(gi);
304
- var Io = ve(gi.exports);
305
- function F(n) {
306
- return n != null && L(n) === "object" && n["@@functional/placeholder"] === !0;
307
- }
308
- function me(n) {
309
- return function e(t) {
310
- return arguments.length === 0 || F(t) ? e : n.apply(this, arguments);
311
- };
312
- }
313
- function Ye(n) {
314
- return function e(t, r) {
315
- switch (arguments.length) {
316
- case 0:
317
- return e;
318
- case 1:
319
- return F(t) ? e : me(function(o) {
320
- return n(t, o);
321
- });
322
- default:
323
- return F(t) && F(r) ? e : F(t) ? me(function(o) {
324
- return n(o, r);
325
- }) : F(r) ? me(function(o) {
326
- return n(t, o);
327
- }) : n(t, r);
328
- }
329
- };
330
- }
331
- function nr(n) {
332
- return function e(t, r, o) {
333
- switch (arguments.length) {
334
- case 0:
335
- return e;
336
- case 1:
337
- return F(t) ? e : Ye(function(s, u) {
338
- return n(t, s, u);
339
- });
340
- case 2:
341
- return F(t) && F(r) ? e : F(t) ? Ye(function(s, u) {
342
- return n(s, r, u);
343
- }) : F(r) ? Ye(function(s, u) {
344
- return n(t, s, u);
345
- }) : me(function(s) {
346
- return n(t, r, s);
347
- });
348
- default:
349
- return F(t) && F(r) && F(o) ? e : F(t) && F(r) ? Ye(function(s, u) {
350
- return n(s, u, o);
351
- }) : F(t) && F(o) ? Ye(function(s, u) {
352
- return n(s, r, u);
353
- }) : F(r) && F(o) ? Ye(function(s, u) {
354
- return n(t, s, u);
355
- }) : F(t) ? me(function(s) {
356
- return n(s, r, o);
357
- }) : F(r) ? me(function(s) {
358
- return n(t, s, o);
359
- }) : F(o) ? me(function(s) {
360
- return n(t, r, s);
361
- }) : n(t, r, o);
362
- }
363
- };
364
- }
365
- function wt(n, e) {
366
- return Object.prototype.hasOwnProperty.call(e, n);
367
- }
368
- var Ao = me(function(n) {
369
- return n === null ? "Null" : n === void 0 ? "Undefined" : Object.prototype.toString.call(n).slice(8, -1);
370
- });
371
- function dr(n) {
372
- return Object.prototype.toString.call(n) === "[object Object]";
373
- }
374
- function mi(n, e, t) {
375
- if (t || (t = new Eo()), function(s) {
376
- var u = L(s);
377
- return s == null || u != "object" && u != "function";
378
- }(n))
379
- return n;
380
- var r, o = function(s) {
381
- var u = t.get(n);
382
- if (u)
383
- return u;
384
- for (var a in t.set(n, s), n)
385
- Object.prototype.hasOwnProperty.call(n, a) && (s[a] = e ? mi(n[a], !0, t) : n[a]);
386
- return s;
387
- };
388
- switch (Ao(n)) {
389
- case "Object":
390
- return o(Object.create(Object.getPrototypeOf(n)));
391
- case "Array":
392
- return o([]);
393
- case "Date":
394
- return new Date(n.valueOf());
395
- case "RegExp":
396
- return r = n, new RegExp(r.source, r.flags ? r.flags : (r.global ? "g" : "") + (r.ignoreCase ? "i" : "") + (r.multiline ? "m" : "") + (r.sticky ? "y" : "") + (r.unicode ? "u" : "") + (r.dotAll ? "s" : ""));
397
- case "Int8Array":
398
- case "Uint8Array":
399
- case "Uint8ClampedArray":
400
- case "Int16Array":
401
- case "Uint16Array":
402
- case "Int32Array":
403
- case "Uint32Array":
404
- case "Float32Array":
405
- case "Float64Array":
406
- case "BigInt64Array":
407
- case "BigUint64Array":
408
- return n.slice();
409
- default:
410
- return n;
411
- }
412
- }
413
- var Eo = function() {
414
- function n() {
415
- this.map = {}, this.length = 0;
416
- }
417
- return n.prototype.set = function(e, t) {
418
- var r = this.hash(e), o = this.map[r];
419
- o || (this.map[r] = o = []), o.push([e, t]), this.length += 1;
420
- }, n.prototype.hash = function(e) {
421
- var t = [];
422
- for (var r in e)
423
- t.push(Object.prototype.toString.call(e[r]));
424
- return t.join();
425
- }, n.prototype.get = function(e) {
426
- if (this.length <= 180)
427
- for (var t in this.map)
428
- for (var r = this.map[t], o = 0; o < r.length; o += 1) {
429
- var s = r[o];
430
- if (s[0] === e)
431
- return s[1];
432
- }
433
- else {
434
- var u = this.hash(e), a = this.map[u];
435
- if (a)
436
- for (var c = 0; c < a.length; c += 1) {
437
- var l = a[c];
438
- if (l[0] === e)
439
- return l[1];
440
- }
441
- }
442
- }, n;
443
- }(), j = me(function(n) {
444
- return n != null && typeof n.clone == "function" ? n.clone() : mi(n, !0);
445
- }), Co = nr(function(n, e, t) {
446
- var r, o = {};
447
- for (r in t = t || {}, e = e || {})
448
- wt(r, e) && (o[r] = wt(r, t) ? n(r, e[r], t[r]) : e[r]);
449
- for (r in t)
450
- wt(r, t) && !wt(r, o) && (o[r] = t[r]);
451
- return o;
452
- }), Oo = nr(function n(e, t, r) {
453
- return Co(function(o, s, u) {
454
- return dr(s) && dr(u) ? n(e, s, u) : e(o, s, u);
455
- }, t, r);
456
- }), _o = nr(function(n, e, t) {
457
- return Oo(function(r, o, s) {
458
- return n(o, s);
459
- }, e, t);
460
- }), Qe = { HS: "HubSpot", GA: "GA", HOTJAR: "Hotjar", GOOGLEADS: "GoogleAds", VWO: "VWO", GTM: "GoogleTagManager", BRAZE: "Braze", INTERCOM: "INTERCOM", KEEN: "Keen", KISSMETRICS: "Kissmetrics", CUSTOMERIO: "CustomerIO", CHARTBEAT: "Chartbeat", COMSCORE: "Comscore", FACEBOOK_PIXEL: "FacebookPixel", LOTAME: "Lotame", OPTIMIZELY: "Optimizely", BUGSNAG: "Bugsnag", FULLSTORY: "Fullstory", TVSQUARED: "TVSquared", GA4: "GA4", MOENGAGE: "MoEngage", AM: "Amplitude", PENDO: "Pendo", LYTICS: "Lytics", APPCUES: "Appcues", POSTHOG: "Posthog", KLAVIYO: "Klaviyo", CLEVERTAP: "Clevertap", BINGADS: "BingAds", PINTEREST_TAG: "PinterestTag", ADOBE_ANALYTICS: "AdobeAnalytics", LINKEDIN_INSIGHT_TAG: "LinkedInInsightTag", REDDIT_PIXEL: "RedditPixel", DRIP: "Drip", HEAP: "Heap", CRITEO: "Criteo", MP: "Mixpanel", QUALTRICS: "Qualtrics", PROFITWELL: "ProfitWell", SENTRY: "Sentry", QUANTUMMETRIC: "QuantumMetric", SNAP_PIXEL: "SnapPixel", POST_AFFILIATE_PRO: "PostAffiliatePro", GOOGLE_OPTIMIZE: "GoogleOptimize", LAUNCHDARKLY: "LaunchDarkly", GA360: "GA360", ADROLL: "Adroll", DCM_FLOODLIGHT: "DCMFloodlight", MATOMO: "Matomo", VERO: "Vero", MOUSEFLOW: "Mouseflow", ROCKERBOX: "Rockerbox", CONVERTFLOW: "ConvertFlow", SNAPENGAGE: "SnapEngage", LIVECHAT: "LiveChat", SHYNET: "Shynet", WOOPRA: "Woopra", ROLLBAR: "RollBar", QUORA_PIXEL: "QuoraPixel", JUNE: "June", ENGAGE: "Engage", ITERABLE: "Iterable", YANDEX_METRICA: "YandexMetrica", REFINER: "Refiner", QUALAROO: "Qualaroo", PODSIGHTS: "Podsights", AXEPTIO: "Axeptio", SATISMETER: "Satismeter", MICROSOFT_CLARITY: "MicrosoftClarity", SENDINBLUE: "Sendinblue", OLARK: "Olark", LEMNISK: "Lemnisk", TIKTOK_ADS: "TiktokAds", ACTIVE_CAMPAIGN: "ActiveCampaign", SPRIG: "Sprig", SPOTIFYPIXEL: "SpotifyPixel", COMMANDBAR: "CommandBar", NINETAILED: "Ninetailed" }, X = "ADOBE_ANALYTICS";
461
- i({}, "Adobe Analytics", "AdobeAnalytics");
462
- var So = i(i(i(i(i(i({ "Adobe Analytics": X, ADOBEANALYTICS: X, "ADOBE ANALYTICS": X }, X, X), "AdobeAnalytics", X), "adobeanalytics", X), "adobe analytics", X), "Adobe analytics", X), "adobe Analytics", X), ht = "AM";
463
- i({}, "Amplitude", "Amplitude");
464
- var wo = i(i(i(i({}, ht, ht), "AMPLITUDE", ht), "Amplitude", ht), "am", ht), dt = "APPCUES";
465
- i({}, "Appcues", "Appcues");
466
- var To = i(i(i(i({}, dt, dt), "Appcues", dt), "App Cues", dt), "appcues", dt), Ce = "BINGADS";
467
- i({}, "Bing Ads", "BingAds");
468
- var Ro = i(i(i(i(i(i(i({}, Ce, Ce), "BingAds", Ce), "bingads", Ce), "Bing Ads", Ce), "Bing ads", Ce), "bing Ads", Ce), "bing ads", Ce), Tt = "BRAZE";
469
- i({}, "Braze", "Braze");
470
- var Po = i(i(i({}, Tt, Tt), "Braze", Tt), "braze", Tt), Rt = "BUGSNAG";
471
- i({}, "Bugsnag", "Bugsnag");
472
- var Do = i(i(i({}, Rt, Rt), "bugsnag", Rt), "Bugsnag", Rt), Xe = "CHARTBEAT";
473
- i({}, "Chartbeat", "Chartbeat");
474
- var xo = i(i(i(i(i({}, Xe, Xe), "Chartbeat", Xe), "chartbeat", Xe), "Chart Beat", Xe), "chart beat", Xe), Pt = "CLEVERTAP";
475
- i({}, "CleverTap", "Clevertap");
476
- var Lo = i(i(i({}, Pt, Pt), "Clevertap", Pt), "clevertap", Pt), Ne = "COMSCORE";
477
- i({}, "Comscore", "Comscore");
478
- var Mo = i(i(i(i(i(i({}, Ne, Ne), "Comscore", Ne), "Com Score", Ne), "com Score", Ne), "com score", Ne), "Com score", Ne), Dt = "CRITEO";
479
- i({}, "Criteo", "Criteo");
480
- var Fo = i(i(i({}, Dt, Dt), "Criteo", Dt), "criteo", Dt), Je = "CUSTOMERIO";
481
- i({}, "Customer IO", "CustomerIO");
482
- var Bo = i(i(i(i(i({}, Je, Je), "Customerio", Je), "Customer.io", Je), "CUSTOMER.IO", Je), "customer.io", Je), xt = "DRIP";
483
- i({}, "Drip", "Drip");
484
- var No = i(i(i({}, xt, xt), "Drip", xt), "drip", xt), Oe = "FACEBOOK_PIXEL";
485
- i({}, "Facebook Pixel", "FacebookPixel");
486
- var Go = i(i(i(i(i(i(i({}, Oe, Oe), "FB Pixel", Oe), "Facebook Pixel", Oe), "facebook pixel", Oe), "fbpixel", Oe), "FBPIXEL", Oe), "FB_PIXEL", Oe), oe = "FULLSTORY";
487
- i({}, "Fullstory", "Fullstory");
488
- var jo = i(i(i(i(i(i(i(i({}, oe, oe), "Fullstory", oe), "FullStory", oe), "full Story", oe), "Full Story", oe), "Full story", oe), "full story", oe), "fullstory", oe), Ze = "GA";
489
- i({}, "Google Analytics", "GA");
490
- var Uo = i(i(i(i(i({}, Ze, Ze), "Google Analytics", Ze), "GoogleAnalytics", Ze), "GOOGLE ANALYTICS", Ze), "google analytics", Ze), $ = "GA4";
491
- i({}, "Google Analytics 4 (GA4)", "GA4");
492
- var Ho = i(i(i(i(i(i(i(i(i(i({}, $, $), "Google Analytics 4", $), "Google analytics 4", $), "google analytics 4", $), "Google Analytics4", $), "Google analytics4", $), "google analytics4", $), "Google Analytics 4 (GA4)", $), "google analytics 4 (ga4)", $), "GoogleAnalytics4", $), Ge = "GOOGLEADS";
493
- i({}, "Google Ads", "GoogleAds");
494
- var qo = i(i(i(i(i(i({}, Ge, Ge), "Google Ads", Ge), "GoogleAds", Ge), "GOOGLE ADS", Ge), "google ads", Ge), "googleads", Ge), se = "GOOGLE_OPTIMIZE";
495
- i({}, "Google Optimize", "GoogleOptimize");
496
- var Ko = i(i(i(i(i(i(i(i({}, se, se), "Google Optimize", se), "GoogleOptimize", se), "Googleoptimize", se), "GOOGLEOPTIMIZE", se), "google optimize", se), "Google optimize", se), "GOOGLE OPTIMIZE", se), et = "GTM";
497
- i({}, "Google Tag Manager", "GoogleTagManager");
498
- var Qo = i(i(i(i(i({}, et, et), "Google Tag Manager", et), "google tag manager", et), "googletag manager", et), "googletagmanager", et), pt = "HEAP";
499
- i({}, "Heap.io", "Heap");
500
- var zo = i(i(i(i({}, pt, pt), "Heap", pt), "heap", pt), "Heap.io", pt), tt = "HOTJAR";
501
- i({}, "Hotjar", "Hotjar");
502
- var Vo = i(i(i(i(i({}, tt, tt), "Hotjar", tt), "hotjar", tt), "Hot Jar", tt), "hot jar", tt), je = "HS";
503
- i({}, "HubSpot", "HubSpot");
504
- var $o = i(i(i(i(i(i({}, je, je), "Hubspot", je), "HUBSPOT", je), "hub spot", je), "Hub Spot", je), "Hub spot", je), Lt = "INTERCOM";
505
- i({}, "Intercom", "INTERCOM");
506
- var Wo = i(i(i({}, Lt, Lt), "Intercom", Lt), "intercom", Lt), nt = "KEEN";
507
- i({}, "Keen", "Keen");
508
- var Yo = i(i(i(i(i({}, nt, nt), "Keen", nt), "Keen.io", nt), "keen", nt), "keen.io", nt), Mt = "KISSMETRICS";
509
- i({}, "Kiss Metrics", "Kissmetrics");
510
- var Xo = i(i(i({}, Mt, Mt), "Kissmetrics", Mt), "kissmetrics", Mt), Ft = "KLAVIYO";
511
- i({}, "Klaviyo", "Klaviyo");
512
- var Jo = i(i(i({}, Ft, Ft), "Klaviyo", Ft), "klaviyo", Ft), Ue = "LAUNCHDARKLY";
513
- i({}, "LaunchDarkly", "LaunchDarkly");
514
- var pr, Zo = i(i(i(i(i(i({}, Ue, Ue), "LaunchDarkly", Ue), "Launch_Darkly", Ue), "Launch Darkly", Ue), "launchDarkly", Ue), "launch darkly", Ue), z = "LINKEDIN_INSIGHT_TAG";
515
- i({}, "Linkedin Insight Tag", "LinkedInInsightTag");
516
- var es = (i(i(i(i(i(i(i(i(i(i(pr = {}, z, z), "LinkedIn Insight Tag", z), "LinkedIn insight tag", z), "linkedIn insight tag", z), "Linkedin_insight_tag", z), "LinkedinInsighttag", z), "LinkedinInsightTag", z), "LinkedInInsightTag", z), "Linkedininsighttag", z), "LINKEDININSIGHTTAG", z), i(pr, "linkedininsighttag", z)), Bt = "LOTAME";
517
- i({}, "Lotame", "Lotame");
518
- var ts = i(i(i({}, Bt, Bt), "Lotame", Bt), "lotame", Bt), Nt = "LYTICS";
519
- i({}, "Lytics", "Lytics");
520
- var ns = i(i(i({}, Nt, Nt), "Lytics", Nt), "lytics", Nt), He = "MP";
521
- i({}, "Mixpanel", "Mixpanel");
522
- var rs = i(i(i(i(i(i({}, He, He), "MIXPANEL", He), "Mixpanel", He), "MIX PANEL", He), "Mix panel", He), "Mix Panel", He), _e = "MOENGAGE";
523
- i({}, "MoEngage", "MoEngage");
524
- var is = i(i(i(i(i(i(i({}, _e, _e), "MoEngage", _e), "moengage", _e), "Moengage", _e), "Mo Engage", _e), "mo engage", _e), "Mo engage", _e), Gt = "OPTIMIZELY";
525
- i({}, "Optimizely Web", "Optimizely");
526
- var os = i(i(i({}, Gt, Gt), "Optimizely", Gt), "optimizely", Gt), jt = "PENDO";
527
- i({}, "Pendo", "Pendo");
528
- var gr, ss = i(i(i({}, jt, jt), "Pendo", jt), "pendo", jt), U = "PINTEREST_TAG";
529
- i({}, "Pinterest Tag", "PinterestTag");
530
- var as = (i(i(i(i(i(i(i(i(i(i(gr = {}, U, U), "PinterestTag", U), "Pinterest_Tag", U), "PINTERESTTAG", U), "pinterest", U), "PinterestAds", U), "Pinterest_Ads", U), "Pinterest", U), "Pinterest Tag", U), "Pinterest tag", U), i(i(i(i(gr, "PINTEREST TAG", U), "pinterest tag", U), "Pinterest Ads", U), "Pinterest ads", U)), ae = "POST_AFFILIATE_PRO";
531
- i({}, "Post Affiliate Pro", "PostAffiliatePro");
532
- var us = i(i(i(i(i(i(i(i({}, ae, ae), "PostAffiliatePro", ae), "Post_affiliate_pro", ae), "Post Affiliate Pro", ae), "Post affiliate pro", ae), "post affiliate pro", ae), "postaffiliatepro", ae), "POSTAFFILIATEPRO", ae), Se = "POSTHOG";
533
- i({}, "PostHog", "Posthog");
534
- var cs = i(i(i(i(i(i(i({}, Se, Se), "PostHog", Se), "Posthog", Se), "posthog", Se), "Post Hog", Se), "Post hog", Se), "post hog", Se), we = "PROFITWELL";
535
- i({}, "ProfitWell", "ProfitWell");
536
- var ls = i(i(i(i(i(i(i({}, we, we), "ProfitWell", we), "profitwell", we), "Profitwell", we), "Profit Well", we), "profit well", we), "Profit well", we), Ut = "QUALTRICS";
537
- i({}, "Qualtrics", "Qualtrics");
538
- var fs = i(i(i({}, Ut, Ut), "Qualtrics", Ut), "qualtrics", Ut), ue = "QUANTUMMETRIC";
539
- i({}, "Quantum Metric", "QuantumMetric");
540
- var hs = i(i(i(i(i(i(i(i({}, ue, ue), "Quantum Metric", ue), "quantum Metric", ue), "quantum metric", ue), "QuantumMetric", ue), "quantumMetric", ue), "quantummetric", ue), "Quantum_Metric", ue), ce = "REDDIT_PIXEL";
541
- i({}, "Reddit Pixel", "RedditPixel");
542
- var ds = i(i(i(i(i(i(i(i({}, ce, ce), "Reddit_Pixel", ce), "RedditPixel", ce), "REDDITPIXEL", ce), "redditpixel", ce), "Reddit Pixel", ce), "REDDIT PIXEL", ce), "reddit pixel", ce), Ht = "SENTRY";
543
- i({}, "Sentry", "Sentry");
544
- var ps = i(i(i({}, Ht, Ht), "sentry", Ht), "Sentry", Ht), le = "SNAP_PIXEL";
545
- i({}, "Snap Pixel", "SnapPixel");
546
- var gs = i(i(i(i(i(i(i(i({}, le, le), "Snap_Pixel", le), "SnapPixel", le), "SNAPPIXEL", le), "snappixel", le), "Snap Pixel", le), "SNAP PIXEL", le), "snap pixel", le), J = "TVSQUARED";
547
- i({}, "TVSquared", "TVSquared");
548
- var ms = i(i(i(i(i(i(i(i(i({}, J, J), "TVSquared", J), "tvsquared", J), "tvSquared", J), "TvSquared", J), "Tvsquared", J), "TV Squared", J), "tv squared", J), "tv Squared", J), fe = "VWO";
549
- i({}, "VWO", "VWO");
550
- var ys = i(i(i(i(i(i(i(i({}, fe, fe), "VisualWebsiteOptimizer", fe), "Visualwebsiteoptimizer", fe), "visualwebsiteoptimizer", fe), "vwo", fe), "Visual Website Optimizer", fe), "Visual website optimizer", fe), "visual website optimizer", fe), Z = "GA360";
551
- i({}, "Google Analytics 360", "GA360");
552
- var vs = i(i(i(i(i(i(i(i(i({}, Z, Z), "Google Analytics 360", Z), "Google analytics 360", Z), "google analytics 360", Z), "Google Analytics360", Z), "Google analytics360", Z), "google analytics360", Z), "GoogleAnalytics360", Z), "GA 360", Z), rt = "ADROLL";
553
- i({}, "Adroll", "Adroll");
554
- var bs = i(i(i(i(i({}, rt, rt), "Adroll", rt), "Ad roll", rt), "ad roll", rt), "adroll", rt), ee = "DCM_FLOODLIGHT";
555
- i({}, "DCM Floodlight", "DCMFloodlight");
556
- var ks = i(i(i(i(i(i(i(i(i({}, ee, ee), "DCM Floodlight", ee), "dcm floodlight", ee), "Dcm Floodlight", ee), "DCMFloodlight", ee), "dcmfloodlight", ee), "DcmFloodlight", ee), "dcm_floodlight", ee), "DCM_Floodlight", ee), qt = "MATOMO";
557
- i({}, "Matomo", "Matomo");
558
- var Is = i(i(i({}, qt, qt), "Matomo", qt), "matomo", qt), Kt = "VERO";
559
- i({}, "Vero", "Vero");
560
- var As = i(i(i({}, Kt, Kt), "Vero", Kt), "vero", Kt), te = "MOUSEFLOW";
561
- i({}, "Mouseflow", "Mouseflow");
562
- var Es = i(i(i(i(i(i(i(i(i({}, te, te), "Mouseflow", te), "mouseflow", te), "mouseFlow", te), "MouseFlow", te), "Mouse flow", te), "mouse flow", te), "mouse Flow", te), "Mouse Flow", te), Te = "ROCKERBOX";
563
- i({}, "Rockerbox", "Rockerbox");
564
- var Cs = i(i(i(i(i(i(i({}, Te, Te), "Rockerbox", Te), "rockerbox", Te), "RockerBox", Te), "Rocker box", Te), "rocker box", Te), "Rocker Box", Te), W = "CONVERTFLOW";
565
- i({}, "ConvertFlow", "ConvertFlow");
566
- var Os = i(i(i(i(i(i(i(i(i(i({}, W, W), "Convertflow", W), "convertflow", W), "convertFlow", W), "ConvertFlow", W), "Convert flow", W), "convert flow", W), "convert Flow", W), "Convert Flow", W), "CONVERT FLOW", W), Re = "SNAPENGAGE";
567
- i({}, "SnapEngage", "SnapEngage");
568
- var _s = i(i(i(i(i(i(i({}, Re, Re), "SnapEngage", Re), "Snap_Engage", Re), "snapengage", Re), "SNAP ENGAGE", Re), "Snap Engage", Re), "snap engage", Re), Pe = "LIVECHAT";
569
- i({}, "LiveChat", "LiveChat");
570
- var Ss = i(i(i(i(i(i(i({}, Pe, Pe), "LiveChat", Pe), "Live_Chat", Pe), "livechat", Pe), "LIVE CHAT", Pe), "Live Chat", Pe), "live chat", Pe), ne = "SHYNET";
571
- i({}, "Shynet", "Shynet");
572
- var ws = i(i(i(i(i(i(i(i(i({}, ne, ne), "shynet", ne), "ShyNet", ne), "shyNet", ne), "Shynet", ne), "shy net", ne), "Shy Net", ne), "shy Net", ne), "Shy net", ne), Qt = "WOOPRA";
573
- i({}, "Woopra", "Woopra");
574
- var Ts = i(i(i({}, Qt, Qt), "Woopra", Qt), "woopra", Qt), he = "ROLLBAR";
575
- i({}, "RollBar", "RollBar");
576
- var Rs = i(i(i(i(i(i(i(i({}, he, he), "RollBar", he), "Roll_Bar", he), "rollbar", he), "Rollbar", he), "ROLL BAR", he), "Roll Bar", he), "roll bar", he), Y = "QUORA_PIXEL";
577
- i({}, "Quora Pixel", "QuoraPixel");
578
- var Ps = i(i(i(i(i(i(i(i(i(i({}, Y, Y), "Quora Pixel", Y), "Quora pixel", Y), "QUORA PIXEL", Y), "QuoraPixel", Y), "Quorapixel", Y), "QUORAPIXEL", Y), "Quora_Pixel", Y), "quora_pixel", Y), "Quora", Y), zt = "JUNE";
579
- i({}, "June", "June");
580
- var Ds = i(i(i({}, zt, zt), "June", zt), "june", zt), Vt = "ENGAGE";
581
- i({}, "Engage", "Engage");
582
- var xs = i(i(i({}, Vt, Vt), "Engage", Vt), "engage", Vt), $t = "ITERABLE";
583
- i({}, "Iterable", "Iterable");
584
- var Ls = i(i(i({}, $t, $t), "Iterable", $t), "iterable", $t), it = "YANDEX_METRICA";
585
- i({}, "Yandex.Metrica", "YandexMetrica");
586
- var Ms = i(i(i(i(i({}, it, it), "Yandexmetrica", it), "yandexmetrica", it), "yandexMetrica", it), "YandexMetrica", it), Wt = "REFINER";
587
- i({}, "Refiner", "Refiner");
588
- var Fs = i(i(i({}, Wt, Wt), "Refiner", Wt), "refiner", Wt), Yt = "QUALAROO";
589
- i({}, "Qualaroo", "Qualaroo");
590
- var Bs = i(i(i({}, Yt, Yt), "Qualaroo", Yt), "qualaroo", Yt), de = "PODSIGHTS";
591
- i({}, "Podsights", "Podsights");
592
- var Ns = i(i(i(i(i(i(i(i({}, de, de), "Podsights", de), "PodSights", de), "pod Sights", de), "Pod Sights", de), "pod sights", de), "POD SIGHTS", de), "Pod sights", de), Xt = "AXEPTIO";
593
- i({}, "Axeptio", "Axeptio");
594
- var Gs = i(i(i({}, Xt, Xt), "Axeptio", Xt), "axeptio", Xt), Jt = "SATISMETER";
595
- i({}, "Satismeter", "Satismeter");
596
- var js = i(i(i({}, Jt, Jt), "Satismeter", Jt), "SatisMeter", Jt), re = "MICROSOFT_CLARITY";
597
- i({}, "Microsoft Clarity", "MicrosoftClarity");
598
- var Us = i(i(i(i(i(i(i(i(i({}, re, re), "Microsoft Clarity", re), "Microsoft clarity", re), "microsoft clarity", re), "Microsoft_clarity", re), "MicrosoftClarity", re), "MICROSOFTCLARITY", re), "microsoftclarity", re), "microsoftClarity", re), gt = "SENDINBLUE";
599
- i({}, "Sendinblue", "Sendinblue");
600
- var Hs = i(i(i(i({}, gt, gt), "Sendinblue", gt), "sendinblue", gt), "SendinBlue", gt), Zt = "OLARK";
601
- i({}, "Olark", "Olark");
602
- var qs = i(i(i({}, Zt, Zt), "Olark", Zt), "olark", Zt), pe = "LEMNISK";
603
- i({}, "Lemnisk", "Lemnisk");
604
- var Ks = i(i(i(i(i(i(i(i({}, pe, pe), "LEMNISK_MARKETING_AUTOMATION", pe), "Lemnisk Marketing Automation", pe), "LemniskMarketingAutomation", pe), "lemniskmarketingautomation", pe), "lemniskMarketingAutomation", pe), "lemnisk", pe), "Lemnisk", pe), De = "TIKTOK_ADS";
605
- i({}, "TikTok Ads", "TiktokAds");
606
- var Qs = i(i(i(i(i(i(i({}, De, De), "TiktokAds", De), "Tiktok ads", De), "Tiktok Ads", De), "Tik Tok Ads", De), "tik tok ads", De), "tiktokads", De), ie = "ACTIVE_CAMPAIGN";
607
- i({}, "Active Campaign", "ActiveCampaign");
608
- var zs = i(i(i(i(i(i({ ActiveCampaign: ie, "Active Campaign": ie, "ACTIVE CAMPAIGN": ie }, ie, ie), "activecampaign", ie), "active campaign", ie), "Active campaign", ie), "active Campaign", ie), "active_campaign", ie), en = "SPRIG";
609
- i({}, "Sprig", "Sprig");
610
- var Vs = i(i(i({}, en, en), "Sprig", en), "sprig", en), mt = "SPOTIFYPIXEL";
611
- i({}, "Spotify Pixel", "SpotifyPixel");
612
- var $s = i(i(i(i({}, mt, mt), "Spotify Pixel", mt), "spotify pixel", mt), "SPOTIFY_PIXEL", mt), ot = "COMMANDBAR";
613
- i({}, "CommandBar", "CommandBar");
614
- var Ws = i(i(i(i(i({}, ot, ot), "Command Bar", ot), "Commandbar", ot), "COMMAND_BAR", ot), "commandbar", ot), yt = "NINETAILED";
615
- i({}, "Ninetailed", "Ninetailed");
616
- var Ys = i(i(i(i({}, yt, yt), "Ninetailed", yt), "ninetailed", yt), "NineTailed", yt), yi = E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E(E({ All: "All" }, So), wo), To), Ro), Po), Do), Ws), xo), Lo), Mo), Fo), Bo), No), Go), jo), Uo), Ho), vs), qo), Ko), Qo), zo), Vo), $o), Wo), Yo), Xo), Jo), Zo), es), ts), ns), rs), is), Ys), os), ss), as), us), cs), ls), fs), hs), ds), ps), gs), ms), ys), bs), ks), Is), As), Es), Os), _s), Ss), ws), Ts), Rs), Ps), Ds), xs), Ls), Cs), Ms), Fs), Bs), Ns), Gs), js), Us), Hs), qs), Ks), Qs), zs), Vs), $s), xe = 4, D = { setLogLevel: function(n) {
617
- switch (n.toUpperCase()) {
618
- case "INFO":
619
- xe = 1;
620
- break;
621
- case "DEBUG":
622
- xe = 2;
623
- break;
624
- case "WARN":
625
- xe = 3;
626
- break;
627
- default:
628
- xe = 4;
629
- }
630
- }, info: function() {
631
- var n;
632
- xe <= 1 && (n = console).info.apply(n, arguments);
633
- }, debug: function() {
634
- var n;
635
- xe <= 2 && (n = console).log.apply(n, arguments);
636
- }, warn: function() {
637
- var n;
638
- xe <= 3 && (n = console).warn.apply(n, arguments);
639
- }, error: function() {
640
- var n;
641
- xe <= 4 && (n = console).error.apply(n, arguments);
642
- } }, un = 1e4, tn = 1e3, vi = "RS_JS_SDK", rr = "Request failed with status:", Xs = [rr], ir = "errorReporting", mr = function(n) {
643
- var e = window.RudderStackGlobals && window.RudderStackGlobals[ir];
644
- e && n instanceof Error && e.notify(n);
645
- }, ye = function(n, e) {
646
- try {
647
- return JSON.stringify(n, /* @__PURE__ */ function(t) {
648
- var r = [];
649
- return function(o, s) {
650
- if (!t || s != null) {
651
- if (L(s) !== "object" || s === null)
652
- return s;
653
- for (; r.length > 0 && r[r.length - 1] !== this; )
654
- r.pop();
655
- return r.includes(s) ? (D.debug("Circular Reference detected for key: ".concat(o)), "[Circular Reference]") : (r.push(s), s);
656
- }
657
- };
658
- }(e));
659
- } catch {
660
- return D.warn("Failed to convert the value to a JSON string."), null;
661
- }
662
- }, Js = function(n, e, t) {
663
- var r, o;
664
- try {
665
- r = typeof n == "string" ? n : n instanceof Error || n.message ? n.message : ye(n);
666
- } catch {
667
- r = "";
668
- }
669
- if (L(o = n) === "object" && o !== null && "target" in o) {
670
- if (n.target && n.target.localName !== "script" || n.target.dataset && (n.target.dataset.loader !== vi || n.target.dataset.isnonnativesdk !== "true"))
671
- return "";
672
- if (r = "error in script loading:: src:: ".concat(n.target.src, " id:: ").concat(n.target.id), n.target.id === "ad-block")
673
- return t.page("RudderJS-Initiated", "ad-block page request", { path: "/ad-blocked", title: r }, t.sendAdblockPageOptions), "";
674
- }
675
- return "[handleError]::".concat(e || "", ' "').concat(r, '"');
676
- }, M = function(n, e, t) {
677
- var r;
678
- try {
679
- r = Js(n, e, t);
680
- } catch (o) {
681
- D.error("[handleError] Exception:: ", o), D.error("[handleError] Original error:: ", ye(n)), mr(o);
682
- }
683
- r && (D.error(r), function(o) {
684
- return !o.message || !Xs.some(function(s) {
685
- return o.message.includes(s);
686
- });
687
- }(n) && mr(n));
688
- }, bi = { exports: {} }, yr, vr = { exports: {} }, Zs = ko(Object.freeze({ __proto__: null, default: {} }));
689
- function Fe() {
690
- return yr || (yr = 1, vr.exports = (n = n || function(e, t) {
691
- var r;
692
- if (typeof window < "u" && window.crypto && (r = window.crypto), typeof self < "u" && self.crypto && (r = self.crypto), typeof globalThis < "u" && globalThis.crypto && (r = globalThis.crypto), !r && typeof window < "u" && window.msCrypto && (r = window.msCrypto), !r && kn !== void 0 && kn.crypto && (r = kn.crypto), !r)
693
- try {
694
- r = Zs;
695
- } catch {
696
- }
697
- var o = function() {
698
- if (r) {
699
- if (typeof r.getRandomValues == "function")
700
- try {
701
- return r.getRandomValues(new Uint32Array(1))[0];
702
- } catch {
703
- }
704
- if (typeof r.randomBytes == "function")
705
- try {
706
- return r.randomBytes(4).readInt32LE();
707
- } catch {
708
- }
709
- }
710
- throw new Error("Native crypto module could not be used to get secure random number.");
711
- }, s = Object.create || /* @__PURE__ */ function() {
712
- function d() {
713
- }
714
- return function(y) {
715
- var k;
716
- return d.prototype = y, k = new d(), d.prototype = null, k;
717
- };
718
- }(), u = {}, a = u.lib = {}, c = a.Base = { extend: function(d) {
719
- var y = s(this);
720
- return d && y.mixIn(d), y.hasOwnProperty("init") && this.init !== y.init || (y.init = function() {
721
- y.$super.init.apply(this, arguments);
722
- }), y.init.prototype = y, y.$super = this, y;
723
- }, create: function() {
724
- var d = this.extend();
725
- return d.init.apply(d, arguments), d;
726
- }, init: function() {
727
- }, mixIn: function(d) {
728
- for (var y in d)
729
- d.hasOwnProperty(y) && (this[y] = d[y]);
730
- d.hasOwnProperty("toString") && (this.toString = d.toString);
731
- }, clone: function() {
732
- return this.init.prototype.extend(this);
733
- } }, l = a.WordArray = c.extend({ init: function(d, y) {
734
- d = this.words = d || [], this.sigBytes = y != t ? y : 4 * d.length;
735
- }, toString: function(d) {
736
- return (d || f).stringify(this);
737
- }, concat: function(d) {
738
- var y = this.words, k = d.words, p = this.sigBytes, v = d.sigBytes;
739
- if (this.clamp(), p % 4)
740
- for (var I = 0; I < v; I++) {
741
- var A = k[I >>> 2] >>> 24 - I % 4 * 8 & 255;
742
- y[p + I >>> 2] |= A << 24 - (p + I) % 4 * 8;
743
- }
744
- else
745
- for (var T = 0; T < v; T += 4)
746
- y[p + T >>> 2] = k[T >>> 2];
747
- return this.sigBytes += v, this;
748
- }, clamp: function() {
749
- var d = this.words, y = this.sigBytes;
750
- d[y >>> 2] &= 4294967295 << 32 - y % 4 * 8, d.length = e.ceil(y / 4);
751
- }, clone: function() {
752
- var d = c.clone.call(this);
753
- return d.words = this.words.slice(0), d;
754
- }, random: function(d) {
755
- for (var y = [], k = 0; k < d; k += 4)
756
- y.push(o());
757
- return new l.init(y, d);
758
- } }), h = u.enc = {}, f = h.Hex = { stringify: function(d) {
759
- for (var y = d.words, k = d.sigBytes, p = [], v = 0; v < k; v++) {
760
- var I = y[v >>> 2] >>> 24 - v % 4 * 8 & 255;
761
- p.push((I >>> 4).toString(16)), p.push((15 & I).toString(16));
762
- }
763
- return p.join("");
764
- }, parse: function(d) {
765
- for (var y = d.length, k = [], p = 0; p < y; p += 2)
766
- k[p >>> 3] |= parseInt(d.substr(p, 2), 16) << 24 - p % 8 * 4;
767
- return new l.init(k, y / 2);
768
- } }, m = h.Latin1 = { stringify: function(d) {
769
- for (var y = d.words, k = d.sigBytes, p = [], v = 0; v < k; v++) {
770
- var I = y[v >>> 2] >>> 24 - v % 4 * 8 & 255;
771
- p.push(String.fromCharCode(I));
772
- }
773
- return p.join("");
774
- }, parse: function(d) {
775
- for (var y = d.length, k = [], p = 0; p < y; p++)
776
- k[p >>> 2] |= (255 & d.charCodeAt(p)) << 24 - p % 4 * 8;
777
- return new l.init(k, y);
778
- } }, g = h.Utf8 = { stringify: function(d) {
779
- try {
780
- return decodeURIComponent(escape(m.stringify(d)));
781
- } catch {
782
- throw new Error("Malformed UTF-8 data");
783
- }
784
- }, parse: function(d) {
785
- return m.parse(unescape(encodeURIComponent(d)));
786
- } }, b = a.BufferedBlockAlgorithm = c.extend({ reset: function() {
787
- this._data = new l.init(), this._nDataBytes = 0;
788
- }, _append: function(d) {
789
- typeof d == "string" && (d = g.parse(d)), this._data.concat(d), this._nDataBytes += d.sigBytes;
790
- }, _process: function(d) {
791
- var y, k = this._data, p = k.words, v = k.sigBytes, I = this.blockSize, A = v / (4 * I), T = (A = d ? e.ceil(A) : e.max((0 | A) - this._minBufferSize, 0)) * I, w = e.min(4 * T, v);
792
- if (T) {
793
- for (var x = 0; x < T; x += I)
794
- this._doProcessBlock(p, x);
795
- y = p.splice(0, T), k.sigBytes -= w;
796
- }
797
- return new l.init(y, w);
798
- }, clone: function() {
799
- var d = c.clone.call(this);
800
- return d._data = this._data.clone(), d;
801
- }, _minBufferSize: 0 });
802
- a.Hasher = b.extend({ cfg: c.extend(), init: function(d) {
803
- this.cfg = this.cfg.extend(d), this.reset();
804
- }, reset: function() {
805
- b.reset.call(this), this._doReset();
806
- }, update: function(d) {
807
- return this._append(d), this._process(), this;
808
- }, finalize: function(d) {
809
- return d && this._append(d), this._doFinalize();
810
- }, blockSize: 16, _createHelper: function(d) {
811
- return function(y, k) {
812
- return new d.init(k).finalize(y);
813
- };
814
- }, _createHmacHelper: function(d) {
815
- return function(y, k) {
816
- return new R.HMAC.init(d, k).finalize(y);
817
- };
818
- } });
819
- var R = u.algo = {};
820
- return u;
821
- }(Math), n)), vr.exports;
822
- var n;
823
- }
824
- var br, kr = { exports: {} };
825
- function ea() {
826
- return br || (br = 1, kr.exports = (n = Fe(), function() {
827
- var e = n, t = e.lib.WordArray;
828
- function r(o, s, u) {
829
- for (var a = [], c = 0, l = 0; l < s; l++)
830
- if (l % 4) {
831
- var h = u[o.charCodeAt(l - 1)] << l % 4 * 2 | u[o.charCodeAt(l)] >>> 6 - l % 4 * 2;
832
- a[c >>> 2] |= h << 24 - c % 4 * 8, c++;
833
- }
834
- return t.create(a, c);
835
- }
836
- e.enc.Base64 = { stringify: function(o) {
837
- var s = o.words, u = o.sigBytes, a = this._map;
838
- o.clamp();
839
- for (var c = [], l = 0; l < u; l += 3)
840
- for (var h = (s[l >>> 2] >>> 24 - l % 4 * 8 & 255) << 16 | (s[l + 1 >>> 2] >>> 24 - (l + 1) % 4 * 8 & 255) << 8 | s[l + 2 >>> 2] >>> 24 - (l + 2) % 4 * 8 & 255, f = 0; f < 4 && l + 0.75 * f < u; f++)
841
- c.push(a.charAt(h >>> 6 * (3 - f) & 63));
842
- var m = a.charAt(64);
843
- if (m)
844
- for (; c.length % 4; )
845
- c.push(m);
846
- return c.join("");
847
- }, parse: function(o) {
848
- var s = o.length, u = this._map, a = this._reverseMap;
849
- if (!a) {
850
- a = this._reverseMap = [];
851
- for (var c = 0; c < u.length; c++)
852
- a[u.charCodeAt(c)] = c;
853
- }
854
- var l = u.charAt(64);
855
- if (l) {
856
- var h = o.indexOf(l);
857
- h !== -1 && (s = h);
858
- }
859
- return r(o, s, a);
860
- }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" };
861
- }(), n.enc.Base64)), kr.exports;
862
- var n;
863
- }
864
- var Ir, Ar = { exports: {} };
865
- function ta() {
866
- return Ir || (Ir = 1, Ar.exports = (n = Fe(), function(e) {
867
- var t = n, r = t.lib, o = r.WordArray, s = r.Hasher, u = t.algo, a = [];
868
- (function() {
869
- for (var g = 0; g < 64; g++)
870
- a[g] = 4294967296 * e.abs(e.sin(g + 1)) | 0;
871
- })();
872
- var c = u.MD5 = s.extend({ _doReset: function() {
873
- this._hash = new o.init([1732584193, 4023233417, 2562383102, 271733878]);
874
- }, _doProcessBlock: function(g, b) {
875
- for (var R = 0; R < 16; R++) {
876
- var d = b + R, y = g[d];
877
- g[d] = 16711935 & (y << 8 | y >>> 24) | 4278255360 & (y << 24 | y >>> 8);
878
- }
879
- var k = this._hash.words, p = g[b + 0], v = g[b + 1], I = g[b + 2], A = g[b + 3], T = g[b + 4], w = g[b + 5], x = g[b + 6], G = g[b + 7], H = g[b + 8], q = g[b + 9], Q = g[b + 10], Be = g[b + 11], be = g[b + 12], ke = g[b + 13], Ie = g[b + 14], Ae = g[b + 15], C = k[0], S = k[1], O = k[2], _ = k[3];
880
- C = l(C, S, O, _, p, 7, a[0]), _ = l(_, C, S, O, v, 12, a[1]), O = l(O, _, C, S, I, 17, a[2]), S = l(S, O, _, C, A, 22, a[3]), C = l(C, S, O, _, T, 7, a[4]), _ = l(_, C, S, O, w, 12, a[5]), O = l(O, _, C, S, x, 17, a[6]), S = l(S, O, _, C, G, 22, a[7]), C = l(C, S, O, _, H, 7, a[8]), _ = l(_, C, S, O, q, 12, a[9]), O = l(O, _, C, S, Q, 17, a[10]), S = l(S, O, _, C, Be, 22, a[11]), C = l(C, S, O, _, be, 7, a[12]), _ = l(_, C, S, O, ke, 12, a[13]), O = l(O, _, C, S, Ie, 17, a[14]), C = h(C, S = l(S, O, _, C, Ae, 22, a[15]), O, _, v, 5, a[16]), _ = h(_, C, S, O, x, 9, a[17]), O = h(O, _, C, S, Be, 14, a[18]), S = h(S, O, _, C, p, 20, a[19]), C = h(C, S, O, _, w, 5, a[20]), _ = h(_, C, S, O, Q, 9, a[21]), O = h(O, _, C, S, Ae, 14, a[22]), S = h(S, O, _, C, T, 20, a[23]), C = h(C, S, O, _, q, 5, a[24]), _ = h(_, C, S, O, Ie, 9, a[25]), O = h(O, _, C, S, A, 14, a[26]), S = h(S, O, _, C, H, 20, a[27]), C = h(C, S, O, _, ke, 5, a[28]), _ = h(_, C, S, O, I, 9, a[29]), O = h(O, _, C, S, G, 14, a[30]), C = f(C, S = h(S, O, _, C, be, 20, a[31]), O, _, w, 4, a[32]), _ = f(_, C, S, O, H, 11, a[33]), O = f(O, _, C, S, Be, 16, a[34]), S = f(S, O, _, C, Ie, 23, a[35]), C = f(C, S, O, _, v, 4, a[36]), _ = f(_, C, S, O, T, 11, a[37]), O = f(O, _, C, S, G, 16, a[38]), S = f(S, O, _, C, Q, 23, a[39]), C = f(C, S, O, _, ke, 4, a[40]), _ = f(_, C, S, O, p, 11, a[41]), O = f(O, _, C, S, A, 16, a[42]), S = f(S, O, _, C, x, 23, a[43]), C = f(C, S, O, _, q, 4, a[44]), _ = f(_, C, S, O, be, 11, a[45]), O = f(O, _, C, S, Ae, 16, a[46]), C = m(C, S = f(S, O, _, C, I, 23, a[47]), O, _, p, 6, a[48]), _ = m(_, C, S, O, G, 10, a[49]), O = m(O, _, C, S, Ie, 15, a[50]), S = m(S, O, _, C, w, 21, a[51]), C = m(C, S, O, _, be, 6, a[52]), _ = m(_, C, S, O, A, 10, a[53]), O = m(O, _, C, S, Q, 15, a[54]), S = m(S, O, _, C, v, 21, a[55]), C = m(C, S, O, _, H, 6, a[56]), _ = m(_, C, S, O, Ae, 10, a[57]), O = m(O, _, C, S, x, 15, a[58]), S = m(S, O, _, C, ke, 21, a[59]), C = m(C, S, O, _, T, 6, a[60]), _ = m(_, C, S, O, Be, 10, a[61]), O = m(O, _, C, S, I, 15, a[62]), S = m(S, O, _, C, q, 21, a[63]), k[0] = k[0] + C | 0, k[1] = k[1] + S | 0, k[2] = k[2] + O | 0, k[3] = k[3] + _ | 0;
881
- }, _doFinalize: function() {
882
- var g = this._data, b = g.words, R = 8 * this._nDataBytes, d = 8 * g.sigBytes;
883
- b[d >>> 5] |= 128 << 24 - d % 32;
884
- var y = e.floor(R / 4294967296), k = R;
885
- b[15 + (d + 64 >>> 9 << 4)] = 16711935 & (y << 8 | y >>> 24) | 4278255360 & (y << 24 | y >>> 8), b[14 + (d + 64 >>> 9 << 4)] = 16711935 & (k << 8 | k >>> 24) | 4278255360 & (k << 24 | k >>> 8), g.sigBytes = 4 * (b.length + 1), this._process();
886
- for (var p = this._hash, v = p.words, I = 0; I < 4; I++) {
887
- var A = v[I];
888
- v[I] = 16711935 & (A << 8 | A >>> 24) | 4278255360 & (A << 24 | A >>> 8);
889
- }
890
- return p;
891
- }, clone: function() {
892
- var g = s.clone.call(this);
893
- return g._hash = this._hash.clone(), g;
894
- } });
895
- function l(g, b, R, d, y, k, p) {
896
- var v = g + (b & R | ~b & d) + y + p;
897
- return (v << k | v >>> 32 - k) + b;
898
- }
899
- function h(g, b, R, d, y, k, p) {
900
- var v = g + (b & d | R & ~d) + y + p;
901
- return (v << k | v >>> 32 - k) + b;
902
- }
903
- function f(g, b, R, d, y, k, p) {
904
- var v = g + (b ^ R ^ d) + y + p;
905
- return (v << k | v >>> 32 - k) + b;
906
- }
907
- function m(g, b, R, d, y, k, p) {
908
- var v = g + (R ^ (b | ~d)) + y + p;
909
- return (v << k | v >>> 32 - k) + b;
910
- }
911
- t.MD5 = s._createHelper(c), t.HmacMD5 = s._createHmacHelper(c);
912
- }(Math), n.MD5)), Ar.exports;
913
- var n;
914
- }
915
- var Er, Cr = { exports: {} }, Or = { exports: {} };
916
- function na() {
917
- return Er || (Er = 1, Or.exports = (a = Fe(), e = (n = a).lib, t = e.WordArray, r = e.Hasher, o = n.algo, s = [], u = o.SHA1 = r.extend({ _doReset: function() {
918
- this._hash = new t.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
919
- }, _doProcessBlock: function(c, l) {
920
- for (var h = this._hash.words, f = h[0], m = h[1], g = h[2], b = h[3], R = h[4], d = 0; d < 80; d++) {
921
- if (d < 16)
922
- s[d] = 0 | c[l + d];
923
- else {
924
- var y = s[d - 3] ^ s[d - 8] ^ s[d - 14] ^ s[d - 16];
925
- s[d] = y << 1 | y >>> 31;
926
- }
927
- var k = (f << 5 | f >>> 27) + R + s[d];
928
- k += d < 20 ? 1518500249 + (m & g | ~m & b) : d < 40 ? 1859775393 + (m ^ g ^ b) : d < 60 ? (m & g | m & b | g & b) - 1894007588 : (m ^ g ^ b) - 899497514, R = b, b = g, g = m << 30 | m >>> 2, m = f, f = k;
929
- }
930
- h[0] = h[0] + f | 0, h[1] = h[1] + m | 0, h[2] = h[2] + g | 0, h[3] = h[3] + b | 0, h[4] = h[4] + R | 0;
931
- }, _doFinalize: function() {
932
- var c = this._data, l = c.words, h = 8 * this._nDataBytes, f = 8 * c.sigBytes;
933
- return l[f >>> 5] |= 128 << 24 - f % 32, l[14 + (f + 64 >>> 9 << 4)] = Math.floor(h / 4294967296), l[15 + (f + 64 >>> 9 << 4)] = h, c.sigBytes = 4 * l.length, this._process(), this._hash;
934
- }, clone: function() {
935
- var c = r.clone.call(this);
936
- return c._hash = this._hash.clone(), c;
937
- } }), n.SHA1 = r._createHelper(u), n.HmacSHA1 = r._createHmacHelper(u), a.SHA1)), Or.exports;
938
- var n, e, t, r, o, s, u, a;
939
- }
940
- var _r, Sr, wr = { exports: {} };
941
- function Tr() {
942
- return Sr || (Sr = 1, Cr.exports = function(e) {
943
- return r = (t = e).lib, o = r.Base, s = r.WordArray, u = t.algo, a = u.MD5, c = u.EvpKDF = o.extend({ cfg: o.extend({ keySize: 4, hasher: a, iterations: 1 }), init: function(l) {
944
- this.cfg = this.cfg.extend(l);
945
- }, compute: function(l, h) {
946
- for (var f, m = this.cfg, g = m.hasher.create(), b = s.create(), R = b.words, d = m.keySize, y = m.iterations; R.length < d; ) {
947
- f && g.update(f), f = g.update(l).finalize(h), g.reset();
948
- for (var k = 1; k < y; k++)
949
- f = g.finalize(f), g.reset();
950
- b.concat(f);
951
- }
952
- return b.sigBytes = 4 * d, b;
953
- } }), t.EvpKDF = function(l, h, f) {
954
- return c.create(f).compute(l, h);
955
- }, e.EvpKDF;
956
- var t, r, o, s, u, a, c;
957
- }(Fe(), na(), (_r || (_r = 1, wr.exports = (n = Fe(), void function() {
958
- var e = n, t = e.lib.Base, r = e.enc.Utf8;
959
- e.algo.HMAC = t.extend({ init: function(o, s) {
960
- o = this._hasher = new o.init(), typeof s == "string" && (s = r.parse(s));
961
- var u = o.blockSize, a = 4 * u;
962
- s.sigBytes > a && (s = o.finalize(s)), s.clamp();
963
- for (var c = this._oKey = s.clone(), l = this._iKey = s.clone(), h = c.words, f = l.words, m = 0; m < u; m++)
964
- h[m] ^= 1549556828, f[m] ^= 909522486;
965
- c.sigBytes = l.sigBytes = a, this.reset();
966
- }, reset: function() {
967
- var o = this._hasher;
968
- o.reset(), o.update(this._iKey);
969
- }, update: function(o) {
970
- return this._hasher.update(o), this;
971
- }, finalize: function(o) {
972
- var s = this._hasher, u = s.finalize(o);
973
- return s.reset(), s.finalize(this._oKey.clone().concat(u));
974
- } });
975
- }())), wr.exports))), Cr.exports;
976
- var n;
977
- }
978
- var Rr, In;
979
- bi.exports = function(n) {
980
- return function() {
981
- var e = n, t = e.lib.BlockCipher, r = e.algo, o = [], s = [], u = [], a = [], c = [], l = [], h = [], f = [], m = [], g = [];
982
- (function() {
983
- for (var d = [], y = 0; y < 256; y++)
984
- d[y] = y < 128 ? y << 1 : y << 1 ^ 283;
985
- var k = 0, p = 0;
986
- for (y = 0; y < 256; y++) {
987
- var v = p ^ p << 1 ^ p << 2 ^ p << 3 ^ p << 4;
988
- v = v >>> 8 ^ 255 & v ^ 99, o[k] = v, s[v] = k;
989
- var I = d[k], A = d[I], T = d[A], w = 257 * d[v] ^ 16843008 * v;
990
- u[k] = w << 24 | w >>> 8, a[k] = w << 16 | w >>> 16, c[k] = w << 8 | w >>> 24, l[k] = w, w = 16843009 * T ^ 65537 * A ^ 257 * I ^ 16843008 * k, h[v] = w << 24 | w >>> 8, f[v] = w << 16 | w >>> 16, m[v] = w << 8 | w >>> 24, g[v] = w, k ? (k = I ^ d[d[d[T ^ I]]], p ^= d[d[p]]) : k = p = 1;
991
- }
992
- })();
993
- var b = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], R = r.AES = t.extend({ _doReset: function() {
994
- if (!this._nRounds || this._keyPriorReset !== this._key) {
995
- for (var d = this._keyPriorReset = this._key, y = d.words, k = d.sigBytes / 4, p = 4 * ((this._nRounds = k + 6) + 1), v = this._keySchedule = [], I = 0; I < p; I++)
996
- I < k ? v[I] = y[I] : (w = v[I - 1], I % k ? k > 6 && I % k == 4 && (w = o[w >>> 24] << 24 | o[w >>> 16 & 255] << 16 | o[w >>> 8 & 255] << 8 | o[255 & w]) : (w = o[(w = w << 8 | w >>> 24) >>> 24] << 24 | o[w >>> 16 & 255] << 16 | o[w >>> 8 & 255] << 8 | o[255 & w], w ^= b[I / k | 0] << 24), v[I] = v[I - k] ^ w);
997
- for (var A = this._invKeySchedule = [], T = 0; T < p; T++) {
998
- if (I = p - T, T % 4)
999
- var w = v[I];
1000
- else
1001
- w = v[I - 4];
1002
- A[T] = T < 4 || I <= 4 ? w : h[o[w >>> 24]] ^ f[o[w >>> 16 & 255]] ^ m[o[w >>> 8 & 255]] ^ g[o[255 & w]];
1003
- }
1004
- }
1005
- }, encryptBlock: function(d, y) {
1006
- this._doCryptBlock(d, y, this._keySchedule, u, a, c, l, o);
1007
- }, decryptBlock: function(d, y) {
1008
- var k = d[y + 1];
1009
- d[y + 1] = d[y + 3], d[y + 3] = k, this._doCryptBlock(d, y, this._invKeySchedule, h, f, m, g, s), k = d[y + 1], d[y + 1] = d[y + 3], d[y + 3] = k;
1010
- }, _doCryptBlock: function(d, y, k, p, v, I, A, T) {
1011
- for (var w = this._nRounds, x = d[y] ^ k[0], G = d[y + 1] ^ k[1], H = d[y + 2] ^ k[2], q = d[y + 3] ^ k[3], Q = 4, Be = 1; Be < w; Be++) {
1012
- var be = p[x >>> 24] ^ v[G >>> 16 & 255] ^ I[H >>> 8 & 255] ^ A[255 & q] ^ k[Q++], ke = p[G >>> 24] ^ v[H >>> 16 & 255] ^ I[q >>> 8 & 255] ^ A[255 & x] ^ k[Q++], Ie = p[H >>> 24] ^ v[q >>> 16 & 255] ^ I[x >>> 8 & 255] ^ A[255 & G] ^ k[Q++], Ae = p[q >>> 24] ^ v[x >>> 16 & 255] ^ I[G >>> 8 & 255] ^ A[255 & H] ^ k[Q++];
1013
- x = be, G = ke, H = Ie, q = Ae;
1014
- }
1015
- be = (T[x >>> 24] << 24 | T[G >>> 16 & 255] << 16 | T[H >>> 8 & 255] << 8 | T[255 & q]) ^ k[Q++], ke = (T[G >>> 24] << 24 | T[H >>> 16 & 255] << 16 | T[q >>> 8 & 255] << 8 | T[255 & x]) ^ k[Q++], Ie = (T[H >>> 24] << 24 | T[q >>> 16 & 255] << 16 | T[x >>> 8 & 255] << 8 | T[255 & G]) ^ k[Q++], Ae = (T[q >>> 24] << 24 | T[x >>> 16 & 255] << 16 | T[G >>> 8 & 255] << 8 | T[255 & H]) ^ k[Q++], d[y] = be, d[y + 1] = ke, d[y + 2] = Ie, d[y + 3] = Ae;
1016
- }, keySize: 8 });
1017
- e.AES = t._createHelper(R);
1018
- }(), n.AES;
1019
- }(Fe(), ea(), ta(), Tr(), Rr || (Rr = 1, In = Fe(), Tr(), void (In.lib.Cipher || function(n) {
1020
- var e = In, t = e.lib, r = t.Base, o = t.WordArray, s = t.BufferedBlockAlgorithm, u = e.enc;
1021
- u.Utf8;
1022
- var a = u.Base64, c = e.algo.EvpKDF, l = t.Cipher = s.extend({ cfg: r.extend(), createEncryptor: function(p, v) {
1023
- return this.create(this._ENC_XFORM_MODE, p, v);
1024
- }, createDecryptor: function(p, v) {
1025
- return this.create(this._DEC_XFORM_MODE, p, v);
1026
- }, init: function(p, v, I) {
1027
- this.cfg = this.cfg.extend(I), this._xformMode = p, this._key = v, this.reset();
1028
- }, reset: function() {
1029
- s.reset.call(this), this._doReset();
1030
- }, process: function(p) {
1031
- return this._append(p), this._process();
1032
- }, finalize: function(p) {
1033
- return p && this._append(p), this._doFinalize();
1034
- }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: /* @__PURE__ */ function() {
1035
- function p(v) {
1036
- return typeof v == "string" ? k : d;
1037
- }
1038
- return function(v) {
1039
- return { encrypt: function(I, A, T) {
1040
- return p(A).encrypt(v, I, A, T);
1041
- }, decrypt: function(I, A, T) {
1042
- return p(A).decrypt(v, I, A, T);
1043
- } };
1044
- };
1045
- }() });
1046
- t.StreamCipher = l.extend({ _doFinalize: function() {
1047
- return this._process(!0);
1048
- }, blockSize: 1 });
1049
- var h = e.mode = {}, f = t.BlockCipherMode = r.extend({ createEncryptor: function(p, v) {
1050
- return this.Encryptor.create(p, v);
1051
- }, createDecryptor: function(p, v) {
1052
- return this.Decryptor.create(p, v);
1053
- }, init: function(p, v) {
1054
- this._cipher = p, this._iv = v;
1055
- } }), m = h.CBC = function() {
1056
- var p = f.extend();
1057
- function v(I, A, T) {
1058
- var w, x = this._iv;
1059
- x ? (w = x, this._iv = n) : w = this._prevBlock;
1060
- for (var G = 0; G < T; G++)
1061
- I[A + G] ^= w[G];
1062
- }
1063
- return p.Encryptor = p.extend({ processBlock: function(I, A) {
1064
- var T = this._cipher, w = T.blockSize;
1065
- v.call(this, I, A, w), T.encryptBlock(I, A), this._prevBlock = I.slice(A, A + w);
1066
- } }), p.Decryptor = p.extend({ processBlock: function(I, A) {
1067
- var T = this._cipher, w = T.blockSize, x = I.slice(A, A + w);
1068
- T.decryptBlock(I, A), v.call(this, I, A, w), this._prevBlock = x;
1069
- } }), p;
1070
- }(), g = (e.pad = {}).Pkcs7 = { pad: function(p, v) {
1071
- for (var I = 4 * v, A = I - p.sigBytes % I, T = A << 24 | A << 16 | A << 8 | A, w = [], x = 0; x < A; x += 4)
1072
- w.push(T);
1073
- var G = o.create(w, A);
1074
- p.concat(G);
1075
- }, unpad: function(p) {
1076
- var v = 255 & p.words[p.sigBytes - 1 >>> 2];
1077
- p.sigBytes -= v;
1078
- } };
1079
- t.BlockCipher = l.extend({ cfg: l.cfg.extend({ mode: m, padding: g }), reset: function() {
1080
- var p;
1081
- l.reset.call(this);
1082
- var v = this.cfg, I = v.iv, A = v.mode;
1083
- this._xformMode == this._ENC_XFORM_MODE ? p = A.createEncryptor : (p = A.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == p ? this._mode.init(this, I && I.words) : (this._mode = p.call(A, this, I && I.words), this._mode.__creator = p);
1084
- }, _doProcessBlock: function(p, v) {
1085
- this._mode.processBlock(p, v);
1086
- }, _doFinalize: function() {
1087
- var p, v = this.cfg.padding;
1088
- return this._xformMode == this._ENC_XFORM_MODE ? (v.pad(this._data, this.blockSize), p = this._process(!0)) : (p = this._process(!0), v.unpad(p)), p;
1089
- }, blockSize: 4 });
1090
- var b = t.CipherParams = r.extend({ init: function(p) {
1091
- this.mixIn(p);
1092
- }, toString: function(p) {
1093
- return (p || this.formatter).stringify(this);
1094
- } }), R = (e.format = {}).OpenSSL = { stringify: function(p) {
1095
- var v = p.ciphertext, I = p.salt;
1096
- return (I ? o.create([1398893684, 1701076831]).concat(I).concat(v) : v).toString(a);
1097
- }, parse: function(p) {
1098
- var v, I = a.parse(p), A = I.words;
1099
- return A[0] == 1398893684 && A[1] == 1701076831 && (v = o.create(A.slice(2, 4)), A.splice(0, 4), I.sigBytes -= 16), b.create({ ciphertext: I, salt: v });
1100
- } }, d = t.SerializableCipher = r.extend({ cfg: r.extend({ format: R }), encrypt: function(p, v, I, A) {
1101
- A = this.cfg.extend(A);
1102
- var T = p.createEncryptor(I, A), w = T.finalize(v), x = T.cfg;
1103
- return b.create({ ciphertext: w, key: I, iv: x.iv, algorithm: p, mode: x.mode, padding: x.padding, blockSize: p.blockSize, formatter: A.format });
1104
- }, decrypt: function(p, v, I, A) {
1105
- return A = this.cfg.extend(A), v = this._parse(v, A.format), p.createDecryptor(I, A).finalize(v.ciphertext);
1106
- }, _parse: function(p, v) {
1107
- return typeof p == "string" ? v.parse(p, this) : p;
1108
- } }), y = (e.kdf = {}).OpenSSL = { execute: function(p, v, I, A, T) {
1109
- if (A || (A = o.random(8)), T)
1110
- w = c.create({ keySize: v + I, hasher: T }).compute(p, A);
1111
- else
1112
- var w = c.create({ keySize: v + I }).compute(p, A);
1113
- var x = o.create(w.words.slice(v), 4 * I);
1114
- return w.sigBytes = 4 * v, b.create({ key: w, iv: x, salt: A });
1115
- } }, k = t.PasswordBasedCipher = d.extend({ cfg: d.cfg.extend({ kdf: y }), encrypt: function(p, v, I, A) {
1116
- var T = (A = this.cfg.extend(A)).kdf.execute(I, p.keySize, p.ivSize, A.salt, A.hasher);
1117
- A.iv = T.iv;
1118
- var w = d.encrypt.call(this, p, v, T.key, A);
1119
- return w.mixIn(T), w;
1120
- }, decrypt: function(p, v, I, A) {
1121
- A = this.cfg.extend(A), v = this._parse(v, A.format);
1122
- var T = A.kdf.execute(I, p.keySize, p.ivSize, v.salt, A.hasher);
1123
- return A.iv = T.iv, d.decrypt.call(this, p, v, T.key, A);
1124
- } });
1125
- }())));
1126
- var ki = ve(bi.exports), Ii = { exports: {} };
1127
- Ii.exports = function(n) {
1128
- return n.enc.Utf8;
1129
- }(Fe());
1130
- var ra = ve(Ii.exports), Ai = function(n) {
1131
- return n != null && L(n) === "object" && Array.isArray(n) === !1;
1132
- }, ia = function(n, e, t) {
1133
- if (Ai(t) || (t = { default: t }), !Dr(n))
1134
- return t.default !== void 0 ? t.default : n;
1135
- typeof e == "number" && (e = String(e));
1136
- var r = Array.isArray(e), o = typeof e == "string", s = t.separator || ".", u = t.joinChar || (typeof s == "string" ? s : ".");
1137
- if (!o && !r)
1138
- return n;
1139
- if (o && e in n)
1140
- return An(e, n, t) ? n[e] : t.default;
1141
- var a = r ? e : function(g, b, R) {
1142
- return typeof R.split == "function" ? R.split(g) : g.split(b);
1143
- }(e, s, t), c = a.length, l = 0;
1144
- do {
1145
- var h = a[l];
1146
- for (typeof h == "number" && (h = String(h)); h && h.slice(-1) === "\\"; )
1147
- h = Pr([h.slice(0, -1), a[++l] || ""], u, t);
1148
- if (h in n) {
1149
- if (!An(h, n, t))
1150
- return t.default;
1151
- n = n[h];
1152
- } else {
1153
- for (var f = !1, m = l + 1; m < c; )
1154
- if (f = (h = Pr([h, a[m++]], u, t)) in n) {
1155
- if (!An(h, n, t))
1156
- return t.default;
1157
- n = n[h], l = m - 1;
1158
- break;
1159
- }
1160
- if (!f)
1161
- return t.default;
1162
- }
1163
- } while (++l < c && Dr(n));
1164
- return l === c ? n : t.default;
1165
- };
1166
- function Pr(n, e, t) {
1167
- return typeof t.join == "function" ? t.join(n) : n[0] + e + n[1];
1168
- }
1169
- function An(n, e, t) {
1170
- return typeof t.isValid != "function" || t.isValid(n, e);
1171
- }
1172
- function Dr(n) {
1173
- return Ai(n) || Array.isArray(n) || typeof n == "function";
1174
- }
1175
- var En, xr, Ot = ve(ia), zn = { exports: {} };
1176
- function oa() {
1177
- if (xr)
1178
- return En;
1179
- xr = 1;
1180
- var n = 1e3, e = 60 * n, t = 60 * e, r = 24 * t, o = 7 * r, s = 365.25 * r;
1181
- function u(a, c, l, h) {
1182
- var f = c >= 1.5 * l;
1183
- return Math.round(a / l) + " " + h + (f ? "s" : "");
1184
- }
1185
- return En = function(a, c) {
1186
- c = c || {};
1187
- var l = L(a);
1188
- if (l === "string" && a.length > 0)
1189
- return function(h) {
1190
- if (!((h = String(h)).length > 100)) {
1191
- var f = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(h);
1192
- if (f) {
1193
- var m = parseFloat(f[1]);
1194
- switch ((f[2] || "ms").toLowerCase()) {
1195
- case "years":
1196
- case "year":
1197
- case "yrs":
1198
- case "yr":
1199
- case "y":
1200
- return m * s;
1201
- case "weeks":
1202
- case "week":
1203
- case "w":
1204
- return m * o;
1205
- case "days":
1206
- case "day":
1207
- case "d":
1208
- return m * r;
1209
- case "hours":
1210
- case "hour":
1211
- case "hrs":
1212
- case "hr":
1213
- case "h":
1214
- return m * t;
1215
- case "minutes":
1216
- case "minute":
1217
- case "mins":
1218
- case "min":
1219
- case "m":
1220
- return m * e;
1221
- case "seconds":
1222
- case "second":
1223
- case "secs":
1224
- case "sec":
1225
- case "s":
1226
- return m * n;
1227
- case "milliseconds":
1228
- case "millisecond":
1229
- case "msecs":
1230
- case "msec":
1231
- case "ms":
1232
- return m;
1233
- default:
1234
- return;
1235
- }
1236
- }
1237
- }
1238
- }(a);
1239
- if (l === "number" && isFinite(a))
1240
- return c.long ? function(h) {
1241
- var f = Math.abs(h);
1242
- return f >= r ? u(h, f, r, "day") : f >= t ? u(h, f, t, "hour") : f >= e ? u(h, f, e, "minute") : f >= n ? u(h, f, n, "second") : h + " ms";
1243
- }(a) : function(h) {
1244
- var f = Math.abs(h);
1245
- return f >= r ? Math.round(h / r) + "d" : f >= t ? Math.round(h / t) + "h" : f >= e ? Math.round(h / e) + "m" : f >= n ? Math.round(h / n) + "s" : h + "ms";
1246
- }(a);
1247
- throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(a));
1248
- }, En;
1249
- }
1250
- var nn, V, Cn, sa = function(n) {
1251
- function e(o) {
1252
- var s, u, a, c = null;
1253
- function l() {
1254
- for (var h = arguments.length, f = new Array(h), m = 0; m < h; m++)
1255
- f[m] = arguments[m];
1256
- if (l.enabled) {
1257
- var g = l, b = Number(/* @__PURE__ */ new Date()), R = b - (s || b);
1258
- g.diff = R, g.prev = s, g.curr = b, s = b, f[0] = e.coerce(f[0]), typeof f[0] != "string" && f.unshift("%O");
1259
- var d = 0;
1260
- f[0] = f[0].replace(/%([a-zA-Z%])/g, function(y, k) {
1261
- if (y === "%%")
1262
- return "%";
1263
- d++;
1264
- var p = e.formatters[k];
1265
- if (typeof p == "function") {
1266
- var v = f[d];
1267
- y = p.call(g, v), f.splice(d, 1), d--;
1268
- }
1269
- return y;
1270
- }), e.formatArgs.call(g, f), (g.log || e.log).apply(g, f);
1271
- }
1272
- }
1273
- return l.namespace = o, l.useColors = e.useColors(), l.color = e.selectColor(o), l.extend = t, l.destroy = e.destroy, Object.defineProperty(l, "enabled", { enumerable: !0, configurable: !1, get: function() {
1274
- return c !== null ? c : (u !== e.namespaces && (u = e.namespaces, a = e.enabled(o)), a);
1275
- }, set: function(h) {
1276
- c = h;
1277
- } }), typeof e.init == "function" && e.init(l), l;
1278
- }
1279
- function t(o, s) {
1280
- var u = e(this.namespace + (s === void 0 ? ":" : s) + o);
1281
- return u.log = this.log, u;
1282
- }
1283
- function r(o) {
1284
- return o.toString().substring(2, o.toString().length - 2).replace(/\.\*\?$/, "*");
1285
- }
1286
- return e.debug = e, e.default = e, e.coerce = function(o) {
1287
- return o instanceof Error ? o.stack || o.message : o;
1288
- }, e.disable = function() {
1289
- var o = [].concat(Me(e.names.map(r)), Me(e.skips.map(r).map(function(s) {
1290
- return "-" + s;
1291
- }))).join(",");
1292
- return e.enable(""), o;
1293
- }, e.enable = function(o) {
1294
- var s;
1295
- e.save(o), e.namespaces = o, e.names = [], e.skips = [];
1296
- var u = (typeof o == "string" ? o : "").split(/[\s,]+/), a = u.length;
1297
- for (s = 0; s < a; s++)
1298
- u[s] && ((o = u[s].replace(/\*/g, ".*?"))[0] === "-" ? e.skips.push(new RegExp("^" + o.slice(1) + "$")) : e.names.push(new RegExp("^" + o + "$")));
1299
- }, e.enabled = function(o) {
1300
- if (o[o.length - 1] === "*")
1301
- return !0;
1302
- var s, u;
1303
- for (s = 0, u = e.skips.length; s < u; s++)
1304
- if (e.skips[s].test(o))
1305
- return !1;
1306
- for (s = 0, u = e.names.length; s < u; s++)
1307
- if (e.names[s].test(o))
1308
- return !0;
1309
- return !1;
1310
- }, e.humanize = oa(), e.destroy = function() {
1311
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
1312
- }, Object.keys(n).forEach(function(o) {
1313
- e[o] = n[o];
1314
- }), e.names = [], e.skips = [], e.formatters = {}, e.selectColor = function(o) {
1315
- for (var s = 0, u = 0; u < o.length; u++)
1316
- s = (s << 5) - s + o.charCodeAt(u), s |= 0;
1317
- return e.colors[Math.abs(s) % e.colors.length];
1318
- }, e.enable(e.load()), e;
1319
- };
1320
- nn = zn, (V = zn.exports).formatArgs = function(n) {
1321
- if (n[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + n[0] + (this.useColors ? "%c " : " ") + "+" + nn.exports.humanize(this.diff), this.useColors) {
1322
- var e = "color: " + this.color;
1323
- n.splice(1, 0, e, "color: inherit");
1324
- var t = 0, r = 0;
1325
- n[0].replace(/%[a-zA-Z%]/g, function(o) {
1326
- o !== "%%" && (t++, o === "%c" && (r = t));
1327
- }), n.splice(r, 0, e);
1328
- }
1329
- }, V.save = function(n) {
1330
- try {
1331
- n ? V.storage.setItem("debug", n) : V.storage.removeItem("debug");
1332
- } catch {
1333
- }
1334
- }, V.load = function() {
1335
- var n;
1336
- try {
1337
- n = V.storage.getItem("debug");
1338
- } catch {
1339
- }
1340
- return !n && typeof process < "u" && "env" in process && (n = process.env.DEBUG), n;
1341
- }, V.useColors = function() {
1342
- return !(typeof window > "u" || !window.process || window.process.type !== "renderer" && !window.process.__nwjs) || (typeof navigator > "u" || !navigator.userAgent || !navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && (typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
1343
- }, V.storage = function() {
1344
- try {
1345
- return localStorage;
1346
- } catch {
1347
- }
1348
- }(), V.destroy = (Cn = !1, function() {
1349
- Cn || (Cn = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
1350
- }), V.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"], V.log = console.debug || console.log || function() {
1351
- }, nn.exports = sa(V), nn.exports.formatters.j = function(n) {
1352
- try {
1353
- return JSON.stringify(n);
1354
- } catch (e) {
1355
- return "[UnexpectedJSONParseError]: " + e.message;
1356
- }
1357
- };
1358
- var or = zn.exports, Ei = or("cookie");
1359
- function Lr() {
1360
- var n;
1361
- try {
1362
- n = document.cookie;
1363
- } catch (e) {
1364
- return typeof console < "u" && typeof console.error == "function" && console.error(e.stack || e), {};
1365
- }
1366
- return function(e) {
1367
- var t, r = {}, o = e.split(/ *; */);
1368
- if (o[0] == "")
1369
- return r;
1370
- for (var s = 0; s < o.length; ++s)
1371
- r[Fr((t = o[s].split("="))[0])] = Fr(t[1]);
1372
- return r;
1373
- }(n);
1374
- }
1375
- function Mr(n) {
1376
- try {
1377
- return encodeURIComponent(n);
1378
- } catch (e) {
1379
- Ei("error `encode(%o)` - %o", n, e);
1380
- }
1381
- }
1382
- function Fr(n) {
1383
- try {
1384
- return decodeURIComponent(n);
1385
- } catch (e) {
1386
- Ei("error `decode(%o)` - %o", n, e);
1387
- }
1388
- }
1389
- var On = ve(function(n, e, t) {
1390
- switch (arguments.length) {
1391
- case 3:
1392
- case 2:
1393
- return function(r, o, s) {
1394
- s = s || {};
1395
- var u = Mr(r) + "=" + Mr(o);
1396
- o == null && (s.maxage = -1), s.maxage && (s.expires = new Date(+/* @__PURE__ */ new Date() + s.maxage)), s.path && (u += "; path=" + s.path), s.domain && (u += "; domain=" + s.domain), s.expires && (u += "; expires=" + s.expires.toUTCString()), s.samesite && (u += "; samesite=" + s.samesite), s.secure && (u += "; secure"), document.cookie = u;
1397
- }(n, e, t);
1398
- case 1:
1399
- return function(r) {
1400
- return Lr()[r];
1401
- }(n);
1402
- default:
1403
- return Lr();
1404
- }
1405
- }), Vn = { exports: {} }, Br = Math.max, aa = function(n, e) {
1406
- var t = e ? e.length : 0;
1407
- if (!t)
1408
- return [];
1409
- for (var r = Br(Number(n) || 0, 0), o = Br(t - r, 0), s = new Array(o), u = 0; u < o; u += 1)
1410
- s[u] = e[u + r];
1411
- return s;
1412
- }, ua = Math.max, ca = function(n) {
1413
- if (n == null || !n.length)
1414
- return [];
1415
- for (var e = new Array(ua(n.length - 2, 0)), t = 1; t < n.length; t += 1)
1416
- e[t - 1] = n[t];
1417
- return e;
1418
- }, la = aa, Ci = ca, Oi = Object.prototype.hasOwnProperty, fa = Object.prototype.toString, Nr = function(n) {
1419
- return !!n && fa.call(n) === "[object Object]";
1420
- }, ha = function(n, e, t, r) {
1421
- return Oi.call(e, r) && n[r] === void 0 && (n[r] = t), e;
1422
- }, da = function(n, e, t, r) {
1423
- return Oi.call(e, r) && (Nr(n[r]) && Nr(t) ? n[r] = Si(n[r], t) : n[r] === void 0 && (n[r] = t)), e;
1424
- }, _i = function(n, e) {
1425
- if (t = e, !t || L(t) !== "object")
1426
- return e;
1427
- var t;
1428
- n = n || ha;
1429
- for (var r = la(2, arguments), o = 0; o < r.length; o += 1)
1430
- for (var s in r[o])
1431
- n(e, r[o], r[o][s], s);
1432
- return e;
1433
- }, Si = function(n) {
1434
- return _i.apply(null, [da, n].concat(Ci(arguments)));
1435
- };
1436
- Vn.exports = function(n) {
1437
- return _i.apply(null, [null, n].concat(Ci(arguments)));
1438
- }, Vn.exports.deep = Si;
1439
- var wi = ve(Vn.exports), $n = { exports: {} }, Ti = or("cookie"), pa = function(n, e, t) {
1440
- switch (arguments.length) {
1441
- case 3:
1442
- case 2:
1443
- return function(r, o, s) {
1444
- s = s || {};
1445
- var u = jr(r) + "=" + jr(o);
1446
- o == null && (s.maxage = -1), s.maxage && (s.expires = new Date(+/* @__PURE__ */ new Date() + s.maxage)), s.path && (u += "; path=" + s.path), s.domain && (u += "; domain=" + s.domain), s.expires && (u += "; expires=" + s.expires.toUTCString()), s.secure && (u += "; secure"), document.cookie = u;
1447
- }(n, e, t);
1448
- case 1:
1449
- return function(r) {
1450
- return Gr()[r];
1451
- }(n);
1452
- default:
1453
- return Gr();
1454
- }
1455
- };
1456
- function Gr() {
1457
- var n;
1458
- try {
1459
- n = document.cookie;
1460
- } catch (e) {
1461
- return typeof console < "u" && typeof console.error == "function" && console.error(e.stack || e), {};
1462
- }
1463
- return function(e) {
1464
- var t, r = {}, o = e.split(/ *; */);
1465
- if (o[0] == "")
1466
- return r;
1467
- for (var s = 0; s < o.length; ++s)
1468
- r[Ur((t = o[s].split("="))[0])] = Ur(t[1]);
1469
- return r;
1470
- }(n);
1471
- }
1472
- function jr(n) {
1473
- try {
1474
- return encodeURIComponent(n);
1475
- } catch (e) {
1476
- Ti("error `encode(%o)` - %o", n, e);
1477
- }
1478
- }
1479
- function Ur(n) {
1480
- try {
1481
- return decodeURIComponent(n);
1482
- } catch (e) {
1483
- Ti("error `decode(%o)` - %o", n, e);
1484
- }
1485
- }
1486
- (function(n, e) {
1487
- var t = pa;
1488
- function r(o) {
1489
- for (var s = e.cookie, u = e.levels(o), a = 0; a < u.length; ++a) {
1490
- var c = "__tld__", l = u[a], h = { domain: "." + l };
1491
- if (s(c, 1, h), s(c))
1492
- return s(c, null, h), l;
1493
- }
1494
- return "";
1495
- }
1496
- r.levels = function(o) {
1497
- var s, u, a = (typeof window.URL != "function" ? (s = o, (u = document.createElement("a")).href = s, u.hostname) : new URL(o).hostname).split("."), c = a[a.length - 1], l = [];
1498
- if (a.length === 4 && c === parseInt(c, 10) || a.length <= 1)
1499
- return l;
1500
- for (var h = a.length - 2; h >= 0; --h)
1501
- l.push(a.slice(h).join("."));
1502
- return l;
1503
- }, r.cookie = t, e = n.exports = r;
1504
- })($n, $n.exports);
1505
- var ga = ve($n.exports), bt = new (function() {
1506
- function n(e) {
1507
- B(this, n), this.cOpts = {}, this.options(e), this.isSupportAvailable = this.checkSupportAvailability();
1508
- }
1509
- return N(n, [{ key: "options", value: function() {
1510
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1511
- if (arguments.length === 0)
1512
- return this.cOpts;
1513
- var t = ".".concat(ga(window.location.href));
1514
- return t === "." && (t = null), this.cOpts = wi(e, { maxage: 31536e6, path: "/", domain: t, samesite: "Lax" }), e.sameDomainCookiesOnly && delete this.cOpts.domain, this.cOpts;
1515
- } }, { key: "set", value: function(e, t) {
1516
- try {
1517
- return On(e, t, j(this.cOpts)), !0;
1518
- } catch (r) {
1519
- return D.error(r), !1;
1520
- }
1521
- } }, { key: "get", value: function(e) {
1522
- return On(e);
1523
- } }, { key: "remove", value: function(e) {
1524
- try {
1525
- return On(e, null, j(this.cOpts)), !0;
1526
- } catch {
1527
- return !1;
1528
- }
1529
- } }, { key: "checkSupportAvailability", value: function() {
1530
- var e = "test_rudder_cookie";
1531
- return this.set(e, !0), !!this.get(e) && (this.remove(e), !0);
1532
- } }]), n;
1533
- }())({}), Ri = { exports: {} };
1534
- Ri.exports = function() {
1535
- function n(f) {
1536
- return f = JSON.stringify(f), !!/^\{[\s\S]*\}$/.test(f);
1537
- }
1538
- function e(f) {
1539
- return f === void 0 || typeof f == "function" ? f + "" : JSON.stringify(f);
1540
- }
1541
- function t(f) {
1542
- if (typeof f == "string")
1543
- try {
1544
- return JSON.parse(f);
1545
- } catch {
1546
- return f;
1547
- }
1548
- }
1549
- function r(f) {
1550
- return {}.toString.call(f) === "[object Function]";
1551
- }
1552
- function o(f) {
1553
- return Object.prototype.toString.call(f) === "[object Array]";
1554
- }
1555
- function s(f) {
1556
- var m = "_Is_Incognit", g = "yes";
1557
- try {
1558
- f || (f = window.localStorage), f.setItem(m, g), f.removeItem(m);
1559
- } catch {
1560
- var b = { _data: {}, setItem: function(d, y) {
1561
- return b._data[d] = String(y);
1562
- }, getItem: function(d) {
1563
- return b._data.hasOwnProperty(d) ? b._data[d] : void 0;
1564
- }, removeItem: function(d) {
1565
- return delete b._data[d];
1566
- }, clear: function() {
1567
- return b._data = {};
1568
- } };
1569
- f = b;
1570
- } finally {
1571
- f.getItem(m) === g && f.removeItem(m);
1572
- }
1573
- return f;
1574
- }
1575
- var u = s();
1576
- function a() {
1577
- if (!(this instanceof a))
1578
- return new a();
1579
- }
1580
- a.prototype = { set: function(f, m) {
1581
- if (f && !n(f))
1582
- u.setItem(f, e(m));
1583
- else if (n(f))
1584
- for (var g in f)
1585
- this.set(g, f[g]);
1586
- return this;
1587
- }, get: function(f) {
1588
- if (f === void 0) {
1589
- var m = {};
1590
- return this.forEach(function(k, p) {
1591
- return m[k] = p;
1592
- }), m;
1593
- }
1594
- if (f.charAt(0) === "?")
1595
- return this.has(f.substr(1));
1596
- var g = arguments;
1597
- if (g.length > 1) {
1598
- for (var b = {}, R = 0, d = g.length; R < d; R++) {
1599
- var y = t(u.getItem(g[R]));
1600
- this.has(g[R]) && (b[g[R]] = y);
1601
- }
1602
- return b;
1603
- }
1604
- return t(u.getItem(f));
1605
- }, clear: function() {
1606
- return u.clear(), this;
1607
- }, remove: function(f) {
1608
- var m = this.get(f);
1609
- return u.removeItem(f), m;
1610
- }, has: function(f) {
1611
- return {}.hasOwnProperty.call(this.get(), f);
1612
- }, keys: function() {
1613
- var f = [];
1614
- return this.forEach(function(m) {
1615
- f.push(m);
1616
- }), f;
1617
- }, forEach: function(f) {
1618
- for (var m = 0, g = u.length; m < g; m++) {
1619
- var b = u.key(m);
1620
- f(b, this.get(b));
1621
- }
1622
- return this;
1623
- }, search: function(f) {
1624
- for (var m = this.keys(), g = {}, b = 0, R = m.length; b < R; b++)
1625
- m[b].indexOf(f) > -1 && (g[m[b]] = this.get(m[b]));
1626
- return g;
1627
- } };
1628
- var c = null;
1629
- function l(f, m) {
1630
- var g = arguments, b = null;
1631
- if (c || (c = a()), g.length === 0)
1632
- return c.get();
1633
- if (g.length === 1) {
1634
- if (typeof f == "string")
1635
- return c.get(f);
1636
- if (n(f))
1637
- return c.set(f);
1638
- }
1639
- if (g.length === 2 && typeof f == "string") {
1640
- if (!m)
1641
- return c.remove(f);
1642
- if (m && typeof m == "string")
1643
- return c.set(f, m);
1644
- m && r(m) && (b = null, b = m(f, c.get(f)), l.set(f, b));
1645
- }
1646
- if (g.length === 2 && o(f) && r(m))
1647
- for (var R = 0, d = f.length; R < d; R++)
1648
- b = m(f[R], c.get(f[R])), l.set(f[R], b);
1649
- return l;
1650
- }
1651
- for (var h in a.prototype)
1652
- l[h] = a.prototype[h];
1653
- return l;
1654
- }();
1655
- var _n = ve(Ri.exports), kt = new (function() {
1656
- function n(e) {
1657
- B(this, n), this.sOpts = {}, this.enabled = this.checkSupportAvailability(), this.options(e);
1658
- }
1659
- return N(n, [{ key: "options", value: function() {
1660
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1661
- return arguments.length === 0 || (wi(e, { enabled: !0 }), this.enabled = e.enabled && this.enabled, this.sOpts = e), this.sOpts;
1662
- } }, { key: "set", value: function(e, t) {
1663
- return _n.set(e, t);
1664
- } }, { key: "get", value: function(e) {
1665
- return _n.get(e);
1666
- } }, { key: "remove", value: function(e) {
1667
- return _n.remove(e);
1668
- } }, { key: "checkSupportAvailability", value: function() {
1669
- try {
1670
- var e = "test_rudder_ls";
1671
- return this.set(e, !0), !!this.get(e) && (this.remove(e), !0);
1672
- } catch {
1673
- return !1;
1674
- }
1675
- } }]), n;
1676
- }())({}), ma = function(n) {
1677
- return new TextDecoder().decode((e = n, t = globalThis.atob(e).split("").map(function(r) {
1678
- return r.charCodeAt(0);
1679
- }), new Uint8Array(t)));
1680
- var e, t;
1681
- }, Sn = "rl_user_id", wn = "rl_trait", Tn = "rl_anonymous_id", Rn = "rl_group_id", Pn = "rl_group_trait", Hr = "rl_page_init_referrer", qr = "rl_page_init_referring_domain", Dn = "rl_session", xn = "rl_auth_token", cn = "RudderEncrypt:", Ln = "RS_ENC_v3_", Pi = "Rudder", Mn = { segment: "ajs_anonymous_id" };
1682
- function Kr(n) {
1683
- try {
1684
- return n ? JSON.parse(n) : null;
1685
- } catch (e) {
1686
- return D.error(e), n || null;
1687
- }
1688
- }
1689
- function Di(n) {
1690
- return n.replace(/^\s+|\s+$/gm, "");
1691
- }
1692
- function Qr(n) {
1693
- return n && typeof n == "string" && Di(n) !== "" ? n.substring(0, cn.length) === cn ? ki.decrypt(n.substring(cn.length), Pi).toString(ra) : n.substring(0, Ln.length) === Ln ? ma(n.substring(Ln.length)) : n : n;
1694
- }
1695
- for (var rn, ya = function() {
1696
- function n() {
1697
- B(this, n), bt.isSupportAvailable ? this.storage = bt : (kt.enabled && (this.storage = kt), this.storage || D.error("No storage is available :: initializing the SDK without storage"));
1698
- }
1699
- return N(n, [{ key: "options", value: function() {
1700
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1701
- this.storage.options(e);
1702
- } }, { key: "setItem", value: function(e, t) {
1703
- var r = ye(t);
1704
- r !== null && this.storage.set(e, function(o) {
1705
- return Di(o) === "" ? o : "".concat(cn).concat(ki.encrypt(o, Pi).toString());
1706
- }(r));
1707
- } }, { key: "setStringItem", value: function(e, t) {
1708
- typeof t == "string" ? this.setItem(e, t) : D.error("[Storage] ".concat(e, " should be string"));
1709
- } }, { key: "setUserId", value: function(e) {
1710
- this.setStringItem(Sn, e);
1711
- } }, { key: "setUserTraits", value: function(e) {
1712
- this.setItem(wn, e);
1713
- } }, { key: "setGroupId", value: function(e) {
1714
- this.setStringItem(Rn, e);
1715
- } }, { key: "setGroupTraits", value: function(e) {
1716
- this.setItem(Pn, e);
1717
- } }, { key: "setAnonymousId", value: function(e) {
1718
- this.setStringItem(Tn, e);
1719
- } }, { key: "setInitialReferrer", value: function(e) {
1720
- this.setItem(Hr, e);
1721
- } }, { key: "setInitialReferringDomain", value: function(e) {
1722
- this.setItem(qr, e);
1723
- } }, { key: "setSessionInfo", value: function(e) {
1724
- this.setItem(Dn, e);
1725
- } }, { key: "setAuthToken", value: function(e) {
1726
- this.setItem(xn, e);
1727
- } }, { key: "getItem", value: function(e) {
1728
- return Kr(Qr(this.storage.get(e)));
1729
- } }, { key: "getUserId", value: function() {
1730
- return this.getItem(Sn);
1731
- } }, { key: "getUserTraits", value: function() {
1732
- return this.getItem(wn);
1733
- } }, { key: "getGroupId", value: function() {
1734
- return this.getItem(Rn);
1735
- } }, { key: "getGroupTraits", value: function() {
1736
- return this.getItem(Pn);
1737
- } }, { key: "fetchExternalAnonymousId", value: function(e) {
1738
- var t, r = e.toLowerCase();
1739
- return Object.keys(Mn).includes(r) && r === "segment" && (kt.enabled && (t = kt.get(Mn[r])), !t && bt.isSupportAvailable && (t = bt.get(Mn[r]))), t;
1740
- } }, { key: "getAnonymousId", value: function(e) {
1741
- var t = Kr(Qr(this.storage.get(Tn)));
1742
- if (t)
1743
- return t;
1744
- var r = Ot(e, "autoCapture.source");
1745
- if (Ot(e, "autoCapture.enabled") === !0 && typeof r == "string") {
1746
- var o = this.fetchExternalAnonymousId(r);
1747
- if (o)
1748
- return o;
1749
- }
1750
- return t;
1751
- } }, { key: "getInitialReferrer", value: function() {
1752
- return this.getItem(Hr);
1753
- } }, { key: "getInitialReferringDomain", value: function() {
1754
- return this.getItem(qr);
1755
- } }, { key: "getSessionInfo", value: function() {
1756
- return this.getItem(Dn);
1757
- } }, { key: "getAuthToken", value: function() {
1758
- return this.getItem(xn);
1759
- } }, { key: "removeItem", value: function(e) {
1760
- return this.storage.remove(e);
1761
- } }, { key: "removeSessionInfo", value: function() {
1762
- this.removeItem(Dn);
1763
- } }, { key: "clear", value: function(e) {
1764
- this.storage.remove(Sn), this.storage.remove(wn), this.storage.remove(Rn), this.storage.remove(Pn), this.storage.remove(xn), e && this.storage.remove(Tn);
1765
- } }]), n;
1766
- }(), mn = new ya(), ln = function(n, e) {
1767
- var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1768
- try {
1769
- if (document.getElementById(n))
1770
- return;
1771
- var r = document.createElement("script");
1772
- r.src = e, r.async = t.async === void 0 || t.async, r.type = "text/javascript", r.id = n, t.skipDatasetAttributes !== !0 && (r.setAttribute("data-loader", vi), t.isNonNativeSDK !== void 0 && r.setAttribute("data-isNonNativeSDK", t.isNonNativeSDK));
1773
- var o = document.getElementsByTagName("head");
1774
- if (o.length > 0)
1775
- o[0].insertBefore(r, o[0].firstChild);
1776
- else {
1777
- var s = document.getElementsByTagName("script")[0];
1778
- s.parentNode.insertBefore(r, s);
1779
- }
1780
- } catch (u) {
1781
- M(u);
1782
- }
1783
- }, zr = function(n) {
1784
- return n === null;
1785
- }, va = function(n, e) {
1786
- if (!Array.isArray(n) || !Array.isArray(e))
1787
- return j(e);
1788
- var t = j(n);
1789
- return e.forEach(function(r, o) {
1790
- t[o] = Array.isArray(r) || function(s) {
1791
- return !zr(s) && L(s) === "object" && !Array.isArray(s);
1792
- }(r) ? It(t[o], r) : r;
1793
- }), t;
1794
- }, It = function(n, e) {
1795
- return _o(va, n, e);
1796
- }, ba = function(n) {
1797
- return function(e) {
1798
- return !zr(e) && Object.prototype.toString.call(e) === "[object Object]";
1799
- }(n) && Object.keys(n).length > 0;
1800
- }, ze = 256, fn = []; ze--; )
1801
- fn[ze] = (ze + 256).toString(16).substring(1);
1802
- for (var Fn, Vr = 4096, hn = [], Le = 0; Le < 256; Le++)
1803
- hn[Le] = (Le + 256).toString(16).substring(1);
1804
- function ka() {
1805
- var n;
1806
- (!Fn || Le + 16 > Vr) && (n = Vr, Fn = crypto.getRandomValues(new Uint8Array(n)), Le = 0);
1807
- for (var e, t = 0, r = ""; t < 16; t++)
1808
- e = Fn[Le + t], r += t == 6 ? hn[15 & e | 64] : t == 8 ? hn[63 & e | 128] : hn[e], 1 & t && t > 1 && t < 11 && (r += "-");
1809
- return Le += 16, r;
1810
- }
1811
- var Ia = { All: "All", GA: "Google Analytics", GOOGLEADS: "Google Ads", BRAZE: "Braze", CHARTBEAT: "Chartbeat", COMSCORE: "Comscore", CUSTOMERIO: "Customer IO", DCM_Floodlight: "DCM Floodlight", FACEBOOK_PIXEL: "Facebook Pixel", GTM: "Google Tag Manager", HOTJAR: "Hotjar", HS: "HubSpot", INTERCOM: "Intercom", KEEN: "Keen", KISSMETRICS: "Kiss Metrics", LOTAME: "Lotame", VWO: "VWO", OPTIMIZELY: "Optimizely Web", FULLSTORY: "Fullstory", TVSQUARED: "TVSquared", GA4: "Google Analytics 4 (GA4)", MOENGAGE: "MoEngage", AM: "Amplitude", PENDO: "Pendo", LYTICS: "Lytics", APPCUES: "Appcues", POSTHOG: "PostHog", PROFITWELL: "ProfitWell", KLAVIYO: "Klaviyo", CLEVERTAP: "CleverTap", BINGADS: "Bing Ads", PINTEREST_TAG: "Pinterest Tag", SNAP_PIXEL: "Snap Pixel", LINKEDIN_INSIGHT_TAG: "Linkedin Insight Tag", REDDIT_PIXEL: "Reddit Pixel", DRIP: "Drip", HEAP: "Heap.io", CRITEO: "Criteo", MP: "Mixpanel", QUALTRICS: "Qualtrics", SENTRY: "Sentry", GOOGLE_OPTIMIZE: "Google Optimize", POST_AFFILIATE_PRO: "Post Affiliate Pro", LAUNCHDARKLY: "LaunchDarkly", GA360: "Google Analytics 360", ADROLL: "Adroll", VERO: "Vero", MATOMO: "Matomo", MOUSEFLOW: "Mouseflow", ROCKERBOX: "Rockerbox", CONVERTFLOW: "ConvertFlow", SNAPENGAGE: "SnapEngage", LIVECHAT: "LiveChat", SHYNET: "Shynet", WOOPRA: "Woopra", ROLLBAR: "RollBar", QUORA_PIXEL: "Quora Pixel", JUNE: "June", ENGAGE: "Engage", ITERABLE: "Iterable", YANDEX_METRICA: "Yandex.Metrica", REFINER: "Refiner", QUALAROO: "Qualaroo", PODSIGHTS: "Podsights", AXEPTIO: "Axeptio", SATISMETER: "Satismeter", MICROSOFT_CLARITY: "Microsoft Clarity", SENDINBLUE: "Sendinblue", OLARK: "Olark", LEMNISK: "Lemnisk", TIKTOK_ADS: "TikTok Ads", ACTIVE_CAMPAIGN: "ActiveCampaign", SPRIG: "Sprig", SPOTIFYPIXEL: "Spotify Pixel", COMMANDBAR: "CommandBar", NINETAILED: "Ninetailed" }, Bn = ["anonymous_id", "id", "sent_at", "received_at", "timestamp", "original_timestamp", "event_text", "event"], Nn = "https://api.rudderstack.com/sourceConfig/?p=npm&v=2.48.3", xi = "v1.1", Li = "js-integrations", Mi = "".concat("https://cdn.rudderlabs.com", "/").concat(xi, "/").concat(Li), $r = "https://polyfill.io/v3/polyfill.min.js?version=3.111.0&features=Number.isNaN%2CURL%2CArray.prototype.find%2CArray.prototype.includes%2CPromise%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CObject.entries%2CObject.values%2CElement.prototype.dataset%2CString.prototype.replaceAll%2CTextEncoder%2Cnavigator.sendBeacon", Aa = ["Lax", "None", "Strict"], Ea = ["US", "EU"], Ca = ["oneTrust", "ketch"], Wr = ["library", "consentManagement"], Oa = ["none", "default", "full"], _a = { All: !0 };
1812
- function _t(n) {
1813
- return n && n.endsWith("/") ? n.replace(/\/+$/, "") : n;
1814
- }
1815
- function Fi() {
1816
- return window.crypto && typeof window.crypto.getRandomValues == "function" ? ka() : function() {
1817
- var n, e = 0, t = "";
1818
- if (!rn || ze + 16 > 256) {
1819
- for (rn = Array(e = 256); e--; )
1820
- rn[e] = 256 * Math.random() | 0;
1821
- e = ze = 0;
1822
- }
1823
- for (; e < 16; e++)
1824
- n = rn[ze + e], t += e == 6 ? fn[15 & n | 64] : e == 8 ? fn[63 & n | 128] : fn[n], 1 & e && e > 1 && e < 11 && (t += "-");
1825
- return ze++, t;
1826
- }();
1827
- }
1828
- function St() {
1829
- return (/* @__PURE__ */ new Date()).toISOString();
1830
- }
1831
- function Bi(n, e) {
1832
- Object.keys(n).forEach(function(t) {
1833
- n.hasOwnProperty(t) && (e[t] && (n[e[t]] = n[t]), t !== "All" && e[t] !== void 0 && e[t] !== t && delete n[t]);
1834
- });
1835
- }
1836
- function Gn(n) {
1837
- Bi(n, yi);
1838
- }
1839
- function Yr(n) {
1840
- Bi(n, Ia);
1841
- }
1842
- function jn(n, e) {
1843
- var t = [];
1844
- if (!e || e.length === 0)
1845
- return t;
1846
- var r = !0;
1847
- n.All !== void 0 && (r = n.All);
1848
- var o = [];
1849
- return typeof e[0] == "string" ? e.forEach(function(s) {
1850
- o.push({ intgName: s, intObj: s });
1851
- }) : L(e[0]) === "object" && e.forEach(function(s) {
1852
- o.push({ intgName: s.name, intObj: s });
1853
- }), o.forEach(function(s) {
1854
- var u = s.intgName, a = s.intObj;
1855
- if (r) {
1856
- var c = !0;
1857
- n[u] !== void 0 && !n[u] && (c = !1), c && t.push(a);
1858
- } else
1859
- n[u] !== void 0 && n[u] && t.push(a);
1860
- }), t;
1861
- }
1862
- var on = function(n) {
1863
- return typeof n == "string" || n == null ? n : ye(n);
1864
- }, Xr = function(n) {
1865
- return typeof n == "string" && n.trim().length > 0;
1866
- }, Sa = function(n, e, t) {
1867
- try {
1868
- var r = n.source.dataplanes || {};
1869
- if (Object.keys(r).length > 0) {
1870
- var o = function(a) {
1871
- var c = a ? a.residencyServer : void 0;
1872
- if (c)
1873
- return typeof c == "string" && Ea.includes(c.toUpperCase()) ? c.toUpperCase() : void D.error("Invalid residencyServer input");
1874
- }(t), s = r[o] || r.US;
1875
- if (s) {
1876
- var u = function(a) {
1877
- if (Array.isArray(a) && a.length > 0) {
1878
- var c = a.find(function(l) {
1879
- return l.default === !0;
1880
- });
1881
- if (c && Xr(c.url))
1882
- return c.url;
1883
- }
1884
- }(s);
1885
- if (u)
1886
- return u;
1887
- }
1888
- }
1889
- if (Xr(e))
1890
- return e;
1891
- throw Error("Unable to load the SDK due to invalid data plane url");
1892
- } catch (a) {
1893
- throw Error(a);
1894
- }
1895
- };
1896
- function Ni() {
1897
- var n;
1898
- return ((n = document) === null || n === void 0 ? void 0 : n.referrer) || "$direct";
1899
- }
1900
- function Gi(n) {
1901
- var e = n.split("/");
1902
- return e.length >= 3 ? e[2] : "";
1903
- }
1904
- function Jr() {
1905
- for (var n = document.getElementsByTagName("link"), e = 0; n[e]; e += 1) {
1906
- var t = n[e];
1907
- if (t.getAttribute("rel") === "canonical")
1908
- return t.getAttribute("href");
1909
- }
1910
- }
1911
- function Zr() {
1912
- var n = Jr(), e = window.location.pathname;
1913
- if (n)
1914
- try {
1915
- e = new URL(n).pathname;
1916
- } catch {
1917
- }
1918
- var t = window.location, r = t.search, o = t.href, s = document.title, u = function(l) {
1919
- var h, f = Jr(), m = (h = f ? f.includes("?") ? f : f + l : window.location.href).indexOf("#");
1920
- return m > -1 ? h.slice(0, m) : h;
1921
- }(r), a = o, c = Ni();
1922
- return { path: e, referrer: c, referring_domain: Gi(c), search: r, title: s, url: u, tab_url: a, initial_referrer: mn.getInitialReferrer() || "", initial_referring_domain: mn.getInitialReferringDomain() || "" };
1923
- }
1924
- for (var sn, wa = N(function n() {
1925
- B(this, n), this.name = "RudderLabs JavaScript SDK", this.namespace = "com.rudderlabs.javascript", this.version = "2.48.3";
1926
- }), Ta = N(function n() {
1927
- B(this, n), this.name = "RudderLabs JavaScript SDK", this.version = "2.48.3";
1928
- }), Ra = N(function n() {
1929
- B(this, n), this.name = "", this.version = "";
1930
- }), Pa = N(function n() {
1931
- B(this, n), this.density = 0, this.width = 0, this.height = 0, this.innerWidth = 0, this.innerHeight = 0;
1932
- }), Da = N(function n() {
1933
- var e, t;
1934
- B(this, n), this.app = new wa(), this.traits = null, this.library = new Ta(), this.userAgent = function() {
1935
- if (typeof navigator > "u")
1936
- return null;
1937
- var r = navigator.userAgent, o = navigator.brave;
1938
- if (o && Object.getPrototypeOf(o).isBrave) {
1939
- var s = r.match(/(chrome)\/([\w.]+)/i);
1940
- s && (r = "".concat(r, " Brave/").concat(s[2]));
1941
- }
1942
- return r;
1943
- }(), this.device = null, this.network = null, this.os = new Ra(), this.locale = typeof navigator > "u" ? null : navigator.language || navigator.browserLanguage, this.screen = (e = new Pa(), typeof window > "u" || (e.width = window.screen.width, e.height = window.screen.height, e.density = window.devicePixelRatio, e.innerWidth = window.innerWidth, e.innerHeight = window.innerHeight), e), this.timezone = (t = (/* @__PURE__ */ new Date()).toString().match(/([A-Z]+[+-]\d+)/)) && t[1] ? t[1] : "NA";
1944
- }), xa = function() {
1945
- function n() {
1946
- B(this, n), this.channel = "web", this.context = new Da(), this.type = null, this.messageId = Fi(), this.originalTimestamp = (/* @__PURE__ */ new Date()).toISOString(), this.anonymousId = null, this.userId = null, this.event = null, this.properties = {};
1947
- }
1948
- return N(n, [{ key: "getProperty", value: function(e) {
1949
- return this.properties[e];
1950
- } }, { key: "addProperty", value: function(e, t) {
1951
- this.properties[e] = t;
1952
- } }]), n;
1953
- }(), ji = function() {
1954
- function n() {
1955
- B(this, n), this.message = new xa();
1956
- }
1957
- return N(n, [{ key: "setType", value: function(e) {
1958
- this.message.type = e;
1959
- } }, { key: "setProperty", value: function(e) {
1960
- this.message.properties = e;
1961
- } }, { key: "setUserProperty", value: function(e) {
1962
- this.message.user_properties = e;
1963
- } }, { key: "setUserId", value: function(e) {
1964
- this.message.userId = e;
1965
- } }, { key: "setEventName", value: function(e) {
1966
- this.message.event = e;
1967
- } }, { key: "getElementContent", value: function() {
1968
- return this.message;
1969
- } }]), n;
1970
- }(), vt = function() {
1971
- function n() {
1972
- B(this, n), this.rudderProperty = null, this.rudderUserProperty = null, this.event = null, this.userId = null, this.type = null;
1973
- }
1974
- return N(n, [{ key: "setType", value: function(e) {
1975
- return this.type = e, this;
1976
- } }, { key: "build", value: function() {
1977
- var e = new ji();
1978
- return e.setUserId(this.userId), e.setType(this.type), e.setEventName(this.event), e.setProperty(this.rudderProperty), e.setUserProperty(this.rudderUserProperty), e;
1979
- } }]), n;
1980
- }(), sr = {}, Ve = 256, dn = []; Ve--; )
1981
- dn[Ve] = (Ve + 256).toString(16).substring(1);
1982
- sr.v4 = function() {
1983
- var n, e = 0, t = "";
1984
- if (!sn || Ve + 16 > 256) {
1985
- for (sn = Array(e = 256); e--; )
1986
- sn[e] = 256 * Math.random() | 0;
1987
- e = Ve = 0;
1988
- }
1989
- for (; e < 16; e++)
1990
- n = sn[Ve + e], t += e == 6 ? dn[15 & n | 64] : e == 8 ? dn[63 & n | 128] : dn[n], 1 & e && e > 1 && e < 11 && (t += "-");
1991
- return Ve++, t;
1992
- };
1993
- var yn = {}, La = Object.prototype.hasOwnProperty, Ma = String.prototype.charAt, Fa = Object.prototype.toString, Ba = function(n, e) {
1994
- return Ma.call(n, e);
1995
- }, Wn = function(n, e) {
1996
- return La.call(n, e);
1997
- }, ei = function(n, e) {
1998
- e = e || Wn;
1999
- for (var t = [], r = 0, o = n.length; r < o; r += 1)
2000
- e(n, r) && t.push(String(r));
2001
- return t;
2002
- }, ar = function(n) {
2003
- return n == null ? [] : (e = n, Fa.call(e) === "[object String]" ? ei(n, Ba) : function(t) {
2004
- return t != null && typeof t != "function" && typeof t.length == "number";
2005
- }(n) ? ei(n, Wn) : function(t, r) {
2006
- r = r || Wn;
2007
- var o = [];
2008
- for (var s in t)
2009
- r(t, s) && o.push(String(s));
2010
- return o;
2011
- }(n));
2012
- var e;
2013
- }, Un = ar, Na = sr.v4, ti = { _data: {}, length: 0, setItem: function(n, e) {
2014
- return this._data[n] = e, this.length = Un(this._data).length, e;
2015
- }, getItem: function(n) {
2016
- return n in this._data ? this._data[n] : null;
2017
- }, removeItem: function(n) {
2018
- return n in this._data && delete this._data[n], this.length = Un(this._data).length, null;
2019
- }, clear: function() {
2020
- this._data = {}, this.length = 0;
2021
- }, key: function(n) {
2022
- return Un(this._data)[n];
2023
- } };
2024
- yn.defaultEngine = function() {
2025
- try {
2026
- if (!window.localStorage)
2027
- return !1;
2028
- var n = Na();
2029
- window.localStorage.setItem(n, "test_value");
2030
- var e = window.localStorage.getItem(n);
2031
- return window.localStorage.removeItem(n), e === "test_value";
2032
- } catch {
2033
- return !1;
2034
- }
2035
- }() ? window.localStorage : ti, yn.inMemoryEngine = ti;
2036
- var Ga = ar, Ui = Object.prototype.toString, ja = typeof Array.isArray == "function" ? Array.isArray : function(n) {
2037
- return Ui.call(n) === "[object Array]";
2038
- }, Ua = function(n) {
2039
- return n != null && (ja(n) || n !== "function" && function(e) {
2040
- var t = L(e);
2041
- return t === "number" || t === "object" && Ui.call(e) === "[object Number]";
2042
- }(n.length));
2043
- }, Ha = function(n, e) {
2044
- for (var t = 0; t < e.length && n(e[t], t, e) !== !1; t += 1)
2045
- ;
2046
- }, qa = function(n, e) {
2047
- for (var t = Ga(e), r = 0; r < t.length && n(e[t[r]], t[r], e) !== !1; r += 1)
2048
- ;
2049
- }, ur = function(n, e) {
2050
- return (Ua(e) ? Ha : qa).call(this, n, e);
2051
- }, Ka = yn.defaultEngine, ni = yn.inMemoryEngine, ri = ur, Qa = ar, za = JSON;
2052
- function Va(n) {
2053
- try {
2054
- return JSON.stringify(n, (e = [], function(t, r) {
2055
- if (L(r) !== "object" || r === null)
2056
- return r;
2057
- for (; e.length > 0 && e[e.length - 1] !== this; )
2058
- e.pop();
2059
- return e.includes(r) ? "[Circular Reference]" : (e.push(r), r);
2060
- }));
2061
- } catch {
2062
- return null;
2063
- }
2064
- var e;
2065
- }
2066
- function qe(n, e, t, r) {
2067
- this.id = e, this.name = n, this.keys = t || {}, this.engine = r || Ka, this.originalEngine = this.engine;
2068
- }
2069
- qe.prototype.set = function(n, e) {
2070
- var t = this._createValidKey(n);
2071
- if (t)
2072
- try {
2073
- this.engine.setItem(t, Va(e));
2074
- } catch (r) {
2075
- (function(o) {
2076
- var s = !1;
2077
- if (o.code)
2078
- switch (o.code) {
2079
- case 22:
2080
- s = !0;
2081
- break;
2082
- case 1014:
2083
- o.name === "NS_ERROR_DOM_QUOTA_REACHED" && (s = !0);
2084
- }
2085
- else
2086
- o.number === -2147024882 && (s = !0);
2087
- return s;
2088
- })(r) && (this._swapEngine(), this.set(n, e));
2089
- }
2090
- }, qe.prototype.get = function(n) {
2091
- try {
2092
- var e = this.engine.getItem(this._createValidKey(n));
2093
- return e === null ? null : za.parse(e);
2094
- } catch {
2095
- return null;
2096
- }
2097
- }, qe.prototype.getOriginalEngine = function() {
2098
- return this.originalEngine;
2099
- }, qe.prototype.remove = function(n) {
2100
- this.engine.removeItem(this._createValidKey(n));
2101
- }, qe.prototype._createValidKey = function(n) {
2102
- var e, t = this.name, r = this.id;
2103
- return Qa(this.keys).length ? (ri(function(o) {
2104
- o === n && (e = [t, r, n].join("."));
2105
- }, this.keys), e) : [t, r, n].join(".");
2106
- }, qe.prototype._swapEngine = function() {
2107
- var n = this;
2108
- ri(function(e) {
2109
- var t = n.get(e);
2110
- ni.setItem([n.name, n.id, e].join("."), t), n.remove(e);
2111
- }, this.keys), this.engine = ni;
2112
- };
2113
- var $a = qe, Wa = ur, Hi = { setTimeout: function(n, e) {
2114
- return window.setTimeout(n, e);
2115
- }, clearTimeout: function(n) {
2116
- return window.clearTimeout(n);
2117
- }, Date: window.Date }, st = Hi, an = { ASAP: 1, RESCHEDULE: 2, ABANDON: 3 };
2118
- function ge() {
2119
- this.tasks = {}, this.nextId = 1;
2120
- }
2121
- ge.prototype.now = function() {
2122
- return +new st.Date();
2123
- }, ge.prototype.run = function(n, e, t) {
2124
- var r = this.nextId++;
2125
- return this.tasks[r] = st.setTimeout(this._handle(r, n, e, t || an.ASAP), e), r;
2126
- }, ge.prototype.cancel = function(n) {
2127
- this.tasks[n] && (st.clearTimeout(this.tasks[n]), delete this.tasks[n]);
2128
- }, ge.prototype.cancelAll = function() {
2129
- Wa(st.clearTimeout, this.tasks), this.tasks = {};
2130
- }, ge.prototype._handle = function(n, e, t, r) {
2131
- var o = this, s = o.now();
2132
- return function() {
2133
- if (delete o.tasks[n], !(r >= an.RESCHEDULE && s + 2 * t < o.now()))
2134
- return e();
2135
- r === an.RESCHEDULE && o.run(e, t, r);
2136
- };
2137
- }, ge.setClock = function(n) {
2138
- st = n;
2139
- }, ge.resetClock = function() {
2140
- st = Hi;
2141
- }, ge.Modes = an;
2142
- var Ya = ge, qi = { exports: {} };
2143
- (function(n) {
2144
- function e(t) {
2145
- if (t)
2146
- return function(r) {
2147
- for (var o in e.prototype)
2148
- r[o] = e.prototype[o];
2149
- return r;
2150
- }(t);
2151
- }
2152
- qi.exports = e, e.prototype.on = e.prototype.addEventListener = function(t, r) {
2153
- return this._callbacks = this._callbacks || {}, (this._callbacks["$" + t] = this._callbacks["$" + t] || []).push(r), this;
2154
- }, e.prototype.once = function(t, r) {
2155
- function o() {
2156
- this.off(t, o), r.apply(this, arguments);
2157
- }
2158
- return o.fn = r, this.on(t, o), this;
2159
- }, e.prototype.off = e.prototype.removeListener = e.prototype.removeAllListeners = e.prototype.removeEventListener = function(t, r) {
2160
- if (this._callbacks = this._callbacks || {}, arguments.length == 0)
2161
- return this._callbacks = {}, this;
2162
- var o, s = this._callbacks["$" + t];
2163
- if (!s)
2164
- return this;
2165
- if (arguments.length == 1)
2166
- return delete this._callbacks["$" + t], this;
2167
- for (var u = 0; u < s.length; u++)
2168
- if ((o = s[u]) === r || o.fn === r) {
2169
- s.splice(u, 1);
2170
- break;
2171
- }
2172
- return s.length === 0 && delete this._callbacks["$" + t], this;
2173
- }, e.prototype.emit = function(t) {
2174
- this._callbacks = this._callbacks || {};
2175
- for (var r = new Array(arguments.length - 1), o = this._callbacks["$" + t], s = 1; s < arguments.length; s++)
2176
- r[s - 1] = arguments[s];
2177
- if (o) {
2178
- s = 0;
2179
- for (var u = (o = o.slice(0)).length; s < u; ++s)
2180
- o[s].apply(this, r);
2181
- }
2182
- return this;
2183
- }, e.prototype.listeners = function(t) {
2184
- return this._callbacks = this._callbacks || {}, this._callbacks["$" + t] || [];
2185
- }, e.prototype.hasListeners = function(t) {
2186
- return !!this.listeners(t).length;
2187
- };
2188
- })();
2189
- var Xa = qi.exports, At = sr.v4, Yn = $a, Hn = ur, ut = Ya, Ja = or("localstorage-retry");
2190
- function qn(n, e) {
2191
- return function() {
2192
- return n.apply(e, arguments);
2193
- };
2194
- }
2195
- function K(n, e, t) {
2196
- typeof e == "function" && (t = e), this.name = n, this.id = At(), this.fn = t, this.maxItems = e.maxItems || 1 / 0, this.maxAttempts = e.maxAttempts || 1 / 0, this.backoff = { MIN_RETRY_DELAY: e.minRetryDelay || 1e3, MAX_RETRY_DELAY: e.maxRetryDelay || 3e4, FACTOR: e.backoffFactor || 2, JITTER: e.backoffJitter || 0 }, this.timeouts = { ACK_TIMER: 1e3, RECLAIM_TIMER: 3e3, RECLAIM_TIMEOUT: 1e4, RECLAIM_WAIT: 500 }, this.keys = { IN_PROGRESS: "inProgress", QUEUE: "queue", RECLAIM_START: "reclaimStart", RECLAIM_END: "reclaimEnd", ACK: "ack" }, this._schedule = new ut(), this._processId = 0, this._store = new Yn(this.name, this.id, this.keys), this._store.set(this.keys.IN_PROGRESS, {}), this._store.set(this.keys.QUEUE, []), this._ack = qn(this._ack, this), this._checkReclaim = qn(this._checkReclaim, this), this._processHead = qn(this._processHead, this), this._running = !1;
2197
- }
2198
- Xa(K.prototype), K.prototype.start = function() {
2199
- this._running && this.stop(), this._running = !0, this._ack(), this._checkReclaim(), this._processHead();
2200
- }, K.prototype.stop = function() {
2201
- this._schedule.cancelAll(), this._running = !1;
2202
- }, K.prototype.shouldRetry = function(n, e) {
2203
- return !(e > this.maxAttempts);
2204
- }, K.prototype.getDelay = function(n) {
2205
- var e = this.backoff.MIN_RETRY_DELAY * Math.pow(this.backoff.FACTOR, n);
2206
- if (this.backoff.JITTER) {
2207
- var t = Math.random(), r = Math.floor(t * this.backoff.JITTER * e);
2208
- Math.floor(10 * t) < 5 ? e -= r : e += r;
2209
- }
2210
- return Number(Math.min(e, this.backoff.MAX_RETRY_DELAY).toPrecision(1));
2211
- }, K.prototype.addItem = function(n) {
2212
- this._enqueue({ item: n, attemptNumber: 0, time: this._schedule.now(), id: At() });
2213
- }, K.prototype.requeue = function(n, e, t, r) {
2214
- this.shouldRetry(n, e, t) ? this._enqueue({ item: n, attemptNumber: e, time: this._schedule.now() + this.getDelay(e), id: r || At() }) : this.emit("discard", n, e);
2215
- }, K.prototype._enqueue = function(n) {
2216
- var e = this._store.get(this.keys.QUEUE) || [];
2217
- (e = e.slice(-(this.maxItems - 1))).push(n), e = e.sort(function(t, r) {
2218
- return t.time - r.time;
2219
- }), this._store.set(this.keys.QUEUE, e), this._running && this._processHead();
2220
- }, K.prototype._processHead = function() {
2221
- var n = this, e = this._store;
2222
- this._schedule.cancel(this._processId);
2223
- var t = e.get(this.keys.QUEUE) || [], r = e.get(this.keys.IN_PROGRESS) || {}, o = this._schedule.now(), s = [];
2224
- function u(h, f) {
2225
- s.push({ item: h.item, done: function(m, g) {
2226
- var b = e.get(n.keys.IN_PROGRESS) || {};
2227
- delete b[f], e.set(n.keys.IN_PROGRESS, b), n.emit("processed", m, g, h.item), m && n.requeue(h.item, h.attemptNumber + 1, m, h.id);
2228
- } });
2229
- }
2230
- for (var a = Object.keys(r).length; t.length && t[0].time <= o && a++ < n.maxItems; ) {
2231
- var c = t.shift(), l = At();
2232
- r[l] = { item: c.item, attemptNumber: c.attemptNumber, time: n._schedule.now() }, u(c, l);
2233
- }
2234
- e.set(this.keys.QUEUE, t), e.set(this.keys.IN_PROGRESS, r), Hn(function(h) {
2235
- try {
2236
- n.fn(h.item, h.done);
2237
- } catch (f) {
2238
- Ja("Process function threw error: " + f);
2239
- }
2240
- }, s), t = e.get(this.keys.QUEUE) || [], this._schedule.cancel(this._processId), t.length > 0 && (this._processId = this._schedule.run(this._processHead, t[0].time - o, ut.Modes.ASAP));
2241
- }, K.prototype._ack = function() {
2242
- this._store.set(this.keys.ACK, this._schedule.now()), this._store.set(this.keys.RECLAIM_START, null), this._store.set(this.keys.RECLAIM_END, null), this._schedule.run(this._ack, this.timeouts.ACK_TIMER, ut.Modes.ASAP);
2243
- }, K.prototype._checkReclaim = function() {
2244
- var n = this;
2245
- Hn(function(e) {
2246
- e.id !== n.id && (n._schedule.now() - e.get(n.keys.ACK) < n.timeouts.RECLAIM_TIMEOUT || function(t) {
2247
- t.set(n.keys.RECLAIM_START, n.id), t.set(n.keys.ACK, n._schedule.now()), n._schedule.run(function() {
2248
- t.get(n.keys.RECLAIM_START) === n.id && (t.set(n.keys.RECLAIM_END, n.id), n._schedule.run(function() {
2249
- t.get(n.keys.RECLAIM_END) === n.id && t.get(n.keys.RECLAIM_START) === n.id && n._reclaim(t.id);
2250
- }, n.timeouts.RECLAIM_WAIT, ut.Modes.ABANDON));
2251
- }, n.timeouts.RECLAIM_WAIT, ut.Modes.ABANDON);
2252
- }(e));
2253
- }, function(e) {
2254
- for (var t = [], r = n._store.getOriginalEngine(), o = 0; o < r.length; o++) {
2255
- var s = r.key(o);
2256
- if (s !== null) {
2257
- var u = s.split(".");
2258
- u.length === 3 && u[0] === e && u[2] === "ack" && t.push(new Yn(e, u[1], n.keys));
2259
- }
2260
- }
2261
- return t;
2262
- }(this.name)), this._schedule.run(this._checkReclaim, this.timeouts.RECLAIM_TIMER, ut.Modes.RESCHEDULE);
2263
- }, K.prototype._reclaim = function(n) {
2264
- var e = this, t = new Yn(this.name, n, this.keys), r = { queue: this._store.get(this.keys.QUEUE) || [] }, o = { inProgress: t.get(this.keys.IN_PROGRESS) || {}, queue: t.get(this.keys.QUEUE) || [] }, s = [], u = function(a, c) {
2265
- Hn(function(l) {
2266
- var h = l.id || At();
2267
- s.indexOf(h) >= 0 ? e.emit("duplication", l.item, l.attemptNumber) : (r.queue.push({ item: l.item, attemptNumber: l.attemptNumber + c, time: e._schedule.now(), id: h }), s.push(h));
2268
- }, a);
2269
- };
2270
- u(o.queue, 0), u(o.inProgress, 1), r.queue = r.queue.sort(function(a, c) {
2271
- return a.time - c.time;
2272
- }), this._store.set(this.keys.QUEUE, r.queue);
2273
- try {
2274
- this._clearOtherQueue(t, 1);
2275
- } catch (a) {
2276
- if (a.name === "NS_ERROR_STORAGE_BUSY" || a.code === "NS_ERROR_STORAGE_BUSY" || a.code === 2153971713)
2277
- try {
2278
- this._clearOtherQueue(t, 40);
2279
- } catch (c) {
2280
- console.error(c);
2281
- }
2282
- else
2283
- console.error(a);
2284
- }
2285
- this._processHead();
2286
- }, K.prototype._clearOtherQueue = function(n, e) {
2287
- var t = this;
2288
- setTimeout(function() {
2289
- n.remove(t.keys.IN_PROGRESS), setTimeout(function() {
2290
- n.remove(t.keys.QUEUE), setTimeout(function() {
2291
- n.remove(t.keys.RECLAIM_START), setTimeout(function() {
2292
- n.remove(t.keys.RECLAIM_END), setTimeout(function() {
2293
- n.remove(t.keys.ACK);
2294
- }, e);
2295
- }, e);
2296
- }, e);
2297
- }, e);
2298
- }, e);
2299
- };
2300
- var Ki = ve(K), ii = { maxRetryDelay: 36e4, minRetryDelay: 1e3, backoffFactor: 2, maxAttempts: 10, maxItems: 100 }, Za = function() {
2301
- function n() {
2302
- B(this, n), this.url = "", this.writeKey = "";
2303
- }
2304
- return N(n, [{ key: "init", value: function(e, t, r) {
2305
- var o = this;
2306
- this.url = t, this.writeKey = e, r && $e(ii, r), this.payloadQueue = new Ki("rudder", ii, function(s, u) {
2307
- s.message.sentAt = St(), o.processQueueElement(s.url, s.headers, s.message, 3e4, function(a, c) {
2308
- if (a)
2309
- return u(a);
2310
- u(null, c);
2311
- });
2312
- }), this.payloadQueue.start();
2313
- } }, { key: "processQueueElement", value: function(e, t, r, o, s) {
2314
- try {
2315
- var u = new XMLHttpRequest();
2316
- for (var a in u.open("POST", e, !0), t)
2317
- u.setRequestHeader(a, t[a]);
2318
- u.timeout = o, u.ontimeout = s, u.onerror = s, u.onreadystatechange = function() {
2319
- if (u.readyState === 4)
2320
- if (u.status === 429 || u.status >= 500 && u.status < 600) {
2321
- var l = "".concat(rr, ' "').concat(u.status, '" status text: "').concat(u.statusText, '" for URL: "').concat(e, '"'), h = new Error(l);
2322
- M(h), s(h);
2323
- } else
2324
- s(null, u.status);
2325
- };
2326
- var c = ye(r, !0);
2327
- c ? u.send(c) : D.error("Invalid payload: Event dropped");
2328
- } catch (l) {
2329
- s(l);
2330
- }
2331
- } }, { key: "enqueue", value: function(e, t) {
2332
- var r = { "Content-Type": "application/json", Authorization: "Basic ".concat(btoa("".concat(this.writeKey, ":"))), AnonymousId: btoa(e.anonymousId) };
2333
- this.payloadQueue.addItem({ url: "".concat(this.url, "/v1/").concat(t), headers: r, message: e });
2334
- } }]), n;
2335
- }(), eu = "queue", tu = 64e3, nu = function() {
2336
- function n() {
2337
- B(this, n), this.storage = kt, this.maxItems = 10, this.flushQueueTimeOut = void 0, this.timeOutActive = !1, this.flushQueueTimeOutInterval = 6e5, this.url = "", this.writekey = "", this.queueName = "".concat(eu, ".").concat(Date.now());
2338
- }
2339
- return N(n, [{ key: "sendQueueDataForBeacon", value: function() {
2340
- this.sendDataFromQueueAndDestroyQueue();
2341
- } }, { key: "init", value: function(e, t, r) {
2342
- this.url = t, this.writekey = e, r.maxItems && (this.maxItems = r.maxItems), r.flushQueueInterval && (this.flushQueueTimeOutInterval = r.flushQueueInterval), this.sendQueueDataForBeacon = this.sendQueueDataForBeacon.bind(this), this.attachListeners();
2343
- } }, { key: "attachListeners", value: function() {
2344
- var e = this;
2345
- window.addEventListener("visibilitychange", function() {
2346
- document.visibilityState === "hidden" && e.sendQueueDataForBeacon();
2347
- });
2348
- } }, { key: "getQueue", value: function() {
2349
- return this.storage.get(this.queueName);
2350
- } }, { key: "setQueue", value: function(e) {
2351
- this.storage.set(this.queueName, e);
2352
- } }, { key: "enqueue", value: function(e) {
2353
- var t = this.getQueue() || [];
2354
- (t = t.slice(-(this.maxItems - 1))).push(e);
2355
- var r = t.slice(0), o = { batch: r, sentAt: St() }, s = ye(o, !0);
2356
- s && s.length > tu && (r = t.slice(0, t.length - 1), this.flushQueue(r), (t = this.getQueue()).push(e)), this.setQueue(t), this.setTimer(), t.length === this.maxItems && this.flushQueue(r);
2357
- } }, { key: "sendDataFromQueueAndDestroyQueue", value: function() {
2358
- this.sendDataFromQueue(), this.storage.remove(this.queueName);
2359
- } }, { key: "sendDataFromQueue", value: function() {
2360
- var e = this.getQueue();
2361
- if (e && e.length > 0) {
2362
- var t = e.slice(0, e.length);
2363
- this.flushQueue(t);
2364
- }
2365
- } }, { key: "flushQueue", value: function(e) {
2366
- if (e && e.length > 0) {
2367
- var t = St();
2368
- e.forEach(function(u) {
2369
- u.sentAt = t;
2370
- });
2371
- var r = ye({ batch: e, sentAt: t }, !0);
2372
- if (r !== null) {
2373
- var o = new Blob([r], { type: "text/plain" }), s = "".concat(this.url, "?writeKey=").concat(this.writekey);
2374
- try {
2375
- typeof navigator.sendBeacon != "function" && M(new Error("Beacon API is not supported by browser")), navigator.sendBeacon(s, o) || M(new Error("Unable to queue data to browser's beacon queue"));
2376
- } catch (u) {
2377
- u.message = "".concat(u.message, " - While sending Beacon data to: ").concat(s), M(u);
2378
- }
2379
- } else
2380
- D.error("Invalid payload: Event dropped");
2381
- }
2382
- this.setQueue([]), this.clearTimer();
2383
- } }, { key: "setTimer", value: function() {
2384
- this.timeOutActive || (this.flushQueueTimeOut = setTimeout(this.sendDataFromQueue.bind(this), this.flushQueueTimeOutInterval), this.timeOutActive = !0);
2385
- } }, { key: "clearTimer", value: function() {
2386
- this.timeOutActive && (clearTimeout(this.flushQueueTimeOut), this.timeOutActive = !1);
2387
- } }]), n;
2388
- }(), ru = function() {
2389
- function n() {
2390
- B(this, n), this.queue = void 0;
2391
- }
2392
- return N(n, [{ key: "initialize", value: function(e, t, r) {
2393
- var o = {}, s = _t(t);
2394
- r && r.useBeacon && navigator.sendBeacon ? (r.beaconQueueOptions && r.beaconQueueOptions != null && L(r.beaconQueueOptions) === "object" && (o = r.beaconQueueOptions), s = "".concat(s, "/beacon/v1/batch"), this.queue = new nu()) : (r && r.useBeacon && D.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"), r && r.queueOptions && r.queueOptions != null && L(r.queueOptions) === "object" && (o = r.queueOptions), this.queue = new Za()), this.queue.init(e, s, o);
2395
- } }, { key: "enqueue", value: function(e, t) {
2396
- var r = e.getElementContent();
2397
- r.originalTimestamp = r.originalTimestamp || St(), r.sentAt = St();
2398
- var o = ye(r, !0);
2399
- o && o.length > 32e3 && D.error("[EventRepository] enqueue:: message length greater 32 Kb ", r), this.queue.enqueue(r, t);
2400
- } }]), n;
2401
- }(), iu = new ru(), oi = { maxRetryDelay: 36e4, minRetryDelay: 1e3, backoffFactor: 2, maxAttempts: 1 / 0 }, ou = function() {
2402
- function n() {
2403
- B(this, n), this.callback = void 0, this.processQueueElements = !1;
2404
- }
2405
- return N(n, [{ key: "init", value: function(e, t) {
2406
- var r = this;
2407
- e && $e(oi, e), t && (this.callback = t), this.payloadQueue = new Ki("rs_events", oi, function(o, s) {
2408
- r.processQueueElement(o.type, o.rudderElement, function(u, a) {
2409
- if (u)
2410
- return s(u);
2411
- s(null, a);
2412
- });
2413
- }), this.payloadQueue.start();
2414
- } }, { key: "activateProcessor", value: function() {
2415
- this.processQueueElements = !0;
2416
- } }, { key: "processQueueElement", value: function(e, t, r) {
2417
- try {
2418
- this.processQueueElements ? (Object.setPrototypeOf(t, ji.prototype), this.callback(e, t), r(null)) : r(new Error("The queue elements are not ready to be processed yet"));
2419
- } catch (o) {
2420
- r(o);
2421
- }
2422
- } }, { key: "enqueue", value: function(e, t) {
2423
- this.payloadQueue.addItem({ type: e, rudderElement: t });
2424
- } }]), n;
2425
- }(), su = function(n) {
2426
- for (var e = function() {
2427
- for (var o, s = [], u = 0; u < 256; u++) {
2428
- o = u;
2429
- for (var a = 0; a < 8; a++)
2430
- o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
2431
- s[u] = o;
2432
- }
2433
- return s;
2434
- }(), t = -1, r = 0; r < n.length; r++)
2435
- t = t >>> 8 ^ e[255 & (t ^ n.charCodeAt(r))];
2436
- return (-1 ^ t) >>> 0;
2437
- }, si = { getUserLanguage: function() {
2438
- return navigator && navigator.language;
2439
- }, getUserAgent: function() {
2440
- return navigator && navigator.userAgent;
2441
- } };
2442
- function au() {
2443
- var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
2444
- return n = n.endsWith("..") ? n.substr(0, n.length - 2) : n, decodeURIComponent(atob(n).split("").map(function(e) {
2445
- return "%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2));
2446
- }).join(""));
2447
- }
2448
- var uu = /^[a-zA-Z0-9\-_.]+$/, cu = 1, lu = 1, Ct = "*";
2449
- function fu(n, e, t, r) {
2450
- var o = function(a, c) {
2451
- return [a, (/* @__PURE__ */ new Date()).getTimezoneOffset(), c].join(Ct);
2452
- }(t, r), s = e || 0, u = Math.floor(Date.now() / 6e4) - s;
2453
- return su([o, u, n].join(Ct)).toString(36);
2454
- }
2455
- function hu(n) {
2456
- var e = function(o) {
2457
- var s = o.split(Ct), u = s.length % 2 == 0;
2458
- return s.length < 4 || !u || Number(s.shift()) !== lu ? null : { checksum: s.shift(), serializedIds: s.join(Ct) };
2459
- }(n);
2460
- if (!e)
2461
- return null;
2462
- var t = e.checksum, r = e.serializedIds;
2463
- return function(o, s) {
2464
- for (var u = si.getUserAgent(), a = si.getUserLanguage(), c = 0; c <= cu; c += 1)
2465
- if (fu(o, c, u, a) === s)
2466
- return !0;
2467
- return !1;
2468
- }(r, t) ? function(o) {
2469
- for (var s = {}, u = o.split(Ct), a = 0; a < u.length; a += 2) {
2470
- var c = u[a];
2471
- if (uu.test(c)) {
2472
- var l = au(u[a + 1]);
2473
- s[c] = l;
2474
- }
2475
- }
2476
- return s;
2477
- }(r) : null;
2478
- }
2479
- var du = function() {
2480
- function n() {
2481
- var e = this;
2482
- if (B(this, n), i(this, "isInitialized", !1), window.OneTrust && window.OnetrustActiveGroups) {
2483
- this.userSetConsentGroupIds = window.OnetrustActiveGroups.split(",").filter(function(r) {
2484
- return r;
2485
- });
2486
- var t = window.OneTrust.GetDomainData().Groups;
2487
- this.userSetConsentGroupNames = [], this.userDeniedConsentGroupIds = [], t.forEach(function(r) {
2488
- var o = r.CustomGroupId, s = r.GroupName;
2489
- e.userSetConsentGroupIds.includes(o) ? e.userSetConsentGroupNames.push(s.toUpperCase().trim()) : e.userDeniedConsentGroupIds.push(o);
2490
- }), this.userSetConsentGroupIds = this.userSetConsentGroupIds.map(function(r) {
2491
- return r.toUpperCase();
2492
- }), this.isInitialized = !0;
2493
- } else
2494
- D.error("OneTrust resources are not accessible.");
2495
- }
2496
- return N(n, [{ key: "isEnabled", value: function(e) {
2497
- var t = this;
2498
- try {
2499
- if (!this.isInitialized)
2500
- return !0;
2501
- var r = e.oneTrustCookieCategories;
2502
- if (!r)
2503
- return !0;
2504
- var o = r.map(function(s) {
2505
- return s.oneTrustCookieCategory;
2506
- }).filter(function(s) {
2507
- return s;
2508
- });
2509
- return o.every(function(s) {
2510
- return t.userSetConsentGroupIds.includes(s.toUpperCase().trim()) || t.userSetConsentGroupNames.includes(s.toUpperCase().trim());
2511
- });
2512
- } catch (s) {
2513
- return D.error("Error during onetrust cookie consent management ".concat(s)), !0;
2514
- }
2515
- } }, { key: "getDeniedList", value: function() {
2516
- return this.isInitialized ? this.userDeniedConsentGroupIds : [];
2517
- } }]), n;
2518
- }(), pu = function() {
2519
- function n() {
2520
- var e = this;
2521
- if (B(this, n), i(this, "updatePurposes", function(r) {
2522
- r && Object.entries(r).forEach(function(o) {
2523
- var s = o[0];
2524
- o[1] ? e.userConsentedPurposes.push(s) : e.userDeniedPurposes.push(s);
2525
- });
2526
- }), this.userConsentedPurposes = [], this.userDeniedPurposes = [], window.updateKetchConsent = function(r) {
2527
- r && (e.userConsentedPurposes = [], e.userDeniedPurposes = [], e.updatePurposes(r));
2528
- }, window.getKetchUserConsentedPurposes = function() {
2529
- return e.userConsentedPurposes.slice();
2530
- }, window.getKetchUserDeniedPurposes = function() {
2531
- return e.userDeniedPurposes.slice();
2532
- }, window.ketchConsent)
2533
- this.updatePurposes(window.ketchConsent);
2534
- else {
2535
- var t = this.getConsent();
2536
- this.updatePurposes(t);
2537
- }
2538
- }
2539
- return N(n, [{ key: "isEnabled", value: function(e) {
2540
- var t = this;
2541
- try {
2542
- var r = e.ketchConsentPurposes;
2543
- if (!r || r.length === 0)
2544
- return !0;
2545
- var o = r.map(function(s) {
2546
- return s.purpose;
2547
- }).filter(function(s) {
2548
- return s;
2549
- });
2550
- return o.some(function(s) {
2551
- return t.userConsentedPurposes.includes(s.trim());
2552
- });
2553
- } catch (s) {
2554
- return D.error("Error occured checking ketch consent state ".concat(s)), !0;
2555
- }
2556
- } }, { key: "getDeniedList", value: function() {
2557
- return this.userDeniedPurposes;
2558
- } }, { key: "getConsent", value: function() {
2559
- var e = bt.get("_ketch_consent_v1_");
2560
- if (e) {
2561
- var t;
2562
- try {
2563
- t = JSON.parse(atob(e));
2564
- } catch (o) {
2565
- return void D.error("Error occurred while parsing consent cookie ".concat(o));
2566
- }
2567
- if (t) {
2568
- var r = {};
2569
- return Object.entries(t).forEach(function(o) {
2570
- var s = o[0], u = o[1];
2571
- u && u.status && (r[s] = u.status === "granted");
2572
- }), r;
2573
- }
2574
- }
2575
- } }]), n;
2576
- }(), gu = function(n) {
2577
- var e, t;
2578
- return n != null && (e = n.oneTrust) !== null && e !== void 0 && e.enabled ? new du() : n != null && (t = n.ketch) !== null && t !== void 0 && t.enabled ? new pu() : null;
2579
- }, mu = function() {
2580
- function n() {
2581
- B(this, n), this.storage = mn, this.timeout = 18e5, this.sessionInfo = this.storage.getSessionInfo() || { autoTrack: !0 };
2582
- }
2583
- return N(n, [{ key: "initialize", value: function(e) {
2584
- try {
2585
- var t;
2586
- if (this.sessionInfo.autoTrack = !((e == null || (t = e.sessions) === null || t === void 0 ? void 0 : t.autoTrack) === !1 || this.sessionInfo.manualTrack), e != null && e.sessions && !isNaN(e.sessions.timeout)) {
2587
- var r = e.sessions.timeout;
2588
- r === 0 && (D.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."), this.sessionInfo.autoTrack = !1), r > 0 && r < 1e4 && D.warn('[Session]:: It is not advised to set "timeout" less than 10 seconds'), this.timeout = r;
2589
- }
2590
- this.sessionInfo.autoTrack ? this.startAutoTracking() : this.sessionInfo.autoTrack !== !1 || this.sessionInfo.manualTrack || this.end();
2591
- } catch (o) {
2592
- M(o);
2593
- }
2594
- } }, { key: "isValidSession", value: function(e) {
2595
- return e <= this.sessionInfo.expiresAt;
2596
- } }, { key: "generateSessionId", value: function() {
2597
- return Date.now();
2598
- } }, { key: "startAutoTracking", value: function() {
2599
- var e = Date.now();
2600
- this.isValidSession(e) || (this.sessionInfo = {}, this.sessionInfo.id = e, this.sessionInfo.expiresAt = e + this.timeout, this.sessionInfo.sessionStart = !0, this.sessionInfo.autoTrack = !0), this.storage.setSessionInfo(this.sessionInfo);
2601
- } }, { key: "validateSessionId", value: function(e) {
2602
- if (typeof e == "number" && e % 1 == 0) {
2603
- var t;
2604
- if (!(((t = e) ? t.toString().length : 0) < 10))
2605
- return e;
2606
- D.error('[Session]:: "sessionId" should at least be "'.concat(10, '" digits long'));
2607
- } else
2608
- D.error('[Session]:: "sessionId" should only be a positive integer');
2609
- } }, { key: "start", value: function(e) {
2610
- var t = e ? this.validateSessionId(e) : this.generateSessionId();
2611
- this.sessionInfo = { id: t || this.generateSessionId(), sessionStart: !0, manualTrack: !0 }, this.storage.setSessionInfo(this.sessionInfo);
2612
- } }, { key: "getSessionId", value: function() {
2613
- return this.sessionInfo.autoTrack && this.isValidSession(Date.now()) || this.sessionInfo.manualTrack ? this.sessionInfo.id : null;
2614
- } }, { key: "end", value: function() {
2615
- this.sessionInfo = {}, this.storage.removeSessionInfo();
2616
- } }, { key: "getSessionInfo", value: function() {
2617
- var e = {};
2618
- if (this.sessionInfo.autoTrack || this.sessionInfo.manualTrack) {
2619
- if (this.sessionInfo.autoTrack) {
2620
- var t = Date.now();
2621
- this.isValidSession(t) ? this.sessionInfo.expiresAt = t + this.timeout : this.startAutoTracking();
2622
- }
2623
- this.sessionInfo.sessionStart && (e.sessionStart = !0, this.sessionInfo.sessionStart = !1), e.sessionId = this.sessionInfo.id, this.storage.setSessionInfo(this.sessionInfo);
2624
- }
2625
- return e;
2626
- } }, { key: "reset", value: function() {
2627
- var e = this.sessionInfo, t = e.manualTrack;
2628
- e.autoTrack ? (this.sessionInfo = {}, this.startAutoTracking()) : t && this.start();
2629
- } }]), n;
2630
- }(), yu = new mu(), ai = ["integrations", "anonymousId", "originalTimestamp"], vu = function(n, e, t) {
2631
- var r = "";
2632
- if (t) {
2633
- if (!(r = _t(t))) {
2634
- var o = "CDN base URL for integrations is not valid";
2635
- throw M({ message: "[Analytics] load:: ".concat(o) }), Error("Failed to load Rudder SDK: ".concat(o));
2636
- }
2637
- return r;
2638
- }
2639
- var s = function() {
2640
- for (var a, c = document.getElementsByTagName("script"), l = 0; l < c.length; l += 1) {
2641
- var h = _t(c[l].getAttribute("src"));
2642
- if (h && h.match(/^.*rudder-analytics?(\.min)?\.js$/)) {
2643
- a = h;
2644
- break;
2645
- }
2646
- }
2647
- return { sdkURL: a };
2648
- }(), u = s.sdkURL;
2649
- return r = u ? u.split("/").slice(0, -1).concat(Li).join("/") : Mi, e && (r = r.replace(xi, n)), r;
2650
- }, vn = "rs-bugsnag", pn = "bugsnag", bu = ["Bugsnag", pn], Xn = "0d96a60df267f4a13f808bbaa54e535c", ku = ["rudder-analytics.min.js", "rudder-analytics.js"].concat(Me(Object.keys(Qe).map(function(n) {
2651
- return "".concat(Qe[n], ".min.js");
2652
- })), Me(Object.keys(Qe).map(function(n) {
2653
- return "".concat(Qe[n], ".js");
2654
- }))), ui = function(n) {
2655
- var e = n && n._client && n._client._notifier && n._client._notifier.version;
2656
- if (!e) {
2657
- var t = n({ apiKey: Xn, releaseStage: "version-test", beforeSend: function() {
2658
- return !1;
2659
- } });
2660
- e = t.notifier && t.notifier.version, t = void 0;
2661
- }
2662
- return e && e.charAt(0) === "6";
2663
- }, Iu = function(n) {
2664
- bu.every(function(e) {
2665
- return !function(t, r) {
2666
- if (t == null)
2667
- throw new TypeError("Cannot convert undefined or null to object");
2668
- return Object.prototype.hasOwnProperty.call(Object(t), r);
2669
- }(window, e);
2670
- }) && ln(n, "https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js", { isNonNativeSDK: "true", skipDatasetAttributes: !0 });
2671
- }, Au = function() {
2672
- function n(e, t, r) {
2673
- B(this, n), this.pluginName = vn, this.sourceId = e, this.writeKey = t, this.onClientReady = r, this.initClientOnLibReadyInterval = void 0, this.init();
2674
- }
2675
- return N(n, [{ key: "init", value: function() {
2676
- var e = this;
2677
- if ((!window.RudderStackGlobals || !window.RudderStackGlobals[ir]) && !Xn.match(/{{.+}}/)) {
2678
- Iu(this.pluginName);
2679
- var t = window[pn];
2680
- typeof t != "function" ? (this.initClientOnLibReadyInterval = setInterval(function() {
2681
- var r = window[pn];
2682
- typeof r == "function" && (ui(r) && e.initClient(), clearInterval(e.initClientOnLibReadyInterval));
2683
- }, 100), setTimeout(function() {
2684
- clearInterval(e.initClientOnLibReadyInterval);
2685
- }, un)) : ui(t) && this.initClient();
2686
- }
2687
- } }, { key: "initClient", value: function() {
2688
- var e, t = window[pn];
2689
- this.client = t({ apiKey: Xn, appVersion: "2.48.3", metaData: { SDK: { name: "JS", installType: "npm" } }, beforeSend: this.onError(), autoTrackSessions: !1, collectUserIp: !1, enabledBreadcrumbTypes: ["error", "log", "user"], maxEvents: 100, releaseStage: (e = window.location.hostname, e && ["www.test-host.com", "localhost", "127.0.0.1", "[::1]"].includes(e) ? "development" : "production"), networkBreadcrumbsEnabled: !1, user: { id: this.writeKey } }), this.onClientReady();
2690
- } }, { key: "onError", value: function() {
2691
- var e = this.sourceId;
2692
- return function(t) {
2693
- try {
2694
- return !!function(r) {
2695
- var o = Ot(r, "stacktrace.0.file");
2696
- if (!o || typeof o != "string")
2697
- return !1;
2698
- var s = o.substring(o.lastIndexOf("/") + 1);
2699
- return ku.includes(s);
2700
- }(t) && (function(r, o) {
2701
- r.updateMetaData("source", { metadataSource: o });
2702
- var s = r.errorMessage;
2703
- r.context = s, s.includes("error in script loading") && (r.context = "Script load failures"), r.severity = "error";
2704
- }(t, e), !0);
2705
- } catch {
2706
- return !1;
2707
- }
2708
- };
2709
- } }, { key: "notify", value: function(e) {
2710
- this.client && this.client.notify(e);
2711
- } }, { key: "leaveBreadcrumb", value: function(e) {
2712
- this.client && this.client.leaveBreadcrumb(e);
2713
- } }]), n;
2714
- }(), ci = vn, li = [vn], Eu = function() {
2715
- function n(e) {
2716
- B(this, n), this.isEnabled = !1, this.providerName = ci, this.provider = void 0, this.logger = e, this.onClientReady = this.onClientReady.bind(this), this.exposeToGlobal = this.exposeToGlobal.bind(this);
2717
- }
2718
- return N(n, [{ key: "init", value: function(e, t, r) {
2719
- e && t ? function(o) {
2720
- return Ot(o, "statsCollection.errors.enabled") || !1;
2721
- }(e) === !0 ? (this.enable(), this.setProviderName(function(o) {
2722
- return Ot(o, "statsCollection.errors.provider");
2723
- }(e)), this.initProvider(e, t, r)) : this.disable() : this.logger.error("[Analytics] ErrorReporting :: Invalid configuration or missing source id provided.");
2724
- } }, { key: "enable", value: function() {
2725
- this.isEnabled = !0;
2726
- } }, { key: "disable", value: function() {
2727
- this.isEnabled = !1;
2728
- } }, { key: "setProviderName", value: function(e) {
2729
- e ? !e || li.includes(e) ? this.providerName = e : this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(li.join(","))) : this.providerName = ci;
2730
- } }, { key: "initProvider", value: function(e, t, r) {
2731
- this.providerName === vn && (this.provider = new Au(t, r, this.onClientReady));
2732
- } }, { key: "onClientReady", value: function() {
2733
- this.exposeToGlobal();
2734
- } }, { key: "exposeToGlobal", value: function() {
2735
- window.RudderStackGlobals || (window.RudderStackGlobals = {}), window.RudderStackGlobals[ir] = this;
2736
- } }, { key: "leaveBreadcrumb", value: function(e) {
2737
- if (this.provider)
2738
- try {
2739
- this.provider.leaveBreadcrumb(e);
2740
- } catch (t) {
2741
- this.logger.error("[Analytics] ErrorReporting :: leaveBreadcrumb method ".concat(t.toString()));
2742
- }
2743
- } }, { key: "notify", value: function(e) {
2744
- if (this.provider)
2745
- try {
2746
- this.provider.notify(e);
2747
- } catch (t) {
2748
- this.logger.error("[Analytics] ErrorReporting :: notify method ".concat(t.toString()));
2749
- }
2750
- } }]), n;
2751
- }(), Cu = new (function() {
2752
- function n() {
2753
- B(this, n), this.retryAttempt = 3, this.queue = [], this.isTransformationProcessing = !1, this.authToken = null;
2754
- }
2755
- return N(n, [{ key: "init", value: function(e, t, r) {
2756
- this.dataPlaneUrl = _t(t), this.writeKey = e, this.authToken = r || this.authToken, this.start();
2757
- } }, { key: "enqueue", value: function(e, t, r) {
2758
- this.queue.push({ event: e, destinationIds: t, cb: r });
2759
- } }, { key: "sendEventForTransformation", value: function(e, t) {
2760
- var r = this;
2761
- return new Promise(function(o, s) {
2762
- var u = "".concat(r.dataPlaneUrl, "/transform"), a = { "Content-Type": "application/json", Authorization: "Basic ".concat(btoa("".concat(r.writeKey, ":"))) };
2763
- try {
2764
- var c = new XMLHttpRequest();
2765
- c.open("POST", u, !0), Object.keys(a).forEach(function(h) {
2766
- return c.setRequestHeader(h, a[h]);
2767
- }), c.timeout = 1e4, c.onreadystatechange = function() {
2768
- if (c.readyState === 4)
2769
- try {
2770
- var h = c.status, f = c.response;
2771
- switch (h) {
2772
- case 200:
2773
- return f = JSON.parse(f), void o({ status: h, transformedPayload: f.transformedBatch });
2774
- case 400:
2775
- var m = f ? "".concat(f) : "Invalid request payload";
2776
- return void o({ status: h, errorMessage: m });
2777
- case 404:
2778
- return void o({ status: h });
2779
- default:
2780
- if (t > 0) {
2781
- var g = t - 1;
2782
- setTimeout(function() {
2783
- return r.sendEventForTransformation(e, g).then(o).catch(s);
2784
- }, 500 * Math.pow(2, r.retryAttempt - g));
2785
- } else
2786
- o({ status: h, errorMessage: "Retries exhausted" });
2787
- }
2788
- } catch (b) {
2789
- s(b);
2790
- }
2791
- };
2792
- var l = ye(e, !0);
2793
- l ? c.send(l) : D.error("Invalid payload: Event dropped");
2794
- } catch (h) {
2795
- s(h);
2796
- }
2797
- });
2798
- } }, { key: "checkQueueLengthAndProcess", value: function() {
2799
- this.queue.length > 0 && this.process();
2800
- } }, { key: "process", value: function() {
2801
- var e = this;
2802
- this.isTransformationProcessing = !0;
2803
- var t, r, o = this.queue.shift(), s = (t = o.event, r = o.destinationIds, { metadata: { "Custom-Authorization": this.authToken }, batch: [{ orderNo: Date.now(), destinationIds: r, event: t.message }] });
2804
- this.sendEventForTransformation(s, this.retryAttempt).then(function(u) {
2805
- e.isTransformationProcessing = !1, o.cb(u), e.checkQueueLengthAndProcess();
2806
- }).catch(function(u) {
2807
- M(typeof u == "string" ? u : u.message), e.isTransformationProcessing = !1, o.cb({ status: 0 }), e.checkQueueLengthAndProcess();
2808
- });
2809
- } }, { key: "start", value: function() {
2810
- var e = this;
2811
- setInterval(function() {
2812
- e.isTransformationProcessing || e.checkQueueLengthAndProcess();
2813
- }, 100);
2814
- } }, { key: "setAuthToken", value: function(e) {
2815
- this.authToken = e;
2816
- } }]), n;
2817
- }())(), Ou = function() {
2818
- function n() {
2819
- B(this, n), this.initialized = !1, this.clientIntegrations = [], this.loadOnlyIntegrations = {}, this.clientIntegrationObjects = void 0, this.successfullyLoadedIntegration = [], this.failedToBeLoadedIntegration = [], this.toBeProcessedArray = [], this.toBeProcessedByIntegrationArray = [], this.storage = mn, this.eventRepository = iu, this.preProcessQueue = new ou(), this.sendAdblockPage = !1, this.sendAdblockPageOptions = {}, this.clientSuppliedCallbacks = {}, this.readyCallbacks = [], this.methodToCallbackMapping = { syncPixel: "syncPixelCallback" }, this.loaded = !1, this.loadIntegration = !0, this.bufferDataPlaneEventsUntilReady = !1, this.dataPlaneEventsBufferTimeout = 1e4, this.integrationsData = {}, this.dynamicallyLoadedIntegrations = {}, this.destSDKBaseURL = Mi, this.cookieConsentOptions = {}, this.logLevel = void 0, this.clientIntegrationsReady = !1, this.uSession = yu, this.version = "2.48.3", this.lockIntegrationsVersion = !1, this.errorReporting = new Eu(D), this.deniedConsentIds = [], this.transformationHandler = Cu;
2820
- }
2821
- return N(n, [{ key: "initializeUser", value: function(e) {
2822
- this.userId = this.storage.getUserId() || "", this.storage.setUserId(this.userId), this.userTraits = this.storage.getUserTraits() || {}, this.storage.setUserTraits(this.userTraits), this.groupId = this.storage.getGroupId() || "", this.storage.setGroupId(this.groupId), this.groupTraits = this.storage.getGroupTraits() || {}, this.storage.setGroupTraits(this.groupTraits), this.anonymousId = this.getAnonymousId(e), this.storage.setAnonymousId(this.anonymousId);
2823
- } }, { key: "setInitialPageProperties", value: function() {
2824
- if (this.storage.getInitialReferrer() == null && this.storage.getInitialReferringDomain() == null) {
2825
- var e = Ni();
2826
- this.storage.setInitialReferrer(e), this.storage.setInitialReferringDomain(Gi(e));
2827
- }
2828
- } }, { key: "allModulesInitialized", value: function() {
2829
- var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
2830
- return new Promise(function(r) {
2831
- e.clientIntegrations.every(function(o) {
2832
- return e.dynamicallyLoadedIntegrations["".concat(Qe[o.name]).concat("_RS")] != null;
2833
- }) || t >= 2e4 ? r(e) : e.pause(tn).then(function() {
2834
- return e.allModulesInitialized(t + tn).then(r);
2835
- });
2836
- });
2837
- } }, { key: "executeReadyCallback", value: function() {
2838
- this.readyCallbacks.forEach(function(e) {
2839
- return e();
2840
- });
2841
- } }, { key: "integrationSDKLoaded", value: function(e, t) {
2842
- return window[e] && window[e][t] && window[e][t].prototype && window[e][t].prototype.constructor !== void 0;
2843
- } }, { key: "processResponse", value: function(e, t) {
2844
- var r = this;
2845
- try {
2846
- var o = t;
2847
- try {
2848
- if (typeof t == "string" && (o = JSON.parse(t)), !o || L(o) !== "object" || Array.isArray(o))
2849
- return void D.error("Invalid source configuration");
2850
- } catch (a) {
2851
- return void M(a);
2852
- }
2853
- try {
2854
- window.chrome && window.chrome.runtime && window.chrome.runtime.id || this.errorReporting.init(o.source.config, o.source.id, this.writeKey);
2855
- } catch (a) {
2856
- M(a);
2857
- }
2858
- if (this.serverUrl = Sa(o, this.serverUrl, this.options), this.eventRepository.initialize(this.writeKey, this.serverUrl, this.options), this.transformationHandler.init(this.writeKey, this.serverUrl, this.storage.getAuthToken()), o.source.destinations.forEach(function(a) {
2859
- a.enabled && this.clientIntegrations.push({ name: a.destinationDefinition.name, config: a.config, destinationInfo: { shouldApplyDeviceModeTransformation: a.shouldApplyDeviceModeTransformation || !1, propagateEventsUntransformedOnError: a.propagateEventsUntransformedOnError || !1, destinationId: a.id } });
2860
- }, this), this.clientIntegrations = jn(this.loadOnlyIntegrations, this.clientIntegrations), Object.keys(this.cookieConsentOptions).length > 0)
2861
- try {
2862
- var s = gu(this.cookieConsentOptions);
2863
- this.deniedConsentIds = s && s.getDeniedList(), this.clientIntegrations = this.clientIntegrations.filter(function(a) {
2864
- return !s || s && s.isEnabled(a.config);
2865
- });
2866
- } catch (a) {
2867
- M(a);
2868
- }
2869
- this.loaded = !0, this.options && typeof this.options.onLoaded == "function" && this.options.onLoaded(this), function(a) {
2870
- if (a.toBeProcessedArray.length > 0)
2871
- for (; a.toBeProcessedArray.length > 0; ) {
2872
- var c = Me(a.toBeProcessedArray[0]);
2873
- a.toBeProcessedArray.shift();
2874
- var l = c[0];
2875
- c.shift(), a[l].apply(a, Me(c));
2876
- }
2877
- }(this), this.clientIntegrations = this.clientIntegrations.filter(function(a) {
2878
- return !!Qe[a.name] || (D.error("[Analytics] Integration:: ".concat(a.name, " not available for initialization")), !1);
2879
- }), this.bufferDataPlaneEventsUntilReady && setTimeout(function() {
2880
- r.processBufferedCloudModeEvents();
2881
- }, this.dataPlaneEventsBufferTimeout), this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"), this.clientIntegrations.forEach(function(a) {
2882
- var c = Qe[a.name], l = "".concat(c).concat("_RS"), h = "".concat(r.destSDKBaseURL, "/").concat(c, ".min.js");
2883
- window.hasOwnProperty(l) || ln(l, h, { isNonNativeSDK: !0 });
2884
- var f = r, m = setInterval(function() {
2885
- if (f.integrationSDKLoaded(l, c)) {
2886
- var g, b = window[l];
2887
- clearInterval(m);
2888
- try {
2889
- var R = "[Analytics] processResponse :: trying to initialize integration name:: ".concat(l);
2890
- r.errorReporting.leaveBreadcrumb(R), (g = new b[c](a.config, f, a.destinationInfo)).init(), f.isInitialized(g).then(function() {
2891
- f.dynamicallyLoadedIntegrations[l] = b[c];
2892
- });
2893
- } catch (y) {
2894
- var d = "[Analytics] 'integration.init()' failed :: ".concat(l, " :: ").concat(y.message);
2895
- M(y, d), f.failedToBeLoadedIntegration.push(g);
2896
- }
2897
- }
2898
- }, 100);
2899
- setTimeout(function() {
2900
- clearInterval(m);
2901
- }, un);
2902
- });
2903
- var u = this;
2904
- this.allModulesInitialized().then(function() {
2905
- if (!u.clientIntegrations || u.clientIntegrations.length === 0)
2906
- return r.clientIntegrationsReady = !0, r.executeReadyCallback(), void (r.toBeProcessedByIntegrationArray = []);
2907
- u.replayEvents(u);
2908
- });
2909
- } catch (a) {
2910
- M(a);
2911
- }
2912
- } }, { key: "sendDataToDestination", value: function(e, t, r) {
2913
- try {
2914
- if (e[r]) {
2915
- var o = j(t);
2916
- e[r](o);
2917
- }
2918
- } catch (u) {
2919
- var s = "[sendToNative]:: [Destination: ".concat(e.name, "]:: ");
2920
- M(u, s);
2921
- }
2922
- } }, { key: "sendTransformedDataToDestination", value: function(e, t, r) {
2923
- var o = this;
2924
- try {
2925
- Yr(t.message.integrations);
2926
- var s = e.map(function(u) {
2927
- return u.destinationId;
2928
- });
2929
- this.transformationHandler.enqueue(t, s, function(u) {
2930
- var a = u.status, c = u.transformedPayload, l = u.errorMessage;
2931
- e.forEach(function(h) {
2932
- try {
2933
- switch (a) {
2934
- case 200:
2935
- var f = c.find(function(g) {
2936
- return g.id === h.destinationId;
2937
- }), m = [];
2938
- f == null || f.payload.forEach(function(g) {
2939
- if (g.status === "200")
2940
- m.push(g);
2941
- else {
2942
- var b = '[DMT]:: Event transformation unsuccessful for destination "'.concat(h.name, '". Reason: '), R = "Unknown";
2943
- g.status === "410" && (R = "Transformation is not available");
2944
- var d = "Dropping the event", y = D.error;
2945
- h.propagateEventsUntransformedOnError === !0 && (d = "Sending untransformed event to the destination", y = D.warn, m.push({ event: t.message })), y("".concat(b, " ").concat(R, ". ").concat(d, "."));
2946
- }
2947
- }), m == null || m.forEach(function(g) {
2948
- ba(g.event) && o.sendDataToDestination(h, { message: g.event }, r);
2949
- });
2950
- break;
2951
- case 404:
2952
- D.warn("[DMT]:: Transformation server access is denied. The configuration data seems to be out of sync. Sending untransformed event to the destination."), o.sendDataToDestination(h, t, r);
2953
- break;
2954
- default:
2955
- h.propagateEventsUntransformedOnError === !0 ? (D.warn("[DMT]::[Destination: ".concat(h.name, "] :: Transformation request failed with status: ").concat(a, " ").concat(l, ". Sending untransformed event.")), o.sendDataToDestination(h, t, r)) : D.error("[DMT]::[Destination: ".concat(h.name, "] :: Transformation request failed with status: ").concat(a, " ").concat(l, ". Dropping the event."));
2956
- }
2957
- } catch (g) {
2958
- g instanceof Error && (g.message = "[DMT]::[Destination:".concat(h.name, "]:: ").concat(g.message)), M(g);
2959
- }
2960
- });
2961
- });
2962
- } catch (u) {
2963
- u instanceof Error && (u.message = "[DMT]:: ".concat(u.message)), M(u);
2964
- }
2965
- } }, { key: "processAndSendEventsToDeviceMode", value: function(e, t, r) {
2966
- var o = this, s = [], u = [];
2967
- e.forEach(function(a) {
2968
- try {
2969
- !o.IsEventBlackListed(t.message.event, a.name) && (a.shouldApplyDeviceModeTransformation ? u.push(a) : s.push(a));
2970
- } catch (c) {
2971
- M(c);
2972
- }
2973
- }), s.forEach(function(a) {
2974
- o.sendDataToDestination(a, t, r);
2975
- }), u.length > 0 && this.sendTransformedDataToDestination(u, t, r);
2976
- } }, { key: "queueEventForDataPlane", value: function(e, t) {
2977
- var r = t.message.integrations || { All: !0 };
2978
- t.message.integrations = function(o, s) {
2979
- var u = j(o), a = Object.keys(s).filter(function(c) {
2980
- return !(s[c] === !0 && u[c]);
2981
- }).reduce(function(c, l) {
2982
- return c[l] = s[l], c;
2983
- }, {});
2984
- return It(u, a);
2985
- }(this.integrationsData, r), this.eventRepository.enqueue(t, e);
2986
- } }, { key: "processBufferedCloudModeEvents", value: function() {
2987
- this.bufferDataPlaneEventsUntilReady && this.preProcessQueue.activateProcessor();
2988
- } }, { key: "replayEvents", value: function(e) {
2989
- var t, r, o, s = this;
2990
- this.errorReporting.leaveBreadcrumb("Started replaying buffered events"), e.clientIntegrationObjects = [], e.clientIntegrationObjects = e.successfullyLoadedIntegration;
2991
- try {
2992
- e.clientIntegrationObjects.every(function(u) {
2993
- return !u.isReady || u.isReady();
2994
- }) && (this.integrationsData = (t = this.integrationsData, r = e.clientIntegrationObjects, o = j(t), r.forEach(function(u) {
2995
- if (u.getDataForIntegrationsObject)
2996
- try {
2997
- o = It(o, u.getDataForIntegrationsObject());
2998
- } catch (a) {
2999
- D.debug("[Analytics: prepareDataForIntegrationsObj]", a);
3000
- }
3001
- }), o), e.clientIntegrationsReady = !0, e.executeReadyCallback());
3002
- } catch (u) {
3003
- M(u, "Replay buffered cloud mode events");
3004
- }
3005
- this.processBufferedCloudModeEvents(), e.toBeProcessedByIntegrationArray.forEach(function(u) {
3006
- var a = u[0];
3007
- u.shift(), Object.keys(u[0].message.integrations).length > 0 && Gn(u[0].message.integrations);
3008
- var c = jn(u[0].message.integrations, e.clientIntegrationObjects);
3009
- s.processAndSendEventsToDeviceMode(c, u[0], a);
3010
- }), e.toBeProcessedByIntegrationArray = [];
3011
- } }, { key: "pause", value: function(e) {
3012
- return new Promise(function(t) {
3013
- setTimeout(t, e);
3014
- });
3015
- } }, { key: "isInitialized", value: function(e) {
3016
- var t = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
3017
- return new Promise(function(o) {
3018
- e.isLoaded() ? (t.successfullyLoadedIntegration.push(e), o(t)) : r >= un ? (t.failedToBeLoadedIntegration.push(e), o(t)) : t.pause(tn).then(function() {
3019
- return t.isInitialized(e, r + tn).then(o);
3020
- });
3021
- });
3022
- } }, { key: "page", value: function(e, t, r, o, s) {
3023
- if (this.errorReporting.leaveBreadcrumb("Page event"), this.loaded) {
3024
- typeof o == "function" && (s = o, o = null), typeof r == "function" && (s = r, o = r = null), typeof t == "function" && (s = t, o = r = t = null), typeof e == "function" && (s = e, o = r = t = e = null), L(e) === "object" && e != null && e != null && (o = t, r = e, t = e = null), L(t) === "object" && t != null && t != null && (o = r, r = t, t = null), typeof e == "string" && typeof t != "string" && (t = e, e = null), this.sendAdblockPage && e !== "RudderJS-Initiated" && this.sendSampleRequest();
3025
- var u = j(r), a = j(o), c = new vt().setType("page").build();
3026
- u || (u = {}), t && (c.message.name = u.name = t), e && (c.message.category = u.category = e), c.message.properties = this.getPageProperties(u), this.processAndSendDataToDestinations("page", c, a, s);
3027
- } else
3028
- this.toBeProcessedArray.push(["page"].concat(Array.prototype.slice.call(arguments)));
3029
- } }, { key: "track", value: function(e, t, r, o) {
3030
- if (this.errorReporting.leaveBreadcrumb("Track event"), this.loaded) {
3031
- typeof r == "function" && (o = r, r = null), typeof t == "function" && (o = t, r = null, t = null);
3032
- var s = j(t), u = j(r), a = new vt().setType("track").build();
3033
- e && a.setEventName(e), a.setProperty(s || {}), this.processAndSendDataToDestinations("track", a, u, o);
3034
- } else
3035
- this.toBeProcessedArray.push(["track"].concat(Array.prototype.slice.call(arguments)));
3036
- } }, { key: "identify", value: function(e, t, r, o) {
3037
- if (this.errorReporting.leaveBreadcrumb("Identify event"), this.loaded) {
3038
- typeof r == "function" && (o = r, r = null), typeof t == "function" && (o = t, r = null, t = null), L(e) === "object" && (r = t, t = e, e = this.userId);
3039
- var s = on(e);
3040
- s && this.userId && s !== this.userId && this.reset(), this.userId = s, this.storage.setUserId(this.userId);
3041
- var u = j(t), a = j(r);
3042
- if (u) {
3043
- for (var c in u)
3044
- this.userTraits[c] = u[c];
3045
- this.storage.setUserTraits(this.userTraits);
3046
- }
3047
- var l = new vt().setType("identify").build();
3048
- this.processAndSendDataToDestinations("identify", l, a, o);
3049
- } else
3050
- this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)));
3051
- } }, { key: "alias", value: function(e, t, r, o) {
3052
- if (this.errorReporting.leaveBreadcrumb("Alias event"), this.loaded) {
3053
- typeof r == "function" && (o = r, r = null), typeof t == "function" && (o = t, r = null, t = null), typeof e == "function" && (o = e, r = null, t = null, e = null), L(t) === "object" && (r = t, t = null), L(e) === "object" && (r = e, t = null, e = null);
3054
- var s = new vt().setType("alias").build();
3055
- s.message.previousId = on(t) || (this.userId ? this.userId : this.getAnonymousId()), s.message.userId = on(e);
3056
- var u = j(r);
3057
- this.processAndSendDataToDestinations("alias", s, u, o);
3058
- } else
3059
- this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)));
3060
- } }, { key: "group", value: function(e, t, r, o) {
3061
- if (this.errorReporting.leaveBreadcrumb("Group event"), this.loaded) {
3062
- if (arguments.length !== 0) {
3063
- typeof r == "function" && (o = r, r = null), typeof t == "function" && (o = t, r = null, t = null), L(e) === "object" && (r = t, t = e, e = this.groupId), typeof e == "function" && (o = e, r = null, t = null, e = this.groupId), this.groupId = on(e), this.storage.setGroupId(this.groupId);
3064
- var s = j(t), u = j(r), a = new vt().setType("group").build();
3065
- if (s)
3066
- for (var c in s)
3067
- this.groupTraits[c] = s[c];
3068
- else
3069
- this.groupTraits = {};
3070
- this.storage.setGroupTraits(this.groupTraits), this.processAndSendDataToDestinations("group", a, u, o);
3071
- }
3072
- } else
3073
- this.toBeProcessedArray.push(["group"].concat(Array.prototype.slice.call(arguments)));
3074
- } }, { key: "IsEventBlackListed", value: function(e, t) {
3075
- if (!e || typeof e != "string")
3076
- return !1;
3077
- var r = yi[t], o = this.clientIntegrations.find(function(l) {
3078
- return l.name === r;
3079
- }).config, s = o.blacklistedEvents, u = o.whitelistedEvents, a = o.eventFilteringOption;
3080
- if (!a)
3081
- return !1;
3082
- var c = e.trim().toUpperCase();
3083
- switch (a) {
3084
- case "disable":
3085
- default:
3086
- return !1;
3087
- case "blacklistedEvents":
3088
- return !!Array.isArray(s) && s.some(function(l) {
3089
- return l.eventName.trim().toUpperCase() === c;
3090
- });
3091
- case "whitelistedEvents":
3092
- return !Array.isArray(u) || !u.some(function(l) {
3093
- return l.eventName.trim().toUpperCase() === c;
3094
- });
3095
- }
3096
- } }, { key: "shouldUseGlobalIntegrationsConfigInEvents", value: function() {
3097
- return this.useGlobalIntegrationsConfigInEvents && this.loadOnlyIntegrations && Object.keys(this.loadOnlyIntegrations).length > 0;
3098
- } }, { key: "processAndSendDataToDestinations", value: function(e, t, r, o) {
3099
- try {
3100
- this.anonymousId || this.setAnonymousId(), this.errorReporting.leaveBreadcrumb("Started sending data to destinations"), t.message.context.traits = E({}, this.userTraits), t.message.anonymousId = this.anonymousId, t.message.userId = t.message.userId ? t.message.userId : this.userId, e == "group" && (this.groupId && (t.message.groupId = this.groupId), this.groupTraits && (t.message.traits = E({}, this.groupTraits)));
3101
- try {
3102
- var s = this.uSession.getSessionInfo(), u = s.sessionId, a = s.sessionStart;
3103
- t.message.context.sessionId = u, a && (t.message.context.sessionStart = !0);
3104
- } catch (g) {
3105
- M(g);
3106
- }
3107
- f = this.cookieConsentOptions, m = !1, Object.keys(f).forEach(function(g) {
3108
- Ca.includes(g) && typeof f[g].enabled == "boolean" && f[g].enabled === !0 && (m = !0);
3109
- }), m && (t.message.context.consentManagement = { deniedConsentIds: this.deniedConsentIds || [] }), this.processOptionsParam(t, r), function(g, b) {
3110
- var R = g.properties, d = g.traits, y = g.context;
3111
- R && Object.keys(R).forEach(function(p) {
3112
- Bn.indexOf(p.toLowerCase()) >= 0 && D.error("Warning! : Reserved keyword used in properties--> ".concat(p, " with ").concat(b, " call"));
3113
- }), d && Object.keys(d).forEach(function(p) {
3114
- Bn.indexOf(p.toLowerCase()) >= 0 && D.error("Warning! : Reserved keyword used in traits--> ".concat(p, " with ").concat(b, " call"));
3115
- });
3116
- var k = y.traits;
3117
- k && Object.keys(k).forEach(function(p) {
3118
- Bn.indexOf(p.toLowerCase()) >= 0 && D.error("Warning! : Reserved keyword used in traits --> ".concat(p, " with ").concat(b, " call"));
3119
- });
3120
- }(t.message, e);
3121
- var c = t.message.integrations;
3122
- c ? Gn(c) : c = this.shouldUseGlobalIntegrationsConfigInEvents() ? this.loadOnlyIntegrations : _a, t.message.integrations = c;
3123
- try {
3124
- t.message.context["ua-ch"] = this.uach;
3125
- } catch (g) {
3126
- M(g);
3127
- }
3128
- try {
3129
- if (this.clientIntegrationObjects) {
3130
- var l = jn(c, this.clientIntegrationObjects);
3131
- this.processAndSendEventsToDeviceMode(l, t, e);
3132
- } else
3133
- this.toBeProcessedByIntegrationArray.push([e, t]);
3134
- } catch (g) {
3135
- M(g, "processAndSendEventsToDeviceMode::");
3136
- }
3137
- var h = j(t);
3138
- Yr(h.message.integrations), !this.bufferDataPlaneEventsUntilReady || this.clientIntegrationObjects ? this.queueEventForDataPlane(e, h) : this.preProcessQueue.enqueue(e, h), o && typeof o == "function" && o(h);
3139
- } catch (g) {
3140
- M(g);
3141
- }
3142
- var f, m;
3143
- } }, { key: "utm", value: function(e) {
3144
- var t = {};
3145
- try {
3146
- var r = new URL(e), o = "utm_";
3147
- r.searchParams.forEach(function(s, u) {
3148
- if (u.startsWith(o)) {
3149
- var a = u.substring(4);
3150
- a === "campaign" && (a = "name"), t[a] = s;
3151
- }
3152
- });
3153
- } catch {
3154
- }
3155
- return t;
3156
- } }, { key: "addCampaignInfo", value: function(e) {
3157
- var t = e.message.context;
3158
- t && L(t) === "object" && (e.message.context.campaign = this.utm(window.location.href));
3159
- } }, { key: "processOptionsParam", value: function(e, t) {
3160
- var r = e.message, o = r.type, s = r.properties;
3161
- this.addCampaignInfo(e), e.message.context.page = this.getContextPageProperties(o === "page" ? s : void 0), function(u) {
3162
- var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3163
- L(a) === "object" && a !== null && Object.keys(a).forEach(function(c) {
3164
- ai.includes(c) && (u[c] = a[c]);
3165
- });
3166
- }(e.message, t), e.message.context = function(u) {
3167
- var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = u.context;
3168
- return L(a) !== "object" || a === null || Object.keys(a).forEach(function(l) {
3169
- if (!ai.includes(l) && !Wr.includes(l))
3170
- if (l !== "context")
3171
- c = It(c, i({}, l, a[l]));
3172
- else if (L(a[l]) === "object" && a[l] !== null) {
3173
- var h = {};
3174
- Object.keys(a[l]).forEach(function(f) {
3175
- Wr.includes(f) || (h[f] = a[l][f]);
3176
- }), c = It(c, E({}, h));
3177
- } else
3178
- D.error("[Analytics: processOptionsParam] context passed in options ".concat(l, " is not object."));
3179
- }), c;
3180
- }(e.message, t);
3181
- } }, { key: "getPageProperties", value: function(e, t) {
3182
- var r = Zr(), o = t && t.page || {};
3183
- for (var s in r)
3184
- e[s] === void 0 && (e[s] = o[s] || r[s]);
3185
- return e;
3186
- } }, { key: "getContextPageProperties", value: function(e) {
3187
- var t = Zr(), r = {};
3188
- for (var o in t)
3189
- r[o] = e && e[o] ? e[o] : t[o];
3190
- return r;
3191
- } }, { key: "reset", value: function(e) {
3192
- this.errorReporting.leaveBreadcrumb("reset API :: flag: ".concat(e)), this.loaded ? (e && (this.anonymousId = ""), this.userId = "", this.userTraits = {}, this.groupId = "", this.groupTraits = {}, this.uSession.reset(), this.storage.clear(e)) : this.toBeProcessedArray.push(["reset", e]);
3193
- } }, { key: "getAnonymousId", value: function(e) {
3194
- return this.anonymousId = this.storage.getAnonymousId(e), this.anonymousId || this.setAnonymousId(), this.anonymousId;
3195
- } }, { key: "getUserId", value: function() {
3196
- return this.userId;
3197
- } }, { key: "getSessionId", value: function() {
3198
- return this.uSession.getSessionId();
3199
- } }, { key: "getUserTraits", value: function() {
3200
- return this.userTraits;
3201
- } }, { key: "getGroupId", value: function() {
3202
- return this.groupId;
3203
- } }, { key: "getGroupTraits", value: function() {
3204
- return this.groupTraits;
3205
- } }, { key: "setAnonymousId", value: function(e, t) {
3206
- var r = t ? hu(t) : null, o = r ? r.rs_amp_id : null;
3207
- this.anonymousId = e || o || Fi(), this.storage.setAnonymousId(this.anonymousId);
3208
- } }, { key: "isValidWriteKey", value: function(e) {
3209
- return e && typeof e == "string" && e.trim().length > 0;
3210
- } }, { key: "isValidServerUrl", value: function(e) {
3211
- return e && typeof e == "string" && e.trim().length > 0;
3212
- } }, { key: "isDatasetAvailable", value: function() {
3213
- var e = document.createElement("div");
3214
- return e.setAttribute("data-a-b", "c"), !!e.dataset && e.dataset.aB === "c";
3215
- } }, { key: "loadAfterPolyfill", value: function(e, t, r) {
3216
- var o = this;
3217
- if (L(t) === "object" && t !== null && (r = t, t = null), r && r.logLevel && (this.logLevel = r.logLevel, D.setLogLevel(r.logLevel)), !this.isValidWriteKey(e))
3218
- throw Error("Unable to load the SDK due to invalid writeKey");
3219
- if (!this.storage || Object.keys(this.storage).length === 0)
3220
- throw Error("Cannot proceed as no storage is available");
3221
- r && r.cookieConsentManager && (this.cookieConsentOptions = r.cookieConsentManager), this.writeKey = e, this.serverUrl = t, this.options = r;
3222
- var s = {};
3223
- if (r && r.setCookieDomain && (s = E(E({}, s), {}, { domain: r.setCookieDomain })), r && typeof r.secureCookie == "boolean" && (s = E(E({}, s), {}, { secure: r.secureCookie })), r && typeof r.sameDomainCookiesOnly == "boolean" && (s = E(E({}, s), {}, { sameDomainCookiesOnly: r.sameDomainCookiesOnly })), r && Aa.indexOf(r.sameSiteCookie) !== -1 && (s = E(E({}, s), {}, { samesite: r.sameSiteCookie })), this.storage.options(s), r && typeof r.uaChTrackLevel == "string" && Oa.includes(r.uaChTrackLevel) && (this.uaChTrackLevel = r.uaChTrackLevel), navigator.userAgentData && function(l) {
3224
- var h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "none";
3225
- h === "none" && l(void 0), h === "default" && l(navigator.userAgentData), h === "full" && navigator.userAgentData.getHighEntropyValues(["architecture", "bitness", "brands", "mobile", "model", "platform", "platformVersion", "uaFullVersion", "fullVersionList", "wow64"]).then(function(f) {
3226
- l(f);
3227
- });
3228
- }(function(l) {
3229
- o.uach = l;
3230
- }, this.uaChTrackLevel), r && r.integrations && ($e(this.loadOnlyIntegrations, r.integrations), Gn(this.loadOnlyIntegrations)), this.useGlobalIntegrationsConfigInEvents = r && r.useGlobalIntegrationsConfigInEvents === !0, r && r.sendAdblockPage && (this.sendAdblockPage = !0), r && r.sendAdblockPageOptions && L(r.sendAdblockPageOptions) === "object" && (this.sendAdblockPageOptions = r.sendAdblockPageOptions), this.uSession.initialize(r), r && r.clientSuppliedCallbacks) {
3231
- var u = {};
3232
- Object.keys(this.methodToCallbackMapping).forEach(function(l) {
3233
- o.methodToCallbackMapping.hasOwnProperty(l) && r.clientSuppliedCallbacks[o.methodToCallbackMapping[l]] && (u[l] = r.clientSuppliedCallbacks[o.methodToCallbackMapping[l]]);
3234
- }), $e(this.clientSuppliedCallbacks, u), this.registerCallbacks(!0);
3235
- }
3236
- if (r && r.loadIntegration != null && (this.loadIntegration = !!r.loadIntegration), r && typeof r.bufferDataPlaneEventsUntilReady == "boolean" && (this.bufferDataPlaneEventsUntilReady = r.bufferDataPlaneEventsUntilReady === !0, this.bufferDataPlaneEventsUntilReady && this.preProcessQueue.init(this.options, this.queueEventForDataPlane.bind(this))), r && typeof r.dataPlaneEventsBufferTimeout == "number" && (this.dataPlaneEventsBufferTimeout = r.dataPlaneEventsBufferTimeout), r && r.lockIntegrationsVersion !== void 0 && (this.lockIntegrationsVersion = r.lockIntegrationsVersion === !0), this.initializeUser(r ? r.anonymousIdOptions : void 0), this.setInitialPageProperties(), this.destSDKBaseURL = vu(this.version, this.lockIntegrationsVersion, r && r.destSDKBaseURL), r && r.getSourceConfig)
3237
- if (typeof r.getSourceConfig != "function")
3238
- M(new Error('option "getSourceConfig" must be a function'));
3239
- else {
3240
- var a = r.getSourceConfig();
3241
- a instanceof Promise ? a.then(function(l) {
3242
- return o.processResponse(200, l);
3243
- }).catch(M) : this.processResponse(200, a);
3244
- }
3245
- else {
3246
- var c = function(l, h) {
3247
- var f = Nn, m = [];
3248
- return l && m.push("writeKey=".concat(l)), h && m.push("lockIntegrationsVersion=".concat(h)), m.length > 0 && (f = (f = Nn.concat(Nn.includes("?") ? "&" : "?")).concat(m.join("&"))), f;
3249
- }(e, this.lockIntegrationsVersion);
3250
- r && r.configUrl && (c = function(l, h) {
3251
- var f = l;
3252
- f.indexOf("sourceConfig") === -1 && (f = "".concat(_t(f), "/sourceConfig/")), f = f.slice(-1) === "/" ? f : "".concat(f, "/");
3253
- var m = h.split("?")[1], g = f.split("?");
3254
- return g.length > 1 && g[1] !== m ? "".concat(g[0], "?").concat(m) : "".concat(f, "?").concat(m);
3255
- }(r.configUrl, c));
3256
- try {
3257
- (function(l, h, f, m) {
3258
- var g = m.bind(l), b = new XMLHttpRequest();
3259
- b.open("GET", h, !0), b.setRequestHeader("Authorization", "Basic ".concat(btoa("".concat(f, ":")))), b.onload = function() {
3260
- var R = b.status, d = b.responseText;
3261
- R === 200 ? g(200, d) : (M(new Error("".concat(rr, " ").concat(R, " for url: ").concat(h))), g(R));
3262
- }, b.send();
3263
- })(this, c, e, this.processResponse);
3264
- } catch (l) {
3265
- M(l);
3266
- }
3267
- }
3268
- } }, { key: "arePolyfillsRequired", value: function(e) {
3269
- return (!e || typeof e.polyfillIfRequired != "boolean" || e.polyfillIfRequired) && (!String.prototype.endsWith || !String.prototype.startsWith || !String.prototype.includes || !Array.prototype.find || !Array.prototype.includes || typeof window.URL != "function" || typeof Promise > "u" || !Object.entries || !Object.values || !String.prototype.replaceAll || !this.isDatasetAvailable() || typeof TextDecoder != "function" || typeof TextEncoder != "function");
3270
- } }, { key: "load", value: function(e, t, r) {
3271
- if (!this.loaded) {
3272
- var o = j(r);
3273
- if (this.arePolyfillsRequired(o) && $r) {
3274
- var s = "polyfill";
3275
- ln(s, $r, { skipDatasetAttributes: !0 });
3276
- var u = this, a = setInterval(function() {
3277
- !window.hasOwnProperty(s) && document.getElementById(s) === null || typeof Promise > "u" || (clearInterval(a), u.loadAfterPolyfill(e, t, o));
3278
- }, 100);
3279
- setTimeout(function() {
3280
- clearInterval(a);
3281
- }, un);
3282
- } else
3283
- this.loadAfterPolyfill(e, t, o);
3284
- }
3285
- } }, { key: "ready", value: function(e) {
3286
- this.loaded ? typeof e != "function" ? D.error("ready callback is not a function") : this.clientIntegrationsReady ? e() : this.readyCallbacks.push(e) : this.toBeProcessedArray.push(["ready", e]);
3287
- } }, { key: "initializeCallbacks", value: function() {
3288
- var e = this;
3289
- Object.keys(this.methodToCallbackMapping).forEach(function(t) {
3290
- e.methodToCallbackMapping.hasOwnProperty(t) && e.on(t, function() {
3291
- });
3292
- });
3293
- } }, { key: "registerCallbacks", value: function(e) {
3294
- var t = this;
3295
- e || Object.keys(this.methodToCallbackMapping).forEach(function(r) {
3296
- t.methodToCallbackMapping.hasOwnProperty(r) && window.rudderanalytics && typeof window.rudderanalytics[t.methodToCallbackMapping[r]] == "function" && (t.clientSuppliedCallbacks[r] = window.rudderanalytics[t.methodToCallbackMapping[r]]);
3297
- }), Object.keys(this.clientSuppliedCallbacks).forEach(function(r) {
3298
- t.clientSuppliedCallbacks.hasOwnProperty(r) && t.on(r, t.clientSuppliedCallbacks[r]);
3299
- });
3300
- } }, { key: "sendSampleRequest", value: function() {
3301
- ln("ad-block", "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js", { isNonNativeSDK: !0 });
3302
- } }, { key: "startSession", value: function(e) {
3303
- this.uSession.start(e);
3304
- } }, { key: "endSession", value: function() {
3305
- this.uSession.end();
3306
- } }, { key: "setAuthToken", value: function(e) {
3307
- typeof e == "string" ? (this.storage.setAuthToken(e), this.transformationHandler.setAuthToken(e)) : D.error("Provided input should be in string format");
3308
- } }]), n;
3309
- }(), P = new Ou();
3310
- Io(P), window.addEventListener("error", function(n) {
3311
- M(n, void 0, P);
3312
- }, !0), P.initializeCallbacks(), P.registerCallbacks(!1);
3313
- var Et, Qi = "load", Ke = window.rudderanalytics, zi = Array.isArray(Ke);
3314
- if (zi)
3315
- for (var at = 0; at < Ke.length; ) {
3316
- if (Ke[at] && Ke[at][0] === Qi) {
3317
- Et = Ke[at], Ke.splice(at, 1);
3318
- break;
3319
- }
3320
- at += 1;
3321
- }
3322
- (function(n) {
3323
- var e = "ajs_trait_", t = "ajs_prop_";
3324
- function r(s, u) {
3325
- var a = {};
3326
- return Object.keys(s).forEach(function(c) {
3327
- c.startsWith(u) && (a[c.substr(u.length)] = s[c]);
3328
- }), a;
3329
- }
3330
- var o = function(s) {
3331
- var u = {};
3332
- try {
3333
- new URL(s).searchParams.forEach(function(a, c) {
3334
- u[c] = a;
3335
- });
3336
- } catch {
3337
- }
3338
- return u;
3339
- }(n);
3340
- o.ajs_aid && P.toBeProcessedArray.push(["setAnonymousId", o.ajs_aid]), o.ajs_uid && P.toBeProcessedArray.push(["identify", o.ajs_uid, r(o, e)]), o.ajs_event && P.toBeProcessedArray.push(["track", o.ajs_event, r(o, t)]);
3341
- })(window.location.href), zi && Ke.forEach(function(n) {
3342
- return P.toBeProcessedArray.push(n);
3343
- }), Et && Et.length > 0 && (Et.shift(), P[Qi].apply(P, Me(Et)));
3344
- P.ready.bind(P);
3345
- P.identify.bind(P);
3346
- P.page.bind(P);
3347
- var _u = P.track.bind(P);
3348
- P.alias.bind(P);
3349
- P.group.bind(P);
3350
- P.reset.bind(P);
3351
- var Su = P.load.bind(P);
3352
- P.initialized = !0;
3353
- P.getUserId.bind(P);
3354
- P.getSessionId.bind(P);
3355
- P.getUserTraits.bind(P);
3356
- P.getAnonymousId.bind(P);
3357
- P.setAnonymousId.bind(P);
3358
- P.getGroupId.bind(P);
3359
- P.getGroupTraits.bind(P);
3360
- P.startSession.bind(P);
3361
- P.endSession.bind(P);
3362
- P.setAuthToken.bind(P);
3363
- const wu = {
3364
- STAGING: "2R6llJi7YSuOeJToPXGlQfizt18",
3365
- SANDBOX: "2R6mEpjiTJBErRIn724pt2MWyLA",
3366
- LOCAL: "2QHmFAx84bL4Up6CDHRw0XkKJKC",
3367
- LIVE: "2R6mT9xSJCcbvr6JkiEu7vbrUSW"
3368
- }, Tu = "https://revolugohxxwg.dataplane.rudderstack.com", Ru = window.RevolugoElements.config.apiEnvironment, Pu = wu[Ru];
3369
- try {
3370
- Su(Pu, Tu);
3371
- } catch (n) {
3372
- console.error(n);
3373
- }
3374
- const Vi = {
3375
- startDate: {
3376
- type: String
3377
- },
3378
- endDate: {
3379
- type: String
3380
- },
3381
- roomCount: {
3382
- type: Number
3383
- },
3384
- adultCount: {
3385
- type: Number
3386
- },
3387
- location: {
3388
- type: Object
3389
- }
3390
- }, Du = hi.extend({
3391
- name: "ContactForm",
3392
- components: {
3393
- BSearchLocationInput: Zi,
3394
- BPhoneInput: oo
3395
- },
3396
- mixins: [Jn("components/RevolugoElements/ContactForm")],
3397
- props: Vi,
3398
- data() {
3399
- return {
3400
- isFormValid: !1,
3401
- isSubmitting: !1,
3402
- isSuccess: !1,
3403
- errorCode: "",
3404
- menuStartDate: !1,
3405
- menuEndDate: !1,
3406
- formData: {
3407
- email: "",
3408
- phoneData: {
3409
- phoneNumber: "",
3410
- phoneCountry: "FR",
3411
- phonePrefix: "+33"
3412
- },
3413
- startDate: this.startDate,
3414
- endDate: this.endDate,
3415
- adultCount: this.adultCount,
3416
- roomCount: this.roomCount,
3417
- location: this.location,
3418
- specificRequest: ""
3419
- },
3420
- rules: {
3421
- email: [
3422
- (n) => We.required(n) || this.$t("ContactForm.errors.requiredEmail"),
3423
- (n) => We.email(n) || this.$t("ContactForm.errors.invalidEmail")
3424
- ],
3425
- adultCount: [
3426
- (n) => We.minCount(n, 1) || this.$t("ContactForm.errors.minAdultCount"),
3427
- (n) => We.maxCount(n, 400) || this.$t("ContactForm.errors.maxAdultCount")
3428
- ],
3429
- roomCount: [
3430
- (n) => We.minCount(n, 1) || this.$t("ContactForm.errors.minRoomCount"),
3431
- (n) => We.maxCount(n, 100) || this.$t("ContactForm.errors.maxRoomCount")
3432
- ]
3433
- }
3434
- };
3435
- },
3436
- methods: {
3437
- onSubmit() {
3438
- var e;
3439
- this.isSubmitting = !0;
3440
- let n = "";
3441
- (e = this.config) != null && e.eventMetadata && (n = this.config.eventMetadata.name, this.config.eventMetadata.slug && (n += ` ${this.config.eventMetadata.slug}`)), _u(
3442
- "accomodation-request",
3443
- {
3444
- data: {
3445
- ...this.formData,
3446
- event: n
3447
- }
3448
- },
3449
- () => {
3450
- this.isSuccess = !0, this.isSubmitting = !1, this.$emit("accomodationSuccess");
3451
- }
3452
- );
3453
- }
3454
- }
3455
- });
3456
- var xu = function() {
3457
- var e = this, t = e._self._c;
3458
- return e._self._setupProxy, t("div", [t(uo, { model: { value: e.isFormValid, callback: function(r) {
3459
- e.isFormValid = r;
3460
- }, expression: "isFormValid" } }, [t(ft, { attrs: { dense: "", label: e.$t("ContactForm.email"), outlined: "", required: "", rules: e.rules.email }, scopedSlots: e._u([{ key: "message", fn: function({ message: r }) {
3461
- return [e._v(" " + e._s(e.$t(r)) + " ")];
3462
- } }]), model: { value: e.formData.email, callback: function(r) {
3463
- e.$set(e.formData, "email", r);
3464
- }, expression: "formData.email" } }), t("b-phone-input", { staticClass: "mt-0", model: { value: e.formData.phoneData, callback: function(r) {
3465
- e.$set(e.formData, "phoneData", r);
3466
- }, expression: "formData.phoneData" } }), t(gn, { staticClass: "mt-0" }, [t(ct, [t(cr, { attrs: { "close-on-content-click": !1, "min-width": "auto", "nudge-right": 40, "offset-y": "", transition: "scale-transition" }, scopedSlots: e._u([{ key: "activator", fn: function({ on: r, attrs: o }) {
3467
- return [t(ft, e._g(e._b({ attrs: { dense: "", "hide-details": "", label: e.$t("ContactForm.startDate"), outlined: "", readonly: "", required: "" }, model: { value: e.formData.startDate, callback: function(s) {
3468
- e.$set(e.formData, "startDate", s);
3469
- }, expression: "formData.startDate" } }, "v-text-field", o, !1), r))];
3470
- } }]), model: { value: e.menuStartDate, callback: function(r) {
3471
- e.menuStartDate = r;
3472
- }, expression: "menuStartDate" } }, [t(lr, { on: { input: function(r) {
3473
- e.menuStartDate = !1;
3474
- } }, model: { value: e.formData.startDate, callback: function(r) {
3475
- e.$set(e.formData, "startDate", r);
3476
- }, expression: "formData.startDate" } })], 1)], 1), t(ct, [t(cr, { attrs: { "close-on-content-click": !1, "min-width": "auto", "nudge-right": 40, "offset-y": "", transition: "scale-transition" }, scopedSlots: e._u([{ key: "activator", fn: function({ on: r, attrs: o }) {
3477
- return [t(ft, e._g(e._b({ attrs: { dense: "", "hide-details": "", label: e.$t("ContactForm.endDate"), outlined: "", readonly: "", required: "" }, model: { value: e.formData.endDate, callback: function(s) {
3478
- e.$set(e.formData, "endDate", s);
3479
- }, expression: "formData.endDate" } }, "v-text-field", o, !1), r))];
3480
- } }]), model: { value: e.menuEndDate, callback: function(r) {
3481
- e.menuEndDate = r;
3482
- }, expression: "menuEndDate" } }, [t(lr, { on: { input: function(r) {
3483
- e.menuEndDate = !1;
3484
- } }, model: { value: e.formData.endDate, callback: function(r) {
3485
- e.$set(e.formData, "endDate", r);
3486
- }, expression: "formData.endDate" } })], 1)], 1)], 1), t(gn, [t(ct, [t(ft, { attrs: { dense: "", label: e.$t("ContactForm.adultCount"), max: "400", min: "1", outlined: "", required: "", rules: e.rules.adultCount, type: "number" }, model: { value: e.formData.adultCount, callback: function(r) {
3487
- e.$set(e.formData, "adultCount", r);
3488
- }, expression: "formData.adultCount" } })], 1), t(ct, [t(ft, { attrs: { dense: "", label: e.$t("ContactForm.roomCount"), max: "400", min: "1", outlined: "", required: "", rules: e.rules.roomCount, type: "number" }, model: { value: e.formData.roomCount, callback: function(r) {
3489
- e.$set(e.formData, "roomCount", r);
3490
- }, expression: "formData.roomCount" } })], 1)], 1), t("b-search-location-input", { attrs: { outlined: "", "with-details": "" }, model: { value: e.formData.location, callback: function(r) {
3491
- e.$set(e.formData, "location", r);
3492
- }, expression: "formData.location" } }), t(so, { attrs: { dense: "", label: e.$t("ContactForm.specificRequest"), outlined: "" }, model: { value: e.formData.specificRequest, callback: function(r) {
3493
- e.$set(e.formData, "specificRequest", r);
3494
- }, expression: "formData.specificRequest" } }), t("div", { staticClass: "d-flex justify-end" }, [t(er, { attrs: { color: e.isSuccess ? "green" : "primary", "data-cy": "submit-button", disabled: !e.isFormValid || e.isSubmitting || e.isSuccess, loading: e.isSubmitting }, on: { click: function(r) {
3495
- return e.onSubmit();
3496
- } } }, [e._v(" " + e._s(e.$t("ContactForm.submit")) + " ")])], 1)], 1)], 1);
3497
- }, Lu = [], Mu = /* @__PURE__ */ Zn(
3498
- Du,
3499
- xu,
3500
- Lu,
3501
- !1,
3502
- null,
3503
- null,
3504
- null,
3505
- null
3506
- );
3507
- const Fu = Mu.exports, Bu = {
3508
- ...Vi,
3509
- boilerplateSkeleton: {
3510
- type: Boolean
3511
- },
3512
- itemCount: {
3513
- type: Number,
3514
- default: 3
3515
- },
3516
- type: {
3517
- type: String
3518
- },
3519
- checkInDate: {
3520
- type: String
3521
- },
3522
- checkOutDate: {
3523
- type: String
3524
- }
3525
- }, Nu = hi.extend({
3526
- name: "HotelOfferListEmpty",
3527
- components: {
3528
- BErrorOverlay: ao,
3529
- HotelOfferItemLayout: fi,
3530
- ContactForm: Fu
3531
- },
3532
- mixins: [Jn("components/RevolugoElements/HotelOfferListEmpty"), di],
3533
- props: Bu,
3534
- data() {
3535
- return {
3536
- typeData: this.type
3537
- };
3538
- },
3539
- computed: {
3540
- wording() {
3541
- let n = {
3542
- title: "",
3543
- description: ""
3544
- };
3545
- if (this.typeData)
3546
- switch (this.typeData) {
3547
- case "internalError": {
3548
- n = {
3549
- title: this.$t("HotelOfferListEmpty.internalError.title"),
3550
- description: this.$t(
3551
- "HotelOfferListEmpty.internalError.description"
3552
- )
3553
- };
3554
- break;
3555
- }
3556
- case "missingHotelOfferRequest": {
3557
- n = {
3558
- title: this.$t(
3559
- "HotelOfferListEmpty.missingHotelOfferRequest.title"
3560
- ),
3561
- description: this.$t(
3562
- "HotelOfferListEmpty.missingHotelOfferRequest.description"
3563
- )
3564
- };
3565
- break;
3566
- }
3567
- case "accomodationSuccess": {
3568
- n = {
3569
- title: this.$t("HotelOfferListEmpty.accomodationSuccess.title"),
3570
- description: this.$t(
3571
- "HotelOfferListEmpty.accomodationSuccess.description"
3572
- )
3573
- };
3574
- break;
3575
- }
3576
- case "noResultsFiltered": {
3577
- n = {
3578
- title: this.$t("HotelOfferListEmpty.noResults.title"),
3579
- description: this.$t(
3580
- "HotelOfferListEmpty.noResultsFiltered.description"
3581
- )
3582
- };
3583
- break;
3584
- }
3585
- default: {
3586
- n = {
3587
- title: this.$t("HotelOfferListEmpty.noResults.title"),
3588
- description: this.$t("HotelOfferListEmpty.noResults.description")
3589
- };
3590
- break;
3591
- }
3592
- }
3593
- return n;
3594
- }
3595
- },
3596
- watch: {
3597
- type: {
3598
- immediate: !1,
3599
- handler() {
3600
- this.typeData = this.type;
3601
- }
3602
- }
3603
- },
3604
- methods: {
3605
- onResetFilters() {
3606
- this.$emit("reset-filters");
3607
- }
3608
- }
3609
- });
3610
- var Gu = function() {
3611
- var e = this, t = e._self._c;
3612
- return e._self._setupProxy, t("div", { staticClass: "position-relative" }, [e._l(6, function(r) {
3613
- return [t("hotel-offer-item-layout", { key: r, class: {
3614
- "mt-0": r === 1,
3615
- "mb-0": r === e.itemCount,
3616
- "mb-2": e.$breakpointService.xs
3617
- }, attrs: { boilerplate: e.boilerplateSkeleton } }), e.$breakpointService.xs ? e._e() : t(Kn, { key: r + "-divider" })];
3618
- }), e.typeData ? t("b-error-overlay", { scopedSlots: e._u([{ key: "title", fn: function() {
3619
- return [e._v(" " + e._s(e.wording.title) + " ")];
3620
- }, proxy: !0 }, { key: "description", fn: function() {
3621
- return [t("div", [t("p", [e._v(e._s(e.wording.description))]), e.typeData !== "noResultsFiltered" && e.typeData !== "accomodationSuccess" ? t("contact-form", { attrs: { "adult-count": e.adultCount, "end-date": e.checkOutDate, location: e.location, "room-count": e.roomCount, "start-date": e.checkInDate }, on: { accomodationSuccess: function(r) {
3622
- e.typeData = "accomodationSuccess";
3623
- } } }) : e._e(), e.typeData === "noResultsFiltered" ? t(er, { attrs: { color: "primary", outlined: "", small: "" }, on: { click: e.onResetFilters } }, [e._v(" " + e._s(e.$t("HotelOfferListEmpty.noResultsFiltered.reset")) + " ")]) : e._e()], 1)];
3624
- }, proxy: !0 }], null, !1, 1267038487) }) : e._e()], 2);
3625
- }, ju = [], Uu = /* @__PURE__ */ Zn(
3626
- Nu,
3627
- Gu,
3628
- ju,
3629
- !1,
3630
- null,
3631
- null,
3632
- null,
3633
- null
3634
- );
3635
- const Hu = Uu.exports, qu = po(
3636
- Xi,
3637
- lo({
3638
- fallbackValue: {},
3639
- propsName: "features"
3640
- })
3641
- ).extend({
3642
- name: "HotelOfferList",
3643
- components: {
3644
- BHotelOffersFilterBar: eo,
3645
- HotelOfferItem: to,
3646
- HotelOfferItemLayout: fi,
3647
- HotelOfferListEmpty: Hu,
3648
- HotelRoomOfferList: fo,
3649
- TermsAndConditions: go
3650
- },
3651
- mixins: [
3652
- di,
3653
- Jn("components/RevolugoElements/HotelOfferList"),
3654
- no,
3655
- ho(
3656
- ["bookingApiClient", "config.currency", "config.lang"],
3657
- "retrieveHotelOffers"
3658
- )
3659
- ],
3660
- store: Wi,
3661
- props: vo,
3662
- computed: {
3663
- areFiltersActive: Ee("hotelOffers/areFiltersActive"),
3664
- hasErrorHotelOffers: Ee("hotelOffers/hasError"),
3665
- hotelOffersCurrency: Ee(
3666
- "hotelOffers/hotelOffersCurrency"
3667
- ),
3668
- isPollingHotelOffers: Ee("hotelOffers/isPolling"),
3669
- startingAfter: Ee("hotelOffers/startingAfter"),
3670
- filters: Ee("hotelOffers/filters"),
3671
- hotelOffers: Ee("hotelOffers/hotelOffers"),
3672
- hotelOfferRequest: Ee("hotelOfferRequest"),
3673
- displayFiltersMenu() {
3674
- return !this.isHotelOfferRequestMissing && !!this.parsedFeatures.FiltersBar;
3675
- },
3676
- isTopPicksSelected() {
3677
- var n;
3678
- return ((n = this.filters.sort_by) == null ? void 0 : n.value) === $i.TopPicks;
3679
- },
3680
- showNoResultsMessage() {
3681
- return !!this.hotelOfferRequest.id && !this.isPollingHotelOffers && Array.isArray(this.hotelOffers) && this.hotelOffers.length === 0;
3682
- },
3683
- showErrorMessage() {
3684
- return this.hotelOfferRequest.hasError || this.hasErrorHotelOffers;
3685
- },
3686
- showSkeleton() {
3687
- var n;
3688
- return !this.hotelOfferRequest.id || this.hotelOfferRequest.isFetching || this.isPollingHotelOffers && (!this.hotelOffers || ((n = this.hotelOffers) == null ? void 0 : n.length) === 0);
3689
- }
3690
- },
3691
- watch: {
3692
- filters: {
3693
- deep: !0,
3694
- async handler(n, e) {
3695
- io(n, e) || await this.retrieveHotelOffers();
3696
- }
3697
- },
3698
- "hotelOfferRequest.id": {
3699
- immediate: !0,
3700
- handler() {
3701
- this.$nextTick(async () => {
3702
- await this.retrieveHotelOffers();
3703
- });
3704
- }
3705
- },
3706
- limit: {
3707
- immediate: !0,
3708
- handler() {
3709
- this.$nextTick(async () => {
3710
- await this.retrieveHotelOffers();
3711
- });
3712
- }
3713
- }
3714
- },
3715
- methods: {
3716
- onHotelOfferItemMouseover(n) {
3717
- this.$emit("hotel-offer-item-mouseover", n);
3718
- },
3719
- onHotelOfferItemMouseleave() {
3720
- this.$emit("hotel-offer-item-mouseleave");
3721
- },
3722
- async onResetFilters() {
3723
- await lt("hotelOffers/resetFilters");
3724
- },
3725
- async retrieveHotelOffers() {
3726
- this.$refs["hotel-offer-list-container"].scrollTo({
3727
- top: 0,
3728
- behavior: "smooth"
3729
- }), await lt("hotelRoomOfferRequest/resetHotelRoomOfferRequests").then(() => lt("hotelRoomOffers/resetHotelRoomOffers")).then(
3730
- () => lt("hotelOffers/retrieveHotelOffers", {
3731
- hotelOfferRequestId: this.hotelOfferRequest.id,
3732
- limit: this.limit
3733
- })
3734
- );
3735
- },
3736
- async onSeeMoreClick() {
3737
- await lt("hotelOffers/retrieveHotelOffers", {
3738
- hotelOfferRequestId: this.hotelOfferRequest.id,
3739
- limit: this.limit,
3740
- startingAfter: this.startingAfter
3741
- });
3742
- }
3743
- }
3744
- });
3745
- var Ku = function() {
3746
- var e = this, t = e._self._c;
3747
- return e._self._setupProxy, t(co, { ref: "hotel-offer-list-container", staticClass: "pa-0 white", staticStyle: { "min-height": "500px" }, style: {
3748
- height: e.parsedHeight,
3749
- maxHeight: e.maxHeight,
3750
- overflowY: "auto",
3751
- overflowX: "hidden"
3752
- } }, [e.displayFiltersMenu && e.isBookingApiClientDefined ? t(gn, { staticClass: "pt-1", class: e.$isCurrentBreakpointAboveOrEqual("md") ? "sticky" : "", attrs: { "no-gutters": "" } }, [t(ct, [t("b-hotel-offers-filter-bar"), e.$breakpointService.xs ? e._e() : t(Kn)], 1)], 1) : e._e(), t(gn, { attrs: { "no-gutters": "" } }, [t(ct, [e.showSkeleton ? [t("hotel-offer-list-empty")] : e.showErrorMessage ? [t("hotel-offer-list-empty", { attrs: { type: "internalError" } })] : e.showNoResultsMessage ? [t("hotel-offer-list-empty", { attrs: { address: e.hotelOfferRequest.address, "adult-count": e.hotelOfferRequest.adultCount, "check-in-date": e.hotelOfferRequest.checkInDate, "check-out-date": e.hotelOfferRequest.checkOutDate, latitude: e.hotelOfferRequest.latitude, longitude: e.hotelOfferRequest.longitude, "room-count": e.hotelOfferRequest.roomCount, "source-market": e.hotelOfferRequest.sourceMarket, type: "noResults" }, on: { "reset-filters": e.onResetFilters } })] : [t(mo, { directives: [{ name: "show", rawName: "v-show", value: e.loadingBarEnabled && e.isPollingHotelOffers, expression: "loadingBarEnabled && isPollingHotelOffers" }], attrs: { indeterminate: "" } }), e._l(e.hotelOffers, function(r, o) {
3753
- var s;
3754
- return [t("hotel-offer-item", { key: r.id, staticClass: "pr-3", class: {
3755
- "mt-0": o === 0,
3756
- "mb-0": o === e.hotelOffers.length - 1
3757
- }, attrs: { features: e.parsedFeatures.HotelOfferItem, "hotel-offer": r, "single-offer": e.hotelRoomOffersLimit === 1 }, nativeOn: { mouseleave: function(u) {
3758
- return e.onHotelOfferItemMouseleave.apply(null, arguments);
3759
- }, mouseover: function(u) {
3760
- return e.onHotelOfferItemMouseover(r);
3761
- } } }, [(s = e.parsedFeatures.HotelOfferItem) != null && s.HotelRoomOfferList ? t("div", { staticClass: "mx-n2" }, [t("hotel-room-offer-list", { attrs: { "adult-count": e.hotelOfferRequest.adultCount, "check-in-date": e.hotelOfferRequest.checkInDate, "check-out-date": e.hotelOfferRequest.checkOutDate, children: e.hotelOfferRequest.children, "hotel-id": r.id, "hotel-timezone": r.timezone, limit: e.hotelRoomOffersLimit, "room-count": e.hotelOfferRequest.roomCount, "source-market": e.hotelOfferRequest.sourceMarket } })], 1) : e._e()]), t(Kn, { key: r.id + "-divider" })];
3762
- }), e.startingAfter ? t("div", { staticClass: "d-flex justify-center align-center py-3" }, [t(er, { attrs: { color: "primary", depressed: "", disabled: e.isPollingHotelOffers || !e.startingAfter, loading: e.isPollingHotelOffers }, on: { click: e.onSeeMoreClick } }, [e._v(" " + e._s(e.$t("HotelOfferList.showMore")) + " ")])], 1) : e._e()]], 2)], 1), e.parsedFeatures.TermsAndConditionsFooter ? t("terms-and-conditions", { attrs: { theme: "light" } }) : e._e()], 1);
3763
- }, Qu = [], zu = /* @__PURE__ */ Zn(
3764
- qu,
3765
- Ku,
3766
- Qu,
3767
- !1,
3768
- null,
3769
- null,
3770
- null,
3771
- null
3772
- );
3773
- const dc = zu.exports;
3774
- export {
3775
- dc as H,
3776
- yo as a,
3777
- vo as h
3778
- };
3779
- //# sourceMappingURL=revolugo.hotelofferlist.DUw3z5s6.min.js.map