wineater-bot 3.1.12 → 3.1.13
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/wineater-chatbot.mjs +443 -473
- package/dist/wineater-chatbot.umd.js +36 -64
- package/index.html +2 -2
- package/package.json +1 -1
- package/src/index.js +1 -31
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Cs = `
|
|
2
2
|
:root {
|
|
3
3
|
--wineater-corp-color: #0044FF;
|
|
4
4
|
--wineater-color: #7B2BEB;
|
|
@@ -644,10 +644,10 @@ visibility: visible;
|
|
|
644
644
|
height: 80px;
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
|
-
`,
|
|
648
|
-
|
|
649
|
-
document.head.appendChild(
|
|
650
|
-
function
|
|
647
|
+
`, $i = document.createElement("style");
|
|
648
|
+
$i.textContent = Cs;
|
|
649
|
+
document.head.appendChild($i);
|
|
650
|
+
function _s() {
|
|
651
651
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
|
|
652
652
|
const e = Math.random() * 16 | 0;
|
|
653
653
|
return (t === "x" ? e : e & 3 | 8).toString(16);
|
|
@@ -673,13 +673,13 @@ function oe(t) {
|
|
|
673
673
|
}
|
|
674
674
|
return null;
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function Ns(t) {
|
|
677
677
|
document.cookie = t + "=; Max-Age=-99999999;";
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function Os() {
|
|
680
680
|
const t = "uniqueUserID";
|
|
681
681
|
let e = oe(t);
|
|
682
|
-
return e || (e =
|
|
682
|
+
return e || (e = _s(), mt(t, e, 365)), e;
|
|
683
683
|
}
|
|
684
684
|
function it(t, e) {
|
|
685
685
|
fetch("https://wineater-backend.vercel.app/proxy/track", {
|
|
@@ -697,23 +697,23 @@ function it(t, e) {
|
|
|
697
697
|
console.error("Mixpanel tracking error", s);
|
|
698
698
|
});
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function Rs() {
|
|
701
701
|
it("Chatbot Opened", { distinct_id: oe("uniqueUserID"), client: oe("chatbotToken") });
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function qi() {
|
|
704
704
|
it("Chatbot Closed", { distinct_id: oe("uniqueUserID"), client: oe("chatbotToken") });
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function As(t) {
|
|
707
707
|
it("Message Sent", { distinct_id: oe("uniqueUserID"), message_content: t, client: oe("chatbotToken") });
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Ds(t) {
|
|
710
710
|
it("Products Got", { distinct_id: oe("uniqueUserID"), products: t, client: oe("chatbotToken") });
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function Ls(t) {
|
|
713
713
|
it("Product Clicked", { distinct_id: oe("uniqueUserID"), product_id: t, client: oe("chatbotToken") });
|
|
714
714
|
}
|
|
715
715
|
var qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
716
|
-
function
|
|
716
|
+
function Wi(t) {
|
|
717
717
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
718
718
|
}
|
|
719
719
|
var pn = { exports: {} };
|
|
@@ -757,25 +757,25 @@ var pn = { exports: {} };
|
|
|
757
757
|
return new (h || (h = Promise))(function(g, w) {
|
|
758
758
|
function x(H) {
|
|
759
759
|
try {
|
|
760
|
-
|
|
760
|
+
F(m.next(H));
|
|
761
761
|
} catch (_) {
|
|
762
762
|
w(_);
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
function R(H) {
|
|
766
766
|
try {
|
|
767
|
-
|
|
767
|
+
F(m.throw(H));
|
|
768
768
|
} catch (_) {
|
|
769
769
|
w(_);
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function F(H) {
|
|
773
773
|
var _;
|
|
774
|
-
H.done ? g(H.value) : (_ = H.value, _ instanceof h ? _ : new h(function(
|
|
775
|
-
|
|
774
|
+
H.done ? g(H.value) : (_ = H.value, _ instanceof h ? _ : new h(function(q) {
|
|
775
|
+
q(_);
|
|
776
776
|
})).then(x, R);
|
|
777
777
|
}
|
|
778
|
-
|
|
778
|
+
F((m = m.apply(b, f || [])).next());
|
|
779
779
|
});
|
|
780
780
|
}
|
|
781
781
|
function o(b, f) {
|
|
@@ -787,7 +787,7 @@ var pn = { exports: {} };
|
|
|
787
787
|
return w = { next: R(0), throw: R(1), return: R(2) }, typeof Symbol == "function" && (w[Symbol.iterator] = function() {
|
|
788
788
|
return this;
|
|
789
789
|
}), w;
|
|
790
|
-
function R(
|
|
790
|
+
function R(F) {
|
|
791
791
|
return function(H) {
|
|
792
792
|
return function(_) {
|
|
793
793
|
if (h)
|
|
@@ -830,15 +830,15 @@ var pn = { exports: {} };
|
|
|
830
830
|
continue;
|
|
831
831
|
}
|
|
832
832
|
_ = f.call(b, x);
|
|
833
|
-
} catch (
|
|
834
|
-
_ = [6,
|
|
833
|
+
} catch (q) {
|
|
834
|
+
_ = [6, q], m = 0;
|
|
835
835
|
} finally {
|
|
836
836
|
h = g = 0;
|
|
837
837
|
}
|
|
838
838
|
if (5 & _[0])
|
|
839
839
|
throw _[1];
|
|
840
840
|
return { value: _[0] ? _[1] : void 0, done: !0 };
|
|
841
|
-
}([
|
|
841
|
+
}([F, H]);
|
|
842
842
|
};
|
|
843
843
|
}
|
|
844
844
|
}
|
|
@@ -918,56 +918,56 @@ var pn = { exports: {} };
|
|
|
918
918
|
this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
|
|
919
919
|
var m = h, g = m.api, w = m.evaluationContext;
|
|
920
920
|
h.log("Get Flags"), h.isLoading = !0, h.loadingState.isFetching || h.setLoadingState(s(s({}, h.loadingState), { isFetching: !0 }));
|
|
921
|
-
var x = "".concat(h.getContext().identity), R = function(
|
|
922
|
-
var H, _,
|
|
923
|
-
if (
|
|
924
|
-
var ae =
|
|
921
|
+
var x = "".concat(h.getContext().identity), R = function(F) {
|
|
922
|
+
var H, _, q, ee;
|
|
923
|
+
if (F && x === "".concat(h.getContext().identity)) {
|
|
924
|
+
var ae = F.flags, te = F.traits, ne = F.identifier;
|
|
925
925
|
h.isLoading = !1;
|
|
926
926
|
var ce = {}, le = {};
|
|
927
|
-
te = te || [], (ae = ae || []).forEach(function(
|
|
928
|
-
ce[
|
|
929
|
-
}), te.forEach(function(
|
|
930
|
-
le[
|
|
927
|
+
te = te || [], (ae = ae || []).forEach(function(K) {
|
|
928
|
+
ce[K.feature.name.toLowerCase().replace(/ /g, "_")] = { id: K.feature.id, enabled: K.enabled, value: K.feature_state_value };
|
|
929
|
+
}), te.forEach(function(K) {
|
|
930
|
+
le[K.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: K.transient, value: K.trait_value };
|
|
931
931
|
}), h.oldFlags = s({}, h.flags);
|
|
932
932
|
var me = d(h.oldFlags, ce), Ke = d((H = h.evaluationContext.identity) === null || H === void 0 ? void 0 : H.traits, le);
|
|
933
933
|
if ((ne || Object.keys(le).length) && (h.evaluationContext.identity = { traits: le }, ne && (h.evaluationContext.identity.identifier = ne)), h.flags = ce, h.updateStorage(), h._onChange(h.oldFlags, { isFromServer: !0, flagsChanged: me, traitsChanged: Ke }, h._loadedState(null, c.SERVER)), h.datadogRum)
|
|
934
934
|
try {
|
|
935
935
|
if (h.datadogRum.trackTraits) {
|
|
936
|
-
var
|
|
937
|
-
Object.keys(((_ = h.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(
|
|
938
|
-
|
|
936
|
+
var Je = {};
|
|
937
|
+
Object.keys(((_ = h.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(K) {
|
|
938
|
+
Je[L + K] = h.getTrait(K);
|
|
939
939
|
});
|
|
940
|
-
var
|
|
941
|
-
h.log("Setting Datadog user",
|
|
940
|
+
var Me = s(s(s({}, h.datadogRum.client.getUser()), { id: h.datadogRum.client.getUser().id || ((q = h.evaluationContext.identity) === null || q === void 0 ? void 0 : q.identifier) }), Je);
|
|
941
|
+
h.log("Setting Datadog user", Me), h.datadogRum.client.setUser(Me);
|
|
942
942
|
}
|
|
943
|
-
} catch (
|
|
944
|
-
console.error(
|
|
943
|
+
} catch (K) {
|
|
944
|
+
console.error(K);
|
|
945
945
|
}
|
|
946
946
|
if (h.dtrum)
|
|
947
947
|
try {
|
|
948
948
|
var ie = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
|
|
949
|
-
Object.keys(h.flags).map(function(
|
|
950
|
-
p(ie, N +
|
|
951
|
-
}), Object.keys(((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(
|
|
952
|
-
p(ie, L +
|
|
949
|
+
Object.keys(h.flags).map(function(K) {
|
|
950
|
+
p(ie, N + K, h.getValue(K, { skipAnalytics: !0 })), p(ie, O + K, h.hasFeature(K, { skipAnalytics: !0 }));
|
|
951
|
+
}), Object.keys(((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(K) {
|
|
952
|
+
p(ie, L + K, h.getTrait(K));
|
|
953
953
|
}), h.log("Sending javaLongOrObject traits to dynatrace", ie.javaLongOrObject), h.log("Sending date traits to dynatrace", ie.date), h.log("Sending shortString traits to dynatrace", ie.shortString), h.log("Sending javaDouble to dynatrace", ie.javaDouble), h.dtrum.sendSessionProperties(ie.javaLongOrObject, ie.date, ie.shortString, ie.javaDouble);
|
|
954
|
-
} catch (
|
|
955
|
-
console.error(
|
|
954
|
+
} catch (K) {
|
|
955
|
+
console.error(K);
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
};
|
|
959
|
-
return w.identity ? Promise.all([w.identity.traits && Object.keys(w.identity.traits).length || !w.identity.identifier ? h.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: w.identity.identifier, transient: w.identity.transient, traits: Object.entries(w.identity.traits).map(function(
|
|
960
|
-
var H =
|
|
959
|
+
return w.identity ? Promise.all([w.identity.traits && Object.keys(w.identity.traits).length || !w.identity.identifier ? h.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: w.identity.identifier, transient: w.identity.transient, traits: Object.entries(w.identity.traits).map(function(F) {
|
|
960
|
+
var H = F[0], _ = F[1];
|
|
961
961
|
return { trait_key: H, trait_value: _ == null ? void 0 : _.value, transient: _ == null ? void 0 : _.transient };
|
|
962
|
-
}).filter(function(
|
|
963
|
-
return
|
|
964
|
-
}) })) : h.getJSON(g + "identities/?identifier=" + encodeURIComponent(w.identity.identifier) + (w.identity.transient ? "&transient=true" : ""))]).then(function(
|
|
965
|
-
return h.evaluationContext.identity = s(s({}, h.evaluationContext.identity), { traits: {} }), R(
|
|
966
|
-
}).catch(function(
|
|
967
|
-
var H =
|
|
962
|
+
}).filter(function(F) {
|
|
963
|
+
return F.trait_value !== void 0 || (h.log("Warning - attempted to set an undefined trait value for key", F.trait_key), !1);
|
|
964
|
+
}) })) : h.getJSON(g + "identities/?identifier=" + encodeURIComponent(w.identity.identifier) + (w.identity.transient ? "&transient=true" : ""))]).then(function(F) {
|
|
965
|
+
return h.evaluationContext.identity = s(s({}, h.evaluationContext.identity), { traits: {} }), R(F == null ? void 0 : F[0]);
|
|
966
|
+
}).catch(function(F) {
|
|
967
|
+
var H = F.message, _ = new Error(H);
|
|
968
968
|
return Promise.reject(_);
|
|
969
|
-
}) : h.getJSON(g + "flags/").then(function(
|
|
970
|
-
return R({ flags:
|
|
969
|
+
}) : h.getJSON(g + "flags/").then(function(F) {
|
|
970
|
+
return R({ flags: F, traits: void 0 });
|
|
971
971
|
});
|
|
972
972
|
}, this.analyticsFlags = function() {
|
|
973
973
|
var m = h.api;
|
|
@@ -1025,13 +1025,13 @@ var pn = { exports: {} };
|
|
|
1025
1025
|
}, this.getJSON = function(m, g, w) {
|
|
1026
1026
|
var x, R = h;
|
|
1027
1027
|
R.evaluationContext;
|
|
1028
|
-
var
|
|
1029
|
-
h.evaluationContext.environment && (H.headers["X-Environment-Key"] = h.evaluationContext.environment.apiKey), g && g !== "GET" && (H.headers["Content-Type"] = "application/json; charset=utf-8"),
|
|
1028
|
+
var F = R.headers, H = { method: g || "GET", body: w, cache: "no-cache", headers: {} };
|
|
1029
|
+
h.evaluationContext.environment && (H.headers["X-Environment-Key"] = h.evaluationContext.environment.apiKey), g && g !== "GET" && (H.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(H.headers, F), u || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
|
|
1030
1030
|
var _ = "".concat((x = h.evaluationContext.identity) === null || x === void 0 ? void 0 : x.identifier);
|
|
1031
|
-
return u(m, H).then(function(
|
|
1031
|
+
return u(m, H).then(function(q) {
|
|
1032
1032
|
var ee, ae, te = "".concat((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.identifier);
|
|
1033
1033
|
if (_ === te) {
|
|
1034
|
-
var ne = (ae =
|
|
1034
|
+
var ne = (ae = q.headers) === null || ae === void 0 ? void 0 : ae.get("x-flagsmith-document-updated-at");
|
|
1035
1035
|
if (ne)
|
|
1036
1036
|
try {
|
|
1037
1037
|
var ce = parseFloat(ne);
|
|
@@ -1041,13 +1041,13 @@ var pn = { exports: {} };
|
|
|
1041
1041
|
} catch (le) {
|
|
1042
1042
|
h.log(le, "Failed to parse x-flagsmith-document-updated-at", ne);
|
|
1043
1043
|
}
|
|
1044
|
-
return h.log("Fetch response: " +
|
|
1044
|
+
return h.log("Fetch response: " + q.status + " " + (g || "GET") + 0 + m), q.text().then(function(le) {
|
|
1045
1045
|
var me = le;
|
|
1046
1046
|
try {
|
|
1047
1047
|
me = JSON.parse(le);
|
|
1048
1048
|
} catch {
|
|
1049
1049
|
}
|
|
1050
|
-
return !me &&
|
|
1050
|
+
return !me && q.status && (me = "API Response: ".concat(q.status)), q.status && q.status >= 200 && q.status < 300 ? me : Promise.reject(new Error(me));
|
|
1051
1051
|
});
|
|
1052
1052
|
}
|
|
1053
1053
|
h.log("Received response with identity mismatch, ignoring response. Requested: ".concat(_, ", Current: ").concat(te));
|
|
@@ -1067,19 +1067,19 @@ var pn = { exports: {} };
|
|
|
1067
1067
|
return b.prototype.init = function(f) {
|
|
1068
1068
|
var h, m, g;
|
|
1069
1069
|
return r(this, void 0, void 0, function() {
|
|
1070
|
-
var w, x, R,
|
|
1070
|
+
var w, x, R, F, H, _, q, ee, ae, te, ne, ce, le, me, Ke, Je, Me, ie, K, Dt, Xe, Wn, Ye, Lt, Gn, Vn, Mt, Kn, Ft, Qe, Fe, Jn, se = this;
|
|
1071
1071
|
return o(this, function(pe) {
|
|
1072
1072
|
switch (pe.label) {
|
|
1073
1073
|
case 0:
|
|
1074
1074
|
w = v(f.evaluationContext || this.evaluationContext), pe.label = 1;
|
|
1075
1075
|
case 1:
|
|
1076
|
-
if (pe.trys.push([1, 13, , 14]), x = f.environmentID, R = f.api,
|
|
1076
|
+
if (pe.trys.push([1, 13, , 14]), x = f.environmentID, R = f.api, F = R === void 0 ? k : R, H = f.headers, _ = f.onChange, q = f.cacheFlags, ee = f.datadogRum, ae = f.onError, te = f.defaultFlags, ne = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Ke = f.enableAnalytics, Je = f.realtime, Me = f.eventSourceUrl, ie = Me === void 0 ? "https://realtime.flagsmith.com/" : Me, K = f.AsyncStorage, Dt = f.identity, Xe = f.traits, Wn = f.state, Ye = f.cacheOptions, Lt = f.angularHttpClient, Gn = f._trigger, Vn = f._triggerLoadingState, w.environment = x ? { apiKey: x } : w.environment, !w.environment || !w.environment.apiKey)
|
|
1077
1077
|
throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
|
|
1078
|
-
if (w.identity = Dt ||
|
|
1078
|
+
if (w.identity = Dt || Xe ? { identifier: Dt, traits: Xe ? Object.fromEntries(Object.entries(Xe).map(function(de) {
|
|
1079
1079
|
return [de[0], { value: de[1] }];
|
|
1080
|
-
})) : {} } : w.identity, this.evaluationContext = w, this.api =
|
|
1080
|
+
})) : {} } : w.identity, this.evaluationContext = w, this.api = F, this.headers = H, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = _, Mt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Gn || this._trigger, this._triggerLoadingState = Vn || this._triggerLoadingState, this.onError = function(de) {
|
|
1081
1081
|
se.setLoadingState(s(s({}, se.loadingState), { isFetching: !1, isLoading: !1, error: de })), ae == null || ae(de);
|
|
1082
|
-
}, this.enableLogs = le || !1, this.cacheOptions = Ye ? { skipAPI: !!Ye.skipAPI, ttl: Ye.ttl || 0, loadStale: !!Ye.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ne && (u = ne), this.enableAnalytics = Ke || !1, this.flags = Object.assign({}, te) || {}, this.datadogRum = ee || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = A !== void 0 && !!
|
|
1082
|
+
}, this.enableLogs = le || !1, this.cacheOptions = Ye ? { skipAPI: !!Ye.skipAPI, ttl: Ye.ttl || 0, loadStale: !!Ye.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ne && (u = ne), this.enableAnalytics = Ke || !1, this.flags = Object.assign({}, te) || {}, this.datadogRum = ee || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = A !== void 0 && !!q, K && (A = K), Je && typeof window < "u" && this.setupRealtime(ie, w.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = s(s({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState(Wn), this.log("Initialising with properties", f, this), me && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), Lt && (u = /* @__PURE__ */ function(de) {
|
|
1083
1083
|
return function(be, ye) {
|
|
1084
1084
|
var Ee = ye.headers, Y = ye.method, Pe = ye.body;
|
|
1085
1085
|
return new Promise(function(Re) {
|
|
@@ -1115,13 +1115,13 @@ var pn = { exports: {} };
|
|
|
1115
1115
|
se.log("Retrieved events from cache", be), se.setState(s(s({}, Ee), { evaluationEvent: ye[se.evaluationContext.environment.apiKey] }));
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
-
})), !
|
|
1118
|
+
})), !q)
|
|
1119
1119
|
return [3, 9];
|
|
1120
1120
|
if (!A || !this.canUseStorage)
|
|
1121
1121
|
return [3, 8];
|
|
1122
1122
|
Kn = function(de, be) {
|
|
1123
1123
|
return r(se, void 0, void 0, function() {
|
|
1124
|
-
var ye, Ee, Y, Pe, Re, ke, Pt,
|
|
1124
|
+
var ye, Ee, Y, Pe, Re, ke, Pt, Xn, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Gt, Vt, Kt, Jt, Xt, Yt, Qt, Zt;
|
|
1125
1125
|
return o(this, function(Ie) {
|
|
1126
1126
|
switch (Ie.label) {
|
|
1127
1127
|
case 0:
|
|
@@ -1129,7 +1129,7 @@ var pn = { exports: {} };
|
|
|
1129
1129
|
return [3, 7];
|
|
1130
1130
|
ye = null, Ee = null, Ie.label = 1;
|
|
1131
1131
|
case 1:
|
|
1132
|
-
return Ie.trys.push([1, 5, , 6]), Y = JSON.parse(be), Pe = !1, Re = !1, Y && Y.api === this.api && ((jt = (Bt = Y.evaluationContext) === null || Bt === void 0 ? void 0 : Bt.environment) === null || jt === void 0 ? void 0 : jt.apiKey) === ((zt = this.evaluationContext.environment) === null || zt === void 0 ? void 0 : zt.apiKey) && (ke = !0, this.evaluationContext.identity && ((Ht = (Ut = Y.evaluationContext) === null || Ut === void 0 ? void 0 : Ut.identity) === null || Ht === void 0 ? void 0 : Ht.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((qt = ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity) === null || qt === void 0 ? void 0 : qt.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), ke = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Re = !0, ke = !0)), ke && (Pe = !0, Ee = d((Wt = this.evaluationContext.identity) === null || Wt === void 0 ? void 0 : Wt.traits, (Vt = (Gt = Y.evaluationContext) === null || Gt === void 0 ? void 0 : Gt.identity) === null || Vt === void 0 ? void 0 : Vt.traits), ye = d(this.flags, Y.flags), this.setState(s(s({}, Y), { evaluationContext: v(s(s({}, Y.evaluationContext), { identity: !((Kt = Y.evaluationContext) === null || Kt === void 0) && Kt.identity ? s(s({}, (
|
|
1132
|
+
return Ie.trys.push([1, 5, , 6]), Y = JSON.parse(be), Pe = !1, Re = !1, Y && Y.api === this.api && ((jt = (Bt = Y.evaluationContext) === null || Bt === void 0 ? void 0 : Bt.environment) === null || jt === void 0 ? void 0 : jt.apiKey) === ((zt = this.evaluationContext.environment) === null || zt === void 0 ? void 0 : zt.apiKey) && (ke = !0, this.evaluationContext.identity && ((Ht = (Ut = Y.evaluationContext) === null || Ut === void 0 ? void 0 : Ut.identity) === null || Ht === void 0 ? void 0 : Ht.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((qt = ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity) === null || qt === void 0 ? void 0 : qt.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), ke = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Re = !0, ke = !0)), ke && (Pe = !0, Ee = d((Wt = this.evaluationContext.identity) === null || Wt === void 0 ? void 0 : Wt.traits, (Vt = (Gt = Y.evaluationContext) === null || Gt === void 0 ? void 0 : Gt.identity) === null || Vt === void 0 ? void 0 : Vt.traits), ye = d(this.flags, Y.flags), this.setState(s(s({}, Y), { evaluationContext: v(s(s({}, Y.evaluationContext), { identity: !((Kt = Y.evaluationContext) === null || Kt === void 0) && Kt.identity ? s(s({}, (Jt = Y.evaluationContext) === null || Jt === void 0 ? void 0 : Jt.identity), { traits: s(s({}, ((Yt = (Xt = Y.evaluationContext) === null || Xt === void 0 ? void 0 : Xt.identity) === null || Yt === void 0 ? void 0 : Yt.traits) || {}), Xe || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Pe ? (Pt = !ce && (!this.cacheOptions.skipAPI || Re), this._onChange(null, { isFromServer: !1, flagsChanged: ye, traitsChanged: Ee }, this._loadedState(null, c.CACHE, Pt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Pe && !Re && this.log("Skipping API, using cache"), Pt && this.getFlags(), [3, 4]) : [3, 2];
|
|
1133
1133
|
case 2:
|
|
1134
1134
|
return ce ? [3, 4] : [4, this.getFlags()];
|
|
1135
1135
|
case 3:
|
|
@@ -1137,7 +1137,7 @@ var pn = { exports: {} };
|
|
|
1137
1137
|
case 4:
|
|
1138
1138
|
return [3, 6];
|
|
1139
1139
|
case 5:
|
|
1140
|
-
return
|
|
1140
|
+
return Xn = Ie.sent(), this.log("Exception fetching cached logs", Xn), [3, 6];
|
|
1141
1141
|
case 6:
|
|
1142
1142
|
return [3, 10];
|
|
1143
1143
|
case 7:
|
|
@@ -1149,7 +1149,7 @@ var pn = { exports: {} };
|
|
|
1149
1149
|
this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (Qt = this.evaluationContext.identity) === null || Qt === void 0 ? void 0 : Qt.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
|
|
1150
1150
|
else {
|
|
1151
1151
|
if (!this.flags)
|
|
1152
|
-
throw new Error(
|
|
1152
|
+
throw new Error(Mt);
|
|
1153
1153
|
this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (Zt = this.evaluationContext.identity) === null || Zt === void 0 ? void 0 : Zt.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
|
|
1154
1154
|
}
|
|
1155
1155
|
Ie.label = 10;
|
|
@@ -1160,13 +1160,13 @@ var pn = { exports: {} };
|
|
|
1160
1160
|
});
|
|
1161
1161
|
}, pe.label = 2;
|
|
1162
1162
|
case 2:
|
|
1163
|
-
return pe.trys.push([2, 7, , 8]), A.getItemSync ? (
|
|
1163
|
+
return pe.trys.push([2, 7, , 8]), A.getItemSync ? (Ft = A.getItemSync(B), [3, 5]) : [3, 3];
|
|
1164
1164
|
case 3:
|
|
1165
1165
|
return [4, A.getItem(B)];
|
|
1166
1166
|
case 4:
|
|
1167
|
-
|
|
1167
|
+
Ft = pe.sent(), pe.label = 5;
|
|
1168
1168
|
case 5:
|
|
1169
|
-
return [4, Kn(null,
|
|
1169
|
+
return [4, Kn(null, Ft)];
|
|
1170
1170
|
case 6:
|
|
1171
1171
|
case 7:
|
|
1172
1172
|
return pe.sent(), [3, 8];
|
|
@@ -1179,13 +1179,13 @@ var pn = { exports: {} };
|
|
|
1179
1179
|
case 11:
|
|
1180
1180
|
if (te)
|
|
1181
1181
|
this._onChange(null, { isFromServer: !1, flagsChanged: d({}, te), traitsChanged: d({}, (h = w.identity) === null || h === void 0 ? void 0 : h.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
|
|
1182
|
-
else if (this.flags && (Qe = null, Object.keys(this.flags).length === 0 && (Qe =
|
|
1182
|
+
else if (this.flags && (Qe = null, Object.keys(this.flags).length === 0 && (Qe = Mt), this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (m = w.identity) === null || m === void 0 ? void 0 : m.traits) }, this._loadedState(Qe, c.DEFAULT_FLAGS)), Qe))
|
|
1183
1183
|
throw new Error(Qe);
|
|
1184
1184
|
pe.label = 12;
|
|
1185
1185
|
case 12:
|
|
1186
1186
|
return [3, 14];
|
|
1187
1187
|
case 13:
|
|
1188
|
-
throw
|
|
1188
|
+
throw Fe = pe.sent(), this.log("Error during initialisation ", Fe), Jn = Fe instanceof Error ? Fe : new Error("".concat(Fe)), (g = this.onError) === null || g === void 0 || g.call(this, Jn), Fe;
|
|
1189
1189
|
case 14:
|
|
1190
1190
|
return [2];
|
|
1191
1191
|
}
|
|
@@ -1245,7 +1245,7 @@ var pn = { exports: {} };
|
|
|
1245
1245
|
var f = b.fetch, h = b.AsyncStorage, m = b.eventSource;
|
|
1246
1246
|
return new I({ fetch: f, AsyncStorage: h, eventSource: m });
|
|
1247
1247
|
}
|
|
1248
|
-
var P,
|
|
1248
|
+
var P, G = (P = function(b, f) {
|
|
1249
1249
|
return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, m) {
|
|
1250
1250
|
h.__proto__ = m;
|
|
1251
1251
|
} || function(h, m) {
|
|
@@ -1268,7 +1268,7 @@ var pn = { exports: {} };
|
|
|
1268
1268
|
return b && m >= b.length && (b = void 0), { value: b && b[m++], done: !b };
|
|
1269
1269
|
} };
|
|
1270
1270
|
throw new TypeError(f ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1271
|
-
},
|
|
1271
|
+
}, $ = function(b, f) {
|
|
1272
1272
|
var h = typeof Symbol == "function" && b[Symbol.iterator];
|
|
1273
1273
|
if (!h)
|
|
1274
1274
|
return b;
|
|
@@ -1292,17 +1292,17 @@ var pn = { exports: {} };
|
|
|
1292
1292
|
for (var m, g = 0, w = f.length; g < w; g++)
|
|
1293
1293
|
!m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
|
|
1294
1294
|
return b.concat(m || Array.prototype.slice.call(f));
|
|
1295
|
-
},
|
|
1295
|
+
}, M = function(b) {
|
|
1296
1296
|
function f() {
|
|
1297
1297
|
return b.call(this, `EventSource not available.
|
|
1298
1298
|
Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
|
|
1299
1299
|
}
|
|
1300
|
-
return
|
|
1301
|
-
}(Error),
|
|
1300
|
+
return G(f, b), f;
|
|
1301
|
+
}(Error), W = function() {
|
|
1302
1302
|
function b(f, h) {
|
|
1303
1303
|
var m = this;
|
|
1304
1304
|
if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = h != null ? Object.assign({}, h) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = f.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function")
|
|
1305
|
-
throw new
|
|
1305
|
+
throw new M();
|
|
1306
1306
|
this._onevent_wrapped = function(g) {
|
|
1307
1307
|
m._onevent(g);
|
|
1308
1308
|
}, this._start();
|
|
@@ -1311,20 +1311,20 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
1311
1311
|
throw new Error("Method not implemented.");
|
|
1312
1312
|
}, b.prototype._start = function() {
|
|
1313
1313
|
var f, h, m = this, g = this.url;
|
|
1314
|
-
this._lastEventId && (g.indexOf("?") === -1 ? g += "?" : g += "&", g += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(g, this._configuration), this._eventSource.onopen = function(
|
|
1315
|
-
m._onopen(
|
|
1316
|
-
}, this._eventSource.onerror = function(
|
|
1317
|
-
m._onerror(
|
|
1318
|
-
}, this._eventSource.onmessage = function(
|
|
1319
|
-
m.onmessage(
|
|
1314
|
+
this._lastEventId && (g.indexOf("?") === -1 ? g += "?" : g += "&", g += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(g, this._configuration), this._eventSource.onopen = function(F) {
|
|
1315
|
+
m._onopen(F);
|
|
1316
|
+
}, this._eventSource.onerror = function(F) {
|
|
1317
|
+
m._onerror(F);
|
|
1318
|
+
}, this._eventSource.onmessage = function(F) {
|
|
1319
|
+
m.onmessage(F);
|
|
1320
1320
|
};
|
|
1321
1321
|
try {
|
|
1322
1322
|
for (var w = j(Object.keys(this._listeners)), x = w.next(); !x.done; x = w.next()) {
|
|
1323
1323
|
var R = x.value;
|
|
1324
1324
|
this._eventSource.addEventListener(R, this._onevent_wrapped);
|
|
1325
1325
|
}
|
|
1326
|
-
} catch (
|
|
1327
|
-
f = { error:
|
|
1326
|
+
} catch (F) {
|
|
1327
|
+
f = { error: F };
|
|
1328
1328
|
} finally {
|
|
1329
1329
|
try {
|
|
1330
1330
|
x && !x.done && (h = w.return) && h.call(w);
|
|
@@ -1350,7 +1350,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
1350
1350
|
var g = this._listeners[f.type];
|
|
1351
1351
|
if (g != null)
|
|
1352
1352
|
try {
|
|
1353
|
-
for (var w = j(C([],
|
|
1353
|
+
for (var w = j(C([], $(g), !1)), x = w.next(); !x.done; x = w.next())
|
|
1354
1354
|
x.value.call(this, f);
|
|
1355
1355
|
} catch (R) {
|
|
1356
1356
|
h = { error: R };
|
|
@@ -1371,7 +1371,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
1371
1371
|
}, b.prototype.addEventListener = function(f, h, m) {
|
|
1372
1372
|
this._listeners[f] == null && (this._listeners[f] = [], this._eventSource != null && this._eventSource.addEventListener(f, this._onevent_wrapped));
|
|
1373
1373
|
var g = this._listeners[f];
|
|
1374
|
-
g.includes(h) || (this._listeners[f] = C(C([],
|
|
1374
|
+
g.includes(h) || (this._listeners[f] = C(C([], $(g), !1), [h], !1));
|
|
1375
1375
|
}, b.prototype.removeEventListener = function(f, h, m) {
|
|
1376
1376
|
var g = this._listeners[f];
|
|
1377
1377
|
this._listeners[f] = g.filter(function(w) {
|
|
@@ -1380,16 +1380,16 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
1380
1380
|
}, b;
|
|
1381
1381
|
}();
|
|
1382
1382
|
globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
|
|
1383
|
-
var
|
|
1383
|
+
var V = function(b, f) {
|
|
1384
1384
|
return f = f || {}, new Promise(function(h, m) {
|
|
1385
|
-
var g = new XMLHttpRequest(), w = [], x = [], R = {},
|
|
1385
|
+
var g = new XMLHttpRequest(), w = [], x = [], R = {}, F = function() {
|
|
1386
1386
|
return { ok: (g.status / 100 | 0) == 2, statusText: g.statusText, status: g.status, url: g.responseURL, text: function() {
|
|
1387
1387
|
return Promise.resolve(g.responseText);
|
|
1388
1388
|
}, json: function() {
|
|
1389
1389
|
return Promise.resolve(g.responseText).then(JSON.parse);
|
|
1390
1390
|
}, blob: function() {
|
|
1391
1391
|
return Promise.resolve(new Blob([g.response]));
|
|
1392
|
-
}, clone:
|
|
1392
|
+
}, clone: F, headers: { keys: function() {
|
|
1393
1393
|
return w;
|
|
1394
1394
|
}, entries: function() {
|
|
1395
1395
|
return x;
|
|
@@ -1400,23 +1400,23 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
1400
1400
|
} } };
|
|
1401
1401
|
};
|
|
1402
1402
|
for (var H in g.open(f.method || "get", b, !0), g.onload = function() {
|
|
1403
|
-
g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(_,
|
|
1404
|
-
w.push(
|
|
1405
|
-
}), h(
|
|
1403
|
+
g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(_, q, ee) {
|
|
1404
|
+
w.push(q = q.toLowerCase()), x.push([q, ee]), R[q] = R[q] ? R[q] + "," + ee : ee;
|
|
1405
|
+
}), h(F());
|
|
1406
1406
|
}, g.onerror = m, g.withCredentials = f.credentials == "include", f.headers)
|
|
1407
1407
|
g.setRequestHeader(H, f.headers[H]);
|
|
1408
1408
|
g.send(f.body || null);
|
|
1409
1409
|
});
|
|
1410
|
-
}, U = E({ AsyncStorage: i, fetch:
|
|
1410
|
+
}, U = E({ AsyncStorage: i, fetch: V, eventSource: W });
|
|
1411
1411
|
typeof window < "u" && (window.flagsmith = U), n.createFlagsmithInstance = function() {
|
|
1412
|
-
return E({ AsyncStorage: i, fetch:
|
|
1412
|
+
return E({ AsyncStorage: i, fetch: V, eventSource: W });
|
|
1413
1413
|
}, n.default = U, Object.defineProperty(n, "__esModule", { value: !0 });
|
|
1414
1414
|
});
|
|
1415
1415
|
})(pn, pn.exports);
|
|
1416
1416
|
var Ms = pn.exports;
|
|
1417
|
-
const
|
|
1418
|
-
var
|
|
1419
|
-
var r = new Worker(
|
|
1417
|
+
const Fs = /* @__PURE__ */ Wi(Ms);
|
|
1418
|
+
var Yn = {}, Ps = function(t, e, n, i, s) {
|
|
1419
|
+
var r = new Worker(Yn[e] || (Yn[e] = URL.createObjectURL(new Blob([
|
|
1420
1420
|
t + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'
|
|
1421
1421
|
], { type: "text/javascript" }))));
|
|
1422
1422
|
return r.onmessage = function(o) {
|
|
@@ -1496,19 +1496,19 @@ var Qn = {}, Ps = function(t, e, n, i, s) {
|
|
|
1496
1496
|
/* unused */
|
|
1497
1497
|
0,
|
|
1498
1498
|
0
|
|
1499
|
-
]), gn = new fe([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
|
|
1499
|
+
]), gn = new fe([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Gi = function(t, e) {
|
|
1500
1500
|
for (var n = new re(31), i = 0; i < 31; ++i)
|
|
1501
1501
|
n[i] = e += 1 << t[i - 1];
|
|
1502
1502
|
for (var s = new Ct(n[30]), i = 1; i < 30; ++i)
|
|
1503
1503
|
for (var r = n[i]; r < n[i + 1]; ++r)
|
|
1504
1504
|
s[r] = r - n[i] << 5 | i;
|
|
1505
1505
|
return { b: n, r: s };
|
|
1506
|
-
},
|
|
1506
|
+
}, Vi = Gi(_t, 2), Bs = Vi.b, bt = Vi.r;
|
|
1507
1507
|
Bs[28] = 258, bt[258] = 28;
|
|
1508
|
-
var js =
|
|
1509
|
-
for (var
|
|
1510
|
-
var Ce = (
|
|
1511
|
-
Ce = (Ce & 52428) >> 2 | (Ce & 13107) << 2, Ce = (Ce & 61680) >> 4 | (Ce & 3855) << 4, yt[
|
|
1508
|
+
var js = Gi(Nt, 0), mn = js.r, yt = new re(32768);
|
|
1509
|
+
for (var X = 0; X < 32768; ++X) {
|
|
1510
|
+
var Ce = (X & 43690) >> 1 | (X & 21845) << 1;
|
|
1511
|
+
Ce = (Ce & 52428) >> 2 | (Ce & 13107) << 2, Ce = (Ce & 61680) >> 4 | (Ce & 3855) << 4, yt[X] = ((Ce & 65280) >> 8 | (Ce & 255) << 8) >> 1;
|
|
1512
1512
|
}
|
|
1513
1513
|
var We = function(t, e, n) {
|
|
1514
1514
|
for (var i = t.length, s = 0, r = new re(e); s < i; ++s)
|
|
@@ -1529,20 +1529,20 @@ var We = function(t, e, n) {
|
|
|
1529
1529
|
t[s] && (l[s] = yt[o[t[s] - 1]++] >> 15 - t[s]);
|
|
1530
1530
|
return l;
|
|
1531
1531
|
}, Oe = new fe(288);
|
|
1532
|
-
for (var
|
|
1533
|
-
Oe[
|
|
1534
|
-
for (var
|
|
1535
|
-
Oe[
|
|
1536
|
-
for (var
|
|
1537
|
-
Oe[
|
|
1538
|
-
for (var
|
|
1539
|
-
Oe[
|
|
1532
|
+
for (var X = 0; X < 144; ++X)
|
|
1533
|
+
Oe[X] = 8;
|
|
1534
|
+
for (var X = 144; X < 256; ++X)
|
|
1535
|
+
Oe[X] = 9;
|
|
1536
|
+
for (var X = 256; X < 280; ++X)
|
|
1537
|
+
Oe[X] = 7;
|
|
1538
|
+
for (var X = 280; X < 288; ++X)
|
|
1539
|
+
Oe[X] = 8;
|
|
1540
1540
|
var nt = new fe(32);
|
|
1541
|
-
for (var
|
|
1542
|
-
nt[
|
|
1543
|
-
var
|
|
1541
|
+
for (var X = 0; X < 32; ++X)
|
|
1542
|
+
nt[X] = 5;
|
|
1543
|
+
var Ki = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = function(t) {
|
|
1544
1544
|
return (t + 7) / 8 | 0;
|
|
1545
|
-
},
|
|
1545
|
+
}, Xi = function(t, e, n) {
|
|
1546
1546
|
return (e == null || e < 0) && (e = 0), (n == null || n > t.length) && (n = t.length), new fe(t.subarray(e, n));
|
|
1547
1547
|
}, zs = [
|
|
1548
1548
|
"unexpected EOF",
|
|
@@ -1560,9 +1560,9 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
|
|
|
1560
1560
|
"stream finishing",
|
|
1561
1561
|
"invalid zip data"
|
|
1562
1562
|
// determined by unknown compression method
|
|
1563
|
-
],
|
|
1563
|
+
], Yi = function(t, e, n) {
|
|
1564
1564
|
var i = new Error(e || zs[t]);
|
|
1565
|
-
if (i.code = t, Error.captureStackTrace && Error.captureStackTrace(i,
|
|
1565
|
+
if (i.code = t, Error.captureStackTrace && Error.captureStackTrace(i, Yi), !n)
|
|
1566
1566
|
throw i;
|
|
1567
1567
|
return i;
|
|
1568
1568
|
}, ve = function(t, e, n) {
|
|
@@ -1655,15 +1655,15 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
|
|
|
1655
1655
|
++L[B[I] & 31];
|
|
1656
1656
|
for (var I = 0; I < N.length; ++I)
|
|
1657
1657
|
++L[N[I] & 31];
|
|
1658
|
-
for (var E = ht(L, 7), P = E.t,
|
|
1658
|
+
for (var E = ht(L, 7), P = E.t, G = E.l, j = 19; j > 4 && !P[gn[j - 1]]; --j)
|
|
1659
1659
|
;
|
|
1660
|
-
var
|
|
1661
|
-
if (a >= 0 &&
|
|
1660
|
+
var $ = d + 5 << 3, C = He(s, Oe) + He(r, nt) + o, M = He(s, p) + He(r, v) + o + 14 + 3 * j + He(L, P) + 2 * L[16] + 3 * L[17] + 7 * L[18];
|
|
1661
|
+
if (a >= 0 && $ <= C && $ <= M)
|
|
1662
1662
|
return Dn(e, c, t.subarray(a, a + d));
|
|
1663
|
-
var
|
|
1664
|
-
if (ve(e, c, 1 + (
|
|
1665
|
-
|
|
1666
|
-
var f = We(P,
|
|
1663
|
+
var W, V, U, b;
|
|
1664
|
+
if (ve(e, c, 1 + (M < C)), c += 2, M < C) {
|
|
1665
|
+
W = We(p, y, 0), V = p, U = We(v, T, 0), b = v;
|
|
1666
|
+
var f = We(P, G, 0);
|
|
1667
1667
|
ve(e, c, D - 257), ve(e, c + 5, O - 1), ve(e, c + 10, j - 4), c += 14;
|
|
1668
1668
|
for (var I = 0; I < j; ++I)
|
|
1669
1669
|
ve(e, c + 3 * I, P[gn[I]]);
|
|
@@ -1674,63 +1674,63 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
|
|
|
1674
1674
|
ve(e, c, f[w]), c += P[w], w > 15 && (ve(e, c, g[I] >> 5 & 127), c += g[I] >> 12);
|
|
1675
1675
|
}
|
|
1676
1676
|
} else
|
|
1677
|
-
|
|
1677
|
+
W = Ki, V = Oe, U = Ji, b = nt;
|
|
1678
1678
|
for (var I = 0; I < l; ++I) {
|
|
1679
1679
|
var x = i[I];
|
|
1680
1680
|
if (x > 255) {
|
|
1681
1681
|
var w = x >> 18 & 31;
|
|
1682
|
-
Ue(e, c,
|
|
1682
|
+
Ue(e, c, W[w + 257]), c += V[w + 257], w > 7 && (ve(e, c, x >> 23 & 31), c += _t[w]);
|
|
1683
1683
|
var R = x & 31;
|
|
1684
1684
|
Ue(e, c, U[R]), c += b[R], R > 3 && (Ue(e, c, x >> 5 & 8191), c += Nt[R]);
|
|
1685
1685
|
} else
|
|
1686
|
-
Ue(e, c,
|
|
1686
|
+
Ue(e, c, W[x]), c += V[x];
|
|
1687
1687
|
}
|
|
1688
|
-
return Ue(e, c,
|
|
1689
|
-
},
|
|
1688
|
+
return Ue(e, c, W[256]), c + V[256];
|
|
1689
|
+
}, Qi = /* @__PURE__ */ new Ct([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Ln = /* @__PURE__ */ new fe(0), Zi = function(t, e, n, i, s, r) {
|
|
1690
1690
|
var o = r.z || t.length, l = new fe(i + o + 5 * (1 + Math.ceil(o / 7e3)) + s), a = l.subarray(i, l.length - s), d = r.l, c = (r.r || 0) & 7;
|
|
1691
1691
|
if (e) {
|
|
1692
1692
|
c && (a[0] = r.r >> 3);
|
|
1693
|
-
for (var u =
|
|
1693
|
+
for (var u = Qi[e - 1], p = u >> 13, y = u & 8191, S = (1 << n) - 1, v = r.p || new re(32768), T = r.h || new re(S + 1), A = Math.ceil(n / 3), B = 2 * A, D = function(ne) {
|
|
1694
1694
|
return (t[ne] ^ t[ne + 1] << A ^ t[ne + 2] << B) & S;
|
|
1695
|
-
}, k = new Ct(25e3), N = new re(288), O = new re(32), L = 0, I = 0, E = r.i || 0, P = 0,
|
|
1696
|
-
var
|
|
1697
|
-
if (v[C] =
|
|
1698
|
-
var
|
|
1699
|
-
if ((L > 7e3 || P > 24576) && (
|
|
1695
|
+
}, k = new Ct(25e3), N = new re(288), O = new re(32), L = 0, I = 0, E = r.i || 0, P = 0, G = r.w || 0, j = 0; E + 2 < o; ++E) {
|
|
1696
|
+
var $ = D(E), C = E & 32767, M = T[$];
|
|
1697
|
+
if (v[C] = M, T[$] = C, G <= E) {
|
|
1698
|
+
var W = o - E;
|
|
1699
|
+
if ((L > 7e3 || P > 24576) && (W > 423 || !d)) {
|
|
1700
1700
|
c = yn(t, a, 0, k, N, O, I, P, j, E - j, c), P = L = I = 0, j = E;
|
|
1701
|
-
for (var
|
|
1702
|
-
N[
|
|
1703
|
-
for (var
|
|
1704
|
-
O[
|
|
1701
|
+
for (var V = 0; V < 286; ++V)
|
|
1702
|
+
N[V] = 0;
|
|
1703
|
+
for (var V = 0; V < 30; ++V)
|
|
1704
|
+
O[V] = 0;
|
|
1705
1705
|
}
|
|
1706
|
-
var U = 2, b = 0, f = y, h = C -
|
|
1707
|
-
if (
|
|
1708
|
-
for (var m = Math.min(p,
|
|
1706
|
+
var U = 2, b = 0, f = y, h = C - M & 32767;
|
|
1707
|
+
if (W > 2 && $ == D(E - h))
|
|
1708
|
+
for (var m = Math.min(p, W) - 1, g = Math.min(32767, E), w = Math.min(258, W); h <= g && --f && C != M; ) {
|
|
1709
1709
|
if (t[E + U] == t[E + U - h]) {
|
|
1710
1710
|
for (var x = 0; x < w && t[E + x] == t[E + x - h]; ++x)
|
|
1711
1711
|
;
|
|
1712
1712
|
if (x > U) {
|
|
1713
1713
|
if (U = x, b = h, x > m)
|
|
1714
1714
|
break;
|
|
1715
|
-
for (var R = Math.min(h, x - 2),
|
|
1716
|
-
var H = E - h +
|
|
1717
|
-
|
|
1715
|
+
for (var R = Math.min(h, x - 2), F = 0, V = 0; V < R; ++V) {
|
|
1716
|
+
var H = E - h + V & 32767, _ = v[H], q = H - _ & 32767;
|
|
1717
|
+
q > F && (F = q, M = H);
|
|
1718
1718
|
}
|
|
1719
1719
|
}
|
|
1720
1720
|
}
|
|
1721
|
-
C =
|
|
1721
|
+
C = M, M = v[C], h += C - M & 32767;
|
|
1722
1722
|
}
|
|
1723
1723
|
if (b) {
|
|
1724
1724
|
k[P++] = 268435456 | bt[U] << 18 | mn[b];
|
|
1725
1725
|
var ee = bt[U] & 31, ae = mn[b] & 31;
|
|
1726
|
-
I += _t[ee] + Nt[ae], ++N[257 + ee], ++O[ae],
|
|
1726
|
+
I += _t[ee] + Nt[ae], ++N[257 + ee], ++O[ae], G = E + U, ++L;
|
|
1727
1727
|
} else
|
|
1728
1728
|
k[P++] = t[E], ++N[t[E]];
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
|
-
for (E = Math.max(E,
|
|
1731
|
+
for (E = Math.max(E, G); E < o; ++E)
|
|
1732
1732
|
k[P++] = t[E], ++N[t[E]];
|
|
1733
|
-
c = yn(t, a, d, k, N, O, I, P, j, E - j, c), d || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = T, r.p = v, r.i = E, r.w =
|
|
1733
|
+
c = yn(t, a, d, k, N, O, I, P, j, E - j, c), d || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = T, r.p = v, r.i = E, r.w = G);
|
|
1734
1734
|
} else {
|
|
1735
1735
|
for (var E = r.w || 0; E < o + d; E += 65535) {
|
|
1736
1736
|
var te = E + 65535;
|
|
@@ -1738,32 +1738,32 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
|
|
|
1738
1738
|
}
|
|
1739
1739
|
r.i = o;
|
|
1740
1740
|
}
|
|
1741
|
-
return
|
|
1742
|
-
},
|
|
1741
|
+
return Xi(l, 0, i + An(c) + s);
|
|
1742
|
+
}, es = /* @__PURE__ */ function() {
|
|
1743
1743
|
for (var t = new Int32Array(256), e = 0; e < 256; ++e) {
|
|
1744
1744
|
for (var n = e, i = 9; --i; )
|
|
1745
1745
|
n = (n & 1 && -306674912) ^ n >>> 1;
|
|
1746
1746
|
t[e] = n;
|
|
1747
1747
|
}
|
|
1748
1748
|
return t;
|
|
1749
|
-
}(),
|
|
1749
|
+
}(), ts = function() {
|
|
1750
1750
|
var t = -1;
|
|
1751
1751
|
return {
|
|
1752
1752
|
p: function(e) {
|
|
1753
1753
|
for (var n = t, i = 0; i < e.length; ++i)
|
|
1754
|
-
n =
|
|
1754
|
+
n = es[n & 255 ^ e[i]] ^ n >>> 8;
|
|
1755
1755
|
t = n;
|
|
1756
1756
|
},
|
|
1757
1757
|
d: function() {
|
|
1758
1758
|
return ~t;
|
|
1759
1759
|
}
|
|
1760
1760
|
};
|
|
1761
|
-
},
|
|
1761
|
+
}, Mn = function(t, e, n, i, s) {
|
|
1762
1762
|
if (!s && (s = { l: 1 }, e.dictionary)) {
|
|
1763
1763
|
var r = e.dictionary.subarray(-32768), o = new fe(r.length + t.length);
|
|
1764
1764
|
o.set(r), o.set(t, r.length), t = o, s.w = r.length;
|
|
1765
1765
|
}
|
|
1766
|
-
return
|
|
1766
|
+
return Zi(t, e.level == null ? 6 : e.level, e.mem == null ? s.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, n, i, s);
|
|
1767
1767
|
}, Us = function(t, e) {
|
|
1768
1768
|
var n = {};
|
|
1769
1769
|
for (var i in t)
|
|
@@ -1771,7 +1771,7 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
|
|
|
1771
1771
|
for (var i in e)
|
|
1772
1772
|
n[i] = e[i];
|
|
1773
1773
|
return n;
|
|
1774
|
-
},
|
|
1774
|
+
}, Qn = function(t, e, n) {
|
|
1775
1775
|
for (var i = t(), s = t.toString(), r = s.slice(s.indexOf("[") + 1, s.lastIndexOf("]")).replace(/\s+/g, "").split(","), o = 0; o < i.length; ++o) {
|
|
1776
1776
|
var l = i[o], a = r[o];
|
|
1777
1777
|
if (typeof l == "function") {
|
|
@@ -1800,16 +1800,16 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
|
|
|
1800
1800
|
}, $s = function(t, e, n, i) {
|
|
1801
1801
|
if (!st[n]) {
|
|
1802
1802
|
for (var s = "", r = {}, o = t.length - 1, l = 0; l < o; ++l)
|
|
1803
|
-
s =
|
|
1804
|
-
st[n] = { c:
|
|
1803
|
+
s = Qn(t[l], s, r);
|
|
1804
|
+
st[n] = { c: Qn(t[o], s, r), e: r };
|
|
1805
1805
|
}
|
|
1806
1806
|
var a = Us({}, st[n].e);
|
|
1807
1807
|
return Ps(st[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n, a, Hs(a), i);
|
|
1808
1808
|
}, qs = function() {
|
|
1809
|
-
return [fe, re, Ct, _t, Nt, gn, bt, mn,
|
|
1809
|
+
return [fe, re, Ct, _t, Nt, gn, bt, mn, Ki, Oe, Ji, nt, yt, Qi, Ln, We, ve, Ue, ht, vt, bn, He, Dn, yn, An, Xi, Zi, Mn, Vs, ns];
|
|
1810
1810
|
}, Ws = function() {
|
|
1811
|
-
return [
|
|
1812
|
-
},
|
|
1811
|
+
return [is, ss, wt, ts, es];
|
|
1812
|
+
}, ns = function(t) {
|
|
1813
1813
|
return postMessage(t, [t.buffer]);
|
|
1814
1814
|
}, Gs = function(t, e, n, i, s, r) {
|
|
1815
1815
|
var o = $s(n, i, s, function(l, a) {
|
|
@@ -1821,43 +1821,43 @@ var Xi = /* @__PURE__ */ We(Oe, 9, 0), Ji = /* @__PURE__ */ We(nt, 5, 0), An = f
|
|
|
1821
1821
|
}, wt = function(t, e, n) {
|
|
1822
1822
|
for (; n; ++e)
|
|
1823
1823
|
t[e] = n, n >>>= 8;
|
|
1824
|
-
},
|
|
1824
|
+
}, is = function(t, e) {
|
|
1825
1825
|
var n = e.filename;
|
|
1826
1826
|
if (t[0] = 31, t[1] = 139, t[2] = 8, t[8] = e.level < 2 ? 4 : e.level == 9 ? 2 : 0, t[9] = 3, e.mtime != 0 && wt(t, 4, Math.floor(new Date(e.mtime || Date.now()) / 1e3)), n) {
|
|
1827
1827
|
t[3] = 8;
|
|
1828
1828
|
for (var i = 0; i <= n.length; ++i)
|
|
1829
1829
|
t[i + 10] = n.charCodeAt(i);
|
|
1830
1830
|
}
|
|
1831
|
-
},
|
|
1831
|
+
}, ss = function(t) {
|
|
1832
1832
|
return 10 + (t.filename ? t.filename.length + 1 : 0);
|
|
1833
1833
|
};
|
|
1834
1834
|
function Vs(t, e) {
|
|
1835
|
-
return
|
|
1835
|
+
return Mn(t, e || {}, 0, 0);
|
|
1836
1836
|
}
|
|
1837
1837
|
function Ks(t, e, n) {
|
|
1838
|
-
return n || (n = e, e = {}), typeof n != "function" &&
|
|
1838
|
+
return n || (n = e, e = {}), typeof n != "function" && Yi(7), Gs(t, e, [
|
|
1839
1839
|
qs,
|
|
1840
1840
|
Ws,
|
|
1841
1841
|
function() {
|
|
1842
|
-
return [
|
|
1842
|
+
return [Zn];
|
|
1843
1843
|
}
|
|
1844
1844
|
], function(i) {
|
|
1845
|
-
return
|
|
1845
|
+
return ns(Zn(i.data[0], i.data[1]));
|
|
1846
1846
|
}, 2, n);
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function Zn(t, e) {
|
|
1849
1849
|
e || (e = {});
|
|
1850
|
-
var n =
|
|
1850
|
+
var n = ts(), i = t.length;
|
|
1851
1851
|
n.p(t);
|
|
1852
|
-
var s =
|
|
1853
|
-
return
|
|
1852
|
+
var s = Mn(t, e, ss(e), 8), r = s.length;
|
|
1853
|
+
return is(s, e), wt(s, r - 8, n.d()), wt(s, r - 4, i), s;
|
|
1854
1854
|
}
|
|
1855
|
-
var
|
|
1855
|
+
var Js = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Xs = 0;
|
|
1856
1856
|
try {
|
|
1857
|
-
|
|
1857
|
+
Js.decode(Ln, { stream: !0 }), Xs = 1;
|
|
1858
1858
|
} catch {
|
|
1859
1859
|
}
|
|
1860
|
-
class
|
|
1860
|
+
class ei {
|
|
1861
1861
|
constructor() {
|
|
1862
1862
|
this.idx = 1, this.backDict = {};
|
|
1863
1863
|
}
|
|
@@ -1868,7 +1868,7 @@ class ti {
|
|
|
1868
1868
|
}
|
|
1869
1869
|
class Ys {
|
|
1870
1870
|
constructor(e, n) {
|
|
1871
|
-
this.app = e, this.isDictDisabled = n, this.dict = new
|
|
1871
|
+
this.app = e, this.isDictDisabled = n, this.dict = new ei();
|
|
1872
1872
|
}
|
|
1873
1873
|
sendSetAttribute(e, n, i) {
|
|
1874
1874
|
if (this.isDictDisabled) {
|
|
@@ -1889,7 +1889,7 @@ class Ys {
|
|
|
1889
1889
|
return i && this.app.send([50, n, e]), n;
|
|
1890
1890
|
}
|
|
1891
1891
|
clear() {
|
|
1892
|
-
this.dict = new
|
|
1892
|
+
this.dict = new ei();
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
class Qs {
|
|
@@ -2218,24 +2218,24 @@ class er {
|
|
|
2218
2218
|
return e.filter((r) => s.findIndex((o) => o.key === r.key) === -1);
|
|
2219
2219
|
}
|
|
2220
2220
|
}
|
|
2221
|
-
const
|
|
2222
|
-
let
|
|
2221
|
+
const ti = { htmlmasked: "hidden", masked: "obscured" }, xe = !(typeof window > "u"), tr = xe && navigator.userAgent.match(/firefox|fxios/i), nr = 1e5;
|
|
2222
|
+
let Fn = xe ? Date.now() - performance.now() : 0;
|
|
2223
2223
|
function en() {
|
|
2224
|
-
|
|
2224
|
+
Fn = Date.now() - performance.now();
|
|
2225
2225
|
}
|
|
2226
2226
|
function Ve() {
|
|
2227
|
-
return
|
|
2227
|
+
return Fn;
|
|
2228
2228
|
}
|
|
2229
|
-
const ge = xe && performance.now ? () => Math.round(performance.now() +
|
|
2230
|
-
function
|
|
2229
|
+
const ge = xe && performance.now ? () => Math.round(performance.now() + Fn) : () => Date.now(), tn = "repeat" in String.prototype ? (t) => "*".repeat(t.length) : (t) => t.replace(/./g, "*");
|
|
2230
|
+
function rs(t) {
|
|
2231
2231
|
return t.trim().replace(/\s+/g, " ");
|
|
2232
2232
|
}
|
|
2233
|
-
function
|
|
2233
|
+
function os(t) {
|
|
2234
2234
|
return t.startsWith("https://") || t.startsWith("http://");
|
|
2235
2235
|
}
|
|
2236
|
-
const St = "https://docs.openreplay.com",
|
|
2236
|
+
const St = "https://docs.openreplay.com", ni = {};
|
|
2237
2237
|
function Ne(t, e, n = "/") {
|
|
2238
|
-
|
|
2238
|
+
ni[t] || (console.warn(`OpenReplay: ${t} is deprecated. ${e ? `Please, use ${e} instead.` : ""} Visit ${St}${n} for more information.`), ni[t] = !0);
|
|
2239
2239
|
}
|
|
2240
2240
|
function Pn(t) {
|
|
2241
2241
|
let e = t.getAttribute("data-openreplay-label");
|
|
@@ -2243,10 +2243,10 @@ function Pn(t) {
|
|
|
2243
2243
|
}
|
|
2244
2244
|
function Le(t, e) {
|
|
2245
2245
|
const n = `data-openreplay-${e}`;
|
|
2246
|
-
return t.hasAttribute(n) ? (
|
|
2246
|
+
return t.hasAttribute(n) ? (ti[e] && Ne(
|
|
2247
2247
|
`"${n}" attribute`,
|
|
2248
2248
|
// @ts-ignore
|
|
2249
|
-
`"${
|
|
2249
|
+
`"${ti[e]}" attribute`,
|
|
2250
2250
|
"/installation/sanitize-data"
|
|
2251
2251
|
), !0) : !1;
|
|
2252
2252
|
}
|
|
@@ -2257,12 +2257,12 @@ function ir(t) {
|
|
|
2257
2257
|
return !1;
|
|
2258
2258
|
}
|
|
2259
2259
|
}
|
|
2260
|
-
function
|
|
2260
|
+
function ii(t) {
|
|
2261
2261
|
return t.toString(16).padStart(2, "0");
|
|
2262
2262
|
}
|
|
2263
2263
|
function sr(t) {
|
|
2264
2264
|
const e = new Uint8Array((t || 40) / 2), n = window.crypto || window.msCrypto;
|
|
2265
|
-
return n ? (n.getRandomValues(e), Array.from(e,
|
|
2265
|
+
return n ? (n.getRandomValues(e), Array.from(e, ii).join("")) : Array.from({ length: t || 40 }, () => ii(Math.floor(Math.random() * 16))).join("");
|
|
2266
2266
|
}
|
|
2267
2267
|
function rr() {
|
|
2268
2268
|
try {
|
|
@@ -2277,11 +2277,11 @@ function Bn(t) {
|
|
|
2277
2277
|
window.Zone.__symbol__(t)
|
|
2278
2278
|
) : t;
|
|
2279
2279
|
}
|
|
2280
|
-
function
|
|
2280
|
+
function as(t) {
|
|
2281
2281
|
const e = Bn("MutationObserver");
|
|
2282
2282
|
return new window[e](t);
|
|
2283
2283
|
}
|
|
2284
|
-
function
|
|
2284
|
+
function cs(t, e, n, i) {
|
|
2285
2285
|
const s = Bn("addEventListener");
|
|
2286
2286
|
try {
|
|
2287
2287
|
t[s](e, n, i);
|
|
@@ -2293,7 +2293,7 @@ function ls(t, e, n, i) {
|
|
|
2293
2293
|
);
|
|
2294
2294
|
}
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2296
|
+
function ls(t, e, n, i) {
|
|
2297
2297
|
const s = Bn("removeEventListener");
|
|
2298
2298
|
try {
|
|
2299
2299
|
t[s](e, n, i);
|
|
@@ -2335,12 +2335,12 @@ const ar = new or();
|
|
|
2335
2335
|
function cr(t) {
|
|
2336
2336
|
ar.addTask(t);
|
|
2337
2337
|
}
|
|
2338
|
-
function
|
|
2338
|
+
function ds(t, e) {
|
|
2339
2339
|
const n = { ...t };
|
|
2340
2340
|
for (const i in e)
|
|
2341
2341
|
if (e.hasOwnProperty(i)) {
|
|
2342
2342
|
const s = e[i], r = t[i];
|
|
2343
|
-
typeof s == "object" && !Array.isArray(s) && s !== null ? n[i] =
|
|
2343
|
+
typeof s == "object" && !Array.isArray(s) && s !== null ? n[i] = ds(r || {}, s) : n[i] = s;
|
|
2344
2344
|
}
|
|
2345
2345
|
return n;
|
|
2346
2346
|
}
|
|
@@ -2401,7 +2401,7 @@ function gr(t) {
|
|
|
2401
2401
|
t
|
|
2402
2402
|
];
|
|
2403
2403
|
}
|
|
2404
|
-
function
|
|
2404
|
+
function si(t, e) {
|
|
2405
2405
|
return [
|
|
2406
2406
|
13,
|
|
2407
2407
|
t,
|
|
@@ -2493,7 +2493,7 @@ function Ir(t) {
|
|
|
2493
2493
|
t
|
|
2494
2494
|
];
|
|
2495
2495
|
}
|
|
2496
|
-
function
|
|
2496
|
+
function ri(t, e) {
|
|
2497
2497
|
return [
|
|
2498
2498
|
30,
|
|
2499
2499
|
t,
|
|
@@ -2522,7 +2522,7 @@ function Nr(t) {
|
|
|
2522
2522
|
t
|
|
2523
2523
|
];
|
|
2524
2524
|
}
|
|
2525
|
-
function
|
|
2525
|
+
function oi(t, e, n, i) {
|
|
2526
2526
|
return [
|
|
2527
2527
|
57,
|
|
2528
2528
|
t,
|
|
@@ -2531,7 +2531,7 @@ function ai(t, e, n, i) {
|
|
|
2531
2531
|
i
|
|
2532
2532
|
];
|
|
2533
2533
|
}
|
|
2534
|
-
function
|
|
2534
|
+
function ai(t) {
|
|
2535
2535
|
return [
|
|
2536
2536
|
58,
|
|
2537
2537
|
t
|
|
@@ -2586,7 +2586,7 @@ function wn(t, e) {
|
|
|
2586
2586
|
e
|
|
2587
2587
|
];
|
|
2588
2588
|
}
|
|
2589
|
-
function
|
|
2589
|
+
function ci(t, e, n) {
|
|
2590
2590
|
return [
|
|
2591
2591
|
71,
|
|
2592
2592
|
t,
|
|
@@ -2603,14 +2603,14 @@ function Sn(t, e, n, i) {
|
|
|
2603
2603
|
i
|
|
2604
2604
|
];
|
|
2605
2605
|
}
|
|
2606
|
-
function
|
|
2606
|
+
function li(t, e) {
|
|
2607
2607
|
return [
|
|
2608
2608
|
75,
|
|
2609
2609
|
t,
|
|
2610
2610
|
e
|
|
2611
2611
|
];
|
|
2612
2612
|
}
|
|
2613
|
-
function
|
|
2613
|
+
function hs(t, e) {
|
|
2614
2614
|
return [
|
|
2615
2615
|
76,
|
|
2616
2616
|
t,
|
|
@@ -2647,7 +2647,7 @@ function xt(t, e, n, i, s, r, o, l, a) {
|
|
|
2647
2647
|
a
|
|
2648
2648
|
];
|
|
2649
2649
|
}
|
|
2650
|
-
function
|
|
2650
|
+
function Mr(t, e, n, i, s, r) {
|
|
2651
2651
|
return [
|
|
2652
2652
|
84,
|
|
2653
2653
|
t,
|
|
@@ -2658,7 +2658,7 @@ function Fr(t, e, n, i, s, r) {
|
|
|
2658
2658
|
r
|
|
2659
2659
|
];
|
|
2660
2660
|
}
|
|
2661
|
-
function
|
|
2661
|
+
function Fr(t, e, n, i, s, r) {
|
|
2662
2662
|
return [
|
|
2663
2663
|
112,
|
|
2664
2664
|
t,
|
|
@@ -2669,7 +2669,7 @@ function Mr(t, e, n, i, s, r) {
|
|
|
2669
2669
|
r
|
|
2670
2670
|
];
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2672
|
+
function di(t, e, n) {
|
|
2673
2673
|
return [
|
|
2674
2674
|
113,
|
|
2675
2675
|
t,
|
|
@@ -2689,7 +2689,7 @@ function Br(t) {
|
|
|
2689
2689
|
t
|
|
2690
2690
|
];
|
|
2691
2691
|
}
|
|
2692
|
-
function
|
|
2692
|
+
function us(t, e, n, i, s, r, o, l, a, d) {
|
|
2693
2693
|
return [
|
|
2694
2694
|
116,
|
|
2695
2695
|
t,
|
|
@@ -2760,11 +2760,11 @@ function Hr(t, e) {
|
|
|
2760
2760
|
s = i = void 0;
|
|
2761
2761
|
}), t.ticker.attach(o, 40, !1), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", o, !1, !1);
|
|
2762
2762
|
}
|
|
2763
|
-
const
|
|
2763
|
+
const hi = "__or__watched_tags__";
|
|
2764
2764
|
class $r {
|
|
2765
2765
|
constructor(e, n, i) {
|
|
2766
2766
|
this.sessionStorage = e, this.errLog = n, this.onTag = i, this.intervals = {}, this.tags = [];
|
|
2767
|
-
const s = JSON.parse(e.getItem(
|
|
2767
|
+
const s = JSON.parse(e.getItem(hi) ?? "[]");
|
|
2768
2768
|
this.setTags(s), this.observer = new IntersectionObserver((r) => {
|
|
2769
2769
|
r.forEach((o) => {
|
|
2770
2770
|
if (o.isIntersecting && o.target) {
|
|
@@ -2784,7 +2784,7 @@ class $r {
|
|
|
2784
2784
|
if (i && i.length) {
|
|
2785
2785
|
this.setTags(i);
|
|
2786
2786
|
const s = JSON.stringify(i);
|
|
2787
|
-
this.sessionStorage.setItem(
|
|
2787
|
+
this.sessionStorage.setItem(hi, s || "");
|
|
2788
2788
|
}
|
|
2789
2789
|
}).catch((i) => this.errLog(i));
|
|
2790
2790
|
}
|
|
@@ -2877,7 +2877,7 @@ const qr = {
|
|
|
2877
2877
|
fontWeight: "500",
|
|
2878
2878
|
lineHeight: "1.5rem",
|
|
2879
2879
|
cursor: "pointer"
|
|
2880
|
-
},
|
|
2880
|
+
}, ui = {
|
|
2881
2881
|
fontFamily: "Verdana, sans-serif",
|
|
2882
2882
|
fontSize: "13px",
|
|
2883
2883
|
fontWeight: "500",
|
|
@@ -2893,7 +2893,7 @@ const qr = {
|
|
|
2893
2893
|
gap: "0.625rem",
|
|
2894
2894
|
fontSize: "13px",
|
|
2895
2895
|
lineHeight: "auto"
|
|
2896
|
-
},
|
|
2896
|
+
}, Jr = {
|
|
2897
2897
|
padding: "0.5rem",
|
|
2898
2898
|
gap: "0.5rem",
|
|
2899
2899
|
fontFamily: "Verdana, sans-serif",
|
|
@@ -2922,18 +2922,18 @@ const qr = {
|
|
|
2922
2922
|
fontStyle: "normal",
|
|
2923
2923
|
fontWeight: "400"
|
|
2924
2924
|
// lineHeight: '1.375rem',
|
|
2925
|
-
},
|
|
2925
|
+
}, Xr = {
|
|
2926
2926
|
...$e,
|
|
2927
2927
|
display: "flex",
|
|
2928
2928
|
flexDirection: "column",
|
|
2929
2929
|
alignItems: "center",
|
|
2930
2930
|
gap: "0.625rem"
|
|
2931
|
-
},
|
|
2931
|
+
}, fi = {
|
|
2932
2932
|
fontSize: "1.25rem",
|
|
2933
2933
|
fontWeight: "500",
|
|
2934
2934
|
cursor: "pointer",
|
|
2935
2935
|
color: "#394EFF"
|
|
2936
|
-
},
|
|
2936
|
+
}, pi = {
|
|
2937
2937
|
display: "flex",
|
|
2938
2938
|
padding: "0.4rem 0.9375rem",
|
|
2939
2939
|
justifyContent: "center",
|
|
@@ -2953,7 +2953,7 @@ const qr = {
|
|
|
2953
2953
|
width: "100%",
|
|
2954
2954
|
boxSizing: "border-box",
|
|
2955
2955
|
cursor: "pointer"
|
|
2956
|
-
},
|
|
2956
|
+
}, gi = {
|
|
2957
2957
|
marginTop: "1rem",
|
|
2958
2958
|
marginBottom: "1rem",
|
|
2959
2959
|
cursor: "pointer",
|
|
@@ -2969,7 +2969,7 @@ const qr = {
|
|
|
2969
2969
|
padding: "0.5rem",
|
|
2970
2970
|
width: "100%",
|
|
2971
2971
|
boxSizing: "border-box"
|
|
2972
|
-
},
|
|
2972
|
+
}, mi = {
|
|
2973
2973
|
display: "flex",
|
|
2974
2974
|
flexDirection: "column",
|
|
2975
2975
|
alignItems: "center",
|
|
@@ -2991,7 +2991,7 @@ const qr = {
|
|
|
2991
2991
|
fontSize: "13px",
|
|
2992
2992
|
height: "24px",
|
|
2993
2993
|
width: "24px"
|
|
2994
|
-
},
|
|
2994
|
+
}, bi = {
|
|
2995
2995
|
borderRadius: "0.375rem",
|
|
2996
2996
|
border: "1px solid rgba(0, 0, 0, 0.06)",
|
|
2997
2997
|
background: "#F5F7FF",
|
|
@@ -3001,12 +3001,12 @@ const qr = {
|
|
|
3001
3001
|
padding: "0.625rem 0.9375rem",
|
|
3002
3002
|
gap: "0.5rem",
|
|
3003
3003
|
alignSelf: "stretch"
|
|
3004
|
-
},
|
|
3004
|
+
}, yi = {
|
|
3005
3005
|
fontWeight: "bold"
|
|
3006
3006
|
}, Zr = {
|
|
3007
3007
|
fontSize: "13px",
|
|
3008
3008
|
lineHeight: "auto"
|
|
3009
|
-
},
|
|
3009
|
+
}, fs = {
|
|
3010
3010
|
marginRight: "0.5rem",
|
|
3011
3011
|
cursor: "pointer",
|
|
3012
3012
|
color: "#394EFF",
|
|
@@ -3017,7 +3017,7 @@ const qr = {
|
|
|
3017
3017
|
fontWeight: "500",
|
|
3018
3018
|
lineHeight: "auto"
|
|
3019
3019
|
}, eo = {
|
|
3020
|
-
...
|
|
3020
|
+
...fs,
|
|
3021
3021
|
display: "flex",
|
|
3022
3022
|
padding: "0.25rem 0.9375rem",
|
|
3023
3023
|
justifyContent: "center",
|
|
@@ -3038,7 +3038,7 @@ const qr = {
|
|
|
3038
3038
|
borderRadius: "50%",
|
|
3039
3039
|
borderLeftColor: "#fff",
|
|
3040
3040
|
animation: "spin 0.5s linear infinite"
|
|
3041
|
-
},
|
|
3041
|
+
}, vi = {
|
|
3042
3042
|
Standard: { width: 1280, height: 720 },
|
|
3043
3043
|
High: { width: 1920, height: 1080 }
|
|
3044
3044
|
};
|
|
@@ -3241,7 +3241,7 @@ class uo {
|
|
|
3241
3241
|
Authorization: `Bearer ${l}`
|
|
3242
3242
|
}
|
|
3243
3243
|
}).then((c) => c.json()).then(({ test: c }) => {
|
|
3244
|
-
this.isActive = !0, this.test = c, this.signalManager = new ho(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (u, p) => this.app.localStorage.setItem(u, p), (u) => this.app.localStorage.removeItem(u), (u) => this.app.localStorage.getItem(u), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30,
|
|
3244
|
+
this.isActive = !0, this.test = c, this.signalManager = new ho(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (u, p) => this.app.localStorage.setItem(u, p), (u) => this.app.localStorage.removeItem(u), (u) => this.app.localStorage.getItem(u), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, vi.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
|
|
3245
3245
|
}).then(() => o).catch((c) => {
|
|
3246
3246
|
console.log("OR: Error fetching test", c);
|
|
3247
3247
|
});
|
|
@@ -3260,7 +3260,7 @@ class uo {
|
|
|
3260
3260
|
|
|
3261
3261
|
📹 We're recording this browser tab to learn from your experience.
|
|
3262
3262
|
🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = z("div", "button", Kr, "Read guidelines to begin");
|
|
3263
|
-
this.removeGreeting = () => ((n || i) && this.userRecorder.startRecording(30,
|
|
3263
|
+
this.removeGreeting = () => ((n || i) && this.userRecorder.startRecording(30, vi.Standard, n, i), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(s), !1), o.onclick = () => {
|
|
3264
3264
|
var a, d, c, u;
|
|
3265
3265
|
this.removeGreeting();
|
|
3266
3266
|
const l = (a = this.signalManager) == null ? void 0 : a.getDurations();
|
|
@@ -3283,7 +3283,7 @@ class uo {
|
|
|
3283
3283
|
});
|
|
3284
3284
|
const s = this.createTitleSection();
|
|
3285
3285
|
this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, rt);
|
|
3286
|
-
const r = this.createDescriptionSection(e), o = this.createTasksSection(n), l = z("div", "stop_bn_or",
|
|
3286
|
+
const r = this.createDescriptionSection(e), o = this.createTasksSection(n), l = z("div", "stop_bn_or", gi, "Abort Session"), a = z("div", "stop_ct_or", { fontSize: "13px!important" });
|
|
3287
3287
|
a.style.fontSize = "13px", a.append(l), this.container.append(s, r, o, a), this.taskSection = o, this.descriptionSection = r, this.stopButton = l, this.stopButtonContainer = a, l.onclick = () => {
|
|
3288
3288
|
var d;
|
|
3289
3289
|
this.userRecorder.discard(), (d = this.signalManager) == null || d.signalTest("skipped"), document.body.removeChild(this.bg), window.close();
|
|
@@ -3291,7 +3291,7 @@ class uo {
|
|
|
3291
3291
|
}
|
|
3292
3292
|
createTitleSection() {
|
|
3293
3293
|
var l;
|
|
3294
|
-
const e = z("div", "title",
|
|
3294
|
+
const e = z("div", "title", Jr), n = ro(), i = z("div", "title_text", {
|
|
3295
3295
|
maxWidth: "19rem",
|
|
3296
3296
|
overflow: "hidden",
|
|
3297
3297
|
textOverflow: "ellipsis",
|
|
@@ -3301,7 +3301,7 @@ class uo {
|
|
|
3301
3301
|
cursor: "pointer"
|
|
3302
3302
|
}, (l = this.test) == null ? void 0 : l.title), s = oo();
|
|
3303
3303
|
e.append(n, i, s);
|
|
3304
|
-
const r = (a) => (this.widgetVisible = a, this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, this.widgetVisible ? rt : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? $e : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? $e : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? $e : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ?
|
|
3304
|
+
const r = (a) => (this.widgetVisible = a, this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, this.widgetVisible ? rt : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? $e : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? $e : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? $e : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ? gi : { display: "none" }), a), o = () => {
|
|
3305
3305
|
Object.assign(s.style, {
|
|
3306
3306
|
transform: this.widgetVisible ? "rotate(0deg)" : "rotate(180deg)"
|
|
3307
3307
|
}), r(!this.widgetVisible);
|
|
@@ -3309,11 +3309,11 @@ class uo {
|
|
|
3309
3309
|
return i.onclick = o, s.onclick = o, so(this.bg, n), this.collapseWidget = () => r(!1), e;
|
|
3310
3310
|
}
|
|
3311
3311
|
createDescriptionSection(e) {
|
|
3312
|
-
const n = z("div", "description_section_or", $e), i = z("div", "description_s_title_or",
|
|
3312
|
+
const n = z("div", "description_section_or", $e), i = z("div", "description_s_title_or", ui), s = z("div", "title", {
|
|
3313
3313
|
fontSize: 13,
|
|
3314
3314
|
fontWeight: 500,
|
|
3315
3315
|
lineHeight: "auto"
|
|
3316
|
-
}, "Introduction & Guidelines"), r = z("div", "icon",
|
|
3316
|
+
}, "Introduction & Guidelines"), r = z("div", "icon", fi, "-"), o = z("div", "content", je), l = z("div", "text_description", {
|
|
3317
3317
|
maxHeight: "250px",
|
|
3318
3318
|
overflowY: "auto",
|
|
3319
3319
|
whiteSpace: "pre-wrap",
|
|
@@ -3322,7 +3322,7 @@ class uo {
|
|
|
3322
3322
|
lineHeight: "auto"
|
|
3323
3323
|
});
|
|
3324
3324
|
l.innerHTML = e;
|
|
3325
|
-
const a = z("div", "button_begin_or",
|
|
3325
|
+
const a = z("div", "button_begin_or", pi, "Begin Test");
|
|
3326
3326
|
i.append(s, r), o.append(l, a), n.append(i, o);
|
|
3327
3327
|
const d = () => {
|
|
3328
3328
|
this.widgetGuidelinesVisible = !this.widgetGuidelinesVisible, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? je : { display: "none" });
|
|
@@ -3343,17 +3343,17 @@ class uo {
|
|
|
3343
3343
|
}
|
|
3344
3344
|
createTasksSection(e) {
|
|
3345
3345
|
this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, rt);
|
|
3346
|
-
const n = z("div", "task_section_or", $e), i = z("div", "description_t_title_or",
|
|
3346
|
+
const n = z("div", "task_section_or", $e), i = z("div", "description_t_title_or", ui), s = z("div", "title", {
|
|
3347
3347
|
fontSize: "13px",
|
|
3348
3348
|
fontWeight: "500",
|
|
3349
3349
|
lineHeight: "auto"
|
|
3350
|
-
}, "Tasks"), r = z("div", "icon",
|
|
3350
|
+
}, "Tasks"), r = z("div", "icon", fi, "-"), o = z("div", "content", je), l = z("div", "pagination", Yr), a = z("div", "taskCard", bi), d = z("div", "taskText", yi), c = z("div", "taskDescription", Zr), u = z("div", "taskButtons", to), p = z("div", "taskText", yi);
|
|
3351
3351
|
p.textContent = "Your answer";
|
|
3352
3352
|
const y = z("textarea", "taskDescription", {
|
|
3353
3353
|
resize: "vertical"
|
|
3354
|
-
}), S = z("div", "inputArea",
|
|
3354
|
+
}), S = z("div", "inputArea", bi);
|
|
3355
3355
|
S.append(p, y);
|
|
3356
|
-
const v = z("div", "closePanelButton",
|
|
3356
|
+
const v = z("div", "closePanelButton", fs, "Collapse Panel"), T = z("div", "nextButton", eo, "Done, Next");
|
|
3357
3357
|
i.append(s, r), a.append(d, c), u.append(v, T), o.append(l, a, S, u), n.append(i, o);
|
|
3358
3358
|
const A = () => {
|
|
3359
3359
|
const k = e[this.currentTaskIndex];
|
|
@@ -3381,7 +3381,7 @@ class uo {
|
|
|
3381
3381
|
}), this.widgetTasksVisible = !1, !1), this.showTaskSection = () => (r.textContent = "-", Object.assign(o.style, je), this.widgetTasksVisible = !0, !0);
|
|
3382
3382
|
const D = () => {
|
|
3383
3383
|
const k = document.getElementById(`or_task_${this.currentTaskIndex}`);
|
|
3384
|
-
k && Object.assign(k.style,
|
|
3384
|
+
k && Object.assign(k.style, mi);
|
|
3385
3385
|
for (let N = 0; N < this.currentTaskIndex; N++) {
|
|
3386
3386
|
const O = document.getElementById(`or_task_${N}`);
|
|
3387
3387
|
O && Object.assign(O.style, Qr);
|
|
@@ -3402,19 +3402,19 @@ class uo {
|
|
|
3402
3402
|
this.app.localStorage.setItem("or_uxt_task_index", this.currentTaskIndex.toString());
|
|
3403
3403
|
}, setTimeout(() => {
|
|
3404
3404
|
const k = document.getElementById("or_task_0");
|
|
3405
|
-
k && Object.assign(k.style,
|
|
3405
|
+
k && Object.assign(k.style, mi), A(), D();
|
|
3406
3406
|
}, 1), n;
|
|
3407
3407
|
}
|
|
3408
3408
|
showEndSection() {
|
|
3409
3409
|
var l, a, d, c;
|
|
3410
3410
|
let e = !0;
|
|
3411
3411
|
(l = this.signalManager) == null || l.signalTest("done");
|
|
3412
|
-
const n = z("div", "end_section_or",
|
|
3412
|
+
const n = z("div", "end_section_or", Xr), i = z("div", "end_title_or", {
|
|
3413
3413
|
fontSize: "1.25rem",
|
|
3414
3414
|
fontWeight: "500"
|
|
3415
3415
|
}, "Thank you! 👍"), s = z("div", "end_description_or", {}, ((a = this.test) == null ? void 0 : a.conclusion) ?? `Thank you for participating in our usability test. Your feedback has been captured and will be used to enhance our website.
|
|
3416
3416
|
|
|
3417
|
-
We appreciate your time and valuable input.`), r = z("div", "end_button_or",
|
|
3417
|
+
We appreciate your time and valuable input.`), r = z("div", "end_button_or", pi, "Submitting Feedback"), o = co();
|
|
3418
3418
|
r.appendChild(o), (d = this.test) != null && d.reqMic || (c = this.test) != null && c.reqCamera ? this.userRecorder.sendToAPI().then(() => {
|
|
3419
3419
|
r.removeChild(o), r.textContent = "End Session", e = !1;
|
|
3420
3420
|
}).catch((u) => {
|
|
@@ -3424,7 +3424,7 @@ We appreciate your time and valuable input.`), r = z("div", "end_button_or", gi,
|
|
|
3424
3424
|
}, n.append(i, s, r), this.endSection = n, this.container.append(n);
|
|
3425
3425
|
}
|
|
3426
3426
|
}
|
|
3427
|
-
function
|
|
3427
|
+
function ps(t) {
|
|
3428
3428
|
return !!t && t.nodeType != null;
|
|
3429
3429
|
}
|
|
3430
3430
|
function In(t) {
|
|
@@ -3512,7 +3512,7 @@ class po {
|
|
|
3512
3512
|
this.intervals.forEach((e) => clearInterval(e)), this.snapshots = {};
|
|
3513
3513
|
}
|
|
3514
3514
|
}
|
|
3515
|
-
const
|
|
3515
|
+
const wi = {
|
|
3516
3516
|
low: 0.35,
|
|
3517
3517
|
medium: 0.55,
|
|
3518
3518
|
high: 0.8
|
|
@@ -3525,9 +3525,9 @@ function go(t, e = "medium", n, i = !1, s, r) {
|
|
|
3525
3525
|
const a = n.getContext("2d");
|
|
3526
3526
|
if (!a)
|
|
3527
3527
|
return "";
|
|
3528
|
-
a.clearRect(0, 0, n.width, n.height), a.drawImage(t, 0, 0, n.width, n.height), n.toBlob(r, o,
|
|
3528
|
+
a.clearRect(0, 0, n.width, n.height), a.drawImage(t, 0, 0, n.width, n.height), n.toBlob(r, o, wi[e]);
|
|
3529
3529
|
} else
|
|
3530
|
-
t.toBlob(r, o,
|
|
3530
|
+
t.toBlob(r, o, wi[e]);
|
|
3531
3531
|
}
|
|
3532
3532
|
function mo(t, e) {
|
|
3533
3533
|
const n = URL.createObjectURL(t), i = document.createElement("a");
|
|
@@ -3571,7 +3571,7 @@ class yo {
|
|
|
3571
3571
|
const r = this.getID(e);
|
|
3572
3572
|
if (r === void 0)
|
|
3573
3573
|
return;
|
|
3574
|
-
|
|
3574
|
+
cs(e, n, i, s);
|
|
3575
3575
|
let o = this.elementListeners.get(r);
|
|
3576
3576
|
o === void 0 && (o = [], this.elementListeners.set(r, o)), o.push([n, i, s]);
|
|
3577
3577
|
}
|
|
@@ -3585,7 +3585,7 @@ class yo {
|
|
|
3585
3585
|
if (n !== void 0) {
|
|
3586
3586
|
e[this.node_id] = void 0, delete e[this.node_id], delete this.nodes[n];
|
|
3587
3587
|
const i = this.elementListeners.get(n);
|
|
3588
|
-
i !== void 0 && (this.elementListeners.delete(n), i.forEach((s) =>
|
|
3588
|
+
i !== void 0 && (this.elementListeners.delete(n), i.forEach((s) => ls(e, s[0], s[1], s[2]))), this.totalNodeAmount--;
|
|
3589
3589
|
}
|
|
3590
3590
|
return n;
|
|
3591
3591
|
}
|
|
@@ -3639,7 +3639,7 @@ var we;
|
|
|
3639
3639
|
})(we || (we = {}));
|
|
3640
3640
|
class jn {
|
|
3641
3641
|
constructor(e, n = !1) {
|
|
3642
|
-
this.app = e, this.isTopContext = n, this.commited = [], this.recents = /* @__PURE__ */ new Map(), this.indexes = [], this.attributesMap = /* @__PURE__ */ new Map(), this.textSet = /* @__PURE__ */ new Set(), this.observer =
|
|
3642
|
+
this.app = e, this.isTopContext = n, this.commited = [], this.recents = /* @__PURE__ */ new Map(), this.indexes = [], this.attributesMap = /* @__PURE__ */ new Map(), this.textSet = /* @__PURE__ */ new Set(), this.observer = as(this.app.safe((i) => {
|
|
3643
3643
|
for (const s of i) {
|
|
3644
3644
|
const r = s.target, o = s.type;
|
|
3645
3645
|
if (!rn(r))
|
|
@@ -3675,12 +3675,12 @@ class jn {
|
|
|
3675
3675
|
}
|
|
3676
3676
|
sendNodeAttribute(e, n, i, s) {
|
|
3677
3677
|
if (In(n)) {
|
|
3678
|
-
i.substr(0, 6) === "xlink:" && (i = i.substr(6)), s === null ? this.app.send(
|
|
3678
|
+
i.substr(0, 6) === "xlink:" && (i = i.substr(6)), s === null ? this.app.send(si(e, i)) : i === "href" ? (s.length > 1e5 && (s = ""), this.app.send(vn(e, i, s, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, i, s);
|
|
3679
3679
|
return;
|
|
3680
3680
|
}
|
|
3681
3681
|
if (!(i === "src" || i === "srcset" || i === "integrity" || i === "crossorigin" || i === "autocomplete" || i.substr(0, 2) === "on") && !(i === "value" && Z(n, "input") && n.type !== "button" && n.type !== "reset" && n.type !== "submit")) {
|
|
3682
3682
|
if (s === null) {
|
|
3683
|
-
this.app.send(
|
|
3683
|
+
this.app.send(si(e, i));
|
|
3684
3684
|
return;
|
|
3685
3685
|
}
|
|
3686
3686
|
if (i === "style" || i === "href" && Z(n, "link")) {
|
|
@@ -3829,7 +3829,7 @@ class jn {
|
|
|
3829
3829
|
this.observer.disconnect(), this.clear();
|
|
3830
3830
|
}
|
|
3831
3831
|
}
|
|
3832
|
-
class
|
|
3832
|
+
class Si extends jn {
|
|
3833
3833
|
observe(e) {
|
|
3834
3834
|
const n = e.contentDocument, i = this.app.nodes.getID(e);
|
|
3835
3835
|
!n || i === void 0 || this.observeRoot(n, (s) => {
|
|
@@ -3925,7 +3925,7 @@ class So extends jn {
|
|
|
3925
3925
|
return;
|
|
3926
3926
|
const r = e.contentWindow, o = e.contentDocument;
|
|
3927
3927
|
if (o && o !== n) {
|
|
3928
|
-
const l = new
|
|
3928
|
+
const l = new Si(this.app);
|
|
3929
3929
|
this.iframeObservers.push(l), l.observe(e), n = o, this.iframeOffsets.observe(e);
|
|
3930
3930
|
}
|
|
3931
3931
|
r && // Sometimes currentWin.window is null (not in specification). Such window object is not functional
|
|
@@ -3952,7 +3952,7 @@ class So extends jn {
|
|
|
3952
3952
|
const r = on.apply(this, arguments);
|
|
3953
3953
|
return i.handleShadowRoot(r), r;
|
|
3954
3954
|
}, this.app.nodes.clear(), this.app.nodes.syntheticMode(n);
|
|
3955
|
-
const s = new
|
|
3955
|
+
const s = new Si(this.app);
|
|
3956
3956
|
this.iframeObservers.push(s), s.syntheticObserve(e, window.document);
|
|
3957
3957
|
}
|
|
3958
3958
|
disconnect() {
|
|
@@ -4096,12 +4096,12 @@ class Io {
|
|
|
4096
4096
|
this.timer !== null && (clearInterval(this.timer), this.timer = null);
|
|
4097
4097
|
}
|
|
4098
4098
|
}
|
|
4099
|
-
const Ze = "canceled",
|
|
4099
|
+
const Ze = "canceled", xi = "or_uxt_active", an = "or_buffer_1", _e = (t) => ({ reason: t, success: !1 }), Co = (t) => ({ ...t, success: !0 });
|
|
4100
4100
|
var Q;
|
|
4101
4101
|
(function(t) {
|
|
4102
4102
|
t[t.NotActive = 0] = "NotActive", t[t.Starting = 1] = "Starting", t[t.Active = 2] = "Active", t[t.ColdStart = 3] = "ColdStart";
|
|
4103
4103
|
})(Q || (Q = {}));
|
|
4104
|
-
const
|
|
4104
|
+
const gs = "https://api.openreplay.com/ingest";
|
|
4105
4105
|
function cn() {
|
|
4106
4106
|
const t = (/* @__PURE__ */ new Date()).getTimezoneOffset() * -1, e = t >= 0 ? "+" : "-", n = Math.floor(Math.abs(t) / 60), i = Math.abs(t) % 60;
|
|
4107
4107
|
return `UTC${e}${String(n).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
|
|
@@ -4150,7 +4150,7 @@ let No = class {
|
|
|
4150
4150
|
session_reset_key: "__openreplay_reset",
|
|
4151
4151
|
session_tabid_key: "__openreplay_tabid",
|
|
4152
4152
|
local_uuid_key: "__openreplay_uuid",
|
|
4153
|
-
ingestPoint:
|
|
4153
|
+
ingestPoint: gs,
|
|
4154
4154
|
resourceBaseHref: null,
|
|
4155
4155
|
__is_snippet: !1,
|
|
4156
4156
|
__debug_report_edp: null,
|
|
@@ -4176,14 +4176,14 @@ let No = class {
|
|
|
4176
4176
|
useAnimationFrame: !1
|
|
4177
4177
|
}
|
|
4178
4178
|
};
|
|
4179
|
-
if (this.options =
|
|
4179
|
+
if (this.options = ds(o, i), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
|
|
4180
4180
|
const a = location.hostname.split(".").slice(-2).join("_");
|
|
4181
4181
|
this.bc = new BroadcastChannel(`rick_${a}`);
|
|
4182
4182
|
}
|
|
4183
4183
|
this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new ko(this, i), this.nodes = new yo(this.options.node_id), this.observer = new So(this, i), this.ticker = new Io(this), this.ticker.attach(() => this.commit()), this.debug = new bo(this.options.__debug__), this.session = new To(this, this.options), this.attributeSender = new Ys(this, !!this.options.disableStringDict), this.featureFlags = new er(this), this.tagWatcher = new $r(this.sessionStorage, this.debug.error, (a) => {
|
|
4184
4184
|
this.send(zr(a));
|
|
4185
4185
|
}), this.session.attachUpdateCallback(({ userID: a, metadata: d }) => {
|
|
4186
|
-
a != null && this.send(Er(a)), d != null && Object.entries(d).forEach(([c, u]) => this.send(
|
|
4186
|
+
a != null && this.send(Er(a)), d != null && Object.entries(d).forEach(([c, u]) => this.send(ri(c, u)));
|
|
4187
4187
|
}), n != null && this.session.applySessionHash(n), this.initWorker();
|
|
4188
4188
|
const l = this.session.getTabId();
|
|
4189
4189
|
if (this.insideIframe) {
|
|
@@ -4246,15 +4246,15 @@ let No = class {
|
|
|
4246
4246
|
let v = S;
|
|
4247
4247
|
return this.pageFrames.forEach((T) => {
|
|
4248
4248
|
if (T.dataset.domain === c.data.domain) {
|
|
4249
|
-
const [A, B, D, k, N, O, L] = S, { left: I, top: E, width: P, height:
|
|
4249
|
+
const [A, B, D, k, N, O, L] = S, { left: I, top: E, width: P, height: G } = T.getBoundingClientRect(), j = document.documentElement.scrollWidth, $ = document.documentElement.scrollHeight, C = O / 100 * P + I, M = L / 100 * G + E, W = C / j, V = M / $;
|
|
4250
4250
|
v = [
|
|
4251
4251
|
A,
|
|
4252
4252
|
B,
|
|
4253
4253
|
D,
|
|
4254
4254
|
k,
|
|
4255
4255
|
N,
|
|
4256
|
-
Math.round(
|
|
4257
|
-
Math.round(
|
|
4256
|
+
Math.round(W * 1e3) / 10,
|
|
4257
|
+
Math.round(V * 1e3) / 10
|
|
4258
4258
|
];
|
|
4259
4259
|
}
|
|
4260
4260
|
}), v;
|
|
@@ -4425,7 +4425,7 @@ let No = class {
|
|
|
4425
4425
|
// Use app.nodes.attachNodeListener for registered nodes instead
|
|
4426
4426
|
attachEventListener(e, n, i, s = !0, r = !0) {
|
|
4427
4427
|
s && (i = this.safe(i));
|
|
4428
|
-
const o = () => e ?
|
|
4428
|
+
const o = () => e ? cs(e, n, i, r) : null, l = () => e ? ls(e, n, i, r) : null;
|
|
4429
4429
|
this.attachStartCallback(o, s), this.attachStopCallback(l, s);
|
|
4430
4430
|
}
|
|
4431
4431
|
// TODO: full correct semantic
|
|
@@ -4714,8 +4714,8 @@ let No = class {
|
|
|
4714
4714
|
})
|
|
4715
4715
|
});
|
|
4716
4716
|
if (a.status !== 200) {
|
|
4717
|
-
const C = await a.text(),
|
|
4718
|
-
return _e(
|
|
4717
|
+
const C = await a.text(), M = C === Ze ? Ze : `Server error: ${a.status}. ${C}`;
|
|
4718
|
+
return _e(M);
|
|
4719
4719
|
}
|
|
4720
4720
|
if (!this.worker) {
|
|
4721
4721
|
const C = "no worker found after start request (this should not happen in real world)";
|
|
@@ -4764,9 +4764,9 @@ let No = class {
|
|
|
4764
4764
|
type: "auth",
|
|
4765
4765
|
token: d,
|
|
4766
4766
|
beaconSizeLimit: p
|
|
4767
|
-
}), !l && d === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(ut(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C,
|
|
4768
|
-
const
|
|
4769
|
-
if (this.startCallbacks.forEach((C) => C(
|
|
4767
|
+
}), !l && d === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(ut(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C, M]) => this.send(ri(C, M))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = y;
|
|
4768
|
+
const G = { sessionToken: d, userUUID: c, sessionID: v };
|
|
4769
|
+
if (this.startCallbacks.forEach((C) => C(G)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, d), this.activityState = Q.Active, L && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new po(this, {
|
|
4770
4770
|
fps: E,
|
|
4771
4771
|
quality: I,
|
|
4772
4772
|
isDebug: this.options.canvas.__save_canvas_locally,
|
|
@@ -4779,19 +4779,19 @@ let No = class {
|
|
|
4779
4779
|
this.clearBuffers(), this.commit();
|
|
4780
4780
|
} else
|
|
4781
4781
|
this.insideIframe && this.rootId ? this.observer.crossdomainObserve(this.rootId, this.frameOderNumber) : this.observer.observe(), this.ticker.start();
|
|
4782
|
-
this.uxtManager = this.uxtManager ? this.uxtManager : new uo(this,
|
|
4782
|
+
this.uxtManager = this.uxtManager ? this.uxtManager : new uo(this, xi);
|
|
4783
4783
|
let j;
|
|
4784
|
-
const
|
|
4785
|
-
if (
|
|
4784
|
+
const $ = this.localStorage.getItem(xi);
|
|
4785
|
+
if ($ && (j = parseInt($, 10)), location != null && location.search) {
|
|
4786
4786
|
const C = new URLSearchParams(location.search);
|
|
4787
4787
|
if (C.has("oruxt")) {
|
|
4788
|
-
const
|
|
4789
|
-
j =
|
|
4788
|
+
const M = C.get("oruxt");
|
|
4789
|
+
j = M ? parseInt(M, 10) : void 0;
|
|
4790
4790
|
}
|
|
4791
4791
|
}
|
|
4792
|
-
return j && (this.uxtManager.isActive ? this.onUxtCb.forEach((C) => C(j)) : this.uxtManager.getTest(j, d,
|
|
4793
|
-
C && this.onUxtCb.forEach((
|
|
4794
|
-
})), Co(
|
|
4792
|
+
return j && (this.uxtManager.isActive ? this.onUxtCb.forEach((C) => C(j)) : this.uxtManager.getTest(j, d, !!$).then((C) => {
|
|
4793
|
+
C && this.onUxtCb.forEach((M) => M(C));
|
|
4794
|
+
})), Co(G);
|
|
4795
4795
|
} catch (a) {
|
|
4796
4796
|
if (this.stop(), this.session.reset(), a === Ze)
|
|
4797
4797
|
return this.signalError(Ze, []), _e(Ze);
|
|
@@ -4853,7 +4853,7 @@ let No = class {
|
|
|
4853
4853
|
trackWs(e) {
|
|
4854
4854
|
const n = e;
|
|
4855
4855
|
return (i, s, r = "down") => {
|
|
4856
|
-
typeof i != "string" || typeof s != "string" || s.length > 5 * 1024 * 1024 || i.length > 255 || this.send(
|
|
4856
|
+
typeof i != "string" || typeof s != "string" || s.length > 5 * 1024 * 1024 || i.length > 255 || this.send(Mr("websocket", n, s, this.timestamp(), r, i));
|
|
4857
4857
|
};
|
|
4858
4858
|
}
|
|
4859
4859
|
stop(e = !0) {
|
|
@@ -4873,10 +4873,10 @@ function Oo(t) {
|
|
|
4873
4873
|
const n = () => t.send(_r(Math.round(e.downlink * 1e3), e.type || "unknown"));
|
|
4874
4874
|
n(), e.addEventListener("change", n);
|
|
4875
4875
|
}
|
|
4876
|
-
const
|
|
4876
|
+
const ms = xe && "InstallTrigger" in window ? (t) => t.message + `
|
|
4877
4877
|
` + t.stack : (t) => t.stack || t.message;
|
|
4878
4878
|
function Nn(t) {
|
|
4879
|
-
return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ?
|
|
4879
|
+
return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ? ms(t) : Array.isArray(t) ? `Array(${t.length})` : String(t);
|
|
4880
4880
|
}
|
|
4881
4881
|
function Ro(t) {
|
|
4882
4882
|
return typeof t != "number" ? "NaN" : t.toString();
|
|
@@ -4884,13 +4884,13 @@ function Ro(t) {
|
|
|
4884
4884
|
function Ao(t) {
|
|
4885
4885
|
return typeof t != "number" ? "NaN" : Math.floor(t).toString();
|
|
4886
4886
|
}
|
|
4887
|
-
function
|
|
4887
|
+
function ki(t) {
|
|
4888
4888
|
if (t === void 0)
|
|
4889
4889
|
return "undefined";
|
|
4890
4890
|
if (t === null)
|
|
4891
4891
|
return "null";
|
|
4892
4892
|
if (t instanceof Error)
|
|
4893
|
-
return
|
|
4893
|
+
return ms(t);
|
|
4894
4894
|
if (Array.isArray(t)) {
|
|
4895
4895
|
const e = t.length, n = t.slice(0, 10).map(Nn).join(", ");
|
|
4896
4896
|
return `Array(${e})[${n}]`;
|
|
@@ -4915,7 +4915,7 @@ function Do(t) {
|
|
|
4915
4915
|
return e;
|
|
4916
4916
|
switch (n) {
|
|
4917
4917
|
case "o":
|
|
4918
|
-
return
|
|
4918
|
+
return ki(i);
|
|
4919
4919
|
case "s":
|
|
4920
4920
|
return Nn(i);
|
|
4921
4921
|
case "f":
|
|
@@ -4926,12 +4926,12 @@ function Do(t) {
|
|
|
4926
4926
|
default:
|
|
4927
4927
|
return e;
|
|
4928
4928
|
}
|
|
4929
|
-
})), t.map(
|
|
4929
|
+
})), t.map(ki).join(" ");
|
|
4930
4930
|
}
|
|
4931
|
-
const
|
|
4931
|
+
const Ti = ["log", "info", "warn", "error", "debug", "assert"];
|
|
4932
4932
|
function Lo(t, e) {
|
|
4933
4933
|
const n = Object.assign({
|
|
4934
|
-
consoleMethods:
|
|
4934
|
+
consoleMethods: Ti,
|
|
4935
4935
|
consoleThrottling: 30
|
|
4936
4936
|
}, e);
|
|
4937
4937
|
if (!Array.isArray(n.consoleMethods) || n.consoleMethods.length === 0)
|
|
@@ -4949,7 +4949,7 @@ function Lo(t, e) {
|
|
|
4949
4949
|
}
|
|
4950
4950
|
};
|
|
4951
4951
|
n.consoleMethods.forEach((u) => {
|
|
4952
|
-
if (
|
|
4952
|
+
if (Ti.indexOf(u) === -1) {
|
|
4953
4953
|
t.debug.error(`OpenReplay: unsupported console method "${u}"`);
|
|
4954
4954
|
return;
|
|
4955
4955
|
}
|
|
@@ -4959,9 +4959,9 @@ function Lo(t, e) {
|
|
|
4959
4959
|
}, l = t.safe((a) => o(a.console, a));
|
|
4960
4960
|
l(window), t.observer.attachContextCallback(l);
|
|
4961
4961
|
}
|
|
4962
|
-
var
|
|
4963
|
-
function
|
|
4964
|
-
return
|
|
4962
|
+
var bs = { exports: {} }, ln = { exports: {} }, Ei;
|
|
4963
|
+
function Mo() {
|
|
4964
|
+
return Ei || (Ei = 1, function(t, e) {
|
|
4965
4965
|
(function(n, i) {
|
|
4966
4966
|
t.exports = i();
|
|
4967
4967
|
})(qe, function() {
|
|
@@ -5044,7 +5044,7 @@ function Fo() {
|
|
|
5044
5044
|
}
|
|
5045
5045
|
(function(t, e) {
|
|
5046
5046
|
(function(n, i) {
|
|
5047
|
-
t.exports = i(
|
|
5047
|
+
t.exports = i(Mo());
|
|
5048
5048
|
})(qe, function(i) {
|
|
5049
5049
|
var s = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, o = /^(eval@)?(\[native code])?$/;
|
|
5050
5050
|
return {
|
|
@@ -5164,10 +5164,10 @@ function Fo() {
|
|
|
5164
5164
|
}
|
|
5165
5165
|
};
|
|
5166
5166
|
});
|
|
5167
|
-
})(
|
|
5168
|
-
var
|
|
5169
|
-
const Po = /* @__PURE__ */
|
|
5170
|
-
function
|
|
5167
|
+
})(bs);
|
|
5168
|
+
var Fo = bs.exports;
|
|
5169
|
+
const Po = /* @__PURE__ */ Wi(Fo);
|
|
5170
|
+
function Ii(t) {
|
|
5171
5171
|
return [
|
|
5172
5172
|
{
|
|
5173
5173
|
columnNumber: t.colno,
|
|
@@ -5186,13 +5186,13 @@ function Et(t, e, n = {}) {
|
|
|
5186
5186
|
}
|
|
5187
5187
|
return xn(t.name, t.message, JSON.stringify(i), JSON.stringify(n));
|
|
5188
5188
|
}
|
|
5189
|
-
function
|
|
5189
|
+
function ys(t, e = window, n = {}) {
|
|
5190
5190
|
if (t instanceof ErrorEvent) {
|
|
5191
5191
|
if (t.error instanceof Error)
|
|
5192
|
-
return Et(t.error,
|
|
5192
|
+
return Et(t.error, Ii(t), n);
|
|
5193
5193
|
{
|
|
5194
5194
|
let [i, s] = t.message.split(":");
|
|
5195
|
-
return s || (i = "Error", s = t.message), xn(i, s, JSON.stringify(
|
|
5195
|
+
return s || (i = "Error", s = t.message), xn(i, s, JSON.stringify(Ii(t)), JSON.stringify(n));
|
|
5196
5196
|
}
|
|
5197
5197
|
} else if ("PromiseRejectionEvent" in e && t instanceof e.PromiseRejectionEvent) {
|
|
5198
5198
|
if (t.reason instanceof Error)
|
|
@@ -5215,14 +5215,14 @@ function Bo(t, e) {
|
|
|
5215
5215
|
}, e);
|
|
5216
5216
|
function i(s) {
|
|
5217
5217
|
function r(o) {
|
|
5218
|
-
const l =
|
|
5218
|
+
const l = ys(o, s);
|
|
5219
5219
|
l != null && t.send(l);
|
|
5220
5220
|
}
|
|
5221
5221
|
t.attachEventListener(s, "unhandledrejection", r), t.attachEventListener(s, "error", r);
|
|
5222
5222
|
}
|
|
5223
5223
|
n.captureExceptions && (t.observer.attachContextCallback(i), i(window));
|
|
5224
5224
|
}
|
|
5225
|
-
function
|
|
5225
|
+
function Ci(t, e = document.location) {
|
|
5226
5226
|
return t = t.trim(), t.startsWith("//") || t.startsWith("http://") || t.startsWith("https://") || t.startsWith("data:") ? t : t.startsWith("/") ? e.origin + t : e.origin + e.pathname + t;
|
|
5227
5227
|
}
|
|
5228
5228
|
function jo(t) {
|
|
@@ -5239,17 +5239,17 @@ function Uo(t) {
|
|
|
5239
5239
|
const { srcset: d } = a;
|
|
5240
5240
|
if (!d)
|
|
5241
5241
|
return;
|
|
5242
|
-
const c = d.split(d.match(/,\s+/) ? /,\s+/ : ",").map((u) =>
|
|
5242
|
+
const c = d.split(d.match(/,\s+/) ? /,\s+/ : ",").map((u) => Ci(u)).join(", ");
|
|
5243
5243
|
t.attributeSender.sendSetAttribute(l, "srcset", c);
|
|
5244
5244
|
}, i = function(l, a) {
|
|
5245
5245
|
a.src.length > nr && e(l, a), t.send(vn(l, "src", a.src, t.getBaseHref()));
|
|
5246
5246
|
}, s = t.safe(function(l) {
|
|
5247
|
-
const a =
|
|
5248
|
-
|
|
5247
|
+
const a = Ci(l.src || "");
|
|
5248
|
+
os(a) && t.send(us(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
|
|
5249
5249
|
}), r = t.safe(function(l) {
|
|
5250
5250
|
const a = t.nodes.getID(l);
|
|
5251
5251
|
a !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !jo(l.src) ? s(l) : t.sanitizer.isHidden(a) || t.sanitizer.isObscured(a) ? e(a, l) : (i(a, l), n(a, l)));
|
|
5252
|
-
}), o =
|
|
5252
|
+
}), o = as(t.safe((l) => {
|
|
5253
5253
|
for (const a of l)
|
|
5254
5254
|
if (a.type === "attributes") {
|
|
5255
5255
|
const d = a.target, c = t.nodes.getID(d);
|
|
@@ -5304,13 +5304,13 @@ const Wo = xe && "labels" in HTMLInputElement.prototype ? (t) => {
|
|
|
5304
5304
|
return i[0];
|
|
5305
5305
|
}
|
|
5306
5306
|
};
|
|
5307
|
-
function
|
|
5307
|
+
function vs(t) {
|
|
5308
5308
|
let e = Pn(t);
|
|
5309
5309
|
if (e === null) {
|
|
5310
5310
|
const n = Wo(t);
|
|
5311
5311
|
e = n && n.innerText || t.placeholder || t.name || t.id || t.className || t.type;
|
|
5312
5312
|
}
|
|
5313
|
-
return
|
|
5313
|
+
return rs(e).slice(0, 100);
|
|
5314
5314
|
}
|
|
5315
5315
|
const ze = {
|
|
5316
5316
|
Plain: 0,
|
|
@@ -5366,8 +5366,8 @@ function Go(t, e) {
|
|
|
5366
5366
|
});
|
|
5367
5367
|
}, 3);
|
|
5368
5368
|
function d(c, u, p, y) {
|
|
5369
|
-
const { value: S, mask: v } = i(c, u), T =
|
|
5370
|
-
t.send(
|
|
5369
|
+
const { value: S, mask: v } = i(c, u), T = vs(u);
|
|
5370
|
+
t.send(Fr(c, S, v !== 0, T, p, y));
|
|
5371
5371
|
}
|
|
5372
5372
|
t.nodes.attachNodeCallback(t.safe((c) => {
|
|
5373
5373
|
const u = t.nodes.getID(c);
|
|
@@ -5392,9 +5392,9 @@ function Go(t, e) {
|
|
|
5392
5392
|
}
|
|
5393
5393
|
}));
|
|
5394
5394
|
}
|
|
5395
|
-
let ue, zn,
|
|
5395
|
+
let ue, zn, ws;
|
|
5396
5396
|
function Vo(t, e) {
|
|
5397
|
-
if (
|
|
5397
|
+
if (ws = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
|
|
5398
5398
|
throw new Error("Can't generate CSS selector for non-element node type.");
|
|
5399
5399
|
if (t.tagName.toLowerCase() === "html")
|
|
5400
5400
|
return "html";
|
|
@@ -5413,7 +5413,7 @@ function Vo(t, e) {
|
|
|
5413
5413
|
ue = { ...n, ...e }, zn = Ko(ue.root, n);
|
|
5414
5414
|
let i = ot(t, "all", () => ot(t, "two", () => ot(t, "one", () => ot(t, "none"))));
|
|
5415
5415
|
if (i) {
|
|
5416
|
-
const s = Ts(
|
|
5416
|
+
const s = ks(Ts(i, t));
|
|
5417
5417
|
return s.length > 0 && (i = s[0]), Rt(i);
|
|
5418
5418
|
} else
|
|
5419
5419
|
throw new Error("Selector was not found.");
|
|
@@ -5424,10 +5424,10 @@ function Ko(t, e) {
|
|
|
5424
5424
|
function ot(t, e, n) {
|
|
5425
5425
|
let i = null, s = [], r = t, o = 0;
|
|
5426
5426
|
for (; r; ) {
|
|
5427
|
-
const l = (/* @__PURE__ */ new Date()).getTime() -
|
|
5427
|
+
const l = (/* @__PURE__ */ new Date()).getTime() - ws.getTime();
|
|
5428
5428
|
if (ue.timeoutMs !== void 0 && l > ue.timeoutMs)
|
|
5429
5429
|
throw new Error(`Timeout: Can't find a unique selector after ${l}ms`);
|
|
5430
|
-
let a = ct(
|
|
5430
|
+
let a = ct(Jo(r)) || ct(...Xo(r)) || ct(...Yo(r)) || ct(Qo(r)) || [Oi()];
|
|
5431
5431
|
const d = Zo(r);
|
|
5432
5432
|
if (e == "all")
|
|
5433
5433
|
d && (a = a.concat(a.filter(dn).map((c) => at(c, d))));
|
|
@@ -5437,21 +5437,21 @@ function ot(t, e, n) {
|
|
|
5437
5437
|
const [c] = a = a.slice(0, 1);
|
|
5438
5438
|
d && dn(c) && (a = [at(c, d)]);
|
|
5439
5439
|
} else
|
|
5440
|
-
e == "none" && (a = [
|
|
5440
|
+
e == "none" && (a = [Oi()], d && (a = [at(a[0], d)]));
|
|
5441
5441
|
for (let c of a)
|
|
5442
5442
|
c.level = o;
|
|
5443
|
-
if (s.push(a), s.length >= ue.seedMinLength && (i =
|
|
5443
|
+
if (s.push(a), s.length >= ue.seedMinLength && (i = _i(s, n), i))
|
|
5444
5444
|
break;
|
|
5445
5445
|
r = r.parentElement, o++;
|
|
5446
5446
|
}
|
|
5447
|
-
return i || (i =
|
|
5447
|
+
return i || (i = _i(s, n)), !i && n ? n() : i;
|
|
5448
5448
|
}
|
|
5449
|
-
function
|
|
5450
|
-
const n =
|
|
5449
|
+
function _i(t, e) {
|
|
5450
|
+
const n = ks(xs(t));
|
|
5451
5451
|
if (n.length > ue.threshold)
|
|
5452
5452
|
return e ? e() : null;
|
|
5453
5453
|
for (let i of n)
|
|
5454
|
-
if (
|
|
5454
|
+
if (Ss(i))
|
|
5455
5455
|
return i;
|
|
5456
5456
|
return null;
|
|
5457
5457
|
}
|
|
@@ -5463,10 +5463,10 @@ function Rt(t) {
|
|
|
5463
5463
|
}
|
|
5464
5464
|
return n;
|
|
5465
5465
|
}
|
|
5466
|
-
function
|
|
5466
|
+
function Ni(t) {
|
|
5467
5467
|
return t.map((e) => e.penalty).reduce((e, n) => e + n, 0);
|
|
5468
5468
|
}
|
|
5469
|
-
function
|
|
5469
|
+
function Ss(t) {
|
|
5470
5470
|
const e = Rt(t);
|
|
5471
5471
|
switch (zn.querySelectorAll(e).length) {
|
|
5472
5472
|
case 0:
|
|
@@ -5477,14 +5477,14 @@ function xs(t) {
|
|
|
5477
5477
|
return !1;
|
|
5478
5478
|
}
|
|
5479
5479
|
}
|
|
5480
|
-
function
|
|
5480
|
+
function Jo(t) {
|
|
5481
5481
|
const e = t.getAttribute("id");
|
|
5482
5482
|
return e && ue.idName(e) ? {
|
|
5483
5483
|
name: "#" + CSS.escape(e),
|
|
5484
5484
|
penalty: 0
|
|
5485
5485
|
} : null;
|
|
5486
5486
|
}
|
|
5487
|
-
function
|
|
5487
|
+
function Xo(t) {
|
|
5488
5488
|
return Array.from(t.attributes).filter((n) => ue.attr(n.name, n.value)).map((n) => ({
|
|
5489
5489
|
name: `[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,
|
|
5490
5490
|
penalty: 0.5
|
|
@@ -5503,7 +5503,7 @@ function Qo(t) {
|
|
|
5503
5503
|
penalty: 2
|
|
5504
5504
|
} : null;
|
|
5505
5505
|
}
|
|
5506
|
-
function
|
|
5506
|
+
function Oi() {
|
|
5507
5507
|
return {
|
|
5508
5508
|
name: "*",
|
|
5509
5509
|
penalty: 3
|
|
@@ -5537,17 +5537,17 @@ function ct(...t) {
|
|
|
5537
5537
|
function ea(t) {
|
|
5538
5538
|
return t != null;
|
|
5539
5539
|
}
|
|
5540
|
-
function*
|
|
5540
|
+
function* xs(t, e = []) {
|
|
5541
5541
|
if (t.length > 0)
|
|
5542
5542
|
for (let n of t[0])
|
|
5543
|
-
yield*
|
|
5543
|
+
yield* xs(t.slice(1, t.length), e.concat(n));
|
|
5544
5544
|
else
|
|
5545
5545
|
yield e;
|
|
5546
5546
|
}
|
|
5547
|
-
function
|
|
5548
|
-
return [...t].sort((e, n) =>
|
|
5547
|
+
function ks(t) {
|
|
5548
|
+
return [...t].sort((e, n) => Ni(e) - Ni(n));
|
|
5549
5549
|
}
|
|
5550
|
-
function*
|
|
5550
|
+
function* Ts(t, e, n = {
|
|
5551
5551
|
counter: 0,
|
|
5552
5552
|
visited: /* @__PURE__ */ new Map()
|
|
5553
5553
|
}) {
|
|
@@ -5561,7 +5561,7 @@ function* Es(t, e, n = {
|
|
|
5561
5561
|
const r = Rt(s);
|
|
5562
5562
|
if (n.visited.has(r))
|
|
5563
5563
|
return;
|
|
5564
|
-
|
|
5564
|
+
Ss(s) && ta(s, e) && (yield s, n.visited.set(r, !0), yield* Ts(s, e, n));
|
|
5565
5565
|
}
|
|
5566
5566
|
}
|
|
5567
5567
|
function ta(t, e) {
|
|
@@ -5580,7 +5580,7 @@ function On(t) {
|
|
|
5580
5580
|
const e = t.tagName.toUpperCase();
|
|
5581
5581
|
return e === "BUTTON" || e === "A" || e === "LI" || e === "SELECT" || e === "TR" || e === "TH" || t.onclick != null || t.getAttribute("role") === "button";
|
|
5582
5582
|
}
|
|
5583
|
-
function
|
|
5583
|
+
function Ri(t, e) {
|
|
5584
5584
|
return t instanceof Element ? ia(t, e) : null;
|
|
5585
5585
|
}
|
|
5586
5586
|
function ia(t, e) {
|
|
@@ -5612,10 +5612,10 @@ function sa(t, e) {
|
|
|
5612
5612
|
if (N !== null)
|
|
5613
5613
|
return N;
|
|
5614
5614
|
if (Z(k, "input"))
|
|
5615
|
-
return
|
|
5615
|
+
return vs(k);
|
|
5616
5616
|
if (On(k)) {
|
|
5617
5617
|
let O = "";
|
|
5618
|
-
return k instanceof HTMLElement && (O = t.sanitizer.getInnerTextSecure(k)), O = O || k.id || k.className,
|
|
5618
|
+
return k instanceof HTMLElement && (O = t.sanitizer.getInnerTextSecure(k)), O = O || k.id || k.className, rs(O).slice(0, 100);
|
|
5619
5619
|
}
|
|
5620
5620
|
return "";
|
|
5621
5621
|
}
|
|
@@ -5643,21 +5643,21 @@ function sa(t, e) {
|
|
|
5643
5643
|
}
|
|
5644
5644
|
const L = N ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
|
|
5645
5645
|
L(k.documentElement, "mouseover", (I) => {
|
|
5646
|
-
const E =
|
|
5646
|
+
const E = Ri(I.target, k);
|
|
5647
5647
|
E !== l && (l = E, a = performance.now());
|
|
5648
5648
|
}), L(k, "mousemove", (I) => {
|
|
5649
5649
|
const [E, P] = t.observer.getDocumentOffset(k);
|
|
5650
5650
|
s = I.clientX + E, r = I.clientY + P, o = !0;
|
|
5651
|
-
const
|
|
5652
|
-
y += Math.abs(I.movementX) + Math.abs(I.movementY),
|
|
5651
|
+
const G = Math.sign(I.movementX);
|
|
5652
|
+
y += Math.abs(I.movementX) + Math.abs(I.movementY), G !== u && (u = G, p++);
|
|
5653
5653
|
}, !1), L(k, "click", (I) => {
|
|
5654
|
-
const E =
|
|
5654
|
+
const E = Ri(I.target, k);
|
|
5655
5655
|
if (!I.clientX && !I.clientY || E === null)
|
|
5656
5656
|
return;
|
|
5657
5657
|
const P = t.nodes.getID(E);
|
|
5658
5658
|
if (P !== void 0) {
|
|
5659
|
-
const
|
|
5660
|
-
B(), t.send(Dr(P, l === E ? Math.round(performance.now() - a) : 0, i(E), On(E) && !n ? O(P, E, e) : "",
|
|
5659
|
+
const G = I.pageX, j = I.pageY, $ = k.documentElement.scrollWidth, C = k.documentElement.scrollHeight, M = Ai(G / $), W = Ai(j / C);
|
|
5660
|
+
B(), t.send(Dr(P, l === E ? Math.round(performance.now() - a) : 0, i(E), On(E) && !n ? O(P, E, e) : "", M, W), !0);
|
|
5661
5661
|
}
|
|
5662
5662
|
l = null;
|
|
5663
5663
|
});
|
|
@@ -5666,7 +5666,7 @@ function sa(t, e) {
|
|
|
5666
5666
|
kt(k) && D(k);
|
|
5667
5667
|
}), D(document, !0), t.ticker.attach(B, (e == null ? void 0 : e.trackingOffset) || 7);
|
|
5668
5668
|
}
|
|
5669
|
-
function
|
|
5669
|
+
function Ai(t) {
|
|
5670
5670
|
return Math.round(t * 1e4);
|
|
5671
5671
|
}
|
|
5672
5672
|
function ra(t) {
|
|
@@ -5714,7 +5714,7 @@ function aa(t, e) {
|
|
|
5714
5714
|
let i = {};
|
|
5715
5715
|
function s(d) {
|
|
5716
5716
|
var u;
|
|
5717
|
-
if (d.duration < 0 || !
|
|
5717
|
+
if (d.duration < 0 || !os(d.name) || t.isServiceURL(d.name))
|
|
5718
5718
|
return;
|
|
5719
5719
|
i !== null && (i[d.name] = d.startTime + d.duration);
|
|
5720
5720
|
let c = !1;
|
|
@@ -5723,7 +5723,7 @@ function aa(t, e) {
|
|
|
5723
5723
|
c = !0;
|
|
5724
5724
|
return;
|
|
5725
5725
|
}
|
|
5726
|
-
}), !c && t.send(
|
|
5726
|
+
}), !c && t.send(us(
|
|
5727
5727
|
d.startTime + Ve(),
|
|
5728
5728
|
d.duration,
|
|
5729
5729
|
d.responseStart && d.startTime ? d.responseStart - d.startTime : 0,
|
|
@@ -5802,7 +5802,7 @@ function ca(t, e) {
|
|
|
5802
5802
|
let n = !1;
|
|
5803
5803
|
const i = /* @__PURE__ */ new Map();
|
|
5804
5804
|
function s(l) {
|
|
5805
|
-
|
|
5805
|
+
ps(l) && (Te(l) && i.set(l, [l.scrollLeft, l.scrollTop]), kt(l) && i.set(l, hn(l)));
|
|
5806
5806
|
}
|
|
5807
5807
|
const r = t.safe(() => {
|
|
5808
5808
|
e || t.send(dr(...hn(document)));
|
|
@@ -5840,17 +5840,17 @@ function la(t) {
|
|
|
5840
5840
|
e = null, s = Ve(), n = i = -1, o(), l(), a();
|
|
5841
5841
|
}), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", a, !1, !1), t.ticker.attach(o, 1, !1), t.ticker.attach(l, 5, !1);
|
|
5842
5842
|
}
|
|
5843
|
-
function
|
|
5843
|
+
function Di(t) {
|
|
5844
5844
|
return Ot(t) && // @ts-ignore
|
|
5845
5845
|
!!t.adoptedStyleSheets;
|
|
5846
5846
|
}
|
|
5847
5847
|
let da = 15;
|
|
5848
|
-
function
|
|
5848
|
+
function Es() {
|
|
5849
5849
|
return da++;
|
|
5850
5850
|
}
|
|
5851
5851
|
const lt = /* @__PURE__ */ new Map();
|
|
5852
5852
|
function ha(t) {
|
|
5853
|
-
if (t === null || !
|
|
5853
|
+
if (t === null || !Di(document))
|
|
5854
5854
|
return;
|
|
5855
5855
|
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), i = (o) => setTimeout(() => {
|
|
5856
5856
|
let l = t.nodes.getID(o);
|
|
@@ -5863,7 +5863,7 @@ function ha(t) {
|
|
|
5863
5863
|
for (const u of c) {
|
|
5864
5864
|
let p = e.get(u);
|
|
5865
5865
|
const y = !p;
|
|
5866
|
-
if (p || (p =
|
|
5866
|
+
if (p || (p = Es(), e.set(u, p)), a.includes(p) || t.send(hs(p, l)), y) {
|
|
5867
5867
|
const S = u.cssRules;
|
|
5868
5868
|
for (let v = 0; v < S.length; v++)
|
|
5869
5869
|
t.send(Sn(p, S[v].cssText, v, t.getBaseHref()));
|
|
@@ -5893,11 +5893,11 @@ function ha(t) {
|
|
|
5893
5893
|
o.CSSStyleSheet.prototype.replace = function(d) {
|
|
5894
5894
|
return l.call(this, d).then((c) => {
|
|
5895
5895
|
const u = e.get(this);
|
|
5896
|
-
return u && t.send(
|
|
5896
|
+
return u && t.send(ci(u, d, t.getBaseHref())), c;
|
|
5897
5897
|
});
|
|
5898
5898
|
}, o.CSSStyleSheet.prototype.replaceSync = function(d) {
|
|
5899
5899
|
const c = e.get(this);
|
|
5900
|
-
return c && t.send(
|
|
5900
|
+
return c && t.send(ci(c, d, t.getBaseHref())), a.call(this, d);
|
|
5901
5901
|
};
|
|
5902
5902
|
};
|
|
5903
5903
|
r(window), t.observer.attachContextCallback(t.safe(r)), t.attachStopCallback(() => {
|
|
@@ -5905,7 +5905,7 @@ function ha(t) {
|
|
|
5905
5905
|
}), t.attachStartCallback(() => {
|
|
5906
5906
|
i(document);
|
|
5907
5907
|
}), t.nodes.attachNodeCallback((o) => {
|
|
5908
|
-
|
|
5908
|
+
Di(o) && i(o);
|
|
5909
5909
|
});
|
|
5910
5910
|
}
|
|
5911
5911
|
function ua(t) {
|
|
@@ -5917,7 +5917,7 @@ function ua(t) {
|
|
|
5917
5917
|
}
|
|
5918
5918
|
const e = t.safe((s, r, o) => {
|
|
5919
5919
|
const l = lt.get(s);
|
|
5920
|
-
l && (typeof o == "string" ? t.send(Sn(l, o, r, t.getBaseHref())) : t.send(
|
|
5920
|
+
l && (typeof o == "string" ? t.send(Sn(l, o, r, t.getBaseHref())) : t.send(li(l, r)));
|
|
5921
5921
|
}), n = t.safe((s) => {
|
|
5922
5922
|
let r = s;
|
|
5923
5923
|
for (; r.parentRule; )
|
|
@@ -5933,7 +5933,7 @@ function ua(t) {
|
|
|
5933
5933
|
return;
|
|
5934
5934
|
}
|
|
5935
5935
|
const a = r.cssText, d = o.cssRules, c = Array.from(d).indexOf(r);
|
|
5936
|
-
c >= 0 ? (t.send(Sn(l, a, c, t.getBaseHref())), t.send(
|
|
5936
|
+
c >= 0 ? (t.send(Sn(l, a, c, t.getBaseHref())), t.send(li(l, c + 1))) : t.debug.warn("Rule index not found in", o, r);
|
|
5937
5937
|
}), i = t.safe((s) => {
|
|
5938
5938
|
const { insertRule: r, deleteRule: o } = s.CSSStyleSheet.prototype, { insertRule: l, deleteRule: a } = s.CSSGroupingRule.prototype;
|
|
5939
5939
|
s.CSSStyleSheet.prototype.insertRule = function(d, c = 0) {
|
|
@@ -5954,8 +5954,8 @@ function ua(t) {
|
|
|
5954
5954
|
const r = t.nodes.getID(s);
|
|
5955
5955
|
if (!r)
|
|
5956
5956
|
return;
|
|
5957
|
-
const o = s.sheet, l =
|
|
5958
|
-
lt.set(o, l), t.send(
|
|
5957
|
+
const o = s.sheet, l = Es();
|
|
5958
|
+
lt.set(o, l), t.send(hs(l, r));
|
|
5959
5959
|
const a = o.cssRules;
|
|
5960
5960
|
for (let d = 0; d < a.length; d++)
|
|
5961
5961
|
e(o, d, a[d].cssText);
|
|
@@ -5964,15 +5964,15 @@ function ua(t) {
|
|
|
5964
5964
|
function fa(t) {
|
|
5965
5965
|
function e(i) {
|
|
5966
5966
|
const s = t.nodes.getID(i);
|
|
5967
|
-
s !== void 0 && t.send(
|
|
5967
|
+
s !== void 0 && t.send(ai(s));
|
|
5968
5968
|
}
|
|
5969
5969
|
let n = !1;
|
|
5970
5970
|
t.nodes.attachNodeCallback((i) => {
|
|
5971
5971
|
Z(i, "body") && (t.nodes.attachNodeListener(i, "focus", (s) => {
|
|
5972
|
-
|
|
5972
|
+
ps(s.target) && (e(s.target), n = !1);
|
|
5973
5973
|
}), t.nodes.attachNodeListener(i, "blur", (s) => {
|
|
5974
5974
|
s.relatedTarget === null && (n = !0, setTimeout(() => {
|
|
5975
|
-
n && t.send(
|
|
5975
|
+
n && t.send(ai(-1));
|
|
5976
5976
|
}, 0));
|
|
5977
5977
|
}));
|
|
5978
5978
|
}), t.attachStartCallback(() => {
|
|
@@ -5998,7 +5998,7 @@ function pa(t) {
|
|
|
5998
5998
|
const c = i === window ? 0 : t.nodes.getID(i.document);
|
|
5999
5999
|
if (c === void 0)
|
|
6000
6000
|
return;
|
|
6001
|
-
t.active() && t.send(
|
|
6001
|
+
t.active() && t.send(oi(c, ...a));
|
|
6002
6002
|
}
|
|
6003
6003
|
super(...o);
|
|
6004
6004
|
}
|
|
@@ -6013,7 +6013,7 @@ function pa(t) {
|
|
|
6013
6013
|
return;
|
|
6014
6014
|
const r = i.defaultView === window ? 0 : t.nodes.getID(i);
|
|
6015
6015
|
r !== void 0 && s.forEach((o) => {
|
|
6016
|
-
t.send(
|
|
6016
|
+
t.send(oi(r, ...o));
|
|
6017
6017
|
});
|
|
6018
6018
|
}));
|
|
6019
6019
|
}
|
|
@@ -6022,16 +6022,16 @@ function ga(t, e, n, i, s) {
|
|
|
6022
6022
|
function r(p) {
|
|
6023
6023
|
t.debug.log("Openreplay: capturing axios response data", p);
|
|
6024
6024
|
const { headers: y, data: S, method: v, url: T, baseURL: A } = p.config, { data: B, headers: D, status: k, response: N } = p, { data: O, headers: L, status: I } = N || {}, E = n.ignoreHeaders, P = Array.isArray(E) ? (U) => E.includes(U) : () => E;
|
|
6025
|
-
function
|
|
6025
|
+
function G(U, b) {
|
|
6026
6026
|
P(b[0]) || (U[b[0]] = b[1]);
|
|
6027
6027
|
}
|
|
6028
|
-
let j = {},
|
|
6029
|
-
y.toJSON ? j = y.toJSON() : y instanceof Headers ? y.forEach((U, b) =>
|
|
6028
|
+
let j = {}, $ = {};
|
|
6029
|
+
y.toJSON ? j = y.toJSON() : y instanceof Headers ? y.forEach((U, b) => G(j, [b, U])) : Array.isArray(y) ? y.forEach((U) => G(j, U)) : typeof y == "object" && Object.entries(y).forEach((U) => G(j, U));
|
|
6030
6030
|
const C = L || D;
|
|
6031
|
-
C.toJSON ?
|
|
6032
|
-
P(U) || (
|
|
6031
|
+
C.toJSON ? $ = C.toJSON() : C instanceof Headers ? C.forEach((U, b) => G($, [b, U])) : Array.isArray(C) ? C.forEach((U) => G($, U)) : typeof C == "object" && Object.entries(C).forEach(([U, b]) => {
|
|
6032
|
+
P(U) || ($[U] = b);
|
|
6033
6033
|
});
|
|
6034
|
-
const
|
|
6034
|
+
const M = i({
|
|
6035
6035
|
url: T,
|
|
6036
6036
|
method: v || "",
|
|
6037
6037
|
status: k || I || 0,
|
|
@@ -6040,16 +6040,16 @@ function ga(t, e, n, i, s) {
|
|
|
6040
6040
|
body: S
|
|
6041
6041
|
},
|
|
6042
6042
|
response: {
|
|
6043
|
-
headers:
|
|
6043
|
+
headers: $,
|
|
6044
6044
|
body: O || B
|
|
6045
6045
|
}
|
|
6046
6046
|
});
|
|
6047
|
-
if (!
|
|
6047
|
+
if (!M) {
|
|
6048
6048
|
t.debug.log("Openreplay: empty request/response info, skipping");
|
|
6049
6049
|
return;
|
|
6050
6050
|
}
|
|
6051
|
-
const
|
|
6052
|
-
t.debug.log("Openreplay: final req object",
|
|
6051
|
+
const W = p.config.__openreplay_timing, V = performance.now() - W;
|
|
6052
|
+
t.debug.log("Openreplay: final req object", M), t.send(xt("xhr", String(v), String(M.url), s(M.request), s(M.response), M.status, W + Ve(), V, 0));
|
|
6053
6053
|
}
|
|
6054
6054
|
function o(p) {
|
|
6055
6055
|
if (t.debug.log("Openreplay: capturing API request", p), p.__openreplay_timing = performance.now(), n.sessionTokenHeader) {
|
|
@@ -6444,13 +6444,13 @@ class Ge {
|
|
|
6444
6444
|
return new Proxy(Ge.origSendBeacon, new Ia(e, n, i, s, r));
|
|
6445
6445
|
}
|
|
6446
6446
|
}
|
|
6447
|
-
var
|
|
6448
|
-
Ge.origSendBeacon = (
|
|
6449
|
-
const
|
|
6447
|
+
var Pi;
|
|
6448
|
+
Ge.origSendBeacon = (Pi = window == null ? void 0 : window.navigator) == null ? void 0 : Pi.sendBeacon;
|
|
6449
|
+
const Li = (t) => console.warn(`Openreplay: Can't find ${t} in global context.
|
|
6450
6450
|
If you're using serverside rendering in your app, make sure that tracker is loaded dynamically, otherwise ${t} won't be tracked.`);
|
|
6451
6451
|
function Ca(t, e, n, i, s, r, o) {
|
|
6452
6452
|
var l;
|
|
6453
|
-
t.XMLHttpRequest ? t.XMLHttpRequest = Ta.create(e, n, i, s, r, o) :
|
|
6453
|
+
t.XMLHttpRequest ? t.XMLHttpRequest = Ta.create(e, n, i, s, r, o) : Li("XMLHttpRequest"), t.fetch ? t.fetch = xa.create(e, n, i, s, r, o) : Li("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = Ge.create(e, n, i, s, r));
|
|
6454
6454
|
}
|
|
6455
6455
|
function un(t) {
|
|
6456
6456
|
return t.__or_req_data__ || (t.__or_req_data__ = { body: void 0, headers: {} }), t.__or_req_data__;
|
|
@@ -6513,16 +6513,16 @@ function _a(t, e = {}) {
|
|
|
6513
6513
|
return O;
|
|
6514
6514
|
const I = O.clone();
|
|
6515
6515
|
return I.text().then((E) => {
|
|
6516
|
-
const P = {},
|
|
6516
|
+
const P = {}, G = {};
|
|
6517
6517
|
if (i !== !0) {
|
|
6518
|
-
const C = ([
|
|
6519
|
-
s(
|
|
6518
|
+
const C = ([M, W]) => {
|
|
6519
|
+
s(M) || (P[M] = W);
|
|
6520
6520
|
};
|
|
6521
|
-
k.headers instanceof Headers ? k.headers.forEach((
|
|
6522
|
-
s(
|
|
6521
|
+
k.headers instanceof Headers ? k.headers.forEach((M, W) => C([W, M])) : Array.isArray(k.headers) ? k.headers.forEach(C) : typeof k.headers == "object" && Object.entries(k.headers).forEach(C), I.headers.forEach((M, W) => {
|
|
6522
|
+
s(W) || (G[W] = M);
|
|
6523
6523
|
});
|
|
6524
6524
|
}
|
|
6525
|
-
const j = Mi(k.method),
|
|
6525
|
+
const j = Mi(k.method), $ = l({
|
|
6526
6526
|
url: String(D),
|
|
6527
6527
|
method: j,
|
|
6528
6528
|
status: I.status,
|
|
@@ -6532,11 +6532,11 @@ function _a(t, e = {}) {
|
|
|
6532
6532
|
body: k.body || null
|
|
6533
6533
|
},
|
|
6534
6534
|
response: {
|
|
6535
|
-
headers:
|
|
6535
|
+
headers: G,
|
|
6536
6536
|
body: E
|
|
6537
6537
|
}
|
|
6538
6538
|
});
|
|
6539
|
-
|
|
6539
|
+
$ && t.send(xt("fetch", j, String($.url), a($.request), a($.response), I.status, N + Ve(), L, 0));
|
|
6540
6540
|
}).catch((E) => t.debug.error("Could not process Fetch response:", E)), O;
|
|
6541
6541
|
});
|
|
6542
6542
|
};
|
|
@@ -6549,12 +6549,12 @@ function _a(t, e = {}) {
|
|
|
6549
6549
|
return N.addEventListener("loadstart", (L) => {
|
|
6550
6550
|
O = L.timeStamp;
|
|
6551
6551
|
}), N.addEventListener("load", t.safe((L) => {
|
|
6552
|
-
const { headers: I, body: E } = un(N), P = O > 0 ? L.timeStamp - O : 0, j = (N.getAllResponseHeaders() || "").trim().split(/[\r\n]+/),
|
|
6553
|
-
j.forEach(function(
|
|
6554
|
-
const
|
|
6555
|
-
s(U) || (
|
|
6552
|
+
const { headers: I, body: E } = un(N), P = O > 0 ? L.timeStamp - O : 0, j = (N.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), $ = {};
|
|
6553
|
+
j.forEach(function(W) {
|
|
6554
|
+
const V = W.split(": "), U = V.shift();
|
|
6555
|
+
s(U) || ($[U] = V.join(": "));
|
|
6556
6556
|
});
|
|
6557
|
-
const C = Mi(D),
|
|
6557
|
+
const C = Mi(D), M = l({
|
|
6558
6558
|
url: String(k),
|
|
6559
6559
|
method: C,
|
|
6560
6560
|
status: N.status,
|
|
@@ -6564,11 +6564,11 @@ function _a(t, e = {}) {
|
|
|
6564
6564
|
body: E || null
|
|
6565
6565
|
},
|
|
6566
6566
|
response: {
|
|
6567
|
-
headers:
|
|
6567
|
+
headers: $,
|
|
6568
6568
|
body: N.response
|
|
6569
6569
|
}
|
|
6570
6570
|
});
|
|
6571
|
-
|
|
6571
|
+
M && t.send(xt("xhr", C, String(M.url), a(M.request), a(M.response), N.status, O + Ve(), P, 0));
|
|
6572
6572
|
})), y.apply(this, arguments);
|
|
6573
6573
|
}
|
|
6574
6574
|
function A(D) {
|
|
@@ -6593,9 +6593,9 @@ function Na(t) {
|
|
|
6593
6593
|
const e = document.getSelection();
|
|
6594
6594
|
if (e !== null && !e.isCollapsed) {
|
|
6595
6595
|
const n = t.nodes.getID(e.anchorNode), i = t.nodes.getID(e.focusNode), s = e.toString().replace(/\s+/g, " ");
|
|
6596
|
-
n && i && t.send(
|
|
6596
|
+
n && i && t.send(di(n, i, s));
|
|
6597
6597
|
} else
|
|
6598
|
-
t.send(
|
|
6598
|
+
t.send(di(-1, -1, ""));
|
|
6599
6599
|
});
|
|
6600
6600
|
}
|
|
6601
6601
|
function Oa(t) {
|
|
@@ -6622,7 +6622,7 @@ class Aa {
|
|
|
6622
6622
|
var l;
|
|
6623
6623
|
if (this.options = e, this.app = null, this.crossdomainMode = !1, this.checkDoNotTrack = () => this.options.respectDoNotTrack && (navigator.doNotTrack == "1" || // @ts-ignore
|
|
6624
6624
|
window.doNotTrack == "1"), this.signalStartIssue = (a, d) => {
|
|
6625
|
-
const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), p = this.options.ingestPoint ||
|
|
6625
|
+
const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), p = this.options.ingestPoint || gs;
|
|
6626
6626
|
u.open("POST", p + "/v1/web/not-started"), u.send(JSON.stringify({
|
|
6627
6627
|
trackerVersion: "14.0.4",
|
|
6628
6628
|
projectKey: this.options.projectKey,
|
|
@@ -6637,7 +6637,7 @@ class Aa {
|
|
|
6637
6637
|
const c = Et(a, [], d);
|
|
6638
6638
|
this.app.send(c);
|
|
6639
6639
|
} else if (a instanceof ErrorEvent || "PromiseRejectionEvent" in window && a instanceof PromiseRejectionEvent) {
|
|
6640
|
-
const c =
|
|
6640
|
+
const c = ys(a, void 0, d);
|
|
6641
6641
|
c != null && this.app.send(c);
|
|
6642
6642
|
}
|
|
6643
6643
|
}
|
|
@@ -7443,16 +7443,16 @@ margin-top: auto; /* прижимает .bottom-row к низу
|
|
|
7443
7443
|
qn.rel = "stylesheet";
|
|
7444
7444
|
qn.href = "https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap";
|
|
7445
7445
|
document.head.appendChild(qn);
|
|
7446
|
-
const
|
|
7447
|
-
var
|
|
7448
|
-
document.documentElement.style.setProperty("--wineater-color", ((
|
|
7449
|
-
|
|
7450
|
-
document.head.appendChild(
|
|
7451
|
-
const La = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi", "ampely", "test"],
|
|
7446
|
+
const Is = document.createElement("style");
|
|
7447
|
+
var Bi;
|
|
7448
|
+
document.documentElement.style.setProperty("--wineater-color", ((Bi = window == null ? void 0 : window.wineaterData) == null ? void 0 : Bi.COLOR) || "#7B2BEB");
|
|
7449
|
+
Is.textContent = Da;
|
|
7450
|
+
document.head.appendChild(Is);
|
|
7451
|
+
const La = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi", "ampely", "test"], Ma = "HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";
|
|
7452
7452
|
class At {
|
|
7453
7453
|
constructor(e) {
|
|
7454
7454
|
var n;
|
|
7455
|
-
this.baseURL = "https://wineater-backend.vercel.app/", this.store = La.find((i) => window.location.href.includes(i)), this.token = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.CLIENT_TOKEN) ||
|
|
7455
|
+
this.baseURL = "https://wineater-backend.vercel.app/", this.store = La.find((i) => window.location.href.includes(i)), this.token = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.CLIENT_TOKEN) || Ma;
|
|
7456
7456
|
}
|
|
7457
7457
|
async getStoreConfig(e) {
|
|
7458
7458
|
console.log(e);
|
|
@@ -7547,7 +7547,7 @@ class At {
|
|
|
7547
7547
|
}
|
|
7548
7548
|
}
|
|
7549
7549
|
}
|
|
7550
|
-
class
|
|
7550
|
+
class Fa {
|
|
7551
7551
|
constructor() {
|
|
7552
7552
|
this.api = new At(), this.language = "en", this.translations = {
|
|
7553
7553
|
fr: {
|
|
@@ -7953,7 +7953,7 @@ class Ma {
|
|
|
7953
7953
|
return i;
|
|
7954
7954
|
}
|
|
7955
7955
|
}
|
|
7956
|
-
const
|
|
7956
|
+
const J = new Fa(), fn = {
|
|
7957
7957
|
barName: "LENEZ",
|
|
7958
7958
|
dishGroups: [
|
|
7959
7959
|
{
|
|
@@ -8016,18 +8016,18 @@ class Pa {
|
|
|
8016
8016
|
}
|
|
8017
8017
|
getTitle(e) {
|
|
8018
8018
|
return e ? `<h1 class="wine-widget-big-title">${e}</h1>` : `<h1 class="wine-widget-big-title">
|
|
8019
|
-
${
|
|
8019
|
+
${J.translate("headerLine1")}
|
|
8020
8020
|
<span class="icon icon-meal"></span>
|
|
8021
|
-
<span class="icon-label">${
|
|
8021
|
+
<span class="icon-label">${J.translate("headerMeal")}</span>,
|
|
8022
8022
|
<span class="icon icon-mood"></span>
|
|
8023
|
-
<span class="icon-label">${
|
|
8023
|
+
<span class="icon-label">${J.translate("headerMood")}</span>
|
|
8024
8024
|
</br>
|
|
8025
8025
|
<!-- <span class="icon icon-budget"></span> -->
|
|
8026
|
-
<!-- <span class="icon-label">${
|
|
8027
|
-
${
|
|
8026
|
+
<!-- <span class="icon-label">${J.translate("headerBudget")}</span>, -->
|
|
8027
|
+
${J.translate("headerOr")}
|
|
8028
8028
|
<span class="icon icon-occasion"></span>
|
|
8029
|
-
<span class="icon-label">${
|
|
8030
|
-
${
|
|
8029
|
+
<span class="icon-label">${J.translate("headerOccasion")}</span>
|
|
8030
|
+
${J.translate("headerLine2")}
|
|
8031
8031
|
</h1>`;
|
|
8032
8032
|
}
|
|
8033
8033
|
initializeWidget() {
|
|
@@ -8048,11 +8048,11 @@ class Pa {
|
|
|
8048
8048
|
<input
|
|
8049
8049
|
type="text"
|
|
8050
8050
|
id="wine-search-input"
|
|
8051
|
-
placeholder="${
|
|
8051
|
+
placeholder="${J.translate("searchPlaceholder")}">
|
|
8052
8052
|
|
|
8053
8053
|
<!-- Кнопка -->
|
|
8054
8054
|
<button id="wine-search-button">
|
|
8055
|
-
${
|
|
8055
|
+
${J.translate("searchButton")}
|
|
8056
8056
|
</button>
|
|
8057
8057
|
</div>
|
|
8058
8058
|
<div id="wine-widget-right">
|
|
@@ -8065,9 +8065,9 @@ class Pa {
|
|
|
8065
8065
|
</div>
|
|
8066
8066
|
<div id="powered-by-widget">
|
|
8067
8067
|
<a href="https://wineater.com" target="_blank">
|
|
8068
|
-
<span>${
|
|
8069
|
-
<img src="${
|
|
8070
|
-
<span>${
|
|
8068
|
+
<span>${J.translate("poweredBy")}</span>
|
|
8069
|
+
<img src="${J.translate("lang") === "ru" ? "https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/divino_logo.svg?x=5" : "https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo_medium_gray.svg"}" alt="Wineater Logo">
|
|
8070
|
+
<span>${J.translate("AI sommelier")}</span>
|
|
8071
8071
|
</a>
|
|
8072
8072
|
</div>
|
|
8073
8073
|
</div>
|
|
@@ -8106,13 +8106,13 @@ class Pa {
|
|
|
8106
8106
|
<input
|
|
8107
8107
|
type="text"
|
|
8108
8108
|
id="bar-notes-input"
|
|
8109
|
-
placeholder="${
|
|
8109
|
+
placeholder="${J.translate("barNotesPlaceholder")}"
|
|
8110
8110
|
/>
|
|
8111
8111
|
<button id="bar-send-button">
|
|
8112
|
-
${
|
|
8112
|
+
${J.translate("barSendButton")}
|
|
8113
8113
|
</button>
|
|
8114
8114
|
<button id="bar-reset-button" class="hidden">
|
|
8115
|
-
${
|
|
8115
|
+
${J.translate("barResetButton")}
|
|
8116
8116
|
</button>
|
|
8117
8117
|
</div>
|
|
8118
8118
|
|
|
@@ -8158,7 +8158,7 @@ class Pa {
|
|
|
8158
8158
|
const a = l.slice(0, 3).join(" • "), d = l.slice(3).join(" • "), c = `
|
|
8159
8159
|
<div class="wine-recommendation-tile ${s.isSommSelection ? "somm-selection" : ""}">
|
|
8160
8160
|
${s.isSommSelection ? `<div class="somm-selection-badge">
|
|
8161
|
-
${
|
|
8161
|
+
${J.translate("wineDetails.sommSelection")}
|
|
8162
8162
|
</div>` : ""}
|
|
8163
8163
|
|
|
8164
8164
|
<div class="tile-top">
|
|
@@ -8185,7 +8185,7 @@ class Pa {
|
|
|
8185
8185
|
<!-- Кнопка Buy, видна только при наведении -->
|
|
8186
8186
|
<div class="bottom-row">
|
|
8187
8187
|
<a class="buy-btn" href="${s.url || s.Url}" target="_blank">
|
|
8188
|
-
${
|
|
8188
|
+
${J.translate("wineDetails.buy")}
|
|
8189
8189
|
</a>
|
|
8190
8190
|
</div>
|
|
8191
8191
|
</div>
|
|
@@ -8217,7 +8217,7 @@ class Pa {
|
|
|
8217
8217
|
const e = document.getElementById("wine-placeholder");
|
|
8218
8218
|
e.innerHTML = `
|
|
8219
8219
|
<div class="no-results">
|
|
8220
|
-
<p>${
|
|
8220
|
+
<p>${J.translate("noResultsMessage") || "No recommendations found for your query."}</p>
|
|
8221
8221
|
</div>
|
|
8222
8222
|
`;
|
|
8223
8223
|
}
|
|
@@ -8225,7 +8225,7 @@ class Pa {
|
|
|
8225
8225
|
const e = document.getElementById("wine-placeholder");
|
|
8226
8226
|
e.innerHTML = `
|
|
8227
8227
|
<div class="error-message">
|
|
8228
|
-
<p>${
|
|
8228
|
+
<p>${J.translate("errorMessage") || "Something went wrong. Please try again later."}</p>
|
|
8229
8229
|
</div>
|
|
8230
8230
|
`;
|
|
8231
8231
|
}
|
|
@@ -8269,7 +8269,7 @@ class Pa {
|
|
|
8269
8269
|
}));
|
|
8270
8270
|
}
|
|
8271
8271
|
initializeSearchAnimation() {
|
|
8272
|
-
const e = document.getElementById("wine-search-input"), n =
|
|
8272
|
+
const e = document.getElementById("wine-search-input"), n = J.translate("placeholderSuggestions");
|
|
8273
8273
|
let i = 0, s = 0, r = !0, o = !1;
|
|
8274
8274
|
const l = () => {
|
|
8275
8275
|
o || (r ? (e.placeholder = n[i].substring(0, s++), s > n[i].length ? (r = !1, setTimeout(l, 2e3)) : setTimeout(l, 100)) : (e.placeholder = n[i].substring(0, s--), s < 0 ? (r = !0, i = (i + 1) % n.length, setTimeout(l, 500)) : setTimeout(l, 50)));
|
|
@@ -8285,7 +8285,7 @@ class Ba {
|
|
|
8285
8285
|
constructor() {
|
|
8286
8286
|
var n;
|
|
8287
8287
|
this.api = new At();
|
|
8288
|
-
const e = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.FIRST_MESSAGE_TEXT) ||
|
|
8288
|
+
const e = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.FIRST_MESSAGE_TEXT) || J.translate("welcomeMessage");
|
|
8289
8289
|
this.displayFirstMessage(e);
|
|
8290
8290
|
}
|
|
8291
8291
|
initialize() {
|
|
@@ -8302,11 +8302,11 @@ class Ba {
|
|
|
8302
8302
|
if (n) {
|
|
8303
8303
|
this.displayMessage(n, "user"), e.value = "", this.showTypingIndicator();
|
|
8304
8304
|
try {
|
|
8305
|
-
|
|
8305
|
+
As(n);
|
|
8306
8306
|
const i = await this.api.getWineRecommendations(n);
|
|
8307
8307
|
this.hideTypingIndicator(), i && i.length ? this.displayResults(i) : this.displayMessage("No results found.", "api");
|
|
8308
8308
|
} catch {
|
|
8309
|
-
this.hideTypingIndicator(), this.displayMessage(
|
|
8309
|
+
this.hideTypingIndicator(), this.displayMessage(J.translate("somethingWentWrong"), "api");
|
|
8310
8310
|
}
|
|
8311
8311
|
}
|
|
8312
8312
|
}
|
|
@@ -8321,12 +8321,12 @@ class Ba {
|
|
|
8321
8321
|
s.textContent = e, s.className = "message " + n, i.appendChild(s), i.scrollTop = i.scrollHeight;
|
|
8322
8322
|
}
|
|
8323
8323
|
sendAnalytics(e) {
|
|
8324
|
-
console.log(e),
|
|
8324
|
+
console.log(e), Ls(e);
|
|
8325
8325
|
}
|
|
8326
8326
|
displayResults(e) {
|
|
8327
8327
|
console.log(e);
|
|
8328
8328
|
const n = document.getElementById("message-container");
|
|
8329
|
-
|
|
8329
|
+
Ds(e.map((i) => i.Title)), e.forEach((i) => {
|
|
8330
8330
|
const s = document.createElement("div");
|
|
8331
8331
|
s.className = "wine-recommendation";
|
|
8332
8332
|
const r = document.createElement("div");
|
|
@@ -8336,10 +8336,10 @@ class Ba {
|
|
|
8336
8336
|
const l = document.createElement("div");
|
|
8337
8337
|
l.innerHTML = `
|
|
8338
8338
|
<strong>${i.Title}</strong><br>
|
|
8339
|
-
${
|
|
8340
|
-
${
|
|
8341
|
-
${
|
|
8342
|
-
<a href="${i.Url}" target="_blank">${
|
|
8339
|
+
${J.translate("price")}: ${i.Price}<br>
|
|
8340
|
+
${J.translate("region")}: ${i.Region}<br>
|
|
8341
|
+
${J.translate("type")}: ${i.Type}<br>
|
|
8342
|
+
<a href="${i.Url}" target="_blank">${J.translate("moreInfo")}</a>
|
|
8343
8343
|
`, l.querySelector("a").addEventListener("click", (c) => {
|
|
8344
8344
|
c.preventDefault(), this.sendAnalytics(i.Title), window.open(i.Url, "_blank");
|
|
8345
8345
|
}), r.appendChild(l);
|
|
@@ -8352,12 +8352,12 @@ const ja = 3;
|
|
|
8352
8352
|
let gt = null;
|
|
8353
8353
|
function za() {
|
|
8354
8354
|
const t = document.getElementById("chat-window"), e = document.getElementById("chat-icon");
|
|
8355
|
-
t.classList.contains("visible") ? (
|
|
8355
|
+
t.classList.contains("visible") ? (qi(), Ua(), e.style.display = "flex") : (gt && (clearTimeout(gt), gt = null), Rs(), t.classList.add("visible"), e.style.display = "none");
|
|
8356
8356
|
}
|
|
8357
8357
|
function Ua() {
|
|
8358
|
-
console.log("ghbdtn"),
|
|
8358
|
+
console.log("ghbdtn"), qi(), document.getElementById("chat-window").classList.remove("visible");
|
|
8359
8359
|
let e = parseInt(oe("chatCloseCount")) || 0;
|
|
8360
|
-
e += 1, e >= ja ? (console.log(e), mt("disableAutoOpen", "true", 1),
|
|
8360
|
+
e += 1, e >= ja ? (console.log(e), mt("disableAutoOpen", "true", 1), Ns("chatCloseCount")) : (console.log(e), mt("chatCloseCount", e, 1));
|
|
8361
8361
|
}
|
|
8362
8362
|
document.addEventListener("DOMContentLoaded", () => {
|
|
8363
8363
|
setupCloseButton(), setupOutsideClick();
|
|
@@ -8370,21 +8370,21 @@ const dt = {
|
|
|
8370
8370
|
PRODUCT_PAGES: /producto\/[^\/]+\/$/
|
|
8371
8371
|
// Matches any product page like 'producto/any-product-name/'
|
|
8372
8372
|
// CART_PAGE: /carrito\/$/ // Matches the cart page like 'carrito/'
|
|
8373
|
-
},
|
|
8373
|
+
}, Fi = {
|
|
8374
8374
|
FESTIVAL_PAGES: /festival/,
|
|
8375
8375
|
// Matches any URL containing 'festival'
|
|
8376
8376
|
TASTING_PAGES: /tasting/
|
|
8377
8377
|
// Matches any URL containing 'tasting'
|
|
8378
8378
|
};
|
|
8379
|
-
var
|
|
8379
|
+
var ji, zi;
|
|
8380
8380
|
const $a = {
|
|
8381
|
-
FESTIVAL_PAGES: ((
|
|
8382
|
-
TASTING_PAGES: ((
|
|
8381
|
+
FESTIVAL_PAGES: ((ji = window.wineaterData) == null ? void 0 : ji.FESTIVAL_PAGES) || Fi.FESTIVAL_PAGES,
|
|
8382
|
+
TASTING_PAGES: ((zi = window.wineaterData) == null ? void 0 : zi.TASTING_PAGES) || Fi.TASTING_PAGES
|
|
8383
8383
|
};
|
|
8384
|
-
var
|
|
8384
|
+
var Ui, Hi;
|
|
8385
8385
|
const qa = {
|
|
8386
|
-
PRODUCT_PAGES: ((
|
|
8387
|
-
CART_PAGE: ((
|
|
8386
|
+
PRODUCT_PAGES: ((Ui = window.wineaterData) == null ? void 0 : Ui.PRODUCT_PAGES) || dt.PRODUCT_PAGES,
|
|
8387
|
+
CART_PAGE: ((Hi = window.wineaterData) == null ? void 0 : Hi.CART_PAGE) || (dt == null ? void 0 : dt.CART_PAGE)
|
|
8388
8388
|
};
|
|
8389
8389
|
async function Wa() {
|
|
8390
8390
|
const t = window.location.href;
|
|
@@ -8415,7 +8415,7 @@ class Va {
|
|
|
8415
8415
|
}
|
|
8416
8416
|
async initFlagsmith() {
|
|
8417
8417
|
try {
|
|
8418
|
-
await
|
|
8418
|
+
await Fs.init({
|
|
8419
8419
|
environmentID: "5RfiDoiqb4dHrNdQvzbkfM",
|
|
8420
8420
|
cacheFlags: !1,
|
|
8421
8421
|
enableAnalytics: !0,
|
|
@@ -8427,47 +8427,17 @@ class Va {
|
|
|
8427
8427
|
}
|
|
8428
8428
|
async initTranslator() {
|
|
8429
8429
|
const e = this.store ? this.store.charAt(0).toUpperCase() + this.store.slice(1) : "Test";
|
|
8430
|
-
await
|
|
8430
|
+
await J.fetchConfig(e || "Test");
|
|
8431
8431
|
}
|
|
8432
8432
|
initCookies() {
|
|
8433
8433
|
var e;
|
|
8434
|
-
mt("chatbotToken", ((e = window.wineaterData) == null ? void 0 : e.CLIENT_TOKEN) || Ga, 365),
|
|
8434
|
+
mt("chatbotToken", ((e = window.wineaterData) == null ? void 0 : e.CLIENT_TOKEN) || Ga, 365), Os();
|
|
8435
8435
|
}
|
|
8436
8436
|
async initializeChatbotOrWidget() {
|
|
8437
8437
|
this.type === "widget" ? new Pa() : (this.createChatbotUI(), this.setupChatListeners(), this.setupChatButtonListener(), Ka(this.position), new Ba().initialize());
|
|
8438
8438
|
}
|
|
8439
8439
|
createChatbotUI() {
|
|
8440
|
-
|
|
8441
|
-
const e = Yn.getValue("chat-btn-txt"), i = `
|
|
8442
|
-
<div id="chatbot-container">
|
|
8443
|
-
<div id="chat-icon">
|
|
8444
|
-
<img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/chat-icon.svg" alt="Chat Icon">
|
|
8445
|
-
<span>${((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.BUTTON_TEXT) || $.translate(`chatButton${e}`)}</span>
|
|
8446
|
-
</div>
|
|
8447
|
-
<div id="chat-window" class="hidden">
|
|
8448
|
-
<div id="chat-header">
|
|
8449
|
-
<div id="chat-title">
|
|
8450
|
-
<h1>${$.translate("chatTitle")}</h1>
|
|
8451
|
-
</div>
|
|
8452
|
-
<div id="close-btn">×</div>
|
|
8453
|
-
</div>
|
|
8454
|
-
<div id="message-container"></div>
|
|
8455
|
-
<div id="typing-indicator" class="typing-indicator hidden">
|
|
8456
|
-
<span></span><span></span><span></span>
|
|
8457
|
-
</div>
|
|
8458
|
-
<div id="input-container">
|
|
8459
|
-
<input type="text" id="user-input" placeholder="${$.translate("inputPlaceholder")}">
|
|
8460
|
-
<button id="send-button">${$.translate("sendButton")}</button>
|
|
8461
|
-
</div>
|
|
8462
|
-
<div id="powered-by">
|
|
8463
|
-
<a href="https://wineater.com" target="_blank">
|
|
8464
|
-
<span>${$.translate("poweredBy")}</span>
|
|
8465
|
-
<img src="https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo.svg" alt="Wineater Logo" id="chatbot-logo">
|
|
8466
|
-
</a>
|
|
8467
|
-
</div>
|
|
8468
|
-
</div>
|
|
8469
|
-
`;
|
|
8470
|
-
document.body.insertAdjacentHTML("beforeend", i);
|
|
8440
|
+
document.body.insertAdjacentHTML("beforeend", "");
|
|
8471
8441
|
}
|
|
8472
8442
|
setupChatListeners() {
|
|
8473
8443
|
document.getElementById("close-btn").addEventListener("click", za), window.addEventListener("click", (n) => {
|