run:R W Run
99.07 KB
2026-03-11 16:18:51
R W Run
49.64 KB
2026-03-11 16:18:51
R W Run
86.28 KB
2026-03-11 16:18:51
R W Run
40.23 KB
2026-03-11 16:18:51
R W Run
error_log
📄index.js
1/******/ var __webpack_modules__ = ({
2
3/***/ 622:
4/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5
6/* harmony export */ __webpack_require__.d(__webpack_exports__, {
7/* harmony export */ Ob: () => (/* binding */ K),
8/* harmony export */ Qv: () => (/* binding */ J),
9/* harmony export */ XX: () => (/* binding */ G),
10/* harmony export */ fF: () => (/* binding */ l),
11/* harmony export */ h: () => (/* binding */ _),
12/* harmony export */ q6: () => (/* binding */ Q),
13/* harmony export */ uA: () => (/* binding */ x),
14/* harmony export */ zO: () => (/* binding */ t)
15/* harmony export */ });
16/* unused harmony exports Fragment, createElement, createRef, toChildArray */
17var n,l,u,t,i,o,r,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function w(n,l){for(var u in l)n[u]=l[u];return n}function g(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,u,t){var i,o,r,e={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=u[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return m(l,e,i,o,null)}function m(n,t,i,o,r){var e={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?S(n):null}function C(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!$.__r++||o!=l.debounceRendering)&&((o=l.debounceRendering)||r)($)}function $(){for(var n,u,t,o,r,f,c,s=1;i.length;)i.length>s&&i.sort(e),n=i.shift(),s=i.length,n.__d&&(t=void 0,o=void 0,r=(o=(u=n).__v).__e,f=[],c=[],u.__P&&((t=w({},o)).__v=o.__v+1,l.vnode&&l.vnode(t),O(u.__P,t,o,u.__n,u.__P.namespaceURI,32&o.__u?[r]:null,f,null==r?S(o):r,!!(32&o.__u),c),t.__v=o.__v,t.__.__k[t.__i]=t,N(f,t,c),o.__e=o.__=null,t.__e!=r&&C(t)));$.__r=0}function I(n,l,u,t,i,o,r,e,f,c,s){var a,h,y,d,w,g,_,m=t&&t.__k||v,b=l.length;for(f=P(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p:m[y.__i]||p,y.__i=a,g=O(n,y,h,i,o,r,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B(h.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),(_=!!(4&y.__u))||h.__k===y.__k?f=A(y,f,n,_):"function"==typeof y.type&&void 0!==g?f=g:d&&(f=d.nextSibling),y.__u&=-7);return u.__e=w,f}function P(n,l,u,t,i){var o,r,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),o=0;o<i;o++)null!=(r=l[o])&&"boolean"!=typeof r&&"function"!=typeof r?("string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?r=n.__k[o]=m(null,r,null,null,null):d(r)?r=n.__k[o]=m(k,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?r=n.__k[o]=m(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):n.__k[o]=r,f=o+h,r.__=n,r.__b=n.__b+1,e=null,-1!=(c=r.__i=L(r,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),"function"!=typeof r.type&&(r.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,r.__u|=4))):n.__k[o]=null;if(a)for(o=0;o<s;o++)null!=(e=u[o])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D(e,e));return t}function A(n,l,u,t){var i,o;if("function"==typeof n.type){for(i=n.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=n,l=A(i[o],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function H(n,l){return l=l||[],null==n||"boolean"==typeof n||(d(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,u,t){var i,o,r,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==e||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,o=u+1;i>=0||o<l.length;)if(null!=(c=l[r=i>=0?i--:o++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return r;return-1}function T(n,l,u){"-"==l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||y.test(l)?u:u+"px"}function j(n,l,u,t,i){var o,r;n:if("style"==l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T(n.style,l,u[l])}else if("o"==l[0]&&"n"==l[1])o=l!=(l=l.replace(f,"$1")),r=l.toLowerCase(),l=r in n||"onFocusOut"==l||"onFocusIn"==l?r.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=c,n.addEventListener(l,o?a:s,o)):n.removeEventListener(l,o?a:s,o);else{if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u))}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c++;else if(u.t<t.u)return;return t(l.event?l.event(u):u)}}}function O(n,u,t,i,o,r,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[f=u.__e=t.__e]),(a=l.__b)&&a(u);n:if("function"==typeof j)try{if(b=u.props,S="prototype"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x(b,M),h.constructor=j,h.render=E),C&&C.sub(h),h.state||(h.state={}),h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({},h.__s)),w(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),u.__v==t.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=w(w({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k&&null==a.key&&(L=V(a.props.children)),f=I(n,d(L)?L:[L],u,t,i,o,r,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=r)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,u.__e=f}else{for(T=r.length;T--;)g(r[T]);z(u)}else u.__e=t.__e,u.__k=t.__k,n.then||z(u);l.__e(n,u,t)}else null==r&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q(t.__e,u,t,i,o,r,e,c,s);return(a=l.diffed)&&a(u),128&u.__u?void 0:f}function z(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z)}function N(n,u,t){for(var i=0;i<t.length;i++)B(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function V(n){return"object"!=typeof n||null==n||n.__b&&n.__b>0?n:d(n)?n.map(V):w({},n)}function q(u,t,i,o,r,e,f,c,s){var a,h,v,y,w,_,m,b=i.props||p,k=t.props,x=t.type;if("svg"==x?r="http://www.w3.org/2000/svg":"math"==x?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((w=e[a])&&"setAttribute"in w==!!x&&(x?w.localName==x:3==w.nodeType)){u=w,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(r,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)b===k||c&&u.data==k||(u.data=k);else{if(e=e&&n.call(u.childNodes),!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(w=u.attributes[a]).name]=w.value;for(a in b)if(w=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=w;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;j(u,a,null,w,r)}for(a in k)w=k[a],"children"==a?y=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?_=w:"checked"==a?m=w:c&&"function"!=typeof w||b[a]===w||j(u,a,w,b[a],r);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=""),I("template"==t.type?u.content:u,d(y)?y:[y],t,i,o,"foreignObject"==x?"http://www.w3.org/1999/xhtml":r,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j(u,a,_,b[a],r),a="checked",null!=m&&m!=u[a]&&j(u,a,m,b[a],r))}return u}function B(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function D(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&D(i[o],u,t||"function"!=typeof n.type);t||g(n.__e),n.__c=n.__=n.__e=void 0}function E(n,l,u){return this.constructor(n,u)}function G(u,t,i){var o,r,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O(t,u=(!o&&i||t).__k=_(k,null,[u]),r||p,p,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,e,!o&&i?i:r?r.__e:t.firstChild,o,f),N(e,u,f)}function J(n,l){G(n,l,J)}function K(l,u,t){var i,o,r,e,f=w({},l.props);for(r in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=void 0===u[r]&&null!=e?e[r]:u[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m(l.type,f,i||l.key,o||l.ref,null)}function Q(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c="__cC"+h++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},x.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w({},this.state),"function"==typeof n&&(n=n(w({},u),this.props)),n&&w(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=F(!1),a=F(!0),h=0;
18
19
20/***/ })
21
22/******/ });
23/************************************************************************/
24/******/ // The module cache
25/******/ var __webpack_module_cache__ = {};
26/******/
27/******/ // The require function
28/******/ function __webpack_require__(moduleId) {
29/******/ // Check if module is in cache
30/******/ var cachedModule = __webpack_module_cache__[moduleId];
31/******/ if (cachedModule !== undefined) {
32/******/ return cachedModule.exports;
33/******/ }
34/******/ // Create a new module (and put it into the cache)
35/******/ var module = __webpack_module_cache__[moduleId] = {
36/******/ // no module.id needed
37/******/ // no module.loaded needed
38/******/ exports: {}
39/******/ };
40/******/
41/******/ // Execute the module function
42/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
43/******/
44/******/ // Return the exports of the module
45/******/ return module.exports;
46/******/ }
47/******/
48/************************************************************************/
49/******/ /* webpack/runtime/define property getters */
50/******/ (() => {
51/******/ // define getter functions for harmony exports
52/******/ __webpack_require__.d = (exports, definition) => {
53/******/ for(var key in definition) {
54/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
55/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
56/******/ }
57/******/ }
58/******/ };
59/******/ })();
60/******/
61/******/ /* webpack/runtime/hasOwnProperty shorthand */
62/******/ (() => {
63/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
64/******/ })();
65/******/
66/************************************************************************/
67var __webpack_exports__ = {};
68
69// EXPORTS
70__webpack_require__.d(__webpack_exports__, {
71 zj: () => (/* reexport */ getConfig),
72 SD: () => (/* reexport */ getContext),
73 V6: () => (/* reexport */ getElement),
74 $K: () => (/* reexport */ getServerContext),
75 vT: () => (/* reexport */ getServerState),
76 jb: () => (/* binding */ privateApis),
77 yT: () => (/* reexport */ splitTask),
78 M_: () => (/* reexport */ store),
79 hb: () => (/* reexport */ useCallback),
80 vJ: () => (/* reexport */ useEffect),
81 ip: () => (/* reexport */ useInit),
82 Nf: () => (/* reexport */ useLayoutEffect),
83 Kr: () => (/* reexport */ useMemo),
84 li: () => (/* reexport */ A),
85 J0: () => (/* reexport */ d),
86 FH: () => (/* reexport */ useWatch),
87 v4: () => (/* reexport */ withScope),
88 mh: () => (/* reexport */ withSyncEvent)
89});
90
91// EXTERNAL MODULE: ./node_modules/preact/dist/preact.module.js
92var preact_module = __webpack_require__(622);
93;// ./node_modules/preact/hooks/dist/hooks.module.js
94var hooks_module_t,r,hooks_module_u,i,hooks_module_o=0,hooks_module_f=[],hooks_module_c=preact_module/* options */.fF,e=hooks_module_c.__b,a=hooks_module_c.__r,v=hooks_module_c.diffed,l=hooks_module_c.__c,m=hooks_module_c.unmount,s=hooks_module_c.__;function p(n,t){hooks_module_c.__h&&hooks_module_c.__h(r,n,hooks_module_o||t),hooks_module_o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return hooks_module_o=1,h(D,n)}function h(n,u,i){var o=p(hooks_module_t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c&&c.call(this,n,t,r)||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function y(n,u){var i=p(hooks_module_t++,3);!hooks_module_c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=p(hooks_module_t++,4);!hooks_module_c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return hooks_module_o=5,T(function(){return{current:n}},[])}function F(n,t,r){hooks_module_o=6,_(function(){if("function"==typeof n){var r=n(t());return function(){n(null),r&&"function"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=p(hooks_module_t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return hooks_module_o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=p(hooks_module_t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){hooks_module_c.useDebugValue&&hooks_module_c.useDebugValue(t?t(n):n)}function b(n){var u=p(hooks_module_t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=p(hooks_module_t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__="P"+i[0]+"-"+i[1]++}return n.__}function j(){for(var n;n=hooks_module_f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],hooks_module_c.__e(t,n.__v)}}hooks_module_c.__b=function(n){r=null,e&&e(n)},hooks_module_c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t)},hooks_module_c.__r=function(n){a&&a(n),hooks_module_t=0;var i=(r=n.__c).__H;i&&(hooks_module_u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],hooks_module_t=0)),hooks_module_u=r},hooks_module_c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==hooks_module_f.push(t)&&i===hooks_module_c.requestAnimationFrame||((i=hooks_module_c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),hooks_module_u=r=null},hooks_module_c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],hooks_module_c.__e(r,n.__v)}}),l&&l(n,t)},hooks_module_c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&hooks_module_c.__e(t,r.__v))};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return"function"==typeof t?t(n):t}
95
96;// ./node_modules/@preact/signals-core/dist/signals-core.module.js
97var signals_core_module_i=Symbol.for("preact-signals");function signals_core_module_t(){if(!(signals_core_module_s>1)){var i,t=!1;while(void 0!==signals_core_module_h){var r=signals_core_module_h;signals_core_module_h=void 0;signals_core_module_f++;while(void 0!==r){var o=r.o;r.o=void 0;r.f&=-3;if(!(8&r.f)&&signals_core_module_c(r))try{r.c()}catch(r){if(!t){i=r;t=!0}}r=o}}signals_core_module_f=0;signals_core_module_s--;if(t)throw i}else signals_core_module_s--}function signals_core_module_r(i){if(signals_core_module_s>0)return i();signals_core_module_s++;try{return i()}finally{signals_core_module_t()}}var signals_core_module_o=void 0;function n(i){var t=signals_core_module_o;signals_core_module_o=void 0;try{return i()}finally{signals_core_module_o=t}}var signals_core_module_h=void 0,signals_core_module_s=0,signals_core_module_f=0,signals_core_module_v=0;function signals_core_module_e(i){if(void 0!==signals_core_module_o){var t=i.n;if(void 0===t||t.t!==signals_core_module_o){t={i:0,S:i,p:signals_core_module_o.s,n:void 0,t:signals_core_module_o,e:void 0,x:void 0,r:t};if(void 0!==signals_core_module_o.s)signals_core_module_o.s.n=t;signals_core_module_o.s=t;i.n=t;if(32&signals_core_module_o.f)i.S(t);return t}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=signals_core_module_o.s;t.n=void 0;signals_core_module_o.s.n=t;signals_core_module_o.s=t}return t}}}function signals_core_module_u(i,t){this.v=i;this.i=0;this.n=void 0;this.t=void 0;this.W=null==t?void 0:t.watched;this.Z=null==t?void 0:t.unwatched;this.name=null==t?void 0:t.name}signals_core_module_u.prototype.brand=signals_core_module_i;signals_core_module_u.prototype.h=function(){return!0};signals_core_module_u.prototype.S=function(i){var t=this,r=this.t;if(r!==i&&void 0===i.e){i.x=r;this.t=i;if(void 0!==r)r.e=i;else n(function(){var i;null==(i=t.W)||i.call(t)})}};signals_core_module_u.prototype.U=function(i){var t=this;if(void 0!==this.t){var r=i.e,o=i.x;if(void 0!==r){r.x=o;i.e=void 0}if(void 0!==o){o.e=r;i.x=void 0}if(i===this.t){this.t=o;if(void 0===o)n(function(){var i;null==(i=t.Z)||i.call(t)})}}};signals_core_module_u.prototype.subscribe=function(i){var t=this;return E(function(){var r=t.value,n=signals_core_module_o;signals_core_module_o=void 0;try{i(r)}finally{signals_core_module_o=n}},{name:"sub"})};signals_core_module_u.prototype.valueOf=function(){return this.value};signals_core_module_u.prototype.toString=function(){return this.value+""};signals_core_module_u.prototype.toJSON=function(){return this.value};signals_core_module_u.prototype.peek=function(){var i=signals_core_module_o;signals_core_module_o=void 0;try{return this.value}finally{signals_core_module_o=i}};Object.defineProperty(signals_core_module_u.prototype,"value",{get:function(){var i=signals_core_module_e(this);if(void 0!==i)i.i=this.i;return this.v},set:function(i){if(i!==this.v){if(signals_core_module_f>100)throw new Error("Cycle detected");this.v=i;this.i++;signals_core_module_v++;signals_core_module_s++;try{for(var r=this.t;void 0!==r;r=r.x)r.t.N()}finally{signals_core_module_t()}}}});function signals_core_module_d(i,t){return new signals_core_module_u(i,t)}function signals_core_module_c(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function signals_core_module_a(i){for(var t=i.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r)t.r=r;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break}}}function signals_core_module_l(i){var t=i.s,r=void 0;while(void 0!==t){var o=t.p;if(-1===t.i){t.S.U(t);if(void 0!==o)o.n=t.n;if(void 0!==t.n)t.n.p=o}else r=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=o}i.s=r}function signals_core_module_y(i,t){signals_core_module_u.call(this,void 0);this.x=i;this.s=void 0;this.g=signals_core_module_v-1;this.f=4;this.W=null==t?void 0:t.watched;this.Z=null==t?void 0:t.unwatched;this.name=null==t?void 0:t.name}signals_core_module_y.prototype=new signals_core_module_u;signals_core_module_y.prototype.h=function(){this.f&=-3;if(1&this.f)return!1;if(32==(36&this.f))return!0;this.f&=-5;if(this.g===signals_core_module_v)return!0;this.g=signals_core_module_v;this.f|=1;if(this.i>0&&!signals_core_module_c(this)){this.f&=-2;return!0}var i=signals_core_module_o;try{signals_core_module_a(this);signals_core_module_o=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++}}catch(i){this.v=i;this.f|=16;this.i++}signals_core_module_o=i;signals_core_module_l(this);this.f&=-2;return!0};signals_core_module_y.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}signals_core_module_u.prototype.S.call(this,i)};signals_core_module_y.prototype.U=function(i){if(void 0!==this.t){signals_core_module_u.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}}};signals_core_module_y.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N()}};Object.defineProperty(signals_core_module_y.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var i=signals_core_module_e(this);this.h();if(void 0!==i)i.i=this.i;if(16&this.f)throw this.v;return this.v}});function signals_core_module_w(i,t){return new signals_core_module_y(i,t)}function signals_core_module_(i){var r=i.u;i.u=void 0;if("function"==typeof r){signals_core_module_s++;var n=signals_core_module_o;signals_core_module_o=void 0;try{r()}catch(t){i.f&=-2;i.f|=8;signals_core_module_b(i);throw t}finally{signals_core_module_o=n;signals_core_module_t()}}}function signals_core_module_b(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;signals_core_module_(i)}function signals_core_module_g(i){if(signals_core_module_o!==this)throw new Error("Out-of-order effect");signals_core_module_l(this);signals_core_module_o=i;this.f&=-2;if(8&this.f)signals_core_module_b(this);signals_core_module_t()}function signals_core_module_p(i,t){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32;this.name=null==t?void 0:t.name}signals_core_module_p.prototype.c=function(){var i=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();if("function"==typeof t)this.u=t}finally{i()}};signals_core_module_p.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1;this.f&=-9;signals_core_module_(this);signals_core_module_a(this);signals_core_module_s++;var i=signals_core_module_o;signals_core_module_o=this;return signals_core_module_g.bind(this,i)};signals_core_module_p.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=signals_core_module_h;signals_core_module_h=this}};signals_core_module_p.prototype.d=function(){this.f|=8;if(!(1&this.f))signals_core_module_b(this)};signals_core_module_p.prototype.dispose=function(){this.d()};function E(i,t){var r=new signals_core_module_p(i,t);try{r.c()}catch(i){r.d();throw i}var o=r.d.bind(r);o[Symbol.dispose]=o;return o}
98;// ./node_modules/@preact/signals/dist/signals.module.js
99var signals_module_v,signals_module_s;function signals_module_l(i,n){preact_module/* options */.fF[i]=n.bind(null,preact_module/* options */.fF[i]||function(){})}function signals_module_d(i){if(signals_module_s)signals_module_s();signals_module_s=i&&i.S()}function signals_module_h(i){var r=this,f=i.data,o=useSignal(f);o.value=f;var e=T(function(){var i=r.__v;while(i=i.__)if(i.__c){i.__c.__$f|=4;break}r.__$u.c=function(){var i,t=r.__$u.S(),f=e.value;t();if((0,preact_module/* isValidElement */.zO)(f)||3!==(null==(i=r.base)?void 0:i.nodeType)){r.__$f|=1;r.setState({})}else r.base.data=f};return signals_core_module_w(function(){var i=o.value.value;return 0===i?0:!0===i?"":i||""})},[]);return e.value}signals_module_h.displayName="_st";Object.defineProperties(signals_core_module_u.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:signals_module_h},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});signals_module_l("__b",function(i,r){if("string"==typeof r.type){var n,t=r.props;for(var f in t)if("children"!==f){var o=t[f];if(o instanceof signals_core_module_u){if(!n)r.__np=n={};n[f]=o;t[f]=o.peek()}}}i(r)});signals_module_l("__r",function(i,r){signals_module_d();var n,t=r.__c;if(t){t.__$f&=-2;if(void 0===(n=t.__$u))t.__$u=n=function(i){var r;E(function(){r=this});r.c=function(){t.__$f|=1;t.setState({})};return r}()}signals_module_v=t;signals_module_d(n);i(r)});signals_module_l("__e",function(i,r,n,t){signals_module_d();signals_module_v=void 0;i(r,n,t)});signals_module_l("diffed",function(i,r){signals_module_d();signals_module_v=void 0;var n;if("string"==typeof r.type&&(n=r.__e)){var t=r.__np,f=r.props;if(t){var o=n.U;if(o)for(var e in o){var u=o[e];if(void 0!==u&&!(e in t)){u.d();o[e]=void 0}}else n.U=o={};for(var a in t){var c=o[a],s=t[a];if(void 0===c){c=signals_module_p(n,a,s,f);o[a]=c}else c.o(s,f)}}}i(r)});function signals_module_p(i,r,n,t){var f=r in i&&void 0===i.ownerSVGElement,o=signals_core_module_d(n);return{o:function(i,r){o.value=i;t=r},d:E(function(){var n=o.value.value;if(t[r]!==n){t[r]=n;if(f)i[r]=n;else if(n)i.setAttribute(r,n);else i.removeAttribute(r)}})}}signals_module_l("unmount",function(i,r){if("string"==typeof r.type){var n=r.__e;if(n){var t=n.U;if(t){n.U=void 0;for(var f in t){var o=t[f];if(o)o.d()}}}}else{var e=r.__c;if(e){var u=e.__$u;if(u){e.__$u=void 0;u.d()}}}i(r)});signals_module_l("__h",function(i,r,n,t){if(t<3||9===t)r.__$f|=2;i(r,n,t)});preact_module/* Component */.uA.prototype.shouldComponentUpdate=function(i,r){if(this.__R)return!0;var n=this.__$u,t=n&&void 0!==n.s;for(var f in r)return!0;if(this.__f||"boolean"==typeof this.u&&!0===this.u){if(!(t||2&this.__$f||4&this.__$f))return!0;if(1&this.__$f)return!0}else{if(!(t||4&this.__$f))return!0;if(3&this.__$f)return!0}for(var o in i)if("__source"!==o&&i[o]!==this.props[o])return!0;for(var e in this.props)if(!(e in i))return!0;return!1};function useSignal(i){return T(function(){return signals_core_module_d(i)},[])}function useComputed(i){var r=f(i);r.current=i;signals_module_v.__$f|=4;return t(function(){return u(function(){return r.current()})},[])}function useSignalEffect(i){var r=f(i);r.current=i;o(function(){return c(function(){return r.current()})},[])}
100;// ./node_modules/@wordpress/interactivity/build-module/namespaces.js
101const namespaceStack = [];
102const getNamespace = () => namespaceStack.slice(-1)[0];
103const setNamespace = (namespace) => {
104 namespaceStack.push(namespace);
105};
106const resetNamespace = () => {
107 namespaceStack.pop();
108};
109
110
111;// ./node_modules/@wordpress/interactivity/build-module/scopes.js
112
113
114
115const scopeStack = [];
116const getScope = () => scopeStack.slice(-1)[0];
117const setScope = (scope) => {
118 scopeStack.push(scope);
119};
120const resetScope = () => {
121 scopeStack.pop();
122};
123const throwNotInScope = (method) => {
124 throw Error(
125 `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)\`.`
126 );
127};
128const getContext = (namespace) => {
129 const scope = getScope();
130 if (true) {
131 if (!scope) {
132 throwNotInScope("getContext");
133 }
134 }
135 return scope.context[namespace || getNamespace()];
136};
137const getElement = () => {
138 const scope = getScope();
139 let deepReadOnlyOptions = {};
140 if (true) {
141 if (!scope) {
142 throwNotInScope("getElement");
143 }
144 deepReadOnlyOptions = {
145 errorMessage: "Don't mutate the attributes from `getElement`, use `data-wp-bind` to modify the attributes of an element instead."
146 };
147 }
148 const { ref, attributes } = scope;
149 return Object.freeze({
150 ref: ref.current,
151 attributes: deepReadOnly(attributes, deepReadOnlyOptions)
152 });
153};
154const navigationContextSignal = signals_core_module_d(0);
155function getServerContext(namespace) {
156 const scope = getScope();
157 if (true) {
158 if (!scope) {
159 throwNotInScope("getServerContext");
160 }
161 }
162 getServerContext.subscribe = navigationContextSignal.value;
163 return deepClone(scope.serverContext[namespace || getNamespace()]);
164}
165getServerContext.subscribe = 0;
166
167
168;// ./node_modules/@wordpress/interactivity/build-module/utils.js
169
170
171
172
173const afterNextFrame = (callback) => {
174 return new Promise((resolve) => {
175 const done = () => {
176 clearTimeout(timeout);
177 window.cancelAnimationFrame(raf);
178 setTimeout(() => {
179 callback();
180 resolve();
181 });
182 };
183 const timeout = setTimeout(done, 100);
184 const raf = window.requestAnimationFrame(done);
185 });
186};
187const splitTask = typeof window.scheduler?.yield === "function" ? window.scheduler.yield.bind(window.scheduler) : () => {
188 return new Promise((resolve) => {
189 setTimeout(resolve, 0);
190 });
191};
192const onDOMReady = (callback) => {
193 const [navigation] = performance.getEntriesByType("navigation");
194 if (navigation.domContentLoadedEventStart > 0) {
195 callback();
196 } else {
197 document.addEventListener("DOMContentLoaded", callback);
198 }
199};
200function createFlusher(compute, notify) {
201 let flush = () => void 0;
202 const dispose = E(function() {
203 flush = this.c.bind(this);
204 this.x = compute;
205 this.c = notify;
206 return compute();
207 });
208 return { flush, dispose };
209}
210function utils_useSignalEffect(callback) {
211 y(() => {
212 let eff = null;
213 let isExecuting = false;
214 const notify = async () => {
215 if (eff && !isExecuting) {
216 isExecuting = true;
217 await afterNextFrame(eff.flush);
218 isExecuting = false;
219 }
220 };
221 eff = createFlusher(callback, notify);
222 return eff.dispose;
223 }, []);
224}
225function withScope(func) {
226 const scope = getScope();
227 const ns = getNamespace();
228 let wrapped;
229 if (func?.constructor?.name === "GeneratorFunction") {
230 wrapped = async (...args) => {
231 const gen = func(...args);
232 let value;
233 let it;
234 let error;
235 while (true) {
236 setNamespace(ns);
237 setScope(scope);
238 try {
239 it = error ? gen.throw(error) : gen.next(value);
240 error = void 0;
241 } catch (e) {
242 throw e;
243 } finally {
244 resetScope();
245 resetNamespace();
246 }
247 try {
248 value = await it.value;
249 } catch (e) {
250 error = e;
251 }
252 if (it.done) {
253 if (error) {
254 throw error;
255 } else {
256 break;
257 }
258 }
259 }
260 return value;
261 };
262 } else {
263 wrapped = (...args) => {
264 setNamespace(ns);
265 setScope(scope);
266 try {
267 return func(...args);
268 } finally {
269 resetNamespace();
270 resetScope();
271 }
272 };
273 }
274 const syncAware = func;
275 if (syncAware.sync) {
276 const syncAwareWrapped = wrapped;
277 syncAwareWrapped.sync = true;
278 return syncAwareWrapped;
279 }
280 return wrapped;
281}
282function useWatch(callback) {
283 utils_useSignalEffect(withScope(callback));
284}
285function useInit(callback) {
286 y(withScope(callback), []);
287}
288function useEffect(callback, inputs) {
289 y(withScope(callback), inputs);
290}
291function useLayoutEffect(callback, inputs) {
292 _(withScope(callback), inputs);
293}
294function useCallback(callback, inputs) {
295 return q(withScope(callback), inputs);
296}
297function useMemo(factory, inputs) {
298 return T(withScope(factory), inputs);
299}
300const createRootFragment = (parent, replaceNode) => {
301 replaceNode = [].concat(replaceNode);
302 const sibling = replaceNode[replaceNode.length - 1].nextSibling;
303 function insert(child, root) {
304 parent.insertBefore(child, root || sibling);
305 }
306 return parent.__k = {
307 nodeType: 1,
308 parentNode: parent,
309 firstChild: replaceNode[0],
310 childNodes: replaceNode,
311 insertBefore: insert,
312 appendChild: insert,
313 removeChild(c) {
314 parent.removeChild(c);
315 },
316 contains(c) {
317 parent.contains(c);
318 }
319 };
320};
321function kebabToCamelCase(str) {
322 return str.replace(/^-+|-+$/g, "").toLowerCase().replace(/-([a-z])/g, function(_match, group1) {
323 return group1.toUpperCase();
324 });
325}
326const logged = /* @__PURE__ */ new Set();
327const warn = (message) => {
328 if (true) {
329 if (logged.has(message)) {
330 return;
331 }
332 console.warn(message);
333 try {
334 throw Error(message);
335 } catch (e) {
336 }
337 logged.add(message);
338 }
339};
340const isPlainObject = (candidate) => Boolean(
341 candidate && typeof candidate === "object" && candidate.constructor === Object
342);
343function withSyncEvent(callback) {
344 const syncAware = callback;
345 syncAware.sync = true;
346 return syncAware;
347}
348const readOnlyMap = /* @__PURE__ */ new WeakMap();
349const createDeepReadOnlyHandlers = (errorMessage) => {
350 const handleError = () => {
351 if (true) {
352 warn(errorMessage);
353 }
354 return false;
355 };
356 return {
357 get(target, prop) {
358 const value = target[prop];
359 if (value && typeof value === "object") {
360 return deepReadOnly(value, { errorMessage });
361 }
362 return value;
363 },
364 set: handleError,
365 deleteProperty: handleError,
366 defineProperty: handleError
367 };
368};
369function deepReadOnly(obj, options) {
370 const errorMessage = options?.errorMessage ?? "Cannot modify read-only object";
371 if (!readOnlyMap.has(obj)) {
372 const handlers = createDeepReadOnlyHandlers(errorMessage);
373 readOnlyMap.set(obj, new Proxy(obj, handlers));
374 }
375 return readOnlyMap.get(obj);
376}
377const navigationSignal = signals_core_module_d(0);
378function deepClone(source) {
379 if (isPlainObject(source)) {
380 return Object.fromEntries(
381 Object.entries(source).map(([key, value]) => [
382 key,
383 deepClone(value)
384 ])
385 );
386 }
387 if (Array.isArray(source)) {
388 return source.map((i) => deepClone(i));
389 }
390 return source;
391}
392
393
394;// ./node_modules/@wordpress/interactivity/build-module/proxies/registry.js
395const objToProxy = /* @__PURE__ */ new WeakMap();
396const proxyToObj = /* @__PURE__ */ new WeakMap();
397const proxyToNs = /* @__PURE__ */ new WeakMap();
398const supported = /* @__PURE__ */ new Set([Object, Array]);
399const createProxy = (namespace, obj, handlers) => {
400 if (!shouldProxy(obj)) {
401 throw Error("This object cannot be proxified.");
402 }
403 if (!objToProxy.has(obj)) {
404 const proxy = new Proxy(obj, handlers);
405 objToProxy.set(obj, proxy);
406 proxyToObj.set(proxy, obj);
407 proxyToNs.set(proxy, namespace);
408 }
409 return objToProxy.get(obj);
410};
411const getProxyFromObject = (obj) => objToProxy.get(obj);
412const getNamespaceFromProxy = (proxy) => proxyToNs.get(proxy);
413const shouldProxy = (candidate) => {
414 if (typeof candidate !== "object" || candidate === null) {
415 return false;
416 }
417 return !proxyToNs.has(candidate) && supported.has(candidate.constructor);
418};
419const getObjectFromProxy = (proxy) => proxyToObj.get(proxy);
420
421
422;// ./node_modules/@wordpress/interactivity/build-module/proxies/signals.js
423
424
425
426
427
428const NO_SCOPE = {};
429class PropSignal {
430 /**
431 * Proxy that holds the property this PropSignal is associated with.
432 */
433 owner;
434 /**
435 * Relation of computeds by scope. These computeds are read-only signals
436 * that depend on whether the property is a value or a getter and,
437 * therefore, can return different values depending on the scope in which
438 * the getter is accessed.
439 */
440 computedsByScope;
441 /**
442 * Signal with the value assigned to the related property.
443 */
444 valueSignal;
445 /**
446 * Signal with the getter assigned to the related property.
447 */
448 getterSignal;
449 /**
450 * Pending getter to be consolidated.
451 */
452 pendingGetter;
453 /**
454 * Structure that manages reactivity for a property in a state object, using
455 * signals to keep track of property value or getter modifications.
456 *
457 * @param owner Proxy that holds the property this instance is associated
458 * with.
459 */
460 constructor(owner) {
461 this.owner = owner;
462 this.computedsByScope = /* @__PURE__ */ new WeakMap();
463 }
464 /**
465 * Changes the internal value. If a getter was set before, it is set to
466 * `undefined`.
467 *
468 * @param value New value.
469 */
470 setValue(value) {
471 this.update({ value });
472 }
473 /**
474 * Changes the internal getter. If a value was set before, it is set to
475 * `undefined`.
476 *
477 * @param getter New getter.
478 */
479 setGetter(getter) {
480 this.update({ get: getter });
481 }
482 /**
483 * Changes the internal getter asynchronously.
484 *
485 * The update is made in a microtask, which prevents issues with getters
486 * accessing the state, and ensures the update occurs before any render.
487 *
488 * @param getter New getter.
489 */
490 setPendingGetter(getter) {
491 this.pendingGetter = getter;
492 queueMicrotask(() => this.consolidateGetter());
493 }
494 /**
495 * Consolidate the pending value of the getter.
496 */
497 consolidateGetter() {
498 const getter = this.pendingGetter;
499 if (getter) {
500 this.pendingGetter = void 0;
501 this.update({ get: getter });
502 }
503 }
504 /**
505 * Returns the computed that holds the result of evaluating the prop in the
506 * current scope.
507 *
508 * These computeds are read-only signals that depend on whether the property
509 * is a value or a getter and, therefore, can return different values
510 * depending on the scope in which the getter is accessed.
511 *
512 * @return Computed that depends on the scope.
513 */
514 getComputed() {
515 const scope = getScope() || NO_SCOPE;
516 if (!this.valueSignal && !this.getterSignal) {
517 this.update({});
518 }
519 if (this.pendingGetter) {
520 this.consolidateGetter();
521 }
522 if (!this.computedsByScope.has(scope)) {
523 const callback = () => {
524 const getter = this.getterSignal?.value;
525 return getter ? getter.call(this.owner) : this.valueSignal?.value;
526 };
527 setNamespace(getNamespaceFromProxy(this.owner));
528 this.computedsByScope.set(
529 scope,
530 signals_core_module_w(withScope(callback))
531 );
532 resetNamespace();
533 }
534 return this.computedsByScope.get(scope);
535 }
536 /**
537 * Updates the internal signals for the value and the getter of the
538 * corresponding prop.
539 *
540 * @param param0
541 * @param param0.get New getter.
542 * @param param0.value New value.
543 */
544 update({ get, value }) {
545 if (!this.valueSignal) {
546 this.valueSignal = signals_core_module_d(value);
547 this.getterSignal = signals_core_module_d(get);
548 } else if (value !== this.valueSignal.peek() || get !== this.getterSignal.peek()) {
549 signals_core_module_r(() => {
550 this.valueSignal.value = value;
551 this.getterSignal.value = get;
552 });
553 }
554 }
555}
556
557
558;// ./node_modules/@wordpress/interactivity/build-module/proxies/state.js
559
560
561
562
563
564const wellKnownSymbols = new Set(
565 Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter((value) => typeof value === "symbol")
566);
567const proxyToProps = /* @__PURE__ */ new WeakMap();
568const hasPropSignal = (proxy, key) => proxyToProps.has(proxy) && proxyToProps.get(proxy).has(key);
569const getPropSignal = (proxy, key, initial) => {
570 if (!proxyToProps.has(proxy)) {
571 proxyToProps.set(proxy, /* @__PURE__ */ new Map());
572 }
573 key = typeof key === "number" ? `${key}` : key;
574 const props = proxyToProps.get(proxy);
575 if (!props.has(key)) {
576 const ns = getNamespaceFromProxy(proxy);
577 const prop = new PropSignal(proxy);
578 props.set(key, prop);
579 if (initial) {
580 const { get, value } = initial;
581 if (get) {
582 prop.setGetter(get);
583 } else {
584 prop.setValue(
585 shouldProxy(value) ? proxifyState(ns, value) : value
586 );
587 }
588 }
589 }
590 return props.get(key);
591};
592const objToIterable = /* @__PURE__ */ new WeakMap();
593let peeking = false;
594const PENDING_GETTER = Symbol("PENDING_GETTER");
595const stateHandlers = {
596 get(target, key, receiver) {
597 if (peeking || !target.hasOwnProperty(key) && key in target || typeof key === "symbol" && wellKnownSymbols.has(key)) {
598 return Reflect.get(target, key, receiver);
599 }
600 const desc = Object.getOwnPropertyDescriptor(target, key);
601 const prop = getPropSignal(receiver, key, desc);
602 const result = prop.getComputed().value;
603 if (result === PENDING_GETTER) {
604 throw PENDING_GETTER;
605 }
606 if (typeof result === "function") {
607 const ns = getNamespaceFromProxy(receiver);
608 return (...args) => {
609 setNamespace(ns);
610 try {
611 return result.call(receiver, ...args);
612 } finally {
613 resetNamespace();
614 }
615 };
616 }
617 return result;
618 },
619 set(target, key, value, receiver) {
620 setNamespace(getNamespaceFromProxy(receiver));
621 try {
622 return Reflect.set(target, key, value, receiver);
623 } finally {
624 resetNamespace();
625 }
626 },
627 defineProperty(target, key, desc) {
628 const isNew = !(key in target);
629 const result = Reflect.defineProperty(target, key, desc);
630 if (result) {
631 const receiver = getProxyFromObject(target);
632 const prop = getPropSignal(receiver, key);
633 const { get, value } = desc;
634 if (get) {
635 prop.setGetter(get);
636 } else {
637 const ns = getNamespaceFromProxy(receiver);
638 prop.setValue(
639 shouldProxy(value) ? proxifyState(ns, value) : value
640 );
641 }
642 if (isNew && objToIterable.has(target)) {
643 objToIterable.get(target).value++;
644 }
645 if (Array.isArray(target) && proxyToProps.get(receiver)?.has("length")) {
646 const length = getPropSignal(receiver, "length");
647 length.setValue(target.length);
648 }
649 }
650 return result;
651 },
652 deleteProperty(target, key) {
653 const result = Reflect.deleteProperty(target, key);
654 if (result) {
655 const prop = getPropSignal(getProxyFromObject(target), key);
656 prop.setValue(void 0);
657 if (objToIterable.has(target)) {
658 objToIterable.get(target).value++;
659 }
660 }
661 return result;
662 },
663 ownKeys(target) {
664 if (!objToIterable.has(target)) {
665 objToIterable.set(target, signals_core_module_d(0));
666 }
667 objToIterable._ = objToIterable.get(target).value;
668 return Reflect.ownKeys(target);
669 }
670};
671const proxifyState = (namespace, obj) => {
672 return createProxy(namespace, obj, stateHandlers);
673};
674const peek = (obj, key) => {
675 peeking = true;
676 try {
677 return obj[key];
678 } finally {
679 peeking = false;
680 }
681};
682const deepMergeRecursive = (target, source, override = true) => {
683 if (!(isPlainObject(target) && isPlainObject(source))) {
684 return;
685 }
686 let hasNewKeys = false;
687 for (const key in source) {
688 const isNew = !(key in target);
689 hasNewKeys = hasNewKeys || isNew;
690 const desc = Object.getOwnPropertyDescriptor(source, key);
691 const proxy = getProxyFromObject(target);
692 const propSignal = !!proxy && hasPropSignal(proxy, key) && getPropSignal(proxy, key);
693 if (typeof desc.get === "function" || typeof desc.set === "function") {
694 if (override || isNew) {
695 Object.defineProperty(target, key, {
696 ...desc,
697 configurable: true,
698 enumerable: true
699 });
700 if (desc.get && propSignal) {
701 propSignal.setPendingGetter(desc.get);
702 }
703 }
704 } else if (isPlainObject(source[key])) {
705 const targetValue = Object.getOwnPropertyDescriptor(target, key)?.value;
706 if (isNew || override && !isPlainObject(targetValue)) {
707 target[key] = {};
708 if (propSignal) {
709 const ns = getNamespaceFromProxy(proxy);
710 propSignal.setValue(
711 proxifyState(ns, target[key])
712 );
713 }
714 deepMergeRecursive(target[key], source[key], override);
715 } else if (isPlainObject(targetValue)) {
716 deepMergeRecursive(target[key], source[key], override);
717 }
718 } else if (override || isNew) {
719 Object.defineProperty(target, key, desc);
720 if (propSignal) {
721 const { value } = desc;
722 const ns = getNamespaceFromProxy(proxy);
723 propSignal.setValue(
724 shouldProxy(value) ? proxifyState(ns, value) : value
725 );
726 }
727 }
728 }
729 if (hasNewKeys && objToIterable.has(target)) {
730 objToIterable.get(target).value++;
731 }
732};
733const deepMerge = (target, source, override = true) => signals_core_module_r(
734 () => deepMergeRecursive(
735 getObjectFromProxy(target) || target,
736 source,
737 override
738 )
739);
740
741
742;// ./node_modules/@wordpress/interactivity/build-module/proxies/store.js
743
744
745
746const storeRoots = /* @__PURE__ */ new WeakSet();
747const storeHandlers = {
748 get: (target, key, receiver) => {
749 const result = Reflect.get(target, key);
750 const ns = getNamespaceFromProxy(receiver);
751 if (typeof result === "undefined" && storeRoots.has(receiver)) {
752 const obj = {};
753 Reflect.set(target, key, obj);
754 return proxifyStore(ns, obj, false);
755 }
756 if (typeof result === "function") {
757 setNamespace(ns);
758 const scoped = withScope(result);
759 resetNamespace();
760 return scoped;
761 }
762 if (isPlainObject(result) && shouldProxy(result)) {
763 return proxifyStore(ns, result, false);
764 }
765 return result;
766 }
767};
768const proxifyStore = (namespace, obj, isRoot = true) => {
769 const proxy = createProxy(namespace, obj, storeHandlers);
770 if (proxy && isRoot) {
771 storeRoots.add(proxy);
772 }
773 return proxy;
774};
775
776
777;// ./node_modules/@wordpress/interactivity/build-module/proxies/context.js
778const contextObjectToProxy = /* @__PURE__ */ new WeakMap();
779const contextObjectToFallback = /* @__PURE__ */ new WeakMap();
780const contextProxies = /* @__PURE__ */ new WeakSet();
781const descriptor = Reflect.getOwnPropertyDescriptor;
782const contextHandlers = {
783 get: (target, key) => {
784 const fallback = contextObjectToFallback.get(target);
785 const currentProp = target[key];
786 return key in target ? currentProp : fallback[key];
787 },
788 set: (target, key, value) => {
789 const fallback = contextObjectToFallback.get(target);
790 const obj = key in target || !(key in fallback) ? target : fallback;
791 obj[key] = value;
792 return true;
793 },
794 ownKeys: (target) => [
795 .../* @__PURE__ */ new Set([
796 ...Object.keys(contextObjectToFallback.get(target)),
797 ...Object.keys(target)
798 ])
799 ],
800 getOwnPropertyDescriptor: (target, key) => descriptor(target, key) || descriptor(contextObjectToFallback.get(target), key),
801 has: (target, key) => Reflect.has(target, key) || Reflect.has(contextObjectToFallback.get(target), key)
802};
803const proxifyContext = (current, inherited = {}) => {
804 if (contextProxies.has(current)) {
805 throw Error("This object cannot be proxified.");
806 }
807 contextObjectToFallback.set(current, inherited);
808 if (!contextObjectToProxy.has(current)) {
809 const proxy = new Proxy(current, contextHandlers);
810 contextObjectToProxy.set(current, proxy);
811 contextProxies.add(proxy);
812 }
813 return contextObjectToProxy.get(current);
814};
815
816
817;// ./node_modules/@wordpress/interactivity/build-module/proxies/index.js
818
819
820
821
822
823;// ./node_modules/@wordpress/interactivity/build-module/store.js
824
825
826
827
828const stores = /* @__PURE__ */ new Map();
829const rawStores = /* @__PURE__ */ new Map();
830const storeLocks = /* @__PURE__ */ new Map();
831const storeConfigs = /* @__PURE__ */ new Map();
832const serverStates = /* @__PURE__ */ new Map();
833const getConfig = (namespace) => storeConfigs.get(namespace || getNamespace()) || {};
834function getServerState(namespace) {
835 const ns = namespace || getNamespace();
836 if (!serverStates.has(ns)) {
837 serverStates.set(ns, {});
838 }
839 getServerState.subscribe = navigationSignal.value;
840 return deepClone(serverStates.get(ns));
841}
842getServerState.subscribe = 0;
843const universalUnlock = "I acknowledge that using a private store means my plugin will inevitably break on the next store release.";
844function store(namespace, { state = {}, ...block } = {}, { lock = false } = {}) {
845 if (!stores.has(namespace)) {
846 if (lock !== universalUnlock) {
847 storeLocks.set(namespace, lock);
848 }
849 const rawStore = {
850 state: proxifyState(
851 namespace,
852 isPlainObject(state) ? state : {}
853 ),
854 ...block
855 };
856 const proxifiedStore = proxifyStore(namespace, rawStore);
857 rawStores.set(namespace, rawStore);
858 stores.set(namespace, proxifiedStore);
859 } else {
860 if (lock !== universalUnlock && !storeLocks.has(namespace)) {
861 storeLocks.set(namespace, lock);
862 } else {
863 const storeLock = storeLocks.get(namespace);
864 const isLockValid = lock === universalUnlock || lock !== true && lock === storeLock;
865 if (!isLockValid) {
866 if (!storeLock) {
867 throw Error("Cannot lock a public store");
868 } else {
869 throw Error(
870 "Cannot unlock a private store with an invalid lock code"
871 );
872 }
873 }
874 }
875 const target = rawStores.get(namespace);
876 deepMerge(target, block);
877 deepMerge(target.state, state);
878 }
879 return stores.get(namespace);
880}
881const parseServerData = (dom = document) => {
882 const jsonDataScriptTag = (
883 // Preferred Script Module data passing form
884 dom.getElementById(
885 "wp-script-module-data-@wordpress/interactivity"
886 ) ?? // Legacy form
887 dom.getElementById("wp-interactivity-data")
888 );
889 if (jsonDataScriptTag?.textContent) {
890 try {
891 return JSON.parse(jsonDataScriptTag.textContent);
892 } catch {
893 }
894 }
895 return {};
896};
897const populateServerData = (data) => {
898 serverStates.clear();
899 storeConfigs.clear();
900 if (isPlainObject(data?.state)) {
901 Object.entries(data.state).forEach(([namespace, state]) => {
902 const st = store(namespace, {}, { lock: universalUnlock });
903 deepMerge(st.state, state, false);
904 serverStates.set(namespace, state);
905 });
906 }
907 if (isPlainObject(data?.config)) {
908 Object.entries(data.config).forEach(([namespace, config]) => {
909 storeConfigs.set(namespace, config);
910 });
911 }
912 if (isPlainObject(data?.derivedStateClosures)) {
913 Object.entries(data.derivedStateClosures).forEach(
914 ([namespace, paths]) => {
915 const st = store(
916 namespace,
917 {},
918 { lock: universalUnlock }
919 );
920 paths.forEach((path) => {
921 const pathParts = path.split(".");
922 const prop = pathParts.splice(-1, 1)[0];
923 const parent = pathParts.reduce(
924 (prev, key) => peek(prev, key),
925 st
926 );
927 const desc = Object.getOwnPropertyDescriptor(
928 parent,
929 prop
930 );
931 if (isPlainObject(desc?.value)) {
932 parent[prop] = PENDING_GETTER;
933 }
934 });
935 }
936 );
937 }
938};
939
940
941;// ./node_modules/@wordpress/interactivity/build-module/hooks.js
942
943
944
945
946
947
948function isNonDefaultDirectiveSuffix(entry) {
949 return entry.suffix !== null;
950}
951function isDefaultDirectiveSuffix(entry) {
952 return entry.suffix === null;
953}
954const context = (0,preact_module/* createContext */.q6)({ client: {}, server: {} });
955const directiveCallbacks = {};
956const directivePriorities = {};
957const directive = (name, callback, { priority = 10 } = {}) => {
958 directiveCallbacks[name] = callback;
959 directivePriorities[name] = priority;
960};
961const resolve = (path, namespace) => {
962 if (!namespace) {
963 warn(
964 `Namespace missing for "${path}". The value for that path won't be resolved.`
965 );
966 return;
967 }
968 let resolvedStore = stores.get(namespace);
969 if (typeof resolvedStore === "undefined") {
970 resolvedStore = store(
971 namespace,
972 {},
973 {
974 lock: universalUnlock
975 }
976 );
977 }
978 const current = {
979 ...resolvedStore,
980 context: getScope().context[namespace]
981 };
982 try {
983 const pathParts = path.split(".");
984 return pathParts.reduce((acc, key) => acc[key], current);
985 } catch (e) {
986 if (e === PENDING_GETTER) {
987 return PENDING_GETTER;
988 }
989 }
990};
991const getEvaluate = ({ scope }) => (
992 // TODO: When removing the temporarily remaining `value( ...args )` call below, remove the `...args` parameter too.
993 (entry, ...args) => {
994 let { value: path, namespace } = entry;
995 if (typeof path !== "string") {
996 throw new Error("The `value` prop should be a string path");
997 }
998 const hasNegationOperator = path[0] === "!" && !!(path = path.slice(1));
999 setScope(scope);
1000 const value = resolve(path, namespace);
1001 if (typeof value === "function") {
1002 if (hasNegationOperator) {
1003 warn(
1004 "Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead."
1005 );
1006 const functionResult = !value(...args);
1007 resetScope();
1008 return functionResult;
1009 }
1010 resetScope();
1011 const wrappedFunction = (...functionArgs) => {
1012 setScope(scope);
1013 const functionResult = value(...functionArgs);
1014 resetScope();
1015 return functionResult;
1016 };
1017 if (value.sync) {
1018 const syncAwareFunction = wrappedFunction;
1019 syncAwareFunction.sync = true;
1020 }
1021 return wrappedFunction;
1022 }
1023 const result = value;
1024 resetScope();
1025 return hasNegationOperator && value !== PENDING_GETTER ? !result : result;
1026 }
1027);
1028const getPriorityLevels = (directives) => {
1029 const byPriority = Object.keys(directives).reduce((obj, name) => {
1030 if (directiveCallbacks[name]) {
1031 const priority = directivePriorities[name];
1032 (obj[priority] = obj[priority] || []).push(name);
1033 }
1034 return obj;
1035 }, {});
1036 return Object.entries(byPriority).sort(([p1], [p2]) => parseInt(p1) - parseInt(p2)).map(([, arr]) => arr);
1037};
1038const Directives = ({
1039 directives,
1040 priorityLevels: [currentPriorityLevel, ...nextPriorityLevels],
1041 element,
1042 originalProps,
1043 previousScope
1044}) => {
1045 const scope = A({}).current;
1046 scope.evaluate = q(getEvaluate({ scope }), []);
1047 const { client, server } = x(context);
1048 scope.context = client;
1049 scope.serverContext = server;
1050 scope.ref = previousScope?.ref || A(null);
1051 element = (0,preact_module/* cloneElement */.Ob)(element, { ref: scope.ref });
1052 scope.attributes = element.props;
1053 const children = nextPriorityLevels.length > 0 ? (0,preact_module.h)(Directives, {
1054 directives,
1055 priorityLevels: nextPriorityLevels,
1056 element,
1057 originalProps,
1058 previousScope: scope
1059 }) : element;
1060 const props = { ...originalProps, children };
1061 const directiveArgs = {
1062 directives,
1063 props,
1064 element,
1065 context,
1066 evaluate: scope.evaluate
1067 };
1068 setScope(scope);
1069 for (const directiveName of currentPriorityLevel) {
1070 const wrapper = directiveCallbacks[directiveName]?.(directiveArgs);
1071 if (wrapper !== void 0) {
1072 props.children = wrapper;
1073 }
1074 }
1075 resetScope();
1076 return props.children;
1077};
1078const old = preact_module/* options */.fF.vnode;
1079preact_module/* options */.fF.vnode = (vnode) => {
1080 if (vnode.props.__directives) {
1081 const props = vnode.props;
1082 const directives = props.__directives;
1083 if (directives.key) {
1084 vnode.key = directives.key.find(isDefaultDirectiveSuffix).value;
1085 }
1086 delete props.__directives;
1087 const priorityLevels = getPriorityLevels(directives);
1088 if (priorityLevels.length > 0) {
1089 vnode.props = {
1090 directives,
1091 priorityLevels,
1092 originalProps: props,
1093 type: vnode.type,
1094 element: (0,preact_module.h)(vnode.type, props),
1095 top: true
1096 };
1097 vnode.type = Directives;
1098 }
1099 }
1100 if (old) {
1101 old(vnode);
1102 }
1103};
1104
1105
1106;// ./node_modules/@wordpress/interactivity/build-module/directives.js
1107
1108
1109
1110
1111
1112
1113
1114
1115const warnUniqueIdWithTwoHyphens = (prefix, suffix, uniqueId) => {
1116 if (true) {
1117 warn(
1118 `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.`
1119 );
1120 }
1121};
1122const warnUniqueIdNotSupported = (prefix, uniqueId) => {
1123 if (true) {
1124 warn(
1125 `Unique IDs are not supported for the data-wp-${prefix} directive. Ignoring the directive with unique ID "${uniqueId}".`
1126 );
1127 }
1128};
1129const warnWithSyncEvent = (wrongPrefix, rightPrefix) => {
1130 if (true) {
1131 warn(
1132 `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.`
1133 );
1134 }
1135};
1136function wrapEventAsync(event) {
1137 const handler = {
1138 get(target, prop, receiver) {
1139 const value = target[prop];
1140 switch (prop) {
1141 case "currentTarget":
1142 if (true) {
1143 warn(
1144 `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().`
1145 );
1146 }
1147 break;
1148 case "preventDefault":
1149 case "stopImmediatePropagation":
1150 case "stopPropagation":
1151 if (true) {
1152 warn(
1153 `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().`
1154 );
1155 }
1156 break;
1157 }
1158 if (value instanceof Function) {
1159 return function(...args) {
1160 return value.apply(
1161 this === receiver ? target : this,
1162 args
1163 );
1164 };
1165 }
1166 return value;
1167 }
1168 };
1169 return new Proxy(event, handler);
1170}
1171const newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g;
1172const ruleClean = /\/\*[^]*?\*\/| +/g;
1173const ruleNewline = /\n+/g;
1174const empty = " ";
1175const cssStringToObject = (val) => {
1176 const tree = [{}];
1177 let block, left;
1178 while (block = newRule.exec(val.replace(ruleClean, ""))) {
1179 if (block[4]) {
1180 tree.shift();
1181 } else if (block[3]) {
1182 left = block[3].replace(ruleNewline, empty).trim();
1183 tree.unshift(tree[0][left] = tree[0][left] || {});
1184 } else {
1185 tree[0][block[1]] = block[2].replace(ruleNewline, empty).trim();
1186 }
1187 }
1188 return tree[0];
1189};
1190const getGlobalEventDirective = (type) => {
1191 return ({ directives, evaluate }) => {
1192 directives[`on-${type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
1193 const suffixParts = entry.suffix.split("--", 2);
1194 const eventName = suffixParts[0];
1195 if (true) {
1196 if (suffixParts[1]) {
1197 warnUniqueIdWithTwoHyphens(
1198 `on-${type}`,
1199 suffixParts[0],
1200 suffixParts[1]
1201 );
1202 }
1203 }
1204 useInit(() => {
1205 const cb = (event) => {
1206 const result = evaluate(entry);
1207 if (typeof result === "function") {
1208 if (!result?.sync) {
1209 event = wrapEventAsync(event);
1210 }
1211 result(event);
1212 }
1213 };
1214 const globalVar = type === "window" ? window : document;
1215 globalVar.addEventListener(eventName, cb);
1216 return () => globalVar.removeEventListener(eventName, cb);
1217 });
1218 });
1219 };
1220};
1221const evaluateItemKey = (inheritedValue, namespace, item, itemProp, eachKey) => {
1222 const clientContextWithItem = {
1223 ...inheritedValue.client,
1224 [namespace]: {
1225 ...inheritedValue.client[namespace],
1226 [itemProp]: item
1227 }
1228 };
1229 const scope = {
1230 ...getScope(),
1231 context: clientContextWithItem,
1232 serverContext: inheritedValue.server
1233 };
1234 return eachKey ? getEvaluate({ scope })(eachKey) : item;
1235};
1236const useItemContexts = function* (inheritedValue, namespace, items, itemProp, eachKey) {
1237 const { current: itemContexts } = A(/* @__PURE__ */ new Map());
1238 for (const item of items) {
1239 const key = evaluateItemKey(
1240 inheritedValue,
1241 namespace,
1242 item,
1243 itemProp,
1244 eachKey
1245 );
1246 if (!itemContexts.has(key)) {
1247 itemContexts.set(
1248 key,
1249 proxifyContext(
1250 proxifyState(namespace, {
1251 // Inits the item prop in the context to shadow it in case
1252 // it was inherited from the parent context. The actual
1253 // value is set in the `wp-each` directive later on.
1254 [itemProp]: void 0
1255 }),
1256 inheritedValue.client[namespace]
1257 )
1258 );
1259 }
1260 yield [item, itemContexts.get(key), key];
1261 }
1262};
1263const getGlobalAsyncEventDirective = (type) => {
1264 return ({ directives, evaluate }) => {
1265 directives[`on-async-${type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
1266 if (true) {
1267 warnWithSyncEvent(`on-async-${type}`, `on-${type}`);
1268 }
1269 const eventName = entry.suffix.split("--", 1)[0];
1270 useInit(() => {
1271 const cb = async (event) => {
1272 await splitTask();
1273 const result = evaluate(entry);
1274 if (typeof result === "function") {
1275 result(event);
1276 }
1277 };
1278 const globalVar = type === "window" ? window : document;
1279 globalVar.addEventListener(eventName, cb, {
1280 passive: true
1281 });
1282 return () => globalVar.removeEventListener(eventName, cb);
1283 });
1284 });
1285 };
1286};
1287const routerRegions = /* @__PURE__ */ new Map();
1288var directives_default = () => {
1289 directive(
1290 "context",
1291 ({
1292 directives: { context },
1293 props: { children },
1294 context: inheritedContext
1295 }) => {
1296 const entries = context.filter(isDefaultDirectiveSuffix).reverse();
1297 if (!entries.length) {
1298 if (true) {
1299 warn(
1300 "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."
1301 );
1302 }
1303 return;
1304 }
1305 const { Provider } = inheritedContext;
1306 const { client: inheritedClient, server: inheritedServer } = x(inheritedContext);
1307 const client = A({});
1308 const server = {};
1309 const result = {
1310 client: { ...inheritedClient },
1311 server: { ...inheritedServer }
1312 };
1313 const namespaces = /* @__PURE__ */ new Set();
1314 entries.forEach(({ value, namespace, uniqueId }) => {
1315 if (!isPlainObject(value)) {
1316 if (true) {
1317 warn(
1318 `The value of data-wp-context${uniqueId ? `---${uniqueId}` : ""} on the ${namespace} namespace must be a valid stringified JSON object.`
1319 );
1320 }
1321 return;
1322 }
1323 if (!client.current[namespace]) {
1324 client.current[namespace] = proxifyState(namespace, {});
1325 }
1326 deepMerge(
1327 client.current[namespace],
1328 deepClone(value),
1329 false
1330 );
1331 server[namespace] = value;
1332 namespaces.add(namespace);
1333 });
1334 namespaces.forEach((namespace) => {
1335 result.client[namespace] = proxifyContext(
1336 client.current[namespace],
1337 inheritedClient[namespace]
1338 );
1339 result.server[namespace] = proxifyContext(
1340 server[namespace],
1341 inheritedServer[namespace]
1342 );
1343 });
1344 return (0,preact_module.h)(Provider, { value: result }, children);
1345 },
1346 { priority: 5 }
1347 );
1348 directive("watch", ({ directives: { watch }, evaluate }) => {
1349 watch.forEach((entry) => {
1350 if (true) {
1351 if (entry.suffix) {
1352 warnUniqueIdWithTwoHyphens("watch", entry.suffix);
1353 }
1354 }
1355 useWatch(() => {
1356 let start;
1357 if (false) {}
1358 let result = evaluate(entry);
1359 if (typeof result === "function") {
1360 result = result();
1361 }
1362 if (false) {}
1363 return result;
1364 });
1365 });
1366 });
1367 directive("init", ({ directives: { init }, evaluate }) => {
1368 init.forEach((entry) => {
1369 if (true) {
1370 if (entry.suffix) {
1371 warnUniqueIdWithTwoHyphens("init", entry.suffix);
1372 }
1373 }
1374 useInit(() => {
1375 let start;
1376 if (false) {}
1377 let result = evaluate(entry);
1378 if (typeof result === "function") {
1379 result = result();
1380 }
1381 if (false) {}
1382 return result;
1383 });
1384 });
1385 });
1386 directive("on", ({ directives: { on }, element, evaluate }) => {
1387 const events = /* @__PURE__ */ new Map();
1388 on.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
1389 const suffixParts = entry.suffix.split("--", 2);
1390 if (true) {
1391 if (suffixParts[1]) {
1392 warnUniqueIdWithTwoHyphens(
1393 "on",
1394 suffixParts[0],
1395 suffixParts[1]
1396 );
1397 }
1398 }
1399 if (!events.has(suffixParts[0])) {
1400 events.set(suffixParts[0], /* @__PURE__ */ new Set());
1401 }
1402 events.get(suffixParts[0]).add(entry);
1403 });
1404 events.forEach((entries, eventType) => {
1405 const existingHandler = element.props[`on${eventType}`];
1406 element.props[`on${eventType}`] = (event) => {
1407 if (existingHandler) {
1408 existingHandler(event);
1409 }
1410 entries.forEach((entry) => {
1411 let start;
1412 if (false) {}
1413 const result = evaluate(entry);
1414 if (typeof result === "function") {
1415 if (!result?.sync) {
1416 event = wrapEventAsync(event);
1417 }
1418 result(event);
1419 }
1420 if (false) {}
1421 });
1422 };
1423 });
1424 });
1425 directive(
1426 "on-async",
1427 ({ directives: { "on-async": onAsync }, element, evaluate }) => {
1428 if (true) {
1429 warnWithSyncEvent("on-async", "on");
1430 }
1431 const events = /* @__PURE__ */ new Map();
1432 onAsync.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
1433 const event = entry.suffix.split("--", 1)[0];
1434 if (!events.has(event)) {
1435 events.set(event, /* @__PURE__ */ new Set());
1436 }
1437 events.get(event).add(entry);
1438 });
1439 events.forEach((entries, eventType) => {
1440 const existingHandler = element.props[`on${eventType}`];
1441 element.props[`on${eventType}`] = (event) => {
1442 if (existingHandler) {
1443 existingHandler(event);
1444 }
1445 entries.forEach(async (entry) => {
1446 await splitTask();
1447 const result = evaluate(entry);
1448 if (typeof result === "function") {
1449 result(event);
1450 }
1451 });
1452 };
1453 });
1454 }
1455 );
1456 directive("on-window", getGlobalEventDirective("window"));
1457 directive("on-document", getGlobalEventDirective("document"));
1458 directive("on-async-window", getGlobalAsyncEventDirective("window"));
1459 directive(
1460 "on-async-document",
1461 getGlobalAsyncEventDirective("document")
1462 );
1463 directive(
1464 "class",
1465 ({ directives: { class: classNames }, element, evaluate }) => {
1466 classNames.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
1467 const className = entry.uniqueId ? `${entry.suffix}---${entry.uniqueId}` : entry.suffix;
1468 let result = evaluate(entry);
1469 if (result === PENDING_GETTER) {
1470 return;
1471 }
1472 if (typeof result === "function") {
1473 result = result();
1474 }
1475 const currentClass = element.props.class || "";
1476 const classFinder = new RegExp(
1477 `(^|\\s)${className}(\\s|$)`,
1478 "g"
1479 );
1480 if (!result) {
1481 element.props.class = currentClass.replace(classFinder, " ").trim();
1482 } else if (!classFinder.test(currentClass)) {
1483 element.props.class = currentClass ? `${currentClass} ${className}` : className;
1484 }
1485 useInit(() => {
1486 if (!result) {
1487 element.ref.current.classList.remove(className);
1488 } else {
1489 element.ref.current.classList.add(className);
1490 }
1491 });
1492 });
1493 }
1494 );
1495 directive("style", ({ directives: { style }, element, evaluate }) => {
1496 style.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
1497 if (entry.uniqueId) {
1498 if (true) {
1499 warnUniqueIdNotSupported("style", entry.uniqueId);
1500 }
1501 return;
1502 }
1503 const styleProp = entry.suffix;
1504 let result = evaluate(entry);
1505 if (result === PENDING_GETTER) {
1506 return;
1507 }
1508 if (typeof result === "function") {
1509 result = result();
1510 }
1511 element.props.style = element.props.style || {};
1512 if (typeof element.props.style === "string") {
1513 element.props.style = cssStringToObject(element.props.style);
1514 }
1515 if (!result) {
1516 delete element.props.style[styleProp];
1517 } else {
1518 element.props.style[styleProp] = result;
1519 }
1520 useInit(() => {
1521 if (!result) {
1522 element.ref.current.style.removeProperty(styleProp);
1523 } else {
1524 element.ref.current.style.setProperty(styleProp, result);
1525 }
1526 });
1527 });
1528 });
1529 directive("bind", ({ directives: { bind }, element, evaluate }) => {
1530 bind.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
1531 if (entry.uniqueId) {
1532 if (true) {
1533 warnUniqueIdNotSupported("bind", entry.uniqueId);
1534 }
1535 return;
1536 }
1537 const attribute = entry.suffix;
1538 let result = evaluate(entry);
1539 if (result === PENDING_GETTER) {
1540 return;
1541 }
1542 if (typeof result === "function") {
1543 result = result();
1544 }
1545 element.props[attribute] = result;
1546 useInit(() => {
1547 const el = element.ref.current;
1548 if (attribute === "style") {
1549 if (typeof result === "string") {
1550 el.style.cssText = result;
1551 }
1552 return;
1553 } else if (attribute !== "width" && attribute !== "height" && attribute !== "href" && attribute !== "list" && attribute !== "form" && /*
1554 * The value for `tabindex` follows the parsing rules for an
1555 * integer. If that fails, or if the attribute isn't present, then
1556 * the browsers should "follow platform conventions to determine if
1557 * the element should be considered as a focusable area",
1558 * practically meaning that most elements get a default of `-1` (not
1559 * focusable), but several also get a default of `0` (focusable in
1560 * order after all elements with a positive `tabindex` value).
1561 *
1562 * @see https://html.spec.whatwg.org/#tabindex-value
1563 */
1564 attribute !== "tabIndex" && attribute !== "download" && attribute !== "rowSpan" && attribute !== "colSpan" && attribute !== "role" && attribute in el) {
1565 try {
1566 el[attribute] = result === null || result === void 0 ? "" : result;
1567 return;
1568 } catch (err) {
1569 }
1570 }
1571 if (result !== null && result !== void 0 && (result !== false || attribute[4] === "-")) {
1572 el.setAttribute(attribute, result);
1573 } else {
1574 el.removeAttribute(attribute);
1575 }
1576 });
1577 });
1578 });
1579 directive(
1580 "ignore",
1581 ({
1582 element: {
1583 type: Type,
1584 props: { innerHTML, ...rest }
1585 }
1586 }) => {
1587 if (true) {
1588 warn(
1589 "The data-wp-ignore directive is deprecated and will be removed in version 7.0."
1590 );
1591 }
1592 const cached = T(() => innerHTML, []);
1593 return (0,preact_module.h)(Type, {
1594 dangerouslySetInnerHTML: { __html: cached },
1595 ...rest
1596 });
1597 }
1598 );
1599 directive("text", ({ directives: { text }, element, evaluate }) => {
1600 const entries = text.filter(isDefaultDirectiveSuffix);
1601 if (!entries.length) {
1602 if (true) {
1603 warn(
1604 "The usage of data-wp-text--suffix is not supported. Please use data-wp-text instead."
1605 );
1606 }
1607 return;
1608 }
1609 entries.forEach((entry) => {
1610 if (entry.uniqueId) {
1611 if (true) {
1612 warnUniqueIdNotSupported("text", entry.uniqueId);
1613 }
1614 return;
1615 }
1616 try {
1617 let result = evaluate(entry);
1618 if (result === PENDING_GETTER) {
1619 return;
1620 }
1621 if (typeof result === "function") {
1622 result = result();
1623 }
1624 element.props.children = typeof result === "object" ? null : result.toString();
1625 } catch (e) {
1626 element.props.children = null;
1627 }
1628 });
1629 });
1630 directive("run", ({ directives: { run }, evaluate }) => {
1631 run.forEach((entry) => {
1632 if (true) {
1633 if (entry.suffix) {
1634 warnUniqueIdWithTwoHyphens("run", entry.suffix);
1635 }
1636 }
1637 let result = evaluate(entry);
1638 if (typeof result === "function") {
1639 result = result();
1640 }
1641 return result;
1642 });
1643 });
1644 directive(
1645 "each",
1646 ({
1647 directives: { each, "each-key": eachKey },
1648 context: inheritedContext,
1649 element,
1650 evaluate
1651 }) => {
1652 if (element.type !== "template") {
1653 if (true) {
1654 warn(
1655 "The data-wp-each directive can only be used on <template> elements."
1656 );
1657 }
1658 return;
1659 }
1660 const { Provider } = inheritedContext;
1661 const inheritedValue = x(inheritedContext);
1662 const [entry] = each;
1663 const { namespace, suffix, uniqueId } = entry;
1664 if (each.length > 1) {
1665 if (true) {
1666 warn(
1667 "The usage of multiple data-wp-each directives on the same element is not supported. Please pick only one."
1668 );
1669 }
1670 return;
1671 }
1672 if (uniqueId) {
1673 if (true) {
1674 warnUniqueIdNotSupported("each", uniqueId);
1675 }
1676 return;
1677 }
1678 let iterable = evaluate(entry);
1679 if (iterable === PENDING_GETTER) {
1680 return;
1681 }
1682 if (typeof iterable === "function") {
1683 iterable = iterable();
1684 }
1685 if (typeof iterable?.[Symbol.iterator] !== "function") {
1686 return;
1687 }
1688 const itemProp = suffix ? kebabToCamelCase(suffix) : "item";
1689 const result = [];
1690 const itemContexts = useItemContexts(
1691 inheritedValue,
1692 namespace,
1693 iterable,
1694 itemProp,
1695 eachKey?.[0]
1696 );
1697 for (const [item, itemContext, key] of itemContexts) {
1698 const mergedContext = {
1699 client: {
1700 ...inheritedValue.client,
1701 [namespace]: itemContext
1702 },
1703 server: { ...inheritedValue.server }
1704 };
1705 mergedContext.client[namespace][itemProp] = item;
1706 result.push(
1707 (0,preact_module.h)(
1708 Provider,
1709 { value: mergedContext, key },
1710 element.props.content
1711 )
1712 );
1713 }
1714 return result;
1715 },
1716 { priority: 20 }
1717 );
1718 directive(
1719 "each-child",
1720 ({ directives: { "each-child": eachChild }, element, evaluate }) => {
1721 const entry = eachChild.find(isDefaultDirectiveSuffix);
1722 if (!entry) {
1723 return;
1724 }
1725 const iterable = evaluate(entry);
1726 return iterable === PENDING_GETTER ? element : null;
1727 },
1728 { priority: 1 }
1729 );
1730 directive(
1731 "router-region",
1732 ({ directives: { "router-region": routerRegion } }) => {
1733 const entry = routerRegion.find(isDefaultDirectiveSuffix);
1734 if (!entry) {
1735 return;
1736 }
1737 if (entry.suffix) {
1738 if (true) {
1739 warn(
1740 `Suffixes for the data-wp-router-region directive are not supported. Ignoring the directive with suffix "${entry.suffix}".`
1741 );
1742 }
1743 return;
1744 }
1745 if (entry.uniqueId) {
1746 if (true) {
1747 warnUniqueIdNotSupported("router-region", entry.uniqueId);
1748 }
1749 return;
1750 }
1751 const regionId = typeof entry.value === "string" ? entry.value : entry.value.id;
1752 if (!routerRegions.has(regionId)) {
1753 routerRegions.set(regionId, signals_core_module_d());
1754 }
1755 const vdom = routerRegions.get(regionId).value;
1756 _(() => {
1757 if (vdom && typeof vdom.type !== "string") {
1758 navigationContextSignal.value = navigationContextSignal.peek() + 1;
1759 }
1760 }, [vdom]);
1761 if (vdom && typeof vdom.type !== "string") {
1762 const previousScope = getScope();
1763 return (0,preact_module/* cloneElement */.Ob)(vdom, { previousScope });
1764 }
1765 return vdom;
1766 },
1767 { priority: 1 }
1768 );
1769};
1770
1771
1772;// ./node_modules/@wordpress/interactivity/build-module/vdom.js
1773
1774
1775const directivePrefix = `data-wp-`;
1776const namespaces = [];
1777const currentNamespace = () => namespaces[namespaces.length - 1] ?? null;
1778const isObject = (item) => Boolean(item && typeof item === "object" && item.constructor === Object);
1779const invalidCharsRegex = /[^a-z0-9-_]/i;
1780function parseDirectiveName(directiveName) {
1781 const name = directiveName.substring(8);
1782 if (invalidCharsRegex.test(name)) {
1783 return null;
1784 }
1785 const suffixIndex = name.indexOf("--");
1786 if (suffixIndex === -1) {
1787 return { prefix: name, suffix: null, uniqueId: null };
1788 }
1789 const prefix = name.substring(0, suffixIndex);
1790 const remaining = name.substring(suffixIndex);
1791 if (remaining.startsWith("---") && remaining[3] !== "-") {
1792 return {
1793 prefix,
1794 suffix: null,
1795 uniqueId: remaining.substring(3) || null
1796 };
1797 }
1798 let suffix = remaining.substring(2);
1799 const uniqueIdIndex = suffix.indexOf("---");
1800 if (uniqueIdIndex !== -1 && suffix.substring(uniqueIdIndex)[3] !== "-") {
1801 const uniqueId = suffix.substring(uniqueIdIndex + 3) || null;
1802 suffix = suffix.substring(0, uniqueIdIndex) || null;
1803 return { prefix, suffix, uniqueId };
1804 }
1805 return { prefix, suffix: suffix || null, uniqueId: null };
1806}
1807const nsPathRegExp = /^([\w_\/-]+)::(.+)$/;
1808const hydratedIslands = /* @__PURE__ */ new WeakSet();
1809function toVdom(root) {
1810 const nodesToRemove = /* @__PURE__ */ new Set();
1811 const nodesToReplace = /* @__PURE__ */ new Set();
1812 const treeWalker = document.createTreeWalker(
1813 root,
1814 205
1815 // TEXT + CDATA_SECTION + COMMENT + PROCESSING_INSTRUCTION + ELEMENT
1816 );
1817 function walk(node) {
1818 const { nodeType } = node;
1819 if (nodeType === 3) {
1820 return node.data;
1821 }
1822 if (nodeType === 4) {
1823 nodesToReplace.add(node);
1824 return node.nodeValue;
1825 }
1826 if (nodeType === 8 || nodeType === 7) {
1827 nodesToRemove.add(node);
1828 return null;
1829 }
1830 const elementNode = node;
1831 const { attributes } = elementNode;
1832 const localName = elementNode.localName;
1833 const props = {};
1834 const children = [];
1835 const directives = [];
1836 let ignore = false;
1837 let island = false;
1838 for (let i = 0; i < attributes.length; i++) {
1839 const attributeName = attributes[i].name;
1840 const attributeValue = attributes[i].value;
1841 if (attributeName[directivePrefix.length] && attributeName.slice(0, directivePrefix.length) === directivePrefix) {
1842 if (attributeName === "data-wp-ignore") {
1843 ignore = true;
1844 } else {
1845 const regexResult = nsPathRegExp.exec(attributeValue);
1846 const namespace = regexResult?.[1] ?? null;
1847 let value = regexResult?.[2] ?? attributeValue;
1848 try {
1849 const parsedValue = JSON.parse(value);
1850 value = isObject(parsedValue) ? parsedValue : value;
1851 } catch {
1852 }
1853 if (attributeName === "data-wp-interactive") {
1854 island = true;
1855 const islandNamespace = (
1856 // eslint-disable-next-line no-nested-ternary
1857 typeof value === "string" ? value : typeof value?.namespace === "string" ? value.namespace : null
1858 );
1859 namespaces.push(islandNamespace);
1860 } else {
1861 directives.push([attributeName, namespace, value]);
1862 }
1863 }
1864 } else if (attributeName === "ref") {
1865 continue;
1866 }
1867 props[attributeName] = attributeValue;
1868 }
1869 if (ignore && !island) {
1870 return [
1871 (0,preact_module.h)(localName, {
1872 ...props,
1873 innerHTML: elementNode.innerHTML,
1874 __directives: { ignore: true }
1875 })
1876 ];
1877 }
1878 if (island) {
1879 hydratedIslands.add(elementNode);
1880 }
1881 if (directives.length) {
1882 props.__directives = directives.reduce((obj, [name, ns, value]) => {
1883 const directiveParsed = parseDirectiveName(name);
1884 if (directiveParsed === null) {
1885 if (true) {
1886 warn(`Found malformed directive name: ${name}.`);
1887 }
1888 return obj;
1889 }
1890 const { prefix, suffix, uniqueId } = directiveParsed;
1891 obj[prefix] = obj[prefix] || [];
1892 obj[prefix].push({
1893 namespace: ns ?? currentNamespace(),
1894 value,
1895 suffix,
1896 uniqueId
1897 });
1898 return obj;
1899 }, {});
1900 for (const prefix in props.__directives) {
1901 props.__directives[prefix].sort(
1902 (a, b) => {
1903 const aSuffix = a.suffix ?? "";
1904 const bSuffix = b.suffix ?? "";
1905 if (aSuffix !== bSuffix) {
1906 return aSuffix < bSuffix ? -1 : 1;
1907 }
1908 const aId = a.uniqueId ?? "";
1909 const bId = b.uniqueId ?? "";
1910 return +(aId > bId) - +(aId < bId);
1911 }
1912 );
1913 }
1914 }
1915 if (props.__directives?.["each-child"]) {
1916 props.dangerouslySetInnerHTML = {
1917 __html: elementNode.innerHTML
1918 };
1919 } else if (localName === "template") {
1920 props.content = [
1921 ...elementNode.content.childNodes
1922 ].map((childNode) => toVdom(childNode));
1923 } else {
1924 let child = treeWalker.firstChild();
1925 if (child) {
1926 while (child) {
1927 const vnode = walk(child);
1928 if (vnode) {
1929 children.push(vnode);
1930 }
1931 child = treeWalker.nextSibling();
1932 }
1933 treeWalker.parentNode();
1934 }
1935 }
1936 if (island) {
1937 namespaces.pop();
1938 }
1939 return (0,preact_module.h)(localName, props, children);
1940 }
1941 const vdom = walk(treeWalker.currentNode);
1942 nodesToRemove.forEach(
1943 (node) => node.remove()
1944 );
1945 nodesToReplace.forEach(
1946 (node) => node.replaceWith(
1947 new window.Text(node.nodeValue ?? "")
1948 )
1949 );
1950 return vdom;
1951}
1952
1953
1954;// ./node_modules/@wordpress/interactivity/build-module/hydration.js
1955
1956
1957
1958const regionRootFragments = /* @__PURE__ */ new WeakMap();
1959const getRegionRootFragment = (regions) => {
1960 const region = Array.isArray(regions) ? regions[0] : regions;
1961 if (!region.parentElement) {
1962 throw Error("The passed region should be an element with a parent.");
1963 }
1964 if (!regionRootFragments.has(region)) {
1965 regionRootFragments.set(
1966 region,
1967 createRootFragment(region.parentElement, regions)
1968 );
1969 }
1970 return regionRootFragments.get(region);
1971};
1972const initialVdom = /* @__PURE__ */ new WeakMap();
1973const hydrateRegions = async () => {
1974 const nodes = document.querySelectorAll(`[data-wp-interactive]`);
1975 for (const node of nodes) {
1976 if (!hydratedIslands.has(node)) {
1977 await splitTask();
1978 const fragment = getRegionRootFragment(node);
1979 const vdom = toVdom(node);
1980 initialVdom.set(node, vdom);
1981 await splitTask();
1982 (0,preact_module/* hydrate */.Qv)(vdom, fragment);
1983 }
1984 }
1985};
1986
1987
1988;// ./node_modules/@wordpress/interactivity/build-module/index.js
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003const requiredConsent = "I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.";
2004const privateApis = (lock) => {
2005 if (lock === requiredConsent) {
2006 return {
2007 getRegionRootFragment: getRegionRootFragment,
2008 initialVdom: initialVdom,
2009 toVdom: toVdom,
2010 directive: directive,
2011 getNamespace: getNamespace,
2012 h: preact_module.h,
2013 cloneElement: preact_module/* cloneElement */.Ob,
2014 render: preact_module/* render */.XX,
2015 proxifyState: proxifyState,
2016 parseServerData: parseServerData,
2017 populateServerData: populateServerData,
2018 batch: signals_core_module_r,
2019 routerRegions: routerRegions,
2020 deepReadOnly: deepReadOnly,
2021 navigationSignal: navigationSignal
2022 };
2023 }
2024 throw new Error("Forbidden access.");
2025};
2026populateServerData(parseServerData());
2027directives_default();
2028onDOMReady(hydrateRegions);
2029
2030
2031var __webpack_exports__getConfig = __webpack_exports__.zj;
2032var __webpack_exports__getContext = __webpack_exports__.SD;
2033var __webpack_exports__getElement = __webpack_exports__.V6;
2034var __webpack_exports__getServerContext = __webpack_exports__.$K;
2035var __webpack_exports__getServerState = __webpack_exports__.vT;
2036var __webpack_exports__privateApis = __webpack_exports__.jb;
2037var __webpack_exports__splitTask = __webpack_exports__.yT;
2038var __webpack_exports__store = __webpack_exports__.M_;
2039var __webpack_exports__useCallback = __webpack_exports__.hb;
2040var __webpack_exports__useEffect = __webpack_exports__.vJ;
2041var __webpack_exports__useInit = __webpack_exports__.ip;
2042var __webpack_exports__useLayoutEffect = __webpack_exports__.Nf;
2043var __webpack_exports__useMemo = __webpack_exports__.Kr;
2044var __webpack_exports__useRef = __webpack_exports__.li;
2045var __webpack_exports__useState = __webpack_exports__.J0;
2046var __webpack_exports__useWatch = __webpack_exports__.FH;
2047var __webpack_exports__withScope = __webpack_exports__.v4;
2048var __webpack_exports__withSyncEvent = __webpack_exports__.mh;
2049export { __webpack_exports__getConfig as getConfig, __webpack_exports__getContext as getContext, __webpack_exports__getElement as getElement, __webpack_exports__getServerContext as getServerContext, __webpack_exports__getServerState as getServerState, __webpack_exports__privateApis as privateApis, __webpack_exports__splitTask as splitTask, __webpack_exports__store as store, __webpack_exports__useCallback as useCallback, __webpack_exports__useEffect as useEffect, __webpack_exports__useInit as useInit, __webpack_exports__useLayoutEffect as useLayoutEffect, __webpack_exports__useMemo as useMemo, __webpack_exports__useRef as useRef, __webpack_exports__useState as useState, __webpack_exports__useWatch as useWatch, __webpack_exports__withScope as withScope, __webpack_exports__withSyncEvent as withSyncEvent };
2050