leesto-connect 0.1.0 → 0.2.1
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 +14 -2
- package/dist/chunks/dist-BTlWkbvW.js.map +1 -1
- package/dist/chunks/rrweb-qwppqH_c.js.map +1 -1
- package/dist/leesto-connect.js +833 -415
- package/dist/leesto-connect.js.map +1 -1
- package/package.json +17 -3
package/dist/leesto-connect.js
CHANGED
|
@@ -1,169 +1,182 @@
|
|
|
1
|
-
|
|
1
|
+
var Ce = "login", Ie = 6e3;
|
|
2
|
+
function _e(e) {
|
|
2
3
|
return typeof e == "object" && e !== null && typeof e.type == "string" && e.type.startsWith("leesto:");
|
|
3
4
|
}
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return typeof e == "string" &&
|
|
5
|
+
var Ne = "leesto_diag", Te = "leesto_run", ue = "X-Leesto-Run-Id", qe = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
6
|
+
function W(e) {
|
|
7
|
+
return typeof e == "string" && qe.test(e);
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
+
function De() {
|
|
9
10
|
try {
|
|
10
11
|
const e = globalThis.crypto, t = e?.randomUUID?.();
|
|
11
|
-
if (
|
|
12
|
+
if (W(t)) return t;
|
|
12
13
|
if (!e?.getRandomValues) return;
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
return
|
|
14
|
+
const n = e.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
15
|
+
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(""), i = `${r.slice(0, 8)}-${r.slice(8, 12)}-${r.slice(12, 16)}-${r.slice(16, 20)}-${r.slice(20)}`;
|
|
17
|
+
return W(i) ? i : void 0;
|
|
17
18
|
} catch {
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function xe(e) {
|
|
22
23
|
try {
|
|
23
|
-
const t = new URLSearchParams(e).get(
|
|
24
|
-
return
|
|
24
|
+
const t = new URLSearchParams(e).get(Te);
|
|
25
|
+
return W(t) ? t : void 0;
|
|
25
26
|
} catch {
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function Me(e) {
|
|
30
31
|
try {
|
|
31
|
-
return new URLSearchParams(e).get(
|
|
32
|
+
return new URLSearchParams(e).get(Ne) === "1";
|
|
32
33
|
} catch {
|
|
33
34
|
return !1;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
var de = "leesto/console", Q = "leesto/network", Pe = "leesto/network-ring", $e = "leesto/console-ring", Fe = {
|
|
38
|
+
primary: "#08783f",
|
|
39
|
+
hover: "#066633",
|
|
40
|
+
foreground: "#f3fff7"
|
|
41
|
+
}, Ge = {
|
|
42
|
+
primary: "#46c383",
|
|
43
|
+
hover: "#65d49b",
|
|
44
|
+
foreground: "#082315"
|
|
45
|
+
}, He = {
|
|
46
|
+
light: Fe,
|
|
47
|
+
dark: Ge
|
|
48
|
+
};
|
|
49
|
+
function j(e) {
|
|
50
|
+
const t = [];
|
|
51
|
+
return {
|
|
52
|
+
push(n) {
|
|
53
|
+
t.push(n), t.length > e && t.shift();
|
|
54
|
+
},
|
|
55
|
+
snapshot() {
|
|
56
|
+
return t.slice();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
var Ue = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g, Be = /\b\d{3}-\d{2}-\d{4}\b/g, ze = /\d(?:[ -]?\d){12,18}/g;
|
|
61
|
+
function je(e) {
|
|
62
|
+
let t = 0, n = !1;
|
|
63
|
+
for (let r = e.length - 1; r >= 0; r--) {
|
|
64
|
+
let i = e.charCodeAt(r) - 48;
|
|
65
|
+
if (i < 0 || i > 9) return !1;
|
|
66
|
+
n && (i *= 2, i > 9 && (i -= 9)), t += i, n = !n;
|
|
43
67
|
}
|
|
44
68
|
return t % 10 === 0;
|
|
45
69
|
}
|
|
46
|
-
function
|
|
70
|
+
function D(e) {
|
|
47
71
|
if (!e) return e;
|
|
48
|
-
let t = e.replace(
|
|
49
|
-
return t = t.replace(
|
|
50
|
-
const
|
|
51
|
-
return
|
|
72
|
+
let t = e.replace(Ue, "[email masqué]");
|
|
73
|
+
return t = t.replace(Be, "[id masqué]"), t = t.replace(ze, (n) => {
|
|
74
|
+
const r = n.replace(/[ -]/g, "");
|
|
75
|
+
return r.length >= 13 && r.length <= 19 && je(r) ? "[carte masquée]" : n;
|
|
52
76
|
}), t;
|
|
53
77
|
}
|
|
54
|
-
function
|
|
78
|
+
function H(e) {
|
|
55
79
|
const t = typeof e == "string" ? e : e instanceof URL ? e.href : e instanceof Request ? e.url : String(e);
|
|
56
80
|
try {
|
|
57
|
-
const
|
|
58
|
-
return
|
|
81
|
+
const n = new URL(t, typeof location < "u" ? location.href : void 0);
|
|
82
|
+
return n.origin + D(n.pathname);
|
|
59
83
|
} catch {
|
|
60
|
-
return
|
|
84
|
+
return D(t.split("?")[0] ?? t);
|
|
61
85
|
}
|
|
62
86
|
}
|
|
63
|
-
var
|
|
87
|
+
var Ve = /* @__PURE__ */ new Set(["fetch", "xmlhttprequest"]), We = ["deprecation", "intervention"], Xe = { teardown: () => {
|
|
64
88
|
} };
|
|
65
|
-
function
|
|
89
|
+
function Ke(e) {
|
|
66
90
|
const t = typeof performance < "u" ? performance.timeOrigin : 0;
|
|
67
91
|
return Math.round(t + e);
|
|
68
92
|
}
|
|
69
|
-
function
|
|
93
|
+
function Ye(e) {
|
|
70
94
|
const t = e.responseStatus;
|
|
71
95
|
return typeof t == "number" && t > 0 ? t : void 0;
|
|
72
96
|
}
|
|
73
|
-
function
|
|
74
|
-
if (
|
|
75
|
-
const t =
|
|
97
|
+
function Ze(e) {
|
|
98
|
+
if (Ve.has(e.initiatorType)) return null;
|
|
99
|
+
const t = Ye(e), n = e.transferSize || e.encodedBodySize || void 0;
|
|
76
100
|
return {
|
|
77
101
|
method: "GET",
|
|
78
|
-
url:
|
|
102
|
+
url: H(e.name),
|
|
79
103
|
...t !== void 0 ? { status: t } : {},
|
|
80
104
|
durationMs: Math.round(e.duration),
|
|
81
|
-
...
|
|
82
|
-
startedAt:
|
|
105
|
+
...n ? { responseSize: n } : {},
|
|
106
|
+
startedAt: Ke(e.startTime),
|
|
83
107
|
...t !== void 0 && t >= 400 ? { failed: !0 } : {},
|
|
84
108
|
initiatorType: e.initiatorType
|
|
85
109
|
};
|
|
86
110
|
}
|
|
87
|
-
function
|
|
88
|
-
if (typeof window > "u") return
|
|
111
|
+
function Je(e) {
|
|
112
|
+
if (typeof window > "u") return Xe;
|
|
89
113
|
const t = [];
|
|
90
114
|
if (typeof PerformanceObserver < "u") try {
|
|
91
|
-
const
|
|
92
|
-
for (const
|
|
93
|
-
const
|
|
94
|
-
|
|
115
|
+
const o = new PerformanceObserver((s) => {
|
|
116
|
+
for (const c of s.getEntries()) try {
|
|
117
|
+
const l = Ze(c);
|
|
118
|
+
l && e.onResource(l);
|
|
95
119
|
} catch {
|
|
96
120
|
}
|
|
97
121
|
});
|
|
98
|
-
|
|
122
|
+
o.observe({
|
|
99
123
|
type: "resource",
|
|
100
124
|
buffered: !0
|
|
101
|
-
}), t.push(() =>
|
|
125
|
+
}), t.push(() => o.disconnect());
|
|
102
126
|
} catch {
|
|
103
127
|
}
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
const
|
|
107
|
-
for (const
|
|
108
|
-
const
|
|
109
|
-
e.onReport("warn", `Navigateur (${
|
|
128
|
+
const n = window.ReportingObserver;
|
|
129
|
+
if (n) try {
|
|
130
|
+
const o = new n(((s) => {
|
|
131
|
+
for (const c of s) {
|
|
132
|
+
const l = typeof c.body?.message == "string" ? c.body.message : c.type;
|
|
133
|
+
e.onReport("warn", `Navigateur (${c.type}) : ${l}`);
|
|
110
134
|
}
|
|
111
135
|
}), {
|
|
112
|
-
types:
|
|
136
|
+
types: We,
|
|
113
137
|
buffered: !0
|
|
114
138
|
});
|
|
115
|
-
|
|
139
|
+
o.observe(), t.push(() => o.disconnect());
|
|
116
140
|
} catch {
|
|
117
141
|
}
|
|
118
|
-
const
|
|
119
|
-
const
|
|
120
|
-
e.onReport("error", `CSP : ${
|
|
142
|
+
const r = (o) => {
|
|
143
|
+
const s = o;
|
|
144
|
+
e.onReport("error", `CSP : ${s.blockedURI || "ressource"} bloqué par « ${s.violatedDirective} »`);
|
|
121
145
|
};
|
|
122
|
-
window.addEventListener("securitypolicyviolation",
|
|
123
|
-
let
|
|
146
|
+
window.addEventListener("securitypolicyviolation", r), t.push(() => window.removeEventListener("securitypolicyviolation", r));
|
|
147
|
+
let i = !1;
|
|
124
148
|
return { teardown: () => {
|
|
125
|
-
if (!
|
|
126
|
-
|
|
127
|
-
for (const
|
|
128
|
-
|
|
149
|
+
if (!i) {
|
|
150
|
+
i = !0;
|
|
151
|
+
for (const o of t) try {
|
|
152
|
+
o();
|
|
129
153
|
} catch {
|
|
130
154
|
}
|
|
131
155
|
}
|
|
132
156
|
} };
|
|
133
157
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return {
|
|
137
|
-
push(r) {
|
|
138
|
-
t.push(r), t.length > e && t.shift();
|
|
139
|
-
},
|
|
140
|
-
snapshot() {
|
|
141
|
-
return t.slice();
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
var we = 50, ve = 30, Re = 100, Se = 50, N = 500, Ee = 8e3;
|
|
146
|
-
function j(e) {
|
|
158
|
+
var Qe = 50, et = 30, tt = 100, nt = 50, G = 500, rt = 8e3;
|
|
159
|
+
function ee(e) {
|
|
147
160
|
const t = e instanceof Error ? e.stack : void 0;
|
|
148
161
|
if (t)
|
|
149
|
-
return
|
|
162
|
+
return D(t).slice(0, rt);
|
|
150
163
|
}
|
|
151
|
-
function
|
|
164
|
+
function te(e) {
|
|
152
165
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
153
166
|
if (typeof e == "string") return e;
|
|
154
167
|
if (typeof e == "object" && e !== null) try {
|
|
155
|
-
return JSON.stringify(e, (t,
|
|
168
|
+
return JSON.stringify(e, (t, n) => /^(authorization|cookie|set-cookie|token|access_token|refresh_token|password|secret|api[-_]?key)$/i.test(t) ? "[masqué]" : n).slice(0, 500);
|
|
156
169
|
} catch {
|
|
157
170
|
return "[objet]";
|
|
158
171
|
}
|
|
159
172
|
return String(e);
|
|
160
173
|
}
|
|
161
|
-
function
|
|
174
|
+
function fe(e) {
|
|
162
175
|
if (!e) return;
|
|
163
176
|
const t = Number(e);
|
|
164
177
|
return Number.isFinite(t) && t >= 0 ? t : void 0;
|
|
165
178
|
}
|
|
166
|
-
var
|
|
179
|
+
var ot = {
|
|
167
180
|
snapshot: () => ({
|
|
168
181
|
errors: [],
|
|
169
182
|
logs: [],
|
|
@@ -176,217 +189,567 @@ var ke = {
|
|
|
176
189
|
teardown: () => {
|
|
177
190
|
}
|
|
178
191
|
};
|
|
179
|
-
function
|
|
180
|
-
if (typeof window > "u") return
|
|
181
|
-
const t =
|
|
182
|
-
if (!
|
|
192
|
+
function Se(e) {
|
|
193
|
+
if (typeof window > "u") return ot;
|
|
194
|
+
const t = j(Qe), n = j(et), r = j(tt), i = j(nt), o = W(e.runId) ? e.runId : void 0, s = (a) => {
|
|
195
|
+
if (!o) return !1;
|
|
183
196
|
try {
|
|
184
|
-
const
|
|
185
|
-
return
|
|
197
|
+
const u = new URL(String(a), location.href);
|
|
198
|
+
return u.origin === location.origin || (e.runIdOrigins ?? []).includes(u.origin);
|
|
186
199
|
} catch {
|
|
187
200
|
return !1;
|
|
188
201
|
}
|
|
189
202
|
};
|
|
190
|
-
let
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
},
|
|
194
|
-
e.captureNetwork && t.push(
|
|
195
|
-
},
|
|
196
|
-
if (!
|
|
197
|
-
const
|
|
198
|
-
level:
|
|
199
|
-
message:
|
|
200
|
-
...
|
|
201
|
-
...
|
|
203
|
+
let c = e.sink ?? null;
|
|
204
|
+
const l = (a, u) => {
|
|
205
|
+
c?.(a, u);
|
|
206
|
+
}, g = (a) => {
|
|
207
|
+
e.captureNetwork && t.push(a);
|
|
208
|
+
}, d = (a, u, f, h = {}) => {
|
|
209
|
+
if (!u) return;
|
|
210
|
+
const O = {
|
|
211
|
+
level: a,
|
|
212
|
+
message: u,
|
|
213
|
+
...f ? { stack: f } : {},
|
|
214
|
+
...h,
|
|
202
215
|
at: Date.now()
|
|
203
216
|
};
|
|
204
|
-
|
|
205
|
-
},
|
|
217
|
+
i.push(O), l(de, O);
|
|
218
|
+
}, w = (a, u) => {
|
|
206
219
|
try {
|
|
207
|
-
const
|
|
208
|
-
|
|
220
|
+
const f = D(u.map(te).join(" ")).slice(0, G), h = u.find((O) => O instanceof Error);
|
|
221
|
+
d(a, f, ee(h), {
|
|
209
222
|
mechanism: "console",
|
|
210
|
-
...
|
|
223
|
+
...h instanceof Error && h.name ? { name: h.name } : {}
|
|
211
224
|
});
|
|
212
225
|
} catch {
|
|
213
226
|
}
|
|
214
|
-
},
|
|
227
|
+
}, v = (a, u) => {
|
|
215
228
|
try {
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
level:
|
|
219
|
-
message:
|
|
229
|
+
const f = D(u.map(te).join(" ")).slice(0, G);
|
|
230
|
+
f && r.push({
|
|
231
|
+
level: a,
|
|
232
|
+
message: f,
|
|
220
233
|
at: Date.now()
|
|
221
234
|
});
|
|
222
235
|
} catch {
|
|
223
236
|
}
|
|
224
|
-
},
|
|
225
|
-
console.error = (...
|
|
226
|
-
const
|
|
227
|
-
const
|
|
228
|
-
if (
|
|
229
|
-
const
|
|
230
|
-
if (!
|
|
231
|
-
|
|
237
|
+
}, E = console.error, b = console.warn, S = console.log, A = console.info;
|
|
238
|
+
console.error = (...a) => (w("error", a), E.apply(console, a)), console.warn = (...a) => (w("warn", a), b.apply(console, a)), console.log = (...a) => (v("log", a), S.apply(console, a)), console.info = (...a) => (v("info", a), A.apply(console, a));
|
|
239
|
+
const x = (a) => {
|
|
240
|
+
const u = a.target;
|
|
241
|
+
if (u instanceof Element) {
|
|
242
|
+
const h = u.src || u.href || "";
|
|
243
|
+
if (!h) return;
|
|
244
|
+
d("error", `Ressource non chargée : <${u.tagName.toLowerCase()}> ${H(h)}`.slice(0, G), void 0, {
|
|
232
245
|
mechanism: "resource",
|
|
233
|
-
sourceUrl:
|
|
246
|
+
sourceUrl: H(h)
|
|
234
247
|
});
|
|
235
248
|
return;
|
|
236
249
|
}
|
|
237
|
-
const
|
|
238
|
-
|
|
250
|
+
const f = a;
|
|
251
|
+
d("error", D(`Erreur non gérée : ${f.message}`).slice(0, G), ee(f.error), {
|
|
239
252
|
mechanism: "window.error",
|
|
240
|
-
...typeof
|
|
241
|
-
...typeof
|
|
242
|
-
...typeof
|
|
243
|
-
...typeof
|
|
253
|
+
...typeof f.error?.name == "string" ? { name: f.error.name } : {},
|
|
254
|
+
...typeof f.filename == "string" && f.filename ? { sourceUrl: H(f.filename) } : {},
|
|
255
|
+
...typeof f.lineno == "number" && f.lineno > 0 ? { line: f.lineno } : {},
|
|
256
|
+
...typeof f.colno == "number" && f.colno > 0 ? { column: f.colno } : {}
|
|
244
257
|
});
|
|
245
|
-
},
|
|
246
|
-
|
|
258
|
+
}, I = (a) => {
|
|
259
|
+
d("error", D(`Promesse rejetée : ${te(a.reason)}`).slice(0, G), ee(a.reason), {
|
|
247
260
|
mechanism: "unhandledrejection",
|
|
248
|
-
...
|
|
261
|
+
...a.reason instanceof Error && a.reason.name ? { name: a.reason.name } : {}
|
|
249
262
|
});
|
|
250
263
|
};
|
|
251
|
-
window.addEventListener("error",
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
let
|
|
256
|
-
if (
|
|
257
|
-
const
|
|
258
|
-
for (const [
|
|
259
|
-
|
|
260
|
-
...
|
|
261
|
-
headers:
|
|
264
|
+
window.addEventListener("error", x, !0), window.addEventListener("unhandledrejection", I);
|
|
265
|
+
const M = typeof window.fetch == "function" ? window.fetch.bind(window) : null;
|
|
266
|
+
M && (window.fetch = (async (a, u) => {
|
|
267
|
+
const f = Date.now(), h = (u?.method ?? (a instanceof Request ? a.method : "GET") ?? "GET").toUpperCase(), O = H(a);
|
|
268
|
+
let T = u;
|
|
269
|
+
if (o && s(a)) {
|
|
270
|
+
const R = new Headers(a instanceof Request ? a.headers : void 0);
|
|
271
|
+
for (const [k, p] of new Headers(u?.headers)) R.set(k, p);
|
|
272
|
+
R.set(ue, o), T = {
|
|
273
|
+
...u,
|
|
274
|
+
headers: R
|
|
262
275
|
};
|
|
263
276
|
}
|
|
264
277
|
try {
|
|
265
|
-
const
|
|
278
|
+
const R = await M(a, T);
|
|
266
279
|
try {
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
method:
|
|
270
|
-
url:
|
|
271
|
-
status:
|
|
272
|
-
durationMs: Date.now() -
|
|
273
|
-
responseSize:
|
|
274
|
-
contentType:
|
|
275
|
-
startedAt:
|
|
276
|
-
...
|
|
277
|
-
...
|
|
278
|
-
...
|
|
279
|
-
}),
|
|
280
|
-
method:
|
|
281
|
-
url:
|
|
282
|
-
status:
|
|
283
|
-
durationMs: Date.now() -
|
|
280
|
+
const k = R.headers.get("x-request-id"), p = R.headers.get("traceparent");
|
|
281
|
+
g({
|
|
282
|
+
method: h,
|
|
283
|
+
url: O,
|
|
284
|
+
status: R.status,
|
|
285
|
+
durationMs: Date.now() - f,
|
|
286
|
+
responseSize: fe(R.headers.get("content-length")),
|
|
287
|
+
contentType: R.headers.get("content-type") ?? void 0,
|
|
288
|
+
startedAt: f,
|
|
289
|
+
...k ? { requestId: k.slice(0, 200) } : {},
|
|
290
|
+
...p ? { traceparent: p.slice(0, 200) } : {},
|
|
291
|
+
...o ? { runId: o } : {}
|
|
292
|
+
}), R.ok || l(Q, {
|
|
293
|
+
method: h,
|
|
294
|
+
url: O,
|
|
295
|
+
status: R.status,
|
|
296
|
+
durationMs: Date.now() - f
|
|
284
297
|
});
|
|
285
298
|
} catch {
|
|
286
299
|
}
|
|
287
|
-
return
|
|
288
|
-
} catch (
|
|
300
|
+
return R;
|
|
301
|
+
} catch (R) {
|
|
289
302
|
try {
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
method:
|
|
293
|
-
url:
|
|
303
|
+
const k = Date.now() - f;
|
|
304
|
+
g({
|
|
305
|
+
method: h,
|
|
306
|
+
url: O,
|
|
294
307
|
status: 0,
|
|
295
|
-
durationMs:
|
|
296
|
-
startedAt:
|
|
308
|
+
durationMs: k,
|
|
309
|
+
startedAt: f,
|
|
297
310
|
failed: !0,
|
|
298
|
-
...
|
|
299
|
-
}),
|
|
300
|
-
method:
|
|
301
|
-
url:
|
|
311
|
+
...o ? { runId: o } : {}
|
|
312
|
+
}), l(Q, {
|
|
313
|
+
method: h,
|
|
314
|
+
url: O,
|
|
302
315
|
status: 0,
|
|
303
|
-
durationMs:
|
|
316
|
+
durationMs: k
|
|
304
317
|
});
|
|
305
318
|
} catch {
|
|
306
319
|
}
|
|
307
|
-
throw
|
|
320
|
+
throw R;
|
|
308
321
|
}
|
|
309
322
|
}));
|
|
310
|
-
const
|
|
311
|
-
XMLHttpRequest.prototype.open = function(
|
|
312
|
-
return this[
|
|
313
|
-
method: (
|
|
314
|
-
url:
|
|
323
|
+
const U = XMLHttpRequest.prototype.open, C = XMLHttpRequest.prototype.send, $ = "__echoNet";
|
|
324
|
+
XMLHttpRequest.prototype.open = function(a, u, ...f) {
|
|
325
|
+
return this[$] = {
|
|
326
|
+
method: (a || "GET").toUpperCase(),
|
|
327
|
+
url: H(u),
|
|
315
328
|
start: 0,
|
|
316
|
-
propagate: u
|
|
317
|
-
},
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
...
|
|
329
|
+
propagate: s(u)
|
|
330
|
+
}, U.apply(this, [
|
|
331
|
+
a,
|
|
332
|
+
u,
|
|
333
|
+
...f
|
|
321
334
|
]);
|
|
322
|
-
}, XMLHttpRequest.prototype.send = function(...
|
|
323
|
-
const
|
|
324
|
-
if (
|
|
325
|
-
if (
|
|
326
|
-
this.setRequestHeader(
|
|
335
|
+
}, XMLHttpRequest.prototype.send = function(...a) {
|
|
336
|
+
const u = this[$];
|
|
337
|
+
if (u) {
|
|
338
|
+
if (u.start = Date.now(), o && u.propagate) try {
|
|
339
|
+
this.setRequestHeader(ue, o);
|
|
327
340
|
} catch {
|
|
328
341
|
}
|
|
329
342
|
this.addEventListener("loadend", () => {
|
|
330
343
|
try {
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
method:
|
|
334
|
-
url:
|
|
335
|
-
status:
|
|
336
|
-
durationMs:
|
|
337
|
-
responseSize:
|
|
344
|
+
const f = Date.now() - u.start, h = this.status, O = h === 0, T = this.getResponseHeader("x-request-id"), R = this.getResponseHeader("traceparent");
|
|
345
|
+
g({
|
|
346
|
+
method: u.method,
|
|
347
|
+
url: u.url,
|
|
348
|
+
status: h,
|
|
349
|
+
durationMs: f,
|
|
350
|
+
responseSize: fe(this.getResponseHeader("content-length")),
|
|
338
351
|
contentType: this.getResponseHeader("content-type") ?? void 0,
|
|
339
|
-
startedAt:
|
|
340
|
-
...
|
|
341
|
-
...
|
|
342
|
-
...
|
|
343
|
-
...
|
|
344
|
-
}), (
|
|
345
|
-
method:
|
|
346
|
-
url:
|
|
347
|
-
status:
|
|
348
|
-
durationMs:
|
|
352
|
+
startedAt: u.start,
|
|
353
|
+
...O ? { failed: !0 } : {},
|
|
354
|
+
...o ? { runId: o } : {},
|
|
355
|
+
...T ? { requestId: T.slice(0, 200) } : {},
|
|
356
|
+
...R ? { traceparent: R.slice(0, 200) } : {}
|
|
357
|
+
}), (O || h >= 400) && l(Q, {
|
|
358
|
+
method: u.method,
|
|
359
|
+
url: u.url,
|
|
360
|
+
status: h,
|
|
361
|
+
durationMs: f
|
|
349
362
|
});
|
|
350
363
|
} catch {
|
|
351
364
|
}
|
|
352
365
|
}, { once: !0 });
|
|
353
366
|
}
|
|
354
|
-
return
|
|
367
|
+
return C.apply(this, a);
|
|
355
368
|
};
|
|
356
|
-
const
|
|
357
|
-
onResource: (
|
|
358
|
-
e.captureNetwork &&
|
|
359
|
-
...
|
|
360
|
-
runId:
|
|
361
|
-
} :
|
|
369
|
+
const z = Je({
|
|
370
|
+
onResource: (a) => {
|
|
371
|
+
e.captureNetwork && n.push(o ? {
|
|
372
|
+
...a,
|
|
373
|
+
runId: o
|
|
374
|
+
} : a);
|
|
362
375
|
},
|
|
363
|
-
onReport: (
|
|
364
|
-
}),
|
|
365
|
-
let
|
|
376
|
+
onReport: (a, u) => d(a, D(u).slice(0, G), void 0, { mechanism: "report" })
|
|
377
|
+
}), _ = () => e.captureNetwork ? [...t.snapshot(), ...n.snapshot()].sort((a, u) => a.startedAt - u.startedAt) : [];
|
|
378
|
+
let N = !1;
|
|
366
379
|
return {
|
|
367
380
|
snapshot: () => ({
|
|
368
|
-
errors:
|
|
369
|
-
logs:
|
|
370
|
-
network:
|
|
371
|
-
...
|
|
381
|
+
errors: i.snapshot(),
|
|
382
|
+
logs: r.snapshot(),
|
|
383
|
+
network: _(),
|
|
384
|
+
...o ? { runId: o } : {}
|
|
372
385
|
}),
|
|
373
|
-
setSink: (
|
|
374
|
-
|
|
386
|
+
setSink: (a) => {
|
|
387
|
+
c = a;
|
|
375
388
|
},
|
|
376
389
|
flushRings: () => {
|
|
377
|
-
const
|
|
378
|
-
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
const
|
|
382
|
-
|
|
390
|
+
const a = _();
|
|
391
|
+
a.length > 0 && l(Pe, { entries: a });
|
|
392
|
+
const u = r.snapshot();
|
|
393
|
+
u.length > 0 && l($e, { entries: u });
|
|
394
|
+
const f = i.snapshot();
|
|
395
|
+
f.length > 0 && l(de, { entries: f });
|
|
383
396
|
},
|
|
384
397
|
teardown: () => {
|
|
385
|
-
|
|
398
|
+
N || (N = !0, c = null, z.teardown(), console.error = E, console.warn = b, console.log = S, console.info = A, window.removeEventListener("error", x, !0), window.removeEventListener("unhandledrejection", I), M && (window.fetch = M), XMLHttpRequest.prototype.open = U, XMLHttpRequest.prototype.send = C);
|
|
386
399
|
}
|
|
387
400
|
};
|
|
388
401
|
}
|
|
389
|
-
var
|
|
402
|
+
var it = 100, st = [
|
|
403
|
+
"hidden",
|
|
404
|
+
"class",
|
|
405
|
+
"style",
|
|
406
|
+
"type",
|
|
407
|
+
"disabled",
|
|
408
|
+
"aria-hidden"
|
|
409
|
+
], Y = 'input[type="password"]', Re = 'input[autocomplete="username"], input[autocomplete="email"], input[type="email"]', Z = `${Y}, ${Re}`, X = /\b(connexion|se connecter|connectez[- ]vous|s'identifier|identifiez[- ]vous|login|log ?in|sign ?in)\b/, oe = /\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/, at = /\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/, lt = /\b(afficher|masquer|voir|show|hide|toggle)\b/, ct = /\b(effacer|vider|supprimer|clear|reset)\b/, ut = /[\u{1F441}\u{1F576}\u{1F440}]/u;
|
|
410
|
+
function B(e) {
|
|
411
|
+
return (e ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/[’‘]/g, "'").replace(/\s+/g, " ").trim().toLowerCase();
|
|
412
|
+
}
|
|
413
|
+
function J(e) {
|
|
414
|
+
let t = e;
|
|
415
|
+
for (; t; ) {
|
|
416
|
+
if (t.hasAttribute("hidden") || t.getAttribute("aria-hidden") === "true" || t instanceof HTMLInputElement && t.type === "hidden") return !1;
|
|
417
|
+
const n = t.ownerDocument.defaultView?.getComputedStyle(t);
|
|
418
|
+
if (n && (n.display === "none" || n.visibility === "hidden")) return !1;
|
|
419
|
+
t = t.parentElement;
|
|
420
|
+
}
|
|
421
|
+
return !0;
|
|
422
|
+
}
|
|
423
|
+
function P(e, t) {
|
|
424
|
+
return Array.from(e.querySelectorAll(t)).filter(J);
|
|
425
|
+
}
|
|
426
|
+
function dt(e) {
|
|
427
|
+
return e ? e instanceof HTMLInputElement ? e.value : e.textContent ?? "" : "";
|
|
428
|
+
}
|
|
429
|
+
function Oe(e, t) {
|
|
430
|
+
return !e.outsideForms || !t.closest("form");
|
|
431
|
+
}
|
|
432
|
+
function V(e, t) {
|
|
433
|
+
return Array.from(e.scope.querySelectorAll(t)).filter((n) => J(n) && Oe(e, n));
|
|
434
|
+
}
|
|
435
|
+
function K(e) {
|
|
436
|
+
return B(e.getAttribute("aria-label") ?? e.getAttribute("title") ?? e.textContent);
|
|
437
|
+
}
|
|
438
|
+
function ft(e) {
|
|
439
|
+
const t = K(e);
|
|
440
|
+
return lt.test(t) || ut.test(t);
|
|
441
|
+
}
|
|
442
|
+
function pt(e, t) {
|
|
443
|
+
if (e.getAttribute("type") === "submit" || !t) return !1;
|
|
444
|
+
const n = e.parentElement;
|
|
445
|
+
return !n || P(n, Z).length === 0 ? !1 : !n.contains(t);
|
|
446
|
+
}
|
|
447
|
+
var ht = 'button, input[type="submit"], input[type="button"], input[type="image"], a[href]';
|
|
448
|
+
function gt(e) {
|
|
449
|
+
return Array.from(e.querySelectorAll(ht)).some(J);
|
|
450
|
+
}
|
|
451
|
+
function mt(e, t) {
|
|
452
|
+
let n = e.parentElement;
|
|
453
|
+
for (; n && !n.contains(t); ) {
|
|
454
|
+
if (gt(n)) return !0;
|
|
455
|
+
n = n.parentElement;
|
|
456
|
+
}
|
|
457
|
+
return !1;
|
|
458
|
+
}
|
|
459
|
+
function yt(e) {
|
|
460
|
+
const t = [
|
|
461
|
+
e.getAttribute("name"),
|
|
462
|
+
e.getAttribute("id"),
|
|
463
|
+
e.getAttribute("placeholder"),
|
|
464
|
+
e.getAttribute("aria-label"),
|
|
465
|
+
e.closest("label")?.textContent ?? null
|
|
466
|
+
], n = e.getAttribute("id");
|
|
467
|
+
if (n) {
|
|
468
|
+
const r = e.ownerDocument.querySelector(`label[for="${CSS.escape(n)}"]`);
|
|
469
|
+
r && t.push(r.textContent);
|
|
470
|
+
}
|
|
471
|
+
return B(t.filter(Boolean).join(" "));
|
|
472
|
+
}
|
|
473
|
+
function wt(e, t) {
|
|
474
|
+
const n = e.parentElement;
|
|
475
|
+
if (!n) return null;
|
|
476
|
+
const r = e.ownerDocument.body, i = (d) => t ? Le({
|
|
477
|
+
scope: d,
|
|
478
|
+
outsideForms: !0
|
|
479
|
+
}, t) : e, o = (d) => ie({
|
|
480
|
+
scope: d,
|
|
481
|
+
outsideForms: !0
|
|
482
|
+
}, e, i(d)), s = (d) => !!i(d) && !!o(d);
|
|
483
|
+
let c = n, l = null;
|
|
484
|
+
const g = (d) => {
|
|
485
|
+
const w = o(d);
|
|
486
|
+
w && !l && X.test(K(w)) && (l = d);
|
|
487
|
+
};
|
|
488
|
+
for (g(n); c !== r && !s(c); ) {
|
|
489
|
+
const d = c.parentElement;
|
|
490
|
+
if (!d || d.querySelector("form")) break;
|
|
491
|
+
const w = [e], v = i(c);
|
|
492
|
+
v && v !== e && w.push(v);
|
|
493
|
+
const E = !!v;
|
|
494
|
+
if (P(d, Z).filter((b) => !b.closest("form") && !w.includes(b)).some((b) => b.matches(Y) || E || oe.test(yt(b)) ? !0 : mt(b, e))) break;
|
|
495
|
+
c = d, g(d);
|
|
496
|
+
}
|
|
497
|
+
return {
|
|
498
|
+
scope: s(c) ? c : l ?? n,
|
|
499
|
+
outsideForms: !0
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
function pe(e, t, n) {
|
|
503
|
+
return e ? {
|
|
504
|
+
scope: e,
|
|
505
|
+
outsideForms: !1
|
|
506
|
+
} : wt(t, n);
|
|
507
|
+
}
|
|
508
|
+
function vt(e, t) {
|
|
509
|
+
let n = e.parentElement;
|
|
510
|
+
for (; n && n !== t.scope; ) {
|
|
511
|
+
if (P(n, Z).length === 1) return !0;
|
|
512
|
+
n = n.parentElement;
|
|
513
|
+
}
|
|
514
|
+
return !1;
|
|
515
|
+
}
|
|
516
|
+
function ie(e, t, n) {
|
|
517
|
+
const r = (l) => !!(t.compareDocumentPosition(l) & Node.DOCUMENT_POSITION_FOLLOWING), i = Array.from(e.scope.querySelectorAll('button, input[type="submit"]')).filter((l) => J(l) && Oe(e, l) && (l.getAttribute("type") === "submit" || r(l)) && !ft(l) && !ct.test(K(l)) && !pt(l, n));
|
|
518
|
+
if (i.length === 0) return null;
|
|
519
|
+
const o = (l, g) => {
|
|
520
|
+
const d = r(l);
|
|
521
|
+
return [
|
|
522
|
+
vt(l, e) ? 1 : 0,
|
|
523
|
+
X.test(K(l)) ? 0 : 1,
|
|
524
|
+
l.getAttribute("type") === "submit" ? 0 : 1,
|
|
525
|
+
d ? 0 : 1,
|
|
526
|
+
d ? g : -g
|
|
527
|
+
];
|
|
528
|
+
};
|
|
529
|
+
let s = i[0], c = o(s, 0);
|
|
530
|
+
return i.forEach((l, g) => {
|
|
531
|
+
const d = o(l, g);
|
|
532
|
+
for (let w = 0; w < d.length; w++) {
|
|
533
|
+
const v = d[w], E = c[w];
|
|
534
|
+
if (v !== E) {
|
|
535
|
+
v < E && (s = l, c = d);
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}), s;
|
|
540
|
+
}
|
|
541
|
+
function he(e) {
|
|
542
|
+
return e.querySelectorAll("form").length + (P(e, Z).some((t) => !t.closest("form")) ? 1 : 0) === 1;
|
|
543
|
+
}
|
|
544
|
+
function bt(e, t) {
|
|
545
|
+
if (e) {
|
|
546
|
+
const n = e.getAttribute("aria-label");
|
|
547
|
+
if (n) return n;
|
|
548
|
+
const r = e.getAttribute("aria-labelledby");
|
|
549
|
+
if (r) {
|
|
550
|
+
const c = e.ownerDocument.getElementById(r);
|
|
551
|
+
if (c) return c.textContent ?? "";
|
|
552
|
+
}
|
|
553
|
+
const i = e.querySelector("h1, h2, h3, legend");
|
|
554
|
+
if (i) return i.textContent ?? "";
|
|
555
|
+
let o = e.previousElementSibling;
|
|
556
|
+
for (; o; ) {
|
|
557
|
+
const c = /^(h1|h2|h3|legend)$/i.test(o.tagName) ? o : o.querySelector("h1, h2, h3, legend");
|
|
558
|
+
if (c) {
|
|
559
|
+
const l = e.parentElement;
|
|
560
|
+
return l && he(l) ? c.textContent ?? "" : "";
|
|
561
|
+
}
|
|
562
|
+
o = o.previousElementSibling;
|
|
563
|
+
}
|
|
564
|
+
const s = e.closest("section, article, aside, dialog, fieldset, [role='dialog'], [role='region']");
|
|
565
|
+
if (s && s !== e) {
|
|
566
|
+
const c = s.querySelector("h1, h2, h3, legend");
|
|
567
|
+
if (c)
|
|
568
|
+
return he(s) ? c.textContent ?? "" : "";
|
|
569
|
+
}
|
|
570
|
+
return "";
|
|
571
|
+
}
|
|
572
|
+
return (t instanceof Document ? t.body : t)?.querySelector("h1, h2, h3")?.textContent ?? "";
|
|
573
|
+
}
|
|
574
|
+
function ge(e, t, n) {
|
|
575
|
+
const r = B(dt(n)), i = B(bt(e, t)), o = (e?.getAttribute("action") ?? "").split("?")[0], s = B([
|
|
576
|
+
e?.id,
|
|
577
|
+
e?.getAttribute("name"),
|
|
578
|
+
e?.className,
|
|
579
|
+
o
|
|
580
|
+
].filter(Boolean).join(" "));
|
|
581
|
+
return {
|
|
582
|
+
positive: X.test(r) || X.test(i),
|
|
583
|
+
negative: oe.test(r) || oe.test(i) || at.test(s)
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
function Le(e, t) {
|
|
587
|
+
const n = V(e, 'input[autocomplete="username"]')[0] ?? V(e, 'input[autocomplete="email"]')[0] ?? V(e, 'input[type="email"]')[0];
|
|
588
|
+
if (n) return n;
|
|
589
|
+
if (!t) return null;
|
|
590
|
+
const r = V(e, 'input[type="text"], input:not([type])').filter((i) => i.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
591
|
+
return r[r.length - 1] ?? null;
|
|
592
|
+
}
|
|
593
|
+
function ne(e, t) {
|
|
594
|
+
if (t.querySelector('input[autocomplete="new-password"]')) return null;
|
|
595
|
+
const n = P(t, Y);
|
|
596
|
+
if (n.length > 1) return null;
|
|
597
|
+
if (n.length === 1) {
|
|
598
|
+
const l = n[0], g = pe(e, l, l);
|
|
599
|
+
if (!g) return null;
|
|
600
|
+
const d = Le(g, l), w = ie(g, l, d), v = ge(e, t, w);
|
|
601
|
+
return !(l.autocomplete === "current-password" || v.positive) || v.negative ? null : {
|
|
602
|
+
kind: "password",
|
|
603
|
+
form: e,
|
|
604
|
+
identifier: d,
|
|
605
|
+
password: l,
|
|
606
|
+
submit: w
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
const r = P(t, Re);
|
|
610
|
+
if (r.length !== 1) return null;
|
|
611
|
+
const i = r[0], o = pe(e, i, null);
|
|
612
|
+
if (!o) return null;
|
|
613
|
+
const s = ie(o, i, i), c = ge(e, t, s);
|
|
614
|
+
return !(i.autocomplete === "username" || c.positive) || c.negative ? null : {
|
|
615
|
+
kind: "identifier",
|
|
616
|
+
form: e,
|
|
617
|
+
identifier: i,
|
|
618
|
+
password: null,
|
|
619
|
+
submit: s
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
function me(e = document) {
|
|
623
|
+
const t = Array.from(e.querySelectorAll("form"));
|
|
624
|
+
for (const n of t) {
|
|
625
|
+
const r = ne(n, n);
|
|
626
|
+
if (r) return r;
|
|
627
|
+
}
|
|
628
|
+
return t.length === 0 || P(e, Y).find((n) => !n.closest("form")) ? ne(null, e) : null;
|
|
629
|
+
}
|
|
630
|
+
function ye(e, t) {
|
|
631
|
+
const n = Object.getPrototypeOf(e), r = Object.getOwnPropertyDescriptor(n, "value")?.set ?? Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
632
|
+
r ? r.call(e, t) : e.value = t, e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
633
|
+
}
|
|
634
|
+
function Et(e) {
|
|
635
|
+
return !!e.form || !!e.submit;
|
|
636
|
+
}
|
|
637
|
+
function St(e) {
|
|
638
|
+
const t = e.form, n = t?.noValidate;
|
|
639
|
+
t && (t.noValidate = !0);
|
|
640
|
+
try {
|
|
641
|
+
return t && typeof t.requestSubmit == "function" ? (t.requestSubmit(), !0) : e.submit ? (e.submit.click(), !0) : t ? (t.submit(), !0) : !1;
|
|
642
|
+
} finally {
|
|
643
|
+
t && (t.noValidate = n ?? !1);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
var Rt = {
|
|
647
|
+
identifier: null,
|
|
648
|
+
password: null
|
|
649
|
+
};
|
|
650
|
+
function we(e, t) {
|
|
651
|
+
return !e || e.disabled || e.readOnly ? !1 : e.value === "" || t !== null && e.value === t;
|
|
652
|
+
}
|
|
653
|
+
function Ae(e, t, n) {
|
|
654
|
+
return {
|
|
655
|
+
identifier: we(e.identifier, n.identifier) && !t.identifier,
|
|
656
|
+
password: we(e.password, n.password) && !t.password
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
function Ot(e, t, n) {
|
|
660
|
+
const r = e.identifier;
|
|
661
|
+
return !r || n.identifier ? !1 : r.value !== "" && r.value !== t.login;
|
|
662
|
+
}
|
|
663
|
+
function Lt(e, t, n, r = Rt) {
|
|
664
|
+
const i = Ae(e, n, r);
|
|
665
|
+
return !i.identifier && !i.password ? { error: "nothing-to-fill" } : Ot(e, t, i) ? { error: "identifier-mismatch" } : Et(e) ? (i.identifier && ye(e.identifier, t.login), i.password && ye(e.password, t.password), St(e) ? { step: i.identifier && i.password ? "both" : i.password ? "password" : "identifier" } : { error: "no-submit" }) : { error: "no-submit" };
|
|
666
|
+
}
|
|
667
|
+
function At(e) {
|
|
668
|
+
if (typeof window > "u" || typeof MutationObserver > "u") return {
|
|
669
|
+
watch() {
|
|
670
|
+
},
|
|
671
|
+
fill() {
|
|
672
|
+
},
|
|
673
|
+
cancel() {
|
|
674
|
+
},
|
|
675
|
+
teardown() {
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
let t = null, n = {
|
|
679
|
+
identifier: !1,
|
|
680
|
+
password: !1
|
|
681
|
+
}, r = {
|
|
682
|
+
identifier: null,
|
|
683
|
+
password: null
|
|
684
|
+
}, i = !1, o = null, s = null, c = null;
|
|
685
|
+
const l = () => {
|
|
686
|
+
c && clearTimeout(c), c = null;
|
|
687
|
+
}, g = () => {
|
|
688
|
+
o?.disconnect(), o = null, l(), s && clearTimeout(s), s = null;
|
|
689
|
+
}, d = () => {
|
|
690
|
+
const E = me(document);
|
|
691
|
+
if (!E) {
|
|
692
|
+
i = !1, r = {
|
|
693
|
+
identifier: null,
|
|
694
|
+
password: null
|
|
695
|
+
}, l();
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
if (!t)
|
|
699
|
+
i || (i = !0, e.onDetected());
|
|
700
|
+
else {
|
|
701
|
+
const b = Ae(E, n, r), S = Lt(E, t, n, r);
|
|
702
|
+
if ("error" in S || (b.identifier && (n = {
|
|
703
|
+
...n,
|
|
704
|
+
identifier: !0
|
|
705
|
+
}, r = {
|
|
706
|
+
...r,
|
|
707
|
+
identifier: t.login
|
|
708
|
+
}), b.password && (n = {
|
|
709
|
+
...n,
|
|
710
|
+
password: !0
|
|
711
|
+
}, r = {
|
|
712
|
+
...r,
|
|
713
|
+
password: t.password
|
|
714
|
+
})), "error" in S) {
|
|
715
|
+
const A = S.error !== "nothing-to-fill" ? S.error : !n.identifier && !n.password ? "already-filled" : null;
|
|
716
|
+
A && (e.onError(A), t = null, g());
|
|
717
|
+
} else
|
|
718
|
+
e.onFilled(S.step), n.password && (t = null, l(), c = setTimeout(() => {
|
|
719
|
+
c = null, me(document) && (i = !0, e.onDetected());
|
|
720
|
+
}, Ie));
|
|
721
|
+
}
|
|
722
|
+
}, w = () => {
|
|
723
|
+
s && clearTimeout(s), s = setTimeout(() => {
|
|
724
|
+
s = null, d();
|
|
725
|
+
}, it);
|
|
726
|
+
}, v = () => {
|
|
727
|
+
o || (o = new MutationObserver(w), o.observe(document.body, {
|
|
728
|
+
childList: !0,
|
|
729
|
+
subtree: !0,
|
|
730
|
+
attributes: !0,
|
|
731
|
+
attributeFilter: st
|
|
732
|
+
}));
|
|
733
|
+
};
|
|
734
|
+
return {
|
|
735
|
+
watch() {
|
|
736
|
+
o || (i = !1, v()), d();
|
|
737
|
+
},
|
|
738
|
+
fill(E) {
|
|
739
|
+
t = E, v(), d();
|
|
740
|
+
},
|
|
741
|
+
cancel() {
|
|
742
|
+
t = null, n = {
|
|
743
|
+
identifier: !1,
|
|
744
|
+
password: !1
|
|
745
|
+
}, i = !1, g();
|
|
746
|
+
},
|
|
747
|
+
teardown() {
|
|
748
|
+
t = null, g();
|
|
749
|
+
}
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
var kt = 6e5, Ct = 1e3, It = {
|
|
390
753
|
maskAllInputs: !0,
|
|
391
754
|
maskInputOptions: {
|
|
392
755
|
password: !0,
|
|
@@ -399,32 +762,32 @@ var Le = 6e5, be = 1e3, Oe = {
|
|
|
399
762
|
maskTextClass: "leesto-mask-text",
|
|
400
763
|
maskTextSelector: "[data-private]"
|
|
401
764
|
};
|
|
402
|
-
async function
|
|
403
|
-
const { record: t, addCustomEvent:
|
|
404
|
-
let
|
|
405
|
-
const
|
|
406
|
-
if (
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
},
|
|
410
|
-
emit(
|
|
411
|
-
|
|
765
|
+
async function _t(e) {
|
|
766
|
+
const { record: t, addCustomEvent: n } = await import("./chunks/rrweb-qwppqH_c.js"), r = Date.now();
|
|
767
|
+
let i = [], o = !1, s = 0;
|
|
768
|
+
const c = () => {
|
|
769
|
+
if (i.length === 0) return;
|
|
770
|
+
const S = i;
|
|
771
|
+
i = [], e.onBatch(S);
|
|
772
|
+
}, l = t({
|
|
773
|
+
emit(S) {
|
|
774
|
+
i.push(S);
|
|
412
775
|
},
|
|
413
|
-
...
|
|
414
|
-
}),
|
|
415
|
-
|
|
776
|
+
...It
|
|
777
|
+
}), g = e.diagnostics ?? null, d = l ? g ?? Se({ captureNetwork: e.captureNetwork !== !1 }) : null, w = d !== null && g === null;
|
|
778
|
+
d?.setSink((S, A) => {
|
|
416
779
|
try {
|
|
417
|
-
|
|
780
|
+
n(S, A);
|
|
418
781
|
} catch {
|
|
419
782
|
}
|
|
420
783
|
});
|
|
421
|
-
const
|
|
422
|
-
return
|
|
423
|
-
|
|
424
|
-
},
|
|
784
|
+
const v = setInterval(c, Ct), E = { timer: null }, b = () => (o || (o = !0, clearInterval(v), clearTimeout(E.timer ?? void 0), d?.flushRings(), d?.setSink(null), w && d?.teardown(), l?.(), c(), s = Date.now() - r), s);
|
|
785
|
+
return E.timer = setTimeout(() => {
|
|
786
|
+
b(), e.onCap();
|
|
787
|
+
}, kt), { stop: b };
|
|
425
788
|
}
|
|
426
|
-
var
|
|
427
|
-
function
|
|
789
|
+
var Nt = ["https://lab.leesto.app", "https://lab-dev.leesto.app"], Tt = ["http://localhost:3505", "http://127.0.0.1:3505"];
|
|
790
|
+
function qt(e) {
|
|
428
791
|
try {
|
|
429
792
|
const t = new URL(e).hostname;
|
|
430
793
|
return t === "localhost" || t.endsWith(".localhost") || t === "127.0.0.1" || t === "[::1]";
|
|
@@ -432,43 +795,43 @@ function Ne(e) {
|
|
|
432
795
|
return !1;
|
|
433
796
|
}
|
|
434
797
|
}
|
|
435
|
-
function
|
|
798
|
+
function Dt(e) {
|
|
436
799
|
const t = e.trim();
|
|
437
800
|
if (!t) return null;
|
|
438
801
|
try {
|
|
439
|
-
const { origin:
|
|
440
|
-
return
|
|
802
|
+
const { origin: n } = new URL(t);
|
|
803
|
+
return n === "null" ? null : n;
|
|
441
804
|
} catch {
|
|
442
805
|
return null;
|
|
443
806
|
}
|
|
444
807
|
}
|
|
445
|
-
function
|
|
446
|
-
const t = (e.explicit ?? []).map(
|
|
808
|
+
function xt(e) {
|
|
809
|
+
const t = (e.explicit ?? []).map(Dt).filter((r) => r !== null);
|
|
447
810
|
if (t.length > 0) return [...new Set(t)];
|
|
448
|
-
const
|
|
449
|
-
return
|
|
811
|
+
const n = [...Nt];
|
|
812
|
+
return qt(e.pageOrigin) && n.push(...Tt), [...new Set(n)];
|
|
450
813
|
}
|
|
451
|
-
function
|
|
814
|
+
function ve(e, t) {
|
|
452
815
|
return !e || e === "*" || e === "null" ? !1 : t.includes(e);
|
|
453
816
|
}
|
|
454
|
-
function
|
|
817
|
+
function re() {
|
|
455
818
|
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
456
819
|
}
|
|
457
|
-
function
|
|
458
|
-
const t = (
|
|
459
|
-
const
|
|
460
|
-
return
|
|
461
|
-
},
|
|
820
|
+
function Mt(e) {
|
|
821
|
+
const t = (s) => {
|
|
822
|
+
const c = typeof s == "string" ? s.trim() : "";
|
|
823
|
+
return c.length > 0 ? c : void 0;
|
|
824
|
+
}, n = (s) => {
|
|
462
825
|
if (!(typeof document > "u"))
|
|
463
|
-
return t(document.querySelector(`meta[name="${
|
|
464
|
-
},
|
|
465
|
-
if (!(!
|
|
826
|
+
return t(document.querySelector(`meta[name="${s}"]`)?.getAttribute("content"));
|
|
827
|
+
}, r = typeof window < "u" ? window.__LEESTO_APP_BUILD__ : void 0, i = t(e?.version) ?? t(r?.version) ?? n("app-version"), o = t(e?.environment) ?? t(r?.environment) ?? n("app-environment");
|
|
828
|
+
if (!(!i && !o))
|
|
466
829
|
return {
|
|
467
|
-
...
|
|
468
|
-
...
|
|
830
|
+
...i ? { version: i } : {},
|
|
831
|
+
...o ? { environment: o } : {}
|
|
469
832
|
};
|
|
470
833
|
}
|
|
471
|
-
function
|
|
834
|
+
function Pt() {
|
|
472
835
|
if (typeof document > "u") return;
|
|
473
836
|
const e = document.querySelector('link[rel~="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]');
|
|
474
837
|
if (e?.href)
|
|
@@ -478,228 +841,283 @@ function qe() {
|
|
|
478
841
|
return;
|
|
479
842
|
}
|
|
480
843
|
}
|
|
481
|
-
function $
|
|
482
|
-
const e = (
|
|
844
|
+
function $t() {
|
|
845
|
+
const e = (r) => !!r && r !== "transparent" && !/^rgba\(\s*0,\s*0,\s*0,\s*0\s*\)$/.test(r), t = getComputedStyle(document.body).backgroundColor;
|
|
483
846
|
if (e(t)) return t;
|
|
484
|
-
const
|
|
485
|
-
return e(
|
|
486
|
-
}
|
|
487
|
-
async function
|
|
488
|
-
const { domToPng:
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
492
|
-
|
|
493
|
-
|
|
847
|
+
const n = getComputedStyle(document.documentElement).backgroundColor;
|
|
848
|
+
return e(n) ? n : "#ffffff";
|
|
849
|
+
}
|
|
850
|
+
async function be(e) {
|
|
851
|
+
const { domToPng: t } = await import("./chunks/dist-BTlWkbvW.js");
|
|
852
|
+
if (e) {
|
|
853
|
+
const s = document.querySelector(e);
|
|
854
|
+
if (!s) throw new Error("element_not_found");
|
|
855
|
+
return t(s, { quality: 0.92 });
|
|
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}` : ""}`;
|
|
494
863
|
}
|
|
495
864
|
}
|
|
496
865
|
try {
|
|
497
|
-
return await
|
|
866
|
+
return await t(n, {
|
|
498
867
|
quality: 0.92,
|
|
499
|
-
backgroundColor: $
|
|
500
|
-
width:
|
|
501
|
-
height:
|
|
868
|
+
backgroundColor: $t(),
|
|
869
|
+
width: n.clientWidth,
|
|
870
|
+
height: n.clientHeight,
|
|
502
871
|
style: {
|
|
503
|
-
transform: `translate(${-r}px, ${-
|
|
872
|
+
transform: `translate(${-r}px, ${-i}px)`,
|
|
504
873
|
transformOrigin: "top left"
|
|
505
874
|
}
|
|
506
875
|
});
|
|
507
876
|
} finally {
|
|
508
|
-
for (const [s,
|
|
877
|
+
for (const [s, c] of o) s.style.transform = c;
|
|
509
878
|
}
|
|
510
879
|
}
|
|
511
|
-
function
|
|
880
|
+
function Ft(e) {
|
|
512
881
|
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
513
882
|
const t = [];
|
|
514
|
-
let
|
|
515
|
-
for (;
|
|
516
|
-
if (
|
|
517
|
-
t.unshift(`#${CSS.escape(
|
|
883
|
+
let n = e;
|
|
884
|
+
for (; n && n.nodeType === 1 && n !== document.body && t.length < 4; ) {
|
|
885
|
+
if (n.id) {
|
|
886
|
+
t.unshift(`#${CSS.escape(n.id)}`);
|
|
518
887
|
break;
|
|
519
888
|
}
|
|
520
|
-
let
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
const
|
|
524
|
-
if (
|
|
525
|
-
const
|
|
526
|
-
|
|
889
|
+
let r = n.tagName.toLowerCase();
|
|
890
|
+
const i = typeof n.className == "string" ? n.className.trim().split(/\s+/).filter(Boolean)[0] : null;
|
|
891
|
+
i && (r += `.${CSS.escape(i)}`);
|
|
892
|
+
const o = n.parentElement;
|
|
893
|
+
if (o) {
|
|
894
|
+
const s = Array.from(o.children).filter((c) => c.tagName === n?.tagName);
|
|
895
|
+
s.length > 1 && (r += `:nth-of-type(${s.indexOf(n) + 1})`);
|
|
527
896
|
}
|
|
528
|
-
t.unshift(
|
|
897
|
+
t.unshift(r), n = o;
|
|
529
898
|
}
|
|
530
899
|
return t.join(" > ");
|
|
531
900
|
}
|
|
532
|
-
function
|
|
533
|
-
const t = e.tagName.toLowerCase(),
|
|
534
|
-
return
|
|
901
|
+
function Gt(e) {
|
|
902
|
+
const t = e.tagName.toLowerCase(), n = (e.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 40);
|
|
903
|
+
return n ? `${t} · ${n}` : t;
|
|
535
904
|
}
|
|
536
|
-
function
|
|
905
|
+
function Ee(e = {}) {
|
|
537
906
|
if (typeof window > "u" || window.parent === window) return () => {
|
|
538
907
|
};
|
|
539
|
-
const t = window.parent,
|
|
908
|
+
const t = window.parent, n = e.highlightColor ?? He.light.primary, r = xt({
|
|
540
909
|
explicit: e.shellOrigins,
|
|
541
910
|
pageOrigin: location.origin
|
|
542
911
|
});
|
|
543
|
-
let
|
|
912
|
+
let i = null;
|
|
544
913
|
try {
|
|
545
|
-
const
|
|
546
|
-
|
|
914
|
+
const p = document.referrer ? new URL(document.referrer).origin : "";
|
|
915
|
+
ve(p, r) && (i = p);
|
|
547
916
|
} catch {
|
|
548
917
|
}
|
|
549
|
-
const
|
|
550
|
-
if (
|
|
551
|
-
t.postMessage(
|
|
918
|
+
const o = (p) => {
|
|
919
|
+
if (i) {
|
|
920
|
+
t.postMessage(p, i);
|
|
552
921
|
return;
|
|
553
922
|
}
|
|
554
|
-
for (const
|
|
923
|
+
for (const m of r) t.postMessage(p, m);
|
|
555
924
|
};
|
|
556
|
-
let
|
|
557
|
-
const
|
|
558
|
-
|
|
925
|
+
let s = null, c = "";
|
|
926
|
+
const l = () => {
|
|
927
|
+
s && (s.style.outline = c), s = null;
|
|
559
928
|
};
|
|
560
|
-
let
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
929
|
+
let g = null;
|
|
930
|
+
const d = () => {
|
|
931
|
+
g?.(), l(), document.querySelector("[data-leesto-picker-outline]")?.remove();
|
|
932
|
+
const p = document.createElement("div");
|
|
933
|
+
p.dataset.leestoPickerOutline = "", p.setAttribute("aria-hidden", "true"), Object.assign(p.style, {
|
|
934
|
+
position: "fixed",
|
|
935
|
+
pointerEvents: "none",
|
|
936
|
+
zIndex: "2147483647",
|
|
937
|
+
boxSizing: "border-box",
|
|
938
|
+
border: `2px solid ${n}`,
|
|
939
|
+
borderRadius: "4px",
|
|
940
|
+
display: "none"
|
|
941
|
+
}), document.documentElement.append(p);
|
|
942
|
+
let m = null, y = null;
|
|
943
|
+
const ke = document.body.style.cursor, F = () => {
|
|
944
|
+
const L = y ?? m;
|
|
945
|
+
if (!L) return;
|
|
946
|
+
const q = L.getBoundingClientRect();
|
|
947
|
+
y ? o({
|
|
948
|
+
type: "leesto:element-picked",
|
|
949
|
+
selector: Ft(L),
|
|
950
|
+
label: Gt(L),
|
|
951
|
+
rect: {
|
|
952
|
+
x: q.x,
|
|
953
|
+
y: q.y,
|
|
954
|
+
width: q.width,
|
|
955
|
+
height: q.height
|
|
956
|
+
}
|
|
957
|
+
}) : Object.assign(p.style, {
|
|
958
|
+
display: "block",
|
|
959
|
+
left: `${q.x}px`,
|
|
960
|
+
top: `${q.y}px`,
|
|
961
|
+
width: `${q.width}px`,
|
|
962
|
+
height: `${q.height}px`
|
|
963
|
+
});
|
|
964
|
+
}, se = (L) => {
|
|
965
|
+
m = L.target instanceof Element ? L.target : null, F();
|
|
966
|
+
}, ae = () => {
|
|
967
|
+
p.remove(), document.removeEventListener("mousemove", se, !0), document.removeEventListener("click", le, !0), document.body.style.cursor = ke;
|
|
968
|
+
}, le = (L) => {
|
|
969
|
+
L.preventDefault(), L.stopPropagation(), y = L.target instanceof Element ? L.target : null, ae(), F();
|
|
970
|
+
}, ce = (L) => {
|
|
971
|
+
L.key === "Escape" && (g?.(), o({ type: "leesto:pick-cancelled" }));
|
|
585
972
|
};
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
}, document.body.style.cursor = "crosshair", document.addEventListener("mousemove",
|
|
589
|
-
},
|
|
973
|
+
g = () => {
|
|
974
|
+
ae(), document.removeEventListener("keydown", ce, !0), document.removeEventListener("scroll", F, !0), window.removeEventListener("resize", F), g = null;
|
|
975
|
+
}, document.body.style.cursor = "crosshair", document.addEventListener("mousemove", se, !0), document.addEventListener("click", le, !0), document.addEventListener("keydown", ce, !0), document.addEventListener("scroll", F, !0), window.addEventListener("resize", F);
|
|
976
|
+
}, w = Me(location.search) && !re(), v = w ? xe(location.search) ?? De() : void 0, E = w ? Se({
|
|
590
977
|
captureNetwork: e.captureNetwork !== !1,
|
|
591
|
-
runId:
|
|
978
|
+
runId: v,
|
|
592
979
|
runIdOrigins: e.runIdOrigins
|
|
593
980
|
}) : null;
|
|
594
|
-
let
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
const
|
|
598
|
-
|
|
981
|
+
let b = null, S = !1, A = !1;
|
|
982
|
+
const x = () => {
|
|
983
|
+
if (b) {
|
|
984
|
+
const p = b.stop();
|
|
985
|
+
b = null, o({
|
|
599
986
|
type: "leesto:rec-stopped",
|
|
600
|
-
durationMs:
|
|
987
|
+
durationMs: p
|
|
601
988
|
});
|
|
602
|
-
} else
|
|
603
|
-
},
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
989
|
+
} else S && (A = !0);
|
|
990
|
+
}, I = At({
|
|
991
|
+
onDetected: () => o({ type: "leesto:login-form-detected" }),
|
|
992
|
+
onFilled: (p) => o({
|
|
993
|
+
type: "leesto:login-filled",
|
|
994
|
+
step: p
|
|
995
|
+
}),
|
|
996
|
+
onError: (p) => o({
|
|
997
|
+
type: "leesto:login-error",
|
|
998
|
+
reason: p
|
|
999
|
+
})
|
|
1000
|
+
}), M = () => I.cancel();
|
|
1001
|
+
window.addEventListener("pagehide", M);
|
|
1002
|
+
const U = Mt(e.build), C = window.navigation;
|
|
1003
|
+
let $ = !1, z = !1;
|
|
1004
|
+
const _ = () => !$ && C?.canGoBack === !0;
|
|
1005
|
+
let N = _(), a = location.href;
|
|
1006
|
+
const u = () => {
|
|
1007
|
+
a = location.href, N = _();
|
|
1008
|
+
const p = Pt();
|
|
1009
|
+
o({
|
|
1010
|
+
type: "leesto:ready",
|
|
1011
|
+
url: location.href,
|
|
1012
|
+
bridgeVersion: 1,
|
|
1013
|
+
capabilities: [Ce, ...C ? ["navigation"] : []],
|
|
1014
|
+
canGoBack: N,
|
|
1015
|
+
...p ? { favicon: p } : {},
|
|
1016
|
+
...U ? { build: U } : {},
|
|
1017
|
+
...v ? { diagnosticRunId: v } : {},
|
|
1018
|
+
...re() ? { gpc: !0 } : {}
|
|
1019
|
+
});
|
|
1020
|
+
}, f = (p) => {
|
|
1021
|
+
if (p.source !== t || !ve(p.origin, r) || !_e(p.data)) return;
|
|
1022
|
+
i || (i = p.origin);
|
|
1023
|
+
const m = p.data;
|
|
1024
|
+
if (m.type === "leesto:ping")
|
|
1025
|
+
o({ type: "leesto:pong" }), u();
|
|
1026
|
+
else if (m.type === "leesto:navigate-back") {
|
|
1027
|
+
if (!C || !_()) return;
|
|
1028
|
+
$ = !0, h(), Promise.resolve(C.back().finished).catch(() => {
|
|
1029
|
+
}).finally(() => {
|
|
1030
|
+
$ = !1, z || h();
|
|
1031
|
+
});
|
|
1032
|
+
} else if (m.type === "leesto:highlight") {
|
|
1033
|
+
if (l(), m.selector) {
|
|
1034
|
+
let y = null;
|
|
611
1035
|
try {
|
|
612
|
-
|
|
1036
|
+
y = document.querySelector(m.selector);
|
|
613
1037
|
} catch {
|
|
614
|
-
|
|
1038
|
+
y = null;
|
|
615
1039
|
}
|
|
616
|
-
|
|
1040
|
+
y && (s = y, c = y.style.outline, y.style.outline = `2px solid ${n}`, y.style.outlineOffset = "2px", y.scrollIntoView({
|
|
617
1041
|
block: "center",
|
|
618
1042
|
behavior: "smooth"
|
|
619
1043
|
}));
|
|
620
1044
|
}
|
|
621
|
-
} else if (
|
|
622
|
-
else if (
|
|
623
|
-
else if (
|
|
1045
|
+
} else if (m.type === "leesto:pick-start") d();
|
|
1046
|
+
else if (m.type === "leesto:pick-stop") g?.();
|
|
1047
|
+
else if (m.type === "leesto:capture-request") (m.selector ? be(m.selector) : (e.capture ?? be)()).then((y) => o({
|
|
624
1048
|
type: "leesto:screenshot",
|
|
625
|
-
dataUrl:
|
|
626
|
-
|
|
1049
|
+
dataUrl: y,
|
|
1050
|
+
...m.selector ? { selector: m.selector } : {}
|
|
1051
|
+
})).catch((y) => o({
|
|
627
1052
|
type: "leesto:capture-failed",
|
|
628
|
-
reason:
|
|
1053
|
+
reason: y instanceof Error ? y.message : "capture_error"
|
|
629
1054
|
}));
|
|
630
|
-
else if (
|
|
631
|
-
if (
|
|
632
|
-
if (
|
|
633
|
-
|
|
1055
|
+
else if (m.type === "leesto:rec-start") {
|
|
1056
|
+
if (b || S) return;
|
|
1057
|
+
if (re()) {
|
|
1058
|
+
o({
|
|
634
1059
|
type: "leesto:rec-blocked",
|
|
635
1060
|
reason: "gpc"
|
|
636
1061
|
});
|
|
637
1062
|
return;
|
|
638
1063
|
}
|
|
639
|
-
|
|
640
|
-
onBatch: (
|
|
1064
|
+
S = !0, A = !1, _t({
|
|
1065
|
+
onBatch: (y) => o({
|
|
641
1066
|
type: "leesto:rec-batch",
|
|
642
|
-
events:
|
|
1067
|
+
events: y
|
|
643
1068
|
}),
|
|
644
|
-
onCap: () =>
|
|
1069
|
+
onCap: () => x(),
|
|
645
1070
|
captureNetwork: e.captureNetwork,
|
|
646
|
-
diagnostics:
|
|
647
|
-
}).then((
|
|
648
|
-
|
|
649
|
-
}).catch((
|
|
650
|
-
|
|
1071
|
+
diagnostics: E
|
|
1072
|
+
}).then((y) => {
|
|
1073
|
+
S = !1, b = y, A && x();
|
|
1074
|
+
}).catch((y) => {
|
|
1075
|
+
S = !1, o({
|
|
651
1076
|
type: "leesto:rec-error",
|
|
652
|
-
reason:
|
|
1077
|
+
reason: y instanceof Error ? y.message : "rec_error"
|
|
653
1078
|
});
|
|
654
1079
|
});
|
|
655
|
-
} else
|
|
1080
|
+
} else m.type === "leesto:rec-stop" ? x() : m.type === "leesto:diagnostics-request" ? o({
|
|
656
1081
|
type: "leesto:diagnostics",
|
|
657
|
-
snapshot:
|
|
1082
|
+
snapshot: E?.snapshot() ?? {
|
|
658
1083
|
errors: [],
|
|
659
1084
|
logs: [],
|
|
660
1085
|
network: []
|
|
661
1086
|
}
|
|
662
|
-
})
|
|
1087
|
+
}) : m.type === "leesto:login-watch" ? I.watch() : m.type === "leesto:login-fill" ? I.fill({
|
|
1088
|
+
login: m.login,
|
|
1089
|
+
password: m.password
|
|
1090
|
+
}) : m.type === "leesto:login-cancel" && I.cancel();
|
|
663
1091
|
};
|
|
664
|
-
window.addEventListener("message",
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
type: "leesto:ready",
|
|
668
|
-
url: location.href,
|
|
669
|
-
bridgeVersion: 1,
|
|
670
|
-
...M ? { favicon: M } : {},
|
|
671
|
-
...A ? { build: A } : {},
|
|
672
|
-
...E ? { diagnosticRunId: E } : {},
|
|
673
|
-
...z() ? { gpc: !0 } : {}
|
|
674
|
-
});
|
|
675
|
-
let q = location.href;
|
|
676
|
-
const S = () => {
|
|
677
|
-
location.href !== q && (q = location.href, s({
|
|
1092
|
+
window.addEventListener("message", f), u();
|
|
1093
|
+
const h = () => {
|
|
1094
|
+
location.href === a && _() === N || (a = location.href, N = _(), o({
|
|
678
1095
|
type: "leesto:location",
|
|
679
|
-
url: location.href
|
|
1096
|
+
url: location.href,
|
|
1097
|
+
canGoBack: N
|
|
680
1098
|
}));
|
|
681
|
-
},
|
|
682
|
-
|
|
683
|
-
},
|
|
684
|
-
|
|
1099
|
+
}, O = history.pushState, T = history.replaceState, R = (...p) => {
|
|
1100
|
+
O.apply(history, p), h();
|
|
1101
|
+
}, k = (...p) => {
|
|
1102
|
+
T.apply(history, p), h();
|
|
685
1103
|
};
|
|
686
|
-
return history.pushState =
|
|
687
|
-
|
|
1104
|
+
return history.pushState = R, history.replaceState = k, C?.addEventListener("currententrychange", h), window.addEventListener("popstate", h), window.addEventListener("hashchange", h), () => {
|
|
1105
|
+
z = !0, C?.removeEventListener("currententrychange", h), x(), E?.teardown(), l(), g?.(), I.teardown(), window.removeEventListener("pagehide", M), window.removeEventListener("message", f), window.removeEventListener("popstate", h), window.removeEventListener("hashchange", h), history.pushState === R && (history.pushState = O), history.replaceState === k && (history.replaceState = T);
|
|
688
1106
|
};
|
|
689
1107
|
}
|
|
690
|
-
function
|
|
1108
|
+
function Ht() {
|
|
691
1109
|
return typeof document > "u" ? null : document.currentScript ?? document.querySelector("script[data-leesto-connect]");
|
|
692
1110
|
}
|
|
693
|
-
function
|
|
694
|
-
const t = {},
|
|
695
|
-
|
|
696
|
-
const
|
|
697
|
-
return
|
|
1111
|
+
function Ut(e) {
|
|
1112
|
+
const t = {}, n = e?.dataset.highlightColor;
|
|
1113
|
+
n && (t.highlightColor = n);
|
|
1114
|
+
const r = (e?.dataset.shellOrigin ?? "").split(",").map((i) => i.trim()).filter(Boolean);
|
|
1115
|
+
return r.length > 0 && (t.shellOrigins = r), t;
|
|
698
1116
|
}
|
|
699
1117
|
if (typeof window < "u") {
|
|
700
|
-
window.LeestoConnect = { connect: (t) =>
|
|
701
|
-
const e =
|
|
702
|
-
(!e || e.dataset.leestoManual === void 0) &&
|
|
1118
|
+
window.LeestoConnect = { connect: (t) => Ee(t) };
|
|
1119
|
+
const e = Ht();
|
|
1120
|
+
(!e || e.dataset.leestoManual === void 0) && Ee(Ut(e));
|
|
703
1121
|
}
|
|
704
1122
|
|
|
705
1123
|
//# sourceMappingURL=leesto-connect.js.map
|