@reservamos/browser-analytics 1.0.13 → 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.
- package/dist/browser-analytics.cjs +3 -3
- package/dist/browser-analytics.cjs.map +1 -1
- package/dist/browser-analytics.d.ts +15 -1
- package/dist/browser-analytics.esm.js +515 -508
- package/dist/browser-analytics.esm.js.map +1 -1
- package/dist/browser-analytics.iife.js +3 -3
- package/dist/browser-analytics.iife.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +4 -0
- package/src/recommendations/deleteFrequentPassenger/deleteFrequentPassenger.ts +33 -0
- package/src/recommendations/deleteFrequentPassenger/deleteFrequentPassengerSchema.ts +16 -0
- package/src/recommendations/deleteFrequentPassenger/index.ts +6 -0
|
@@ -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(
|
|
28
|
-
return obj[
|
|
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) => {
|
|
@@ -89,8 +89,8 @@ const ZodParsedType = util.arrayToEnum([
|
|
|
89
89
|
"set"
|
|
90
90
|
]);
|
|
91
91
|
const getParsedType = (data) => {
|
|
92
|
-
const
|
|
93
|
-
switch (
|
|
92
|
+
const t2 = typeof data;
|
|
93
|
+
switch (t2) {
|
|
94
94
|
case "undefined":
|
|
95
95
|
return ZodParsedType.undefined;
|
|
96
96
|
case "string":
|
|
@@ -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((
|
|
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 = (
|
|
454
|
-
const isDirty = (
|
|
455
|
-
const isValid = (
|
|
456
|
-
const isAsync = (
|
|
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
|
|
467
|
-
return
|
|
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((
|
|
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((
|
|
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((
|
|
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((
|
|
3074
|
-
error.addIssue(makeArgsIssue(args,
|
|
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((
|
|
3079
|
-
error.addIssue(makeReturnsIssue(result,
|
|
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(t3) {
|
|
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)) t3[p2] = s2[p2];
|
|
3929
|
-
}
|
|
3930
|
-
return t3;
|
|
3931
|
-
};
|
|
3932
|
-
return __assign.apply(this, arguments);
|
|
3933
|
-
};
|
|
3934
|
-
function __rest$1(s2, e) {
|
|
3935
|
-
var t3 = {};
|
|
3936
|
-
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e.indexOf(p2) < 0)
|
|
3937
|
-
t3[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
|
-
t3[p2[i]] = s2[p2[i]];
|
|
3942
|
-
}
|
|
3943
|
-
return t3;
|
|
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 (
|
|
3956
|
-
reject(
|
|
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 (
|
|
3963
|
-
reject(
|
|
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
|
|
3983
|
-
return
|
|
3984
|
-
};
|
|
3985
|
-
function
|
|
3986
|
-
return function(
|
|
3987
|
-
return Object.prototype.hasOwnProperty.call(
|
|
3988
|
-
}(
|
|
3989
|
-
}
|
|
3990
|
-
function
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
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());
|
|
3994
3966
|
};
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
t4.port1.onmessage = function() {
|
|
4005
|
-
return e3();
|
|
4006
|
-
}, t4.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
|
-
|
|
4014
|
-
|
|
4015
|
-
for (
|
|
4016
|
-
|
|
4017
|
-
r2 !==
|
|
4018
|
-
} else
|
|
4019
|
-
return
|
|
4020
|
-
}
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
R3
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
return
|
|
4050
|
-
}
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
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();
|
|
3983
|
+
return t2;
|
|
3984
|
+
}
|
|
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
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
var
|
|
4070
|
-
function
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
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
|
-
},
|
|
4077
|
-
return e3.addEventListener(t4,
|
|
4078
|
-
return e3.removeEventListener(t4, n3, r2);
|
|
4079
|
-
};
|
|
4041
|
+
}, n3 = function(e3, t4, n4, r3) {
|
|
4042
|
+
return e3.addEventListener(t4, n4, r3), () => e3.removeEventListener(t4, n4, r3);
|
|
4080
4043
|
}(document, "visibilitychange", t3);
|
|
4081
|
-
return t3(), [e2,
|
|
4082
|
-
}()
|
|
4083
|
-
return Promise.resolve().then(
|
|
4084
|
-
if (!
|
|
4085
|
-
|
|
4086
|
-
return (Array.isArray(e3) ? e3 : [e3]).map(
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
return M(e2, V);
|
|
4096
|
-
}).catch(function(e2) {
|
|
4097
|
-
throw l2(), function(e3) {
|
|
4098
|
-
if (e3 instanceof Error && e3.message === C$1) return new Error(b);
|
|
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(
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
if (function(e2, t4) {
|
|
4136
|
-
var n3, r2 = null === (n3 = Object.getOwnPropertyDescriptor) || void 0 === n3 ? void 0 : n3.call(Object, e2, t4);
|
|
4137
|
-
(null == r2 ? void 0 : r2.configurable) ? delete e2[t4] : r2 && !r2.writable || (e2[t4] = void 0);
|
|
4138
|
-
}(e, t3), "function" != typeof (null == n2 ? void 0 : n2.load)) throw new Error(C$1);
|
|
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
|
|
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:
|
|
4145
|
-
ERROR_API_KEY_INVALID:
|
|
4146
|
-
ERROR_API_KEY_MISSING:
|
|
4147
|
-
ERROR_BAD_REQUEST_FORMAT:
|
|
4148
|
-
ERROR_BAD_RESPONSE_FORMAT:
|
|
4149
|
-
ERROR_CLIENT_TIMEOUT:
|
|
4150
|
-
ERROR_CSP_BLOCK:
|
|
4151
|
-
ERROR_FORBIDDEN_ENDPOINT:
|
|
4152
|
-
ERROR_FORBIDDEN_HEADER:
|
|
4153
|
-
ERROR_FORBIDDEN_ORIGIN: y$
|
|
4154
|
-
ERROR_GENERAL_SERVER_FAILURE:
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
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,
|
|
4108
|
+
ERROR_FORBIDDEN_ORIGIN: y$1,
|
|
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,
|
|
4117
|
+
ERROR_NETWORK_CONNECTION: R$1,
|
|
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 (
|
|
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 (
|
|
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.
|
|
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 (
|
|
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 (
|
|
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
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
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 = (
|
|
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 = [
|
|
4569
|
-
const customScriptEndpointArray = [
|
|
4535
|
+
const customEndpointArray = [r$2];
|
|
4536
|
+
const customScriptEndpointArray = [G];
|
|
4570
4537
|
if (proxyUrl) {
|
|
4571
4538
|
customEndpointArray.unshift(proxyUrl);
|
|
4572
4539
|
customScriptEndpointArray.unshift(buildProxyUrl(proxyUrl));
|
|
@@ -4630,20 +4597,20 @@ const r$1 = {
|
|
|
4630
4597
|
purchase: "https://compras.reservamos.mx/api",
|
|
4631
4598
|
core: ""
|
|
4632
4599
|
}
|
|
4633
|
-
}, s$2 = "sandbox", a$1 = "v2", t$
|
|
4600
|
+
}, s$2 = "sandbox", a$1 = "v2", t$2 = "v1", n$1 = {
|
|
4634
4601
|
env: s$2,
|
|
4635
4602
|
headers: {},
|
|
4636
4603
|
searchUrl: r$1[s$2].search,
|
|
4637
4604
|
purchaseUrl: r$1[s$2].purchase,
|
|
4638
4605
|
coreUrl: r$1[s$2].core,
|
|
4639
4606
|
version: a$1,
|
|
4640
|
-
coreVersion: t$
|
|
4607
|
+
coreVersion: t$2,
|
|
4641
4608
|
apiKey: void 0,
|
|
4642
4609
|
userAuthToken: void 0,
|
|
4643
4610
|
withCredentials: false
|
|
4644
4611
|
};
|
|
4645
4612
|
let c$2 = Object.assign({}, n$1);
|
|
4646
|
-
const o = {
|
|
4613
|
+
const o$1 = {
|
|
4647
4614
|
// UNAUTHORIZED
|
|
4648
4615
|
1: {
|
|
4649
4616
|
code: 200,
|
|
@@ -4681,16 +4648,16 @@ const o = {
|
|
|
4681
4648
|
code: 60,
|
|
4682
4649
|
message: "Tarifa no disponible"
|
|
4683
4650
|
}
|
|
4684
|
-
}, n = (
|
|
4651
|
+
}, n = (e2) => ({
|
|
4685
4652
|
// INVALID_DISCOUNT
|
|
4686
4653
|
11: {
|
|
4687
4654
|
code: 500,
|
|
4688
|
-
message:
|
|
4655
|
+
message: e2
|
|
4689
4656
|
},
|
|
4690
4657
|
//EXPIRED_DISCOUNT
|
|
4691
4658
|
12: {
|
|
4692
4659
|
code: 501,
|
|
4693
|
-
message:
|
|
4660
|
+
message: e2
|
|
4694
4661
|
}
|
|
4695
4662
|
}), a = {
|
|
4696
4663
|
// unavailable_student
|
|
@@ -4728,66 +4695,66 @@ const o = {
|
|
|
4728
4695
|
code: 60,
|
|
4729
4696
|
message: "Error desconocido"
|
|
4730
4697
|
}
|
|
4731
|
-
}, c$1 = (
|
|
4698
|
+
}, c$1 = (e2) => ({
|
|
4732
4699
|
30: {
|
|
4733
4700
|
code: 30,
|
|
4734
|
-
message:
|
|
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 = (
|
|
4742
|
-
...o,
|
|
4708
|
+
}, i$2 = (e2) => ({
|
|
4709
|
+
...o$1,
|
|
4743
4710
|
...s$1,
|
|
4744
4711
|
...r,
|
|
4745
|
-
...n(
|
|
4712
|
+
...n(e2),
|
|
4746
4713
|
...a,
|
|
4747
4714
|
...d$1,
|
|
4748
|
-
...c$1(
|
|
4715
|
+
...c$1(e2)
|
|
4749
4716
|
});
|
|
4750
|
-
|
|
4751
|
-
constructor(r2 = -100,
|
|
4752
|
-
super(
|
|
4717
|
+
class o extends Error {
|
|
4718
|
+
constructor(r2 = -100, s2 = "Unknown error", t2 = null) {
|
|
4719
|
+
super(s2), this.code = r2, this.details = t2, this.stack = new Error().stack;
|
|
4753
4720
|
}
|
|
4754
|
-
}
|
|
4755
|
-
function
|
|
4756
|
-
const
|
|
4757
|
-
if (
|
|
4721
|
+
}
|
|
4722
|
+
async function w(t2) {
|
|
4723
|
+
const e2 = [404, 422, 500], r2 = await t2.json();
|
|
4724
|
+
if (t2.ok)
|
|
4758
4725
|
return r2;
|
|
4759
|
-
if (
|
|
4760
|
-
switch (
|
|
4726
|
+
if (e2.includes(t2.status))
|
|
4727
|
+
switch (t2.status) {
|
|
4761
4728
|
case 404:
|
|
4762
|
-
throw new
|
|
4729
|
+
throw new o(100, "Not found");
|
|
4763
4730
|
case 422:
|
|
4764
4731
|
return r2;
|
|
4765
4732
|
case 500:
|
|
4766
|
-
throw new
|
|
4733
|
+
throw new o(101, "Server error");
|
|
4767
4734
|
default:
|
|
4768
|
-
throw new
|
|
4735
|
+
throw new o();
|
|
4769
4736
|
}
|
|
4770
4737
|
else
|
|
4771
|
-
throw new
|
|
4738
|
+
throw new o(t2.status, r2.message || t2.statusText, r2);
|
|
4772
4739
|
}
|
|
4773
|
-
function
|
|
4774
|
-
if (
|
|
4775
|
-
const { code:
|
|
4776
|
-
throw n2 ? new
|
|
4740
|
+
function l$1(t2) {
|
|
4741
|
+
if (t2.errors instanceof Array) {
|
|
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
|
-
return
|
|
4745
|
+
return t2;
|
|
4779
4746
|
}
|
|
4780
|
-
function y
|
|
4781
|
-
const r2 = Object.keys(Object.assign({}, ...
|
|
4747
|
+
function y(...t2) {
|
|
4748
|
+
const r2 = Object.keys(Object.assign({}, ...t2)).reduce(
|
|
4782
4749
|
(n2, o2) => ({
|
|
4783
4750
|
...n2,
|
|
4784
|
-
[o2]:
|
|
4751
|
+
[o2]: t2.map((a2) => o2 in a2 && a2[o2]).filter(Boolean)
|
|
4785
4752
|
}),
|
|
4786
4753
|
{}
|
|
4787
4754
|
);
|
|
4788
4755
|
return new Headers(r2);
|
|
4789
4756
|
}
|
|
4790
|
-
function c(
|
|
4757
|
+
function c(t2, e2 = {}, r2 = {}, n2) {
|
|
4791
4758
|
const {
|
|
4792
4759
|
apiKey: o2,
|
|
4793
4760
|
withCredentials: a2,
|
|
@@ -4798,21 +4765,21 @@ function c(e, t3 = {}, 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}`),
|
|
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(
|
|
4804
|
-
return c(
|
|
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:
|
|
4775
|
+
url: e2,
|
|
4809
4776
|
watch: i,
|
|
4810
4777
|
expect: h2,
|
|
4811
|
-
maxRetries:
|
|
4778
|
+
maxRetries: t2 = 30,
|
|
4812
4779
|
interval: s2 = 2e3,
|
|
4813
4780
|
eachCall: c2 = null
|
|
4814
4781
|
}) {
|
|
4815
|
-
this.url =
|
|
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,157 +4787,176 @@ let u$1 = class u {
|
|
|
4820
4787
|
abort() {
|
|
4821
4788
|
this.aborted = true;
|
|
4822
4789
|
}
|
|
4823
|
-
execute(
|
|
4824
|
-
const i = (
|
|
4825
|
-
if (this.expect.includes(
|
|
4826
|
-
let s2 =
|
|
4827
|
-
|
|
4828
|
-
} else if (
|
|
4829
|
-
this.timers.forEach(clearInterval), this.executeEachCall("failed",
|
|
4790
|
+
execute(e2) {
|
|
4791
|
+
const i = (t2) => {
|
|
4792
|
+
if (this.expect.includes(t2[this.watch]) || e2 === 1 || this.aborted) {
|
|
4793
|
+
let s2 = t2[this.watch];
|
|
4794
|
+
e2 === 1 ? s2 = "retries_exceeded" : this.aborted && (s2 = "aborted"), this.timers.forEach(clearInterval), this.executeEachCall(s2, t2);
|
|
4795
|
+
} else if (t2[this.watch] === "failed")
|
|
4796
|
+
this.timers.forEach(clearInterval), this.executeEachCall("failed", t2);
|
|
4830
4797
|
else {
|
|
4831
|
-
this.executeEachCall("pending",
|
|
4798
|
+
this.executeEachCall("pending", t2);
|
|
4832
4799
|
const s2 = window.setTimeout(
|
|
4833
4800
|
this.execute,
|
|
4834
4801
|
this.interval,
|
|
4835
|
-
|
|
4802
|
+
e2 - 1
|
|
4836
4803
|
);
|
|
4837
4804
|
this.timers.push(s2);
|
|
4838
4805
|
}
|
|
4839
|
-
}, h2 = (
|
|
4806
|
+
}, h2 = (t2) => this.executeEachCall("error", t2);
|
|
4840
4807
|
return E(this.url, {}, h2).then(i);
|
|
4841
4808
|
}
|
|
4842
|
-
executeEachCall(
|
|
4843
|
-
this.eachCall instanceof Function && this.eachCall({ status:
|
|
4809
|
+
executeEachCall(e2, i) {
|
|
4810
|
+
this.eachCall instanceof Function && this.eachCall({ status: e2, payload: i }) && this.abort();
|
|
4844
4811
|
}
|
|
4845
4812
|
};
|
|
4846
|
-
function
|
|
4847
|
-
apiName:
|
|
4848
|
-
defaultApiVersion:
|
|
4813
|
+
function j({
|
|
4814
|
+
apiName: h2,
|
|
4815
|
+
defaultApiVersion: c2
|
|
4849
4816
|
}) {
|
|
4850
|
-
let
|
|
4817
|
+
let n2, i = {
|
|
4851
4818
|
"Content-Type": "application/json"
|
|
4852
|
-
},
|
|
4853
|
-
function f2(
|
|
4854
|
-
|
|
4855
|
-
...
|
|
4856
|
-
...
|
|
4819
|
+
}, r2;
|
|
4820
|
+
function f2(e2) {
|
|
4821
|
+
n2 = e2.baseUrl, i = {
|
|
4822
|
+
...i,
|
|
4823
|
+
...e2.defaultHeaders || {}
|
|
4857
4824
|
};
|
|
4858
4825
|
}
|
|
4859
|
-
function p2(
|
|
4860
|
-
|
|
4826
|
+
function p2(e2) {
|
|
4827
|
+
r2 = e2;
|
|
4861
4828
|
}
|
|
4862
|
-
function
|
|
4863
|
-
if (!
|
|
4864
|
-
throw new Error(`Base URL is not set for ${
|
|
4865
|
-
}
|
|
4866
|
-
const
|
|
4867
|
-
async function
|
|
4868
|
-
|
|
4869
|
-
const { body: s2, headers:
|
|
4870
|
-
...
|
|
4871
|
-
...
|
|
4872
|
-
...
|
|
4829
|
+
function d2() {
|
|
4830
|
+
if (!n2)
|
|
4831
|
+
throw new Error(`Base URL is not set for ${h2} API.`);
|
|
4832
|
+
}
|
|
4833
|
+
const $ = { body: {} };
|
|
4834
|
+
async function y2(e2, t2 = $) {
|
|
4835
|
+
d2();
|
|
4836
|
+
const { body: s2, headers: o2 = {}, apiVersion: a2 = c2 } = t2, u3 = `${n2}/${a2}/${e2}`, l2 = {
|
|
4837
|
+
...i,
|
|
4838
|
+
...o2,
|
|
4839
|
+
...r2 ? { Authorization: r2 } : {}
|
|
4873
4840
|
};
|
|
4874
|
-
return (await fetch(
|
|
4841
|
+
return (await fetch(u3, {
|
|
4875
4842
|
method: "POST",
|
|
4876
4843
|
body: JSON.stringify(s2),
|
|
4877
|
-
headers:
|
|
4844
|
+
headers: l2
|
|
4878
4845
|
})).json();
|
|
4879
4846
|
}
|
|
4880
|
-
async function
|
|
4881
|
-
|
|
4882
|
-
const { headers: s2 = {}, apiVersion:
|
|
4883
|
-
return (await fetch(
|
|
4884
|
-
}
|
|
4885
|
-
function
|
|
4886
|
-
const
|
|
4887
|
-
url: `${
|
|
4888
|
-
watch:
|
|
4889
|
-
expect:
|
|
4890
|
-
eachCall:
|
|
4847
|
+
async function w2(e2, t2 = {}) {
|
|
4848
|
+
d2();
|
|
4849
|
+
const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e2}`;
|
|
4850
|
+
return (await fetch(a2, { headers: s2 })).json();
|
|
4851
|
+
}
|
|
4852
|
+
function H2(e2, t2) {
|
|
4853
|
+
const o2 = {
|
|
4854
|
+
url: `${n2}/${c2}/${e2}`,
|
|
4855
|
+
watch: t2.watch,
|
|
4856
|
+
expect: t2.expect,
|
|
4857
|
+
eachCall: t2.onEachResponse
|
|
4891
4858
|
};
|
|
4892
|
-
return new u$1(
|
|
4859
|
+
return new u$1(o2);
|
|
4860
|
+
}
|
|
4861
|
+
async function b2(e2, t2 = {}) {
|
|
4862
|
+
d2();
|
|
4863
|
+
const { headers: s2 = {}, apiVersion: o2 = c2 } = t2, a2 = `${n2}/${o2}/${e2}`, u3 = {
|
|
4864
|
+
...i,
|
|
4865
|
+
...s2,
|
|
4866
|
+
...r2 ? { Authorization: r2 } : {}
|
|
4867
|
+
};
|
|
4868
|
+
return (await fetch(a2, {
|
|
4869
|
+
method: "DELETE",
|
|
4870
|
+
headers: u3
|
|
4871
|
+
})).json();
|
|
4893
4872
|
}
|
|
4894
4873
|
return {
|
|
4895
|
-
get:
|
|
4896
|
-
post:
|
|
4874
|
+
get: w2,
|
|
4875
|
+
post: y2,
|
|
4876
|
+
delete: b2,
|
|
4897
4877
|
setAuthorizationHeader: p2,
|
|
4898
4878
|
setConfig: f2,
|
|
4899
|
-
poll:
|
|
4879
|
+
poll: H2
|
|
4900
4880
|
};
|
|
4901
4881
|
}
|
|
4902
|
-
const t$1 =
|
|
4882
|
+
const t$1 = j({
|
|
4903
4883
|
apiName: "Core",
|
|
4904
4884
|
defaultApiVersion: "v1"
|
|
4905
4885
|
});
|
|
4906
|
-
async function
|
|
4907
|
-
const { data:
|
|
4886
|
+
async function t(o2) {
|
|
4887
|
+
const { data: e2 } = await t$1.post(
|
|
4908
4888
|
"anonymous_profiles/identify",
|
|
4909
4889
|
{
|
|
4910
4890
|
body: o2
|
|
4911
4891
|
}
|
|
4912
4892
|
);
|
|
4913
|
-
return
|
|
4893
|
+
return e2;
|
|
4914
4894
|
}
|
|
4915
4895
|
const s = {
|
|
4916
|
-
createAnonymousProfile:
|
|
4896
|
+
createAnonymousProfile: t
|
|
4917
4897
|
};
|
|
4918
|
-
function
|
|
4919
|
-
searchId:
|
|
4920
|
-
userIdentifier:
|
|
4898
|
+
function d({
|
|
4899
|
+
searchId: e2,
|
|
4900
|
+
userIdentifier: t2
|
|
4921
4901
|
}) {
|
|
4922
4902
|
return t$1.get(
|
|
4923
|
-
`trip_recommendations/${
|
|
4903
|
+
`trip_recommendations/${e2}/${t2}`
|
|
4924
4904
|
);
|
|
4925
4905
|
}
|
|
4926
|
-
function
|
|
4906
|
+
function i$1(e2) {
|
|
4927
4907
|
return t$1.post("seat_recommendations", {
|
|
4928
|
-
body:
|
|
4908
|
+
body: e2
|
|
4929
4909
|
});
|
|
4930
4910
|
}
|
|
4931
4911
|
function p({
|
|
4932
|
-
distinct_id:
|
|
4933
|
-
...
|
|
4912
|
+
distinct_id: e2,
|
|
4913
|
+
...t2
|
|
4934
4914
|
}) {
|
|
4935
|
-
return t$1.post(`seat_recommendations/${
|
|
4936
|
-
body:
|
|
4915
|
+
return t$1.post(`seat_recommendations/${e2}`, {
|
|
4916
|
+
body: t2
|
|
4937
4917
|
});
|
|
4938
4918
|
}
|
|
4939
|
-
function
|
|
4940
|
-
const { start:
|
|
4919
|
+
function u2(e2, t2) {
|
|
4920
|
+
const { start: o2, onEachResponse: r2 } = t2, c2 = `profiles/${e2}`, a2 = {
|
|
4941
4921
|
watch: "state",
|
|
4942
4922
|
expect: "finished",
|
|
4943
4923
|
onEachResponse: r2
|
|
4944
|
-
},
|
|
4945
|
-
return
|
|
4924
|
+
}, s2 = t$1.poll(c2, a2);
|
|
4925
|
+
return o2 && s2.start(), s2;
|
|
4946
4926
|
}
|
|
4947
|
-
async function
|
|
4927
|
+
async function m(e2) {
|
|
4948
4928
|
return t$1.post("profiles", {
|
|
4949
|
-
body:
|
|
4929
|
+
body: e2
|
|
4950
4930
|
});
|
|
4951
4931
|
}
|
|
4952
|
-
async function
|
|
4932
|
+
async function l(e2) {
|
|
4953
4933
|
return t$1.post("passengers", {
|
|
4954
|
-
body:
|
|
4934
|
+
body: e2
|
|
4955
4935
|
});
|
|
4956
4936
|
}
|
|
4957
|
-
async function
|
|
4937
|
+
async function f$1(e2) {
|
|
4958
4938
|
return t$1.get(
|
|
4959
|
-
`passengers/${
|
|
4939
|
+
`passengers/${e2}`
|
|
4960
4940
|
);
|
|
4961
4941
|
}
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4942
|
+
async function g(e2, t2) {
|
|
4943
|
+
return t$1.delete(
|
|
4944
|
+
`passengers/${e2}/${t2}`
|
|
4945
|
+
);
|
|
4946
|
+
}
|
|
4947
|
+
const R = {
|
|
4948
|
+
getRecommendedTrips: d,
|
|
4949
|
+
createRecommendedPlaces: m,
|
|
4950
|
+
pollRecommendedPlaces: u2,
|
|
4951
|
+
createRecommendedSeats: i$1,
|
|
4967
4952
|
getRecommendedSeats: p,
|
|
4968
|
-
getFrequentPassengers:
|
|
4969
|
-
createFrequentPassengers:
|
|
4953
|
+
getFrequentPassengers: f$1,
|
|
4954
|
+
createFrequentPassengers: l,
|
|
4955
|
+
deleteFrequentPassenger: g
|
|
4970
4956
|
};
|
|
4971
4957
|
const f = {
|
|
4972
4958
|
setConfig: t$1.setConfig,
|
|
4973
|
-
recommendations:
|
|
4959
|
+
recommendations: R,
|
|
4974
4960
|
profiles: s
|
|
4975
4961
|
};
|
|
4976
4962
|
let environment;
|
|
@@ -5156,11 +5142,11 @@ function is2DCanvasBlank(canvas) {
|
|
|
5156
5142
|
if (!ctx)
|
|
5157
5143
|
return true;
|
|
5158
5144
|
const chunkSize = 50;
|
|
5159
|
-
for (let
|
|
5145
|
+
for (let x2 = 0; x2 < canvas.width; x2 += chunkSize) {
|
|
5160
5146
|
for (let y2 = 0; y2 < canvas.height; y2 += chunkSize) {
|
|
5161
5147
|
const getImageData = ctx.getImageData;
|
|
5162
5148
|
const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;
|
|
5163
|
-
const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx,
|
|
5149
|
+
const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x2, y2, Math.min(chunkSize, canvas.width - x2), Math.min(chunkSize, canvas.height - y2)).data.buffer);
|
|
5164
5150
|
if (pixelBuffer.some((pixel) => pixel !== 0))
|
|
5165
5151
|
return false;
|
|
5166
5152
|
}
|
|
@@ -5357,7 +5343,7 @@ function _isBlockedElement(element, blockClass, blockSelector) {
|
|
|
5357
5343
|
if (blockSelector) {
|
|
5358
5344
|
return element.matches(blockSelector);
|
|
5359
5345
|
}
|
|
5360
|
-
} catch (
|
|
5346
|
+
} catch (e2) {
|
|
5361
5347
|
}
|
|
5362
5348
|
return false;
|
|
5363
5349
|
}
|
|
@@ -5405,7 +5391,7 @@ function needMaskingText(node, maskTextClass, maskTextSelector, checkAncestors)
|
|
|
5405
5391
|
return true;
|
|
5406
5392
|
}
|
|
5407
5393
|
}
|
|
5408
|
-
} catch (
|
|
5394
|
+
} catch (e2) {
|
|
5409
5395
|
}
|
|
5410
5396
|
return false;
|
|
5411
5397
|
}
|
|
@@ -5694,7 +5680,7 @@ function serializeElementNode(n2, options) {
|
|
|
5694
5680
|
try {
|
|
5695
5681
|
if (customElements.get(tagName))
|
|
5696
5682
|
isCustomElement = true;
|
|
5697
|
-
} catch (
|
|
5683
|
+
} catch (e2) {
|
|
5698
5684
|
}
|
|
5699
5685
|
return {
|
|
5700
5686
|
type: NodeType.Element,
|
|
@@ -6120,7 +6106,7 @@ function isBlocked(node, blockClass, blockSelector, checkAncestors) {
|
|
|
6120
6106
|
if (classMatchesRegex(el, blockClass, checkAncestors))
|
|
6121
6107
|
return true;
|
|
6122
6108
|
}
|
|
6123
|
-
} catch (
|
|
6109
|
+
} catch (e2) {
|
|
6124
6110
|
}
|
|
6125
6111
|
if (blockSelector) {
|
|
6126
6112
|
if (el.matches(blockSelector))
|
|
@@ -6656,7 +6642,7 @@ class MutationBuffer {
|
|
|
6656
6642
|
if (!this.unattachedDoc) {
|
|
6657
6643
|
try {
|
|
6658
6644
|
this.unattachedDoc = document.implementation.createHTMLDocument();
|
|
6659
|
-
} catch (
|
|
6645
|
+
} catch (e2) {
|
|
6660
6646
|
this.unattachedDoc = this.doc;
|
|
6661
6647
|
}
|
|
6662
6648
|
}
|
|
@@ -6989,12 +6975,12 @@ function initMouseInteractionObserver({ mouseInteractionCb, doc, mirror: mirror2
|
|
|
6989
6975
|
pointerType = currentPointerType;
|
|
6990
6976
|
currentPointerType = null;
|
|
6991
6977
|
}
|
|
6992
|
-
const
|
|
6993
|
-
if (!
|
|
6978
|
+
const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;
|
|
6979
|
+
if (!e2) {
|
|
6994
6980
|
return;
|
|
6995
6981
|
}
|
|
6996
6982
|
const id = mirror2.getId(target);
|
|
6997
|
-
const { clientX, clientY } =
|
|
6983
|
+
const { clientX, clientY } = e2;
|
|
6998
6984
|
callbackWrapper(mouseInteractionCb)(Object.assign({ type: MouseInteractions[thisEventKey], id, x: clientX, y: clientY }, pointerType !== null && { pointerType }));
|
|
6999
6985
|
};
|
|
7000
6986
|
};
|
|
@@ -7335,7 +7321,7 @@ function initAdoptedStyleSheetObserver({ mirror: mirror2, stylesheetManager }, h
|
|
|
7335
7321
|
if (hostId !== null && hostId !== -1) {
|
|
7336
7322
|
try {
|
|
7337
7323
|
stylesheetManager.adoptStyleSheets(sheets, hostId);
|
|
7338
|
-
} catch (
|
|
7324
|
+
} catch (e2) {
|
|
7339
7325
|
}
|
|
7340
7326
|
}
|
|
7341
7327
|
return result;
|
|
@@ -7510,7 +7496,7 @@ function initCustomElementObserver({ doc, customElementCb }) {
|
|
|
7510
7496
|
name
|
|
7511
7497
|
}
|
|
7512
7498
|
});
|
|
7513
|
-
} catch (
|
|
7499
|
+
} catch (e2) {
|
|
7514
7500
|
console.warn(`Custom element callback failed for ${name}`);
|
|
7515
7501
|
}
|
|
7516
7502
|
return original.apply(this, [name, constructor, options]);
|
|
@@ -7784,18 +7770,18 @@ class IframeManager {
|
|
|
7784
7770
|
if (transformedEvent)
|
|
7785
7771
|
this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout);
|
|
7786
7772
|
}
|
|
7787
|
-
transformCrossOriginEvent(iframeEl,
|
|
7773
|
+
transformCrossOriginEvent(iframeEl, e2) {
|
|
7788
7774
|
var _a;
|
|
7789
|
-
switch (
|
|
7775
|
+
switch (e2.type) {
|
|
7790
7776
|
case EventType$1.FullSnapshot: {
|
|
7791
7777
|
this.crossOriginIframeMirror.reset(iframeEl);
|
|
7792
7778
|
this.crossOriginIframeStyleMirror.reset(iframeEl);
|
|
7793
|
-
this.replaceIdOnNode(
|
|
7794
|
-
const rootId =
|
|
7779
|
+
this.replaceIdOnNode(e2.data.node, iframeEl);
|
|
7780
|
+
const rootId = e2.data.node.id;
|
|
7795
7781
|
this.crossOriginIframeRootIdMap.set(iframeEl, rootId);
|
|
7796
|
-
this.patchRootIdOnNode(
|
|
7782
|
+
this.patchRootIdOnNode(e2.data.node, rootId);
|
|
7797
7783
|
return {
|
|
7798
|
-
timestamp:
|
|
7784
|
+
timestamp: e2.timestamp,
|
|
7799
7785
|
type: EventType$1.IncrementalSnapshot,
|
|
7800
7786
|
data: {
|
|
7801
7787
|
source: IncrementalSource$1.Mutation,
|
|
@@ -7803,7 +7789,7 @@ class IframeManager {
|
|
|
7803
7789
|
{
|
|
7804
7790
|
parentId: this.mirror.getId(iframeEl),
|
|
7805
7791
|
nextId: null,
|
|
7806
|
-
node:
|
|
7792
|
+
node: e2.data.node
|
|
7807
7793
|
}
|
|
7808
7794
|
],
|
|
7809
7795
|
removes: [],
|
|
@@ -7819,16 +7805,16 @@ class IframeManager {
|
|
|
7819
7805
|
return false;
|
|
7820
7806
|
}
|
|
7821
7807
|
case EventType$1.Plugin: {
|
|
7822
|
-
return
|
|
7808
|
+
return e2;
|
|
7823
7809
|
}
|
|
7824
7810
|
case EventType$1.Custom: {
|
|
7825
|
-
this.replaceIds(
|
|
7826
|
-
return
|
|
7811
|
+
this.replaceIds(e2.data.payload, iframeEl, ["id", "parentId", "previousId", "nextId"]);
|
|
7812
|
+
return e2;
|
|
7827
7813
|
}
|
|
7828
7814
|
case EventType$1.IncrementalSnapshot: {
|
|
7829
|
-
switch (
|
|
7815
|
+
switch (e2.data.source) {
|
|
7830
7816
|
case IncrementalSource$1.Mutation: {
|
|
7831
|
-
|
|
7817
|
+
e2.data.adds.forEach((n2) => {
|
|
7832
7818
|
this.replaceIds(n2, iframeEl, [
|
|
7833
7819
|
"parentId",
|
|
7834
7820
|
"nextId",
|
|
@@ -7838,24 +7824,24 @@ class IframeManager {
|
|
|
7838
7824
|
const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);
|
|
7839
7825
|
rootId && this.patchRootIdOnNode(n2.node, rootId);
|
|
7840
7826
|
});
|
|
7841
|
-
|
|
7827
|
+
e2.data.removes.forEach((n2) => {
|
|
7842
7828
|
this.replaceIds(n2, iframeEl, ["parentId", "id"]);
|
|
7843
7829
|
});
|
|
7844
|
-
|
|
7830
|
+
e2.data.attributes.forEach((n2) => {
|
|
7845
7831
|
this.replaceIds(n2, iframeEl, ["id"]);
|
|
7846
7832
|
});
|
|
7847
|
-
|
|
7833
|
+
e2.data.texts.forEach((n2) => {
|
|
7848
7834
|
this.replaceIds(n2, iframeEl, ["id"]);
|
|
7849
7835
|
});
|
|
7850
|
-
return
|
|
7836
|
+
return e2;
|
|
7851
7837
|
}
|
|
7852
7838
|
case IncrementalSource$1.Drag:
|
|
7853
7839
|
case IncrementalSource$1.TouchMove:
|
|
7854
7840
|
case IncrementalSource$1.MouseMove: {
|
|
7855
|
-
|
|
7841
|
+
e2.data.positions.forEach((p2) => {
|
|
7856
7842
|
this.replaceIds(p2, iframeEl, ["id"]);
|
|
7857
7843
|
});
|
|
7858
|
-
return
|
|
7844
|
+
return e2;
|
|
7859
7845
|
}
|
|
7860
7846
|
case IncrementalSource$1.ViewportResize: {
|
|
7861
7847
|
return false;
|
|
@@ -7865,31 +7851,31 @@ class IframeManager {
|
|
|
7865
7851
|
case IncrementalSource$1.Scroll:
|
|
7866
7852
|
case IncrementalSource$1.CanvasMutation:
|
|
7867
7853
|
case IncrementalSource$1.Input: {
|
|
7868
|
-
this.replaceIds(
|
|
7869
|
-
return
|
|
7854
|
+
this.replaceIds(e2.data, iframeEl, ["id"]);
|
|
7855
|
+
return e2;
|
|
7870
7856
|
}
|
|
7871
7857
|
case IncrementalSource$1.StyleSheetRule:
|
|
7872
7858
|
case IncrementalSource$1.StyleDeclaration: {
|
|
7873
|
-
this.replaceIds(
|
|
7874
|
-
this.replaceStyleIds(
|
|
7875
|
-
return
|
|
7859
|
+
this.replaceIds(e2.data, iframeEl, ["id"]);
|
|
7860
|
+
this.replaceStyleIds(e2.data, iframeEl, ["styleId"]);
|
|
7861
|
+
return e2;
|
|
7876
7862
|
}
|
|
7877
7863
|
case IncrementalSource$1.Font: {
|
|
7878
|
-
return
|
|
7864
|
+
return e2;
|
|
7879
7865
|
}
|
|
7880
7866
|
case IncrementalSource$1.Selection: {
|
|
7881
|
-
|
|
7867
|
+
e2.data.ranges.forEach((range) => {
|
|
7882
7868
|
this.replaceIds(range, iframeEl, ["start", "end"]);
|
|
7883
7869
|
});
|
|
7884
|
-
return
|
|
7870
|
+
return e2;
|
|
7885
7871
|
}
|
|
7886
7872
|
case IncrementalSource$1.AdoptedStyleSheet: {
|
|
7887
|
-
this.replaceIds(
|
|
7888
|
-
this.replaceStyleIds(
|
|
7889
|
-
(_a =
|
|
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) => {
|
|
7890
7876
|
this.replaceStyleIds(style, iframeEl, ["styleId"]);
|
|
7891
7877
|
});
|
|
7892
|
-
return
|
|
7878
|
+
return e2;
|
|
7893
7879
|
}
|
|
7894
7880
|
}
|
|
7895
7881
|
}
|
|
@@ -7984,7 +7970,7 @@ class ShadowDomManager {
|
|
|
7984
7970
|
this.restoreHandlers.forEach((handler) => {
|
|
7985
7971
|
try {
|
|
7986
7972
|
handler();
|
|
7987
|
-
} catch (
|
|
7973
|
+
} catch (e2) {
|
|
7988
7974
|
}
|
|
7989
7975
|
});
|
|
7990
7976
|
this.restoreHandlers = [];
|
|
@@ -8005,16 +7991,16 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
8005
7991
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
8006
7992
|
PERFORMANCE OF THIS SOFTWARE.
|
|
8007
7993
|
***************************************************************************** */
|
|
8008
|
-
function __rest(s2,
|
|
8009
|
-
var
|
|
8010
|
-
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) &&
|
|
8011
|
-
|
|
7994
|
+
function __rest(s2, e2) {
|
|
7995
|
+
var t2 = {};
|
|
7996
|
+
for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
|
|
7997
|
+
t2[p2] = s2[p2];
|
|
8012
7998
|
if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
|
|
8013
7999
|
for (var i = 0, p2 = Object.getOwnPropertySymbols(s2); i < p2.length; i++) {
|
|
8014
|
-
if (
|
|
8015
|
-
|
|
8000
|
+
if (e2.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i]))
|
|
8001
|
+
t2[p2[i]] = s2[p2[i]];
|
|
8016
8002
|
}
|
|
8017
|
-
return
|
|
8003
|
+
return t2;
|
|
8018
8004
|
}
|
|
8019
8005
|
function __awaiter(thisArg, _arguments, P2, generator) {
|
|
8020
8006
|
function adopt(value) {
|
|
@@ -8026,15 +8012,15 @@ function __awaiter(thisArg, _arguments, P2, generator) {
|
|
|
8026
8012
|
function fulfilled(value) {
|
|
8027
8013
|
try {
|
|
8028
8014
|
step(generator.next(value));
|
|
8029
|
-
} catch (
|
|
8030
|
-
reject(
|
|
8015
|
+
} catch (e2) {
|
|
8016
|
+
reject(e2);
|
|
8031
8017
|
}
|
|
8032
8018
|
}
|
|
8033
8019
|
function rejected(value) {
|
|
8034
8020
|
try {
|
|
8035
8021
|
step(generator["throw"](value));
|
|
8036
|
-
} catch (
|
|
8037
|
-
reject(
|
|
8022
|
+
} catch (e2) {
|
|
8023
|
+
reject(e2);
|
|
8038
8024
|
}
|
|
8039
8025
|
}
|
|
8040
8026
|
function step(result) {
|
|
@@ -8355,15 +8341,15 @@ var WorkerFactory = createInlineWorkerFactory(
|
|
|
8355
8341
|
function fulfilled(value) {
|
|
8356
8342
|
try {
|
|
8357
8343
|
step(generator.next(value));
|
|
8358
|
-
} catch (
|
|
8359
|
-
reject(
|
|
8344
|
+
} catch (e2) {
|
|
8345
|
+
reject(e2);
|
|
8360
8346
|
}
|
|
8361
8347
|
}
|
|
8362
8348
|
function rejected(value) {
|
|
8363
8349
|
try {
|
|
8364
8350
|
step(generator["throw"](value));
|
|
8365
|
-
} catch (
|
|
8366
|
-
reject(
|
|
8351
|
+
} catch (e2) {
|
|
8352
|
+
reject(e2);
|
|
8367
8353
|
}
|
|
8368
8354
|
}
|
|
8369
8355
|
function step(result) {
|
|
@@ -8413,10 +8399,10 @@ var WorkerFactory = createInlineWorkerFactory(
|
|
|
8413
8399
|
});
|
|
8414
8400
|
}
|
|
8415
8401
|
const worker = self;
|
|
8416
|
-
worker.onmessage = function(
|
|
8402
|
+
worker.onmessage = function(e2) {
|
|
8417
8403
|
return __awaiter2(this, void 0, void 0, function* () {
|
|
8418
8404
|
if ("OffscreenCanvas" in globalThis) {
|
|
8419
|
-
const { id, bitmap, width, height, dataURLOptions } =
|
|
8405
|
+
const { id, bitmap, width, height, dataURLOptions } = e2.data;
|
|
8420
8406
|
const transparentBase64 = getTransparentBlobFor(width, height, dataURLOptions);
|
|
8421
8407
|
const offscreen = new OffscreenCanvas(width, height);
|
|
8422
8408
|
const ctx = offscreen.getContext("2d");
|
|
@@ -8441,7 +8427,7 @@ var WorkerFactory = createInlineWorkerFactory(
|
|
|
8441
8427
|
});
|
|
8442
8428
|
lastBlobMap.set(id, base64);
|
|
8443
8429
|
} else {
|
|
8444
|
-
return worker.postMessage({ id:
|
|
8430
|
+
return worker.postMessage({ id: e2.data.id });
|
|
8445
8431
|
}
|
|
8446
8432
|
});
|
|
8447
8433
|
};
|
|
@@ -8493,12 +8479,12 @@ class CanvasManager {
|
|
|
8493
8479
|
const canvasContextReset = initCanvasContextObserver(win2, blockClass, blockSelector, true);
|
|
8494
8480
|
const snapshotInProgressMap = /* @__PURE__ */ new Map();
|
|
8495
8481
|
const worker = new WorkerFactory();
|
|
8496
|
-
worker.onmessage = (
|
|
8497
|
-
const { id } =
|
|
8482
|
+
worker.onmessage = (e2) => {
|
|
8483
|
+
const { id } = e2.data;
|
|
8498
8484
|
snapshotInProgressMap.set(id, false);
|
|
8499
|
-
if (!("base64" in
|
|
8485
|
+
if (!("base64" in e2.data))
|
|
8500
8486
|
return;
|
|
8501
|
-
const { base64, type, width, height } =
|
|
8487
|
+
const { base64, type, width, height } = e2.data;
|
|
8502
8488
|
this.mutationCb({
|
|
8503
8489
|
id,
|
|
8504
8490
|
type: CanvasContext["2D"],
|
|
@@ -8710,8 +8696,8 @@ class ProcessedNodeManager {
|
|
|
8710
8696
|
this.loop = false;
|
|
8711
8697
|
}
|
|
8712
8698
|
}
|
|
8713
|
-
function wrapEvent(
|
|
8714
|
-
return Object.assign(Object.assign({},
|
|
8699
|
+
function wrapEvent(e2) {
|
|
8700
|
+
return Object.assign(Object.assign({}, e2), { timestamp: nowTimestamp() });
|
|
8715
8701
|
}
|
|
8716
8702
|
let wrappedEmit;
|
|
8717
8703
|
let takeFullSnapshot;
|
|
@@ -8728,7 +8714,7 @@ function record(options = {}) {
|
|
|
8728
8714
|
if (window.parent.document) {
|
|
8729
8715
|
passEmitsToParent = false;
|
|
8730
8716
|
}
|
|
8731
|
-
} catch (
|
|
8717
|
+
} catch (e2) {
|
|
8732
8718
|
passEmitsToParent = true;
|
|
8733
8719
|
}
|
|
8734
8720
|
}
|
|
@@ -8772,43 +8758,43 @@ function record(options = {}) {
|
|
|
8772
8758
|
polyfill();
|
|
8773
8759
|
let lastFullSnapshotEvent;
|
|
8774
8760
|
let incrementalSnapshotCount = 0;
|
|
8775
|
-
const eventProcessor = (
|
|
8761
|
+
const eventProcessor = (e2) => {
|
|
8776
8762
|
for (const plugin of plugins || []) {
|
|
8777
8763
|
if (plugin.eventProcessor) {
|
|
8778
|
-
|
|
8764
|
+
e2 = plugin.eventProcessor(e2);
|
|
8779
8765
|
}
|
|
8780
8766
|
}
|
|
8781
8767
|
if (packFn && !passEmitsToParent) {
|
|
8782
|
-
|
|
8768
|
+
e2 = packFn(e2);
|
|
8783
8769
|
}
|
|
8784
|
-
return
|
|
8770
|
+
return e2;
|
|
8785
8771
|
};
|
|
8786
|
-
wrappedEmit = (
|
|
8772
|
+
wrappedEmit = (e2, isCheckout) => {
|
|
8787
8773
|
var _a;
|
|
8788
|
-
if (((_a = mutationBuffers[0]) === null || _a === void 0 ? void 0 : _a.isFrozen()) &&
|
|
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)) {
|
|
8789
8775
|
mutationBuffers.forEach((buf) => buf.unfreeze());
|
|
8790
8776
|
}
|
|
8791
8777
|
if (inEmittingFrame) {
|
|
8792
|
-
emit === null || emit === void 0 ? void 0 : emit(eventProcessor(
|
|
8778
|
+
emit === null || emit === void 0 ? void 0 : emit(eventProcessor(e2), isCheckout);
|
|
8793
8779
|
} else if (passEmitsToParent) {
|
|
8794
8780
|
const message = {
|
|
8795
8781
|
type: "rrweb",
|
|
8796
|
-
event: eventProcessor(
|
|
8782
|
+
event: eventProcessor(e2),
|
|
8797
8783
|
origin: window.location.origin,
|
|
8798
8784
|
isCheckout
|
|
8799
8785
|
};
|
|
8800
8786
|
window.parent.postMessage(message, "*");
|
|
8801
8787
|
}
|
|
8802
|
-
if (
|
|
8803
|
-
lastFullSnapshotEvent =
|
|
8788
|
+
if (e2.type === EventType$1.FullSnapshot) {
|
|
8789
|
+
lastFullSnapshotEvent = e2;
|
|
8804
8790
|
incrementalSnapshotCount = 0;
|
|
8805
|
-
} else if (
|
|
8806
|
-
if (
|
|
8791
|
+
} else if (e2.type === EventType$1.IncrementalSnapshot) {
|
|
8792
|
+
if (e2.data.source === IncrementalSource$1.Mutation && e2.data.isAttachIframe) {
|
|
8807
8793
|
return;
|
|
8808
8794
|
}
|
|
8809
8795
|
incrementalSnapshotCount++;
|
|
8810
8796
|
const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
|
|
8811
|
-
const exceedTime = checkoutEveryNms &&
|
|
8797
|
+
const exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
|
|
8812
8798
|
if (exceedCount || exceedTime) {
|
|
8813
8799
|
takeFullSnapshot(true);
|
|
8814
8800
|
}
|
|
@@ -9297,7 +9283,7 @@ _.isArray = nativeIsArray || function(obj) {
|
|
|
9297
9283
|
_.isFunction = function(f2) {
|
|
9298
9284
|
try {
|
|
9299
9285
|
return /^\s*\bfunction\b/.test(f2);
|
|
9300
|
-
} catch (
|
|
9286
|
+
} catch (x2) {
|
|
9301
9287
|
return false;
|
|
9302
9288
|
}
|
|
9303
9289
|
};
|
|
@@ -9539,10 +9525,10 @@ _.JSONDecode = function() {
|
|
|
9539
9525
|
"r": "\r",
|
|
9540
9526
|
"t": " "
|
|
9541
9527
|
}, text, error = function(m2) {
|
|
9542
|
-
var
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
throw
|
|
9528
|
+
var e2 = new SyntaxError(m2);
|
|
9529
|
+
e2.at = at;
|
|
9530
|
+
e2.text = text;
|
|
9531
|
+
throw e2;
|
|
9546
9532
|
}, next = function(c2) {
|
|
9547
9533
|
if (c2 && c2 !== ch) {
|
|
9548
9534
|
error("Expected '" + c2 + "' instead of '" + ch + "'");
|
|
@@ -9797,9 +9783,9 @@ _.UUID = /* @__PURE__ */ function() {
|
|
|
9797
9783
|
var UA = function() {
|
|
9798
9784
|
var ua = userAgent, i, ch, buffer = [], ret = 0;
|
|
9799
9785
|
function xor(result, byte_array) {
|
|
9800
|
-
var
|
|
9801
|
-
for (
|
|
9802
|
-
tmp |= buffer[
|
|
9786
|
+
var j2, tmp = 0;
|
|
9787
|
+
for (j2 = 0; j2 < byte_array.length; j2++) {
|
|
9788
|
+
tmp |= buffer[j2] << j2 * 8;
|
|
9803
9789
|
}
|
|
9804
9790
|
return result ^ tmp;
|
|
9805
9791
|
}
|
|
@@ -10069,8 +10055,8 @@ _.register_event = function() {
|
|
|
10069
10055
|
}();
|
|
10070
10056
|
var TOKEN_MATCH_REGEX = new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');
|
|
10071
10057
|
_.dom_query = /* @__PURE__ */ function() {
|
|
10072
|
-
function getAllChildren(
|
|
10073
|
-
return
|
|
10058
|
+
function getAllChildren(e2) {
|
|
10059
|
+
return e2.all ? e2.all : e2.getElementsByTagName("*");
|
|
10074
10060
|
}
|
|
10075
10061
|
var bad_whitespace = /[\t\r\n]/g;
|
|
10076
10062
|
function hasClass(elem, selector) {
|
|
@@ -10082,7 +10068,7 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10082
10068
|
return [];
|
|
10083
10069
|
}
|
|
10084
10070
|
var tokens = selector.split(" ");
|
|
10085
|
-
var token, bits, tagName, found, foundCount, i,
|
|
10071
|
+
var token, bits, tagName, found, foundCount, i, j2, k2, elements, currentContextIndex;
|
|
10086
10072
|
var currentContext = [document$1];
|
|
10087
10073
|
for (i = 0; i < tokens.length; i++) {
|
|
10088
10074
|
token = tokens[i].replace(/^\s+/, "").replace(/\s+$/, "");
|
|
@@ -10106,11 +10092,11 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10106
10092
|
}
|
|
10107
10093
|
found = [];
|
|
10108
10094
|
foundCount = 0;
|
|
10109
|
-
for (
|
|
10095
|
+
for (j2 = 0; j2 < currentContext.length; j2++) {
|
|
10110
10096
|
if (tagName == "*") {
|
|
10111
|
-
elements = getAllChildren(currentContext[
|
|
10097
|
+
elements = getAllChildren(currentContext[j2]);
|
|
10112
10098
|
} else {
|
|
10113
|
-
elements = currentContext[
|
|
10099
|
+
elements = currentContext[j2].getElementsByTagName(tagName);
|
|
10114
10100
|
}
|
|
10115
10101
|
for (k2 = 0; k2 < elements.length; k2++) {
|
|
10116
10102
|
found[foundCount++] = elements[k2];
|
|
@@ -10118,10 +10104,10 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10118
10104
|
}
|
|
10119
10105
|
currentContext = [];
|
|
10120
10106
|
currentContextIndex = 0;
|
|
10121
|
-
for (
|
|
10122
|
-
if (found[
|
|
10123
|
-
hasClass(found[
|
|
10124
|
-
currentContext[currentContextIndex++] = found[
|
|
10107
|
+
for (j2 = 0; j2 < found.length; j2++) {
|
|
10108
|
+
if (found[j2].className && _.isString(found[j2].className) && // some SVG elements have classNames which are not strings
|
|
10109
|
+
hasClass(found[j2], className)) {
|
|
10110
|
+
currentContext[currentContextIndex++] = found[j2];
|
|
10125
10111
|
}
|
|
10126
10112
|
}
|
|
10127
10113
|
continue;
|
|
@@ -10137,11 +10123,11 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10137
10123
|
}
|
|
10138
10124
|
found = [];
|
|
10139
10125
|
foundCount = 0;
|
|
10140
|
-
for (
|
|
10126
|
+
for (j2 = 0; j2 < currentContext.length; j2++) {
|
|
10141
10127
|
if (tagName == "*") {
|
|
10142
|
-
elements = getAllChildren(currentContext[
|
|
10128
|
+
elements = getAllChildren(currentContext[j2]);
|
|
10143
10129
|
} else {
|
|
10144
|
-
elements = currentContext[
|
|
10130
|
+
elements = currentContext[j2].getElementsByTagName(tagName);
|
|
10145
10131
|
}
|
|
10146
10132
|
for (k2 = 0; k2 < elements.length; k2++) {
|
|
10147
10133
|
found[foundCount++] = elements[k2];
|
|
@@ -10152,45 +10138,45 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10152
10138
|
var checkFunction;
|
|
10153
10139
|
switch (attrOperator) {
|
|
10154
10140
|
case "=":
|
|
10155
|
-
checkFunction = function(
|
|
10156
|
-
return
|
|
10141
|
+
checkFunction = function(e2) {
|
|
10142
|
+
return e2.getAttribute(attrName) == attrValue;
|
|
10157
10143
|
};
|
|
10158
10144
|
break;
|
|
10159
10145
|
case "~":
|
|
10160
|
-
checkFunction = function(
|
|
10161
|
-
return
|
|
10146
|
+
checkFunction = function(e2) {
|
|
10147
|
+
return e2.getAttribute(attrName).match(new RegExp("\\b" + attrValue + "\\b"));
|
|
10162
10148
|
};
|
|
10163
10149
|
break;
|
|
10164
10150
|
case "|":
|
|
10165
|
-
checkFunction = function(
|
|
10166
|
-
return
|
|
10151
|
+
checkFunction = function(e2) {
|
|
10152
|
+
return e2.getAttribute(attrName).match(new RegExp("^" + attrValue + "-?"));
|
|
10167
10153
|
};
|
|
10168
10154
|
break;
|
|
10169
10155
|
case "^":
|
|
10170
|
-
checkFunction = function(
|
|
10171
|
-
return
|
|
10156
|
+
checkFunction = function(e2) {
|
|
10157
|
+
return e2.getAttribute(attrName).indexOf(attrValue) === 0;
|
|
10172
10158
|
};
|
|
10173
10159
|
break;
|
|
10174
10160
|
case "$":
|
|
10175
|
-
checkFunction = function(
|
|
10176
|
-
return
|
|
10161
|
+
checkFunction = function(e2) {
|
|
10162
|
+
return e2.getAttribute(attrName).lastIndexOf(attrValue) == e2.getAttribute(attrName).length - attrValue.length;
|
|
10177
10163
|
};
|
|
10178
10164
|
break;
|
|
10179
10165
|
case "*":
|
|
10180
|
-
checkFunction = function(
|
|
10181
|
-
return
|
|
10166
|
+
checkFunction = function(e2) {
|
|
10167
|
+
return e2.getAttribute(attrName).indexOf(attrValue) > -1;
|
|
10182
10168
|
};
|
|
10183
10169
|
break;
|
|
10184
10170
|
default:
|
|
10185
|
-
checkFunction = function(
|
|
10186
|
-
return
|
|
10171
|
+
checkFunction = function(e2) {
|
|
10172
|
+
return e2.getAttribute(attrName);
|
|
10187
10173
|
};
|
|
10188
10174
|
}
|
|
10189
10175
|
currentContext = [];
|
|
10190
10176
|
currentContextIndex = 0;
|
|
10191
|
-
for (
|
|
10192
|
-
if (checkFunction(found[
|
|
10193
|
-
currentContext[currentContextIndex++] = found[
|
|
10177
|
+
for (j2 = 0; j2 < found.length; j2++) {
|
|
10178
|
+
if (checkFunction(found[j2])) {
|
|
10179
|
+
currentContext[currentContextIndex++] = found[j2];
|
|
10194
10180
|
}
|
|
10195
10181
|
}
|
|
10196
10182
|
continue;
|
|
@@ -10198,8 +10184,8 @@ _.dom_query = /* @__PURE__ */ function() {
|
|
|
10198
10184
|
tagName = token;
|
|
10199
10185
|
found = [];
|
|
10200
10186
|
foundCount = 0;
|
|
10201
|
-
for (
|
|
10202
|
-
elements = currentContext[
|
|
10187
|
+
for (j2 = 0; j2 < currentContext.length; j2++) {
|
|
10188
|
+
elements = currentContext[j2].getElementsByTagName(tagName);
|
|
10203
10189
|
for (k2 = 0; k2 < elements.length; k2++) {
|
|
10204
10190
|
found[foundCount++] = elements[k2];
|
|
10205
10191
|
}
|
|
@@ -11376,11 +11362,11 @@ DomTracker.prototype.track = function(query, event_name, properties, user_callba
|
|
|
11376
11362
|
return;
|
|
11377
11363
|
}
|
|
11378
11364
|
_.each(elements, function(element) {
|
|
11379
|
-
_.register_event(element, this.override_event, function(
|
|
11365
|
+
_.register_event(element, this.override_event, function(e2) {
|
|
11380
11366
|
var options = {};
|
|
11381
11367
|
var props = that.create_properties(properties, this);
|
|
11382
11368
|
var timeout = that.mp.get_config("track_links_timeout");
|
|
11383
|
-
that.event_handler(
|
|
11369
|
+
that.event_handler(e2, this, options);
|
|
11384
11370
|
window.setTimeout(that.track_callback(user_callback, props, options, true), timeout);
|
|
11385
11371
|
that.mp.track(event_name, props, that.track_callback(user_callback, props, options));
|
|
11386
11372
|
});
|
|
@@ -11843,7 +11829,7 @@ MixpanelPeople.prototype._flush = function(_set_callback, _add_callback, _append
|
|
|
11843
11829
|
_remove_callback(response, data);
|
|
11844
11830
|
}
|
|
11845
11831
|
};
|
|
11846
|
-
for (var
|
|
11832
|
+
for (var j2 = $remove_queue.length - 1; j2 >= 0; j2--) {
|
|
11847
11833
|
$remove_queue = this._mixpanel["persistence"].load_queue(REMOVE_ACTION);
|
|
11848
11834
|
$remove_item = $remove_queue.pop();
|
|
11849
11835
|
_this._mixpanel["persistence"].save();
|
|
@@ -12196,8 +12182,8 @@ var load_extra_bundle = function(src, _onload) {
|
|
|
12196
12182
|
var mixpanel_master;
|
|
12197
12183
|
var INIT_MODULE = 0;
|
|
12198
12184
|
var INIT_SNIPPET = 1;
|
|
12199
|
-
var IDENTITY_FUNC = function(
|
|
12200
|
-
return
|
|
12185
|
+
var IDENTITY_FUNC = function(x2) {
|
|
12186
|
+
return x2;
|
|
12201
12187
|
};
|
|
12202
12188
|
var NOOP_FUNC = function() {
|
|
12203
12189
|
};
|
|
@@ -12605,16 +12591,16 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
|
|
|
12605
12591
|
} else if (use_sendBeacon) {
|
|
12606
12592
|
try {
|
|
12607
12593
|
succeeded = sendBeacon(url, body_data);
|
|
12608
|
-
} catch (
|
|
12609
|
-
lib.report_error(
|
|
12594
|
+
} catch (e2) {
|
|
12595
|
+
lib.report_error(e2);
|
|
12610
12596
|
succeeded = false;
|
|
12611
12597
|
}
|
|
12612
12598
|
try {
|
|
12613
12599
|
if (callback) {
|
|
12614
12600
|
callback(succeeded ? 1 : 0);
|
|
12615
12601
|
}
|
|
12616
|
-
} catch (
|
|
12617
|
-
lib.report_error(
|
|
12602
|
+
} catch (e2) {
|
|
12603
|
+
lib.report_error(e2);
|
|
12618
12604
|
}
|
|
12619
12605
|
} else if (USE_XHR) {
|
|
12620
12606
|
try {
|
|
@@ -12640,8 +12626,8 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
|
|
|
12640
12626
|
var response;
|
|
12641
12627
|
try {
|
|
12642
12628
|
response = _.JSONDecode(req.responseText);
|
|
12643
|
-
} catch (
|
|
12644
|
-
lib.report_error(
|
|
12629
|
+
} catch (e2) {
|
|
12630
|
+
lib.report_error(e2);
|
|
12645
12631
|
if (options.ignore_json_errors) {
|
|
12646
12632
|
response = req.responseText;
|
|
12647
12633
|
} else {
|
|
@@ -12673,8 +12659,8 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
|
|
|
12673
12659
|
}
|
|
12674
12660
|
};
|
|
12675
12661
|
req.send(body_data);
|
|
12676
|
-
} catch (
|
|
12677
|
-
lib.report_error(
|
|
12662
|
+
} catch (e2) {
|
|
12663
|
+
lib.report_error(e2);
|
|
12678
12664
|
succeeded = false;
|
|
12679
12665
|
}
|
|
12680
12666
|
} else {
|
|
@@ -13368,7 +13354,7 @@ var add_dom_loaded_handler = function() {
|
|
|
13368
13354
|
function do_scroll_check() {
|
|
13369
13355
|
try {
|
|
13370
13356
|
document$1.documentElement.doScroll("left");
|
|
13371
|
-
} catch (
|
|
13357
|
+
} catch (e2) {
|
|
13372
13358
|
setTimeout(do_scroll_check, 1);
|
|
13373
13359
|
return;
|
|
13374
13360
|
}
|
|
@@ -13385,7 +13371,7 @@ var add_dom_loaded_handler = function() {
|
|
|
13385
13371
|
var toplevel = false;
|
|
13386
13372
|
try {
|
|
13387
13373
|
toplevel = win.frameElement === null;
|
|
13388
|
-
} catch (
|
|
13374
|
+
} catch (e2) {
|
|
13389
13375
|
}
|
|
13390
13376
|
if (document$1.documentElement.doScroll && toplevel) {
|
|
13391
13377
|
do_scroll_check();
|
|
@@ -13406,7 +13392,7 @@ function loadNoop(_src, onload) {
|
|
|
13406
13392
|
onload();
|
|
13407
13393
|
}
|
|
13408
13394
|
var mixpanel = init_as_module(loadNoop);
|
|
13409
|
-
const version = "1.0.
|
|
13395
|
+
const version = "1.0.21";
|
|
13410
13396
|
const MIXPANEL_DISTINCT_ID_CACHE_KEY = "mp_distinct_id";
|
|
13411
13397
|
function init$2(mixpanelToken, debug = false, proxyUrl) {
|
|
13412
13398
|
return new Promise((resolve) => {
|
|
@@ -14234,6 +14220,26 @@ async function createRecommendedSeats$1(payload) {
|
|
|
14234
14220
|
throw new Error(error instanceof Error ? error.message : String(error));
|
|
14235
14221
|
}
|
|
14236
14222
|
}
|
|
14223
|
+
const DeleteFrequentPassengerSchema = z.object({
|
|
14224
|
+
passengerId: z.string()
|
|
14225
|
+
}).refine((data) => data.passengerId, {
|
|
14226
|
+
message: "A 'passengerId' must be provided"
|
|
14227
|
+
});
|
|
14228
|
+
async function deleteFrequentPassengers(payload) {
|
|
14229
|
+
try {
|
|
14230
|
+
validatorService.validateProps(payload, DeleteFrequentPassengerSchema);
|
|
14231
|
+
const distinctId = mixpanelService.getMixpanelDistinctId();
|
|
14232
|
+
if (!distinctId) {
|
|
14233
|
+
throw new Error("No distinct ID found");
|
|
14234
|
+
}
|
|
14235
|
+
return await f.recommendations.deleteFrequentPassenger(
|
|
14236
|
+
distinctId,
|
|
14237
|
+
payload.passengerId
|
|
14238
|
+
);
|
|
14239
|
+
} catch (error) {
|
|
14240
|
+
throw new Error(error instanceof Error ? error.message : String(error));
|
|
14241
|
+
}
|
|
14242
|
+
}
|
|
14237
14243
|
async function getFrequentPassengers() {
|
|
14238
14244
|
try {
|
|
14239
14245
|
const distinctId = mixpanelService.getMixpanelDistinctId();
|
|
@@ -14349,7 +14355,8 @@ const analytics = {
|
|
|
14349
14355
|
getRecommendedSeats: createRecommendedSeats,
|
|
14350
14356
|
getRecommendedTrips,
|
|
14351
14357
|
createFrequentPassengers,
|
|
14352
|
-
getFrequentPassengers
|
|
14358
|
+
getFrequentPassengers,
|
|
14359
|
+
deleteFrequentPassenger: deleteFrequentPassengers
|
|
14353
14360
|
},
|
|
14354
14361
|
track: {
|
|
14355
14362
|
search: trackSearch,
|