parent." + w4(e4) + "\n\n" + f4(e4));
else if ("p" === t5) {
var c6 = p5(e4).filter(function(n4) {
return m3.test(n4);
});
c6.length && console.error("Improper nesting of paragraph. Your should not have " + c6.join(", ") + " as child-elements." + w4(e4) + "\n\n" + f4(e4));
} 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));
}
if (n3 = false, r5 && r5(e4), null != e4.__k) for (var l7 = [], u5 = 0; u5 < e4.__k.length; u5++) {
var d6 = e4.__k[u5];
if (d6 && null != d6.key) {
var v7 = d6.key;
if (-1 !== l7.indexOf(v7)) {
console.error('Following component has two or more children with the same key attribute: "' + v7 + '". This may cause glitches and misbehavior in rendering process. Component: \n\n' + w4(e4) + "\n\n" + f4(e4));
break;
}
l7.push(v7);
}
}
if (null != e4.__c && null != e4.__c.__H) {
var b5 = e4.__c.__H.__;
if (b5) for (var g4 = 0; g4 < b5.length; g4 += 1) {
var E4 = b5[g4];
if (E4.__H) {
for (var k4 = 0; k4 < E4.__H.length; k4++) if ((o5 = E4.__H[k4]) != o5) {
var O3 = a4(e4);
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.");
}
}
}
}
};
})();
}
});
// packages/interactivity/build-module/index.mjs
init_preact_module();
// node_modules/@preact/signals/dist/signals.module.js
init_preact_module();
// node_modules/preact/hooks/dist/hooks.module.js
init_preact_module();
var t2;
var r2;
var u2;
var i2;
var o2 = 0;
var f2 = [];
var c2 = l;
var e2 = c2.__b;
var a2 = c2.__r;
var v2 = c2.diffed;
var l2 = c2.__c;
var m2 = c2.unmount;
var s2 = c2.__;
function p2(n3, t5) {
c2.__h && c2.__h(r2, n3, o2 || t5), o2 = 0;
var u5 = r2.__H || (r2.__H = { __: [], __h: [] });
return n3 >= u5.__.length && u5.__.push({}), u5.__[n3];
}
function d2(n3) {
return o2 = 1, h2(D2, n3);
}
function h2(n3, u5, i6) {
var o4 = p2(t2++, 2);
if (o4.t = n3, !o4.__c && (o4.__ = [i6 ? i6(u5) : D2(void 0, u5), function(n4) {
var t5 = o4.__N ? o4.__N[0] : o4.__[0], r5 = o4.t(t5, n4);
t5 !== r5 && (o4.__N = [r5, o4.__[1]], o4.__c.setState({}));
}], o4.__c = r2, !r2.__f)) {
var f5 = function(n4, t5, r5) {
if (!o4.__c.__H) return true;
var u6 = o4.__c.__H.__.filter(function(n5) {
return n5.__c;
});
if (u6.every(function(n5) {
return !n5.__N;
})) return !c5 || c5.call(this, n4, t5, r5);
var i7 = o4.__c.props !== n4;
return u6.some(function(n5) {
if (n5.__N) {
var t6 = n5.__[0];
n5.__ = n5.__N, n5.__N = void 0, t6 !== n5.__[0] && (i7 = true);
}
}), c5 && c5.call(this, n4, t5, r5) || i7;
};
r2.__f = true;
var c5 = r2.shouldComponentUpdate, e4 = r2.componentWillUpdate;
r2.componentWillUpdate = function(n4, t5, r5) {
if (this.__e) {
var u6 = c5;
c5 = void 0, f5(n4, t5, r5), c5 = u6;
}
e4 && e4.call(this, n4, t5, r5);
}, r2.shouldComponentUpdate = f5;
}
return o4.__N || o4.__;
}
function y2(n3, u5) {
var i6 = p2(t2++, 3);
!c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.u = u5, r2.__H.__h.push(i6));
}
function _2(n3, u5) {
var i6 = p2(t2++, 4);
!c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.u = u5, r2.__h.push(i6));
}
function A2(n3) {
return o2 = 5, T2(function() {
return { current: n3 };
}, []);
}
function T2(n3, r5) {
var u5 = p2(t2++, 7);
return C2(u5.__H, r5) && (u5.__ = n3(), u5.__H = r5, u5.__h = n3), u5.__;
}
function q2(n3, t5) {
return o2 = 8, T2(function() {
return n3;
}, t5);
}
function x2(n3) {
var u5 = r2.context[n3.__c], i6 = p2(t2++, 9);
return i6.c = n3, u5 ? (null == i6.__ && (i6.__ = true, u5.sub(r2)), u5.props.value) : n3.__;
}
function j2() {
for (var n3; n3 = f2.shift(); ) {
var t5 = n3.__H;
if (n3.__P && t5) try {
t5.__h.some(z2), t5.__h.some(B2), t5.__h = [];
} catch (r5) {
t5.__h = [], c2.__e(r5, n3.__v);
}
}
}
c2.__b = function(n3) {
r2 = null, e2 && e2(n3);
}, c2.__ = function(n3, t5) {
n3 && t5.__k && t5.__k.__m && (n3.__m = t5.__k.__m), s2 && s2(n3, t5);
}, c2.__r = function(n3) {
a2 && a2(n3), t2 = 0;
var i6 = (r2 = n3.__c).__H;
i6 && (u2 === r2 ? (i6.__h = [], r2.__h = [], i6.__.some(function(n4) {
n4.__N && (n4.__ = n4.__N), n4.u = n4.__N = void 0;
})) : (i6.__h.some(z2), i6.__h.some(B2), i6.__h = [], t2 = 0)), u2 = r2;
}, c2.diffed = function(n3) {
v2 && v2(n3);
var t5 = n3.__c;
t5 && t5.__H && (t5.__H.__h.length && (1 !== f2.push(t5) && i2 === c2.requestAnimationFrame || ((i2 = c2.requestAnimationFrame) || w2)(j2)), t5.__H.__.some(function(n4) {
n4.u && (n4.__H = n4.u), n4.u = void 0;
})), u2 = r2 = null;
}, c2.__c = function(n3, t5) {
t5.some(function(n4) {
try {
n4.__h.some(z2), n4.__h = n4.__h.filter(function(n5) {
return !n5.__ || B2(n5);
});
} catch (r5) {
t5.some(function(n5) {
n5.__h && (n5.__h = []);
}), t5 = [], c2.__e(r5, n4.__v);
}
}), l2 && l2(n3, t5);
}, c2.unmount = function(n3) {
m2 && m2(n3);
var t5, r5 = n3.__c;
r5 && r5.__H && (r5.__H.__.some(function(n4) {
try {
z2(n4);
} catch (n5) {
t5 = n5;
}
}), r5.__H = void 0, t5 && c2.__e(t5, r5.__v));
};
var k2 = "function" == typeof requestAnimationFrame;
function w2(n3) {
var t5, r5 = function() {
clearTimeout(u5), k2 && cancelAnimationFrame(t5), setTimeout(n3);
}, u5 = setTimeout(r5, 35);
k2 && (t5 = requestAnimationFrame(r5));
}
function z2(n3) {
var t5 = r2, u5 = n3.__c;
"function" == typeof u5 && (n3.__c = void 0, u5()), r2 = t5;
}
function B2(n3) {
var t5 = r2;
n3.__c = n3.__(), r2 = t5;
}
function C2(n3, t5) {
return !n3 || n3.length !== t5.length || t5.some(function(t6, r5) {
return t6 !== n3[r5];
});
}
function D2(n3, t5) {
return "function" == typeof t5 ? t5(n3) : t5;
}
// node_modules/@preact/signals-core/dist/signals-core.module.js
var i3 = /* @__PURE__ */ Symbol.for("preact-signals");
function t3() {
if (!(s3 > 1)) {
var i6, t5 = false;
while (void 0 !== h3) {
var r5 = h3;
h3 = void 0;
f3++;
while (void 0 !== r5) {
var o4 = r5.o;
r5.o = void 0;
r5.f &= -3;
if (!(8 & r5.f) && c3(r5)) try {
r5.c();
} catch (r6) {
if (!t5) {
i6 = r6;
t5 = true;
}
}
r5 = o4;
}
}
f3 = 0;
s3--;
if (t5) throw i6;
} else s3--;
}
function r3(i6) {
if (s3 > 0) return i6();
s3++;
try {
return i6();
} finally {
t3();
}
}
var o3 = void 0;
var h3 = void 0;
var s3 = 0;
var f3 = 0;
var v3 = 0;
function e3(i6) {
if (void 0 !== o3) {
var t5 = i6.n;
if (void 0 === t5 || t5.t !== o3) {
t5 = { i: 0, S: i6, p: o3.s, n: void 0, t: o3, e: void 0, x: void 0, r: t5 };
if (void 0 !== o3.s) o3.s.n = t5;
o3.s = t5;
i6.n = t5;
if (32 & o3.f) i6.S(t5);
return t5;
} else if (-1 === t5.i) {
t5.i = 0;
if (void 0 !== t5.n) {
t5.n.p = t5.p;
if (void 0 !== t5.p) t5.p.n = t5.n;
t5.p = o3.s;
t5.n = void 0;
o3.s.n = t5;
o3.s = t5;
}
return t5;
}
}
}
function u3(i6) {
this.v = i6;
this.i = 0;
this.n = void 0;
this.t = void 0;
}
u3.prototype.brand = i3;
u3.prototype.h = function() {
return true;
};
u3.prototype.S = function(i6) {
if (this.t !== i6 && void 0 === i6.e) {
i6.x = this.t;
if (void 0 !== this.t) this.t.e = i6;
this.t = i6;
}
};
u3.prototype.U = function(i6) {
if (void 0 !== this.t) {
var t5 = i6.e, r5 = i6.x;
if (void 0 !== t5) {
t5.x = r5;
i6.e = void 0;
}
if (void 0 !== r5) {
r5.e = t5;
i6.x = void 0;
}
if (i6 === this.t) this.t = r5;
}
};
u3.prototype.subscribe = function(i6) {
var t5 = this;
return E2(function() {
var r5 = t5.value, n3 = o3;
o3 = void 0;
try {
i6(r5);
} finally {
o3 = n3;
}
});
};
u3.prototype.valueOf = function() {
return this.value;
};
u3.prototype.toString = function() {
return this.value + "";
};
u3.prototype.toJSON = function() {
return this.value;
};
u3.prototype.peek = function() {
var i6 = o3;
o3 = void 0;
try {
return this.value;
} finally {
o3 = i6;
}
};
Object.defineProperty(u3.prototype, "value", { get: function() {
var i6 = e3(this);
if (void 0 !== i6) i6.i = this.i;
return this.v;
}, set: function(i6) {
if (i6 !== this.v) {
if (f3 > 100) throw new Error("Cycle detected");
this.v = i6;
this.i++;
v3++;
s3++;
try {
for (var r5 = this.t; void 0 !== r5; r5 = r5.x) r5.t.N();
} finally {
t3();
}
}
} });
function d3(i6) {
return new u3(i6);
}
function c3(i6) {
for (var t5 = i6.s; void 0 !== t5; t5 = t5.n) if (t5.S.i !== t5.i || !t5.S.h() || t5.S.i !== t5.i) return true;
return false;
}
function a3(i6) {
for (var t5 = i6.s; void 0 !== t5; t5 = t5.n) {
var r5 = t5.S.n;
if (void 0 !== r5) t5.r = r5;
t5.S.n = t5;
t5.i = -1;
if (void 0 === t5.n) {
i6.s = t5;
break;
}
}
}
function l3(i6) {
var t5 = i6.s, r5 = void 0;
while (void 0 !== t5) {
var o4 = t5.p;
if (-1 === t5.i) {
t5.S.U(t5);
if (void 0 !== o4) o4.n = t5.n;
if (void 0 !== t5.n) t5.n.p = o4;
} else r5 = t5;
t5.S.n = t5.r;
if (void 0 !== t5.r) t5.r = void 0;
t5 = o4;
}
i6.s = r5;
}
function y3(i6) {
u3.call(this, void 0);
this.x = i6;
this.s = void 0;
this.g = v3 - 1;
this.f = 4;
}
(y3.prototype = new u3()).h = function() {
this.f &= -3;
if (1 & this.f) return false;
if (32 == (36 & this.f)) return true;
this.f &= -5;
if (this.g === v3) return true;
this.g = v3;
this.f |= 1;
if (this.i > 0 && !c3(this)) {
this.f &= -2;
return true;
}
var i6 = o3;
try {
a3(this);
o3 = this;
var t5 = this.x();
if (16 & this.f || this.v !== t5 || 0 === this.i) {
this.v = t5;
this.f &= -17;
this.i++;
}
} catch (i7) {
this.v = i7;
this.f |= 16;
this.i++;
}
o3 = i6;
l3(this);
this.f &= -2;
return true;
};
y3.prototype.S = function(i6) {
if (void 0 === this.t) {
this.f |= 36;
for (var t5 = this.s; void 0 !== t5; t5 = t5.n) t5.S.S(t5);
}
u3.prototype.S.call(this, i6);
};
y3.prototype.U = function(i6) {
if (void 0 !== this.t) {
u3.prototype.U.call(this, i6);
if (void 0 === this.t) {
this.f &= -33;
for (var t5 = this.s; void 0 !== t5; t5 = t5.n) t5.S.U(t5);
}
}
};
y3.prototype.N = function() {
if (!(2 & this.f)) {
this.f |= 6;
for (var i6 = this.t; void 0 !== i6; i6 = i6.x) i6.t.N();
}
};
Object.defineProperty(y3.prototype, "value", { get: function() {
if (1 & this.f) throw new Error("Cycle detected");
var i6 = e3(this);
this.h();
if (void 0 !== i6) i6.i = this.i;
if (16 & this.f) throw this.v;
return this.v;
} });
function w3(i6) {
return new y3(i6);
}
function _3(i6) {
var r5 = i6.u;
i6.u = void 0;
if ("function" == typeof r5) {
s3++;
var n3 = o3;
o3 = void 0;
try {
r5();
} catch (t5) {
i6.f &= -2;
i6.f |= 8;
g2(i6);
throw t5;
} finally {
o3 = n3;
t3();
}
}
}
function g2(i6) {
for (var t5 = i6.s; void 0 !== t5; t5 = t5.n) t5.S.U(t5);
i6.x = void 0;
i6.s = void 0;
_3(i6);
}
function p3(i6) {
if (o3 !== this) throw new Error("Out-of-order effect");
l3(this);
o3 = i6;
this.f &= -2;
if (8 & this.f) g2(this);
t3();
}
function b2(i6) {
this.x = i6;
this.u = void 0;
this.s = void 0;
this.o = void 0;
this.f = 32;
}
b2.prototype.c = function() {
var i6 = this.S();
try {
if (8 & this.f) return;
if (void 0 === this.x) return;
var t5 = this.x();
if ("function" == typeof t5) this.u = t5;
} finally {
i6();
}
};
b2.prototype.S = function() {
if (1 & this.f) throw new Error("Cycle detected");
this.f |= 1;
this.f &= -9;
_3(this);
a3(this);
s3++;
var i6 = o3;
o3 = this;
return p3.bind(this, i6);
};
b2.prototype.N = function() {
if (!(2 & this.f)) {
this.f |= 2;
this.o = h3;
h3 = this;
}
};
b2.prototype.d = function() {
this.f |= 8;
if (!(1 & this.f)) g2(this);
};
function E2(i6) {
var t5 = new b2(i6);
try {
t5.c();
} catch (i7) {
t5.d();
throw i7;
}
return t5.d.bind(t5);
}
// node_modules/@preact/signals/dist/signals.module.js
var v4;
var s4;
function l4(n3, i6) {
l[n3] = i6.bind(null, l[n3] || function() {
});
}
function d4(n3) {
if (s4) s4();
s4 = n3 && n3.S();
}
function p4(n3) {
var r5 = this, f5 = n3.data, o4 = useSignal(f5);
o4.value = f5;
var e4 = T2(function() {
var n4 = r5.__v;
while (n4 = n4.__) if (n4.__c) {
n4.__c.__$f |= 4;
break;
}
r5.__$u.c = function() {
var n5;
if (!t(e4.peek()) && 3 === (null == (n5 = r5.base) ? void 0 : n5.nodeType)) r5.base.data = e4.peek();
else {
r5.__$f |= 1;
r5.setState({});
}
};
return w3(function() {
var n5 = o4.value.value;
return 0 === n5 ? 0 : true === n5 ? "" : n5 || "";
});
}, []);
return e4.value;
}
p4.displayName = "_st";
Object.defineProperties(u3.prototype, { constructor: { configurable: true, value: void 0 }, type: { configurable: true, value: p4 }, props: { configurable: true, get: function() {
return { data: this };
} }, __b: { configurable: true, value: 1 } });
l4("__b", function(n3, r5) {
if ("string" == typeof r5.type) {
var i6, t5 = r5.props;
for (var f5 in t5) if ("children" !== f5) {
var o4 = t5[f5];
if (o4 instanceof u3) {
if (!i6) r5.__np = i6 = {};
i6[f5] = o4;
t5[f5] = o4.peek();
}
}
}
n3(r5);
});
l4("__r", function(n3, r5) {
d4();
var i6, t5 = r5.__c;
if (t5) {
t5.__$f &= -2;
if (void 0 === (i6 = t5.__$u)) t5.__$u = i6 = (function(n4) {
var r6;
E2(function() {
r6 = this;
});
r6.c = function() {
t5.__$f |= 1;
t5.setState({});
};
return r6;
})();
}
v4 = t5;
d4(i6);
n3(r5);
});
l4("__e", function(n3, r5, i6, t5) {
d4();
v4 = void 0;
n3(r5, i6, t5);
});
l4("diffed", function(n3, r5) {
d4();
v4 = void 0;
var i6;
if ("string" == typeof r5.type && (i6 = r5.__e)) {
var t5 = r5.__np, f5 = r5.props;
if (t5) {
var o4 = i6.U;
if (o4) for (var e4 in o4) {
var u5 = o4[e4];
if (void 0 !== u5 && !(e4 in t5)) {
u5.d();
o4[e4] = void 0;
}
}
else i6.U = o4 = {};
for (var a5 in t5) {
var c5 = o4[a5], s6 = t5[a5];
if (void 0 === c5) {
c5 = _4(i6, a5, s6, f5);
o4[a5] = c5;
} else c5.o(s6, f5);
}
}
}
n3(r5);
});
function _4(n3, r5, i6, t5) {
var f5 = r5 in n3 && void 0 === n3.ownerSVGElement, o4 = d3(i6);
return { o: function(n4, r6) {
o4.value = n4;
t5 = r6;
}, d: E2(function() {
var i7 = o4.value.value;
if (t5[r5] !== i7) {
t5[r5] = i7;
if (f5) n3[r5] = i7;
else if (i7) n3.setAttribute(r5, i7);
else n3.removeAttribute(r5);
}
}) };
}
l4("unmount", function(n3, r5) {
if ("string" == typeof r5.type) {
var i6 = r5.__e;
if (i6) {
var t5 = i6.U;
if (t5) {
i6.U = void 0;
for (var f5 in t5) {
var o4 = t5[f5];
if (o4) o4.d();
}
}
}
} else {
var e4 = r5.__c;
if (e4) {
var u5 = e4.__$u;
if (u5) {
e4.__$u = void 0;
u5.d();
}
}
}
n3(r5);
});
l4("__h", function(n3, r5, i6, t5) {
if (t5 < 3 || 9 === t5) r5.__$f |= 2;
n3(r5, i6, t5);
});
C.prototype.shouldComponentUpdate = function(n3, r5) {
var i6 = this.__$u;
if (!(i6 && void 0 !== i6.s || 4 & this.__$f)) return true;
if (3 & this.__$f) return true;
for (var t5 in r5) return true;
for (var f5 in n3) if ("__source" !== f5 && n3[f5] !== this.props[f5]) return true;
for (var o4 in this.props) if (!(o4 in n3)) return true;
return false;
};
function useSignal(n3) {
return T2(function() {
return d3(n3);
}, []);
}
// packages/interactivity/build-module/directives.mjs
init_preact_module();
// packages/interactivity/build-module/namespaces.mjs
var namespaceStack = [];
var getNamespace = () => namespaceStack.slice(-1)[0];
var setNamespace = (namespace) => {
namespaceStack.push(namespace);
};
var resetNamespace = () => {
namespaceStack.pop();
};
// packages/interactivity/build-module/scopes.mjs
var scopeStack = [];
var getScope = () => scopeStack.slice(-1)[0];
var setScope = (scope) => {
scopeStack.push(scope);
};
var resetScope = () => {
scopeStack.pop();
};
var throwNotInScope = (method) => {
throw Error(
`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)\`.`
);
};
var getContext = (namespace) => {
const scope = getScope();
if (true) {
if (!scope) {
throwNotInScope("getContext");
}
}
return scope.context[namespace || getNamespace()];
};
var getElement = () => {
const scope = getScope();
let deepReadOnlyOptions = {};
if (true) {
if (!scope) {
throwNotInScope("getElement");
}
deepReadOnlyOptions = {
errorMessage: "Don't mutate the attributes from `getElement`, use `data-wp-bind` to modify the attributes of an element instead."
};
}
const { ref, attributes } = scope;
return Object.freeze({
ref: ref.current,
attributes: deepReadOnly(attributes, deepReadOnlyOptions)
});
};
var navigationContextSignal = d3(0);
function getServerContext(namespace) {
const scope = getScope();
if (true) {
if (!scope) {
throwNotInScope("getServerContext");
}
}
getServerContext.subscribe = navigationContextSignal.value;
return deepClone(scope.serverContext[namespace || getNamespace()]);
}
getServerContext.subscribe = 0;
// packages/interactivity/build-module/utils.mjs
var afterNextFrame = (callback) => {
return new Promise((resolve2) => {
const done = () => {
clearTimeout(timeout);
window.cancelAnimationFrame(raf);
setTimeout(() => {
callback();
resolve2();
});
};
const timeout = setTimeout(done, 100);
const raf = window.requestAnimationFrame(done);
});
};
var splitTask = typeof window.scheduler?.yield === "function" ? window.scheduler.yield.bind(window.scheduler) : () => {
return new Promise((resolve2) => {
setTimeout(resolve2, 0);
});
};
var onDOMReady = (callback) => {
const [navigation] = performance.getEntriesByType("navigation");
if (navigation.domContentLoadedEventStart > 0) {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
};
function createFlusher(compute, notify) {
let flush = () => void 0;
const dispose = E2(function() {
flush = this.c.bind(this);
this.x = compute;
this.c = notify;
return compute();
});
return { flush, dispose };
}
function useSignalEffect(callback) {
y2(() => {
let eff = null;
let isExecuting = false;
const notify = async () => {
if (eff && !isExecuting) {
isExecuting = true;
await afterNextFrame(eff.flush);
isExecuting = false;
}
};
eff = createFlusher(callback, notify);
return eff.dispose;
}, []);
}
function withScope(func) {
const scope = getScope();
const ns = getNamespace();
let wrapped;
if (func?.constructor?.name === "GeneratorFunction") {
wrapped = async (...args) => {
const gen = func(...args);
let value;
let it;
let error;
while (true) {
setNamespace(ns);
setScope(scope);
try {
it = error ? gen.throw(error) : gen.next(value);
error = void 0;
} catch (e4) {
throw e4;
} finally {
resetScope();
resetNamespace();
}
try {
value = await it.value;
} catch (e4) {
error = e4;
}
if (it.done) {
if (error) {
throw error;
} else {
break;
}
}
}
return value;
};
} else {
wrapped = (...args) => {
setNamespace(ns);
setScope(scope);
try {
return func(...args);
} finally {
resetNamespace();
resetScope();
}
};
}
const syncAware = func;
if (syncAware.sync) {
const syncAwareWrapped = wrapped;
syncAwareWrapped.sync = true;
return syncAwareWrapped;
}
return wrapped;
}
function useWatch(callback) {
useSignalEffect(withScope(callback));
}
function useInit(callback) {
y2(withScope(callback), []);
}
function useEffect(callback, inputs) {
y2(withScope(callback), inputs);
}
function useLayoutEffect(callback, inputs) {
_2(withScope(callback), inputs);
}
function useCallback(callback, inputs) {
return q2(withScope(callback), inputs);
}
function useMemo(factory, inputs) {
return T2(withScope(factory), inputs);
}
var createRootFragment = (parent, replaceNode) => {
replaceNode = [].concat(replaceNode);
const sibling = replaceNode[replaceNode.length - 1].nextSibling;
function insert(child, root) {
parent.insertBefore(child, root || sibling);
}
return parent.__k = {
nodeType: 1,
parentNode: parent,
firstChild: replaceNode[0],
childNodes: replaceNode,
insertBefore: insert,
appendChild: insert,
removeChild(c5) {
parent.removeChild(c5);
},
contains(c5) {
parent.contains(c5);
}
};
};
function kebabToCamelCase(str) {
return str.replace(/^-+|-+$/g, "").toLowerCase().replace(/-([a-z])/g, function(_match, group1) {
return group1.toUpperCase();
});
}
var logged = /* @__PURE__ */ new Set();
var warn = (message) => {
if (true) {
if (logged.has(message)) {
return;
}
console.warn(message);
try {
throw Error(message);
} catch (e4) {
}
logged.add(message);
}
};
var isPlainObject = (candidate) => Boolean(
candidate && typeof candidate === "object" && candidate.constructor === Object
);
function withSyncEvent(callback) {
const syncAware = callback;
syncAware.sync = true;
return syncAware;
}
var readOnlyMap = /* @__PURE__ */ new WeakMap();
var createDeepReadOnlyHandlers = (errorMessage) => {
const handleError = () => {
if (true) {
warn(errorMessage);
}
return false;
};
return {
get(target, prop) {
const value = target[prop];
if (value && typeof value === "object") {
return deepReadOnly(value, { errorMessage });
}
return value;
},
set: handleError,
deleteProperty: handleError,
defineProperty: handleError
};
};
function deepReadOnly(obj, options) {
const errorMessage = options?.errorMessage ?? "Cannot modify read-only object";
if (!readOnlyMap.has(obj)) {
const handlers = createDeepReadOnlyHandlers(errorMessage);
readOnlyMap.set(obj, new Proxy(obj, handlers));
}
return readOnlyMap.get(obj);
}
var navigationSignal = d3(0);
var sessionId = Math.random().toString(36).slice(2);
function deepClone(source) {
if (isPlainObject(source)) {
return Object.fromEntries(
Object.entries(source).map(([key, value]) => [
key,
deepClone(value)
])
);
}
if (Array.isArray(source)) {
return source.map((i6) => deepClone(i6));
}
return source;
}
// packages/interactivity/build-module/hooks.mjs
init_preact_module();
// packages/interactivity/build-module/proxies/registry.mjs
var objToProxy = /* @__PURE__ */ new WeakMap();
var proxyToObj = /* @__PURE__ */ new WeakMap();
var proxyToNs = /* @__PURE__ */ new WeakMap();
var supported = /* @__PURE__ */ new Set([Object, Array]);
var createProxy = (namespace, obj, handlers) => {
if (!shouldProxy(obj)) {
throw Error("This object cannot be proxified.");
}
if (!objToProxy.has(obj)) {
const proxy = new Proxy(obj, handlers);
objToProxy.set(obj, proxy);
proxyToObj.set(proxy, obj);
proxyToNs.set(proxy, namespace);
}
return objToProxy.get(obj);
};
var getProxyFromObject = (obj) => objToProxy.get(obj);
var getNamespaceFromProxy = (proxy) => proxyToNs.get(proxy);
var shouldProxy = (candidate) => {
if (typeof candidate !== "object" || candidate === null) {
return false;
}
return !proxyToNs.has(candidate) && supported.has(candidate.constructor);
};
var getObjectFromProxy = (proxy) => proxyToObj.get(proxy);
// packages/interactivity/build-module/proxies/signals.mjs
var NO_SCOPE = {};
var PropSignal = class {
/**
* Proxy that holds the property this PropSignal is associated with.
*/
owner;
/**
* Relation of computeds by scope. These computeds are read-only signals
* that depend on whether the property is a value or a getter and,
* therefore, can return different values depending on the scope in which
* the getter is accessed.
*/
computedsByScope;
/**
* Signal with the value assigned to the related property.
*/
valueSignal;
/**
* Signal with the getter assigned to the related property.
*/
getterSignal;
/**
* Pending getter to be consolidated.
*/
pendingGetter;
/**
* Structure that manages reactivity for a property in a state object, using
* signals to keep track of property value or getter modifications.
*
* @param owner Proxy that holds the property this instance is associated
* with.
*/
constructor(owner) {
this.owner = owner;
this.computedsByScope = /* @__PURE__ */ new WeakMap();
}
/**
* Changes the internal value. If a getter was set before, it is set to
* `undefined`.
*
* @param value New value.
*/
setValue(value) {
this.update({ value });
}
/**
* Changes the internal getter. If a value was set before, it is set to
* `undefined`.
*
* @param getter New getter.
*/
setGetter(getter) {
this.update({ get: getter });
}
/**
* Changes the internal getter asynchronously.
*
* The update is made in a microtask, which prevents issues with getters
* accessing the state, and ensures the update occurs before any render.
*
* @param getter New getter.
*/
setPendingGetter(getter) {
this.pendingGetter = getter;
queueMicrotask(() => this.consolidateGetter());
}
/**
* Consolidate the pending value of the getter.
*/
consolidateGetter() {
const getter = this.pendingGetter;
if (getter) {
this.pendingGetter = void 0;
this.update({ get: getter });
}
}
/**
* Returns the computed that holds the result of evaluating the prop in the
* current scope.
*
* These computeds are read-only signals that depend on whether the property
* is a value or a getter and, therefore, can return different values
* depending on the scope in which the getter is accessed.
*
* @return Computed that depends on the scope.
*/
getComputed() {
const scope = getScope() || NO_SCOPE;
if (!this.valueSignal && !this.getterSignal) {
this.update({});
}
if (this.pendingGetter) {
this.consolidateGetter();
}
if (!this.computedsByScope.has(scope)) {
const callback = () => {
const getter = this.getterSignal?.value;
return getter ? getter.call(this.owner) : this.valueSignal?.value;
};
setNamespace(getNamespaceFromProxy(this.owner));
this.computedsByScope.set(
scope,
w3(withScope(callback))
);
resetNamespace();
}
return this.computedsByScope.get(scope);
}
/**
* Updates the internal signals for the value and the getter of the
* corresponding prop.
*
* @param param0
* @param param0.get New getter.
* @param param0.value New value.
*/
update({ get, value }) {
if (!this.valueSignal) {
this.valueSignal = d3(value);
this.getterSignal = d3(get);
} else if (value !== this.valueSignal.peek() || get !== this.getterSignal.peek()) {
r3(() => {
this.valueSignal.value = value;
this.getterSignal.value = get;
});
}
}
};
// packages/interactivity/build-module/proxies/state.mjs
var wellKnownSymbols = new Set(
Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter((value) => typeof value === "symbol")
);
var proxyToProps = /* @__PURE__ */ new WeakMap();
var hasPropSignal = (proxy, key) => proxyToProps.has(proxy) && proxyToProps.get(proxy).has(key);
var getPropSignal = (proxy, key, initial) => {
if (!proxyToProps.has(proxy)) {
proxyToProps.set(proxy, /* @__PURE__ */ new Map());
}
key = typeof key === "number" ? `${key}` : key;
const props = proxyToProps.get(proxy);
if (!props.has(key)) {
const ns = getNamespaceFromProxy(proxy);
const prop = new PropSignal(proxy);
props.set(key, prop);
if (initial) {
const { get, value } = initial;
if (get) {
prop.setGetter(get);
} else {
prop.setValue(
shouldProxy(value) ? proxifyState(ns, value) : value
);
}
}
}
return props.get(key);
};
var objToIterable = /* @__PURE__ */ new WeakMap();
var peeking = false;
var PENDING_GETTER = /* @__PURE__ */ Symbol("PENDING_GETTER");
var stateHandlers = {
get(target, key, receiver) {
if (peeking || !target.hasOwnProperty(key) && key in target || typeof key === "symbol" && wellKnownSymbols.has(key)) {
return Reflect.get(target, key, receiver);
}
const desc = Object.getOwnPropertyDescriptor(target, key);
const prop = getPropSignal(receiver, key, desc);
const result = prop.getComputed().value;
if (result === PENDING_GETTER) {
throw PENDING_GETTER;
}
if (typeof result === "function") {
const ns = getNamespaceFromProxy(receiver);
return (...args) => {
setNamespace(ns);
try {
return result.call(receiver, ...args);
} finally {
resetNamespace();
}
};
}
return result;
},
set(target, key, value, receiver) {
setNamespace(getNamespaceFromProxy(receiver));
try {
return Reflect.set(target, key, value, receiver);
} finally {
resetNamespace();
}
},
defineProperty(target, key, desc) {
const isNew = !(key in target);
const result = Reflect.defineProperty(target, key, desc);
if (result) {
const receiver = getProxyFromObject(target);
const prop = getPropSignal(receiver, key);
const { get, value } = desc;
if (get) {
prop.setGetter(get);
} else {
const ns = getNamespaceFromProxy(receiver);
prop.setValue(
shouldProxy(value) ? proxifyState(ns, value) : value
);
}
if (isNew && objToIterable.has(target)) {
objToIterable.get(target).value++;
}
if (Array.isArray(target) && proxyToProps.get(receiver)?.has("length")) {
const length = getPropSignal(receiver, "length");
length.setValue(target.length);
}
}
return result;
},
deleteProperty(target, key) {
const result = Reflect.deleteProperty(target, key);
if (result) {
const prop = getPropSignal(getProxyFromObject(target), key);
prop.setValue(void 0);
if (objToIterable.has(target)) {
objToIterable.get(target).value++;
}
}
return result;
},
ownKeys(target) {
if (!objToIterable.has(target)) {
objToIterable.set(target, d3(0));
}
objToIterable._ = objToIterable.get(target).value;
return Reflect.ownKeys(target);
}
};
var proxifyState = (namespace, obj) => {
return createProxy(namespace, obj, stateHandlers);
};
var peek = (obj, key) => {
peeking = true;
try {
return obj[key];
} finally {
peeking = false;
}
};
var deepMergeRecursive = (target, source, override = true) => {
if (!(isPlainObject(target) && isPlainObject(source))) {
return;
}
let hasNewKeys = false;
for (const key in source) {
const isNew = !(key in target);
hasNewKeys = hasNewKeys || isNew;
const desc = Object.getOwnPropertyDescriptor(source, key);
const proxy = getProxyFromObject(target);
const propSignal = !!proxy && hasPropSignal(proxy, key) && getPropSignal(proxy, key);
if (typeof desc.get === "function" || typeof desc.set === "function") {
if (override || isNew) {
Object.defineProperty(target, key, {
...desc,
configurable: true,
enumerable: true
});
if (desc.get && propSignal) {
propSignal.setPendingGetter(desc.get);
}
}
} else if (isPlainObject(source[key])) {
const targetValue = Object.getOwnPropertyDescriptor(target, key)?.value;
if (isNew || override && !isPlainObject(targetValue)) {
target[key] = {};
if (propSignal) {
const ns = getNamespaceFromProxy(proxy);
propSignal.setValue(
proxifyState(ns, target[key])
);
}
deepMergeRecursive(target[key], source[key], override);
} else if (isPlainObject(targetValue)) {
deepMergeRecursive(target[key], source[key], override);
}
} else if (override || isNew) {
Object.defineProperty(target, key, desc);
if (propSignal) {
const { value } = desc;
const ns = getNamespaceFromProxy(proxy);
propSignal.setValue(
shouldProxy(value) ? proxifyState(ns, value) : value
);
}
}
}
if (hasNewKeys && objToIterable.has(target)) {
objToIterable.get(target).value++;
}
};
var deepMerge = (target, source, override = true) => r3(
() => deepMergeRecursive(
getObjectFromProxy(target) || target,
source,
override
)
);
// packages/interactivity/build-module/proxies/store.mjs
var storeRoots = /* @__PURE__ */ new WeakSet();
var storeHandlers = {
get: (target, key, receiver) => {
const result = Reflect.get(target, key);
const ns = getNamespaceFromProxy(receiver);
if (typeof result === "undefined" && storeRoots.has(receiver)) {
const obj = {};
Reflect.set(target, key, obj);
return proxifyStore(ns, obj, false);
}
if (typeof result === "function") {
setNamespace(ns);
const scoped = withScope(result);
resetNamespace();
return scoped;
}
if (isPlainObject(result) && shouldProxy(result)) {
return proxifyStore(ns, result, false);
}
return result;
}
};
var proxifyStore = (namespace, obj, isRoot = true) => {
const proxy = createProxy(namespace, obj, storeHandlers);
if (proxy && isRoot) {
storeRoots.add(proxy);
}
return proxy;
};
// packages/interactivity/build-module/proxies/context.mjs
var contextObjectToProxy = /* @__PURE__ */ new WeakMap();
var contextObjectToFallback = /* @__PURE__ */ new WeakMap();
var contextProxies = /* @__PURE__ */ new WeakSet();
var descriptor = Reflect.getOwnPropertyDescriptor;
var contextHandlers = {
get: (target, key) => {
const fallback = contextObjectToFallback.get(target);
const currentProp = target[key];
return key in target ? currentProp : fallback[key];
},
set: (target, key, value) => {
const fallback = contextObjectToFallback.get(target);
const obj = key in target || !(key in fallback) ? target : fallback;
obj[key] = value;
return true;
},
ownKeys: (target) => [
.../* @__PURE__ */ new Set([
...Object.keys(contextObjectToFallback.get(target)),
...Object.keys(target)
])
],
getOwnPropertyDescriptor: (target, key) => descriptor(target, key) || descriptor(contextObjectToFallback.get(target), key),
has: (target, key) => Reflect.has(target, key) || Reflect.has(contextObjectToFallback.get(target), key)
};
var proxifyContext = (current, inherited = {}) => {
if (contextProxies.has(current)) {
throw Error("This object cannot be proxified.");
}
contextObjectToFallback.set(current, inherited);
if (!contextObjectToProxy.has(current)) {
const proxy = new Proxy(current, contextHandlers);
contextObjectToProxy.set(current, proxy);
contextProxies.add(proxy);
}
return contextObjectToProxy.get(current);
};
// packages/interactivity/build-module/store.mjs
var stores = /* @__PURE__ */ new Map();
var rawStores = /* @__PURE__ */ new Map();
var storeLocks = /* @__PURE__ */ new Map();
var storeConfigs = /* @__PURE__ */ new Map();
var serverStates = /* @__PURE__ */ new Map();
var getConfig = (namespace) => storeConfigs.get(namespace || getNamespace()) || {};
function getServerState(namespace) {
const ns = namespace || getNamespace();
if (!serverStates.has(ns)) {
serverStates.set(ns, {});
}
getServerState.subscribe = navigationSignal.value;
return deepClone(serverStates.get(ns));
}
getServerState.subscribe = 0;
var universalUnlock = "I acknowledge that using a private store means my plugin will inevitably break on the next store release.";
function store(namespace, { state = {}, ...block } = {}, { lock = false } = {}) {
if (!stores.has(namespace)) {
if (lock !== universalUnlock) {
storeLocks.set(namespace, lock);
}
const rawStore = {
state: proxifyState(
namespace,
isPlainObject(state) ? state : {}
),
...block
};
const proxifiedStore = proxifyStore(namespace, rawStore);
rawStores.set(namespace, rawStore);
stores.set(namespace, proxifiedStore);
} else {
if (lock !== universalUnlock && !storeLocks.has(namespace)) {
storeLocks.set(namespace, lock);
} else {
const storeLock = storeLocks.get(namespace);
const isLockValid = lock === universalUnlock || lock !== true && lock === storeLock;
if (!isLockValid) {
if (!storeLock) {
throw Error("Cannot lock a public store");
} else {
throw Error(
"Cannot unlock a private store with an invalid lock code"
);
}
}
}
const target = rawStores.get(namespace);
deepMerge(target, block);
deepMerge(target.state, state);
}
return stores.get(namespace);
}
var parseServerData = (dom = document) => {
const jsonDataScriptTag = (
// Preferred Script Module data passing form
dom.getElementById(
"wp-script-module-data-@wordpress/interactivity"
) ?? // Legacy form
dom.getElementById("wp-interactivity-data")
);
if (jsonDataScriptTag?.textContent) {
try {
return JSON.parse(jsonDataScriptTag.textContent);
} catch {
}
}
return {};
};
var populateServerData = (data) => {
serverStates.clear();
storeConfigs.clear();
if (isPlainObject(data?.state)) {
Object.entries(data.state).forEach(([namespace, state]) => {
const st = store(namespace, {}, { lock: universalUnlock });
deepMerge(st.state, state, false);
serverStates.set(namespace, state);
});
}
if (isPlainObject(data?.config)) {
Object.entries(data.config).forEach(([namespace, config]) => {
storeConfigs.set(namespace, config);
});
}
if (isPlainObject(data?.derivedStateClosures)) {
Object.entries(data.derivedStateClosures).forEach(
([namespace, paths]) => {
const st = store(
namespace,
{},
{ lock: universalUnlock }
);
paths.forEach((path) => {
const pathParts = path.split(".");
const prop = pathParts.splice(-1, 1)[0];
const parent = pathParts.reduce(
(prev, key) => peek(prev, key),
st
);
const desc = Object.getOwnPropertyDescriptor(
parent,
prop
);
if (isPlainObject(desc?.value)) {
parent[prop] = PENDING_GETTER;
}
});
}
);
}
};
// packages/interactivity/build-module/hooks.mjs
function isNonDefaultDirectiveSuffix(entry) {
return entry.suffix !== null;
}
function isDefaultDirectiveSuffix(entry) {
return entry.suffix === null;
}
var context = X({ client: {}, server: {} });
var directiveCallbacks = {};
var directivePriorities = {};
var directive = (name, callback, { priority = 10 } = {}) => {
directiveCallbacks[name] = callback;
directivePriorities[name] = priority;
};
var resolve = (path, namespace) => {
if (!namespace) {
warn(
`Namespace missing for "${path}". The value for that path won't be resolved.`
);
return;
}
let resolvedStore = stores.get(namespace);
if (typeof resolvedStore === "undefined") {
resolvedStore = store(
namespace,
{},
{
lock: universalUnlock
}
);
}
const current = {
...resolvedStore,
context: getScope().context[namespace]
};
try {
const pathParts = path.split(".");
return pathParts.reduce((acc, key) => acc[key], current);
} catch (e4) {
if (e4 === PENDING_GETTER) {
return PENDING_GETTER;
}
}
};
var getEvaluate = ({ scope }) => (
// TODO: When removing the temporarily remaining `value( ...args )` call below, remove the `...args` parameter too.
((entry, ...args) => {
let { value: path, namespace } = entry;
if (typeof path !== "string") {
throw new Error("The `value` prop should be a string path");
}
const hasNegationOperator = path[0] === "!" && !!(path = path.slice(1));
setScope(scope);
const value = resolve(path, namespace);
if (typeof value === "function") {
if (hasNegationOperator) {
warn(
"Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead."
);
const functionResult = !value(...args);
resetScope();
return functionResult;
}
resetScope();
const wrappedFunction = (...functionArgs) => {
setScope(scope);
const functionResult = value(...functionArgs);
resetScope();
return functionResult;
};
if (value.sync) {
const syncAwareFunction = wrappedFunction;
syncAwareFunction.sync = true;
}
return wrappedFunction;
}
const result = value;
resetScope();
return hasNegationOperator && value !== PENDING_GETTER ? !result : result;
})
);
var getPriorityLevels = (directives) => {
const byPriority = Object.keys(directives).reduce((obj, name) => {
if (directiveCallbacks[name]) {
const priority = directivePriorities[name];
(obj[priority] = obj[priority] || []).push(name);
}
return obj;
}, {});
return Object.entries(byPriority).sort(([p1], [p22]) => parseInt(p1) - parseInt(p22)).map(([, arr]) => arr);
};
var Directives = ({
directives,
priorityLevels: [currentPriorityLevel, ...nextPriorityLevels],
element,
originalProps,
previousScope
}) => {
const scope = A2({}).current;
scope.evaluate = q2(getEvaluate({ scope }), []);
const { client, server } = x2(context);
scope.context = client;
scope.serverContext = server;
scope.ref = previousScope?.ref || A2(null);
element = W(element, { ref: scope.ref });
scope.attributes = element.props;
const children = nextPriorityLevels.length > 0 ? k(Directives, {
directives,
priorityLevels: nextPriorityLevels,
element,
originalProps,
previousScope: scope
}) : element;
const props = { ...originalProps, children };
const directiveArgs = {
directives,
props,
element,
context,
evaluate: scope.evaluate
};
setScope(scope);
for (const directiveName of currentPriorityLevel) {
const wrapper = directiveCallbacks[directiveName]?.(directiveArgs);
if (wrapper !== void 0) {
props.children = wrapper;
}
}
resetScope();
return props.children;
};
var old = l.vnode;
l.vnode = (vnode) => {
if (vnode.props.__directives) {
const props = vnode.props;
const directives = props.__directives;
if (directives.key) {
vnode.key = directives.key.find(isDefaultDirectiveSuffix).value;
}
delete props.__directives;
const priorityLevels = getPriorityLevels(directives);
if (priorityLevels.length > 0) {
vnode.props = {
directives,
priorityLevels,
originalProps: props,
type: vnode.type,
element: k(vnode.type, props),
top: true
};
vnode.type = Directives;
}
}
if (old) {
old(vnode);
}
};
// packages/interactivity/build-module/directives.mjs
var warnUniqueIdWithTwoHyphens = (prefix, suffix, uniqueId) => {
if (true) {
warn(
`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.`
);
}
};
var warnUniqueIdNotSupported = (prefix, uniqueId) => {
if (true) {
warn(
`Unique IDs are not supported for the data-wp-${prefix} directive. Ignoring the directive with unique ID "${uniqueId}".`
);
}
};
var warnWithSyncEvent = (wrongPrefix, rightPrefix) => {
if (true) {
warn(
`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.`
);
}
};
function wrapEventAsync(event) {
const handler = {
get(target, prop, receiver) {
const value = target[prop];
switch (prop) {
case "currentTarget":
if (true) {
warn(
`Accessing the synchronous event.${prop} property in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent().`
);
}
break;
case "preventDefault":
case "stopImmediatePropagation":
case "stopPropagation":
if (true) {
warn(
`Using the synchronous event.${prop}() function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent().`
);
}
break;
}
if (value instanceof Function) {
return function(...args) {
return value.apply(
this === receiver ? target : this,
args
);
};
}
return value;
}
};
return new Proxy(event, handler);
}
var newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g;
var ruleClean = /\/\*[^]*?\*\/| +/g;
var ruleNewline = /\n+/g;
var empty = " ";
var cssStringToObject = (val) => {
const tree = [{}];
let block, left;
while (block = newRule.exec(val.replace(ruleClean, ""))) {
if (block[4]) {
tree.shift();
} else if (block[3]) {
left = block[3].replace(ruleNewline, empty).trim();
tree.unshift(tree[0][left] = tree[0][left] || {});
} else {
tree[0][block[1]] = block[2].replace(ruleNewline, empty).trim();
}
}
return tree[0];
};
var getGlobalEventDirective = (type) => {
return ({ directives, evaluate }) => {
directives[`on-${type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
const suffixParts = entry.suffix.split("--", 2);
const eventName = suffixParts[0];
if (true) {
if (suffixParts[1]) {
warnUniqueIdWithTwoHyphens(
`on-${type}`,
suffixParts[0],
suffixParts[1]
);
}
}
useInit(() => {
const cb = (event) => {
const result = evaluate(entry);
if (typeof result === "function") {
if (!result?.sync) {
event = wrapEventAsync(event);
}
result(event);
}
};
const globalVar = type === "window" ? window : document;
globalVar.addEventListener(eventName, cb);
return () => globalVar.removeEventListener(eventName, cb);
});
});
};
};
var evaluateItemKey = (inheritedValue, namespace, item, itemProp, eachKey) => {
const clientContextWithItem = {
...inheritedValue.client,
[namespace]: {
...inheritedValue.client[namespace],
[itemProp]: item
}
};
const scope = {
...getScope(),
context: clientContextWithItem,
serverContext: inheritedValue.server
};
return eachKey ? getEvaluate({ scope })(eachKey) : item;
};
var useItemContexts = function* (inheritedValue, namespace, items, itemProp, eachKey) {
const { current: itemContexts } = A2(/* @__PURE__ */ new Map());
for (const item of items) {
const key = evaluateItemKey(
inheritedValue,
namespace,
item,
itemProp,
eachKey
);
if (!itemContexts.has(key)) {
itemContexts.set(
key,
proxifyContext(
proxifyState(namespace, {
// Inits the item prop in the context to shadow it in case
// it was inherited from the parent context. The actual
// value is set in the `wp-each` directive later on.
[itemProp]: void 0
}),
inheritedValue.client[namespace]
)
);
}
yield [item, itemContexts.get(key), key];
}
};
var getGlobalAsyncEventDirective = (type) => {
return ({ directives, evaluate }) => {
directives[`on-async-${type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
if (true) {
warnWithSyncEvent(`on-async-${type}`, `on-${type}`);
}
const eventName = entry.suffix.split("--", 1)[0];
useInit(() => {
const cb = async (event) => {
await splitTask();
const result = evaluate(entry);
if (typeof result === "function") {
result(event);
}
};
const globalVar = type === "window" ? window : document;
globalVar.addEventListener(eventName, cb, {
passive: true
});
return () => globalVar.removeEventListener(eventName, cb);
});
});
};
};
var routerRegions = /* @__PURE__ */ new Map();
var directives_default = () => {
directive(
"context",
({
directives: { context: context2 },
props: { children },
context: inheritedContext
}) => {
const entries = context2.filter(isDefaultDirectiveSuffix).reverse();
if (!entries.length) {
if (true) {
warn(
"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."
);
}
return;
}
const { Provider } = inheritedContext;
const { client: inheritedClient, server: inheritedServer } = x2(inheritedContext);
const client = A2({});
const server = {};
const result = {
client: { ...inheritedClient },
server: { ...inheritedServer }
};
const namespaces2 = /* @__PURE__ */ new Set();
entries.forEach(({ value, namespace, uniqueId }) => {
if (!isPlainObject(value)) {
if (true) {
warn(
`The value of data-wp-context${uniqueId ? `---${uniqueId}` : ""} on the ${namespace} namespace must be a valid stringified JSON object.`
);
}
return;
}
if (!client.current[namespace]) {
client.current[namespace] = proxifyState(namespace, {});
}
deepMerge(
client.current[namespace],
deepClone(value),
false
);
server[namespace] = value;
namespaces2.add(namespace);
});
namespaces2.forEach((namespace) => {
result.client[namespace] = proxifyContext(
client.current[namespace],
inheritedClient[namespace]
);
result.server[namespace] = proxifyContext(
server[namespace],
inheritedServer[namespace]
);
});
return k(Provider, { value: result }, children);
},
{ priority: 5 }
);
directive("watch", ({ directives: { watch: watch2 }, evaluate }) => {
watch2.forEach((entry) => {
if (true) {
if (entry.suffix) {
warnUniqueIdWithTwoHyphens("watch", entry.suffix);
}
}
useWatch(() => {
let start;
if (false) {
if (true) {
start = performance.now();
}
}
let result = evaluate(entry);
if (typeof result === "function") {
result = result();
}
if (false) {
if (true) {
performance.measure(
`interactivity api watch ${entry.namespace}`,
{
start,
end: performance.now(),
detail: {
devtools: {
track: `IA: watch ${entry.namespace}`
}
}
}
);
}
}
return result;
});
});
});
directive("init", ({ directives: { init }, evaluate }) => {
init.forEach((entry) => {
if (true) {
if (entry.suffix) {
warnUniqueIdWithTwoHyphens("init", entry.suffix);
}
}
useInit(() => {
let start;
if (false) {
if (true) {
start = performance.now();
}
}
let result = evaluate(entry);
if (typeof result === "function") {
result = result();
}
if (false) {
if (true) {
performance.measure(
`interactivity api init ${entry.namespace}`,
{
start,
end: performance.now(),
detail: {
devtools: {
track: `IA: init ${entry.namespace}`
}
}
}
);
}
}
return result;
});
});
});
directive("on", ({ directives: { on }, element, evaluate }) => {
const events = /* @__PURE__ */ new Map();
on.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
const suffixParts = entry.suffix.split("--", 2);
if (true) {
if (suffixParts[1]) {
warnUniqueIdWithTwoHyphens(
"on",
suffixParts[0],
suffixParts[1]
);
}
}
if (!events.has(suffixParts[0])) {
events.set(suffixParts[0], /* @__PURE__ */ new Set());
}
events.get(suffixParts[0]).add(entry);
});
events.forEach((entries, eventType) => {
const existingHandler = element.props[`on${eventType}`];
element.props[`on${eventType}`] = (event) => {
if (existingHandler) {
existingHandler(event);
}
entries.forEach((entry) => {
let start;
if (false) {
if (true) {
start = performance.now();
}
}
const result = evaluate(entry);
if (typeof result === "function") {
if (!result?.sync) {
event = wrapEventAsync(event);
}
result(event);
}
if (false) {
if (true) {
performance.measure(
`interactivity api on ${entry.namespace}`,
{
start,
end: performance.now(),
detail: {
devtools: {
track: `IA: on ${entry.namespace}`
}
}
}
);
}
}
});
};
});
});
directive(
"on-async",
({ directives: { "on-async": onAsync }, element, evaluate }) => {
if (true) {
warnWithSyncEvent("on-async", "on");
}
const events = /* @__PURE__ */ new Map();
onAsync.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
const event = entry.suffix.split("--", 1)[0];
if (!events.has(event)) {
events.set(event, /* @__PURE__ */ new Set());
}
events.get(event).add(entry);
});
events.forEach((entries, eventType) => {
const existingHandler = element.props[`on${eventType}`];
element.props[`on${eventType}`] = (event) => {
if (existingHandler) {
existingHandler(event);
}
entries.forEach(async (entry) => {
await splitTask();
const result = evaluate(entry);
if (typeof result === "function") {
result(event);
}
});
};
});
}
);
directive("on-window", getGlobalEventDirective("window"));
directive("on-document", getGlobalEventDirective("document"));
directive("on-async-window", getGlobalAsyncEventDirective("window"));
directive(
"on-async-document",
getGlobalAsyncEventDirective("document")
);
directive(
"class",
({ directives: { class: classNames }, element, evaluate }) => {
classNames.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
const className = entry.uniqueId ? `${entry.suffix}---${entry.uniqueId}` : entry.suffix;
let result = evaluate(entry);
if (result === PENDING_GETTER) {
return;
}
if (typeof result === "function") {
result = result();
}
const currentClass = element.props.class || "";
const classFinder = new RegExp(
`(^|\\s)${className}(\\s|$)`,
"g"
);
if (!result) {
element.props.class = currentClass.replace(classFinder, " ").trim();
} else if (!classFinder.test(currentClass)) {
element.props.class = currentClass ? `${currentClass} ${className}` : className;
}
useInit(() => {
if (!result) {
element.ref.current.classList.remove(className);
} else {
element.ref.current.classList.add(className);
}
});
});
}
);
directive("style", ({ directives: { style }, element, evaluate }) => {
style.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
if (entry.uniqueId) {
if (true) {
warnUniqueIdNotSupported("style", entry.uniqueId);
}
return;
}
const styleProp = entry.suffix;
let result = evaluate(entry);
if (result === PENDING_GETTER) {
return;
}
if (typeof result === "function") {
result = result();
}
element.props.style = element.props.style || {};
if (typeof element.props.style === "string") {
element.props.style = cssStringToObject(element.props.style);
}
if (!result) {
delete element.props.style[styleProp];
} else {
element.props.style[styleProp] = result;
}
useInit(() => {
if (!result) {
element.ref.current.style.removeProperty(styleProp);
} else {
element.ref.current.style.setProperty(styleProp, result);
}
});
});
});
directive("bind", ({ directives: { bind }, element, evaluate }) => {
bind.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
if (entry.uniqueId) {
if (true) {
warnUniqueIdNotSupported("bind", entry.uniqueId);
}
return;
}
const attribute = entry.suffix;
let result = evaluate(entry);
if (result === PENDING_GETTER) {
return;
}
if (typeof result === "function") {
result = result();
}
element.props[attribute] = result;
useInit(() => {
const el = element.ref.current;
if (attribute === "style") {
if (typeof result === "string") {
el.style.cssText = result;
}
return;
} else if (attribute !== "width" && attribute !== "height" && attribute !== "href" && attribute !== "list" && attribute !== "form" && /*
* The value for `tabindex` follows the parsing rules for an
* integer. If that fails, or if the attribute isn't present, then
* the browsers should "follow platform conventions to determine if
* the element should be considered as a focusable area",
* practically meaning that most elements get a default of `-1` (not
* focusable), but several also get a default of `0` (focusable in
* order after all elements with a positive `tabindex` value).
*
* @see https://html.spec.whatwg.org/#tabindex-value
*/
attribute !== "tabIndex" && attribute !== "download" && attribute !== "rowSpan" && attribute !== "colSpan" && attribute !== "role" && attribute !== "popover" && attribute in el) {
try {
el[attribute] = result === null || result === void 0 ? "" : result;
return;
} catch (err) {
}
}
if (result !== null && result !== void 0 && (result !== false || attribute[4] === "-")) {
el.setAttribute(
attribute,
attribute === "popover" && result === true ? "" : result
);
} else {
el.removeAttribute(attribute);
}
});
});
});
directive(
"ignore",
({
element: {
type: Type,
props: { innerHTML, ...rest }
}
}) => {
if (true) {
warn(
"The data-wp-ignore directive is deprecated and will be removed in version 7.0."
);
}
const cached = T2(() => innerHTML, []);
return k(Type, {
dangerouslySetInnerHTML: { __html: cached },
...rest
});
}
);
directive("text", ({ directives: { text }, element, evaluate }) => {
const entries = text.filter(isDefaultDirectiveSuffix);
if (!entries.length) {
if (true) {
warn(
"The usage of data-wp-text--suffix is not supported. Please use data-wp-text instead."
);
}
return;
}
entries.forEach((entry) => {
if (entry.uniqueId) {
if (true) {
warnUniqueIdNotSupported("text", entry.uniqueId);
}
return;
}
try {
let result = evaluate(entry);
if (result === PENDING_GETTER) {
return;
}
if (typeof result === "function") {
result = result();
}
element.props.children = typeof result === "object" ? null : result.toString();
} catch (e4) {
element.props.children = null;
}
});
});
directive("run", ({ directives: { run }, evaluate }) => {
run.forEach((entry) => {
if (true) {
if (entry.suffix) {
warnUniqueIdWithTwoHyphens("run", entry.suffix);
}
}
let result = evaluate(entry);
if (typeof result === "function") {
result = result();
}
return result;
});
});
directive(
"each",
({
directives: { each, "each-key": eachKey },
context: inheritedContext,
element,
evaluate
}) => {
if (element.type !== "template") {
if (true) {
warn(
"The data-wp-each directive can only be used on elements."
);
}
return;
}
const { Provider } = inheritedContext;
const inheritedValue = x2(inheritedContext);
const [entry] = each;
const { namespace, suffix, uniqueId } = entry;
if (each.length > 1) {
if (true) {
warn(
"The usage of multiple data-wp-each directives on the same element is not supported. Please pick only one."
);
}
return;
}
if (uniqueId) {
if (true) {
warnUniqueIdNotSupported("each", uniqueId);
}
return;
}
let iterable = evaluate(entry);
if (iterable === PENDING_GETTER) {
return;
}
if (typeof iterable === "function") {
iterable = iterable();
}
if (typeof iterable?.[Symbol.iterator] !== "function") {
return;
}
const itemProp = suffix ? kebabToCamelCase(suffix) : "item";
const result = [];
const itemContexts = useItemContexts(
inheritedValue,
namespace,
iterable,
itemProp,
eachKey?.[0]
);
for (const [item, itemContext, key] of itemContexts) {
const mergedContext = {
client: {
...inheritedValue.client,
[namespace]: itemContext
},
server: { ...inheritedValue.server }
};
mergedContext.client[namespace][itemProp] = item;
result.push(
k(
Provider,
{ value: mergedContext, key },
element.props.content
)
);
}
return result;
},
{ priority: 20 }
);
directive(
"each-child",
({ directives: { "each-child": eachChild }, element, evaluate }) => {
const entry = eachChild.find(isDefaultDirectiveSuffix);
if (!entry) {
return;
}
const iterable = evaluate(entry);
return iterable === PENDING_GETTER ? element : null;
},
{ priority: 1 }
);
directive(
"router-region",
({ directives: { "router-region": routerRegion } }) => {
const entry = routerRegion.find(isDefaultDirectiveSuffix);
if (!entry) {
return;
}
if (entry.suffix) {
if (true) {
warn(
`Suffixes for the data-wp-router-region directive are not supported. Ignoring the directive with suffix "${entry.suffix}".`
);
}
return;
}
if (entry.uniqueId) {
if (true) {
warnUniqueIdNotSupported("router-region", entry.uniqueId);
}
return;
}
const regionId = typeof entry.value === "string" ? entry.value : entry.value.id;
if (!routerRegions.has(regionId)) {
routerRegions.set(regionId, d3());
}
const vdom = routerRegions.get(regionId).value;
_2(() => {
if (vdom && typeof vdom.type !== "string") {
navigationContextSignal.value = navigationContextSignal.peek() + 1;
}
}, [vdom]);
if (vdom && typeof vdom.type !== "string") {
const previousScope = getScope();
return W(vdom, { previousScope });
}
return vdom;
},
{ priority: 1 }
);
};
// packages/interactivity/build-module/hydration.mjs
init_preact_module();
// packages/interactivity/build-module/vdom.mjs
init_preact_module();
var directivePrefix = `data-wp-`;
var namespaces = [];
var currentNamespace = () => namespaces[namespaces.length - 1] ?? null;
var isObject = (item) => Boolean(item && typeof item === "object" && item.constructor === Object);
var invalidCharsRegex = /[^a-z0-9-_]/i;
function parseDirectiveName(directiveName) {
const name = directiveName.substring(8);
if (invalidCharsRegex.test(name)) {
return null;
}
const suffixIndex = name.indexOf("--");
if (suffixIndex === -1) {
return { prefix: name, suffix: null, uniqueId: null };
}
const prefix = name.substring(0, suffixIndex);
const remaining = name.substring(suffixIndex);
if (remaining.startsWith("---") && remaining[3] !== "-") {
return {
prefix,
suffix: null,
uniqueId: remaining.substring(3) || null
};
}
let suffix = remaining.substring(2);
const uniqueIdIndex = suffix.indexOf("---");
if (uniqueIdIndex !== -1 && suffix.substring(uniqueIdIndex)[3] !== "-") {
const uniqueId = suffix.substring(uniqueIdIndex + 3) || null;
suffix = suffix.substring(0, uniqueIdIndex) || null;
return { prefix, suffix, uniqueId };
}
return { prefix, suffix: suffix || null, uniqueId: null };
}
var nsPathRegExp = /^([\w_\/-]+)::(.+)$/;
var hydratedIslands = /* @__PURE__ */ new WeakSet();
function toVdom(root) {
const nodesToRemove = /* @__PURE__ */ new Set();
const nodesToReplace = /* @__PURE__ */ new Set();
const treeWalker = document.createTreeWalker(
root,
205
// TEXT + CDATA_SECTION + COMMENT + PROCESSING_INSTRUCTION + ELEMENT
);
function walk(node) {
const { nodeType } = node;
if (nodeType === 3) {
return node.data;
}
if (nodeType === 4) {
nodesToReplace.add(node);
return node.nodeValue;
}
if (nodeType === 8 || nodeType === 7) {
nodesToRemove.add(node);
return null;
}
const elementNode = node;
const { attributes } = elementNode;
const localName = elementNode.localName;
const props = {};
const children = [];
const directives = [];
let ignore = false;
let island = false;
for (let i6 = 0; i6 < attributes.length; i6++) {
const attributeName = attributes[i6].name;
const attributeValue = attributes[i6].value;
if (attributeName[directivePrefix.length] && attributeName.slice(0, directivePrefix.length) === directivePrefix) {
if (attributeName === "data-wp-ignore") {
ignore = true;
} else {
const regexResult = nsPathRegExp.exec(attributeValue);
const namespace = regexResult?.[1] ?? null;
let value = regexResult?.[2] ?? attributeValue;
try {
const parsedValue = JSON.parse(value);
value = isObject(parsedValue) ? parsedValue : value;
} catch {
}
if (attributeName === "data-wp-interactive") {
island = true;
const islandNamespace = (
// eslint-disable-next-line no-nested-ternary
typeof value === "string" ? value : typeof value?.namespace === "string" ? value.namespace : null
);
namespaces.push(islandNamespace);
} else {
directives.push([attributeName, namespace, value]);
}
}
} else if (attributeName === "ref") {
continue;
}
if (attributeValue === "" && elementNode[attributeName] === true) {
props[attributeName] = true;
} else {
props[attributeName] = attributeValue;
}
}
if (ignore && !island) {
return [
k(localName, {
...props,
innerHTML: elementNode.innerHTML,
__directives: { ignore: true }
})
];
}
if (island) {
hydratedIslands.add(elementNode);
}
if (directives.length) {
props.__directives = directives.reduce((obj, [name, ns, value]) => {
const directiveParsed = parseDirectiveName(name);
if (directiveParsed === null) {
if (true) {
warn(`Found malformed directive name: ${name}.`);
}
return obj;
}
const { prefix, suffix, uniqueId } = directiveParsed;
obj[prefix] = obj[prefix] || [];
obj[prefix].push({
namespace: ns ?? currentNamespace(),
value,
suffix,
uniqueId
});
return obj;
}, {});
for (const prefix in props.__directives) {
props.__directives[prefix].sort(
(a5, b4) => {
const aSuffix = a5.suffix ?? "";
const bSuffix = b4.suffix ?? "";
if (aSuffix !== bSuffix) {
return aSuffix < bSuffix ? -1 : 1;
}
const aId = a5.uniqueId ?? "";
const bId = b4.uniqueId ?? "";
return +(aId > bId) - +(aId < bId);
}
);
}
}
if (props.__directives?.["each-child"]) {
props.dangerouslySetInnerHTML = {
__html: elementNode.innerHTML
};
} else if (localName === "template") {
props.content = [
...elementNode.content.childNodes
].map((childNode) => toVdom(childNode));
} else {
let child = treeWalker.firstChild();
if (child) {
while (child) {
const vnode = walk(child);
if (vnode) {
children.push(vnode);
}
child = treeWalker.nextSibling();
}
treeWalker.parentNode();
}
}
if (island) {
namespaces.pop();
}
return k(localName, props, children);
}
const vdom = walk(treeWalker.currentNode);
nodesToRemove.forEach(
(node) => node.remove()
);
nodesToReplace.forEach(
(node) => node.replaceWith(
new window.Text(node.nodeValue ?? "")
)
);
return vdom;
}
// packages/interactivity/build-module/hydration.mjs
var regionRootFragments = /* @__PURE__ */ new WeakMap();
var getRegionRootFragment = (regions) => {
const region = Array.isArray(regions) ? regions[0] : regions;
if (!region.parentElement) {
throw Error("The passed region should be an element with a parent.");
}
if (!regionRootFragments.has(region)) {
regionRootFragments.set(
region,
createRootFragment(region.parentElement, regions)
);
}
return regionRootFragments.get(region);
};
var initialVdom = /* @__PURE__ */ new WeakMap();
var resolveInitialVdom;
var initialVdomPromise = new Promise((resolve2) => {
resolveInitialVdom = resolve2;
});
var hydrateRegions = async () => {
const nodes = document.querySelectorAll(`[data-wp-interactive]`);
for (const node of nodes) {
if (!hydratedIslands.has(node)) {
await splitTask();
const fragment = getRegionRootFragment(node);
const vdom = toVdom(node);
initialVdom.set(node, vdom);
await splitTask();
U(vdom, fragment);
}
}
resolveInitialVdom(initialVdom);
};
// packages/interactivity/build-module/index.mjs
if (true) {
await Promise.resolve().then(() => (init_debug_module(), debug_module_exports));
}
var watch = E2;
var requiredConsent = "I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.";
var privateApis = (lock) => {
if (lock === requiredConsent) {
return {
getRegionRootFragment,
initialVdomPromise,
toVdom,
directive,
getNamespace,
h: k,
cloneElement: W,
render: R,
proxifyState,
parseServerData,
populateServerData,
batch: r3,
routerRegions,
deepReadOnly,
navigationSignal,
sessionId,
warn
};
}
throw new Error("Forbidden access.");
};
populateServerData(parseServerData());
directives_default();
onDOMReady(hydrateRegions);
window.history.replaceState(
{ ...window.history.state, wpInteractivityId: sessionId },
""
);
window.addEventListener("popstate", (event) => {
if (event.state !== null && event.state?.wpInteractivityId !== sessionId) {
window.location.reload();
}
});
export {
getConfig,
getContext,
getElement,
getServerContext,
getServerState,
privateApis,
splitTask,
store,
useCallback,
useEffect,
useInit,
useLayoutEffect,
useMemo,
A2 as useRef,
d2 as useState,
useWatch,
watch,
withScope,
withSyncEvent
};
PK ! oϪ index.min.jsnu [ var me,m,jt,ft,V,Lt,Vt,zt,nt,$e,he,Kt,ct,it,ot,Jt,Me={},Be=[],Ar=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,We=Array.isArray;function B(e,t){for(var r in t)e[r]=t[r];return e}function ut(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function R(e,t,r){var n,o,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?me.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ve(e,s,n,o,null)}function ve(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++jt,__i:-1,__u:0};return o==null&&m.vnode!=null&&m.vnode(i),i}function Fe(e){return e.children}function ae(e,t){this.props=e,this.context=t}function fe(e,t){if(t==null)return e.__?fe(e.__,e.__i+1):null;for(var r;tt&&V.sort(zt),e=V.shift(),t=V.length,Hr(e)}finally{V.length=qe.__r=0}}function Xt(e,t,r,n,o,i,s,f,u,c,l){var a,_,p,w,E,h,d,v=n&&n.__k||Be,I=t.length;for(u=jr(r,t,v,u,I),a=0;a0?s=e.__k[i]=ve(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,u=i+_,s.__=e,s.__b=e.__b+1,f=null,(c=s.__i=Vr(s,r,u,a))!=-1&&(a--,(f=r[c])&&(f.__u|=2)),f==null||f.__v==null?(c==-1&&(o>l?_--:ou?_--:_++,s.__u|=4))):e.__k[i]=null;if(a)for(i=0;i(l?1:0)){for(o=r-1,i=r+1;o>=0||i=0?o--:i++])!=null&&(2&c.__u)==0&&f==c.key&&u==c.type)return s}return-1}function At(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Ar.test(t)?r:r+"px"}function Oe(e,t,r,n,o){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||At(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||At(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Kt,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r[he]=n[he]:(r[he]=ct,e.addEventListener(t,i?ot:it,i)):e.removeEventListener(t,i?ot:it,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Ht(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[$e]==null)t[$e]=ct++;else if(t[$e]0?e:We(e)?e.map(er):B({},e)}function zr(e,t,r,n,o,i,s,f,u){var c,l,a,_,p,w,E,h=r.props||Me,d=t.props,v=t.type;if(v=="svg"?o="http://www.w3.org/2000/svg":v=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c2&&(f.children=arguments.length>3?me.call(arguments,2):r),ve(e.type,f,n||e.key,o||e.ref,null)}function rr(e){function t(r){var n,o;return this.getChildContext||(n=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&n.forEach(function(s){s.__e=!0,st(s)})},this.sub=function(i){n.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){n&&n.delete(i),s&&s.call(i)}}),r.children}return t.__c="__cC"+Jt++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}me=Be.slice,m={__e:function(e,t,r,n){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(f){e=f}throw e}},jt=0,ft=function(e){return e!=null&&e.constructor===void 0},ae.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=B({},this.state),typeof e=="function"&&(e=e(B({},r),this.props)),e&&B(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),st(this))},ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),st(this))},ae.prototype.render=Fe,V=[],Vt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zt=function(e,t){return e.__v.__b-t.__v.__b},qe.__r=0,nt=Math.random().toString(8),$e="__d"+nt,he="__a"+nt,Kt=/(PointerCapture)$|Capture$/i,ct=0,it=Ht(!1),ot=Ht(!0),Jt=0;var Y,g,ht,nr,ye=0,lr=[],S=m,ir=S.__b,or=S.__r,sr=S.diffed,ar=S.__c,fr=S.unmount,cr=S.__;function ge(e,t){S.__h&&S.__h(g,e,ye||t),ye=0;var r=g.__H||(g.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Jr(e){return ye=1,Qr(pr,e)}function Qr(e,t,r){var n=ge(Y++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):pr(void 0,t),function(f){var u=n.__N?n.__N[0]:n.__[0],c=n.t(u,f);u!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=g,!g.__f)){var o=function(f,u,c){if(!n.__c.__H)return!0;var l=n.__c.__H.__.filter(function(_){return _.__c});if(l.every(function(_){return!_.__N}))return!i||i.call(this,f,u,c);var a=n.__c.props!==f;return l.some(function(_){if(_.__N){var p=_.__[0];_.__=_.__N,_.__N=void 0,p!==_.__[0]&&(a=!0)}}),i&&i.call(this,f,u,c)||a};g.__f=!0;var i=g.shouldComponentUpdate,s=g.componentWillUpdate;g.componentWillUpdate=function(f,u,c){if(this.__e){var l=i;i=void 0,o(f,u,c),i=l}s&&s.call(this,f,u,c)},g.shouldComponentUpdate=o}return n.__N||n.__}function we(e,t){var r=ge(Y++,3);!S.__s&&mt(r.__H,t)&&(r.__=e,r.u=t,g.__H.__h.push(r))}function Ae(e,t){var r=ge(Y++,4);!S.__s&&mt(r.__H,t)&&(r.__=e,r.u=t,g.__h.push(r))}function z(e){return ye=5,A(function(){return{current:e}},[])}function A(e,t){var r=ge(Y++,7);return mt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function He(e,t){return ye=8,A(function(){return e},t)}function be(e){var t=g.context[e.__c],r=ge(Y++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(g)),t.props.value):e.__}function Xr(){for(var e;e=lr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Le),t.__h.some(vt),t.__h=[]}catch(r){t.__h=[],S.__e(r,e.__v)}}}S.__b=function(e){g=null,ir&&ir(e)},S.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),cr&&cr(e,t)},S.__r=function(e){or&&or(e),Y=0;var t=(g=e.__c).__H;t&&(ht===g?(t.__h=[],g.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Le),t.__h.some(vt),t.__h=[],Y=0)),ht=g},S.diffed=function(e){sr&&sr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(lr.push(t)!==1&&nr===S.requestAnimationFrame||((nr=S.requestAnimationFrame)||Yr)(Xr)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),ht=g=null},S.__c=function(e,t){t.some(function(r){try{r.__h.some(Le),r.__h=r.__h.filter(function(n){return!n.__||vt(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),ar&&ar(e,t)},S.unmount=function(e){fr&&fr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{Le(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var ur=typeof requestAnimationFrame=="function";function Yr(e){var t,r=function(){clearTimeout(n),ur&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);ur&&(t=requestAnimationFrame(r))}function Le(e){var t=g,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),g=t}function vt(e){var t=g;e.__c=e.__(),g=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function pr(e,t){return typeof t=="function"?t(e):t}var Zr=Symbol.for("preact-signals");function Ve(){if(K>1)K--;else{for(var e,t=!1;Se!==void 0;){var r=Se;for(Se=void 0,yt++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&dr(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(yt=0,K--,t)throw e}}function Z(e){if(K>0)return e();K++;try{return e()}finally{Ve()}}var y=void 0;var Se=void 0,K=0,yt=0,je=0;function _r(e){if(y!==void 0){var t=e.n;if(t===void 0||t.t!==y)return t={i:0,S:e,p:y.s,n:void 0,t:y,e:void 0,x:void 0,r:t},y.s!==void 0&&(y.s.n=t),y.s=t,e.n=t,32&y.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=y.s,t.n=void 0,y.s.n=t,y.s=t),t}}function P(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}P.prototype.brand=Zr;P.prototype.h=function(){return!0};P.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};P.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};P.prototype.subscribe=function(e){var t=this;return H(function(){var r=t.value,n=y;y=void 0;try{e(r)}finally{y=n}})};P.prototype.valueOf=function(){return this.value};P.prototype.toString=function(){return this.value+""};P.prototype.toJSON=function(){return this.value};P.prototype.peek=function(){var e=y;y=void 0;try{return this.value}finally{y=e}};Object.defineProperty(P.prototype,"value",{get:function(){var e=_r(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(yt>100)throw new Error("Cycle detected");this.v=e,this.i++,je++,K++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ve()}}}});function k(e){return new P(e)}function dr(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function hr(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function vr(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function ue(e){P.call(this,void 0),this.x=e,this.s=void 0,this.g=je-1,this.f=4}(ue.prototype=new P).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===je))return!0;if(this.g=je,this.f|=1,this.i>0&&!dr(this))return this.f&=-2,!0;var e=y;try{hr(this),y=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return y=e,vr(this),this.f&=-2,!0};ue.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}P.prototype.S.call(this,e)};ue.prototype.U=function(e){if(this.t!==void 0&&(P.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};ue.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(ue.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=_r(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function xe(e){return new ue(e)}function mr(e){var t=e.u;if(e.u=void 0,typeof t=="function"){K++;var r=y;y=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,gt(e),n}finally{y=r,Ve()}}}function gt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,mr(e)}function en(e){if(y!==this)throw new Error("Out-of-order effect");vr(this),y=e,this.f&=-2,8&this.f&>(this),Ve()}function Pe(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Pe.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Pe.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,mr(this),hr(this),K++;var e=y;return y=this,en.bind(this,e)};Pe.prototype.N=function(){2&this.f||(this.f|=2,this.o=Se,Se=this)};Pe.prototype.d=function(){this.f|=8,1&this.f||gt(this)};function H(e){var t=new Pe(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var bt,wt;function le(e,t){m[e]=t.bind(null,m[e]||function(){})}function ze(e){wt&&wt(),wt=e&&e.S()}function yr(e){var t=this,r=e.data,n=rn(r);n.value=r;var o=A(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var s;!ft(o.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},xe(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}yr.displayName="_st";Object.defineProperties(P.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:yr},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});le("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof P&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)});le("__r",function(e,t){ze();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(o){var i;return H(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),bt=n,ze(r),e(t)});le("__e",function(e,t,r,n){ze(),bt=void 0,e(t,r,n)});le("diffed",function(e,t){ze(),bt=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var s in i){var f=i[s];f!==void 0&&!(s in n)&&(f.d(),i[s]=void 0)}else r.U=i={};for(var u in n){var c=i[u],l=n[u];c===void 0?(c=tn(r,u,l,o),i[u]=c):c.o(l,o)}}}e(t)});function tn(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=k(r);return{o:function(s,f){i.value=s,n=f},d:H(function(){var s=i.value.value;n[t]!==s&&(n[t]=s,o?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}le("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var s=t.__c;if(s){var f=s.__$u;f&&(s.__$u=void 0,f.d())}}e(t)});le("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});ae.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function rn(e){return A(function(){return k(e)},[])}var St=[],q=()=>St.slice(-1)[0],W=e=>{St.push(e)},F=()=>{St.pop()};var xt=[],D=()=>xt.slice(-1)[0],ee=e=>{xt.push(e)},j=()=>{xt.pop()};var nn=e=>D().context[e||q()],on=()=>{let e=D(),t={},{ref:r,attributes:n}=e;return Object.freeze({ref:r.current,attributes:Ee(n,t)})},Ke=k(0);function Pt(e){let t=D();return Pt.subscribe=Ke.value,J(t.serverContext[e||q()])}Pt.subscribe=0;var sn=e=>new Promise(t=>{let r=()=>{clearTimeout(n),window.cancelAnimationFrame(o),setTimeout(()=>{e(),t()})},n=setTimeout(r,100),o=window.requestAnimationFrame(r)}),te=typeof window.scheduler?.yield=="function"?window.scheduler.yield.bind(window.scheduler):()=>new Promise(e=>{setTimeout(e,0)}),gr=e=>{let[t]=performance.getEntriesByType("navigation");t.domContentLoadedEventStart>0?e():document.addEventListener("DOMContentLoaded",e)};function an(e,t){let r=()=>{},n=H(function(){return r=this.c.bind(this),this.x=e,this.c=t,e()});return{flush:r,dispose:n}}function fn(e){we(()=>{let t=null,r=!1;return t=an(e,async()=>{t&&!r&&(r=!0,await sn(t.flush),r=!1)}),t.dispose},[])}function O(e){let t=D(),r=q(),n;if(e?.constructor?.name==="GeneratorFunction"?n=async(...i)=>{let s=e(...i),f,u,c;for(;;){W(r),ee(t);try{u=c?s.throw(c):s.next(f),c=void 0}catch(l){throw l}finally{j(),F()}try{f=await u.value}catch(l){c=l}if(u.done){if(c)throw c;break}}return f}:n=(...i)=>{W(r),ee(t);try{return e(...i)}finally{F(),j()}},e.sync){let i=n;return i.sync=!0,i}return n}function Tt(e){fn(O(e))}function Q(e){we(O(e),[])}function cn(e,t){we(O(e),t)}function un(e,t){Ae(O(e),t)}function ln(e,t){return He(O(e),t)}function pn(e,t){return A(O(e),t)}var wr=(e,t)=>{t=[].concat(t);let r=t[t.length-1].nextSibling;function n(o,i){e.insertBefore(o,i||r)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:n,appendChild:n,removeChild(o){e.removeChild(o)},contains(o){e.contains(o)}}};function br(e){return e.replace(/^-+|-+$/g,"").toLowerCase().replace(/-([a-z])/g,function(t,r){return r.toUpperCase()})}var Te=e=>{},T=e=>!!(e&&typeof e=="object"&&e.constructor===Object);function _n(e){let t=e;return t.sync=!0,t}var Et=new WeakMap,dn=e=>{let t=()=>!1;return{get(r,n){let o=r[n];return o&&typeof o=="object"?Ee(o,{errorMessage:e}):o},set:t,deleteProperty:t,defineProperty:t}};function Ee(e,t){let r=t?.errorMessage??"Cannot modify read-only object";if(!Et.has(e)){let n=dn(r);Et.set(e,new Proxy(e,n))}return Et.get(e)}var Je=k(0),Qe=Math.random().toString(36).slice(2);function J(e){return T(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,J(r)])):Array.isArray(e)?e.map(t=>J(t)):e}var Xe=new WeakMap,Sr=new WeakMap,It=new WeakMap,hn=new Set([Object,Array]),Ye=(e,t,r)=>{if(!re(t))throw Error("This object cannot be proxified.");if(!Xe.has(t)){let n=new Proxy(t,r);Xe.set(t,n),Sr.set(n,t),It.set(n,e)}return Xe.get(t)},Ze=e=>Xe.get(e),$=e=>It.get(e),re=e=>typeof e!="object"||e===null?!1:!It.has(e)&&hn.has(e.constructor),xr=e=>Sr.get(e);var vn={},Pr=class{owner;computedsByScope;valueSignal;getterSignal;pendingGetter;constructor(e){this.owner=e,this.computedsByScope=new WeakMap}setValue(e){this.update({value:e})}setGetter(e){this.update({get:e})}setPendingGetter(e){this.pendingGetter=e,queueMicrotask(()=>this.consolidateGetter())}consolidateGetter(){let e=this.pendingGetter;e&&(this.pendingGetter=void 0,this.update({get:e}))}getComputed(){let e=D()||vn;if(!this.valueSignal&&!this.getterSignal&&this.update({}),this.pendingGetter&&this.consolidateGetter(),!this.computedsByScope.has(e)){let t=()=>{let r=this.getterSignal?.value;return r?r.call(this.owner):this.valueSignal?.value};W($(this.owner)),this.computedsByScope.set(e,xe(O(t))),F()}return this.computedsByScope.get(e)}update({get:e,value:t}){this.valueSignal?(t!==this.valueSignal.peek()||e!==this.getterSignal.peek())&&Z(()=>{this.valueSignal.value=t,this.getterSignal.value=e}):(this.valueSignal=k(t),this.getterSignal=k(e))}};var mn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(e=>typeof e=="symbol")),pe=new WeakMap,yn=(e,t)=>pe.has(e)&&pe.get(e).has(t),Ie=(e,t,r)=>{pe.has(e)||pe.set(e,new Map),t=typeof t=="number"?`${t}`:t;let n=pe.get(e);if(!n.has(t)){let o=$(e),i=new Pr(e);if(n.set(t,i),r){let{get:s,value:f}=r;s?i.setGetter(s):i.setValue(re(f)?G(o,f):f)}}return n.get(t)},L=new WeakMap,Ct=!1,N=Symbol("PENDING_GETTER"),gn={get(e,t,r){if(Ct||!e.hasOwnProperty(t)&&t in e||typeof t=="symbol"&&mn.has(t))return Reflect.get(e,t,r);let n=Object.getOwnPropertyDescriptor(e,t),i=Ie(r,t,n).getComputed().value;if(i===N)throw N;if(typeof i=="function"){let s=$(r);return(...f)=>{W(s);try{return i.call(r,...f)}finally{F()}}}return i},set(e,t,r,n){W($(n));try{return Reflect.set(e,t,r,n)}finally{F()}},defineProperty(e,t,r){let n=!(t in e),o=Reflect.defineProperty(e,t,r);if(o){let i=Ze(e),s=Ie(i,t),{get:f,value:u}=r;if(f)s.setGetter(f);else{let c=$(i);s.setValue(re(u)?G(c,u):u)}n&&L.has(e)&&L.get(e).value++,Array.isArray(e)&&pe.get(i)?.has("length")&&Ie(i,"length").setValue(e.length)}return o},deleteProperty(e,t){let r=Reflect.deleteProperty(e,t);return r&&(Ie(Ze(e),t).setValue(void 0),L.has(e)&&L.get(e).value++),r},ownKeys(e){return L.has(e)||L.set(e,k(0)),L._=L.get(e).value,Reflect.ownKeys(e)}},G=(e,t)=>Ye(e,t,gn),Nt=(e,t)=>{Ct=!0;try{return e[t]}finally{Ct=!1}},kt=(e,t,r=!0)=>{if(!(T(e)&&T(t)))return;let n=!1;for(let o in t){let i=!(o in e);n=n||i;let s=Object.getOwnPropertyDescriptor(t,o),f=Ze(e),u=!!f&&yn(f,o)&&Ie(f,o);if(typeof s.get=="function"||typeof s.set=="function")(r||i)&&(Object.defineProperty(e,o,{...s,configurable:!0,enumerable:!0}),s.get&&u&&u.setPendingGetter(s.get));else if(T(t[o])){let c=Object.getOwnPropertyDescriptor(e,o)?.value;if(i||r&&!T(c)){if(e[o]={},u){let l=$(f);u.setValue(G(l,e[o]))}kt(e[o],t[o],r)}else T(c)&&kt(e[o],t[o],r)}else if((r||i)&&(Object.defineProperty(e,o,s),u)){let{value:c}=s,l=$(f);u.setValue(re(c)?G(l,c):c)}}n&&L.has(e)&&L.get(e).value++},ne=(e,t,r=!0)=>Z(()=>kt(xr(e)||e,t,r));var Er=new WeakSet,wn={get:(e,t,r)=>{let n=Reflect.get(e,t),o=$(r);if(typeof n>"u"&&Er.has(r)){let i={};return Reflect.set(e,t,i),Ce(o,i,!1)}if(typeof n=="function"){W(o);let i=O(n);return F(),i}return T(n)&&re(n)?Ce(o,n,!1):n}},Ce=(e,t,r=!0)=>{let n=Ye(e,t,wn);return n&&r&&Er.add(n),n};var Rt=new WeakMap,_e=new WeakMap,Tr=new WeakSet,Ir=Reflect.getOwnPropertyDescriptor,bn={get:(e,t)=>{let r=_e.get(e),n=e[t];return t in e?n:r[t]},set:(e,t,r)=>{let n=_e.get(e),o=t in e||!(t in n)?e:n;return o[t]=r,!0},ownKeys:e=>[...new Set([...Object.keys(_e.get(e)),...Object.keys(e)])],getOwnPropertyDescriptor:(e,t)=>Ir(e,t)||Ir(_e.get(e),t),has:(e,t)=>Reflect.has(e,t)||Reflect.has(_e.get(e),t)},ke=(e,t={})=>{if(Tr.has(e))throw Error("This object cannot be proxified.");if(_e.set(e,t),!Rt.has(e)){let r=new Proxy(e,bn);Rt.set(e,r),Tr.add(r)}return Rt.get(e)};var Ne=new Map,Cr=new Map,et=new Map,Ut=new Map,Re=new Map,Sn=e=>Ut.get(e||q())||{};function Dt(e){let t=e||q();return Re.has(t)||Re.set(t,{}),Dt.subscribe=Je.value,J(Re.get(t))}Dt.subscribe=0;var ie="I acknowledge that using a private store means my plugin will inevitably break on the next store release.";function Ue(e,{state:t={},...r}={},{lock:n=!1}={}){if(Ne.has(e)){if(n!==ie&&!et.has(e))et.set(e,n);else{let i=et.get(e);if(!(n===ie||n!==!0&&n===i))throw Error(i?"Cannot unlock a private store with an invalid lock code":"Cannot lock a public store")}let o=Cr.get(e);ne(o,r),ne(o.state,t)}else{n!==ie&&et.set(e,n);let o={state:G(e,T(t)?t:{}),...r},i=Ce(e,o);Cr.set(e,o),Ne.set(e,i)}return Ne.get(e)}var Gt=(e=document)=>{let t=e.getElementById("wp-script-module-data-@wordpress/interactivity")??e.getElementById("wp-interactivity-data");if(t?.textContent)try{return JSON.parse(t.textContent)}catch{}return{}},Ot=e=>{Re.clear(),Ut.clear(),T(e?.state)&&Object.entries(e.state).forEach(([t,r])=>{let n=Ue(t,{},{lock:ie});ne(n.state,r,!1),Re.set(t,r)}),T(e?.config)&&Object.entries(e.config).forEach(([t,r])=>{Ut.set(t,r)}),T(e?.derivedStateClosures)&&Object.entries(e.derivedStateClosures).forEach(([t,r])=>{let n=Ue(t,{},{lock:ie});r.forEach(o=>{let i=o.split("."),s=i.splice(-1,1)[0],f=i.reduce((c,l)=>Nt(c,l),n),u=Object.getOwnPropertyDescriptor(f,s);T(u?.value)&&(f[s]=N)})})};function X(e){return e.suffix!==null}function de(e){return e.suffix===null}var kr=rr({client:{},server:{}}),$t={},Rr={},x=(e,t,{priority:r=10}={})=>{$t[e]=t,Rr[e]=r},xn=(e,t)=>{if(!t){Te(`Namespace missing for "${e}". The value for that path won't be resolved.`);return}let r=Ne.get(t);typeof r>"u"&&(r=Ue(t,{},{lock:ie}));let n={...r,context:D().context[t]};try{return e.split(".").reduce((i,s)=>i[s],n)}catch(o){if(o===N)return N}},Mt=({scope:e})=>((t,...r)=>{let{value:n,namespace:o}=t;if(typeof n!="string")throw new Error("The `value` prop should be a string path");let i=n[0]==="!"&&!!(n=n.slice(1));ee(e);let s=xn(n,o);if(typeof s=="function"){if(i){Te("Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead.");let c=!s(...r);return j(),c}j();let u=(...c)=>{ee(e);let l=s(...c);return j(),l};if(s.sync){let c=u;c.sync=!0}return u}let f=s;return j(),i&&s!==N?!f:f}),Pn=e=>{let t=Object.keys(e).reduce((r,n)=>{if($t[n]){let o=Rr[n];(r[o]=r[o]||[]).push(n)}return r},{});return Object.entries(t).sort(([r],[n])=>parseInt(r)-parseInt(n)).map(([,r])=>r)},Ur=({directives:e,priorityLevels:[t,...r],element:n,originalProps:o,previousScope:i})=>{let s=z({}).current;s.evaluate=He(Mt({scope:s}),[]);let{client:f,server:u}=be(kr);s.context=f,s.serverContext=u,s.ref=i?.ref||z(null),n=ce(n,{ref:s.ref}),s.attributes=n.props;let c=r.length>0?R(Ur,{directives:e,priorityLevels:r,element:n,originalProps:o,previousScope:s}):n,l={...o,children:c},a={directives:e,props:l,element:n,context:kr,evaluate:s.evaluate};ee(s);for(let _ of t){let p=$t[_]?.(a);p!==void 0&&(l.children=p)}return j(),l.children},Nr=m.vnode;m.vnode=e=>{if(e.props.__directives){let t=e.props,r=t.__directives;r.key&&(e.key=r.key.find(de).value),delete t.__directives;let n=Pn(r);n.length>0&&(e.props={directives:r,priorityLevels:n,originalProps:t,type:e.type,element:R(e.type,t),top:!0},e.type=Ur)}Nr&&Nr(e)};function Mr(e){let t={get(r,n,o){let i=r[n];switch(n){case"currentTarget":break;case"preventDefault":case"stopImmediatePropagation":case"stopPropagation":break}return i instanceof Function?function(...s){return i.apply(this===o?r:this,s)}:i}};return new Proxy(e,t)}var En=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Tn=/\/\*[^]*?\*\/| +/g,Dr=/\n+/g,Gr=" ",In=e=>{let t=[{}],r,n;for(;r=En.exec(e.replace(Tn,""));)r[4]?t.shift():r[3]?(n=r[3].replace(Dr,Gr).trim(),t.unshift(t[0][n]=t[0][n]||{})):t[0][r[1]]=r[2].replace(Dr,Gr).trim();return t[0]},Or=e=>({directives:t,evaluate:r})=>{t[`on-${e}`].filter(X).forEach(n=>{let i=n.suffix.split("--",2)[0];Q(()=>{let s=u=>{let c=r(n);typeof c=="function"&&(c?.sync||(u=Mr(u)),c(u))},f=e==="window"?window:document;return f.addEventListener(i,s),()=>f.removeEventListener(i,s)})})},Cn=(e,t,r,n,o)=>{let i={...e.client,[t]:{...e.client[t],[n]:r}},s={...D(),context:i,serverContext:e.server};return o?Mt({scope:s})(o):r},kn=function*(e,t,r,n,o){let{current:i}=z(new Map);for(let s of r){let f=Cn(e,t,s,n,o);i.has(f)||i.set(f,ke(G(t,{[n]:void 0}),e.client[t])),yield[s,i.get(f),f]}},$r=e=>({directives:t,evaluate:r})=>{t[`on-async-${e}`].filter(X).forEach(n=>{let o=n.suffix.split("--",1)[0];Q(()=>{let i=async f=>{await te();let u=r(n);typeof u=="function"&&u(f)},s=e==="window"?window:document;return s.addEventListener(o,i,{passive:!0}),()=>s.removeEventListener(o,i)})})},De=new Map,Br=()=>{x("context",({directives:{context:e},props:{children:t},context:r})=>{let n=e.filter(de).reverse();if(!n.length)return;let{Provider:o}=r,{client:i,server:s}=be(r),f=z({}),u={},c={client:{...i},server:{...s}},l=new Set;return n.forEach(({value:a,namespace:_,uniqueId:p})=>{T(a)&&(f.current[_]||(f.current[_]=G(_,{})),ne(f.current[_],J(a),!1),u[_]=a,l.add(_))}),l.forEach(a=>{c.client[a]=ke(f.current[a],i[a]),c.server[a]=ke(u[a],s[a])}),R(o,{value:c},t)},{priority:5}),x("watch",({directives:{watch:e},evaluate:t})=>{e.forEach(r=>{Tt(()=>{let n,o=t(r);return typeof o=="function"&&(o=o()),o})})}),x("init",({directives:{init:e},evaluate:t})=>{e.forEach(r=>{Q(()=>{let n,o=t(r);return typeof o=="function"&&(o=o()),o})})}),x("on",({directives:{on:e},element:t,evaluate:r})=>{let n=new Map;e.filter(X).forEach(o=>{let i=o.suffix.split("--",2);n.has(i[0])||n.set(i[0],new Set),n.get(i[0]).add(o)}),n.forEach((o,i)=>{let s=t.props[`on${i}`];t.props[`on${i}`]=f=>{s&&s(f),o.forEach(u=>{let c,l=r(u);typeof l=="function"&&(l?.sync||(f=Mr(f)),l(f))})}})}),x("on-async",({directives:{"on-async":e},element:t,evaluate:r})=>{let n=new Map;e.filter(X).forEach(o=>{let i=o.suffix.split("--",1)[0];n.has(i)||n.set(i,new Set),n.get(i).add(o)}),n.forEach((o,i)=>{let s=t.props[`on${i}`];t.props[`on${i}`]=f=>{s&&s(f),o.forEach(async u=>{await te();let c=r(u);typeof c=="function"&&c(f)})}})}),x("on-window",Or("window")),x("on-document",Or("document")),x("on-async-window",$r("window")),x("on-async-document",$r("document")),x("class",({directives:{class:e},element:t,evaluate:r})=>{e.filter(X).forEach(n=>{let o=n.uniqueId?`${n.suffix}---${n.uniqueId}`:n.suffix,i=r(n);if(i===N)return;typeof i=="function"&&(i=i());let s=t.props.class||"",f=new RegExp(`(^|\\s)${o}(\\s|$)`,"g");i?f.test(s)||(t.props.class=s?`${s} ${o}`:o):t.props.class=s.replace(f," ").trim(),Q(()=>{i?t.ref.current.classList.add(o):t.ref.current.classList.remove(o)})})}),x("style",({directives:{style:e},element:t,evaluate:r})=>{e.filter(X).forEach(n=>{if(n.uniqueId)return;let o=n.suffix,i=r(n);i!==N&&(typeof i=="function"&&(i=i()),t.props.style=t.props.style||{},typeof t.props.style=="string"&&(t.props.style=In(t.props.style)),i?t.props.style[o]=i:delete t.props.style[o],Q(()=>{i?t.ref.current.style.setProperty(o,i):t.ref.current.style.removeProperty(o)}))})}),x("bind",({directives:{bind:e},element:t,evaluate:r})=>{e.filter(X).forEach(n=>{if(n.uniqueId)return;let o=n.suffix,i=r(n);i!==N&&(typeof i=="function"&&(i=i()),t.props[o]=i,Q(()=>{let s=t.ref.current;if(o==="style"){typeof i=="string"&&(s.style.cssText=i);return}else if(o!=="width"&&o!=="height"&&o!=="href"&&o!=="list"&&o!=="form"&&o!=="tabIndex"&&o!=="download"&&o!=="rowSpan"&&o!=="colSpan"&&o!=="role"&&o!=="popover"&&o in s)try{s[o]=i??"";return}catch{}i!=null&&(i!==!1||o[4]==="-")?s.setAttribute(o,o==="popover"&&i===!0?"":i):s.removeAttribute(o)}))})}),x("ignore",({element:{type:e,props:{innerHTML:t,...r}}})=>{let n=A(()=>t,[]);return R(e,{dangerouslySetInnerHTML:{__html:n},...r})}),x("text",({directives:{text:e},element:t,evaluate:r})=>{let n=e.filter(de);n.length&&n.forEach(o=>{if(!o.uniqueId)try{let i=r(o);if(i===N)return;typeof i=="function"&&(i=i()),t.props.children=typeof i=="object"?null:i.toString()}catch{t.props.children=null}})}),x("run",({directives:{run:e},evaluate:t})=>{e.forEach(r=>{let n=t(r);return typeof n=="function"&&(n=n()),n})}),x("each",({directives:{each:e,"each-key":t},context:r,element:n,evaluate:o})=>{if(n.type!=="template")return;let{Provider:i}=r,s=be(r),[f]=e,{namespace:u,suffix:c,uniqueId:l}=f;if(e.length>1||l)return;let a=o(f);if(a===N||(typeof a=="function"&&(a=a()),typeof a?.[Symbol.iterator]!="function"))return;let _=c?br(c):"item",p=[],w=kn(s,u,a,_,t?.[0]);for(let[E,h,d]of w){let v={client:{...s.client,[u]:h},server:{...s.server}};v.client[u][_]=E,p.push(R(i,{value:v,key:d},n.props.content))}return p},{priority:20}),x("each-child",({directives:{"each-child":e},element:t,evaluate:r})=>{let n=e.find(de);return n?r(n)===N?t:null:void 0},{priority:1}),x("router-region",({directives:{"router-region":e}})=>{let t=e.find(de);if(!t||t.suffix||t.uniqueId)return;let r=typeof t.value=="string"?t.value:t.value.id;De.has(r)||De.set(r,k());let n=De.get(r).value;if(Ae(()=>{n&&typeof n.type!="string"&&(Ke.value=Ke.peek()+1)},[n]),n&&typeof n.type!="string"){let o=D();return ce(n,{previousScope:o})}return n},{priority:1})};var Bt="data-wp-",tt=[],Nn=()=>tt[tt.length-1]??null,Rn=e=>!!(e&&typeof e=="object"&&e.constructor===Object),Un=/[^a-z0-9-_]/i;function Dn(e){let t=e.substring(8);if(Un.test(t))return null;let r=t.indexOf("--");if(r===-1)return{prefix:t,suffix:null,uniqueId:null};let n=t.substring(0,r),o=t.substring(r);if(o.startsWith("---")&&o[3]!=="-")return{prefix:n,suffix:null,uniqueId:o.substring(3)||null};let i=o.substring(2),s=i.indexOf("---");if(s!==-1&&i.substring(s)[3]!=="-"){let f=i.substring(s+3)||null;return i=i.substring(0,s)||null,{prefix:n,suffix:i,uniqueId:f}}return{prefix:n,suffix:i||null,uniqueId:null}}var Gn=/^([\w_\/-]+)::(.+)$/,qt=new WeakSet;function Ge(e){let t=new Set,r=new Set,n=document.createTreeWalker(e,205);function o(s){let{nodeType:f}=s;if(f===3)return s.data;if(f===4)return r.add(s),s.nodeValue;if(f===8||f===7)return t.add(s),null;let u=s,{attributes:c}=u,l=u.localName,a={},_=[],p=[],w=!1,E=!1;for(let h=0;h{let C=Dn(d);if(C===null)return h;let{prefix:b,suffix:U,uniqueId:oe}=C;return h[b]=h[b]||[],h[b].push({namespace:v??Nn(),value:I,suffix:U,uniqueId:oe}),h},{});for(let h in a.__directives)a.__directives[h].sort((d,v)=>{let I=d.suffix??"",C=v.suffix??"";if(I!==C)return IU)-+(bGe(h));else{let h=n.firstChild();if(h){for(;h;){let d=o(h);d&&_.push(d),h=n.nextSibling()}n.parentNode()}}return E&&tt.pop(),R(l,a,_)}let i=o(n.currentNode);return t.forEach(s=>s.remove()),r.forEach(s=>s.replaceWith(new window.Text(s.nodeValue??""))),i}var Wt=new WeakMap,Ft=e=>{let t=Array.isArray(e)?e[0]:e;if(!t.parentElement)throw Error("The passed region should be an element with a parent.");return Wt.has(t)||Wt.set(t,wr(t.parentElement,e)),Wt.get(t)},qr=new WeakMap,Wr,Fr=new Promise(e=>{Wr=e}),Lr=async()=>{let e=document.querySelectorAll("[data-wp-interactive]");for(let t of e)if(!qt.has(t)){await te();let r=Ft(t),n=Ge(t);qr.set(t,n),await te(),dt(n,r)}Wr(qr)};var vo=H,On="I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.",mo=e=>{if(e===On)return{getRegionRootFragment:Ft,initialVdomPromise:Fr,toVdom:Ge,directive:x,getNamespace:q,h:R,cloneElement:ce,render:_t,proxifyState:G,parseServerData:Gt,populateServerData:Ot,batch:Z,routerRegions:De,deepReadOnly:Ee,navigationSignal:Je,sessionId:Qe,warn:Te};throw new Error("Forbidden access.")};Ot(Gt());Br();gr(Lr);window.history.replaceState({...window.history.state,wpInteractivityId:Qe},"");window.addEventListener("popstate",e=>{e.state!==null&&e.state?.wpInteractivityId!==Qe&&window.location.reload()});export{Sn as getConfig,nn as getContext,on as getElement,Pt as getServerContext,Dt as getServerState,mo as privateApis,te as splitTask,Ue as store,ln as useCallback,cn as useEffect,Q as useInit,un as useLayoutEffect,pn as useMemo,z as useRef,Jr as useState,Tt as useWatch,vo as watch,O as withScope,_n as withSyncEvent};
PK ! fddS S index.min.asset.phpnu [ PK ! _ index.jsnu [ PK ! oϪ index.min.jsnu [ PK 5