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