PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/modules/interactivity/index.js +844 -817 23.1.1 → 24.1.0 View file →
@@ -8,102 +8,99 @@
8 8 __defProp(target, name, { get: all[name], enumerable: true });
9 9 };
10 10
11 11 // node_modules/preact/dist/preact.module.js
12 -function d(n3, l6) {
12 +function m(n3, l6) {
13 13 for (var u5 in l6) n3[u5] = l6[u5];
14 14 return n3;
15 15 }
16 -function w(n3) {
16 +function b(n3) {
17 17 n3 && n3.parentNode && n3.parentNode.removeChild(n3);
18 18 }
19 -function _(l6, u5, t5) {
20 - var i6, o4, r5, f5 = {};
21 - for (r5 in u5) "key" == r5 ? i6 = u5[r5] : "ref" == r5 ? o4 = u5[r5] : f5[r5] = u5[r5];
22 - if (arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : t5), "function" == typeof l6 && null != l6.defaultProps) for (r5 in l6.defaultProps) void 0 === f5[r5] && (f5[r5] = l6.defaultProps[r5]);
23 - return g(l6, f5, i6, o4, null);
19 +function k(l6, u5, t5) {
20 + var i6, r5, o4, e4 = {};
21 + for (o4 in u5) "key" == o4 ? i6 = u5[o4] : "ref" == o4 ? r5 = u5[o4] : e4[o4] = u5[o4];
22 + if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t5), "function" == typeof l6 && null != l6.defaultProps) for (o4 in l6.defaultProps) void 0 === e4[o4] && (e4[o4] = l6.defaultProps[o4]);
23 + return x(l6, e4, i6, r5, null);
24 24 }
25 -function g(n3, t5, i6, o4, r5) {
26 - var f5 = { type: n3, props: t5, key: i6, ref: o4, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: null == r5 ? ++u : r5, __i: -1, __u: 0 };
27 - return null == r5 && null != l.vnode && l.vnode(f5), f5;
25 +function x(n3, t5, i6, r5, o4) {
26 + var e4 = { type: n3, props: t5, key: i6, ref: r5, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == o4 ? ++u : o4, __i: -1, __u: 0 };
27 + return null == o4 && null != l.vnode && l.vnode(e4), e4;
28 28 }
29 -function b(n3) {
29 +function S(n3) {
30 30 return n3.children;
31 31 }
32 -function k(n3, l6) {
32 +function C(n3, l6) {
33 33 this.props = n3, this.context = l6;
34 34 }
35 -function x(n3, l6) {
36 - if (null == l6) return n3.__ ? x(n3.__, n3.__i + 1) : null;
35 +function $(n3, l6) {
36 + if (null == l6) return n3.__ ? $(n3.__, n3.__i + 1) : null;
37 37 for (var u5; l6 < n3.__k.length; l6++) if (null != (u5 = n3.__k[l6]) && null != u5.__e) return u5.__e;
38 - return "function" == typeof n3.type ? x(n3) : null;
38 + return "function" == typeof n3.type ? $(n3) : null;
39 39 }
40 -function C(n3) {
41 - var l6, u5;
42 - if (null != (n3 = n3.__) && null != n3.__c) {
43 - for (n3.__e = n3.__c.base = null, l6 = 0; l6 < n3.__k.length; l6++) if (null != (u5 = n3.__k[l6]) && null != u5.__e) {
44 - n3.__e = n3.__c.base = u5.__e;
45 - break;
46 - }
47 - return C(n3);
40 +function I(n3) {
41 + if (n3.__P && n3.__d) {
42 + var u5 = n3.__v, t5 = u5.__e, i6 = [], r5 = [], o4 = m({}, u5);
43 + o4.__v = u5.__v + 1, l.vnode && l.vnode(o4), q(n3.__P, o4, u5, n3.__n, n3.__P.namespaceURI, 32 & u5.__u ? [t5] : null, i6, null == t5 ? $(u5) : t5, !!(32 & u5.__u), r5), o4.__v = u5.__v, o4.__.__k[o4.__i] = o4, D(i6, o4, r5), u5.__e = u5.__ = null, o4.__e != t5 && P(o4);
48 44 }
49 45 }
50 -function M(n3) {
51 - (!n3.__d && (n3.__d = true) && i.push(n3) && !P.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || r)(P);
46 +function P(n3) {
47 + if (null != (n3 = n3.__) && null != n3.__c) return n3.__e = n3.__c.base = null, n3.__k.some(function(l6) {
48 + if (null != l6 && null != l6.__e) return n3.__e = n3.__c.base = l6.__e;
49 + }), P(n3);
52 50 }
53 -function P() {
54 - var n3, u5, t5, o4, r5, e4, c5, s6;
55 - for (i.sort(f); n3 = i.shift(); ) n3.__d && (u5 = i.length, o4 = void 0, e4 = (r5 = (t5 = n3).__v).__e, c5 = [], s6 = [], t5.__P && ((o4 = d({}, r5)).__v = r5.__v + 1, l.vnode && l.vnode(o4), O(t5.__P, o4, r5, t5.__n, t5.__P.namespaceURI, 32 & r5.__u ? [e4] : null, c5, null == e4 ? x(r5) : e4, !!(32 & r5.__u), s6), o4.__v = r5.__v, o4.__.__k[o4.__i] = o4, j(c5, o4, s6), o4.__e != e4 && C(o4)), i.length > u5 && i.sort(f));
56 - P.__r = 0;
51 +function A(n3) {
52 + (!n3.__d && (n3.__d = true) && i.push(n3) && !H.__r++ || r != l.debounceRendering) && ((r = l.debounceRendering) || o)(H);
57 53 }
58 -function S(n3, l6, u5, t5, i6, o4, r5, f5, e4, c5, s6) {
59 - var a5, p6, y5, d6, w5, _5 = t5 && t5.__k || v, g3 = l6.length;
60 - for (u5.__d = e4, $(u5, l6, _5), e4 = u5.__d, a5 = 0; a5 < g3; a5++) null != (y5 = u5.__k[a5]) && (p6 = -1 === y5.__i ? h : _5[y5.__i] || h, y5.__i = a5, O(n3, y5, p6, i6, o4, r5, f5, e4, c5, s6), d6 = y5.__e, y5.ref && p6.ref != y5.ref && (p6.ref && N(p6.ref, null, y5), s6.push(y5.ref, y5.__c || d6, y5)), null == w5 && null != d6 && (w5 = d6), 65536 & y5.__u || p6.__k === y5.__k ? e4 = I(y5, e4, n3) : "function" == typeof y5.type && void 0 !== y5.__d ? e4 = y5.__d : d6 && (e4 = d6.nextSibling), y5.__d = void 0, y5.__u &= -196609);
61 - u5.__d = e4, u5.__e = w5;
54 +function H() {
55 + try {
56 + for (var n3, l6 = 1; i.length; ) i.length > l6 && i.sort(e), n3 = i.shift(), l6 = i.length, I(n3);
57 + } finally {
58 + i.length = H.__r = 0;
59 + }
62 60 }
63 -function $(n3, l6, u5) {
64 - var t5, i6, o4, r5, f5, e4 = l6.length, c5 = u5.length, s6 = c5, a5 = 0;
65 - for (n3.__k = [], t5 = 0; t5 < e4; t5++) null != (i6 = l6[t5]) && "boolean" != typeof i6 && "function" != typeof i6 ? (r5 = t5 + a5, (i6 = n3.__k[t5] = "string" == typeof i6 || "number" == typeof i6 || "bigint" == typeof i6 || i6.constructor == String ? g(null, i6, null, null, null) : y(i6) ? g(b, { children: i6 }, null, null, null) : void 0 === i6.constructor && i6.__b > 0 ? g(i6.type, i6.props, i6.key, i6.ref ? i6.ref : null, i6.__v) : i6).__ = n3, i6.__b = n3.__b + 1, o4 = null, -1 !== (f5 = i6.__i = L(i6, u5, r5, s6)) && (s6--, (o4 = u5[f5]) && (o4.__u |= 131072)), null == o4 || null === o4.__v ? (-1 == f5 && a5--, "function" != typeof i6.type && (i6.__u |= 65536)) : f5 !== r5 && (f5 == r5 - 1 ? a5-- : f5 == r5 + 1 ? a5++ : (f5 > r5 ? a5-- : a5++, i6.__u |= 65536))) : i6 = n3.__k[t5] = null;
66 - if (s6) for (t5 = 0; t5 < c5; t5++) null != (o4 = u5[t5]) && 0 == (131072 & o4.__u) && (o4.__e == n3.__d && (n3.__d = x(o4)), V(o4, o4));
61 +function L(n3, l6, u5, t5, i6, r5, o4, e4, f5, c5, s6) {
62 + var a5, h5, p6, v6, y5, _5, g3, m4 = t5 && t5.__k || w, b4 = l6.length;
63 + for (f5 = T(u5, l6, m4, f5, b4), a5 = 0; a5 < b4; a5++) null != (p6 = u5.__k[a5]) && (h5 = -1 != p6.__i && m4[p6.__i] || d, p6.__i = a5, _5 = q(n3, p6, h5, i6, r5, o4, e4, f5, c5, s6), v6 = p6.__e, p6.ref && h5.ref != p6.ref && (h5.ref && J(h5.ref, null, p6), s6.push(p6.ref, p6.__c || v6, p6)), null == y5 && null != v6 && (y5 = v6), (g3 = !!(4 & p6.__u)) || h5.__k === p6.__k ? (f5 = j(p6, f5, n3, g3), g3 && h5.__e && (h5.__e = null)) : "function" == typeof p6.type && void 0 !== _5 ? f5 = _5 : v6 && (f5 = v6.nextSibling), p6.__u &= -7);
64 + return u5.__e = y5, f5;
67 65 }
68 -function I(n3, l6, u5) {
69 - var t5, i6;
66 +function T(n3, l6, u5, t5, i6) {
67 + var r5, o4, e4, f5, c5, s6 = u5.length, a5 = s6, h5 = 0;
68 + for (n3.__k = new Array(i6), r5 = 0; r5 < i6; r5++) null != (o4 = l6[r5]) && "boolean" != typeof o4 && "function" != typeof o4 ? ("string" == typeof o4 || "number" == typeof o4 || "bigint" == typeof o4 || o4.constructor == String ? o4 = n3.__k[r5] = x(null, o4, null, null, null) : g(o4) ? o4 = n3.__k[r5] = x(S, { children: o4 }, null, null, null) : void 0 === o4.constructor && o4.__b > 0 ? o4 = n3.__k[r5] = x(o4.type, o4.props, o4.key, o4.ref ? o4.ref : null, o4.__v) : n3.__k[r5] = o4, f5 = r5 + h5, o4.__ = n3, o4.__b = n3.__b + 1, e4 = null, -1 != (c5 = o4.__i = O(o4, u5, f5, a5)) && (a5--, (e4 = u5[c5]) && (e4.__u |= 2)), null == e4 || null == e4.__v ? (-1 == c5 && (i6 > s6 ? h5-- : i6 < s6 && h5++), "function" != typeof o4.type && (o4.__u |= 4)) : c5 != f5 && (c5 == f5 - 1 ? h5-- : c5 == f5 + 1 ? h5++ : (c5 > f5 ? h5-- : h5++, o4.__u |= 4))) : n3.__k[r5] = null;
69 + if (a5) for (r5 = 0; r5 < s6; r5++) null != (e4 = u5[r5]) && 0 == (2 & e4.__u) && (e4.__e == t5 && (t5 = $(e4)), K(e4, e4));
70 + return t5;
71 +}
72 +function j(n3, l6, u5, t5) {
73 + var i6, r5;
70 74 if ("function" == typeof n3.type) {
71 - for (t5 = n3.__k, i6 = 0; t5 && i6 < t5.length; i6++) t5[i6] && (t5[i6].__ = n3, l6 = I(t5[i6], l6, u5));
75 + for (i6 = n3.__k, r5 = 0; i6 && r5 < i6.length; r5++) i6[r5] && (i6[r5].__ = n3, l6 = j(i6[r5], l6, u5, t5));
72 76 return l6;
73 77 }
74 - n3.__e != l6 && (l6 && n3.type && !u5.contains(l6) && (l6 = x(n3)), u5.insertBefore(n3.__e, l6 || null), l6 = n3.__e);
78 + n3.__e != l6 && (t5 && (l6 && n3.type && !l6.parentNode && (l6 = $(n3)), u5.insertBefore(n3.__e, l6 || null)), l6 = n3.__e);
75 79 do {
76 80 l6 = l6 && l6.nextSibling;
77 - } while (null != l6 && 8 === l6.nodeType);
81 + } while (null != l6 && 8 == l6.nodeType);
78 82 return l6;
79 83 }
80 -function L(n3, l6, u5, t5) {
81 - var i6 = n3.key, o4 = n3.type, r5 = u5 - 1, f5 = u5 + 1, e4 = l6[u5];
82 - if (null === e4 || e4 && i6 == e4.key && o4 === e4.type && 0 == (131072 & e4.__u)) return u5;
83 - if (t5 > (null != e4 && 0 == (131072 & e4.__u) ? 1 : 0)) for (; r5 >= 0 || f5 < l6.length; ) {
84 - if (r5 >= 0) {
85 - if ((e4 = l6[r5]) && 0 == (131072 & e4.__u) && i6 == e4.key && o4 === e4.type) return r5;
86 - r5--;
87 - }
88 - if (f5 < l6.length) {
89 - if ((e4 = l6[f5]) && 0 == (131072 & e4.__u) && i6 == e4.key && o4 === e4.type) return f5;
90 - f5++;
91 - }
84 +function O(n3, l6, u5, t5) {
85 + var i6, r5, o4, e4 = n3.key, f5 = n3.type, c5 = l6[u5], s6 = null != c5 && 0 == (2 & c5.__u);
86 + if (null === c5 && null == e4 || s6 && e4 == c5.key && f5 == c5.type) return u5;
87 + if (t5 > (s6 ? 1 : 0)) {
88 + for (i6 = u5 - 1, r5 = u5 + 1; i6 >= 0 || r5 < l6.length; ) if (null != (c5 = l6[o4 = i6 >= 0 ? i6-- : r5++]) && 0 == (2 & c5.__u) && e4 == c5.key && f5 == c5.type) return o4;
92 89 }
93 90 return -1;
94 91 }
95 -function T(n3, l6, u5) {
96 - "-" === l6[0] ? n3.setProperty(l6, null == u5 ? "" : u5) : n3[l6] = null == u5 ? "" : "number" != typeof u5 || p.test(l6) ? u5 : u5 + "px";
92 +function z(n3, l6, u5) {
93 + "-" == l6[0] ? n3.setProperty(l6, null == u5 ? "" : u5) : n3[l6] = null == u5 ? "" : "number" != typeof u5 || _.test(l6) ? u5 : u5 + "px";
97 94 }
98 -function A(n3, l6, u5, t5, i6) {
99 - var o4;
100 - n: if ("style" === l6) if ("string" == typeof u5) n3.style.cssText = u5;
95 +function N(n3, l6, u5, t5, i6) {
96 + var r5, o4;
97 + n: if ("style" == l6) if ("string" == typeof u5) n3.style.cssText = u5;
101 98 else {
102 - if ("string" == typeof t5 && (n3.style.cssText = t5 = ""), t5) for (l6 in t5) u5 && l6 in u5 || T(n3.style, l6, "");
103 - if (u5) for (l6 in u5) t5 && u5[l6] === t5[l6] || T(n3.style, l6, u5[l6]);
99 + if ("string" == typeof t5 && (n3.style.cssText = t5 = ""), t5) for (l6 in t5) u5 && l6 in u5 || z(n3.style, l6, "");
100 + if (u5) for (l6 in u5) t5 && u5[l6] == t5[l6] || z(n3.style, l6, u5[l6]);
104 101 }
105 - else if ("o" === l6[0] && "n" === l6[1]) o4 = l6 !== (l6 = l6.replace(/(PointerCapture)$|Capture$/i, "$1")), l6 = l6.toLowerCase() in n3 || "onFocusOut" === l6 || "onFocusIn" === l6 ? l6.toLowerCase().slice(2) : l6.slice(2), n3.l || (n3.l = {}), n3.l[l6 + o4] = u5, u5 ? t5 ? u5.u = t5.u : (u5.u = e, n3.addEventListener(l6, o4 ? s : c, o4)) : n3.removeEventListener(l6, o4 ? s : c, o4);
102 + else if ("o" == l6[0] && "n" == l6[1]) r5 = l6 != (l6 = l6.replace(a, "$1")), o4 = l6.toLowerCase(), l6 = o4 in n3 || "onFocusOut" == l6 || "onFocusIn" == l6 ? o4.slice(2) : l6.slice(2), n3.l || (n3.l = {}), n3.l[l6 + r5] = u5, u5 ? t5 ? u5[s] = t5[s] : (u5[s] = h, n3.addEventListener(l6, r5 ? v : p, r5)) : n3.removeEventListener(l6, r5 ? v : p, r5);
106 103 else {
107 104 if ("http://www.w3.org/2000/svg" == i6) l6 = l6.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
108 105 else if ("width" != l6 && "height" != l6 && "href" != l6 && "list" != l6 && "form" != l6 && "tabIndex" != l6 && "download" != l6 && "rowSpan" != l6 && "colSpan" != l6 && "role" != l6 && "popover" != l6 && l6 in n3) try {
109 106 n3[l6] = null == u5 ? "" : u5;
@@ -109,59 +106,62 @@
109 106 n3[l6] = null == u5 ? "" : u5;
110 107 break n;
111 108 } catch (n4) {
112 109 }
113 - "function" == typeof u5 || (null == u5 || false === u5 && "-" !== l6[4] ? n3.removeAttribute(l6) : n3.setAttribute(l6, "popover" == l6 && 1 == u5 ? "" : u5));
110 + "function" == typeof u5 || (null == u5 || false === u5 && "-" != l6[4] ? n3.removeAttribute(l6) : n3.setAttribute(l6, "popover" == l6 && 1 == u5 ? "" : u5));
114 111 }
115 112 }
116 -function F(n3) {
113 +function V(n3) {
117 114 return function(u5) {
118 115 if (this.l) {
119 116 var t5 = this.l[u5.type + n3];
120 - if (null == u5.t) u5.t = e++;
121 - else if (u5.t < t5.u) return;
117 + if (null == u5[c]) u5[c] = h++;
118 + else if (u5[c] < t5[s]) return;
122 119 return t5(l.event ? l.event(u5) : u5);
123 120 }
124 121 };
125 122 }
126 -function O(n3, u5, t5, i6, o4, r5, f5, e4, c5, s6) {
127 - var a5, h5, v6, p6, w5, _5, g3, m3, x3, C3, M2, P2, $2, I2, H, L2, T3 = u5.type;
123 +function q(n3, u5, t5, i6, r5, o4, e4, f5, c5, s6) {
124 + var a5, h5, p6, v6, y5, d6, _5, k3, x3, M, $2, I2, P2, A3, H2, T3 = u5.type;
128 125 if (void 0 !== u5.constructor) return null;
129 - 128 & t5.__u && (c5 = !!(32 & t5.__u), r5 = [e4 = u5.__e = t5.__e]), (a5 = l.__b) && a5(u5);
126 + 128 & t5.__u && (c5 = !!(32 & t5.__u), o4 = [f5 = u5.__e = t5.__e]), (a5 = l.__b) && a5(u5);
130 127 n: if ("function" == typeof T3) try {
131 - if (m3 = u5.props, x3 = "prototype" in T3 && T3.prototype.render, C3 = (a5 = T3.contextType) && i6[a5.__c], M2 = a5 ? C3 ? C3.props.value : a5.__ : i6, t5.__c ? g3 = (h5 = u5.__c = t5.__c).__ = h5.__E : (x3 ? u5.__c = h5 = new T3(m3, M2) : (u5.__c = h5 = new k(m3, M2), h5.constructor = T3, h5.render = q), C3 && C3.sub(h5), h5.props = m3, h5.state || (h5.state = {}), h5.context = M2, h5.__n = i6, v6 = h5.__d = true, h5.__h = [], h5._sb = []), x3 && null == h5.__s && (h5.__s = h5.state), x3 && null != T3.getDerivedStateFromProps && (h5.__s == h5.state && (h5.__s = d({}, h5.__s)), d(h5.__s, T3.getDerivedStateFromProps(m3, h5.__s))), p6 = h5.props, w5 = h5.state, h5.__v = u5, v6) x3 && null == T3.getDerivedStateFromProps && null != h5.componentWillMount && h5.componentWillMount(), x3 && null != h5.componentDidMount && h5.__h.push(h5.componentDidMount);
128 + if (k3 = u5.props, x3 = T3.prototype && T3.prototype.render, M = (a5 = T3.contextType) && i6[a5.__c], $2 = a5 ? M ? M.props.value : a5.__ : i6, t5.__c ? _5 = (h5 = u5.__c = t5.__c).__ = h5.__E : (x3 ? u5.__c = h5 = new T3(k3, $2) : (u5.__c = h5 = new C(k3, $2), h5.constructor = T3, h5.render = Q), M && M.sub(h5), h5.state || (h5.state = {}), h5.__n = i6, p6 = h5.__d = true, h5.__h = [], h5._sb = []), x3 && null == h5.__s && (h5.__s = h5.state), x3 && null != T3.getDerivedStateFromProps && (h5.__s == h5.state && (h5.__s = m({}, h5.__s)), m(h5.__s, T3.getDerivedStateFromProps(k3, h5.__s))), v6 = h5.props, y5 = h5.state, h5.__v = u5, p6) x3 && null == T3.getDerivedStateFromProps && null != h5.componentWillMount && h5.componentWillMount(), x3 && null != h5.componentDidMount && h5.__h.push(h5.componentDidMount);
132 129 else {
133 - if (x3 && null == T3.getDerivedStateFromProps && m3 !== p6 && null != h5.componentWillReceiveProps && h5.componentWillReceiveProps(m3, M2), !h5.__e && (null != h5.shouldComponentUpdate && false === h5.shouldComponentUpdate(m3, h5.__s, M2) || u5.__v === t5.__v)) {
134 - for (u5.__v !== t5.__v && (h5.props = m3, h5.state = h5.__s, h5.__d = false), u5.__e = t5.__e, u5.__k = t5.__k, u5.__k.some(function(n4) {
130 + if (x3 && null == T3.getDerivedStateFromProps && k3 !== v6 && null != h5.componentWillReceiveProps && h5.componentWillReceiveProps(k3, $2), u5.__v == t5.__v || !h5.__e && null != h5.shouldComponentUpdate && false === h5.shouldComponentUpdate(k3, h5.__s, $2)) {
131 + u5.__v != t5.__v && (h5.props = k3, h5.state = h5.__s, h5.__d = false), u5.__e = t5.__e, u5.__k = t5.__k, u5.__k.some(function(n4) {
135 132 n4 && (n4.__ = u5);
136 - }), P2 = 0; P2 < h5._sb.length; P2++) h5.__h.push(h5._sb[P2]);
137 - h5._sb = [], h5.__h.length && f5.push(h5);
133 + }), w.push.apply(h5.__h, h5._sb), h5._sb = [], h5.__h.length && e4.push(h5);
138 134 break n;
139 135 }
140 - null != h5.componentWillUpdate && h5.componentWillUpdate(m3, h5.__s, M2), x3 && null != h5.componentDidUpdate && h5.__h.push(function() {
141 - h5.componentDidUpdate(p6, w5, _5);
136 + null != h5.componentWillUpdate && h5.componentWillUpdate(k3, h5.__s, $2), x3 && null != h5.componentDidUpdate && h5.__h.push(function() {
137 + h5.componentDidUpdate(v6, y5, d6);
142 138 });
143 139 }
144 - if (h5.context = M2, h5.props = m3, h5.__P = n3, h5.__e = false, $2 = l.__r, I2 = 0, x3) {
145 - for (h5.state = h5.__s, h5.__d = false, $2 && $2(u5), a5 = h5.render(h5.props, h5.state, h5.context), H = 0; H < h5._sb.length; H++) h5.__h.push(h5._sb[H]);
146 - h5._sb = [];
147 - } else do {
148 - h5.__d = false, $2 && $2(u5), a5 = h5.render(h5.props, h5.state, h5.context), h5.state = h5.__s;
149 - } while (h5.__d && ++I2 < 25);
150 - h5.state = h5.__s, null != h5.getChildContext && (i6 = d(d({}, i6), h5.getChildContext())), x3 && !v6 && null != h5.getSnapshotBeforeUpdate && (_5 = h5.getSnapshotBeforeUpdate(p6, w5)), S(n3, y(L2 = null != a5 && a5.type === b && null == a5.key ? a5.props.children : a5) ? L2 : [L2], u5, t5, i6, o4, r5, f5, e4, c5, s6), h5.base = u5.__e, u5.__u &= -161, h5.__h.length && f5.push(h5), g3 && (h5.__E = h5.__ = null);
140 + if (h5.context = $2, h5.props = k3, h5.__P = n3, h5.__e = false, I2 = l.__r, P2 = 0, x3) h5.state = h5.__s, h5.__d = false, I2 && I2(u5), a5 = h5.render(h5.props, h5.state, h5.context), w.push.apply(h5.__h, h5._sb), h5._sb = [];
141 + else do {
142 + h5.__d = false, I2 && I2(u5), a5 = h5.render(h5.props, h5.state, h5.context), h5.state = h5.__s;
143 + } while (h5.__d && ++P2 < 25);
144 + h5.state = h5.__s, null != h5.getChildContext && (i6 = m(m({}, i6), h5.getChildContext())), x3 && !p6 && null != h5.getSnapshotBeforeUpdate && (d6 = h5.getSnapshotBeforeUpdate(v6, y5)), A3 = null != a5 && a5.type === S && null == a5.key ? E(a5.props.children) : a5, f5 = L(n3, g(A3) ? A3 : [A3], u5, t5, i6, r5, o4, e4, f5, c5, s6), h5.base = u5.__e, u5.__u &= -161, h5.__h.length && e4.push(h5), _5 && (h5.__E = h5.__ = null);
151 145 } catch (n4) {
152 - if (u5.__v = null, c5 || null != r5) {
153 - for (u5.__u |= c5 ? 160 : 32; e4 && 8 === e4.nodeType && e4.nextSibling; ) e4 = e4.nextSibling;
154 - r5[r5.indexOf(e4)] = null, u5.__e = e4;
155 - } else u5.__e = t5.__e, u5.__k = t5.__k;
146 + if (u5.__v = null, c5 || null != o4) if (n4.then) {
147 + for (u5.__u |= c5 ? 160 : 128; f5 && 8 == f5.nodeType && f5.nextSibling; ) f5 = f5.nextSibling;
148 + o4[o4.indexOf(f5)] = null, u5.__e = f5;
149 + } else {
150 + for (H2 = o4.length; H2--; ) b(o4[H2]);
151 + B(u5);
152 + }
153 + else u5.__e = t5.__e, u5.__k = t5.__k, n4.then || B(u5);
156 154 l.__e(n4, u5, t5);
157 155 }
158 - else null == r5 && u5.__v === t5.__v ? (u5.__k = t5.__k, u5.__e = t5.__e) : u5.__e = z(t5.__e, u5, t5, i6, o4, r5, f5, c5, s6);
159 - (a5 = l.diffed) && a5(u5);
156 + else null == o4 && u5.__v == t5.__v ? (u5.__k = t5.__k, u5.__e = t5.__e) : f5 = u5.__e = G(t5.__e, u5, t5, i6, r5, o4, e4, c5, s6);
157 + return (a5 = l.diffed) && a5(u5), 128 & u5.__u ? void 0 : f5;
160 158 }
161 -function j(n3, u5, t5) {
162 - u5.__d = void 0;
163 - for (var i6 = 0; i6 < t5.length; i6++) N(t5[i6], t5[++i6], t5[++i6]);
159 +function B(n3) {
160 + n3 && (n3.__c && (n3.__c.__e = true), n3.__k && n3.__k.some(B));
161 +}
162 +function D(n3, u5, t5) {
163 + for (var i6 = 0; i6 < t5.length; i6++) J(t5[i6], t5[++i6], t5[++i6]);
164 164 l.__c && l.__c(u5, n3), n3.some(function(u6) {
165 165 try {
166 166 n3 = u6.__h, u6.__h = [], n3.some(function(n4) {
167 167 n4.call(u6);
@@ -170,37 +170,35 @@
170 170 l.__e(n4, u6.__v);
171 171 }
172 172 });
173 173 }
174 -function z(u5, t5, i6, o4, r5, f5, e4, c5, s6) {
175 - var a5, v6, p6, d6, _5, g3, m3, b4 = i6.props, k3 = t5.props, C3 = t5.type;
176 - if ("svg" === C3 ? r5 = "http://www.w3.org/2000/svg" : "math" === C3 ? r5 = "http://www.w3.org/1998/Math/MathML" : r5 || (r5 = "http://www.w3.org/1999/xhtml"), null != f5) {
177 - for (a5 = 0; a5 < f5.length; a5++) if ((_5 = f5[a5]) && "setAttribute" in _5 == !!C3 && (C3 ? _5.localName === C3 : 3 === _5.nodeType)) {
178 - u5 = _5, f5[a5] = null;
174 +function E(n3) {
175 + return "object" != typeof n3 || null == n3 || n3.__b > 0 ? n3 : g(n3) ? n3.map(E) : m({}, n3);
176 +}
177 +function G(u5, t5, i6, r5, o4, e4, f5, c5, s6) {
178 + var a5, h5, p6, v6, y5, w5, _5, m4 = i6.props || d, k3 = t5.props, x3 = t5.type;
179 + if ("svg" == x3 ? o4 = "http://www.w3.org/2000/svg" : "math" == x3 ? o4 = "http://www.w3.org/1998/Math/MathML" : o4 || (o4 = "http://www.w3.org/1999/xhtml"), null != e4) {
180 + for (a5 = 0; a5 < e4.length; a5++) if ((y5 = e4[a5]) && "setAttribute" in y5 == !!x3 && (x3 ? y5.localName == x3 : 3 == y5.nodeType)) {
181 + u5 = y5, e4[a5] = null;
179 182 break;
180 183 }
181 184 }
182 185 if (null == u5) {
183 - if (null === C3) return document.createTextNode(k3);
184 - u5 = document.createElementNS(r5, C3, k3.is && k3), c5 && (l.__m && l.__m(t5, f5), c5 = false), f5 = null;
186 + if (null == x3) return document.createTextNode(k3);
187 + u5 = document.createElementNS(o4, x3, k3.is && k3), c5 && (l.__m && l.__m(t5, e4), c5 = false), e4 = null;
185 188 }
186 - if (null === C3) b4 === k3 || c5 && u5.data === k3 || (u5.data = k3);
189 + if (null == x3) m4 === k3 || c5 && u5.data == k3 || (u5.data = k3);
187 190 else {
188 - if (f5 = f5 && n.call(u5.childNodes), b4 = i6.props || h, !c5 && null != f5) for (b4 = {}, a5 = 0; a5 < u5.attributes.length; a5++) b4[(_5 = u5.attributes[a5]).name] = _5.value;
189 - for (a5 in b4) if (_5 = b4[a5], "children" == a5) ;
190 - else if ("dangerouslySetInnerHTML" == a5) p6 = _5;
191 - else if (!(a5 in k3)) {
192 - if ("value" == a5 && "defaultValue" in k3 || "checked" == a5 && "defaultChecked" in k3) continue;
193 - A(u5, a5, null, _5, r5);
194 - }
195 - for (a5 in k3) _5 = k3[a5], "children" == a5 ? d6 = _5 : "dangerouslySetInnerHTML" == a5 ? v6 = _5 : "value" == a5 ? g3 = _5 : "checked" == a5 ? m3 = _5 : c5 && "function" != typeof _5 || b4[a5] === _5 || A(u5, a5, _5, b4[a5], r5);
196 - if (v6) c5 || p6 && (v6.__html === p6.__html || v6.__html === u5.innerHTML) || (u5.innerHTML = v6.__html), t5.__k = [];
197 - else if (p6 && (u5.innerHTML = ""), S(u5, y(d6) ? d6 : [d6], t5, i6, o4, "foreignObject" === C3 ? "http://www.w3.org/1999/xhtml" : r5, f5, e4, f5 ? f5[0] : i6.__k && x(i6, 0), c5, s6), null != f5) for (a5 = f5.length; a5--; ) w(f5[a5]);
198 - c5 || (a5 = "value", "progress" === C3 && null == g3 ? u5.removeAttribute("value") : void 0 !== g3 && (g3 !== u5[a5] || "progress" === C3 && !g3 || "option" === C3 && g3 !== b4[a5]) && A(u5, a5, g3, b4[a5], r5), a5 = "checked", void 0 !== m3 && m3 !== u5[a5] && A(u5, a5, m3, b4[a5], r5));
191 + if (e4 = e4 && n.call(u5.childNodes), !c5 && null != e4) for (m4 = {}, a5 = 0; a5 < u5.attributes.length; a5++) m4[(y5 = u5.attributes[a5]).name] = y5.value;
192 + for (a5 in m4) y5 = m4[a5], "dangerouslySetInnerHTML" == a5 ? p6 = y5 : "children" == a5 || a5 in k3 || "value" == a5 && "defaultValue" in k3 || "checked" == a5 && "defaultChecked" in k3 || N(u5, a5, null, y5, o4);
193 + for (a5 in k3) y5 = k3[a5], "children" == a5 ? v6 = y5 : "dangerouslySetInnerHTML" == a5 ? h5 = y5 : "value" == a5 ? w5 = y5 : "checked" == a5 ? _5 = y5 : c5 && "function" != typeof y5 || m4[a5] === y5 || N(u5, a5, y5, m4[a5], o4);
194 + if (h5) c5 || p6 && (h5.__html == p6.__html || h5.__html == u5.innerHTML) || (u5.innerHTML = h5.__html), t5.__k = [];
195 + else if (p6 && (u5.innerHTML = ""), L("template" == t5.type ? u5.content : u5, g(v6) ? v6 : [v6], t5, i6, r5, "foreignObject" == x3 ? "http://www.w3.org/1999/xhtml" : o4, e4, f5, e4 ? e4[0] : i6.__k && $(i6, 0), c5, s6), null != e4) for (a5 = e4.length; a5--; ) b(e4[a5]);
196 + c5 || (a5 = "value", "progress" == x3 && null == w5 ? u5.removeAttribute("value") : null != w5 && (w5 !== u5[a5] || "progress" == x3 && !w5 || "option" == x3 && w5 != m4[a5]) && N(u5, a5, w5, m4[a5], o4), a5 = "checked", null != _5 && _5 != u5[a5] && N(u5, a5, _5, m4[a5], o4));
199 197 }
200 198 return u5;
201 199 }
202 -function N(n3, u5, t5) {
200 +function J(n3, u5, t5) {
203 201 try {
204 202 if ("function" == typeof n3) {
205 203 var i6 = "function" == typeof n3.__u;
206 204 i6 && n3.__u(), i6 && null == u5 || (n3.__u = n3(u5));
@@ -208,11 +206,11 @@
208 206 } catch (n4) {
209 207 l.__e(n4, t5);
210 208 }
211 209 }
212 -function V(n3, u5, t5) {
213 - var i6, o4;
214 - if (l.unmount && l.unmount(n3), (i6 = n3.ref) && (i6.current && i6.current !== n3.__e || N(i6, null, u5)), null != (i6 = n3.__c)) {
210 +function K(n3, u5, t5) {
211 + var i6, r5;
212 + if (l.unmount && l.unmount(n3), (i6 = n3.ref) && (i6.current && i6.current != n3.__e || J(i6, null, u5)), null != (i6 = n3.__c)) {
215 213 if (i6.componentWillUnmount) try {
216 214 i6.componentWillUnmount();
217 215 } catch (n4) {
218 216 l.__e(n4, u5);
@@ -218,73 +216,73 @@
218 216 l.__e(n4, u5);
219 217 }
220 218 i6.base = i6.__P = null;
221 219 }
222 - if (i6 = n3.__k) for (o4 = 0; o4 < i6.length; o4++) i6[o4] && V(i6[o4], u5, t5 || "function" != typeof n3.type);
223 - t5 || w(n3.__e), n3.__c = n3.__ = n3.__e = n3.__d = void 0;
220 + if (i6 = n3.__k) for (r5 = 0; r5 < i6.length; r5++) i6[r5] && K(i6[r5], u5, t5 || "function" != typeof n3.type);
221 + t5 || b(n3.__e), n3.__c = n3.__ = n3.__e = void 0;
224 222 }
225 -function q(n3, l6, u5) {
223 +function Q(n3, l6, u5) {
226 224 return this.constructor(n3, u5);
227 225 }
228 -function B(u5, t5, i6) {
229 - var o4, r5, f5, e4;
230 - l.__ && l.__(u5, t5), r5 = (o4 = "function" == typeof i6) ? null : i6 && i6.__k || t5.__k, f5 = [], e4 = [], O(t5, u5 = (!o4 && i6 || t5).__k = _(b, null, [u5]), r5 || h, h, t5.namespaceURI, !o4 && i6 ? [i6] : r5 ? null : t5.firstChild ? n.call(t5.childNodes) : null, f5, !o4 && i6 ? i6 : r5 ? r5.__e : t5.firstChild, o4, e4), j(f5, u5, e4);
226 +function R(u5, t5, i6) {
227 + var r5, o4, e4, f5;
228 + t5 == document && (t5 = document.documentElement), l.__ && l.__(u5, t5), o4 = (r5 = "function" == typeof i6) ? null : i6 && i6.__k || t5.__k, e4 = [], f5 = [], q(t5, u5 = (!r5 && i6 || t5).__k = k(S, null, [u5]), o4 || d, d, t5.namespaceURI, !r5 && i6 ? [i6] : o4 ? null : t5.firstChild ? n.call(t5.childNodes) : null, e4, !r5 && i6 ? i6 : o4 ? o4.__e : t5.firstChild, r5, f5), D(e4, u5, f5);
231 229 }
232 -function D(n3, l6) {
233 - B(n3, l6, D);
230 +function U(n3, l6) {
231 + R(n3, l6, U);
234 232 }
235 -function E(l6, u5, t5) {
236 - var i6, o4, r5, f5, e4 = d({}, l6.props);
237 - for (r5 in l6.type && l6.type.defaultProps && (f5 = l6.type.defaultProps), u5) "key" == r5 ? i6 = u5[r5] : "ref" == r5 ? o4 = u5[r5] : e4[r5] = void 0 === u5[r5] && void 0 !== f5 ? f5[r5] : u5[r5];
238 - return arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t5), g(l6.type, e4, i6 || l6.key, o4 || l6.ref, null);
233 +function W(l6, u5, t5) {
234 + var i6, r5, o4, e4, f5 = m({}, l6.props);
235 + for (o4 in l6.type && l6.type.defaultProps && (e4 = l6.type.defaultProps), u5) "key" == o4 ? i6 = u5[o4] : "ref" == o4 ? r5 = u5[o4] : f5[o4] = void 0 === u5[o4] && null != e4 ? e4[o4] : u5[o4];
236 + return arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : t5), x(l6.type, f5, i6 || l6.key, r5 || l6.ref, null);
239 237 }
240 -function G(n3, l6) {
241 - var u5 = { __c: l6 = "__cC" + a++, __: n3, Consumer: function(n4, l7) {
242 - return n4.children(l7);
243 - }, Provider: function(n4) {
244 - var u6, t5;
245 - return this.getChildContext || (u6 = [], (t5 = {})[l6] = this, this.getChildContext = function() {
238 +function X(n3) {
239 + function l6(n4) {
240 + var u5, t5;
241 + return this.getChildContext || (u5 = /* @__PURE__ */ new Set(), (t5 = {})[l6.__c] = this, this.getChildContext = function() {
246 242 return t5;
247 243 }, this.componentWillUnmount = function() {
248 - u6 = null;
244 + u5 = null;
249 245 }, this.shouldComponentUpdate = function(n5) {
250 - this.props.value !== n5.value && u6.some(function(n6) {
251 - n6.__e = true, M(n6);
246 + this.props.value != n5.value && u5.forEach(function(n6) {
247 + n6.__e = true, A(n6);
252 248 });
253 249 }, this.sub = function(n5) {
254 - u6.push(n5);
250 + u5.add(n5);
255 251 var l7 = n5.componentWillUnmount;
256 252 n5.componentWillUnmount = function() {
257 - u6 && u6.splice(u6.indexOf(n5), 1), l7 && l7.call(n5);
253 + u5 && u5.delete(n5), l7 && l7.call(n5);
258 254 };
259 255 }), n4.children;
260 - } };
261 - return u5.Provider.__ = u5.Consumer.contextType = u5;
256 + }
257 + return l6.__c = "__cC" + y++, l6.__ = n3, l6.Provider = l6.__l = (l6.Consumer = function(n4, l7) {
258 + return n4.children(l7);
259 + }).contextType = l6, l6;
262 260 }
263 -var n, l, u, t, i, o, r, f, e, c, s, a, h, v, p, y;
261 +var n, l, u, t, i, r, o, e, f, c, s, a, h, p, v, y, d, w, _, g;
264 262 var init_preact_module = __esm({
265 263 "node_modules/preact/dist/preact.module.js"() {
266 - h = {};
267 - v = [];
268 - p = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
269 - y = Array.isArray;
270 - n = v.slice, l = { __e: function(n3, l6, u5, t5) {
271 - for (var i6, o4, r5; l6 = l6.__; ) if ((i6 = l6.__c) && !i6.__) try {
272 - if ((o4 = i6.constructor) && null != o4.getDerivedStateFromError && (i6.setState(o4.getDerivedStateFromError(n3)), r5 = i6.__d), null != i6.componentDidCatch && (i6.componentDidCatch(n3, t5 || {}), r5 = i6.__d), r5) return i6.__E = i6;
264 + d = {};
265 + w = [];
266 + _ = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
267 + g = Array.isArray;
268 + n = w.slice, l = { __e: function(n3, l6, u5, t5) {
269 + for (var i6, r5, o4; l6 = l6.__; ) if ((i6 = l6.__c) && !i6.__) try {
270 + if ((r5 = i6.constructor) && null != r5.getDerivedStateFromError && (i6.setState(r5.getDerivedStateFromError(n3)), o4 = i6.__d), null != i6.componentDidCatch && (i6.componentDidCatch(n3, t5 || {}), o4 = i6.__d), o4) return i6.__E = i6;
273 271 } catch (l7) {
274 272 n3 = l7;
275 273 }
276 274 throw n3;
277 275 } }, u = 0, t = function(n3) {
278 - return null != n3 && null == n3.constructor;
279 - }, k.prototype.setState = function(n3, l6) {
276 + return null != n3 && void 0 === n3.constructor;
277 + }, C.prototype.setState = function(n3, l6) {
280 278 var u5;
281 - u5 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = d({}, this.state), "function" == typeof n3 && (n3 = n3(d({}, u5), this.props)), n3 && d(u5, n3), null != n3 && this.__v && (l6 && this._sb.push(l6), M(this));
282 - }, k.prototype.forceUpdate = function(n3) {
283 - this.__v && (this.__e = true, n3 && this.__h.push(n3), M(this));
284 - }, k.prototype.render = b, i = [], r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f = function(n3, l6) {
279 + u5 = null != this.__s && this.__s != this.state ? this.__s : this.__s = m({}, this.state), "function" == typeof n3 && (n3 = n3(m({}, u5), this.props)), n3 && m(u5, n3), null != n3 && this.__v && (l6 && this._sb.push(l6), A(this));
280 + }, C.prototype.forceUpdate = function(n3) {
281 + this.__v && (this.__e = true, n3 && this.__h.push(n3), A(this));
282 + }, C.prototype.render = S, i = [], o = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, e = function(n3, l6) {
285 283 return n3.__v.__b - l6.__v.__b;
286 - }, P.__r = 0, e = 0, c = F(false), s = F(true), a = 0;
284 + }, H.__r = 0, f = Math.random().toString(8), c = "__d" + f, s = "__a" + f, a = /(PointerCapture)$|Capture$/i, h = 0, p = V(false), v = V(true), y = 0;
287 285 }
288 286 });
289 287
290 288 // node_modules/preact/devtools/dist/devtools.module.js
@@ -291,9 +289,9 @@
291 289 var i4;
292 290 var init_devtools_module = __esm({
293 291 "node_modules/preact/devtools/dist/devtools.module.js"() {
294 292 init_preact_module();
295 - null != (i4 = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : void 0) && i4.__PREACT_DEVTOOLS__ && i4.__PREACT_DEVTOOLS__.attachPreact("10.24.2", l, { Fragment: b, Component: k });
293 + null != (i4 = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : void 0) && i4.__PREACT_DEVTOOLS__ && i4.__PREACT_DEVTOOLS__.attachPreact("10.29.1", l, { Fragment: S, Component: C });
296 294 }
297 295 });
298 296
299 297 // node_modules/preact/debug/dist/debug.module.js
@@ -298,8 +296,11 @@
298 296
299 297 // node_modules/preact/debug/dist/debug.module.js
300 298 var debug_module_exports = {};
301 299 __export(debug_module_exports, {
300 + getCurrentVNode: () => c4,
301 + getDisplayName: () => a4,
302 + getOwnerStack: () => f4,
302 303 resetPropWarnings: () => r4
303 304 });
304 305 function r4() {
305 306 t4 = {};
@@ -304,15 +305,15 @@
304 305 function r4() {
305 306 t4 = {};
306 307 }
307 308 function a4(e4) {
308 - return e4.type === b ? "Fragment" : "function" == typeof e4.type ? e4.type.displayName || e4.type.name : "string" == typeof e4.type ? e4.type : "#text";
309 + return e4.type === S ? "Fragment" : "function" == typeof e4.type ? e4.type.displayName || e4.type.name : "string" == typeof e4.type ? e4.type : "#text";
309 310 }
310 311 function c4() {
311 312 return i5.length > 0 ? i5[i5.length - 1] : null;
312 313 }
313 314 function u4(e4) {
314 - return "function" == typeof e4.type && e4.type != b;
315 + return "function" == typeof e4.type && e4.type != S;
315 316 }
316 317 function f4(n3) {
317 318 for (var e4 = [n3], o4 = n3; null != o4.__o; ) e4.push(o4.__o), o4 = o4.__o;
318 319 return e4.reduce(function(n4, e5) {
@@ -341,9 +342,9 @@
341 342 }
342 343 var s6 = e4.children;
343 344 return "<" + o4 + t5 + (s6 && s6.length ? ">..</" + o4 + ">" : " />");
344 345 }
345 -var t4, i5, s5, l5, d5, v5, m2, b3;
346 +var t4, i5, s5, l5, d5, v5, m3, b3;
346 347 var init_debug_module = __esm({
347 348 "node_modules/preact/debug/dist/debug.module.js"() {
348 349 init_preact_module();
349 350 init_devtools_module();
@@ -351,15 +352,15 @@
351 352 i5 = [];
352 353 s5 = [];
353 354 l5 = true;
354 355 d5 = "function" == typeof WeakMap;
355 - v5 = k.prototype.setState;
356 - k.prototype.setState = function(n3, e4) {
356 + v5 = C.prototype.setState;
357 + C.prototype.setState = function(n3, e4) {
357 358 return null == this.__v && null == this.state && console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n' + f4(c4())), v5.call(this, n3, e4);
358 359 };
359 - m2 = /^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/;
360 - b3 = k.prototype.forceUpdate;
361 - k.prototype.forceUpdate = function(n3) {
360 + m3 = /^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/;
361 + b3 = C.prototype.forceUpdate;
362 + C.prototype.forceUpdate = function(n3) {
362 363 return null == this.__v ? console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n' + f4(c4())) : null == this.__P && console.warn(`Can't call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
363 364
364 365 ` + f4(this.__v)), b3.call(this, n3);
365 366 }, l.__m = function(n3, e4) {
@@ -365,9 +366,11 @@
365 366 }, l.__m = function(n3, e4) {
366 367 var o4 = n3.type, t5 = e4.map(function(n4) {
367 368 return n4 && n4.localName;
368 369 }).filter(Boolean);
369 - console.error("Expected a DOM node of type " + o4 + " but found " + t5.join(", ") + "as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n" + f4(n3));
370 + console.error('Expected a DOM node of type "' + o4 + '" but found "' + t5.join(", ") + `" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.
371 +
372 +` + f4(n3));
370 373 }, (function() {
371 374 !(function() {
372 375 var n4 = l.__b, o5 = l.diffed, t5 = l.__, r6 = l.vnode, a5 = l.__r;
373 376 l.diffed = function(n5) {
@@ -475,9 +478,9 @@
475 478 }, set: function() {
476 479 var o5 = "set" + n4 + e4;
477 480 k3 && k3.indexOf(o5) < 0 && (k3.push(o5), console.warn("setting vnode." + n4 + " is not allowed, " + e4));
478 481 } };
479 - }, I2 = { nodeName: O2("nodeName", "use vnode.type"), attributes: O2("attributes", "use vnode.props"), children: O2("children", "use vnode.props.children") }, M2 = Object.create({}, I2);
482 + }, I2 = { nodeName: O2("nodeName", "use vnode.type"), attributes: O2("attributes", "use vnode.props"), children: O2("children", "use vnode.props.children") }, M = Object.create({}, I2);
480 483 l.vnode = function(n4) {
481 484 var e4 = n4.props;
482 485 if (null !== n4.type && null != e4 && ("__source" in e4 || "__self" in e4)) {
483 486 var o5 = n4.props = {};
@@ -485,9 +488,9 @@
485 488 var r6 = e4[t5];
486 489 "__source" === t5 ? n4.__source = r6 : "__self" === t5 ? n4.__self = r6 : o5[t5] = r6;
487 490 }
488 491 }
489 - n4.__proto__ = M2, c5 && c5(n4);
492 + n4.__proto__ = M, c5 && c5(n4);
490 493 }, l.diffed = function(e4) {
491 494 var o5, t5 = e4.type, i6 = e4.__;
492 495 if (e4.__k && e4.__k.forEach(function(n4) {
493 496 if ("object" == typeof n4 && n4 && void 0 === n4.type) {
@@ -495,14 +498,14 @@
495 498 throw new Error("Objects are not valid as a child. Encountered an object with the keys {" + o6 + "}.\n\n" + f4(e4));
496 499 }
497 500 }), e4.__c === T3 && (_5 = 0), "string" == typeof t5 && (y4(t5) || "p" === t5 || "a" === t5 || "button" === t5)) {
498 501 var s6 = h4(i6);
499 - if ("" !== s6 && y4(t5)) "table" === t5 && "td" !== s6 && y4(s6) ? (console.log(s6, i6.__e), console.error("Improper nesting of table. Your <table> should not have a table-node parent." + w4(e4) + "\n\n" + f4(e4))) : "thead" !== t5 && "tfoot" !== t5 && "tbody" !== t5 || "table" === s6 ? "tr" === t5 && "thead" !== s6 && "tfoot" !== s6 && "tbody" !== s6 ? console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent." + w4(e4) + "\n\n" + f4(e4)) : "td" === t5 && "tr" !== s6 ? console.error("Improper nesting of table. Your <td> should have a <tr> parent." + w4(e4) + "\n\n" + f4(e4)) : "th" === t5 && "tr" !== s6 && console.error("Improper nesting of table. Your <th> should have a <tr>." + w4(e4) + "\n\n" + f4(e4)) : console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent." + w4(e4) + "\n\n" + f4(e4));
502 + if ("" !== s6 && y4(t5)) "table" === t5 && "td" !== s6 && y4(s6) ? console.error("Improper nesting of table. Your <table> should not have a table-node parent." + w4(e4) + "\n\n" + f4(e4)) : "thead" !== t5 && "tfoot" !== t5 && "tbody" !== t5 || "table" === s6 ? "tr" === t5 && "thead" !== s6 && "tfoot" !== s6 && "tbody" !== s6 ? console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent." + w4(e4) + "\n\n" + f4(e4)) : "td" === t5 && "tr" !== s6 ? console.error("Improper nesting of table. Your <td> should have a <tr> parent." + w4(e4) + "\n\n" + f4(e4)) : "th" === t5 && "tr" !== s6 && console.error("Improper nesting of table. Your <th> should have a <tr>." + w4(e4) + "\n\n" + f4(e4)) : console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent." + w4(e4) + "\n\n" + f4(e4));
500 503 else if ("p" === t5) {
501 504 var c6 = p5(e4).filter(function(n4) {
502 - return m2.test(n4);
505 + return m3.test(n4);
503 506 });
504 - c6.length && console.error("Improper nesting of paragraph. Your <p> should not have " + c6.join(", ") + "as child-elements." + w4(e4) + "\n\n" + f4(e4));
507 + c6.length && console.error("Improper nesting of paragraph. Your <p> should not have " + c6.join(", ") + " as child-elements." + w4(e4) + "\n\n" + f4(e4));
505 508 } else "a" !== t5 && "button" !== t5 || -1 !== p5(e4).indexOf(t5) && console.error("Improper nesting of interactive content. Your <" + t5 + "> should not have other " + ("a" === t5 ? "anchor" : "button") + " tags as child-elements." + w4(e4) + "\n\n" + f4(e4));
506 509 }
507 510 if (n3 = false, r5 && r5(e4), null != e4.__k) for (var l7 = [], u5 = 0; u5 < e4.__k.length; u5++) {
508 511 var d6 = e4.__k[u5];
@@ -521,9 +524,9 @@
521 524 var E4 = b5[g4];
522 525 if (E4.__H) {
523 526 for (var k4 = 0; k4 < E4.__H.length; k4++) if ((o5 = E4.__H[k4]) != o5) {
524 527 var O3 = a4(e4);
525 - throw new Error("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index " + g4 + " in component " + O3 + " was called with NaN.");
528 + console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index " + g4 + " in component " + O3 + " was called with NaN.");
526 529 }
527 530 }
528 531 }
529 532 }
@@ -550,41 +553,41 @@
550 553 var e2 = c2.__b;
551 554 var a2 = c2.__r;
552 555 var v2 = c2.diffed;
553 556 var l2 = c2.__c;
554 -var m = c2.unmount;
557 +var m2 = c2.unmount;
555 558 var s2 = c2.__;
556 -function d2(n3, t5) {
559 +function p2(n3, t5) {
557 560 c2.__h && c2.__h(r2, n3, o2 || t5), o2 = 0;
558 561 var u5 = r2.__H || (r2.__H = { __: [], __h: [] });
559 562 return n3 >= u5.__.length && u5.__.push({}), u5.__[n3];
560 563 }
561 -function h2(n3) {
562 - return o2 = 1, p2(D2, n3);
564 +function d2(n3) {
565 + return o2 = 1, h2(D2, n3);
563 566 }
564 -function p2(n3, u5, i6) {
565 - var o4 = d2(t2++, 2);
567 +function h2(n3, u5, i6) {
568 + var o4 = p2(t2++, 2);
566 569 if (o4.t = n3, !o4.__c && (o4.__ = [i6 ? i6(u5) : D2(void 0, u5), function(n4) {
567 570 var t5 = o4.__N ? o4.__N[0] : o4.__[0], r5 = o4.t(t5, n4);
568 571 t5 !== r5 && (o4.__N = [r5, o4.__[1]], o4.__c.setState({}));
569 - }], o4.__c = r2, !r2.u)) {
572 + }], o4.__c = r2, !r2.__f)) {
570 573 var f5 = function(n4, t5, r5) {
571 574 if (!o4.__c.__H) return true;
572 575 var u6 = o4.__c.__H.__.filter(function(n5) {
573 - return !!n5.__c;
576 + return n5.__c;
574 577 });
575 578 if (u6.every(function(n5) {
576 579 return !n5.__N;
577 580 })) return !c5 || c5.call(this, n4, t5, r5);
578 - var i7 = false;
579 - return u6.forEach(function(n5) {
581 + var i7 = o4.__c.props !== n4;
582 + return u6.some(function(n5) {
580 583 if (n5.__N) {
581 584 var t6 = n5.__[0];
582 585 n5.__ = n5.__N, n5.__N = void 0, t6 !== n5.__[0] && (i7 = true);
583 586 }
584 - }), !(!i7 && o4.__c.props === n4) && (!c5 || c5.call(this, n4, t5, r5));
587 + }), c5 && c5.call(this, n4, t5, r5) || i7;
585 588 };
586 - r2.u = true;
589 + r2.__f = true;
587 590 var c5 = r2.shouldComponentUpdate, e4 = r2.componentWillUpdate;
588 591 r2.componentWillUpdate = function(n4, t5, r5) {
589 592 if (this.__e) {
590 593 var u6 = c5;
@@ -595,14 +598,14 @@
595 598 }
596 599 return o4.__N || o4.__;
597 600 }
598 601 function y2(n3, u5) {
599 - var i6 = d2(t2++, 3);
600 - !c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.i = u5, r2.__H.__h.push(i6));
602 + var i6 = p2(t2++, 3);
603 + !c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.u = u5, r2.__H.__h.push(i6));
601 604 }
602 605 function _2(n3, u5) {
603 - var i6 = d2(t2++, 4);
604 - !c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.i = u5, r2.__h.push(i6));
606 + var i6 = p2(t2++, 4);
607 + !c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.u = u5, r2.__h.push(i6));
605 608 }
606 609 function A2(n3) {
607 610 return o2 = 5, T2(function() {
608 611 return { current: n3 };
@@ -608,9 +611,9 @@
608 611 return { current: n3 };
609 612 }, []);
610 613 }
611 614 function T2(n3, r5) {
612 - var u5 = d2(t2++, 7);
615 + var u5 = p2(t2++, 7);
613 616 return C2(u5.__H, r5) && (u5.__ = n3(), u5.__H = r5, u5.__h = n3), u5.__;
614 617 }
615 618 function q2(n3, t5) {
616 619 return o2 = 8, T2(function() {
@@ -617,16 +620,19 @@
617 620 return n3;
618 621 }, t5);
619 622 }
620 623 function x2(n3) {
621 - var u5 = r2.context[n3.__c], i6 = d2(t2++, 9);
624 + var u5 = r2.context[n3.__c], i6 = p2(t2++, 9);
622 625 return i6.c = n3, u5 ? (null == i6.__ && (i6.__ = true, u5.sub(r2)), u5.props.value) : n3.__;
623 626 }
624 627 function j2() {
625 - for (var n3; n3 = f2.shift(); ) if (n3.__P && n3.__H) try {
626 - n3.__H.__h.forEach(z2), n3.__H.__h.forEach(B2), n3.__H.__h = [];
627 - } catch (t5) {
628 - n3.__H.__h = [], c2.__e(t5, n3.__v);
628 + for (var n3; n3 = f2.shift(); ) {
629 + var t5 = n3.__H;
630 + if (n3.__P && t5) try {
631 + t5.__h.some(z2), t5.__h.some(B2), t5.__h = [];
632 + } catch (r5) {
633 + t5.__h = [], c2.__e(r5, n3.__v);
634 + }
629 635 }
630 636 }
631 637 c2.__b = function(n3) {
632 638 r2 = null, e2 && e2(n3);
@@ -634,21 +640,21 @@
634 640 n3 && t5.__k && t5.__k.__m && (n3.__m = t5.__k.__m), s2 && s2(n3, t5);
635 641 }, c2.__r = function(n3) {
636 642 a2 && a2(n3), t2 = 0;
637 643 var i6 = (r2 = n3.__c).__H;
638 - i6 && (u2 === r2 ? (i6.__h = [], r2.__h = [], i6.__.forEach(function(n4) {
639 - n4.__N && (n4.__ = n4.__N), n4.i = n4.__N = void 0;
640 - })) : (i6.__h.forEach(z2), i6.__h.forEach(B2), i6.__h = [], t2 = 0)), u2 = r2;
644 + i6 && (u2 === r2 ? (i6.__h = [], r2.__h = [], i6.__.some(function(n4) {
645 + n4.__N && (n4.__ = n4.__N), n4.u = n4.__N = void 0;
646 + })) : (i6.__h.some(z2), i6.__h.some(B2), i6.__h = [], t2 = 0)), u2 = r2;
641 647 }, c2.diffed = function(n3) {
642 648 v2 && v2(n3);
643 649 var t5 = n3.__c;
644 - t5 && t5.__H && (t5.__H.__h.length && (1 !== f2.push(t5) && i2 === c2.requestAnimationFrame || ((i2 = c2.requestAnimationFrame) || w2)(j2)), t5.__H.__.forEach(function(n4) {
645 - n4.i && (n4.__H = n4.i), n4.i = void 0;
650 + t5 && t5.__H && (t5.__H.__h.length && (1 !== f2.push(t5) && i2 === c2.requestAnimationFrame || ((i2 = c2.requestAnimationFrame) || w2)(j2)), t5.__H.__.some(function(n4) {
651 + n4.u && (n4.__H = n4.u), n4.u = void 0;
646 652 })), u2 = r2 = null;
647 653 }, c2.__c = function(n3, t5) {
648 654 t5.some(function(n4) {
649 655 try {
650 - n4.__h.forEach(z2), n4.__h = n4.__h.filter(function(n5) {
656 + n4.__h.some(z2), n4.__h = n4.__h.filter(function(n5) {
651 657 return !n5.__ || B2(n5);
652 658 });
653 659 } catch (r5) {
654 660 t5.some(function(n5) {
@@ -656,11 +662,11 @@
656 662 }), t5 = [], c2.__e(r5, n4.__v);
657 663 }
658 664 }), l2 && l2(n3, t5);
659 665 }, c2.unmount = function(n3) {
660 - m && m(n3);
666 + m2 && m2(n3);
661 667 var t5, r5 = n3.__c;
662 - r5 && r5.__H && (r5.__H.__.forEach(function(n4) {
668 + r5 && r5.__H && (r5.__H.__.some(function(n4) {
663 669 try {
664 670 z2(n4);
665 671 } catch (n5) {
666 672 t5 = n5;
@@ -670,9 +676,9 @@
670 676 var k2 = "function" == typeof requestAnimationFrame;
671 677 function w2(n3) {
672 678 var t5, r5 = function() {
673 679 clearTimeout(u5), k2 && cancelAnimationFrame(t5), setTimeout(n3);
674 - }, u5 = setTimeout(r5, 100);
680 + }, u5 = setTimeout(r5, 35);
675 681 k2 && (t5 = requestAnimationFrame(r5));
676 682 }
677 683 function z2(n3) {
678 684 var t5 = r2, u5 = n3.__c;
@@ -1177,9 +1183,9 @@
1177 1183 l4("__h", function(n3, r5, i6, t5) {
1178 1184 if (t5 < 3 || 9 === t5) r5.__$f |= 2;
1179 1185 n3(r5, i6, t5);
1180 1186 });
1181 -k.prototype.shouldComponentUpdate = function(n3, r5) {
1187 +C.prototype.shouldComponentUpdate = function(n3, r5) {
1182 1188 var i6 = this.__$u;
1183 1189 if (!(i6 && void 0 !== i6.s || 4 & this.__$f)) return true;
1184 1190 if (3 & this.__$f) return true;
1185 1191 for (var t5 in r5) return true;
@@ -1192,11 +1198,38 @@
1192 1198 return d3(n3);
1193 1199 }, []);
1194 1200 }
1195 1201
1196 -// packages/interactivity/build-module/directives.mjs
1202 +// packages/interactivity/build-module/hooks.mjs
1197 1203 init_preact_module();
1198 1204
1205 +// packages/interactivity/build-module/proxies/registry.mjs
1206 +var objToProxy = /* @__PURE__ */ new WeakMap();
1207 +var proxyToObj = /* @__PURE__ */ new WeakMap();
1208 +var proxyToNs = /* @__PURE__ */ new WeakMap();
1209 +var supported = /* @__PURE__ */ new Set([Object, Array]);
1210 +var createProxy = (namespace, obj, handlers) => {
1211 + if (!shouldProxy(obj)) {
1212 + throw Error("This object cannot be proxified.");
1213 + }
1214 + if (!objToProxy.has(obj)) {
1215 + const proxy = new Proxy(obj, handlers);
1216 + objToProxy.set(obj, proxy);
1217 + proxyToObj.set(proxy, obj);
1218 + proxyToNs.set(proxy, namespace);
1219 + }
1220 + return objToProxy.get(obj);
1221 +};
1222 +var getProxyFromObject = (obj) => objToProxy.get(obj);
1223 +var getNamespaceFromProxy = (proxy) => proxyToNs.get(proxy);
1224 +var shouldProxy = (candidate) => {
1225 + if (typeof candidate !== "object" || candidate === null) {
1226 + return false;
1227 + }
1228 + return !proxyToNs.has(candidate) && supported.has(candidate.constructor);
1229 +};
1230 +var getObjectFromProxy = (proxy) => proxyToObj.get(proxy);
1231 +
1199 1232 // packages/interactivity/build-module/namespaces.mjs
1200 1233 var namespaceStack = [];
1201 1234 var getNamespace = () => namespaceStack.slice(-1)[0];
1202 1235 var setNamespace = (namespace) => {
@@ -1205,61 +1238,8 @@
1205 1238 var resetNamespace = () => {
1206 1239 namespaceStack.pop();
1207 1240 };
1208 1241
1209 -// packages/interactivity/build-module/scopes.mjs
1210 -var scopeStack = [];
1211 -var getScope = () => scopeStack.slice(-1)[0];
1212 -var setScope = (scope) => {
1213 - scopeStack.push(scope);
1214 -};
1215 -var resetScope = () => {
1216 - scopeStack.pop();
1217 -};
1218 -var throwNotInScope = (method) => {
1219 - throw Error(
1220 - `Cannot call \`${method}()\` when there is no scope. If you are using an async function, please consider using a generator instead. If you are using some sort of async callbacks, like \`setTimeout\`, please wrap the callback with \`withScope(callback)\`.`
1221 - );
1222 -};
1223 -var getContext = (namespace) => {
1224 - const scope = getScope();
1225 - if (true) {
1226 - if (!scope) {
1227 - throwNotInScope("getContext");
1228 - }
1229 - }
1230 - return scope.context[namespace || getNamespace()];
1231 -};
1232 -var getElement = () => {
1233 - const scope = getScope();
1234 - let deepReadOnlyOptions = {};
1235 - if (true) {
1236 - if (!scope) {
1237 - throwNotInScope("getElement");
1238 - }
1239 - deepReadOnlyOptions = {
1240 - errorMessage: "Don't mutate the attributes from `getElement`, use `data-wp-bind` to modify the attributes of an element instead."
1241 - };
1242 - }
1243 - const { ref, attributes } = scope;
1244 - return Object.freeze({
1245 - ref: ref.current,
1246 - attributes: deepReadOnly(attributes, deepReadOnlyOptions)
1247 - });
1248 -};
1249 -var navigationContextSignal = d3(0);
1250 -function getServerContext(namespace) {
1251 - const scope = getScope();
1252 - if (true) {
1253 - if (!scope) {
1254 - throwNotInScope("getServerContext");
1255 - }
1256 - }
1257 - getServerContext.subscribe = navigationContextSignal.value;
1258 - return deepClone(scope.serverContext[namespace || getNamespace()]);
1259 -}
1260 -getServerContext.subscribe = 0;
1261 -
1262 1242 // packages/interactivity/build-module/utils.mjs
1263 1243 var afterNextFrame = (callback) => {
1264 1244 return new Promise((resolve2) => {
1265 1245 const done = () => {
@@ -1480,37 +1460,60 @@
1480 1460 }
1481 1461 return source;
1482 1462 }
1483 1463
1484 -// packages/interactivity/build-module/hooks.mjs
1485 -init_preact_module();
1486 -
1487 -// packages/interactivity/build-module/proxies/registry.mjs
1488 -var objToProxy = /* @__PURE__ */ new WeakMap();
1489 -var proxyToObj = /* @__PURE__ */ new WeakMap();
1490 -var proxyToNs = /* @__PURE__ */ new WeakMap();
1491 -var supported = /* @__PURE__ */ new Set([Object, Array]);
1492 -var createProxy = (namespace, obj, handlers) => {
1493 - if (!shouldProxy(obj)) {
1494 - throw Error("This object cannot be proxified.");
1464 +// packages/interactivity/build-module/scopes.mjs
1465 +var scopeStack = [];
1466 +var getScope = () => scopeStack.slice(-1)[0];
1467 +var setScope = (scope) => {
1468 + scopeStack.push(scope);
1469 +};
1470 +var resetScope = () => {
1471 + scopeStack.pop();
1472 +};
1473 +var throwNotInScope = (method) => {
1474 + throw Error(
1475 + `Cannot call \`${method}()\` when there is no scope. If you are using an async function, please consider using a generator instead. If you are using some sort of async callbacks, like \`setTimeout\`, please wrap the callback with \`withScope(callback)\`.`
1476 + );
1477 +};
1478 +var getContext = (namespace) => {
1479 + const scope = getScope();
1480 + if (true) {
1481 + if (!scope) {
1482 + throwNotInScope("getContext");
1483 + }
1495 1484 }
1496 - if (!objToProxy.has(obj)) {
1497 - const proxy = new Proxy(obj, handlers);
1498 - objToProxy.set(obj, proxy);
1499 - proxyToObj.set(proxy, obj);
1500 - proxyToNs.set(proxy, namespace);
1485 + return scope.context[namespace || getNamespace()];
1486 +};
1487 +var getElement = () => {
1488 + const scope = getScope();
1489 + let deepReadOnlyOptions = {};
1490 + if (true) {
1491 + if (!scope) {
1492 + throwNotInScope("getElement");
1493 + }
1494 + deepReadOnlyOptions = {
1495 + errorMessage: "Don't mutate the attributes from `getElement`, use `data-wp-bind` to modify the attributes of an element instead."
1496 + };
1501 1497 }
1502 - return objToProxy.get(obj);
1498 + const { ref, attributes } = scope;
1499 + return Object.freeze({
1500 + ref: ref.current,
1501 + attributes: deepReadOnly(attributes, deepReadOnlyOptions)
1502 + });
1503 1503 };
1504 -var getProxyFromObject = (obj) => objToProxy.get(obj);
1505 -var getNamespaceFromProxy = (proxy) => proxyToNs.get(proxy);
1506 -var shouldProxy = (candidate) => {
1507 - if (typeof candidate !== "object" || candidate === null) {
1508 - return false;
1504 +var navigationContextSignal = d3(0);
1505 +function getServerContext(namespace) {
1506 + const scope = getScope();
1507 + if (true) {
1508 + if (!scope) {
1509 + throwNotInScope("getServerContext");
1510 + }
1509 1511 }
1510 - return !proxyToNs.has(candidate) && supported.has(candidate.constructor);
1511 -};
1512 -var getObjectFromProxy = (proxy) => proxyToObj.get(proxy);
1512 + getServerContext.subscribe = navigationContextSignal.value;
1513 + return deepClone(scope.serverContext[namespace || getNamespace()]);
1514 +}
1515 +getServerContext.subscribe = 0;
1513 1516
1514 1517 // packages/interactivity/build-module/proxies/signals.mjs
1515 1518 var NO_SCOPE = {};
1516 1519 var PropSignal = class {
@@ -1782,9 +1785,12 @@
1782 1785 propSignal.setPendingGetter(desc.get);
1783 1786 }
1784 1787 }
1785 1788 } else if (isPlainObject(source[key])) {
1786 - const targetValue = Object.getOwnPropertyDescriptor(target, key)?.value;
1789 + const targetValue = Object.getOwnPropertyDescriptor(
1790 + target,
1791 + key
1792 + )?.value;
1787 1793 if (isNew || override && !isPlainObject(targetValue)) {
1788 1794 target[key] = {};
1789 1795 if (propSignal) {
1790 1796 const ns = getNamespaceFromProxy(proxy);
@@ -2008,9 +2014,9 @@
2008 2014 }
2009 2015 function isDefaultDirectiveSuffix(entry) {
2010 2016 return entry.suffix === null;
2011 2017 }
2012 -var context = G({ client: {}, server: {} });
2018 +var context = X({ client: {}, server: {} });
2013 2019 var directiveCallbacks = {};
2014 2020 var directivePriorities = {};
2015 2021 var directive = (name, callback, { priority = 10 } = {}) => {
2016 2022 directiveCallbacks[name] = callback;
@@ -2105,11 +2111,11 @@
2105 2111 const { client, server } = x2(context);
2106 2112 scope.context = client;
2107 2113 scope.serverContext = server;
2108 2114 scope.ref = previousScope?.ref || A2(null);
2109 - element = E(element, { ref: scope.ref });
2115 + element = W(element, { ref: scope.ref });
2110 2116 scope.attributes = element.props;
2111 - const children = nextPriorityLevels.length > 0 ? _(Directives, {
2117 + const children = nextPriorityLevels.length > 0 ? k(Directives, {
2112 2118 directives,
2113 2119 priorityLevels: nextPriorityLevels,
2114 2120 element,
2115 2121 originalProps,
@@ -2148,9 +2154,9 @@
2148 2154 directives,
2149 2155 priorityLevels,
2150 2156 originalProps: props,
2151 2157 type: vnode.type,
2152 - element: _(vnode.type, props),
2158 + element: k(vnode.type, props),
2153 2159 top: true
2154 2160 };
2155 2161 vnode.type = Directives;
2156 2162 }
@@ -2159,9 +2165,9 @@
2159 2165 old(vnode);
2160 2166 }
2161 2167 };
2162 2168
2163 -// packages/interactivity/build-module/directives.mjs
2169 +// packages/interactivity/build-module/directives/utils/warnings.mjs
2164 2170 var warnUniqueIdWithTwoHyphens = (prefix, suffix, uniqueId) => {
2165 2171 if (true) {
2166 2172 warn(
2167 2173 `The usage of data-wp-${prefix}--${suffix}${uniqueId ? `--${uniqueId}` : ""} (two hyphens for unique ID) is deprecated and will stop working in WordPress 7.1. Please use data-wp-${prefix}${uniqueId ? `--${suffix}---${uniqueId}` : `---${suffix}`} (three hyphens for unique ID) from now on.`
@@ -2181,8 +2187,351 @@
2181 2187 `The usage of data-wp-${wrongPrefix} is deprecated and will stop working in WordPress 7.0. Please, use data-wp-${rightPrefix} with the withSyncEvent() helper from now on.`
2182 2188 );
2183 2189 }
2184 2190 };
2191 +
2192 +// packages/interactivity/build-module/directives/bind.mjs
2193 +directive("bind", ({ directives: { bind }, element, evaluate }) => {
2194 + bind.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2195 + if (entry.uniqueId) {
2196 + if (true) {
2197 + warnUniqueIdNotSupported("bind", entry.uniqueId);
2198 + }
2199 + return;
2200 + }
2201 + const attribute = entry.suffix;
2202 + let result = evaluate(entry);
2203 + if (result === PENDING_GETTER) {
2204 + return;
2205 + }
2206 + if (typeof result === "function") {
2207 + result = result();
2208 + }
2209 + element.props[attribute] = result;
2210 + useInit(() => {
2211 + const el = element.ref.current;
2212 + if (attribute === "style") {
2213 + if (typeof result === "string") {
2214 + el.style.cssText = result;
2215 + }
2216 + return;
2217 + } else if (attribute !== "width" && attribute !== "height" && attribute !== "href" && attribute !== "list" && attribute !== "form" && /*
2218 + * The value for `tabindex` follows the parsing rules for an
2219 + * integer. If that fails, or if the attribute isn't present, then
2220 + * the browsers should "follow platform conventions to determine if
2221 + * the element should be considered as a focusable area",
2222 + * practically meaning that most elements get a default of `-1` (not
2223 + * focusable), but several also get a default of `0` (focusable in
2224 + * order after all elements with a positive `tabindex` value).
2225 + *
2226 + * @see https://html.spec.whatwg.org/#tabindex-value
2227 + */
2228 + attribute !== "tabIndex" && attribute !== "download" && attribute !== "rowSpan" && attribute !== "colSpan" && attribute !== "role" && attribute !== "popover" && attribute in el) {
2229 + try {
2230 + el[attribute] = result === null || result === void 0 ? "" : result;
2231 + return;
2232 + } catch {
2233 + }
2234 + }
2235 + if (result !== null && result !== void 0 && (result !== false || attribute[4] === "-")) {
2236 + el.setAttribute(
2237 + attribute,
2238 + attribute === "popover" && result === true ? "" : result
2239 + );
2240 + } else {
2241 + el.removeAttribute(attribute);
2242 + }
2243 + });
2244 + });
2245 +});
2246 +
2247 +// packages/interactivity/build-module/directives/class.mjs
2248 +directive(
2249 + "class",
2250 + ({ directives: { class: classNames }, element, evaluate }) => {
2251 + classNames.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2252 + const className = entry.uniqueId ? `${entry.suffix}---${entry.uniqueId}` : entry.suffix;
2253 + let result = evaluate(entry);
2254 + if (result === PENDING_GETTER) {
2255 + return;
2256 + }
2257 + if (typeof result === "function") {
2258 + result = result();
2259 + }
2260 + const currentClass = element.props.class || "";
2261 + const classFinder = new RegExp(
2262 + `(^|\\s)${className}(\\s|$)`,
2263 + "g"
2264 + );
2265 + if (!result) {
2266 + element.props.class = currentClass.replace(classFinder, " ").trim();
2267 + } else if (!classFinder.test(currentClass)) {
2268 + element.props.class = currentClass ? `${currentClass} ${className}` : className;
2269 + }
2270 + useInit(() => {
2271 + if (!result) {
2272 + element.ref.current.classList.remove(className);
2273 + } else {
2274 + element.ref.current.classList.add(className);
2275 + }
2276 + });
2277 + });
2278 + }
2279 +);
2280 +
2281 +// packages/interactivity/build-module/directives/context.mjs
2282 +init_preact_module();
2283 +directive(
2284 + "context",
2285 + ({
2286 + directives: { context: context2 },
2287 + props: { children },
2288 + context: inheritedContext
2289 + }) => {
2290 + const entries = context2.filter(isDefaultDirectiveSuffix).reverse();
2291 + if (!entries.length) {
2292 + if (true) {
2293 + warn(
2294 + "The usage of data-wp-context--unique-id (two hyphens) is not supported. To add a unique ID to the directive, please use data-wp-context---unique-id (three hyphens) instead."
2295 + );
2296 + }
2297 + return;
2298 + }
2299 + const { Provider } = inheritedContext;
2300 + const { client: inheritedClient, server: inheritedServer } = x2(inheritedContext);
2301 + const client = A2({});
2302 + const server = {};
2303 + const result = {
2304 + client: { ...inheritedClient },
2305 + server: { ...inheritedServer }
2306 + };
2307 + const namespaces2 = /* @__PURE__ */ new Set();
2308 + entries.forEach(({ value, namespace, uniqueId }) => {
2309 + if (!isPlainObject(value)) {
2310 + if (true) {
2311 + warn(
2312 + `The value of data-wp-context${uniqueId ? `---${uniqueId}` : ""} on the ${namespace} namespace must be a valid stringified JSON object.`
2313 + );
2314 + }
2315 + return;
2316 + }
2317 + if (!client.current[namespace]) {
2318 + client.current[namespace] = proxifyState(namespace, {});
2319 + }
2320 + deepMerge(client.current[namespace], deepClone(value), false);
2321 + server[namespace] = value;
2322 + namespaces2.add(namespace);
2323 + });
2324 + namespaces2.forEach((namespace) => {
2325 + result.client[namespace] = proxifyContext(
2326 + client.current[namespace],
2327 + inheritedClient[namespace]
2328 + );
2329 + result.server[namespace] = proxifyContext(
2330 + server[namespace],
2331 + inheritedServer[namespace]
2332 + );
2333 + });
2334 + return k(Provider, { value: result }, children);
2335 + },
2336 + { priority: 5 }
2337 +);
2338 +
2339 +// packages/interactivity/build-module/directives/each.mjs
2340 +init_preact_module();
2341 +var evaluateItemKey = (inheritedValue, namespace, item, itemProp, eachKey) => {
2342 + const clientContextWithItem = {
2343 + ...inheritedValue.client,
2344 + [namespace]: {
2345 + ...inheritedValue.client[namespace],
2346 + [itemProp]: item
2347 + }
2348 + };
2349 + const scope = {
2350 + ...getScope(),
2351 + context: clientContextWithItem,
2352 + serverContext: inheritedValue.server
2353 + };
2354 + return eachKey ? getEvaluate({ scope })(eachKey) : item;
2355 +};
2356 +var useItemContexts = function* (inheritedValue, namespace, items, itemProp, eachKey) {
2357 + const { current: itemContexts } = A2(/* @__PURE__ */ new Map());
2358 + for (const item of items) {
2359 + const key = evaluateItemKey(
2360 + inheritedValue,
2361 + namespace,
2362 + item,
2363 + itemProp,
2364 + eachKey
2365 + );
2366 + if (!itemContexts.has(key)) {
2367 + itemContexts.set(
2368 + key,
2369 + proxifyContext(
2370 + proxifyState(namespace, {
2371 + // Inits the item prop in the context to shadow it in case
2372 + // it was inherited from the parent context. The actual
2373 + // value is set in the `wp-each` directive later on.
2374 + [itemProp]: void 0
2375 + }),
2376 + inheritedValue.client[namespace]
2377 + )
2378 + );
2379 + }
2380 + yield [item, itemContexts.get(key), key];
2381 + }
2382 +};
2383 +directive(
2384 + "each",
2385 + ({
2386 + directives: { each, "each-key": eachKey },
2387 + context: inheritedContext,
2388 + element,
2389 + evaluate
2390 + }) => {
2391 + if (element.type !== "template") {
2392 + if (true) {
2393 + warn(
2394 + "The data-wp-each directive can only be used on <template> elements."
2395 + );
2396 + }
2397 + return;
2398 + }
2399 + const { Provider } = inheritedContext;
2400 + const inheritedValue = x2(inheritedContext);
2401 + const [entry] = each;
2402 + const { namespace, suffix, uniqueId } = entry;
2403 + if (each.length > 1) {
2404 + if (true) {
2405 + warn(
2406 + "The usage of multiple data-wp-each directives on the same element is not supported. Please pick only one."
2407 + );
2408 + }
2409 + return;
2410 + }
2411 + if (uniqueId) {
2412 + if (true) {
2413 + warnUniqueIdNotSupported("each", uniqueId);
2414 + }
2415 + return;
2416 + }
2417 + let iterable = evaluate(entry);
2418 + if (iterable === PENDING_GETTER) {
2419 + return;
2420 + }
2421 + if (typeof iterable === "function") {
2422 + iterable = iterable();
2423 + }
2424 + if (typeof iterable?.[Symbol.iterator] !== "function") {
2425 + return;
2426 + }
2427 + const itemProp = suffix ? kebabToCamelCase(suffix) : "item";
2428 + const result = [];
2429 + const itemContexts = useItemContexts(
2430 + inheritedValue,
2431 + namespace,
2432 + iterable,
2433 + itemProp,
2434 + eachKey?.[0]
2435 + );
2436 + for (const [item, itemContext, key] of itemContexts) {
2437 + const mergedContext = {
2438 + client: {
2439 + ...inheritedValue.client,
2440 + [namespace]: itemContext
2441 + },
2442 + server: { ...inheritedValue.server }
2443 + };
2444 + mergedContext.client[namespace][itemProp] = item;
2445 + result.push(
2446 + k(
2447 + Provider,
2448 + { value: mergedContext, key },
2449 + element.props.content
2450 + )
2451 + );
2452 + }
2453 + return result;
2454 + },
2455 + { priority: 20 }
2456 +);
2457 +directive(
2458 + "each-child",
2459 + ({ directives: { "each-child": eachChild }, element, evaluate }) => {
2460 + const entry = eachChild.find(isDefaultDirectiveSuffix);
2461 + if (!entry) {
2462 + return;
2463 + }
2464 + const iterable = evaluate(entry);
2465 + return iterable === PENDING_GETTER ? element : null;
2466 + },
2467 + { priority: 1 }
2468 +);
2469 +
2470 +// packages/interactivity/build-module/directives/ignore.mjs
2471 +init_preact_module();
2472 +directive(
2473 + "ignore",
2474 + ({
2475 + element: {
2476 + type: Type,
2477 + props: { innerHTML, ...rest }
2478 + }
2479 + }) => {
2480 + if (true) {
2481 + warn(
2482 + "The data-wp-ignore directive is deprecated and will be removed in version 7.0."
2483 + );
2484 + }
2485 + const cached = T2(() => innerHTML, []);
2486 + return k(Type, {
2487 + dangerouslySetInnerHTML: { __html: cached },
2488 + ...rest
2489 + });
2490 + }
2491 +);
2492 +
2493 +// packages/interactivity/build-module/directives/init.mjs
2494 +directive("init", ({ directives: { init }, evaluate }) => {
2495 + init.forEach((entry) => {
2496 + if (true) {
2497 + if (entry.suffix) {
2498 + warnUniqueIdWithTwoHyphens("init", entry.suffix);
2499 + }
2500 + }
2501 + useInit(() => {
2502 + let start;
2503 + if (true) {
2504 + if (true) {
2505 + start = performance.now();
2506 + }
2507 + }
2508 + let result = evaluate(entry);
2509 + if (typeof result === "function") {
2510 + result = result();
2511 + }
2512 + if (true) {
2513 + if (true) {
2514 + performance.measure(
2515 + `interactivity api init ${entry.namespace}`,
2516 + {
2517 + start,
2518 + end: performance.now(),
2519 + detail: {
2520 + devtools: {
2521 + track: `IA: init ${entry.namespace}`
2522 + }
2523 + }
2524 + }
2525 + );
2526 + }
2527 + }
2528 + return result;
2529 + });
2530 + });
2531 +});
2532 +
2533 +// packages/interactivity/build-module/directives/on.mjs
2185 2534 function wrapEventAsync(event) {
2186 2535 const handler = {
2187 2536 get(target, prop, receiver) {
2188 2537 const value = target[prop];
@@ -2216,27 +2565,8 @@
2216 2565 }
2217 2566 };
2218 2567 return new Proxy(event, handler);
2219 2568 }
2220 -var newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g;
2221 -var ruleClean = /\/\*[^]*?\*\/| +/g;
2222 -var ruleNewline = /\n+/g;
2223 -var empty = " ";
2224 -var cssStringToObject = (val) => {
2225 - const tree = [{}];
2226 - let block, left;
2227 - while (block = newRule.exec(val.replace(ruleClean, ""))) {
2228 - if (block[4]) {
2229 - tree.shift();
2230 - } else if (block[3]) {
2231 - left = block[3].replace(ruleNewline, empty).trim();
2232 - tree.unshift(tree[0][left] = tree[0][left] || {});
2233 - } else {
2234 - tree[0][block[1]] = block[2].replace(ruleNewline, empty).trim();
2235 - }
2236 - }
2237 - return tree[0];
2238 -};
2239 2569 var getGlobalEventDirective = (type) => {
2240 2570 return ({ directives, evaluate }) => {
2241 2571 directives[`on-${type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2242 2572 const suffixParts = entry.suffix.split("--", 2);
@@ -2266,50 +2596,8 @@
2266 2596 });
2267 2597 });
2268 2598 };
2269 2599 };
2270 -var evaluateItemKey = (inheritedValue, namespace, item, itemProp, eachKey) => {
2271 - const clientContextWithItem = {
2272 - ...inheritedValue.client,
2273 - [namespace]: {
2274 - ...inheritedValue.client[namespace],
2275 - [itemProp]: item
2276 - }
2277 - };
2278 - const scope = {
2279 - ...getScope(),
2280 - context: clientContextWithItem,
2281 - serverContext: inheritedValue.server
2282 - };
2283 - return eachKey ? getEvaluate({ scope })(eachKey) : item;
2284 -};
2285 -var useItemContexts = function* (inheritedValue, namespace, items, itemProp, eachKey) {
2286 - const { current: itemContexts } = A2(/* @__PURE__ */ new Map());
2287 - for (const item of items) {
2288 - const key = evaluateItemKey(
2289 - inheritedValue,
2290 - namespace,
2291 - item,
2292 - itemProp,
2293 - eachKey
2294 - );
2295 - if (!itemContexts.has(key)) {
2296 - itemContexts.set(
2297 - key,
2298 - proxifyContext(
2299 - proxifyState(namespace, {
2300 - // Inits the item prop in the context to shadow it in case
2301 - // it was inherited from the parent context. The actual
2302 - // value is set in the `wp-each` directive later on.
2303 - [itemProp]: void 0
2304 - }),
2305 - inheritedValue.client[namespace]
2306 - )
2307 - );
2308 - }
2309 - yield [item, itemContexts.get(key), key];
2310 - }
2311 -};
2312 2600 var getGlobalAsyncEventDirective = (type) => {
2313 2601 return ({ directives, evaluate }) => {
2314 2602 directives[`on-async-${type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2315 2603 if (true) {
@@ -2332,115 +2620,33 @@
2332 2620 });
2333 2621 });
2334 2622 };
2335 2623 };
2336 -var routerRegions = /* @__PURE__ */ new Map();
2337 -var directives_default = () => {
2338 - directive(
2339 - "context",
2340 - ({
2341 - directives: { context: context2 },
2342 - props: { children },
2343 - context: inheritedContext
2344 - }) => {
2345 - const entries = context2.filter(isDefaultDirectiveSuffix).reverse();
2346 - if (!entries.length) {
2347 - if (true) {
2348 - warn(
2349 - "The usage of data-wp-context--unique-id (two hyphens) is not supported. To add a unique ID to the directive, please use data-wp-context---unique-id (three hyphens) instead."
2350 - );
2351 - }
2352 - return;
2353 - }
2354 - const { Provider } = inheritedContext;
2355 - const { client: inheritedClient, server: inheritedServer } = x2(inheritedContext);
2356 - const client = A2({});
2357 - const server = {};
2358 - const result = {
2359 - client: { ...inheritedClient },
2360 - server: { ...inheritedServer }
2361 - };
2362 - const namespaces2 = /* @__PURE__ */ new Set();
2363 - entries.forEach(({ value, namespace, uniqueId }) => {
2364 - if (!isPlainObject(value)) {
2365 - if (true) {
2366 - warn(
2367 - `The value of data-wp-context${uniqueId ? `---${uniqueId}` : ""} on the ${namespace} namespace must be a valid stringified JSON object.`
2368 - );
2369 - }
2370 - return;
2371 - }
2372 - if (!client.current[namespace]) {
2373 - client.current[namespace] = proxifyState(namespace, {});
2374 - }
2375 - deepMerge(
2376 - client.current[namespace],
2377 - deepClone(value),
2378 - false
2624 +directive("on", ({ directives: { on }, element, evaluate }) => {
2625 + const events = /* @__PURE__ */ new Map();
2626 + on.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2627 + const suffixParts = entry.suffix.split("--", 2);
2628 + if (true) {
2629 + if (suffixParts[1]) {
2630 + warnUniqueIdWithTwoHyphens(
2631 + "on",
2632 + suffixParts[0],
2633 + suffixParts[1]
2379 2634 );
2380 - server[namespace] = value;
2381 - namespaces2.add(namespace);
2382 - });
2383 - namespaces2.forEach((namespace) => {
2384 - result.client[namespace] = proxifyContext(
2385 - client.current[namespace],
2386 - inheritedClient[namespace]
2387 - );
2388 - result.server[namespace] = proxifyContext(
2389 - server[namespace],
2390 - inheritedServer[namespace]
2391 - );
2392 - });
2393 - return _(Provider, { value: result }, children);
2394 - },
2395 - { priority: 5 }
2396 - );
2397 - directive("watch", ({ directives: { watch: watch2 }, evaluate }) => {
2398 - watch2.forEach((entry) => {
2399 - if (true) {
2400 - if (entry.suffix) {
2401 - warnUniqueIdWithTwoHyphens("watch", entry.suffix);
2402 - }
2403 2635 }
2404 - useWatch(() => {
2405 - let start;
2406 - if (true) {
2407 - if (true) {
2408 - start = performance.now();
2409 - }
2410 - }
2411 - let result = evaluate(entry);
2412 - if (typeof result === "function") {
2413 - result = result();
2414 - }
2415 - if (true) {
2416 - if (true) {
2417 - performance.measure(
2418 - `interactivity api watch ${entry.namespace}`,
2419 - {
2420 - start,
2421 - end: performance.now(),
2422 - detail: {
2423 - devtools: {
2424 - track: `IA: watch ${entry.namespace}`
2425 - }
2426 - }
2427 - }
2428 - );
2429 - }
2430 - }
2431 - return result;
2432 - });
2433 - });
2636 + }
2637 + if (!events.has(suffixParts[0])) {
2638 + events.set(suffixParts[0], /* @__PURE__ */ new Set());
2639 + }
2640 + events.get(suffixParts[0]).add(entry);
2434 2641 });
2435 - directive("init", ({ directives: { init }, evaluate }) => {
2436 - init.forEach((entry) => {
2437 - if (true) {
2438 - if (entry.suffix) {
2439 - warnUniqueIdWithTwoHyphens("init", entry.suffix);
2440 - }
2642 + events.forEach((entries, eventType) => {
2643 + const existingHandler = element.props[`on${eventType}`];
2644 + element.props[`on${eventType}`] = (event) => {
2645 + if (existingHandler) {
2646 + existingHandler(event);
2441 2647 }
2442 - useInit(() => {
2648 + entries.forEach((entry) => {
2443 2649 let start;
2444 2650 if (true) {
2445 2651 if (true) {
2446 2652 start = performance.now();
@@ -2445,22 +2651,25 @@
2445 2651 if (true) {
2446 2652 start = performance.now();
2447 2653 }
2448 2654 }
2449 - let result = evaluate(entry);
2655 + const result = evaluate(entry);
2450 2656 if (typeof result === "function") {
2451 - result = result();
2657 + if (!result?.sync) {
2658 + event = wrapEventAsync(event);
2659 + }
2660 + result(event);
2452 2661 }
2453 2662 if (true) {
2454 2663 if (true) {
2455 2664 performance.measure(
2456 - `interactivity api init ${entry.namespace}`,
2665 + `interactivity api on ${entry.namespace}`,
2457 2666 {
2458 2667 start,
2459 2668 end: performance.now(),
2460 2669 detail: {
2461 2670 devtools: {
2462 - track: `IA: init ${entry.namespace}`
2671 + track: `IA: on ${entry.namespace}`
2463 2672 }
2464 2673 }
2465 2674 }
2466 2675 );
@@ -2465,29 +2674,25 @@
2465 2674 }
2466 2675 );
2467 2676 }
2468 2677 }
2469 - return result;
2470 2678 });
2471 - });
2679 + };
2472 2680 });
2473 - directive("on", ({ directives: { on }, element, evaluate }) => {
2681 +});
2682 +directive(
2683 + "on-async",
2684 + ({ directives: { "on-async": onAsync }, element, evaluate }) => {
2685 + if (true) {
2686 + warnWithSyncEvent("on-async", "on");
2687 + }
2474 2688 const events = /* @__PURE__ */ new Map();
2475 - on.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2476 - const suffixParts = entry.suffix.split("--", 2);
2477 - if (true) {
2478 - if (suffixParts[1]) {
2479 - warnUniqueIdWithTwoHyphens(
2480 - "on",
2481 - suffixParts[0],
2482 - suffixParts[1]
2483 - );
2484 - }
2689 + onAsync.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2690 + const event = entry.suffix.split("--", 1)[0];
2691 + if (!events.has(event)) {
2692 + events.set(event, /* @__PURE__ */ new Set());
2485 2693 }
2486 - if (!events.has(suffixParts[0])) {
2487 - events.set(suffixParts[0], /* @__PURE__ */ new Set());
2488 - }
2489 - events.get(suffixParts[0]).add(entry);
2694 + events.get(event).add(entry);
2490 2695 });
2491 2696 events.forEach((entries, eventType) => {
2492 2697 const existingHandler = element.props[`on${eventType}`];
2493 2698 element.props[`on${eventType}`] = (event) => {
@@ -2493,155 +2698,157 @@
2493 2698 element.props[`on${eventType}`] = (event) => {
2494 2699 if (existingHandler) {
2495 2700 existingHandler(event);
2496 2701 }
2497 - entries.forEach((entry) => {
2498 - let start;
2499 - if (true) {
2500 - if (true) {
2501 - start = performance.now();
2502 - }
2503 - }
2702 + entries.forEach(async (entry) => {
2703 + await splitTask();
2504 2704 const result = evaluate(entry);
2505 2705 if (typeof result === "function") {
2506 - if (!result?.sync) {
2507 - event = wrapEventAsync(event);
2508 - }
2509 2706 result(event);
2510 2707 }
2511 - if (true) {
2512 - if (true) {
2513 - performance.measure(
2514 - `interactivity api on ${entry.namespace}`,
2515 - {
2516 - start,
2517 - end: performance.now(),
2518 - detail: {
2519 - devtools: {
2520 - track: `IA: on ${entry.namespace}`
2521 - }
2522 - }
2523 - }
2524 - );
2525 - }
2526 - }
2527 2708 });
2528 2709 };
2529 2710 });
2530 - });
2531 - directive(
2532 - "on-async",
2533 - ({ directives: { "on-async": onAsync }, element, evaluate }) => {
2711 + }
2712 +);
2713 +directive("on-window", getGlobalEventDirective("window"));
2714 +directive("on-document", getGlobalEventDirective("document"));
2715 +directive("on-async-window", getGlobalAsyncEventDirective("window"));
2716 +directive("on-async-document", getGlobalAsyncEventDirective("document"));
2717 +
2718 +// packages/interactivity/build-module/directives/router-region.mjs
2719 +init_preact_module();
2720 +var routerRegions = /* @__PURE__ */ new Map();
2721 +directive(
2722 + "router-region",
2723 + ({ directives: { "router-region": routerRegion } }) => {
2724 + const entry = routerRegion.find(isDefaultDirectiveSuffix);
2725 + if (!entry) {
2726 + return;
2727 + }
2728 + if (entry.suffix) {
2534 2729 if (true) {
2535 - warnWithSyncEvent("on-async", "on");
2730 + warn(
2731 + `Suffixes for the data-wp-router-region directive are not supported. Ignoring the directive with suffix "${entry.suffix}".`
2732 + );
2536 2733 }
2537 - const events = /* @__PURE__ */ new Map();
2538 - onAsync.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2539 - const event = entry.suffix.split("--", 1)[0];
2540 - if (!events.has(event)) {
2541 - events.set(event, /* @__PURE__ */ new Set());
2542 - }
2543 - events.get(event).add(entry);
2544 - });
2545 - events.forEach((entries, eventType) => {
2546 - const existingHandler = element.props[`on${eventType}`];
2547 - element.props[`on${eventType}`] = (event) => {
2548 - if (existingHandler) {
2549 - existingHandler(event);
2550 - }
2551 - entries.forEach(async (entry) => {
2552 - await splitTask();
2553 - const result = evaluate(entry);
2554 - if (typeof result === "function") {
2555 - result(event);
2556 - }
2557 - });
2558 - };
2559 - });
2734 + return;
2560 2735 }
2561 - );
2562 - directive("on-window", getGlobalEventDirective("window"));
2563 - directive("on-document", getGlobalEventDirective("document"));
2564 - directive("on-async-window", getGlobalAsyncEventDirective("window"));
2565 - directive(
2566 - "on-async-document",
2567 - getGlobalAsyncEventDirective("document")
2568 - );
2569 - directive(
2570 - "class",
2571 - ({ directives: { class: classNames }, element, evaluate }) => {
2572 - classNames.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2573 - const className = entry.uniqueId ? `${entry.suffix}---${entry.uniqueId}` : entry.suffix;
2574 - let result = evaluate(entry);
2575 - if (result === PENDING_GETTER) {
2576 - return;
2577 - }
2578 - if (typeof result === "function") {
2579 - result = result();
2580 - }
2581 - const currentClass = element.props.class || "";
2582 - const classFinder = new RegExp(
2583 - `(^|\\s)${className}(\\s|$)`,
2584 - "g"
2585 - );
2586 - if (!result) {
2587 - element.props.class = currentClass.replace(classFinder, " ").trim();
2588 - } else if (!classFinder.test(currentClass)) {
2589 - element.props.class = currentClass ? `${currentClass} ${className}` : className;
2590 - }
2591 - useInit(() => {
2592 - if (!result) {
2593 - element.ref.current.classList.remove(className);
2594 - } else {
2595 - element.ref.current.classList.add(className);
2596 - }
2597 - });
2598 - });
2736 + if (entry.uniqueId) {
2737 + if (true) {
2738 + warnUniqueIdNotSupported("router-region", entry.uniqueId);
2739 + }
2740 + return;
2599 2741 }
2600 - );
2601 - directive("style", ({ directives: { style }, element, evaluate }) => {
2602 - style.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2603 - if (entry.uniqueId) {
2604 - if (true) {
2605 - warnUniqueIdNotSupported("style", entry.uniqueId);
2606 - }
2607 - return;
2742 + const regionId = typeof entry.value === "string" ? entry.value : entry.value.id;
2743 + if (!routerRegions.has(regionId)) {
2744 + routerRegions.set(regionId, d3());
2745 + }
2746 + const vdom = routerRegions.get(regionId).value;
2747 + _2(() => {
2748 + if (vdom && typeof vdom.type !== "string") {
2749 + navigationContextSignal.value = navigationContextSignal.peek() + 1;
2608 2750 }
2609 - const styleProp = entry.suffix;
2610 - let result = evaluate(entry);
2611 - if (result === PENDING_GETTER) {
2612 - return;
2751 + }, [vdom]);
2752 + if (vdom && typeof vdom.type !== "string") {
2753 + const previousScope = getScope();
2754 + return W(vdom, { previousScope });
2755 + }
2756 + return vdom;
2757 + },
2758 + { priority: 1 }
2759 +);
2760 +
2761 +// packages/interactivity/build-module/directives/run.mjs
2762 +directive("run", ({ directives: { run }, evaluate }) => {
2763 + run.forEach((entry) => {
2764 + if (true) {
2765 + if (entry.suffix) {
2766 + warnUniqueIdWithTwoHyphens("run", entry.suffix);
2613 2767 }
2614 - if (typeof result === "function") {
2615 - result = result();
2768 + }
2769 + let result = evaluate(entry);
2770 + if (typeof result === "function") {
2771 + result = result();
2772 + }
2773 + return result;
2774 + });
2775 +});
2776 +
2777 +// packages/interactivity/build-module/directives/style.mjs
2778 +var newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g;
2779 +var ruleClean = /\/\*[^]*?\*\/| +/g;
2780 +var ruleNewline = /\n+/g;
2781 +var empty = " ";
2782 +var cssStringToObject = (val) => {
2783 + const tree = [{}];
2784 + let block, left;
2785 + while (block = newRule.exec(val.replace(ruleClean, ""))) {
2786 + if (block[4]) {
2787 + tree.shift();
2788 + } else if (block[3]) {
2789 + left = block[3].replace(ruleNewline, empty).trim();
2790 + tree.unshift(tree[0][left] = tree[0][left] || {});
2791 + } else {
2792 + tree[0][block[1]] = block[2].replace(ruleNewline, empty).trim();
2793 + }
2794 + }
2795 + return tree[0];
2796 +};
2797 +directive("style", ({ directives: { style }, element, evaluate }) => {
2798 + style.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2799 + if (entry.uniqueId) {
2800 + if (true) {
2801 + warnUniqueIdNotSupported("style", entry.uniqueId);
2616 2802 }
2617 - element.props.style = element.props.style || {};
2618 - if (typeof element.props.style === "string") {
2619 - element.props.style = cssStringToObject(element.props.style);
2620 - }
2803 + return;
2804 + }
2805 + const styleProp = entry.suffix;
2806 + let result = evaluate(entry);
2807 + if (result === PENDING_GETTER) {
2808 + return;
2809 + }
2810 + if (typeof result === "function") {
2811 + result = result();
2812 + }
2813 + element.props.style = element.props.style || {};
2814 + if (typeof element.props.style === "string") {
2815 + element.props.style = cssStringToObject(element.props.style);
2816 + }
2817 + if (!result) {
2818 + delete element.props.style[styleProp];
2819 + } else {
2820 + element.props.style[styleProp] = result;
2821 + }
2822 + useInit(() => {
2621 2823 if (!result) {
2622 - delete element.props.style[styleProp];
2824 + element.ref.current.style.removeProperty(styleProp);
2623 2825 } else {
2624 - element.props.style[styleProp] = result;
2826 + element.ref.current.style.setProperty(styleProp, result);
2625 2827 }
2626 - useInit(() => {
2627 - if (!result) {
2628 - element.ref.current.style.removeProperty(styleProp);
2629 - } else {
2630 - element.ref.current.style.setProperty(styleProp, result);
2631 - }
2632 - });
2633 2828 });
2634 2829 });
2635 - directive("bind", ({ directives: { bind }, element, evaluate }) => {
2636 - bind.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2637 - if (entry.uniqueId) {
2638 - if (true) {
2639 - warnUniqueIdNotSupported("bind", entry.uniqueId);
2640 - }
2641 - return;
2830 +});
2831 +
2832 +// packages/interactivity/build-module/directives/text.mjs
2833 +directive("text", ({ directives: { text }, element, evaluate }) => {
2834 + const entries = text.filter(isDefaultDirectiveSuffix);
2835 + if (!entries.length) {
2836 + if (true) {
2837 + warn(
2838 + "The usage of data-wp-text--suffix is not supported. Please use data-wp-text instead."
2839 + );
2840 + }
2841 + return;
2842 + }
2843 + entries.forEach((entry) => {
2844 + if (entry.uniqueId) {
2845 + if (true) {
2846 + warnUniqueIdNotSupported("text", entry.uniqueId);
2642 2847 }
2643 - const attribute = entry.suffix;
2848 + return;
2849 + }
2850 + try {
2644 2851 let result = evaluate(entry);
2645 2852 if (result === PENDING_GETTER) {
2646 2853 return;
2647 2854 }
@@ -2647,233 +2854,54 @@
2647 2854 }
2648 2855 if (typeof result === "function") {
2649 2856 result = result();
2650 2857 }
2651 - element.props[attribute] = result;
2652 - useInit(() => {
2653 - const el = element.ref.current;
2654 - if (attribute === "style") {
2655 - if (typeof result === "string") {
2656 - el.style.cssText = result;
2657 - }
2658 - return;
2659 - } else if (attribute !== "width" && attribute !== "height" && attribute !== "href" && attribute !== "list" && attribute !== "form" && /*
2660 - * The value for `tabindex` follows the parsing rules for an
2661 - * integer. If that fails, or if the attribute isn't present, then
2662 - * the browsers should "follow platform conventions to determine if
2663 - * the element should be considered as a focusable area",
2664 - * practically meaning that most elements get a default of `-1` (not
2665 - * focusable), but several also get a default of `0` (focusable in
2666 - * order after all elements with a positive `tabindex` value).
2667 - *
2668 - * @see https://html.spec.whatwg.org/#tabindex-value
2669 - */
2670 - attribute !== "tabIndex" && attribute !== "download" && attribute !== "rowSpan" && attribute !== "colSpan" && attribute !== "role" && attribute in el) {
2671 - try {
2672 - el[attribute] = result === null || result === void 0 ? "" : result;
2673 - return;
2674 - } catch {
2675 - }
2676 - }
2677 - if (result !== null && result !== void 0 && (result !== false || attribute[4] === "-")) {
2678 - el.setAttribute(attribute, result);
2679 - } else {
2680 - el.removeAttribute(attribute);
2681 - }
2682 - });
2683 - });
2858 + element.props.children = typeof result === "object" ? null : result.toString();
2859 + } catch {
2860 + element.props.children = null;
2861 + }
2684 2862 });
2685 - directive(
2686 - "ignore",
2687 - ({
2688 - element: {
2689 - type: Type,
2690 - props: { innerHTML, ...rest }
2863 +});
2864 +
2865 +// packages/interactivity/build-module/directives/watch.mjs
2866 +directive("watch", ({ directives: { watch: watch2 }, evaluate }) => {
2867 + watch2.forEach((entry) => {
2868 + if (true) {
2869 + if (entry.suffix) {
2870 + warnUniqueIdWithTwoHyphens("watch", entry.suffix);
2691 2871 }
2692 - }) => {
2693 - if (true) {
2694 - warn(
2695 - "The data-wp-ignore directive is deprecated and will be removed in version 7.0."
2696 - );
2697 - }
2698 - const cached = T2(() => innerHTML, []);
2699 - return _(Type, {
2700 - dangerouslySetInnerHTML: { __html: cached },
2701 - ...rest
2702 - });
2703 2872 }
2704 - );
2705 - directive("text", ({ directives: { text }, element, evaluate }) => {
2706 - const entries = text.filter(isDefaultDirectiveSuffix);
2707 - if (!entries.length) {
2873 + useWatch(() => {
2874 + let start;
2708 2875 if (true) {
2709 - warn(
2710 - "The usage of data-wp-text--suffix is not supported. Please use data-wp-text instead."
2711 - );
2712 - }
2713 - return;
2714 - }
2715 - entries.forEach((entry) => {
2716 - if (entry.uniqueId) {
2717 2876 if (true) {
2718 - warnUniqueIdNotSupported("text", entry.uniqueId);
2877 + start = performance.now();
2719 2878 }
2720 - return;
2721 2879 }
2722 - try {
2723 - let result = evaluate(entry);
2724 - if (result === PENDING_GETTER) {
2725 - return;
2726 - }
2727 - if (typeof result === "function") {
2728 - result = result();
2729 - }
2730 - element.props.children = typeof result === "object" ? null : result.toString();
2731 - } catch {
2732 - element.props.children = null;
2733 - }
2734 - });
2735 - });
2736 - directive("run", ({ directives: { run }, evaluate }) => {
2737 - run.forEach((entry) => {
2738 - if (true) {
2739 - if (entry.suffix) {
2740 - warnUniqueIdWithTwoHyphens("run", entry.suffix);
2741 - }
2742 - }
2743 2880 let result = evaluate(entry);
2744 2881 if (typeof result === "function") {
2745 2882 result = result();
2746 2883 }
2747 - return result;
2748 - });
2749 - });
2750 - directive(
2751 - "each",
2752 - ({
2753 - directives: { each, "each-key": eachKey },
2754 - context: inheritedContext,
2755 - element,
2756 - evaluate
2757 - }) => {
2758 - if (element.type !== "template") {
2884 + if (true) {
2759 2885 if (true) {
2760 - warn(
2761 - "The data-wp-each directive can only be used on <template> elements."
2886 + performance.measure(
2887 + `interactivity api watch ${entry.namespace}`,
2888 + {
2889 + start,
2890 + end: performance.now(),
2891 + detail: {
2892 + devtools: {
2893 + track: `IA: watch ${entry.namespace}`
2894 + }
2895 + }
2896 + }
2762 2897 );
2763 2898 }
2764 - return;
2765 2899 }
2766 - const { Provider } = inheritedContext;
2767 - const inheritedValue = x2(inheritedContext);
2768 - const [entry] = each;
2769 - const { namespace, suffix, uniqueId } = entry;
2770 - if (each.length > 1) {
2771 - if (true) {
2772 - warn(
2773 - "The usage of multiple data-wp-each directives on the same element is not supported. Please pick only one."
2774 - );
2775 - }
2776 - return;
2777 - }
2778 - if (uniqueId) {
2779 - if (true) {
2780 - warnUniqueIdNotSupported("each", uniqueId);
2781 - }
2782 - return;
2783 - }
2784 - let iterable = evaluate(entry);
2785 - if (iterable === PENDING_GETTER) {
2786 - return;
2787 - }
2788 - if (typeof iterable === "function") {
2789 - iterable = iterable();
2790 - }
2791 - if (typeof iterable?.[Symbol.iterator] !== "function") {
2792 - return;
2793 - }
2794 - const itemProp = suffix ? kebabToCamelCase(suffix) : "item";
2795 - const result = [];
2796 - const itemContexts = useItemContexts(
2797 - inheritedValue,
2798 - namespace,
2799 - iterable,
2800 - itemProp,
2801 - eachKey?.[0]
2802 - );
2803 - for (const [item, itemContext, key] of itemContexts) {
2804 - const mergedContext = {
2805 - client: {
2806 - ...inheritedValue.client,
2807 - [namespace]: itemContext
2808 - },
2809 - server: { ...inheritedValue.server }
2810 - };
2811 - mergedContext.client[namespace][itemProp] = item;
2812 - result.push(
2813 - _(
2814 - Provider,
2815 - { value: mergedContext, key },
2816 - element.props.content
2817 - )
2818 - );
2819 - }
2820 2900 return result;
2821 - },
2822 - { priority: 20 }
2823 - );
2824 - directive(
2825 - "each-child",
2826 - ({ directives: { "each-child": eachChild }, element, evaluate }) => {
2827 - const entry = eachChild.find(isDefaultDirectiveSuffix);
2828 - if (!entry) {
2829 - return;
2830 - }
2831 - const iterable = evaluate(entry);
2832 - return iterable === PENDING_GETTER ? element : null;
2833 - },
2834 - { priority: 1 }
2835 - );
2836 - directive(
2837 - "router-region",
2838 - ({ directives: { "router-region": routerRegion } }) => {
2839 - const entry = routerRegion.find(isDefaultDirectiveSuffix);
2840 - if (!entry) {
2841 - return;
2842 - }
2843 - if (entry.suffix) {
2844 - if (true) {
2845 - warn(
2846 - `Suffixes for the data-wp-router-region directive are not supported. Ignoring the directive with suffix "${entry.suffix}".`
2847 - );
2848 - }
2849 - return;
2850 - }
2851 - if (entry.uniqueId) {
2852 - if (true) {
2853 - warnUniqueIdNotSupported("router-region", entry.uniqueId);
2854 - }
2855 - return;
2856 - }
2857 - const regionId = typeof entry.value === "string" ? entry.value : entry.value.id;
2858 - if (!routerRegions.has(regionId)) {
2859 - routerRegions.set(regionId, d3());
2860 - }
2861 - const vdom = routerRegions.get(regionId).value;
2862 - _2(() => {
2863 - if (vdom && typeof vdom.type !== "string") {
2864 - navigationContextSignal.value = navigationContextSignal.peek() + 1;
2865 - }
2866 - }, [vdom]);
2867 - if (vdom && typeof vdom.type !== "string") {
2868 - const previousScope = getScope();
2869 - return E(vdom, { previousScope });
2870 - }
2871 - return vdom;
2872 - },
2873 - { priority: 1 }
2874 - );
2875 -};
2901 + });
2902 + });
2903 +});
2876 2904
2877 2905 // packages/interactivity/build-module/hydration.mjs
2878 2906 init_preact_module();
2879 2907
@@ -2978,9 +3006,9 @@
2978 3006 }
2979 3007 }
2980 3008 if (ignore && !island) {
2981 3009 return [
2982 - _(localName, {
3010 + k(localName, {
2983 3011 ...props,
2984 3012 innerHTML: elementNode.innerHTML,
2985 3013 __directives: { ignore: true }
2986 3014 })
@@ -3046,9 +3074,9 @@
3046 3074 }
3047 3075 if (island) {
3048 3076 namespaces.pop();
3049 3077 }
3050 - return _(localName, props, children);
3078 + return k(localName, props, children);
3051 3079 }
3052 3080 const vdom = walk(treeWalker.currentNode);
3053 3081 nodesToRemove.forEach(
3054 3082 (node) => node.remove()
@@ -3089,9 +3117,9 @@
3089 3117 const fragment = getRegionRootFragment(node);
3090 3118 const vdom = toVdom(node);
3091 3119 initialVdom.set(node, vdom);
3092 3120 await splitTask();
3093 - D(vdom, fragment);
3121 + U(vdom, fragment);
3094 3122 }
3095 3123 }
3096 3124 resolveInitialVdom(initialVdom);
3097 3125 };
@@ -3109,11 +3137,11 @@
3109 3137 initialVdomPromise,
3110 3138 toVdom,
3111 3139 directive,
3112 3140 getNamespace,
3113 - h: _,
3114 - cloneElement: E,
3115 - render: B,
3141 + h: k,
3142 + cloneElement: W,
3143 + render: R,
3116 3144 proxifyState,
3117 3145 parseServerData,
3118 3146 populateServerData,
3119 3147 batch: r3,
@@ -3126,9 +3154,8 @@
3126 3154 }
3127 3155 throw new Error("Forbidden access.");
3128 3156 };
3129 3157 populateServerData(parseServerData());
3130 -directives_default();
3131 3158 onDOMReady(hydrateRegions);
3132 3159 window.history.replaceState(
3133 3160 { ...window.history.state, wpInteractivityId: sessionId },
3134 3161 ""
@@ -3152,9 +3179,9 @@
3152 3179 useInit,
3153 3180 useLayoutEffect,
3154 3181 useMemo,
3155 3182 A2 as useRef,
3156 - h2 as useState,
3183 + d2 as useState,
3157 3184 useWatch,
3158 3185 watch,
3159 3186 withScope,
3160 3187 withSyncEvent