jat-feedback 3.2.0 → 3.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/dist/jat-feedback.js +38 -38
- package/dist/jat-feedback.mjs +910 -862
- package/package.json +1 -1
package/dist/jat-feedback.mjs
CHANGED
|
@@ -3,7 +3,7 @@ var Ir = (d) => {
|
|
|
3
3
|
throw TypeError(d);
|
|
4
4
|
};
|
|
5
5
|
var Qr = (d, p, h) => p in d ? Jr(d, p, { enumerable: !0, configurable: !0, writable: !0, value: h }) : d[p] = h;
|
|
6
|
-
var
|
|
6
|
+
var Ce = (d, p, h) => Qr(d, typeof p != "symbol" ? p + "" : p, h), gr = (d, p, h) => p.has(d) || Ir("Cannot " + h);
|
|
7
7
|
var U = (d, p, h) => (gr(d, p, "read from private field"), h ? h.call(d) : p.get(d)), De = (d, p, h) => p.has(d) ? Ir("Cannot add the same private member more than once") : p instanceof WeakSet ? p.add(d) : p.set(d, h), Me = (d, p, h, g) => (gr(d, p, "write to private field"), g ? g.call(d, h) : p.set(d, h), h), ct = (d, p, h) => (gr(d, p, "access private method"), h);
|
|
8
8
|
const PUBLIC_VERSION = "5";
|
|
9
9
|
var Tr;
|
|
@@ -28,12 +28,12 @@ function deferred() {
|
|
|
28
28
|
const DERIVED = 2, EFFECT = 4, RENDER_EFFECT = 8, MANAGED_EFFECT = 1 << 24, BLOCK_EFFECT = 16, BRANCH_EFFECT = 32, ROOT_EFFECT = 64, BOUNDARY_EFFECT = 128, CONNECTED = 512, CLEAN = 1024, DIRTY = 2048, MAYBE_DIRTY = 4096, INERT = 8192, DESTROYED = 16384, REACTION_RAN = 32768, EFFECT_TRANSPARENT = 65536, EAGER_EFFECT = 1 << 17, HEAD_EFFECT = 1 << 18, EFFECT_PRESERVED = 1 << 19, USER_EFFECT = 1 << 20, EFFECT_OFFSCREEN = 1 << 25, WAS_MARKED = 65536, REACTION_IS_UPDATING = 1 << 21, ASYNC = 1 << 22, ERROR_VALUE = 1 << 23, STATE_SYMBOL = Symbol("$state"), LEGACY_PROPS = Symbol("legacy props"), LOADING_ATTR_SYMBOL = Symbol(""), STALE_REACTION = new class extends Error {
|
|
29
29
|
constructor() {
|
|
30
30
|
super(...arguments);
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
Ce(this, "name", "StaleReactionError");
|
|
32
|
+
Ce(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
33
33
|
}
|
|
34
34
|
}();
|
|
35
|
-
var
|
|
36
|
-
const IS_XHTML = ((
|
|
35
|
+
var Rr, Ar;
|
|
36
|
+
const IS_XHTML = ((Ar = (Rr = globalThis.document) == null ? void 0 : Rr.contentType) == null ? void 0 : /* @__PURE__ */ Ar.includes("xml")) ?? !1, TEXT_NODE = 3, COMMENT_NODE = 8;
|
|
37
37
|
function lifecycle_outside_component(d) {
|
|
38
38
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
39
39
|
}
|
|
@@ -244,19 +244,19 @@ var kn, Cn, fn, In, Bn, Un, pn, qt, Tn, Ut, mr, vr, zr;
|
|
|
244
244
|
const yr = class yr {
|
|
245
245
|
constructor() {
|
|
246
246
|
De(this, Ut);
|
|
247
|
-
|
|
247
|
+
Ce(this, "committed", !1);
|
|
248
248
|
/**
|
|
249
249
|
* The current values of any sources that are updated in this batch
|
|
250
250
|
* They keys of this map are identical to `this.#previous`
|
|
251
251
|
* @type {Map<Source, any>}
|
|
252
252
|
*/
|
|
253
|
-
|
|
253
|
+
Ce(this, "current", /* @__PURE__ */ new Map());
|
|
254
254
|
/**
|
|
255
255
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
256
256
|
* They keys of this map are identical to `this.#current`
|
|
257
257
|
* @type {Map<Source, any>}
|
|
258
258
|
*/
|
|
259
|
-
|
|
259
|
+
Ce(this, "previous", /* @__PURE__ */ new Map());
|
|
260
260
|
/**
|
|
261
261
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
262
262
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
@@ -300,7 +300,7 @@ const yr = class yr {
|
|
|
300
300
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
301
301
|
*/
|
|
302
302
|
De(this, qt, /* @__PURE__ */ new Map());
|
|
303
|
-
|
|
303
|
+
Ce(this, "is_fork", !1);
|
|
304
304
|
De(this, Tn, !1);
|
|
305
305
|
}
|
|
306
306
|
is_deferred() {
|
|
@@ -624,7 +624,7 @@ var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED | BOUNDARY_EFFECT;
|
|
|
624
624
|
function boundary(d, p, h) {
|
|
625
625
|
new Boundary(d, p, h);
|
|
626
626
|
}
|
|
627
|
-
var St, jn, Ft, hn, Pt, It, yt, Zt, Yt, rn, gn, Kt,
|
|
627
|
+
var St, jn, Ft, hn, Pt, It, yt, Zt, Yt, rn, gn, Kt, Rn, mn, An, Nn, Xt, tr, it, Or, Dr, _r, Qn, er, br;
|
|
628
628
|
class Boundary {
|
|
629
629
|
/**
|
|
630
630
|
* @param {TemplateNode} node
|
|
@@ -634,8 +634,8 @@ class Boundary {
|
|
|
634
634
|
constructor(p, h, g) {
|
|
635
635
|
De(this, it);
|
|
636
636
|
/** @type {Boundary | null} */
|
|
637
|
-
|
|
638
|
-
|
|
637
|
+
Ce(this, "parent");
|
|
638
|
+
Ce(this, "is_pending", !1);
|
|
639
639
|
/** @type {TemplateNode} */
|
|
640
640
|
De(this, St);
|
|
641
641
|
/** @type {TemplateNode | null} */
|
|
@@ -658,10 +658,10 @@ class Boundary {
|
|
|
658
658
|
De(this, rn, null);
|
|
659
659
|
De(this, gn, 0);
|
|
660
660
|
De(this, Kt, 0);
|
|
661
|
-
De(this,
|
|
661
|
+
De(this, Rn, !1);
|
|
662
662
|
De(this, mn, !1);
|
|
663
663
|
/** @type {Set<Effect>} */
|
|
664
|
-
De(this,
|
|
664
|
+
De(this, An, /* @__PURE__ */ new Set());
|
|
665
665
|
/** @type {Set<Effect>} */
|
|
666
666
|
De(this, Nn, /* @__PURE__ */ new Set());
|
|
667
667
|
/**
|
|
@@ -702,7 +702,7 @@ class Boundary {
|
|
|
702
702
|
* @param {Effect} effect
|
|
703
703
|
*/
|
|
704
704
|
defer_effect(p) {
|
|
705
|
-
defer_effect(p, U(this,
|
|
705
|
+
defer_effect(p, U(this, An), U(this, Nn));
|
|
706
706
|
}
|
|
707
707
|
/**
|
|
708
708
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -721,8 +721,8 @@ class Boundary {
|
|
|
721
721
|
* @param {1 | -1} d
|
|
722
722
|
*/
|
|
723
723
|
update_pending_count(p) {
|
|
724
|
-
ct(this, it, br).call(this, p), Me(this, gn, U(this, gn) + p), !(!U(this, Xt) || U(this,
|
|
725
|
-
Me(this,
|
|
724
|
+
ct(this, it, br).call(this, p), Me(this, gn, U(this, gn) + p), !(!U(this, Xt) || U(this, Rn)) && (Me(this, Rn, !0), queue_micro_task(() => {
|
|
725
|
+
Me(this, Rn, !1), U(this, Xt) && internal_set(U(this, Xt), U(this, gn));
|
|
726
726
|
}));
|
|
727
727
|
}
|
|
728
728
|
get_effect_pending() {
|
|
@@ -780,7 +780,7 @@ class Boundary {
|
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
|
-
St = new WeakMap(), jn = new WeakMap(), Ft = new WeakMap(), hn = new WeakMap(), Pt = new WeakMap(), It = new WeakMap(), yt = new WeakMap(), Zt = new WeakMap(), Yt = new WeakMap(), rn = new WeakMap(), gn = new WeakMap(), Kt = new WeakMap(),
|
|
783
|
+
St = new WeakMap(), jn = new WeakMap(), Ft = new WeakMap(), hn = new WeakMap(), Pt = new WeakMap(), It = new WeakMap(), yt = new WeakMap(), Zt = new WeakMap(), Yt = new WeakMap(), rn = new WeakMap(), gn = new WeakMap(), Kt = new WeakMap(), Rn = new WeakMap(), mn = new WeakMap(), An = new WeakMap(), Nn = new WeakMap(), Xt = new WeakMap(), tr = new WeakMap(), it = new WeakSet(), Or = function() {
|
|
784
784
|
try {
|
|
785
785
|
Me(this, It, branch(() => U(this, hn).call(this, U(this, St))));
|
|
786
786
|
} catch (p) {
|
|
@@ -836,11 +836,11 @@ br = function(p) {
|
|
|
836
836
|
}
|
|
837
837
|
if (Me(this, Kt, U(this, Kt) + p), U(this, Kt) === 0) {
|
|
838
838
|
this.is_pending = !1;
|
|
839
|
-
for (const g of U(this,
|
|
839
|
+
for (const g of U(this, An))
|
|
840
840
|
set_signal_status(g, DIRTY), schedule_effect(g);
|
|
841
841
|
for (const g of U(this, Nn))
|
|
842
842
|
set_signal_status(g, MAYBE_DIRTY), schedule_effect(g);
|
|
843
|
-
U(this,
|
|
843
|
+
U(this, An).clear(), U(this, Nn).clear(), U(this, yt) && pause_effect(U(this, yt), () => {
|
|
844
844
|
Me(this, yt, null);
|
|
845
845
|
}), U(this, Yt) && (U(this, St).before(U(this, Yt)), Me(this, Yt, null));
|
|
846
846
|
}
|
|
@@ -933,8 +933,8 @@ function async_derived(d, p, h) {
|
|
|
933
933
|
Promise.resolve(d()).then(x.resolve, x.reject).then(() => {
|
|
934
934
|
E === current_batch && E.committed && E.deactivate(), unset_context();
|
|
935
935
|
});
|
|
936
|
-
} catch (
|
|
937
|
-
x.reject(
|
|
936
|
+
} catch (R) {
|
|
937
|
+
x.reject(R), unset_context();
|
|
938
938
|
}
|
|
939
939
|
var E = (
|
|
940
940
|
/** @type {Batch} */
|
|
@@ -944,19 +944,19 @@ function async_derived(d, p, h) {
|
|
|
944
944
|
var S = m.is_rendered();
|
|
945
945
|
m.update_pending_count(1), E.increment(S), (I = w.get(E)) == null || I.reject(STALE_REACTION), w.delete(E), w.set(E, x);
|
|
946
946
|
}
|
|
947
|
-
const k = (
|
|
947
|
+
const k = (R, M = void 0) => {
|
|
948
948
|
if (E.activate(), M)
|
|
949
949
|
M !== STALE_REACTION && (b.f |= ERROR_VALUE, internal_set(b, M));
|
|
950
950
|
else {
|
|
951
|
-
(b.f & ERROR_VALUE) !== 0 && (b.f ^= ERROR_VALUE), internal_set(b,
|
|
952
|
-
for (const [
|
|
953
|
-
if (w.delete(
|
|
951
|
+
(b.f & ERROR_VALUE) !== 0 && (b.f ^= ERROR_VALUE), internal_set(b, R);
|
|
952
|
+
for (const [A, C] of w) {
|
|
953
|
+
if (w.delete(A), A === E) break;
|
|
954
954
|
C.reject(STALE_REACTION);
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
y && (m.update_pending_count(-1), E.decrement(S));
|
|
958
958
|
};
|
|
959
|
-
x.promise.then(k, (
|
|
959
|
+
x.promise.then(k, (R) => k(null, R || "unknown"));
|
|
960
960
|
}), teardown(() => {
|
|
961
961
|
for (const x of w.values())
|
|
962
962
|
x.reject(STALE_REACTION);
|
|
@@ -1154,7 +1154,7 @@ function proxy(d) {
|
|
|
1154
1154
|
return d;
|
|
1155
1155
|
var E = h.get(w), S = w in y;
|
|
1156
1156
|
if (E === void 0 && (!S || (I = get_descriptor(y, w)) != null && I.writable) && (E = b(() => {
|
|
1157
|
-
var
|
|
1157
|
+
var R = proxy(S ? y[w] : UNINITIALIZED), M = /* @__PURE__ */ state(R);
|
|
1158
1158
|
return M;
|
|
1159
1159
|
}), h.set(w, E)), E !== void 0) {
|
|
1160
1160
|
var k = get(E);
|
|
@@ -1186,8 +1186,8 @@ function proxy(d) {
|
|
|
1186
1186
|
var x = h.get(w), E = x !== void 0 && x.v !== UNINITIALIZED || Reflect.has(y, w);
|
|
1187
1187
|
if (x !== void 0 || active_effect !== null && (!E || (k = get_descriptor(y, w)) != null && k.writable)) {
|
|
1188
1188
|
x === void 0 && (x = b(() => {
|
|
1189
|
-
var I = E ? proxy(y[w]) : UNINITIALIZED,
|
|
1190
|
-
return
|
|
1189
|
+
var I = E ? proxy(y[w]) : UNINITIALIZED, R = /* @__PURE__ */ state(I);
|
|
1190
|
+
return R;
|
|
1191
1191
|
}), h.set(w, x));
|
|
1192
1192
|
var S = get(x);
|
|
1193
1193
|
if (S === UNINITIALIZED)
|
|
@@ -1201,8 +1201,8 @@ function proxy(d) {
|
|
|
1201
1201
|
if (g && w === "length")
|
|
1202
1202
|
for (var I = x; I < /** @type {Source<number>} */
|
|
1203
1203
|
S.v; I += 1) {
|
|
1204
|
-
var
|
|
1205
|
-
|
|
1204
|
+
var R = h.get(I + "");
|
|
1205
|
+
R !== void 0 ? set(R, UNINITIALIZED) : I in y && (R = b(() => /* @__PURE__ */ state(UNINITIALIZED)), h.set(I + "", R));
|
|
1206
1206
|
}
|
|
1207
1207
|
if (S === void 0)
|
|
1208
1208
|
(!k || ($ = get_descriptor(y, w)) != null && $.writable) && (S = b(() => /* @__PURE__ */ state(void 0)), set(S, proxy(x)), h.set(w, S));
|
|
@@ -1211,8 +1211,8 @@ function proxy(d) {
|
|
|
1211
1211
|
var M = b(() => proxy(x));
|
|
1212
1212
|
set(S, M);
|
|
1213
1213
|
}
|
|
1214
|
-
var
|
|
1215
|
-
if (
|
|
1214
|
+
var A = Reflect.getOwnPropertyDescriptor(y, w);
|
|
1215
|
+
if (A != null && A.set && A.set.call(E, x), !k) {
|
|
1216
1216
|
if (g && typeof w == "string") {
|
|
1217
1217
|
var C = (
|
|
1218
1218
|
/** @type {Source<number>} */
|
|
@@ -1685,37 +1685,37 @@ function update_reaction(d) {
|
|
|
1685
1685
|
d.f |= REACTION_RAN;
|
|
1686
1686
|
var k = d.deps, I = current_batch == null ? void 0 : current_batch.is_fork;
|
|
1687
1687
|
if (new_deps !== null) {
|
|
1688
|
-
var
|
|
1688
|
+
var R;
|
|
1689
1689
|
if (I || remove_reactions(d, skipped_deps), k !== null && skipped_deps > 0)
|
|
1690
|
-
for (k.length = skipped_deps + new_deps.length,
|
|
1691
|
-
k[skipped_deps +
|
|
1690
|
+
for (k.length = skipped_deps + new_deps.length, R = 0; R < new_deps.length; R++)
|
|
1691
|
+
k[skipped_deps + R] = new_deps[R];
|
|
1692
1692
|
else
|
|
1693
1693
|
d.deps = k = new_deps;
|
|
1694
1694
|
if (effect_tracking() && (d.f & CONNECTED) !== 0)
|
|
1695
|
-
for (
|
|
1696
|
-
((M = k[
|
|
1695
|
+
for (R = skipped_deps; R < k.length; R++)
|
|
1696
|
+
((M = k[R]).reactions ?? (M.reactions = [])).push(d);
|
|
1697
1697
|
} else !I && k !== null && skipped_deps < k.length && (remove_reactions(d, skipped_deps), k.length = skipped_deps);
|
|
1698
1698
|
if (is_runes() && untracked_writes !== null && !untracking && k !== null && (d.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0)
|
|
1699
|
-
for (
|
|
1700
|
-
untracked_writes.length;
|
|
1699
|
+
for (R = 0; R < /** @type {Source[]} */
|
|
1700
|
+
untracked_writes.length; R++)
|
|
1701
1701
|
schedule_possible_effect_self_invalidation(
|
|
1702
|
-
untracked_writes[
|
|
1702
|
+
untracked_writes[R],
|
|
1703
1703
|
/** @type {Effect} */
|
|
1704
1704
|
d
|
|
1705
1705
|
);
|
|
1706
1706
|
if (m !== null && m !== d) {
|
|
1707
1707
|
if (read_version++, m.deps !== null)
|
|
1708
|
-
for (let
|
|
1709
|
-
m.deps[
|
|
1708
|
+
for (let A = 0; A < h; A += 1)
|
|
1709
|
+
m.deps[A].rv = read_version;
|
|
1710
1710
|
if (p !== null)
|
|
1711
|
-
for (const
|
|
1712
|
-
|
|
1711
|
+
for (const A of p)
|
|
1712
|
+
A.rv = read_version;
|
|
1713
1713
|
untracked_writes !== null && (g === null ? g = untracked_writes : g.push(.../** @type {Source[]} */
|
|
1714
1714
|
untracked_writes));
|
|
1715
1715
|
}
|
|
1716
1716
|
return (d.f & ERROR_VALUE) !== 0 && (d.f ^= ERROR_VALUE), S;
|
|
1717
|
-
} catch (
|
|
1718
|
-
return handle_error(
|
|
1717
|
+
} catch (A) {
|
|
1718
|
+
return handle_error(A);
|
|
1719
1719
|
} finally {
|
|
1720
1720
|
d.f ^= REACTION_IS_UPDATING, new_deps = p, skipped_deps = h, untracked_writes = g, active_reaction = m, current_sources = _, set_component_context(b), untracking = y, update_version = w;
|
|
1721
1721
|
}
|
|
@@ -1865,11 +1865,11 @@ function delegate(d) {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
let last_propagated_event = null;
|
|
1867
1867
|
function handle_event_propagation(d) {
|
|
1868
|
-
var
|
|
1868
|
+
var A, C;
|
|
1869
1869
|
var p = this, h = (
|
|
1870
1870
|
/** @type {Node} */
|
|
1871
1871
|
p.ownerDocument
|
|
1872
|
-
), g = d.type, m = ((
|
|
1872
|
+
), g = d.type, m = ((A = d.composedPath) == null ? void 0 : A.call(d)) || [], _ = (
|
|
1873
1873
|
/** @type {null | Element} */
|
|
1874
1874
|
m[0] || d.target
|
|
1875
1875
|
);
|
|
@@ -1899,7 +1899,7 @@ function handle_event_propagation(d) {
|
|
|
1899
1899
|
set_active_reaction(null), set_active_effect(null);
|
|
1900
1900
|
try {
|
|
1901
1901
|
for (var k, I = []; _ !== null; ) {
|
|
1902
|
-
var
|
|
1902
|
+
var R = _.assignedSlot || _.parentNode || /** @type {any} */
|
|
1903
1903
|
_.host || null;
|
|
1904
1904
|
try {
|
|
1905
1905
|
var M = (C = _[event_symbol]) == null ? void 0 : C[g];
|
|
@@ -1910,9 +1910,9 @@ function handle_event_propagation(d) {
|
|
|
1910
1910
|
} catch (N) {
|
|
1911
1911
|
k ? I.push(N) : k = N;
|
|
1912
1912
|
}
|
|
1913
|
-
if (d.cancelBubble ||
|
|
1913
|
+
if (d.cancelBubble || R === p || R === null)
|
|
1914
1914
|
break;
|
|
1915
|
-
_ =
|
|
1915
|
+
_ = R;
|
|
1916
1916
|
}
|
|
1917
1917
|
if (k) {
|
|
1918
1918
|
for (let N of I)
|
|
@@ -2095,12 +2095,12 @@ function _mount(d, { target: p, anchor: h, props: g = {}, events: m, context: _,
|
|
|
2095
2095
|
var I = S[k];
|
|
2096
2096
|
if (!y.has(I)) {
|
|
2097
2097
|
y.add(I);
|
|
2098
|
-
var
|
|
2098
|
+
var R = is_passive_event(I);
|
|
2099
2099
|
for (const C of [p, document]) {
|
|
2100
2100
|
var M = listeners.get(C);
|
|
2101
2101
|
M === void 0 && (M = /* @__PURE__ */ new Map(), listeners.set(C, M));
|
|
2102
|
-
var
|
|
2103
|
-
|
|
2102
|
+
var A = M.get(I);
|
|
2103
|
+
A === void 0 ? (C.addEventListener(I, handle_event_propagation, { passive: R }), M.set(I, 1)) : M.set(I, A + 1);
|
|
2104
2104
|
}
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
@@ -2133,15 +2133,15 @@ function _mount(d, { target: p, anchor: h, props: g = {}, events: m, context: _,
|
|
|
2133
2133
|
), () => {
|
|
2134
2134
|
var M;
|
|
2135
2135
|
for (var k of y)
|
|
2136
|
-
for (const
|
|
2136
|
+
for (const A of [p, document]) {
|
|
2137
2137
|
var I = (
|
|
2138
2138
|
/** @type {Map<string, number>} */
|
|
2139
|
-
listeners.get(
|
|
2140
|
-
),
|
|
2139
|
+
listeners.get(A)
|
|
2140
|
+
), R = (
|
|
2141
2141
|
/** @type {number} */
|
|
2142
2142
|
I.get(k)
|
|
2143
2143
|
);
|
|
2144
|
-
--
|
|
2144
|
+
--R == 0 ? (A.removeEventListener(k, handle_event_propagation), I.delete(k), I.size === 0 && listeners.delete(A)) : I.set(k, R);
|
|
2145
2145
|
}
|
|
2146
2146
|
root_event_handles.delete(w), S !== h && ((M = S.parentNode) == null || M.removeChild(S));
|
|
2147
2147
|
};
|
|
@@ -2161,7 +2161,7 @@ class BranchManager {
|
|
|
2161
2161
|
*/
|
|
2162
2162
|
constructor(p, h = !0) {
|
|
2163
2163
|
/** @type {TemplateNode} */
|
|
2164
|
-
|
|
2164
|
+
Ce(this, "anchor");
|
|
2165
2165
|
/** @type {Map<Batch, Key>} */
|
|
2166
2166
|
De(this, $t, /* @__PURE__ */ new Map());
|
|
2167
2167
|
/**
|
|
@@ -2380,8 +2380,8 @@ function each(d, p, h, g, m, _ = null) {
|
|
|
2380
2380
|
var C = h();
|
|
2381
2381
|
return is_array(C) ? C : C == null ? [] : array_from(C);
|
|
2382
2382
|
}), k, I = !0;
|
|
2383
|
-
function
|
|
2384
|
-
|
|
2383
|
+
function R() {
|
|
2384
|
+
A.fallback = E, reconcile(A, k, b, p, g), E !== null && (k.length === 0 ? (E.f & EFFECT_OFFSCREEN) === 0 ? resume_effect(E) : (E.f ^= EFFECT_OFFSCREEN, move(E, null, b)) : pause_effect(E, () => {
|
|
2385
2385
|
E = null;
|
|
2386
2386
|
}));
|
|
2387
2387
|
}
|
|
@@ -2417,12 +2417,12 @@ function each(d, p, h, g, m, _ = null) {
|
|
|
2417
2417
|
if (j) {
|
|
2418
2418
|
for (const [ce, se] of y)
|
|
2419
2419
|
O.has(ce) || F.skip_effect(se.e);
|
|
2420
|
-
F.oncommit(
|
|
2420
|
+
F.oncommit(R), F.ondiscard(() => {
|
|
2421
2421
|
});
|
|
2422
2422
|
} else
|
|
2423
|
-
|
|
2423
|
+
R();
|
|
2424
2424
|
N && set_hydrating(!0), get(S);
|
|
2425
|
-
}),
|
|
2425
|
+
}), A = { effect: M, items: y, outrogroups: null, fallback: E };
|
|
2426
2426
|
I = !1, hydrating && (b = hydrate_node);
|
|
2427
2427
|
}
|
|
2428
2428
|
function skip_to_branch(d) {
|
|
@@ -2431,27 +2431,27 @@ function skip_to_branch(d) {
|
|
|
2431
2431
|
return d;
|
|
2432
2432
|
}
|
|
2433
2433
|
function reconcile(d, p, h, g, m) {
|
|
2434
|
-
var oe, ce, se, ye, ve,
|
|
2435
|
-
var _ = (g & EACH_IS_ANIMATED) !== 0, b = p.length, y = d.items, w = skip_to_branch(d.effect.first), x, E = null, S, k = [], I = [],
|
|
2434
|
+
var oe, ce, se, ye, ve, Re, Ee, me, Se;
|
|
2435
|
+
var _ = (g & EACH_IS_ANIMATED) !== 0, b = p.length, y = d.items, w = skip_to_branch(d.effect.first), x, E = null, S, k = [], I = [], R, M, A, C;
|
|
2436
2436
|
if (_)
|
|
2437
2437
|
for (C = 0; C < b; C += 1)
|
|
2438
|
-
|
|
2439
|
-
y.get(M).e, (
|
|
2438
|
+
R = p[C], M = m(R, C), A = /** @type {EachItem} */
|
|
2439
|
+
y.get(M).e, (A.f & EFFECT_OFFSCREEN) === 0 && ((ce = (oe = A.nodes) == null ? void 0 : oe.a) == null || ce.measure(), (S ?? (S = /* @__PURE__ */ new Set())).add(A));
|
|
2440
2440
|
for (C = 0; C < b; C += 1) {
|
|
2441
|
-
if (
|
|
2441
|
+
if (R = p[C], M = m(R, C), A = /** @type {EachItem} */
|
|
2442
2442
|
y.get(M).e, d.outrogroups !== null)
|
|
2443
2443
|
for (const T of d.outrogroups)
|
|
2444
|
-
T.pending.delete(
|
|
2445
|
-
if ((
|
|
2446
|
-
if (
|
|
2447
|
-
move(
|
|
2444
|
+
T.pending.delete(A), T.done.delete(A);
|
|
2445
|
+
if ((A.f & EFFECT_OFFSCREEN) !== 0)
|
|
2446
|
+
if (A.f ^= EFFECT_OFFSCREEN, A === w)
|
|
2447
|
+
move(A, null, h);
|
|
2448
2448
|
else {
|
|
2449
2449
|
var N = E ? E.next : w;
|
|
2450
|
-
|
|
2450
|
+
A === d.effect.last && (d.effect.last = A.prev), A.prev && (A.prev.next = A.next), A.next && (A.next.prev = A.prev), link(d, E, A), link(d, A, N), move(A, N, h), E = A, k = [], I = [], w = skip_to_branch(E.next);
|
|
2451
2451
|
continue;
|
|
2452
2452
|
}
|
|
2453
|
-
if ((
|
|
2454
|
-
if (x !== void 0 && x.has(
|
|
2453
|
+
if ((A.f & INERT) !== 0 && (resume_effect(A), _ && ((ye = (se = A.nodes) == null ? void 0 : se.a) == null || ye.unfix(), (S ?? (S = /* @__PURE__ */ new Set())).delete(A))), A !== w) {
|
|
2454
|
+
if (x !== void 0 && x.has(A)) {
|
|
2455
2455
|
if (k.length < I.length) {
|
|
2456
2456
|
var $ = I[0], O;
|
|
2457
2457
|
E = $.prev;
|
|
@@ -2462,15 +2462,15 @@ function reconcile(d, p, h, g, m) {
|
|
|
2462
2462
|
x.delete(I[O]);
|
|
2463
2463
|
link(d, F.prev, j.next), link(d, E, F), link(d, j, $), w = $, E = j, C -= 1, k = [], I = [];
|
|
2464
2464
|
} else
|
|
2465
|
-
x.delete(
|
|
2465
|
+
x.delete(A), move(A, w, h), link(d, A.prev, A.next), link(d, A, E === null ? d.effect.first : E.next), link(d, E, A), E = A;
|
|
2466
2466
|
continue;
|
|
2467
2467
|
}
|
|
2468
|
-
for (k = [], I = []; w !== null && w !==
|
|
2468
|
+
for (k = [], I = []; w !== null && w !== A; )
|
|
2469
2469
|
(x ?? (x = /* @__PURE__ */ new Set())).add(w), I.push(w), w = skip_to_branch(w.next);
|
|
2470
2470
|
if (w === null)
|
|
2471
2471
|
continue;
|
|
2472
2472
|
}
|
|
2473
|
-
(
|
|
2473
|
+
(A.f & EFFECT_OFFSCREEN) === 0 && k.push(A), E = A, w = skip_to_branch(A.next);
|
|
2474
2474
|
}
|
|
2475
2475
|
if (d.outrogroups !== null) {
|
|
2476
2476
|
for (const T of d.outrogroups)
|
|
@@ -2480,8 +2480,8 @@ function reconcile(d, p, h, g, m) {
|
|
|
2480
2480
|
if (w !== null || x !== void 0) {
|
|
2481
2481
|
var Y = [];
|
|
2482
2482
|
if (x !== void 0)
|
|
2483
|
-
for (
|
|
2484
|
-
(
|
|
2483
|
+
for (A of x)
|
|
2484
|
+
(A.f & INERT) === 0 && Y.push(A);
|
|
2485
2485
|
for (; w !== null; )
|
|
2486
2486
|
(w.f & INERT) === 0 && w !== d.fallback && Y.push(w), w = skip_to_branch(w.next);
|
|
2487
2487
|
var q = Y.length;
|
|
@@ -2489,7 +2489,7 @@ function reconcile(d, p, h, g, m) {
|
|
|
2489
2489
|
var de = (g & EACH_IS_CONTROLLED) !== 0 && b === 0 ? h : null;
|
|
2490
2490
|
if (_) {
|
|
2491
2491
|
for (C = 0; C < q; C += 1)
|
|
2492
|
-
(Ee = (
|
|
2492
|
+
(Ee = (Re = Y[C].nodes) == null ? void 0 : Re.a) == null || Ee.measure();
|
|
2493
2493
|
for (C = 0; C < q; C += 1)
|
|
2494
2494
|
(Se = (me = Y[C].nodes) == null ? void 0 : me.a) == null || Se.fix();
|
|
2495
2495
|
}
|
|
@@ -2499,8 +2499,8 @@ function reconcile(d, p, h, g, m) {
|
|
|
2499
2499
|
_ && queue_micro_task(() => {
|
|
2500
2500
|
var T, z;
|
|
2501
2501
|
if (S !== void 0)
|
|
2502
|
-
for (
|
|
2503
|
-
(z = (T =
|
|
2502
|
+
for (A of S)
|
|
2503
|
+
(z = (T = A.nodes) == null ? void 0 : T.a) == null || z.apply();
|
|
2504
2504
|
});
|
|
2505
2505
|
}
|
|
2506
2506
|
function create_item(d, p, h, g, m, _, b, y) {
|
|
@@ -2632,7 +2632,7 @@ function css_to_keyframe(d) {
|
|
|
2632
2632
|
}
|
|
2633
2633
|
const linear = (d) => d;
|
|
2634
2634
|
function transition(d, p, h, g) {
|
|
2635
|
-
var
|
|
2635
|
+
var A;
|
|
2636
2636
|
var m = (d & TRANSITION_GLOBAL) !== 0, _ = "both", b, y = p.inert, w = p.style.overflow, x, E;
|
|
2637
2637
|
function S() {
|
|
2638
2638
|
return without_reactive_context(() => b ?? (b = h()(p, (g == null ? void 0 : g()) ?? /** @type {P} */
|
|
@@ -2659,18 +2659,18 @@ function transition(d, p, h, g) {
|
|
|
2659
2659
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
2660
2660
|
active_effect
|
|
2661
2661
|
);
|
|
2662
|
-
if (((
|
|
2663
|
-
var
|
|
2664
|
-
if (!
|
|
2662
|
+
if (((A = I.nodes).t ?? (A.t = [])).push(k), should_intro) {
|
|
2663
|
+
var R = m;
|
|
2664
|
+
if (!R) {
|
|
2665
2665
|
for (var M = (
|
|
2666
2666
|
/** @type {Effect | null} */
|
|
2667
2667
|
I.parent
|
|
2668
2668
|
); M && (M.f & EFFECT_TRANSPARENT) !== 0; )
|
|
2669
2669
|
for (; (M = M.parent) && (M.f & BLOCK_EFFECT) === 0; )
|
|
2670
2670
|
;
|
|
2671
|
-
|
|
2671
|
+
R = !M || (M.f & REACTION_RAN) !== 0;
|
|
2672
2672
|
}
|
|
2673
|
-
|
|
2673
|
+
R && effect(() => {
|
|
2674
2674
|
untrack(() => k.in());
|
|
2675
2675
|
});
|
|
2676
2676
|
}
|
|
@@ -2681,8 +2681,8 @@ function animate(d, p, h, g, m) {
|
|
|
2681
2681
|
var b, y = !1;
|
|
2682
2682
|
return queue_micro_task(() => {
|
|
2683
2683
|
if (!y) {
|
|
2684
|
-
var
|
|
2685
|
-
b = animate(d,
|
|
2684
|
+
var A = p({ direction: _ ? "in" : "out" });
|
|
2685
|
+
b = animate(d, A, h, g, m);
|
|
2686
2686
|
}
|
|
2687
2687
|
}), {
|
|
2688
2688
|
abort: () => {
|
|
@@ -2706,12 +2706,12 @@ function animate(d, p, h, g, m) {
|
|
|
2706
2706
|
var I = css_to_keyframe(x(0, 1));
|
|
2707
2707
|
k.push(I, I);
|
|
2708
2708
|
}
|
|
2709
|
-
var
|
|
2709
|
+
var R = () => 1 - g, M = d.animate(k, { duration: w, fill: "forwards" });
|
|
2710
2710
|
return M.onfinish = () => {
|
|
2711
2711
|
M.cancel(), dispatch_event(d, _ ? "introstart" : "outrostart");
|
|
2712
|
-
var
|
|
2712
|
+
var A = (h == null ? void 0 : h.t()) ?? 1 - g;
|
|
2713
2713
|
h == null || h.abort();
|
|
2714
|
-
var C = g -
|
|
2714
|
+
var C = g - A, N = (
|
|
2715
2715
|
/** @type {number} */
|
|
2716
2716
|
p.duration * Math.abs(C)
|
|
2717
2717
|
), $ = [];
|
|
@@ -2719,24 +2719,24 @@ function animate(d, p, h, g, m) {
|
|
|
2719
2719
|
var O = !1;
|
|
2720
2720
|
if (x)
|
|
2721
2721
|
for (var F = Math.ceil(N / 16.666666666666668), j = 0; j <= F; j += 1) {
|
|
2722
|
-
var Y =
|
|
2722
|
+
var Y = A + C * S(j / F), q = css_to_keyframe(x(Y, 1 - Y));
|
|
2723
2723
|
$.push(q), O || (O = q.overflow === "hidden");
|
|
2724
2724
|
}
|
|
2725
|
-
O && (d.style.overflow = "hidden"),
|
|
2725
|
+
O && (d.style.overflow = "hidden"), R = () => {
|
|
2726
2726
|
var de = (
|
|
2727
2727
|
/** @type {number} */
|
|
2728
2728
|
/** @type {globalThis.Animation} */
|
|
2729
2729
|
M.currentTime
|
|
2730
2730
|
);
|
|
2731
|
-
return
|
|
2731
|
+
return A + C * S(de / N);
|
|
2732
2732
|
}, E && loop(() => {
|
|
2733
2733
|
if (M.playState !== "running") return !1;
|
|
2734
|
-
var de =
|
|
2734
|
+
var de = R();
|
|
2735
2735
|
return E(de, 1 - de), !0;
|
|
2736
2736
|
});
|
|
2737
2737
|
}
|
|
2738
2738
|
M = d.animate($, { duration: N, fill: "forwards" }), M.onfinish = () => {
|
|
2739
|
-
|
|
2739
|
+
R = () => g, E == null || E(g, 1 - g), m();
|
|
2740
2740
|
};
|
|
2741
2741
|
}, {
|
|
2742
2742
|
abort: () => {
|
|
@@ -2748,7 +2748,7 @@ function animate(d, p, h, g, m) {
|
|
|
2748
2748
|
reset: () => {
|
|
2749
2749
|
g === 0 && (E == null || E(1, 0));
|
|
2750
2750
|
},
|
|
2751
|
-
t: () =>
|
|
2751
|
+
t: () => R()
|
|
2752
2752
|
};
|
|
2753
2753
|
}
|
|
2754
2754
|
function append_styles(d, p) {
|
|
@@ -3021,16 +3021,16 @@ function prop(d, p, h, g) {
|
|
|
3021
3021
|
}, (h & PROPS_IS_UPDATED) === 0)
|
|
3022
3022
|
return I;
|
|
3023
3023
|
if (x) {
|
|
3024
|
-
var
|
|
3024
|
+
var R = d.$$legacy;
|
|
3025
3025
|
return (
|
|
3026
3026
|
/** @type {() => V} */
|
|
3027
3027
|
(function($, O) {
|
|
3028
|
-
return arguments.length > 0 ? ((!O ||
|
|
3028
|
+
return arguments.length > 0 ? ((!O || R || k) && x(O ? I() : $), $) : I();
|
|
3029
3029
|
})
|
|
3030
3030
|
);
|
|
3031
3031
|
}
|
|
3032
|
-
var M = !1,
|
|
3033
|
-
m && get(
|
|
3032
|
+
var M = !1, A = ((h & PROPS_IS_IMMUTABLE) !== 0 ? derived : derived_safe_equal)(() => (M = !1, I()));
|
|
3033
|
+
m && get(A);
|
|
3034
3034
|
var C = (
|
|
3035
3035
|
/** @type {Effect} */
|
|
3036
3036
|
active_effect
|
|
@@ -3039,10 +3039,10 @@ function prop(d, p, h, g) {
|
|
|
3039
3039
|
/** @type {() => V} */
|
|
3040
3040
|
(function($, O) {
|
|
3041
3041
|
if (arguments.length > 0) {
|
|
3042
|
-
const F = O ? get(
|
|
3043
|
-
return set(
|
|
3042
|
+
const F = O ? get(A) : m ? proxy($) : $;
|
|
3043
|
+
return set(A, F), M = !0, b !== void 0 && (b = F), $;
|
|
3044
3044
|
}
|
|
3045
|
-
return is_destroying_effect && M || (C.f & DESTROYED) !== 0 ?
|
|
3045
|
+
return is_destroying_effect && M || (C.f & DESTROYED) !== 0 ? A.v : get(A);
|
|
3046
3046
|
})
|
|
3047
3047
|
);
|
|
3048
3048
|
}
|
|
@@ -3140,27 +3140,27 @@ typeof HTMLElement == "function" && (SvelteElement = class extends HTMLElement {
|
|
|
3140
3140
|
constructor(p, h, g) {
|
|
3141
3141
|
super();
|
|
3142
3142
|
/** The Svelte component constructor */
|
|
3143
|
-
|
|
3143
|
+
Ce(this, "$$ctor");
|
|
3144
3144
|
/** Slots */
|
|
3145
|
-
|
|
3145
|
+
Ce(this, "$$s");
|
|
3146
3146
|
/** @type {any} The Svelte component instance */
|
|
3147
|
-
|
|
3147
|
+
Ce(this, "$$c");
|
|
3148
3148
|
/** Whether or not the custom element is connected */
|
|
3149
|
-
|
|
3149
|
+
Ce(this, "$$cn", !1);
|
|
3150
3150
|
/** @type {Record<string, any>} Component props data */
|
|
3151
|
-
|
|
3151
|
+
Ce(this, "$$d", {});
|
|
3152
3152
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
3153
|
-
|
|
3153
|
+
Ce(this, "$$r", !1);
|
|
3154
3154
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
3155
|
-
|
|
3155
|
+
Ce(this, "$$p_d", {});
|
|
3156
3156
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
3157
|
-
|
|
3157
|
+
Ce(this, "$$l", {});
|
|
3158
3158
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
3159
|
-
|
|
3159
|
+
Ce(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
3160
3160
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
3161
|
-
|
|
3161
|
+
Ce(this, "$$me");
|
|
3162
3162
|
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
3163
|
-
|
|
3163
|
+
Ce(this, "$$shadowRoot", null);
|
|
3164
3164
|
this.$$ctor = p, this.$$s = h, g && (this.$$shadowRoot = this.attachShadow(g));
|
|
3165
3165
|
}
|
|
3166
3166
|
/**
|
|
@@ -3883,6 +3883,18 @@ async function updateNote(d, p, h) {
|
|
|
3883
3883
|
return { ok: !1, error: g instanceof Error ? g.message : "Failed to update note" };
|
|
3884
3884
|
}
|
|
3885
3885
|
}
|
|
3886
|
+
async function fetchRecordingSummary(d, p, h, g) {
|
|
3887
|
+
try {
|
|
3888
|
+
const m = `${d.replace(/\/$/, "")}/api/feedback/recordings/summary`, _ = await fetch(m, {
|
|
3889
|
+
method: "POST",
|
|
3890
|
+
headers: { "Content-Type": "application/json" },
|
|
3891
|
+
body: JSON.stringify({ recording_url: p, console_logs: h, network_requests: g })
|
|
3892
|
+
}), b = await _.json();
|
|
3893
|
+
return _.ok ? { ok: !0, summary: b.summary } : { ok: !1, error: b.error || `HTTP ${_.status}` };
|
|
3894
|
+
} catch (m) {
|
|
3895
|
+
return { ok: !1, error: m instanceof Error ? m.message : "Failed to fetch recording summary" };
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3886
3898
|
async function deleteNote(d, p) {
|
|
3887
3899
|
try {
|
|
3888
3900
|
const h = await fetch(`${notesUrl(d)}/${p}`, { method: "DELETE" }), g = await h.json();
|
|
@@ -4036,12 +4048,12 @@ function loadMedia(d, p) {
|
|
|
4036
4048
|
return y.poster ? loadMedia(y.poster, p).then(h) : E();
|
|
4037
4049
|
if (y.readyState >= 2)
|
|
4038
4050
|
return E();
|
|
4039
|
-
const k = E, I = (
|
|
4051
|
+
const k = E, I = (R) => {
|
|
4040
4052
|
b == null || b(
|
|
4041
4053
|
"Failed video load",
|
|
4042
4054
|
S,
|
|
4043
|
-
|
|
4044
|
-
), _ == null || _(
|
|
4055
|
+
R
|
|
4056
|
+
), _ == null || _(R), E();
|
|
4045
4057
|
};
|
|
4046
4058
|
x = () => {
|
|
4047
4059
|
y.removeEventListener("loadeddata", k), y.removeEventListener("error", I);
|
|
@@ -4054,19 +4066,19 @@ function loadMedia(d, p) {
|
|
|
4054
4066
|
if (isImageElement(y) && "decode" in y)
|
|
4055
4067
|
try {
|
|
4056
4068
|
await y.decode();
|
|
4057
|
-
} catch (
|
|
4069
|
+
} catch (R) {
|
|
4058
4070
|
b == null || b(
|
|
4059
4071
|
"Failed to decode image, trying to render anyway",
|
|
4060
4072
|
y.dataset.originalSrc || S,
|
|
4061
|
-
|
|
4073
|
+
R
|
|
4062
4074
|
);
|
|
4063
4075
|
}
|
|
4064
4076
|
E();
|
|
4065
|
-
}, I = (
|
|
4077
|
+
}, I = (R) => {
|
|
4066
4078
|
b == null || b(
|
|
4067
4079
|
"Failed image load",
|
|
4068
4080
|
y.dataset.originalSrc || S,
|
|
4069
|
-
|
|
4081
|
+
R
|
|
4070
4082
|
), E();
|
|
4071
4083
|
};
|
|
4072
4084
|
if (isImageElement(y) && y.complete)
|
|
@@ -4110,7 +4122,7 @@ async function orCreateContext(d, p) {
|
|
|
4110
4122
|
return isContext(d) ? d : createContext(d, { ...p, autoDestruct: !0 });
|
|
4111
4123
|
}
|
|
4112
4124
|
async function createContext(d, p) {
|
|
4113
|
-
var I,
|
|
4125
|
+
var I, R;
|
|
4114
4126
|
const { scale: h = 1, workerUrl: g, workerNumber: m = 1 } = p || {}, _ = !!(p != null && p.debug), b = (p == null ? void 0 : p.features) ?? !0, y = d.ownerDocument ?? (IN_BROWSER ? window.document : void 0), w = ((I = d.ownerDocument) == null ? void 0 : I.defaultView) ?? (IN_BROWSER ? window : void 0), x = /* @__PURE__ */ new Map(), E = {
|
|
4115
4127
|
// Options
|
|
4116
4128
|
width: 0,
|
|
@@ -4126,7 +4138,7 @@ async function createContext(d, p) {
|
|
|
4126
4138
|
progress: null,
|
|
4127
4139
|
debug: _,
|
|
4128
4140
|
fetch: {
|
|
4129
|
-
requestInit: getDefaultRequestInit((
|
|
4141
|
+
requestInit: getDefaultRequestInit((R = p == null ? void 0 : p.fetch) == null ? void 0 : R.bypassingCache),
|
|
4130
4142
|
placeholderImage: "data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
4131
4143
|
bypassingCache: !1,
|
|
4132
4144
|
...p == null ? void 0 : p.fetch
|
|
@@ -4161,13 +4173,13 @@ async function createContext(d, p) {
|
|
|
4161
4173
|
].map(() => {
|
|
4162
4174
|
try {
|
|
4163
4175
|
const M = new Worker(g);
|
|
4164
|
-
return M.onmessage = async (
|
|
4176
|
+
return M.onmessage = async (A) => {
|
|
4165
4177
|
var $, O, F, j;
|
|
4166
|
-
const { url: C, result: N } =
|
|
4178
|
+
const { url: C, result: N } = A.data;
|
|
4167
4179
|
N ? (O = ($ = x.get(C)) == null ? void 0 : $.resolve) == null || O.call($, N) : (j = (F = x.get(C)) == null ? void 0 : F.reject) == null || j.call(F, new Error(`Error receiving message from worker: ${C}`));
|
|
4168
|
-
}, M.onmessageerror = (
|
|
4180
|
+
}, M.onmessageerror = (A) => {
|
|
4169
4181
|
var N, $;
|
|
4170
|
-
const { url: C } =
|
|
4182
|
+
const { url: C } = A.data;
|
|
4171
4183
|
($ = (N = x.get(C)) == null ? void 0 : N.reject) == null || $.call(N, new Error(`Error receiving message from worker: ${C}`));
|
|
4172
4184
|
}, M;
|
|
4173
4185
|
} catch (M) {
|
|
@@ -4329,7 +4341,7 @@ function getDefaultStyle(d, p, h) {
|
|
|
4329
4341
|
const { defaultComputedStyles: g } = h, m = d.nodeName.toLowerCase(), _ = isSVGElementNode(d) && m !== "svg", b = _ ? includedAttributes.map((M) => [M, d.getAttribute(M)]).filter(([, M]) => M !== null) : [], y = [
|
|
4330
4342
|
_ && "svg",
|
|
4331
4343
|
m,
|
|
4332
|
-
b.map((M,
|
|
4344
|
+
b.map((M, A) => `${M}=${A}`).join(","),
|
|
4333
4345
|
p
|
|
4334
4346
|
].filter(Boolean).join(":");
|
|
4335
4347
|
if (g.has(y))
|
|
@@ -4339,15 +4351,15 @@ function getDefaultStyle(d, p, h) {
|
|
|
4339
4351
|
return /* @__PURE__ */ new Map();
|
|
4340
4352
|
const E = x == null ? void 0 : x.document;
|
|
4341
4353
|
let S, k;
|
|
4342
|
-
_ ? (S = E.createElementNS(XMLNS, "svg"), k = S.ownerDocument.createElementNS(S.namespaceURI, m), b.forEach(([M,
|
|
4343
|
-
k.setAttributeNS(null, M,
|
|
4354
|
+
_ ? (S = E.createElementNS(XMLNS, "svg"), k = S.ownerDocument.createElementNS(S.namespaceURI, m), b.forEach(([M, A]) => {
|
|
4355
|
+
k.setAttributeNS(null, M, A);
|
|
4344
4356
|
}), S.appendChild(k)) : S = k = E.createElement(m), k.textContent = " ", E.body.appendChild(S);
|
|
4345
|
-
const I = x.getComputedStyle(k, p),
|
|
4346
|
-
for (let M = I.length,
|
|
4347
|
-
const C = I.item(
|
|
4348
|
-
ignoredStyles.includes(C) ||
|
|
4357
|
+
const I = x.getComputedStyle(k, p), R = /* @__PURE__ */ new Map();
|
|
4358
|
+
for (let M = I.length, A = 0; A < M; A++) {
|
|
4359
|
+
const C = I.item(A);
|
|
4360
|
+
ignoredStyles.includes(C) || R.set(C, I.getPropertyValue(C));
|
|
4349
4361
|
}
|
|
4350
|
-
return E.body.removeChild(S), g.set(y,
|
|
4362
|
+
return E.body.removeChild(S), g.set(y, R), R;
|
|
4351
4363
|
}
|
|
4352
4364
|
function getDiffStyle(d, p, h) {
|
|
4353
4365
|
var y;
|
|
@@ -4373,17 +4385,17 @@ function getDiffStyle(d, p, h) {
|
|
|
4373
4385
|
return g;
|
|
4374
4386
|
}
|
|
4375
4387
|
function copyCssStyles(d, p, h, g) {
|
|
4376
|
-
var S, k, I,
|
|
4388
|
+
var S, k, I, R;
|
|
4377
4389
|
const { ownerWindow: m, includeStyleProperties: _, currentParentNodeStyle: b } = g, y = p.style, w = m.getComputedStyle(d), x = getDefaultStyle(d, null, g);
|
|
4378
|
-
b == null || b.forEach((M,
|
|
4379
|
-
x.delete(
|
|
4390
|
+
b == null || b.forEach((M, A) => {
|
|
4391
|
+
x.delete(A);
|
|
4380
4392
|
});
|
|
4381
4393
|
const E = getDiffStyle(w, x, _);
|
|
4382
|
-
E.delete("transition-property"), E.delete("all"), E.delete("d"), E.delete("content"), h && (E.delete("margin-top"), E.delete("margin-right"), E.delete("margin-bottom"), E.delete("margin-left"), E.delete("margin-block-start"), E.delete("margin-block-end"), E.delete("margin-inline-start"), E.delete("margin-inline-end"), E.set("box-sizing", ["border-box", ""])), ((S = E.get("background-clip")) == null ? void 0 : S[0]) === "text" && p.classList.add("______background-clip--text"), IN_CHROME && (E.has("font-kerning") || E.set("font-kerning", ["normal", ""]), (((k = E.get("overflow-x")) == null ? void 0 : k[0]) === "hidden" || ((I = E.get("overflow-y")) == null ? void 0 : I[0]) === "hidden") && ((
|
|
4383
|
-
for (let M = y.length,
|
|
4384
|
-
y.removeProperty(y.item(
|
|
4385
|
-
return E.forEach(([M,
|
|
4386
|
-
y.setProperty(C, M,
|
|
4394
|
+
E.delete("transition-property"), E.delete("all"), E.delete("d"), E.delete("content"), h && (E.delete("margin-top"), E.delete("margin-right"), E.delete("margin-bottom"), E.delete("margin-left"), E.delete("margin-block-start"), E.delete("margin-block-end"), E.delete("margin-inline-start"), E.delete("margin-inline-end"), E.set("box-sizing", ["border-box", ""])), ((S = E.get("background-clip")) == null ? void 0 : S[0]) === "text" && p.classList.add("______background-clip--text"), IN_CHROME && (E.has("font-kerning") || E.set("font-kerning", ["normal", ""]), (((k = E.get("overflow-x")) == null ? void 0 : k[0]) === "hidden" || ((I = E.get("overflow-y")) == null ? void 0 : I[0]) === "hidden") && ((R = E.get("text-overflow")) == null ? void 0 : R[0]) === "ellipsis" && d.scrollWidth === d.clientWidth && E.set("text-overflow", ["clip", ""]));
|
|
4395
|
+
for (let M = y.length, A = 0; A < M; A++)
|
|
4396
|
+
y.removeProperty(y.item(A));
|
|
4397
|
+
return E.forEach(([M, A], C) => {
|
|
4398
|
+
y.setProperty(C, M, A);
|
|
4387
4399
|
}), E;
|
|
4388
4400
|
}
|
|
4389
4401
|
function copyInputValue(d, p) {
|
|
@@ -4415,18 +4427,18 @@ function copyPseudoClass(d, p, h, g, m) {
|
|
|
4415
4427
|
if (!k || k === "none")
|
|
4416
4428
|
return;
|
|
4417
4429
|
m == null || m(k), k = k.replace(/(')|(")|(counter\(.+\))/g, "");
|
|
4418
|
-
const I = [uuid$1()],
|
|
4430
|
+
const I = [uuid$1()], R = getDefaultStyle(d, E, g);
|
|
4419
4431
|
w == null || w.forEach((O, F) => {
|
|
4420
|
-
|
|
4432
|
+
R.delete(F);
|
|
4421
4433
|
});
|
|
4422
|
-
const M = getDiffStyle(S,
|
|
4434
|
+
const M = getDiffStyle(S, R, g.includeStyleProperties);
|
|
4423
4435
|
M.delete("content"), M.delete("-webkit-locale"), (($ = M.get("background-clip")) == null ? void 0 : $[0]) === "text" && p.classList.add("______background-clip--text");
|
|
4424
|
-
const
|
|
4436
|
+
const A = [
|
|
4425
4437
|
`content: '${k}';`
|
|
4426
4438
|
];
|
|
4427
4439
|
if (M.forEach(([O, F], j) => {
|
|
4428
|
-
|
|
4429
|
-
}),
|
|
4440
|
+
A.push(`${j}: ${O}${F ? " !important" : ""};`);
|
|
4441
|
+
}), A.length === 1)
|
|
4430
4442
|
return;
|
|
4431
4443
|
try {
|
|
4432
4444
|
p.className = [p.className, ...I].join(" ");
|
|
@@ -4434,7 +4446,7 @@ function copyPseudoClass(d, p, h, g, m) {
|
|
|
4434
4446
|
g.log.warn("Failed to copyPseudoClass", O);
|
|
4435
4447
|
return;
|
|
4436
4448
|
}
|
|
4437
|
-
const C =
|
|
4449
|
+
const C = A.join(`
|
|
4438
4450
|
`);
|
|
4439
4451
|
let N = y.get(C);
|
|
4440
4452
|
N || (N = [], y.set(C, N)), N.push(`.${I[0]}${E}`);
|
|
@@ -4494,18 +4506,18 @@ async function cloneNode(d, p, h = !1, g) {
|
|
|
4494
4506
|
NORMAL_ATTRIBUTE_RE.test(j) || I.removeAttribute(j);
|
|
4495
4507
|
}
|
|
4496
4508
|
}
|
|
4497
|
-
const
|
|
4509
|
+
const R = p.currentNodeStyle = copyCssStyles(d, I, h, p);
|
|
4498
4510
|
h && applyCssStyleWithOptions(I, p);
|
|
4499
4511
|
let M = !1;
|
|
4500
4512
|
if (p.isEnable("copyScrollbar")) {
|
|
4501
4513
|
const $ = [
|
|
4502
|
-
(x =
|
|
4503
|
-
(E =
|
|
4514
|
+
(x = R.get("overflow-x")) == null ? void 0 : x[0],
|
|
4515
|
+
(E = R.get("overflow-y")) == null ? void 0 : E[0]
|
|
4504
4516
|
];
|
|
4505
4517
|
M = $.includes("scroll") || ($.includes("auto") || $.includes("overlay")) && (d.scrollHeight > d.clientHeight || d.scrollWidth > d.clientWidth);
|
|
4506
4518
|
}
|
|
4507
|
-
const
|
|
4508
|
-
|
|
4519
|
+
const A = (S = R.get("text-transform")) == null ? void 0 : S[0], C = splitFontFamily((k = R.get("font-family")) == null ? void 0 : k[0]), N = C ? ($) => {
|
|
4520
|
+
A === "uppercase" ? $ = $.toUpperCase() : A === "lowercase" ? $ = $.toLowerCase() : A === "capitalize" && ($ = $[0].toUpperCase() + $.substring(1)), C.forEach((O) => {
|
|
4509
4521
|
let F = b.get(O);
|
|
4510
4522
|
F || b.set(O, F = /* @__PURE__ */ new Set()), $.split("").forEach((j) => F.add(j));
|
|
4511
4523
|
});
|
|
@@ -4566,17 +4578,17 @@ function contextFetch(d, p) {
|
|
|
4566
4578
|
bypassingCache: k,
|
|
4567
4579
|
placeholderImage: I
|
|
4568
4580
|
},
|
|
4569
|
-
font:
|
|
4581
|
+
font: R,
|
|
4570
4582
|
workers: M,
|
|
4571
|
-
fontFamilies:
|
|
4583
|
+
fontFamilies: A
|
|
4572
4584
|
} = d;
|
|
4573
4585
|
g === "image" && (IN_SAFARI || IN_FIREFOX) && d.drawImageCount++;
|
|
4574
4586
|
let C = x.get(h);
|
|
4575
4587
|
if (!C) {
|
|
4576
4588
|
k && k instanceof RegExp && k.test(b) && (b += (/\?/.test(b) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
4577
|
-
const N = g.startsWith("font") &&
|
|
4589
|
+
const N = g.startsWith("font") && R && R.minify, $ = /* @__PURE__ */ new Set();
|
|
4578
4590
|
N && g.split(";")[1].split(",").forEach((Y) => {
|
|
4579
|
-
|
|
4591
|
+
A.has(Y) && A.get(Y).forEach((q) => $.add(q));
|
|
4580
4592
|
});
|
|
4581
4593
|
const O = N && $.size, F = {
|
|
4582
4594
|
url: b,
|
|
@@ -4745,22 +4757,22 @@ async function embedWebFont(d, p) {
|
|
|
4745
4757
|
w.flatMap((E) => Array.from(E.cssRules).map(async (S, k) => {
|
|
4746
4758
|
if (isCSSImportRule$1(S)) {
|
|
4747
4759
|
let I = k + 1;
|
|
4748
|
-
const
|
|
4760
|
+
const R = S.href;
|
|
4749
4761
|
let M = "";
|
|
4750
4762
|
try {
|
|
4751
4763
|
M = await contextFetch(p, {
|
|
4752
|
-
url:
|
|
4764
|
+
url: R,
|
|
4753
4765
|
requestType: "text",
|
|
4754
4766
|
responseType: "text"
|
|
4755
4767
|
});
|
|
4756
4768
|
} catch (C) {
|
|
4757
|
-
p.log.warn(`Error fetch remote css import from ${
|
|
4769
|
+
p.log.warn(`Error fetch remote css import from ${R}`, C);
|
|
4758
4770
|
}
|
|
4759
|
-
const
|
|
4771
|
+
const A = M.replace(
|
|
4760
4772
|
URL_RE,
|
|
4761
|
-
(C, N, $) => C.replace($, resolveUrl($,
|
|
4773
|
+
(C, N, $) => C.replace($, resolveUrl($, R))
|
|
4762
4774
|
);
|
|
4763
|
-
for (const C of parseCss(
|
|
4775
|
+
for (const C of parseCss(A))
|
|
4764
4776
|
try {
|
|
4765
4777
|
E.insertRule(
|
|
4766
4778
|
C,
|
|
@@ -4858,7 +4870,7 @@ async function domToForeignObjectSvg(d, p) {
|
|
|
4858
4870
|
autoDestruct: S,
|
|
4859
4871
|
onCloneNode: k,
|
|
4860
4872
|
onEmbedNode: I,
|
|
4861
|
-
onCreateForeignObjectSvg:
|
|
4873
|
+
onCreateForeignObjectSvg: R
|
|
4862
4874
|
} = h;
|
|
4863
4875
|
m.time("clone node");
|
|
4864
4876
|
const M = await cloneNode(h.node, h, !0);
|
|
@@ -4873,7 +4885,7 @@ async function domToForeignObjectSvg(d, p) {
|
|
|
4873
4885
|
}), b.appendChild(g.createTextNode(O));
|
|
4874
4886
|
}
|
|
4875
4887
|
m.timeEnd("clone node"), await (k == null ? void 0 : k(M)), x !== !1 && isElementNode(M) && (m.time("embed web font"), await embedWebFont(M, h), m.timeEnd("embed web font")), m.time("embed node"), embedNode(M, h);
|
|
4876
|
-
const
|
|
4888
|
+
const A = _.length;
|
|
4877
4889
|
let C = 0;
|
|
4878
4890
|
const N = async () => {
|
|
4879
4891
|
for (; ; ) {
|
|
@@ -4885,12 +4897,12 @@ async function domToForeignObjectSvg(d, p) {
|
|
|
4885
4897
|
} catch (F) {
|
|
4886
4898
|
h.log.warn("Failed to run task", F);
|
|
4887
4899
|
}
|
|
4888
|
-
E == null || E(++C,
|
|
4900
|
+
E == null || E(++C, A);
|
|
4889
4901
|
}
|
|
4890
4902
|
};
|
|
4891
|
-
E == null || E(C,
|
|
4903
|
+
E == null || E(C, A), await Promise.all([...Array.from({ length: 4 })].map(N)), m.timeEnd("embed node"), await (I == null ? void 0 : I(M));
|
|
4892
4904
|
const $ = createForeignObjectSvg(M, h);
|
|
4893
|
-
return y && $.insertBefore(y, $.children[0]), b && $.insertBefore(b, $.children[0]), S && destroyContext(h), await (
|
|
4905
|
+
return y && $.insertBefore(y, $.children[0]), b && $.insertBefore(b, $.children[0]), S && destroyContext(h), await (R == null ? void 0 : R($)), $;
|
|
4894
4906
|
}
|
|
4895
4907
|
function createForeignObjectSvg(d, p) {
|
|
4896
4908
|
const { width: h, height: g } = p, m = createSvg(h, g, d.ownerDocument), _ = m.ownerDocument.createElementNS(m.namespaceURI, "foreignObject");
|
|
@@ -5126,8 +5138,8 @@ function absoluteToStylesheet(d, p) {
|
|
|
5126
5138
|
var E = p.split("/"), S = w.split("/");
|
|
5127
5139
|
E.pop();
|
|
5128
5140
|
for (var k = 0, I = S; k < I.length; k++) {
|
|
5129
|
-
var
|
|
5130
|
-
|
|
5141
|
+
var R = I[k];
|
|
5142
|
+
R !== "." && (R === ".." ? E.pop() : E.push(R));
|
|
5131
5143
|
}
|
|
5132
5144
|
return "url(".concat(x).concat(E.join("/")).concat(x, ")");
|
|
5133
5145
|
});
|
|
@@ -5257,7 +5269,7 @@ function onceStylesheetLoaded(d, p, h) {
|
|
|
5257
5269
|
}
|
|
5258
5270
|
}
|
|
5259
5271
|
function serializeNode(d, p) {
|
|
5260
|
-
var h = p.doc, g = p.mirror, m = p.blockClass, _ = p.blockSelector, b = p.maskTextClass, y = p.maskTextSelector, w = p.inlineStylesheet, x = p.maskInputOptions, E = x === void 0 ? {} : x, S = p.maskTextFn, k = p.maskInputFn, I = p.dataURLOptions,
|
|
5272
|
+
var h = p.doc, g = p.mirror, m = p.blockClass, _ = p.blockSelector, b = p.maskTextClass, y = p.maskTextSelector, w = p.inlineStylesheet, x = p.maskInputOptions, E = x === void 0 ? {} : x, S = p.maskTextFn, k = p.maskInputFn, I = p.dataURLOptions, R = I === void 0 ? {} : I, M = p.inlineImages, A = p.recordCanvas, C = p.keepIframeSrcFn, N = p.newlyAddedElement, $ = N === void 0 ? !1 : N, O = getRootId(h, g);
|
|
5261
5273
|
switch (d.nodeType) {
|
|
5262
5274
|
case d.DOCUMENT_NODE:
|
|
5263
5275
|
return d.compatMode !== "CSS1Compat" ? {
|
|
@@ -5284,9 +5296,9 @@ function serializeNode(d, p) {
|
|
|
5284
5296
|
inlineStylesheet: w,
|
|
5285
5297
|
maskInputOptions: E,
|
|
5286
5298
|
maskInputFn: k,
|
|
5287
|
-
dataURLOptions:
|
|
5299
|
+
dataURLOptions: R,
|
|
5288
5300
|
inlineImages: M,
|
|
5289
|
-
recordCanvas:
|
|
5301
|
+
recordCanvas: A,
|
|
5290
5302
|
keepIframeSrcFn: C,
|
|
5291
5303
|
newlyAddedElement: $,
|
|
5292
5304
|
rootId: O
|
|
@@ -5338,7 +5350,7 @@ function serializeTextNode(d, p) {
|
|
|
5338
5350
|
};
|
|
5339
5351
|
}
|
|
5340
5352
|
function serializeElementNode(d, p) {
|
|
5341
|
-
for (var h = p.doc, g = p.blockClass, m = p.blockSelector, _ = p.inlineStylesheet, b = p.maskInputOptions, y = b === void 0 ? {} : b, w = p.maskInputFn, x = p.dataURLOptions, E = x === void 0 ? {} : x, S = p.inlineImages, k = p.recordCanvas, I = p.keepIframeSrcFn,
|
|
5353
|
+
for (var h = p.doc, g = p.blockClass, m = p.blockSelector, _ = p.inlineStylesheet, b = p.maskInputOptions, y = b === void 0 ? {} : b, w = p.maskInputFn, x = p.dataURLOptions, E = x === void 0 ? {} : x, S = p.inlineImages, k = p.recordCanvas, I = p.keepIframeSrcFn, R = p.newlyAddedElement, M = R === void 0 ? !1 : R, A = p.rootId, C = _isBlockedElement(d, g, m), N = getValidTagName$1(d), $ = {}, O = d.attributes.length, F = 0; F < O; F++) {
|
|
5342
5354
|
var j = d.attributes[F];
|
|
5343
5355
|
$[j.name] = transformAttribute(h, N, j.name, j.value);
|
|
5344
5356
|
}
|
|
@@ -5374,7 +5386,7 @@ function serializeElementNode(d, p) {
|
|
|
5374
5386
|
}
|
|
5375
5387
|
if (N === "img" && S) {
|
|
5376
5388
|
canvasService || (canvasService = h.createElement("canvas"), canvasCtx = canvasService.getContext("2d"));
|
|
5377
|
-
var ve = d,
|
|
5389
|
+
var ve = d, Re = ve.crossOrigin;
|
|
5378
5390
|
ve.crossOrigin = "anonymous";
|
|
5379
5391
|
var Ee = function() {
|
|
5380
5392
|
try {
|
|
@@ -5382,7 +5394,7 @@ function serializeElementNode(d, p) {
|
|
|
5382
5394
|
} catch (z) {
|
|
5383
5395
|
console.warn("Cannot inline img src=".concat(ve.currentSrc, "! Error: ").concat(z));
|
|
5384
5396
|
}
|
|
5385
|
-
|
|
5397
|
+
Re ? $.crossOrigin = Re : ve.removeAttribute("crossorigin");
|
|
5386
5398
|
};
|
|
5387
5399
|
ve.complete && ve.naturalWidth !== 0 ? Ee() : ve.onload = Ee;
|
|
5388
5400
|
}
|
|
@@ -5401,7 +5413,7 @@ function serializeElementNode(d, p) {
|
|
|
5401
5413
|
childNodes: [],
|
|
5402
5414
|
isSVG: isSVGElement(d) || void 0,
|
|
5403
5415
|
needBlock: C,
|
|
5404
|
-
rootId:
|
|
5416
|
+
rootId: A
|
|
5405
5417
|
};
|
|
5406
5418
|
}
|
|
5407
5419
|
function lowerIfExists(d) {
|
|
@@ -5433,7 +5445,7 @@ function slimDOMExcluded(d, p) {
|
|
|
5433
5445
|
return !1;
|
|
5434
5446
|
}
|
|
5435
5447
|
function serializeNodeWithId(d, p) {
|
|
5436
|
-
var h = p.doc, g = p.mirror, m = p.blockClass, _ = p.blockSelector, b = p.maskTextClass, y = p.maskTextSelector, w = p.skipChild, x = w === void 0 ? !1 : w, E = p.inlineStylesheet, S = E === void 0 ? !0 : E, k = p.maskInputOptions, I = k === void 0 ? {} : k,
|
|
5448
|
+
var h = p.doc, g = p.mirror, m = p.blockClass, _ = p.blockSelector, b = p.maskTextClass, y = p.maskTextSelector, w = p.skipChild, x = w === void 0 ? !1 : w, E = p.inlineStylesheet, S = E === void 0 ? !0 : E, k = p.maskInputOptions, I = k === void 0 ? {} : k, R = p.maskTextFn, M = p.maskInputFn, A = p.slimDOMOptions, C = p.dataURLOptions, N = C === void 0 ? {} : C, $ = p.inlineImages, O = $ === void 0 ? !1 : $, F = p.recordCanvas, j = F === void 0 ? !1 : F, Y = p.onSerialize, q = p.onIframeLoad, de = p.iframeLoadTimeout, oe = de === void 0 ? 5e3 : de, ce = p.onStylesheetLoad, se = p.stylesheetLoadTimeout, ye = se === void 0 ? 5e3 : se, ve = p.keepIframeSrcFn, Re = ve === void 0 ? function() {
|
|
5437
5449
|
return !1;
|
|
5438
5450
|
} : ve, Ee = p.newlyAddedElement, me = Ee === void 0 ? !1 : Ee, Se = p.preserveWhiteSpace, T = Se === void 0 ? !0 : Se, z = serializeNode(d, {
|
|
5439
5451
|
doc: h,
|
|
@@ -5444,18 +5456,18 @@ function serializeNodeWithId(d, p) {
|
|
|
5444
5456
|
maskTextSelector: y,
|
|
5445
5457
|
inlineStylesheet: S,
|
|
5446
5458
|
maskInputOptions: I,
|
|
5447
|
-
maskTextFn:
|
|
5459
|
+
maskTextFn: R,
|
|
5448
5460
|
maskInputFn: M,
|
|
5449
5461
|
dataURLOptions: N,
|
|
5450
5462
|
inlineImages: O,
|
|
5451
5463
|
recordCanvas: j,
|
|
5452
|
-
keepIframeSrcFn:
|
|
5464
|
+
keepIframeSrcFn: Re,
|
|
5453
5465
|
newlyAddedElement: me
|
|
5454
5466
|
});
|
|
5455
5467
|
if (!z)
|
|
5456
5468
|
return console.warn(d, "not serialized"), null;
|
|
5457
5469
|
var L;
|
|
5458
|
-
g.hasNode(d) ? L = g.getId(d) : slimDOMExcluded(z,
|
|
5470
|
+
g.hasNode(d) ? L = g.getId(d) : slimDOMExcluded(z, A) || !T && z.type === NodeType$2.Text && !z.isStyle && !z.textContent.replace(/^\s+|\s+$/gm, "").length ? L = IGNORED_NODE : L = genId();
|
|
5459
5471
|
var P = Object.assign(z, { id: L });
|
|
5460
5472
|
if (g.add(d, P), L === IGNORED_NODE)
|
|
5461
5473
|
return null;
|
|
@@ -5467,7 +5479,7 @@ function serializeNodeWithId(d, p) {
|
|
|
5467
5479
|
W && isNativeShadowDom(W) && (P.isShadowHost = !0);
|
|
5468
5480
|
}
|
|
5469
5481
|
if ((P.type === NodeType$2.Document || P.type === NodeType$2.Element) && G) {
|
|
5470
|
-
|
|
5482
|
+
A.headWhitespace && P.type === NodeType$2.Element && P.tagName === "head" && (T = !1);
|
|
5471
5483
|
for (var ie = {
|
|
5472
5484
|
doc: h,
|
|
5473
5485
|
mirror: g,
|
|
@@ -5478,9 +5490,9 @@ function serializeNodeWithId(d, p) {
|
|
|
5478
5490
|
skipChild: x,
|
|
5479
5491
|
inlineStylesheet: S,
|
|
5480
5492
|
maskInputOptions: I,
|
|
5481
|
-
maskTextFn:
|
|
5493
|
+
maskTextFn: R,
|
|
5482
5494
|
maskInputFn: M,
|
|
5483
|
-
slimDOMOptions:
|
|
5495
|
+
slimDOMOptions: A,
|
|
5484
5496
|
dataURLOptions: N,
|
|
5485
5497
|
inlineImages: O,
|
|
5486
5498
|
recordCanvas: j,
|
|
@@ -5490,7 +5502,7 @@ function serializeNodeWithId(d, p) {
|
|
|
5490
5502
|
iframeLoadTimeout: oe,
|
|
5491
5503
|
onStylesheetLoad: ce,
|
|
5492
5504
|
stylesheetLoadTimeout: ye,
|
|
5493
|
-
keepIframeSrcFn:
|
|
5505
|
+
keepIframeSrcFn: Re
|
|
5494
5506
|
}, J = 0, ne = Array.from(d.childNodes); J < ne.length; J++) {
|
|
5495
5507
|
var ge = ne[J], ee = serializeNodeWithId(ge, ie);
|
|
5496
5508
|
ee && P.childNodes.push(ee);
|
|
@@ -5514,9 +5526,9 @@ function serializeNodeWithId(d, p) {
|
|
|
5514
5526
|
skipChild: !1,
|
|
5515
5527
|
inlineStylesheet: S,
|
|
5516
5528
|
maskInputOptions: I,
|
|
5517
|
-
maskTextFn:
|
|
5529
|
+
maskTextFn: R,
|
|
5518
5530
|
maskInputFn: M,
|
|
5519
|
-
slimDOMOptions:
|
|
5531
|
+
slimDOMOptions: A,
|
|
5520
5532
|
dataURLOptions: N,
|
|
5521
5533
|
inlineImages: O,
|
|
5522
5534
|
recordCanvas: j,
|
|
@@ -5526,7 +5538,7 @@ function serializeNodeWithId(d, p) {
|
|
|
5526
5538
|
iframeLoadTimeout: oe,
|
|
5527
5539
|
onStylesheetLoad: ce,
|
|
5528
5540
|
stylesheetLoadTimeout: ye,
|
|
5529
|
-
keepIframeSrcFn:
|
|
5541
|
+
keepIframeSrcFn: Re
|
|
5530
5542
|
});
|
|
5531
5543
|
pe && q(d, pe);
|
|
5532
5544
|
}
|
|
@@ -5542,9 +5554,9 @@ function serializeNodeWithId(d, p) {
|
|
|
5542
5554
|
skipChild: !1,
|
|
5543
5555
|
inlineStylesheet: S,
|
|
5544
5556
|
maskInputOptions: I,
|
|
5545
|
-
maskTextFn:
|
|
5557
|
+
maskTextFn: R,
|
|
5546
5558
|
maskInputFn: M,
|
|
5547
|
-
slimDOMOptions:
|
|
5559
|
+
slimDOMOptions: A,
|
|
5548
5560
|
dataURLOptions: N,
|
|
5549
5561
|
inlineImages: O,
|
|
5550
5562
|
recordCanvas: j,
|
|
@@ -5554,14 +5566,14 @@ function serializeNodeWithId(d, p) {
|
|
|
5554
5566
|
iframeLoadTimeout: oe,
|
|
5555
5567
|
onStylesheetLoad: ce,
|
|
5556
5568
|
stylesheetLoadTimeout: ye,
|
|
5557
|
-
keepIframeSrcFn:
|
|
5569
|
+
keepIframeSrcFn: Re
|
|
5558
5570
|
});
|
|
5559
5571
|
K && ce(d, K);
|
|
5560
5572
|
}
|
|
5561
5573
|
}, ye), P;
|
|
5562
5574
|
}
|
|
5563
5575
|
function snapshot(d, p) {
|
|
5564
|
-
var h = p || {}, g = h.mirror, m = g === void 0 ? new Mirror$2() : g, _ = h.blockClass, b = _ === void 0 ? "rr-block" : _, y = h.blockSelector, w = y === void 0 ? null : y, x = h.maskTextClass, E = x === void 0 ? "rr-mask" : x, S = h.maskTextSelector, k = S === void 0 ? null : S, I = h.inlineStylesheet,
|
|
5576
|
+
var h = p || {}, g = h.mirror, m = g === void 0 ? new Mirror$2() : g, _ = h.blockClass, b = _ === void 0 ? "rr-block" : _, y = h.blockSelector, w = y === void 0 ? null : y, x = h.maskTextClass, E = x === void 0 ? "rr-mask" : x, S = h.maskTextSelector, k = S === void 0 ? null : S, I = h.inlineStylesheet, R = I === void 0 ? !0 : I, M = h.inlineImages, A = M === void 0 ? !1 : M, C = h.recordCanvas, N = C === void 0 ? !1 : C, $ = h.maskAllInputs, O = $ === void 0 ? !1 : $, F = h.maskTextFn, j = h.maskInputFn, Y = h.slimDOM, q = Y === void 0 ? !1 : Y, de = h.dataURLOptions, oe = h.preserveWhiteSpace, ce = h.onSerialize, se = h.onIframeLoad, ye = h.iframeLoadTimeout, ve = h.onStylesheetLoad, Re = h.stylesheetLoadTimeout, Ee = h.keepIframeSrcFn, me = Ee === void 0 ? function() {
|
|
5565
5577
|
return !1;
|
|
5566
5578
|
} : Ee, Se = O === !0 ? {
|
|
5567
5579
|
color: !0,
|
|
@@ -5602,20 +5614,20 @@ function snapshot(d, p) {
|
|
|
5602
5614
|
maskTextClass: E,
|
|
5603
5615
|
maskTextSelector: k,
|
|
5604
5616
|
skipChild: !1,
|
|
5605
|
-
inlineStylesheet:
|
|
5617
|
+
inlineStylesheet: R,
|
|
5606
5618
|
maskInputOptions: Se,
|
|
5607
5619
|
maskTextFn: F,
|
|
5608
5620
|
maskInputFn: j,
|
|
5609
5621
|
slimDOMOptions: T,
|
|
5610
5622
|
dataURLOptions: de,
|
|
5611
|
-
inlineImages:
|
|
5623
|
+
inlineImages: A,
|
|
5612
5624
|
recordCanvas: N,
|
|
5613
5625
|
preserveWhiteSpace: oe,
|
|
5614
5626
|
onSerialize: ce,
|
|
5615
5627
|
onIframeLoad: se,
|
|
5616
5628
|
iframeLoadTimeout: ye,
|
|
5617
5629
|
onStylesheetLoad: ve,
|
|
5618
|
-
stylesheetLoadTimeout:
|
|
5630
|
+
stylesheetLoadTimeout: Re,
|
|
5619
5631
|
keepIframeSrcFn: me,
|
|
5620
5632
|
newlyAddedElement: !1
|
|
5621
5633
|
});
|
|
@@ -5634,7 +5646,7 @@ function parse$1(d, p) {
|
|
|
5634
5646
|
function _() {
|
|
5635
5647
|
var T = { line: h, column: g };
|
|
5636
5648
|
return function(z) {
|
|
5637
|
-
return z.position = new b(T),
|
|
5649
|
+
return z.position = new b(T), R(), z;
|
|
5638
5650
|
};
|
|
5639
5651
|
}
|
|
5640
5652
|
var b = /* @__PURE__ */ (function() {
|
|
@@ -5671,7 +5683,7 @@ function parse$1(d, p) {
|
|
|
5671
5683
|
}
|
|
5672
5684
|
function k() {
|
|
5673
5685
|
var T, z = [];
|
|
5674
|
-
for (
|
|
5686
|
+
for (R(), M(z); d.length && d.charAt(0) !== "}" && (T = me() || Se()); )
|
|
5675
5687
|
T !== !1 && (z.push(T), M(z));
|
|
5676
5688
|
return z;
|
|
5677
5689
|
}
|
|
@@ -5682,16 +5694,16 @@ function parse$1(d, p) {
|
|
|
5682
5694
|
return m(L), d = d.slice(L.length), z;
|
|
5683
5695
|
}
|
|
5684
5696
|
}
|
|
5685
|
-
function
|
|
5697
|
+
function R() {
|
|
5686
5698
|
I(/^\s*/);
|
|
5687
5699
|
}
|
|
5688
5700
|
function M(T) {
|
|
5689
5701
|
T === void 0 && (T = []);
|
|
5690
|
-
for (var z; z =
|
|
5691
|
-
z !== !1 && T.push(z), z =
|
|
5702
|
+
for (var z; z = A(); )
|
|
5703
|
+
z !== !1 && T.push(z), z = A();
|
|
5692
5704
|
return T;
|
|
5693
5705
|
}
|
|
5694
|
-
function
|
|
5706
|
+
function A() {
|
|
5695
5707
|
var T = _();
|
|
5696
5708
|
if (!(d.charAt(0) !== "/" || d.charAt(1) !== "*")) {
|
|
5697
5709
|
for (var z = 2; d.charAt(z) !== "" && (d.charAt(z) !== "*" || d.charAt(z + 1) !== "/"); )
|
|
@@ -5858,7 +5870,7 @@ function parse$1(d, p) {
|
|
|
5858
5870
|
}) : w("@font-face missing '}'");
|
|
5859
5871
|
}
|
|
5860
5872
|
}
|
|
5861
|
-
var ye = Ee("import"), ve = Ee("charset"),
|
|
5873
|
+
var ye = Ee("import"), ve = Ee("charset"), Re = Ee("namespace");
|
|
5862
5874
|
function Ee(T) {
|
|
5863
5875
|
var z = new RegExp("^@" + T + "\\s*([^;]+);");
|
|
5864
5876
|
return function() {
|
|
@@ -5871,7 +5883,7 @@ function parse$1(d, p) {
|
|
|
5871
5883
|
}
|
|
5872
5884
|
function me() {
|
|
5873
5885
|
if (d[0] === "@")
|
|
5874
|
-
return F() || q() || de() || j() || ye() || ve() ||
|
|
5886
|
+
return F() || q() || de() || j() || ye() || ve() || Re() || ce() || oe() || Y() || se();
|
|
5875
5887
|
}
|
|
5876
5888
|
function Se() {
|
|
5877
5889
|
var T = _(), z = C();
|
|
@@ -6002,8 +6014,8 @@ function buildNode(d, p) {
|
|
|
6002
6014
|
}
|
|
6003
6015
|
var E = _ === "textarea" && w === "value", S = _ === "style" && w === "_cssText";
|
|
6004
6016
|
if (S && g && typeof x == "string" && (x = addHoverClass(x, m)), (E || S) && typeof x == "string") {
|
|
6005
|
-
for (var k = h.createTextNode(x), I = 0,
|
|
6006
|
-
var M =
|
|
6017
|
+
for (var k = h.createTextNode(x), I = 0, R = Array.from(b.childNodes); I < R.length; I++) {
|
|
6018
|
+
var M = R[I];
|
|
6007
6019
|
M.nodeType === b.TEXT_NODE && b.removeChild(M);
|
|
6008
6020
|
}
|
|
6009
6021
|
b.appendChild(k);
|
|
@@ -6022,7 +6034,7 @@ function buildNode(d, p) {
|
|
|
6022
6034
|
}
|
|
6023
6035
|
}
|
|
6024
6036
|
}
|
|
6025
|
-
var
|
|
6037
|
+
var A = function(N) {
|
|
6026
6038
|
var $ = y[N];
|
|
6027
6039
|
if (_ === "canvas" && N === "rr_dataURL") {
|
|
6028
6040
|
var O = document.createElement("img");
|
|
@@ -6053,7 +6065,7 @@ function buildNode(d, p) {
|
|
|
6053
6065
|
}
|
|
6054
6066
|
};
|
|
6055
6067
|
for (var C in y)
|
|
6056
|
-
|
|
6068
|
+
A(C);
|
|
6057
6069
|
if (d.isShadowHost)
|
|
6058
6070
|
if (!b.shadowRoot)
|
|
6059
6071
|
b.attachShadow({ mode: "open" });
|
|
@@ -6078,7 +6090,7 @@ function buildNodeWithSN(d, p) {
|
|
|
6078
6090
|
return null;
|
|
6079
6091
|
if (d.rootId && g.getNode(d.rootId) !== h && g.replace(d.rootId, h), d.type === NodeType$2.Document && (h.close(), h.open(), d.compatMode === "BackCompat" && d.childNodes && d.childNodes[0].type !== NodeType$2.DocumentType && (d.childNodes[0].type === NodeType$2.Element && "xmlns" in d.childNodes[0].attributes && d.childNodes[0].attributes.xmlns === "http://www.w3.org/1999/xhtml" ? h.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">') : h.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')), E = h), g.add(E, d), (d.type === NodeType$2.Document || d.type === NodeType$2.Element) && !_)
|
|
6080
6092
|
for (var S = 0, k = d.childNodes; S < k.length; S++) {
|
|
6081
|
-
var I = k[S],
|
|
6093
|
+
var I = k[S], R = buildNodeWithSN(I, {
|
|
6082
6094
|
doc: h,
|
|
6083
6095
|
mirror: g,
|
|
6084
6096
|
skipChild: !1,
|
|
@@ -6086,11 +6098,11 @@ function buildNodeWithSN(d, p) {
|
|
|
6086
6098
|
afterAppend: w,
|
|
6087
6099
|
cache: x
|
|
6088
6100
|
});
|
|
6089
|
-
if (!
|
|
6101
|
+
if (!R) {
|
|
6090
6102
|
console.warn("Failed to rebuild", I);
|
|
6091
6103
|
continue;
|
|
6092
6104
|
}
|
|
6093
|
-
I.isShadow && isElement(E) && E.shadowRoot ? E.shadowRoot.appendChild(
|
|
6105
|
+
I.isShadow && isElement(E) && E.shadowRoot ? E.shadowRoot.appendChild(R) : E.appendChild(R), w && w(R, I.id);
|
|
6094
6106
|
}
|
|
6095
6107
|
return E;
|
|
6096
6108
|
}
|
|
@@ -6406,11 +6418,11 @@ class MutationBuffer {
|
|
|
6406
6418
|
let I = k;
|
|
6407
6419
|
for (; ((S = (E = I == null ? void 0 : I.getRootNode) === null || E === void 0 ? void 0 : E.call(I)) === null || S === void 0 ? void 0 : S.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && I.getRootNode().host; )
|
|
6408
6420
|
I = I.getRootNode().host;
|
|
6409
|
-
const
|
|
6410
|
-
if (!y.parentNode ||
|
|
6421
|
+
const R = !this.doc.contains(y) && (!I || !this.doc.contains(I));
|
|
6422
|
+
if (!y.parentNode || R)
|
|
6411
6423
|
return;
|
|
6412
|
-
const M = isShadowRoot(y.parentNode) ? this.mirror.getId(k) : this.mirror.getId(y.parentNode),
|
|
6413
|
-
if (M === -1 ||
|
|
6424
|
+
const M = isShadowRoot(y.parentNode) ? this.mirror.getId(k) : this.mirror.getId(y.parentNode), A = g(y);
|
|
6425
|
+
if (M === -1 || A === -1)
|
|
6414
6426
|
return h.addNode(y);
|
|
6415
6427
|
const C = serializeNodeWithId(y, {
|
|
6416
6428
|
doc: this.doc,
|
|
@@ -6441,7 +6453,7 @@ class MutationBuffer {
|
|
|
6441
6453
|
});
|
|
6442
6454
|
C && p.push({
|
|
6443
6455
|
parentId: M,
|
|
6444
|
-
nextId:
|
|
6456
|
+
nextId: A,
|
|
6445
6457
|
node: C
|
|
6446
6458
|
});
|
|
6447
6459
|
};
|
|
@@ -6677,10 +6689,10 @@ function initMoveObserver({ mousemoveCb: d, sampling: p, doc: h, mirror: g }) {
|
|
|
6677
6689
|
const k = Date.now() - y;
|
|
6678
6690
|
d(b.map((I) => (I.timeOffset -= k, I)), S), b = [], y = null;
|
|
6679
6691
|
}, _), x = throttle((S) => {
|
|
6680
|
-
const k = getEventTarget(S), { clientX: I, clientY:
|
|
6692
|
+
const k = getEventTarget(S), { clientX: I, clientY: R } = isTouchEvent(S) ? S.changedTouches[0] : S;
|
|
6681
6693
|
y || (y = Date.now()), b.push({
|
|
6682
6694
|
x: I,
|
|
6683
|
-
y:
|
|
6695
|
+
y: R,
|
|
6684
6696
|
id: g.getId(k),
|
|
6685
6697
|
timeOffset: Date.now() - y
|
|
6686
6698
|
}), w(typeof DragEvent < "u" && S instanceof DragEvent ? IncrementalSource.Drag : S instanceof MouseEvent ? IncrementalSource.MouseMove : IncrementalSource.TouchMove);
|
|
@@ -6706,11 +6718,11 @@ function initMouseInteractionObserver({ mouseInteractionCb: d, doc: p, mirror: h
|
|
|
6706
6718
|
const k = isTouchEvent(E) ? E.changedTouches[0] : E;
|
|
6707
6719
|
if (!k)
|
|
6708
6720
|
return;
|
|
6709
|
-
const I = h.getId(S), { clientX:
|
|
6721
|
+
const I = h.getId(S), { clientX: R, clientY: M } = k;
|
|
6710
6722
|
d({
|
|
6711
6723
|
type: MouseInteractions[x],
|
|
6712
6724
|
id: I,
|
|
6713
|
-
x:
|
|
6725
|
+
x: R,
|
|
6714
6726
|
y: M
|
|
6715
6727
|
});
|
|
6716
6728
|
};
|
|
@@ -6793,24 +6805,24 @@ function initInputObserver({ inputCb: d, doc: p, mirror: h, blockClass: g, block
|
|
|
6793
6805
|
d(Object.assign(Object.assign({}, N), { id: O }));
|
|
6794
6806
|
}
|
|
6795
6807
|
}
|
|
6796
|
-
const I = (w.input === "last" ? ["change"] : ["input", "change"]).map((C) => on(C, E, p)),
|
|
6797
|
-
if (!
|
|
6808
|
+
const I = (w.input === "last" ? ["change"] : ["input", "change"]).map((C) => on(C, E, p)), R = p.defaultView;
|
|
6809
|
+
if (!R)
|
|
6798
6810
|
return () => {
|
|
6799
6811
|
I.forEach((C) => C());
|
|
6800
6812
|
};
|
|
6801
|
-
const M =
|
|
6802
|
-
[
|
|
6803
|
-
[
|
|
6804
|
-
[
|
|
6805
|
-
[
|
|
6806
|
-
[
|
|
6807
|
-
[
|
|
6813
|
+
const M = R.Object.getOwnPropertyDescriptor(R.HTMLInputElement.prototype, "value"), A = [
|
|
6814
|
+
[R.HTMLInputElement.prototype, "value"],
|
|
6815
|
+
[R.HTMLInputElement.prototype, "checked"],
|
|
6816
|
+
[R.HTMLSelectElement.prototype, "value"],
|
|
6817
|
+
[R.HTMLTextAreaElement.prototype, "value"],
|
|
6818
|
+
[R.HTMLSelectElement.prototype, "selectedIndex"],
|
|
6819
|
+
[R.HTMLOptionElement.prototype, "selected"]
|
|
6808
6820
|
];
|
|
6809
|
-
return M && M.set && I.push(...
|
|
6821
|
+
return M && M.set && I.push(...A.map((C) => hookSetter(C[0], C[1], {
|
|
6810
6822
|
set() {
|
|
6811
6823
|
E({ target: this });
|
|
6812
6824
|
}
|
|
6813
|
-
}, !1,
|
|
6825
|
+
}, !1, R))), () => {
|
|
6814
6826
|
I.forEach((C) => C());
|
|
6815
6827
|
};
|
|
6816
6828
|
}
|
|
@@ -6880,9 +6892,9 @@ function initStyleSheetObserver({ styleSheetRuleCb: d, mirror: p, stylesheetMana
|
|
|
6880
6892
|
insertRule: S.prototype.insertRule,
|
|
6881
6893
|
deleteRule: S.prototype.deleteRule
|
|
6882
6894
|
}, S.prototype.insertRule = function(k, I) {
|
|
6883
|
-
const { id:
|
|
6884
|
-
return (
|
|
6885
|
-
id:
|
|
6895
|
+
const { id: R, styleId: M } = getIdAndStyleId(this.parentStyleSheet, p, h.styleMirror);
|
|
6896
|
+
return (R && R !== -1 || M && M !== -1) && d({
|
|
6897
|
+
id: R,
|
|
6886
6898
|
styleId: M,
|
|
6887
6899
|
adds: [
|
|
6888
6900
|
{
|
|
@@ -6895,10 +6907,10 @@ function initStyleSheetObserver({ styleSheetRuleCb: d, mirror: p, stylesheetMana
|
|
|
6895
6907
|
]
|
|
6896
6908
|
}), x[E].insertRule.apply(this, [k, I]);
|
|
6897
6909
|
}, S.prototype.deleteRule = function(k) {
|
|
6898
|
-
const { id: I, styleId:
|
|
6899
|
-
return (I && I !== -1 ||
|
|
6910
|
+
const { id: I, styleId: R } = getIdAndStyleId(this.parentStyleSheet, p, h.styleMirror);
|
|
6911
|
+
return (I && I !== -1 || R && R !== -1) && d({
|
|
6900
6912
|
id: I,
|
|
6901
|
-
styleId:
|
|
6913
|
+
styleId: R,
|
|
6902
6914
|
removes: [
|
|
6903
6915
|
{ index: [...getNestedCSSRulePositions(this), k] }
|
|
6904
6916
|
]
|
|
@@ -7042,12 +7054,12 @@ function initSelectionObserver(d) {
|
|
|
7042
7054
|
b = w.isCollapsed || !1;
|
|
7043
7055
|
const x = [], E = w.rangeCount || 0;
|
|
7044
7056
|
for (let S = 0; S < E; S++) {
|
|
7045
|
-
const k = w.getRangeAt(S), { startContainer: I, startOffset:
|
|
7057
|
+
const k = w.getRangeAt(S), { startContainer: I, startOffset: R, endContainer: M, endOffset: A } = k;
|
|
7046
7058
|
isBlocked(I, g, m, !0) || isBlocked(M, g, m, !0) || x.push({
|
|
7047
7059
|
start: h.getId(I),
|
|
7048
|
-
startOffset:
|
|
7060
|
+
startOffset: R,
|
|
7049
7061
|
end: h.getId(M),
|
|
7050
|
-
endOffset:
|
|
7062
|
+
endOffset: A
|
|
7051
7063
|
});
|
|
7052
7064
|
}
|
|
7053
7065
|
_({ ranges: x });
|
|
@@ -7056,30 +7068,30 @@ function initSelectionObserver(d) {
|
|
|
7056
7068
|
}
|
|
7057
7069
|
function mergeHooks(d, p) {
|
|
7058
7070
|
const { mutationCb: h, mousemoveCb: g, mouseInteractionCb: m, scrollCb: _, viewportResizeCb: b, inputCb: y, mediaInteractionCb: w, styleSheetRuleCb: x, styleDeclarationCb: E, canvasMutationCb: S, fontCb: k, selectionCb: I } = d;
|
|
7059
|
-
d.mutationCb = (...
|
|
7060
|
-
p.mutation && p.mutation(...
|
|
7061
|
-
}, d.mousemoveCb = (...
|
|
7062
|
-
p.mousemove && p.mousemove(...
|
|
7063
|
-
}, d.mouseInteractionCb = (...
|
|
7064
|
-
p.mouseInteraction && p.mouseInteraction(...
|
|
7065
|
-
}, d.scrollCb = (...
|
|
7066
|
-
p.scroll && p.scroll(...
|
|
7067
|
-
}, d.viewportResizeCb = (...
|
|
7068
|
-
p.viewportResize && p.viewportResize(...
|
|
7069
|
-
}, d.inputCb = (...
|
|
7070
|
-
p.input && p.input(...
|
|
7071
|
-
}, d.mediaInteractionCb = (...
|
|
7072
|
-
p.mediaInteaction && p.mediaInteaction(...
|
|
7073
|
-
}, d.styleSheetRuleCb = (...
|
|
7074
|
-
p.styleSheetRule && p.styleSheetRule(...
|
|
7075
|
-
}, d.styleDeclarationCb = (...
|
|
7076
|
-
p.styleDeclaration && p.styleDeclaration(...
|
|
7077
|
-
}, d.canvasMutationCb = (...
|
|
7078
|
-
p.canvasMutation && p.canvasMutation(...
|
|
7079
|
-
}, d.fontCb = (...
|
|
7080
|
-
p.font && p.font(...
|
|
7081
|
-
}, d.selectionCb = (...
|
|
7082
|
-
p.selection && p.selection(...
|
|
7071
|
+
d.mutationCb = (...R) => {
|
|
7072
|
+
p.mutation && p.mutation(...R), h(...R);
|
|
7073
|
+
}, d.mousemoveCb = (...R) => {
|
|
7074
|
+
p.mousemove && p.mousemove(...R), g(...R);
|
|
7075
|
+
}, d.mouseInteractionCb = (...R) => {
|
|
7076
|
+
p.mouseInteraction && p.mouseInteraction(...R), m(...R);
|
|
7077
|
+
}, d.scrollCb = (...R) => {
|
|
7078
|
+
p.scroll && p.scroll(...R), _(...R);
|
|
7079
|
+
}, d.viewportResizeCb = (...R) => {
|
|
7080
|
+
p.viewportResize && p.viewportResize(...R), b(...R);
|
|
7081
|
+
}, d.inputCb = (...R) => {
|
|
7082
|
+
p.input && p.input(...R), y(...R);
|
|
7083
|
+
}, d.mediaInteractionCb = (...R) => {
|
|
7084
|
+
p.mediaInteaction && p.mediaInteaction(...R), w(...R);
|
|
7085
|
+
}, d.styleSheetRuleCb = (...R) => {
|
|
7086
|
+
p.styleSheetRule && p.styleSheetRule(...R), x(...R);
|
|
7087
|
+
}, d.styleDeclarationCb = (...R) => {
|
|
7088
|
+
p.styleDeclaration && p.styleDeclaration(...R), E(...R);
|
|
7089
|
+
}, d.canvasMutationCb = (...R) => {
|
|
7090
|
+
p.canvasMutation && p.canvasMutation(...R), S(...R);
|
|
7091
|
+
}, d.fontCb = (...R) => {
|
|
7092
|
+
p.font && p.font(...R), k(...R);
|
|
7093
|
+
}, d.selectionCb = (...R) => {
|
|
7094
|
+
p.selection && p.selection(...R), I(...R);
|
|
7083
7095
|
};
|
|
7084
7096
|
}
|
|
7085
7097
|
function initObservers(d, p = {}) {
|
|
@@ -7091,11 +7103,11 @@ function initObservers(d, p = {}) {
|
|
|
7091
7103
|
const g = initMutationObserver(d, d.doc), m = initMoveObserver(d), _ = initMouseInteractionObserver(d), b = initScrollObserver(d), y = initViewportResizeObserver(d), w = initInputObserver(d), x = initMediaInteractionObserver(d), E = initStyleSheetObserver(d, { win: h }), S = initAdoptedStyleSheetObserver(d, d.doc), k = initStyleDeclarationObserver(d, {
|
|
7092
7104
|
win: h
|
|
7093
7105
|
}), I = d.collectFonts ? initFontObserver(d) : () => {
|
|
7094
|
-
},
|
|
7095
|
-
for (const
|
|
7096
|
-
M.push(
|
|
7106
|
+
}, R = initSelectionObserver(d), M = [];
|
|
7107
|
+
for (const A of d.plugins)
|
|
7108
|
+
M.push(A.observer(A.callback, h, A.options));
|
|
7097
7109
|
return () => {
|
|
7098
|
-
mutationBuffers.forEach((
|
|
7110
|
+
mutationBuffers.forEach((A) => A.reset()), g.disconnect(), m(), _(), b(), y(), w(), x(), E(), S(), k(), I(), R(), M.forEach((A) => A());
|
|
7099
7111
|
};
|
|
7100
7112
|
}
|
|
7101
7113
|
class CrossOriginIframeMirror {
|
|
@@ -7515,10 +7527,10 @@ function patchGLPrototype(d, p, h, g, m, _, b) {
|
|
|
7515
7527
|
return function(...k) {
|
|
7516
7528
|
const I = S.apply(this, k);
|
|
7517
7529
|
if (saveWebGLVar(I, b, this), !isBlocked(this.canvas, g, m, !0)) {
|
|
7518
|
-
const
|
|
7530
|
+
const R = serializeArgs([...k], b, this), M = {
|
|
7519
7531
|
type: p,
|
|
7520
7532
|
property: x,
|
|
7521
|
-
args:
|
|
7533
|
+
args: R
|
|
7522
7534
|
};
|
|
7523
7535
|
h(this.canvas, M);
|
|
7524
7536
|
}
|
|
@@ -7613,11 +7625,11 @@ class CanvasManager {
|
|
|
7613
7625
|
}
|
|
7614
7626
|
initCanvasFPSObserver(p, h, g, m, _) {
|
|
7615
7627
|
const b = initCanvasContextObserver(h, g, m), y = /* @__PURE__ */ new Map(), w = new WorkerFactory();
|
|
7616
|
-
w.onmessage = (
|
|
7617
|
-
const { id: M } =
|
|
7618
|
-
if (y.set(M, !1), !("base64" in
|
|
7628
|
+
w.onmessage = (R) => {
|
|
7629
|
+
const { id: M } = R.data;
|
|
7630
|
+
if (y.set(M, !1), !("base64" in R.data))
|
|
7619
7631
|
return;
|
|
7620
|
-
const { base64:
|
|
7632
|
+
const { base64: A, type: C, width: N, height: $ } = R.data;
|
|
7621
7633
|
this.mutationCb({
|
|
7622
7634
|
id: M,
|
|
7623
7635
|
type: CanvasContext["2D"],
|
|
@@ -7634,7 +7646,7 @@ class CanvasManager {
|
|
|
7634
7646
|
args: [
|
|
7635
7647
|
{
|
|
7636
7648
|
rr_type: "Blob",
|
|
7637
|
-
data: [{ rr_type: "ArrayBuffer", base64:
|
|
7649
|
+
data: [{ rr_type: "ArrayBuffer", base64: A }],
|
|
7638
7650
|
type: C
|
|
7639
7651
|
}
|
|
7640
7652
|
]
|
|
@@ -7649,23 +7661,23 @@ class CanvasManager {
|
|
|
7649
7661
|
const x = 1e3 / p;
|
|
7650
7662
|
let E = 0, S;
|
|
7651
7663
|
const k = () => {
|
|
7652
|
-
const
|
|
7664
|
+
const R = [];
|
|
7653
7665
|
return h.document.querySelectorAll("canvas").forEach((M) => {
|
|
7654
|
-
isBlocked(M, g, m, !0) ||
|
|
7655
|
-
}),
|
|
7656
|
-
}, I = (
|
|
7657
|
-
if (E &&
|
|
7666
|
+
isBlocked(M, g, m, !0) || R.push(M);
|
|
7667
|
+
}), R;
|
|
7668
|
+
}, I = (R) => {
|
|
7669
|
+
if (E && R - E < x) {
|
|
7658
7670
|
S = requestAnimationFrame(I);
|
|
7659
7671
|
return;
|
|
7660
7672
|
}
|
|
7661
|
-
E =
|
|
7662
|
-
var
|
|
7673
|
+
E = R, k().forEach((M) => __awaiter(this, void 0, void 0, function* () {
|
|
7674
|
+
var A;
|
|
7663
7675
|
const C = this.mirror.getId(M);
|
|
7664
7676
|
if (y.get(C))
|
|
7665
7677
|
return;
|
|
7666
7678
|
if (y.set(C, !0), ["webgl", "webgl2"].includes(M.__context)) {
|
|
7667
7679
|
const $ = M.getContext(M.__context);
|
|
7668
|
-
((
|
|
7680
|
+
((A = $ == null ? void 0 : $.getContextAttributes()) === null || A === void 0 ? void 0 : A.preserveDrawingBuffer) === !1 && ($ == null || $.clear($.COLOR_BUFFER_BIT));
|
|
7669
7681
|
}
|
|
7670
7682
|
const N = yield createImageBitmap(M);
|
|
7671
7683
|
w.postMessage({
|
|
@@ -7771,7 +7783,7 @@ function wrapEvent(d) {
|
|
|
7771
7783
|
let wrappedEmit, takeFullSnapshot, canvasManager, recording = !1;
|
|
7772
7784
|
const mirror = createMirror$2();
|
|
7773
7785
|
function record$1(d = {}) {
|
|
7774
|
-
const { emit: p, checkoutEveryNms: h, checkoutEveryNth: g, blockClass: m = "rr-block", blockSelector: _ = null, ignoreClass: b = "rr-ignore", maskTextClass: y = "rr-mask", maskTextSelector: w = null, inlineStylesheet: x = !0, maskAllInputs: E, maskInputOptions: S, slimDOMOptions: k, maskInputFn: I, maskTextFn:
|
|
7786
|
+
const { emit: p, checkoutEveryNms: h, checkoutEveryNth: g, blockClass: m = "rr-block", blockSelector: _ = null, ignoreClass: b = "rr-ignore", maskTextClass: y = "rr-mask", maskTextSelector: w = null, inlineStylesheet: x = !0, maskAllInputs: E, maskInputOptions: S, slimDOMOptions: k, maskInputFn: I, maskTextFn: R, hooks: M, packFn: A, sampling: C = {}, dataURLOptions: N = {}, mousemoveWait: $, recordCanvas: O = !1, recordCrossOriginIframes: F = !1, userTriggeredOnInput: j = !1, collectFonts: Y = !1, inlineImages: q = !1, plugins: de, keepIframeSrcFn: oe = () => !1, ignoreCSSAttributes: ce = /* @__PURE__ */ new Set([]) } = d, se = F ? window.parent === window : !0;
|
|
7775
7787
|
let ye = !1;
|
|
7776
7788
|
if (!se)
|
|
7777
7789
|
try {
|
|
@@ -7799,7 +7811,7 @@ function record$1(d = {}) {
|
|
|
7799
7811
|
textarea: !0,
|
|
7800
7812
|
select: !0,
|
|
7801
7813
|
password: !0
|
|
7802
|
-
} : S !== void 0 ? S : { password: !0 },
|
|
7814
|
+
} : S !== void 0 ? S : { password: !0 }, Re = k === !0 || k === "all" ? {
|
|
7803
7815
|
script: !0,
|
|
7804
7816
|
comment: !0,
|
|
7805
7817
|
headFavicon: !0,
|
|
@@ -7816,7 +7828,7 @@ function record$1(d = {}) {
|
|
|
7816
7828
|
const Se = (J) => {
|
|
7817
7829
|
for (const ne of de || [])
|
|
7818
7830
|
ne.eventProcessor && (J = ne.eventProcessor(J));
|
|
7819
|
-
return
|
|
7831
|
+
return A && (J = A(J)), J;
|
|
7820
7832
|
};
|
|
7821
7833
|
wrappedEmit = (J, ne) => {
|
|
7822
7834
|
var ge;
|
|
@@ -7891,12 +7903,12 @@ function record$1(d = {}) {
|
|
|
7891
7903
|
inlineStylesheet: x,
|
|
7892
7904
|
maskInputOptions: ve,
|
|
7893
7905
|
dataURLOptions: N,
|
|
7894
|
-
maskTextFn:
|
|
7906
|
+
maskTextFn: R,
|
|
7895
7907
|
maskInputFn: I,
|
|
7896
7908
|
recordCanvas: O,
|
|
7897
7909
|
inlineImages: q,
|
|
7898
7910
|
sampling: C,
|
|
7899
|
-
slimDOMOptions:
|
|
7911
|
+
slimDOMOptions: Re,
|
|
7900
7912
|
iframeManager: W,
|
|
7901
7913
|
stylesheetManager: G,
|
|
7902
7914
|
canvasManager,
|
|
@@ -7922,8 +7934,8 @@ function record$1(d = {}) {
|
|
|
7922
7934
|
maskTextSelector: w,
|
|
7923
7935
|
inlineStylesheet: x,
|
|
7924
7936
|
maskAllInputs: ve,
|
|
7925
|
-
maskTextFn:
|
|
7926
|
-
slimDOM:
|
|
7937
|
+
maskTextFn: R,
|
|
7938
|
+
slimDOM: Re,
|
|
7927
7939
|
dataURLOptions: N,
|
|
7928
7940
|
recordCanvas: O,
|
|
7929
7941
|
inlineImages: q,
|
|
@@ -8019,10 +8031,10 @@ function record$1(d = {}) {
|
|
|
8019
8031
|
collectFonts: Y,
|
|
8020
8032
|
doc: ee,
|
|
8021
8033
|
maskInputFn: I,
|
|
8022
|
-
maskTextFn:
|
|
8034
|
+
maskTextFn: R,
|
|
8023
8035
|
keepIframeSrcFn: oe,
|
|
8024
8036
|
blockSelector: _,
|
|
8025
|
-
slimDOMOptions:
|
|
8037
|
+
slimDOMOptions: Re,
|
|
8026
8038
|
dataURLOptions: N,
|
|
8027
8039
|
mirror,
|
|
8028
8040
|
iframeManager: W,
|
|
@@ -8569,30 +8581,30 @@ function diffProps(d, p, h) {
|
|
|
8569
8581
|
}
|
|
8570
8582
|
function diffChildren(d, p, h, g, m) {
|
|
8571
8583
|
var _;
|
|
8572
|
-
let b = 0, y = d.length - 1, w = 0, x = p.length - 1, E = d[b], S = d[y], k = p[w], I = p[x],
|
|
8584
|
+
let b = 0, y = d.length - 1, w = 0, x = p.length - 1, E = d[b], S = d[y], k = p[w], I = p[x], R, M;
|
|
8573
8585
|
for (; b <= y && w <= x; ) {
|
|
8574
|
-
const
|
|
8586
|
+
const A = g.mirror.getId(E), C = g.mirror.getId(S), N = m.getId(k), $ = m.getId(I);
|
|
8575
8587
|
if (E === void 0)
|
|
8576
8588
|
E = d[++b];
|
|
8577
8589
|
else if (S === void 0)
|
|
8578
8590
|
S = d[--y];
|
|
8579
|
-
else if (
|
|
8591
|
+
else if (A !== -1 && A === N)
|
|
8580
8592
|
diff(E, k, g, m), E = d[++b], k = p[++w];
|
|
8581
8593
|
else if (C !== -1 && C === $)
|
|
8582
8594
|
diff(S, I, g, m), S = d[--y], I = p[--x];
|
|
8583
|
-
else if (
|
|
8595
|
+
else if (A !== -1 && A === $)
|
|
8584
8596
|
h.insertBefore(E, S.nextSibling), diff(E, I, g, m), E = d[++b], I = p[--x];
|
|
8585
8597
|
else if (C !== -1 && C === N)
|
|
8586
8598
|
h.insertBefore(S, E), diff(S, k, g, m), S = d[--y], k = p[++w];
|
|
8587
8599
|
else {
|
|
8588
|
-
if (!
|
|
8589
|
-
|
|
8600
|
+
if (!R) {
|
|
8601
|
+
R = {};
|
|
8590
8602
|
for (let O = b; O <= y; O++) {
|
|
8591
8603
|
const F = d[O];
|
|
8592
|
-
F && g.mirror.hasNode(F) && (
|
|
8604
|
+
F && g.mirror.hasNode(F) && (R[g.mirror.getId(F)] = O);
|
|
8593
8605
|
}
|
|
8594
8606
|
}
|
|
8595
|
-
if (M =
|
|
8607
|
+
if (M = R[m.getId(k)], M) {
|
|
8596
8608
|
const O = d[M];
|
|
8597
8609
|
h.insertBefore(O, E), diff(O, k, g, m), d[M] = void 0;
|
|
8598
8610
|
} else {
|
|
@@ -8603,18 +8615,18 @@ function diffChildren(d, p, h, g, m) {
|
|
|
8603
8615
|
}
|
|
8604
8616
|
}
|
|
8605
8617
|
if (b > y) {
|
|
8606
|
-
const
|
|
8618
|
+
const A = p[x + 1];
|
|
8607
8619
|
let C = null;
|
|
8608
|
-
for (
|
|
8609
|
-
g.mirror.getId(N) === m.getId(
|
|
8620
|
+
for (A && h.childNodes.forEach((N) => {
|
|
8621
|
+
g.mirror.getId(N) === m.getId(A) && (C = N);
|
|
8610
8622
|
}); w <= x; ++w) {
|
|
8611
8623
|
const N = createOrGetNode(p[w], g.mirror, m);
|
|
8612
8624
|
h.insertBefore(N, C), diff(N, p[w], g, m);
|
|
8613
8625
|
}
|
|
8614
8626
|
} else if (w > x)
|
|
8615
8627
|
for (; b <= y; b++) {
|
|
8616
|
-
const
|
|
8617
|
-
|
|
8628
|
+
const A = d[b];
|
|
8629
|
+
A && (h.removeChild(A), g.mirror.removeNodeFromMap(A));
|
|
8618
8630
|
}
|
|
8619
8631
|
}
|
|
8620
8632
|
function createOrGetNode(d, p, h) {
|
|
@@ -8937,7 +8949,7 @@ function polyfill(d = window, p = document) {
|
|
|
8937
8949
|
const N = S(C, "Y") && k(C, "Y"), $ = S(C, "X") && k(C, "X");
|
|
8938
8950
|
return N || $;
|
|
8939
8951
|
}
|
|
8940
|
-
function
|
|
8952
|
+
function R(C) {
|
|
8941
8953
|
for (; C !== p.body && I(C) === !1; )
|
|
8942
8954
|
C = C.parentNode || C.host;
|
|
8943
8955
|
return C;
|
|
@@ -8947,7 +8959,7 @@ function polyfill(d = window, p = document) {
|
|
|
8947
8959
|
let $, O, F, j = (N - C.startTime) / g;
|
|
8948
8960
|
j = j > 1 ? 1 : j, $ = x(j), O = C.startX + (C.x - C.startX) * $, F = C.startY + (C.y - C.startY) * $, C.method.call(C.scrollable, O, F), (O !== C.x || F !== C.y) && d.requestAnimationFrame(M.bind(d, C));
|
|
8949
8961
|
}
|
|
8950
|
-
function
|
|
8962
|
+
function A(C, N, $) {
|
|
8951
8963
|
let O, F, j, Y;
|
|
8952
8964
|
const q = _();
|
|
8953
8965
|
C === p.body ? (O = d, F = d.scrollX || d.pageXOffset, j = d.scrollY || d.pageYOffset, Y = m.scroll) : (O = C, F = C.scrollLeft, j = C.scrollTop, Y = w), M({
|
|
@@ -8966,7 +8978,7 @@ function polyfill(d = window, p = document) {
|
|
|
8966
8978
|
m.scroll.call(d, arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] != "object" ? arguments[0] : d.scrollX || d.pageXOffset, arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : d.scrollY || d.pageYOffset);
|
|
8967
8979
|
return;
|
|
8968
8980
|
}
|
|
8969
|
-
|
|
8981
|
+
A.call(d, p.body, arguments[0].left !== void 0 ? ~~arguments[0].left : d.scrollX || d.pageXOffset, arguments[0].top !== void 0 ? ~~arguments[0].top : d.scrollY || d.pageYOffset);
|
|
8970
8982
|
}
|
|
8971
8983
|
}, d.scrollBy = function() {
|
|
8972
8984
|
if (arguments[0] !== void 0) {
|
|
@@ -8974,7 +8986,7 @@ function polyfill(d = window, p = document) {
|
|
|
8974
8986
|
m.scrollBy.call(d, arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] != "object" ? arguments[0] : 0, arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : 0);
|
|
8975
8987
|
return;
|
|
8976
8988
|
}
|
|
8977
|
-
|
|
8989
|
+
A.call(d, p.body, ~~arguments[0].left + (d.scrollX || d.pageXOffset), ~~arguments[0].top + (d.scrollY || d.pageYOffset));
|
|
8978
8990
|
}
|
|
8979
8991
|
}, h.prototype.scroll = h.prototype.scrollTo = function() {
|
|
8980
8992
|
if (arguments[0] === void 0)
|
|
@@ -8986,7 +8998,7 @@ function polyfill(d = window, p = document) {
|
|
|
8986
8998
|
return;
|
|
8987
8999
|
}
|
|
8988
9000
|
const C = arguments[0].left, N = arguments[0].top;
|
|
8989
|
-
|
|
9001
|
+
A.call(this, this, typeof C > "u" ? this.scrollLeft : ~~C, typeof N > "u" ? this.scrollTop : ~~N);
|
|
8990
9002
|
}, h.prototype.scrollBy = function() {
|
|
8991
9003
|
if (arguments[0] !== void 0) {
|
|
8992
9004
|
if (E(arguments[0]) === !0) {
|
|
@@ -9004,8 +9016,8 @@ function polyfill(d = window, p = document) {
|
|
|
9004
9016
|
m.scrollIntoView.call(this, arguments[0] === void 0 ? !0 : arguments[0]);
|
|
9005
9017
|
return;
|
|
9006
9018
|
}
|
|
9007
|
-
const C =
|
|
9008
|
-
C !== p.body ? (
|
|
9019
|
+
const C = R(this), N = C.getBoundingClientRect(), $ = this.getBoundingClientRect();
|
|
9020
|
+
C !== p.body ? (A.call(this, C, C.scrollLeft + $.left - N.left, C.scrollTop + $.top - N.top), d.getComputedStyle(C).position !== "fixed" && d.scrollBy({
|
|
9009
9021
|
left: N.left,
|
|
9010
9022
|
top: N.top,
|
|
9011
9023
|
behavior: "smooth"
|
|
@@ -9151,37 +9163,37 @@ function s(d, p) {
|
|
|
9151
9163
|
var h = t(f(r(d.states[d.initial].entry).map((function(b) {
|
|
9152
9164
|
return i(b, p.actions);
|
|
9153
9165
|
})), d.context, e), 2), g = h[0], m = h[1], _ = { config: d, _options: p, initialState: { value: d.initial, actions: g, context: m, matches: a(d.initial) }, transition: function(b, y) {
|
|
9154
|
-
var w, x, E = typeof b == "string" ? { value: b, context: d.context } : b, S = E.value, k = E.context, I = u(y),
|
|
9155
|
-
if (
|
|
9156
|
-
var M = r(
|
|
9166
|
+
var w, x, E = typeof b == "string" ? { value: b, context: d.context } : b, S = E.value, k = E.context, I = u(y), R = d.states[S];
|
|
9167
|
+
if (R.on) {
|
|
9168
|
+
var M = r(R.on[I.type]);
|
|
9157
9169
|
try {
|
|
9158
|
-
for (var
|
|
9170
|
+
for (var A = (function(me) {
|
|
9159
9171
|
var Se = typeof Symbol == "function" && Symbol.iterator, T = Se && me[Se], z = 0;
|
|
9160
9172
|
if (T) return T.call(me);
|
|
9161
9173
|
if (me && typeof me.length == "number") return { next: function() {
|
|
9162
9174
|
return me && z >= me.length && (me = void 0), { value: me && me[z++], done: !me };
|
|
9163
9175
|
} };
|
|
9164
9176
|
throw new TypeError(Se ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
9165
|
-
})(M), C =
|
|
9177
|
+
})(M), C = A.next(); !C.done; C = A.next()) {
|
|
9166
9178
|
var N = C.value;
|
|
9167
9179
|
if (N === void 0) return c(S, k);
|
|
9168
9180
|
var $ = typeof N == "string" ? { target: N } : N, O = $.target, F = $.actions, j = F === void 0 ? [] : F, Y = $.cond, q = Y === void 0 ? function() {
|
|
9169
9181
|
return !0;
|
|
9170
9182
|
} : Y, de = O === void 0, oe = O ?? S, ce = d.states[oe];
|
|
9171
9183
|
if (q(k, I)) {
|
|
9172
|
-
var se = t(f((de ? r(j) : [].concat(
|
|
9184
|
+
var se = t(f((de ? r(j) : [].concat(R.exit, j, ce.entry).filter((function(me) {
|
|
9173
9185
|
return me;
|
|
9174
9186
|
}))).map((function(me) {
|
|
9175
9187
|
return i(me, _._options.actions);
|
|
9176
|
-
})), k, I), 3), ye = se[0], ve = se[1],
|
|
9177
|
-
return { value: Ee, context: ve, actions: ye, changed: O !== S || ye.length > 0 ||
|
|
9188
|
+
})), k, I), 3), ye = se[0], ve = se[1], Re = se[2], Ee = O ?? S;
|
|
9189
|
+
return { value: Ee, context: ve, actions: ye, changed: O !== S || ye.length > 0 || Re, matches: a(Ee) };
|
|
9178
9190
|
}
|
|
9179
9191
|
}
|
|
9180
9192
|
} catch (me) {
|
|
9181
9193
|
w = { error: me };
|
|
9182
9194
|
} finally {
|
|
9183
9195
|
try {
|
|
9184
|
-
C && !C.done && (x =
|
|
9196
|
+
C && !C.done && (x = A.return) && x.call(A);
|
|
9185
9197
|
} finally {
|
|
9186
9198
|
if (w) throw w.error;
|
|
9187
9199
|
}
|
|
@@ -9301,23 +9313,23 @@ function createPlayerService(d, { getCastFn: p, applyEventsSynchronously: h, emi
|
|
|
9301
9313
|
var b;
|
|
9302
9314
|
const { timer: y, events: w, baselineTime: x, lastPlayedEvent: E } = _;
|
|
9303
9315
|
y.clear();
|
|
9304
|
-
for (const
|
|
9305
|
-
addDelay(
|
|
9316
|
+
for (const R of w)
|
|
9317
|
+
addDelay(R, x);
|
|
9306
9318
|
const S = discardPriorSnapshots(w, x);
|
|
9307
9319
|
let k = E == null ? void 0 : E.timestamp;
|
|
9308
9320
|
(E == null ? void 0 : E.type) === EventType.IncrementalSnapshot && E.data.source === IncrementalSource.MouseMove && (k = E.timestamp + ((b = E.data.positions[0]) === null || b === void 0 ? void 0 : b.timeOffset)), x < (k || 0) && g.emit(ReplayerEvents.PlayBack);
|
|
9309
9321
|
const I = new Array();
|
|
9310
|
-
for (const
|
|
9311
|
-
if (!(k && k < x && (
|
|
9312
|
-
if (
|
|
9313
|
-
I.push(
|
|
9322
|
+
for (const R of S)
|
|
9323
|
+
if (!(k && k < x && (R.timestamp <= k || R === E)))
|
|
9324
|
+
if (R.timestamp < x)
|
|
9325
|
+
I.push(R);
|
|
9314
9326
|
else {
|
|
9315
|
-
const M = p(
|
|
9327
|
+
const M = p(R, !1);
|
|
9316
9328
|
y.addAction({
|
|
9317
9329
|
doAction: () => {
|
|
9318
9330
|
M();
|
|
9319
9331
|
},
|
|
9320
|
-
delay:
|
|
9332
|
+
delay: R.delay
|
|
9321
9333
|
});
|
|
9322
9334
|
}
|
|
9323
9335
|
h(I), g.emit(ReplayerEvents.Flush), y.start();
|
|
@@ -9338,12 +9350,12 @@ function createPlayerService(d, { getCastFn: p, applyEventsSynchronously: h, emi
|
|
|
9338
9350
|
if (!x[S] || x[S].timestamp <= E.timestamp)
|
|
9339
9351
|
x.push(E);
|
|
9340
9352
|
else {
|
|
9341
|
-
let
|
|
9353
|
+
let R = -1, M = 0;
|
|
9342
9354
|
for (; M <= S; ) {
|
|
9343
|
-
const
|
|
9344
|
-
x[
|
|
9355
|
+
const A = Math.floor((M + S) / 2);
|
|
9356
|
+
x[A].timestamp <= E.timestamp ? M = A + 1 : S = A - 1;
|
|
9345
9357
|
}
|
|
9346
|
-
|
|
9358
|
+
R === -1 && (R = M), x.splice(R, 0, E);
|
|
9347
9359
|
}
|
|
9348
9360
|
const k = E.timestamp < y, I = p(E, k);
|
|
9349
9361
|
k ? I() : w.isActive() && w.addAction({
|
|
@@ -10172,7 +10184,7 @@ class Replayer {
|
|
|
10172
10184
|
return _.push(x);
|
|
10173
10185
|
if (x.node.rootId && !g.getNode(x.node.rootId))
|
|
10174
10186
|
return;
|
|
10175
|
-
const
|
|
10187
|
+
const R = x.node.rootId ? g.getNode(x.node.rootId) : this.usingVirtualDom ? this.virtualDom : this.iframe.contentDocument;
|
|
10176
10188
|
if (isSerializedIframe(S, g)) {
|
|
10177
10189
|
this.attachDocumentToIframe(x, S);
|
|
10178
10190
|
return;
|
|
@@ -10180,8 +10192,8 @@ class Replayer {
|
|
|
10180
10192
|
const M = (N, $) => {
|
|
10181
10193
|
for (const O of this.config.plugins || [])
|
|
10182
10194
|
O.onBuild && O.onBuild(N, { id: $, replayer: this });
|
|
10183
|
-
},
|
|
10184
|
-
doc:
|
|
10195
|
+
}, A = buildNodeWithSN(x.node, {
|
|
10196
|
+
doc: R,
|
|
10185
10197
|
mirror: g,
|
|
10186
10198
|
skipChild: !0,
|
|
10187
10199
|
hackCss: !0,
|
|
@@ -10190,7 +10202,7 @@ class Replayer {
|
|
|
10190
10202
|
});
|
|
10191
10203
|
if (x.previousId === -1 || x.nextId === -1) {
|
|
10192
10204
|
m[x.node.id] = {
|
|
10193
|
-
node:
|
|
10205
|
+
node: A,
|
|
10194
10206
|
mutation: x
|
|
10195
10207
|
};
|
|
10196
10208
|
return;
|
|
@@ -10202,20 +10214,20 @@ class Replayer {
|
|
|
10202
10214
|
$.nodeType === S.TEXT_NODE && S.removeChild($);
|
|
10203
10215
|
}
|
|
10204
10216
|
if (k && k.nextSibling && k.nextSibling.parentNode)
|
|
10205
|
-
S.insertBefore(
|
|
10217
|
+
S.insertBefore(A, k.nextSibling);
|
|
10206
10218
|
else if (I && I.parentNode)
|
|
10207
|
-
S.contains(I) ? S.insertBefore(
|
|
10219
|
+
S.contains(I) ? S.insertBefore(A, I) : S.insertBefore(A, null);
|
|
10208
10220
|
else {
|
|
10209
|
-
if (S ===
|
|
10210
|
-
for (;
|
|
10211
|
-
|
|
10212
|
-
S.appendChild(
|
|
10221
|
+
if (S === R)
|
|
10222
|
+
for (; R.firstChild; )
|
|
10223
|
+
R.removeChild(R.firstChild);
|
|
10224
|
+
S.appendChild(A);
|
|
10213
10225
|
}
|
|
10214
|
-
if (M(
|
|
10215
|
-
const N = this.mirror.getId(
|
|
10216
|
-
$ && (this.attachDocumentToIframe($,
|
|
10226
|
+
if (M(A, x.node.id), this.usingVirtualDom && A.nodeName === "#text" && S.nodeName === "STYLE" && ((E = S.rules) === null || E === void 0 ? void 0 : E.length) > 0 && (S.rules = []), isSerializedIframe(A, this.mirror)) {
|
|
10227
|
+
const N = this.mirror.getId(A), $ = this.newDocumentQueue.find((O) => O.parentId === N);
|
|
10228
|
+
$ && (this.attachDocumentToIframe($, A), this.newDocumentQueue = this.newDocumentQueue.filter((O) => O !== $));
|
|
10217
10229
|
}
|
|
10218
|
-
(x.previousId || x.nextId) && this.legacy_resolveMissingNode(m, S,
|
|
10230
|
+
(x.previousId || x.nextId) && this.legacy_resolveMissingNode(m, S, A, x);
|
|
10219
10231
|
};
|
|
10220
10232
|
p.adds.forEach((x) => {
|
|
10221
10233
|
y(x);
|
|
@@ -10256,15 +10268,15 @@ class Replayer {
|
|
|
10256
10268
|
try {
|
|
10257
10269
|
const I = g.getMeta(E);
|
|
10258
10270
|
Object.assign(I.attributes, x.attributes);
|
|
10259
|
-
const
|
|
10271
|
+
const R = buildNodeWithSN(I, {
|
|
10260
10272
|
doc: E.ownerDocument,
|
|
10261
10273
|
mirror: g,
|
|
10262
10274
|
skipChild: !0,
|
|
10263
10275
|
hackCss: !0,
|
|
10264
10276
|
cache: this.cache
|
|
10265
|
-
}), M = E.nextSibling,
|
|
10266
|
-
if (
|
|
10267
|
-
|
|
10277
|
+
}), M = E.nextSibling, A = E.parentNode;
|
|
10278
|
+
if (R && A) {
|
|
10279
|
+
A.removeChild(E), A.insertBefore(R, M), g.replace(x.id, R);
|
|
10268
10280
|
break;
|
|
10269
10281
|
}
|
|
10270
10282
|
} catch {
|
|
@@ -10274,16 +10286,16 @@ class Replayer {
|
|
|
10274
10286
|
this.config.showWarning && console.warn("An error occurred may due to the checkout feature.", I);
|
|
10275
10287
|
}
|
|
10276
10288
|
else if (S === "style") {
|
|
10277
|
-
const I = k,
|
|
10289
|
+
const I = k, R = E;
|
|
10278
10290
|
for (const M in I)
|
|
10279
10291
|
if (I[M] === !1)
|
|
10280
|
-
|
|
10292
|
+
R.style.removeProperty(M);
|
|
10281
10293
|
else if (I[M] instanceof Array) {
|
|
10282
|
-
const
|
|
10283
|
-
|
|
10294
|
+
const A = I[M];
|
|
10295
|
+
R.style.setProperty(M, A[0], A[1]);
|
|
10284
10296
|
} else {
|
|
10285
|
-
const
|
|
10286
|
-
|
|
10297
|
+
const A = I[M];
|
|
10298
|
+
R.style.setProperty(M, A);
|
|
10287
10299
|
}
|
|
10288
10300
|
}
|
|
10289
10301
|
}
|
|
@@ -10502,16 +10514,16 @@ function slide(d, { delay: p = 0, duration: h = 400, easing: g = cubic_out, axis
|
|
|
10502
10514
|
/** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
|
|
10503
10515
|
`${C[0].toUpperCase()}${C.slice(1)}`
|
|
10504
10516
|
)
|
|
10505
|
-
), S = parseFloat(_[`padding${E[0]}`]), k = parseFloat(_[`padding${E[1]}`]), I = parseFloat(_[`margin${E[0]}`]),
|
|
10517
|
+
), S = parseFloat(_[`padding${E[0]}`]), k = parseFloat(_[`padding${E[1]}`]), I = parseFloat(_[`margin${E[0]}`]), R = parseFloat(_[`margin${E[1]}`]), M = parseFloat(
|
|
10506
10518
|
_[`border${E[0]}Width`]
|
|
10507
|
-
),
|
|
10519
|
+
), A = parseFloat(
|
|
10508
10520
|
_[`border${E[1]}Width`]
|
|
10509
10521
|
);
|
|
10510
10522
|
return {
|
|
10511
10523
|
delay: p,
|
|
10512
10524
|
duration: h,
|
|
10513
10525
|
easing: g,
|
|
10514
|
-
css: (C) => `overflow: hidden;opacity: ${Math.min(C * 20, 1) * b};${y}: ${C * w}px;padding-${x[0]}: ${C * S}px;padding-${x[1]}: ${C * k}px;margin-${x[0]}: ${C * I}px;margin-${x[1]}: ${C *
|
|
10526
|
+
css: (C) => `overflow: hidden;opacity: ${Math.min(C * 20, 1) * b};${y}: ${C * w}px;padding-${x[0]}: ${C * S}px;padding-${x[1]}: ${C * k}px;margin-${x[0]}: ${C * I}px;margin-${x[1]}: ${C * R}px;border-${x[0]}-width: ${C * M}px;border-${x[1]}-width: ${C * A}px;min-${y}: 0`
|
|
10515
10527
|
};
|
|
10516
10528
|
}
|
|
10517
10529
|
var root_3$7 = /* @__PURE__ */ from_html('<button class="thumb-edit svelte-1dhybq8" aria-label="Edit screenshot"><svg width="10" height="10" viewBox="0 0 24 24" fill="none"><path d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></button>'), root_2$8 = /* @__PURE__ */ from_html('<div class="thumb-wrap svelte-1dhybq8"><img class="thumb svelte-1dhybq8"/> <!> <button class="thumb-remove svelte-1dhybq8" aria-label="Remove screenshot">×</button></div>'), root_4$5 = /* @__PURE__ */ from_html('<span class="more-badge svelte-1dhybq8"> </span>'), root_1$8 = /* @__PURE__ */ from_html('<div class="thumb-strip svelte-1dhybq8"><!> <!></div>');
|
|
@@ -10557,7 +10569,7 @@ function ScreenshotPreview(d, p) {
|
|
|
10557
10569
|
{
|
|
10558
10570
|
var E = (S) => {
|
|
10559
10571
|
var k = root_1$8(), I = child(k);
|
|
10560
|
-
each(I, 17, () => h().slice(-3), index, (
|
|
10572
|
+
each(I, 17, () => h().slice(-3), index, (A, C, N) => {
|
|
10561
10573
|
const $ = /* @__PURE__ */ user_derived(() => h().length > 3 ? h().length - 3 + N : N);
|
|
10562
10574
|
var O = root_2$8(), F = child(O);
|
|
10563
10575
|
set_attribute(F, "alt", `Screenshot ${N + 1}`);
|
|
@@ -10572,16 +10584,16 @@ function ScreenshotPreview(d, p) {
|
|
|
10572
10584
|
});
|
|
10573
10585
|
}
|
|
10574
10586
|
var q = sibling(j, 2);
|
|
10575
|
-
reset(O), template_effect(() => set_attribute(F, "src", get(C))), delegated("click", q, () => _()(get($))), append(
|
|
10587
|
+
reset(O), template_effect(() => set_attribute(F, "src", get(C))), delegated("click", q, () => _()(get($))), append(A, O);
|
|
10576
10588
|
});
|
|
10577
|
-
var
|
|
10589
|
+
var R = sibling(I, 2);
|
|
10578
10590
|
{
|
|
10579
|
-
var M = (
|
|
10591
|
+
var M = (A) => {
|
|
10580
10592
|
var C = root_4$5(), N = child(C);
|
|
10581
|
-
reset(C), template_effect(() => set_text(N, `+${h().length - 3}`)), append(
|
|
10593
|
+
reset(C), template_effect(() => set_text(N, `+${h().length - 3}`)), append(A, C);
|
|
10582
10594
|
};
|
|
10583
|
-
if_block(
|
|
10584
|
-
h().length > 3 &&
|
|
10595
|
+
if_block(R, (A) => {
|
|
10596
|
+
h().length > 3 && A(M);
|
|
10585
10597
|
});
|
|
10586
10598
|
}
|
|
10587
10599
|
reset(k), append(S, k);
|
|
@@ -10616,7 +10628,7 @@ const $$css$8 = {
|
|
|
10616
10628
|
};
|
|
10617
10629
|
function AnnotationEditor(d, p) {
|
|
10618
10630
|
push(p, !0), append_styles(d, $$css$8);
|
|
10619
|
-
let h = prop(p, "imageDataUrl", 7), g = prop(p, "onsave", 7), m = prop(p, "oncancel", 7), _ = /* @__PURE__ */ state("arrow"), b = /* @__PURE__ */ state(proxy(ANNOTATION_COLORS[0])), y = /* @__PURE__ */ state(proxy([])), w = /* @__PURE__ */ state(void 0), x = /* @__PURE__ */ state(void 0), E = /* @__PURE__ */ state(0), S = /* @__PURE__ */ state(0), k = /* @__PURE__ */ state(!1), I = /* @__PURE__ */ state("idle"),
|
|
10631
|
+
let h = prop(p, "imageDataUrl", 7), g = prop(p, "onsave", 7), m = prop(p, "oncancel", 7), _ = /* @__PURE__ */ state("arrow"), b = /* @__PURE__ */ state(proxy(ANNOTATION_COLORS[0])), y = /* @__PURE__ */ state(proxy([])), w = /* @__PURE__ */ state(void 0), x = /* @__PURE__ */ state(void 0), E = /* @__PURE__ */ state(0), S = /* @__PURE__ */ state(0), k = /* @__PURE__ */ state(!1), I = /* @__PURE__ */ state("idle"), R = { x: 0, y: 0 }, M = [], A = /* @__PURE__ */ state(void 0), C = /* @__PURE__ */ state(proxy(
|
|
10620
10632
|
{ x: 0, y: 0 }
|
|
10621
10633
|
// canvas coords
|
|
10622
10634
|
)), N = /* @__PURE__ */ state(proxy({ left: "0px", top: "0px" })), $ = /* @__PURE__ */ state("");
|
|
@@ -10669,7 +10681,7 @@ function AnnotationEditor(d, p) {
|
|
|
10669
10681
|
...D,
|
|
10670
10682
|
id: nextShapeId(),
|
|
10671
10683
|
type: "arrow",
|
|
10672
|
-
start:
|
|
10684
|
+
start: R,
|
|
10673
10685
|
end: V
|
|
10674
10686
|
};
|
|
10675
10687
|
case "rectangle":
|
|
@@ -10677,7 +10689,7 @@ function AnnotationEditor(d, p) {
|
|
|
10677
10689
|
...D,
|
|
10678
10690
|
id: nextShapeId(),
|
|
10679
10691
|
type: "rectangle",
|
|
10680
|
-
start:
|
|
10692
|
+
start: R,
|
|
10681
10693
|
end: V
|
|
10682
10694
|
};
|
|
10683
10695
|
case "ellipse":
|
|
@@ -10685,7 +10697,7 @@ function AnnotationEditor(d, p) {
|
|
|
10685
10697
|
...D,
|
|
10686
10698
|
id: nextShapeId(),
|
|
10687
10699
|
type: "ellipse",
|
|
10688
|
-
start:
|
|
10700
|
+
start: R,
|
|
10689
10701
|
end: V
|
|
10690
10702
|
};
|
|
10691
10703
|
case "freehand":
|
|
@@ -10708,11 +10720,11 @@ function AnnotationEditor(d, p) {
|
|
|
10708
10720
|
if (get(_) === "text") {
|
|
10709
10721
|
set(I, "typing"), set(C, D, !0), set(N, q(D), !0), set($, ""), requestAnimationFrame(() => {
|
|
10710
10722
|
var H;
|
|
10711
|
-
return (H = get(
|
|
10723
|
+
return (H = get(A)) == null ? void 0 : H.focus();
|
|
10712
10724
|
});
|
|
10713
10725
|
return;
|
|
10714
10726
|
}
|
|
10715
|
-
set(I, "drawing"),
|
|
10727
|
+
set(I, "drawing"), R = D, M = [D];
|
|
10716
10728
|
}
|
|
10717
10729
|
function ce(V) {
|
|
10718
10730
|
if (get(I) !== "drawing") return;
|
|
@@ -10747,7 +10759,7 @@ function AnnotationEditor(d, p) {
|
|
|
10747
10759
|
function ve(V) {
|
|
10748
10760
|
V.key === "Enter" ? (V.preventDefault(), ye()) : V.key === "Escape" && (V.preventDefault(), set($, ""), set(I, "idle"));
|
|
10749
10761
|
}
|
|
10750
|
-
function
|
|
10762
|
+
function Re() {
|
|
10751
10763
|
get(y).length !== 0 && (set(y, get(y).slice(0, -1), !0), F());
|
|
10752
10764
|
}
|
|
10753
10765
|
function Ee() {
|
|
@@ -10765,7 +10777,7 @@ function AnnotationEditor(d, p) {
|
|
|
10765
10777
|
m()();
|
|
10766
10778
|
}
|
|
10767
10779
|
function T(V) {
|
|
10768
|
-
V.stopPropagation(), V.key === "Escape" && get(I) !== "typing" && Se(), (V.ctrlKey || V.metaKey) && V.key === "z" && (V.preventDefault(),
|
|
10780
|
+
V.stopPropagation(), V.key === "Escape" && get(I) !== "typing" && Se(), (V.ctrlKey || V.metaKey) && V.key === "z" && (V.preventDefault(), Re());
|
|
10769
10781
|
}
|
|
10770
10782
|
const z = {
|
|
10771
10783
|
arrow: "M5 19L19 5M19 5H9M19 5V15",
|
|
@@ -10805,15 +10817,15 @@ function AnnotationEditor(d, p) {
|
|
|
10805
10817
|
let X;
|
|
10806
10818
|
var fe = child(H);
|
|
10807
10819
|
{
|
|
10808
|
-
var Q = (
|
|
10820
|
+
var Q = (Ie) => {
|
|
10809
10821
|
var Ze = root_2$7();
|
|
10810
|
-
append(
|
|
10811
|
-
}, ue = (
|
|
10822
|
+
append(Ie, Ze);
|
|
10823
|
+
}, ue = (Ie) => {
|
|
10812
10824
|
var Ze = root_3$6(), Le = child(Ze);
|
|
10813
|
-
reset(Ze), template_effect(() => set_attribute(Le, "d", z[get(D)])), append(
|
|
10825
|
+
reset(Ze), template_effect(() => set_attribute(Le, "d", z[get(D)])), append(Ie, Ze);
|
|
10814
10826
|
};
|
|
10815
|
-
if_block(fe, (
|
|
10816
|
-
get(D) === "ellipse" ?
|
|
10827
|
+
if_block(fe, (Ie) => {
|
|
10828
|
+
get(D) === "ellipse" ? Ie(Q) : Ie(ue, !1);
|
|
10817
10829
|
});
|
|
10818
10830
|
}
|
|
10819
10831
|
var be = sibling(fe, 2), Ue = child(be, !0);
|
|
@@ -10859,19 +10871,19 @@ function AnnotationEditor(d, p) {
|
|
|
10859
10871
|
});
|
|
10860
10872
|
}
|
|
10861
10873
|
reset(le);
|
|
10862
|
-
var
|
|
10874
|
+
var Ge = sibling(le, 2);
|
|
10863
10875
|
{
|
|
10864
10876
|
var ae = (V) => {
|
|
10865
10877
|
var D = root_7$5();
|
|
10866
|
-
remove_input_defaults(D), bind_this(D, (H) => set(
|
|
10878
|
+
remove_input_defaults(D), bind_this(D, (H) => set(A, H), () => get(A)), template_effect(() => set_style(D, `left: ${get(N).left ?? ""}; top: ${get(N).top ?? ""}; color: ${get(b) ?? ""};`)), delegated("keydown", D, ve), event("blur", D, ye), bind_value(D, () => get($), (H) => set($, H)), append(V, D);
|
|
10867
10879
|
};
|
|
10868
|
-
if_block(
|
|
10880
|
+
if_block(Ge, (V) => {
|
|
10869
10881
|
get(I) === "typing" && V(ae);
|
|
10870
10882
|
});
|
|
10871
10883
|
}
|
|
10872
10884
|
return reset(W), template_effect(() => {
|
|
10873
10885
|
ee.disabled = get(y).length === 0, he.disabled = get(y).length === 0;
|
|
10874
|
-
}), delegated("keydown", W, T), delegated("keyup", W, (V) => V.stopPropagation()), event("keypress", W, (V) => V.stopPropagation()), delegated("click", ee,
|
|
10886
|
+
}), delegated("keydown", W, T), delegated("keyup", W, (V) => V.stopPropagation()), event("keypress", W, (V) => V.stopPropagation()), delegated("click", ee, Re), delegated("click", he, Ee), delegated("click", K, Se), delegated("click", pe, me), append(d, W), pop(G);
|
|
10875
10887
|
}
|
|
10876
10888
|
delegate([
|
|
10877
10889
|
"keydown",
|
|
@@ -10911,7 +10923,7 @@ function ConsoleLogList(d, p) {
|
|
|
10911
10923
|
var x = root_1$6(), E = child(x), S = child(E);
|
|
10912
10924
|
reset(E);
|
|
10913
10925
|
var k = sibling(E, 2), I = child(k);
|
|
10914
|
-
each(I, 17, () => h().slice(-10), index, (
|
|
10926
|
+
each(I, 17, () => h().slice(-10), index, (A, C) => {
|
|
10915
10927
|
var N = root_2$6(), $ = child(N), O = child($, !0);
|
|
10916
10928
|
reset($);
|
|
10917
10929
|
var F = sibling($, 2), j = child(F);
|
|
@@ -10920,16 +10932,16 @@ function ConsoleLogList(d, p) {
|
|
|
10920
10932
|
set_style($, `color: ${(g[get(C).type] || "#9ca3af") ?? ""}`), set_text(O, get(C).type), set_text(j, `${Y ?? ""}${get(C).message.length > 120 ? "..." : ""}`);
|
|
10921
10933
|
},
|
|
10922
10934
|
[() => get(C).message.substring(0, 120)]
|
|
10923
|
-
), append(
|
|
10935
|
+
), append(A, N);
|
|
10924
10936
|
});
|
|
10925
|
-
var
|
|
10937
|
+
var R = sibling(I, 2);
|
|
10926
10938
|
{
|
|
10927
|
-
var M = (
|
|
10939
|
+
var M = (A) => {
|
|
10928
10940
|
var C = root_3$5(), N = child(C);
|
|
10929
|
-
reset(C), template_effect(() => set_text(N, `+${h().length - 10} more`)), append(
|
|
10941
|
+
reset(C), template_effect(() => set_text(N, `+${h().length - 10} more`)), append(A, C);
|
|
10930
10942
|
};
|
|
10931
|
-
if_block(
|
|
10932
|
-
h().length > 10 &&
|
|
10943
|
+
if_block(R, (A) => {
|
|
10944
|
+
h().length > 10 && A(M);
|
|
10933
10945
|
});
|
|
10934
10946
|
}
|
|
10935
10947
|
reset(k), reset(x), template_effect(() => set_text(S, `Console Logs (${h().length ?? ""})`)), append(w, x);
|
|
@@ -10980,7 +10992,7 @@ function StatusToast(d, p) {
|
|
|
10980
10992
|
let S;
|
|
10981
10993
|
var k = child(E), I = child(k);
|
|
10982
10994
|
{
|
|
10983
|
-
var
|
|
10995
|
+
var R = (N) => {
|
|
10984
10996
|
var $ = root_2$5();
|
|
10985
10997
|
append(N, $);
|
|
10986
10998
|
}, M = (N) => {
|
|
@@ -10988,12 +11000,12 @@ function StatusToast(d, p) {
|
|
|
10988
11000
|
append(N, $);
|
|
10989
11001
|
};
|
|
10990
11002
|
if_block(I, (N) => {
|
|
10991
|
-
g() === "success" ? N(
|
|
11003
|
+
g() === "success" ? N(R) : N(M, !1);
|
|
10992
11004
|
});
|
|
10993
11005
|
}
|
|
10994
11006
|
reset(k);
|
|
10995
|
-
var
|
|
10996
|
-
reset(
|
|
11007
|
+
var A = sibling(k, 2), C = child(A, !0);
|
|
11008
|
+
reset(A), reset(E), template_effect(() => {
|
|
10997
11009
|
S = set_class(E, 1, "jat-toast svelte-1f5s7q1", null, S, { error: g() === "error", success: g() === "success" }), set_text(C, h());
|
|
10998
11010
|
}), append(x, E);
|
|
10999
11011
|
};
|
|
@@ -11031,7 +11043,7 @@ const $$css$5 = {
|
|
|
11031
11043
|
};
|
|
11032
11044
|
function TimelineViewer(d, p) {
|
|
11033
11045
|
push(p, !0), append_styles(d, $$css$5);
|
|
11034
|
-
let h = prop(p, "recordingUrl", 7), g = prop(p, "endpoint", 7), m = prop(p, "consoleLogs", 7, null), _ = prop(p, "networkRequests", 7, null), b = /* @__PURE__ */ state(void 0), y = /* @__PURE__ */ state(null), w = /* @__PURE__ */ state(proxy([])), x = /* @__PURE__ */ state(!0), E = /* @__PURE__ */ state(""), S = /* @__PURE__ */ state(!1), k = /* @__PURE__ */ state(0), I = /* @__PURE__ */ state(0),
|
|
11046
|
+
let h = prop(p, "recordingUrl", 7), g = prop(p, "endpoint", 7), m = prop(p, "consoleLogs", 7, null), _ = prop(p, "networkRequests", 7, null), b = /* @__PURE__ */ state(void 0), y = /* @__PURE__ */ state(null), w = /* @__PURE__ */ state(proxy([])), x = /* @__PURE__ */ state(!0), E = /* @__PURE__ */ state(""), S = /* @__PURE__ */ state(!1), k = /* @__PURE__ */ state(0), I = /* @__PURE__ */ state(0), R = /* @__PURE__ */ state(1), M = /* @__PURE__ */ state(null), A = /* @__PURE__ */ state(0), C = /* @__PURE__ */ state(0);
|
|
11035
11047
|
async function N() {
|
|
11036
11048
|
set(x, !0), set(E, "");
|
|
11037
11049
|
try {
|
|
@@ -11089,7 +11101,7 @@ function TimelineViewer(d, p) {
|
|
|
11089
11101
|
showWarning: !1,
|
|
11090
11102
|
showDebug: !1,
|
|
11091
11103
|
blockClass: "rr-block",
|
|
11092
|
-
speed: get(
|
|
11104
|
+
speed: get(R)
|
|
11093
11105
|
}), z = T.getMetaData();
|
|
11094
11106
|
set(I, z.totalTime, !0), !get(C) && z.startTime && set(C, z.startTime, !0), j(), T.on(ReplayerEvents.Start, () => {
|
|
11095
11107
|
set(S, !0);
|
|
@@ -11102,11 +11114,11 @@ function TimelineViewer(d, p) {
|
|
|
11102
11114
|
}), set(y, T, !0), F();
|
|
11103
11115
|
}
|
|
11104
11116
|
function F() {
|
|
11105
|
-
cancelAnimationFrame(get(
|
|
11117
|
+
cancelAnimationFrame(get(A));
|
|
11106
11118
|
function T() {
|
|
11107
|
-
get(y) && get(S) && set(k, get(y).getCurrentTime(), !0), set(
|
|
11119
|
+
get(y) && get(S) && set(k, get(y).getCurrentTime(), !0), set(A, requestAnimationFrame(T), !0);
|
|
11108
11120
|
}
|
|
11109
|
-
set(
|
|
11121
|
+
set(A, requestAnimationFrame(T), !0);
|
|
11110
11122
|
}
|
|
11111
11123
|
function j() {
|
|
11112
11124
|
if (!get(b)) return;
|
|
@@ -11132,14 +11144,14 @@ function TimelineViewer(d, p) {
|
|
|
11132
11144
|
set(M, get(M) === T ? null : T, !0), q(T.offset);
|
|
11133
11145
|
}
|
|
11134
11146
|
function ce(T) {
|
|
11135
|
-
set(
|
|
11147
|
+
set(R, T, !0), get(y) && get(y).setConfig({ speed: T });
|
|
11136
11148
|
}
|
|
11137
11149
|
function se(T) {
|
|
11138
11150
|
const z = Math.floor(T / 1e3), L = Math.floor(z / 60), P = z % 60;
|
|
11139
11151
|
return `${L}:${P.toString().padStart(2, "0")}`;
|
|
11140
11152
|
}
|
|
11141
11153
|
user_effect(() => (N(), () => {
|
|
11142
|
-
cancelAnimationFrame(get(
|
|
11154
|
+
cancelAnimationFrame(get(A)), get(y) && get(y).pause();
|
|
11143
11155
|
})), user_effect(() => {
|
|
11144
11156
|
!get(x) && get(w).length > 0 && get(b) && setTimeout(() => O(), 50);
|
|
11145
11157
|
});
|
|
@@ -11168,7 +11180,7 @@ function TimelineViewer(d, p) {
|
|
|
11168
11180
|
set networkRequests(T = null) {
|
|
11169
11181
|
_(T), flushSync();
|
|
11170
11182
|
}
|
|
11171
|
-
}, ve = root$5(),
|
|
11183
|
+
}, ve = root$5(), Re = child(ve);
|
|
11172
11184
|
{
|
|
11173
11185
|
var Ee = (T) => {
|
|
11174
11186
|
var z = root_1$4();
|
|
@@ -11207,7 +11219,7 @@ function TimelineViewer(d, p) {
|
|
|
11207
11219
|
let H;
|
|
11208
11220
|
var X = child(D);
|
|
11209
11221
|
reset(D), template_effect(() => {
|
|
11210
|
-
H = set_class(D, 1, "tv-speed-btn svelte-ccnhf", null, H, { active: get(
|
|
11222
|
+
H = set_class(D, 1, "tv-speed-btn svelte-ccnhf", null, H, { active: get(R) === V }), set_text(X, `${V ?? ""}x`);
|
|
11211
11223
|
}), delegated("click", D, () => ce(V)), append(ae, D);
|
|
11212
11224
|
}), reset(le), reset(P);
|
|
11213
11225
|
var we = sibling(P, 2);
|
|
@@ -11239,7 +11251,7 @@ function TimelineViewer(d, p) {
|
|
|
11239
11251
|
}
|
|
11240
11252
|
var xe = sibling(we, 2);
|
|
11241
11253
|
{
|
|
11242
|
-
var
|
|
11254
|
+
var Ge = (ae) => {
|
|
11243
11255
|
var V = root_9$3(), D = child(V), H = child(D), X = child(H, !0);
|
|
11244
11256
|
reset(H);
|
|
11245
11257
|
var fe = sibling(H, 2), Q = child(fe, !0);
|
|
@@ -11248,14 +11260,14 @@ function TimelineViewer(d, p) {
|
|
|
11248
11260
|
reset(D);
|
|
11249
11261
|
var be = sibling(D, 2), Ue = child(be, !0);
|
|
11250
11262
|
reset(be), reset(V), template_effect(
|
|
11251
|
-
(
|
|
11252
|
-
set_style(H, `background: ${get(M).color ?? ""}20; color: ${get(M).color ?? ""}; border-color: ${get(M).color ?? ""}40;`), set_text(X, get(M).label), set_text(Q,
|
|
11263
|
+
(Ie) => {
|
|
11264
|
+
set_style(H, `background: ${get(M).color ?? ""}20; color: ${get(M).color ?? ""}; border-color: ${get(M).color ?? ""}40;`), set_text(X, get(M).label), set_text(Q, Ie), set_text(Ue, get(M).detail);
|
|
11253
11265
|
},
|
|
11254
11266
|
[() => se(get(M).offset)]
|
|
11255
11267
|
), delegated("click", ue, () => set(M, null)), append(ae, V);
|
|
11256
11268
|
};
|
|
11257
11269
|
if_block(xe, (ae) => {
|
|
11258
|
-
get(M) && ae(
|
|
11270
|
+
get(M) && ae(Ge);
|
|
11259
11271
|
});
|
|
11260
11272
|
}
|
|
11261
11273
|
template_effect(
|
|
@@ -11270,7 +11282,7 @@ function TimelineViewer(d, p) {
|
|
|
11270
11282
|
ae.key === "ArrowRight" ? q(Math.min(get(I), get(k) + 5e3)) : ae.key === "ArrowLeft" && q(Math.max(0, get(k) - 5e3));
|
|
11271
11283
|
}), append(T, z);
|
|
11272
11284
|
};
|
|
11273
|
-
if_block(
|
|
11285
|
+
if_block(Re, (T) => {
|
|
11274
11286
|
get(x) ? T(Ee) : get(E) ? T(me, 1) : T(Se, !1);
|
|
11275
11287
|
});
|
|
11276
11288
|
}
|
|
@@ -11312,7 +11324,7 @@ const $$css$4 = {
|
|
|
11312
11324
|
};
|
|
11313
11325
|
function RequestList(d, p) {
|
|
11314
11326
|
push(p, !0), append_styles(d, $$css$4);
|
|
11315
|
-
let h = prop(p, "endpoint", 7), g = prop(p, "reports", 31, () => proxy([])), m = prop(p, "loading", 7), _ = prop(p, "error", 7), b = prop(p, "onreload", 7), y = /* @__PURE__ */ state(null), w = /* @__PURE__ */ state(null), x = /* @__PURE__ */ state(null), E = /* @__PURE__ */ state(void 0), S = /* @__PURE__ */ state(""), k = /* @__PURE__ */ state(""), I = /* @__PURE__ */ state(""),
|
|
11327
|
+
let h = prop(p, "endpoint", 7), g = prop(p, "reports", 31, () => proxy([])), m = prop(p, "loading", 7), _ = prop(p, "error", 7), b = prop(p, "onreload", 7), y = /* @__PURE__ */ state(null), w = /* @__PURE__ */ state(null), x = /* @__PURE__ */ state(null), E = /* @__PURE__ */ state(void 0), S = /* @__PURE__ */ state(""), k = /* @__PURE__ */ state(""), I = /* @__PURE__ */ state(""), R = /* @__PURE__ */ state(proxy([])), M = /* @__PURE__ */ state(proxy([])), A = /* @__PURE__ */ state(!1), C = /* @__PURE__ */ state("active"), N = /* @__PURE__ */ state("all"), $ = /* @__PURE__ */ user_derived(() => get(N) === "all" ? g() : g().filter((D) => (D.source || "feedback") === get(N))), O = /* @__PURE__ */ user_derived(() => get(C) === "active" ? get($).filter((D) => [
|
|
11316
11328
|
"submitted",
|
|
11317
11329
|
"in_progress",
|
|
11318
11330
|
"rejected",
|
|
@@ -11340,25 +11352,25 @@ function RequestList(d, p) {
|
|
|
11340
11352
|
);
|
|
11341
11353
|
}
|
|
11342
11354
|
function se(D) {
|
|
11343
|
-
set(k, D, !0), set(I, ""), set(
|
|
11355
|
+
set(k, D, !0), set(I, ""), set(R, [], !0), set(M, [], !0);
|
|
11344
11356
|
}
|
|
11345
11357
|
function ye() {
|
|
11346
|
-
set(k, ""), set(I, ""), set(
|
|
11358
|
+
set(k, ""), set(I, ""), set(R, [], !0), set(M, [], !0);
|
|
11347
11359
|
}
|
|
11348
11360
|
async function ve() {
|
|
11349
|
-
if (!get(
|
|
11350
|
-
set(
|
|
11361
|
+
if (!get(A)) {
|
|
11362
|
+
set(A, !0);
|
|
11351
11363
|
try {
|
|
11352
11364
|
const D = await captureViewport();
|
|
11353
|
-
set(
|
|
11365
|
+
set(R, [...get(R), D], !0);
|
|
11354
11366
|
} catch (D) {
|
|
11355
11367
|
console.error("Screenshot capture failed:", D);
|
|
11356
11368
|
}
|
|
11357
|
-
set(
|
|
11369
|
+
set(A, !1);
|
|
11358
11370
|
}
|
|
11359
11371
|
}
|
|
11360
|
-
function
|
|
11361
|
-
set(
|
|
11372
|
+
function Re(D) {
|
|
11373
|
+
set(R, get(R).filter((H, X) => X !== D), !0);
|
|
11362
11374
|
}
|
|
11363
11375
|
function Ee() {
|
|
11364
11376
|
startElementPicker((D) => {
|
|
@@ -11384,7 +11396,7 @@ function RequestList(d, p) {
|
|
|
11384
11396
|
async function Se(D, H, X) {
|
|
11385
11397
|
set(S, D, !0);
|
|
11386
11398
|
const fe = H === "rejected" ? {
|
|
11387
|
-
screenshots: get(
|
|
11399
|
+
screenshots: get(R).length > 0 ? get(R) : void 0,
|
|
11388
11400
|
elements: get(M).length > 0 ? get(M) : void 0
|
|
11389
11401
|
} : void 0;
|
|
11390
11402
|
(await respondToReport(h(), D, H, X, fe)).ok ? (g(g().map((ue) => ue.id === D ? {
|
|
@@ -11392,7 +11404,7 @@ function RequestList(d, p) {
|
|
|
11392
11404
|
status: H === "rejected" ? "submitted" : "accepted",
|
|
11393
11405
|
responded_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
11394
11406
|
...H === "rejected" ? { revision_count: (ue.revision_count || 0) + 1 } : {}
|
|
11395
|
-
} : ue)), set(k, ""), set(I, ""), set(
|
|
11407
|
+
} : ue)), set(k, ""), set(I, ""), set(R, [], !0), set(M, [], !0), b()()) : set(k, ""), set(S, "");
|
|
11396
11408
|
}
|
|
11397
11409
|
function T(D) {
|
|
11398
11410
|
set(w, get(w) === D ? null : D, !0);
|
|
@@ -11484,8 +11496,8 @@ function RequestList(d, p) {
|
|
|
11484
11496
|
reset(Q), reset(X);
|
|
11485
11497
|
var be = sibling(X, 2);
|
|
11486
11498
|
let Ue;
|
|
11487
|
-
var
|
|
11488
|
-
reset(
|
|
11499
|
+
var Ie = sibling(child(be)), Ze = child(Ie, !0);
|
|
11500
|
+
reset(Ie), reset(be);
|
|
11489
11501
|
var Le = sibling(be, 2);
|
|
11490
11502
|
let te;
|
|
11491
11503
|
var Ye = sibling(child(Le)), nt = child(Ye, !0);
|
|
@@ -11514,12 +11526,12 @@ function RequestList(d, p) {
|
|
|
11514
11526
|
let ze;
|
|
11515
11527
|
var xe = sibling(child(we));
|
|
11516
11528
|
{
|
|
11517
|
-
var
|
|
11529
|
+
var Ge = (D) => {
|
|
11518
11530
|
var H = root_3$2(), X = child(H, !0);
|
|
11519
11531
|
reset(H), template_effect(() => set_text(X, get(j))), append(D, H);
|
|
11520
11532
|
};
|
|
11521
11533
|
if_block(xe, (D) => {
|
|
11522
|
-
get(j) > 0 && D(
|
|
11534
|
+
get(j) > 0 && D(Ge);
|
|
11523
11535
|
});
|
|
11524
11536
|
}
|
|
11525
11537
|
reset(we), reset(he);
|
|
@@ -11527,24 +11539,24 @@ function RequestList(d, p) {
|
|
|
11527
11539
|
return key(V, () => get(C), (D) => {
|
|
11528
11540
|
var H = root_4$2(), X = child(H);
|
|
11529
11541
|
{
|
|
11530
|
-
var fe = (
|
|
11542
|
+
var fe = (Ie) => {
|
|
11531
11543
|
var Ze = root_5$2();
|
|
11532
|
-
append(
|
|
11533
|
-
}, Q = (
|
|
11544
|
+
append(Ie, Ze);
|
|
11545
|
+
}, Q = (Ie) => {
|
|
11534
11546
|
var Ze = root_6$3(), Le = child(Ze), te = child(Le, !0);
|
|
11535
11547
|
reset(Le);
|
|
11536
11548
|
var Ye = sibling(Le, 2);
|
|
11537
11549
|
reset(Ze), template_effect(() => set_text(te, _())), delegated("click", Ye, function(...nt) {
|
|
11538
11550
|
var We;
|
|
11539
11551
|
(We = b()) == null || We.apply(this, nt);
|
|
11540
|
-
}), append(
|
|
11541
|
-
}, ue = (
|
|
11552
|
+
}), append(Ie, Ze);
|
|
11553
|
+
}, ue = (Ie) => {
|
|
11542
11554
|
var Ze = root_7$3(), Le = child(Ze);
|
|
11543
|
-
Le.textContent = "📋", next(4), reset(Ze), append(
|
|
11544
|
-
}, be = (
|
|
11555
|
+
Le.textContent = "📋", next(4), reset(Ze), append(Ie, Ze);
|
|
11556
|
+
}, be = (Ie) => {
|
|
11545
11557
|
var Ze = root_8$3(), Le = child(Ze), te = child(Le, !0);
|
|
11546
|
-
reset(Le), reset(Ze), template_effect(() => set_text(te, get(C) === "submitted" ? "No submitted requests" : get(C) === "review" ? "Nothing to review right now" : "No completed requests yet")), append(
|
|
11547
|
-
}, Ue = (
|
|
11558
|
+
reset(Le), reset(Ze), template_effect(() => set_text(te, get(C) === "submitted" ? "No submitted requests" : get(C) === "review" ? "Nothing to review right now" : "No completed requests yet")), append(Ie, Ze);
|
|
11559
|
+
}, Ue = (Ie) => {
|
|
11548
11560
|
var Ze = root_9$2();
|
|
11549
11561
|
each(Ze, 21, () => get(O), (Le) => Le.id, (Le, te) => {
|
|
11550
11562
|
var Ye = root_10$2();
|
|
@@ -11604,14 +11616,14 @@ function RequestList(d, p) {
|
|
|
11604
11616
|
let nn;
|
|
11605
11617
|
var un = child(tn), Vt = child(un), xn = child(Vt, !0);
|
|
11606
11618
|
reset(Vt);
|
|
11607
|
-
var
|
|
11619
|
+
var Rt = sibling(Vt, 2);
|
|
11608
11620
|
let Z;
|
|
11609
|
-
var re = child(
|
|
11610
|
-
reset(
|
|
11611
|
-
var
|
|
11612
|
-
reset(
|
|
11613
|
-
var Ne = sibling(un, 2),
|
|
11614
|
-
html(
|
|
11621
|
+
var re = child(Rt, !0);
|
|
11622
|
+
reset(Rt);
|
|
11623
|
+
var Te = sibling(Rt, 2), ke = child(Te, !0);
|
|
11624
|
+
reset(Te), reset(un);
|
|
11625
|
+
var Ne = sibling(un, 2), Ve = child(Ne);
|
|
11626
|
+
html(Ve, () => oe(get(qe).message)), reset(Ne);
|
|
11615
11627
|
var ft = sibling(Ne, 2);
|
|
11616
11628
|
{
|
|
11617
11629
|
var ht = (Oe) => {
|
|
@@ -11672,7 +11684,7 @@ function RequestList(d, p) {
|
|
|
11672
11684
|
}
|
|
11673
11685
|
var gt = sibling(_t, 2);
|
|
11674
11686
|
{
|
|
11675
|
-
var
|
|
11687
|
+
var At = (Oe) => {
|
|
11676
11688
|
var Be = root_24$1();
|
|
11677
11689
|
each(Be, 21, () => get(qe).elements, index, (tt, lt) => {
|
|
11678
11690
|
var pt = root_25$1(), mt = child(pt);
|
|
@@ -11688,7 +11700,7 @@ function RequestList(d, p) {
|
|
|
11688
11700
|
}), reset(Be), append(Oe, Be);
|
|
11689
11701
|
};
|
|
11690
11702
|
if_block(gt, (Oe) => {
|
|
11691
|
-
get(qe).elements && get(qe).elements.length > 0 && Oe(
|
|
11703
|
+
get(qe).elements && get(qe).elements.length > 0 && Oe(At);
|
|
11692
11704
|
});
|
|
11693
11705
|
}
|
|
11694
11706
|
reset(tn), template_effect(
|
|
@@ -11696,12 +11708,12 @@ function RequestList(d, p) {
|
|
|
11696
11708
|
nn = set_class(tn, 1, "thread-entry svelte-1fnmin5", null, nn, {
|
|
11697
11709
|
"thread-user": get(qe).from === "user",
|
|
11698
11710
|
"thread-dev": get(qe).from === "dev"
|
|
11699
|
-
}), set_text(xn, get(qe).from === "user" ? "You" : "Dev"), Z = set_class(
|
|
11711
|
+
}), set_text(xn, get(qe).from === "user" ? "You" : "Dev"), Z = set_class(Rt, 1, "thread-type-badge svelte-1fnmin5", null, Z, {
|
|
11700
11712
|
submission: get(qe).type === "submission",
|
|
11701
11713
|
completion: get(qe).type === "completion",
|
|
11702
11714
|
rejection: get(qe).type === "rejection",
|
|
11703
11715
|
acceptance: get(qe).type === "acceptance"
|
|
11704
|
-
}), set_text(re, Oe), set_text(
|
|
11716
|
+
}), set_text(re, Oe), set_text(ke, Be);
|
|
11705
11717
|
},
|
|
11706
11718
|
[
|
|
11707
11719
|
() => L(get(qe)),
|
|
@@ -11830,51 +11842,51 @@ function RequestList(d, p) {
|
|
|
11830
11842
|
var qe = sibling(dt, 2);
|
|
11831
11843
|
{
|
|
11832
11844
|
var tn = (Ne) => {
|
|
11833
|
-
var
|
|
11834
|
-
each(
|
|
11845
|
+
var Ve = root_37();
|
|
11846
|
+
each(Ve, 21, () => get(R), index, (ft, ht, _t) => {
|
|
11835
11847
|
var bt = root_38(), gt = child(bt);
|
|
11836
11848
|
set_attribute(gt, "alt", `Screenshot ${_t + 1}`);
|
|
11837
|
-
var
|
|
11838
|
-
reset(bt), template_effect(() => set_attribute(gt, "src", get(ht))), delegated("click",
|
|
11839
|
-
}), reset(
|
|
11849
|
+
var At = sibling(gt, 2);
|
|
11850
|
+
reset(bt), template_effect(() => set_attribute(gt, "src", get(ht))), delegated("click", At, () => Re(_t)), append(ft, bt);
|
|
11851
|
+
}), reset(Ve), append(Ne, Ve);
|
|
11840
11852
|
};
|
|
11841
11853
|
if_block(qe, (Ne) => {
|
|
11842
|
-
get(
|
|
11854
|
+
get(R).length > 0 && Ne(tn);
|
|
11843
11855
|
});
|
|
11844
11856
|
}
|
|
11845
11857
|
var nn = sibling(qe, 2);
|
|
11846
11858
|
{
|
|
11847
11859
|
var un = (Ne) => {
|
|
11848
|
-
var
|
|
11849
|
-
each(
|
|
11850
|
-
var bt = root_40(), gt = child(bt),
|
|
11851
|
-
reset(bt), template_effect((Oe) => set_text(gt, `<${Oe ?? ""}${get(ht).id ? `#${get(ht).id}` : ""}> `), [() => get(ht).tagName.toLowerCase()]), delegated("click",
|
|
11852
|
-
}), reset(
|
|
11860
|
+
var Ve = root_39();
|
|
11861
|
+
each(Ve, 21, () => get(M), index, (ft, ht, _t) => {
|
|
11862
|
+
var bt = root_40(), gt = child(bt), At = sibling(gt);
|
|
11863
|
+
reset(bt), template_effect((Oe) => set_text(gt, `<${Oe ?? ""}${get(ht).id ? `#${get(ht).id}` : ""}> `), [() => get(ht).tagName.toLowerCase()]), delegated("click", At, () => me(_t)), append(ft, bt);
|
|
11864
|
+
}), reset(Ve), append(Ne, Ve);
|
|
11853
11865
|
};
|
|
11854
11866
|
if_block(nn, (Ne) => {
|
|
11855
11867
|
get(M).length > 0 && Ne(un);
|
|
11856
11868
|
});
|
|
11857
11869
|
}
|
|
11858
|
-
var Vt = sibling(nn, 2), xn = child(Vt),
|
|
11859
|
-
reset(
|
|
11870
|
+
var Vt = sibling(nn, 2), xn = child(Vt), Rt = sibling(xn, 2), Z = child(Rt, !0);
|
|
11871
|
+
reset(Rt), reset(Vt);
|
|
11860
11872
|
var re = sibling(Vt, 2);
|
|
11861
11873
|
{
|
|
11862
|
-
var
|
|
11863
|
-
var
|
|
11864
|
-
reset(
|
|
11865
|
-
},
|
|
11874
|
+
var Te = (Ne) => {
|
|
11875
|
+
var Ve = root_41(), ft = child(Ve);
|
|
11876
|
+
reset(Ve), template_effect((ht) => set_text(ft, `${ht ?? ""} more characters needed`), [() => 10 - get(I).trim().length]), append(Ne, Ve);
|
|
11877
|
+
}, ke = /* @__PURE__ */ user_derived(() => get(I).trim().length > 0 && get(I).trim().length < 10);
|
|
11866
11878
|
if_block(re, (Ne) => {
|
|
11867
|
-
get(
|
|
11879
|
+
get(ke) && Ne(Te);
|
|
11868
11880
|
});
|
|
11869
11881
|
}
|
|
11870
11882
|
reset(Qe), template_effect(
|
|
11871
11883
|
(Ne) => {
|
|
11872
|
-
Xe.disabled = get(
|
|
11884
|
+
Xe.disabled = get(A), set_text(xt, ` ${get(A) ? "..." : "Screenshot"}`), Rt.disabled = Ne, set_text(Z, get(S) === get(te).id ? "..." : "✗ Reject");
|
|
11873
11885
|
},
|
|
11874
11886
|
[
|
|
11875
11887
|
() => get(I).trim().length < 10 || get(S) === get(te).id
|
|
11876
11888
|
]
|
|
11877
|
-
), bind_value(Ke, () => get(I), (Ne) => set(I, Ne)), delegated("click", Xe, ve), delegated("click", cn, Ee), delegated("click", xn, ye), delegated("click",
|
|
11889
|
+
), bind_value(Ke, () => get(I), (Ne) => set(I, Ne)), delegated("click", Xe, ve), delegated("click", cn, Ee), delegated("click", xn, ye), delegated("click", Rt, () => Se(get(te).id, "rejected", get(I).trim())), append(st, Qe);
|
|
11878
11890
|
}, wt = (st) => {
|
|
11879
11891
|
var Qe = root_42(), Ke = child(Qe), dt = child(Ke, !0);
|
|
11880
11892
|
reset(Ke);
|
|
@@ -11914,10 +11926,10 @@ function RequestList(d, p) {
|
|
|
11914
11926
|
() => P(get(te).status)
|
|
11915
11927
|
]
|
|
11916
11928
|
), delegated("click", We, () => ce(get(te).id)), append(Le, Ye);
|
|
11917
|
-
}), reset(Ze), append(
|
|
11929
|
+
}), reset(Ze), append(Ie, Ze);
|
|
11918
11930
|
};
|
|
11919
|
-
if_block(X, (
|
|
11920
|
-
m() ?
|
|
11931
|
+
if_block(X, (Ie) => {
|
|
11932
|
+
m() ? Ie(fe) : _() && g().length === 0 ? Ie(Q, 1) : g().length === 0 ? Ie(ue, 2) : get(O).length === 0 ? Ie(be, 3) : Ie(Ue, !1);
|
|
11921
11933
|
});
|
|
11922
11934
|
}
|
|
11923
11935
|
reset(H), transition(3, H, () => slide, () => ({ duration: 200 })), append(D, H);
|
|
@@ -12000,16 +12012,16 @@ function AgentPanel(d, p) {
|
|
|
12000
12012
|
get(I).scrollTop = get(I).scrollHeight;
|
|
12001
12013
|
});
|
|
12002
12014
|
});
|
|
12003
|
-
function
|
|
12015
|
+
function R() {
|
|
12004
12016
|
var K;
|
|
12005
12017
|
const B = get(k).trim();
|
|
12006
12018
|
!B || g() === "thinking" || g() === "acting" || (set(k, ""), (K = y()) == null || K(B));
|
|
12007
12019
|
}
|
|
12008
12020
|
function M(B) {
|
|
12009
12021
|
var K;
|
|
12010
|
-
B.key === "Enter" && !B.shiftKey && (B.preventDefault(),
|
|
12022
|
+
B.key === "Enter" && !B.shiftKey && (B.preventDefault(), R()), B.key === "Escape" && (g() === "thinking" || g() === "acting") && ((K = w()) == null || K());
|
|
12011
12023
|
}
|
|
12012
|
-
function
|
|
12024
|
+
function A() {
|
|
12013
12025
|
var B;
|
|
12014
12026
|
(B = w()) == null || B();
|
|
12015
12027
|
}
|
|
@@ -12112,12 +12124,12 @@ function AgentPanel(d, p) {
|
|
|
12112
12124
|
}, ve = (B) => {
|
|
12113
12125
|
var K = text("Awaiting approval");
|
|
12114
12126
|
append(B, K);
|
|
12115
|
-
},
|
|
12127
|
+
}, Re = (B) => {
|
|
12116
12128
|
var K = text("Error");
|
|
12117
12129
|
append(B, K);
|
|
12118
12130
|
};
|
|
12119
12131
|
if_block(oe, (B) => {
|
|
12120
|
-
g() === "idle" ? B(ce) : g() === "thinking" ? B(se, 1) : g() === "acting" ? B(ye, 2) : g() === "awaiting_approval" ? B(ve, 3) : B(
|
|
12132
|
+
g() === "idle" ? B(ce) : g() === "thinking" ? B(se, 1) : g() === "acting" ? B(ye, 2) : g() === "awaiting_approval" ? B(ve, 3) : B(Re, !1);
|
|
12121
12133
|
});
|
|
12122
12134
|
}
|
|
12123
12135
|
reset(de), reset(Y);
|
|
@@ -12141,7 +12153,7 @@ function AgentPanel(d, p) {
|
|
|
12141
12153
|
}, W = (B) => {
|
|
12142
12154
|
var K = root_8$2(), pe = first_child(K);
|
|
12143
12155
|
each(pe, 17, h, (ze) => ze.id, (ze, xe) => {
|
|
12144
|
-
var
|
|
12156
|
+
var Ge = comment(), ae = first_child(Ge);
|
|
12145
12157
|
{
|
|
12146
12158
|
var V = (H) => {
|
|
12147
12159
|
var X = root_10$1();
|
|
@@ -12154,12 +12166,12 @@ function AgentPanel(d, p) {
|
|
|
12154
12166
|
}, Ue = (je) => {
|
|
12155
12167
|
var Fe = text("⏭");
|
|
12156
12168
|
append(je, Fe);
|
|
12157
|
-
},
|
|
12169
|
+
}, Ie = (je) => {
|
|
12158
12170
|
var Fe = text("?");
|
|
12159
12171
|
append(je, Fe);
|
|
12160
12172
|
};
|
|
12161
12173
|
if_block(ue, (je) => {
|
|
12162
|
-
get(xe).approvalStatus === "approved" ? je(be) : get(xe).approvalStatus === "skipped" ? je(Ue, 1) : je(
|
|
12174
|
+
get(xe).approvalStatus === "approved" ? je(be) : get(xe).approvalStatus === "skipped" ? je(Ue, 1) : je(Ie, !1);
|
|
12163
12175
|
});
|
|
12164
12176
|
}
|
|
12165
12177
|
reset(Q);
|
|
@@ -12232,9 +12244,9 @@ function AgentPanel(d, p) {
|
|
|
12232
12244
|
get(xe).role === "action" && get(xe).tool && We(Ue);
|
|
12233
12245
|
});
|
|
12234
12246
|
}
|
|
12235
|
-
var
|
|
12236
|
-
reset(
|
|
12237
|
-
var Le = sibling(
|
|
12247
|
+
var Ie = sibling(be, 2), Ze = child(Ie, !0);
|
|
12248
|
+
reset(Ie);
|
|
12249
|
+
var Le = sibling(Ie, 2);
|
|
12238
12250
|
{
|
|
12239
12251
|
var te = (We) => {
|
|
12240
12252
|
var rt = root_20$1(), Ct = child(rt, !0);
|
|
@@ -12266,7 +12278,7 @@ function AgentPanel(d, p) {
|
|
|
12266
12278
|
get(xe).role === "approval" ? H(V) : H(D, !1);
|
|
12267
12279
|
});
|
|
12268
12280
|
}
|
|
12269
|
-
append(ze,
|
|
12281
|
+
append(ze, Ge);
|
|
12270
12282
|
});
|
|
12271
12283
|
var le = sibling(pe, 2);
|
|
12272
12284
|
{
|
|
@@ -12289,7 +12301,7 @@ function AgentPanel(d, p) {
|
|
|
12289
12301
|
{
|
|
12290
12302
|
var ne = (B) => {
|
|
12291
12303
|
var K = root_23$1();
|
|
12292
|
-
delegated("click", K,
|
|
12304
|
+
delegated("click", K, A), append(B, K);
|
|
12293
12305
|
};
|
|
12294
12306
|
if_block(J, (B) => {
|
|
12295
12307
|
get(C) && B(ne);
|
|
@@ -12312,7 +12324,7 @@ function AgentPanel(d, p) {
|
|
|
12312
12324
|
), delegated("change", z, (B) => {
|
|
12313
12325
|
var K;
|
|
12314
12326
|
return (K = S()) == null ? void 0 : K(B.target.checked);
|
|
12315
|
-
}), delegated("keydown", ee, M), bind_value(ee, () => get(k), (B) => set(k, B)), delegated("click", he,
|
|
12327
|
+
}), delegated("keydown", ee, M), bind_value(ee, () => get(k), (B) => set(k, B)), delegated("click", he, R), append(d, F), pop(O);
|
|
12316
12328
|
}
|
|
12317
12329
|
delegate(["change", "click", "keydown"]);
|
|
12318
12330
|
create_custom_element(
|
|
@@ -12352,7 +12364,7 @@ const $$css$2 = {
|
|
|
12352
12364
|
};
|
|
12353
12365
|
function NotesPanel(d, p) {
|
|
12354
12366
|
push(p, !0), append_styles(d, $$css$2);
|
|
12355
|
-
let h = prop(p, "endpoint", 7), g = prop(p, "project", 7), m = prop(p, "onnoteschanged", 7), _ = /* @__PURE__ */ state(proxy([])), b = /* @__PURE__ */ state(!1), y = /* @__PURE__ */ state(""), w = /* @__PURE__ */ state(!1), x = /* @__PURE__ */ state(proxy(window.location.pathname)), E = /* @__PURE__ */ state("list"), S = /* @__PURE__ */ state(null), k = /* @__PURE__ */ state(!1), I = /* @__PURE__ */ state(""),
|
|
12367
|
+
let h = prop(p, "endpoint", 7), g = prop(p, "project", 7), m = prop(p, "onnoteschanged", 7), _ = /* @__PURE__ */ state(proxy([])), b = /* @__PURE__ */ state(!1), y = /* @__PURE__ */ state(""), w = /* @__PURE__ */ state(!1), x = /* @__PURE__ */ state(proxy(window.location.pathname)), E = /* @__PURE__ */ state("list"), S = /* @__PURE__ */ state(null), k = /* @__PURE__ */ state(!1), I = /* @__PURE__ */ state(""), R = /* @__PURE__ */ state(""), M = /* @__PURE__ */ state(null), A = /* @__PURE__ */ state(!1), C = /* @__PURE__ */ state(!1), N = /* @__PURE__ */ user_derived(() => get(_).find((z) => z.route === null)), $ = /* @__PURE__ */ user_derived(() => get(_).filter((z) => z.route !== null).sort((z, L) => (z.route || "").localeCompare(L.route || ""))), O = /* @__PURE__ */ user_derived(() => get(_).some((z) => z.route === get(x)));
|
|
12356
12368
|
async function F() {
|
|
12357
12369
|
set(b, !0), set(y, "");
|
|
12358
12370
|
const z = await fetchNotes(h(), g());
|
|
@@ -12370,10 +12382,10 @@ function NotesPanel(d, p) {
|
|
|
12370
12382
|
return () => clearInterval(z);
|
|
12371
12383
|
});
|
|
12372
12384
|
function j(z) {
|
|
12373
|
-
set(S, z, !0), set(k, !1), set(I, z.title, !0), set(
|
|
12385
|
+
set(S, z, !0), set(k, !1), set(I, z.title, !0), set(R, z.content, !0), set(M, z.route, !0), set(A, !1), set(C, !1), set(E, "edit");
|
|
12374
12386
|
}
|
|
12375
12387
|
function Y(z) {
|
|
12376
|
-
set(S, null), set(k, !0), set(I, z ? ce(z) : "Site-wide notes", !0), set(
|
|
12388
|
+
set(S, null), set(k, !0), set(I, z ? ce(z) : "Site-wide notes", !0), set(R, ""), set(M, z, !0), set(A, !1), set(C, !1), set(E, "edit");
|
|
12377
12389
|
}
|
|
12378
12390
|
function q() {
|
|
12379
12391
|
set(E, "list"), set(S, null), set(k, !1), set(C, !1);
|
|
@@ -12386,17 +12398,17 @@ function NotesPanel(d, p) {
|
|
|
12386
12398
|
project: g(),
|
|
12387
12399
|
route: get(M),
|
|
12388
12400
|
title: get(I).trim(),
|
|
12389
|
-
content: get(
|
|
12401
|
+
content: get(R)
|
|
12390
12402
|
});
|
|
12391
12403
|
P.ok && P.note ? (set(_, [...get(_), P.note], !0), (z = m()) == null || z(), q()) : set(y, P.error || "Failed to create note", !0);
|
|
12392
12404
|
} else if (get(S)) {
|
|
12393
|
-
const P = await updateNote(h(), get(S).id, { title: get(I).trim(), content: get(
|
|
12405
|
+
const P = await updateNote(h(), get(S).id, { title: get(I).trim(), content: get(R) });
|
|
12394
12406
|
P.ok ? (set(
|
|
12395
12407
|
_,
|
|
12396
12408
|
get(_).map((G) => G.id === get(S).id ? {
|
|
12397
12409
|
...G,
|
|
12398
12410
|
title: get(I).trim(),
|
|
12399
|
-
content: get(
|
|
12411
|
+
content: get(R),
|
|
12400
12412
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
12401
12413
|
} : G),
|
|
12402
12414
|
!0
|
|
@@ -12431,7 +12443,7 @@ function NotesPanel(d, p) {
|
|
|
12431
12443
|
function ve(z) {
|
|
12432
12444
|
z.key === "Escape" && get(E) === "edit" && (z.stopPropagation(), q());
|
|
12433
12445
|
}
|
|
12434
|
-
var
|
|
12446
|
+
var Re = {
|
|
12435
12447
|
get endpoint() {
|
|
12436
12448
|
return h();
|
|
12437
12449
|
},
|
|
@@ -12471,8 +12483,8 @@ function NotesPanel(d, p) {
|
|
|
12471
12483
|
reset(fe);
|
|
12472
12484
|
var ue = sibling(fe, 2), be = child(ue);
|
|
12473
12485
|
reset(ue), reset(X), reset(H), next(2), reset(D), template_effect(
|
|
12474
|
-
(Ue,
|
|
12475
|
-
set_text(Q, get(N).title || "Site-wide notes"), set_text(be, `${Ue ?? ""} line${
|
|
12486
|
+
(Ue, Ie) => {
|
|
12487
|
+
set_text(Q, get(N).title || "Site-wide notes"), set_text(be, `${Ue ?? ""} line${Ie ?? ""}`);
|
|
12476
12488
|
},
|
|
12477
12489
|
[
|
|
12478
12490
|
() => se(get(N).content),
|
|
@@ -12503,12 +12515,12 @@ function NotesPanel(d, p) {
|
|
|
12503
12515
|
let X;
|
|
12504
12516
|
var fe = child(H), Q = sibling(child(fe), 2), ue = child(Q), be = child(ue), Ue = sibling(be);
|
|
12505
12517
|
{
|
|
12506
|
-
var
|
|
12518
|
+
var Ie = (te) => {
|
|
12507
12519
|
var Ye = root_9$1();
|
|
12508
12520
|
append(te, Ye);
|
|
12509
12521
|
};
|
|
12510
12522
|
if_block(Ue, (te) => {
|
|
12511
|
-
get(D).route === get(x) && te(
|
|
12523
|
+
get(D).route === get(x) && te(Ie);
|
|
12512
12524
|
});
|
|
12513
12525
|
}
|
|
12514
12526
|
reset(ue);
|
|
@@ -12533,13 +12545,13 @@ function NotesPanel(d, p) {
|
|
|
12533
12545
|
get(O) || V(xe);
|
|
12534
12546
|
});
|
|
12535
12547
|
}
|
|
12536
|
-
var
|
|
12548
|
+
var Ge = sibling(ze, 2);
|
|
12537
12549
|
{
|
|
12538
12550
|
var ae = (V) => {
|
|
12539
12551
|
var D = root_11$1();
|
|
12540
12552
|
append(V, D);
|
|
12541
12553
|
};
|
|
12542
|
-
if_block(
|
|
12554
|
+
if_block(Ge, (V) => {
|
|
12543
12555
|
get(_).length === 0 && !get(b) && V(ae);
|
|
12544
12556
|
});
|
|
12545
12557
|
}
|
|
@@ -12563,13 +12575,13 @@ function NotesPanel(d, p) {
|
|
|
12563
12575
|
{
|
|
12564
12576
|
var pe = (Q) => {
|
|
12565
12577
|
var ue = root_13$1(), be = child(ue);
|
|
12566
|
-
html(be, () => ye(get(
|
|
12578
|
+
html(be, () => ye(get(R))), reset(ue), append(Q, ue);
|
|
12567
12579
|
}, le = (Q) => {
|
|
12568
12580
|
var ue = root_14$1(), be = sibling(child(ue), 2);
|
|
12569
|
-
remove_textarea_child(be), reset(ue), template_effect(() => be.disabled = get(w)), bind_value(be, () => get(
|
|
12581
|
+
remove_textarea_child(be), reset(ue), template_effect(() => be.disabled = get(w)), bind_value(be, () => get(R), (Ue) => set(R, Ue)), append(Q, ue);
|
|
12570
12582
|
};
|
|
12571
12583
|
if_block(K, (Q) => {
|
|
12572
|
-
get(
|
|
12584
|
+
get(A) ? Q(pe) : Q(le, !1);
|
|
12573
12585
|
});
|
|
12574
12586
|
}
|
|
12575
12587
|
var we = sibling(K, 2);
|
|
@@ -12583,7 +12595,7 @@ function NotesPanel(d, p) {
|
|
|
12583
12595
|
});
|
|
12584
12596
|
}
|
|
12585
12597
|
reset(ee);
|
|
12586
|
-
var xe = sibling(ee, 2),
|
|
12598
|
+
var xe = sibling(ee, 2), Ge = child(xe);
|
|
12587
12599
|
{
|
|
12588
12600
|
var ae = (Q) => {
|
|
12589
12601
|
var ue = root_16$1();
|
|
@@ -12593,11 +12605,11 @@ function NotesPanel(d, p) {
|
|
|
12593
12605
|
be = set_class(ue, 1, "delete-btn svelte-zp32f3", null, be, { confirm: get(C) }), ue.disabled = get(w), set_text(Ue, get(C) ? "Confirm delete?" : "Delete");
|
|
12594
12606
|
}), delegated("click", ue, oe), append(Q, ue);
|
|
12595
12607
|
};
|
|
12596
|
-
if_block(
|
|
12608
|
+
if_block(Ge, (Q) => {
|
|
12597
12609
|
get(k) || Q(ae);
|
|
12598
12610
|
});
|
|
12599
12611
|
}
|
|
12600
|
-
var V = sibling(
|
|
12612
|
+
var V = sibling(Ge, 4), D = sibling(V, 2), H = child(D);
|
|
12601
12613
|
{
|
|
12602
12614
|
var X = (Q) => {
|
|
12603
12615
|
var ue = root_17$1();
|
|
@@ -12610,16 +12622,16 @@ function NotesPanel(d, p) {
|
|
|
12610
12622
|
var fe = sibling(H);
|
|
12611
12623
|
reset(D), reset(xe), reset(L), template_effect(
|
|
12612
12624
|
(Q) => {
|
|
12613
|
-
set_text(ie, get(M) ? get(M) : "Site-wide"), ne = set_class(J, 1, "preview-toggle svelte-zp32f3", null, ne, { active: get(
|
|
12625
|
+
set_text(ie, get(M) ? get(M) : "Site-wide"), ne = set_class(J, 1, "preview-toggle svelte-zp32f3", null, ne, { active: get(A) }), set_text(ge, get(A) ? "Edit" : "Preview"), B.disabled = get(w), V.disabled = get(w), D.disabled = Q, set_text(fe, ` ${get(k) ? "Create" : "Save"}`);
|
|
12614
12626
|
},
|
|
12615
12627
|
[() => get(w) || !get(I).trim()]
|
|
12616
|
-
), delegated("click", G, q), delegated("click", J, () => set(
|
|
12628
|
+
), delegated("click", G, q), delegated("click", J, () => set(A, !get(A))), bind_value(B, () => get(I), (Q) => set(I, Q)), delegated("click", V, q), delegated("click", D, de), transition(3, L, () => slide, () => ({ duration: 200 })), append(z, L);
|
|
12617
12629
|
};
|
|
12618
12630
|
if_block(me, (z) => {
|
|
12619
12631
|
get(E) === "list" ? z(Se) : get(E) === "edit" && z(T, 1);
|
|
12620
12632
|
});
|
|
12621
12633
|
}
|
|
12622
|
-
return reset(Ee), delegated("keydown", Ee, ve), append(d, Ee), pop(
|
|
12634
|
+
return reset(Ee), delegated("keydown", Ee, ve), append(d, Ee), pop(Re);
|
|
12623
12635
|
}
|
|
12624
12636
|
delegate(["keydown", "click"]);
|
|
12625
12637
|
create_custom_element(NotesPanel, { endpoint: {}, project: {}, onnoteschanged: {} }, [], [], { mode: "open" });
|
|
@@ -13693,30 +13705,30 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (d, p) => {
|
|
|
13693
13705
|
defineLazy(d._zod, "propValues", () => {
|
|
13694
13706
|
const S = p.shape, k = {};
|
|
13695
13707
|
for (const I in S) {
|
|
13696
|
-
const
|
|
13697
|
-
if (
|
|
13708
|
+
const R = S[I]._zod;
|
|
13709
|
+
if (R.values) {
|
|
13698
13710
|
k[I] ?? (k[I] = /* @__PURE__ */ new Set());
|
|
13699
|
-
for (const M of
|
|
13711
|
+
for (const M of R.values)
|
|
13700
13712
|
k[I].add(M);
|
|
13701
13713
|
}
|
|
13702
13714
|
}
|
|
13703
13715
|
return k;
|
|
13704
13716
|
});
|
|
13705
13717
|
const g = (S) => {
|
|
13706
|
-
const k = new Doc(["shape", "payload", "ctx"]), I = h.value,
|
|
13718
|
+
const k = new Doc(["shape", "payload", "ctx"]), I = h.value, R = (N) => {
|
|
13707
13719
|
const $ = esc(N);
|
|
13708
13720
|
return `shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`;
|
|
13709
13721
|
};
|
|
13710
13722
|
k.write("const input = payload.value;");
|
|
13711
13723
|
const M = /* @__PURE__ */ Object.create(null);
|
|
13712
|
-
let
|
|
13724
|
+
let A = 0;
|
|
13713
13725
|
for (const N of I.keys)
|
|
13714
|
-
M[N] = `key_${
|
|
13726
|
+
M[N] = `key_${A++}`;
|
|
13715
13727
|
k.write("const newResult = {}");
|
|
13716
13728
|
for (const N of I.keys)
|
|
13717
13729
|
if (I.optionalKeys.has(N)) {
|
|
13718
13730
|
const $ = M[N];
|
|
13719
|
-
k.write(`const ${$} = ${
|
|
13731
|
+
k.write(`const ${$} = ${R(N)};`);
|
|
13720
13732
|
const O = esc(N);
|
|
13721
13733
|
k.write(`
|
|
13722
13734
|
if (${$}.issues.length) {
|
|
@@ -13740,7 +13752,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (d, p) => {
|
|
|
13740
13752
|
`);
|
|
13741
13753
|
} else {
|
|
13742
13754
|
const $ = M[N];
|
|
13743
|
-
k.write(`const ${$} = ${
|
|
13755
|
+
k.write(`const ${$} = ${R(N)};`), k.write(`
|
|
13744
13756
|
if (${$}.issues.length) payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
|
|
13745
13757
|
...iss,
|
|
13746
13758
|
path: iss.path ? [${esc(N)}, ...iss.path] : [${esc(N)}]
|
|
@@ -13763,7 +13775,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (d, p) => {
|
|
|
13763
13775
|
input: I,
|
|
13764
13776
|
inst: d
|
|
13765
13777
|
}), S;
|
|
13766
|
-
const
|
|
13778
|
+
const R = [];
|
|
13767
13779
|
if (b && w && (k == null ? void 0 : k.async) === !1 && k.jitless !== !0)
|
|
13768
13780
|
m || (m = g(p.shape)), S = m(S, k);
|
|
13769
13781
|
else {
|
|
@@ -13771,28 +13783,28 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (d, p) => {
|
|
|
13771
13783
|
const $ = E.shape;
|
|
13772
13784
|
for (const O of E.keys) {
|
|
13773
13785
|
const F = $[O], j = F._zod.run({ value: I[O], issues: [] }, k), Y = F._zod.optin === "optional" && F._zod.optout === "optional";
|
|
13774
|
-
j instanceof Promise ?
|
|
13786
|
+
j instanceof Promise ? R.push(j.then((q) => Y ? handleOptionalObjectResult(q, S, O, I) : handleObjectResult(q, S, O))) : Y ? handleOptionalObjectResult(j, S, O, I) : handleObjectResult(j, S, O);
|
|
13775
13787
|
}
|
|
13776
13788
|
}
|
|
13777
13789
|
if (!x)
|
|
13778
|
-
return
|
|
13779
|
-
const M = [],
|
|
13790
|
+
return R.length ? Promise.all(R).then(() => S) : S;
|
|
13791
|
+
const M = [], A = E.keySet, C = x._zod, N = C.def.type;
|
|
13780
13792
|
for (const $ of Object.keys(I)) {
|
|
13781
|
-
if (
|
|
13793
|
+
if (A.has($))
|
|
13782
13794
|
continue;
|
|
13783
13795
|
if (N === "never") {
|
|
13784
13796
|
M.push($);
|
|
13785
13797
|
continue;
|
|
13786
13798
|
}
|
|
13787
13799
|
const O = C.run({ value: I[$], issues: [] }, k);
|
|
13788
|
-
O instanceof Promise ?
|
|
13800
|
+
O instanceof Promise ? R.push(O.then((F) => handleObjectResult(F, S, $))) : handleObjectResult(O, S, $);
|
|
13789
13801
|
}
|
|
13790
13802
|
return M.length && S.issues.push({
|
|
13791
13803
|
code: "unrecognized_keys",
|
|
13792
13804
|
keys: M,
|
|
13793
13805
|
input: I,
|
|
13794
13806
|
inst: d
|
|
13795
|
-
}),
|
|
13807
|
+
}), R.length ? Promise.all(R).then(() => S) : S;
|
|
13796
13808
|
};
|
|
13797
13809
|
});
|
|
13798
13810
|
function handleUnionResults(d, p, h, g) {
|
|
@@ -14541,18 +14553,18 @@ class JSONSchemaGenerator {
|
|
|
14541
14553
|
if (w)
|
|
14542
14554
|
y.schema = w;
|
|
14543
14555
|
else {
|
|
14544
|
-
const
|
|
14556
|
+
const R = {
|
|
14545
14557
|
...h,
|
|
14546
14558
|
schemaPath: [...h.schemaPath, p],
|
|
14547
14559
|
path: h.path
|
|
14548
14560
|
}, M = p._zod.parent;
|
|
14549
14561
|
if (M)
|
|
14550
|
-
y.ref = M, this.process(M,
|
|
14562
|
+
y.ref = M, this.process(M, R), this.seen.get(M).isParent = !0;
|
|
14551
14563
|
else {
|
|
14552
|
-
const
|
|
14564
|
+
const A = y.schema;
|
|
14553
14565
|
switch (m.type) {
|
|
14554
14566
|
case "string": {
|
|
14555
|
-
const C =
|
|
14567
|
+
const C = A;
|
|
14556
14568
|
C.type = "string";
|
|
14557
14569
|
const { minimum: N, maximum: $, format: O, patterns: F, contentEncoding: j } = p._zod.bag;
|
|
14558
14570
|
if (typeof N == "number" && (C.minLength = N), typeof $ == "number" && (C.maxLength = $), O && (C.format = _[O] ?? O, C.format === "" && delete C.format), j && (C.contentEncoding = j), F && F.size > 0) {
|
|
@@ -14567,12 +14579,12 @@ class JSONSchemaGenerator {
|
|
|
14567
14579
|
break;
|
|
14568
14580
|
}
|
|
14569
14581
|
case "number": {
|
|
14570
|
-
const C =
|
|
14582
|
+
const C = A, { minimum: N, maximum: $, format: O, multipleOf: F, exclusiveMaximum: j, exclusiveMinimum: Y } = p._zod.bag;
|
|
14571
14583
|
typeof O == "string" && O.includes("int") ? C.type = "integer" : C.type = "number", typeof Y == "number" && (C.exclusiveMinimum = Y), typeof N == "number" && (C.minimum = N, typeof Y == "number" && (Y >= N ? delete C.minimum : delete C.exclusiveMinimum)), typeof j == "number" && (C.exclusiveMaximum = j), typeof $ == "number" && (C.maximum = $, typeof j == "number" && (j <= $ ? delete C.maximum : delete C.exclusiveMaximum)), typeof F == "number" && (C.multipleOf = F);
|
|
14572
14584
|
break;
|
|
14573
14585
|
}
|
|
14574
14586
|
case "boolean": {
|
|
14575
|
-
const C =
|
|
14587
|
+
const C = A;
|
|
14576
14588
|
C.type = "boolean";
|
|
14577
14589
|
break;
|
|
14578
14590
|
}
|
|
@@ -14587,7 +14599,7 @@ class JSONSchemaGenerator {
|
|
|
14587
14599
|
break;
|
|
14588
14600
|
}
|
|
14589
14601
|
case "null": {
|
|
14590
|
-
|
|
14602
|
+
A.type = "null";
|
|
14591
14603
|
break;
|
|
14592
14604
|
}
|
|
14593
14605
|
case "any":
|
|
@@ -14605,7 +14617,7 @@ class JSONSchemaGenerator {
|
|
|
14605
14617
|
break;
|
|
14606
14618
|
}
|
|
14607
14619
|
case "never": {
|
|
14608
|
-
|
|
14620
|
+
A.not = {};
|
|
14609
14621
|
break;
|
|
14610
14622
|
}
|
|
14611
14623
|
case "date": {
|
|
@@ -14614,44 +14626,44 @@ class JSONSchemaGenerator {
|
|
|
14614
14626
|
break;
|
|
14615
14627
|
}
|
|
14616
14628
|
case "array": {
|
|
14617
|
-
const C =
|
|
14618
|
-
typeof N == "number" && (C.minItems = N), typeof $ == "number" && (C.maxItems = $), C.type = "array", C.items = this.process(m.element, { ...
|
|
14629
|
+
const C = A, { minimum: N, maximum: $ } = p._zod.bag;
|
|
14630
|
+
typeof N == "number" && (C.minItems = N), typeof $ == "number" && (C.maxItems = $), C.type = "array", C.items = this.process(m.element, { ...R, path: [...R.path, "items"] });
|
|
14619
14631
|
break;
|
|
14620
14632
|
}
|
|
14621
14633
|
case "object": {
|
|
14622
|
-
const C =
|
|
14634
|
+
const C = A;
|
|
14623
14635
|
C.type = "object", C.properties = {};
|
|
14624
14636
|
const N = m.shape;
|
|
14625
14637
|
for (const F in N)
|
|
14626
14638
|
C.properties[F] = this.process(N[F], {
|
|
14627
|
-
...
|
|
14628
|
-
path: [...
|
|
14639
|
+
...R,
|
|
14640
|
+
path: [...R.path, "properties", F]
|
|
14629
14641
|
});
|
|
14630
14642
|
const $ = new Set(Object.keys(N)), O = new Set([...$].filter((F) => {
|
|
14631
14643
|
const j = m.shape[F]._zod;
|
|
14632
14644
|
return this.io === "input" ? j.optin === void 0 : j.optout === void 0;
|
|
14633
14645
|
}));
|
|
14634
14646
|
O.size > 0 && (C.required = Array.from(O)), ((I = m.catchall) == null ? void 0 : I._zod.def.type) === "never" ? C.additionalProperties = !1 : m.catchall ? m.catchall && (C.additionalProperties = this.process(m.catchall, {
|
|
14635
|
-
...
|
|
14636
|
-
path: [...
|
|
14647
|
+
...R,
|
|
14648
|
+
path: [...R.path, "additionalProperties"]
|
|
14637
14649
|
})) : this.io === "output" && (C.additionalProperties = !1);
|
|
14638
14650
|
break;
|
|
14639
14651
|
}
|
|
14640
14652
|
case "union": {
|
|
14641
|
-
const C =
|
|
14653
|
+
const C = A;
|
|
14642
14654
|
C.anyOf = m.options.map((N, $) => this.process(N, {
|
|
14643
|
-
...
|
|
14644
|
-
path: [...
|
|
14655
|
+
...R,
|
|
14656
|
+
path: [...R.path, "anyOf", $]
|
|
14645
14657
|
}));
|
|
14646
14658
|
break;
|
|
14647
14659
|
}
|
|
14648
14660
|
case "intersection": {
|
|
14649
|
-
const C =
|
|
14650
|
-
...
|
|
14651
|
-
path: [...
|
|
14661
|
+
const C = A, N = this.process(m.left, {
|
|
14662
|
+
...R,
|
|
14663
|
+
path: [...R.path, "allOf", 0]
|
|
14652
14664
|
}), $ = this.process(m.right, {
|
|
14653
|
-
...
|
|
14654
|
-
path: [...
|
|
14665
|
+
...R,
|
|
14666
|
+
path: [...R.path, "allOf", 1]
|
|
14655
14667
|
}), O = (j) => "allOf" in j && Object.keys(j).length === 1, F = [
|
|
14656
14668
|
...O(N) ? N.allOf : [N],
|
|
14657
14669
|
...O($) ? $.allOf : [$]
|
|
@@ -14660,29 +14672,29 @@ class JSONSchemaGenerator {
|
|
|
14660
14672
|
break;
|
|
14661
14673
|
}
|
|
14662
14674
|
case "tuple": {
|
|
14663
|
-
const C =
|
|
14675
|
+
const C = A;
|
|
14664
14676
|
C.type = "array";
|
|
14665
|
-
const N = m.items.map((F, j) => this.process(F, { ...
|
|
14677
|
+
const N = m.items.map((F, j) => this.process(F, { ...R, path: [...R.path, "prefixItems", j] }));
|
|
14666
14678
|
if (this.target === "draft-2020-12" ? C.prefixItems = N : C.items = N, m.rest) {
|
|
14667
14679
|
const F = this.process(m.rest, {
|
|
14668
|
-
...
|
|
14669
|
-
path: [...
|
|
14680
|
+
...R,
|
|
14681
|
+
path: [...R.path, "items"]
|
|
14670
14682
|
});
|
|
14671
14683
|
this.target === "draft-2020-12" ? C.items = F : C.additionalItems = F;
|
|
14672
14684
|
}
|
|
14673
14685
|
m.rest && (C.items = this.process(m.rest, {
|
|
14674
|
-
...
|
|
14675
|
-
path: [...
|
|
14686
|
+
...R,
|
|
14687
|
+
path: [...R.path, "items"]
|
|
14676
14688
|
}));
|
|
14677
14689
|
const { minimum: $, maximum: O } = p._zod.bag;
|
|
14678
14690
|
typeof $ == "number" && (C.minItems = $), typeof O == "number" && (C.maxItems = O);
|
|
14679
14691
|
break;
|
|
14680
14692
|
}
|
|
14681
14693
|
case "record": {
|
|
14682
|
-
const C =
|
|
14683
|
-
C.type = "object", C.propertyNames = this.process(m.keyType, { ...
|
|
14684
|
-
...
|
|
14685
|
-
path: [...
|
|
14694
|
+
const C = A;
|
|
14695
|
+
C.type = "object", C.propertyNames = this.process(m.keyType, { ...R, path: [...R.path, "propertyNames"] }), C.additionalProperties = this.process(m.valueType, {
|
|
14696
|
+
...R,
|
|
14697
|
+
path: [...R.path, "additionalProperties"]
|
|
14686
14698
|
});
|
|
14687
14699
|
break;
|
|
14688
14700
|
}
|
|
@@ -14697,12 +14709,12 @@ class JSONSchemaGenerator {
|
|
|
14697
14709
|
break;
|
|
14698
14710
|
}
|
|
14699
14711
|
case "enum": {
|
|
14700
|
-
const C =
|
|
14712
|
+
const C = A, N = getEnumValues(m.entries);
|
|
14701
14713
|
N.every(($) => typeof $ == "number") && (C.type = "number"), N.every(($) => typeof $ == "string") && (C.type = "string"), C.enum = N;
|
|
14702
14714
|
break;
|
|
14703
14715
|
}
|
|
14704
14716
|
case "literal": {
|
|
14705
|
-
const C =
|
|
14717
|
+
const C = A, N = [];
|
|
14706
14718
|
for (const $ of m.values)
|
|
14707
14719
|
if ($ === void 0) {
|
|
14708
14720
|
if (this.unrepresentable === "throw")
|
|
@@ -14721,7 +14733,7 @@ class JSONSchemaGenerator {
|
|
|
14721
14733
|
break;
|
|
14722
14734
|
}
|
|
14723
14735
|
case "file": {
|
|
14724
|
-
const C =
|
|
14736
|
+
const C = A, N = {
|
|
14725
14737
|
type: "string",
|
|
14726
14738
|
format: "binary",
|
|
14727
14739
|
contentEncoding: "binary"
|
|
@@ -14735,36 +14747,36 @@ class JSONSchemaGenerator {
|
|
|
14735
14747
|
break;
|
|
14736
14748
|
}
|
|
14737
14749
|
case "nullable": {
|
|
14738
|
-
const C = this.process(m.innerType,
|
|
14739
|
-
|
|
14750
|
+
const C = this.process(m.innerType, R);
|
|
14751
|
+
A.anyOf = [C, { type: "null" }];
|
|
14740
14752
|
break;
|
|
14741
14753
|
}
|
|
14742
14754
|
case "nonoptional": {
|
|
14743
|
-
this.process(m.innerType,
|
|
14755
|
+
this.process(m.innerType, R), y.ref = m.innerType;
|
|
14744
14756
|
break;
|
|
14745
14757
|
}
|
|
14746
14758
|
case "success": {
|
|
14747
|
-
const C =
|
|
14759
|
+
const C = A;
|
|
14748
14760
|
C.type = "boolean";
|
|
14749
14761
|
break;
|
|
14750
14762
|
}
|
|
14751
14763
|
case "default": {
|
|
14752
|
-
this.process(m.innerType,
|
|
14764
|
+
this.process(m.innerType, R), y.ref = m.innerType, A.default = JSON.parse(JSON.stringify(m.defaultValue));
|
|
14753
14765
|
break;
|
|
14754
14766
|
}
|
|
14755
14767
|
case "prefault": {
|
|
14756
|
-
this.process(m.innerType,
|
|
14768
|
+
this.process(m.innerType, R), y.ref = m.innerType, this.io === "input" && (A._prefault = JSON.parse(JSON.stringify(m.defaultValue)));
|
|
14757
14769
|
break;
|
|
14758
14770
|
}
|
|
14759
14771
|
case "catch": {
|
|
14760
|
-
this.process(m.innerType,
|
|
14772
|
+
this.process(m.innerType, R), y.ref = m.innerType;
|
|
14761
14773
|
let C;
|
|
14762
14774
|
try {
|
|
14763
14775
|
C = m.catchValue(void 0);
|
|
14764
14776
|
} catch {
|
|
14765
14777
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
14766
14778
|
}
|
|
14767
|
-
|
|
14779
|
+
A.default = C;
|
|
14768
14780
|
break;
|
|
14769
14781
|
}
|
|
14770
14782
|
case "nan": {
|
|
@@ -14773,7 +14785,7 @@ class JSONSchemaGenerator {
|
|
|
14773
14785
|
break;
|
|
14774
14786
|
}
|
|
14775
14787
|
case "template_literal": {
|
|
14776
|
-
const C =
|
|
14788
|
+
const C = A, N = p._zod.pattern;
|
|
14777
14789
|
if (!N)
|
|
14778
14790
|
throw new Error("Pattern not found in template literal");
|
|
14779
14791
|
C.type = "string", C.pattern = N.source;
|
|
@@ -14781,25 +14793,25 @@ class JSONSchemaGenerator {
|
|
|
14781
14793
|
}
|
|
14782
14794
|
case "pipe": {
|
|
14783
14795
|
const C = this.io === "input" ? m.in._zod.def.type === "transform" ? m.out : m.in : m.out;
|
|
14784
|
-
this.process(C,
|
|
14796
|
+
this.process(C, R), y.ref = C;
|
|
14785
14797
|
break;
|
|
14786
14798
|
}
|
|
14787
14799
|
case "readonly": {
|
|
14788
|
-
this.process(m.innerType,
|
|
14800
|
+
this.process(m.innerType, R), y.ref = m.innerType, A.readOnly = !0;
|
|
14789
14801
|
break;
|
|
14790
14802
|
}
|
|
14791
14803
|
// passthrough types
|
|
14792
14804
|
case "promise": {
|
|
14793
|
-
this.process(m.innerType,
|
|
14805
|
+
this.process(m.innerType, R), y.ref = m.innerType;
|
|
14794
14806
|
break;
|
|
14795
14807
|
}
|
|
14796
14808
|
case "optional": {
|
|
14797
|
-
this.process(m.innerType,
|
|
14809
|
+
this.process(m.innerType, R), y.ref = m.innerType;
|
|
14798
14810
|
break;
|
|
14799
14811
|
}
|
|
14800
14812
|
case "lazy": {
|
|
14801
14813
|
const C = p._zod.innerType;
|
|
14802
|
-
this.process(C,
|
|
14814
|
+
this.process(C, R), y.ref = C;
|
|
14803
14815
|
break;
|
|
14804
14816
|
}
|
|
14805
14817
|
case "custom": {
|
|
@@ -14814,7 +14826,7 @@ class JSONSchemaGenerator {
|
|
|
14814
14826
|
return x && Object.assign(y.schema, x), this.io === "input" && isTransforming(p) && (delete y.schema.examples, delete y.schema.default), this.io === "input" && y.schema._prefault && ((g = y.schema).default ?? (g.default = y.schema._prefault)), delete y.schema._prefault, this.seen.get(p).schema;
|
|
14815
14827
|
}
|
|
14816
14828
|
emit(p, h) {
|
|
14817
|
-
var E, S, k, I,
|
|
14829
|
+
var E, S, k, I, R, M;
|
|
14818
14830
|
const g = {
|
|
14819
14831
|
cycles: (h == null ? void 0 : h.cycles) ?? "ref",
|
|
14820
14832
|
reused: (h == null ? void 0 : h.reused) ?? "inline",
|
|
@@ -14824,24 +14836,24 @@ class JSONSchemaGenerator {
|
|
|
14824
14836
|
}, m = this.seen.get(p);
|
|
14825
14837
|
if (!m)
|
|
14826
14838
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
14827
|
-
const _ = (
|
|
14839
|
+
const _ = (A) => {
|
|
14828
14840
|
var F;
|
|
14829
14841
|
const C = this.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
14830
14842
|
if (g.external) {
|
|
14831
|
-
const j = (F = g.external.registry.get(
|
|
14843
|
+
const j = (F = g.external.registry.get(A[0])) == null ? void 0 : F.id, Y = g.external.uri ?? ((de) => de);
|
|
14832
14844
|
if (j)
|
|
14833
14845
|
return { ref: Y(j) };
|
|
14834
|
-
const q =
|
|
14835
|
-
return
|
|
14846
|
+
const q = A[1].defId ?? A[1].schema.id ?? `schema${this.counter++}`;
|
|
14847
|
+
return A[1].defId = q, { defId: q, ref: `${Y("__shared")}#/${C}/${q}` };
|
|
14836
14848
|
}
|
|
14837
|
-
if (
|
|
14849
|
+
if (A[1] === m)
|
|
14838
14850
|
return { ref: "#" };
|
|
14839
|
-
const $ = `#/${C}/`, O =
|
|
14851
|
+
const $ = `#/${C}/`, O = A[1].schema.id ?? `__schema${this.counter++}`;
|
|
14840
14852
|
return { defId: O, ref: $ + O };
|
|
14841
|
-
}, b = (
|
|
14842
|
-
if (
|
|
14853
|
+
}, b = (A) => {
|
|
14854
|
+
if (A[1].schema.$ref)
|
|
14843
14855
|
return;
|
|
14844
|
-
const C =
|
|
14856
|
+
const C = A[1], { ref: N, defId: $ } = _(A);
|
|
14845
14857
|
C.def = { ...C.schema }, $ && (C.defId = $);
|
|
14846
14858
|
const O = C.schema;
|
|
14847
14859
|
for (const F in O)
|
|
@@ -14849,41 +14861,41 @@ class JSONSchemaGenerator {
|
|
|
14849
14861
|
O.$ref = N;
|
|
14850
14862
|
};
|
|
14851
14863
|
if (g.cycles === "throw")
|
|
14852
|
-
for (const
|
|
14853
|
-
const C =
|
|
14864
|
+
for (const A of this.seen.entries()) {
|
|
14865
|
+
const C = A[1];
|
|
14854
14866
|
if (C.cycle)
|
|
14855
14867
|
throw new Error(`Cycle detected: #/${(E = C.cycle) == null ? void 0 : E.join("/")}/<root>
|
|
14856
14868
|
|
|
14857
14869
|
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
14858
14870
|
}
|
|
14859
|
-
for (const
|
|
14860
|
-
const C =
|
|
14861
|
-
if (p ===
|
|
14862
|
-
b(
|
|
14871
|
+
for (const A of this.seen.entries()) {
|
|
14872
|
+
const C = A[1];
|
|
14873
|
+
if (p === A[0]) {
|
|
14874
|
+
b(A);
|
|
14863
14875
|
continue;
|
|
14864
14876
|
}
|
|
14865
14877
|
if (g.external) {
|
|
14866
|
-
const $ = (S = g.external.registry.get(
|
|
14867
|
-
if (p !==
|
|
14868
|
-
b(
|
|
14878
|
+
const $ = (S = g.external.registry.get(A[0])) == null ? void 0 : S.id;
|
|
14879
|
+
if (p !== A[0] && $) {
|
|
14880
|
+
b(A);
|
|
14869
14881
|
continue;
|
|
14870
14882
|
}
|
|
14871
14883
|
}
|
|
14872
|
-
if ((k = this.metadataRegistry.get(
|
|
14873
|
-
b(
|
|
14884
|
+
if ((k = this.metadataRegistry.get(A[0])) == null ? void 0 : k.id) {
|
|
14885
|
+
b(A);
|
|
14874
14886
|
continue;
|
|
14875
14887
|
}
|
|
14876
14888
|
if (C.cycle) {
|
|
14877
|
-
b(
|
|
14889
|
+
b(A);
|
|
14878
14890
|
continue;
|
|
14879
14891
|
}
|
|
14880
14892
|
if (C.count > 1 && g.reused === "ref") {
|
|
14881
|
-
b(
|
|
14893
|
+
b(A);
|
|
14882
14894
|
continue;
|
|
14883
14895
|
}
|
|
14884
14896
|
}
|
|
14885
|
-
const y = (
|
|
14886
|
-
const N = this.seen.get(
|
|
14897
|
+
const y = (A, C) => {
|
|
14898
|
+
const N = this.seen.get(A), $ = N.def ?? N.schema, O = { ...$ };
|
|
14887
14899
|
if (N.ref === null)
|
|
14888
14900
|
return;
|
|
14889
14901
|
const F = N.ref;
|
|
@@ -14893,24 +14905,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14893
14905
|
j.$ref && C.target === "draft-7" ? ($.allOf = $.allOf ?? [], $.allOf.push(j)) : (Object.assign($, j), Object.assign($, O));
|
|
14894
14906
|
}
|
|
14895
14907
|
N.isParent || this.override({
|
|
14896
|
-
zodSchema:
|
|
14908
|
+
zodSchema: A,
|
|
14897
14909
|
jsonSchema: $,
|
|
14898
14910
|
path: N.path ?? []
|
|
14899
14911
|
});
|
|
14900
14912
|
};
|
|
14901
|
-
for (const
|
|
14902
|
-
y(
|
|
14913
|
+
for (const A of [...this.seen.entries()].reverse())
|
|
14914
|
+
y(A[0], { target: this.target });
|
|
14903
14915
|
const w = {};
|
|
14904
14916
|
if (this.target === "draft-2020-12" ? w.$schema = "https://json-schema.org/draft/2020-12/schema" : this.target === "draft-7" ? w.$schema = "http://json-schema.org/draft-07/schema#" : console.warn(`Invalid target: ${this.target}`), (I = g.external) != null && I.uri) {
|
|
14905
|
-
const
|
|
14906
|
-
if (!
|
|
14917
|
+
const A = (R = g.external.registry.get(p)) == null ? void 0 : R.id;
|
|
14918
|
+
if (!A)
|
|
14907
14919
|
throw new Error("Schema is missing an `id` property");
|
|
14908
|
-
w.$id = g.external.uri(
|
|
14920
|
+
w.$id = g.external.uri(A);
|
|
14909
14921
|
}
|
|
14910
14922
|
Object.assign(w, m.def);
|
|
14911
14923
|
const x = ((M = g.external) == null ? void 0 : M.defs) ?? {};
|
|
14912
|
-
for (const
|
|
14913
|
-
const C =
|
|
14924
|
+
for (const A of this.seen.entries()) {
|
|
14925
|
+
const C = A[1];
|
|
14914
14926
|
C.def && C.defId && (x[C.defId] = C.def);
|
|
14915
14927
|
}
|
|
14916
14928
|
g.external || Object.keys(x).length > 0 && (this.target === "draft-2020-12" ? w.$defs = x : w.definitions = x);
|
|
@@ -15436,13 +15448,13 @@ const InvokeErrorType = {
|
|
|
15436
15448
|
}, _InvokeError = class extends Error {
|
|
15437
15449
|
constructor(h, g, m, _) {
|
|
15438
15450
|
super(g);
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
|
|
15451
|
+
Ce(this, "type");
|
|
15452
|
+
Ce(this, "retryable");
|
|
15453
|
+
Ce(this, "statusCode");
|
|
15442
15454
|
/* raw error (provided if this error is caused by another error) */
|
|
15443
|
-
|
|
15455
|
+
Ce(this, "rawError");
|
|
15444
15456
|
/* raw response from the API (provided if this error is caused by an API calling) */
|
|
15445
|
-
|
|
15457
|
+
Ce(this, "rawResponse");
|
|
15446
15458
|
this.name = "InvokeError", this.type = h, this.retryable = this.isRetryable(h, m), this.rawError = m, this.rawResponse = _;
|
|
15447
15459
|
}
|
|
15448
15460
|
isRetryable(h, g) {
|
|
@@ -15488,12 +15500,12 @@ function normalizeModelName(d) {
|
|
|
15488
15500
|
__name$3(normalizeModelName, "normalizeModelName");
|
|
15489
15501
|
const _OpenAIClient = class {
|
|
15490
15502
|
constructor(p) {
|
|
15491
|
-
|
|
15492
|
-
|
|
15503
|
+
Ce(this, "config");
|
|
15504
|
+
Ce(this, "fetch");
|
|
15493
15505
|
this.config = p, this.fetch = p.customFetch;
|
|
15494
15506
|
}
|
|
15495
15507
|
async invoke(p, h, g, m) {
|
|
15496
|
-
var $, O, F, j, Y, q, de, oe, ce, se, ye, ve,
|
|
15508
|
+
var $, O, F, j, Y, q, de, oe, ce, se, ye, ve, Re, Ee, me, Se, T, z;
|
|
15497
15509
|
const _ = Object.entries(h).map(([L, P]) => zodToOpenAITool(L, P)), b = {
|
|
15498
15510
|
model: this.config.model,
|
|
15499
15511
|
temperature: this.config.temperature,
|
|
@@ -15586,8 +15598,8 @@ const _OpenAIClient = class {
|
|
|
15586
15598
|
void 0,
|
|
15587
15599
|
w
|
|
15588
15600
|
);
|
|
15589
|
-
const
|
|
15590
|
-
if (!
|
|
15601
|
+
const R = (ye = (se = (ce = (oe = S.message) == null ? void 0 : oe.tool_calls) == null ? void 0 : ce[0]) == null ? void 0 : se.function) == null ? void 0 : ye.arguments;
|
|
15602
|
+
if (!R)
|
|
15591
15603
|
throw new InvokeError(
|
|
15592
15604
|
InvokeErrorType.INVALID_TOOL_ARGS,
|
|
15593
15605
|
"No tool call arguments found",
|
|
@@ -15596,7 +15608,7 @@ const _OpenAIClient = class {
|
|
|
15596
15608
|
);
|
|
15597
15609
|
let M;
|
|
15598
15610
|
try {
|
|
15599
|
-
M = JSON.parse(
|
|
15611
|
+
M = JSON.parse(R);
|
|
15600
15612
|
} catch (L) {
|
|
15601
15613
|
throw new InvokeError(
|
|
15602
15614
|
InvokeErrorType.INVALID_TOOL_ARGS,
|
|
@@ -15605,15 +15617,15 @@ const _OpenAIClient = class {
|
|
|
15605
15617
|
w
|
|
15606
15618
|
);
|
|
15607
15619
|
}
|
|
15608
|
-
const
|
|
15609
|
-
if (!
|
|
15610
|
-
throw console.error(prettifyError(
|
|
15620
|
+
const A = I.inputSchema.safeParse(M);
|
|
15621
|
+
if (!A.success)
|
|
15622
|
+
throw console.error(prettifyError(A.error)), new InvokeError(
|
|
15611
15623
|
InvokeErrorType.INVALID_TOOL_ARGS,
|
|
15612
15624
|
"Tool arguments validation failed",
|
|
15613
|
-
|
|
15625
|
+
A.error,
|
|
15614
15626
|
w
|
|
15615
15627
|
);
|
|
15616
|
-
const C =
|
|
15628
|
+
const C = A.data;
|
|
15617
15629
|
let N;
|
|
15618
15630
|
try {
|
|
15619
15631
|
N = await I.execute(C);
|
|
@@ -15633,7 +15645,7 @@ const _OpenAIClient = class {
|
|
|
15633
15645
|
toolResult: N,
|
|
15634
15646
|
usage: {
|
|
15635
15647
|
promptTokens: ((ve = w.usage) == null ? void 0 : ve.prompt_tokens) ?? 0,
|
|
15636
|
-
completionTokens: ((
|
|
15648
|
+
completionTokens: ((Re = w.usage) == null ? void 0 : Re.completion_tokens) ?? 0,
|
|
15637
15649
|
totalTokens: ((Ee = w.usage) == null ? void 0 : Ee.total_tokens) ?? 0,
|
|
15638
15650
|
cachedTokens: (Se = (me = w.usage) == null ? void 0 : me.prompt_tokens_details) == null ? void 0 : Se.cached_tokens,
|
|
15639
15651
|
reasoningTokens: (z = (T = w.usage) == null ? void 0 : T.completion_tokens_details) == null ? void 0 : z.reasoning_tokens
|
|
@@ -15665,8 +15677,8 @@ __name$3(parseLLMConfig, "parseLLMConfig");
|
|
|
15665
15677
|
const _LLM = class extends EventTarget {
|
|
15666
15678
|
constructor(h) {
|
|
15667
15679
|
super();
|
|
15668
|
-
|
|
15669
|
-
|
|
15680
|
+
Ce(this, "config");
|
|
15681
|
+
Ce(this, "client");
|
|
15670
15682
|
this.config = parseLLMConfig(h), this.client = new OpenAIClient(this.config);
|
|
15671
15683
|
}
|
|
15672
15684
|
/**
|
|
@@ -16215,19 +16227,19 @@ const _PageAgentCore = class extends EventTarget {
|
|
|
16215
16227
|
const k = await __privateGet$1(this, _llm).invoke(E, S, __privateGet$1(this, _abortController).signal, {
|
|
16216
16228
|
toolChoiceName: "AgentOutput",
|
|
16217
16229
|
normalizeResponse: /* @__PURE__ */ __name$2(($) => normalizeResponse($, this.tools), "normalizeResponse")
|
|
16218
|
-
}), I = k.toolResult,
|
|
16219
|
-
evaluation_previous_goal:
|
|
16220
|
-
memory:
|
|
16221
|
-
next_goal:
|
|
16222
|
-
}, C = Object.keys(
|
|
16230
|
+
}), I = k.toolResult, R = I.input, M = I.output, A = {
|
|
16231
|
+
evaluation_previous_goal: R.evaluation_previous_goal,
|
|
16232
|
+
memory: R.memory,
|
|
16233
|
+
next_goal: R.next_goal
|
|
16234
|
+
}, C = Object.keys(R.action)[0], N = {
|
|
16223
16235
|
name: C,
|
|
16224
|
-
input:
|
|
16236
|
+
input: R.action[C],
|
|
16225
16237
|
output: M
|
|
16226
16238
|
};
|
|
16227
16239
|
if (this.history.push({
|
|
16228
16240
|
type: "step",
|
|
16229
16241
|
stepIndex: b,
|
|
16230
|
-
reflection:
|
|
16242
|
+
reflection: A,
|
|
16231
16243
|
action: N,
|
|
16232
16244
|
usage: k.usage,
|
|
16233
16245
|
rawResponse: k.rawResponse,
|
|
@@ -16524,8 +16536,8 @@ async function scrollVertically(d, p, h) {
|
|
|
16524
16536
|
let w = y, x = !1, E = null, S = 0, k = 0;
|
|
16525
16537
|
const I = p;
|
|
16526
16538
|
for (; w && k < 10; ) {
|
|
16527
|
-
const
|
|
16528
|
-
if (M &&
|
|
16539
|
+
const R = window.getComputedStyle(w), M = /(auto|scroll|overlay)/.test(R.overflowY), A = w.scrollHeight > w.clientHeight;
|
|
16540
|
+
if (M && A) {
|
|
16529
16541
|
const C = w.scrollTop, N = w.scrollHeight - w.clientHeight;
|
|
16530
16542
|
let $ = I / 3;
|
|
16531
16543
|
$ > 0 ? $ = Math.min($, N - C) : $ = Math.max($, -C), w.scrollTop = C + $;
|
|
@@ -16569,8 +16581,8 @@ async function scrollHorizontally(d, p, h) {
|
|
|
16569
16581
|
let w = y, x = !1, E = null, S = 0, k = 0;
|
|
16570
16582
|
const I = d ? p : -p;
|
|
16571
16583
|
for (; w && k < 10; ) {
|
|
16572
|
-
const
|
|
16573
|
-
if (M &&
|
|
16584
|
+
const R = window.getComputedStyle(w), M = /(auto|scroll|overlay)/.test(R.overflowX), A = w.scrollWidth > w.clientWidth;
|
|
16585
|
+
if (M && A) {
|
|
16574
16586
|
const C = w.scrollLeft, N = w.scrollWidth - w.clientWidth;
|
|
16575
16587
|
let $ = I / 3;
|
|
16576
16588
|
$ > 0 ? $ = Math.min($, N - C) : $ = Math.max($, -C), w.scrollLeft = C + $;
|
|
@@ -16646,14 +16658,14 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
16646
16658
|
return z && k.boundingRects.set(T, z), z;
|
|
16647
16659
|
}
|
|
16648
16660
|
__name$1(I, "getCachedBoundingRect");
|
|
16649
|
-
function
|
|
16661
|
+
function R(T) {
|
|
16650
16662
|
if (!T) return null;
|
|
16651
16663
|
if (k.computedStyles.has(T))
|
|
16652
16664
|
return k.computedStyles.get(T);
|
|
16653
16665
|
const z = window.getComputedStyle(T);
|
|
16654
16666
|
return z && k.computedStyles.set(T, z), z;
|
|
16655
16667
|
}
|
|
16656
|
-
__name$1(
|
|
16668
|
+
__name$1(R, "getCachedComputedStyle");
|
|
16657
16669
|
function M(T) {
|
|
16658
16670
|
if (!T) return null;
|
|
16659
16671
|
if (k.clientRects.has(T))
|
|
@@ -16662,7 +16674,7 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
16662
16674
|
return z && k.clientRects.set(T, z), z;
|
|
16663
16675
|
}
|
|
16664
16676
|
__name$1(M, "getCachedClientRects");
|
|
16665
|
-
const
|
|
16677
|
+
const A = {}, C = { current: 0 }, N = "playwright-highlight-container";
|
|
16666
16678
|
function $(T, z, L = null) {
|
|
16667
16679
|
if (!T) return z;
|
|
16668
16680
|
const P = [];
|
|
@@ -16705,8 +16717,8 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
16705
16717
|
const we = ge[0];
|
|
16706
16718
|
G = document.createElement("div"), G.className = "playwright-highlight-label", G.style.position = "fixed", G.style.background = B, G.style.color = "white", G.style.padding = "1px 4px", G.style.borderRadius = "4px", G.style.fontSize = `${Math.min(12, Math.max(8, we.height / 2))}px`, G.textContent = z.toString(), W = G.offsetWidth > 0 ? G.offsetWidth : W, ie = G.offsetHeight > 0 ? G.offsetHeight : ie;
|
|
16707
16719
|
const ze = we.top + pe.y, xe = we.left + pe.x;
|
|
16708
|
-
let
|
|
16709
|
-
(we.width < W + 4 || we.height < ie + 4) && (
|
|
16720
|
+
let Ge = ze + 2, ae = xe + we.width - W - 2;
|
|
16721
|
+
(we.width < W + 4 || we.height < ie + 4) && (Ge = ze - ie - 2, ae = xe + we.width - W, ae < pe.x && (ae = xe)), Ge = Math.max(0, Math.min(Ge, window.innerHeight - ie)), ae = Math.max(0, Math.min(ae, window.innerWidth - W)), G.style.top = `${Ge}px`, G.style.left = `${ae}px`, le.appendChild(G);
|
|
16710
16722
|
const H = (/* @__PURE__ */ __name$1((X, fe) => {
|
|
16711
16723
|
let Q = 0;
|
|
16712
16724
|
return (...ue) => {
|
|
@@ -16723,8 +16735,8 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
16723
16735
|
}
|
|
16724
16736
|
if (P.forEach((Q, ue) => {
|
|
16725
16737
|
if (ue < X.length) {
|
|
16726
|
-
const be = X[ue], Ue = be.top + fe.y,
|
|
16727
|
-
Q.element.style.top = `${Ue}px`, Q.element.style.left = `${
|
|
16738
|
+
const be = X[ue], Ue = be.top + fe.y, Ie = be.left + fe.x;
|
|
16739
|
+
Q.element.style.top = `${Ue}px`, Q.element.style.left = `${Ie}px`, Q.element.style.width = `${be.width}px`, Q.element.style.height = `${be.height}px`, Q.element.style.display = be.width === 0 || be.height === 0 ? "none" : "block";
|
|
16728
16740
|
} else
|
|
16729
16741
|
Q.element.style.display = "none";
|
|
16730
16742
|
}), X.length < P.length)
|
|
@@ -16732,8 +16744,8 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
16732
16744
|
P[Q].element.style.display = "none";
|
|
16733
16745
|
if (G && X.length > 0) {
|
|
16734
16746
|
const Q = X[0], ue = Q.top + fe.y, be = Q.left + fe.x;
|
|
16735
|
-
let Ue = ue + 2,
|
|
16736
|
-
(Q.width < W + 4 || Q.height < ie + 4) && (Ue = ue - ie - 2,
|
|
16747
|
+
let Ue = ue + 2, Ie = be + Q.width - W - 2;
|
|
16748
|
+
(Q.width < W + 4 || Q.height < ie + 4) && (Ue = ue - ie - 2, Ie = be + Q.width - W, Ie < fe.x && (Ie = be)), Ue = Math.max(0, Math.min(Ue, window.innerHeight - ie)), Ie = Math.max(0, Math.min(Ie, window.innerWidth - W)), G.style.top = `${Ue}px`, G.style.left = `${Ie}px`, G.style.display = "block";
|
|
16737
16749
|
} else G && (G.style.display = "none");
|
|
16738
16750
|
}, "updatePositions"), 16);
|
|
16739
16751
|
return window.addEventListener("scroll", H, !0), window.addEventListener("resize", H), J = /* @__PURE__ */ __name$1(() => {
|
|
@@ -16749,7 +16761,7 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
16749
16761
|
function O(T) {
|
|
16750
16762
|
if (!T || T.nodeType !== Node.ELEMENT_NODE)
|
|
16751
16763
|
return null;
|
|
16752
|
-
const z =
|
|
16764
|
+
const z = R(T);
|
|
16753
16765
|
if (!z) return null;
|
|
16754
16766
|
const L = z.display;
|
|
16755
16767
|
if (L === "inline" || L === "inline-block")
|
|
@@ -16840,7 +16852,7 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
16840
16852
|
}
|
|
16841
16853
|
__name$1(j, "isElementAccepted");
|
|
16842
16854
|
function Y(T) {
|
|
16843
|
-
const z =
|
|
16855
|
+
const z = R(T);
|
|
16844
16856
|
return T.offsetWidth > 0 && T.offsetHeight > 0 && (z == null ? void 0 : z.visibility) !== "hidden" && (z == null ? void 0 : z.display) !== "none";
|
|
16845
16857
|
}
|
|
16846
16858
|
__name$1(Y, "isElementVisible");
|
|
@@ -16850,7 +16862,7 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
16850
16862
|
return !1;
|
|
16851
16863
|
if (h.includes(T))
|
|
16852
16864
|
return !0;
|
|
16853
|
-
const z = T.tagName.toLowerCase(), L =
|
|
16865
|
+
const z = T.tagName.toLowerCase(), L = R(T), P = /* @__PURE__ */ new Set([
|
|
16854
16866
|
"pointer",
|
|
16855
16867
|
// Link/clickable elements
|
|
16856
16868
|
"move",
|
|
@@ -17025,8 +17037,8 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
17025
17037
|
try {
|
|
17026
17038
|
if (typeof getEventListeners == "function") {
|
|
17027
17039
|
const ze = getEventListeners(T), xe = ["click", "mousedown", "mouseup", "dblclick"];
|
|
17028
|
-
for (const
|
|
17029
|
-
if (ze[
|
|
17040
|
+
for (const Ge of xe)
|
|
17041
|
+
if (ze[Ge] && ze[Ge].length > 0)
|
|
17030
17042
|
return !0;
|
|
17031
17043
|
}
|
|
17032
17044
|
const le = ((pe = (K = T == null ? void 0 : T.ownerDocument) == null ? void 0 : K.defaultView) == null ? void 0 : pe.getEventListenersForNode) || window.getEventListenersForNode;
|
|
@@ -17043,9 +17055,9 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
17043
17055
|
"focus",
|
|
17044
17056
|
"blur"
|
|
17045
17057
|
];
|
|
17046
|
-
for (const
|
|
17058
|
+
for (const Ge of xe)
|
|
17047
17059
|
for (const ae of ze)
|
|
17048
|
-
if (ae.type ===
|
|
17060
|
+
if (ae.type === Ge)
|
|
17049
17061
|
return !0;
|
|
17050
17062
|
}
|
|
17051
17063
|
const we = ["onclick", "onmousedown", "onmouseup", "ondblclick"];
|
|
@@ -17185,7 +17197,7 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
17185
17197
|
return (q(T) || z || L) && G && P && !W;
|
|
17186
17198
|
}
|
|
17187
17199
|
__name$1(ve, "isHeuristicallyInteractive");
|
|
17188
|
-
function
|
|
17200
|
+
function Re(T) {
|
|
17189
17201
|
var P, G;
|
|
17190
17202
|
if (!T || T.nodeType !== Node.ELEMENT_NODE)
|
|
17191
17203
|
return !1;
|
|
@@ -17228,11 +17240,11 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
17228
17240
|
}
|
|
17229
17241
|
return !!ve(T);
|
|
17230
17242
|
}
|
|
17231
|
-
__name$1(
|
|
17243
|
+
__name$1(Re, "isElementDistinctInteraction");
|
|
17232
17244
|
function Ee(T, z, L, P) {
|
|
17233
17245
|
if (!T.isInteractive) return !1;
|
|
17234
17246
|
let G = !1;
|
|
17235
|
-
return P ?
|
|
17247
|
+
return P ? Re(z) ? G = !0 : G = !1 : G = !0, G && (T.isInViewport = oe(z, y), (T.isInViewport || y === -1) && (T.highlightIndex = x++, _)) ? (b >= 0 ? b === T.highlightIndex && $(z, T.highlightIndex, L) : $(z, T.highlightIndex, L), !0) : !1;
|
|
17236
17248
|
}
|
|
17237
17249
|
__name$1(Ee, "handleHighlighting");
|
|
17238
17250
|
function me(T, z = null, L = !1) {
|
|
@@ -17251,7 +17263,7 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
17251
17263
|
we && K.children.push(we);
|
|
17252
17264
|
}
|
|
17253
17265
|
const pe = `${C.current++}`;
|
|
17254
|
-
return
|
|
17266
|
+
return A[pe] = K, pe;
|
|
17255
17267
|
}
|
|
17256
17268
|
if (T.nodeType !== Node.ELEMENT_NODE && T.nodeType !== Node.TEXT_NODE)
|
|
17257
17269
|
return null;
|
|
@@ -17263,7 +17275,7 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
17263
17275
|
if (!pe || pe.tagName.toLowerCase() === "script")
|
|
17264
17276
|
return null;
|
|
17265
17277
|
const le = `${C.current++}`;
|
|
17266
|
-
return
|
|
17278
|
+
return A[le] = {
|
|
17267
17279
|
type: "TEXT_NODE",
|
|
17268
17280
|
text: K,
|
|
17269
17281
|
isVisible: F(T)
|
|
@@ -17272,7 +17284,7 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
17272
17284
|
if (T.nodeType === Node.ELEMENT_NODE && !j(T))
|
|
17273
17285
|
return null;
|
|
17274
17286
|
if (y !== -1 && !T.shadowRoot) {
|
|
17275
|
-
const K = I(T), pe =
|
|
17287
|
+
const K = I(T), pe = R(T), le = pe && (pe.position === "fixed" || pe.position === "sticky"), we = T.offsetWidth > 0 || T.offsetHeight > 0;
|
|
17276
17288
|
if (!K || !le && !we && (K.bottom < -y || K.top > window.innerHeight + y || K.right < -y || K.left > window.innerWidth + y))
|
|
17277
17289
|
return null;
|
|
17278
17290
|
}
|
|
@@ -17344,11 +17356,11 @@ const domTree = /* @__PURE__ */ __name$1((d = {
|
|
|
17344
17356
|
}
|
|
17345
17357
|
P.extra = E.get(T) || null;
|
|
17346
17358
|
const W = `${C.current++}`;
|
|
17347
|
-
return
|
|
17359
|
+
return A[W] = P, W;
|
|
17348
17360
|
}
|
|
17349
17361
|
__name$1(me, "buildDomTree");
|
|
17350
17362
|
const Se = me(document.body);
|
|
17351
|
-
return k.clearCache(), { rootId: Se, map:
|
|
17363
|
+
return k.clearCache(), { rootId: Se, map: A };
|
|
17352
17364
|
}, "domTree"), DEFAULT_VIEWPORT_EXPANSION = -1;
|
|
17353
17365
|
function resolveViewportExpansion(d) {
|
|
17354
17366
|
return d ?? DEFAULT_VIEWPORT_EXPANSION;
|
|
@@ -17445,11 +17457,11 @@ function flatTreeToString(d, p) {
|
|
|
17445
17457
|
children: []
|
|
17446
17458
|
};
|
|
17447
17459
|
} else {
|
|
17448
|
-
const I = k,
|
|
17460
|
+
const I = k, R = [];
|
|
17449
17461
|
if (I.children)
|
|
17450
17462
|
for (const M of I.children) {
|
|
17451
|
-
const
|
|
17452
|
-
|
|
17463
|
+
const A = _(M);
|
|
17464
|
+
A && (A.parent = null, R.push(A));
|
|
17453
17465
|
}
|
|
17454
17466
|
return {
|
|
17455
17467
|
type: "element",
|
|
@@ -17461,7 +17473,7 @@ function flatTreeToString(d, p) {
|
|
|
17461
17473
|
isNew: I.isNew ?? !1,
|
|
17462
17474
|
highlightIndex: I.highlightIndex,
|
|
17463
17475
|
parent: null,
|
|
17464
|
-
children:
|
|
17476
|
+
children: R,
|
|
17465
17477
|
extra: I.extra ?? {}
|
|
17466
17478
|
};
|
|
17467
17479
|
}
|
|
@@ -17481,12 +17493,12 @@ function flatTreeToString(d, p) {
|
|
|
17481
17493
|
}
|
|
17482
17494
|
return !1;
|
|
17483
17495
|
}, "hasParentWithHighlightIndex"), x = /* @__PURE__ */ __name$1((S, k, I) => {
|
|
17484
|
-
var
|
|
17485
|
-
let
|
|
17496
|
+
var A, C, N, $;
|
|
17497
|
+
let R = k;
|
|
17486
17498
|
const M = " ".repeat(k);
|
|
17487
17499
|
if (S.type === "element") {
|
|
17488
17500
|
if (S.highlightIndex !== void 0) {
|
|
17489
|
-
|
|
17501
|
+
R += 1;
|
|
17490
17502
|
const O = getAllTextTillNextClickableElement(S);
|
|
17491
17503
|
let F = "";
|
|
17492
17504
|
if (g.length > 0 && S.attributes) {
|
|
@@ -17510,7 +17522,7 @@ function flatTreeToString(d, p) {
|
|
|
17510
17522
|
let Y = `${M}${j}<${S.tagName ?? ""}`;
|
|
17511
17523
|
if (F && (Y += ` ${F}`), S.extra && S.extra.scrollable) {
|
|
17512
17524
|
let q = "";
|
|
17513
|
-
(
|
|
17525
|
+
(A = S.extra.scrollData) != null && A.left && (q += `left=${S.extra.scrollData.left}, `), (C = S.extra.scrollData) != null && C.top && (q += `top=${S.extra.scrollData.top}, `), (N = S.extra.scrollData) != null && N.right && (q += `right=${S.extra.scrollData.right}, `), ($ = S.extra.scrollData) != null && $.bottom && (q += `bottom=${S.extra.scrollData.bottom}`), Y += ` data-scrollable="${q}"`;
|
|
17514
17526
|
}
|
|
17515
17527
|
if (O) {
|
|
17516
17528
|
const q = O.trim();
|
|
@@ -17519,7 +17531,7 @@ function flatTreeToString(d, p) {
|
|
|
17519
17531
|
Y += " />", I.push(Y);
|
|
17520
17532
|
}
|
|
17521
17533
|
for (const O of S.children)
|
|
17522
|
-
x(O,
|
|
17534
|
+
x(O, R, I);
|
|
17523
17535
|
} else if (S.type === "text") {
|
|
17524
17536
|
if (w(S))
|
|
17525
17537
|
return;
|
|
@@ -17629,28 +17641,28 @@ __name$1(patchReact, "patchReact");
|
|
|
17629
17641
|
const _PageController = class extends EventTarget {
|
|
17630
17642
|
constructor(p = {}) {
|
|
17631
17643
|
super();
|
|
17632
|
-
|
|
17644
|
+
Ce(this, "config");
|
|
17633
17645
|
/** Corresponds to eval_page in browser-use */
|
|
17634
|
-
|
|
17646
|
+
Ce(this, "flatTree", null);
|
|
17635
17647
|
/**
|
|
17636
17648
|
* All highlighted index-mapped interactive elements
|
|
17637
17649
|
* Corresponds to DOMState.selector_map in browser-use
|
|
17638
17650
|
*/
|
|
17639
|
-
|
|
17651
|
+
Ce(this, "selectorMap", /* @__PURE__ */ new Map());
|
|
17640
17652
|
/** Index -> element text description mapping */
|
|
17641
|
-
|
|
17653
|
+
Ce(this, "elementTextMap", /* @__PURE__ */ new Map());
|
|
17642
17654
|
/**
|
|
17643
17655
|
* Simplified HTML for LLM consumption.
|
|
17644
17656
|
* Corresponds to clickable_elements_to_string in browser-use
|
|
17645
17657
|
*/
|
|
17646
|
-
|
|
17658
|
+
Ce(this, "simplifiedHTML", "<EMPTY>");
|
|
17647
17659
|
/** last time the tree was updated */
|
|
17648
|
-
|
|
17660
|
+
Ce(this, "lastTimeUpdate", 0);
|
|
17649
17661
|
/** Whether the tree has been indexed at least once */
|
|
17650
|
-
|
|
17662
|
+
Ce(this, "isIndexed", !1);
|
|
17651
17663
|
/** Visual mask overlay for blocking user interaction during automation */
|
|
17652
|
-
|
|
17653
|
-
|
|
17664
|
+
Ce(this, "mask", null);
|
|
17665
|
+
Ce(this, "maskReady", null);
|
|
17654
17666
|
this.config = p, patchReact(), p.enableMask && this.initMask();
|
|
17655
17667
|
}
|
|
17656
17668
|
/**
|
|
@@ -17888,7 +17900,7 @@ function describeAction(d, p) {
|
|
|
17888
17900
|
}
|
|
17889
17901
|
class AgentBridge {
|
|
17890
17902
|
constructor(p) {
|
|
17891
|
-
this.agent = null, this.controller = null, this.messages = [], this.currentStep = 0, this.disposed = !1, this.stopped = !1, this.agentConfig = null, this.notesCache = null, this.autoApprove = !1, this.pendingApprovals = /* @__PURE__ */ new Map(), this.config = p;
|
|
17903
|
+
this.agent = null, this.controller = null, this.messages = [], this.currentStep = 0, this.disposed = !1, this.stopped = !1, this.agentConfig = null, this.notesCache = null, this.reportContext = null, this.recordingSummaryCache = null, this.autoApprove = !1, this.pendingApprovals = /* @__PURE__ */ new Map(), this.config = p;
|
|
17892
17904
|
}
|
|
17893
17905
|
/** Fetch notes from backend and cache them */
|
|
17894
17906
|
async loadNotes() {
|
|
@@ -17898,16 +17910,16 @@ class AgentBridge {
|
|
|
17898
17910
|
const p = await fetchNotes(this.config.endpoint, this.config.project);
|
|
17899
17911
|
return this.notesCache = p.notes || [], this.notesCache;
|
|
17900
17912
|
}
|
|
17901
|
-
/** Build the combined system prompt from appContext + notes */
|
|
17902
|
-
buildSystemPrompt(p) {
|
|
17903
|
-
const
|
|
17904
|
-
this.config.appContext &&
|
|
17913
|
+
/** Build the combined system prompt from appContext + notes + recording summary */
|
|
17914
|
+
buildSystemPrompt(p, h) {
|
|
17915
|
+
const g = [];
|
|
17916
|
+
this.config.appContext && g.push(`[Developer context]
|
|
17905
17917
|
${this.config.appContext}`);
|
|
17906
|
-
const
|
|
17907
|
-
return
|
|
17908
|
-
${
|
|
17918
|
+
const m = p.filter((_) => _.route === null);
|
|
17919
|
+
return m.length > 0 && g.push(`[Site-wide notes]
|
|
17920
|
+
${m.map((_) => _.content).join(`
|
|
17909
17921
|
|
|
17910
|
-
`)}`), h.length > 0 ?
|
|
17922
|
+
`)}`), h && g.push(h), g.length > 0 ? g.join(`
|
|
17911
17923
|
|
|
17912
17924
|
`) : void 0;
|
|
17913
17925
|
}
|
|
@@ -17928,6 +17940,28 @@ ${g.map((m) => m.content).join(`
|
|
|
17928
17940
|
invalidateNotesCache() {
|
|
17929
17941
|
this.notesCache = null;
|
|
17930
17942
|
}
|
|
17943
|
+
/**
|
|
17944
|
+
* Set the report context for recording summary injection.
|
|
17945
|
+
* Call this when the user submits or views a report with a recording.
|
|
17946
|
+
* The summary will be fetched lazily on the next execute() call.
|
|
17947
|
+
*/
|
|
17948
|
+
setReportContext(p) {
|
|
17949
|
+
var h;
|
|
17950
|
+
(p == null ? void 0 : p.recording_url) !== ((h = this.reportContext) == null ? void 0 : h.recording_url) && (this.recordingSummaryCache = null), this.reportContext = p;
|
|
17951
|
+
}
|
|
17952
|
+
/** Fetch recording summary from the backend (uses cache if available) */
|
|
17953
|
+
async loadRecordingSummary() {
|
|
17954
|
+
var h;
|
|
17955
|
+
if (this.recordingSummaryCache !== null) return this.recordingSummaryCache;
|
|
17956
|
+
if (!((h = this.reportContext) != null && h.recording_url) || !this.config.endpoint) return null;
|
|
17957
|
+
const p = await fetchRecordingSummary(
|
|
17958
|
+
this.config.endpoint,
|
|
17959
|
+
this.reportContext.recording_url,
|
|
17960
|
+
this.reportContext.console_logs,
|
|
17961
|
+
this.reportContext.network_requests
|
|
17962
|
+
);
|
|
17963
|
+
return p.ok && p.summary ? (this.recordingSummaryCache = p.summary, this.recordingSummaryCache) : null;
|
|
17964
|
+
}
|
|
17931
17965
|
/** Lazy-initialize controller and agent on first use */
|
|
17932
17966
|
init() {
|
|
17933
17967
|
if (this.agent) return;
|
|
@@ -18152,30 +18186,33 @@ Parameters: ${m}`,
|
|
|
18152
18186
|
/** Execute a user command */
|
|
18153
18187
|
async execute(p) {
|
|
18154
18188
|
if (this.disposed || (this.init(), !this.agent || !this.agentConfig)) return;
|
|
18155
|
-
const h = await
|
|
18156
|
-
|
|
18189
|
+
const [h, g] = await Promise.all([
|
|
18190
|
+
this.loadNotes(),
|
|
18191
|
+
this.loadRecordingSummary()
|
|
18192
|
+
]);
|
|
18193
|
+
this.agentConfig.instructions.system = this.buildSystemPrompt(h, g), this.addMessage({
|
|
18157
18194
|
id: msgId(),
|
|
18158
18195
|
role: "user",
|
|
18159
18196
|
text: p,
|
|
18160
18197
|
timestamp: Date.now()
|
|
18161
18198
|
}), this.currentStep = 0, this.stopped = !1, this.config.onStateChange("thinking", 0);
|
|
18162
18199
|
try {
|
|
18163
|
-
const
|
|
18200
|
+
const m = await this.agent.execute(p);
|
|
18164
18201
|
if (this.stopped) return;
|
|
18165
|
-
|
|
18202
|
+
m.success ? this.addMessage({
|
|
18166
18203
|
id: msgId(),
|
|
18167
18204
|
role: "result",
|
|
18168
|
-
text:
|
|
18205
|
+
text: m.data || "Task completed successfully.",
|
|
18169
18206
|
timestamp: Date.now()
|
|
18170
18207
|
}) : this.addMessage({
|
|
18171
18208
|
id: msgId(),
|
|
18172
18209
|
role: "error",
|
|
18173
|
-
text:
|
|
18210
|
+
text: m.data || "Task failed.",
|
|
18174
18211
|
timestamp: Date.now()
|
|
18175
18212
|
});
|
|
18176
|
-
} catch (
|
|
18213
|
+
} catch (m) {
|
|
18177
18214
|
if (this.stopped) return;
|
|
18178
|
-
if (
|
|
18215
|
+
if (m instanceof DOMException && m.name === "AbortError" || m instanceof Error && m.message === "AbortError") {
|
|
18179
18216
|
this.addMessage({
|
|
18180
18217
|
id: msgId(),
|
|
18181
18218
|
role: "info",
|
|
@@ -18187,7 +18224,7 @@ Parameters: ${m}`,
|
|
|
18187
18224
|
this.addMessage({
|
|
18188
18225
|
id: msgId(),
|
|
18189
18226
|
role: "error",
|
|
18190
|
-
text:
|
|
18227
|
+
text: m instanceof Error ? m.message : "Unknown error",
|
|
18191
18228
|
timestamp: Date.now()
|
|
18192
18229
|
}), this.config.onStateChange("error", this.currentStep);
|
|
18193
18230
|
return;
|
|
@@ -18270,8 +18307,8 @@ const $$css$1 = {
|
|
|
18270
18307
|
};
|
|
18271
18308
|
function FeedbackPanel(d, p) {
|
|
18272
18309
|
push(p, !0), append_styles(d, $$css$1);
|
|
18273
|
-
const h = "3.2.
|
|
18274
|
-
let g = prop(p, "endpoint", 7), m = prop(p, "project", 7), _ = prop(p, "isOpen", 7, !1), b = prop(p, "userId", 7, ""), y = prop(p, "userEmail", 7, ""), w = prop(p, "userName", 7, ""), x = prop(p, "userRole", 7, ""), E = prop(p, "orgId", 7, ""), S = prop(p, "orgName", 7, ""), k = prop(p, "onclose", 7), I = prop(p, "ongrip", 7),
|
|
18310
|
+
const h = "3.2.1";
|
|
18311
|
+
let g = prop(p, "endpoint", 7), m = prop(p, "project", 7), _ = prop(p, "isOpen", 7, !1), b = prop(p, "userId", 7, ""), y = prop(p, "userEmail", 7, ""), w = prop(p, "userName", 7, ""), x = prop(p, "userRole", 7, ""), E = prop(p, "orgId", 7, ""), S = prop(p, "orgName", 7, ""), k = prop(p, "onclose", 7), I = prop(p, "ongrip", 7), R = prop(p, "agentProxy", 7, ""), M = prop(p, "agentModel", 7, ""), A = prop(p, "agentContext", 7, ""), C = prop(p, "registeredTools", 23, () => []), N = /* @__PURE__ */ state("new"), $ = /* @__PURE__ */ state(!1), O = /* @__PURE__ */ state(!1), F = /* @__PURE__ */ state(!1), j = /* @__PURE__ */ state(proxy([]));
|
|
18275
18312
|
function Y() {
|
|
18276
18313
|
if (get(F)) {
|
|
18277
18314
|
const Z = stopRecording();
|
|
@@ -18283,12 +18320,12 @@ function FeedbackPanel(d, p) {
|
|
|
18283
18320
|
async function ve() {
|
|
18284
18321
|
var Z;
|
|
18285
18322
|
try {
|
|
18286
|
-
const re = await navigator.mediaDevices.getUserMedia({ audio: !0 }),
|
|
18287
|
-
ye = [],
|
|
18323
|
+
const re = await navigator.mediaDevices.getUserMedia({ audio: !0 }), Te = MediaRecorder.isTypeSupported("audio/webm;codecs=opus") ? "audio/webm;codecs=opus" : MediaRecorder.isTypeSupported("audio/webm") ? "audio/webm" : "audio/ogg", ke = new MediaRecorder(re, { mimeType: Te });
|
|
18324
|
+
ye = [], ke.ondataavailable = (Ne) => {
|
|
18288
18325
|
Ne.data.size > 0 && ye.push(Ne.data);
|
|
18289
|
-
},
|
|
18290
|
-
re.getTracks().forEach((Ne) => Ne.stop()), Ee(new Blob(ye, { type:
|
|
18291
|
-
},
|
|
18326
|
+
}, ke.onstop = () => {
|
|
18327
|
+
re.getTracks().forEach((Ne) => Ne.stop()), Ee(new Blob(ye, { type: Te }), Te);
|
|
18328
|
+
}, ke.start(500), set(se, ke, !0), set(q, !0), set(oe, "recording"), set(ce, "Recording…");
|
|
18292
18329
|
} catch (re) {
|
|
18293
18330
|
set(oe, "error"), set(
|
|
18294
18331
|
ce,
|
|
@@ -18297,23 +18334,23 @@ function FeedbackPanel(d, p) {
|
|
|
18297
18334
|
);
|
|
18298
18335
|
}
|
|
18299
18336
|
}
|
|
18300
|
-
function
|
|
18337
|
+
function Re() {
|
|
18301
18338
|
get(se) && get(se).state !== "inactive" && get(se).stop(), set(q, !1), set(oe, "processing"), set(ce, "Sending to JAT…");
|
|
18302
18339
|
}
|
|
18303
18340
|
async function Ee(Z, re) {
|
|
18304
18341
|
set(de, !0);
|
|
18305
18342
|
try {
|
|
18306
|
-
const
|
|
18307
|
-
|
|
18308
|
-
const Ne = `${g()}/api/tasks/voice`,
|
|
18309
|
-
if (
|
|
18343
|
+
const Te = re.includes("webm") ? "webm" : re.includes("ogg") ? "ogg" : "audio", ke = new FormData();
|
|
18344
|
+
ke.append("file", Z, `voice-note.${Te}`);
|
|
18345
|
+
const Ne = `${g()}/api/tasks/voice`, Ve = await fetch(Ne, { method: "POST", body: ke });
|
|
18346
|
+
if (Ve.ok)
|
|
18310
18347
|
set(oe, "done"), set(ce, "Done! Tasks will appear in your Voice Inbox shortly.");
|
|
18311
18348
|
else {
|
|
18312
|
-
const ft = await
|
|
18313
|
-
set(oe, "error"), set(ce, ft.message || `Error ${
|
|
18349
|
+
const ft = await Ve.json().catch(() => ({}));
|
|
18350
|
+
set(oe, "error"), set(ce, ft.message || `Error ${Ve.status}`, !0);
|
|
18314
18351
|
}
|
|
18315
|
-
} catch (
|
|
18316
|
-
set(oe, "error"), set(ce,
|
|
18352
|
+
} catch (Te) {
|
|
18353
|
+
set(oe, "error"), set(ce, Te.message || "Failed to send recording", !0);
|
|
18317
18354
|
} finally {
|
|
18318
18355
|
set(de, !1), ye = [];
|
|
18319
18356
|
}
|
|
@@ -18326,10 +18363,10 @@ function FeedbackPanel(d, p) {
|
|
|
18326
18363
|
return get(P) || set(
|
|
18327
18364
|
P,
|
|
18328
18365
|
new AgentBridge({
|
|
18329
|
-
proxyUrl:
|
|
18366
|
+
proxyUrl: R(),
|
|
18330
18367
|
model: M() || void 0,
|
|
18331
18368
|
maxSteps: 20,
|
|
18332
|
-
appContext:
|
|
18369
|
+
appContext: A() || void 0,
|
|
18333
18370
|
endpoint: g(),
|
|
18334
18371
|
project: m(),
|
|
18335
18372
|
registeredTools: C(),
|
|
@@ -18383,7 +18420,7 @@ function FeedbackPanel(d, p) {
|
|
|
18383
18420
|
user_effect(() => {
|
|
18384
18421
|
g() && le();
|
|
18385
18422
|
});
|
|
18386
|
-
let we = /* @__PURE__ */ state(""), ze = /* @__PURE__ */ state(""), xe = /* @__PURE__ */ state("bug"),
|
|
18423
|
+
let we = /* @__PURE__ */ state(""), ze = /* @__PURE__ */ state(""), xe = /* @__PURE__ */ state("bug"), Ge = /* @__PURE__ */ state("medium"), ae = /* @__PURE__ */ state(proxy([])), V = /* @__PURE__ */ state(proxy([])), D = /* @__PURE__ */ state(proxy([])), H = /* @__PURE__ */ state(proxy([])), X = /* @__PURE__ */ state(proxy([])), fe = /* @__PURE__ */ state(void 0);
|
|
18387
18424
|
const Q = [
|
|
18388
18425
|
"image/png",
|
|
18389
18426
|
"image/jpeg",
|
|
@@ -18396,38 +18433,38 @@ function FeedbackPanel(d, p) {
|
|
|
18396
18433
|
(Z = get(fe)) == null || Z.click();
|
|
18397
18434
|
}
|
|
18398
18435
|
async function be(Z) {
|
|
18399
|
-
const re = Z.target,
|
|
18400
|
-
if (!(!
|
|
18401
|
-
for (const
|
|
18436
|
+
const re = Z.target, Te = re.files;
|
|
18437
|
+
if (!(!Te || Te.length === 0)) {
|
|
18438
|
+
for (const ke of Te)
|
|
18402
18439
|
try {
|
|
18403
|
-
const Ne = await Ue(
|
|
18404
|
-
Q.includes(
|
|
18440
|
+
const Ne = await Ue(ke);
|
|
18441
|
+
Q.includes(ke.type) ? (set(ae, [...get(ae), Ne], !0), Fe(`Image added: ${ke.name}`, "success")) : (set(
|
|
18405
18442
|
V,
|
|
18406
18443
|
[
|
|
18407
18444
|
...get(V),
|
|
18408
18445
|
{
|
|
18409
|
-
name:
|
|
18410
|
-
type:
|
|
18446
|
+
name: ke.name,
|
|
18447
|
+
type: ke.type || "application/octet-stream",
|
|
18411
18448
|
data: Ne,
|
|
18412
|
-
size:
|
|
18449
|
+
size: ke.size
|
|
18413
18450
|
}
|
|
18414
18451
|
],
|
|
18415
18452
|
!0
|
|
18416
|
-
), Fe(`File attached: ${
|
|
18453
|
+
), Fe(`File attached: ${ke.name}`, "success"));
|
|
18417
18454
|
} catch {
|
|
18418
|
-
Fe(`Failed to read: ${
|
|
18455
|
+
Fe(`Failed to read: ${ke.name}`, "error");
|
|
18419
18456
|
}
|
|
18420
18457
|
re.value = "";
|
|
18421
18458
|
}
|
|
18422
18459
|
}
|
|
18423
18460
|
function Ue(Z) {
|
|
18424
|
-
return new Promise((re,
|
|
18425
|
-
const
|
|
18426
|
-
|
|
18461
|
+
return new Promise((re, Te) => {
|
|
18462
|
+
const ke = new FileReader();
|
|
18463
|
+
ke.onload = () => re(ke.result), ke.onerror = () => Te(ke.error), ke.readAsDataURL(Z);
|
|
18427
18464
|
});
|
|
18428
18465
|
}
|
|
18429
|
-
function
|
|
18430
|
-
set(V, get(V).filter((re,
|
|
18466
|
+
function Ie(Z) {
|
|
18467
|
+
set(V, get(V).filter((re, Te) => Te !== Z), !0);
|
|
18431
18468
|
}
|
|
18432
18469
|
function Ze(Z) {
|
|
18433
18470
|
return Z < 1024 ? `${Z}B` : Z < 1024 * 1024 ? `${(Z / 1024).toFixed(1)}KB` : `${(Z / (1024 * 1024)).toFixed(1)}MB`;
|
|
@@ -18473,13 +18510,13 @@ function FeedbackPanel(d, p) {
|
|
|
18473
18510
|
}
|
|
18474
18511
|
}
|
|
18475
18512
|
function Qt(Z) {
|
|
18476
|
-
set(ae, get(ae).filter((re,
|
|
18513
|
+
set(ae, get(ae).filter((re, Te) => Te !== Z), !0);
|
|
18477
18514
|
}
|
|
18478
18515
|
function jt(Z) {
|
|
18479
18516
|
set(We, get(ae)[Z], !0), set(nt, Z, !0);
|
|
18480
18517
|
}
|
|
18481
18518
|
function rr(Z) {
|
|
18482
|
-
get(nt) !== null && (get(nt) >= get(ae).length ? (set(ae, [...get(ae), Z], !0), Fe(`Screenshot captured (${get(ae).length})`, "success")) : (set(ae, get(ae).map((re,
|
|
18519
|
+
get(nt) !== null && (get(nt) >= get(ae).length ? (set(ae, [...get(ae), Z], !0), Fe(`Screenshot captured (${get(ae).length})`, "success")) : (set(ae, get(ae).map((re, Te) => Te === get(nt) ? Z : re), !0), Fe("Screenshot updated", "success"))), set(nt, null), set(We, "");
|
|
18483
18520
|
}
|
|
18484
18521
|
function sn() {
|
|
18485
18522
|
get(nt) !== null && get(nt) >= get(ae).length && (set(ae, [...get(ae), get(We)], !0), Fe(`Screenshot captured (${get(ae).length})`, "success")), set(nt, null), set(We, "");
|
|
@@ -18497,16 +18534,16 @@ function FeedbackPanel(d, p) {
|
|
|
18497
18534
|
set(Le, !0), an();
|
|
18498
18535
|
const re = {};
|
|
18499
18536
|
(b() || y() || w() || x()) && (re.reporter = {}, b() && (re.reporter.userId = b()), y() && (re.reporter.email = y()), w() && (re.reporter.name = w()), x() && (re.reporter.role = x())), (E() || S()) && (re.organization = {}, E() && (re.organization.id = E()), S() && (re.organization.name = S()));
|
|
18500
|
-
let
|
|
18537
|
+
let Te;
|
|
18501
18538
|
if (get(j).length > 0) {
|
|
18502
|
-
const Ne = crypto.randomUUID(),
|
|
18503
|
-
|
|
18539
|
+
const Ne = crypto.randomUUID(), Ve = await uploadRecording(g(), get(j), Ne);
|
|
18540
|
+
Ve.ok && Ve.recording_url && (Te = Ve.recording_url);
|
|
18504
18541
|
}
|
|
18505
|
-
const
|
|
18542
|
+
const ke = {
|
|
18506
18543
|
title: get(we).trim(),
|
|
18507
18544
|
description: get(ze).trim(),
|
|
18508
18545
|
type: get(xe),
|
|
18509
|
-
priority: get(
|
|
18546
|
+
priority: get(Ge),
|
|
18510
18547
|
project: m() || "",
|
|
18511
18548
|
page_url: window.location.href,
|
|
18512
18549
|
user_agent: navigator.userAgent,
|
|
@@ -18517,24 +18554,35 @@ function FeedbackPanel(d, p) {
|
|
|
18517
18554
|
screenshots: get(ae).length > 0 ? get(ae) : null,
|
|
18518
18555
|
attachments: get(V).length > 0 ? get(V) : null,
|
|
18519
18556
|
metadata: Object.keys(re).length > 0 ? re : null,
|
|
18520
|
-
recording_url:
|
|
18557
|
+
recording_url: Te || null
|
|
18521
18558
|
};
|
|
18522
18559
|
try {
|
|
18523
|
-
const Ne = await submitReport(g(),
|
|
18524
|
-
|
|
18525
|
-
()
|
|
18526
|
-
|
|
18527
|
-
|
|
18528
|
-
|
|
18529
|
-
|
|
18560
|
+
const Ne = await submitReport(g(), ke);
|
|
18561
|
+
if (Ne.ok) {
|
|
18562
|
+
if (ke.recording_url) {
|
|
18563
|
+
const Ve = {
|
|
18564
|
+
recording_url: ke.recording_url,
|
|
18565
|
+
console_logs: ke.console_logs,
|
|
18566
|
+
network_requests: ke.network_requests
|
|
18567
|
+
};
|
|
18568
|
+
G().setReportContext(Ve);
|
|
18569
|
+
}
|
|
18570
|
+
Fe(`Report submitted (${Ne.id})`, "success"), bn(), setTimeout(
|
|
18571
|
+
() => {
|
|
18572
|
+
le(), set(N, "requests");
|
|
18573
|
+
},
|
|
18574
|
+
1200
|
|
18575
|
+
);
|
|
18576
|
+
} else
|
|
18577
|
+
enqueue(g(), ke), Fe("Queued for retry (endpoint unreachable)", "error");
|
|
18530
18578
|
} catch {
|
|
18531
|
-
enqueue(g(),
|
|
18579
|
+
enqueue(g(), ke), Fe("Queued for retry (endpoint unreachable)", "error");
|
|
18532
18580
|
} finally {
|
|
18533
18581
|
set(Le, !1);
|
|
18534
18582
|
}
|
|
18535
18583
|
}
|
|
18536
18584
|
function bn() {
|
|
18537
|
-
set(we, ""), set(ze, ""), set(xe, "bug"), set(
|
|
18585
|
+
set(we, ""), set(ze, ""), set(xe, "bug"), set(Ge, "medium"), set(ae, [], !0), set(V, [], !0), set(D, [], !0), set(H, [], !0), set(X, [], !0), set(j, [], !0), get(F) && (stopRecording(), set(F, !1));
|
|
18538
18586
|
}
|
|
18539
18587
|
user_effect(() => {
|
|
18540
18588
|
an();
|
|
@@ -18623,10 +18671,10 @@ function FeedbackPanel(d, p) {
|
|
|
18623
18671
|
I(Z), flushSync();
|
|
18624
18672
|
},
|
|
18625
18673
|
get agentProxy() {
|
|
18626
|
-
return
|
|
18674
|
+
return R();
|
|
18627
18675
|
},
|
|
18628
18676
|
set agentProxy(Z = "") {
|
|
18629
|
-
|
|
18677
|
+
R(Z), flushSync();
|
|
18630
18678
|
},
|
|
18631
18679
|
get agentModel() {
|
|
18632
18680
|
return M();
|
|
@@ -18635,10 +18683,10 @@ function FeedbackPanel(d, p) {
|
|
|
18635
18683
|
M(Z), flushSync();
|
|
18636
18684
|
},
|
|
18637
18685
|
get agentContext() {
|
|
18638
|
-
return
|
|
18686
|
+
return A();
|
|
18639
18687
|
},
|
|
18640
18688
|
set agentContext(Z = "") {
|
|
18641
|
-
|
|
18689
|
+
A(Z), flushSync();
|
|
18642
18690
|
},
|
|
18643
18691
|
get registeredTools() {
|
|
18644
18692
|
return C();
|
|
@@ -18650,9 +18698,9 @@ function FeedbackPanel(d, p) {
|
|
|
18650
18698
|
{
|
|
18651
18699
|
var Kn = (Z) => {
|
|
18652
18700
|
var re = root_1$1();
|
|
18653
|
-
delegated("mousedown", re, function(...
|
|
18654
|
-
var
|
|
18655
|
-
(
|
|
18701
|
+
delegated("mousedown", re, function(...Te) {
|
|
18702
|
+
var ke;
|
|
18703
|
+
(ke = I()) == null || ke.apply(this, Te);
|
|
18656
18704
|
}), append(Z, re);
|
|
18657
18705
|
};
|
|
18658
18706
|
if_block(Yn, (Z) => {
|
|
@@ -18666,8 +18714,8 @@ function FeedbackPanel(d, p) {
|
|
|
18666
18714
|
var sr = sibling(child(ln), 2);
|
|
18667
18715
|
{
|
|
18668
18716
|
var ir = (Z) => {
|
|
18669
|
-
var re = root_2$1(),
|
|
18670
|
-
reset(re), template_effect(() => set_text(
|
|
18717
|
+
var re = root_2$1(), Te = child(re, !0);
|
|
18718
|
+
reset(re), template_effect(() => set_text(Te, get(pe))), append(Z, re);
|
|
18671
18719
|
};
|
|
18672
18720
|
if_block(sr, (Z) => {
|
|
18673
18721
|
get(pe) > 0 && Z(ir);
|
|
@@ -18678,13 +18726,13 @@ function FeedbackPanel(d, p) {
|
|
|
18678
18726
|
{
|
|
18679
18727
|
var $e = (Z) => {
|
|
18680
18728
|
var re = root_3();
|
|
18681
|
-
let
|
|
18682
|
-
template_effect(() =>
|
|
18729
|
+
let Te;
|
|
18730
|
+
template_effect(() => Te = set_class(re, 1, "tab svelte-nv4d5v", null, Te, { active: get(N) === "agent" })), delegated("click", re, () => {
|
|
18683
18731
|
set(N, "agent"), set($, !0);
|
|
18684
18732
|
}), append(Z, re);
|
|
18685
18733
|
};
|
|
18686
18734
|
if_block(Jn, (Z) => {
|
|
18687
|
-
|
|
18735
|
+
R() && Z($e);
|
|
18688
18736
|
});
|
|
18689
18737
|
}
|
|
18690
18738
|
var Pe = sibling(Jn, 2);
|
|
@@ -18697,35 +18745,35 @@ function FeedbackPanel(d, p) {
|
|
|
18697
18745
|
var Qe = sibling(On, 2);
|
|
18698
18746
|
{
|
|
18699
18747
|
var Ke = (Z) => {
|
|
18700
|
-
var re = root_4(),
|
|
18701
|
-
remove_input_defaults(
|
|
18702
|
-
var Ne = sibling(
|
|
18703
|
-
remove_textarea_child(
|
|
18748
|
+
var re = root_4(), Te = child(re), ke = sibling(child(Te), 2);
|
|
18749
|
+
remove_input_defaults(ke), bind_this(ke, (_e) => set(rt, _e), () => get(rt)), reset(Te);
|
|
18750
|
+
var Ne = sibling(Te, 2), Ve = sibling(child(Ne), 2);
|
|
18751
|
+
remove_textarea_child(Ve), reset(Ne);
|
|
18704
18752
|
var ft = sibling(Ne, 2), ht = child(ft), _t = sibling(child(ht), 2);
|
|
18705
|
-
each(_t, 21, () => Gn, index, (_e,
|
|
18753
|
+
each(_t, 21, () => Gn, index, (_e, Ae) => {
|
|
18706
18754
|
var Je = root_5(), ot = child(Je, !0);
|
|
18707
18755
|
reset(Je);
|
|
18708
18756
|
var et = {};
|
|
18709
18757
|
template_effect(() => {
|
|
18710
|
-
set_text(ot, get(
|
|
18758
|
+
set_text(ot, get(Ae).label), et !== (et = get(Ae).value) && (Je.value = (Je.__value = get(Ae).value) ?? "");
|
|
18711
18759
|
}), append(_e, Je);
|
|
18712
18760
|
}), reset(_t), reset(ht);
|
|
18713
18761
|
var bt = sibling(ht, 2), gt = sibling(child(bt), 2);
|
|
18714
|
-
each(gt, 21, () => or, index, (_e,
|
|
18762
|
+
each(gt, 21, () => or, index, (_e, Ae) => {
|
|
18715
18763
|
var Je = root_6(), ot = child(Je, !0);
|
|
18716
18764
|
reset(Je);
|
|
18717
18765
|
var et = {};
|
|
18718
18766
|
template_effect(() => {
|
|
18719
|
-
set_text(ot, get(
|
|
18767
|
+
set_text(ot, get(Ae).label), et !== (et = get(Ae).value) && (Je.value = (Je.__value = get(Ae).value) ?? "");
|
|
18720
18768
|
}), append(_e, Je);
|
|
18721
18769
|
}), reset(gt), reset(bt), reset(ft);
|
|
18722
|
-
var
|
|
18770
|
+
var At = sibling(ft, 2), Oe = child(At), Be = child(Oe), tt = child(Be);
|
|
18723
18771
|
{
|
|
18724
18772
|
var lt = (_e) => {
|
|
18725
|
-
var
|
|
18726
|
-
next(), append(_e,
|
|
18773
|
+
var Ae = root_7();
|
|
18774
|
+
next(), append(_e, Ae);
|
|
18727
18775
|
}, pt = (_e) => {
|
|
18728
|
-
var
|
|
18776
|
+
var Ae = root_8(), Je = sibling(first_child(Ae), 2);
|
|
18729
18777
|
{
|
|
18730
18778
|
var ot = (et) => {
|
|
18731
18779
|
var at = root_9(), Et = child(at, !0);
|
|
@@ -18735,7 +18783,7 @@ function FeedbackPanel(d, p) {
|
|
|
18735
18783
|
get(ae).length > 0 && et(ot);
|
|
18736
18784
|
});
|
|
18737
18785
|
}
|
|
18738
|
-
append(_e,
|
|
18786
|
+
append(_e, Ae);
|
|
18739
18787
|
};
|
|
18740
18788
|
if_block(tt, (_e) => {
|
|
18741
18789
|
get(te) ? _e(lt) : _e(pt, !1);
|
|
@@ -18745,10 +18793,10 @@ function FeedbackPanel(d, p) {
|
|
|
18745
18793
|
var mt = sibling(Be, 2), zt = sibling(child(mt), 2);
|
|
18746
18794
|
{
|
|
18747
18795
|
var Gt = (_e) => {
|
|
18748
|
-
var
|
|
18749
|
-
append(_e,
|
|
18796
|
+
var Ae = text("Click an element...");
|
|
18797
|
+
append(_e, Ae);
|
|
18750
18798
|
}, En = (_e) => {
|
|
18751
|
-
var
|
|
18799
|
+
var Ae = root_11(), Je = sibling(first_child(Ae));
|
|
18752
18800
|
{
|
|
18753
18801
|
var ot = (et) => {
|
|
18754
18802
|
var at = root_12(), Et = child(at, !0);
|
|
@@ -18758,7 +18806,7 @@ function FeedbackPanel(d, p) {
|
|
|
18758
18806
|
get(D).length > 0 && et(ot);
|
|
18759
18807
|
});
|
|
18760
18808
|
}
|
|
18761
|
-
append(_e,
|
|
18809
|
+
append(_e, Ae);
|
|
18762
18810
|
};
|
|
18763
18811
|
if_block(zt, (_e) => {
|
|
18764
18812
|
get(Ye) ? _e(Gt) : _e(En, !1);
|
|
@@ -18770,10 +18818,10 @@ function FeedbackPanel(d, p) {
|
|
|
18770
18818
|
var Ht = child(Ot);
|
|
18771
18819
|
{
|
|
18772
18820
|
var Lt = (_e) => {
|
|
18773
|
-
var
|
|
18774
|
-
next(), append(_e,
|
|
18821
|
+
var Ae = root_13();
|
|
18822
|
+
next(), append(_e, Ae);
|
|
18775
18823
|
}, Sn = (_e) => {
|
|
18776
|
-
var
|
|
18824
|
+
var Ae = root_14(), Je = sibling(first_child(Ae), 2);
|
|
18777
18825
|
{
|
|
18778
18826
|
var ot = (et) => {
|
|
18779
18827
|
var at = root_15(), Et = child(at, !0);
|
|
@@ -18783,7 +18831,7 @@ function FeedbackPanel(d, p) {
|
|
|
18783
18831
|
get(j).length > 0 && et(ot);
|
|
18784
18832
|
});
|
|
18785
18833
|
}
|
|
18786
|
-
append(_e,
|
|
18834
|
+
append(_e, Ae);
|
|
18787
18835
|
};
|
|
18788
18836
|
if_block(Ht, (_e) => {
|
|
18789
18837
|
get(F) ? _e(Lt) : _e(Sn, !1);
|
|
@@ -18793,8 +18841,8 @@ function FeedbackPanel(d, p) {
|
|
|
18793
18841
|
var Ln = sibling(Ot, 2), Fr = sibling(child(Ln), 2);
|
|
18794
18842
|
{
|
|
18795
18843
|
var Pr = (_e) => {
|
|
18796
|
-
var
|
|
18797
|
-
reset(
|
|
18844
|
+
var Ae = root_16(), Je = child(Ae, !0);
|
|
18845
|
+
reset(Ae), template_effect(() => set_text(Je, get(V).length)), append(_e, Ae);
|
|
18798
18846
|
};
|
|
18799
18847
|
if_block(Fr, (_e) => {
|
|
18800
18848
|
get(V).length > 0 && _e(Pr);
|
|
@@ -18814,12 +18862,12 @@ function FeedbackPanel(d, p) {
|
|
|
18814
18862
|
oncapture: vt,
|
|
18815
18863
|
onremove: Qt,
|
|
18816
18864
|
onedit: jt
|
|
18817
|
-
}), reset(
|
|
18818
|
-
var xr = sibling(
|
|
18865
|
+
}), reset(At);
|
|
18866
|
+
var xr = sibling(At, 2);
|
|
18819
18867
|
{
|
|
18820
18868
|
var Br = (_e) => {
|
|
18821
|
-
var
|
|
18822
|
-
each(
|
|
18869
|
+
var Ae = root_17();
|
|
18870
|
+
each(Ae, 21, () => get(V), index, (Je, ot, et) => {
|
|
18823
18871
|
var at = root_18(), Et = child(at), ur = child(Et);
|
|
18824
18872
|
{
|
|
18825
18873
|
var Fn = (Nt) => {
|
|
@@ -18847,8 +18895,8 @@ function FeedbackPanel(d, p) {
|
|
|
18847
18895
|
set_text(Yr, get(ot).name), set_text(Kr, Nt);
|
|
18848
18896
|
},
|
|
18849
18897
|
[() => Ze(get(ot).size)]
|
|
18850
|
-
), delegated("click", Xr, () =>
|
|
18851
|
-
}), reset(
|
|
18898
|
+
), delegated("click", Xr, () => Ie(et)), append(Je, at);
|
|
18899
|
+
}), reset(Ae), append(_e, Ae);
|
|
18852
18900
|
};
|
|
18853
18901
|
if_block(xr, (_e) => {
|
|
18854
18902
|
get(V).length > 0 && _e(Br);
|
|
@@ -18857,8 +18905,8 @@ function FeedbackPanel(d, p) {
|
|
|
18857
18905
|
var Er = sibling(xr, 2);
|
|
18858
18906
|
{
|
|
18859
18907
|
var Ur = (_e) => {
|
|
18860
|
-
var
|
|
18861
|
-
each(
|
|
18908
|
+
var Ae = root_22();
|
|
18909
|
+
each(Ae, 21, () => get(D), index, (Je, ot, et) => {
|
|
18862
18910
|
var at = root_23(), Et = child(at), ur = child(Et);
|
|
18863
18911
|
reset(Et);
|
|
18864
18912
|
var Fn = sibling(Et, 2), dr = child(Fn, !0);
|
|
@@ -18878,7 +18926,7 @@ function FeedbackPanel(d, p) {
|
|
|
18878
18926
|
), delegated("click", fr, () => {
|
|
18879
18927
|
set(D, get(D).filter((dn, Pn) => Pn !== et), !0);
|
|
18880
18928
|
}), append(Je, at);
|
|
18881
|
-
}), reset(
|
|
18929
|
+
}), reset(Ae), append(_e, Ae);
|
|
18882
18930
|
};
|
|
18883
18931
|
if_block(Er, (_e) => {
|
|
18884
18932
|
get(D).length > 0 && _e(Ur);
|
|
@@ -18893,8 +18941,8 @@ function FeedbackPanel(d, p) {
|
|
|
18893
18941
|
var kr = sibling(Sr, 2);
|
|
18894
18942
|
{
|
|
18895
18943
|
var jr = (_e) => {
|
|
18896
|
-
var
|
|
18897
|
-
reset(
|
|
18944
|
+
var Ae = root_24(), Je = child(Ae);
|
|
18945
|
+
reset(Ae), template_effect((ot, et) => set_text(Je, `${ot ?? ""} attachment${et ?? ""} will be included`), [zn, () => zn() > 1 ? "s" : ""]), append(_e, Ae);
|
|
18898
18946
|
}, Wr = /* @__PURE__ */ user_derived(() => zn() > 0);
|
|
18899
18947
|
if_block(kr, (_e) => {
|
|
18900
18948
|
get(Wr) && _e(jr);
|
|
@@ -18905,11 +18953,11 @@ function FeedbackPanel(d, p) {
|
|
|
18905
18953
|
var lr = sibling(ar, 2), cr = sibling(lr, 2), Gr = child(cr);
|
|
18906
18954
|
{
|
|
18907
18955
|
var Hr = (_e) => {
|
|
18908
|
-
var
|
|
18909
|
-
next(), append(_e,
|
|
18956
|
+
var Ae = root_25();
|
|
18957
|
+
next(), append(_e, Ae);
|
|
18910
18958
|
}, qr = (_e) => {
|
|
18911
|
-
var
|
|
18912
|
-
append(_e,
|
|
18959
|
+
var Ae = text("Submit");
|
|
18960
|
+
append(_e, Ae);
|
|
18913
18961
|
};
|
|
18914
18962
|
if_block(Gr, (_e) => {
|
|
18915
18963
|
get(Le) ? _e(Hr) : _e(qr, !1);
|
|
@@ -18917,12 +18965,12 @@ function FeedbackPanel(d, p) {
|
|
|
18917
18965
|
}
|
|
18918
18966
|
reset(cr), reset(Cr), reset(re), template_effect(
|
|
18919
18967
|
(_e) => {
|
|
18920
|
-
|
|
18968
|
+
ke.disabled = get(Le), Ve.disabled = get(Le), _t.disabled = get(Le), gt.disabled = get(Le), Be.disabled = get(te), mt.disabled = get(Ye), Dt = set_class(Ot, 1, "tool-btn svelte-nv4d5v", null, Dt, { "recording-active": get(F) }), Ot.disabled = get(Le), Ln.disabled = get(Le), set_text(Vr, `v${h}`), lr.disabled = get(Le), cr.disabled = _e;
|
|
18921
18969
|
},
|
|
18922
18970
|
[() => get(Le) || !get(we).trim()]
|
|
18923
|
-
), event("submit", re, $n), bind_value(
|
|
18924
|
-
var
|
|
18925
|
-
(
|
|
18971
|
+
), event("submit", re, $n), bind_value(ke, () => get(we), (_e) => set(we, _e)), bind_value(Ve, () => get(ze), (_e) => set(ze, _e)), bind_select_value(_t, () => get(xe), (_e) => set(xe, _e)), bind_select_value(gt, () => get(Ge), (_e) => set(Ge, _e)), delegated("click", Be, vt), delegated("click", mt, en), delegated("click", Ot, Y), delegated("click", Ln, ue), delegated("change", wr, be), delegated("click", lr, function(..._e) {
|
|
18972
|
+
var Ae;
|
|
18973
|
+
(Ae = k()) == null || Ae.apply(this, _e);
|
|
18926
18974
|
}), transition(3, re, () => slide, () => ({ duration: 200 })), append(Z, re);
|
|
18927
18975
|
};
|
|
18928
18976
|
if_block(Qe, (Z) => {
|
|
@@ -18932,8 +18980,8 @@ function FeedbackPanel(d, p) {
|
|
|
18932
18980
|
var dt = sibling(Qe, 2);
|
|
18933
18981
|
{
|
|
18934
18982
|
var Xe = (Z) => {
|
|
18935
|
-
var re = root_27(),
|
|
18936
|
-
RequestList(
|
|
18983
|
+
var re = root_27(), Te = child(re);
|
|
18984
|
+
RequestList(Te, {
|
|
18937
18985
|
get endpoint() {
|
|
18938
18986
|
return g();
|
|
18939
18987
|
},
|
|
@@ -18947,8 +18995,8 @@ function FeedbackPanel(d, p) {
|
|
|
18947
18995
|
get reports() {
|
|
18948
18996
|
return get(he);
|
|
18949
18997
|
},
|
|
18950
|
-
set reports(
|
|
18951
|
-
set(he,
|
|
18998
|
+
set reports(ke) {
|
|
18999
|
+
set(he, ke, !0);
|
|
18952
19000
|
}
|
|
18953
19001
|
}), reset(re), transition(3, re, () => slide, () => ({ duration: 200 })), append(Z, re);
|
|
18954
19002
|
};
|
|
@@ -18959,13 +19007,13 @@ function FeedbackPanel(d, p) {
|
|
|
18959
19007
|
var xt = sibling(dt, 2);
|
|
18960
19008
|
{
|
|
18961
19009
|
var cn = (Z) => {
|
|
18962
|
-
var re = root_28(),
|
|
19010
|
+
var re = root_28(), Te = child(re);
|
|
18963
19011
|
{
|
|
18964
|
-
let
|
|
19012
|
+
let ke = /* @__PURE__ */ user_derived(() => {
|
|
18965
19013
|
var Ne;
|
|
18966
19014
|
return ((Ne = get(P)) == null ? void 0 : Ne.getMaxSteps()) ?? 20;
|
|
18967
19015
|
});
|
|
18968
|
-
AgentPanel(
|
|
19016
|
+
AgentPanel(Te, {
|
|
18969
19017
|
get messages() {
|
|
18970
19018
|
return get(Se);
|
|
18971
19019
|
},
|
|
@@ -18976,7 +19024,7 @@ function FeedbackPanel(d, p) {
|
|
|
18976
19024
|
return get(z);
|
|
18977
19025
|
},
|
|
18978
19026
|
get maxSteps() {
|
|
18979
|
-
return get(
|
|
19027
|
+
return get(ke);
|
|
18980
19028
|
},
|
|
18981
19029
|
get autoApprove() {
|
|
18982
19030
|
return get(L);
|
|
@@ -18997,8 +19045,8 @@ function FeedbackPanel(d, p) {
|
|
|
18997
19045
|
var qe = sibling(xt, 2);
|
|
18998
19046
|
{
|
|
18999
19047
|
var tn = (Z) => {
|
|
19000
|
-
var re = root_29(),
|
|
19001
|
-
NotesPanel(
|
|
19048
|
+
var re = root_29(), Te = child(re);
|
|
19049
|
+
NotesPanel(Te, {
|
|
19002
19050
|
get endpoint() {
|
|
19003
19051
|
return g();
|
|
19004
19052
|
},
|
|
@@ -19015,14 +19063,14 @@ function FeedbackPanel(d, p) {
|
|
|
19015
19063
|
var nn = sibling(qe, 2);
|
|
19016
19064
|
{
|
|
19017
19065
|
var un = (Z) => {
|
|
19018
|
-
var re = root_30(),
|
|
19066
|
+
var re = root_30(), Te = child(re), ke = sibling(child(Te), 2), Ne = child(ke);
|
|
19019
19067
|
{
|
|
19020
|
-
var
|
|
19068
|
+
var Ve = (Oe) => {
|
|
19021
19069
|
var Be = root_31();
|
|
19022
19070
|
delegated("click", Be, ve), append(Oe, Be);
|
|
19023
19071
|
}, ft = (Oe) => {
|
|
19024
19072
|
var Be = root_32(), tt = first_child(Be);
|
|
19025
|
-
next(2), delegated("click", tt,
|
|
19073
|
+
next(2), delegated("click", tt, Re), append(Oe, Be);
|
|
19026
19074
|
}, ht = (Oe) => {
|
|
19027
19075
|
var Be = root_33(), tt = sibling(child(Be), 2), lt = child(tt, !0);
|
|
19028
19076
|
reset(tt), reset(Be), template_effect(() => set_text(lt, get(ce))), append(Oe, Be);
|
|
@@ -19038,21 +19086,21 @@ function FeedbackPanel(d, p) {
|
|
|
19038
19086
|
template_effect(() => set_text(lt, get(ce))), delegated("click", pt, me), append(Oe, Be);
|
|
19039
19087
|
};
|
|
19040
19088
|
if_block(Ne, (Oe) => {
|
|
19041
|
-
get(oe) === "idle" ? Oe(
|
|
19089
|
+
get(oe) === "idle" ? Oe(Ve) : get(oe) === "recording" ? Oe(ft, 1) : get(oe) === "processing" ? Oe(ht, 2) : get(oe) === "done" ? Oe(_t, 3) : get(oe) === "error" && Oe(bt, 4);
|
|
19042
19090
|
});
|
|
19043
19091
|
}
|
|
19044
|
-
reset(
|
|
19045
|
-
var gt = sibling(
|
|
19092
|
+
reset(ke);
|
|
19093
|
+
var gt = sibling(ke, 2);
|
|
19046
19094
|
{
|
|
19047
|
-
var
|
|
19095
|
+
var At = (Oe) => {
|
|
19048
19096
|
var Be = root_36();
|
|
19049
19097
|
append(Oe, Be);
|
|
19050
19098
|
};
|
|
19051
19099
|
if_block(gt, (Oe) => {
|
|
19052
|
-
get(oe) === "idle" && Oe(
|
|
19100
|
+
get(oe) === "idle" && Oe(At);
|
|
19053
19101
|
});
|
|
19054
19102
|
}
|
|
19055
|
-
reset(
|
|
19103
|
+
reset(Te), reset(re), transition(3, re, () => slide, () => ({ duration: 200 })), append(Z, re);
|
|
19056
19104
|
};
|
|
19057
19105
|
if_block(nn, (Z) => {
|
|
19058
19106
|
get(N) === "voice" && Z(un);
|
|
@@ -19072,7 +19120,7 @@ function FeedbackPanel(d, p) {
|
|
|
19072
19120
|
}), reset(Wt);
|
|
19073
19121
|
var xn = sibling(Wt, 2);
|
|
19074
19122
|
{
|
|
19075
|
-
var
|
|
19123
|
+
var Rt = (Z) => {
|
|
19076
19124
|
AnnotationEditor(Z, {
|
|
19077
19125
|
get imageDataUrl() {
|
|
19078
19126
|
return get(We);
|
|
@@ -19082,7 +19130,7 @@ function FeedbackPanel(d, p) {
|
|
|
19082
19130
|
});
|
|
19083
19131
|
};
|
|
19084
19132
|
if_block(xn, (Z) => {
|
|
19085
|
-
get(nt) !== null && Z(
|
|
19133
|
+
get(nt) !== null && Z(Rt);
|
|
19086
19134
|
});
|
|
19087
19135
|
}
|
|
19088
19136
|
return template_effect(() => {
|
|
@@ -19130,7 +19178,7 @@ const $$css = {
|
|
|
19130
19178
|
};
|
|
19131
19179
|
function JatFeedback(d, p) {
|
|
19132
19180
|
push(p, !0), append_styles(d, $$css);
|
|
19133
|
-
let h = prop(p, "endpoint", 7, ""), g = prop(p, "project", 7, ""), m = prop(p, "position", 7, "bottom-right"), _ = prop(p, "theme", 7, "dark"), b = prop(p, "buttoncolor", 7, "#3b82f6"), y = prop(p, "user-id", 7, ""), w = prop(p, "user-email", 7, ""), x = prop(p, "user-name", 7, ""), E = prop(p, "user-role", 7, ""), S = prop(p, "org-id", 7, ""), k = prop(p, "org-name", 7, ""), I = prop(p, "agent-proxy", 7, ""),
|
|
19181
|
+
let h = prop(p, "endpoint", 7, ""), g = prop(p, "project", 7, ""), m = prop(p, "position", 7, "bottom-right"), _ = prop(p, "theme", 7, "dark"), b = prop(p, "buttoncolor", 7, "#3b82f6"), y = prop(p, "user-id", 7, ""), w = prop(p, "user-email", 7, ""), x = prop(p, "user-name", 7, ""), E = prop(p, "user-role", 7, ""), S = prop(p, "org-id", 7, ""), k = prop(p, "org-name", 7, ""), I = prop(p, "agent-proxy", 7, ""), R = prop(p, "agent-model", 7, ""), M = prop(p, "agent-context", 7, ""), A = /* @__PURE__ */ state(!1), C = /* @__PURE__ */ state(!1), N = /* @__PURE__ */ state(proxy([])), $ = /* @__PURE__ */ state(!1), O = { x: 0, y: 0 }, F = /* @__PURE__ */ state(void 0);
|
|
19134
19182
|
const j = 5;
|
|
19135
19183
|
function Y(W, { onDragEnd: ie } = {}) {
|
|
19136
19184
|
if (!get(F)) return;
|
|
@@ -19178,12 +19226,12 @@ function JatFeedback(d, p) {
|
|
|
19178
19226
|
buttonColor: b() || DEFAULT_CONFIG.buttonColor
|
|
19179
19227
|
}));
|
|
19180
19228
|
function ye() {
|
|
19181
|
-
set(
|
|
19229
|
+
set(A, !get(A));
|
|
19182
19230
|
}
|
|
19183
19231
|
function ve() {
|
|
19184
|
-
set(
|
|
19232
|
+
set(A, !1);
|
|
19185
19233
|
}
|
|
19186
|
-
const
|
|
19234
|
+
const Re = {
|
|
19187
19235
|
"bottom-right": "bottom: 20px; right: 20px;",
|
|
19188
19236
|
"bottom-left": "bottom: 20px; left: 20px;",
|
|
19189
19237
|
"top-right": "top: 20px; right: 20px;",
|
|
@@ -19195,7 +19243,7 @@ function JatFeedback(d, p) {
|
|
|
19195
19243
|
"top-left": "top: 80px; left: 0;"
|
|
19196
19244
|
};
|
|
19197
19245
|
function me(W) {
|
|
19198
|
-
if (W.key === "Escape" && get(
|
|
19246
|
+
if (W.key === "Escape" && get(A)) {
|
|
19199
19247
|
if (isAnnotationEditorOpen()) return;
|
|
19200
19248
|
W.stopPropagation(), W.stopImmediatePropagation(), ve();
|
|
19201
19249
|
}
|
|
@@ -19203,7 +19251,7 @@ function JatFeedback(d, p) {
|
|
|
19203
19251
|
onMount(() => {
|
|
19204
19252
|
get(se).captureConsole && (startConsoleCapture(get(se).maxConsoleLogs), startNetworkCapture()), startRetryLoop(), ce(), window.addEventListener("keydown", me, !0);
|
|
19205
19253
|
const W = () => {
|
|
19206
|
-
set(
|
|
19254
|
+
set(A, !0);
|
|
19207
19255
|
};
|
|
19208
19256
|
window.addEventListener("jat-feedback:open", W);
|
|
19209
19257
|
const ie = p.$$host;
|
|
@@ -19287,10 +19335,10 @@ function JatFeedback(d, p) {
|
|
|
19287
19335
|
I(W), flushSync();
|
|
19288
19336
|
},
|
|
19289
19337
|
get "agent-model"() {
|
|
19290
|
-
return
|
|
19338
|
+
return R();
|
|
19291
19339
|
},
|
|
19292
19340
|
set "agent-model"(W = "") {
|
|
19293
|
-
|
|
19341
|
+
R(W), flushSync();
|
|
19294
19342
|
},
|
|
19295
19343
|
get "agent-context"() {
|
|
19296
19344
|
return M();
|
|
@@ -19312,7 +19360,7 @@ function JatFeedback(d, p) {
|
|
|
19312
19360
|
return g();
|
|
19313
19361
|
},
|
|
19314
19362
|
get isOpen() {
|
|
19315
|
-
return get(
|
|
19363
|
+
return get(A);
|
|
19316
19364
|
},
|
|
19317
19365
|
get userId() {
|
|
19318
19366
|
return y();
|
|
@@ -19336,7 +19384,7 @@ function JatFeedback(d, p) {
|
|
|
19336
19384
|
return I();
|
|
19337
19385
|
},
|
|
19338
19386
|
get agentModel() {
|
|
19339
|
-
return
|
|
19387
|
+
return R();
|
|
19340
19388
|
},
|
|
19341
19389
|
get agentContext() {
|
|
19342
19390
|
return M();
|
|
@@ -19347,23 +19395,23 @@ function JatFeedback(d, p) {
|
|
|
19347
19395
|
onclose: ve,
|
|
19348
19396
|
ongrip: q
|
|
19349
19397
|
}), reset(ie), template_effect(() => {
|
|
19350
|
-
J = set_class(ie, 1, "jat-feedback-panel svelte-qpyrvv", null, J, { dragging: get($), hidden: !get(
|
|
19398
|
+
J = set_class(ie, 1, "jat-feedback-panel svelte-qpyrvv", null, J, { dragging: get($), hidden: !get(A) }), set_style(ie, Ee[get(se).position] || Ee["bottom-right"]);
|
|
19351
19399
|
}), append(W, ie);
|
|
19352
19400
|
}, P = (W) => {
|
|
19353
19401
|
var ie = root_2();
|
|
19354
19402
|
template_effect(() => set_style(ie, Ee[get(se).position] || Ee["bottom-right"])), append(W, ie);
|
|
19355
19403
|
};
|
|
19356
19404
|
if_block(z, (W) => {
|
|
19357
|
-
get(se).endpoint ? W(L) : get(
|
|
19405
|
+
get(se).endpoint ? W(L) : get(A) && W(P, 1);
|
|
19358
19406
|
});
|
|
19359
19407
|
}
|
|
19360
19408
|
var G = sibling(z, 2);
|
|
19361
19409
|
return FeedbackButton(G, {
|
|
19362
19410
|
onmousedown: de,
|
|
19363
19411
|
get open() {
|
|
19364
|
-
return get(
|
|
19412
|
+
return get(A);
|
|
19365
19413
|
}
|
|
19366
|
-
}), reset(T), bind_this(T, (W) => set(F, W), () => get(F)), template_effect(() => set_style(T, `${(
|
|
19414
|
+
}), reset(T), bind_this(T, (W) => set(F, W), () => get(F)), template_effect(() => set_style(T, `${(Re[get(se).position] || Re["bottom-right"]) ?? ""}; --jat-btn-color: ${get(se).buttonColor ?? ""}; ${get(C) ? "display: none;" : ""}`)), append(d, T), pop(Se);
|
|
19367
19415
|
}
|
|
19368
19416
|
customElements.define("jat-feedback", create_custom_element(
|
|
19369
19417
|
JatFeedback,
|
|
@@ -19395,7 +19443,7 @@ customElements.define("jat-feedback", create_custom_element(
|
|
|
19395
19443
|
* @repository https://github.com/gaomeng1900/ai-motion
|
|
19396
19444
|
*/
|
|
19397
19445
|
function computeBorderGeometry(d, p, h, g) {
|
|
19398
|
-
const m = Math.max(1, Math.min(d, p)), _ = Math.min(h, 20), y = Math.min(_ + g, m), w = Math.min(y, Math.floor(d / 2)), x = Math.min(y, Math.floor(p / 2)), E = (P) => P / d * 2 - 1, S = (P) => P / p * 2 - 1, k = 0, I = d,
|
|
19446
|
+
const m = Math.max(1, Math.min(d, p)), _ = Math.min(h, 20), y = Math.min(_ + g, m), w = Math.min(y, Math.floor(d / 2)), x = Math.min(y, Math.floor(p / 2)), E = (P) => P / d * 2 - 1, S = (P) => P / p * 2 - 1, k = 0, I = d, R = 0, M = p, A = w, C = d - w, N = x, $ = p - x, O = E(k), F = E(I), j = S(R), Y = S(M), q = E(A), de = E(C), oe = S(N), ce = S($), se = 0, ye = 0, ve = 1, Re = 1, Ee = w / d, me = 1 - w / d, Se = x / p, T = 1 - x / p, z = new Float32Array([
|
|
19399
19447
|
// Top strip
|
|
19400
19448
|
O,
|
|
19401
19449
|
j,
|
|
@@ -19468,13 +19516,13 @@ function computeBorderGeometry(d, p, h, g) {
|
|
|
19468
19516
|
ve,
|
|
19469
19517
|
T,
|
|
19470
19518
|
se,
|
|
19471
|
-
|
|
19519
|
+
Re,
|
|
19472
19520
|
se,
|
|
19473
|
-
|
|
19521
|
+
Re,
|
|
19474
19522
|
ve,
|
|
19475
19523
|
T,
|
|
19476
19524
|
ve,
|
|
19477
|
-
|
|
19525
|
+
Re,
|
|
19478
19526
|
// Left strip
|
|
19479
19527
|
se,
|
|
19480
19528
|
Se,
|
|
@@ -19662,16 +19710,16 @@ function parseColor(d) {
|
|
|
19662
19710
|
}
|
|
19663
19711
|
class Motion {
|
|
19664
19712
|
constructor(p = {}) {
|
|
19665
|
-
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19713
|
+
Ce(this, "element");
|
|
19714
|
+
Ce(this, "canvas");
|
|
19715
|
+
Ce(this, "options");
|
|
19716
|
+
Ce(this, "running", !1);
|
|
19717
|
+
Ce(this, "disposed", !1);
|
|
19718
|
+
Ce(this, "startTime", 0);
|
|
19719
|
+
Ce(this, "lastTime", 0);
|
|
19720
|
+
Ce(this, "rafId", null);
|
|
19721
|
+
Ce(this, "glr");
|
|
19722
|
+
Ce(this, "observer");
|
|
19675
19723
|
this.options = {
|
|
19676
19724
|
width: p.width ?? 600,
|
|
19677
19725
|
height: p.height ?? 600,
|
|
@@ -19717,7 +19765,7 @@ class Motion {
|
|
|
19717
19765
|
if (this.options.width = p, this.options.height = h, g && (this.options.ratio = g), !this.running) return;
|
|
19718
19766
|
const { gl: m, program: _, vao: b, positionBuffer: y, uvBuffer: w, uResolution: x } = this.glr, E = g ?? this.options.ratio ?? window.devicePixelRatio ?? 1, S = Math.max(1, Math.floor(p * E)), k = Math.max(1, Math.floor(h * E));
|
|
19719
19767
|
this.canvas.style.width = `${p}px`, this.canvas.style.height = `${h}px`, (this.canvas.width !== S || this.canvas.height !== k) && (this.canvas.width = S, this.canvas.height = k), m.viewport(0, 0, this.canvas.width, this.canvas.height), this.checkGLError(m, "resize: after viewport setup");
|
|
19720
|
-
const { positions: I, uvs:
|
|
19768
|
+
const { positions: I, uvs: R } = computeBorderGeometry(
|
|
19721
19769
|
this.canvas.width,
|
|
19722
19770
|
this.canvas.height,
|
|
19723
19771
|
this.options.borderWidth * E,
|
|
@@ -19725,9 +19773,9 @@ class Motion {
|
|
|
19725
19773
|
);
|
|
19726
19774
|
m.bindVertexArray(b), m.bindBuffer(m.ARRAY_BUFFER, y), m.bufferData(m.ARRAY_BUFFER, I, m.STATIC_DRAW);
|
|
19727
19775
|
const M = m.getAttribLocation(_, "aPosition");
|
|
19728
|
-
m.enableVertexAttribArray(M), m.vertexAttribPointer(M, 2, m.FLOAT, !1, 0, 0), this.checkGLError(m, "resize: after position buffer update"), m.bindBuffer(m.ARRAY_BUFFER, w), m.bufferData(m.ARRAY_BUFFER,
|
|
19729
|
-
const
|
|
19730
|
-
m.enableVertexAttribArray(
|
|
19776
|
+
m.enableVertexAttribArray(M), m.vertexAttribPointer(M, 2, m.FLOAT, !1, 0, 0), this.checkGLError(m, "resize: after position buffer update"), m.bindBuffer(m.ARRAY_BUFFER, w), m.bufferData(m.ARRAY_BUFFER, R, m.STATIC_DRAW);
|
|
19777
|
+
const A = m.getAttribLocation(_, "aUV");
|
|
19778
|
+
m.enableVertexAttribArray(A), m.vertexAttribPointer(A, 2, m.FLOAT, !1, 0, 0), this.checkGLError(m, "resize: after UV buffer update"), m.useProgram(_), m.uniform2f(x, this.canvas.width, this.canvas.height), m.uniform1f(this.glr.uBorderWidth, this.options.borderWidth * E), m.uniform1f(this.glr.uGlowWidth, this.options.glowWidth * E), m.uniform1f(this.glr.uBorderRadius, this.options.borderRadius * E), this.checkGLError(m, "resize: after uniform updates");
|
|
19731
19779
|
const C = performance.now();
|
|
19732
19780
|
this.lastTime = C;
|
|
19733
19781
|
const N = (C - this.startTime) * 1e-3;
|
|
@@ -19818,8 +19866,8 @@ class Motion {
|
|
|
19818
19866
|
p.bindBuffer(p.ARRAY_BUFFER, E), p.bufferData(p.ARRAY_BUFFER, y, p.STATIC_DRAW);
|
|
19819
19867
|
const S = p.getAttribLocation(h, "aUV");
|
|
19820
19868
|
p.enableVertexAttribArray(S), p.vertexAttribPointer(S, 2, p.FLOAT, !1, 0, 0), this.checkGLError(p, "setupGL: after UV buffer setup");
|
|
19821
|
-
const k = p.getUniformLocation(h, "uResolution"), I = p.getUniformLocation(h, "uTime"),
|
|
19822
|
-
p.useProgram(h), p.uniform1f(
|
|
19869
|
+
const k = p.getUniformLocation(h, "uResolution"), I = p.getUniformLocation(h, "uTime"), R = p.getUniformLocation(h, "uBorderWidth"), M = p.getUniformLocation(h, "uGlowWidth"), A = p.getUniformLocation(h, "uBorderRadius"), C = p.getUniformLocation(h, "uColors"), N = p.getUniformLocation(h, "uGlowExponent"), $ = p.getUniformLocation(h, "uGlowFactor");
|
|
19870
|
+
p.useProgram(h), p.uniform1f(R, this.options.borderWidth), p.uniform1f(M, this.options.glowWidth), p.uniform1f(A, this.options.borderRadius), this.options.mode === "dark" ? (p.uniform1f(N, 2), p.uniform1f($, 1.8)) : (p.uniform1f(N, 1), p.uniform1f($, 1));
|
|
19823
19871
|
const O = (this.options.colors || DEFAULT_COLORS).map(parseColor);
|
|
19824
19872
|
for (let F = 0; F < O.length; F++)
|
|
19825
19873
|
p.uniform3f(p.getUniformLocation(h, `uColors[${F}]`), ...O[F]);
|
|
@@ -19831,9 +19879,9 @@ class Motion {
|
|
|
19831
19879
|
uvBuffer: E,
|
|
19832
19880
|
uResolution: k,
|
|
19833
19881
|
uTime: I,
|
|
19834
|
-
uBorderWidth:
|
|
19882
|
+
uBorderWidth: R,
|
|
19835
19883
|
uGlowWidth: M,
|
|
19836
|
-
uBorderRadius:
|
|
19884
|
+
uBorderRadius: A,
|
|
19837
19885
|
uColors: C
|
|
19838
19886
|
};
|
|
19839
19887
|
}
|