leesto-connect 0.2.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 +24 -1
- package/dist/leesto-connect.js +936 -544
- package/dist/leesto-connect.js.map +1 -1
- package/package.json +2 -1
package/dist/leesto-connect.js
CHANGED
|
@@ -1,52 +1,88 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
1
|
+
var Qe = "login", et = "rrweb-buffer", tt = 6e3;
|
|
2
|
+
function nt(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 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);
|
|
12
|
+
}
|
|
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);
|
|
8
20
|
}
|
|
9
|
-
function
|
|
21
|
+
function it() {
|
|
10
22
|
try {
|
|
11
23
|
const e = globalThis.crypto, t = e?.randomUUID?.();
|
|
12
|
-
if (
|
|
24
|
+
if (Z(t)) return t;
|
|
13
25
|
if (!e?.getRandomValues) return;
|
|
14
26
|
const n = e.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
15
27
|
n[6] = (n[6] ?? 0) & 15 | 64, n[8] = (n[8] ?? 0) & 63 | 128;
|
|
16
|
-
const r = Array.from(n, (o) => o.toString(16).padStart(2, "0")).join(""),
|
|
17
|
-
return
|
|
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;
|
|
18
30
|
} catch {
|
|
19
31
|
return;
|
|
20
32
|
}
|
|
21
33
|
}
|
|
22
|
-
function
|
|
34
|
+
function at(e) {
|
|
35
|
+
try {
|
|
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) {
|
|
23
43
|
try {
|
|
24
|
-
const t = new URLSearchParams(e).get(
|
|
25
|
-
return
|
|
44
|
+
const t = new URLSearchParams(e).get(xe);
|
|
45
|
+
return Z(t) ? t : void 0;
|
|
26
46
|
} catch {
|
|
27
47
|
return;
|
|
28
48
|
}
|
|
29
49
|
}
|
|
30
|
-
function
|
|
50
|
+
function ce(e) {
|
|
31
51
|
try {
|
|
32
|
-
return new URLSearchParams(e).get(
|
|
52
|
+
return new URLSearchParams(e).get(Pe) === "1";
|
|
33
53
|
} catch {
|
|
34
54
|
return !1;
|
|
35
55
|
}
|
|
36
56
|
}
|
|
37
|
-
|
|
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 = {
|
|
38
74
|
primary: "#08783f",
|
|
39
75
|
hover: "#066633",
|
|
40
76
|
foreground: "#f3fff7"
|
|
41
|
-
},
|
|
77
|
+
}, ht = {
|
|
42
78
|
primary: "#46c383",
|
|
43
79
|
hover: "#65d49b",
|
|
44
80
|
foreground: "#082315"
|
|
45
|
-
},
|
|
46
|
-
light:
|
|
47
|
-
dark:
|
|
81
|
+
}, mt = {
|
|
82
|
+
light: pt,
|
|
83
|
+
dark: ht
|
|
48
84
|
};
|
|
49
|
-
function
|
|
85
|
+
function X(e) {
|
|
50
86
|
const t = [];
|
|
51
87
|
return {
|
|
52
88
|
push(n) {
|
|
@@ -57,65 +93,65 @@ function j(e) {
|
|
|
57
93
|
}
|
|
58
94
|
};
|
|
59
95
|
}
|
|
60
|
-
var
|
|
61
|
-
function
|
|
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) {
|
|
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 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;
|
|
67
103
|
}
|
|
68
104
|
return t % 10 === 0;
|
|
69
105
|
}
|
|
70
|
-
function
|
|
106
|
+
function U(e) {
|
|
71
107
|
if (!e) return e;
|
|
72
|
-
let t = e.replace(
|
|
73
|
-
return t = t.replace(
|
|
108
|
+
let t = e.replace(gt, "[email masqué]");
|
|
109
|
+
return t = t.replace(yt, "[id masqué]"), t = t.replace(vt, (n) => {
|
|
74
110
|
const r = n.replace(/[ -]/g, "");
|
|
75
|
-
return r.length >= 13 && r.length <= 19 &&
|
|
111
|
+
return r.length >= 13 && r.length <= 19 && wt(r) ? "[carte masquée]" : n;
|
|
76
112
|
}), t;
|
|
77
113
|
}
|
|
78
114
|
function H(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 + U(n.pathname);
|
|
83
119
|
} catch {
|
|
84
|
-
return
|
|
120
|
+
return U(t.split("?")[0] ?? t);
|
|
85
121
|
}
|
|
86
122
|
}
|
|
87
|
-
var
|
|
123
|
+
var bt = /* @__PURE__ */ new Set(["fetch", "xmlhttprequest"]), Et = ["deprecation", "intervention"], St = { teardown: () => {
|
|
88
124
|
} };
|
|
89
|
-
function
|
|
125
|
+
function Rt(e) {
|
|
90
126
|
const t = typeof performance < "u" ? performance.timeOrigin : 0;
|
|
91
127
|
return Math.round(t + e);
|
|
92
128
|
}
|
|
93
|
-
function
|
|
129
|
+
function Lt(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 _t(e) {
|
|
134
|
+
if (bt.has(e.initiatorType)) return null;
|
|
135
|
+
const t = Lt(e), n = e.transferSize || e.encodedBodySize || void 0;
|
|
100
136
|
return {
|
|
101
137
|
method: "GET",
|
|
102
138
|
url: H(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: Rt(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 kt(e) {
|
|
148
|
+
if (typeof window > "u") return St;
|
|
113
149
|
const t = [];
|
|
114
150
|
if (typeof PerformanceObserver < "u") try {
|
|
115
|
-
const o = new PerformanceObserver((
|
|
116
|
-
for (const
|
|
117
|
-
const
|
|
118
|
-
|
|
151
|
+
const o = new PerformanceObserver((l) => {
|
|
152
|
+
for (const u of l.getEntries()) try {
|
|
153
|
+
const i = _t(u);
|
|
154
|
+
i && e.onResource(i);
|
|
119
155
|
} catch {
|
|
120
156
|
}
|
|
121
157
|
});
|
|
@@ -127,27 +163,27 @@ function Je(e) {
|
|
|
127
163
|
}
|
|
128
164
|
const n = window.ReportingObserver;
|
|
129
165
|
if (n) try {
|
|
130
|
-
const o = new n(((
|
|
131
|
-
for (const
|
|
132
|
-
const
|
|
133
|
-
e.onReport("warn", `Navigateur (${
|
|
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}`);
|
|
134
170
|
}
|
|
135
171
|
}), {
|
|
136
|
-
types:
|
|
172
|
+
types: Et,
|
|
137
173
|
buffered: !0
|
|
138
174
|
});
|
|
139
175
|
o.observe(), t.push(() => o.disconnect());
|
|
140
176
|
} catch {
|
|
141
177
|
}
|
|
142
178
|
const r = (o) => {
|
|
143
|
-
const
|
|
144
|
-
e.onReport("error", `CSP : ${
|
|
179
|
+
const l = o;
|
|
180
|
+
e.onReport("error", `CSP : ${l.blockedURI || "ressource"} bloqué par « ${l.violatedDirective} »`);
|
|
145
181
|
};
|
|
146
182
|
window.addEventListener("securitypolicyviolation", r), t.push(() => window.removeEventListener("securitypolicyviolation", r));
|
|
147
|
-
let
|
|
183
|
+
let s = !1;
|
|
148
184
|
return { teardown: () => {
|
|
149
|
-
if (!
|
|
150
|
-
|
|
185
|
+
if (!s) {
|
|
186
|
+
s = !0;
|
|
151
187
|
for (const o of t) try {
|
|
152
188
|
o();
|
|
153
189
|
} catch {
|
|
@@ -155,13 +191,13 @@ function Je(e) {
|
|
|
155
191
|
}
|
|
156
192
|
} };
|
|
157
193
|
}
|
|
158
|
-
var
|
|
159
|
-
function
|
|
194
|
+
var At = 50, Ot = 30, Tt = 100, Ct = 50, z = 500, It = 8e3;
|
|
195
|
+
function se(e) {
|
|
160
196
|
const t = e instanceof Error ? e.stack : void 0;
|
|
161
197
|
if (t)
|
|
162
|
-
return
|
|
198
|
+
return U(t).slice(0, It);
|
|
163
199
|
}
|
|
164
|
-
function
|
|
200
|
+
function ie(e) {
|
|
165
201
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
166
202
|
if (typeof e == "string") return e;
|
|
167
203
|
if (typeof e == "object" && e !== null) try {
|
|
@@ -171,12 +207,12 @@ function te(e) {
|
|
|
171
207
|
}
|
|
172
208
|
return String(e);
|
|
173
209
|
}
|
|
174
|
-
function
|
|
210
|
+
function Se(e) {
|
|
175
211
|
if (!e) return;
|
|
176
212
|
const t = Number(e);
|
|
177
213
|
return Number.isFinite(t) && t >= 0 ? t : void 0;
|
|
178
214
|
}
|
|
179
|
-
var
|
|
215
|
+
var Nt = {
|
|
180
216
|
snapshot: () => ({
|
|
181
217
|
errors: [],
|
|
182
218
|
logs: [],
|
|
@@ -189,228 +225,228 @@ var ot = {
|
|
|
189
225
|
teardown: () => {
|
|
190
226
|
}
|
|
191
227
|
};
|
|
192
|
-
function
|
|
193
|
-
if (typeof window > "u") return
|
|
194
|
-
const t =
|
|
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) => {
|
|
195
231
|
if (!o) return !1;
|
|
196
232
|
try {
|
|
197
|
-
const
|
|
198
|
-
return
|
|
233
|
+
const p = new URL(String(f), location.href);
|
|
234
|
+
return p.origin === location.origin || (e.runIdOrigins ?? []).includes(p.origin);
|
|
199
235
|
} catch {
|
|
200
236
|
return !1;
|
|
201
237
|
}
|
|
202
238
|
};
|
|
203
|
-
let
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
e.captureNetwork && t.push(
|
|
208
|
-
},
|
|
209
|
-
if (!
|
|
210
|
-
const
|
|
211
|
-
level:
|
|
212
|
-
message:
|
|
213
|
-
...
|
|
214
|
-
...
|
|
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,
|
|
215
251
|
at: Date.now()
|
|
216
252
|
};
|
|
217
|
-
|
|
218
|
-
},
|
|
253
|
+
s.push(k), i(Ee, k);
|
|
254
|
+
}, d = (f, p) => {
|
|
219
255
|
try {
|
|
220
|
-
const
|
|
221
|
-
|
|
256
|
+
const m = U(p.map(ie).join(" ")).slice(0, z), E = p.find((k) => k instanceof Error);
|
|
257
|
+
a(f, m, se(E), {
|
|
222
258
|
mechanism: "console",
|
|
223
|
-
...
|
|
259
|
+
...E instanceof Error && E.name ? { name: E.name } : {}
|
|
224
260
|
});
|
|
225
261
|
} catch {
|
|
226
262
|
}
|
|
227
|
-
},
|
|
263
|
+
}, y = (f, p) => {
|
|
228
264
|
try {
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
level:
|
|
232
|
-
message:
|
|
265
|
+
const m = U(p.map(ie).join(" ")).slice(0, z);
|
|
266
|
+
m && r.push({
|
|
267
|
+
level: f,
|
|
268
|
+
message: m,
|
|
233
269
|
at: Date.now()
|
|
234
270
|
});
|
|
235
271
|
} catch {
|
|
236
272
|
}
|
|
237
|
-
},
|
|
238
|
-
console.error = (...
|
|
239
|
-
const
|
|
240
|
-
const
|
|
241
|
-
if (
|
|
242
|
-
const
|
|
243
|
-
if (!
|
|
244
|
-
|
|
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, {
|
|
245
281
|
mechanism: "resource",
|
|
246
|
-
sourceUrl: H(
|
|
282
|
+
sourceUrl: H(E)
|
|
247
283
|
});
|
|
248
284
|
return;
|
|
249
285
|
}
|
|
250
|
-
const
|
|
251
|
-
|
|
286
|
+
const m = f;
|
|
287
|
+
a("error", U(`Erreur non gérée : ${m.message}`).slice(0, z), se(m.error), {
|
|
252
288
|
mechanism: "window.error",
|
|
253
|
-
...typeof
|
|
254
|
-
...typeof
|
|
255
|
-
...typeof
|
|
256
|
-
...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 } : {}
|
|
257
293
|
});
|
|
258
|
-
},
|
|
259
|
-
|
|
294
|
+
}, C = (f) => {
|
|
295
|
+
a("error", U(`Promesse rejetée : ${ie(f.reason)}`).slice(0, z), se(f.reason), {
|
|
260
296
|
mechanism: "unhandledrejection",
|
|
261
|
-
...
|
|
297
|
+
...f.reason instanceof Error && f.reason.name ? { name: f.reason.name } : {}
|
|
262
298
|
});
|
|
263
299
|
};
|
|
264
|
-
window.addEventListener("error",
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
let
|
|
269
|
-
if (o &&
|
|
270
|
-
const
|
|
271
|
-
for (const [
|
|
272
|
-
|
|
273
|
-
...
|
|
274
|
-
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: _
|
|
275
311
|
};
|
|
276
312
|
}
|
|
277
313
|
try {
|
|
278
|
-
const
|
|
314
|
+
const _ = await T(f, x);
|
|
279
315
|
try {
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
method:
|
|
283
|
-
url:
|
|
284
|
-
status:
|
|
285
|
-
durationMs: Date.now() -
|
|
286
|
-
responseSize:
|
|
287
|
-
contentType:
|
|
288
|
-
startedAt:
|
|
289
|
-
...
|
|
290
|
-
...
|
|
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) } : {},
|
|
291
327
|
...o ? { runId: o } : {}
|
|
292
|
-
}),
|
|
293
|
-
method:
|
|
294
|
-
url:
|
|
295
|
-
status:
|
|
296
|
-
durationMs: Date.now() -
|
|
328
|
+
}), _.ok || i(oe, {
|
|
329
|
+
method: E,
|
|
330
|
+
url: k,
|
|
331
|
+
status: _.status,
|
|
332
|
+
durationMs: Date.now() - m
|
|
297
333
|
});
|
|
298
334
|
} catch {
|
|
299
335
|
}
|
|
300
|
-
return
|
|
301
|
-
} catch (
|
|
336
|
+
return _;
|
|
337
|
+
} catch (_) {
|
|
302
338
|
try {
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
method:
|
|
306
|
-
url:
|
|
339
|
+
const D = Date.now() - m;
|
|
340
|
+
c({
|
|
341
|
+
method: E,
|
|
342
|
+
url: k,
|
|
307
343
|
status: 0,
|
|
308
|
-
durationMs:
|
|
309
|
-
startedAt:
|
|
344
|
+
durationMs: D,
|
|
345
|
+
startedAt: m,
|
|
310
346
|
failed: !0,
|
|
311
347
|
...o ? { runId: o } : {}
|
|
312
|
-
}),
|
|
313
|
-
method:
|
|
314
|
-
url:
|
|
348
|
+
}), i(oe, {
|
|
349
|
+
method: E,
|
|
350
|
+
url: k,
|
|
315
351
|
status: 0,
|
|
316
|
-
durationMs:
|
|
352
|
+
durationMs: D
|
|
317
353
|
});
|
|
318
354
|
} catch {
|
|
319
355
|
}
|
|
320
|
-
throw
|
|
356
|
+
throw _;
|
|
321
357
|
}
|
|
322
358
|
}));
|
|
323
|
-
const
|
|
324
|
-
XMLHttpRequest.prototype.open = function(
|
|
325
|
-
return this[
|
|
326
|
-
method: (
|
|
327
|
-
url: H(
|
|
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),
|
|
328
364
|
start: 0,
|
|
329
|
-
propagate:
|
|
330
|
-
},
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
...
|
|
365
|
+
propagate: l(p)
|
|
366
|
+
}, q.apply(this, [
|
|
367
|
+
f,
|
|
368
|
+
p,
|
|
369
|
+
...m
|
|
334
370
|
]);
|
|
335
|
-
}, XMLHttpRequest.prototype.send = function(...
|
|
336
|
-
const
|
|
337
|
-
if (
|
|
338
|
-
if (
|
|
339
|
-
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);
|
|
340
376
|
} catch {
|
|
341
377
|
}
|
|
342
378
|
this.addEventListener("loadend", () => {
|
|
343
379
|
try {
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
method:
|
|
347
|
-
url:
|
|
348
|
-
status:
|
|
349
|
-
durationMs:
|
|
350
|
-
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")),
|
|
351
387
|
contentType: this.getResponseHeader("content-type") ?? void 0,
|
|
352
|
-
startedAt:
|
|
353
|
-
...
|
|
388
|
+
startedAt: p.start,
|
|
389
|
+
...k ? { failed: !0 } : {},
|
|
354
390
|
...o ? { runId: o } : {},
|
|
355
|
-
...
|
|
356
|
-
...
|
|
357
|
-
}), (
|
|
358
|
-
method:
|
|
359
|
-
url:
|
|
360
|
-
status:
|
|
361
|
-
durationMs:
|
|
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
|
|
362
398
|
});
|
|
363
399
|
} catch {
|
|
364
400
|
}
|
|
365
401
|
}, { once: !0 });
|
|
366
402
|
}
|
|
367
|
-
return
|
|
403
|
+
return F.apply(this, f);
|
|
368
404
|
};
|
|
369
|
-
const
|
|
370
|
-
onResource: (
|
|
405
|
+
const B = kt({
|
|
406
|
+
onResource: (f) => {
|
|
371
407
|
e.captureNetwork && n.push(o ? {
|
|
372
|
-
...
|
|
408
|
+
...f,
|
|
373
409
|
runId: o
|
|
374
|
-
} :
|
|
410
|
+
} : f);
|
|
375
411
|
},
|
|
376
|
-
onReport: (
|
|
377
|
-
}),
|
|
378
|
-
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;
|
|
379
415
|
return {
|
|
380
416
|
snapshot: () => ({
|
|
381
|
-
errors:
|
|
417
|
+
errors: s.snapshot(),
|
|
382
418
|
logs: r.snapshot(),
|
|
383
|
-
network:
|
|
419
|
+
network: $(),
|
|
384
420
|
...o ? { runId: o } : {}
|
|
385
421
|
}),
|
|
386
|
-
setSink: (
|
|
387
|
-
|
|
422
|
+
setSink: (f) => {
|
|
423
|
+
u = f;
|
|
388
424
|
},
|
|
389
425
|
flushRings: () => {
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
const
|
|
395
|
-
|
|
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 });
|
|
396
432
|
},
|
|
397
433
|
teardown: () => {
|
|
398
|
-
|
|
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);
|
|
399
435
|
}
|
|
400
436
|
};
|
|
401
437
|
}
|
|
402
|
-
var
|
|
438
|
+
var Mt = 100, Pt = [
|
|
403
439
|
"hidden",
|
|
404
440
|
"class",
|
|
405
441
|
"style",
|
|
406
442
|
"type",
|
|
407
443
|
"disabled",
|
|
408
444
|
"aria-hidden"
|
|
409
|
-
],
|
|
410
|
-
function
|
|
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) {
|
|
411
447
|
return (e ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/[’‘]/g, "'").replace(/\s+/g, " ").trim().toLowerCase();
|
|
412
448
|
}
|
|
413
|
-
function
|
|
449
|
+
function ne(e) {
|
|
414
450
|
let t = e;
|
|
415
451
|
for (; t; ) {
|
|
416
452
|
if (t.hasAttribute("hidden") || t.getAttribute("aria-hidden") === "true" || t instanceof HTMLInputElement && t.type === "hidden") return !1;
|
|
@@ -420,43 +456,43 @@ function J(e) {
|
|
|
420
456
|
}
|
|
421
457
|
return !0;
|
|
422
458
|
}
|
|
423
|
-
function
|
|
424
|
-
return Array.from(e.querySelectorAll(t)).filter(
|
|
459
|
+
function V(e, t) {
|
|
460
|
+
return Array.from(e.querySelectorAll(t)).filter(ne);
|
|
425
461
|
}
|
|
426
|
-
function
|
|
462
|
+
function Bt(e) {
|
|
427
463
|
return e ? e instanceof HTMLInputElement ? e.value : e.textContent ?? "" : "";
|
|
428
464
|
}
|
|
429
|
-
function
|
|
465
|
+
function Be(e, t) {
|
|
430
466
|
return !e.outsideForms || !t.closest("form");
|
|
431
467
|
}
|
|
432
|
-
function
|
|
433
|
-
return Array.from(e.scope.querySelectorAll(t)).filter((n) =>
|
|
468
|
+
function K(e, t) {
|
|
469
|
+
return Array.from(e.scope.querySelectorAll(t)).filter((n) => ne(n) && Be(e, n));
|
|
434
470
|
}
|
|
435
|
-
function
|
|
436
|
-
return
|
|
471
|
+
function Q(e) {
|
|
472
|
+
return W(e.getAttribute("aria-label") ?? e.getAttribute("title") ?? e.textContent);
|
|
437
473
|
}
|
|
438
|
-
function
|
|
439
|
-
const t =
|
|
440
|
-
return
|
|
474
|
+
function $t(e) {
|
|
475
|
+
const t = Q(e);
|
|
476
|
+
return Dt.test(t) || Ft.test(t);
|
|
441
477
|
}
|
|
442
|
-
function
|
|
478
|
+
function Gt(e, t) {
|
|
443
479
|
if (e.getAttribute("type") === "submit" || !t) return !1;
|
|
444
480
|
const n = e.parentElement;
|
|
445
|
-
return !n ||
|
|
481
|
+
return !n || V(n, te).length === 0 ? !1 : !n.contains(t);
|
|
446
482
|
}
|
|
447
|
-
var
|
|
448
|
-
function
|
|
449
|
-
return Array.from(e.querySelectorAll(
|
|
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);
|
|
450
486
|
}
|
|
451
|
-
function
|
|
487
|
+
function Vt(e, t) {
|
|
452
488
|
let n = e.parentElement;
|
|
453
489
|
for (; n && !n.contains(t); ) {
|
|
454
|
-
if (
|
|
490
|
+
if (Ht(n)) return !0;
|
|
455
491
|
n = n.parentElement;
|
|
456
492
|
}
|
|
457
493
|
return !1;
|
|
458
494
|
}
|
|
459
|
-
function
|
|
495
|
+
function jt(e) {
|
|
460
496
|
const t = [
|
|
461
497
|
e.getAttribute("name"),
|
|
462
498
|
e.getAttribute("id"),
|
|
@@ -468,173 +504,173 @@ function yt(e) {
|
|
|
468
504
|
const r = e.ownerDocument.querySelector(`label[for="${CSS.escape(n)}"]`);
|
|
469
505
|
r && t.push(r.textContent);
|
|
470
506
|
}
|
|
471
|
-
return
|
|
507
|
+
return W(t.filter(Boolean).join(" "));
|
|
472
508
|
}
|
|
473
|
-
function
|
|
509
|
+
function zt(e, t) {
|
|
474
510
|
const n = e.parentElement;
|
|
475
511
|
if (!n) return null;
|
|
476
|
-
const r = e.ownerDocument.body,
|
|
477
|
-
scope:
|
|
512
|
+
const r = e.ownerDocument.body, s = (a) => t ? $e({
|
|
513
|
+
scope: a,
|
|
478
514
|
outsideForms: !0
|
|
479
|
-
}, t) : e, o = (
|
|
480
|
-
scope:
|
|
515
|
+
}, t) : e, o = (a) => fe({
|
|
516
|
+
scope: a,
|
|
481
517
|
outsideForms: !0
|
|
482
|
-
}, e,
|
|
483
|
-
let
|
|
484
|
-
const
|
|
485
|
-
const
|
|
486
|
-
|
|
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);
|
|
487
523
|
};
|
|
488
|
-
for (
|
|
489
|
-
const
|
|
490
|
-
if (!
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
const
|
|
494
|
-
if (
|
|
495
|
-
|
|
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);
|
|
496
532
|
}
|
|
497
533
|
return {
|
|
498
|
-
scope:
|
|
534
|
+
scope: l(u) ? u : i ?? n,
|
|
499
535
|
outsideForms: !0
|
|
500
536
|
};
|
|
501
537
|
}
|
|
502
|
-
function
|
|
538
|
+
function Re(e, t, n) {
|
|
503
539
|
return e ? {
|
|
504
540
|
scope: e,
|
|
505
541
|
outsideForms: !1
|
|
506
|
-
} :
|
|
542
|
+
} : zt(t, n);
|
|
507
543
|
}
|
|
508
|
-
function
|
|
544
|
+
function Wt(e, t) {
|
|
509
545
|
let n = e.parentElement;
|
|
510
546
|
for (; n && n !== t.scope; ) {
|
|
511
|
-
if (
|
|
547
|
+
if (V(n, te).length === 1) return !0;
|
|
512
548
|
n = n.parentElement;
|
|
513
549
|
}
|
|
514
550
|
return !1;
|
|
515
551
|
}
|
|
516
|
-
function
|
|
517
|
-
const r = (
|
|
518
|
-
if (
|
|
519
|
-
const o = (
|
|
520
|
-
const
|
|
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);
|
|
521
557
|
return [
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
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
|
|
527
563
|
];
|
|
528
564
|
};
|
|
529
|
-
let
|
|
530
|
-
return
|
|
531
|
-
const
|
|
532
|
-
for (let
|
|
533
|
-
const
|
|
534
|
-
if (
|
|
535
|
-
|
|
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);
|
|
536
572
|
return;
|
|
537
573
|
}
|
|
538
574
|
}
|
|
539
|
-
}),
|
|
575
|
+
}), l;
|
|
540
576
|
}
|
|
541
|
-
function
|
|
542
|
-
return e.querySelectorAll("form").length + (
|
|
577
|
+
function Le(e) {
|
|
578
|
+
return e.querySelectorAll("form").length + (V(e, te).some((t) => !t.closest("form")) ? 1 : 0) === 1;
|
|
543
579
|
}
|
|
544
|
-
function
|
|
580
|
+
function Xt(e, t) {
|
|
545
581
|
if (e) {
|
|
546
582
|
const n = e.getAttribute("aria-label");
|
|
547
583
|
if (n) return n;
|
|
548
584
|
const r = e.getAttribute("aria-labelledby");
|
|
549
585
|
if (r) {
|
|
550
|
-
const
|
|
551
|
-
if (
|
|
586
|
+
const u = e.ownerDocument.getElementById(r);
|
|
587
|
+
if (u) return u.textContent ?? "";
|
|
552
588
|
}
|
|
553
|
-
const
|
|
554
|
-
if (
|
|
589
|
+
const s = e.querySelector("h1, h2, h3, legend");
|
|
590
|
+
if (s) return s.textContent ?? "";
|
|
555
591
|
let o = e.previousElementSibling;
|
|
556
592
|
for (; o; ) {
|
|
557
|
-
const
|
|
558
|
-
if (
|
|
559
|
-
const
|
|
560
|
-
return
|
|
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 ?? "" : "";
|
|
561
597
|
}
|
|
562
598
|
o = o.previousElementSibling;
|
|
563
599
|
}
|
|
564
|
-
const
|
|
565
|
-
if (
|
|
566
|
-
const
|
|
567
|
-
if (
|
|
568
|
-
return
|
|
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 ?? "" : "";
|
|
569
605
|
}
|
|
570
606
|
return "";
|
|
571
607
|
}
|
|
572
608
|
return (t instanceof Document ? t.body : t)?.querySelector("h1, h2, h3")?.textContent ?? "";
|
|
573
609
|
}
|
|
574
|
-
function
|
|
575
|
-
const r =
|
|
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([
|
|
576
612
|
e?.id,
|
|
577
613
|
e?.getAttribute("name"),
|
|
578
614
|
e?.className,
|
|
579
615
|
o
|
|
580
616
|
].filter(Boolean).join(" "));
|
|
581
617
|
return {
|
|
582
|
-
positive:
|
|
583
|
-
negative:
|
|
618
|
+
positive: J.test(r) || J.test(s),
|
|
619
|
+
negative: ue.test(r) || ue.test(s) || xt.test(l)
|
|
584
620
|
};
|
|
585
621
|
}
|
|
586
|
-
function
|
|
587
|
-
const n =
|
|
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];
|
|
588
624
|
if (n) return n;
|
|
589
625
|
if (!t) return null;
|
|
590
|
-
const r =
|
|
626
|
+
const r = K(e, 'input[type="text"], input:not([type])').filter((s) => s.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
591
627
|
return r[r.length - 1] ?? null;
|
|
592
628
|
}
|
|
593
|
-
function
|
|
629
|
+
function ae(e, t) {
|
|
594
630
|
if (t.querySelector('input[autocomplete="new-password"]')) return null;
|
|
595
|
-
const n =
|
|
631
|
+
const n = V(t, ee);
|
|
596
632
|
if (n.length > 1) return null;
|
|
597
633
|
if (n.length === 1) {
|
|
598
|
-
const
|
|
599
|
-
if (!
|
|
600
|
-
const
|
|
601
|
-
return !(
|
|
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 : {
|
|
602
638
|
kind: "password",
|
|
603
639
|
form: e,
|
|
604
|
-
identifier:
|
|
605
|
-
password:
|
|
606
|
-
submit:
|
|
640
|
+
identifier: a,
|
|
641
|
+
password: i,
|
|
642
|
+
submit: d
|
|
607
643
|
};
|
|
608
644
|
}
|
|
609
|
-
const r =
|
|
645
|
+
const r = V(t, Fe);
|
|
610
646
|
if (r.length !== 1) return null;
|
|
611
|
-
const
|
|
647
|
+
const s = r[0], o = Re(e, s, null);
|
|
612
648
|
if (!o) return null;
|
|
613
|
-
const
|
|
614
|
-
return !(
|
|
649
|
+
const l = fe(o, s, s), u = _e(e, t, l);
|
|
650
|
+
return !(s.autocomplete === "username" || u.positive) || u.negative ? null : {
|
|
615
651
|
kind: "identifier",
|
|
616
652
|
form: e,
|
|
617
|
-
identifier:
|
|
653
|
+
identifier: s,
|
|
618
654
|
password: null,
|
|
619
|
-
submit:
|
|
655
|
+
submit: l
|
|
620
656
|
};
|
|
621
657
|
}
|
|
622
|
-
function
|
|
658
|
+
function ke(e = document) {
|
|
623
659
|
const t = Array.from(e.querySelectorAll("form"));
|
|
624
660
|
for (const n of t) {
|
|
625
|
-
const r =
|
|
661
|
+
const r = ae(n, n);
|
|
626
662
|
if (r) return r;
|
|
627
663
|
}
|
|
628
|
-
return t.length === 0 ||
|
|
664
|
+
return t.length === 0 || V(e, ee).find((n) => !n.closest("form")) ? ae(null, e) : null;
|
|
629
665
|
}
|
|
630
|
-
function
|
|
666
|
+
function Ae(e, t) {
|
|
631
667
|
const n = Object.getPrototypeOf(e), r = Object.getOwnPropertyDescriptor(n, "value")?.set ?? Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
632
668
|
r ? r.call(e, t) : e.value = t, e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
633
669
|
}
|
|
634
|
-
function
|
|
670
|
+
function Kt(e) {
|
|
635
671
|
return !!e.form || !!e.submit;
|
|
636
672
|
}
|
|
637
|
-
function
|
|
673
|
+
function Yt(e) {
|
|
638
674
|
const t = e.form, n = t?.noValidate;
|
|
639
675
|
t && (t.noValidate = !0);
|
|
640
676
|
try {
|
|
@@ -643,28 +679,28 @@ function St(e) {
|
|
|
643
679
|
t && (t.noValidate = n ?? !1);
|
|
644
680
|
}
|
|
645
681
|
}
|
|
646
|
-
var
|
|
682
|
+
var Zt = {
|
|
647
683
|
identifier: null,
|
|
648
684
|
password: null
|
|
649
685
|
};
|
|
650
|
-
function
|
|
686
|
+
function Oe(e, t) {
|
|
651
687
|
return !e || e.disabled || e.readOnly ? !1 : e.value === "" || t !== null && e.value === t;
|
|
652
688
|
}
|
|
653
|
-
function
|
|
689
|
+
function Ge(e, t, n) {
|
|
654
690
|
return {
|
|
655
|
-
identifier:
|
|
656
|
-
password:
|
|
691
|
+
identifier: Oe(e.identifier, n.identifier) && !t.identifier,
|
|
692
|
+
password: Oe(e.password, n.password) && !t.password
|
|
657
693
|
};
|
|
658
694
|
}
|
|
659
|
-
function
|
|
695
|
+
function Jt(e, t, n) {
|
|
660
696
|
const r = e.identifier;
|
|
661
697
|
return !r || n.identifier ? !1 : r.value !== "" && r.value !== t.login;
|
|
662
698
|
}
|
|
663
|
-
function
|
|
664
|
-
const
|
|
665
|
-
return !
|
|
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" };
|
|
666
702
|
}
|
|
667
|
-
function
|
|
703
|
+
function en(e) {
|
|
668
704
|
if (typeof window > "u" || typeof MutationObserver > "u") return {
|
|
669
705
|
watch() {
|
|
670
706
|
},
|
|
@@ -681,24 +717,24 @@ function At(e) {
|
|
|
681
717
|
}, r = {
|
|
682
718
|
identifier: null,
|
|
683
719
|
password: null
|
|
684
|
-
},
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
},
|
|
688
|
-
o?.disconnect(), o = null,
|
|
689
|
-
},
|
|
690
|
-
const
|
|
691
|
-
if (!
|
|
692
|
-
|
|
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 = {
|
|
693
729
|
identifier: null,
|
|
694
730
|
password: null
|
|
695
|
-
},
|
|
731
|
+
}, i();
|
|
696
732
|
return;
|
|
697
733
|
}
|
|
698
734
|
if (!t)
|
|
699
|
-
|
|
735
|
+
s || (s = !0, e.onDetected());
|
|
700
736
|
else {
|
|
701
|
-
const b =
|
|
737
|
+
const b = Ge(g, n, r), S = Qt(g, t, n, r);
|
|
702
738
|
if ("error" in S || (b.identifier && (n = {
|
|
703
739
|
...n,
|
|
704
740
|
identifier: !0
|
|
@@ -712,44 +748,144 @@ function At(e) {
|
|
|
712
748
|
...r,
|
|
713
749
|
password: t.password
|
|
714
750
|
})), "error" in S) {
|
|
715
|
-
const
|
|
716
|
-
|
|
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());
|
|
717
753
|
} else
|
|
718
|
-
e.onFilled(S.step), n.password && (t = null,
|
|
719
|
-
|
|
720
|
-
},
|
|
754
|
+
e.onFilled(S.step), n.password && (t = null, i(), u = setTimeout(() => {
|
|
755
|
+
u = null, ke(document) && (s = !0, e.onDetected());
|
|
756
|
+
}, tt));
|
|
721
757
|
}
|
|
722
|
-
},
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
},
|
|
726
|
-
},
|
|
727
|
-
o || (o = new MutationObserver(
|
|
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, {
|
|
728
764
|
childList: !0,
|
|
729
765
|
subtree: !0,
|
|
730
766
|
attributes: !0,
|
|
731
|
-
attributeFilter:
|
|
767
|
+
attributeFilter: Pt
|
|
732
768
|
}));
|
|
733
769
|
};
|
|
734
770
|
return {
|
|
735
771
|
watch() {
|
|
736
|
-
o || (
|
|
772
|
+
o || (s = !1, y()), a();
|
|
737
773
|
},
|
|
738
|
-
fill(
|
|
739
|
-
t =
|
|
774
|
+
fill(g) {
|
|
775
|
+
t = g, y(), a();
|
|
740
776
|
},
|
|
741
777
|
cancel() {
|
|
742
778
|
t = null, n = {
|
|
743
779
|
identifier: !1,
|
|
744
780
|
password: !1
|
|
745
|
-
},
|
|
781
|
+
}, s = !1, c();
|
|
746
782
|
},
|
|
747
783
|
teardown() {
|
|
748
|
-
t = null,
|
|
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());
|
|
749
820
|
}
|
|
750
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
|
+
}
|
|
751
887
|
}
|
|
752
|
-
var
|
|
888
|
+
var Ce = {
|
|
753
889
|
maskAllInputs: !0,
|
|
754
890
|
maskInputOptions: {
|
|
755
891
|
password: !0,
|
|
@@ -757,37 +893,214 @@ var kt = 6e5, Ct = 1e3, It = {
|
|
|
757
893
|
tel: !0,
|
|
758
894
|
text: !0
|
|
759
895
|
},
|
|
760
|
-
blockClass:
|
|
761
|
-
|
|
762
|
-
maskTextClass: "leesto-mask-text",
|
|
763
|
-
maskTextSelector: "[data-private]"
|
|
896
|
+
blockClass: an,
|
|
897
|
+
maskTextClass: Ue
|
|
764
898
|
};
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
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)));
|
|
775
999
|
},
|
|
776
|
-
...
|
|
777
|
-
}),
|
|
778
|
-
d?.setSink((
|
|
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) => {
|
|
779
1003
|
try {
|
|
780
|
-
n(
|
|
1004
|
+
n(R, L);
|
|
781
1005
|
} catch {
|
|
782
1006
|
}
|
|
783
1007
|
});
|
|
784
|
-
const
|
|
785
|
-
return
|
|
786
|
-
|
|
787
|
-
},
|
|
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 };
|
|
1012
|
+
}
|
|
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
|
+
};
|
|
788
1101
|
}
|
|
789
|
-
var
|
|
790
|
-
function
|
|
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) {
|
|
791
1104
|
try {
|
|
792
1105
|
const t = new URL(e).hostname;
|
|
793
1106
|
return t === "localhost" || t.endsWith(".localhost") || t === "127.0.0.1" || t === "[::1]";
|
|
@@ -795,7 +1108,7 @@ function qt(e) {
|
|
|
795
1108
|
return !1;
|
|
796
1109
|
}
|
|
797
1110
|
}
|
|
798
|
-
function
|
|
1111
|
+
function kn(e) {
|
|
799
1112
|
const t = e.trim();
|
|
800
1113
|
if (!t) return null;
|
|
801
1114
|
try {
|
|
@@ -805,33 +1118,33 @@ function Dt(e) {
|
|
|
805
1118
|
return null;
|
|
806
1119
|
}
|
|
807
1120
|
}
|
|
808
|
-
function
|
|
809
|
-
const t = (e.explicit ?? []).map(
|
|
1121
|
+
function An(e) {
|
|
1122
|
+
const t = (e.explicit ?? []).map(kn).filter((r) => r !== null);
|
|
810
1123
|
if (t.length > 0) return [...new Set(t)];
|
|
811
|
-
const n = [...
|
|
812
|
-
return
|
|
1124
|
+
const n = [...Rn];
|
|
1125
|
+
return _n(e.pageOrigin) && n.push(...Ln), [...new Set(n)];
|
|
813
1126
|
}
|
|
814
|
-
function
|
|
1127
|
+
function le(e, t) {
|
|
815
1128
|
return !e || e === "*" || e === "null" ? !1 : t.includes(e);
|
|
816
1129
|
}
|
|
817
|
-
function
|
|
1130
|
+
function Y() {
|
|
818
1131
|
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
819
1132
|
}
|
|
820
|
-
function
|
|
821
|
-
const t = (
|
|
822
|
-
const
|
|
823
|
-
return
|
|
824
|
-
}, n = (
|
|
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) => {
|
|
825
1138
|
if (!(typeof document > "u"))
|
|
826
|
-
return t(document.querySelector(`meta[name="${
|
|
827
|
-
}, r = typeof window < "u" ? window.__LEESTO_APP_BUILD__ : void 0,
|
|
828
|
-
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))
|
|
829
1142
|
return {
|
|
830
|
-
...
|
|
1143
|
+
...s ? { version: s } : {},
|
|
831
1144
|
...o ? { environment: o } : {}
|
|
832
1145
|
};
|
|
833
1146
|
}
|
|
834
|
-
function
|
|
1147
|
+
function Tn() {
|
|
835
1148
|
if (typeof document > "u") return;
|
|
836
1149
|
const e = document.querySelector('link[rel~="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]');
|
|
837
1150
|
if (e?.href)
|
|
@@ -841,43 +1154,43 @@ function Pt() {
|
|
|
841
1154
|
return;
|
|
842
1155
|
}
|
|
843
1156
|
}
|
|
844
|
-
function
|
|
1157
|
+
function Cn() {
|
|
845
1158
|
const e = (r) => !!r && r !== "transparent" && !/^rgba\(\s*0,\s*0,\s*0,\s*0\s*\)$/.test(r), t = getComputedStyle(document.body).backgroundColor;
|
|
846
1159
|
if (e(t)) return t;
|
|
847
1160
|
const n = getComputedStyle(document.documentElement).backgroundColor;
|
|
848
1161
|
return e(n) ? n : "#ffffff";
|
|
849
1162
|
}
|
|
850
|
-
async function
|
|
1163
|
+
async function Ne(e) {
|
|
851
1164
|
const { domToPng: t } = await import("./chunks/dist-BTlWkbvW.js");
|
|
852
1165
|
if (e) {
|
|
853
|
-
const
|
|
854
|
-
if (!
|
|
855
|
-
return t(
|
|
1166
|
+
const l = document.querySelector(e);
|
|
1167
|
+
if (!l) throw new Error("element_not_found");
|
|
1168
|
+
return t(l, { quality: 0.92 });
|
|
856
1169
|
}
|
|
857
|
-
const n = document.documentElement, r = window.scrollX,
|
|
858
|
-
for (const
|
|
859
|
-
const
|
|
860
|
-
if (
|
|
861
|
-
const
|
|
862
|
-
o.push([
|
|
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;
|
|
1173
|
+
if (u === "fixed" || u === "sticky") {
|
|
1174
|
+
const i = l.style.transform;
|
|
1175
|
+
o.push([l, i]), l.style.transform = `translate(${r}px, ${s}px)${i ? ` ${i}` : ""}`;
|
|
863
1176
|
}
|
|
864
1177
|
}
|
|
865
1178
|
try {
|
|
866
1179
|
return await t(n, {
|
|
867
1180
|
quality: 0.92,
|
|
868
|
-
backgroundColor:
|
|
1181
|
+
backgroundColor: Cn(),
|
|
869
1182
|
width: n.clientWidth,
|
|
870
1183
|
height: n.clientHeight,
|
|
871
1184
|
style: {
|
|
872
|
-
transform: `translate(${-r}px, ${-
|
|
1185
|
+
transform: `translate(${-r}px, ${-s}px)`,
|
|
873
1186
|
transformOrigin: "top left"
|
|
874
1187
|
}
|
|
875
1188
|
});
|
|
876
1189
|
} finally {
|
|
877
|
-
for (const [
|
|
1190
|
+
for (const [l, u] of o) l.style.transform = u;
|
|
878
1191
|
}
|
|
879
1192
|
}
|
|
880
|
-
function
|
|
1193
|
+
function In(e) {
|
|
881
1194
|
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
882
1195
|
const t = [];
|
|
883
1196
|
let n = e;
|
|
@@ -887,50 +1200,75 @@ function Ft(e) {
|
|
|
887
1200
|
break;
|
|
888
1201
|
}
|
|
889
1202
|
let r = n.tagName.toLowerCase();
|
|
890
|
-
const
|
|
891
|
-
|
|
1203
|
+
const s = typeof n.className == "string" ? n.className.trim().split(/\s+/).filter(Boolean)[0] : null;
|
|
1204
|
+
s && (r += `.${CSS.escape(s)}`);
|
|
892
1205
|
const o = n.parentElement;
|
|
893
1206
|
if (o) {
|
|
894
|
-
const
|
|
895
|
-
|
|
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})`);
|
|
896
1209
|
}
|
|
897
1210
|
t.unshift(r), n = o;
|
|
898
1211
|
}
|
|
899
1212
|
return t.join(" > ");
|
|
900
1213
|
}
|
|
901
|
-
function
|
|
1214
|
+
function Nn(e) {
|
|
902
1215
|
const t = e.tagName.toLowerCase(), n = (e.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 40);
|
|
903
1216
|
return n ? `${t} · ${n}` : t;
|
|
904
1217
|
}
|
|
905
|
-
|
|
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 = {}) {
|
|
906
1240
|
if (typeof window > "u" || window.parent === window) return () => {
|
|
907
1241
|
};
|
|
908
|
-
const t = window.parent, n = e.highlightColor ??
|
|
1242
|
+
const t = window.parent, n = e.highlightColor ?? mt.light.primary, r = An({
|
|
909
1243
|
explicit: e.shellOrigins,
|
|
910
1244
|
pageOrigin: location.origin
|
|
911
1245
|
});
|
|
912
|
-
let
|
|
1246
|
+
let s = null;
|
|
913
1247
|
try {
|
|
914
|
-
const
|
|
915
|
-
|
|
1248
|
+
const h = document.referrer ? new URL(document.referrer).origin : "";
|
|
1249
|
+
le(h, r) && (s = h);
|
|
916
1250
|
} catch {
|
|
917
1251
|
}
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
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);
|
|
921
1259
|
return;
|
|
922
1260
|
}
|
|
923
|
-
for (const
|
|
1261
|
+
for (const v of r) t.postMessage(h, v);
|
|
924
1262
|
};
|
|
925
|
-
let
|
|
926
|
-
const
|
|
927
|
-
|
|
1263
|
+
let l = null, u = "";
|
|
1264
|
+
const i = () => {
|
|
1265
|
+
l && (l.style.outline = u), l = null;
|
|
928
1266
|
};
|
|
929
|
-
let
|
|
930
|
-
const
|
|
931
|
-
|
|
932
|
-
const
|
|
933
|
-
|
|
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, {
|
|
934
1272
|
position: "fixed",
|
|
935
1273
|
pointerEvents: "none",
|
|
936
1274
|
zIndex: "2147483647",
|
|
@@ -938,186 +1276,240 @@ function Ee(e = {}) {
|
|
|
938
1276
|
border: `2px solid ${n}`,
|
|
939
1277
|
borderRadius: "4px",
|
|
940
1278
|
display: "none"
|
|
941
|
-
}), document.documentElement.append(
|
|
942
|
-
let
|
|
943
|
-
const
|
|
944
|
-
const
|
|
945
|
-
if (!
|
|
946
|
-
const
|
|
947
|
-
|
|
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({
|
|
948
1286
|
type: "leesto:element-picked",
|
|
949
|
-
selector:
|
|
950
|
-
label:
|
|
1287
|
+
selector: In(O),
|
|
1288
|
+
label: Nn(O),
|
|
951
1289
|
rect: {
|
|
952
|
-
x:
|
|
953
|
-
y:
|
|
954
|
-
width:
|
|
955
|
-
height:
|
|
1290
|
+
x: G.x,
|
|
1291
|
+
y: G.y,
|
|
1292
|
+
width: G.width,
|
|
1293
|
+
height: G.height
|
|
956
1294
|
}
|
|
957
|
-
}) : Object.assign(
|
|
1295
|
+
}) : Object.assign(h.style, {
|
|
958
1296
|
display: "block",
|
|
959
|
-
left: `${
|
|
960
|
-
top: `${
|
|
961
|
-
width: `${
|
|
962
|
-
height: `${
|
|
1297
|
+
left: `${G.x}px`,
|
|
1298
|
+
top: `${G.y}px`,
|
|
1299
|
+
width: `${G.width}px`,
|
|
1300
|
+
height: `${G.height}px`
|
|
963
1301
|
});
|
|
964
|
-
},
|
|
965
|
-
|
|
966
|
-
},
|
|
967
|
-
|
|
968
|
-
},
|
|
969
|
-
|
|
970
|
-
},
|
|
971
|
-
|
|
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" }));
|
|
972
1310
|
};
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
}, document.body.style.cursor = "crosshair", document.addEventListener("mousemove",
|
|
976
|
-
},
|
|
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({
|
|
977
1315
|
captureNetwork: e.captureNetwork !== !1,
|
|
978
|
-
runId:
|
|
1316
|
+
runId: b,
|
|
979
1317
|
runIdOrigins: e.runIdOrigins
|
|
980
1318
|
}) : null;
|
|
981
|
-
let
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
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({
|
|
986
1329
|
type: "leesto:rec-stopped",
|
|
987
|
-
durationMs:
|
|
1330
|
+
durationMs: h
|
|
988
1331
|
});
|
|
989
|
-
} else
|
|
990
|
-
},
|
|
1332
|
+
} else T && (q = !0);
|
|
1333
|
+
}, N = en({
|
|
991
1334
|
onDetected: () => o({ type: "leesto:login-form-detected" }),
|
|
992
|
-
onFilled: (
|
|
1335
|
+
onFilled: (h) => o({
|
|
993
1336
|
type: "leesto:login-filled",
|
|
994
|
-
step:
|
|
1337
|
+
step: h
|
|
995
1338
|
}),
|
|
996
|
-
onError: (
|
|
1339
|
+
onError: (h) => o({
|
|
997
1340
|
type: "leesto:login-error",
|
|
998
|
-
reason:
|
|
1341
|
+
reason: h
|
|
999
1342
|
})
|
|
1000
|
-
}),
|
|
1001
|
-
window.addEventListener("pagehide",
|
|
1002
|
-
const
|
|
1003
|
-
let
|
|
1004
|
-
const
|
|
1005
|
-
let
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1008
|
-
const
|
|
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();
|
|
1009
1352
|
o({
|
|
1010
1353
|
type: "leesto:ready",
|
|
1011
1354
|
url: location.href,
|
|
1012
1355
|
bridgeVersion: 1,
|
|
1013
|
-
capabilities: [
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
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 } : {}
|
|
1019
1367
|
});
|
|
1020
|
-
},
|
|
1021
|
-
if (
|
|
1022
|
-
|
|
1023
|
-
const
|
|
1024
|
-
if (
|
|
1025
|
-
o({ type: "leesto:pong" }),
|
|
1026
|
-
else if (
|
|
1027
|
-
|
|
1028
|
-
|
|
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(() => {
|
|
1029
1378
|
}).finally(() => {
|
|
1030
|
-
|
|
1379
|
+
f = !1, R || A();
|
|
1031
1380
|
});
|
|
1032
|
-
} else if (
|
|
1033
|
-
if (
|
|
1034
|
-
let
|
|
1381
|
+
} else if (v.type === "leesto:highlight") {
|
|
1382
|
+
if (i(), v.selector) {
|
|
1383
|
+
let w = null;
|
|
1035
1384
|
try {
|
|
1036
|
-
|
|
1385
|
+
w = document.querySelector(v.selector);
|
|
1037
1386
|
} catch {
|
|
1038
|
-
|
|
1387
|
+
w = null;
|
|
1039
1388
|
}
|
|
1040
|
-
|
|
1389
|
+
w && (l = w, u = w.style.outline, w.style.outline = `2px solid ${n}`, w.style.outlineOffset = "2px", w.scrollIntoView({
|
|
1041
1390
|
block: "center",
|
|
1042
1391
|
behavior: "smooth"
|
|
1043
1392
|
}));
|
|
1044
1393
|
}
|
|
1045
|
-
} else if (
|
|
1046
|
-
else if (
|
|
1047
|
-
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({
|
|
1048
1397
|
type: "leesto:screenshot",
|
|
1049
|
-
dataUrl:
|
|
1050
|
-
...
|
|
1051
|
-
})).catch((
|
|
1398
|
+
dataUrl: w,
|
|
1399
|
+
...v.selector ? { selector: v.selector } : {}
|
|
1400
|
+
})).catch((w) => o({
|
|
1052
1401
|
type: "leesto:capture-failed",
|
|
1053
|
-
reason:
|
|
1402
|
+
reason: w instanceof Error ? w.message : "capture_error"
|
|
1054
1403
|
}));
|
|
1055
|
-
else if (
|
|
1056
|
-
if (
|
|
1057
|
-
if (
|
|
1404
|
+
else if (v.type === "leesto:rec-start") {
|
|
1405
|
+
if (C || T) return;
|
|
1406
|
+
if (Y()) {
|
|
1058
1407
|
o({
|
|
1059
1408
|
type: "leesto:rec-blocked",
|
|
1060
1409
|
reason: "gpc"
|
|
1061
1410
|
});
|
|
1062
1411
|
return;
|
|
1063
1412
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
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,
|
|
1070
1420
|
captureNetwork: e.captureNetwork,
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
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({
|
|
1076
1431
|
type: "leesto:rec-error",
|
|
1077
|
-
reason:
|
|
1432
|
+
reason: I instanceof Error ? I.message : "rec_error"
|
|
1078
1433
|
});
|
|
1079
1434
|
});
|
|
1080
|
-
} else
|
|
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
|
|
1462
|
+
});
|
|
1463
|
+
});
|
|
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({
|
|
1081
1465
|
type: "leesto:diagnostics",
|
|
1082
|
-
snapshot:
|
|
1466
|
+
snapshot: S?.snapshot() ?? {
|
|
1083
1467
|
errors: [],
|
|
1084
1468
|
logs: [],
|
|
1085
1469
|
network: []
|
|
1086
1470
|
}
|
|
1087
|
-
}) :
|
|
1088
|
-
login:
|
|
1089
|
-
password:
|
|
1090
|
-
}) :
|
|
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();
|
|
1091
1475
|
};
|
|
1092
|
-
window.addEventListener("message",
|
|
1093
|
-
const
|
|
1094
|
-
location.href ===
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
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");
|
|
1103
1495
|
};
|
|
1104
|
-
return history.pushState =
|
|
1105
|
-
|
|
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);
|
|
1106
1498
|
};
|
|
1107
1499
|
}
|
|
1108
|
-
function
|
|
1500
|
+
function Dn() {
|
|
1109
1501
|
return typeof document > "u" ? null : document.currentScript ?? document.querySelector("script[data-leesto-connect]");
|
|
1110
1502
|
}
|
|
1111
|
-
function
|
|
1503
|
+
function qn(e) {
|
|
1112
1504
|
const t = {}, n = e?.dataset.highlightColor;
|
|
1113
1505
|
n && (t.highlightColor = n);
|
|
1114
|
-
const r = (e?.dataset.shellOrigin ?? "").split(",").map((
|
|
1506
|
+
const r = (e?.dataset.shellOrigin ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
1115
1507
|
return r.length > 0 && (t.shellOrigins = r), t;
|
|
1116
1508
|
}
|
|
1117
1509
|
if (typeof window < "u") {
|
|
1118
|
-
window.LeestoConnect = { connect: (t) =>
|
|
1119
|
-
const e =
|
|
1120
|
-
(!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));
|
|
1121
1513
|
}
|
|
1122
1514
|
|
|
1123
1515
|
//# sourceMappingURL=leesto-connect.js.map
|