var ge,m,jt,ft,Q,Ft,Vt,zt,nt,qe,me,Kt,ut,it,ot,Jt,$e={},Me=[],Fr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,We=Array.isArray;function W(e,t){for(var r in t)e[r]=t[r];return e}function ct(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function N(e,t,r){var n,o,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?ge.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ye(e,s,n,o,null)}function ye(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++jt,__i:-1,__u:0};return o==null&&m.vnode!=null&&m.vnode(i),i}function He(e){return e.children}function fe(e,t){this.props=e,this.context=t}function ue(e,t){if(t==null)return e.__?ue(e.__,e.__i+1):null;for(var r;tt&&Q.sort(zt),e=Q.shift(),t=Q.length,Lr(e)}finally{Q.length=Be.__r=0}}function Xt(e,t,r,n,o,i,s,f,c,u,l){var a,_,p,b,P,h,d,v=n&&n.__k||Me,C=t.length;for(c=Ar(r,t,v,c,C),a=0;a0?s=e.__k[i]=ye(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,c=i+_,s.__=e,s.__b=e.__b+1,f=null,(u=s.__i=jr(s,r,c,a))!=-1&&(a--,(f=r[u])&&(f.__u|=2)),f==null||f.__v==null?(u==-1&&(o>l?_--:oc?_--:_++,s.__u|=4))):e.__k[i]=null;if(a)for(i=0;i(l?1:0)){for(o=r-1,i=r+1;o>=0||i=0?o--:i++])!=null&&(2&u.__u)==0&&f==u.key&&c==u.type)return s}return-1}function Lt(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Fr.test(t)?r:r+"px"}function Oe(e,t,r,n,o){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Lt(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Lt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Kt,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r[me]=n[me]:(r[me]=ut,e.addEventListener(t,i?ot:it,i)):e.removeEventListener(t,i?ot:it,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function At(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[qe]==null)t[qe]=ut++;else if(t[qe]0?e:We(e)?e.map(er):W({},e)}function Vr(e,t,r,n,o,i,s,f,c){var u,l,a,_,p,b,P,h=r.props||$e,d=t.props,v=t.type;if(v=="svg"?o="http://www.w3.org/2000/svg":v=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u2&&(f.children=arguments.length>3?ge.call(arguments,2):r),ye(e.type,f,n||e.key,o||e.ref,null)}function rr(e){function t(r){var n,o;return this.getChildContext||(n=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&n.forEach(function(s){s.__e=!0,st(s)})},this.sub=function(i){n.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){n&&n.delete(i),s&&s.call(i)}}),r.children}return t.__c="__cC"+Jt++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}ge=Me.slice,m={__e:function(e,t,r,n){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(f){e=f}throw e}},jt=0,ft=function(e){return e!=null&&e.constructor===void 0},fe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=W({},this.state),typeof e=="function"&&(e=e(W({},r),this.props)),e&&W(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),st(this))},fe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),st(this))},fe.prototype.render=He,Q=[],Vt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zt=function(e,t){return e.__v.__b-t.__v.__b},Be.__r=0,nt=Math.random().toString(8),qe="__d"+nt,me="__a"+nt,Kt=/(PointerCapture)$|Capture$/i,ut=0,it=At(!1),ot=At(!0),Jt=0;var Z,w,ht,nr,we=0,lr=[],x=m,ir=x.__b,or=x.__r,sr=x.diffed,ar=x.__c,fr=x.unmount,ur=x.__;function be(e,t){x.__h&&x.__h(w,e,we||t),we=0;var r=w.__H||(w.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Kr(e){return we=1,Jr(pr,e)}function Jr(e,t,r){var n=be(Z++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):pr(void 0,t),function(f){var c=n.__N?n.__N[0]:n.__[0],u=n.t(c,f);c!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=w,!w.__f)){var o=function(f,c,u){if(!n.__c.__H)return!0;var l=n.__c.__H.__.filter(function(_){return _.__c});if(l.every(function(_){return!_.__N}))return!i||i.call(this,f,c,u);var a=n.__c.props!==f;return l.some(function(_){if(_.__N){var p=_.__[0];_.__=_.__N,_.__N=void 0,p!==_.__[0]&&(a=!0)}}),i&&i.call(this,f,c,u)||a};w.__f=!0;var i=w.shouldComponentUpdate,s=w.componentWillUpdate;w.componentWillUpdate=function(f,c,u){if(this.__e){var l=i;i=void 0,o(f,c,u),i=l}s&&s.call(this,f,c,u)},w.shouldComponentUpdate=o}return n.__N||n.__}function Se(e,t){var r=be(Z++,3);!x.__s&&mt(r.__H,t)&&(r.__=e,r.u=t,w.__H.__h.push(r))}function Le(e,t){var r=be(Z++,4);!x.__s&&mt(r.__H,t)&&(r.__=e,r.u=t,w.__h.push(r))}function j(e){return we=5,V(function(){return{current:e}},[])}function V(e,t){var r=be(Z++,7);return mt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Ae(e,t){return we=8,V(function(){return e},t)}function le(e){var t=w.context[e.__c],r=be(Z++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(w)),t.props.value):e.__}function Qr(){for(var e;e=lr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Fe),t.__h.some(vt),t.__h=[]}catch(r){t.__h=[],x.__e(r,e.__v)}}}x.__b=function(e){w=null,ir&&ir(e)},x.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ur&&ur(e,t)},x.__r=function(e){or&&or(e),Z=0;var t=(w=e.__c).__H;t&&(ht===w?(t.__h=[],w.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Fe),t.__h.some(vt),t.__h=[],Z=0)),ht=w},x.diffed=function(e){sr&&sr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(lr.push(t)!==1&&nr===x.requestAnimationFrame||((nr=x.requestAnimationFrame)||Xr)(Qr)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),ht=w=null},x.__c=function(e,t){t.some(function(r){try{r.__h.some(Fe),r.__h=r.__h.filter(function(n){return!n.__||vt(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],x.__e(n,r.__v)}}),ar&&ar(e,t)},x.unmount=function(e){fr&&fr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{Fe(n)}catch(o){t=o}}),r.__H=void 0,t&&x.__e(t,r.__v))};var cr=typeof requestAnimationFrame=="function";function Xr(e){var t,r=function(){clearTimeout(n),cr&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);cr&&(t=requestAnimationFrame(r))}function Fe(e){var t=w,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),w=t}function vt(e){var t=w;e.__c=e.__(),w=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function pr(e,t){return typeof t=="function"?t(e):t}var Yr=Symbol.for("preact-signals");function Ve(){if(X>1)X--;else{for(var e,t=!1;xe!==void 0;){var r=xe;for(xe=void 0,yt++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&dr(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(yt=0,X--,t)throw e}}function ee(e){if(X>0)return e();X++;try{return e()}finally{Ve()}}var g=void 0;var xe=void 0,X=0,yt=0,je=0;function _r(e){if(g!==void 0){var t=e.n;if(t===void 0||t.t!==g)return t={i:0,S:e,p:g.s,n:void 0,t:g,e:void 0,x:void 0,r:t},g.s!==void 0&&(g.s.n=t),g.s=t,e.n=t,32&g.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=g.s,t.n=void 0,g.s.n=t,g.s=t),t}}function E(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}E.prototype.brand=Yr;E.prototype.h=function(){return!0};E.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};E.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};E.prototype.subscribe=function(e){var t=this;return z(function(){var r=t.value,n=g;g=void 0;try{e(r)}finally{g=n}})};E.prototype.valueOf=function(){return this.value};E.prototype.toString=function(){return this.value+""};E.prototype.toJSON=function(){return this.value};E.prototype.peek=function(){var e=g;g=void 0;try{return this.value}finally{g=e}};Object.defineProperty(E.prototype,"value",{get:function(){var e=_r(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(yt>100)throw new Error("Cycle detected");this.v=e,this.i++,je++,X++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ve()}}}});function D(e){return new E(e)}function dr(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function hr(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function vr(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function pe(e){E.call(this,void 0),this.x=e,this.s=void 0,this.g=je-1,this.f=4}(pe.prototype=new E).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===je))return!0;if(this.g=je,this.f|=1,this.i>0&&!dr(this))return this.f&=-2,!0;var e=g;try{hr(this),g=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return g=e,vr(this),this.f&=-2,!0};pe.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}E.prototype.S.call(this,e)};pe.prototype.U=function(e){if(this.t!==void 0&&(E.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};pe.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(pe.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=_r(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Ee(e){return new pe(e)}function mr(e){var t=e.u;if(e.u=void 0,typeof t=="function"){X++;var r=g;g=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,gt(e),n}finally{g=r,Ve()}}}function gt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,mr(e)}function Zr(e){if(g!==this)throw new Error("Out-of-order effect");vr(this),g=e,this.f&=-2,8&this.f&>(this),Ve()}function Te(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Te.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Te.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,mr(this),hr(this),X++;var e=g;return g=this,Zr.bind(this,e)};Te.prototype.N=function(){2&this.f||(this.f|=2,this.o=xe,xe=this)};Te.prototype.d=function(){this.f|=8,1&this.f||gt(this)};function z(e){var t=new Te(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var bt,wt;function _e(e,t){m[e]=t.bind(null,m[e]||function(){})}function ze(e){wt&&wt(),wt=e&&e.S()}function yr(e){var t=this,r=e.data,n=tn(r);n.value=r;var o=V(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var s;!ft(o.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},Ee(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return o.value}yr.displayName="_st";Object.defineProperties(E.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:yr},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});_e("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof E&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)});_e("__r",function(e,t){ze();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(o){var i;return z(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i})())),bt=n,ze(r),e(t)});_e("__e",function(e,t,r,n){ze(),bt=void 0,e(t,r,n)});_e("diffed",function(e,t){ze(),bt=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var s in i){var f=i[s];f!==void 0&&!(s in n)&&(f.d(),i[s]=void 0)}else r.U=i={};for(var c in n){var u=i[c],l=n[c];u===void 0?(u=en(r,c,l,o),i[c]=u):u.o(l,o)}}}e(t)});function en(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=D(r);return{o:function(s,f){i.value=s,n=f},d:z(function(){var s=i.value.value;n[t]!==s&&(n[t]=s,o?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}_e("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var s=t.__c;if(s){var f=s.__$u;f&&(s.__$u=void 0,f.d())}}e(t)});_e("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});fe.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function tn(e){return V(function(){return D(e)},[])}var Ke=new WeakMap,gr=new WeakMap,St=new WeakMap,rn=new Set([Object,Array]),Je=(e,t,r)=>{if(!te(t))throw Error("This object cannot be proxified.");if(!Ke.has(t)){let n=new Proxy(t,r);Ke.set(t,n),gr.set(n,t),St.set(n,e)}return Ke.get(t)},Qe=e=>Ke.get(e),q=e=>St.get(e),te=e=>typeof e!="object"||e===null?!1:!St.has(e)&&rn.has(e.constructor),wr=e=>gr.get(e);var xt=[],H=()=>xt.slice(-1)[0],F=e=>{xt.push(e)},L=()=>{xt.pop()};var nn=e=>new Promise(t=>{let r=()=>{clearTimeout(n),window.cancelAnimationFrame(o),setTimeout(()=>{e(),t()})},n=setTimeout(r,100),o=window.requestAnimationFrame(r)}),ne=typeof window.scheduler?.yield=="function"?window.scheduler.yield.bind(window.scheduler):()=>new Promise(e=>{setTimeout(e,0)}),br=e=>{let[t]=performance.getEntriesByType("navigation");t.domContentLoadedEventStart>0?e():document.addEventListener("DOMContentLoaded",e)};function on(e,t){let r=()=>{},n=z(function(){return r=this.c.bind(this),this.x=e,this.c=t,e()});return{flush:r,dispose:n}}function sn(e){Se(()=>{let t=null,r=!1;return t=on(e,async()=>{t&&!r&&(r=!0,await nn(t.flush),r=!1)}),t.dispose},[])}function $(e){let t=U(),r=H(),n;if(e?.constructor?.name==="GeneratorFunction"?n=async(...i)=>{let s=e(...i),f,c,u;for(;;){F(r),re(t);try{c=u?s.throw(u):s.next(f),u=void 0}catch(l){throw l}finally{K(),L()}try{f=await c.value}catch(l){u=l}if(c.done){if(u)throw u;break}}return f}:n=(...i)=>{F(r),re(t);try{return e(...i)}finally{L(),K()}},e.sync){let i=n;return i.sync=!0,i}return n}function Tt(e){sn($(e))}function O(e){Se($(e),[])}function an(e,t){Se($(e),t)}function fn(e,t){Le($(e),t)}function un(e,t){return Ae($(e),t)}function cn(e,t){return V($(e),t)}var Sr=(e,t)=>{t=[].concat(t);let r=t[t.length-1].nextSibling;function n(o,i){e.insertBefore(o,i||r)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:n,appendChild:n,removeChild(o){e.removeChild(o)},contains(o){e.contains(o)}}};function xr(e){return e.replace(/^-+|-+$/g,"").toLowerCase().replace(/-([a-z])/g,function(t,r){return r.toUpperCase()})}var Pe=e=>{},I=e=>!!(e&&typeof e=="object"&&e.constructor===Object);function ln(e){let t=e;return t.sync=!0,t}var Et=new WeakMap,pn=e=>{let t=()=>!1;return{get(r,n){let o=r[n];return o&&typeof o=="object"?Ie(o,{errorMessage:e}):o},set:t,deleteProperty:t,defineProperty:t}};function Ie(e,t){let r=t?.errorMessage??"Cannot modify read-only object";if(!Et.has(e)){let n=pn(r);Et.set(e,new Proxy(e,n))}return Et.get(e)}var Xe=D(0),Ye=Math.random().toString(36).slice(2);function Y(e){return I(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Y(r)])):Array.isArray(e)?e.map(t=>Y(t)):e}var Pt=[],U=()=>Pt.slice(-1)[0],re=e=>{Pt.push(e)},K=()=>{Pt.pop()};var _n=e=>U().context[e||H()],dn=()=>{let e=U(),t={},{ref:r,attributes:n}=e;return Object.freeze({ref:r.current,attributes:Ie(n,t)})},Ze=D(0);function It(e){let t=U();return It.subscribe=Ze.value,Y(t.serverContext[e||H()])}It.subscribe=0;var hn={},Er=class{owner;computedsByScope;valueSignal;getterSignal;pendingGetter;constructor(e){this.owner=e,this.computedsByScope=new WeakMap}setValue(e){this.update({value:e})}setGetter(e){this.update({get:e})}setPendingGetter(e){this.pendingGetter=e,queueMicrotask(()=>this.consolidateGetter())}consolidateGetter(){let e=this.pendingGetter;e&&(this.pendingGetter=void 0,this.update({get:e}))}getComputed(){let e=U()||hn;if(!this.valueSignal&&!this.getterSignal&&this.update({}),this.pendingGetter&&this.consolidateGetter(),!this.computedsByScope.has(e)){let t=()=>{let r=this.getterSignal?.value;return r?r.call(this.owner):this.valueSignal?.value};F(q(this.owner)),this.computedsByScope.set(e,Ee($(t))),L()}return this.computedsByScope.get(e)}update({get:e,value:t}){this.valueSignal?(t!==this.valueSignal.peek()||e!==this.getterSignal.peek())&&ee(()=>{this.valueSignal.value=t,this.getterSignal.value=e}):(this.valueSignal=D(t),this.getterSignal=D(e))}};var vn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(e=>typeof e=="symbol")),de=new WeakMap,mn=(e,t)=>de.has(e)&&de.get(e).has(t),Ce=(e,t,r)=>{de.has(e)||de.set(e,new Map),t=typeof t=="number"?`${t}`:t;let n=de.get(e);if(!n.has(t)){let o=q(e),i=new Er(e);if(n.set(t,i),r){let{get:s,value:f}=r;s?i.setGetter(s):i.setValue(te(f)?R(o,f):f)}}return n.get(t)},A=new WeakMap,Ct=!1,T=Symbol("PENDING_GETTER"),yn={get(e,t,r){if(Ct||!e.hasOwnProperty(t)&&t in e||typeof t=="symbol"&&vn.has(t))return Reflect.get(e,t,r);let n=Object.getOwnPropertyDescriptor(e,t),i=Ce(r,t,n).getComputed().value;if(i===T)throw T;if(typeof i=="function"){let s=q(r);return(...f)=>{F(s);try{return i.call(r,...f)}finally{L()}}}return i},set(e,t,r,n){F(q(n));try{return Reflect.set(e,t,r,n)}finally{L()}},defineProperty(e,t,r){let n=!(t in e),o=Reflect.defineProperty(e,t,r);if(o){let i=Qe(e),s=Ce(i,t),{get:f,value:c}=r;if(f)s.setGetter(f);else{let u=q(i);s.setValue(te(c)?R(u,c):c)}n&&A.has(e)&&A.get(e).value++,Array.isArray(e)&&de.get(i)?.has("length")&&Ce(i,"length").setValue(e.length)}return o},deleteProperty(e,t){let r=Reflect.deleteProperty(e,t);return r&&(Ce(Qe(e),t).setValue(void 0),A.has(e)&&A.get(e).value++),r},ownKeys(e){return A.has(e)||A.set(e,D(0)),A._=A.get(e).value,Reflect.ownKeys(e)}},R=(e,t)=>Je(e,t,yn),Nt=(e,t)=>{Ct=!0;try{return e[t]}finally{Ct=!1}},kt=(e,t,r=!0)=>{if(!(I(e)&&I(t)))return;let n=!1;for(let o in t){let i=!(o in e);n=n||i;let s=Object.getOwnPropertyDescriptor(t,o),f=Qe(e),c=!!f&&mn(f,o)&&Ce(f,o);if(typeof s.get=="function"||typeof s.set=="function")(r||i)&&(Object.defineProperty(e,o,{...s,configurable:!0,enumerable:!0}),s.get&&c&&c.setPendingGetter(s.get));else if(I(t[o])){let u=Object.getOwnPropertyDescriptor(e,o)?.value;if(i||r&&!I(u)){if(e[o]={},c){let l=q(f);c.setValue(R(l,e[o]))}kt(e[o],t[o],r)}else I(u)&&kt(e[o],t[o],r)}else if((r||i)&&(Object.defineProperty(e,o,s),c)){let{value:u}=s,l=q(f);c.setValue(te(u)?R(l,u):u)}}n&&A.has(e)&&A.get(e).value++},ie=(e,t,r=!0)=>ee(()=>kt(wr(e)||e,t,r));var Tr=new WeakSet,gn={get:(e,t,r)=>{let n=Reflect.get(e,t),o=q(r);if(typeof n>"u"&&Tr.has(r)){let i={};return Reflect.set(e,t,i),ke(o,i,!1)}if(typeof n=="function"){F(o);let i=$(n);return L(),i}return I(n)&&te(n)?ke(o,n,!1):n}},ke=(e,t,r=!0)=>{let n=Je(e,t,gn);return n&&r&&Tr.add(n),n};var Dt=new WeakMap,he=new WeakMap,Pr=new WeakSet,Ir=Reflect.getOwnPropertyDescriptor,wn={get:(e,t)=>{let r=he.get(e),n=e[t];return t in e?n:r[t]},set:(e,t,r)=>{let n=he.get(e),o=t in e||!(t in n)?e:n;return o[t]=r,!0},ownKeys:e=>[...new Set([...Object.keys(he.get(e)),...Object.keys(e)])],getOwnPropertyDescriptor:(e,t)=>Ir(e,t)||Ir(he.get(e),t),has:(e,t)=>Reflect.has(e,t)||Reflect.has(he.get(e),t)},ve=(e,t={})=>{if(Pr.has(e))throw Error("This object cannot be proxified.");if(he.set(e,t),!Dt.has(e)){let r=new Proxy(e,wn);Dt.set(e,r),Pr.add(r)}return Dt.get(e)};var Ne=new Map,Cr=new Map,et=new Map,Ut=new Map,De=new Map,bn=e=>Ut.get(e||H())||{};function Rt(e){let t=e||H();return De.has(t)||De.set(t,{}),Rt.subscribe=Xe.value,Y(De.get(t))}Rt.subscribe=0;var oe="I acknowledge that using a private store means my plugin will inevitably break on the next store release.";function Ue(e,{state:t={},...r}={},{lock:n=!1}={}){if(Ne.has(e)){if(n!==oe&&!et.has(e))et.set(e,n);else{let i=et.get(e);if(!(n===oe||n!==!0&&n===i))throw Error(i?"Cannot unlock a private store with an invalid lock code":"Cannot lock a public store")}let o=Cr.get(e);ie(o,r),ie(o.state,t)}else{n!==oe&&et.set(e,n);let o={state:R(e,I(t)?t:{}),...r},i=ke(e,o);Cr.set(e,o),Ne.set(e,i)}return Ne.get(e)}var Gt=(e=document)=>{let t=e.getElementById("wp-script-module-data-@wordpress/interactivity")??e.getElementById("wp-interactivity-data");if(t?.textContent)try{return JSON.parse(t.textContent)}catch{}return{}},Ot=e=>{De.clear(),Ut.clear(),I(e?.state)&&Object.entries(e.state).forEach(([t,r])=>{let n=Ue(t,{},{lock:oe});ie(n.state,r,!1),De.set(t,r)}),I(e?.config)&&Object.entries(e.config).forEach(([t,r])=>{Ut.set(t,r)}),I(e?.derivedStateClosures)&&Object.entries(e.derivedStateClosures).forEach(([t,r])=>{let n=Ue(t,{},{lock:oe});r.forEach(o=>{let i=o.split("."),s=i.splice(-1,1)[0],f=i.reduce((u,l)=>Nt(u,l),n),c=Object.getOwnPropertyDescriptor(f,s);I(c?.value)&&(f[s]=T)})})};function M(e){return e.suffix!==null}function J(e){return e.suffix===null}var kr=rr({client:{},server:{}}),qt={},Dr={},y=(e,t,{priority:r=10}={})=>{qt[e]=t,Dr[e]=r},Sn=(e,t)=>{if(!t){Pe(`Namespace missing for "${e}". The value for that path won't be resolved.`);return}let r=Ne.get(t);typeof r>"u"&&(r=Ue(t,{},{lock:oe}));let n={...r,context:U().context[t]};try{return e.split(".").reduce((i,s)=>i[s],n)}catch(o){if(o===T)return T}},$t=({scope:e})=>((t,...r)=>{let{value:n,namespace:o}=t;if(typeof n!="string")throw new Error("The `value` prop should be a string path");let i=n[0]==="!"&&!!(n=n.slice(1));re(e);let s=Sn(n,o);if(typeof s=="function"){if(i){Pe("Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead.");let u=!s(...r);return K(),u}K();let c=(...u)=>{re(e);let l=s(...u);return K(),l};if(s.sync){let u=c;u.sync=!0}return c}let f=s;return K(),i&&s!==T?!f:f}),xn=e=>{let t=Object.keys(e).reduce((r,n)=>{if(qt[n]){let o=Dr[n];(r[o]=r[o]||[]).push(n)}return r},{});return Object.entries(t).sort(([r],[n])=>parseInt(r)-parseInt(n)).map(([,r])=>r)},Ur=({directives:e,priorityLevels:[t,...r],element:n,originalProps:o,previousScope:i})=>{let s=j({}).current;s.evaluate=Ae($t({scope:s}),[]);let{client:f,server:c}=le(kr);s.context=f,s.serverContext=c,s.ref=i?.ref||j(null),n=ce(n,{ref:s.ref}),s.attributes=n.props;let u=r.length>0?N(Ur,{directives:e,priorityLevels:r,element:n,originalProps:o,previousScope:s}):n,l={...o,children:u},a={directives:e,props:l,element:n,context:kr,evaluate:s.evaluate};re(s);for(let _ of t){let p=qt[_]?.(a);p!==void 0&&(l.children=p)}return K(),l.children},Nr=m.vnode;m.vnode=e=>{if(e.props.__directives){let t=e.props,r=t.__directives;r.key&&(e.key=r.key.find(J).value),delete t.__directives;let n=xn(r);n.length>0&&(e.props={directives:r,priorityLevels:n,originalProps:t,type:e.type,element:N(e.type,t),top:!0},e.type=Ur)}Nr&&Nr(e)};y("bind",({directives:{bind:e},element:t,evaluate:r})=>{e.filter(M).forEach(n=>{if(n.uniqueId)return;let o=n.suffix,i=r(n);i!==T&&(typeof i=="function"&&(i=i()),t.props[o]=i,O(()=>{let s=t.ref.current;if(o==="style"){typeof i=="string"&&(s.style.cssText=i);return}else if(o!=="width"&&o!=="height"&&o!=="href"&&o!=="list"&&o!=="form"&&o!=="tabIndex"&&o!=="download"&&o!=="rowSpan"&&o!=="colSpan"&&o!=="role"&&o!=="popover"&&o in s)try{s[o]=i??"";return}catch{}i!=null&&(i!==!1||o[4]==="-")?s.setAttribute(o,o==="popover"&&i===!0?"":i):s.removeAttribute(o)}))})});y("class",({directives:{class:e},element:t,evaluate:r})=>{e.filter(M).forEach(n=>{let o=n.uniqueId?`${n.suffix}---${n.uniqueId}`:n.suffix,i=r(n);if(i===T)return;typeof i=="function"&&(i=i());let s=t.props.class||"",f=new RegExp(`(^|\\s)${o}(\\s|$)`,"g");i?f.test(s)||(t.props.class=s?`${s} ${o}`:o):t.props.class=s.replace(f," ").trim(),O(()=>{i?t.ref.current.classList.add(o):t.ref.current.classList.remove(o)})})});y("context",({directives:{context:e},props:{children:t},context:r})=>{let n=e.filter(J).reverse();if(!n.length)return;let{Provider:o}=r,{client:i,server:s}=le(r),f=j({}),c={},u={client:{...i},server:{...s}},l=new Set;return n.forEach(({value:a,namespace:_,uniqueId:p})=>{I(a)&&(f.current[_]||(f.current[_]=R(_,{})),ie(f.current[_],Y(a),!1),c[_]=a,l.add(_))}),l.forEach(a=>{u.client[a]=ve(f.current[a],i[a]),u.server[a]=ve(c[a],s[a])}),N(o,{value:u},t)},{priority:5});var En=(e,t,r,n,o)=>{let i={...e.client,[t]:{...e.client[t],[n]:r}},s={...U(),context:i,serverContext:e.server};return o?$t({scope:s})(o):r},Tn=function*(e,t,r,n,o){let{current:i}=j(new Map);for(let s of r){let f=En(e,t,s,n,o);i.has(f)||i.set(f,ve(R(t,{[n]:void 0}),e.client[t])),yield[s,i.get(f),f]}};y("each",({directives:{each:e,"each-key":t},context:r,element:n,evaluate:o})=>{if(n.type!=="template")return;let{Provider:i}=r,s=le(r),[f]=e,{namespace:c,suffix:u,uniqueId:l}=f;if(e.length>1||l)return;let a=o(f);if(a===T||(typeof a=="function"&&(a=a()),typeof a?.[Symbol.iterator]!="function"))return;let _=u?xr(u):"item",p=[],b=Tn(s,c,a,_,t?.[0]);for(let[P,h,d]of b){let v={client:{...s.client,[c]:h},server:{...s.server}};v.client[c][_]=P,p.push(N(i,{value:v,key:d},n.props.content))}return p},{priority:20});y("each-child",({directives:{"each-child":e},element:t,evaluate:r})=>{let n=e.find(J);return n?r(n)===T?t:null:void 0},{priority:1});y("ignore",({element:{type:e,props:{innerHTML:t,...r}}})=>{let n=V(()=>t,[]);return N(e,{dangerouslySetInnerHTML:{__html:n},...r})});y("init",({directives:{init:e},evaluate:t})=>{e.forEach(r=>{O(()=>{let n,o=t(r);return typeof o=="function"&&(o=o()),o})})});function Rr(e){let t={get(r,n,o){let i=r[n];switch(n){case"currentTarget":break;case"preventDefault":case"stopImmediatePropagation":case"stopPropagation":break}return i instanceof Function?function(...s){return i.apply(this===o?r:this,s)}:i}};return new Proxy(e,t)}var Gr=e=>({directives:t,evaluate:r})=>{t[`on-${e}`].filter(M).forEach(n=>{let i=n.suffix.split("--",2)[0];O(()=>{let s=c=>{let u=r(n);typeof u=="function"&&(u?.sync||(c=Rr(c)),u(c))},f=e==="window"?window:document;return f.addEventListener(i,s),()=>f.removeEventListener(i,s)})})},Or=e=>({directives:t,evaluate:r})=>{t[`on-async-${e}`].filter(M).forEach(n=>{let o=n.suffix.split("--",1)[0];O(()=>{let i=async f=>{await ne();let c=r(n);typeof c=="function"&&c(f)},s=e==="window"?window:document;return s.addEventListener(o,i,{passive:!0}),()=>s.removeEventListener(o,i)})})};y("on",({directives:{on:e},element:t,evaluate:r})=>{let n=new Map;e.filter(M).forEach(o=>{let i=o.suffix.split("--",2);n.has(i[0])||n.set(i[0],new Set),n.get(i[0]).add(o)}),n.forEach((o,i)=>{let s=t.props[`on${i}`];t.props[`on${i}`]=f=>{s&&s(f),o.forEach(c=>{let u,l=r(c);typeof l=="function"&&(l?.sync||(f=Rr(f)),l(f))})}})});y("on-async",({directives:{"on-async":e},element:t,evaluate:r})=>{let n=new Map;e.filter(M).forEach(o=>{let i=o.suffix.split("--",1)[0];n.has(i)||n.set(i,new Set),n.get(i).add(o)}),n.forEach((o,i)=>{let s=t.props[`on${i}`];t.props[`on${i}`]=f=>{s&&s(f),o.forEach(async c=>{await ne();let u=r(c);typeof u=="function"&&u(f)})}})});y("on-window",Gr("window"));y("on-document",Gr("document"));y("on-async-window",Or("window"));y("on-async-document",Or("document"));var Re=new Map;y("router-region",({directives:{"router-region":e}})=>{let t=e.find(J);if(!t||t.suffix||t.uniqueId)return;let r=typeof t.value=="string"?t.value:t.value.id;Re.has(r)||Re.set(r,D());let n=Re.get(r).value;if(Le(()=>{n&&typeof n.type!="string"&&(Ze.value=Ze.peek()+1)},[n]),n&&typeof n.type!="string"){let o=U();return ce(n,{previousScope:o})}return n},{priority:1});y("run",({directives:{run:e},evaluate:t})=>{e.forEach(r=>{let n=t(r);return typeof n=="function"&&(n=n()),n})});var Pn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,In=/\/\*[^]*?\*\/| +/g,qr=/\n+/g,$r=" ",Cn=e=>{let t=[{}],r,n;for(;r=Pn.exec(e.replace(In,""));)r[4]?t.shift():r[3]?(n=r[3].replace(qr,$r).trim(),t.unshift(t[0][n]=t[0][n]||{})):t[0][r[1]]=r[2].replace(qr,$r).trim();return t[0]};y("style",({directives:{style:e},element:t,evaluate:r})=>{e.filter(M).forEach(n=>{if(n.uniqueId)return;let o=n.suffix,i=r(n);i!==T&&(typeof i=="function"&&(i=i()),t.props.style=t.props.style||{},typeof t.props.style=="string"&&(t.props.style=Cn(t.props.style)),i?t.props.style[o]=i:delete t.props.style[o],O(()=>{i?t.ref.current.style.setProperty(o,i):t.ref.current.style.removeProperty(o)}))})});y("text",({directives:{text:e},element:t,evaluate:r})=>{let n=e.filter(J);n.length&&n.forEach(o=>{if(!o.uniqueId)try{let i=r(o);if(i===T)return;typeof i=="function"&&(i=i()),t.props.children=typeof i=="object"?null:i.toString()}catch{t.props.children=null}})});y("watch",({directives:{watch:e},evaluate:t})=>{e.forEach(r=>{Tt(()=>{let n,o=t(r);return typeof o=="function"&&(o=o()),o})})});var Mt="data-wp-",tt=[],kn=()=>tt[tt.length-1]??null,Nn=e=>!!(e&&typeof e=="object"&&e.constructor===Object),Dn=/[^a-z0-9-_]/i;function Un(e){let t=e.substring(8);if(Dn.test(t))return null;let r=t.indexOf("--");if(r===-1)return{prefix:t,suffix:null,uniqueId:null};let n=t.substring(0,r),o=t.substring(r);if(o.startsWith("---")&&o[3]!=="-")return{prefix:n,suffix:null,uniqueId:o.substring(3)||null};let i=o.substring(2),s=i.indexOf("---");if(s!==-1&&i.substring(s)[3]!=="-"){let f=i.substring(s+3)||null;return i=i.substring(0,s)||null,{prefix:n,suffix:i,uniqueId:f}}return{prefix:n,suffix:i||null,uniqueId:null}}var Rn=/^([\w_\/-]+)::(.+)$/,Bt=new WeakSet;function Ge(e){let t=new Set,r=new Set,n=document.createTreeWalker(e,205);function o(s){let{nodeType:f}=s;if(f===3)return s.data;if(f===4)return r.add(s),s.nodeValue;if(f===8||f===7)return t.add(s),null;let c=s,{attributes:u}=c,l=c.localName,a={},_=[],p=[],b=!1,P=!1;for(let h=0;h{let k=Un(d);if(k===null)return h;let{prefix:S,suffix:G,uniqueId:se}=k;return h[S]=h[S]||[],h[S].push({namespace:v??kn(),value:C,suffix:G,uniqueId:se}),h},{});for(let h in a.__directives)a.__directives[h].sort((d,v)=>{let C=d.suffix??"",k=v.suffix??"";if(C!==k)return CG)-+(SGe(h));else{let h=n.firstChild();if(h){for(;h;){let d=o(h);d&&_.push(d),h=n.nextSibling()}n.parentNode()}}return P&&tt.pop(),N(l,a,_)}let i=o(n.currentNode);return t.forEach(s=>s.remove()),r.forEach(s=>s.replaceWith(new window.Text(s.nodeValue??""))),i}var Wt=new WeakMap,Ht=e=>{let t=Array.isArray(e)?e[0]:e;if(!t.parentElement)throw Error("The passed region should be an element with a parent.");return Wt.has(t)||Wt.set(t,Sr(t.parentElement,e)),Wt.get(t)},Mr=new WeakMap,Br,Wr=new Promise(e=>{Br=e}),Hr=async()=>{let e=document.querySelectorAll("[data-wp-interactive]");for(let t of e)if(!Bt.has(t)){await ne();let r=Ht(t),n=Ge(t);Mr.set(t,n),await ne(),dt(n,r)}Br(Mr)};var Gs=z,Gn="I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.",Os=e=>{if(e===Gn)return{getRegionRootFragment:Ht,initialVdomPromise:Wr,toVdom:Ge,directive:y,getNamespace:H,h:N,cloneElement:ce,render:_t,proxifyState:R,parseServerData:Gt,populateServerData:Ot,batch:ee,routerRegions:Re,deepReadOnly:Ie,navigationSignal:Xe,sessionId:Ye,warn:Pe};throw new Error("Forbidden access.")};Ot(Gt());br(Hr);window.history.replaceState({...window.history.state,wpInteractivityId:Ye},"");window.addEventListener("popstate",e=>{e.state!==null&&e.state?.wpInteractivityId!==Ye&&window.location.reload()});export{bn as getConfig,_n as getContext,dn as getElement,It as getServerContext,Rt as getServerState,Os as privateApis,ne as splitTask,Ue as store,un as useCallback,an as useEffect,O as useInit,fn as useLayoutEffect,cn as useMemo,j as useRef,Kr as useState,Tt as useWatch,Gs as watch,$ as withScope,ln as withSyncEvent}; //# sourceMappingURL=index.min.js.map