twd-js 1.4.1 → 1.4.3

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.
@@ -1,93 +1,96 @@
1
- var J, g, Ce, C, ue, $e, Ie, Ae, oe, Z, Q, M = {}, We = [], Ve = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, X = Array.isArray;
1
+ var Ye = Object.defineProperty;
2
+ var Ke = (e, t, r) => t in e ? Ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var fe = (e, t, r) => Ke(e, typeof t != "symbol" ? t + "" : t, r);
4
+ var Y, w, Le, C, he, Me, We, He, ie, te, re, z = {}, ze = [], Ze = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, K = Array.isArray;
2
5
  function T(e, t) {
3
6
  for (var r in t) e[r] = t[r];
4
7
  return e;
5
8
  }
6
- function se(e) {
9
+ function ae(e) {
7
10
  e && e.parentNode && e.parentNode.removeChild(e);
8
11
  }
9
- function Je(e, t, r) {
10
- var n, i, o, l = {};
11
- for (o in t) o == "key" ? n = t[o] : o == "ref" ? i = t[o] : l[o] = t[o];
12
- if (arguments.length > 2 && (l.children = arguments.length > 3 ? J.call(arguments, 2) : r), typeof e == "function" && e.defaultProps != null) for (o in e.defaultProps) l[o] === void 0 && (l[o] = e.defaultProps[o]);
13
- return O(e, l, n, i, null);
12
+ function Qe(e, t, r) {
13
+ var n, s, o, l = {};
14
+ for (o in t) o == "key" ? n = t[o] : o == "ref" ? s = t[o] : l[o] = t[o];
15
+ if (arguments.length > 2 && (l.children = arguments.length > 3 ? Y.call(arguments, 2) : r), typeof e == "function" && e.defaultProps != null) for (o in e.defaultProps) l[o] === void 0 && (l[o] = e.defaultProps[o]);
16
+ return j(e, l, n, s, null);
14
17
  }
15
- function O(e, t, r, n, i) {
16
- var o = { type: e, props: t, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++Ce, __i: -1, __u: 0 };
17
- return i == null && g.vnode != null && g.vnode(o), o;
18
+ function j(e, t, r, n, s) {
19
+ var o = { type: e, props: t, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: s ?? ++Le, __i: -1, __u: 0 };
20
+ return s == null && w.vnode != null && w.vnode(o), o;
18
21
  }
19
- function z(e) {
22
+ function B(e) {
20
23
  return e.children;
21
24
  }
22
25
  function U(e, t) {
23
26
  this.props = e, this.context = t;
24
27
  }
25
- function I(e, t) {
26
- if (t == null) return e.__ ? I(e.__, e.__i + 1) : null;
28
+ function A(e, t) {
29
+ if (t == null) return e.__ ? A(e.__, e.__i + 1) : null;
27
30
  for (var r; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) return r.__e;
28
- return typeof e.type == "function" ? I(e) : null;
31
+ return typeof e.type == "function" ? A(e) : null;
29
32
  }
30
- function Le(e) {
33
+ function Ne(e) {
31
34
  var t, r;
32
35
  if ((e = e.__) != null && e.__c != null) {
33
36
  for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) {
34
37
  e.__e = e.__c.base = r.__e;
35
38
  break;
36
39
  }
37
- return Le(e);
40
+ return Ne(e);
38
41
  }
39
42
  }
40
- function pe(e) {
41
- (!e.__d && (e.__d = !0) && C.push(e) && !q.__r++ || ue != g.debounceRendering) && ((ue = g.debounceRendering) || $e)(q);
43
+ function ge(e) {
44
+ (!e.__d && (e.__d = !0) && C.push(e) && !X.__r++ || he != w.debounceRendering) && ((he = w.debounceRendering) || Me)(X);
42
45
  }
43
- function q() {
44
- for (var e, t, r, n, i, o, l, d = 1; C.length; ) C.length > d && C.sort(Ie), e = C.shift(), d = C.length, e.__d && (r = void 0, n = void 0, i = (n = (t = e).__v).__e, o = [], l = [], t.__P && ((r = T({}, n)).__v = n.__v + 1, g.vnode && g.vnode(r), ie(t.__P, r, n, t.__n, t.__P.namespaceURI, 32 & n.__u ? [i] : null, o, i ?? I(n), !!(32 & n.__u), l), r.__v = n.__v, r.__.__k[r.__i] = r, Ne(o, r, l), n.__e = n.__ = null, r.__e != i && Le(r)));
45
- q.__r = 0;
46
+ function X() {
47
+ for (var e, t, r, n, s, o, l, c = 1; C.length; ) C.length > c && C.sort(We), e = C.shift(), c = C.length, e.__d && (r = void 0, n = void 0, s = (n = (t = e).__v).__e, o = [], l = [], t.__P && ((r = T({}, n)).__v = n.__v + 1, w.vnode && w.vnode(r), le(t.__P, r, n, t.__n, t.__P.namespaceURI, 32 & n.__u ? [s] : null, o, s ?? A(n), !!(32 & n.__u), l), r.__v = n.__v, r.__.__k[r.__i] = r, Pe(o, r, l), n.__e = n.__ = null, r.__e != s && Ne(r)));
48
+ X.__r = 0;
46
49
  }
47
- function He(e, t, r, n, i, o, l, d, f, a, p) {
48
- var s, c, u, h, k, b, v, m = n && n.__k || We, E = t.length;
49
- for (f = Xe(r, t, m, f, E), s = 0; s < E; s++) (u = r.__k[s]) != null && (c = u.__i == -1 ? M : m[u.__i] || M, u.__i = s, b = ie(e, u, c, i, o, l, d, f, a, p), h = u.__e, u.ref && c.ref != u.ref && (c.ref && ae(c.ref, null, u), p.push(u.ref, u.__c || h, u)), k == null && h != null && (k = h), (v = !!(4 & u.__u)) || c.__k === u.__k ? f = Me(u, f, e, v) : typeof u.type == "function" && b !== void 0 ? f = b : h && (f = h.nextSibling), u.__u &= -7);
50
- return r.__e = k, f;
50
+ function Be(e, t, r, n, s, o, l, c, f, a, h) {
51
+ var i, u, p, _, g, v, m, y = n && n.__k || ze, E = t.length;
52
+ for (f = et(r, t, y, f, E), i = 0; i < E; i++) (p = r.__k[i]) != null && (u = p.__i == -1 ? z : y[p.__i] || z, p.__i = i, v = le(e, p, u, s, o, l, c, f, a, h), _ = p.__e, p.ref && u.ref != p.ref && (u.ref && ce(u.ref, null, p), h.push(p.ref, p.__c || _, p)), g == null && _ != null && (g = _), (m = !!(4 & p.__u)) || u.__k === p.__k ? f = De(p, f, e, m) : typeof p.type == "function" && v !== void 0 ? f = v : _ && (f = _.nextSibling), p.__u &= -7);
53
+ return r.__e = g, f;
51
54
  }
52
- function Xe(e, t, r, n, i) {
53
- var o, l, d, f, a, p = r.length, s = p, c = 0;
54
- for (e.__k = new Array(i), o = 0; o < i; o++) (l = t[o]) != null && typeof l != "boolean" && typeof l != "function" ? (typeof l == "string" || typeof l == "number" || typeof l == "bigint" || l.constructor == String ? l = e.__k[o] = O(null, l, null, null, null) : X(l) ? l = e.__k[o] = O(z, { children: l }, null, null, null) : l.constructor === void 0 && l.__b > 0 ? l = e.__k[o] = O(l.type, l.props, l.key, l.ref ? l.ref : null, l.__v) : e.__k[o] = l, f = o + c, l.__ = e, l.__b = e.__b + 1, d = null, (a = l.__i = Ge(l, r, f, s)) != -1 && (s--, (d = r[a]) && (d.__u |= 2)), d == null || d.__v == null ? (a == -1 && (i > p ? c-- : i < p && c++), typeof l.type != "function" && (l.__u |= 4)) : a != f && (a == f - 1 ? c-- : a == f + 1 ? c++ : (a > f ? c-- : c++, l.__u |= 4))) : e.__k[o] = null;
55
- if (s) for (o = 0; o < p; o++) (d = r[o]) != null && (2 & d.__u) == 0 && (d.__e == n && (n = I(d)), Be(d, d));
55
+ function et(e, t, r, n, s) {
56
+ var o, l, c, f, a, h = r.length, i = h, u = 0;
57
+ for (e.__k = new Array(s), o = 0; o < s; o++) (l = t[o]) != null && typeof l != "boolean" && typeof l != "function" ? (typeof l == "string" || typeof l == "number" || typeof l == "bigint" || l.constructor == String ? l = e.__k[o] = j(null, l, null, null, null) : K(l) ? l = e.__k[o] = j(B, { children: l }, null, null, null) : l.constructor === void 0 && l.__b > 0 ? l = e.__k[o] = j(l.type, l.props, l.key, l.ref ? l.ref : null, l.__v) : e.__k[o] = l, f = o + u, l.__ = e, l.__b = e.__b + 1, c = null, (a = l.__i = tt(l, r, f, i)) != -1 && (i--, (c = r[a]) && (c.__u |= 2)), c == null || c.__v == null ? (a == -1 && (s > h ? u-- : s < h && u++), typeof l.type != "function" && (l.__u |= 4)) : a != f && (a == f - 1 ? u-- : a == f + 1 ? u++ : (a > f ? u-- : u++, l.__u |= 4))) : e.__k[o] = null;
58
+ if (i) for (o = 0; o < h; o++) (c = r[o]) != null && (2 & c.__u) == 0 && (c.__e == n && (n = A(c)), Oe(c, c));
56
59
  return n;
57
60
  }
58
- function Me(e, t, r, n) {
59
- var i, o;
61
+ function De(e, t, r, n) {
62
+ var s, o;
60
63
  if (typeof e.type == "function") {
61
- for (i = e.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = e, t = Me(i[o], t, r, n));
64
+ for (s = e.__k, o = 0; s && o < s.length; o++) s[o] && (s[o].__ = e, t = De(s[o], t, r, n));
62
65
  return t;
63
66
  }
64
- e.__e != t && (n && (t && e.type && !t.parentNode && (t = I(e)), r.insertBefore(e.__e, t || null)), t = e.__e);
67
+ e.__e != t && (n && (t && e.type && !t.parentNode && (t = A(e)), r.insertBefore(e.__e, t || null)), t = e.__e);
65
68
  do
66
69
  t = t && t.nextSibling;
67
70
  while (t != null && t.nodeType == 8);
68
71
  return t;
69
72
  }
70
- function Ge(e, t, r, n) {
71
- var i, o, l, d = e.key, f = e.type, a = t[r], p = a != null && (2 & a.__u) == 0;
72
- if (a === null && d == null || p && d == a.key && f == a.type) return r;
73
- if (n > (p ? 1 : 0)) {
74
- for (i = r - 1, o = r + 1; i >= 0 || o < t.length; ) if ((a = t[l = i >= 0 ? i-- : o++]) != null && (2 & a.__u) == 0 && d == a.key && f == a.type) return l;
73
+ function tt(e, t, r, n) {
74
+ var s, o, l, c = e.key, f = e.type, a = t[r], h = a != null && (2 & a.__u) == 0;
75
+ if (a === null && c == null || h && c == a.key && f == a.type) return r;
76
+ if (n > (h ? 1 : 0)) {
77
+ for (s = r - 1, o = r + 1; s >= 0 || o < t.length; ) if ((a = t[l = s >= 0 ? s-- : o++]) != null && (2 & a.__u) == 0 && c == a.key && f == a.type) return l;
75
78
  }
76
79
  return -1;
77
80
  }
78
- function fe(e, t, r) {
79
- t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || Ve.test(t) ? r : r + "px";
81
+ function me(e, t, r) {
82
+ t[0] == "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || Ze.test(t) ? r : r + "px";
80
83
  }
81
- function P(e, t, r, n, i) {
84
+ function F(e, t, r, n, s) {
82
85
  var o, l;
83
86
  e: if (t == "style") if (typeof r == "string") e.style.cssText = r;
84
87
  else {
85
- if (typeof n == "string" && (e.style.cssText = n = ""), n) for (t in n) r && t in r || fe(e.style, t, "");
86
- if (r) for (t in r) n && r[t] == n[t] || fe(e.style, t, r[t]);
88
+ if (typeof n == "string" && (e.style.cssText = n = ""), n) for (t in n) r && t in r || me(e.style, t, "");
89
+ if (r) for (t in r) n && r[t] == n[t] || me(e.style, t, r[t]);
87
90
  }
88
- else if (t[0] == "o" && t[1] == "n") o = t != (t = t.replace(Ae, "$1")), l = t.toLowerCase(), t = l in e || t == "onFocusOut" || t == "onFocusIn" ? l.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + o] = r, r ? n ? r.u = n.u : (r.u = oe, e.addEventListener(t, o ? Q : Z, o)) : e.removeEventListener(t, o ? Q : Z, o);
91
+ else if (t[0] == "o" && t[1] == "n") o = t != (t = t.replace(He, "$1")), l = t.toLowerCase(), t = l in e || t == "onFocusOut" || t == "onFocusIn" ? l.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + o] = r, r ? n ? r.u = n.u : (r.u = ie, e.addEventListener(t, o ? re : te, o)) : e.removeEventListener(t, o ? re : te, o);
89
92
  else {
90
- if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
93
+ if (s == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
91
94
  else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
92
95
  e[t] = r ?? "";
93
96
  break e;
@@ -96,157 +99,157 @@ function P(e, t, r, n, i) {
96
99
  typeof r == "function" || (r == null || r === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && r == 1 ? "" : r));
97
100
  }
98
101
  }
99
- function he(e) {
102
+ function ve(e) {
100
103
  return function(t) {
101
104
  if (this.l) {
102
105
  var r = this.l[t.type + e];
103
- if (t.t == null) t.t = oe++;
106
+ if (t.t == null) t.t = ie++;
104
107
  else if (t.t < r.u) return;
105
- return r(g.event ? g.event(t) : t);
108
+ return r(w.event ? w.event(t) : t);
106
109
  }
107
110
  };
108
111
  }
109
- function ie(e, t, r, n, i, o, l, d, f, a) {
110
- var p, s, c, u, h, k, b, v, m, E, R, B, A, _e, D, W, K, S = t.type;
112
+ function le(e, t, r, n, s, o, l, c, f, a) {
113
+ var h, i, u, p, _, g, v, m, y, E, $, D, L, pe, P, M, Q, x = t.type;
111
114
  if (t.constructor !== void 0) return null;
112
- 128 & r.__u && (f = !!(32 & r.__u), o = [d = t.__e = r.__e]), (p = g.__b) && p(t);
113
- e: if (typeof S == "function") try {
114
- if (v = t.props, m = "prototype" in S && S.prototype.render, E = (p = S.contextType) && n[p.__c], R = p ? E ? E.props.value : p.__ : n, r.__c ? b = (s = t.__c = r.__c).__ = s.__E : (m ? t.__c = s = new S(v, R) : (t.__c = s = new U(v, R), s.constructor = S, s.render = Ye), E && E.sub(s), s.state || (s.state = {}), s.__n = n, c = s.__d = !0, s.__h = [], s._sb = []), m && s.__s == null && (s.__s = s.state), m && S.getDerivedStateFromProps != null && (s.__s == s.state && (s.__s = T({}, s.__s)), T(s.__s, S.getDerivedStateFromProps(v, s.__s))), u = s.props, h = s.state, s.__v = t, c) m && S.getDerivedStateFromProps == null && s.componentWillMount != null && s.componentWillMount(), m && s.componentDidMount != null && s.__h.push(s.componentDidMount);
115
+ 128 & r.__u && (f = !!(32 & r.__u), o = [c = t.__e = r.__e]), (h = w.__b) && h(t);
116
+ e: if (typeof x == "function") try {
117
+ if (m = t.props, y = "prototype" in x && x.prototype.render, E = (h = x.contextType) && n[h.__c], $ = h ? E ? E.props.value : h.__ : n, r.__c ? v = (i = t.__c = r.__c).__ = i.__E : (y ? t.__c = i = new x(m, $) : (t.__c = i = new U(m, $), i.constructor = x, i.render = nt), E && E.sub(i), i.state || (i.state = {}), i.__n = n, u = i.__d = !0, i.__h = [], i._sb = []), y && i.__s == null && (i.__s = i.state), y && x.getDerivedStateFromProps != null && (i.__s == i.state && (i.__s = T({}, i.__s)), T(i.__s, x.getDerivedStateFromProps(m, i.__s))), p = i.props, _ = i.state, i.__v = t, u) y && x.getDerivedStateFromProps == null && i.componentWillMount != null && i.componentWillMount(), y && i.componentDidMount != null && i.__h.push(i.componentDidMount);
115
118
  else {
116
- if (m && S.getDerivedStateFromProps == null && v !== u && s.componentWillReceiveProps != null && s.componentWillReceiveProps(v, R), t.__v == r.__v || !s.__e && s.shouldComponentUpdate != null && s.shouldComponentUpdate(v, s.__s, R) === !1) {
117
- for (t.__v != r.__v && (s.props = v, s.state = s.__s, s.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function($) {
118
- $ && ($.__ = t);
119
- }), B = 0; B < s._sb.length; B++) s.__h.push(s._sb[B]);
120
- s._sb = [], s.__h.length && l.push(s);
119
+ if (y && x.getDerivedStateFromProps == null && m !== p && i.componentWillReceiveProps != null && i.componentWillReceiveProps(m, $), t.__v == r.__v || !i.__e && i.shouldComponentUpdate != null && i.shouldComponentUpdate(m, i.__s, $) === !1) {
120
+ for (t.__v != r.__v && (i.props = m, i.state = i.__s, i.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(I) {
121
+ I && (I.__ = t);
122
+ }), D = 0; D < i._sb.length; D++) i.__h.push(i._sb[D]);
123
+ i._sb = [], i.__h.length && l.push(i);
121
124
  break e;
122
125
  }
123
- s.componentWillUpdate != null && s.componentWillUpdate(v, s.__s, R), m && s.componentDidUpdate != null && s.__h.push(function() {
124
- s.componentDidUpdate(u, h, k);
126
+ i.componentWillUpdate != null && i.componentWillUpdate(m, i.__s, $), y && i.componentDidUpdate != null && i.__h.push(function() {
127
+ i.componentDidUpdate(p, _, g);
125
128
  });
126
129
  }
127
- if (s.context = R, s.props = v, s.__P = e, s.__e = !1, A = g.__r, _e = 0, m) {
128
- for (s.state = s.__s, s.__d = !1, A && A(t), p = s.render(s.props, s.state, s.context), D = 0; D < s._sb.length; D++) s.__h.push(s._sb[D]);
129
- s._sb = [];
130
+ if (i.context = $, i.props = m, i.__P = e, i.__e = !1, L = w.__r, pe = 0, y) {
131
+ for (i.state = i.__s, i.__d = !1, L && L(t), h = i.render(i.props, i.state, i.context), P = 0; P < i._sb.length; P++) i.__h.push(i._sb[P]);
132
+ i._sb = [];
130
133
  } else do
131
- s.__d = !1, A && A(t), p = s.render(s.props, s.state, s.context), s.state = s.__s;
132
- while (s.__d && ++_e < 25);
133
- s.state = s.__s, s.getChildContext != null && (n = T(T({}, n), s.getChildContext())), m && !c && s.getSnapshotBeforeUpdate != null && (k = s.getSnapshotBeforeUpdate(u, h)), W = p, p != null && p.type === z && p.key == null && (W = ze(p.props.children)), d = He(e, X(W) ? W : [W], t, r, n, i, o, l, d, f, a), s.base = t.__e, t.__u &= -161, s.__h.length && l.push(s), b && (s.__E = s.__ = null);
134
- } catch ($) {
135
- if (t.__v = null, f || o != null) if ($.then) {
136
- for (t.__u |= f ? 160 : 128; d && d.nodeType == 8 && d.nextSibling; ) d = d.nextSibling;
137
- o[o.indexOf(d)] = null, t.__e = d;
134
+ i.__d = !1, L && L(t), h = i.render(i.props, i.state, i.context), i.state = i.__s;
135
+ while (i.__d && ++pe < 25);
136
+ i.state = i.__s, i.getChildContext != null && (n = T(T({}, n), i.getChildContext())), y && !u && i.getSnapshotBeforeUpdate != null && (g = i.getSnapshotBeforeUpdate(p, _)), M = h, h != null && h.type === B && h.key == null && (M = Fe(h.props.children)), c = Be(e, K(M) ? M : [M], t, r, n, s, o, l, c, f, a), i.base = t.__e, t.__u &= -161, i.__h.length && l.push(i), v && (i.__E = i.__ = null);
137
+ } catch (I) {
138
+ if (t.__v = null, f || o != null) if (I.then) {
139
+ for (t.__u |= f ? 160 : 128; c && c.nodeType == 8 && c.nextSibling; ) c = c.nextSibling;
140
+ o[o.indexOf(c)] = null, t.__e = c;
138
141
  } else {
139
- for (K = o.length; K--; ) se(o[K]);
140
- ee(t);
142
+ for (Q = o.length; Q--; ) ae(o[Q]);
143
+ ne(t);
141
144
  }
142
- else t.__e = r.__e, t.__k = r.__k, $.then || ee(t);
143
- g.__e($, t, r);
145
+ else t.__e = r.__e, t.__k = r.__k, I.then || ne(t);
146
+ w.__e(I, t, r);
144
147
  }
145
- else o == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : d = t.__e = Ke(r.__e, t, r, n, i, o, l, f, a);
146
- return (p = g.diffed) && p(t), 128 & t.__u ? void 0 : d;
148
+ else o == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : c = t.__e = rt(r.__e, t, r, n, s, o, l, f, a);
149
+ return (h = w.diffed) && h(t), 128 & t.__u ? void 0 : c;
147
150
  }
148
- function ee(e) {
149
- e && e.__c && (e.__c.__e = !0), e && e.__k && e.__k.forEach(ee);
151
+ function ne(e) {
152
+ e && e.__c && (e.__c.__e = !0), e && e.__k && e.__k.forEach(ne);
150
153
  }
151
- function Ne(e, t, r) {
152
- for (var n = 0; n < r.length; n++) ae(r[n], r[++n], r[++n]);
153
- g.__c && g.__c(t, e), e.some(function(i) {
154
+ function Pe(e, t, r) {
155
+ for (var n = 0; n < r.length; n++) ce(r[n], r[++n], r[++n]);
156
+ w.__c && w.__c(t, e), e.some(function(s) {
154
157
  try {
155
- e = i.__h, i.__h = [], e.some(function(o) {
156
- o.call(i);
158
+ e = s.__h, s.__h = [], e.some(function(o) {
159
+ o.call(s);
157
160
  });
158
161
  } catch (o) {
159
- g.__e(o, i.__v);
162
+ w.__e(o, s.__v);
160
163
  }
161
164
  });
162
165
  }
163
- function ze(e) {
164
- return typeof e != "object" || e == null || e.__b && e.__b > 0 ? e : X(e) ? e.map(ze) : T({}, e);
166
+ function Fe(e) {
167
+ return typeof e != "object" || e == null || e.__b && e.__b > 0 ? e : K(e) ? e.map(Fe) : T({}, e);
165
168
  }
166
- function Ke(e, t, r, n, i, o, l, d, f) {
167
- var a, p, s, c, u, h, k, b = r.props || M, v = t.props, m = t.type;
168
- if (m == "svg" ? i = "http://www.w3.org/2000/svg" : m == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), o != null) {
169
- for (a = 0; a < o.length; a++) if ((u = o[a]) && "setAttribute" in u == !!m && (m ? u.localName == m : u.nodeType == 3)) {
170
- e = u, o[a] = null;
169
+ function rt(e, t, r, n, s, o, l, c, f) {
170
+ var a, h, i, u, p, _, g, v = r.props || z, m = t.props, y = t.type;
171
+ if (y == "svg" ? s = "http://www.w3.org/2000/svg" : y == "math" ? s = "http://www.w3.org/1998/Math/MathML" : s || (s = "http://www.w3.org/1999/xhtml"), o != null) {
172
+ for (a = 0; a < o.length; a++) if ((p = o[a]) && "setAttribute" in p == !!y && (y ? p.localName == y : p.nodeType == 3)) {
173
+ e = p, o[a] = null;
171
174
  break;
172
175
  }
173
176
  }
174
177
  if (e == null) {
175
- if (m == null) return document.createTextNode(v);
176
- e = document.createElementNS(i, m, v.is && v), d && (g.__m && g.__m(t, o), d = !1), o = null;
178
+ if (y == null) return document.createTextNode(m);
179
+ e = document.createElementNS(s, y, m.is && m), c && (w.__m && w.__m(t, o), c = !1), o = null;
177
180
  }
178
- if (m == null) b === v || d && e.data == v || (e.data = v);
181
+ if (y == null) v === m || c && e.data == m || (e.data = m);
179
182
  else {
180
- if (o = o && J.call(e.childNodes), !d && o != null) for (b = {}, a = 0; a < e.attributes.length; a++) b[(u = e.attributes[a]).name] = u.value;
181
- for (a in b) if (u = b[a], a != "children") {
182
- if (a == "dangerouslySetInnerHTML") s = u;
183
- else if (!(a in v)) {
184
- if (a == "value" && "defaultValue" in v || a == "checked" && "defaultChecked" in v) continue;
185
- P(e, a, null, u, i);
183
+ if (o = o && Y.call(e.childNodes), !c && o != null) for (v = {}, a = 0; a < e.attributes.length; a++) v[(p = e.attributes[a]).name] = p.value;
184
+ for (a in v) if (p = v[a], a != "children") {
185
+ if (a == "dangerouslySetInnerHTML") i = p;
186
+ else if (!(a in m)) {
187
+ if (a == "value" && "defaultValue" in m || a == "checked" && "defaultChecked" in m) continue;
188
+ F(e, a, null, p, s);
186
189
  }
187
190
  }
188
- for (a in v) u = v[a], a == "children" ? c = u : a == "dangerouslySetInnerHTML" ? p = u : a == "value" ? h = u : a == "checked" ? k = u : d && typeof u != "function" || b[a] === u || P(e, a, u, b[a], i);
189
- if (p) d || s && (p.__html == s.__html || p.__html == e.innerHTML) || (e.innerHTML = p.__html), t.__k = [];
190
- else if (s && (e.innerHTML = ""), He(t.type == "template" ? e.content : e, X(c) ? c : [c], t, r, n, m == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, o, l, o ? o[0] : r.__k && I(r, 0), d, f), o != null) for (a = o.length; a--; ) se(o[a]);
191
- d || (a = "value", m == "progress" && h == null ? e.removeAttribute("value") : h != null && (h !== e[a] || m == "progress" && !h || m == "option" && h != b[a]) && P(e, a, h, b[a], i), a = "checked", k != null && k != e[a] && P(e, a, k, b[a], i));
191
+ for (a in m) p = m[a], a == "children" ? u = p : a == "dangerouslySetInnerHTML" ? h = p : a == "value" ? _ = p : a == "checked" ? g = p : c && typeof p != "function" || v[a] === p || F(e, a, p, v[a], s);
192
+ if (h) c || i && (h.__html == i.__html || h.__html == e.innerHTML) || (e.innerHTML = h.__html), t.__k = [];
193
+ else if (i && (e.innerHTML = ""), Be(t.type == "template" ? e.content : e, K(u) ? u : [u], t, r, n, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : s, o, l, o ? o[0] : r.__k && A(r, 0), c, f), o != null) for (a = o.length; a--; ) ae(o[a]);
194
+ c || (a = "value", y == "progress" && _ == null ? e.removeAttribute("value") : _ != null && (_ !== e[a] || y == "progress" && !_ || y == "option" && _ != v[a]) && F(e, a, _, v[a], s), a = "checked", g != null && g != e[a] && F(e, a, g, v[a], s));
192
195
  }
193
196
  return e;
194
197
  }
195
- function ae(e, t, r) {
198
+ function ce(e, t, r) {
196
199
  try {
197
200
  if (typeof e == "function") {
198
201
  var n = typeof e.__u == "function";
199
202
  n && e.__u(), n && t == null || (e.__u = e(t));
200
203
  } else e.current = t;
201
- } catch (i) {
202
- g.__e(i, r);
204
+ } catch (s) {
205
+ w.__e(s, r);
203
206
  }
204
207
  }
205
- function Be(e, t, r) {
206
- var n, i;
207
- if (g.unmount && g.unmount(e), (n = e.ref) && (n.current && n.current != e.__e || ae(n, null, t)), (n = e.__c) != null) {
208
+ function Oe(e, t, r) {
209
+ var n, s;
210
+ if (w.unmount && w.unmount(e), (n = e.ref) && (n.current && n.current != e.__e || ce(n, null, t)), (n = e.__c) != null) {
208
211
  if (n.componentWillUnmount) try {
209
212
  n.componentWillUnmount();
210
213
  } catch (o) {
211
- g.__e(o, t);
214
+ w.__e(o, t);
212
215
  }
213
216
  n.base = n.__P = null;
214
217
  }
215
- if (n = e.__k) for (i = 0; i < n.length; i++) n[i] && Be(n[i], t, r || typeof e.type != "function");
216
- r || se(e.__e), e.__c = e.__ = e.__e = void 0;
218
+ if (n = e.__k) for (s = 0; s < n.length; s++) n[s] && Oe(n[s], t, r || typeof e.type != "function");
219
+ r || ae(e.__e), e.__c = e.__ = e.__e = void 0;
217
220
  }
218
- function Ye(e, t, r) {
221
+ function nt(e, t, r) {
219
222
  return this.constructor(e, r);
220
223
  }
221
- function Ze(e, t, r) {
222
- var n, i, o, l;
223
- t == document && (t = document.documentElement), g.__ && g.__(e, t), i = (n = !1) ? null : t.__k, o = [], l = [], ie(t, e = t.__k = Je(z, null, [e]), i || M, M, t.namespaceURI, i ? null : t.firstChild ? J.call(t.childNodes) : null, o, i ? i.__e : t.firstChild, n, l), Ne(o, e, l);
224
+ function ot(e, t, r) {
225
+ var n, s, o, l;
226
+ t == document && (t = document.documentElement), w.__ && w.__(e, t), s = (n = !1) ? null : t.__k, o = [], l = [], le(t, e = t.__k = Qe(B, null, [e]), s || z, z, t.namespaceURI, s ? null : t.firstChild ? Y.call(t.childNodes) : null, o, s ? s.__e : t.firstChild, n, l), Pe(o, e, l);
224
227
  }
225
- J = We.slice, g = { __e: function(e, t, r, n) {
226
- for (var i, o, l; t = t.__; ) if ((i = t.__c) && !i.__) try {
227
- if ((o = i.constructor) && o.getDerivedStateFromError != null && (i.setState(o.getDerivedStateFromError(e)), l = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, n || {}), l = i.__d), l) return i.__E = i;
228
- } catch (d) {
229
- e = d;
228
+ Y = ze.slice, w = { __e: function(e, t, r, n) {
229
+ for (var s, o, l; t = t.__; ) if ((s = t.__c) && !s.__) try {
230
+ if ((o = s.constructor) && o.getDerivedStateFromError != null && (s.setState(o.getDerivedStateFromError(e)), l = s.__d), s.componentDidCatch != null && (s.componentDidCatch(e, n || {}), l = s.__d), l) return s.__E = s;
231
+ } catch (c) {
232
+ e = c;
230
233
  }
231
234
  throw e;
232
- } }, Ce = 0, U.prototype.setState = function(e, t) {
235
+ } }, Le = 0, U.prototype.setState = function(e, t) {
233
236
  var r;
234
- r = this.__s != null && this.__s != this.state ? this.__s : this.__s = T({}, this.state), typeof e == "function" && (e = e(T({}, r), this.props)), e && T(r, e), e != null && this.__v && (t && this._sb.push(t), pe(this));
237
+ r = this.__s != null && this.__s != this.state ? this.__s : this.__s = T({}, this.state), typeof e == "function" && (e = e(T({}, r), this.props)), e && T(r, e), e != null && this.__v && (t && this._sb.push(t), ge(this));
235
238
  }, U.prototype.forceUpdate = function(e) {
236
- this.__v && (this.__e = !0, e && this.__h.push(e), pe(this));
237
- }, U.prototype.render = z, C = [], $e = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ie = function(e, t) {
239
+ this.__v && (this.__e = !0, e && this.__h.push(e), ge(this));
240
+ }, U.prototype.render = B, C = [], Me = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, We = function(e, t) {
238
241
  return e.__v.__b - t.__v.__b;
239
- }, q.__r = 0, Ae = /(PointerCapture)$|Capture$/i, oe = 0, Z = he(!1), Q = he(!0);
240
- var Qe = 0;
241
- function _(e, t, r, n, i, o) {
242
+ }, X.__r = 0, He = /(PointerCapture)$|Capture$/i, ie = 0, te = ve(!1), re = ve(!0);
243
+ var st = 0;
244
+ function d(e, t, r, n, s, o) {
242
245
  t || (t = {});
243
- var l, d, f = t;
244
- if ("ref" in f) for (d in f = {}, t) d == "ref" ? l = t[d] : f[d] = t[d];
245
- var a = { type: e, props: f, key: r, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Qe, __i: -1, __u: 0, __source: i, __self: o };
246
- if (typeof e == "function" && (l = e.defaultProps)) for (d in l) f[d] === void 0 && (f[d] = l[d]);
247
- return g.vnode && g.vnode(a), a;
246
+ var l, c, f = t;
247
+ if ("ref" in f) for (c in f = {}, t) c == "ref" ? l = t[c] : f[c] = t[c];
248
+ var a = { type: e, props: f, key: r, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --st, __i: -1, __u: 0, __source: s, __self: o };
249
+ if (typeof e == "function" && (l = e.defaultProps)) for (c in l) f[c] === void 0 && (f[c] = l[c]);
250
+ return w.vnode && w.vnode(a), a;
248
251
  }
249
- const et = {
252
+ const it = {
250
253
  // Colors
251
254
  primary: "#2563eb",
252
255
  // Darker blue for AA contrast with white text (4.5:1)
@@ -258,6 +261,10 @@ const et = {
258
261
  text: "#f1f5f9",
259
262
  textSecondary: "#cbd5e1",
260
263
  textMuted: "#94a3b8",
264
+ // Describe blocks
265
+ describeBg: "#0f172a",
266
+ describeText: "#94a3b8",
267
+ describeBorder: "#334155",
261
268
  // Status colors
262
269
  success: "#22c55e",
263
270
  successBg: "#14532d",
@@ -297,173 +304,173 @@ const et = {
297
304
  shadow: "2px 0 8px rgba(0,0,0,0.3)",
298
305
  shadowSm: "0 2px 4px rgba(0, 0, 0, 0.2)",
299
306
  // Z-index
300
- zIndexSidebar: "1000",
301
- zIndexSticky: "1000",
307
+ zIndexSidebar: "99999",
308
+ zIndexSticky: "100000",
302
309
  // Animation
303
310
  animationDuration: "0.2s",
304
311
  // Icon colors
305
312
  iconColor: "#f1f5f9",
306
313
  iconColorSecondary: "#cbd5e1"
307
314
  };
308
- function tt(e = {}) {
309
- const t = { ...et, ...e };
315
+ function at(e = {}) {
316
+ const t = { ...it, ...e };
310
317
  return Object.entries(t).map(([r, n]) => `${`--twd-${r.replace(/([A-Z])/g, "-$1").toLowerCase()}`}: ${n};`).join(`
311
318
  `);
312
319
  }
313
- function rt(e) {
320
+ function lt(e) {
314
321
  const t = "twd-theme-variables";
315
322
  let r = document.getElementById(t);
316
323
  r || (r = document.createElement("style"), r.id = t, document.head.appendChild(r));
317
- const n = tt(e);
324
+ const n = at(e);
318
325
  r.textContent = `
319
326
  :root {
320
327
  ${n}
321
328
  }
322
329
  `;
323
330
  }
324
- const nt = (e) => {
331
+ const ct = (e) => {
325
332
  const { Component: t, createRoot: r, theme: n } = e;
326
- rt(n);
327
- const i = document.createElement("div");
328
- i.setAttribute("id", "twd-sidebar-root"), document.body.appendChild(i), r(i).render(t);
329
- }, ot = async (e, t, r, n) => {
330
- for (const i in e) await e[i]();
331
- nt({ Component: t, createRoot: r, theme: n });
333
+ lt(n);
334
+ const s = document.createElement("div");
335
+ s.setAttribute("id", "twd-sidebar-root"), document.body.appendChild(s), r(s).render(t);
336
+ }, dt = async (e, t, r, n) => {
337
+ for (const s in e) await e[s]();
338
+ ct({ Component: t, createRoot: r, theme: n });
332
339
  };
333
- var N, w, Y, ge, V = 0, De = [], y = g, me = y.__b, ve = y.__r, we = y.diffed, ye = y.__c, be = y.unmount, ke = y.__;
334
- function le(e, t) {
335
- y.__h && y.__h(w, e, V || t), V = 0;
336
- var r = w.__H || (w.__H = { __: [], __h: [] });
340
+ var N, b, ee, we, G = 0, je = [], k = w, ye = k.__b, be = k.__r, ke = k.diffed, Se = k.__c, xe = k.unmount, Te = k.__;
341
+ function de(e, t) {
342
+ k.__h && k.__h(b, e, G || t), G = 0;
343
+ var r = b.__H || (b.__H = { __: [], __h: [] });
337
344
  return e >= r.__.length && r.__.push({}), r.__[e];
338
345
  }
339
- function te(e) {
340
- return V = 1, st(Fe, e);
346
+ function q(e) {
347
+ return G = 1, _t(qe, e);
341
348
  }
342
- function st(e, t, r) {
343
- var n = le(N++, 2);
344
- if (n.t = e, !n.__c && (n.__ = [Fe(void 0, t), function(d) {
345
- var f = n.__N ? n.__N[0] : n.__[0], a = n.t(f, d);
349
+ function _t(e, t, r) {
350
+ var n = de(N++, 2);
351
+ if (n.t = e, !n.__c && (n.__ = [qe(void 0, t), function(c) {
352
+ var f = n.__N ? n.__N[0] : n.__[0], a = n.t(f, c);
346
353
  f !== a && (n.__N = [a, n.__[1]], n.__c.setState({}));
347
- }], n.__c = w, !w.__f)) {
348
- var i = function(d, f, a) {
354
+ }], n.__c = b, !b.__f)) {
355
+ var s = function(c, f, a) {
349
356
  if (!n.__c.__H) return !0;
350
- var p = n.__c.__H.__.filter(function(c) {
351
- return !!c.__c;
357
+ var h = n.__c.__H.__.filter(function(u) {
358
+ return !!u.__c;
352
359
  });
353
- if (p.every(function(c) {
354
- return !c.__N;
355
- })) return !o || o.call(this, d, f, a);
356
- var s = n.__c.props !== d;
357
- return p.forEach(function(c) {
358
- if (c.__N) {
359
- var u = c.__[0];
360
- c.__ = c.__N, c.__N = void 0, u !== c.__[0] && (s = !0);
360
+ if (h.every(function(u) {
361
+ return !u.__N;
362
+ })) return !o || o.call(this, c, f, a);
363
+ var i = n.__c.props !== c;
364
+ return h.forEach(function(u) {
365
+ if (u.__N) {
366
+ var p = u.__[0];
367
+ u.__ = u.__N, u.__N = void 0, p !== u.__[0] && (i = !0);
361
368
  }
362
- }), o && o.call(this, d, f, a) || s;
369
+ }), o && o.call(this, c, f, a) || i;
363
370
  };
364
- w.__f = !0;
365
- var o = w.shouldComponentUpdate, l = w.componentWillUpdate;
366
- w.componentWillUpdate = function(d, f, a) {
371
+ b.__f = !0;
372
+ var o = b.shouldComponentUpdate, l = b.componentWillUpdate;
373
+ b.componentWillUpdate = function(c, f, a) {
367
374
  if (this.__e) {
368
- var p = o;
369
- o = void 0, i(d, f, a), o = p;
375
+ var h = o;
376
+ o = void 0, s(c, f, a), o = h;
370
377
  }
371
- l && l.call(this, d, f, a);
372
- }, w.shouldComponentUpdate = i;
378
+ l && l.call(this, c, f, a);
379
+ }, b.shouldComponentUpdate = s;
373
380
  }
374
381
  return n.__N || n.__;
375
382
  }
376
- function ce(e, t) {
377
- var r = le(N++, 3);
378
- !y.__s && Pe(r.__H, t) && (r.__ = e, r.u = t, w.__H.__h.push(r));
383
+ function _e(e, t) {
384
+ var r = de(N++, 3);
385
+ !k.__s && Ue(r.__H, t) && (r.__ = e, r.u = t, b.__H.__h.push(r));
379
386
  }
380
- function L(e) {
381
- return V = 5, it(function() {
387
+ function H(e) {
388
+ return G = 5, V(function() {
382
389
  return { current: e };
383
390
  }, []);
384
391
  }
385
- function it(e, t) {
386
- var r = le(N++, 7);
387
- return Pe(r.__H, t) && (r.__ = e(), r.__H = t, r.__h = e), r.__;
392
+ function V(e, t) {
393
+ var r = de(N++, 7);
394
+ return Ue(r.__H, t) && (r.__ = e(), r.__H = t, r.__h = e), r.__;
388
395
  }
389
- function at() {
390
- for (var e; e = De.shift(); ) if (e.__P && e.__H) try {
391
- e.__H.__h.forEach(j), e.__H.__h.forEach(re), e.__H.__h = [];
396
+ function ut() {
397
+ for (var e; e = je.shift(); ) if (e.__P && e.__H) try {
398
+ e.__H.__h.forEach(J), e.__H.__h.forEach(oe), e.__H.__h = [];
392
399
  } catch (t) {
393
- e.__H.__h = [], y.__e(t, e.__v);
400
+ e.__H.__h = [], k.__e(t, e.__v);
394
401
  }
395
402
  }
396
- y.__b = function(e) {
397
- w = null, me && me(e);
398
- }, y.__ = function(e, t) {
399
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), ke && ke(e, t);
400
- }, y.__r = function(e) {
401
- ve && ve(e), N = 0;
402
- var t = (w = e.__c).__H;
403
- t && (Y === w ? (t.__h = [], w.__h = [], t.__.forEach(function(r) {
403
+ k.__b = function(e) {
404
+ b = null, ye && ye(e);
405
+ }, k.__ = function(e, t) {
406
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Te && Te(e, t);
407
+ }, k.__r = function(e) {
408
+ be && be(e), N = 0;
409
+ var t = (b = e.__c).__H;
410
+ t && (ee === b ? (t.__h = [], b.__h = [], t.__.forEach(function(r) {
404
411
  r.__N && (r.__ = r.__N), r.u = r.__N = void 0;
405
- })) : (t.__h.forEach(j), t.__h.forEach(re), t.__h = [], N = 0)), Y = w;
406
- }, y.diffed = function(e) {
407
- we && we(e);
412
+ })) : (t.__h.forEach(J), t.__h.forEach(oe), t.__h = [], N = 0)), ee = b;
413
+ }, k.diffed = function(e) {
414
+ ke && ke(e);
408
415
  var t = e.__c;
409
- t && t.__H && (t.__H.__h.length && (De.push(t) !== 1 && ge === y.requestAnimationFrame || ((ge = y.requestAnimationFrame) || lt)(at)), t.__H.__.forEach(function(r) {
416
+ t && t.__H && (t.__H.__h.length && (je.push(t) !== 1 && we === k.requestAnimationFrame || ((we = k.requestAnimationFrame) || pt)(ut)), t.__H.__.forEach(function(r) {
410
417
  r.u && (r.__H = r.u), r.u = void 0;
411
- })), Y = w = null;
412
- }, y.__c = function(e, t) {
418
+ })), ee = b = null;
419
+ }, k.__c = function(e, t) {
413
420
  t.some(function(r) {
414
421
  try {
415
- r.__h.forEach(j), r.__h = r.__h.filter(function(n) {
416
- return !n.__ || re(n);
422
+ r.__h.forEach(J), r.__h = r.__h.filter(function(n) {
423
+ return !n.__ || oe(n);
417
424
  });
418
425
  } catch (n) {
419
- t.some(function(i) {
420
- i.__h && (i.__h = []);
421
- }), t = [], y.__e(n, r.__v);
426
+ t.some(function(s) {
427
+ s.__h && (s.__h = []);
428
+ }), t = [], k.__e(n, r.__v);
422
429
  }
423
- }), ye && ye(e, t);
424
- }, y.unmount = function(e) {
425
- be && be(e);
430
+ }), Se && Se(e, t);
431
+ }, k.unmount = function(e) {
432
+ xe && xe(e);
426
433
  var t, r = e.__c;
427
434
  r && r.__H && (r.__H.__.forEach(function(n) {
428
435
  try {
429
- j(n);
430
- } catch (i) {
431
- t = i;
436
+ J(n);
437
+ } catch (s) {
438
+ t = s;
432
439
  }
433
- }), r.__H = void 0, t && y.__e(t, r.__v));
440
+ }), r.__H = void 0, t && k.__e(t, r.__v));
434
441
  };
435
- var xe = typeof requestAnimationFrame == "function";
436
- function lt(e) {
442
+ var Ee = typeof requestAnimationFrame == "function";
443
+ function pt(e) {
437
444
  var t, r = function() {
438
- clearTimeout(n), xe && cancelAnimationFrame(t), setTimeout(e);
445
+ clearTimeout(n), Ee && cancelAnimationFrame(t), setTimeout(e);
439
446
  }, n = setTimeout(r, 35);
440
- xe && (t = requestAnimationFrame(r));
447
+ Ee && (t = requestAnimationFrame(r));
441
448
  }
442
- function j(e) {
443
- var t = w, r = e.__c;
444
- typeof r == "function" && (e.__c = void 0, r()), w = t;
449
+ function J(e) {
450
+ var t = b, r = e.__c;
451
+ typeof r == "function" && (e.__c = void 0, r()), b = t;
445
452
  }
446
- function re(e) {
447
- var t = w;
448
- e.__c = e.__(), w = t;
453
+ function oe(e) {
454
+ var t = b;
455
+ e.__c = e.__(), b = t;
449
456
  }
450
- function Pe(e, t) {
457
+ function Ue(e, t) {
451
458
  return !e || e.length !== t.length || t.some(function(r, n) {
452
459
  return r !== e[n];
453
460
  });
454
461
  }
455
- function Fe(e, t) {
462
+ function qe(e, t) {
456
463
  return typeof t == "function" ? t(e) : t;
457
464
  }
458
- const ct = (e) => {
465
+ const ft = (e) => {
459
466
  const t = /* @__PURE__ */ new Map(), r = [];
460
467
  for (const n of e) t.set(n.id, { ...n, childrenNodes: [] });
461
468
  for (const n of t.values())
462
469
  n.parent ? t.get(n.parent)?.childrenNodes?.push(n) : r.push(n);
463
470
  return r;
464
- }, dt = {
471
+ }, ht = {
465
472
  animation: "spin 1s linear infinite"
466
- }, _t = () => /* @__PURE__ */ _(
473
+ }, gt = () => /* @__PURE__ */ d(
467
474
  "svg",
468
475
  {
469
476
  xmlns: "http://www.w3.org/2000/svg",
@@ -476,18 +483,18 @@ const ct = (e) => {
476
483
  strokeLinecap: "round",
477
484
  strokeLinejoin: "round",
478
485
  className: "lucide lucide-loader-circle-icon lucide-loader-circle",
479
- style: dt,
486
+ style: ht,
480
487
  "data-testid": "loader-icon",
481
- children: /* @__PURE__ */ _("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
488
+ children: /* @__PURE__ */ d("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
482
489
  }
483
- ), F = document.createElement("style");
484
- F && !document.getElementById("loader-spin-keyframes") && (F.id = "loader-spin-keyframes", F.innerHTML = `
490
+ ), O = document.createElement("style");
491
+ O && !document.getElementById("loader-spin-keyframes") && (O.id = "loader-spin-keyframes", O.innerHTML = `
485
492
  @keyframes spin {
486
493
  0% { transform: rotate(0deg); }
487
494
  100% { transform: rotate(360deg); }
488
495
  }
489
- `, document.head.appendChild(F));
490
- const G = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ _(
496
+ `, document.head.appendChild(O));
497
+ const Z = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ d(
491
498
  "svg",
492
499
  {
493
500
  xmlns: "http://www.w3.org/2000/svg",
@@ -503,10 +510,10 @@ const G = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ _(
503
510
  "data-testid": r,
504
511
  children: t
505
512
  }
506
- ), ut = () => /* @__PURE__ */ _(G, { className: "lucide-play-icon lucide-play", dataTestId: "play-icon", children: /* @__PURE__ */ _("path", { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" }) }), Oe = ({ id: e, name: t, skip: r, only: n }) => /* @__PURE__ */ _(z, { children: [
513
+ ), mt = () => /* @__PURE__ */ d(Z, { className: "lucide-play-icon lucide-play", dataTestId: "play-icon", children: /* @__PURE__ */ d("path", { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" }) }), Ve = ({ id: e, name: t, skip: r, only: n }) => /* @__PURE__ */ d(B, { children: [
507
514
  t,
508
515
  " ",
509
- n && /* @__PURE__ */ _(
516
+ n && /* @__PURE__ */ d(
510
517
  "span",
511
518
  {
512
519
  style: { color: "var(--twd-primary)" },
@@ -517,7 +524,7 @@ const G = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ _(
517
524
  ]
518
525
  }
519
526
  ),
520
- r && /* @__PURE__ */ _(
527
+ r && /* @__PURE__ */ d(
521
528
  "span",
522
529
  {
523
530
  style: { color: "var(--twd-text-secondary)" },
@@ -529,8 +536,8 @@ const G = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ _(
529
536
  }
530
537
  )
531
538
  ] });
532
- var H = /* @__PURE__ */ ((e) => (e.CHAI_DIFF = "chai-diff", e.CHAI_MESSAGE = "chai-message", e.ERROR = "error", e))(H || {});
533
- const pt = (e) => {
539
+ var R = /* @__PURE__ */ ((e) => (e.CHAI_DIFF = "chai-diff", e.CHAI_MESSAGE = "chai-message", e.ERROR = "error", e))(R || {});
540
+ const vt = (e) => {
534
541
  try {
535
542
  const t = JSON.parse(e);
536
543
  if (t && typeof t == "object" && "type" in t)
@@ -538,7 +545,7 @@ const pt = (e) => {
538
545
  } catch {
539
546
  }
540
547
  return null;
541
- }, Se = (e) => {
548
+ }, Re = (e) => {
542
549
  if (e === null) return "null";
543
550
  if (e === void 0) return "undefined";
544
551
  if (typeof e == "string") return e;
@@ -549,10 +556,10 @@ const pt = (e) => {
549
556
  return String(e);
550
557
  }
551
558
  return String(e);
552
- }, ft = (e) => e.startsWith("Assertion passed") || e.startsWith("Event fired") ? { color: "var(--twd-success)", fontWeight: "var(--twd-font-weight-bold)" } : e.startsWith("Test failed") ? { color: "var(--twd-error)", fontWeight: "var(--twd-font-weight-bold)" } : {}, ht = (e) => e.type === "chai-message" || e.type === "error", gt = (e, t) => t && ht(t) ? t.message : e, mt = ({ log: e, index: t }) => {
553
- const r = pt(e);
554
- if (r?.type === H.CHAI_DIFF)
555
- return /* @__PURE__ */ _(
559
+ }, wt = (e) => e.startsWith("Assertion passed") || e.startsWith("Event fired") ? { color: "var(--twd-success)", fontWeight: "var(--twd-font-weight-bold)" } : e.startsWith("Test failed") ? { color: "var(--twd-error)", fontWeight: "var(--twd-font-weight-bold)" } : {}, yt = (e) => e.type === "chai-message" || e.type === "error", bt = (e, t) => t && yt(t) ? t.message : e, kt = ({ log: e, index: t }) => {
560
+ const r = vt(e);
561
+ if (r?.type === R.CHAI_DIFF)
562
+ return /* @__PURE__ */ d(
556
563
  "li",
557
564
  {
558
565
  style: {
@@ -562,22 +569,22 @@ const pt = (e) => {
562
569
  color: "var(--twd-text)"
563
570
  },
564
571
  children: [
565
- /* @__PURE__ */ _("div", { style: {
572
+ /* @__PURE__ */ d("div", { style: {
566
573
  color: "var(--twd-error)",
567
574
  fontWeight: "var(--twd-font-weight-bold)",
568
575
  marginBottom: "var(--twd-spacing-xs)"
569
576
  }, children: "❌ Assertion failed" }),
570
- /* @__PURE__ */ _("div", { style: {
577
+ /* @__PURE__ */ d("div", { style: {
571
578
  marginTop: "var(--twd-spacing-xs)",
572
579
  paddingLeft: "var(--twd-spacing-sm)",
573
580
  borderLeft: "2px solid var(--twd-success)"
574
581
  }, children: [
575
- /* @__PURE__ */ _("div", { style: {
582
+ /* @__PURE__ */ d("div", { style: {
576
583
  color: "var(--twd-success)",
577
584
  fontWeight: "var(--twd-font-weight-medium)",
578
585
  marginBottom: "var(--twd-spacing-xs)"
579
586
  }, children: "Expected:" }),
580
- /* @__PURE__ */ _("pre", { style: {
587
+ /* @__PURE__ */ d("pre", { style: {
581
588
  margin: 0,
582
589
  padding: "var(--twd-spacing-xs)",
583
590
  background: "var(--twd-background)",
@@ -586,19 +593,19 @@ const pt = (e) => {
586
593
  overflowX: "auto",
587
594
  whiteSpace: "pre-wrap",
588
595
  wordBreak: "break-word"
589
- }, children: Se(r.expected) })
596
+ }, children: Re(r.expected) })
590
597
  ] }),
591
- /* @__PURE__ */ _("div", { style: {
598
+ /* @__PURE__ */ d("div", { style: {
592
599
  marginTop: "var(--twd-spacing-xs)",
593
600
  paddingLeft: "var(--twd-spacing-sm)",
594
601
  borderLeft: "2px solid var(--twd-error)"
595
602
  }, children: [
596
- /* @__PURE__ */ _("div", { style: {
603
+ /* @__PURE__ */ d("div", { style: {
597
604
  color: "var(--twd-error)",
598
605
  fontWeight: "var(--twd-font-weight-medium)",
599
606
  marginBottom: "var(--twd-spacing-xs)"
600
607
  }, children: "Actual:" }),
601
- /* @__PURE__ */ _("pre", { style: {
608
+ /* @__PURE__ */ d("pre", { style: {
602
609
  margin: 0,
603
610
  padding: "var(--twd-spacing-xs)",
604
611
  background: "var(--twd-background)",
@@ -607,14 +614,14 @@ const pt = (e) => {
607
614
  overflowX: "auto",
608
615
  whiteSpace: "pre-wrap",
609
616
  wordBreak: "break-word"
610
- }, children: Se(r.actual) })
617
+ }, children: Re(r.actual) })
611
618
  ] })
612
619
  ]
613
620
  },
614
621
  t
615
622
  );
616
- const n = gt(e, r);
617
- return /* @__PURE__ */ _(
623
+ const n = bt(e, r);
624
+ return /* @__PURE__ */ d(
618
625
  "li",
619
626
  {
620
627
  style: {
@@ -622,13 +629,54 @@ const pt = (e) => {
622
629
  padding: "var(--twd-spacing-xs) var(--twd-spacing-sm)",
623
630
  borderBottom: "1px solid var(--twd-border-light)",
624
631
  color: "var(--twd-text)",
625
- ...ft(n)
632
+ ...wt(n)
626
633
  },
627
634
  children: n
628
635
  },
629
636
  t
630
637
  );
631
- }, vt = (e) => {
638
+ }, W = {
639
+ container: {
640
+ marginBottom: "var(--twd-spacing-xs)"
641
+ },
642
+ item: {
643
+ display: "flex",
644
+ alignItems: "left",
645
+ justifyContent: "space-between",
646
+ padding: "var(--twd-spacing-sm) var(--twd-spacing-sm)",
647
+ borderRadius: "var(--twd-border-radius)"
648
+ },
649
+ nameSpan: {
650
+ fontWeight: "var(--twd-font-weight-medium)",
651
+ fontSize: "var(--twd-font-size-md)",
652
+ color: "var(--twd-text)",
653
+ maxWidth: "220px"
654
+ },
655
+ button: {
656
+ background: "transparent",
657
+ border: "1px solid var(--twd-border-light)",
658
+ borderRadius: "var(--twd-border-radius)",
659
+ padding: "0",
660
+ cursor: "pointer",
661
+ verticalAlign: "middle",
662
+ fontSize: "var(--twd-font-size-sm)",
663
+ width: "24px",
664
+ height: "24px",
665
+ display: "flex",
666
+ alignItems: "center",
667
+ justifyContent: "center"
668
+ },
669
+ logsList: {
670
+ borderRadius: "var(--twd-border-radius)",
671
+ maxHeight: "260px",
672
+ overflowY: "auto",
673
+ padding: 0,
674
+ background: "var(--twd-background-secondary)",
675
+ listStyle: "none",
676
+ marginTop: "var(--twd-spacing-xs)",
677
+ textAlign: "left"
678
+ }
679
+ }, St = (e) => {
632
680
  switch (e.status) {
633
681
  case "pass":
634
682
  return {
@@ -667,22 +715,38 @@ const pt = (e) => {
667
715
  }
668
716
  };
669
717
  }
670
- }, wt = ({
718
+ }, xt = ({
671
719
  node: e,
672
720
  depth: t,
673
721
  id: r,
674
722
  runTest: n
675
723
  }) => {
676
- const i = vt(e), o = L(null), l = L(e.status), d = L(e.logs?.length || 0), f = typeof window < "u" && sessionStorage.getItem("twd-last-run-test-name") === e.name;
677
- ce(() => {
678
- const p = o.current;
679
- if (!p || !e.logs || e.logs.length === 0) return;
680
- const s = l.current === "running" && (e.status === "pass" || e.status === "fail"), c = e.logs.length > d.current;
681
- (s || c) && setTimeout(() => {
682
- p.scrollTop = p.scrollHeight;
683
- }, 0), l.current = e.status, d.current = e.logs.length;
724
+ const s = H(null), o = H(e.status), l = H(e.logs?.length || 0), c = V(() => St(e), [e.status]), f = typeof window < "u" && sessionStorage.getItem("twd-last-run-test-name") === e.name, a = V(
725
+ () => ({
726
+ ...W.container,
727
+ marginLeft: `calc(${t} * var(--twd-spacing-sm))`,
728
+ ...c.container || {}
729
+ }),
730
+ [t, c]
731
+ ), h = V(
732
+ () => ({
733
+ ...W.item,
734
+ ...c.item,
735
+ ...f && {
736
+ border: "1px dashed var(--twd-border)"
737
+ }
738
+ }),
739
+ [c, f]
740
+ );
741
+ _e(() => {
742
+ const u = s.current;
743
+ if (!u || !e.logs || e.logs.length === 0) return;
744
+ const p = o.current === "running" && (e.status === "pass" || e.status === "fail"), _ = e.logs.length > l.current;
745
+ (p || _) && setTimeout(() => {
746
+ u.scrollTop = u.scrollHeight;
747
+ }, 0), o.current = e.status, l.current = e.logs.length;
684
748
  }, [e.status, e.logs]);
685
- const a = () => {
749
+ const i = () => {
686
750
  switch (e.status) {
687
751
  case "pass":
688
752
  return "passed";
@@ -696,115 +760,56 @@ const pt = (e) => {
696
760
  return "not run";
697
761
  }
698
762
  };
699
- return /* @__PURE__ */ _(
763
+ return /* @__PURE__ */ d(
700
764
  "li",
701
765
  {
702
- style: {
703
- marginBottom: "var(--twd-spacing-xs)",
704
- marginLeft: `calc(${t} * var(--twd-spacing-sm))`,
705
- ...i.container
706
- },
766
+ style: a,
707
767
  "data-testid": `test-list-item-${r}`,
708
768
  "data-test-name": e.name,
709
769
  role: "listitem",
710
- "aria-label": `Test ${e.name}, status: ${a()}`,
770
+ "aria-label": `Test ${e.name}, status: ${i()}`,
711
771
  children: [
712
- /* @__PURE__ */ _(
713
- "div",
714
- {
715
- style: {
716
- display: "flex",
717
- alignItems: "left",
718
- justifyContent: "space-between",
719
- padding: "var(--twd-spacing-xs) var(--twd-spacing-sm)",
720
- borderRadius: "var(--twd-border-radius)",
721
- ...i.item,
722
- ...f && {
723
- border: "1px dashed var(--twd-border)"
724
- }
725
- },
726
- children: [
727
- /* @__PURE__ */ _(
728
- "span",
729
- {
730
- style: {
731
- fontWeight: "var(--twd-font-weight-medium)",
732
- color: "var(--twd-text)",
733
- maxWidth: "220px"
734
- },
735
- children: /* @__PURE__ */ _(
736
- Oe,
737
- {
738
- id: r,
739
- name: e.name,
740
- skip: e.skip,
741
- only: e.only
742
- }
743
- )
744
- }
745
- ),
746
- /* @__PURE__ */ _(
747
- "button",
748
- {
749
- onClick: () => n(r),
750
- "aria-label": `Run ${e.name} test`,
751
- style: {
752
- background: "transparent",
753
- border: "1px solid var(--twd-border-light)",
754
- borderRadius: "var(--twd-border-radius)",
755
- padding: "0",
756
- cursor: "pointer",
757
- verticalAlign: "middle",
758
- fontSize: "var(--twd-font-size-sm)",
759
- width: "24px",
760
- height: "24px",
761
- display: "flex",
762
- alignItems: "center",
763
- justifyContent: "center"
764
- },
765
- disabled: e.status === "running",
766
- "data-testid": `run-test-button-${r}`,
767
- children: e.status === "running" ? /* @__PURE__ */ _(_t, {}) : /* @__PURE__ */ _(ut, {})
768
- }
769
- )
770
- ]
771
- }
772
- ),
773
- e.logs && e.logs.length > 0 && /* @__PURE__ */ _(
774
- "ul",
775
- {
776
- ref: o,
777
- style: {
778
- borderRadius: "var(--twd-border-radius)",
779
- maxHeight: "260px",
780
- overflowY: "auto",
781
- padding: 0,
782
- background: "var(--twd-background-secondary)",
783
- listStyle: "none",
784
- marginTop: "var(--twd-spacing-xs)",
785
- textAlign: "left"
786
- },
787
- children: e.logs.map((p, s) => /* @__PURE__ */ _(mt, { log: p, index: s }, s))
788
- }
789
- )
772
+ /* @__PURE__ */ d("div", { style: h, children: [
773
+ /* @__PURE__ */ d("span", { style: W.nameSpan, children: /* @__PURE__ */ d(
774
+ Ve,
775
+ {
776
+ id: r,
777
+ name: e.name,
778
+ skip: e.skip,
779
+ only: e.only
780
+ }
781
+ ) }),
782
+ /* @__PURE__ */ d(
783
+ "button",
784
+ {
785
+ onClick: () => n(r),
786
+ "aria-label": `Run ${e.name} test`,
787
+ style: W.button,
788
+ disabled: e.status === "running",
789
+ "data-testid": `run-test-button-${r}`,
790
+ children: e.status === "running" ? /* @__PURE__ */ d(gt, {}) : /* @__PURE__ */ d(mt, {})
791
+ }
792
+ )
793
+ ] }),
794
+ e.logs && e.logs.length > 0 && /* @__PURE__ */ d("ul", { ref: s, style: W.logsList, children: e.logs.map((u, p) => /* @__PURE__ */ d(kt, { log: u, index: p }, p)) })
790
795
  ]
791
796
  },
792
797
  e.name
793
798
  );
794
- }, yt = () => /* @__PURE__ */ _(G, { className: "lucide-chevron-down-icon lucide-chevron-down", dataTestId: "chevron-down-icon", children: /* @__PURE__ */ _("path", { d: "m6 9 6 6 6-6" }) }), bt = () => /* @__PURE__ */ _(G, { className: "lucide-chevron-right-icon lucide-chevron-right", dataTestId: "chevron-right-icon", children: /* @__PURE__ */ _("path", { d: "m9 18 6-6-6-6" }) }), kt = ({ tests: e, runTest: t }) => {
795
- const [r, n] = te({}), i = L(null), o = L(!1), l = (a) => n((p) => ({ ...p, [a]: !p[a] }));
796
- ce(() => {
799
+ }, Tt = () => /* @__PURE__ */ d(Z, { className: "lucide-chevron-down-icon lucide-chevron-down", dataTestId: "chevron-down-icon", children: /* @__PURE__ */ d("path", { d: "m6 9 6 6 6-6" }) }), Et = () => /* @__PURE__ */ d(Z, { className: "lucide-chevron-right-icon lucide-chevron-right", dataTestId: "chevron-right-icon", children: /* @__PURE__ */ d("path", { d: "m9 18 6-6-6-6" }) }), Rt = ({ tests: e, runTest: t }) => {
800
+ const [r, n] = q({}), s = H(null), o = H(!1), l = (a) => n((h) => ({ ...h, [a]: !h[a] }));
801
+ _e(() => {
797
802
  if (o.current) return;
798
803
  const a = sessionStorage.getItem("twd-last-run-test-name");
799
804
  if (!a) return;
800
- const p = setTimeout(() => {
801
- const s = document.querySelector(`[data-test-name="${a}"]`);
802
- if (s) {
803
- const c = i.current?.closest('[data-testid="twd-sidebar"]');
804
- if (c) {
805
- const u = s.getBoundingClientRect(), h = c.getBoundingClientRect(), k = c.scrollTop, b = u.top - h.top + k;
806
- c.scrollTo({
807
- top: b - 150,
805
+ const h = setTimeout(() => {
806
+ const i = document.querySelector(`[data-test-name="${a}"]`);
807
+ if (i) {
808
+ const u = s.current?.closest('[data-testid="twd-sidebar"]');
809
+ if (u) {
810
+ const p = i.getBoundingClientRect(), _ = u.getBoundingClientRect(), g = u.scrollTop, v = p.top - _.top + g;
811
+ u.scrollTo({
812
+ top: v - 150,
808
813
  // 150px offset from top
809
814
  behavior: "smooth"
810
815
  });
@@ -812,61 +817,75 @@ const pt = (e) => {
812
817
  o.current = !0;
813
818
  }
814
819
  }, 100);
815
- return () => clearTimeout(p);
820
+ return () => clearTimeout(h);
816
821
  }, []);
817
- const d = (a, p = 0) => {
822
+ const c = (a, h = 0) => {
818
823
  if (a.type === "test")
819
- return /* @__PURE__ */ _(
820
- wt,
824
+ return /* @__PURE__ */ d(
825
+ xt,
821
826
  {
822
827
  node: a,
823
- depth: p,
828
+ depth: h,
824
829
  id: a.id,
825
830
  runTest: () => t(a.id)
826
831
  },
827
832
  a.id
828
833
  );
829
- const s = r[a.id];
830
- return /* @__PURE__ */ _("li", { style: { marginLeft: `calc(${p} * var(--twd-spacing-lg))` }, children: [
831
- /* @__PURE__ */ _(
832
- "span",
834
+ const i = r[a.id];
835
+ return /* @__PURE__ */ d("li", { style: { marginLeft: `calc(${h} * var(--twd-spacing-lg))` }, children: [
836
+ /* @__PURE__ */ d(
837
+ "div",
833
838
  {
834
839
  style: {
835
- fontWeight: "var(--twd-font-weight-bold)",
836
- cursor: "pointer",
837
- color: "var(--twd-text)",
838
- display: "flex",
839
- alignItems: "center",
840
- justifyContent: "space-between",
841
- marginBottom: "var(--twd-spacing-xs)",
842
- gap: "var(--twd-spacing-sm)"
840
+ background: "var(--twd-describe-bg)",
841
+ borderLeft: "3px solid var(--twd-describe-border)",
842
+ borderRadius: "var(--twd-border-radius)",
843
+ padding: "var(--twd-spacing-xs) var(--twd-spacing-sm)",
844
+ marginBottom: "var(--twd-spacing-sm)"
843
845
  },
844
- "data-testid": `test-group-${a.name}`,
845
- tabIndex: 0,
846
- role: "button",
847
- "aria-expanded": !s,
848
- "aria-label": `${s ? "Expand" : "Collapse"} test suite ${a.name}`,
849
- onClick: () => l(a.id),
850
- children: [
851
- /* @__PURE__ */ _(Oe, { id: a.id, name: a.name, skip: a.skip, only: a.only }),
852
- s ? /* @__PURE__ */ _(bt, {}) : /* @__PURE__ */ _(yt, {})
853
- ]
846
+ children: /* @__PURE__ */ d(
847
+ "span",
848
+ {
849
+ style: {
850
+ fontWeight: "var(--twd-font-weight-medium)",
851
+ fontSize: "var(--twd-font-size-sm)",
852
+ cursor: "pointer",
853
+ color: "var(--twd-describe-text)",
854
+ display: "flex",
855
+ alignItems: "center",
856
+ justifyContent: "space-between",
857
+ gap: "var(--twd-spacing-sm)",
858
+ textTransform: "uppercase",
859
+ letterSpacing: "0.05em"
860
+ },
861
+ "data-testid": `test-group-${a.name}`,
862
+ tabIndex: 0,
863
+ role: "button",
864
+ "aria-expanded": !i,
865
+ "aria-label": `${i ? "Expand" : "Collapse"} test suite ${a.name}`,
866
+ onClick: () => l(a.id),
867
+ children: [
868
+ /* @__PURE__ */ d(Ve, { id: a.id, name: a.name, skip: a.skip, only: a.only }),
869
+ i ? /* @__PURE__ */ d(Et, {}) : /* @__PURE__ */ d(Tt, {})
870
+ ]
871
+ }
872
+ )
854
873
  }
855
874
  ),
856
- !s && a.childrenNodes && a.childrenNodes.length > 0 && /* @__PURE__ */ _("ul", { style: { listStyle: "none", padding: 0, margin: 0 }, children: a.childrenNodes.map((c) => d(c, p + 1)) })
875
+ !i && a.childrenNodes && a.childrenNodes.length > 0 && /* @__PURE__ */ d("ul", { style: { listStyle: "none", padding: 0, margin: 0 }, children: a.childrenNodes.map((u) => c(u, h + 1)) })
857
876
  ] }, a.id);
858
- }, f = ct(e);
859
- return /* @__PURE__ */ _(
877
+ }, f = ft(e);
878
+ return /* @__PURE__ */ d(
860
879
  "ul",
861
880
  {
862
- ref: i,
881
+ ref: s,
863
882
  style: { listStyle: "none", padding: 0, margin: 0 },
864
883
  role: "list",
865
884
  "aria-label": "Test list",
866
- children: f.map((a) => d(a))
885
+ children: f.map((a) => c(a))
867
886
  }
868
887
  );
869
- }, xt = {
888
+ }, $t = {
870
889
  left: {
871
890
  left: 0,
872
891
  borderTopRightRadius: "var(--twd-border-radius-lg)",
@@ -881,7 +900,7 @@ const pt = (e) => {
881
900
  borderTopRightRadius: "0",
882
901
  borderBottomRightRadius: "0"
883
902
  }
884
- }, St = ({ setOpen: e, position: t }) => /* @__PURE__ */ _(
903
+ }, Ct = ({ setOpen: e, position: t }) => /* @__PURE__ */ d(
885
904
  "button",
886
905
  {
887
906
  "aria-label": "Open TWD sidebar",
@@ -894,19 +913,19 @@ const pt = (e) => {
894
913
  padding: "var(--twd-spacing-sm) 10px",
895
914
  cursor: "pointer",
896
915
  fontSize: "var(--twd-font-size-sm)",
897
- ...xt[t]
916
+ ...$t[t]
898
917
  },
899
918
  onClick: () => e(!0),
900
919
  children: "TWD"
901
920
  }
902
- ), Tt = ({ isOpen: e, position: t }) => {
903
- ce(() => {
921
+ ), It = ({ isOpen: e, position: t }) => {
922
+ _e(() => {
904
923
  const r = document.documentElement, n = getComputedStyle(document.documentElement).getPropertyValue("--twd-sidebar-width") || "280px";
905
924
  return e ? t === "left" ? r.style.marginLeft = n : r.style.marginRight = n : (r.style.marginRight = "0", r.style.marginLeft = "0"), () => {
906
925
  r.style.marginRight = "0", r.style.marginLeft = "0";
907
926
  };
908
927
  }, [e, t]);
909
- }, Et = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STATE__ = {
928
+ }, At = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STATE__ = {
910
929
  handlers: /* @__PURE__ */ new Map(),
911
930
  beforeEachHooks: /* @__PURE__ */ new Map(),
912
931
  afterEachHooks: /* @__PURE__ */ new Map(),
@@ -916,74 +935,74 @@ const pt = (e) => {
916
935
  beforeEachHooks: /* @__PURE__ */ new Map(),
917
936
  afterEachHooks: /* @__PURE__ */ new Map(),
918
937
  stack: []
919
- }, de = Et(), x = de.handlers, Te = de.beforeEachHooks, Ee = de.afterEachHooks, Rt = (e) => {
938
+ }, ue = At(), S = ue.handlers, $e = ue.beforeEachHooks, Ce = ue.afterEachHooks, Lt = (e) => {
920
939
  const t = [], r = [];
921
940
  let n = e;
922
941
  for (; n; )
923
- Te.has(n) && t.unshift(...Te.get(n)), Ee.has(n) && r.push(...Ee.get(n)), n = x.get(n)?.parent;
942
+ $e.has(n) && t.unshift(...$e.get(n)), Ce.has(n) && r.push(...Ce.get(n)), n = S.get(n)?.parent;
924
943
  return { before: t, after: r };
925
- }, ne = (e) => {
926
- const t = x.get(e);
927
- return t ? t.only ? !0 : t.children ? t.children.some((r) => ne(r)) : !1 : !1;
928
- }, Ct = (e) => {
929
- let t = x.get(e);
944
+ }, se = (e) => {
945
+ const t = S.get(e);
946
+ return t ? t.only ? !0 : t.children ? t.children.some((r) => se(r)) : !1 : !1;
947
+ }, Mt = (e) => {
948
+ let t = S.get(e);
930
949
  for (; t?.parent; ) {
931
- const r = x.get(t.parent);
950
+ const r = S.get(t.parent);
932
951
  if (r?.only) return !0;
933
952
  t = r;
934
953
  }
935
954
  return !1;
936
- }, Re = (e) => {
937
- let t = x.get(e);
955
+ }, Ie = (e) => {
956
+ let t = S.get(e);
938
957
  for (; t; ) {
939
958
  if (t.skip) return !0;
940
959
  if (!t.parent) break;
941
- t = x.get(t.parent);
960
+ t = S.get(t.parent);
942
961
  }
943
962
  return !1;
944
963
  };
945
- class Ue {
946
- events;
964
+ class Je {
947
965
  constructor(t) {
966
+ fe(this, "events");
948
967
  this.events = t;
949
968
  }
950
969
  async runAll() {
951
- const t = Array.from(x.values()).filter(
970
+ const t = Array.from(S.values()).filter(
952
971
  (n) => !n.parent && n.type === "suite"
953
- ), r = Array.from(x.values()).some((n) => n.only);
972
+ ), r = Array.from(S.values()).some((n) => n.only);
954
973
  for (const n of t)
955
974
  await this.runSuite(n, r);
956
- return x;
975
+ return S;
957
976
  }
958
977
  async runSingle(t) {
959
- const r = x.get(t);
978
+ const r = S.get(t);
960
979
  if (!r || r.type !== "test") return;
961
980
  await this.runTest(r, !1);
962
981
  }
963
982
  async runSuite(t, r) {
964
- if (Re(t.id) && !ne(t.id)) {
983
+ if (Ie(t.id) && !se(t.id)) {
965
984
  this.events.onSkip?.(t);
966
985
  return;
967
986
  }
968
- if (r && !ne(t.id)) return;
987
+ if (r && !se(t.id)) return;
969
988
  this.events.onSuiteStart?.(t);
970
- const i = (t.children || []).map((o) => x.get(o));
971
- for (const o of i)
989
+ const s = (t.children || []).map((o) => S.get(o));
990
+ for (const o of s)
972
991
  o.type === "suite" ? await this.runSuite(o, r) : o.type === "test" && await this.runTest(o, r);
973
992
  this.events.onSuiteEnd?.(t);
974
993
  }
975
994
  async runTest(t, r) {
976
- if ((Re(t.id) || t.skip) && !t.only) {
995
+ if ((Ie(t.id) || t.skip) && !t.only) {
977
996
  this.events.onSkip(t);
978
997
  return;
979
998
  }
980
- const i = Ct(t.id);
981
- if (r && !t.only && !i) {
999
+ const s = Mt(t.id);
1000
+ if (r && !t.only && !s) {
982
1001
  this.events.onSkip(t);
983
1002
  return;
984
1003
  }
985
1004
  this.events.onStart?.(t);
986
- const o = Rt(t.parent);
1005
+ const o = Lt(t.parent);
987
1006
  try {
988
1007
  for (const l of o.before) await l();
989
1008
  t.logs = [], await t.handler(), this.events.onPass(t);
@@ -994,31 +1013,38 @@ class Ue {
994
1013
  }
995
1014
  }
996
1015
  }
997
- window.__testRunner = Ue;
998
- const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
1016
+ window.__testRunner = Je;
1017
+ const Wt = "1.4.3", Ht = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
999
1018
  rules: []
1000
1019
  }), window.__TWD_MOCK_STATE__) : {
1001
1020
  rules: []
1002
- }, At = It(), je = At.rules, Wt = async (e) => {
1021
+ }, zt = Ht(), Xe = zt.rules;
1022
+ let Ae = !1;
1023
+ const Nt = async (e) => {
1024
+ if (Ae) {
1025
+ console.warn("[TWD] Request mocking already initialized");
1026
+ return;
1027
+ }
1003
1028
  if ("serviceWorker" in navigator) {
1029
+ Ae = !0;
1004
1030
  const t = e ?? "/mock-sw.js";
1005
- await navigator.serviceWorker.register(`${t}?v=${$t}`), navigator.serviceWorker.controller || await new Promise((r) => {
1031
+ await navigator.serviceWorker.register(`${t}?v=${Wt}`), navigator.serviceWorker.controller || await new Promise((r) => {
1006
1032
  navigator.serviceWorker.addEventListener("controllerchange", r, { once: !0 });
1007
1033
  }), navigator.serviceWorker.addEventListener("message", (r) => {
1008
1034
  if (r.data?.type === "EXECUTED") {
1009
- const { alias: n, request: i } = r.data, o = je.find((l) => l.alias === n);
1010
- o && (o.executed = !0, o.request = i);
1035
+ const { alias: n, request: s } = r.data, o = Xe.find((l) => l.alias === n);
1036
+ o && (o.executed = !0, o.request = s);
1011
1037
  }
1012
1038
  });
1013
1039
  }
1014
- }, Lt = () => je, Ht = () => /* @__PURE__ */ _(G, { className: "lucide-wifi-pen-icon lucide-wifi-pen", dataTestId: "wifi-pen-icon", children: [
1015
- /* @__PURE__ */ _("path", { d: "M2 8.82a15 15 0 0 1 20 0" }),
1016
- /* @__PURE__ */ _("path", { d: "M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }),
1017
- /* @__PURE__ */ _("path", { d: "M5 12.859a10 10 0 0 1 10.5-2.222" }),
1018
- /* @__PURE__ */ _("path", { d: "M8.5 16.429a5 5 0 0 1 3-1.406" })
1019
- ] }), Mt = () => {
1020
- const e = Lt(), t = e.filter((n) => n.executed);
1021
- return /* @__PURE__ */ _(
1040
+ }, Bt = () => Xe, Dt = () => /* @__PURE__ */ d(Z, { className: "lucide-wifi-pen-icon lucide-wifi-pen", dataTestId: "wifi-pen-icon", children: [
1041
+ /* @__PURE__ */ d("path", { d: "M2 8.82a15 15 0 0 1 20 0" }),
1042
+ /* @__PURE__ */ d("path", { d: "M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }),
1043
+ /* @__PURE__ */ d("path", { d: "M5 12.859a10 10 0 0 1 10.5-2.222" }),
1044
+ /* @__PURE__ */ d("path", { d: "M8.5 16.429a5 5 0 0 1 3-1.406" })
1045
+ ] }), Pt = () => {
1046
+ const e = Bt(), t = e.filter((n) => n.executed);
1047
+ return /* @__PURE__ */ d(
1022
1048
  "button",
1023
1049
  {
1024
1050
  onClick: () => {
@@ -1043,15 +1069,15 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
1043
1069
  boxShadow: "var(--twd-shadow-sm)"
1044
1070
  },
1045
1071
  children: [
1046
- /* @__PURE__ */ _(Ht, {}),
1047
- /* @__PURE__ */ _("span", { style: { flex: 1 }, children: [
1072
+ /* @__PURE__ */ d(Dt, {}),
1073
+ /* @__PURE__ */ d("span", { style: { flex: 1 }, children: [
1048
1074
  "Rules: ",
1049
1075
  t.length,
1050
1076
  "/",
1051
1077
  e.length,
1052
1078
  " triggered"
1053
1079
  ] }),
1054
- /* @__PURE__ */ _("span", { style: {
1080
+ /* @__PURE__ */ d("span", { style: {
1055
1081
  fontSize: "var(--twd-font-size-xs)",
1056
1082
  color: "var(--twd-text)",
1057
1083
  fontWeight: "var(--twd-font-weight-medium)"
@@ -1059,7 +1085,7 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
1059
1085
  ]
1060
1086
  }
1061
1087
  );
1062
- }, Nt = (e) => e instanceof Error && "actual" in e && "expected" in e, qe = (e) => e.actual !== void 0 && e.expected !== void 0 ? {
1088
+ }, Ft = (e) => e instanceof Error && "actual" in e && "expected" in e, Ge = (e) => e.actual !== void 0 && e.expected !== void 0 ? {
1063
1089
  type: "diff",
1064
1090
  actual: e.actual,
1065
1091
  expected: e.expected,
@@ -1067,64 +1093,88 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
1067
1093
  } : {
1068
1094
  type: "message",
1069
1095
  message: e.message
1070
- }, zt = (e) => {
1071
- const t = qe(e);
1096
+ }, Ot = (e) => {
1097
+ const t = Ge(e);
1072
1098
  if (t.type === "diff") {
1073
1099
  const r = t.operator || "unknown";
1074
1100
  console.error(`Assertion failed with operator: ${r}`), console.group("Expected:"), console.log(t.expected), console.groupEnd(), console.group("Actual:"), console.log(t.actual), console.groupEnd();
1075
1101
  } else
1076
1102
  console.error(t.message);
1077
- }, Bt = {
1103
+ }, jt = (e) => {
1104
+ if (e.status === "pass")
1105
+ return `Test "${e.name}" passed.`;
1106
+ if (e.status === "fail") {
1107
+ if (!e.logs || e.logs.length === 0)
1108
+ return `Test "${e.name}" failed.`;
1109
+ const t = e.logs[e.logs.length - 1];
1110
+ try {
1111
+ const r = JSON.parse(t);
1112
+ return r.type === R.CHAI_MESSAGE || r.type === R.ERROR ? `Test "${e.name}" failed. ${r.message}` : r.type === R.CHAI_DIFF ? `Test "${e.name}" failed. Expected value does not match actual value.` : `Test "${e.name}" failed.`;
1113
+ } catch {
1114
+ return `Test "${e.name}" failed. ${t}`;
1115
+ }
1116
+ } else if (e.status === "skip")
1117
+ return `Test "${e.name}" skipped.`;
1118
+ return "";
1119
+ }, Ut = (e) => {
1120
+ const t = e.filter((l) => l.type === "test"), r = t.filter((l) => l.status === "pass").length, n = t.filter((l) => l.status === "fail").length, s = t.filter((l) => l.status === "skip").length, o = [];
1121
+ return n > 0 ? (o.push("Test run completed."), o.push(`${r} test${r !== 1 ? "s" : ""} passed`), o.push(`${n} test${n !== 1 ? "s" : ""} failed`), s > 0 && o.push(`${s} test${s !== 1 ? "s" : ""} skipped`), o.join(", ") + ".") : (o.push("All tests passed."), o.push(`${r} test${r !== 1 ? "s" : ""} completed`), s > 0 && o.push(`${s} test${s !== 1 ? "s" : ""} skipped`), o.join(", ") + ".");
1122
+ }, qt = {
1078
1123
  left: { left: 0, borderRight: "1px solid var(--twd-border)" },
1079
1124
  right: { right: 0, borderLeft: "1px solid var(--twd-border)" }
1080
- }, Dt = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Pt = (e) => sessionStorage.getItem("twd-sidebar-open") ? sessionStorage.getItem("twd-sidebar-open") === "true" : e, Ft = ({ open: e, position: t = "left" }) => {
1081
- const [r, n] = te(0), [i, o] = te(Pt(e));
1082
- Tt({ isOpen: i, position: t });
1083
- const l = new Ue({
1084
- onStart: (c) => {
1085
- c.status = "running", n((u) => u + 1);
1125
+ }, Vt = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Jt = (e) => sessionStorage.getItem("twd-sidebar-open") ? sessionStorage.getItem("twd-sidebar-open") === "true" : e, Xt = ({ open: e, position: t = "left" }) => {
1126
+ const [r, n] = q(0), [s, o] = q(Jt(e));
1127
+ It({ isOpen: s, position: t });
1128
+ const [l, c] = q(""), f = new Je({
1129
+ onStart: (_) => {
1130
+ _.status = "running", n((g) => g + 1);
1086
1131
  },
1087
- onPass: (c) => {
1088
- c.status = "pass", n((u) => u + 1);
1132
+ onPass: (_) => {
1133
+ _.status = "pass", n((g) => g + 1);
1089
1134
  },
1090
- onFail: (c, u) => {
1091
- if (c.status = "fail", console.group(`%c❌ Test failed: ${c.name}`, "color: red; font-weight: bold;"), Nt(u)) {
1092
- zt(u);
1093
- const h = qe(u);
1094
- h.type === "diff" ? c.logs.push(JSON.stringify({
1095
- type: H.CHAI_DIFF,
1096
- expected: h.expected,
1097
- actual: h.actual
1098
- })) : c.logs.push(JSON.stringify({
1099
- type: H.CHAI_MESSAGE,
1100
- message: `Test failed: ${h.message}`
1135
+ onFail: (_, g) => {
1136
+ if (_.status = "fail", console.group(`%c❌ Test failed: ${_.name}`, "color: red; font-weight: bold;"), Ft(g)) {
1137
+ Ot(g);
1138
+ const v = Ge(g);
1139
+ v.type === "diff" ? _.logs.push(JSON.stringify({
1140
+ type: R.CHAI_DIFF,
1141
+ expected: v.expected,
1142
+ actual: v.actual
1143
+ })) : _.logs.push(JSON.stringify({
1144
+ type: R.CHAI_MESSAGE,
1145
+ message: `Test failed: ${v.message}`
1101
1146
  }));
1102
1147
  } else
1103
- console.error(u.message), c.logs.push(JSON.stringify({
1104
- type: H.ERROR,
1105
- message: `Test failed: ${u.message}`
1148
+ console.error(g.message), _.logs.push(JSON.stringify({
1149
+ type: R.ERROR,
1150
+ message: `Test failed: ${g.message}`
1106
1151
  }));
1107
- console.groupEnd(), n((h) => h + 1);
1152
+ console.groupEnd(), n((v) => v + 1);
1108
1153
  },
1109
- onSkip: (c) => {
1110
- c.status = "skip", n((u) => u + 1);
1154
+ onSkip: (_) => {
1155
+ _.status = "skip", n((g) => g + 1);
1111
1156
  }
1112
- }), d = (c) => {
1113
- o(c), sessionStorage.setItem("twd-sidebar-open", c.toString());
1114
- }, f = async () => {
1115
- sessionStorage.removeItem("twd-last-run-test-name"), await l.runAll();
1116
- }, a = async (c) => {
1117
- const u = Array.from(x.values()).filter((h) => h.type === "test").find((h) => h.id === c);
1118
- u && (sessionStorage.setItem("twd-last-run-test-name", u.name), await l.runSingle(u.id));
1119
- }, p = Array.from(x.values());
1120
- if (!i)
1121
- return /* @__PURE__ */ _(St, { position: t, setOpen: d });
1122
- const s = p.filter((c) => c.type === "test").length;
1123
- return /* @__PURE__ */ _(
1157
+ }), a = (_) => {
1158
+ o(_), sessionStorage.setItem("twd-sidebar-open", _.toString());
1159
+ }, h = async () => {
1160
+ c(""), sessionStorage.removeItem("twd-last-run-test-name"), await f.runAll();
1161
+ const _ = Ut(u);
1162
+ c(_);
1163
+ }, i = async (_) => {
1164
+ const g = Array.from(S.values()).filter((m) => m.type === "test").find((m) => m.id === _);
1165
+ if (!g) return;
1166
+ c(""), sessionStorage.setItem("twd-last-run-test-name", g.name), await f.runSingle(g.id);
1167
+ const v = jt(g);
1168
+ c(v);
1169
+ }, u = Array.from(S.values());
1170
+ if (!s)
1171
+ return /* @__PURE__ */ d(Ct, { position: t, setOpen: a });
1172
+ const p = u.filter((_) => _.type === "test").length;
1173
+ return /* @__PURE__ */ d(
1124
1174
  "div",
1125
1175
  {
1126
1176
  style: {
1127
- fontFamily: Dt,
1177
+ fontFamily: Vt,
1128
1178
  position: "fixed",
1129
1179
  top: 0,
1130
1180
  bottom: 0,
@@ -1135,13 +1185,16 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
1135
1185
  boxShadow: "var(--twd-shadow)",
1136
1186
  textAlign: "left",
1137
1187
  zIndex: "var(--twd-z-index-sidebar)",
1138
- ...Bt[t]
1188
+ pointerEvents: "all",
1189
+ isolation: "isolate",
1190
+ ...qt[t]
1139
1191
  },
1140
1192
  "data-testid": "twd-sidebar",
1141
1193
  role: "complementary",
1142
1194
  "aria-label": "Test While Developing sidebar",
1143
1195
  children: [
1144
- /* @__PURE__ */ _("div", { style: {
1196
+ /* @__PURE__ */ d("div", { "aria-live": "polite", "aria-atomic": "true", style: { position: "absolute", width: "1px", height: "1px", margin: "-1px", border: "0", padding: "0", overflow: "hidden", clip: "rect(0 0 0 0)" }, children: l }),
1197
+ /* @__PURE__ */ d("div", { style: {
1145
1198
  padding: "var(--twd-spacing-md)",
1146
1199
  background: "var(--twd-background)",
1147
1200
  position: "sticky",
@@ -1149,16 +1202,16 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
1149
1202
  zIndex: "var(--twd-z-index-sticky)",
1150
1203
  borderBottom: "1px solid var(--twd-border)"
1151
1204
  }, children: [
1152
- /* @__PURE__ */ _("div", { style: {
1205
+ /* @__PURE__ */ d("div", { style: {
1153
1206
  display: "flex",
1154
1207
  justifyContent: "space-between",
1155
1208
  alignItems: "center",
1156
1209
  marginBottom: "var(--twd-spacing-xl)"
1157
1210
  }, children: [
1158
- /* @__PURE__ */ _(
1211
+ /* @__PURE__ */ d(
1159
1212
  "button",
1160
1213
  {
1161
- onClick: f,
1214
+ onClick: h,
1162
1215
  style: {
1163
1216
  background: "var(--twd-button-primary)",
1164
1217
  color: "var(--twd-button-primary-text)",
@@ -1170,7 +1223,7 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
1170
1223
  children: "Run All"
1171
1224
  }
1172
1225
  ),
1173
- /* @__PURE__ */ _(
1226
+ /* @__PURE__ */ d(
1174
1227
  "button",
1175
1228
  {
1176
1229
  "aria-label": "Close sidebar",
@@ -1182,12 +1235,12 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
1182
1235
  paddingRight: "0",
1183
1236
  paddingLeft: "0"
1184
1237
  },
1185
- onClick: () => d(!1),
1238
+ onClick: () => a(!1),
1186
1239
  children: "✖"
1187
1240
  }
1188
1241
  )
1189
1242
  ] }),
1190
- /* @__PURE__ */ _("div", { style: {
1243
+ /* @__PURE__ */ d("div", { style: {
1191
1244
  display: "flex",
1192
1245
  justifyContent: "space-between",
1193
1246
  alignItems: "center",
@@ -1195,55 +1248,55 @@ const $t = "1.4.1", It = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__
1195
1248
  color: "var(--twd-text-secondary)",
1196
1249
  marginBottom: "10px"
1197
1250
  }, children: [
1198
- /* @__PURE__ */ _("span", { style: { color: "var(--twd-text)" }, children: [
1251
+ /* @__PURE__ */ d("span", { style: { color: "var(--twd-text)" }, children: [
1199
1252
  "Total: ",
1200
- s
1253
+ p
1201
1254
  ] }),
1202
- /* @__PURE__ */ _("div", { style: { display: "flex", gap: "var(--twd-spacing-xs)" }, children: [
1203
- /* @__PURE__ */ _("span", { style: { color: "var(--twd-success)" }, children: [
1255
+ /* @__PURE__ */ d("div", { style: { display: "flex", gap: "var(--twd-spacing-xs)" }, children: [
1256
+ /* @__PURE__ */ d("span", { style: { color: "var(--twd-success)" }, children: [
1204
1257
  "✓ ",
1205
- p.filter((c) => c.status === "pass").length
1258
+ u.filter((_) => _.status === "pass").length
1206
1259
  ] }),
1207
- /* @__PURE__ */ _("span", { style: { color: "var(--twd-error)" }, children: [
1260
+ /* @__PURE__ */ d("span", { style: { color: "var(--twd-error)" }, children: [
1208
1261
  "✗ ",
1209
- p.filter((c) => c.status === "fail").length
1262
+ u.filter((_) => _.status === "fail").length
1210
1263
  ] })
1211
1264
  ] })
1212
1265
  ] }),
1213
- /* @__PURE__ */ _(Mt, {})
1266
+ /* @__PURE__ */ d(Pt, {})
1214
1267
  ] }),
1215
- /* @__PURE__ */ _("div", { style: { padding: "var(--twd-spacing-md)" }, children: /* @__PURE__ */ _(
1216
- kt,
1268
+ /* @__PURE__ */ d("div", { style: { padding: "var(--twd-spacing-md)" }, children: /* @__PURE__ */ d(
1269
+ Rt,
1217
1270
  {
1218
- tests: p.map((c) => ({
1219
- name: c.name,
1220
- depth: c.depth,
1221
- status: c.status,
1222
- logs: c.logs,
1223
- id: c.id,
1224
- parent: c.parent,
1225
- type: c.type,
1226
- only: c.only,
1227
- skip: c.skip
1271
+ tests: u.map((_) => ({
1272
+ name: _.name,
1273
+ depth: _.depth,
1274
+ status: _.status,
1275
+ logs: _.logs,
1276
+ id: _.id,
1277
+ parent: _.parent,
1278
+ type: _.type,
1279
+ only: _.only,
1280
+ skip: _.skip
1228
1281
  })),
1229
- runTest: a
1282
+ runTest: i
1230
1283
  }
1231
1284
  ) })
1232
1285
  ]
1233
1286
  }
1234
1287
  );
1235
- }, Ot = (e) => ({
1288
+ }, Gt = (e) => ({
1236
1289
  render: (t) => {
1237
- Ze(t, e);
1290
+ ot(t, e);
1238
1291
  }
1239
- }), Ut = (e, t) => {
1240
- const { open: r = !0, position: n = "left", serviceWorker: i = !0, serviceWorkerUrl: o = "/mock-sw.js", theme: l } = t || {};
1241
- ot(e, /* @__PURE__ */ _(Ft, { open: r, position: n }), Ot, l), i && Wt(o).then(() => {
1292
+ }), Kt = (e, t) => {
1293
+ const { open: r = !0, position: n = "left", serviceWorker: s = !0, serviceWorkerUrl: o = "/mock-sw.js", theme: l } = t || {};
1294
+ dt(e, /* @__PURE__ */ d(Xt, { open: r, position: n }), Gt, l), s && Nt(o).then(() => {
1242
1295
  console.log("Request mocking initialized");
1243
- }).catch((d) => {
1244
- console.error("Error initializing request mocking:", d);
1296
+ }).catch((c) => {
1297
+ console.error("Error initializing request mocking:", c);
1245
1298
  });
1246
1299
  };
1247
1300
  export {
1248
- Ut as initTWD
1301
+ Kt as initTWD
1249
1302
  };