[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 /******/ var __webpack_modules__ = ({ 2 3 /***/ 380: 4 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5 6 7 // EXPORTS 8 __webpack_require__.d(__webpack_exports__, { 9 zj: () => (/* reexport */ getConfig), 10 SD: () => (/* reexport */ getContext), 11 V6: () => (/* reexport */ getElement), 12 $K: () => (/* reexport */ getServerContext), 13 vT: () => (/* reexport */ getServerState), 14 jb: () => (/* binding */ privateApis), 15 yT: () => (/* reexport */ splitTask), 16 M_: () => (/* reexport */ store), 17 hb: () => (/* reexport */ useCallback), 18 vJ: () => (/* reexport */ useEffect), 19 ip: () => (/* reexport */ useInit), 20 Nf: () => (/* reexport */ useLayoutEffect), 21 Kr: () => (/* reexport */ useMemo), 22 li: () => (/* reexport */ A), 23 J0: () => (/* reexport */ h), 24 FH: () => (/* reexport */ useWatch), 25 v4: () => (/* reexport */ withScope) 26 }); 27 28 // EXTERNAL MODULE: ./node_modules/preact/dist/preact.module.js 29 var preact_module = __webpack_require__(622); 30 ;// ./node_modules/preact/hooks/dist/hooks.module.js 31 var 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 d(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 h(n){return hooks_module_o=1,p(D,n)}function p(n,u,i){var o=d(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.u)){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.u=!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=d(hooks_module_t++,3);!hooks_module_c.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__H.__h.push(i))}function _(n,u){var i=d(hooks_module_t++,4);!hooks_module_c.__s&&C(i.__H,u)&&(i.__=n,i.i=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(){return"function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function T(n,r){var u=d(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=d(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=d(hooks_module_t++,10),i=h();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=d(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.i=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.i&&(n.__H=n.i),n.i=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,100);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} 32 33 ;// ./node_modules/@preact/signals-core/dist/signals-core.module.js 34 var 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){this.v=i;this.i=0;this.n=void 0;this.t=void 0}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){if(this.t!==i&&void 0===i.e){i.x=this.t;if(void 0!==this.t)this.t.e=i;this.t=i}};signals_core_module_u.prototype.U=function(i){if(void 0!==this.t){var t=i.e,r=i.x;if(void 0!==t){t.x=r;i.e=void 0}if(void 0!==r){r.e=t;i.x=void 0}if(i===this.t)this.t=r}};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}})};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){return new signals_core_module_u(i)}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){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}(signals_core_module_y.prototype=new signals_core_module_u).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){return new signals_core_module_y(i)}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_g(i);throw t}finally{signals_core_module_o=n;signals_core_module_t()}}}function signals_core_module_g(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_p(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_g(this);signals_core_module_t()}function signals_core_module_b(i){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32}signals_core_module_b.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_b.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_p.bind(this,i)};signals_core_module_b.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=signals_core_module_h;signals_core_module_h=this}};signals_core_module_b.prototype.d=function(){this.f|=8;if(!(1&this.f))signals_core_module_g(this)};function E(i){var t=new signals_core_module_b(i);try{t.c()}catch(i){t.d();throw i}return t.d.bind(t)} 35 ;// ./node_modules/@preact/signals/dist/signals.module.js 36 var 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){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()})},[])} 37 ;// ./node_modules/@wordpress/interactivity/build-module/namespaces.js 38 const namespaceStack = []; 39 const getNamespace = () => namespaceStack.slice(-1)[0]; 40 const setNamespace = namespace => { 41 namespaceStack.push(namespace); 42 }; 43 const resetNamespace = () => { 44 namespaceStack.pop(); 45 }; 46 47 ;// ./node_modules/@wordpress/interactivity/build-module/scopes.js 48 /** 49 * External dependencies 50 */ 51 52 /** 53 * Internal dependencies 54 */ 55 56 // Store stacks for the current scope and the default namespaces and export APIs 57 // to interact with them. 58 const scopeStack = []; 59 const getScope = () => scopeStack.slice(-1)[0]; 60 const setScope = scope => { 61 scopeStack.push(scope); 62 }; 63 const resetScope = () => { 64 scopeStack.pop(); 65 }; 66 67 // Wrap the element props to prevent modifications. 68 const immutableMap = new WeakMap(); 69 const immutableError = () => { 70 throw new Error('Please use `data-wp-bind` to modify the attributes of an element.'); 71 }; 72 const immutableHandlers = { 73 get(target, key, receiver) { 74 const value = Reflect.get(target, key, receiver); 75 return !!value && typeof value === 'object' ? deepImmutable(value) : value; 76 }, 77 set: immutableError, 78 deleteProperty: immutableError 79 }; 80 const deepImmutable = target => { 81 if (!immutableMap.has(target)) { 82 immutableMap.set(target, new Proxy(target, immutableHandlers)); 83 } 84 return immutableMap.get(target); 85 }; 86 87 /** 88 * Retrieves the context inherited by the element evaluating a function from the 89 * store. The returned value depends on the element and the namespace where the 90 * function calling `getContext()` exists. 91 * 92 * @param namespace Store namespace. By default, the namespace where the calling 93 * function exists is used. 94 * @return The context content. 95 */ 96 const getContext = namespace => { 97 const scope = getScope(); 98 if (true) { 99 if (!scope) { 100 throw Error('Cannot call `getContext()` 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)`.'); 101 } 102 } 103 return scope.context[namespace || getNamespace()]; 104 }; 105 106 /** 107 * Retrieves a representation of the element where a function from the store 108 * is being evaluated. Such representation is read-only, and contains a 109 * reference to the DOM element, its props and a local reactive state. 110 * 111 * @return Element representation. 112 */ 113 const getElement = () => { 114 const scope = getScope(); 115 if (true) { 116 if (!scope) { 117 throw Error('Cannot call `getElement()` 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)`.'); 118 } 119 } 120 const { 121 ref, 122 attributes 123 } = scope; 124 return Object.freeze({ 125 ref: ref.current, 126 attributes: deepImmutable(attributes) 127 }); 128 }; 129 130 /** 131 * Retrieves the part of the inherited context defined and updated from the 132 * server. 133 * 134 * The object returned is read-only, and includes the context defined in PHP 135 * with `wp_interactivity_data_wp_context()`, including the corresponding 136 * inherited properties. When `actions.navigate()` is called, this object is 137 * updated to reflect the changes in the new visited page, without affecting the 138 * context returned by `getContext()`. Directives can subscribe to those changes 139 * to update the context if needed. 140 * 141 * @example 142 * ```js 143 * store('...', { 144 * callbacks: { 145 * updateServerContext() { 146 * const context = getContext(); 147 * const serverContext = getServerContext(); 148 * // Override some property with the new value that came from the server. 149 * context.overridableProp = serverContext.overridableProp; 150 * }, 151 * }, 152 * }); 153 * ``` 154 * 155 * @param namespace Store namespace. By default, the namespace where the calling 156 * function exists is used. 157 * @return The server context content. 158 */ 159 const getServerContext = namespace => { 160 const scope = getScope(); 161 if (true) { 162 if (!scope) { 163 throw Error('Cannot call `getServerContext()` 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)`.'); 164 } 165 } 166 return scope.serverContext[namespace || getNamespace()]; 167 }; 168 169 ;// ./node_modules/@wordpress/interactivity/build-module/utils.js 170 /** 171 * External dependencies 172 */ 173 174 175 176 /** 177 * Internal dependencies 178 */ 179 180 181 /** 182 * Executes a callback function after the next frame is rendered. 183 * 184 * @param callback The callback function to be executed. 185 * @return A promise that resolves after the callback function is executed. 186 */ 187 const afterNextFrame = callback => { 188 return new Promise(resolve => { 189 const done = () => { 190 clearTimeout(timeout); 191 window.cancelAnimationFrame(raf); 192 setTimeout(() => { 193 callback(); 194 resolve(); 195 }); 196 }; 197 const timeout = setTimeout(done, 100); 198 const raf = window.requestAnimationFrame(done); 199 }); 200 }; 201 202 /** 203 * Returns a promise that resolves after yielding to main. 204 * 205 * @return Promise<void> 206 */ 207 const splitTask = typeof window.scheduler?.yield === 'function' ? window.scheduler.yield.bind(window.scheduler) : () => { 208 return new Promise(resolve => { 209 setTimeout(resolve, 0); 210 }); 211 }; 212 213 /** 214 * Creates a Flusher object that can be used to flush computed values and notify listeners. 215 * 216 * Using the mangled properties: 217 * this.c: this._callback 218 * this.x: this._compute 219 * https://github.com/preactjs/signals/blob/main/mangle.json 220 * 221 * @param compute The function that computes the value to be flushed. 222 * @param notify The function that notifies listeners when the value is flushed. 223 * @return The Flusher object with `flush` and `dispose` properties. 224 */ 225 function createFlusher(compute, notify) { 226 let flush = () => undefined; 227 const dispose = E(function () { 228 flush = this.c.bind(this); 229 this.x = compute; 230 this.c = notify; 231 return compute(); 232 }); 233 return { 234 flush, 235 dispose 236 }; 237 } 238 239 /** 240 * Custom hook that executes a callback function whenever a signal is triggered. 241 * Version of `useSignalEffect` with a `useEffect`-like execution. This hook 242 * implementation comes from this PR, but we added short-cirtuiting to avoid 243 * infinite loops: https://github.com/preactjs/signals/pull/290 244 * 245 * @param callback The callback function to be executed. 246 */ 247 function utils_useSignalEffect(callback) { 248 y(() => { 249 let eff = null; 250 let isExecuting = false; 251 const notify = async () => { 252 if (eff && !isExecuting) { 253 isExecuting = true; 254 await afterNextFrame(eff.flush); 255 isExecuting = false; 256 } 257 }; 258 eff = createFlusher(callback, notify); 259 return eff.dispose; 260 }, []); 261 } 262 263 /** 264 * Returns the passed function wrapped with the current scope so it is 265 * accessible whenever the function runs. This is primarily to make the scope 266 * available inside hook callbacks. 267 * 268 * Asynchronous functions should use generators that yield promises instead of awaiting them. 269 * See the documentation for details: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-interactivity/packages-interactivity-api-reference/#the-store 270 * 271 * @param func The passed function. 272 * @return The wrapped function. 273 */ 274 275 function withScope(func) { 276 const scope = getScope(); 277 const ns = getNamespace(); 278 if (func?.constructor?.name === 'GeneratorFunction') { 279 return async (...args) => { 280 const gen = func(...args); 281 let value; 282 let it; 283 while (true) { 284 setNamespace(ns); 285 setScope(scope); 286 try { 287 it = gen.next(value); 288 } finally { 289 resetScope(); 290 resetNamespace(); 291 } 292 try { 293 value = await it.value; 294 } catch (e) { 295 setNamespace(ns); 296 setScope(scope); 297 gen.throw(e); 298 } finally { 299 resetScope(); 300 resetNamespace(); 301 } 302 if (it.done) { 303 break; 304 } 305 } 306 return value; 307 }; 308 } 309 return (...args) => { 310 setNamespace(ns); 311 setScope(scope); 312 try { 313 return func(...args); 314 } finally { 315 resetNamespace(); 316 resetScope(); 317 } 318 }; 319 } 320 321 /** 322 * Accepts a function that contains imperative code which runs whenever any of 323 * the accessed _reactive_ properties (e.g., values from the global state or the 324 * context) is modified. 325 * 326 * This hook makes the element's scope available so functions like 327 * `getElement()` and `getContext()` can be used inside the passed callback. 328 * 329 * @param callback The hook callback. 330 */ 331 function useWatch(callback) { 332 utils_useSignalEffect(withScope(callback)); 333 } 334 335 /** 336 * Accepts a function that contains imperative code which runs only after the 337 * element's first render, mainly useful for initialization logic. 338 * 339 * This hook makes the element's scope available so functions like 340 * `getElement()` and `getContext()` can be used inside the passed callback. 341 * 342 * @param callback The hook callback. 343 */ 344 function useInit(callback) { 345 y(withScope(callback), []); 346 } 347 348 /** 349 * Accepts a function that contains imperative, possibly effectful code. The 350 * effects run after browser paint, without blocking it. 351 * 352 * This hook is equivalent to Preact's `useEffect` and makes the element's scope 353 * available so functions like `getElement()` and `getContext()` can be used 354 * inside the passed callback. 355 * 356 * @param callback Imperative function that can return a cleanup 357 * function. 358 * @param inputs If present, effect will only activate if the 359 * values in the list change (using `===`). 360 */ 361 function useEffect(callback, inputs) { 362 y(withScope(callback), inputs); 363 } 364 365 /** 366 * Accepts a function that contains imperative, possibly effectful code. Use 367 * this to read layout from the DOM and synchronously re-render. 368 * 369 * This hook is equivalent to Preact's `useLayoutEffect` and makes the element's 370 * scope available so functions like `getElement()` and `getContext()` can be 371 * used inside the passed callback. 372 * 373 * @param callback Imperative function that can return a cleanup 374 * function. 375 * @param inputs If present, effect will only activate if the 376 * values in the list change (using `===`). 377 */ 378 function useLayoutEffect(callback, inputs) { 379 _(withScope(callback), inputs); 380 } 381 382 /** 383 * Returns a memoized version of the callback that only changes if one of the 384 * inputs has changed (using `===`). 385 * 386 * This hook is equivalent to Preact's `useCallback` and makes the element's 387 * scope available so functions like `getElement()` and `getContext()` can be 388 * used inside the passed callback. 389 * 390 * @param callback Callback function. 391 * @param inputs If present, the callback will only be updated if the 392 * values in the list change (using `===`). 393 * 394 * @return The callback function. 395 */ 396 function useCallback(callback, inputs) { 397 return q(withScope(callback), inputs); 398 } 399 400 /** 401 * Pass a factory function and an array of inputs. `useMemo` will only recompute 402 * the memoized value when one of the inputs has changed. 403 * 404 * This hook is equivalent to Preact's `useMemo` and makes the element's scope 405 * available so functions like `getElement()` and `getContext()` can be used 406 * inside the passed factory function. 407 * 408 * @param factory Factory function that returns that value for memoization. 409 * @param inputs If present, the factory will only be run to recompute if 410 * the values in the list change (using `===`). 411 * 412 * @return The memoized value. 413 */ 414 function useMemo(factory, inputs) { 415 return T(withScope(factory), inputs); 416 } 417 418 /** 419 * Creates a root fragment by replacing a node or an array of nodes in a parent element. 420 * For wrapperless hydration. 421 * See https://gist.github.com/developit/f4c67a2ede71dc2fab7f357f39cff28c 422 * 423 * @param parent The parent element where the nodes will be replaced. 424 * @param replaceNode The node or array of nodes to replace in the parent element. 425 * @return The created root fragment. 426 */ 427 const createRootFragment = (parent, replaceNode) => { 428 replaceNode = [].concat(replaceNode); 429 const sibling = replaceNode[replaceNode.length - 1].nextSibling; 430 function insert(child, root) { 431 parent.insertBefore(child, root || sibling); 432 } 433 return parent.__k = { 434 nodeType: 1, 435 parentNode: parent, 436 firstChild: replaceNode[0], 437 childNodes: replaceNode, 438 insertBefore: insert, 439 appendChild: insert, 440 removeChild(c) { 441 parent.removeChild(c); 442 } 443 }; 444 }; 445 446 /** 447 * Transforms a kebab-case string to camelCase. 448 * 449 * @param str The kebab-case string to transform to camelCase. 450 * @return The transformed camelCase string. 451 */ 452 function kebabToCamelCase(str) { 453 return str.replace(/^-+|-+$/g, '').toLowerCase().replace(/-([a-z])/g, function (_match, group1) { 454 return group1.toUpperCase(); 455 }); 456 } 457 const logged = new Set(); 458 459 /** 460 * Shows a warning with `message` if environment is not `production`. 461 * 462 * Based on the `@wordpress/warning` package. 463 * 464 * @param message Message to show in the warning. 465 */ 466 const warn = message => { 467 if (true) { 468 if (logged.has(message)) { 469 return; 470 } 471 472 // eslint-disable-next-line no-console 473 console.warn(message); 474 475 // Throwing an error and catching it immediately to improve debugging 476 // A consumer can use 'pause on caught exceptions' 477 try { 478 throw Error(message); 479 } catch (e) { 480 // Do nothing. 481 } 482 logged.add(message); 483 } 484 }; 485 486 /** 487 * Checks if the passed `candidate` is a plain object with just the `Object` 488 * prototype. 489 * 490 * @param candidate The item to check. 491 * @return Whether `candidate` is a plain object. 492 */ 493 const isPlainObject = candidate => Boolean(candidate && typeof candidate === 'object' && candidate.constructor === Object); 494 495 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/registry.js 496 /** 497 * Proxies for each object. 498 */ 499 const objToProxy = new WeakMap(); 500 const proxyToObj = new WeakMap(); 501 502 /** 503 * Namespaces for each created proxy. 504 */ 505 const proxyToNs = new WeakMap(); 506 507 /** 508 * Object types that can be proxied. 509 */ 510 const supported = new Set([Object, Array]); 511 512 /** 513 * Returns a proxy to the passed object with the given handlers, assigning the 514 * specified namespace to it. If a proxy for the passed object was created 515 * before, that proxy is returned. 516 * 517 * @param namespace The namespace that will be associated to this proxy. 518 * @param obj The object to proxify. 519 * @param handlers Handlers that the proxy will use. 520 * 521 * @throws Error if the object cannot be proxified. Use {@link shouldProxy} to 522 * check if a proxy can be created for a specific object. 523 * 524 * @return The created proxy. 525 */ 526 const createProxy = (namespace, obj, handlers) => { 527 if (!shouldProxy(obj)) { 528 throw Error('This object cannot be proxified.'); 529 } 530 if (!objToProxy.has(obj)) { 531 const proxy = new Proxy(obj, handlers); 532 objToProxy.set(obj, proxy); 533 proxyToObj.set(proxy, obj); 534 proxyToNs.set(proxy, namespace); 535 } 536 return objToProxy.get(obj); 537 }; 538 539 /** 540 * Returns the proxy for the given object. If there is no associated proxy, the 541 * function returns `undefined`. 542 * 543 * @param obj Object from which to know the proxy. 544 * @return Associated proxy or `undefined`. 545 */ 546 const getProxyFromObject = obj => objToProxy.get(obj); 547 548 /** 549 * Gets the namespace associated with the given proxy. 550 * 551 * Proxies have a namespace assigned upon creation. See {@link createProxy}. 552 * 553 * @param proxy Proxy. 554 * @return Namespace. 555 */ 556 const getNamespaceFromProxy = proxy => proxyToNs.get(proxy); 557 558 /** 559 * Checks if a given object can be proxied. 560 * 561 * @param candidate Object to know whether it can be proxied. 562 * @return True if the passed instance can be proxied. 563 */ 564 const shouldProxy = candidate => { 565 if (typeof candidate !== 'object' || candidate === null) { 566 return false; 567 } 568 return !proxyToNs.has(candidate) && supported.has(candidate.constructor); 569 }; 570 571 /** 572 * Returns the target object for the passed proxy. If the passed object is not a registered proxy, the 573 * function returns `undefined`. 574 * 575 * @param proxy Proxy from which to know the target. 576 * @return The target object or `undefined`. 577 */ 578 const getObjectFromProxy = proxy => proxyToObj.get(proxy); 579 580 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/signals.js 581 /** 582 * External dependencies 583 */ 584 585 586 /** 587 * Internal dependencies 588 */ 589 590 591 592 593 594 /** 595 * Identifier for property computeds not associated to any scope. 596 */ 597 const NO_SCOPE = {}; 598 599 /** 600 * Structure that manages reactivity for a property in a state object. It uses 601 * signals to keep track of property value or getter modifications. 602 */ 603 class PropSignal { 604 /** 605 * Proxy that holds the property this PropSignal is associated with. 606 */ 607 608 /** 609 * Relation of computeds by scope. These computeds are read-only signals 610 * that depend on whether the property is a value or a getter and, 611 * therefore, can return different values depending on the scope in which 612 * the getter is accessed. 613 */ 614 615 /** 616 * Signal with the value assigned to the related property. 617 */ 618 619 /** 620 * Signal with the getter assigned to the related property. 621 */ 622 623 /** 624 * Structure that manages reactivity for a property in a state object, using 625 * signals to keep track of property value or getter modifications. 626 * 627 * @param owner Proxy that holds the property this instance is associated 628 * with. 629 */ 630 constructor(owner) { 631 this.owner = owner; 632 this.computedsByScope = new WeakMap(); 633 } 634 635 /** 636 * Changes the internal value. If a getter was set before, it is set to 637 * `undefined`. 638 * 639 * @param value New value. 640 */ 641 setValue(value) { 642 this.update({ 643 value 644 }); 645 } 646 647 /** 648 * Changes the internal getter. If a value was set before, it is set to 649 * `undefined`. 650 * 651 * @param getter New getter. 652 */ 653 setGetter(getter) { 654 this.update({ 655 get: getter 656 }); 657 } 658 659 /** 660 * Returns the computed that holds the result of evaluating the prop in the 661 * current scope. 662 * 663 * These computeds are read-only signals that depend on whether the property 664 * is a value or a getter and, therefore, can return different values 665 * depending on the scope in which the getter is accessed. 666 * 667 * @return Computed that depends on the scope. 668 */ 669 getComputed() { 670 const scope = getScope() || NO_SCOPE; 671 if (!this.valueSignal && !this.getterSignal) { 672 this.update({}); 673 } 674 if (!this.computedsByScope.has(scope)) { 675 const callback = () => { 676 const getter = this.getterSignal?.value; 677 return getter ? getter.call(this.owner) : this.valueSignal?.value; 678 }; 679 setNamespace(getNamespaceFromProxy(this.owner)); 680 this.computedsByScope.set(scope, signals_core_module_w(withScope(callback))); 681 resetNamespace(); 682 } 683 return this.computedsByScope.get(scope); 684 } 685 686 /** 687 * Update the internal signals for the value and the getter of the 688 * corresponding prop. 689 * 690 * @param param0 691 * @param param0.get New getter. 692 * @param param0.value New value. 693 */ 694 update({ 695 get, 696 value 697 }) { 698 if (!this.valueSignal) { 699 this.valueSignal = signals_core_module_d(value); 700 this.getterSignal = signals_core_module_d(get); 701 } else if (value !== this.valueSignal.peek() || get !== this.getterSignal.peek()) { 702 signals_core_module_r(() => { 703 this.valueSignal.value = value; 704 this.getterSignal.value = get; 705 }); 706 } 707 } 708 } 709 710 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/state.js 711 /* wp:polyfill */ 712 /** 713 * External dependencies 714 */ 715 716 717 /** 718 * Internal dependencies 719 */ 720 721 722 723 724 725 /** 726 * Set of built-in symbols. 727 */ 728 const wellKnownSymbols = new Set(Object.getOwnPropertyNames(Symbol).map(key => Symbol[key]).filter(value => typeof value === 'symbol')); 729 730 /** 731 * Relates each proxy with a map of {@link PropSignal} instances, representing 732 * the proxy's accessed properties. 733 */ 734 const proxyToProps = new WeakMap(); 735 736 /** 737 * Checks whether a {@link PropSignal | `PropSignal`} instance exists for the 738 * given property in the passed proxy. 739 * 740 * @param proxy Proxy of a state object or array. 741 * @param key The property key. 742 * @return `true` when it exists; false otherwise. 743 */ 744 const hasPropSignal = (proxy, key) => proxyToProps.has(proxy) && proxyToProps.get(proxy).has(key); 745 const readOnlyProxies = new WeakSet(); 746 747 /** 748 * Returns the {@link PropSignal | `PropSignal`} instance associated with the 749 * specified prop in the passed proxy. 750 * 751 * The `PropSignal` instance is generated if it doesn't exist yet, using the 752 * `initial` parameter to initialize the internal signals. 753 * 754 * @param proxy Proxy of a state object or array. 755 * @param key The property key. 756 * @param initial Initial data for the `PropSignal` instance. 757 * @return The `PropSignal` instance. 758 */ 759 const getPropSignal = (proxy, key, initial) => { 760 if (!proxyToProps.has(proxy)) { 761 proxyToProps.set(proxy, new Map()); 762 } 763 key = typeof key === 'number' ? `$key}` : key; 764 const props = proxyToProps.get(proxy); 765 if (!props.has(key)) { 766 const ns = getNamespaceFromProxy(proxy); 767 const prop = new PropSignal(proxy); 768 props.set(key, prop); 769 if (initial) { 770 const { 771 get, 772 value 773 } = initial; 774 if (get) { 775 prop.setGetter(get); 776 } else { 777 const readOnly = readOnlyProxies.has(proxy); 778 prop.setValue(shouldProxy(value) ? proxifyState(ns, value, { 779 readOnly 780 }) : value); 781 } 782 } 783 } 784 return props.get(key); 785 }; 786 787 /** 788 * Relates each proxied object (i.e., the original object) with a signal that 789 * tracks changes in the number of properties. 790 */ 791 const objToIterable = new WeakMap(); 792 793 /** 794 * When this flag is `true`, it avoids any signal subscription, overriding state 795 * props' "reactive" behavior. 796 */ 797 let peeking = false; 798 799 /** 800 * Handlers for reactive objects and arrays in the state. 801 */ 802 const stateHandlers = { 803 get(target, key, receiver) { 804 /* 805 * The property should not be reactive for the following cases: 806 * 1. While using the `peek` function to read the property. 807 * 2. The property exists but comes from the Object or Array prototypes. 808 * 3. The property key is a known symbol. 809 */ 810 if (peeking || !target.hasOwnProperty(key) && key in target || typeof key === 'symbol' && wellKnownSymbols.has(key)) { 811 return Reflect.get(target, key, receiver); 812 } 813 814 // At this point, the property should be reactive. 815 const desc = Object.getOwnPropertyDescriptor(target, key); 816 const prop = getPropSignal(receiver, key, desc); 817 const result = prop.getComputed().value; 818 819 /* 820 * Check if the property is a synchronous function. If it is, set the 821 * default namespace. Synchronous functions always run in the proper scope, 822 * which is set by the Directives component. 823 */ 824 if (typeof result === 'function') { 825 const ns = getNamespaceFromProxy(receiver); 826 return (...args) => { 827 setNamespace(ns); 828 try { 829 return result.call(receiver, ...args); 830 } finally { 831 resetNamespace(); 832 } 833 }; 834 } 835 return result; 836 }, 837 set(target, key, value, receiver) { 838 if (readOnlyProxies.has(receiver)) { 839 return false; 840 } 841 setNamespace(getNamespaceFromProxy(receiver)); 842 try { 843 return Reflect.set(target, key, value, receiver); 844 } finally { 845 resetNamespace(); 846 } 847 }, 848 defineProperty(target, key, desc) { 849 if (readOnlyProxies.has(getProxyFromObject(target))) { 850 return false; 851 } 852 const isNew = !(key in target); 853 const result = Reflect.defineProperty(target, key, desc); 854 if (result) { 855 const receiver = getProxyFromObject(target); 856 const prop = getPropSignal(receiver, key); 857 const { 858 get, 859 value 860 } = desc; 861 if (get) { 862 prop.setGetter(get); 863 } else { 864 const ns = getNamespaceFromProxy(receiver); 865 prop.setValue(shouldProxy(value) ? proxifyState(ns, value) : value); 866 } 867 if (isNew && objToIterable.has(target)) { 868 objToIterable.get(target).value++; 869 } 870 871 /* 872 * Modify the `length` property value only if the related 873 * `PropSignal` exists, which means that there are subscriptions to 874 * this property. 875 */ 876 if (Array.isArray(target) && proxyToProps.get(receiver)?.has('length')) { 877 const length = getPropSignal(receiver, 'length'); 878 length.setValue(target.length); 879 } 880 } 881 return result; 882 }, 883 deleteProperty(target, key) { 884 if (readOnlyProxies.has(getProxyFromObject(target))) { 885 return false; 886 } 887 const result = Reflect.deleteProperty(target, key); 888 if (result) { 889 const prop = getPropSignal(getProxyFromObject(target), key); 890 prop.setValue(undefined); 891 if (objToIterable.has(target)) { 892 objToIterable.get(target).value++; 893 } 894 } 895 return result; 896 }, 897 ownKeys(target) { 898 if (!objToIterable.has(target)) { 899 objToIterable.set(target, signals_core_module_d(0)); 900 } 901 /* 902 *This subscribes to the signal while preventing the minifier from 903 * deleting this line in production. 904 */ 905 objToIterable._ = objToIterable.get(target).value; 906 return Reflect.ownKeys(target); 907 } 908 }; 909 910 /** 911 * Returns the proxy associated with the given state object, creating it if it 912 * does not exist. 913 * 914 * @param namespace The namespace that will be associated to this proxy. 915 * @param obj The object to proxify. 916 * @param options Options. 917 * @param options.readOnly Read-only. 918 * 919 * @throws Error if the object cannot be proxified. Use {@link shouldProxy} to 920 * check if a proxy can be created for a specific object. 921 * 922 * @return The associated proxy. 923 */ 924 const proxifyState = (namespace, obj, options) => { 925 const proxy = createProxy(namespace, obj, stateHandlers); 926 if (options?.readOnly) { 927 readOnlyProxies.add(proxy); 928 } 929 return proxy; 930 }; 931 932 /** 933 * Reads the value of the specified property without subscribing to it. 934 * 935 * @param obj The object to read the property from. 936 * @param key The property key. 937 * @return The property value. 938 */ 939 const peek = (obj, key) => { 940 peeking = true; 941 try { 942 return obj[key]; 943 } finally { 944 peeking = false; 945 } 946 }; 947 948 /** 949 * Internal recursive implementation for {@link deepMerge | `deepMerge`}. 950 * 951 * @param target The target object. 952 * @param source The source object containing new values and props. 953 * @param override Whether existing props should be overwritten or not (`true` 954 * by default). 955 */ 956 const deepMergeRecursive = (target, source, override = true) => { 957 // If target is not a plain object and the source is, we don't need to merge 958 // them because the source will be used as the new value of the target. 959 if (!(isPlainObject(target) && isPlainObject(source))) { 960 return; 961 } 962 let hasNewKeys = false; 963 for (const key in source) { 964 const isNew = !(key in target); 965 hasNewKeys = hasNewKeys || isNew; 966 const desc = Object.getOwnPropertyDescriptor(source, key); 967 const proxy = getProxyFromObject(target); 968 const propSignal = !!proxy && hasPropSignal(proxy, key) && getPropSignal(proxy, key); 969 970 // Handle getters and setters 971 if (typeof desc.get === 'function' || typeof desc.set === 'function') { 972 if (override || isNew) { 973 // Because we are setting a getter or setter, we need to use 974 // Object.defineProperty to define the property on the target object. 975 Object.defineProperty(target, key, { 976 ...desc, 977 configurable: true, 978 enumerable: true 979 }); 980 // Update the getter in the property signal if it exists 981 if (desc.get && propSignal) { 982 propSignal.setGetter(desc.get); 983 } 984 } 985 986 // Handle nested objects 987 } else if (isPlainObject(source[key])) { 988 const targetValue = Object.getOwnPropertyDescriptor(target, key)?.value; 989 if (isNew || override && !isPlainObject(targetValue)) { 990 // Create a new object if the property is new or needs to be overridden 991 target[key] = {}; 992 if (propSignal) { 993 // Create a new proxified state for the nested object 994 const ns = getNamespaceFromProxy(proxy); 995 propSignal.setValue(proxifyState(ns, target[key])); 996 } 997 deepMergeRecursive(target[key], source[key], override); 998 } 999 // Both target and source are plain objects, merge them recursively 1000 else if (isPlainObject(targetValue)) { 1001 deepMergeRecursive(target[key], source[key], override); 1002 } 1003 1004 // Handle primitive values and non-plain objects 1005 } else if (override || isNew) { 1006 Object.defineProperty(target, key, desc); 1007 if (propSignal) { 1008 const { 1009 value 1010 } = desc; 1011 const ns = getNamespaceFromProxy(proxy); 1012 // Proxify the value if necessary before setting it in the signal 1013 propSignal.setValue(shouldProxy(value) ? proxifyState(ns, value) : value); 1014 } 1015 } 1016 } 1017 if (hasNewKeys && objToIterable.has(target)) { 1018 objToIterable.get(target).value++; 1019 } 1020 }; 1021 1022 /** 1023 * Recursively update prop values inside the passed `target` and nested plain 1024 * objects, using the values present in `source`. References to plain objects 1025 * are kept, only updating props containing primitives or arrays. Arrays are 1026 * replaced instead of merged or concatenated. 1027 * 1028 * If the `override` parameter is set to `false`, then all values in `target` 1029 * are preserved, and only new properties from `source` are added. 1030 * 1031 * @param target The target object. 1032 * @param source The source object containing new values and props. 1033 * @param override Whether existing props should be overwritten or not (`true` 1034 * by default). 1035 */ 1036 const deepMerge = (target, source, override = true) => signals_core_module_r(() => deepMergeRecursive(getObjectFromProxy(target) || target, source, override)); 1037 1038 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/store.js 1039 /** 1040 * Internal dependencies 1041 */ 1042 1043 /** 1044 * External dependencies 1045 */ 1046 1047 1048 1049 /** 1050 * Identifies the store proxies handling the root objects of each store. 1051 */ 1052 const storeRoots = new WeakSet(); 1053 1054 /** 1055 * Handlers for store proxies. 1056 */ 1057 const storeHandlers = { 1058 get: (target, key, receiver) => { 1059 const result = Reflect.get(target, key); 1060 const ns = getNamespaceFromProxy(receiver); 1061 1062 /* 1063 * Check if the proxy is the store root and no key with that name exist. In 1064 * that case, return an empty object for the requested key. 1065 */ 1066 if (typeof result === 'undefined' && storeRoots.has(receiver)) { 1067 const obj = {}; 1068 Reflect.set(target, key, obj); 1069 return proxifyStore(ns, obj, false); 1070 } 1071 1072 /* 1073 * Check if the property is a function. If it is, add the store 1074 * namespace to the stack and wrap the function with the current scope. 1075 * The `withScope` util handles both synchronous functions and generator 1076 * functions. 1077 */ 1078 if (typeof result === 'function') { 1079 setNamespace(ns); 1080 const scoped = withScope(result); 1081 resetNamespace(); 1082 return scoped; 1083 } 1084 1085 // Check if the property is an object. If it is, proxyify it. 1086 if (isPlainObject(result) && shouldProxy(result)) { 1087 return proxifyStore(ns, result, false); 1088 } 1089 return result; 1090 } 1091 }; 1092 1093 /** 1094 * Returns the proxy associated with the given store object, creating it if it 1095 * does not exist. 1096 * 1097 * @param namespace The namespace that will be associated to this proxy. 1098 * @param obj The object to proxify. 1099 * 1100 * @param isRoot Whether the passed object is the store root object. 1101 * @throws Error if the object cannot be proxified. Use {@link shouldProxy} to 1102 * check if a proxy can be created for a specific object. 1103 * 1104 * @return The associated proxy. 1105 */ 1106 const proxifyStore = (namespace, obj, isRoot = true) => { 1107 const proxy = createProxy(namespace, obj, storeHandlers); 1108 if (proxy && isRoot) { 1109 storeRoots.add(proxy); 1110 } 1111 return proxy; 1112 }; 1113 1114 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/context.js 1115 const contextObjectToProxy = new WeakMap(); 1116 const contextObjectToFallback = new WeakMap(); 1117 const contextProxies = new WeakSet(); 1118 const descriptor = Reflect.getOwnPropertyDescriptor; 1119 1120 // TODO: Use the proxy registry to avoid multiple proxies on the same object. 1121 const contextHandlers = { 1122 get: (target, key) => { 1123 const fallback = contextObjectToFallback.get(target); 1124 // Always subscribe to prop changes in the current context. 1125 const currentProp = target[key]; 1126 1127 /* 1128 * Return the value from `target` if it exists, or from `fallback` 1129 * otherwise. This way, in the case the property doesn't exist either in 1130 * `target` or `fallback`, it also subscribes to changes in the parent 1131 * context. 1132 */ 1133 return key in target ? currentProp : fallback[key]; 1134 }, 1135 set: (target, key, value) => { 1136 const fallback = contextObjectToFallback.get(target); 1137 1138 // If the property exists in the current context, modify it. Otherwise, 1139 // add it to the current context. 1140 const obj = key in target || !(key in fallback) ? target : fallback; 1141 obj[key] = value; 1142 return true; 1143 }, 1144 ownKeys: target => [...new Set([...Object.keys(contextObjectToFallback.get(target)), ...Object.keys(target)])], 1145 getOwnPropertyDescriptor: (target, key) => descriptor(target, key) || descriptor(contextObjectToFallback.get(target), key), 1146 has: (target, key) => Reflect.has(target, key) || Reflect.has(contextObjectToFallback.get(target), key) 1147 }; 1148 1149 /** 1150 * Wrap a context object with a proxy to reproduce the context stack. The proxy 1151 * uses the passed `inherited` context as a fallback to look up for properties 1152 * that don't exist in the given context. Also, updated properties are modified 1153 * where they are defined, or added to the main context when they don't exist. 1154 * 1155 * @param current Current context. 1156 * @param inherited Inherited context, used as fallback. 1157 * 1158 * @return The wrapped context object. 1159 */ 1160 const proxifyContext = (current, inherited = {}) => { 1161 if (contextProxies.has(current)) { 1162 throw Error('This object cannot be proxified.'); 1163 } 1164 // Update the fallback object reference when it changes. 1165 contextObjectToFallback.set(current, inherited); 1166 if (!contextObjectToProxy.has(current)) { 1167 const proxy = new Proxy(current, contextHandlers); 1168 contextObjectToProxy.set(current, proxy); 1169 contextProxies.add(proxy); 1170 } 1171 return contextObjectToProxy.get(current); 1172 }; 1173 1174 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/index.js 1175 /** 1176 * Internal dependencies 1177 */ 1178 1179 1180 1181 1182 ;// ./node_modules/@wordpress/interactivity/build-module/store.js 1183 /* wp:polyfill */ 1184 /** 1185 * Internal dependencies 1186 */ 1187 1188 /** 1189 * External dependencies 1190 */ 1191 1192 1193 const stores = new Map(); 1194 const rawStores = new Map(); 1195 const storeLocks = new Map(); 1196 const storeConfigs = new Map(); 1197 const serverStates = new Map(); 1198 1199 /** 1200 * Get the defined config for the store with the passed namespace. 1201 * 1202 * @param namespace Store's namespace from which to retrieve the config. 1203 * @return Defined config for the given namespace. 1204 */ 1205 const getConfig = namespace => storeConfigs.get(namespace || getNamespace()) || {}; 1206 1207 /** 1208 * Get the part of the state defined and updated from the server. 1209 * 1210 * The object returned is read-only, and includes the state defined in PHP with 1211 * `wp_interactivity_state()`. When using `actions.navigate()`, this object is 1212 * updated to reflect the changes in its properties, without affecting the state 1213 * returned by `store()`. Directives can subscribe to those changes to update 1214 * the state if needed. 1215 * 1216 * @example 1217 * ```js 1218 * const { state } = store('myStore', { 1219 * callbacks: { 1220 * updateServerState() { 1221 * const serverState = getServerState(); 1222 * // Override some property with the new value that came from the server. 1223 * state.overridableProp = serverState.overridableProp; 1224 * }, 1225 * }, 1226 * }); 1227 * ``` 1228 * 1229 * @param namespace Store's namespace from which to retrieve the server state. 1230 * @return The server state for the given namespace. 1231 */ 1232 const getServerState = namespace => { 1233 const ns = namespace || getNamespace(); 1234 if (!serverStates.has(ns)) { 1235 serverStates.set(ns, proxifyState(ns, {}, { 1236 readOnly: true 1237 })); 1238 } 1239 return serverStates.get(ns); 1240 }; 1241 const universalUnlock = 'I acknowledge that using a private store means my plugin will inevitably break on the next store release.'; 1242 1243 /** 1244 * Extends the Interactivity API global store adding the passed properties to 1245 * the given namespace. It also returns stable references to the namespace 1246 * content. 1247 * 1248 * These props typically consist of `state`, which is the reactive part of the 1249 * store ― which means that any directive referencing a state property will be 1250 * re-rendered anytime it changes ― and function properties like `actions` and 1251 * `callbacks`, mostly used for event handlers. These props can then be 1252 * referenced by any directive to make the HTML interactive. 1253 * 1254 * @example 1255 * ```js 1256 * const { state } = store( 'counter', { 1257 * state: { 1258 * value: 0, 1259 * get double() { return state.value * 2; }, 1260 * }, 1261 * actions: { 1262 * increment() { 1263 * state.value += 1; 1264 * }, 1265 * }, 1266 * } ); 1267 * ``` 1268 * 1269 * The code from the example above allows blocks to subscribe and interact with 1270 * the store by using directives in the HTML, e.g.: 1271 * 1272 * ```html 1273 * <div data-wp-interactive="counter"> 1274 * <button 1275 * data-wp-text="state.double" 1276 * data-wp-on--click="actions.increment" 1277 * > 1278 * 0 1279 * </button> 1280 * </div> 1281 * ``` 1282 * @param namespace The store namespace to interact with. 1283 * @param storePart Properties to add to the store namespace. 1284 * @param options Options for the given namespace. 1285 * 1286 * @return A reference to the namespace content. 1287 */ 1288 1289 // Overload for when the types are inferred. 1290 1291 // Overload for when types are passed via generics and they contain state. 1292 1293 // Overload for when types are passed via generics and they don't contain state. 1294 1295 // Overload for when types are divided into multiple parts. 1296 1297 function store(namespace, { 1298 state = {}, 1299 ...block 1300 } = {}, { 1301 lock = false 1302 } = {}) { 1303 if (!stores.has(namespace)) { 1304 // Lock the store if the passed lock is different from the universal 1305 // unlock. Once the lock is set (either false, true, or a given string), 1306 // it cannot change. 1307 if (lock !== universalUnlock) { 1308 storeLocks.set(namespace, lock); 1309 } 1310 const rawStore = { 1311 state: proxifyState(namespace, isPlainObject(state) ? state : {}), 1312 ...block 1313 }; 1314 const proxifiedStore = proxifyStore(namespace, rawStore); 1315 rawStores.set(namespace, rawStore); 1316 stores.set(namespace, proxifiedStore); 1317 } else { 1318 // Lock the store if it wasn't locked yet and the passed lock is 1319 // different from the universal unlock. If no lock is given, the store 1320 // will be public and won't accept any lock from now on. 1321 if (lock !== universalUnlock && !storeLocks.has(namespace)) { 1322 storeLocks.set(namespace, lock); 1323 } else { 1324 const storeLock = storeLocks.get(namespace); 1325 const isLockValid = lock === universalUnlock || lock !== true && lock === storeLock; 1326 if (!isLockValid) { 1327 if (!storeLock) { 1328 throw Error('Cannot lock a public store'); 1329 } else { 1330 throw Error('Cannot unlock a private store with an invalid lock code'); 1331 } 1332 } 1333 } 1334 const target = rawStores.get(namespace); 1335 deepMerge(target, block); 1336 deepMerge(target.state, state); 1337 } 1338 return stores.get(namespace); 1339 } 1340 const parseServerData = (dom = document) => { 1341 var _dom$getElementById; 1342 const jsonDataScriptTag = // Preferred Script Module data passing form 1343 (_dom$getElementById = dom.getElementById('wp-script-module-data-@wordpress/interactivity')) !== null && _dom$getElementById !== void 0 ? _dom$getElementById : 1344 // Legacy form 1345 dom.getElementById('wp-interactivity-data'); 1346 if (jsonDataScriptTag?.textContent) { 1347 try { 1348 return JSON.parse(jsonDataScriptTag.textContent); 1349 } catch {} 1350 } 1351 return {}; 1352 }; 1353 const populateServerData = data => { 1354 if (isPlainObject(data?.state)) { 1355 Object.entries(data.state).forEach(([namespace, state]) => { 1356 const st = store(namespace, {}, { 1357 lock: universalUnlock 1358 }); 1359 deepMerge(st.state, state, false); 1360 deepMerge(getServerState(namespace), state); 1361 }); 1362 } 1363 if (isPlainObject(data?.config)) { 1364 Object.entries(data.config).forEach(([namespace, config]) => { 1365 storeConfigs.set(namespace, config); 1366 }); 1367 } 1368 }; 1369 1370 // Parse and populate the initial state and config. 1371 const data = parseServerData(); 1372 populateServerData(data); 1373 1374 ;// ./node_modules/@wordpress/interactivity/build-module/hooks.js 1375 /* wp:polyfill */ 1376 // eslint-disable-next-line eslint-comments/disable-enable-pair 1377 /* eslint-disable react-hooks/exhaustive-deps */ 1378 1379 /** 1380 * External dependencies 1381 */ 1382 1383 1384 /** 1385 * Internal dependencies 1386 */ 1387 1388 1389 1390 function isNonDefaultDirectiveSuffix(entry) { 1391 return entry.suffix !== null; 1392 } 1393 function isDefaultDirectiveSuffix(entry) { 1394 return entry.suffix === null; 1395 } 1396 // Main context. 1397 const context = (0,preact_module/* createContext */.q6)({ 1398 client: {}, 1399 server: {} 1400 }); 1401 1402 // WordPress Directives. 1403 const directiveCallbacks = {}; 1404 const directivePriorities = {}; 1405 1406 /** 1407 * Register a new directive type in the Interactivity API runtime. 1408 * 1409 * @example 1410 * ```js 1411 * directive( 1412 * 'alert', // Name without the `data-wp-` prefix. 1413 * ( { directives: { alert }, element, evaluate } ) => { 1414 * const defaultEntry = alert.find( isDefaultDirectiveSuffix ); 1415 * element.props.onclick = () => { alert( evaluate( defaultEntry ) ); } 1416 * } 1417 * ) 1418 * ``` 1419 * 1420 * The previous code registers a custom directive type for displaying an alert 1421 * message whenever an element using it is clicked. The message text is obtained 1422 * from the store under the inherited namespace, using `evaluate`. 1423 * 1424 * When the HTML is processed by the Interactivity API, any element containing 1425 * the `data-wp-alert` directive will have the `onclick` event handler, e.g., 1426 * 1427 * ```html 1428 * <div data-wp-interactive="messages"> 1429 * <button data-wp-alert="state.alert">Click me!</button> 1430 * </div> 1431 * ``` 1432 * Note that, in the previous example, the directive callback gets the path 1433 * value (`state.alert`) from the directive entry with suffix `null`. A 1434 * custom suffix can also be specified by appending `--` to the directive 1435 * attribute, followed by the suffix, like in the following HTML snippet: 1436 * 1437 * ```html 1438 * <div data-wp-interactive="myblock"> 1439 * <button 1440 * data-wp-color--text="state.text" 1441 * data-wp-color--background="state.background" 1442 * >Click me!</button> 1443 * </div> 1444 * ``` 1445 * 1446 * This could be an hypothetical implementation of the custom directive used in 1447 * the snippet above. 1448 * 1449 * @example 1450 * ```js 1451 * directive( 1452 * 'color', // Name without prefix and suffix. 1453 * ( { directives: { color: colors }, ref, evaluate } ) => 1454 * colors.forEach( ( color ) => { 1455 * if ( color.suffix = 'text' ) { 1456 * ref.style.setProperty( 1457 * 'color', 1458 * evaluate( color.text ) 1459 * ); 1460 * } 1461 * if ( color.suffix = 'background' ) { 1462 * ref.style.setProperty( 1463 * 'background-color', 1464 * evaluate( color.background ) 1465 * ); 1466 * } 1467 * } ); 1468 * } 1469 * ) 1470 * ``` 1471 * 1472 * @param name Directive name, without the `data-wp-` prefix. 1473 * @param callback Function that runs the directive logic. 1474 * @param options Options object. 1475 * @param options.priority Option to control the directive execution order. The 1476 * lesser, the highest priority. Default is `10`. 1477 */ 1478 const directive = (name, callback, { 1479 priority = 10 1480 } = {}) => { 1481 directiveCallbacks[name] = callback; 1482 directivePriorities[name] = priority; 1483 }; 1484 1485 // Resolve the path to some property of the store object. 1486 const resolve = (path, namespace) => { 1487 if (!namespace) { 1488 warn(`Namespace missing for "$path}". The value for that path won't be resolved.`); 1489 return; 1490 } 1491 let resolvedStore = stores.get(namespace); 1492 if (typeof resolvedStore === 'undefined') { 1493 resolvedStore = store(namespace, {}, { 1494 lock: universalUnlock 1495 }); 1496 } 1497 const current = { 1498 ...resolvedStore, 1499 context: getScope().context[namespace] 1500 }; 1501 try { 1502 // TODO: Support lazy/dynamically initialized stores 1503 return path.split('.').reduce((acc, key) => acc[key], current); 1504 } catch (e) {} 1505 }; 1506 1507 // Generate the evaluate function. 1508 const getEvaluate = ({ 1509 scope 1510 }) => (entry, ...args) => { 1511 let { 1512 value: path, 1513 namespace 1514 } = entry; 1515 if (typeof path !== 'string') { 1516 throw new Error('The `value` prop should be a string path'); 1517 } 1518 // If path starts with !, remove it and save a flag. 1519 const hasNegationOperator = path[0] === '!' && !!(path = path.slice(1)); 1520 setScope(scope); 1521 const value = resolve(path, namespace); 1522 const result = typeof value === 'function' ? value(...args) : value; 1523 resetScope(); 1524 return hasNegationOperator ? !result : result; 1525 }; 1526 1527 // Separate directives by priority. The resulting array contains objects 1528 // of directives grouped by same priority, and sorted in ascending order. 1529 const getPriorityLevels = directives => { 1530 const byPriority = Object.keys(directives).reduce((obj, name) => { 1531 if (directiveCallbacks[name]) { 1532 const priority = directivePriorities[name]; 1533 (obj[priority] = obj[priority] || []).push(name); 1534 } 1535 return obj; 1536 }, {}); 1537 return Object.entries(byPriority).sort(([p1], [p2]) => parseInt(p1) - parseInt(p2)).map(([, arr]) => arr); 1538 }; 1539 1540 // Component that wraps each priority level of directives of an element. 1541 const Directives = ({ 1542 directives, 1543 priorityLevels: [currentPriorityLevel, ...nextPriorityLevels], 1544 element, 1545 originalProps, 1546 previousScope 1547 }) => { 1548 // Initialize the scope of this element. These scopes are different per each 1549 // level because each level has a different context, but they share the same 1550 // element ref, state and props. 1551 const scope = A({}).current; 1552 scope.evaluate = q(getEvaluate({ 1553 scope 1554 }), []); 1555 const { 1556 client, 1557 server 1558 } = x(context); 1559 scope.context = client; 1560 scope.serverContext = server; 1561 /* eslint-disable react-hooks/rules-of-hooks */ 1562 scope.ref = previousScope?.ref || A(null); 1563 /* eslint-enable react-hooks/rules-of-hooks */ 1564 1565 // Create a fresh copy of the vnode element and add the props to the scope, 1566 // named as attributes (HTML Attributes). 1567 element = (0,preact_module/* cloneElement */.Ob)(element, { 1568 ref: scope.ref 1569 }); 1570 scope.attributes = element.props; 1571 1572 // Recursively render the wrapper for the next priority level. 1573 const children = nextPriorityLevels.length > 0 ? (0,preact_module.h)(Directives, { 1574 directives, 1575 priorityLevels: nextPriorityLevels, 1576 element, 1577 originalProps, 1578 previousScope: scope 1579 }) : element; 1580 const props = { 1581 ...originalProps, 1582 children 1583 }; 1584 const directiveArgs = { 1585 directives, 1586 props, 1587 element, 1588 context, 1589 evaluate: scope.evaluate 1590 }; 1591 setScope(scope); 1592 for (const directiveName of currentPriorityLevel) { 1593 const wrapper = directiveCallbacks[directiveName]?.(directiveArgs); 1594 if (wrapper !== undefined) { 1595 props.children = wrapper; 1596 } 1597 } 1598 resetScope(); 1599 return props.children; 1600 }; 1601 1602 // Preact Options Hook called each time a vnode is created. 1603 const old = preact_module/* options */.fF.vnode; 1604 preact_module/* options */.fF.vnode = vnode => { 1605 if (vnode.props.__directives) { 1606 const props = vnode.props; 1607 const directives = props.__directives; 1608 if (directives.key) { 1609 vnode.key = directives.key.find(isDefaultDirectiveSuffix).value; 1610 } 1611 delete props.__directives; 1612 const priorityLevels = getPriorityLevels(directives); 1613 if (priorityLevels.length > 0) { 1614 vnode.props = { 1615 directives, 1616 priorityLevels, 1617 originalProps: props, 1618 type: vnode.type, 1619 element: (0,preact_module.h)(vnode.type, props), 1620 top: true 1621 }; 1622 vnode.type = Directives; 1623 } 1624 } 1625 if (old) { 1626 old(vnode); 1627 } 1628 }; 1629 1630 ;// ./node_modules/@wordpress/interactivity/build-module/directives.js 1631 /* wp:polyfill */ 1632 // eslint-disable-next-line eslint-comments/disable-enable-pair 1633 /* eslint-disable react-hooks/exhaustive-deps */ 1634 1635 /** 1636 * External dependencies 1637 */ 1638 1639 1640 1641 /** 1642 * Internal dependencies 1643 */ 1644 1645 1646 1647 1648 1649 /** 1650 * Recursively clone the passed object. 1651 * 1652 * @param source Source object. 1653 * @return Cloned object. 1654 */ 1655 function deepClone(source) { 1656 if (isPlainObject(source)) { 1657 return Object.fromEntries(Object.entries(source).map(([key, value]) => [key, deepClone(value)])); 1658 } 1659 if (Array.isArray(source)) { 1660 return source.map(i => deepClone(i)); 1661 } 1662 return source; 1663 } 1664 const newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g; 1665 const ruleClean = /\/\*[^]*?\*\/| +/g; 1666 const ruleNewline = /\n+/g; 1667 const empty = ' '; 1668 1669 /** 1670 * Convert a css style string into a object. 1671 * 1672 * Made by Cristian Bote (@cristianbote) for Goober. 1673 * https://unpkg.com/browse/goober@2.1.13/src/core/astish.js 1674 * 1675 * @param val CSS string. 1676 * @return CSS object. 1677 */ 1678 const cssStringToObject = val => { 1679 const tree = [{}]; 1680 let block, left; 1681 while (block = newRule.exec(val.replace(ruleClean, ''))) { 1682 if (block[4]) { 1683 tree.shift(); 1684 } else if (block[3]) { 1685 left = block[3].replace(ruleNewline, empty).trim(); 1686 tree.unshift(tree[0][left] = tree[0][left] || {}); 1687 } else { 1688 tree[0][block[1]] = block[2].replace(ruleNewline, empty).trim(); 1689 } 1690 } 1691 return tree[0]; 1692 }; 1693 1694 /** 1695 * Creates a directive that adds an event listener to the global window or 1696 * document object. 1697 * 1698 * @param type 'window' or 'document' 1699 */ 1700 const getGlobalEventDirective = type => { 1701 return ({ 1702 directives, 1703 evaluate 1704 }) => { 1705 directives[`on-$type}`].filter(isNonDefaultDirectiveSuffix).forEach(entry => { 1706 const eventName = entry.suffix.split('--', 1)[0]; 1707 useInit(() => { 1708 const cb = event => evaluate(entry, event); 1709 const globalVar = type === 'window' ? window : document; 1710 globalVar.addEventListener(eventName, cb); 1711 return () => globalVar.removeEventListener(eventName, cb); 1712 }); 1713 }); 1714 }; 1715 }; 1716 1717 /** 1718 * Creates a directive that adds an async event listener to the global window or 1719 * document object. 1720 * 1721 * @param type 'window' or 'document' 1722 */ 1723 const getGlobalAsyncEventDirective = type => { 1724 return ({ 1725 directives, 1726 evaluate 1727 }) => { 1728 directives[`on-async-$type}`].filter(isNonDefaultDirectiveSuffix).forEach(entry => { 1729 const eventName = entry.suffix.split('--', 1)[0]; 1730 useInit(() => { 1731 const cb = async event => { 1732 await splitTask(); 1733 evaluate(entry, event); 1734 }; 1735 const globalVar = type === 'window' ? window : document; 1736 globalVar.addEventListener(eventName, cb, { 1737 passive: true 1738 }); 1739 return () => globalVar.removeEventListener(eventName, cb); 1740 }); 1741 }); 1742 }; 1743 }; 1744 /* harmony default export */ const directives = (() => { 1745 // data-wp-context 1746 directive('context', ({ 1747 directives: { 1748 context 1749 }, 1750 props: { 1751 children 1752 }, 1753 context: inheritedContext 1754 }) => { 1755 const { 1756 Provider 1757 } = inheritedContext; 1758 const defaultEntry = context.find(isDefaultDirectiveSuffix); 1759 const { 1760 client: inheritedClient, 1761 server: inheritedServer 1762 } = x(inheritedContext); 1763 const ns = defaultEntry.namespace; 1764 const client = A(proxifyState(ns, {})); 1765 const server = A(proxifyState(ns, {}, { 1766 readOnly: true 1767 })); 1768 1769 // No change should be made if `defaultEntry` does not exist. 1770 const contextStack = T(() => { 1771 const result = { 1772 client: { 1773 ...inheritedClient 1774 }, 1775 server: { 1776 ...inheritedServer 1777 } 1778 }; 1779 if (defaultEntry) { 1780 const { 1781 namespace, 1782 value 1783 } = defaultEntry; 1784 // Check that the value is a JSON object. Send a console warning if not. 1785 if (!isPlainObject(value)) { 1786 warn(`The value of data-wp-context in "$namespace}" store must be a valid stringified JSON object.`); 1787 } 1788 deepMerge(client.current, deepClone(value), false); 1789 deepMerge(server.current, deepClone(value)); 1790 result.client[namespace] = proxifyContext(client.current, inheritedClient[namespace]); 1791 result.server[namespace] = proxifyContext(server.current, inheritedServer[namespace]); 1792 } 1793 return result; 1794 }, [defaultEntry, inheritedClient, inheritedServer]); 1795 return (0,preact_module.h)(Provider, { 1796 value: contextStack 1797 }, children); 1798 }, { 1799 priority: 5 1800 }); 1801 1802 // data-wp-watch--[name] 1803 directive('watch', ({ 1804 directives: { 1805 watch 1806 }, 1807 evaluate 1808 }) => { 1809 watch.forEach(entry => { 1810 useWatch(() => { 1811 let start; 1812 if (false) {} 1813 const result = evaluate(entry); 1814 if (false) {} 1815 return result; 1816 }); 1817 }); 1818 }); 1819 1820 // data-wp-init--[name] 1821 directive('init', ({ 1822 directives: { 1823 init 1824 }, 1825 evaluate 1826 }) => { 1827 init.forEach(entry => { 1828 // TODO: Replace with useEffect to prevent unneeded scopes. 1829 useInit(() => { 1830 let start; 1831 if (false) {} 1832 const result = evaluate(entry); 1833 if (false) {} 1834 return result; 1835 }); 1836 }); 1837 }); 1838 1839 // data-wp-on--[event] 1840 directive('on', ({ 1841 directives: { 1842 on 1843 }, 1844 element, 1845 evaluate 1846 }) => { 1847 const events = new Map(); 1848 on.filter(isNonDefaultDirectiveSuffix).forEach(entry => { 1849 const event = entry.suffix.split('--')[0]; 1850 if (!events.has(event)) { 1851 events.set(event, new Set()); 1852 } 1853 events.get(event).add(entry); 1854 }); 1855 events.forEach((entries, eventType) => { 1856 const existingHandler = element.props[`on$eventType}`]; 1857 element.props[`on$eventType}`] = event => { 1858 entries.forEach(entry => { 1859 if (existingHandler) { 1860 existingHandler(event); 1861 } 1862 let start; 1863 if (false) {} 1864 evaluate(entry, event); 1865 if (false) {} 1866 }); 1867 }; 1868 }); 1869 }); 1870 1871 // data-wp-on-async--[event] 1872 directive('on-async', ({ 1873 directives: { 1874 'on-async': onAsync 1875 }, 1876 element, 1877 evaluate 1878 }) => { 1879 const events = new Map(); 1880 onAsync.filter(isNonDefaultDirectiveSuffix).forEach(entry => { 1881 const event = entry.suffix.split('--')[0]; 1882 if (!events.has(event)) { 1883 events.set(event, new Set()); 1884 } 1885 events.get(event).add(entry); 1886 }); 1887 events.forEach((entries, eventType) => { 1888 const existingHandler = element.props[`on$eventType}`]; 1889 element.props[`on$eventType}`] = event => { 1890 if (existingHandler) { 1891 existingHandler(event); 1892 } 1893 entries.forEach(async entry => { 1894 await splitTask(); 1895 evaluate(entry, event); 1896 }); 1897 }; 1898 }); 1899 }); 1900 1901 // data-wp-on-window--[event] 1902 directive('on-window', getGlobalEventDirective('window')); 1903 // data-wp-on-document--[event] 1904 directive('on-document', getGlobalEventDirective('document')); 1905 1906 // data-wp-on-async-window--[event] 1907 directive('on-async-window', getGlobalAsyncEventDirective('window')); 1908 // data-wp-on-async-document--[event] 1909 directive('on-async-document', getGlobalAsyncEventDirective('document')); 1910 1911 // data-wp-class--[classname] 1912 directive('class', ({ 1913 directives: { 1914 class: classNames 1915 }, 1916 element, 1917 evaluate 1918 }) => { 1919 classNames.filter(isNonDefaultDirectiveSuffix).forEach(entry => { 1920 const className = entry.suffix; 1921 const result = evaluate(entry); 1922 const currentClass = element.props.class || ''; 1923 const classFinder = new RegExp(`(^|\\s)$className}(\\s|$)`, 'g'); 1924 if (!result) { 1925 element.props.class = currentClass.replace(classFinder, ' ').trim(); 1926 } else if (!classFinder.test(currentClass)) { 1927 element.props.class = currentClass ? `$currentClass} $className}` : className; 1928 } 1929 useInit(() => { 1930 /* 1931 * This seems necessary because Preact doesn't change the class 1932 * names on the hydration, so we have to do it manually. It doesn't 1933 * need deps because it only needs to do it the first time. 1934 */ 1935 if (!result) { 1936 element.ref.current.classList.remove(className); 1937 } else { 1938 element.ref.current.classList.add(className); 1939 } 1940 }); 1941 }); 1942 }); 1943 1944 // data-wp-style--[style-prop] 1945 directive('style', ({ 1946 directives: { 1947 style 1948 }, 1949 element, 1950 evaluate 1951 }) => { 1952 style.filter(isNonDefaultDirectiveSuffix).forEach(entry => { 1953 const styleProp = entry.suffix; 1954 const result = evaluate(entry); 1955 element.props.style = element.props.style || {}; 1956 if (typeof element.props.style === 'string') { 1957 element.props.style = cssStringToObject(element.props.style); 1958 } 1959 if (!result) { 1960 delete element.props.style[styleProp]; 1961 } else { 1962 element.props.style[styleProp] = result; 1963 } 1964 useInit(() => { 1965 /* 1966 * This seems necessary because Preact doesn't change the styles on 1967 * the hydration, so we have to do it manually. It doesn't need deps 1968 * because it only needs to do it the first time. 1969 */ 1970 if (!result) { 1971 element.ref.current.style.removeProperty(styleProp); 1972 } else { 1973 element.ref.current.style[styleProp] = result; 1974 } 1975 }); 1976 }); 1977 }); 1978 1979 // data-wp-bind--[attribute] 1980 directive('bind', ({ 1981 directives: { 1982 bind 1983 }, 1984 element, 1985 evaluate 1986 }) => { 1987 bind.filter(isNonDefaultDirectiveSuffix).forEach(entry => { 1988 const attribute = entry.suffix; 1989 const result = evaluate(entry); 1990 element.props[attribute] = result; 1991 1992 /* 1993 * This is necessary because Preact doesn't change the attributes on the 1994 * hydration, so we have to do it manually. It only needs to do it the 1995 * first time. After that, Preact will handle the changes. 1996 */ 1997 useInit(() => { 1998 const el = element.ref.current; 1999 2000 /* 2001 * We set the value directly to the corresponding HTMLElement instance 2002 * property excluding the following special cases. We follow Preact's 2003 * logic: https://github.com/preactjs/preact/blob/ea49f7a0f9d1ff2c98c0bdd66aa0cbc583055246/src/diff/props.js#L110-L129 2004 */ 2005 if (attribute === 'style') { 2006 if (typeof result === 'string') { 2007 el.style.cssText = result; 2008 } 2009 return; 2010 } else if (attribute !== 'width' && attribute !== 'height' && attribute !== 'href' && attribute !== 'list' && attribute !== 'form' && 2011 /* 2012 * The value for `tabindex` follows the parsing rules for an 2013 * integer. If that fails, or if the attribute isn't present, then 2014 * the browsers should "follow platform conventions to determine if 2015 * the element should be considered as a focusable area", 2016 * practically meaning that most elements get a default of `-1` (not 2017 * focusable), but several also get a default of `0` (focusable in 2018 * order after all elements with a positive `tabindex` value). 2019 * 2020 * @see https://html.spec.whatwg.org/#tabindex-value 2021 */ 2022 attribute !== 'tabIndex' && attribute !== 'download' && attribute !== 'rowSpan' && attribute !== 'colSpan' && attribute !== 'role' && attribute in el) { 2023 try { 2024 el[attribute] = result === null || result === undefined ? '' : result; 2025 return; 2026 } catch (err) {} 2027 } 2028 /* 2029 * aria- and data- attributes have no boolean representation. 2030 * A `false` value is different from the attribute not being 2031 * present, so we can't remove it. 2032 * We follow Preact's logic: https://github.com/preactjs/preact/blob/ea49f7a0f9d1ff2c98c0bdd66aa0cbc583055246/src/diff/props.js#L131C24-L136 2033 */ 2034 if (result !== null && result !== undefined && (result !== false || attribute[4] === '-')) { 2035 el.setAttribute(attribute, result); 2036 } else { 2037 el.removeAttribute(attribute); 2038 } 2039 }); 2040 }); 2041 }); 2042 2043 // data-wp-ignore 2044 directive('ignore', ({ 2045 element: { 2046 type: Type, 2047 props: { 2048 innerHTML, 2049 ...rest 2050 } 2051 } 2052 }) => { 2053 // Preserve the initial inner HTML. 2054 const cached = T(() => innerHTML, []); 2055 return (0,preact_module.h)(Type, { 2056 dangerouslySetInnerHTML: { 2057 __html: cached 2058 }, 2059 ...rest 2060 }); 2061 }); 2062 2063 // data-wp-text 2064 directive('text', ({ 2065 directives: { 2066 text 2067 }, 2068 element, 2069 evaluate 2070 }) => { 2071 const entry = text.find(isDefaultDirectiveSuffix); 2072 if (!entry) { 2073 element.props.children = null; 2074 return; 2075 } 2076 try { 2077 const result = evaluate(entry); 2078 element.props.children = typeof result === 'object' ? null : result.toString(); 2079 } catch (e) { 2080 element.props.children = null; 2081 } 2082 }); 2083 2084 // data-wp-run 2085 directive('run', ({ 2086 directives: { 2087 run 2088 }, 2089 evaluate 2090 }) => { 2091 run.forEach(entry => evaluate(entry)); 2092 }); 2093 2094 // data-wp-each--[item] 2095 directive('each', ({ 2096 directives: { 2097 each, 2098 'each-key': eachKey 2099 }, 2100 context: inheritedContext, 2101 element, 2102 evaluate 2103 }) => { 2104 if (element.type !== 'template') { 2105 return; 2106 } 2107 const { 2108 Provider 2109 } = inheritedContext; 2110 const inheritedValue = x(inheritedContext); 2111 const [entry] = each; 2112 const { 2113 namespace 2114 } = entry; 2115 const iterable = evaluate(entry); 2116 if (typeof iterable?.[Symbol.iterator] !== 'function') { 2117 return; 2118 } 2119 const itemProp = isNonDefaultDirectiveSuffix(entry) ? kebabToCamelCase(entry.suffix) : 'item'; 2120 const result = []; 2121 for (const item of iterable) { 2122 const itemContext = proxifyContext(proxifyState(namespace, {}), inheritedValue.client[namespace]); 2123 const mergedContext = { 2124 client: { 2125 ...inheritedValue.client, 2126 [namespace]: itemContext 2127 }, 2128 server: { 2129 ...inheritedValue.server 2130 } 2131 }; 2132 2133 // Set the item after proxifying the context. 2134 mergedContext.client[namespace][itemProp] = item; 2135 const scope = { 2136 ...getScope(), 2137 context: mergedContext.client, 2138 serverContext: mergedContext.server 2139 }; 2140 const key = eachKey ? getEvaluate({ 2141 scope 2142 })(eachKey[0]) : item; 2143 result.push((0,preact_module.h)(Provider, { 2144 value: mergedContext, 2145 key 2146 }, element.props.content)); 2147 } 2148 return result; 2149 }, { 2150 priority: 20 2151 }); 2152 directive('each-child', () => null, { 2153 priority: 1 2154 }); 2155 }); 2156 2157 ;// ./node_modules/@wordpress/interactivity/build-module/constants.js 2158 const directivePrefix = 'wp'; 2159 2160 ;// ./node_modules/@wordpress/interactivity/build-module/vdom.js 2161 /* wp:polyfill */ 2162 /** 2163 * External dependencies 2164 */ 2165 2166 /** 2167 * Internal dependencies 2168 */ 2169 2170 2171 const ignoreAttr = `data-$directivePrefix}-ignore`; 2172 const islandAttr = `data-$directivePrefix}-interactive`; 2173 const fullPrefix = `data-$directivePrefix}-`; 2174 const namespaces = []; 2175 const currentNamespace = () => { 2176 var _namespaces; 2177 return (_namespaces = namespaces[namespaces.length - 1]) !== null && _namespaces !== void 0 ? _namespaces : null; 2178 }; 2179 const isObject = item => Boolean(item && typeof item === 'object' && item.constructor === Object); 2180 2181 // Regular expression for directive parsing. 2182 const directiveParser = new RegExp(`^data-$directivePrefix}-` + 2183 // ${p} must be a prefix string, like 'wp'. 2184 // Match alphanumeric characters including hyphen-separated 2185 // segments. It excludes underscore intentionally to prevent confusion. 2186 // E.g., "custom-directive". 2187 '([a-z0-9]+(?:-[a-z0-9]+)*)' + 2188 // (Optional) Match '--' followed by any alphanumeric characters. It 2189 // excludes underscore intentionally to prevent confusion, but it can 2190 // contain multiple hyphens. E.g., "--custom-prefix--with-more-info". 2191 '(?:--([a-z0-9_-]+))?$', 'i' // Case insensitive. 2192 ); 2193 2194 // Regular expression for reference parsing. It can contain a namespace before 2195 // the reference, separated by `::`, like `some-namespace::state.somePath`. 2196 // Namespaces can contain any alphanumeric characters, hyphens, underscores or 2197 // forward slashes. References don't have any restrictions. 2198 const nsPathRegExp = /^([\w_\/-]+)::(.+)$/; 2199 const hydratedIslands = new WeakSet(); 2200 2201 /** 2202 * Recursive function that transforms a DOM tree into vDOM. 2203 * 2204 * @param root The root element or node to start traversing on. 2205 * @return The resulting vDOM tree. 2206 */ 2207 function toVdom(root) { 2208 const treeWalker = document.createTreeWalker(root, 205 // TEXT + CDATA_SECTION + COMMENT + PROCESSING_INSTRUCTION + ELEMENT 2209 ); 2210 function walk(node) { 2211 const { 2212 nodeType 2213 } = node; 2214 2215 // TEXT_NODE (3) 2216 if (nodeType === 3) { 2217 return [node.data]; 2218 } 2219 2220 // CDATA_SECTION_NODE (4) 2221 if (nodeType === 4) { 2222 var _nodeValue; 2223 const next = treeWalker.nextSibling(); 2224 node.replaceWith(new window.Text((_nodeValue = node.nodeValue) !== null && _nodeValue !== void 0 ? _nodeValue : '')); 2225 return [node.nodeValue, next]; 2226 } 2227 2228 // COMMENT_NODE (8) || PROCESSING_INSTRUCTION_NODE (7) 2229 if (nodeType === 8 || nodeType === 7) { 2230 const next = treeWalker.nextSibling(); 2231 node.remove(); 2232 return [null, next]; 2233 } 2234 const elementNode = node; 2235 const { 2236 attributes 2237 } = elementNode; 2238 const localName = elementNode.localName; 2239 const props = {}; 2240 const children = []; 2241 const directives = []; 2242 let ignore = false; 2243 let island = false; 2244 for (let i = 0; i < attributes.length; i++) { 2245 const attributeName = attributes[i].name; 2246 const attributeValue = attributes[i].value; 2247 if (attributeName[fullPrefix.length] && attributeName.slice(0, fullPrefix.length) === fullPrefix) { 2248 if (attributeName === ignoreAttr) { 2249 ignore = true; 2250 } else { 2251 var _regexResult$, _regexResult$2; 2252 const regexResult = nsPathRegExp.exec(attributeValue); 2253 const namespace = (_regexResult$ = regexResult?.[1]) !== null && _regexResult$ !== void 0 ? _regexResult$ : null; 2254 let value = (_regexResult$2 = regexResult?.[2]) !== null && _regexResult$2 !== void 0 ? _regexResult$2 : attributeValue; 2255 try { 2256 const parsedValue = JSON.parse(value); 2257 value = isObject(parsedValue) ? parsedValue : value; 2258 } catch {} 2259 if (attributeName === islandAttr) { 2260 island = true; 2261 const islandNamespace = 2262 // eslint-disable-next-line no-nested-ternary 2263 typeof value === 'string' ? value : typeof value?.namespace === 'string' ? value.namespace : null; 2264 namespaces.push(islandNamespace); 2265 } else { 2266 directives.push([attributeName, namespace, value]); 2267 } 2268 } 2269 } else if (attributeName === 'ref') { 2270 continue; 2271 } 2272 props[attributeName] = attributeValue; 2273 } 2274 if (ignore && !island) { 2275 return [(0,preact_module.h)(localName, { 2276 ...props, 2277 innerHTML: elementNode.innerHTML, 2278 __directives: { 2279 ignore: true 2280 } 2281 })]; 2282 } 2283 if (island) { 2284 hydratedIslands.add(elementNode); 2285 } 2286 if (directives.length) { 2287 props.__directives = directives.reduce((obj, [name, ns, value]) => { 2288 const directiveMatch = directiveParser.exec(name); 2289 if (directiveMatch === null) { 2290 warn(`Found malformed directive name: $name}.`); 2291 return obj; 2292 } 2293 const prefix = directiveMatch[1] || ''; 2294 const suffix = directiveMatch[2] || null; 2295 obj[prefix] = obj[prefix] || []; 2296 obj[prefix].push({ 2297 namespace: ns !== null && ns !== void 0 ? ns : currentNamespace(), 2298 value: value, 2299 suffix 2300 }); 2301 return obj; 2302 }, {}); 2303 } 2304 if (localName === 'template') { 2305 props.content = [...elementNode.content.childNodes].map(childNode => toVdom(childNode)); 2306 } else { 2307 let child = treeWalker.firstChild(); 2308 if (child) { 2309 while (child) { 2310 const [vnode, nextChild] = walk(child); 2311 if (vnode) { 2312 children.push(vnode); 2313 } 2314 child = nextChild || treeWalker.nextSibling(); 2315 } 2316 treeWalker.parentNode(); 2317 } 2318 } 2319 2320 // Restore previous namespace. 2321 if (island) { 2322 namespaces.pop(); 2323 } 2324 return [(0,preact_module.h)(localName, props, children)]; 2325 } 2326 return walk(treeWalker.currentNode); 2327 } 2328 2329 ;// ./node_modules/@wordpress/interactivity/build-module/init.js 2330 /** 2331 * External dependencies 2332 */ 2333 2334 /** 2335 * Internal dependencies 2336 */ 2337 2338 2339 2340 2341 // Keep the same root fragment for each interactive region node. 2342 const regionRootFragments = new WeakMap(); 2343 const getRegionRootFragment = region => { 2344 if (!region.parentElement) { 2345 throw Error('The passed region should be an element with a parent.'); 2346 } 2347 if (!regionRootFragments.has(region)) { 2348 regionRootFragments.set(region, createRootFragment(region.parentElement, region)); 2349 } 2350 return regionRootFragments.get(region); 2351 }; 2352 2353 // Initial vDOM regions associated with its DOM element. 2354 const initialVdom = new WeakMap(); 2355 2356 // Initialize the router with the initial DOM. 2357 const init = async () => { 2358 const nodes = document.querySelectorAll(`[data-$directivePrefix}-interactive]`); 2359 2360 /* 2361 * This `await` with setTimeout is required to apparently ensure that the interactive blocks have their stores 2362 * fully initialized prior to hydrating the blocks. If this is not present, then an error occurs, for example: 2363 * > view.js:46 Uncaught (in promise) ReferenceError: Cannot access 'state' before initialization 2364 * This occurs when splitTask() is implemented with scheduler.yield() as opposed to setTimeout(), as with the former 2365 * split tasks are added to the front of the task queue whereas with the latter they are added to the end of the queue. 2366 */ 2367 await new Promise(resolve => { 2368 setTimeout(resolve, 0); 2369 }); 2370 for (const node of nodes) { 2371 if (!hydratedIslands.has(node)) { 2372 await splitTask(); 2373 const fragment = getRegionRootFragment(node); 2374 const vdom = toVdom(node); 2375 initialVdom.set(node, vdom); 2376 await splitTask(); 2377 (0,preact_module/* hydrate */.Qv)(vdom, fragment); 2378 } 2379 } 2380 }; 2381 2382 ;// ./node_modules/@wordpress/interactivity/build-module/index.js 2383 /** 2384 * External dependencies 2385 */ 2386 2387 2388 2389 /** 2390 * Internal dependencies 2391 */ 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 const requiredConsent = 'I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.'; 2405 const privateApis = lock => { 2406 if (lock === requiredConsent) { 2407 return { 2408 directivePrefix: directivePrefix, 2409 getRegionRootFragment: getRegionRootFragment, 2410 initialVdom: initialVdom, 2411 toVdom: toVdom, 2412 directive: directive, 2413 getNamespace: getNamespace, 2414 h: preact_module.h, 2415 cloneElement: preact_module/* cloneElement */.Ob, 2416 render: preact_module/* render */.XX, 2417 proxifyState: proxifyState, 2418 parseServerData: parseServerData, 2419 populateServerData: populateServerData, 2420 batch: signals_core_module_r 2421 }; 2422 } 2423 throw new Error('Forbidden access.'); 2424 }; 2425 directives(); 2426 init(); 2427 2428 2429 /***/ }), 2430 2431 /***/ 622: 2432 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2433 2434 /* harmony export */ __webpack_require__.d(__webpack_exports__, { 2435 /* harmony export */ FK: () => (/* binding */ k), 2436 /* harmony export */ Ob: () => (/* binding */ G), 2437 /* harmony export */ Qv: () => (/* binding */ E), 2438 /* harmony export */ XX: () => (/* binding */ D), 2439 /* harmony export */ fF: () => (/* binding */ l), 2440 /* harmony export */ h: () => (/* binding */ g), 2441 /* harmony export */ q6: () => (/* binding */ J), 2442 /* harmony export */ uA: () => (/* binding */ x), 2443 /* harmony export */ zO: () => (/* binding */ t) 2444 /* harmony export */ }); 2445 /* unused harmony exports createElement, createRef, toChildArray */ 2446 var n,l,u,t,i,r,o,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 _(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function g(l,u,t){var i,r,o,e={};for(o in u)"key"==o?i=u[o]:"ref"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return m(l,e,i,r,null)}function m(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&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 C(n,l){if(null==l)return n.__?C(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?C(n):null}function S(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 S(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!P.__r++||r!==l.debounceRendering)&&((r=l.debounceRendering)||o)(P)}function P(){var n,u,t,r,o,f,c,s;for(i.sort(e);n=i.shift();)n.__d&&(u=i.length,r=void 0,f=(o=(t=n).__v).__e,c=[],s=[],t.__P&&((r=w({},o)).__v=o.__v+1,l.vnode&&l.vnode(r),j(t.__P,r,o,t.__n,t.__P.namespaceURI,32&o.__u?[f]:null,c,null==f?C(o):f,!!(32&o.__u),s),r.__v=o.__v,r.__.__k[r.__i]=r,z(c,r,s),r.__e!=f&&S(r)),i.length>u&&i.sort(e));P.__r=0}function $(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,d,w,_,g=t&&t.__k||v,m=l.length;for(f=I(u,l,g,f,m),a=0;a<m;a++)null!=(y=u.__k[a])&&(h=-1===y.__i?p:g[y.__i]||p,y.__i=a,_=j(n,y,h,i,r,o,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&V(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!==_?f=_:d&&(f=d.nextSibling),y.__u&=-7);return u.__e=w,f}function I(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&"boolean"!=typeof o&&"function"!=typeof o?(f=r+h,(o=n.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m(null,o,null,null,null):d(o)?m(k,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!==(c=o.__i=L(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null===e.__v?(-1==c&&h--,"function"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=C(e)),q(e,e));return t}function A(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=A(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!u.contains(l)&&(l=C(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,r,o=n.key,e=n.type,f=l[u];if(null===f||f&&o==f.key&&e===f.type&&0==(2&f.__u))return u;if(t>(null!=f&&0==(2&f.__u)?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;){if(i>=0){if((f=l[i])&&0==(2&f.__u)&&o==f.key&&e===f.type)return i;i--}if(r<l.length){if((f=l[r])&&0==(2&f.__u)&&o==f.key&&e===f.type)return r;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 F(n,l,u,t,i){var 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])r=l!=(l=l.replace(f,"$1")),l=l.toLowerCase()in n||"onFocusOut"==l||"onFocusIn"==l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c,n.addEventListener(l,r?a:s,r)):n.removeEventListener(l,r?a:s,r);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 O(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 j(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,g,m,b,C,S,M,P,I,A,H,L,T,F=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l.__b)&&a(u);n:if("function"==typeof F)try{if(b=u.props,C="prototype"in F&&F.prototype.render,S=(a=F.contextType)&&i[a.__c],M=a?S?S.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(C?u.__c=h=new F(b,M):(u.__c=h=new x(b,M),h.constructor=F,h.render=B),S&&S.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=F.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({},h.__s)),w(h.__s,F.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)C&&null==F.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==F.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v)){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)}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,g)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,I=l.__r,A=0,C){for(h.state=h.__s,h.__d=!1,I&&I(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,I&&I(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())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(v,y)),f=$(n,d(L=null!=a&&a.type===k&&null==a.key?a.props.children:a)?L:[L],u,t,i,r,o,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!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f}else for(T=o.length;T--;)_(o[T]);else u.__e=t.__e,u.__k=t.__k;l.__e(n,u,t)}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=N(t.__e,u,t,i,r,o,e,c,s);return(a=l.diffed)&&a(u),128&u.__u?void 0:f}function z(n,u,t){for(var i=0;i<t.length;i++)V(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 N(u,t,i,r,o,e,f,c,s){var a,h,v,y,w,g,m,b=i.props,k=t.props,x=t.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="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(o,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),b=i.props||p,!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;F(u,a,null,w,o)}for(a in k)w=k[a],"children"==a?y=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?g=w:"checked"==a?m=w:c&&"function"!=typeof w||b[a]===w||F(u,a,w,b[a],o);if(h)c||v&&(h.__html===v.__html||h.__html===u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=""),$(u,d(y)?y:[y],t,i,r,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,e,f,e?e[0]:i.__k&&C(i,0),c,s),null!=e)for(a=e.length;a--;)_(e[a]);c||(a="value","progress"==x&&null==g?u.removeAttribute("value"):void 0!==g&&(g!==u[a]||"progress"==x&&!g||"option"==x&&g!==b[a])&&F(u,a,g,b[a],o),a="checked",void 0!==m&&m!==u[a]&&F(u,a,m,b[a],o))}return u}function V(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 q(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||V(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(r=0;r<i.length;r++)i[r]&&q(i[r],u,t||"function"!=typeof n.type);t||_(n.__e),n.__c=n.__=n.__e=void 0}function B(n,l,u){return this.constructor(n,u)}function D(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r="function"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],j(t,u=(!r&&i||t).__k=g(k,null,[u]),o||p,p,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),z(e,u,f)}function E(n,l){D(n,l,E)}function G(l,u,t){var i,r,o,e,f=w({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)"key"==o?i=u[o]:"ref"==o?r=u[o]:f[o]=void 0===u[o]&&void 0!==e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m(l.type,f,i||l.key,r||l.ref,null)}function J(n,l){var u={__c:l="__cC"+h++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l]=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 u.Provider.__=u.Consumer.contextType=u}n=v.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==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=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},P.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=O(!1),a=O(!0),h=0; 2447 2448 2449 /***/ }) 2450 2451 /******/ }); 2452 /************************************************************************/ 2453 /******/ // The module cache 2454 /******/ var __webpack_module_cache__ = {}; 2455 /******/ 2456 /******/ // The require function 2457 /******/ function __webpack_require__(moduleId) { 2458 /******/ // Check if module is in cache 2459 /******/ var cachedModule = __webpack_module_cache__[moduleId]; 2460 /******/ if (cachedModule !== undefined) { 2461 /******/ return cachedModule.exports; 2462 /******/ } 2463 /******/ // Create a new module (and put it into the cache) 2464 /******/ var module = __webpack_module_cache__[moduleId] = { 2465 /******/ // no module.id needed 2466 /******/ // no module.loaded needed 2467 /******/ exports: {} 2468 /******/ }; 2469 /******/ 2470 /******/ // Execute the module function 2471 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 2472 /******/ 2473 /******/ // Return the exports of the module 2474 /******/ return module.exports; 2475 /******/ } 2476 /******/ 2477 /************************************************************************/ 2478 /******/ /* webpack/runtime/define property getters */ 2479 /******/ (() => { 2480 /******/ // define getter functions for harmony exports 2481 /******/ __webpack_require__.d = (exports, definition) => { 2482 /******/ for(var key in definition) { 2483 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 2484 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 2485 /******/ } 2486 /******/ } 2487 /******/ }; 2488 /******/ })(); 2489 /******/ 2490 /******/ /* webpack/runtime/hasOwnProperty shorthand */ 2491 /******/ (() => { 2492 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 2493 /******/ })(); 2494 /******/ 2495 /************************************************************************/ 2496 var __webpack_exports__ = {}; 2497 2498 // EXPORTS 2499 __webpack_require__.d(__webpack_exports__, { 2500 zj: () => (/* reexport */ debug_build_module/* getConfig */.zj), 2501 SD: () => (/* reexport */ debug_build_module/* getContext */.SD), 2502 V6: () => (/* reexport */ debug_build_module/* getElement */.V6), 2503 $K: () => (/* reexport */ debug_build_module/* getServerContext */.$K), 2504 vT: () => (/* reexport */ debug_build_module/* getServerState */.vT), 2505 jb: () => (/* reexport */ debug_build_module/* privateApis */.jb), 2506 yT: () => (/* reexport */ debug_build_module/* splitTask */.yT), 2507 M_: () => (/* reexport */ debug_build_module/* store */.M_), 2508 hb: () => (/* reexport */ debug_build_module/* useCallback */.hb), 2509 vJ: () => (/* reexport */ debug_build_module/* useEffect */.vJ), 2510 ip: () => (/* reexport */ debug_build_module/* useInit */.ip), 2511 Nf: () => (/* reexport */ debug_build_module/* useLayoutEffect */.Nf), 2512 Kr: () => (/* reexport */ debug_build_module/* useMemo */.Kr), 2513 li: () => (/* reexport */ debug_build_module/* useRef */.li), 2514 J0: () => (/* reexport */ debug_build_module/* useState */.J0), 2515 FH: () => (/* reexport */ debug_build_module/* useWatch */.FH), 2516 v4: () => (/* reexport */ debug_build_module/* withScope */.v4) 2517 }); 2518 2519 // EXTERNAL MODULE: ./node_modules/preact/dist/preact.module.js 2520 var debug_preact_module = __webpack_require__(622); 2521 ;// ./node_modules/preact/devtools/dist/devtools.module.js 2522 var debug_i;function debug_t(o,e){return n.__a&&n.__a(e),o}null!=(debug_i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&debug_i.__PREACT_DEVTOOLS__&&debug_i.__PREACT_DEVTOOLS__.attachPreact("10.25.4",debug_preact_module/* options */.fF,{Fragment:debug_preact_module/* Fragment */.FK,Component:debug_preact_module/* Component */.uA}); 2523 2524 ;// ./node_modules/preact/debug/dist/debug.module.js 2525 var debug_debug_module_t={};function debug_r(){debug_debug_module_t={}}function debug_a(e){return e.type===debug_preact_module/* Fragment */.FK?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var debug_debug_module_i=[],debug_s=[];function debug_c(){return debug_debug_module_i.length>0?debug_debug_module_i[debug_debug_module_i.length-1]:null}var debug_l=!0;function debug_u(e){return"function"==typeof e.type&&e.type!=debug_preact_module/* Fragment */.FK}function debug_f(n){for(var e=[n],o=n;null!=o.__o;)e.push(o.__o),o=o.__o;return e.reduce(function(n,e){n+=" in "+debug_a(e);var o=e.__source;return o?n+=" (at "+o.fileName+":"+o.lineNumber+")":debug_l&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),debug_l=!1,n+"\n"},"")}var debug_d="function"==typeof WeakMap;function debug_p(n){var e=[];return n.__k?(n.__k.forEach(function(n){n&&"function"==typeof n.type?e.push.apply(e,debug_p(n)):n&&"string"==typeof n.type&&e.push(n.type)}),e):e}function debug_h(n){return n?"function"==typeof n.type?null==n.__?null!=n.__e&&null!=n.__e.parentNode?n.__e.parentNode.localName:"":debug_h(n.__):n.type:""}var debug_v=debug_preact_module/* Component */.uA.prototype.setState;function debug_y(n){return"table"===n||"tfoot"===n||"tbody"===n||"thead"===n||"td"===n||"tr"===n||"th"===n}debug_preact_module/* Component */.uA.prototype.setState=function(n,e){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+debug_f(debug_c())),debug_v.call(this,n,e)};var debug_m=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,debug_b=debug_preact_module/* Component */.uA.prototype.forceUpdate;function debug_w(n){var e=n.props,o=debug_a(n),t="";for(var r in e)if(e.hasOwnProperty(r)&&"children"!==r){var i=e[r];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),t+=" "+r+"="+JSON.stringify(i)}var s=e.children;return"<"+o+t+(s&&s.length?">..</"+o+">":" />")}debug_preact_module/* Component */.uA.prototype.forceUpdate=function(n){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+debug_f(debug_c())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+debug_f(this.__v)),debug_b.call(this,n)},debug_preact_module/* options */.fF.__m=function(n,e){var o=n.type,t=e.map(function(n){return n&&n.localName}).filter(Boolean);console.error('Expected a DOM node of type "'+o+'" but found "'+t.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+debug_f(n))},function(){!function(){var n=debug_preact_module/* options */.fF.__b,o=debug_preact_module/* options */.fF.diffed,t=debug_preact_module/* options */.fF.__,r=debug_preact_module/* options */.fF.vnode,a=debug_preact_module/* options */.fF.__r;debug_preact_module/* options */.fF.diffed=function(n){debug_u(n)&&debug_s.pop(),debug_debug_module_i.pop(),o&&o(n)},debug_preact_module/* options */.fF.__b=function(e){debug_u(e)&&debug_debug_module_i.push(e),n&&n(e)},debug_preact_module/* options */.fF.__=function(n,e){debug_s=[],t&&t(n,e)},debug_preact_module/* options */.fF.vnode=function(n){n.__o=debug_s.length>0?debug_s[debug_s.length-1]:null,r&&r(n)},debug_preact_module/* options */.fF.__r=function(n){debug_u(n)&&debug_s.push(n),a&&a(n)}}();var n=!1,o=debug_preact_module/* options */.fF.__b,r=debug_preact_module/* options */.fF.diffed,c=debug_preact_module/* options */.fF.vnode,l=debug_preact_module/* options */.fF.__r,v=debug_preact_module/* options */.fF.__e,b=debug_preact_module/* options */.fF.__,g=debug_preact_module/* options */.fF.__h,E=debug_d?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,k=[];debug_preact_module/* options */.fF.__e=function(n,e,o,t){if(e&&e.__c&&"function"==typeof n.then){var r=n;n=new Error("Missing Suspense. The throwing component was: "+debug_a(e));for(var i=e;i;i=i.__)if(i.__c&&i.__c.__c){n=r;break}if(n instanceof Error)throw n}try{(t=t||{}).componentStack=debug_f(e),v(n,e,o,t),"function"!=typeof n.then&&setTimeout(function(){throw n})}catch(n){throw n}},debug_preact_module/* options */.fF.__=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var o;switch(e.nodeType){case 1:case 11:case 9:o=!0;break;default:o=!1}if(!o){var t=debug_a(n);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+e+" instead: render(<"+t+" />, "+e+");")}b&&b(n,e)},debug_preact_module/* options */.fF.__b=function(e){var r=e.type;if(n=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+debug_w(e)+"\n\n"+debug_f(e));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+debug_a(e)+" = "+debug_w(r)+";\n let vnode = <My"+debug_a(e)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+debug_f(e));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==e.ref&&"function"!=typeof e.ref&&"object"!=typeof e.ref&&!("$$typeof"in e))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof e.ref+"] instead\n"+debug_w(e)+"\n\n"+debug_f(e));if("string"==typeof e.type)for(var i in e.props)if("o"===i[0]&&"n"===i[1]&&"function"!=typeof e.props[i]&&null!=e.props[i])throw new Error("Component's \""+i+'" property should be a function, but got ['+typeof e.props[i]+"] instead\n"+debug_w(e)+"\n\n"+debug_f(e));if("function"==typeof e.type&&e.type.propTypes){if("Lazy"===e.type.displayName&&E&&!E.lazyPropTypes.has(e.type)){var s="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var c=e.type();E.lazyPropTypes.set(e.type,!0),console.warn(s+"Component wrapped in lazy() is "+debug_a(c))}catch(n){console.warn(s+"We will log the wrapped component's name once it is loaded.")}}var l=e.props;e.type.__f&&delete(l=function(n,e){for(var o in e)n[o]=e[o];return n}({},l)).ref,function(n,e,o,r,a){Object.keys(n).forEach(function(o){var i;try{i=n[o](e,o,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){i=n}i&&!(i.message in debug_debug_module_t)&&(debug_debug_module_t[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(e.type.propTypes,l,0,debug_a(e),function(){return debug_f(e)})}o&&o(e)};var T,_=0;debug_preact_module/* options */.fF.__r=function(e){l&&l(e),n=!0;var o=e.__c;if(o===T?_++:_=1,_>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+debug_a(e));T=o},debug_preact_module/* options */.fF.__h=function(e,o,t){if(!e||!n)throw new Error("Hook can only be invoked from render methods.");g&&g(e,o,t)};var O=function(n,e){return{get:function(){var o="get"+n+e;k&&k.indexOf(o)<0&&(k.push(o),console.warn("getting vnode."+n+" is deprecated, "+e))},set:function(){var o="set"+n+e;k&&k.indexOf(o)<0&&(k.push(o),console.warn("setting vnode."+n+" is not allowed, "+e))}}},I={nodeName:O("nodeName","use vnode.type"),attributes:O("attributes","use vnode.props"),children:O("children","use vnode.props.children")},M=Object.create({},I);debug_preact_module/* options */.fF.vnode=function(n){var e=n.props;if(null!==n.type&&null!=e&&("__source"in e||"__self"in e)){var o=n.props={};for(var t in e){var r=e[t];"__source"===t?n.__source=r:"__self"===t?n.__self=r:o[t]=r}}n.__proto__=M,c&&c(n)},debug_preact_module/* options */.fF.diffed=function(e){var o,t=e.type,i=e.__;if(e.__k&&e.__k.forEach(function(n){if("object"==typeof n&&n&&void 0===n.type){var o=Object.keys(n).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+o+"}.\n\n"+debug_f(e))}}),e.__c===T&&(_=0),"string"==typeof t&&(debug_y(t)||"p"===t||"a"===t||"button"===t)){var s=debug_h(i);if(""!==s&&debug_y(t))"table"===t&&"td"!==s&&debug_y(s)?(console.log(s,i.__e),console.error("Improper nesting of table. Your <table> should not have a table-node parent."+debug_w(e)+"\n\n"+debug_f(e))):"thead"!==t&&"tfoot"!==t&&"tbody"!==t||"table"===s?"tr"===t&&"thead"!==s&&"tfoot"!==s&&"tbody"!==s?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+debug_w(e)+"\n\n"+debug_f(e)):"td"===t&&"tr"!==s?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+debug_w(e)+"\n\n"+debug_f(e)):"th"===t&&"tr"!==s&&console.error("Improper nesting of table. Your <th> should have a <tr>."+debug_w(e)+"\n\n"+debug_f(e)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+debug_w(e)+"\n\n"+debug_f(e));else if("p"===t){var c=debug_p(e).filter(function(n){return debug_m.test(n)});c.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+c.join(", ")+" as child-elements."+debug_w(e)+"\n\n"+debug_f(e))}else"a"!==t&&"button"!==t||-1!==debug_p(e).indexOf(t)&&console.error("Improper nesting of interactive content. Your <"+t+"> should not have other "+("a"===t?"anchor":"button")+" tags as child-elements."+debug_w(e)+"\n\n"+debug_f(e))}if(n=!1,r&&r(e),null!=e.__k)for(var l=[],u=0;u<e.__k.length;u++){var d=e.__k[u];if(d&&null!=d.key){var v=d.key;if(-1!==l.indexOf(v)){console.error('Following component has two or more children with the same key attribute: "'+v+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+debug_w(e)+"\n\n"+debug_f(e));break}l.push(v)}}if(null!=e.__c&&null!=e.__c.__H){var b=e.__c.__H.__;if(b)for(var g=0;g<b.length;g+=1){var E=b[g];if(E.__H)for(var k=0;k<E.__H.length;k++)if((o=E.__H[k])!=o){var O=debug_a(e);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+g+" in component "+O+" was called with NaN.")}}}}}(); 2526 2527 // EXTERNAL MODULE: ./node_modules/@wordpress/interactivity/build-module/index.js + 18 modules 2528 var debug_build_module = __webpack_require__(380); 2529 ;// ./node_modules/@wordpress/interactivity/build-module/debug.js 2530 /** 2531 * External dependencies 2532 */ 2533 2534 2535 2536 var __webpack_exports__getConfig = __webpack_exports__.zj; 2537 var __webpack_exports__getContext = __webpack_exports__.SD; 2538 var __webpack_exports__getElement = __webpack_exports__.V6; 2539 var __webpack_exports__getServerContext = __webpack_exports__.$K; 2540 var __webpack_exports__getServerState = __webpack_exports__.vT; 2541 var __webpack_exports__privateApis = __webpack_exports__.jb; 2542 var __webpack_exports__splitTask = __webpack_exports__.yT; 2543 var __webpack_exports__store = __webpack_exports__.M_; 2544 var __webpack_exports__useCallback = __webpack_exports__.hb; 2545 var __webpack_exports__useEffect = __webpack_exports__.vJ; 2546 var __webpack_exports__useInit = __webpack_exports__.ip; 2547 var __webpack_exports__useLayoutEffect = __webpack_exports__.Nf; 2548 var __webpack_exports__useMemo = __webpack_exports__.Kr; 2549 var __webpack_exports__useRef = __webpack_exports__.li; 2550 var __webpack_exports__useState = __webpack_exports__.J0; 2551 var __webpack_exports__useWatch = __webpack_exports__.FH; 2552 var __webpack_exports__withScope = __webpack_exports__.v4; 2553 export { __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 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Fri Feb 21 08:20:01 2025 | Cross-referenced by PHPXref |