@reservamos/browser-analytics 1.0.14 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,8 +24,8 @@ var util;
24
24
  return util2.objectValues(filtered);
25
25
  };
26
26
  util2.objectValues = (obj) => {
27
- return util2.objectKeys(obj).map(function(e) {
28
- return obj[e];
27
+ return util2.objectKeys(obj).map(function(e2) {
28
+ return obj[e2];
29
29
  });
30
30
  };
31
31
  util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
@@ -387,7 +387,7 @@ function addIssueToContext(ctx, issueData) {
387
387
  overrideMap,
388
388
  overrideMap === errorMap ? void 0 : errorMap
389
389
  // then global default map
390
- ].filter((x) => !!x)
390
+ ].filter((x2) => !!x2)
391
391
  });
392
392
  ctx.common.issues.push(issue);
393
393
  }
@@ -450,10 +450,10 @@ const INVALID = Object.freeze({
450
450
  });
451
451
  const DIRTY = (value) => ({ status: "dirty", value });
452
452
  const OK = (value) => ({ status: "valid", value });
453
- const isAborted = (x) => x.status === "aborted";
454
- const isDirty = (x) => x.status === "dirty";
455
- const isValid = (x) => x.status === "valid";
456
- const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
453
+ const isAborted = (x2) => x2.status === "aborted";
454
+ const isDirty = (x2) => x2.status === "dirty";
455
+ const isValid = (x2) => x2.status === "valid";
456
+ const isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise;
457
457
  function __classPrivateFieldGet(receiver, state, kind, f2) {
458
458
  if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
459
459
  return state.get(receiver);
@@ -463,8 +463,8 @@ function __classPrivateFieldSet(receiver, state, value, kind, f2) {
463
463
  return state.set(receiver, value), value;
464
464
  }
465
465
  typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
466
- var e = new Error(message);
467
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
466
+ var e2 = new Error(message);
467
+ return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
468
468
  };
469
469
  var errorUtil;
470
470
  (function(errorUtil2) {
@@ -2783,7 +2783,7 @@ class ZodTuple extends ZodType {
2783
2783
  if (!schema)
2784
2784
  return null;
2785
2785
  return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
2786
- }).filter((x) => !!x);
2786
+ }).filter((x2) => !!x2);
2787
2787
  if (ctx.common.async) {
2788
2788
  return Promise.all(items).then((results) => {
2789
2789
  return ParseStatus.mergeArray(status, results);
@@ -3041,7 +3041,7 @@ class ZodFunction extends ZodType {
3041
3041
  ctx.schemaErrorMap,
3042
3042
  getErrorMap(),
3043
3043
  errorMap
3044
- ].filter((x) => !!x),
3044
+ ].filter((x2) => !!x2),
3045
3045
  issueData: {
3046
3046
  code: ZodIssueCode.invalid_arguments,
3047
3047
  argumentsError: error
@@ -3057,7 +3057,7 @@ class ZodFunction extends ZodType {
3057
3057
  ctx.schemaErrorMap,
3058
3058
  getErrorMap(),
3059
3059
  errorMap
3060
- ].filter((x) => !!x),
3060
+ ].filter((x2) => !!x2),
3061
3061
  issueData: {
3062
3062
  code: ZodIssueCode.invalid_return_type,
3063
3063
  returnTypeError: error
@@ -3070,13 +3070,13 @@ class ZodFunction extends ZodType {
3070
3070
  const me = this;
3071
3071
  return OK(async function(...args) {
3072
3072
  const error = new ZodError([]);
3073
- const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
3074
- error.addIssue(makeArgsIssue(args, e));
3073
+ const parsedArgs = await me._def.args.parseAsync(args, params).catch((e2) => {
3074
+ error.addIssue(makeArgsIssue(args, e2));
3075
3075
  throw error;
3076
3076
  });
3077
3077
  const result = await Reflect.apply(fn, this, parsedArgs);
3078
- const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
3079
- error.addIssue(makeReturnsIssue(result, e));
3078
+ const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e2) => {
3079
+ error.addIssue(makeReturnsIssue(result, e2));
3080
3080
  throw error;
3081
3081
  });
3082
3082
  return parsedReturns;
@@ -3921,27 +3921,6 @@ const customEventSchema = z.record(
3921
3921
  z.union([allowedPrimitiveSchema, z.array(allowedPrimitiveSchema)])
3922
3922
  );
3923
3923
  const eventNameSchema = z.string().min(1, "Event name is required");
3924
- var __assign = function() {
3925
- __assign = Object.assign || function __assign2(t2) {
3926
- for (var s2, i = 1, n2 = arguments.length; i < n2; i++) {
3927
- s2 = arguments[i];
3928
- for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t2[p2] = s2[p2];
3929
- }
3930
- return t2;
3931
- };
3932
- return __assign.apply(this, arguments);
3933
- };
3934
- function __rest$1(s2, e) {
3935
- var t2 = {};
3936
- for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e.indexOf(p2) < 0)
3937
- t2[p2] = s2[p2];
3938
- if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
3939
- for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
3940
- if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i]))
3941
- t2[p2[i]] = s2[p2[i]];
3942
- }
3943
- return t2;
3944
- }
3945
3924
  function __awaiter$1(thisArg, _arguments, P2, generator) {
3946
3925
  function adopt(value) {
3947
3926
  return value instanceof P2 ? value : new P2(function(resolve) {
@@ -3952,15 +3931,15 @@ function __awaiter$1(thisArg, _arguments, P2, generator) {
3952
3931
  function fulfilled(value) {
3953
3932
  try {
3954
3933
  step(generator.next(value));
3955
- } catch (e) {
3956
- reject(e);
3934
+ } catch (e2) {
3935
+ reject(e2);
3957
3936
  }
3958
3937
  }
3959
3938
  function rejected(value) {
3960
3939
  try {
3961
3940
  step(generator["throw"](value));
3962
- } catch (e) {
3963
- reject(e);
3941
+ } catch (e2) {
3942
+ reject(e2);
3964
3943
  }
3965
3944
  }
3966
3945
  function step(result) {
@@ -3969,208 +3948,189 @@ function __awaiter$1(thisArg, _arguments, P2, generator) {
3969
3948
  step((generator = generator.apply(thisArg, _arguments || [])).next());
3970
3949
  });
3971
3950
  }
3972
- function __spreadArray(to, from, pack) {
3973
- if (pack || arguments.length === 2) for (var i = 0, l2 = from.length, ar; i < l2; i++) {
3974
- if (ar || !(i in from)) {
3975
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
3976
- ar[i] = from[i];
3977
- }
3978
- }
3979
- return to.concat(ar || Array.prototype.slice.call(from));
3980
- }
3981
3951
  typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
3982
- var e = new Error(message);
3983
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3984
- };
3985
- function r$2(e, t2) {
3986
- return function(e2, t3) {
3987
- return Object.prototype.hasOwnProperty.call(e2, t3);
3988
- }(e, t2) ? e[t2] : void 0;
3989
- }
3990
- function o$2(e, t2, n2, r2) {
3991
- var o2, i = document, a2 = "securitypolicyviolation", u3 = function(t3) {
3992
- var n3 = new URL(e, location.href), r3 = t3.blockedURI;
3993
- r3 !== n3.href && r3 !== n3.protocol.slice(0, -1) && r3 !== n3.origin || (o2 = t3, R2());
3994
- };
3995
- i.addEventListener(a2, u3);
3996
- var R2 = function() {
3997
- return i.removeEventListener(a2, u3);
3952
+ var e2 = new Error(message);
3953
+ return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
3954
+ };
3955
+ function e(e2, t2) {
3956
+ return function(e3, t3) {
3957
+ return Object.prototype.hasOwnProperty.call(e3, t3);
3958
+ }(e2, t2) ? e2[t2] : void 0;
3959
+ }
3960
+ function t$3(e2, t2, n2, r2) {
3961
+ const o2 = document, i = "securitypolicyviolation";
3962
+ let R2;
3963
+ const s2 = (t3) => {
3964
+ const n3 = new URL(e2, location.href), { blockedURI: r3 } = t3;
3965
+ r3 !== n3.href && r3 !== n3.protocol.slice(0, -1) && r3 !== n3.origin || (R2 = t3, a2());
3998
3966
  };
3999
- return Promise.resolve().then(t2).then(function(e2) {
4000
- return R2(), e2;
4001
- }, function(e2) {
4002
- return new Promise(function(e3) {
4003
- var t3 = new MessageChannel();
4004
- t3.port1.onmessage = function() {
4005
- return e3();
4006
- }, t3.port2.postMessage(null);
4007
- }).then(function() {
4008
- if (R2(), o2) return n2(o2);
4009
- throw e2;
4010
- });
4011
- });
3967
+ o2.addEventListener(i, s2);
3968
+ const a2 = () => o2.removeEventListener(i, s2);
3969
+ return Promise.resolve().then(t2).then((e3) => (a2(), e3), (e3) => new Promise((e4) => {
3970
+ const t3 = new MessageChannel();
3971
+ t3.port1.onmessage = () => e4(), t3.port2.postMessage(null);
3972
+ }).then(() => {
3973
+ if (a2(), R2) return n2(R2);
3974
+ throw e3;
3975
+ }));
4012
3976
  }
4013
- var i$3 = { default: "endpoint" }, a$2 = { default: "tlsEndpoint" }, u$2 = "Client timeout", R$1 = "Network connection error", c$3 = "Network request aborted", s$3 = "Response cannot be parsed", f$2 = "Blocked by CSP", l$2 = "The endpoint parameter is not a valid URL";
4014
- function E$1(e) {
4015
- for (var t2 = "", n2 = 0; n2 < e.length; ++n2) if (n2 > 0) {
4016
- var r2 = e[n2].toLowerCase();
4017
- r2 !== e[n2] ? t2 += " ".concat(r2) : t2 += e[n2];
4018
- } else t2 += e[n2].toUpperCase();
3977
+ function n$2(e2) {
3978
+ let t2 = "";
3979
+ for (let n2 = 0; n2 < e2.length; ++n2) if (n2 > 0) {
3980
+ const r2 = e2[n2].toLowerCase();
3981
+ r2 !== e2[n2] ? t2 += ` ${r2}` : t2 += e2[n2];
3982
+ } else t2 += e2[n2].toUpperCase();
4019
3983
  return t2;
4020
3984
  }
4021
- var d$2 = /* @__PURE__ */ E$1("WrongRegion"), p$1 = /* @__PURE__ */ E$1("SubscriptionNotActive"), v = /* @__PURE__ */ E$1("UnsupportedVersion"), _$1 = /* @__PURE__ */ E$1("InstallationMethodRestricted"), O = /* @__PURE__ */ E$1("HostnameRestricted"), h = /* @__PURE__ */ E$1("IntegrationFailed"), I = "API key required", N = "API key not found", T = "API key expired", m$1 = "Request cannot be parsed", w$1 = "Request failed", A = "Request failed to process", P = "Too many requests, rate limit exceeded", y$1 = "Not available for this origin", D = "Not available with restricted header", S = I, g$1 = N, L = T, U = "3.11.1", b = "Failed to load the JS script of the agent", C = "9319";
4022
- function M(t2, n2) {
4023
- var r2, o2, i, a2, u3, R2, c2 = [], s2 = (r2 = function(t3) {
4024
- var n3 = __spreadArray([], t3, true);
4025
- return { current: function() {
4026
- return n3[0];
4027
- }, postpone: function() {
4028
- var e = n3.shift();
4029
- void 0 !== e && n3.push(e);
4030
- }, exclude: function() {
4031
- n3.shift();
4032
- } };
4033
- }(t2), a2 = 100, u3 = 3e3, R2 = 0, o2 = function() {
4034
- return Math.random() * Math.min(u3, a2 * Math.pow(2, R2++));
4035
- }, i = /* @__PURE__ */ new Set(), [r2.current(), function(e, t3) {
4036
- var n3, a3 = t3 instanceof Error ? t3.message : "";
4037
- if (a3 === f$2 || a3 === l$2) r2.exclude(), n3 = 0;
4038
- else if (a3 === C) r2.exclude();
4039
- else if (a3 === b) {
4040
- var u4 = Date.now() - e.getTime() < 50, R3 = r2.current();
4041
- R3 && u4 && !i.has(R3) && (i.add(R3), n3 = 0), r2.postpone();
4042
- } else r2.postpone();
4043
- var c3 = r2.current();
4044
- return void 0 === c3 ? void 0 : [c3, null != n3 ? n3 : e.getTime() + o2() - Date.now()];
4045
- }]), E2 = s2[0], d2 = s2[1];
4046
- if (void 0 === E2) return Promise.reject(new TypeError("The list of script URL patterns is empty"));
4047
- var p2 = function(e) {
4048
- var t3 = /* @__PURE__ */ new Date(), r3 = function(n3) {
4049
- return c2.push({ url: e, startedAt: t3, finishedAt: /* @__PURE__ */ new Date(), error: n3 });
4050
- }, o3 = n2(e);
4051
- return o3.then(function() {
4052
- return r3();
4053
- }, r3), o3.catch(function(e2) {
4054
- if (c2.length >= 5) throw e2;
4055
- var n3 = d2(t3, e2);
4056
- if (!n3) throw e2;
4057
- var r4, o4 = n3[0], i2 = n3[1];
4058
- return (r4 = i2, new Promise(function(e3) {
4059
- return setTimeout(e3, r4);
4060
- })).then(function() {
4061
- return p2(o4);
4062
- });
3985
+ const r$2 = { default: "endpoint" }, o$2 = { default: "tlsEndpoint" }, i$3 = "Client timeout", R$1 = "Network connection error", s$3 = "Network request aborted", a$2 = "Response cannot be parsed", c$3 = "Blocked by CSP", E$1 = "The endpoint parameter is not a valid URL", l$2 = "Handle on demand agent data error", u$2 = /* @__PURE__ */ n$2("WrongRegion"), d$2 = /* @__PURE__ */ n$2("SubscriptionNotActive"), _$1 = /* @__PURE__ */ n$2("UnsupportedVersion"), O = /* @__PURE__ */ n$2("InstallationMethodRestricted"), p$1 = /* @__PURE__ */ n$2("HostnameRestricted"), I = /* @__PURE__ */ n$2("IntegrationFailed"), f$2 = /* @__PURE__ */ n$2("NetworkRestricted"), N = /* @__PURE__ */ n$2("InvalidProxyIntegrationSecret"), T = /* @__PURE__ */ n$2("InvalidProxyIntegrationHeaders"), h = /* @__PURE__ */ n$2("ProxyIntegrationSecretEnvironmentMismatch");
3986
+ const v = "API key required", m$1 = "API key not found", A = "API key expired", w$1 = "Request cannot be parsed", P = "Request failed", D = "Request failed to process", S = "Too many requests, rate limit exceeded", y$1 = "Not available for this origin", g$1 = "Not available with restricted header", L = v, C = m$1, U = A;
3987
+ var b = "3.12.6";
3988
+ const M = "Failed to load the JS script of the agent", K = "9319";
3989
+ function V(e2, t2) {
3990
+ const n2 = [], [r2, o2] = function(e3) {
3991
+ const t3 = function(e4) {
3992
+ const t4 = [...e4];
3993
+ return { current: () => t4[0], postpone() {
3994
+ const e5 = t4.shift();
3995
+ void 0 !== e5 && t4.push(e5);
3996
+ }, exclude() {
3997
+ t4.shift();
3998
+ } };
3999
+ }(e3), n3 = /* @__PURE__ */ function(e4, t4) {
4000
+ let n4 = 0;
4001
+ return () => Math.random() * Math.min(t4, e4 * Math.pow(2, n4++));
4002
+ }(100, 3e3), r3 = /* @__PURE__ */ new Set();
4003
+ return [t3.current(), (e4, o3) => {
4004
+ let i2;
4005
+ const R3 = o3 instanceof Error ? o3.message : "";
4006
+ if (R3 === c$3 || R3 === E$1) t3.exclude(), i2 = 0;
4007
+ else if (R3 === K) t3.exclude();
4008
+ else if (R3 === M) {
4009
+ const n4 = Date.now() - e4.getTime() < 50, o4 = t3.current();
4010
+ o4 && n4 && !r3.has(o4) && (r3.add(o4), i2 = 0), t3.postpone();
4011
+ } else t3.postpone();
4012
+ const s2 = t3.current();
4013
+ return void 0 === s2 ? void 0 : [s2, null != i2 ? i2 : e4.getTime() + n3() - Date.now()];
4014
+ }];
4015
+ }(e2);
4016
+ let i;
4017
+ if (void 0 === r2) return Promise.reject(new TypeError("The list of script URL patterns is empty"));
4018
+ const R2 = (e3) => {
4019
+ const r3 = /* @__PURE__ */ new Date(), s2 = (t3) => n2.push({ url: e3, startedAt: r3, finishedAt: /* @__PURE__ */ new Date(), error: t3 }), a2 = t2(e3);
4020
+ return a2.then(() => s2(), s2), a2.catch((e4) => {
4021
+ if (null != i || (i = e4), n2.length >= 5) throw i;
4022
+ const t3 = o2(r3, e4);
4023
+ if (!t3) throw i;
4024
+ const [s3, a3] = t3;
4025
+ return (c2 = a3, new Promise((e5) => setTimeout(e5, c2))).then(() => R2(s3));
4026
+ var c2;
4063
4027
  });
4064
4028
  };
4065
- return p2(E2).then(function(e) {
4066
- return [e, c2];
4067
- });
4068
- }
4069
- var K = "https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js", B = K;
4070
- function F(e) {
4071
- var o2;
4072
- e.scriptUrlPattern;
4073
- var i = e.token, a2 = e.apiKey, u3 = void 0 === a2 ? i : a2, R2 = __rest$1(e, ["scriptUrlPattern", "token", "apiKey"]), c2 = null !== (o2 = r$2(e, "scriptUrlPattern")) && void 0 !== o2 ? o2 : K, s2 = function() {
4074
- var e2 = [], t2 = function() {
4029
+ return R2(r2).then((e3) => [e3, n2]);
4030
+ }
4031
+ const k = "https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js", G = k;
4032
+ function B(t2) {
4033
+ var n2, r2;
4034
+ const { picked: o2, rest: i } = function(e2, t3) {
4035
+ const n3 = {}, r3 = {};
4036
+ for (const [o3, i2] of Object.entries(e2)) t3.includes(o3) ? n3[o3] = i2 : r3[o3] = i2;
4037
+ return { picked: n3, rest: r3 };
4038
+ }(t2, ["scriptUrlPattern", "token", "apiKey"]), R2 = o2.token, s2 = null !== (n2 = o2.apiKey) && void 0 !== n2 ? n2 : R2, a2 = null !== (r2 = e(t2, "scriptUrlPattern")) && void 0 !== r2 ? r2 : k, [c2, E2] = function() {
4039
+ const e2 = [], t3 = () => {
4075
4040
  e2.push({ time: /* @__PURE__ */ new Date(), state: document.visibilityState });
4076
- }, n2 = function(e3, t3, n3, r2) {
4077
- return e3.addEventListener(t3, n3, r2), function() {
4078
- return e3.removeEventListener(t3, n3, r2);
4079
- };
4080
- }(document, "visibilitychange", t2);
4081
- return t2(), [e2, n2];
4082
- }(), f2 = s2[0], l2 = s2[1];
4083
- return Promise.resolve().then(function() {
4084
- if (!u3 || "string" != typeof u3) throw new Error(I);
4085
- var e2 = function(e3, t2) {
4086
- return (Array.isArray(e3) ? e3 : [e3]).map(function(e4) {
4087
- return function(e5, t3) {
4088
- var n2 = encodeURIComponent;
4089
- return e5.replace(/<[^<>]+>/g, function(e6) {
4090
- return "<version>" === e6 ? "3" : "<apiKey>" === e6 ? n2(t3) : "<loaderVersion>" === e6 ? n2(U) : e6;
4091
- });
4092
- }(String(e4), t2);
4093
- });
4094
- }(c2, u3);
4095
- return M(e2, V);
4096
- }).catch(function(e2) {
4097
- throw l2(), function(e3) {
4098
- if (e3 instanceof Error && e3.message === C) return new Error(b);
4041
+ }, n3 = function(e3, t4, n4, r3) {
4042
+ return e3.addEventListener(t4, n4, r3), () => e3.removeEventListener(t4, n4, r3);
4043
+ }(document, "visibilitychange", t3);
4044
+ return t3(), [e2, n3];
4045
+ }();
4046
+ return Promise.resolve().then(() => {
4047
+ if (!s2 || "string" != typeof s2) throw new Error(v);
4048
+ const e2 = function(e3, t3) {
4049
+ return (Array.isArray(e3) ? e3 : [e3]).map((e4) => function(e5, t4) {
4050
+ const n3 = encodeURIComponent;
4051
+ return e5.replace(/<[^<>]+>/g, (e6) => "<version>" === e6 ? "3" : "<apiKey>" === e6 ? n3(t4) : "<loaderVersion>" === e6 ? n3(b) : e6);
4052
+ }(String(e4), t3));
4053
+ }(a2, s2);
4054
+ return V(e2, F);
4055
+ }).catch((e2) => {
4056
+ throw E2(), function(e3) {
4057
+ if (e3 instanceof Error && e3.message === K) return new Error(M);
4099
4058
  return e3;
4100
4059
  }(e2);
4101
- }).then(function(e2) {
4102
- var t2 = e2[0], r2 = e2[1];
4103
- return l2(), t2.load(__assign(__assign({}, R2), { ldi: { attempts: r2, visibilityStates: f2 } }));
4104
- });
4105
- }
4106
- function V(e) {
4107
- return o$2(e, function() {
4108
- return function(e2) {
4109
- return new Promise(function(t2, n2) {
4110
- if (function(e3) {
4111
- if (URL.prototype) try {
4112
- return new URL(e3, location.href), false;
4113
- } catch (t3) {
4114
- if (t3 instanceof Error && "TypeError" === t3.name) return true;
4115
- throw t3;
4116
- }
4117
- }(e2)) throw new Error(l$2);
4118
- var r2 = document.createElement("script"), o2 = function() {
4119
- var e3;
4120
- return null === (e3 = r2.parentNode) || void 0 === e3 ? void 0 : e3.removeChild(r2);
4121
- }, i = document.head || document.getElementsByTagName("head")[0];
4122
- r2.onload = function() {
4123
- o2(), t2();
4124
- }, r2.onerror = function() {
4125
- o2(), n2(new Error(b));
4126
- }, r2.async = true, r2.src = e2, i.appendChild(r2);
4127
- });
4128
- }(e);
4129
- }, function() {
4130
- throw new Error(f$2);
4131
- }).then(k);
4132
- }
4133
- function k() {
4134
- var e = window, t2 = "__fpjs_p_l_b", n2 = e[t2];
4135
- if (function(e2, t3) {
4136
- var n3, r2 = null === (n3 = Object.getOwnPropertyDescriptor) || void 0 === n3 ? void 0 : n3.call(Object, e2, t3);
4137
- (null == r2 ? void 0 : r2.configurable) ? delete e2[t3] : r2 && !r2.writable || (e2[t3] = void 0);
4138
- }(e, t2), "function" != typeof (null == n2 ? void 0 : n2.load)) throw new Error(C);
4060
+ }).then(([e2, t3]) => (E2(), e2.load({ ...i, ldi: { attempts: t3, visibilityStates: c2 } })));
4061
+ }
4062
+ function F(e2) {
4063
+ return t$3(e2, () => function(e3) {
4064
+ return new Promise((t2, n2) => {
4065
+ if (function(e4) {
4066
+ if (URL.prototype) try {
4067
+ return new URL(e4, location.href), false;
4068
+ } catch (t3) {
4069
+ if (t3 instanceof Error && "TypeError" === t3.name) return true;
4070
+ throw t3;
4071
+ }
4072
+ }(e3)) throw new Error(E$1);
4073
+ const r2 = document.createElement("script"), o2 = () => {
4074
+ var e4;
4075
+ return null === (e4 = r2.parentNode) || void 0 === e4 ? void 0 : e4.removeChild(r2);
4076
+ }, i = document.head || document.getElementsByTagName("head")[0];
4077
+ r2.onload = () => {
4078
+ o2(), t2();
4079
+ }, r2.onerror = () => {
4080
+ o2(), n2(new Error(M));
4081
+ }, r2.async = true, r2.src = e3, i.appendChild(r2);
4082
+ });
4083
+ }(e2), () => {
4084
+ throw new Error(c$3);
4085
+ }).then(x);
4086
+ }
4087
+ function x() {
4088
+ const e2 = window, t2 = "__fpjs_p_l_b", n2 = e2[t2];
4089
+ if (function(e3, t3) {
4090
+ var n3;
4091
+ const r2 = null === (n3 = Object.getOwnPropertyDescriptor) || void 0 === n3 ? void 0 : n3.call(Object, e3, t3);
4092
+ (null == r2 ? void 0 : r2.configurable) ? delete e3[t3] : r2 && !r2.writable || (e3[t3] = void 0);
4093
+ }(e2, t2), "function" != typeof (null == n2 ? void 0 : n2.load)) throw new Error(K);
4139
4094
  return n2;
4140
4095
  }
4141
- var G = { load: F, defaultScriptUrlPattern: B, ERROR_SCRIPT_LOAD_FAIL: b, ERROR_API_KEY_EXPIRED: T, ERROR_API_KEY_INVALID: N, ERROR_API_KEY_MISSING: I, ERROR_BAD_REQUEST_FORMAT: m$1, ERROR_BAD_RESPONSE_FORMAT: s$3, ERROR_CLIENT_TIMEOUT: u$2, ERROR_CSP_BLOCK: f$2, ERROR_FORBIDDEN_ENDPOINT: O, ERROR_FORBIDDEN_HEADER: D, ERROR_FORBIDDEN_ORIGIN: y$1, ERROR_GENERAL_SERVER_FAILURE: w$1, ERROR_INSTALLATION_METHOD_RESTRICTED: _$1, ERROR_INTEGRATION_FAILURE: h, ERROR_INVALID_ENDPOINT: l$2, ERROR_NETWORK_ABORT: c$3, ERROR_NETWORK_CONNECTION: R$1, ERROR_RATE_LIMIT: P, ERROR_SERVER_TIMEOUT: A, ERROR_SUBSCRIPTION_NOT_ACTIVE: p$1, ERROR_TOKEN_EXPIRED: L, ERROR_TOKEN_INVALID: g$1, ERROR_TOKEN_MISSING: S, ERROR_UNSUPPORTED_VERSION: v, ERROR_WRONG_REGION: d$2, defaultEndpoint: i$3, defaultTlsEndpoint: a$2 };
4096
+ var H = { load: B, defaultScriptUrlPattern: G, ERROR_SCRIPT_LOAD_FAIL: M, ERROR_API_KEY_EXPIRED: A, ERROR_API_KEY_INVALID: m$1, ERROR_API_KEY_MISSING: v, ERROR_BAD_REQUEST_FORMAT: w$1, ERROR_BAD_RESPONSE_FORMAT: a$2, ERROR_CLIENT_TIMEOUT: i$3, ERROR_CSP_BLOCK: c$3, ERROR_FORBIDDEN_ENDPOINT: p$1, ERROR_FORBIDDEN_HEADER: g$1, ERROR_FORBIDDEN_ORIGIN: y$1, ERROR_GENERAL_SERVER_FAILURE: P, ERROR_HANDLE_AGENT_DATA: l$2, ERROR_INSTALLATION_METHOD_RESTRICTED: O, ERROR_INTEGRATION_FAILURE: I, ERROR_INVALID_ENDPOINT: E$1, ERROR_INVALID_PROXY_INTEGRATION_HEADERS: T, ERROR_INVALID_PROXY_INTEGRATION_SECRET: N, ERROR_NETWORK_ABORT: s$3, ERROR_NETWORK_CONNECTION: R$1, ERROR_NETWORK_RESTRICTED: f$2, ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH: h, ERROR_RATE_LIMIT: S, ERROR_SERVER_TIMEOUT: D, ERROR_SUBSCRIPTION_NOT_ACTIVE: d$2, ERROR_TOKEN_EXPIRED: U, ERROR_TOKEN_INVALID: C, ERROR_TOKEN_MISSING: L, ERROR_UNSUPPORTED_VERSION: _$1, ERROR_WRONG_REGION: u$2, defaultEndpoint: r$2, defaultTlsEndpoint: o$2 };
4142
4097
  const FingerprintJSPro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4143
4098
  __proto__: null,
4144
- ERROR_API_KEY_EXPIRED: T,
4145
- ERROR_API_KEY_INVALID: N,
4146
- ERROR_API_KEY_MISSING: I,
4147
- ERROR_BAD_REQUEST_FORMAT: m$1,
4148
- ERROR_BAD_RESPONSE_FORMAT: s$3,
4149
- ERROR_CLIENT_TIMEOUT: u$2,
4150
- ERROR_CSP_BLOCK: f$2,
4151
- ERROR_FORBIDDEN_ENDPOINT: O,
4152
- ERROR_FORBIDDEN_HEADER: D,
4099
+ ERROR_API_KEY_EXPIRED: A,
4100
+ ERROR_API_KEY_INVALID: m$1,
4101
+ ERROR_API_KEY_MISSING: v,
4102
+ ERROR_BAD_REQUEST_FORMAT: w$1,
4103
+ ERROR_BAD_RESPONSE_FORMAT: a$2,
4104
+ ERROR_CLIENT_TIMEOUT: i$3,
4105
+ ERROR_CSP_BLOCK: c$3,
4106
+ ERROR_FORBIDDEN_ENDPOINT: p$1,
4107
+ ERROR_FORBIDDEN_HEADER: g$1,
4153
4108
  ERROR_FORBIDDEN_ORIGIN: y$1,
4154
- ERROR_GENERAL_SERVER_FAILURE: w$1,
4155
- ERROR_INSTALLATION_METHOD_RESTRICTED: _$1,
4156
- ERROR_INTEGRATION_FAILURE: h,
4157
- ERROR_INVALID_ENDPOINT: l$2,
4158
- ERROR_NETWORK_ABORT: c$3,
4109
+ ERROR_GENERAL_SERVER_FAILURE: P,
4110
+ ERROR_HANDLE_AGENT_DATA: l$2,
4111
+ ERROR_INSTALLATION_METHOD_RESTRICTED: O,
4112
+ ERROR_INTEGRATION_FAILURE: I,
4113
+ ERROR_INVALID_ENDPOINT: E$1,
4114
+ ERROR_INVALID_PROXY_INTEGRATION_HEADERS: T,
4115
+ ERROR_INVALID_PROXY_INTEGRATION_SECRET: N,
4116
+ ERROR_NETWORK_ABORT: s$3,
4159
4117
  ERROR_NETWORK_CONNECTION: R$1,
4160
- ERROR_RATE_LIMIT: P,
4161
- ERROR_SCRIPT_LOAD_FAIL: b,
4162
- ERROR_SERVER_TIMEOUT: A,
4163
- ERROR_SUBSCRIPTION_NOT_ACTIVE: p$1,
4164
- ERROR_TOKEN_EXPIRED: L,
4165
- ERROR_TOKEN_INVALID: g$1,
4166
- ERROR_TOKEN_MISSING: S,
4167
- ERROR_UNSUPPORTED_VERSION: v,
4168
- ERROR_WRONG_REGION: d$2,
4169
- default: G,
4170
- defaultEndpoint: i$3,
4171
- defaultScriptUrlPattern: B,
4172
- defaultTlsEndpoint: a$2,
4173
- load: F
4118
+ ERROR_NETWORK_RESTRICTED: f$2,
4119
+ ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH: h,
4120
+ ERROR_RATE_LIMIT: S,
4121
+ ERROR_SCRIPT_LOAD_FAIL: M,
4122
+ ERROR_SERVER_TIMEOUT: D,
4123
+ ERROR_SUBSCRIPTION_NOT_ACTIVE: d$2,
4124
+ ERROR_TOKEN_EXPIRED: U,
4125
+ ERROR_TOKEN_INVALID: C,
4126
+ ERROR_TOKEN_MISSING: L,
4127
+ ERROR_UNSUPPORTED_VERSION: _$1,
4128
+ ERROR_WRONG_REGION: u$2,
4129
+ default: H,
4130
+ defaultEndpoint: r$2,
4131
+ defaultScriptUrlPattern: G,
4132
+ defaultTlsEndpoint: o$2,
4133
+ load: B
4174
4134
  }, Symbol.toStringTag, { value: "Module" }));
4175
4135
  const CACHE_KEY_PREFIX = "@fpjs@client@";
4176
4136
  const MAX_CACHE_LIFE = 60 * 60 * 24;
@@ -4211,7 +4171,7 @@ class LocalStorageCache {
4211
4171
  }
4212
4172
  try {
4213
4173
  return JSON.parse(json);
4214
- } catch (e) {
4174
+ } catch (e2) {
4215
4175
  return;
4216
4176
  }
4217
4177
  }
@@ -4246,7 +4206,7 @@ class SessionStorageCache {
4246
4206
  }
4247
4207
  try {
4248
4208
  return JSON.parse(json);
4249
- } catch (e) {
4209
+ } catch (e2) {
4250
4210
  return;
4251
4211
  }
4252
4212
  }
@@ -4366,7 +4326,7 @@ var CacheLocation;
4366
4326
  CacheLocation2["SessionStorage"] = "sessionstorage";
4367
4327
  CacheLocation2["NoCache"] = "nocache";
4368
4328
  })(CacheLocation || (CacheLocation = {}));
4369
- var version$1 = "1.3.2";
4329
+ var version$1 = "1.3.3";
4370
4330
  const cacheLocationBuilders = {
4371
4331
  [CacheLocation.Memory]: () => new InMemoryCache().enclosedCache,
4372
4332
  [CacheLocation.LocalStorage]: (prefix) => new LocalStorageCache(prefix),
@@ -4378,14 +4338,14 @@ const doesBrowserSupportCacheLocation = (cacheLocation) => {
4378
4338
  case CacheLocation.SessionStorage:
4379
4339
  try {
4380
4340
  window.sessionStorage.getItem("item");
4381
- } catch (e) {
4341
+ } catch (e2) {
4382
4342
  return false;
4383
4343
  }
4384
4344
  return true;
4385
4345
  case CacheLocation.LocalStorage:
4386
4346
  try {
4387
4347
  window.localStorage.getItem("item");
4388
- } catch (e) {
4348
+ } catch (e2) {
4389
4349
  return false;
4390
4350
  }
4391
4351
  return true;
@@ -4403,6 +4363,9 @@ class FpjsClient {
4403
4363
  this.agentPromise = null;
4404
4364
  this.customAgent = options === null || options === void 0 ? void 0 : options.customAgent;
4405
4365
  this.agent = {
4366
+ collect: () => {
4367
+ throw new Error("FPJSAgent hasn't loaded yet. Make sure to call the init() method first.");
4368
+ },
4406
4369
  get: () => {
4407
4370
  throw new Error("FPJSAgent hasn't loaded yet. Make sure to call the init() method first.");
4408
4371
  }
@@ -4438,17 +4401,21 @@ class FpjsClient {
4438
4401
  */
4439
4402
  init(passedLoadOptions) {
4440
4403
  return __awaiter$1(this, void 0, void 0, function* () {
4441
- var _a, _b;
4404
+ var _a, _b, _c;
4442
4405
  if (!this.loadOptions && !passedLoadOptions) {
4443
4406
  throw new TypeError("No load options provided");
4444
4407
  }
4445
- const loadOptions = Object.assign(Object.assign(Object.assign({}, this.loadOptions), passedLoadOptions), { integrationInfo: [
4446
- ...((_a = this.loadOptions) === null || _a === void 0 ? void 0 : _a.integrationInfo) || [],
4447
- ...(passedLoadOptions === null || passedLoadOptions === void 0 ? void 0 : passedLoadOptions.integrationInfo) || [],
4448
- `fingerprintjs-pro-spa/${version$1}`
4449
- ] });
4408
+ const integrationInfo = (
4409
+ // @ts-ignore
4410
+ ((_a = this.loadOptions) === null || _a === void 0 ? void 0 : _a.silent) === true ? [] : [
4411
+ ...((_b = this.loadOptions) === null || _b === void 0 ? void 0 : _b.integrationInfo) || [],
4412
+ ...(passedLoadOptions === null || passedLoadOptions === void 0 ? void 0 : passedLoadOptions.integrationInfo) || [],
4413
+ `spa-sdk/${version$1}`
4414
+ ]
4415
+ );
4416
+ const loadOptions = Object.assign(Object.assign(Object.assign({}, this.loadOptions), passedLoadOptions), { integrationInfo });
4450
4417
  if (!this.agentPromise) {
4451
- const agentLoader = (_b = this.customAgent) !== null && _b !== void 0 ? _b : FingerprintJSPro;
4418
+ const agentLoader = (_c = this.customAgent) !== null && _c !== void 0 ? _c : FingerprintJSPro;
4452
4419
  this.agentPromise = agentLoader.load(loadOptions).then((agent) => {
4453
4420
  this.agent = agent;
4454
4421
  return agent;
@@ -4565,8 +4532,8 @@ function buildProxyUrl(url) {
4565
4532
  return `${url}?${PROXY_QUERY_PARAM}`;
4566
4533
  }
4567
4534
  async function initFingerprint(apiKey, proxyUrl) {
4568
- const customEndpointArray = [i$3];
4569
- const customScriptEndpointArray = [B];
4535
+ const customEndpointArray = [r$2];
4536
+ const customScriptEndpointArray = [G];
4570
4537
  if (proxyUrl) {
4571
4538
  customEndpointArray.unshift(proxyUrl);
4572
4539
  customScriptEndpointArray.unshift(buildProxyUrl(proxyUrl));
@@ -4681,16 +4648,16 @@ const o$1 = {
4681
4648
  code: 60,
4682
4649
  message: "Tarifa no disponible"
4683
4650
  }
4684
- }, n = (e) => ({
4651
+ }, n = (e2) => ({
4685
4652
  // INVALID_DISCOUNT
4686
4653
  11: {
4687
4654
  code: 500,
4688
- message: e
4655
+ message: e2
4689
4656
  },
4690
4657
  //EXPIRED_DISCOUNT
4691
4658
  12: {
4692
4659
  code: 501,
4693
- message: e
4660
+ message: e2
4694
4661
  }
4695
4662
  }), a = {
4696
4663
  // unavailable_student
@@ -4728,24 +4695,24 @@ const o$1 = {
4728
4695
  code: 60,
4729
4696
  message: "Error desconocido"
4730
4697
  }
4731
- }, c$1 = (e) => ({
4698
+ }, c$1 = (e2) => ({
4732
4699
  30: {
4733
4700
  code: 30,
4734
- message: e
4701
+ message: e2
4735
4702
  }
4736
4703
  }), d$1 = {
4737
4704
  50: {
4738
4705
  code: 50,
4739
4706
  message: "Unknow Error"
4740
4707
  }
4741
- }, i$2 = (e) => ({
4708
+ }, i$2 = (e2) => ({
4742
4709
  ...o$1,
4743
4710
  ...s$1,
4744
4711
  ...r,
4745
- ...n(e),
4712
+ ...n(e2),
4746
4713
  ...a,
4747
4714
  ...d$1,
4748
- ...c$1(e)
4715
+ ...c$1(e2)
4749
4716
  });
4750
4717
  class o extends Error {
4751
4718
  constructor(r2 = -100, s2 = "Unknown error", t2 = null) {
@@ -4753,10 +4720,10 @@ class o extends Error {
4753
4720
  }
4754
4721
  }
4755
4722
  async function w(t2) {
4756
- const e = [404, 422, 500], r2 = await t2.json();
4723
+ const e2 = [404, 422, 500], r2 = await t2.json();
4757
4724
  if (t2.ok)
4758
4725
  return r2;
4759
- if (e.includes(t2.status))
4726
+ if (e2.includes(t2.status))
4760
4727
  switch (t2.status) {
4761
4728
  case 404:
4762
4729
  throw new o(100, "Not found");
@@ -4772,8 +4739,8 @@ async function w(t2) {
4772
4739
  }
4773
4740
  function l$1(t2) {
4774
4741
  if (t2.errors instanceof Array) {
4775
- const { code: e = -100, message: r2 = "Unknown error" } = t2.errors[0] || {}, n2 = i$2(r2)[e];
4776
- throw n2 ? new o(n2.code, n2.message, t2.errors[0]) : new o(e, r2, t2.errors[0]);
4742
+ const { code: e2 = -100, message: r2 = "Unknown error" } = t2.errors[0] || {}, n2 = i$2(r2)[e2];
4743
+ throw n2 ? new o(n2.code, n2.message, t2.errors[0]) : new o(e2, r2, t2.errors[0]);
4777
4744
  } else
4778
4745
  return t2;
4779
4746
  }
@@ -4787,7 +4754,7 @@ function y(...t2) {
4787
4754
  );
4788
4755
  return new Headers(r2);
4789
4756
  }
4790
- function c(t2, e = {}, r2 = {}, n2) {
4757
+ function c(t2, e2 = {}, r2 = {}, n2) {
4791
4758
  const {
4792
4759
  apiKey: o2,
4793
4760
  withCredentials: a2,
@@ -4798,21 +4765,21 @@ function c(t2, e = {}, r2 = {}, n2) {
4798
4765
  Authorization: `Token token=${r2.apiKey || o2}`,
4799
4766
  "Content-Type": "application/json"
4800
4767
  };
4801
- return s2 && (u3.Authorization = `Token ${r2.apiKey || o2}, Bearer ${s2}`), e.headers = y(d2, u3), e.credentials = a2 ? "include" : "omit", typeof e.body != "string" && (e.body = JSON.stringify(e.body)), fetch(t2, e).then(w).then(l$1).catch(n2);
4768
+ return s2 && (u3.Authorization = `Token ${r2.apiKey || o2}, Bearer ${s2}`), e2.headers = y(d2, u3), e2.credentials = a2 ? "include" : "omit", typeof e2.body != "string" && (e2.body = JSON.stringify(e2.body)), fetch(t2, e2).then(w).then(l$1).catch(n2);
4802
4769
  }
4803
- function E(t2, e = {}, r2) {
4804
- return c(t2, e, {}, r2);
4770
+ function E(t2, e2 = {}, r2) {
4771
+ return c(t2, e2, {}, r2);
4805
4772
  }
4806
4773
  let u$1 = class u {
4807
4774
  constructor({
4808
- url: e,
4775
+ url: e2,
4809
4776
  watch: i,
4810
4777
  expect: h2,
4811
4778
  maxRetries: t2 = 30,
4812
4779
  interval: s2 = 2e3,
4813
4780
  eachCall: c2 = null
4814
4781
  }) {
4815
- this.url = e, this.watch = i, this.expect = h2 instanceof Array ? h2 : [h2], this.interval = s2, this.maxRetries = t2, this.eachCall = c2 && c2.bind(this), this.aborted = false, this.timers = [], this.execute = this.execute.bind(this), this.executeEachCall = this.executeEachCall.bind(this);
4782
+ this.url = e2, this.watch = i, this.expect = h2 instanceof Array ? h2 : [h2], this.interval = s2, this.maxRetries = t2, this.eachCall = c2 && c2.bind(this), this.aborted = false, this.timers = [], this.execute = this.execute.bind(this), this.executeEachCall = this.executeEachCall.bind(this);
4816
4783
  }
4817
4784
  start() {
4818
4785
  return this.execute(this.maxRetries);
@@ -4820,11 +4787,11 @@ let u$1 = class u {
4820
4787
  abort() {
4821
4788
  this.aborted = true;
4822
4789
  }
4823
- execute(e) {
4790
+ execute(e2) {
4824
4791
  const i = (t2) => {
4825
- if (this.expect.includes(t2[this.watch]) || e === 1 || this.aborted) {
4792
+ if (this.expect.includes(t2[this.watch]) || e2 === 1 || this.aborted) {
4826
4793
  let s2 = t2[this.watch];
4827
- e === 1 ? s2 = "retries_exceeded" : this.aborted && (s2 = "aborted"), this.timers.forEach(clearInterval), this.executeEachCall(s2, t2);
4794
+ e2 === 1 ? s2 = "retries_exceeded" : this.aborted && (s2 = "aborted"), this.timers.forEach(clearInterval), this.executeEachCall(s2, t2);
4828
4795
  } else if (t2[this.watch] === "failed")
4829
4796
  this.timers.forEach(clearInterval), this.executeEachCall("failed", t2);
4830
4797
  else {
@@ -4832,15 +4799,15 @@ let u$1 = class u {
4832
4799
  const s2 = window.setTimeout(
4833
4800
  this.execute,
4834
4801
  this.interval,
4835
- e - 1
4802
+ e2 - 1
4836
4803
  );
4837
4804
  this.timers.push(s2);
4838
4805
  }
4839
4806
  }, h2 = (t2) => this.executeEachCall("error", t2);
4840
4807
  return E(this.url, {}, h2).then(i);
4841
4808
  }
4842
- executeEachCall(e, i) {
4843
- this.eachCall instanceof Function && this.eachCall({ status: e, payload: i }) && this.abort();
4809
+ executeEachCall(e2, i) {
4810
+ this.eachCall instanceof Function && this.eachCall({ status: e2, payload: i }) && this.abort();
4844
4811
  }
4845
4812
  };
4846
4813
  function j({
@@ -4850,23 +4817,23 @@ function j({
4850
4817
  let n2, i = {
4851
4818
  "Content-Type": "application/json"
4852
4819
  }, r2;
4853
- function f2(e) {
4854
- n2 = e.baseUrl, i = {
4820
+ function f2(e2) {
4821
+ n2 = e2.baseUrl, i = {
4855
4822
  ...i,
4856
- ...e.defaultHeaders || {}
4823
+ ...e2.defaultHeaders || {}
4857
4824
  };
4858
4825
  }
4859
- function p2(e) {
4860
- r2 = e;
4826
+ function p2(e2) {
4827
+ r2 = e2;
4861
4828
  }
4862
4829
  function d2() {
4863
4830
  if (!n2)
4864
4831
  throw new Error(`Base URL is not set for ${h2} API.`);
4865
4832
  }
4866
4833
  const $ = { body: {} };
4867
- async function y2(e, t2 = $) {
4834
+ async function y2(e2, t2 = $) {
4868
4835
  d2();
4869
- const { body: s2, headers: o2 = {}, apiVersion: a2 = c2 } = t2, u3 = `${n2}/${a2}/${e}`, l2 = {
4836
+ const { body: s2, headers: o2 = {}, apiVersion: a2 = c2 } = t2, u3 = `${n2}/${a2}/${e2}`, l2 = {
4870
4837
  ...i,
4871
4838
  ...o2,
4872
4839
  ...r2 ? { Authorization: r2 } : {}
@@ -4877,23 +4844,23 @@ function j({
4877
4844
  headers: l2
4878
4845
  })).json();
4879
4846
  }
4880
- async function w2(e, t2 = {}) {
4847
+ async function w2(e2, t2 = {}) {
4881
4848
  d2();
4882
- const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e}`;
4849
+ const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e2}`;
4883
4850
  return (await fetch(a2, { headers: s2 })).json();
4884
4851
  }
4885
- function H(e, t2) {
4852
+ function H2(e2, t2) {
4886
4853
  const o2 = {
4887
- url: `${n2}/${c2}/${e}`,
4854
+ url: `${n2}/${c2}/${e2}`,
4888
4855
  watch: t2.watch,
4889
4856
  expect: t2.expect,
4890
4857
  eachCall: t2.onEachResponse
4891
4858
  };
4892
4859
  return new u$1(o2);
4893
4860
  }
4894
- async function b2(e, t2 = {}) {
4861
+ async function b2(e2, t2 = {}) {
4895
4862
  d2();
4896
- const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e}`, u3 = {
4863
+ const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e2}`, u3 = {
4897
4864
  ...i,
4898
4865
  ...s2,
4899
4866
  ...r2 ? { Authorization: r2 } : {}
@@ -4909,7 +4876,7 @@ function j({
4909
4876
  delete: b2,
4910
4877
  setAuthorizationHeader: p2,
4911
4878
  setConfig: f2,
4912
- poll: H
4879
+ poll: H2
4913
4880
  };
4914
4881
  }
4915
4882
  const t$1 = j({
@@ -4917,64 +4884,64 @@ const t$1 = j({
4917
4884
  defaultApiVersion: "v1"
4918
4885
  });
4919
4886
  async function t(o2) {
4920
- const { data: e } = await t$1.post(
4887
+ const { data: e2 } = await t$1.post(
4921
4888
  "anonymous_profiles/identify",
4922
4889
  {
4923
4890
  body: o2
4924
4891
  }
4925
4892
  );
4926
- return e;
4893
+ return e2;
4927
4894
  }
4928
4895
  const s = {
4929
4896
  createAnonymousProfile: t
4930
4897
  };
4931
4898
  function d({
4932
- searchId: e,
4899
+ searchId: e2,
4933
4900
  userIdentifier: t2
4934
4901
  }) {
4935
4902
  return t$1.get(
4936
- `trip_recommendations/${e}/${t2}`
4903
+ `trip_recommendations/${e2}/${t2}`
4937
4904
  );
4938
4905
  }
4939
- function i$1(e) {
4906
+ function i$1(e2) {
4940
4907
  return t$1.post("seat_recommendations", {
4941
- body: e
4908
+ body: e2
4942
4909
  });
4943
4910
  }
4944
4911
  function p({
4945
- distinct_id: e,
4912
+ distinct_id: e2,
4946
4913
  ...t2
4947
4914
  }) {
4948
- return t$1.post(`seat_recommendations/${e}`, {
4915
+ return t$1.post(`seat_recommendations/${e2}`, {
4949
4916
  body: t2
4950
4917
  });
4951
4918
  }
4952
- function u2(e, t2) {
4953
- const { start: o2, onEachResponse: r2 } = t2, c2 = `profiles/${e}`, a2 = {
4919
+ function u2(e2, t2) {
4920
+ const { start: o2, onEachResponse: r2 } = t2, c2 = `profiles/${e2}`, a2 = {
4954
4921
  watch: "state",
4955
4922
  expect: "finished",
4956
4923
  onEachResponse: r2
4957
4924
  }, s2 = t$1.poll(c2, a2);
4958
4925
  return o2 && s2.start(), s2;
4959
4926
  }
4960
- async function m(e) {
4927
+ async function m(e2) {
4961
4928
  return t$1.post("profiles", {
4962
- body: e
4929
+ body: e2
4963
4930
  });
4964
4931
  }
4965
- async function l(e) {
4932
+ async function l(e2) {
4966
4933
  return t$1.post("passengers", {
4967
- body: e
4934
+ body: e2
4968
4935
  });
4969
4936
  }
4970
- async function f$1(e) {
4937
+ async function f$1(e2) {
4971
4938
  return t$1.get(
4972
- `passengers/${e}`
4939
+ `passengers/${e2}`
4973
4940
  );
4974
4941
  }
4975
- async function g(e, t2) {
4942
+ async function g(e2, t2) {
4976
4943
  return t$1.delete(
4977
- `passengers/${e}/${t2}`
4944
+ `passengers/${e2}/${t2}`
4978
4945
  );
4979
4946
  }
4980
4947
  const R = {
@@ -5175,11 +5142,11 @@ function is2DCanvasBlank(canvas) {
5175
5142
  if (!ctx)
5176
5143
  return true;
5177
5144
  const chunkSize = 50;
5178
- for (let x = 0; x < canvas.width; x += chunkSize) {
5145
+ for (let x2 = 0; x2 < canvas.width; x2 += chunkSize) {
5179
5146
  for (let y2 = 0; y2 < canvas.height; y2 += chunkSize) {
5180
5147
  const getImageData = ctx.getImageData;
5181
5148
  const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;
5182
- const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x, y2, Math.min(chunkSize, canvas.width - x), Math.min(chunkSize, canvas.height - y2)).data.buffer);
5149
+ const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x2, y2, Math.min(chunkSize, canvas.width - x2), Math.min(chunkSize, canvas.height - y2)).data.buffer);
5183
5150
  if (pixelBuffer.some((pixel) => pixel !== 0))
5184
5151
  return false;
5185
5152
  }
@@ -5376,7 +5343,7 @@ function _isBlockedElement(element, blockClass, blockSelector) {
5376
5343
  if (blockSelector) {
5377
5344
  return element.matches(blockSelector);
5378
5345
  }
5379
- } catch (e) {
5346
+ } catch (e2) {
5380
5347
  }
5381
5348
  return false;
5382
5349
  }
@@ -5424,7 +5391,7 @@ function needMaskingText(node, maskTextClass, maskTextSelector, checkAncestors)
5424
5391
  return true;
5425
5392
  }
5426
5393
  }
5427
- } catch (e) {
5394
+ } catch (e2) {
5428
5395
  }
5429
5396
  return false;
5430
5397
  }
@@ -5713,7 +5680,7 @@ function serializeElementNode(n2, options) {
5713
5680
  try {
5714
5681
  if (customElements.get(tagName))
5715
5682
  isCustomElement = true;
5716
- } catch (e) {
5683
+ } catch (e2) {
5717
5684
  }
5718
5685
  return {
5719
5686
  type: NodeType.Element,
@@ -6139,7 +6106,7 @@ function isBlocked(node, blockClass, blockSelector, checkAncestors) {
6139
6106
  if (classMatchesRegex(el, blockClass, checkAncestors))
6140
6107
  return true;
6141
6108
  }
6142
- } catch (e) {
6109
+ } catch (e2) {
6143
6110
  }
6144
6111
  if (blockSelector) {
6145
6112
  if (el.matches(blockSelector))
@@ -6675,7 +6642,7 @@ class MutationBuffer {
6675
6642
  if (!this.unattachedDoc) {
6676
6643
  try {
6677
6644
  this.unattachedDoc = document.implementation.createHTMLDocument();
6678
- } catch (e) {
6645
+ } catch (e2) {
6679
6646
  this.unattachedDoc = this.doc;
6680
6647
  }
6681
6648
  }
@@ -7008,12 +6975,12 @@ function initMouseInteractionObserver({ mouseInteractionCb, doc, mirror: mirror2
7008
6975
  pointerType = currentPointerType;
7009
6976
  currentPointerType = null;
7010
6977
  }
7011
- const e = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;
7012
- if (!e) {
6978
+ const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;
6979
+ if (!e2) {
7013
6980
  return;
7014
6981
  }
7015
6982
  const id = mirror2.getId(target);
7016
- const { clientX, clientY } = e;
6983
+ const { clientX, clientY } = e2;
7017
6984
  callbackWrapper(mouseInteractionCb)(Object.assign({ type: MouseInteractions[thisEventKey], id, x: clientX, y: clientY }, pointerType !== null && { pointerType }));
7018
6985
  };
7019
6986
  };
@@ -7354,7 +7321,7 @@ function initAdoptedStyleSheetObserver({ mirror: mirror2, stylesheetManager }, h
7354
7321
  if (hostId !== null && hostId !== -1) {
7355
7322
  try {
7356
7323
  stylesheetManager.adoptStyleSheets(sheets, hostId);
7357
- } catch (e) {
7324
+ } catch (e2) {
7358
7325
  }
7359
7326
  }
7360
7327
  return result;
@@ -7529,7 +7496,7 @@ function initCustomElementObserver({ doc, customElementCb }) {
7529
7496
  name
7530
7497
  }
7531
7498
  });
7532
- } catch (e) {
7499
+ } catch (e2) {
7533
7500
  console.warn(`Custom element callback failed for ${name}`);
7534
7501
  }
7535
7502
  return original.apply(this, [name, constructor, options]);
@@ -7803,18 +7770,18 @@ class IframeManager {
7803
7770
  if (transformedEvent)
7804
7771
  this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout);
7805
7772
  }
7806
- transformCrossOriginEvent(iframeEl, e) {
7773
+ transformCrossOriginEvent(iframeEl, e2) {
7807
7774
  var _a;
7808
- switch (e.type) {
7775
+ switch (e2.type) {
7809
7776
  case EventType$1.FullSnapshot: {
7810
7777
  this.crossOriginIframeMirror.reset(iframeEl);
7811
7778
  this.crossOriginIframeStyleMirror.reset(iframeEl);
7812
- this.replaceIdOnNode(e.data.node, iframeEl);
7813
- const rootId = e.data.node.id;
7779
+ this.replaceIdOnNode(e2.data.node, iframeEl);
7780
+ const rootId = e2.data.node.id;
7814
7781
  this.crossOriginIframeRootIdMap.set(iframeEl, rootId);
7815
- this.patchRootIdOnNode(e.data.node, rootId);
7782
+ this.patchRootIdOnNode(e2.data.node, rootId);
7816
7783
  return {
7817
- timestamp: e.timestamp,
7784
+ timestamp: e2.timestamp,
7818
7785
  type: EventType$1.IncrementalSnapshot,
7819
7786
  data: {
7820
7787
  source: IncrementalSource$1.Mutation,
@@ -7822,7 +7789,7 @@ class IframeManager {
7822
7789
  {
7823
7790
  parentId: this.mirror.getId(iframeEl),
7824
7791
  nextId: null,
7825
- node: e.data.node
7792
+ node: e2.data.node
7826
7793
  }
7827
7794
  ],
7828
7795
  removes: [],
@@ -7838,16 +7805,16 @@ class IframeManager {
7838
7805
  return false;
7839
7806
  }
7840
7807
  case EventType$1.Plugin: {
7841
- return e;
7808
+ return e2;
7842
7809
  }
7843
7810
  case EventType$1.Custom: {
7844
- this.replaceIds(e.data.payload, iframeEl, ["id", "parentId", "previousId", "nextId"]);
7845
- return e;
7811
+ this.replaceIds(e2.data.payload, iframeEl, ["id", "parentId", "previousId", "nextId"]);
7812
+ return e2;
7846
7813
  }
7847
7814
  case EventType$1.IncrementalSnapshot: {
7848
- switch (e.data.source) {
7815
+ switch (e2.data.source) {
7849
7816
  case IncrementalSource$1.Mutation: {
7850
- e.data.adds.forEach((n2) => {
7817
+ e2.data.adds.forEach((n2) => {
7851
7818
  this.replaceIds(n2, iframeEl, [
7852
7819
  "parentId",
7853
7820
  "nextId",
@@ -7857,24 +7824,24 @@ class IframeManager {
7857
7824
  const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);
7858
7825
  rootId && this.patchRootIdOnNode(n2.node, rootId);
7859
7826
  });
7860
- e.data.removes.forEach((n2) => {
7827
+ e2.data.removes.forEach((n2) => {
7861
7828
  this.replaceIds(n2, iframeEl, ["parentId", "id"]);
7862
7829
  });
7863
- e.data.attributes.forEach((n2) => {
7830
+ e2.data.attributes.forEach((n2) => {
7864
7831
  this.replaceIds(n2, iframeEl, ["id"]);
7865
7832
  });
7866
- e.data.texts.forEach((n2) => {
7833
+ e2.data.texts.forEach((n2) => {
7867
7834
  this.replaceIds(n2, iframeEl, ["id"]);
7868
7835
  });
7869
- return e;
7836
+ return e2;
7870
7837
  }
7871
7838
  case IncrementalSource$1.Drag:
7872
7839
  case IncrementalSource$1.TouchMove:
7873
7840
  case IncrementalSource$1.MouseMove: {
7874
- e.data.positions.forEach((p2) => {
7841
+ e2.data.positions.forEach((p2) => {
7875
7842
  this.replaceIds(p2, iframeEl, ["id"]);
7876
7843
  });
7877
- return e;
7844
+ return e2;
7878
7845
  }
7879
7846
  case IncrementalSource$1.ViewportResize: {
7880
7847
  return false;
@@ -7884,31 +7851,31 @@ class IframeManager {
7884
7851
  case IncrementalSource$1.Scroll:
7885
7852
  case IncrementalSource$1.CanvasMutation:
7886
7853
  case IncrementalSource$1.Input: {
7887
- this.replaceIds(e.data, iframeEl, ["id"]);
7888
- return e;
7854
+ this.replaceIds(e2.data, iframeEl, ["id"]);
7855
+ return e2;
7889
7856
  }
7890
7857
  case IncrementalSource$1.StyleSheetRule:
7891
7858
  case IncrementalSource$1.StyleDeclaration: {
7892
- this.replaceIds(e.data, iframeEl, ["id"]);
7893
- this.replaceStyleIds(e.data, iframeEl, ["styleId"]);
7894
- return e;
7859
+ this.replaceIds(e2.data, iframeEl, ["id"]);
7860
+ this.replaceStyleIds(e2.data, iframeEl, ["styleId"]);
7861
+ return e2;
7895
7862
  }
7896
7863
  case IncrementalSource$1.Font: {
7897
- return e;
7864
+ return e2;
7898
7865
  }
7899
7866
  case IncrementalSource$1.Selection: {
7900
- e.data.ranges.forEach((range) => {
7867
+ e2.data.ranges.forEach((range) => {
7901
7868
  this.replaceIds(range, iframeEl, ["start", "end"]);
7902
7869
  });
7903
- return e;
7870
+ return e2;
7904
7871
  }
7905
7872
  case IncrementalSource$1.AdoptedStyleSheet: {
7906
- this.replaceIds(e.data, iframeEl, ["id"]);
7907
- this.replaceStyleIds(e.data, iframeEl, ["styleIds"]);
7908
- (_a = e.data.styles) === null || _a === void 0 ? void 0 : _a.forEach((style) => {
7873
+ this.replaceIds(e2.data, iframeEl, ["id"]);
7874
+ this.replaceStyleIds(e2.data, iframeEl, ["styleIds"]);
7875
+ (_a = e2.data.styles) === null || _a === void 0 ? void 0 : _a.forEach((style) => {
7909
7876
  this.replaceStyleIds(style, iframeEl, ["styleId"]);
7910
7877
  });
7911
- return e;
7878
+ return e2;
7912
7879
  }
7913
7880
  }
7914
7881
  }
@@ -8003,7 +7970,7 @@ class ShadowDomManager {
8003
7970
  this.restoreHandlers.forEach((handler) => {
8004
7971
  try {
8005
7972
  handler();
8006
- } catch (e) {
7973
+ } catch (e2) {
8007
7974
  }
8008
7975
  });
8009
7976
  this.restoreHandlers = [];
@@ -8024,13 +7991,13 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
8024
7991
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8025
7992
  PERFORMANCE OF THIS SOFTWARE.
8026
7993
  ***************************************************************************** */
8027
- function __rest(s2, e) {
7994
+ function __rest(s2, e2) {
8028
7995
  var t2 = {};
8029
- for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e.indexOf(p2) < 0)
7996
+ for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
8030
7997
  t2[p2] = s2[p2];
8031
7998
  if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
8032
7999
  for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
8033
- if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i]))
8000
+ if (e2.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i]))
8034
8001
  t2[p2[i]] = s2[p2[i]];
8035
8002
  }
8036
8003
  return t2;
@@ -8045,15 +8012,15 @@ function __awaiter(thisArg, _arguments, P2, generator) {
8045
8012
  function fulfilled(value) {
8046
8013
  try {
8047
8014
  step(generator.next(value));
8048
- } catch (e) {
8049
- reject(e);
8015
+ } catch (e2) {
8016
+ reject(e2);
8050
8017
  }
8051
8018
  }
8052
8019
  function rejected(value) {
8053
8020
  try {
8054
8021
  step(generator["throw"](value));
8055
- } catch (e) {
8056
- reject(e);
8022
+ } catch (e2) {
8023
+ reject(e2);
8057
8024
  }
8058
8025
  }
8059
8026
  function step(result) {
@@ -8374,15 +8341,15 @@ var WorkerFactory = createInlineWorkerFactory(
8374
8341
  function fulfilled(value) {
8375
8342
  try {
8376
8343
  step(generator.next(value));
8377
- } catch (e) {
8378
- reject(e);
8344
+ } catch (e2) {
8345
+ reject(e2);
8379
8346
  }
8380
8347
  }
8381
8348
  function rejected(value) {
8382
8349
  try {
8383
8350
  step(generator["throw"](value));
8384
- } catch (e) {
8385
- reject(e);
8351
+ } catch (e2) {
8352
+ reject(e2);
8386
8353
  }
8387
8354
  }
8388
8355
  function step(result) {
@@ -8432,10 +8399,10 @@ var WorkerFactory = createInlineWorkerFactory(
8432
8399
  });
8433
8400
  }
8434
8401
  const worker = self;
8435
- worker.onmessage = function(e) {
8402
+ worker.onmessage = function(e2) {
8436
8403
  return __awaiter2(this, void 0, void 0, function* () {
8437
8404
  if ("OffscreenCanvas" in globalThis) {
8438
- const { id, bitmap, width, height, dataURLOptions } = e.data;
8405
+ const { id, bitmap, width, height, dataURLOptions } = e2.data;
8439
8406
  const transparentBase64 = getTransparentBlobFor(width, height, dataURLOptions);
8440
8407
  const offscreen = new OffscreenCanvas(width, height);
8441
8408
  const ctx = offscreen.getContext("2d");
@@ -8460,7 +8427,7 @@ var WorkerFactory = createInlineWorkerFactory(
8460
8427
  });
8461
8428
  lastBlobMap.set(id, base64);
8462
8429
  } else {
8463
- return worker.postMessage({ id: e.data.id });
8430
+ return worker.postMessage({ id: e2.data.id });
8464
8431
  }
8465
8432
  });
8466
8433
  };
@@ -8512,12 +8479,12 @@ class CanvasManager {
8512
8479
  const canvasContextReset = initCanvasContextObserver(win2, blockClass, blockSelector, true);
8513
8480
  const snapshotInProgressMap = /* @__PURE__ */ new Map();
8514
8481
  const worker = new WorkerFactory();
8515
- worker.onmessage = (e) => {
8516
- const { id } = e.data;
8482
+ worker.onmessage = (e2) => {
8483
+ const { id } = e2.data;
8517
8484
  snapshotInProgressMap.set(id, false);
8518
- if (!("base64" in e.data))
8485
+ if (!("base64" in e2.data))
8519
8486
  return;
8520
- const { base64, type, width, height } = e.data;
8487
+ const { base64, type, width, height } = e2.data;
8521
8488
  this.mutationCb({
8522
8489
  id,
8523
8490
  type: CanvasContext["2D"],
@@ -8729,8 +8696,8 @@ class ProcessedNodeManager {
8729
8696
  this.loop = false;
8730
8697
  }
8731
8698
  }
8732
- function wrapEvent(e) {
8733
- return Object.assign(Object.assign({}, e), { timestamp: nowTimestamp() });
8699
+ function wrapEvent(e2) {
8700
+ return Object.assign(Object.assign({}, e2), { timestamp: nowTimestamp() });
8734
8701
  }
8735
8702
  let wrappedEmit;
8736
8703
  let takeFullSnapshot;
@@ -8747,7 +8714,7 @@ function record(options = {}) {
8747
8714
  if (window.parent.document) {
8748
8715
  passEmitsToParent = false;
8749
8716
  }
8750
- } catch (e) {
8717
+ } catch (e2) {
8751
8718
  passEmitsToParent = true;
8752
8719
  }
8753
8720
  }
@@ -8791,43 +8758,43 @@ function record(options = {}) {
8791
8758
  polyfill();
8792
8759
  let lastFullSnapshotEvent;
8793
8760
  let incrementalSnapshotCount = 0;
8794
- const eventProcessor = (e) => {
8761
+ const eventProcessor = (e2) => {
8795
8762
  for (const plugin of plugins || []) {
8796
8763
  if (plugin.eventProcessor) {
8797
- e = plugin.eventProcessor(e);
8764
+ e2 = plugin.eventProcessor(e2);
8798
8765
  }
8799
8766
  }
8800
8767
  if (packFn && !passEmitsToParent) {
8801
- e = packFn(e);
8768
+ e2 = packFn(e2);
8802
8769
  }
8803
- return e;
8770
+ return e2;
8804
8771
  };
8805
- wrappedEmit = (e, isCheckout) => {
8772
+ wrappedEmit = (e2, isCheckout) => {
8806
8773
  var _a;
8807
- if (((_a = mutationBuffers[0]) === null || _a === void 0 ? void 0 : _a.isFrozen()) && e.type !== EventType$1.FullSnapshot && !(e.type === EventType$1.IncrementalSnapshot && e.data.source === IncrementalSource$1.Mutation)) {
8774
+ if (((_a = mutationBuffers[0]) === null || _a === void 0 ? void 0 : _a.isFrozen()) && e2.type !== EventType$1.FullSnapshot && !(e2.type === EventType$1.IncrementalSnapshot && e2.data.source === IncrementalSource$1.Mutation)) {
8808
8775
  mutationBuffers.forEach((buf) => buf.unfreeze());
8809
8776
  }
8810
8777
  if (inEmittingFrame) {
8811
- emit === null || emit === void 0 ? void 0 : emit(eventProcessor(e), isCheckout);
8778
+ emit === null || emit === void 0 ? void 0 : emit(eventProcessor(e2), isCheckout);
8812
8779
  } else if (passEmitsToParent) {
8813
8780
  const message = {
8814
8781
  type: "rrweb",
8815
- event: eventProcessor(e),
8782
+ event: eventProcessor(e2),
8816
8783
  origin: window.location.origin,
8817
8784
  isCheckout
8818
8785
  };
8819
8786
  window.parent.postMessage(message, "*");
8820
8787
  }
8821
- if (e.type === EventType$1.FullSnapshot) {
8822
- lastFullSnapshotEvent = e;
8788
+ if (e2.type === EventType$1.FullSnapshot) {
8789
+ lastFullSnapshotEvent = e2;
8823
8790
  incrementalSnapshotCount = 0;
8824
- } else if (e.type === EventType$1.IncrementalSnapshot) {
8825
- if (e.data.source === IncrementalSource$1.Mutation && e.data.isAttachIframe) {
8791
+ } else if (e2.type === EventType$1.IncrementalSnapshot) {
8792
+ if (e2.data.source === IncrementalSource$1.Mutation && e2.data.isAttachIframe) {
8826
8793
  return;
8827
8794
  }
8828
8795
  incrementalSnapshotCount++;
8829
8796
  const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
8830
- const exceedTime = checkoutEveryNms && e.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
8797
+ const exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
8831
8798
  if (exceedCount || exceedTime) {
8832
8799
  takeFullSnapshot(true);
8833
8800
  }
@@ -9316,7 +9283,7 @@ _.isArray = nativeIsArray || function(obj) {
9316
9283
  _.isFunction = function(f2) {
9317
9284
  try {
9318
9285
  return /^\s*\bfunction\b/.test(f2);
9319
- } catch (x) {
9286
+ } catch (x2) {
9320
9287
  return false;
9321
9288
  }
9322
9289
  };
@@ -9558,10 +9525,10 @@ _.JSONDecode = function() {
9558
9525
  "r": "\r",
9559
9526
  "t": " "
9560
9527
  }, text, error = function(m2) {
9561
- var e = new SyntaxError(m2);
9562
- e.at = at;
9563
- e.text = text;
9564
- throw e;
9528
+ var e2 = new SyntaxError(m2);
9529
+ e2.at = at;
9530
+ e2.text = text;
9531
+ throw e2;
9565
9532
  }, next = function(c2) {
9566
9533
  if (c2 && c2 !== ch) {
9567
9534
  error("Expected '" + c2 + "' instead of '" + ch + "'");
@@ -10088,8 +10055,8 @@ _.register_event = function() {
10088
10055
  }();
10089
10056
  var TOKEN_MATCH_REGEX = new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');
10090
10057
  _.dom_query = /* @__PURE__ */ function() {
10091
- function getAllChildren(e) {
10092
- return e.all ? e.all : e.getElementsByTagName("*");
10058
+ function getAllChildren(e2) {
10059
+ return e2.all ? e2.all : e2.getElementsByTagName("*");
10093
10060
  }
10094
10061
  var bad_whitespace = /[\t\r\n]/g;
10095
10062
  function hasClass(elem, selector) {
@@ -10171,38 +10138,38 @@ _.dom_query = /* @__PURE__ */ function() {
10171
10138
  var checkFunction;
10172
10139
  switch (attrOperator) {
10173
10140
  case "=":
10174
- checkFunction = function(e) {
10175
- return e.getAttribute(attrName) == attrValue;
10141
+ checkFunction = function(e2) {
10142
+ return e2.getAttribute(attrName) == attrValue;
10176
10143
  };
10177
10144
  break;
10178
10145
  case "~":
10179
- checkFunction = function(e) {
10180
- return e.getAttribute(attrName).match(new RegExp("\\b" + attrValue + "\\b"));
10146
+ checkFunction = function(e2) {
10147
+ return e2.getAttribute(attrName).match(new RegExp("\\b" + attrValue + "\\b"));
10181
10148
  };
10182
10149
  break;
10183
10150
  case "|":
10184
- checkFunction = function(e) {
10185
- return e.getAttribute(attrName).match(new RegExp("^" + attrValue + "-?"));
10151
+ checkFunction = function(e2) {
10152
+ return e2.getAttribute(attrName).match(new RegExp("^" + attrValue + "-?"));
10186
10153
  };
10187
10154
  break;
10188
10155
  case "^":
10189
- checkFunction = function(e) {
10190
- return e.getAttribute(attrName).indexOf(attrValue) === 0;
10156
+ checkFunction = function(e2) {
10157
+ return e2.getAttribute(attrName).indexOf(attrValue) === 0;
10191
10158
  };
10192
10159
  break;
10193
10160
  case "$":
10194
- checkFunction = function(e) {
10195
- return e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length;
10161
+ checkFunction = function(e2) {
10162
+ return e2.getAttribute(attrName).lastIndexOf(attrValue) == e2.getAttribute(attrName).length - attrValue.length;
10196
10163
  };
10197
10164
  break;
10198
10165
  case "*":
10199
- checkFunction = function(e) {
10200
- return e.getAttribute(attrName).indexOf(attrValue) > -1;
10166
+ checkFunction = function(e2) {
10167
+ return e2.getAttribute(attrName).indexOf(attrValue) > -1;
10201
10168
  };
10202
10169
  break;
10203
10170
  default:
10204
- checkFunction = function(e) {
10205
- return e.getAttribute(attrName);
10171
+ checkFunction = function(e2) {
10172
+ return e2.getAttribute(attrName);
10206
10173
  };
10207
10174
  }
10208
10175
  currentContext = [];
@@ -11395,11 +11362,11 @@ DomTracker.prototype.track = function(query, event_name, properties, user_callba
11395
11362
  return;
11396
11363
  }
11397
11364
  _.each(elements, function(element) {
11398
- _.register_event(element, this.override_event, function(e) {
11365
+ _.register_event(element, this.override_event, function(e2) {
11399
11366
  var options = {};
11400
11367
  var props = that.create_properties(properties, this);
11401
11368
  var timeout = that.mp.get_config("track_links_timeout");
11402
- that.event_handler(e, this, options);
11369
+ that.event_handler(e2, this, options);
11403
11370
  window.setTimeout(that.track_callback(user_callback, props, options, true), timeout);
11404
11371
  that.mp.track(event_name, props, that.track_callback(user_callback, props, options));
11405
11372
  });
@@ -12215,8 +12182,8 @@ var load_extra_bundle = function(src, _onload) {
12215
12182
  var mixpanel_master;
12216
12183
  var INIT_MODULE = 0;
12217
12184
  var INIT_SNIPPET = 1;
12218
- var IDENTITY_FUNC = function(x) {
12219
- return x;
12185
+ var IDENTITY_FUNC = function(x2) {
12186
+ return x2;
12220
12187
  };
12221
12188
  var NOOP_FUNC = function() {
12222
12189
  };
@@ -12624,16 +12591,16 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
12624
12591
  } else if (use_sendBeacon) {
12625
12592
  try {
12626
12593
  succeeded = sendBeacon(url, body_data);
12627
- } catch (e) {
12628
- lib.report_error(e);
12594
+ } catch (e2) {
12595
+ lib.report_error(e2);
12629
12596
  succeeded = false;
12630
12597
  }
12631
12598
  try {
12632
12599
  if (callback) {
12633
12600
  callback(succeeded ? 1 : 0);
12634
12601
  }
12635
- } catch (e) {
12636
- lib.report_error(e);
12602
+ } catch (e2) {
12603
+ lib.report_error(e2);
12637
12604
  }
12638
12605
  } else if (USE_XHR) {
12639
12606
  try {
@@ -12659,8 +12626,8 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
12659
12626
  var response;
12660
12627
  try {
12661
12628
  response = _.JSONDecode(req.responseText);
12662
- } catch (e) {
12663
- lib.report_error(e);
12629
+ } catch (e2) {
12630
+ lib.report_error(e2);
12664
12631
  if (options.ignore_json_errors) {
12665
12632
  response = req.responseText;
12666
12633
  } else {
@@ -12692,8 +12659,8 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
12692
12659
  }
12693
12660
  };
12694
12661
  req.send(body_data);
12695
- } catch (e) {
12696
- lib.report_error(e);
12662
+ } catch (e2) {
12663
+ lib.report_error(e2);
12697
12664
  succeeded = false;
12698
12665
  }
12699
12666
  } else {
@@ -13387,7 +13354,7 @@ var add_dom_loaded_handler = function() {
13387
13354
  function do_scroll_check() {
13388
13355
  try {
13389
13356
  document$1.documentElement.doScroll("left");
13390
- } catch (e) {
13357
+ } catch (e2) {
13391
13358
  setTimeout(do_scroll_check, 1);
13392
13359
  return;
13393
13360
  }
@@ -13404,7 +13371,7 @@ var add_dom_loaded_handler = function() {
13404
13371
  var toplevel = false;
13405
13372
  try {
13406
13373
  toplevel = win.frameElement === null;
13407
- } catch (e) {
13374
+ } catch (e2) {
13408
13375
  }
13409
13376
  if (document$1.documentElement.doScroll && toplevel) {
13410
13377
  do_scroll_check();
@@ -13425,7 +13392,7 @@ function loadNoop(_src, onload) {
13425
13392
  onload();
13426
13393
  }
13427
13394
  var mixpanel = init_as_module(loadNoop);
13428
- const version = "1.0.14";
13395
+ const version = "1.0.21";
13429
13396
  const MIXPANEL_DISTINCT_ID_CACHE_KEY = "mp_distinct_id";
13430
13397
  function init$2(mixpanelToken, debug = false, proxyUrl) {
13431
13398
  return new Promise((resolve) => {