leesto-connect 0.1.1 → 0.3.0
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/README.md +30 -1
- package/dist/chunks/dist-BTlWkbvW.js.map +1 -1
- package/dist/chunks/rrweb-qwppqH_c.js.map +1 -1
- package/dist/leesto-connect.js +1225 -444
- package/dist/leesto-connect.js.map +1 -1
- package/package.json +18 -3
package/dist/leesto-connect.js
CHANGED
|
@@ -1,194 +1,218 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
100: "#dcfce7",
|
|
4
|
-
200: "#bbf7d0",
|
|
5
|
-
300: "#86efac",
|
|
6
|
-
400: "#4ade80",
|
|
7
|
-
500: "#22c55e",
|
|
8
|
-
600: "#16a34a",
|
|
9
|
-
700: "#15803d",
|
|
10
|
-
800: "#166534",
|
|
11
|
-
900: "#14532d",
|
|
12
|
-
950: "#052e16"
|
|
13
|
-
}, Q = {
|
|
14
|
-
primary: "#08783f",
|
|
15
|
-
hover: "#066633",
|
|
16
|
-
foreground: "#f3fff7"
|
|
17
|
-
}, ee = {
|
|
18
|
-
primary: "#46c383",
|
|
19
|
-
hover: "#65d49b",
|
|
20
|
-
foreground: "#082315"
|
|
21
|
-
}, te = {
|
|
22
|
-
palette: J,
|
|
23
|
-
light: Q,
|
|
24
|
-
dark: ee
|
|
25
|
-
};
|
|
26
|
-
function ne(e) {
|
|
1
|
+
var Qe = "login", et = "rrweb-buffer", tt = 6e3;
|
|
2
|
+
function nt(e) {
|
|
27
3
|
return typeof e == "object" && e !== null && typeof e.type == "string" && e.type.startsWith("leesto:");
|
|
28
4
|
}
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
5
|
+
var rt = [
|
|
6
|
+
"mask_all",
|
|
7
|
+
"labels_visible",
|
|
8
|
+
"inputs_only"
|
|
9
|
+
], re = "mask_all";
|
|
10
|
+
function ot(e) {
|
|
11
|
+
return typeof e == "string" && rt.includes(e);
|
|
32
12
|
}
|
|
33
|
-
|
|
13
|
+
var Pe = "leesto_diag", xe = "leesto_run", we = "X-Leesto-Run-Id", De = "leesto_mask", be = [
|
|
14
|
+
Pe,
|
|
15
|
+
xe,
|
|
16
|
+
De
|
|
17
|
+
], st = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
18
|
+
function Z(e) {
|
|
19
|
+
return typeof e == "string" && st.test(e);
|
|
20
|
+
}
|
|
21
|
+
function it() {
|
|
34
22
|
try {
|
|
35
23
|
const e = globalThis.crypto, t = e?.randomUUID?.();
|
|
36
|
-
if (
|
|
24
|
+
if (Z(t)) return t;
|
|
37
25
|
if (!e?.getRandomValues) return;
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
return
|
|
26
|
+
const n = e.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
27
|
+
n[6] = (n[6] ?? 0) & 15 | 64, n[8] = (n[8] ?? 0) & 63 | 128;
|
|
28
|
+
const r = Array.from(n, (o) => o.toString(16).padStart(2, "0")).join(""), s = `${r.slice(0, 8)}-${r.slice(8, 12)}-${r.slice(12, 16)}-${r.slice(16, 20)}-${r.slice(20)}`;
|
|
29
|
+
return Z(s) ? s : void 0;
|
|
42
30
|
} catch {
|
|
43
31
|
return;
|
|
44
32
|
}
|
|
45
33
|
}
|
|
46
|
-
function
|
|
34
|
+
function at(e) {
|
|
47
35
|
try {
|
|
48
|
-
const t = new URLSearchParams(e).
|
|
49
|
-
return
|
|
36
|
+
const t = new URLSearchParams(e).getAll(De), [n] = t;
|
|
37
|
+
return t.some((r) => r !== n) ? re : ot(n) ? n : re;
|
|
38
|
+
} catch {
|
|
39
|
+
return re;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function lt(e) {
|
|
43
|
+
try {
|
|
44
|
+
const t = new URLSearchParams(e).get(xe);
|
|
45
|
+
return Z(t) ? t : void 0;
|
|
50
46
|
} catch {
|
|
51
47
|
return;
|
|
52
48
|
}
|
|
53
49
|
}
|
|
54
50
|
function ce(e) {
|
|
55
51
|
try {
|
|
56
|
-
return new URLSearchParams(e).get(
|
|
52
|
+
return new URLSearchParams(e).get(Pe) === "1";
|
|
57
53
|
} catch {
|
|
58
54
|
return !1;
|
|
59
55
|
}
|
|
60
56
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
function ct(e, t) {
|
|
58
|
+
if (ce(e)) return e;
|
|
59
|
+
if (typeof t != "string" || !t.startsWith("leesto-arming?")) return "";
|
|
60
|
+
const n = `?${t.slice(14)}`;
|
|
61
|
+
return ce(n) ? n : "";
|
|
62
|
+
}
|
|
63
|
+
function ut(e) {
|
|
64
|
+
try {
|
|
65
|
+
const t = new URL(e);
|
|
66
|
+
if (!be.some((n) => t.searchParams.has(n))) return e;
|
|
67
|
+
for (const n of be) t.searchParams.delete(n);
|
|
68
|
+
return t.href;
|
|
69
|
+
} catch {
|
|
70
|
+
return e;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
var Ee = "leesto/console", oe = "leesto/network", ft = "leesto/network-ring", dt = "leesto/console-ring", pt = {
|
|
74
|
+
primary: "#08783f",
|
|
75
|
+
hover: "#066633",
|
|
76
|
+
foreground: "#f3fff7"
|
|
77
|
+
}, ht = {
|
|
78
|
+
primary: "#46c383",
|
|
79
|
+
hover: "#65d49b",
|
|
80
|
+
foreground: "#082315"
|
|
81
|
+
}, mt = {
|
|
82
|
+
light: pt,
|
|
83
|
+
dark: ht
|
|
84
|
+
};
|
|
85
|
+
function X(e) {
|
|
86
|
+
const t = [];
|
|
87
|
+
return {
|
|
88
|
+
push(n) {
|
|
89
|
+
t.push(n), t.length > e && t.shift();
|
|
90
|
+
},
|
|
91
|
+
snapshot() {
|
|
92
|
+
return t.slice();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
var gt = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g, yt = /\b\d{3}-\d{2}-\d{4}\b/g, vt = /\d(?:[ -]?\d){12,18}/g;
|
|
97
|
+
function wt(e) {
|
|
98
|
+
let t = 0, n = !1;
|
|
99
|
+
for (let r = e.length - 1; r >= 0; r--) {
|
|
100
|
+
let s = e.charCodeAt(r) - 48;
|
|
101
|
+
if (s < 0 || s > 9) return !1;
|
|
102
|
+
n && (s *= 2, s > 9 && (s -= 9)), t += s, n = !n;
|
|
68
103
|
}
|
|
69
104
|
return t % 10 === 0;
|
|
70
105
|
}
|
|
71
|
-
function
|
|
106
|
+
function U(e) {
|
|
72
107
|
if (!e) return e;
|
|
73
|
-
let t = e.replace(
|
|
74
|
-
return t = t.replace(
|
|
75
|
-
const
|
|
76
|
-
return
|
|
108
|
+
let t = e.replace(gt, "[email masqué]");
|
|
109
|
+
return t = t.replace(yt, "[id masqué]"), t = t.replace(vt, (n) => {
|
|
110
|
+
const r = n.replace(/[ -]/g, "");
|
|
111
|
+
return r.length >= 13 && r.length <= 19 && wt(r) ? "[carte masquée]" : n;
|
|
77
112
|
}), t;
|
|
78
113
|
}
|
|
79
|
-
function
|
|
114
|
+
function H(e) {
|
|
80
115
|
const t = typeof e == "string" ? e : e instanceof URL ? e.href : e instanceof Request ? e.url : String(e);
|
|
81
116
|
try {
|
|
82
|
-
const
|
|
83
|
-
return
|
|
117
|
+
const n = new URL(t, typeof location < "u" ? location.href : void 0);
|
|
118
|
+
return n.origin + U(n.pathname);
|
|
84
119
|
} catch {
|
|
85
|
-
return
|
|
120
|
+
return U(t.split("?")[0] ?? t);
|
|
86
121
|
}
|
|
87
122
|
}
|
|
88
|
-
var
|
|
123
|
+
var bt = /* @__PURE__ */ new Set(["fetch", "xmlhttprequest"]), Et = ["deprecation", "intervention"], St = { teardown: () => {
|
|
89
124
|
} };
|
|
90
|
-
function
|
|
125
|
+
function Rt(e) {
|
|
91
126
|
const t = typeof performance < "u" ? performance.timeOrigin : 0;
|
|
92
127
|
return Math.round(t + e);
|
|
93
128
|
}
|
|
94
|
-
function
|
|
129
|
+
function Lt(e) {
|
|
95
130
|
const t = e.responseStatus;
|
|
96
131
|
return typeof t == "number" && t > 0 ? t : void 0;
|
|
97
132
|
}
|
|
98
|
-
function
|
|
99
|
-
if (
|
|
100
|
-
const t =
|
|
133
|
+
function _t(e) {
|
|
134
|
+
if (bt.has(e.initiatorType)) return null;
|
|
135
|
+
const t = Lt(e), n = e.transferSize || e.encodedBodySize || void 0;
|
|
101
136
|
return {
|
|
102
137
|
method: "GET",
|
|
103
|
-
url:
|
|
138
|
+
url: H(e.name),
|
|
104
139
|
...t !== void 0 ? { status: t } : {},
|
|
105
140
|
durationMs: Math.round(e.duration),
|
|
106
|
-
...
|
|
107
|
-
startedAt:
|
|
141
|
+
...n ? { responseSize: n } : {},
|
|
142
|
+
startedAt: Rt(e.startTime),
|
|
108
143
|
...t !== void 0 && t >= 400 ? { failed: !0 } : {},
|
|
109
144
|
initiatorType: e.initiatorType
|
|
110
145
|
};
|
|
111
146
|
}
|
|
112
|
-
function
|
|
113
|
-
if (typeof window > "u") return
|
|
147
|
+
function kt(e) {
|
|
148
|
+
if (typeof window > "u") return St;
|
|
114
149
|
const t = [];
|
|
115
150
|
if (typeof PerformanceObserver < "u") try {
|
|
116
|
-
const
|
|
117
|
-
for (const
|
|
118
|
-
const
|
|
119
|
-
|
|
151
|
+
const o = new PerformanceObserver((l) => {
|
|
152
|
+
for (const u of l.getEntries()) try {
|
|
153
|
+
const i = _t(u);
|
|
154
|
+
i && e.onResource(i);
|
|
120
155
|
} catch {
|
|
121
156
|
}
|
|
122
157
|
});
|
|
123
|
-
|
|
158
|
+
o.observe({
|
|
124
159
|
type: "resource",
|
|
125
160
|
buffered: !0
|
|
126
|
-
}), t.push(() =>
|
|
161
|
+
}), t.push(() => o.disconnect());
|
|
127
162
|
} catch {
|
|
128
163
|
}
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
131
|
-
const
|
|
132
|
-
for (const
|
|
133
|
-
const
|
|
134
|
-
e.onReport("warn", `Navigateur (${
|
|
164
|
+
const n = window.ReportingObserver;
|
|
165
|
+
if (n) try {
|
|
166
|
+
const o = new n(((l) => {
|
|
167
|
+
for (const u of l) {
|
|
168
|
+
const i = typeof u.body?.message == "string" ? u.body.message : u.type;
|
|
169
|
+
e.onReport("warn", `Navigateur (${u.type}) : ${i}`);
|
|
135
170
|
}
|
|
136
171
|
}), {
|
|
137
|
-
types:
|
|
172
|
+
types: Et,
|
|
138
173
|
buffered: !0
|
|
139
174
|
});
|
|
140
|
-
|
|
175
|
+
o.observe(), t.push(() => o.disconnect());
|
|
141
176
|
} catch {
|
|
142
177
|
}
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
e.onReport("error", `CSP : ${
|
|
178
|
+
const r = (o) => {
|
|
179
|
+
const l = o;
|
|
180
|
+
e.onReport("error", `CSP : ${l.blockedURI || "ressource"} bloqué par « ${l.violatedDirective} »`);
|
|
146
181
|
};
|
|
147
|
-
window.addEventListener("securitypolicyviolation",
|
|
148
|
-
let
|
|
182
|
+
window.addEventListener("securitypolicyviolation", r), t.push(() => window.removeEventListener("securitypolicyviolation", r));
|
|
183
|
+
let s = !1;
|
|
149
184
|
return { teardown: () => {
|
|
150
|
-
if (!
|
|
151
|
-
|
|
152
|
-
for (const
|
|
153
|
-
|
|
185
|
+
if (!s) {
|
|
186
|
+
s = !0;
|
|
187
|
+
for (const o of t) try {
|
|
188
|
+
o();
|
|
154
189
|
} catch {
|
|
155
190
|
}
|
|
156
191
|
}
|
|
157
192
|
} };
|
|
158
193
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
return {
|
|
162
|
-
push(r) {
|
|
163
|
-
t.push(r), t.length > e && t.shift();
|
|
164
|
-
},
|
|
165
|
-
snapshot() {
|
|
166
|
-
return t.slice();
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
var Ee = 50, be = 30, ke = 100, Le = 50, N = 500, Oe = 8e3;
|
|
171
|
-
function j(e) {
|
|
194
|
+
var At = 50, Ot = 30, Tt = 100, Ct = 50, z = 500, It = 8e3;
|
|
195
|
+
function se(e) {
|
|
172
196
|
const t = e instanceof Error ? e.stack : void 0;
|
|
173
197
|
if (t)
|
|
174
|
-
return
|
|
198
|
+
return U(t).slice(0, It);
|
|
175
199
|
}
|
|
176
|
-
function
|
|
200
|
+
function ie(e) {
|
|
177
201
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
178
202
|
if (typeof e == "string") return e;
|
|
179
203
|
if (typeof e == "object" && e !== null) try {
|
|
180
|
-
return JSON.stringify(e, (t,
|
|
204
|
+
return JSON.stringify(e, (t, n) => /^(authorization|cookie|set-cookie|token|access_token|refresh_token|password|secret|api[-_]?key)$/i.test(t) ? "[masqué]" : n).slice(0, 500);
|
|
181
205
|
} catch {
|
|
182
206
|
return "[objet]";
|
|
183
207
|
}
|
|
184
208
|
return String(e);
|
|
185
209
|
}
|
|
186
|
-
function
|
|
210
|
+
function Se(e) {
|
|
187
211
|
if (!e) return;
|
|
188
212
|
const t = Number(e);
|
|
189
213
|
return Number.isFinite(t) && t >= 0 ? t : void 0;
|
|
190
214
|
}
|
|
191
|
-
var
|
|
215
|
+
var Nt = {
|
|
192
216
|
snapshot: () => ({
|
|
193
217
|
errors: [],
|
|
194
218
|
logs: [],
|
|
@@ -201,217 +225,667 @@ var _e = {
|
|
|
201
225
|
teardown: () => {
|
|
202
226
|
}
|
|
203
227
|
};
|
|
204
|
-
function
|
|
205
|
-
if (typeof window > "u") return
|
|
206
|
-
const t =
|
|
207
|
-
if (!
|
|
228
|
+
function qe(e) {
|
|
229
|
+
if (typeof window > "u") return Nt;
|
|
230
|
+
const t = X(At), n = X(Ot), r = X(Tt), s = X(Ct), o = Z(e.runId) ? e.runId : void 0, l = (f) => {
|
|
231
|
+
if (!o) return !1;
|
|
208
232
|
try {
|
|
209
|
-
const
|
|
210
|
-
return
|
|
233
|
+
const p = new URL(String(f), location.href);
|
|
234
|
+
return p.origin === location.origin || (e.runIdOrigins ?? []).includes(p.origin);
|
|
211
235
|
} catch {
|
|
212
236
|
return !1;
|
|
213
237
|
}
|
|
214
238
|
};
|
|
215
|
-
let
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
e.captureNetwork && t.push(
|
|
220
|
-
},
|
|
221
|
-
if (!
|
|
222
|
-
const
|
|
223
|
-
level:
|
|
224
|
-
message:
|
|
225
|
-
...
|
|
226
|
-
...
|
|
239
|
+
let u = e.sink ?? null;
|
|
240
|
+
const i = (f, p) => {
|
|
241
|
+
u?.(f, p);
|
|
242
|
+
}, c = (f) => {
|
|
243
|
+
e.captureNetwork && t.push(f);
|
|
244
|
+
}, a = (f, p, m, E = {}) => {
|
|
245
|
+
if (!p) return;
|
|
246
|
+
const k = {
|
|
247
|
+
level: f,
|
|
248
|
+
message: p,
|
|
249
|
+
...m ? { stack: m } : {},
|
|
250
|
+
...E,
|
|
227
251
|
at: Date.now()
|
|
228
252
|
};
|
|
229
|
-
|
|
230
|
-
},
|
|
253
|
+
s.push(k), i(Ee, k);
|
|
254
|
+
}, d = (f, p) => {
|
|
231
255
|
try {
|
|
232
|
-
const
|
|
233
|
-
|
|
256
|
+
const m = U(p.map(ie).join(" ")).slice(0, z), E = p.find((k) => k instanceof Error);
|
|
257
|
+
a(f, m, se(E), {
|
|
234
258
|
mechanism: "console",
|
|
235
|
-
...
|
|
259
|
+
...E instanceof Error && E.name ? { name: E.name } : {}
|
|
236
260
|
});
|
|
237
261
|
} catch {
|
|
238
262
|
}
|
|
239
|
-
},
|
|
263
|
+
}, y = (f, p) => {
|
|
240
264
|
try {
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
level:
|
|
244
|
-
message:
|
|
265
|
+
const m = U(p.map(ie).join(" ")).slice(0, z);
|
|
266
|
+
m && r.push({
|
|
267
|
+
level: f,
|
|
268
|
+
message: m,
|
|
245
269
|
at: Date.now()
|
|
246
270
|
});
|
|
247
271
|
} catch {
|
|
248
272
|
}
|
|
249
|
-
},
|
|
250
|
-
console.error = (...
|
|
251
|
-
const
|
|
252
|
-
const
|
|
253
|
-
if (
|
|
254
|
-
const
|
|
255
|
-
if (!
|
|
256
|
-
|
|
273
|
+
}, g = console.error, b = console.warn, S = console.log, R = console.info;
|
|
274
|
+
console.error = (...f) => (d("error", f), g.apply(console, f)), console.warn = (...f) => (d("warn", f), b.apply(console, f)), console.log = (...f) => (y("log", f), S.apply(console, f)), console.info = (...f) => (y("info", f), R.apply(console, f));
|
|
275
|
+
const L = (f) => {
|
|
276
|
+
const p = f.target;
|
|
277
|
+
if (p instanceof Element) {
|
|
278
|
+
const E = p.src || p.href || "";
|
|
279
|
+
if (!E) return;
|
|
280
|
+
a("error", `Ressource non chargée : <${p.tagName.toLowerCase()}> ${H(E)}`.slice(0, z), void 0, {
|
|
257
281
|
mechanism: "resource",
|
|
258
|
-
sourceUrl:
|
|
282
|
+
sourceUrl: H(E)
|
|
259
283
|
});
|
|
260
284
|
return;
|
|
261
285
|
}
|
|
262
|
-
const
|
|
263
|
-
|
|
286
|
+
const m = f;
|
|
287
|
+
a("error", U(`Erreur non gérée : ${m.message}`).slice(0, z), se(m.error), {
|
|
264
288
|
mechanism: "window.error",
|
|
265
|
-
...typeof
|
|
266
|
-
...typeof
|
|
267
|
-
...typeof
|
|
268
|
-
...typeof
|
|
289
|
+
...typeof m.error?.name == "string" ? { name: m.error.name } : {},
|
|
290
|
+
...typeof m.filename == "string" && m.filename ? { sourceUrl: H(m.filename) } : {},
|
|
291
|
+
...typeof m.lineno == "number" && m.lineno > 0 ? { line: m.lineno } : {},
|
|
292
|
+
...typeof m.colno == "number" && m.colno > 0 ? { column: m.colno } : {}
|
|
269
293
|
});
|
|
270
|
-
},
|
|
271
|
-
|
|
294
|
+
}, C = (f) => {
|
|
295
|
+
a("error", U(`Promesse rejetée : ${ie(f.reason)}`).slice(0, z), se(f.reason), {
|
|
272
296
|
mechanism: "unhandledrejection",
|
|
273
|
-
...
|
|
297
|
+
...f.reason instanceof Error && f.reason.name ? { name: f.reason.name } : {}
|
|
274
298
|
});
|
|
275
299
|
};
|
|
276
|
-
window.addEventListener("error",
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
const
|
|
280
|
-
let
|
|
281
|
-
if (
|
|
282
|
-
const
|
|
283
|
-
for (const [
|
|
284
|
-
|
|
285
|
-
...
|
|
286
|
-
headers:
|
|
300
|
+
window.addEventListener("error", L, !0), window.addEventListener("unhandledrejection", C);
|
|
301
|
+
const T = typeof window.fetch == "function" ? window.fetch.bind(window) : null;
|
|
302
|
+
T && (window.fetch = (async (f, p) => {
|
|
303
|
+
const m = Date.now(), E = (p?.method ?? (f instanceof Request ? f.method : "GET") ?? "GET").toUpperCase(), k = H(f);
|
|
304
|
+
let x = p;
|
|
305
|
+
if (o && l(f)) {
|
|
306
|
+
const _ = new Headers(f instanceof Request ? f.headers : void 0);
|
|
307
|
+
for (const [D, A] of new Headers(p?.headers)) _.set(D, A);
|
|
308
|
+
_.set(we, o), x = {
|
|
309
|
+
...p,
|
|
310
|
+
headers: _
|
|
287
311
|
};
|
|
288
312
|
}
|
|
289
313
|
try {
|
|
290
|
-
const
|
|
314
|
+
const _ = await T(f, x);
|
|
291
315
|
try {
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
method:
|
|
295
|
-
url:
|
|
296
|
-
status:
|
|
297
|
-
durationMs: Date.now() -
|
|
298
|
-
responseSize:
|
|
299
|
-
contentType:
|
|
300
|
-
startedAt:
|
|
301
|
-
...
|
|
302
|
-
...
|
|
303
|
-
...
|
|
304
|
-
}),
|
|
305
|
-
method:
|
|
306
|
-
url:
|
|
307
|
-
status:
|
|
308
|
-
durationMs: Date.now() -
|
|
316
|
+
const D = _.headers.get("x-request-id"), A = _.headers.get("traceparent");
|
|
317
|
+
c({
|
|
318
|
+
method: E,
|
|
319
|
+
url: k,
|
|
320
|
+
status: _.status,
|
|
321
|
+
durationMs: Date.now() - m,
|
|
322
|
+
responseSize: Se(_.headers.get("content-length")),
|
|
323
|
+
contentType: _.headers.get("content-type") ?? void 0,
|
|
324
|
+
startedAt: m,
|
|
325
|
+
...D ? { requestId: D.slice(0, 200) } : {},
|
|
326
|
+
...A ? { traceparent: A.slice(0, 200) } : {},
|
|
327
|
+
...o ? { runId: o } : {}
|
|
328
|
+
}), _.ok || i(oe, {
|
|
329
|
+
method: E,
|
|
330
|
+
url: k,
|
|
331
|
+
status: _.status,
|
|
332
|
+
durationMs: Date.now() - m
|
|
309
333
|
});
|
|
310
334
|
} catch {
|
|
311
335
|
}
|
|
312
|
-
return
|
|
313
|
-
} catch (
|
|
336
|
+
return _;
|
|
337
|
+
} catch (_) {
|
|
314
338
|
try {
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
method:
|
|
318
|
-
url:
|
|
339
|
+
const D = Date.now() - m;
|
|
340
|
+
c({
|
|
341
|
+
method: E,
|
|
342
|
+
url: k,
|
|
319
343
|
status: 0,
|
|
320
|
-
durationMs:
|
|
321
|
-
startedAt:
|
|
344
|
+
durationMs: D,
|
|
345
|
+
startedAt: m,
|
|
322
346
|
failed: !0,
|
|
323
|
-
...
|
|
324
|
-
}),
|
|
325
|
-
method:
|
|
326
|
-
url:
|
|
347
|
+
...o ? { runId: o } : {}
|
|
348
|
+
}), i(oe, {
|
|
349
|
+
method: E,
|
|
350
|
+
url: k,
|
|
327
351
|
status: 0,
|
|
328
|
-
durationMs:
|
|
352
|
+
durationMs: D
|
|
329
353
|
});
|
|
330
354
|
} catch {
|
|
331
355
|
}
|
|
332
|
-
throw
|
|
356
|
+
throw _;
|
|
333
357
|
}
|
|
334
358
|
}));
|
|
335
|
-
const
|
|
336
|
-
XMLHttpRequest.prototype.open = function(
|
|
337
|
-
return this[
|
|
338
|
-
method: (
|
|
339
|
-
url:
|
|
359
|
+
const q = XMLHttpRequest.prototype.open, F = XMLHttpRequest.prototype.send, N = "__echoNet";
|
|
360
|
+
XMLHttpRequest.prototype.open = function(f, p, ...m) {
|
|
361
|
+
return this[N] = {
|
|
362
|
+
method: (f || "GET").toUpperCase(),
|
|
363
|
+
url: H(p),
|
|
340
364
|
start: 0,
|
|
341
|
-
propagate:
|
|
342
|
-
},
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
...
|
|
365
|
+
propagate: l(p)
|
|
366
|
+
}, q.apply(this, [
|
|
367
|
+
f,
|
|
368
|
+
p,
|
|
369
|
+
...m
|
|
346
370
|
]);
|
|
347
|
-
}, XMLHttpRequest.prototype.send = function(...
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
350
|
-
if (
|
|
351
|
-
this.setRequestHeader(
|
|
371
|
+
}, XMLHttpRequest.prototype.send = function(...f) {
|
|
372
|
+
const p = this[N];
|
|
373
|
+
if (p) {
|
|
374
|
+
if (p.start = Date.now(), o && p.propagate) try {
|
|
375
|
+
this.setRequestHeader(we, o);
|
|
352
376
|
} catch {
|
|
353
377
|
}
|
|
354
378
|
this.addEventListener("loadend", () => {
|
|
355
379
|
try {
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
method:
|
|
359
|
-
url:
|
|
360
|
-
status:
|
|
361
|
-
durationMs:
|
|
362
|
-
responseSize:
|
|
380
|
+
const m = Date.now() - p.start, E = this.status, k = E === 0, x = this.getResponseHeader("x-request-id"), _ = this.getResponseHeader("traceparent");
|
|
381
|
+
c({
|
|
382
|
+
method: p.method,
|
|
383
|
+
url: p.url,
|
|
384
|
+
status: E,
|
|
385
|
+
durationMs: m,
|
|
386
|
+
responseSize: Se(this.getResponseHeader("content-length")),
|
|
363
387
|
contentType: this.getResponseHeader("content-type") ?? void 0,
|
|
364
|
-
startedAt:
|
|
365
|
-
...
|
|
366
|
-
...
|
|
367
|
-
...
|
|
368
|
-
...
|
|
369
|
-
}), (
|
|
370
|
-
method:
|
|
371
|
-
url:
|
|
372
|
-
status:
|
|
373
|
-
durationMs:
|
|
388
|
+
startedAt: p.start,
|
|
389
|
+
...k ? { failed: !0 } : {},
|
|
390
|
+
...o ? { runId: o } : {},
|
|
391
|
+
...x ? { requestId: x.slice(0, 200) } : {},
|
|
392
|
+
..._ ? { traceparent: _.slice(0, 200) } : {}
|
|
393
|
+
}), (k || E >= 400) && i(oe, {
|
|
394
|
+
method: p.method,
|
|
395
|
+
url: p.url,
|
|
396
|
+
status: E,
|
|
397
|
+
durationMs: m
|
|
374
398
|
});
|
|
375
399
|
} catch {
|
|
376
400
|
}
|
|
377
401
|
}, { once: !0 });
|
|
378
402
|
}
|
|
379
|
-
return
|
|
403
|
+
return F.apply(this, f);
|
|
380
404
|
};
|
|
381
|
-
const
|
|
382
|
-
onResource: (
|
|
383
|
-
e.captureNetwork &&
|
|
384
|
-
...
|
|
385
|
-
runId:
|
|
386
|
-
} :
|
|
405
|
+
const B = kt({
|
|
406
|
+
onResource: (f) => {
|
|
407
|
+
e.captureNetwork && n.push(o ? {
|
|
408
|
+
...f,
|
|
409
|
+
runId: o
|
|
410
|
+
} : f);
|
|
387
411
|
},
|
|
388
|
-
onReport: (
|
|
389
|
-
}), $ = () => e.captureNetwork ? [...t.snapshot(), ...
|
|
390
|
-
let
|
|
412
|
+
onReport: (f, p) => a(f, U(p).slice(0, z), void 0, { mechanism: "report" })
|
|
413
|
+
}), $ = () => e.captureNetwork ? [...t.snapshot(), ...n.snapshot()].sort((f, p) => f.startedAt - p.startedAt) : [];
|
|
414
|
+
let M = !1;
|
|
391
415
|
return {
|
|
392
416
|
snapshot: () => ({
|
|
393
|
-
errors:
|
|
394
|
-
logs:
|
|
417
|
+
errors: s.snapshot(),
|
|
418
|
+
logs: r.snapshot(),
|
|
395
419
|
network: $(),
|
|
396
|
-
...
|
|
420
|
+
...o ? { runId: o } : {}
|
|
397
421
|
}),
|
|
398
|
-
setSink: (
|
|
399
|
-
|
|
422
|
+
setSink: (f) => {
|
|
423
|
+
u = f;
|
|
400
424
|
},
|
|
401
425
|
flushRings: () => {
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
const
|
|
405
|
-
|
|
406
|
-
const
|
|
407
|
-
|
|
426
|
+
const f = $();
|
|
427
|
+
f.length > 0 && i(ft, { entries: f });
|
|
428
|
+
const p = r.snapshot();
|
|
429
|
+
p.length > 0 && i(dt, { entries: p });
|
|
430
|
+
const m = s.snapshot();
|
|
431
|
+
m.length > 0 && i(Ee, { entries: m });
|
|
408
432
|
},
|
|
409
433
|
teardown: () => {
|
|
410
|
-
|
|
434
|
+
M || (M = !0, u = null, B.teardown(), console.error = g, console.warn = b, console.log = S, console.info = R, window.removeEventListener("error", L, !0), window.removeEventListener("unhandledrejection", C), T && (window.fetch = T), XMLHttpRequest.prototype.open = q, XMLHttpRequest.prototype.send = F);
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
var Mt = 100, Pt = [
|
|
439
|
+
"hidden",
|
|
440
|
+
"class",
|
|
441
|
+
"style",
|
|
442
|
+
"type",
|
|
443
|
+
"disabled",
|
|
444
|
+
"aria-hidden"
|
|
445
|
+
], ee = 'input[type="password"]', Fe = 'input[autocomplete="username"], input[autocomplete="email"], input[type="email"]', te = `${ee}, ${Fe}`, J = /\b(connexion|se connecter|connectez[- ]vous|s'identifier|identifiez[- ]vous|login|log ?in|sign ?in)\b/, ue = /\b(inscription|s'inscrire|inscrivez|creer (un|votre|mon) compte|sign ?up|register|create (an |your )?account|mot de passe oublie|oublie|reinitialiser|forgot|reset|lien de connexion|magic link|envoyer (un|le) lien|send (me )?(a |the )?link|code|newsletter|abonner|subscribe|enregistrer|sauvegarder|mettre a jour|save|update|confirmer|confirm|supprimer mon compte|delete account|payer|pay)\b/, xt = /\b(inscription|s'inscrire|inscrivez|creer (un|votre|mon) compte|sign ?up|create (an |your )?account|mot de passe oublie|reinitialiser|forgot|lien de connexion|magic link|envoyer (un|le) lien|send (me )?(a |the )?link|newsletter|abonner|subscribe)\b/, Dt = /\b(afficher|masquer|voir|show|hide|toggle)\b/, qt = /\b(effacer|vider|supprimer|clear|reset)\b/, Ft = /[\u{1F441}\u{1F576}\u{1F440}]/u;
|
|
446
|
+
function W(e) {
|
|
447
|
+
return (e ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/[’‘]/g, "'").replace(/\s+/g, " ").trim().toLowerCase();
|
|
448
|
+
}
|
|
449
|
+
function ne(e) {
|
|
450
|
+
let t = e;
|
|
451
|
+
for (; t; ) {
|
|
452
|
+
if (t.hasAttribute("hidden") || t.getAttribute("aria-hidden") === "true" || t instanceof HTMLInputElement && t.type === "hidden") return !1;
|
|
453
|
+
const n = t.ownerDocument.defaultView?.getComputedStyle(t);
|
|
454
|
+
if (n && (n.display === "none" || n.visibility === "hidden")) return !1;
|
|
455
|
+
t = t.parentElement;
|
|
456
|
+
}
|
|
457
|
+
return !0;
|
|
458
|
+
}
|
|
459
|
+
function V(e, t) {
|
|
460
|
+
return Array.from(e.querySelectorAll(t)).filter(ne);
|
|
461
|
+
}
|
|
462
|
+
function Bt(e) {
|
|
463
|
+
return e ? e instanceof HTMLInputElement ? e.value : e.textContent ?? "" : "";
|
|
464
|
+
}
|
|
465
|
+
function Be(e, t) {
|
|
466
|
+
return !e.outsideForms || !t.closest("form");
|
|
467
|
+
}
|
|
468
|
+
function K(e, t) {
|
|
469
|
+
return Array.from(e.scope.querySelectorAll(t)).filter((n) => ne(n) && Be(e, n));
|
|
470
|
+
}
|
|
471
|
+
function Q(e) {
|
|
472
|
+
return W(e.getAttribute("aria-label") ?? e.getAttribute("title") ?? e.textContent);
|
|
473
|
+
}
|
|
474
|
+
function $t(e) {
|
|
475
|
+
const t = Q(e);
|
|
476
|
+
return Dt.test(t) || Ft.test(t);
|
|
477
|
+
}
|
|
478
|
+
function Gt(e, t) {
|
|
479
|
+
if (e.getAttribute("type") === "submit" || !t) return !1;
|
|
480
|
+
const n = e.parentElement;
|
|
481
|
+
return !n || V(n, te).length === 0 ? !1 : !n.contains(t);
|
|
482
|
+
}
|
|
483
|
+
var Ut = 'button, input[type="submit"], input[type="button"], input[type="image"], a[href]';
|
|
484
|
+
function Ht(e) {
|
|
485
|
+
return Array.from(e.querySelectorAll(Ut)).some(ne);
|
|
486
|
+
}
|
|
487
|
+
function Vt(e, t) {
|
|
488
|
+
let n = e.parentElement;
|
|
489
|
+
for (; n && !n.contains(t); ) {
|
|
490
|
+
if (Ht(n)) return !0;
|
|
491
|
+
n = n.parentElement;
|
|
492
|
+
}
|
|
493
|
+
return !1;
|
|
494
|
+
}
|
|
495
|
+
function jt(e) {
|
|
496
|
+
const t = [
|
|
497
|
+
e.getAttribute("name"),
|
|
498
|
+
e.getAttribute("id"),
|
|
499
|
+
e.getAttribute("placeholder"),
|
|
500
|
+
e.getAttribute("aria-label"),
|
|
501
|
+
e.closest("label")?.textContent ?? null
|
|
502
|
+
], n = e.getAttribute("id");
|
|
503
|
+
if (n) {
|
|
504
|
+
const r = e.ownerDocument.querySelector(`label[for="${CSS.escape(n)}"]`);
|
|
505
|
+
r && t.push(r.textContent);
|
|
506
|
+
}
|
|
507
|
+
return W(t.filter(Boolean).join(" "));
|
|
508
|
+
}
|
|
509
|
+
function zt(e, t) {
|
|
510
|
+
const n = e.parentElement;
|
|
511
|
+
if (!n) return null;
|
|
512
|
+
const r = e.ownerDocument.body, s = (a) => t ? $e({
|
|
513
|
+
scope: a,
|
|
514
|
+
outsideForms: !0
|
|
515
|
+
}, t) : e, o = (a) => fe({
|
|
516
|
+
scope: a,
|
|
517
|
+
outsideForms: !0
|
|
518
|
+
}, e, s(a)), l = (a) => !!s(a) && !!o(a);
|
|
519
|
+
let u = n, i = null;
|
|
520
|
+
const c = (a) => {
|
|
521
|
+
const d = o(a);
|
|
522
|
+
d && !i && J.test(Q(d)) && (i = a);
|
|
523
|
+
};
|
|
524
|
+
for (c(n); u !== r && !l(u); ) {
|
|
525
|
+
const a = u.parentElement;
|
|
526
|
+
if (!a || a.querySelector("form")) break;
|
|
527
|
+
const d = [e], y = s(u);
|
|
528
|
+
y && y !== e && d.push(y);
|
|
529
|
+
const g = !!y;
|
|
530
|
+
if (V(a, te).filter((b) => !b.closest("form") && !d.includes(b)).some((b) => b.matches(ee) || g || ue.test(jt(b)) ? !0 : Vt(b, e))) break;
|
|
531
|
+
u = a, c(a);
|
|
532
|
+
}
|
|
533
|
+
return {
|
|
534
|
+
scope: l(u) ? u : i ?? n,
|
|
535
|
+
outsideForms: !0
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
function Re(e, t, n) {
|
|
539
|
+
return e ? {
|
|
540
|
+
scope: e,
|
|
541
|
+
outsideForms: !1
|
|
542
|
+
} : zt(t, n);
|
|
543
|
+
}
|
|
544
|
+
function Wt(e, t) {
|
|
545
|
+
let n = e.parentElement;
|
|
546
|
+
for (; n && n !== t.scope; ) {
|
|
547
|
+
if (V(n, te).length === 1) return !0;
|
|
548
|
+
n = n.parentElement;
|
|
549
|
+
}
|
|
550
|
+
return !1;
|
|
551
|
+
}
|
|
552
|
+
function fe(e, t, n) {
|
|
553
|
+
const r = (i) => !!(t.compareDocumentPosition(i) & Node.DOCUMENT_POSITION_FOLLOWING), s = Array.from(e.scope.querySelectorAll('button, input[type="submit"]')).filter((i) => ne(i) && Be(e, i) && (i.getAttribute("type") === "submit" || r(i)) && !$t(i) && !qt.test(Q(i)) && !Gt(i, n));
|
|
554
|
+
if (s.length === 0) return null;
|
|
555
|
+
const o = (i, c) => {
|
|
556
|
+
const a = r(i);
|
|
557
|
+
return [
|
|
558
|
+
Wt(i, e) ? 1 : 0,
|
|
559
|
+
J.test(Q(i)) ? 0 : 1,
|
|
560
|
+
i.getAttribute("type") === "submit" ? 0 : 1,
|
|
561
|
+
a ? 0 : 1,
|
|
562
|
+
a ? c : -c
|
|
563
|
+
];
|
|
564
|
+
};
|
|
565
|
+
let l = s[0], u = o(l, 0);
|
|
566
|
+
return s.forEach((i, c) => {
|
|
567
|
+
const a = o(i, c);
|
|
568
|
+
for (let d = 0; d < a.length; d++) {
|
|
569
|
+
const y = a[d], g = u[d];
|
|
570
|
+
if (y !== g) {
|
|
571
|
+
y < g && (l = i, u = a);
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}), l;
|
|
576
|
+
}
|
|
577
|
+
function Le(e) {
|
|
578
|
+
return e.querySelectorAll("form").length + (V(e, te).some((t) => !t.closest("form")) ? 1 : 0) === 1;
|
|
579
|
+
}
|
|
580
|
+
function Xt(e, t) {
|
|
581
|
+
if (e) {
|
|
582
|
+
const n = e.getAttribute("aria-label");
|
|
583
|
+
if (n) return n;
|
|
584
|
+
const r = e.getAttribute("aria-labelledby");
|
|
585
|
+
if (r) {
|
|
586
|
+
const u = e.ownerDocument.getElementById(r);
|
|
587
|
+
if (u) return u.textContent ?? "";
|
|
411
588
|
}
|
|
589
|
+
const s = e.querySelector("h1, h2, h3, legend");
|
|
590
|
+
if (s) return s.textContent ?? "";
|
|
591
|
+
let o = e.previousElementSibling;
|
|
592
|
+
for (; o; ) {
|
|
593
|
+
const u = /^(h1|h2|h3|legend)$/i.test(o.tagName) ? o : o.querySelector("h1, h2, h3, legend");
|
|
594
|
+
if (u) {
|
|
595
|
+
const i = e.parentElement;
|
|
596
|
+
return i && Le(i) ? u.textContent ?? "" : "";
|
|
597
|
+
}
|
|
598
|
+
o = o.previousElementSibling;
|
|
599
|
+
}
|
|
600
|
+
const l = e.closest("section, article, aside, dialog, fieldset, [role='dialog'], [role='region']");
|
|
601
|
+
if (l && l !== e) {
|
|
602
|
+
const u = l.querySelector("h1, h2, h3, legend");
|
|
603
|
+
if (u)
|
|
604
|
+
return Le(l) ? u.textContent ?? "" : "";
|
|
605
|
+
}
|
|
606
|
+
return "";
|
|
607
|
+
}
|
|
608
|
+
return (t instanceof Document ? t.body : t)?.querySelector("h1, h2, h3")?.textContent ?? "";
|
|
609
|
+
}
|
|
610
|
+
function _e(e, t, n) {
|
|
611
|
+
const r = W(Bt(n)), s = W(Xt(e, t)), o = (e?.getAttribute("action") ?? "").split("?")[0], l = W([
|
|
612
|
+
e?.id,
|
|
613
|
+
e?.getAttribute("name"),
|
|
614
|
+
e?.className,
|
|
615
|
+
o
|
|
616
|
+
].filter(Boolean).join(" "));
|
|
617
|
+
return {
|
|
618
|
+
positive: J.test(r) || J.test(s),
|
|
619
|
+
negative: ue.test(r) || ue.test(s) || xt.test(l)
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
function $e(e, t) {
|
|
623
|
+
const n = K(e, 'input[autocomplete="username"]')[0] ?? K(e, 'input[autocomplete="email"]')[0] ?? K(e, 'input[type="email"]')[0];
|
|
624
|
+
if (n) return n;
|
|
625
|
+
if (!t) return null;
|
|
626
|
+
const r = K(e, 'input[type="text"], input:not([type])').filter((s) => s.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
627
|
+
return r[r.length - 1] ?? null;
|
|
628
|
+
}
|
|
629
|
+
function ae(e, t) {
|
|
630
|
+
if (t.querySelector('input[autocomplete="new-password"]')) return null;
|
|
631
|
+
const n = V(t, ee);
|
|
632
|
+
if (n.length > 1) return null;
|
|
633
|
+
if (n.length === 1) {
|
|
634
|
+
const i = n[0], c = Re(e, i, i);
|
|
635
|
+
if (!c) return null;
|
|
636
|
+
const a = $e(c, i), d = fe(c, i, a), y = _e(e, t, d);
|
|
637
|
+
return !(i.autocomplete === "current-password" || y.positive) || y.negative ? null : {
|
|
638
|
+
kind: "password",
|
|
639
|
+
form: e,
|
|
640
|
+
identifier: a,
|
|
641
|
+
password: i,
|
|
642
|
+
submit: d
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
const r = V(t, Fe);
|
|
646
|
+
if (r.length !== 1) return null;
|
|
647
|
+
const s = r[0], o = Re(e, s, null);
|
|
648
|
+
if (!o) return null;
|
|
649
|
+
const l = fe(o, s, s), u = _e(e, t, l);
|
|
650
|
+
return !(s.autocomplete === "username" || u.positive) || u.negative ? null : {
|
|
651
|
+
kind: "identifier",
|
|
652
|
+
form: e,
|
|
653
|
+
identifier: s,
|
|
654
|
+
password: null,
|
|
655
|
+
submit: l
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
function ke(e = document) {
|
|
659
|
+
const t = Array.from(e.querySelectorAll("form"));
|
|
660
|
+
for (const n of t) {
|
|
661
|
+
const r = ae(n, n);
|
|
662
|
+
if (r) return r;
|
|
663
|
+
}
|
|
664
|
+
return t.length === 0 || V(e, ee).find((n) => !n.closest("form")) ? ae(null, e) : null;
|
|
665
|
+
}
|
|
666
|
+
function Ae(e, t) {
|
|
667
|
+
const n = Object.getPrototypeOf(e), r = Object.getOwnPropertyDescriptor(n, "value")?.set ?? Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
668
|
+
r ? r.call(e, t) : e.value = t, e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
669
|
+
}
|
|
670
|
+
function Kt(e) {
|
|
671
|
+
return !!e.form || !!e.submit;
|
|
672
|
+
}
|
|
673
|
+
function Yt(e) {
|
|
674
|
+
const t = e.form, n = t?.noValidate;
|
|
675
|
+
t && (t.noValidate = !0);
|
|
676
|
+
try {
|
|
677
|
+
return t && typeof t.requestSubmit == "function" ? (t.requestSubmit(), !0) : e.submit ? (e.submit.click(), !0) : t ? (t.submit(), !0) : !1;
|
|
678
|
+
} finally {
|
|
679
|
+
t && (t.noValidate = n ?? !1);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
var Zt = {
|
|
683
|
+
identifier: null,
|
|
684
|
+
password: null
|
|
685
|
+
};
|
|
686
|
+
function Oe(e, t) {
|
|
687
|
+
return !e || e.disabled || e.readOnly ? !1 : e.value === "" || t !== null && e.value === t;
|
|
688
|
+
}
|
|
689
|
+
function Ge(e, t, n) {
|
|
690
|
+
return {
|
|
691
|
+
identifier: Oe(e.identifier, n.identifier) && !t.identifier,
|
|
692
|
+
password: Oe(e.password, n.password) && !t.password
|
|
412
693
|
};
|
|
413
694
|
}
|
|
414
|
-
|
|
695
|
+
function Jt(e, t, n) {
|
|
696
|
+
const r = e.identifier;
|
|
697
|
+
return !r || n.identifier ? !1 : r.value !== "" && r.value !== t.login;
|
|
698
|
+
}
|
|
699
|
+
function Qt(e, t, n, r = Zt) {
|
|
700
|
+
const s = Ge(e, n, r);
|
|
701
|
+
return !s.identifier && !s.password ? { error: "nothing-to-fill" } : Jt(e, t, s) ? { error: "identifier-mismatch" } : Kt(e) ? (s.identifier && Ae(e.identifier, t.login), s.password && Ae(e.password, t.password), Yt(e) ? { step: s.identifier && s.password ? "both" : s.password ? "password" : "identifier" } : { error: "no-submit" }) : { error: "no-submit" };
|
|
702
|
+
}
|
|
703
|
+
function en(e) {
|
|
704
|
+
if (typeof window > "u" || typeof MutationObserver > "u") return {
|
|
705
|
+
watch() {
|
|
706
|
+
},
|
|
707
|
+
fill() {
|
|
708
|
+
},
|
|
709
|
+
cancel() {
|
|
710
|
+
},
|
|
711
|
+
teardown() {
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
let t = null, n = {
|
|
715
|
+
identifier: !1,
|
|
716
|
+
password: !1
|
|
717
|
+
}, r = {
|
|
718
|
+
identifier: null,
|
|
719
|
+
password: null
|
|
720
|
+
}, s = !1, o = null, l = null, u = null;
|
|
721
|
+
const i = () => {
|
|
722
|
+
u && clearTimeout(u), u = null;
|
|
723
|
+
}, c = () => {
|
|
724
|
+
o?.disconnect(), o = null, i(), l && clearTimeout(l), l = null;
|
|
725
|
+
}, a = () => {
|
|
726
|
+
const g = ke(document);
|
|
727
|
+
if (!g) {
|
|
728
|
+
s = !1, r = {
|
|
729
|
+
identifier: null,
|
|
730
|
+
password: null
|
|
731
|
+
}, i();
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
if (!t)
|
|
735
|
+
s || (s = !0, e.onDetected());
|
|
736
|
+
else {
|
|
737
|
+
const b = Ge(g, n, r), S = Qt(g, t, n, r);
|
|
738
|
+
if ("error" in S || (b.identifier && (n = {
|
|
739
|
+
...n,
|
|
740
|
+
identifier: !0
|
|
741
|
+
}, r = {
|
|
742
|
+
...r,
|
|
743
|
+
identifier: t.login
|
|
744
|
+
}), b.password && (n = {
|
|
745
|
+
...n,
|
|
746
|
+
password: !0
|
|
747
|
+
}, r = {
|
|
748
|
+
...r,
|
|
749
|
+
password: t.password
|
|
750
|
+
})), "error" in S) {
|
|
751
|
+
const R = S.error !== "nothing-to-fill" ? S.error : !n.identifier && !n.password ? "already-filled" : null;
|
|
752
|
+
R && (e.onError(R), t = null, c());
|
|
753
|
+
} else
|
|
754
|
+
e.onFilled(S.step), n.password && (t = null, i(), u = setTimeout(() => {
|
|
755
|
+
u = null, ke(document) && (s = !0, e.onDetected());
|
|
756
|
+
}, tt));
|
|
757
|
+
}
|
|
758
|
+
}, d = () => {
|
|
759
|
+
l && clearTimeout(l), l = setTimeout(() => {
|
|
760
|
+
l = null, a();
|
|
761
|
+
}, Mt);
|
|
762
|
+
}, y = () => {
|
|
763
|
+
o || (o = new MutationObserver(d), o.observe(document.body, {
|
|
764
|
+
childList: !0,
|
|
765
|
+
subtree: !0,
|
|
766
|
+
attributes: !0,
|
|
767
|
+
attributeFilter: Pt
|
|
768
|
+
}));
|
|
769
|
+
};
|
|
770
|
+
return {
|
|
771
|
+
watch() {
|
|
772
|
+
o || (s = !1, y()), a();
|
|
773
|
+
},
|
|
774
|
+
fill(g) {
|
|
775
|
+
t = g, y(), a();
|
|
776
|
+
},
|
|
777
|
+
cancel() {
|
|
778
|
+
t = null, n = {
|
|
779
|
+
identifier: !1,
|
|
780
|
+
password: !1
|
|
781
|
+
}, s = !1, c();
|
|
782
|
+
},
|
|
783
|
+
teardown() {
|
|
784
|
+
t = null, c();
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
var tn = "leesto/navigation";
|
|
789
|
+
function nn(e) {
|
|
790
|
+
const t = e?.timestamp;
|
|
791
|
+
return typeof t == "number" ? t : void 0;
|
|
792
|
+
}
|
|
793
|
+
function rn(e) {
|
|
794
|
+
return e?.type === 4;
|
|
795
|
+
}
|
|
796
|
+
function on(e) {
|
|
797
|
+
try {
|
|
798
|
+
return JSON.stringify(e)?.length ?? 0;
|
|
799
|
+
} catch {
|
|
800
|
+
return 0;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
function sn(e) {
|
|
804
|
+
const t = e.now ?? Date.now, n = e.measure ?? on;
|
|
805
|
+
let r = [], s = 0, o = !1, l = Number.NEGATIVE_INFINITY;
|
|
806
|
+
const u = () => {
|
|
807
|
+
const c = r.shift();
|
|
808
|
+
c && (s -= c.bytes);
|
|
809
|
+
}, i = () => {
|
|
810
|
+
if (!o) {
|
|
811
|
+
const d = t() - e.windowMs;
|
|
812
|
+
for (; r.length > 1 && (r[1]?.start ?? Number.POSITIVE_INFINITY) <= d; ) u();
|
|
813
|
+
}
|
|
814
|
+
const c = o ? e.heldMaxBytes : e.maxBytes;
|
|
815
|
+
for (; s > c && r.length > 1; ) u();
|
|
816
|
+
const a = r[r.length - 1];
|
|
817
|
+
if (s > c && e.requestCheckout && (a?.events.length ?? 0) > 2) {
|
|
818
|
+
const d = t();
|
|
819
|
+
d - l >= e.minCheckoutIntervalMs && (l = d, e.requestCheckout());
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
return {
|
|
823
|
+
push(c) {
|
|
824
|
+
const a = n(c);
|
|
825
|
+
if (rn(c)) r.push({
|
|
826
|
+
start: nn(c) ?? t(),
|
|
827
|
+
events: [c],
|
|
828
|
+
bytes: a
|
|
829
|
+
});
|
|
830
|
+
else {
|
|
831
|
+
const d = r[r.length - 1];
|
|
832
|
+
if (!d) return;
|
|
833
|
+
d.events.push(c), d.bytes += a;
|
|
834
|
+
}
|
|
835
|
+
s += a, i();
|
|
836
|
+
},
|
|
837
|
+
snapshot() {
|
|
838
|
+
const c = [];
|
|
839
|
+
for (const a of r) for (const d of a.events) c.push(d);
|
|
840
|
+
return c;
|
|
841
|
+
},
|
|
842
|
+
hold() {
|
|
843
|
+
i(), o = !0;
|
|
844
|
+
},
|
|
845
|
+
release() {
|
|
846
|
+
o = !1, i();
|
|
847
|
+
},
|
|
848
|
+
stats() {
|
|
849
|
+
let c = 0;
|
|
850
|
+
for (const a of r) c += a.events.length;
|
|
851
|
+
return {
|
|
852
|
+
segments: r.length,
|
|
853
|
+
events: c,
|
|
854
|
+
bytes: s,
|
|
855
|
+
held: o
|
|
856
|
+
};
|
|
857
|
+
},
|
|
858
|
+
clear() {
|
|
859
|
+
r = [], s = 0;
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
var an = "leesto-mask", Te = "[data-leesto-block]", Ue = "leesto-mask-text", He = "[data-private]", ln = `.${Ue}, ${He}`, cn = 'img, picture, video, canvas, object, embed, svg image, input[type="image"]', un = 'button, a, [role="button"], [role="link"], input[type="button"], input[type="submit"], input[type="reset"]';
|
|
864
|
+
var Ve = 'input:not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, select';
|
|
865
|
+
function je(e) {
|
|
866
|
+
return e.replace(/\S/g, "*");
|
|
867
|
+
}
|
|
868
|
+
function fn(e, t) {
|
|
869
|
+
try {
|
|
870
|
+
return e.closest(t);
|
|
871
|
+
} catch {
|
|
872
|
+
return null;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
function ze(e) {
|
|
876
|
+
return fn(e, ln) !== null;
|
|
877
|
+
}
|
|
878
|
+
function We(e) {
|
|
879
|
+
if (!e || typeof e.closest != "function") return !1;
|
|
880
|
+
try {
|
|
881
|
+
if (ze(e) || e.matches(Ve)) return !1;
|
|
882
|
+
const t = e.closest(un);
|
|
883
|
+
return t ? (t.textContent ?? "").trim().length <= 80 : !1;
|
|
884
|
+
} catch {
|
|
885
|
+
return !1;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
var Ce = {
|
|
415
889
|
maskAllInputs: !0,
|
|
416
890
|
maskInputOptions: {
|
|
417
891
|
password: !0,
|
|
@@ -419,37 +893,214 @@ var Ae = 6e5, Ce = 1e3, Ne = {
|
|
|
419
893
|
tel: !0,
|
|
420
894
|
text: !0
|
|
421
895
|
},
|
|
422
|
-
blockClass:
|
|
423
|
-
|
|
424
|
-
maskTextClass: "leesto-mask-text",
|
|
425
|
-
maskTextSelector: "[data-private]"
|
|
896
|
+
blockClass: an,
|
|
897
|
+
maskTextClass: Ue
|
|
426
898
|
};
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
899
|
+
function Xe(e) {
|
|
900
|
+
if (e === "inputs_only") return {
|
|
901
|
+
...Ce,
|
|
902
|
+
blockSelector: Te,
|
|
903
|
+
maskTextSelector: He
|
|
904
|
+
};
|
|
905
|
+
const t = {
|
|
906
|
+
...Ce,
|
|
907
|
+
blockSelector: `${Te}, ${cn}`,
|
|
908
|
+
maskTextSelector: "*"
|
|
909
|
+
};
|
|
910
|
+
return e === "labels_visible" ? {
|
|
911
|
+
...t,
|
|
912
|
+
maskTextFn: (n, r) => We(r) ? n : je(n)
|
|
913
|
+
} : t;
|
|
914
|
+
}
|
|
915
|
+
var Ie = /* @__PURE__ */ new Set([
|
|
916
|
+
"placeholder",
|
|
917
|
+
"title",
|
|
918
|
+
"alt",
|
|
919
|
+
"label",
|
|
920
|
+
"aria-label",
|
|
921
|
+
"aria-description",
|
|
922
|
+
"aria-placeholder",
|
|
923
|
+
"aria-roledescription",
|
|
924
|
+
"aria-valuetext"
|
|
925
|
+
]), dn = 2, pn = 3, hn = 4, mn = 0, gn = 2;
|
|
926
|
+
function yn(e, t, n) {
|
|
927
|
+
if (e) try {
|
|
928
|
+
return e.matches(Ve);
|
|
929
|
+
} catch {
|
|
930
|
+
return !0;
|
|
931
|
+
}
|
|
932
|
+
const r = t.toLowerCase();
|
|
933
|
+
if (r === "textarea" || r === "select") return !0;
|
|
934
|
+
if (r !== "input") return !1;
|
|
935
|
+
const s = String(n.type ?? "").toLowerCase();
|
|
936
|
+
return s !== "button" && s !== "submit" && s !== "reset";
|
|
937
|
+
}
|
|
938
|
+
function Ke(e, t, n) {
|
|
939
|
+
const r = e;
|
|
940
|
+
if (!r || typeof r != "object" || !r.data) return e;
|
|
941
|
+
const s = (c) => {
|
|
942
|
+
if (typeof c != "number") return null;
|
|
943
|
+
try {
|
|
944
|
+
const a = n(c);
|
|
945
|
+
return a && a.nodeType === 1 ? a : null;
|
|
946
|
+
} catch {
|
|
947
|
+
return null;
|
|
948
|
+
}
|
|
949
|
+
}, o = (c, a, d, y) => {
|
|
950
|
+
if (a === "value") {
|
|
951
|
+
if (yn(c, d, y)) return !1;
|
|
952
|
+
} else if (!Ie.has(a)) return !0;
|
|
953
|
+
return !c || ze(c) ? !1 : t === "inputs_only" ? !0 : t === "labels_visible" ? We(c) : !1;
|
|
954
|
+
}, l = (c, a, d) => {
|
|
955
|
+
if (d)
|
|
956
|
+
for (const y of Object.keys(d)) {
|
|
957
|
+
const g = d[y];
|
|
958
|
+
typeof g != "string" || !g || y !== "value" && !Ie.has(y) || o(c, y, a, d) || (d[y] = je(g));
|
|
959
|
+
}
|
|
960
|
+
}, u = (c) => {
|
|
961
|
+
const a = c ? [c] : [];
|
|
962
|
+
for (; a.length > 0; ) {
|
|
963
|
+
const d = a.pop();
|
|
964
|
+
d.type === gn && d.attributes && l(s(d.id), String(d.tagName ?? ""), d.attributes), Array.isArray(d.childNodes) && a.push(...d.childNodes);
|
|
965
|
+
}
|
|
966
|
+
}, i = r.data;
|
|
967
|
+
if (r.type === hn && typeof i.href == "string") i.href = ut(i.href);
|
|
968
|
+
else if (r.type === dn) u(i.node);
|
|
969
|
+
else if (r.type === pn && i.source === mn) {
|
|
970
|
+
for (const c of i.adds ?? []) u(c.node);
|
|
971
|
+
for (const c of i.attributes ?? []) {
|
|
972
|
+
const a = s(c.id);
|
|
973
|
+
l(a, a?.tagName ?? "", c.attributes);
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
return e;
|
|
977
|
+
}
|
|
978
|
+
var Ye = 6e5, Ze = 1e3, vn = {
|
|
979
|
+
mousemove: 100,
|
|
980
|
+
scroll: 150
|
|
981
|
+
}, wn = {
|
|
982
|
+
windowMs: 12e4,
|
|
983
|
+
checkoutEveryNms: 6e4,
|
|
984
|
+
maxBytes: 8388608,
|
|
985
|
+
heldMaxBytes: 33554432,
|
|
986
|
+
minCheckoutIntervalMs: 15e3,
|
|
987
|
+
sampling: vn
|
|
988
|
+
}, bn = 5;
|
|
989
|
+
async function En(e) {
|
|
990
|
+
const { record: t, addCustomEvent: n } = await import("./chunks/rrweb-qwppqH_c.js"), r = e.maskPolicy ?? "mask_all", s = Date.now();
|
|
991
|
+
let o = [], l = !1, u = 0;
|
|
992
|
+
const i = () => {
|
|
993
|
+
if (o.length === 0) return;
|
|
994
|
+
const R = o;
|
|
995
|
+
o = [], e.onBatch(R);
|
|
996
|
+
}, c = t({
|
|
997
|
+
emit(R) {
|
|
998
|
+
o.push(Ke(R, r, (L) => t.mirror.getNode(L)));
|
|
437
999
|
},
|
|
438
|
-
...
|
|
439
|
-
}),
|
|
440
|
-
|
|
1000
|
+
...Xe(r)
|
|
1001
|
+
}), a = e.diagnostics ?? null, d = c ? a ?? qe({ captureNetwork: e.captureNetwork !== !1 }) : null, y = d !== null && a === null;
|
|
1002
|
+
d?.setSink((R, L) => {
|
|
441
1003
|
try {
|
|
442
|
-
|
|
1004
|
+
n(R, L);
|
|
443
1005
|
} catch {
|
|
444
1006
|
}
|
|
445
1007
|
});
|
|
446
|
-
const
|
|
447
|
-
return
|
|
448
|
-
|
|
449
|
-
},
|
|
1008
|
+
const g = setInterval(i, Ze), b = { timer: null }, S = () => (l || (l = !0, clearInterval(g), clearTimeout(b.timer ?? void 0), d?.flushRings(), d?.setSink(null), y && d?.teardown(), c?.(), i(), u = Date.now() - s), u);
|
|
1009
|
+
return b.timer = setTimeout(() => {
|
|
1010
|
+
S(), e.onCap();
|
|
1011
|
+
}, Ye), { stop: S };
|
|
450
1012
|
}
|
|
451
|
-
|
|
452
|
-
|
|
1013
|
+
async function Sn(e) {
|
|
1014
|
+
const { record: t, addCustomEvent: n } = await import("./chunks/rrweb-qwppqH_c.js"), r = {
|
|
1015
|
+
...wn,
|
|
1016
|
+
...e.config
|
|
1017
|
+
}, { diagnostics: s } = e, o = e.maskPolicy ?? "mask_all";
|
|
1018
|
+
let l = !1, u = null, i = null;
|
|
1019
|
+
const c = () => {
|
|
1020
|
+
try {
|
|
1021
|
+
t.takeFullSnapshot(!0);
|
|
1022
|
+
} catch {
|
|
1023
|
+
}
|
|
1024
|
+
}, a = sn({
|
|
1025
|
+
windowMs: r.windowMs,
|
|
1026
|
+
maxBytes: r.maxBytes,
|
|
1027
|
+
heldMaxBytes: r.heldMaxBytes,
|
|
1028
|
+
minCheckoutIntervalMs: r.minCheckoutIntervalMs,
|
|
1029
|
+
requestCheckout: () => queueMicrotask(() => {
|
|
1030
|
+
l || c();
|
|
1031
|
+
})
|
|
1032
|
+
}), d = t({
|
|
1033
|
+
emit(g) {
|
|
1034
|
+
const b = Ke(g, o, (S) => t.mirror.getNode(S));
|
|
1035
|
+
a.push(b), u?.(b);
|
|
1036
|
+
},
|
|
1037
|
+
checkoutEveryNms: r.checkoutEveryNms,
|
|
1038
|
+
sampling: r.sampling,
|
|
1039
|
+
...Xe(o)
|
|
1040
|
+
});
|
|
1041
|
+
if (!d) return null;
|
|
1042
|
+
const y = (g, b) => {
|
|
1043
|
+
try {
|
|
1044
|
+
n(g, b);
|
|
1045
|
+
} catch {
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
return s.setSink(y), {
|
|
1049
|
+
snapshot() {
|
|
1050
|
+
const g = a.snapshot(), b = Date.now();
|
|
1051
|
+
s.setSink((R, L) => {
|
|
1052
|
+
g.push({
|
|
1053
|
+
type: bn,
|
|
1054
|
+
data: {
|
|
1055
|
+
tag: R,
|
|
1056
|
+
payload: L
|
|
1057
|
+
},
|
|
1058
|
+
timestamp: b
|
|
1059
|
+
});
|
|
1060
|
+
});
|
|
1061
|
+
try {
|
|
1062
|
+
s.flushRings();
|
|
1063
|
+
} finally {
|
|
1064
|
+
s.setSink(l ? null : y);
|
|
1065
|
+
}
|
|
1066
|
+
const S = g[0]?.timestamp;
|
|
1067
|
+
return {
|
|
1068
|
+
events: g,
|
|
1069
|
+
durationMs: typeof S == "number" ? Math.max(0, b - S) : 0
|
|
1070
|
+
};
|
|
1071
|
+
},
|
|
1072
|
+
hold: () => a.hold(),
|
|
1073
|
+
release: () => a.release(),
|
|
1074
|
+
markNavigation(g) {
|
|
1075
|
+
l || y(tn, { href: H(g) });
|
|
1076
|
+
},
|
|
1077
|
+
stats: () => a.stats(),
|
|
1078
|
+
stream({ onBatch: g, onCap: b }) {
|
|
1079
|
+
i?.stop();
|
|
1080
|
+
const S = Date.now();
|
|
1081
|
+
let R = [], L = !1, C = 0;
|
|
1082
|
+
const T = () => {
|
|
1083
|
+
if (R.length === 0) return;
|
|
1084
|
+
const $ = R;
|
|
1085
|
+
R = [], g($);
|
|
1086
|
+
}, q = ($) => {
|
|
1087
|
+
R.push($);
|
|
1088
|
+
};
|
|
1089
|
+
u = q, c();
|
|
1090
|
+
const F = setInterval(T, Ze), N = { timer: null }, B = { stop() {
|
|
1091
|
+
return L || (L = !0, clearInterval(F), clearTimeout(N.timer ?? void 0), s.flushRings(), u === q && (u = null), i === B && (i = null), T(), C = Date.now() - S), C;
|
|
1092
|
+
} };
|
|
1093
|
+
return N.timer = setTimeout(() => {
|
|
1094
|
+
B.stop(), b();
|
|
1095
|
+
}, Ye), i = B, B;
|
|
1096
|
+
},
|
|
1097
|
+
stop() {
|
|
1098
|
+
l || (l = !0, i?.stop(), s.setSink(null), d(), a.clear());
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
var Rn = ["https://lab.leesto.app", "https://lab-dev.leesto.app"], Ln = ["http://localhost:3505", "http://127.0.0.1:3505"];
|
|
1103
|
+
function _n(e) {
|
|
453
1104
|
try {
|
|
454
1105
|
const t = new URL(e).hostname;
|
|
455
1106
|
return t === "localhost" || t.endsWith(".localhost") || t === "127.0.0.1" || t === "[::1]";
|
|
@@ -457,43 +1108,43 @@ function qe(e) {
|
|
|
457
1108
|
return !1;
|
|
458
1109
|
}
|
|
459
1110
|
}
|
|
460
|
-
function
|
|
1111
|
+
function kn(e) {
|
|
461
1112
|
const t = e.trim();
|
|
462
1113
|
if (!t) return null;
|
|
463
1114
|
try {
|
|
464
|
-
const { origin:
|
|
465
|
-
return
|
|
1115
|
+
const { origin: n } = new URL(t);
|
|
1116
|
+
return n === "null" ? null : n;
|
|
466
1117
|
} catch {
|
|
467
1118
|
return null;
|
|
468
1119
|
}
|
|
469
1120
|
}
|
|
470
|
-
function
|
|
471
|
-
const t = (e.explicit ?? []).map(
|
|
1121
|
+
function An(e) {
|
|
1122
|
+
const t = (e.explicit ?? []).map(kn).filter((r) => r !== null);
|
|
472
1123
|
if (t.length > 0) return [...new Set(t)];
|
|
473
|
-
const
|
|
474
|
-
return
|
|
1124
|
+
const n = [...Rn];
|
|
1125
|
+
return _n(e.pageOrigin) && n.push(...Ln), [...new Set(n)];
|
|
475
1126
|
}
|
|
476
|
-
function
|
|
1127
|
+
function le(e, t) {
|
|
477
1128
|
return !e || e === "*" || e === "null" ? !1 : t.includes(e);
|
|
478
1129
|
}
|
|
479
|
-
function
|
|
1130
|
+
function Y() {
|
|
480
1131
|
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
481
1132
|
}
|
|
482
|
-
function
|
|
483
|
-
const t = (
|
|
484
|
-
const
|
|
485
|
-
return
|
|
486
|
-
},
|
|
1133
|
+
function On(e) {
|
|
1134
|
+
const t = (l) => {
|
|
1135
|
+
const u = typeof l == "string" ? l.trim() : "";
|
|
1136
|
+
return u.length > 0 ? u : void 0;
|
|
1137
|
+
}, n = (l) => {
|
|
487
1138
|
if (!(typeof document > "u"))
|
|
488
|
-
return t(document.querySelector(`meta[name="${
|
|
489
|
-
},
|
|
490
|
-
if (!(!
|
|
1139
|
+
return t(document.querySelector(`meta[name="${l}"]`)?.getAttribute("content"));
|
|
1140
|
+
}, r = typeof window < "u" ? window.__LEESTO_APP_BUILD__ : void 0, s = t(e?.version) ?? t(r?.version) ?? n("app-version"), o = t(e?.environment) ?? t(r?.environment) ?? n("app-environment");
|
|
1141
|
+
if (!(!s && !o))
|
|
491
1142
|
return {
|
|
492
|
-
...
|
|
493
|
-
...
|
|
1143
|
+
...s ? { version: s } : {},
|
|
1144
|
+
...o ? { environment: o } : {}
|
|
494
1145
|
};
|
|
495
1146
|
}
|
|
496
|
-
function
|
|
1147
|
+
function Tn() {
|
|
497
1148
|
if (typeof document > "u") return;
|
|
498
1149
|
const e = document.querySelector('link[rel~="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]');
|
|
499
1150
|
if (e?.href)
|
|
@@ -503,232 +1154,362 @@ function He() {
|
|
|
503
1154
|
return;
|
|
504
1155
|
}
|
|
505
1156
|
}
|
|
506
|
-
function
|
|
507
|
-
const e = (
|
|
1157
|
+
function Cn() {
|
|
1158
|
+
const e = (r) => !!r && r !== "transparent" && !/^rgba\(\s*0,\s*0,\s*0,\s*0\s*\)$/.test(r), t = getComputedStyle(document.body).backgroundColor;
|
|
508
1159
|
if (e(t)) return t;
|
|
509
|
-
const
|
|
510
|
-
return e(
|
|
1160
|
+
const n = getComputedStyle(document.documentElement).backgroundColor;
|
|
1161
|
+
return e(n) ? n : "#ffffff";
|
|
511
1162
|
}
|
|
512
|
-
async function
|
|
513
|
-
const { domToPng:
|
|
514
|
-
|
|
515
|
-
const
|
|
1163
|
+
async function Ne(e) {
|
|
1164
|
+
const { domToPng: t } = await import("./chunks/dist-BTlWkbvW.js");
|
|
1165
|
+
if (e) {
|
|
1166
|
+
const l = document.querySelector(e);
|
|
1167
|
+
if (!l) throw new Error("element_not_found");
|
|
1168
|
+
return t(l, { quality: 0.92 });
|
|
1169
|
+
}
|
|
1170
|
+
const n = document.documentElement, r = window.scrollX, s = window.scrollY, o = [];
|
|
1171
|
+
for (const l of n.querySelectorAll("*")) {
|
|
1172
|
+
const u = getComputedStyle(l).position;
|
|
516
1173
|
if (u === "fixed" || u === "sticky") {
|
|
517
|
-
const
|
|
518
|
-
|
|
1174
|
+
const i = l.style.transform;
|
|
1175
|
+
o.push([l, i]), l.style.transform = `translate(${r}px, ${s}px)${i ? ` ${i}` : ""}`;
|
|
519
1176
|
}
|
|
520
1177
|
}
|
|
521
1178
|
try {
|
|
522
|
-
return await
|
|
1179
|
+
return await t(n, {
|
|
523
1180
|
quality: 0.92,
|
|
524
|
-
backgroundColor:
|
|
525
|
-
width:
|
|
526
|
-
height:
|
|
1181
|
+
backgroundColor: Cn(),
|
|
1182
|
+
width: n.clientWidth,
|
|
1183
|
+
height: n.clientHeight,
|
|
527
1184
|
style: {
|
|
528
|
-
transform: `translate(${-r}px, ${-
|
|
1185
|
+
transform: `translate(${-r}px, ${-s}px)`,
|
|
529
1186
|
transformOrigin: "top left"
|
|
530
1187
|
}
|
|
531
1188
|
});
|
|
532
1189
|
} finally {
|
|
533
|
-
for (const [
|
|
1190
|
+
for (const [l, u] of o) l.style.transform = u;
|
|
534
1191
|
}
|
|
535
1192
|
}
|
|
536
|
-
function
|
|
1193
|
+
function In(e) {
|
|
537
1194
|
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
538
1195
|
const t = [];
|
|
539
|
-
let
|
|
540
|
-
for (;
|
|
541
|
-
if (
|
|
542
|
-
t.unshift(`#${CSS.escape(
|
|
1196
|
+
let n = e;
|
|
1197
|
+
for (; n && n.nodeType === 1 && n !== document.body && t.length < 4; ) {
|
|
1198
|
+
if (n.id) {
|
|
1199
|
+
t.unshift(`#${CSS.escape(n.id)}`);
|
|
543
1200
|
break;
|
|
544
1201
|
}
|
|
545
|
-
let
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
if (
|
|
550
|
-
const
|
|
551
|
-
|
|
1202
|
+
let r = n.tagName.toLowerCase();
|
|
1203
|
+
const s = typeof n.className == "string" ? n.className.trim().split(/\s+/).filter(Boolean)[0] : null;
|
|
1204
|
+
s && (r += `.${CSS.escape(s)}`);
|
|
1205
|
+
const o = n.parentElement;
|
|
1206
|
+
if (o) {
|
|
1207
|
+
const l = Array.from(o.children).filter((u) => u.tagName === n?.tagName);
|
|
1208
|
+
l.length > 1 && (r += `:nth-of-type(${l.indexOf(n) + 1})`);
|
|
552
1209
|
}
|
|
553
|
-
t.unshift(
|
|
1210
|
+
t.unshift(r), n = o;
|
|
554
1211
|
}
|
|
555
1212
|
return t.join(" > ");
|
|
556
1213
|
}
|
|
557
|
-
function
|
|
558
|
-
const t = e.tagName.toLowerCase(),
|
|
559
|
-
return
|
|
1214
|
+
function Nn(e) {
|
|
1215
|
+
const t = e.tagName.toLowerCase(), n = (e.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 40);
|
|
1216
|
+
return n ? `${t} · ${n}` : t;
|
|
560
1217
|
}
|
|
561
|
-
|
|
1218
|
+
var Je = "leesto:shell-origin";
|
|
1219
|
+
function Mn() {
|
|
1220
|
+
try {
|
|
1221
|
+
return sessionStorage.getItem(Je);
|
|
1222
|
+
} catch {
|
|
1223
|
+
return null;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
function Pn(e) {
|
|
1227
|
+
try {
|
|
1228
|
+
sessionStorage.setItem(Je, e);
|
|
1229
|
+
} catch {
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
function xn() {
|
|
1233
|
+
try {
|
|
1234
|
+
return typeof window.name == "string" ? window.name : "";
|
|
1235
|
+
} catch {
|
|
1236
|
+
return "";
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
function Me(e = {}) {
|
|
562
1240
|
if (typeof window > "u" || window.parent === window) return () => {
|
|
563
1241
|
};
|
|
564
|
-
const t = window.parent,
|
|
1242
|
+
const t = window.parent, n = e.highlightColor ?? mt.light.primary, r = An({
|
|
565
1243
|
explicit: e.shellOrigins,
|
|
566
1244
|
pageOrigin: location.origin
|
|
567
1245
|
});
|
|
568
|
-
let
|
|
1246
|
+
let s = null;
|
|
569
1247
|
try {
|
|
570
|
-
const
|
|
571
|
-
|
|
1248
|
+
const h = document.referrer ? new URL(document.referrer).origin : "";
|
|
1249
|
+
le(h, r) && (s = h);
|
|
572
1250
|
} catch {
|
|
573
1251
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
1252
|
+
if (!s) {
|
|
1253
|
+
const h = Mn();
|
|
1254
|
+
h && le(h, r) && (s = h);
|
|
1255
|
+
}
|
|
1256
|
+
const o = (h) => {
|
|
1257
|
+
if (s) {
|
|
1258
|
+
t.postMessage(h, s);
|
|
577
1259
|
return;
|
|
578
1260
|
}
|
|
579
|
-
for (const
|
|
1261
|
+
for (const v of r) t.postMessage(h, v);
|
|
580
1262
|
};
|
|
581
|
-
let
|
|
582
|
-
const
|
|
583
|
-
|
|
1263
|
+
let l = null, u = "";
|
|
1264
|
+
const i = () => {
|
|
1265
|
+
l && (l.style.outline = u), l = null;
|
|
584
1266
|
};
|
|
585
|
-
let
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
1267
|
+
let c = null;
|
|
1268
|
+
const a = () => {
|
|
1269
|
+
c?.(), i(), document.querySelector("[data-leesto-picker-outline]")?.remove();
|
|
1270
|
+
const h = document.createElement("div");
|
|
1271
|
+
h.dataset.leestoPickerOutline = "", h.setAttribute("aria-hidden", "true"), Object.assign(h.style, {
|
|
1272
|
+
position: "fixed",
|
|
1273
|
+
pointerEvents: "none",
|
|
1274
|
+
zIndex: "2147483647",
|
|
1275
|
+
boxSizing: "border-box",
|
|
1276
|
+
border: `2px solid ${n}`,
|
|
1277
|
+
borderRadius: "4px",
|
|
1278
|
+
display: "none"
|
|
1279
|
+
}), document.documentElement.append(h);
|
|
1280
|
+
let v = null, w = null;
|
|
1281
|
+
const j = document.body.style.cursor, P = () => {
|
|
1282
|
+
const O = w ?? v;
|
|
1283
|
+
if (!O) return;
|
|
1284
|
+
const G = O.getBoundingClientRect();
|
|
1285
|
+
w ? o({
|
|
1286
|
+
type: "leesto:element-picked",
|
|
1287
|
+
selector: In(O),
|
|
1288
|
+
label: Nn(O),
|
|
1289
|
+
rect: {
|
|
1290
|
+
x: G.x,
|
|
1291
|
+
y: G.y,
|
|
1292
|
+
width: G.width,
|
|
1293
|
+
height: G.height
|
|
1294
|
+
}
|
|
1295
|
+
}) : Object.assign(h.style, {
|
|
1296
|
+
display: "block",
|
|
1297
|
+
left: `${G.x}px`,
|
|
1298
|
+
top: `${G.y}px`,
|
|
1299
|
+
width: `${G.width}px`,
|
|
1300
|
+
height: `${G.height}px`
|
|
1301
|
+
});
|
|
1302
|
+
}, I = (O) => {
|
|
1303
|
+
v = O.target instanceof Element ? O.target : null, P();
|
|
1304
|
+
}, ge = () => {
|
|
1305
|
+
h.remove(), document.removeEventListener("mousemove", I, !0), document.removeEventListener("click", ye, !0), document.body.style.cursor = j;
|
|
1306
|
+
}, ye = (O) => {
|
|
1307
|
+
O.preventDefault(), O.stopPropagation(), w = O.target instanceof Element ? O.target : null, ge(), P();
|
|
1308
|
+
}, ve = (O) => {
|
|
1309
|
+
O.key === "Escape" && (c?.(), o({ type: "leesto:pick-cancelled" }));
|
|
610
1310
|
};
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}, document.body.style.cursor = "crosshair", document.addEventListener("mousemove",
|
|
614
|
-
},
|
|
1311
|
+
c = () => {
|
|
1312
|
+
ge(), document.removeEventListener("keydown", ve, !0), document.removeEventListener("scroll", P, !0), window.removeEventListener("resize", P), c = null;
|
|
1313
|
+
}, document.body.style.cursor = "crosshair", document.addEventListener("mousemove", I, !0), document.addEventListener("click", ye, !0), document.addEventListener("keydown", ve, !0), document.addEventListener("scroll", P, !0), window.addEventListener("resize", P);
|
|
1314
|
+
}, d = ct(location.search, xn()), y = ce(d) && !Y(), g = at(d), b = y ? lt(d) ?? it() : void 0, S = y ? qe({
|
|
615
1315
|
captureNetwork: e.captureNetwork !== !1,
|
|
616
|
-
runId:
|
|
1316
|
+
runId: b,
|
|
617
1317
|
runIdOrigins: e.runIdOrigins
|
|
618
1318
|
}) : null;
|
|
619
|
-
let
|
|
620
|
-
const
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
1319
|
+
let R = !1;
|
|
1320
|
+
const L = S ? Sn({
|
|
1321
|
+
diagnostics: S,
|
|
1322
|
+
maskPolicy: g
|
|
1323
|
+
}).then((h) => h && R ? (h.stop(), null) : h).catch(() => null) : null;
|
|
1324
|
+
let C = null, T = !1, q = !1;
|
|
1325
|
+
const F = () => {
|
|
1326
|
+
if (C) {
|
|
1327
|
+
const h = C.stop();
|
|
1328
|
+
C = null, o({
|
|
624
1329
|
type: "leesto:rec-stopped",
|
|
625
|
-
durationMs:
|
|
1330
|
+
durationMs: h
|
|
626
1331
|
});
|
|
627
|
-
} else
|
|
628
|
-
},
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
1332
|
+
} else T && (q = !0);
|
|
1333
|
+
}, N = en({
|
|
1334
|
+
onDetected: () => o({ type: "leesto:login-form-detected" }),
|
|
1335
|
+
onFilled: (h) => o({
|
|
1336
|
+
type: "leesto:login-filled",
|
|
1337
|
+
step: h
|
|
1338
|
+
}),
|
|
1339
|
+
onError: (h) => o({
|
|
1340
|
+
type: "leesto:login-error",
|
|
1341
|
+
reason: h
|
|
1342
|
+
})
|
|
1343
|
+
}), B = () => N.cancel();
|
|
1344
|
+
window.addEventListener("pagehide", B);
|
|
1345
|
+
const $ = On(e.build), M = window.navigation;
|
|
1346
|
+
let f = !1;
|
|
1347
|
+
const p = () => !f && M?.canGoBack === !0, m = () => !f && M?.canGoForward === !0;
|
|
1348
|
+
let E = m(), k = p(), x = location.href;
|
|
1349
|
+
const _ = () => {
|
|
1350
|
+
x = location.href, k = p(), E = m();
|
|
1351
|
+
const h = Tn();
|
|
1352
|
+
o({
|
|
634
1353
|
type: "leesto:ready",
|
|
635
1354
|
url: location.href,
|
|
636
1355
|
bridgeVersion: 1,
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
1356
|
+
capabilities: [
|
|
1357
|
+
Qe,
|
|
1358
|
+
...M ? ["navigation", "navigation-forward"] : [],
|
|
1359
|
+
...L ? [et] : []
|
|
1360
|
+
],
|
|
1361
|
+
canGoBack: k,
|
|
1362
|
+
canGoForward: E,
|
|
1363
|
+
...h ? { favicon: h } : {},
|
|
1364
|
+
...$ ? { build: $ } : {},
|
|
1365
|
+
...b ? { diagnosticRunId: b } : {},
|
|
1366
|
+
...Y() ? { gpc: !0 } : {}
|
|
641
1367
|
});
|
|
642
|
-
},
|
|
643
|
-
if (
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
if (
|
|
647
|
-
|
|
648
|
-
else if (
|
|
649
|
-
|
|
650
|
-
|
|
1368
|
+
}, D = (h) => {
|
|
1369
|
+
if (h.source !== t || !le(h.origin, r) || !nt(h.data)) return;
|
|
1370
|
+
s !== h.origin && (s = h.origin, Pn(h.origin));
|
|
1371
|
+
const v = h.data;
|
|
1372
|
+
if (v.type === "leesto:ping")
|
|
1373
|
+
o({ type: "leesto:pong" }), _();
|
|
1374
|
+
else if (v.type === "leesto:navigate-back" || v.type === "leesto:navigate-forward") {
|
|
1375
|
+
const w = v.type === "leesto:navigate-forward";
|
|
1376
|
+
if (!M || !(w ? m() : p())) return;
|
|
1377
|
+
f = !0, A(), Promise.resolve((w ? M.forward() : M.back()).finished).catch(() => {
|
|
1378
|
+
}).finally(() => {
|
|
1379
|
+
f = !1, R || A();
|
|
1380
|
+
});
|
|
1381
|
+
} else if (v.type === "leesto:highlight") {
|
|
1382
|
+
if (i(), v.selector) {
|
|
1383
|
+
let w = null;
|
|
651
1384
|
try {
|
|
652
|
-
|
|
1385
|
+
w = document.querySelector(v.selector);
|
|
653
1386
|
} catch {
|
|
654
|
-
|
|
1387
|
+
w = null;
|
|
655
1388
|
}
|
|
656
|
-
|
|
1389
|
+
w && (l = w, u = w.style.outline, w.style.outline = `2px solid ${n}`, w.style.outlineOffset = "2px", w.scrollIntoView({
|
|
657
1390
|
block: "center",
|
|
658
1391
|
behavior: "smooth"
|
|
659
1392
|
}));
|
|
660
1393
|
}
|
|
661
|
-
} else if (
|
|
662
|
-
else if (
|
|
663
|
-
else if (
|
|
1394
|
+
} else if (v.type === "leesto:pick-start") a();
|
|
1395
|
+
else if (v.type === "leesto:pick-stop") c?.();
|
|
1396
|
+
else if (v.type === "leesto:capture-request") (v.selector ? Ne(v.selector) : (e.capture ?? Ne)()).then((w) => o({
|
|
664
1397
|
type: "leesto:screenshot",
|
|
665
|
-
dataUrl:
|
|
666
|
-
|
|
1398
|
+
dataUrl: w,
|
|
1399
|
+
...v.selector ? { selector: v.selector } : {}
|
|
1400
|
+
})).catch((w) => o({
|
|
667
1401
|
type: "leesto:capture-failed",
|
|
668
|
-
reason:
|
|
1402
|
+
reason: w instanceof Error ? w.message : "capture_error"
|
|
669
1403
|
}));
|
|
670
|
-
else if (
|
|
671
|
-
if (
|
|
672
|
-
if (
|
|
673
|
-
|
|
1404
|
+
else if (v.type === "leesto:rec-start") {
|
|
1405
|
+
if (C || T) return;
|
|
1406
|
+
if (Y()) {
|
|
1407
|
+
o({
|
|
674
1408
|
type: "leesto:rec-blocked",
|
|
675
1409
|
reason: "gpc"
|
|
676
1410
|
});
|
|
677
1411
|
return;
|
|
678
1412
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
1413
|
+
T = !0, q = !1;
|
|
1414
|
+
const w = (I) => o({
|
|
1415
|
+
type: "leesto:rec-batch",
|
|
1416
|
+
events: I
|
|
1417
|
+
}), j = () => F(), P = () => En({
|
|
1418
|
+
onBatch: w,
|
|
1419
|
+
onCap: j,
|
|
685
1420
|
captureNetwork: e.captureNetwork,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
1421
|
+
maskPolicy: g,
|
|
1422
|
+
diagnostics: S
|
|
1423
|
+
});
|
|
1424
|
+
(L ? L.then((I) => I ? I.stream({
|
|
1425
|
+
onBatch: w,
|
|
1426
|
+
onCap: j
|
|
1427
|
+
}) : P()) : P()).then((I) => {
|
|
1428
|
+
T = !1, C = I, q && F();
|
|
1429
|
+
}).catch((I) => {
|
|
1430
|
+
T = !1, o({
|
|
691
1431
|
type: "leesto:rec-error",
|
|
692
|
-
reason:
|
|
1432
|
+
reason: I instanceof Error ? I.message : "rec_error"
|
|
1433
|
+
});
|
|
1434
|
+
});
|
|
1435
|
+
} else if (v.type === "leesto:rec-stop") F();
|
|
1436
|
+
else if (v.type === "leesto:rec-buffer-request") {
|
|
1437
|
+
if (!L) {
|
|
1438
|
+
o({
|
|
1439
|
+
type: "leesto:rec-buffer",
|
|
1440
|
+
events: [],
|
|
1441
|
+
durationMs: 0,
|
|
1442
|
+
unavailable: Y() ? "gpc" : "not-armed"
|
|
1443
|
+
});
|
|
1444
|
+
return;
|
|
1445
|
+
}
|
|
1446
|
+
L.then((w) => {
|
|
1447
|
+
if (R) return;
|
|
1448
|
+
if (!w) {
|
|
1449
|
+
o({
|
|
1450
|
+
type: "leesto:rec-buffer",
|
|
1451
|
+
events: [],
|
|
1452
|
+
durationMs: 0,
|
|
1453
|
+
unavailable: "error"
|
|
1454
|
+
});
|
|
1455
|
+
return;
|
|
1456
|
+
}
|
|
1457
|
+
const { events: j, durationMs: P } = w.snapshot();
|
|
1458
|
+
o({
|
|
1459
|
+
type: "leesto:rec-buffer",
|
|
1460
|
+
events: j,
|
|
1461
|
+
durationMs: P
|
|
693
1462
|
});
|
|
694
1463
|
});
|
|
695
|
-
} else
|
|
1464
|
+
} else v.type === "leesto:rec-buffer-hold" ? L?.then((w) => w?.hold()) : v.type === "leesto:rec-buffer-release" ? L?.then((w) => w?.release()) : v.type === "leesto:diagnostics-request" ? o({
|
|
696
1465
|
type: "leesto:diagnostics",
|
|
697
|
-
snapshot:
|
|
1466
|
+
snapshot: S?.snapshot() ?? {
|
|
698
1467
|
errors: [],
|
|
699
1468
|
logs: [],
|
|
700
1469
|
network: []
|
|
701
1470
|
}
|
|
702
|
-
})
|
|
1471
|
+
}) : v.type === "leesto:login-watch" ? N.watch() : v.type === "leesto:login-fill" ? N.fill({
|
|
1472
|
+
login: v.login,
|
|
1473
|
+
password: v.password
|
|
1474
|
+
}) : v.type === "leesto:login-cancel" && N.cancel();
|
|
703
1475
|
};
|
|
704
|
-
window.addEventListener("message",
|
|
705
|
-
const
|
|
706
|
-
location.href
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
1476
|
+
window.addEventListener("message", D), _();
|
|
1477
|
+
const A = (h) => {
|
|
1478
|
+
if (!(location.href === x && p() === k && m() === E)) {
|
|
1479
|
+
if (location.href !== x) {
|
|
1480
|
+
const v = location.href;
|
|
1481
|
+
L?.then((w) => w?.markNavigation(v));
|
|
1482
|
+
}
|
|
1483
|
+
x = location.href, k = p(), E = m(), o({
|
|
1484
|
+
type: "leesto:location",
|
|
1485
|
+
url: location.href,
|
|
1486
|
+
canGoBack: k,
|
|
1487
|
+
canGoForward: E,
|
|
1488
|
+
navigationType: typeof h == "string" ? h : "traverse"
|
|
1489
|
+
});
|
|
1490
|
+
}
|
|
1491
|
+
}, de = history.pushState, pe = history.replaceState, he = (...h) => {
|
|
1492
|
+
de.apply(history, h), A("push");
|
|
1493
|
+
}, me = (...h) => {
|
|
1494
|
+
pe.apply(history, h), A("replace");
|
|
714
1495
|
};
|
|
715
|
-
return history.pushState =
|
|
716
|
-
A(),
|
|
1496
|
+
return history.pushState = he, history.replaceState = me, M?.addEventListener("currententrychange", A), window.addEventListener("popstate", A), window.addEventListener("hashchange", A), () => {
|
|
1497
|
+
R = !0, M?.removeEventListener("currententrychange", A), F(), L?.then((h) => h?.stop()), S?.teardown(), i(), c?.(), N.teardown(), window.removeEventListener("pagehide", B), window.removeEventListener("message", D), window.removeEventListener("popstate", A), window.removeEventListener("hashchange", A), history.pushState === he && (history.pushState = de), history.replaceState === me && (history.replaceState = pe);
|
|
717
1498
|
};
|
|
718
1499
|
}
|
|
719
|
-
function
|
|
1500
|
+
function Dn() {
|
|
720
1501
|
return typeof document > "u" ? null : document.currentScript ?? document.querySelector("script[data-leesto-connect]");
|
|
721
1502
|
}
|
|
722
|
-
function
|
|
723
|
-
const t = {},
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
return
|
|
1503
|
+
function qn(e) {
|
|
1504
|
+
const t = {}, n = e?.dataset.highlightColor;
|
|
1505
|
+
n && (t.highlightColor = n);
|
|
1506
|
+
const r = (e?.dataset.shellOrigin ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
1507
|
+
return r.length > 0 && (t.shellOrigins = r), t;
|
|
727
1508
|
}
|
|
728
1509
|
if (typeof window < "u") {
|
|
729
|
-
window.LeestoConnect = { connect: (t) =>
|
|
730
|
-
const e =
|
|
731
|
-
(!e || e.dataset.leestoManual === void 0) &&
|
|
1510
|
+
window.LeestoConnect = { connect: (t) => Me(t) };
|
|
1511
|
+
const e = Dn();
|
|
1512
|
+
(!e || e.dataset.leestoManual === void 0) && Me(qn(e));
|
|
732
1513
|
}
|
|
733
1514
|
|
|
734
1515
|
//# sourceMappingURL=leesto-connect.js.map
|