(function(St,gt){typeof exports=="object"&&typeof module<"u"?module.exports=gt():typeof define=="function"&&define.amd?define(gt):(St=typeof globalThis<"u"?globalThis:St||self,St.ReactProductSlider=gt())})(this,function(){"use strict";var D1=Object.defineProperty;var N0=St=>{throw TypeError(St)};var z1=(St,gt,Ut)=>gt in St?D1(St,gt,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):St[gt]=Ut;var sl=(St,gt,Ut)=>z1(St,typeof gt!="symbol"?gt+"":gt,Ut),$f=(St,gt,Ut)=>gt.has(St)||N0("Cannot "+Ut);var m=(St,gt,Ut)=>($f(St,gt,"read from private field"),Ut?Ut.call(St):gt.get(St)),W=(St,gt,Ut)=>gt.has(St)?N0("Cannot add the same private member more than once"):gt instanceof WeakSet?gt.add(St):gt.set(St,Ut),w=(St,gt,Ut,ca)=>($f(St,gt,"write to private field"),ca?ca.call(St,Ut):gt.set(St,Ut),Ut),ht=(St,gt,Ut)=>($f(St,gt,"access private method"),Ut);var oc=(St,gt,Ut,ca)=>({set _(dc){w(St,gt,dc,Ut)},get _(){return m(St,gt,ca)}});var fa,Ml,Ga,Yr,Xa,Cl,Va,Gr,ra,Xr,La,Za,Re,oa,ae,Vn,da,Ze,Rl,Vr,We,Lr,Pe,se,ha,Ie,ia,Zr,rl,Ke,Ln,Kr,xt,Ul,Nl,Ka,Ja,jl,ka,$a,Jr,ye,rt,Zn,fe,ya,Fa,Hl,tl,Kn,Wa,Pa,va,ma,xl,Ia,_t,Lu,Ff,Wf,Pf,If,tr,er,lr,j0,kr,Bc;function St(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var gt={exports:{}},Ut={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ca;function dc(){if(ca)return Ut;ca=1;var c=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(f,h,_){var A=null;if(_!==void 0&&(A=""+_),h.key!==void 0&&(A=""+h.key),"key"in h){_={};for(var M in h)M!=="key"&&(_[M]=h[M])}else _=h;return h=_.ref,{$$typeof:c,type:f,key:A,ref:h!==void 0?h:null,props:_}}return Ut.Fragment=i,Ut.jsx=r,Ut.jsxs=r,Ut}var hc={exports:{}},at={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ar;function H0(){if(ar)return at;ar=1;var c=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),A=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),U=Symbol.iterator;function q(y){return y===null||typeof y!="object"?null:(y=U&&y[U]||y["@@iterator"],typeof y=="function"?y:null)}var Q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,Y={};function V(y,N,F){this.props=y,this.context=N,this.refs=Y,this.updater=F||Q}V.prototype.isReactComponent={},V.prototype.setState=function(y,N){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,N,"setState")},V.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function I(){}I.prototype=V.prototype;function P(y,N,F){this.props=y,this.context=N,this.refs=Y,this.updater=F||Q}var nt=P.prototype=new I;nt.constructor=P,Z(nt,V.prototype),nt.isPureReactComponent=!0;var tt=Array.isArray,X={H:null,A:null,T:null,S:null},ot=Object.prototype.hasOwnProperty;function At(y,N,F,J,B,vt){return F=vt.ref,{$$typeof:c,type:y,key:N,ref:F!==void 0?F:null,props:vt}}function bt(y,N){return At(y.type,N,void 0,void 0,void 0,y.props)}function H(y){return typeof y=="object"&&y!==null&&y.$$typeof===c}function ut(y){var N={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(F){return N[F]})}var wt=/\/+/g;function Yt(y,N){return typeof y=="object"&&y!==null&&y.key!=null?ut(""+y.key):N.toString(36)}function Me(){}function re(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(Me,Me):(y.status="pending",y.then(function(N){y.status==="pending"&&(y.status="fulfilled",y.value=N)},function(N){y.status==="pending"&&(y.status="rejected",y.reason=N)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function ne(y,N,F,J,B){var vt=typeof y;(vt==="undefined"||vt==="boolean")&&(y=null);var it=!1;if(y===null)it=!0;else switch(vt){case"bigint":case"string":case"number":it=!0;break;case"object":switch(y.$$typeof){case c:case i:it=!0;break;case j:return it=y._init,ne(it(y._payload),N,F,J,B)}}if(it)return B=B(y),it=J===""?"."+Yt(y,0):J,tt(B)?(F="",it!=null&&(F=it.replace(wt,"$&/")+"/"),ne(B,N,F,"",function(Xt){return Xt})):B!=null&&(H(B)&&(B=bt(B,F+(B.key==null||y&&y.key===B.key?"":(""+B.key).replace(wt,"$&/")+"/")+it)),N.push(B)),1;it=0;var oe=J===""?".":J+":";if(tt(y))for(var Tt=0;Tt>>1,y=x[Ot];if(0>>1;Oth(J,k))Bh(vt,J)?(x[Ot]=vt,x[B]=k,Ot=B):(x[Ot]=J,x[F]=k,Ot=F);else if(Bh(vt,k))x[Ot]=vt,x[B]=k,Ot=B;else break t}}return et}function h(x,et){var k=x.sortIndex-et.sortIndex;return k!==0?k:x.id-et.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var _=performance;c.unstable_now=function(){return _.now()}}else{var A=Date,M=A.now();c.unstable_now=function(){return A.now()-M}}var T=[],p=[],j=1,U=null,q=3,Q=!1,Z=!1,Y=!1,V=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function nt(x){for(var et=r(p);et!==null;){if(et.callback===null)f(p);else if(et.startTime<=x)f(p),et.sortIndex=et.expirationTime,i(T,et);else break;et=r(p)}}function tt(x){if(Y=!1,nt(x),!Z)if(r(T)!==null)Z=!0,re();else{var et=r(p);et!==null&&ne(tt,et.startTime-x)}}var X=!1,ot=-1,At=5,bt=-1;function H(){return!(c.unstable_now()-btx&&H());){var Ot=U.callback;if(typeof Ot=="function"){U.callback=null,q=U.priorityLevel;var y=Ot(U.expirationTime<=x);if(x=c.unstable_now(),typeof y=="function"){U.callback=y,nt(x),et=!0;break e}U===r(T)&&f(T),nt(x)}else f(T);U=r(T)}if(U!==null)et=!0;else{var N=r(p);N!==null&&ne(tt,N.startTime-x),et=!1}}break t}finally{U=null,q=k,Q=!1}et=void 0}}finally{et?wt():X=!1}}}var wt;if(typeof P=="function")wt=function(){P(ut)};else if(typeof MessageChannel<"u"){var Yt=new MessageChannel,Me=Yt.port2;Yt.port1.onmessage=ut,wt=function(){Me.postMessage(null)}}else wt=function(){V(ut,0)};function re(){X||(X=!0,wt())}function ne(x,et){ot=V(function(){x(c.unstable_now())},et)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(x){x.callback=null},c.unstable_continueExecution=function(){Z||Q||(Z=!0,re())},c.unstable_forceFrameRate=function(x){0>x||125Ot?(x.sortIndex=k,i(p,x),r(T)===null&&x===r(p)&&(Y?(I(ot),ot=-1):Y=!0,ne(tt,k-Ot))):(x.sortIndex=y,i(T,x),Z||Q||(Z=!0,re())),x},c.unstable_shouldYield=H,c.unstable_wrapCallback=function(x){var et=q;return function(){var k=q;q=et;try{return x.apply(this,arguments)}finally{q=k}}}}(gc)),gc}var cr;function Q0(){return cr||(cr=1,mc.exports=q0()),mc.exports}var bc={exports:{}},le={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var sr;function B0(){if(sr)return le;sr=1;var c=yc();function i(T){var p="https://react.dev/errors/"+T;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(i){console.error(i)}}return c(),bc.exports=B0(),bc.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var rr;function Y0(){if(rr)return Qn;rr=1;var c=Q0(),i=yc(),r=w0();function f(t){var e="https://react.dev/errors/"+t;if(1)":-1n||d[a]!==g[n]){var z=` `+d[a].replace(" at new "," at ");return t.displayName&&z.includes("")&&(z=z.replace("",t.displayName)),z}while(1<=a&&0<=n);break}}}finally{re=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Me(l):""}function x(t){switch(t.tag){case 26:case 27:case 5:return Me(t.type);case 16:return Me("Lazy");case 13:return Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return t=ne(t.type,!1),t;case 11:return t=ne(t.type.render,!1),t;case 1:return t=ne(t.type,!0),t;default:return""}}function et(t){try{var e="";do e+=x(t),t=t.return;while(t);return e}catch(l){return` Error generating stack: `+l.message+` `+l.stack}}function k(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function Ot(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function y(t){if(k(t)!==t)throw Error(f(188))}function N(t){var e=t.alternate;if(!e){if(e=k(t),e===null)throw Error(f(188));return e!==t?null:t}for(var l=t,a=e;;){var n=l.return;if(n===null)break;var u=n.alternate;if(u===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===l)return y(n),t;if(u===a)return y(n),e;u=u.sibling}throw Error(f(188))}if(l.return!==a.return)l=n,a=u;else{for(var s=!1,o=n.child;o;){if(o===l){s=!0,l=n,a=u;break}if(o===a){s=!0,a=n,l=u;break}o=o.sibling}if(!s){for(o=u.child;o;){if(o===l){s=!0,l=u,a=n;break}if(o===a){s=!0,a=u,l=n;break}o=o.sibling}if(!s)throw Error(f(189))}}if(l.alternate!==a)throw Error(f(190))}if(l.tag!==3)throw Error(f(188));return l.stateNode.current===l?t:e}function F(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=F(t),e!==null)return e;t=t.sibling}return null}var J=Array.isArray,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,vt={pending:!1,data:null,method:null,action:null},it=[],oe=-1;function Tt(t){return{current:t}}function Xt(t){0>oe||(t.current=it[oe],it[oe]=null,oe--)}function Nt(t,e){oe++,it[oe]=t.current,t.current=e}var el=Tt(null),Jn=Tt(null),ql=Tt(null),Wu=Tt(null);function Pu(t,e){switch(Nt(ql,e),Nt(Jn,t),Nt(el,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?c0(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=c0(t),e=s0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Xt(el),Nt(el,e)}function tn(){Xt(el),Xt(Jn),Xt(ql)}function wc(t){t.memoizedState!==null&&Nt(Wu,t);var e=el.current,l=s0(e,t.type);e!==l&&(Nt(Jn,t),Nt(el,l))}function Iu(t){Jn.current===t&&(Xt(el),Xt(Jn)),Wu.current===t&&(Xt(Wu),wu._currentValue=vt)}var Yc=Object.prototype.hasOwnProperty,Gc=c.unstable_scheduleCallback,Xc=c.unstable_cancelCallback,nv=c.unstable_shouldYield,uv=c.unstable_requestPaint,ll=c.unstable_now,iv=c.unstable_getCurrentPriorityLevel,$r=c.unstable_ImmediatePriority,Fr=c.unstable_UserBlockingPriority,ti=c.unstable_NormalPriority,cv=c.unstable_LowPriority,Wr=c.unstable_IdlePriority,sv=c.log,fv=c.unstable_setDisableYieldValue,kn=null,pe=null;function rv(t){if(pe&&typeof pe.onCommitFiberRoot=="function")try{pe.onCommitFiberRoot(kn,t,void 0,(t.current.flags&128)===128)}catch{}}function Ql(t){if(typeof sv=="function"&&fv(t),pe&&typeof pe.setStrictMode=="function")try{pe.setStrictMode(kn,t)}catch{}}var Ee=Math.clz32?Math.clz32:hv,ov=Math.log,dv=Math.LN2;function hv(t){return t>>>=0,t===0?32:31-(ov(t)/dv|0)|0}var ei=128,li=4194304;function ba(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ai(t,e){var l=t.pendingLanes;if(l===0)return 0;var a=0,n=t.suspendedLanes,u=t.pingedLanes,s=t.warmLanes;t=t.finishedLanes!==0;var o=l&134217727;return o!==0?(l=o&~n,l!==0?a=ba(l):(u&=o,u!==0?a=ba(u):t||(s=o&~s,s!==0&&(a=ba(s))))):(o=l&~n,o!==0?a=ba(o):u!==0?a=ba(u):t||(s=l&~s,s!==0&&(a=ba(s)))),a===0?0:e!==0&&e!==a&&!(e&n)&&(n=a&-a,s=e&-e,n>=s||n===32&&(s&4194176)!==0)?e:a}function $n(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function yv(t,e){switch(t){case 1:case 2:case 4:case 8:return e+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pr(){var t=ei;return ei<<=1,!(ei&4194176)&&(ei=128),t}function Ir(){var t=li;return li<<=1,!(li&62914560)&&(li=4194304),t}function Vc(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Fn(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function vv(t,e,l,a,n,u){var s=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var o=t.entanglements,d=t.expirationTimes,g=t.hiddenUpdates;for(l=s&~l;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sv=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),co={},so={};function pv(t){return Yc.call(so,t)?!0:Yc.call(co,t)?!1:Sv.test(t)?so[t]=!0:(co[t]=!0,!1)}function ni(t,e,l){if(pv(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var a=e.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function ui(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function dl(t,e,l,a){if(a===null)t.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+a)}}function Ce(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function fo(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ev(t){var e=fo(t)?"checked":"value",l=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),a=""+t[e];if(!t.hasOwnProperty(e)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var n=l.get,u=l.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(s){a=""+s,u.call(this,s)}}),Object.defineProperty(t,e,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(s){a=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ii(t){t._valueTracker||(t._valueTracker=Ev(t))}function ro(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),a="";return t&&(a=fo(t)?t.checked?"true":"false":t.value),t=a,t!==l?(e.setValue(t),!0):!1}function ci(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var _v=/[\n"\\]/g;function Ue(t){return t.replace(_v,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Kc(t,e,l,a,n,u,s,o){t.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?t.type=s:t.removeAttribute("type"),e!=null?s==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ce(e)):t.value!==""+Ce(e)&&(t.value=""+Ce(e)):s!=="submit"&&s!=="reset"||t.removeAttribute("value"),e!=null?Jc(t,s,Ce(e)):l!=null?Jc(t,s,Ce(l)):a!=null&&t.removeAttribute("value"),n==null&&u!=null&&(t.defaultChecked=!!u),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.name=""+Ce(o):t.removeAttribute("name")}function oo(t,e,l,a,n,u,s,o){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||e!=null))return;l=l!=null?""+Ce(l):"",e=e!=null?""+Ce(e):l,o||e===t.value||(t.value=e),t.defaultValue=e}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=o?t.checked:!!a,t.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(t.name=s)}function Jc(t,e,l){e==="number"&&ci(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function un(t,e,l,a){if(t=t.options,e){e={};for(var n=0;n=au),Oo=" ",Do=!1;function zo(t,e){switch(t){case"keyup":return Fv.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ro(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var rn=!1;function Pv(t,e){switch(t){case"compositionend":return Ro(e);case"keypress":return e.which!==32?null:(Do=!0,Oo);case"textInput":return t=e.data,t===Oo&&Do?null:t;default:return null}}function Iv(t,e){if(rn)return t==="compositionend"||!ns&&zo(t,e)?(t=So(),fi=Ic=wl=null,rn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:l,offset:e-t};t=a}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=qo(l)}}function Bo(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Bo(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function wo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=ci(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=ci(t.document)}return e}function cs(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function cm(t,e){var l=wo(e);e=t.focusedElem;var a=t.selectionRange;if(l!==e&&e&&e.ownerDocument&&Bo(e.ownerDocument.documentElement,e)){if(a!==null&&cs(e)){if(t=a.start,l=a.end,l===void 0&&(l=t),"selectionStart"in e)e.selectionStart=t,e.selectionEnd=Math.min(l,e.value.length);else if(l=(t=e.ownerDocument||document)&&t.defaultView||window,l.getSelection){l=l.getSelection();var n=e.textContent.length,u=Math.min(a.start,n);a=a.end===void 0?u:Math.min(a.end,n),!l.extend&&u>a&&(n=a,a=u,u=n),n=Qo(e,u);var s=Qo(e,a);n&&s&&(l.rangeCount!==1||l.anchorNode!==n.node||l.anchorOffset!==n.offset||l.focusNode!==s.node||l.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),l.removeAllRanges(),u>a?(l.addRange(t),l.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),l.addRange(t)))}}for(t=[],l=e;l=l.parentNode;)l.nodeType===1&&t.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof e.focus=="function"&&e.focus(),e=0;e=document.documentMode,on=null,ss=null,cu=null,fs=!1;function Yo(t,e,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;fs||on==null||on!==ci(a)||(a=on,"selectionStart"in a&&cs(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),cu&&iu(cu,a)||(cu=a,a=Fi(ss,"onSelect"),0>=s,n-=s,hl=1<<32-Ee(e)+n|l<$?(Wt=K,K=null):Wt=K.sibling;var Et=E(b,K,S[$],R);if(Et===null){K===null&&(K=Wt);break}t&&K&&Et.alternate===null&&e(b,K),v=u(Et,v,$),st===null?G=Et:st.sibling=Et,st=Et,K=Wt}if($===S.length)return l(b,K),pt&&Oa(b,$),G;if(K===null){for(;$$?(Wt=K,K=null):Wt=K.sibling;var ua=E(b,K,Et.value,R);if(ua===null){K===null&&(K=Wt);break}t&&K&&ua.alternate===null&&e(b,K),v=u(ua,v,$),st===null?G=ua:st.sibling=ua,st=ua,K=Wt}if(Et.done)return l(b,K),pt&&Oa(b,$),G;if(K===null){for(;!Et.done;$++,Et=S.next())Et=C(b,Et.value,R),Et!==null&&(v=u(Et,v,$),st===null?G=Et:st.sibling=Et,st=Et);return pt&&Oa(b,$),G}for(K=a(K);!Et.done;$++,Et=S.next())Et=D(K,b,$,Et.value,R),Et!==null&&(t&&Et.alternate!==null&&K.delete(Et.key===null?$:Et.key),v=u(Et,v,$),st===null?G=Et:st.sibling=Et,st=Et);return t&&K.forEach(function(O1){return e(b,O1)}),pt&&Oa(b,$),G}function Bt(b,v,S,R){if(typeof S=="object"&&S!==null&&S.type===T&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case A:t:{for(var G=S.key;v!==null;){if(v.key===G){if(G=S.type,G===T){if(v.tag===7){l(b,v.sibling),R=n(v,S.props.children),R.return=b,b=R;break t}}else if(v.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===P&&ad(G)===v.type){l(b,v.sibling),R=n(v,S.props),yu(R,S),R.return=b,b=R;break t}l(b,v);break}else e(b,v);v=v.sibling}S.type===T?(R=qa(S.props.children,b.mode,R,S.key),R.return=b,b=R):(R=Yi(S.type,S.key,S.props,null,b.mode,R),yu(R,S),R.return=b,b=R)}return s(b);case M:t:{for(G=S.key;v!==null;){if(v.key===G)if(v.tag===4&&v.stateNode.containerInfo===S.containerInfo&&v.stateNode.implementation===S.implementation){l(b,v.sibling),R=n(v,S.children||[]),R.return=b,b=R;break t}else{l(b,v);break}else e(b,v);v=v.sibling}R=df(S,b.mode,R),R.return=b,b=R}return s(b);case P:return G=S._init,S=G(S._payload),Bt(b,v,S,R)}if(J(S))return L(b,v,S,R);if(ot(S)){if(G=ot(S),typeof G!="function")throw Error(f(150));return S=G.call(S),lt(b,v,S,R)}if(typeof S.then=="function")return Bt(b,v,Ei(S),R);if(S.$$typeof===Q)return Bt(b,v,Qi(b,S),R);_i(b,S)}return typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint"?(S=""+S,v!==null&&v.tag===6?(l(b,v.sibling),R=n(v,S),R.return=b,b=R):(l(b,v),R=of(S,b.mode,R),R.return=b,b=R),s(b)):l(b,v)}return function(b,v,S,R){try{hu=0;var G=Bt(b,v,S,R);return gn=null,G}catch(K){if(K===ou)throw K;var st=we(29,K,null,b.mode);return st.lanes=R,st.return=b,st}finally{}}}var za=nd(!0),ud=nd(!1),bn=Tt(null),Ti=Tt(0);function id(t,e){t=Ol,Nt(Ti,t),Nt(bn,e),Ol=t|e.baseLanes}function gs(){Nt(Ti,Ol),Nt(bn,bn.current)}function bs(){Ol=Ti.current,Xt(bn),Xt(Ti)}var qe=Tt(null),nl=null;function Gl(t){var e=t.alternate;Nt(Kt,Kt.current&1),Nt(qe,t),nl===null&&(e===null||bn.current!==null||e.memoizedState!==null)&&(nl=t)}function cd(t){if(t.tag===22){if(Nt(Kt,Kt.current),Nt(qe,t),nl===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(nl=t)}}else Xl()}function Xl(){Nt(Kt,Kt.current),Nt(qe,qe.current)}function vl(t){Xt(qe),nl===t&&(nl=null),Xt(Kt)}var Kt=Tt(0);function Ai(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var dm=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,a){t.push(a)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},hm=c.unstable_scheduleCallback,ym=c.unstable_NormalPriority,Jt={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ss(){return{controller:new dm,data:new Map,refCount:0}}function vu(t){t.refCount--,t.refCount===0&&hm(ym,function(){t.controller.abort()})}var mu=null,ps=0,Sn=0,pn=null;function vm(t,e){if(mu===null){var l=mu=[];ps=0,Sn=zf(),pn={status:"pending",value:void 0,then:function(a){l.push(a)}}}return ps++,e.then(sd,sd),e}function sd(){if(--ps===0&&mu!==null){pn!==null&&(pn.status="fulfilled");var t=mu;mu=null,Sn=0,pn=null;for(var e=0;eu?u:8;var s=H.T,o={};H.T=o,Qs(t,!1,e,l);try{var d=n(),g=H.S;if(g!==null&&g(o,d),d!==null&&typeof d=="object"&&typeof d.then=="function"){var z=mm(d,a);Su(t,e,z,De(t))}else Su(t,e,a,De(t))}catch(C){Su(t,e,{then:function(){},status:"rejected",reason:C},De())}finally{B.p=u,H.T=s}}function Em(){}function xs(t,e,l,a){if(t.tag!==5)throw Error(f(476));var n=wd(t).queue;Bd(t,n,e,vt,l===null?Em:function(){return Yd(t),l(a)})}function wd(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:vt,baseState:vt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ml,lastRenderedState:vt},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ml,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Yd(t){var e=wd(t).next.queue;Su(t,e,{},De())}function qs(){return ie(wu)}function Gd(){return Lt().memoizedState}function Xd(){return Lt().memoizedState}function _m(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=De();t=Jl(l);var a=kl(e,t,l);a!==null&&(he(a,e,l),_u(a,e,l)),e={cache:Ss()},t.payload=e;return}e=e.return}}function Tm(t,e,l){var a=De();l={lane:a,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},ji(t)?Ld(e,l):(l=ds(t,e,l,a),l!==null&&(he(l,t,a),Zd(l,e,a)))}function Vd(t,e,l){var a=De();Su(t,e,l,a)}function Su(t,e,l,a){var n={lane:a,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(ji(t))Ld(e,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var s=e.lastRenderedState,o=u(s,l);if(n.hasEagerState=!0,n.eagerState=o,_e(o,s))return mi(t,e,n,0),Mt===null&&vi(),!1}catch{}finally{}if(l=ds(t,e,n,a),l!==null)return he(l,t,a),Zd(l,e,a),!0}return!1}function Qs(t,e,l,a){if(a={lane:2,revertLane:zf(),action:a,hasEagerState:!1,eagerState:null,next:null},ji(t)){if(e)throw Error(f(479))}else e=ds(t,l,a,2),e!==null&&he(e,t,2)}function ji(t){var e=t.alternate;return t===ct||e!==null&&e===ct}function Ld(t,e){En=Di=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Zd(t,e,l){if(l&4194176){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,eo(t,l)}}var ul={readContext:ie,use:Mi,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt};ul.useCacheRefresh=Gt,ul.useMemoCache=Gt,ul.useHostTransitionStatus=Gt,ul.useFormState=Gt,ul.useActionState=Gt,ul.useOptimistic=Gt;var Ca={readContext:ie,use:Mi,useCallback:function(t,e){return ge().memoizedState=[t,e===void 0?null:e],t},useContext:ie,useEffect:Cd,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,Ui(4194308,4,jd.bind(null,e,t),l)},useLayoutEffect:function(t,e){return Ui(4194308,4,t,e)},useInsertionEffect:function(t,e){Ui(4,2,t,e)},useMemo:function(t,e){var l=ge();e=e===void 0?null:e;var a=t();if(Ma){Ql(!0);try{t()}finally{Ql(!1)}}return l.memoizedState=[a,e],a},useReducer:function(t,e,l){var a=ge();if(l!==void 0){var n=l(e);if(Ma){Ql(!0);try{l(e)}finally{Ql(!1)}}}else n=e;return a.memoizedState=a.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=Tm.bind(null,ct,t),[a.memoizedState,t]},useRef:function(t){var e=ge();return t={current:t},e.memoizedState=t},useState:function(t){t=Cs(t);var e=t.queue,l=Vd.bind(null,ct,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:js,useDeferredValue:function(t,e){var l=ge();return Hs(l,t,e)},useTransition:function(){var t=Cs(!1);return t=Bd.bind(null,ct,t.queue,!0,!1),ge().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var a=ct,n=ge();if(pt){if(l===void 0)throw Error(f(407));l=l()}else{if(l=e(),Mt===null)throw Error(f(349));mt&60||yd(a,e,l)}n.memoizedState=l;var u={value:l,getSnapshot:e};return n.queue=u,Cd(md.bind(null,a,u,t),[t]),a.flags|=2048,Tn(9,vd.bind(null,a,u,l,e),{destroy:void 0},null),l},useId:function(){var t=ge(),e=Mt.identifierPrefix;if(pt){var l=yl,a=hl;l=(a&~(1<<32-Ee(a)-1)).toString(32)+l,e=":"+e+"R"+l,l=zi++,0 title"))),ee(u,a,l),u[ue]=t,kt(u),a=u;break t;case"link":var s=b0("link","href",n).get(a+(l.href||""));if(s){for(var o=0;o<\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof a.is=="string"?n.createElement("select",{is:a.is}):n.createElement("select"),a.multiple?t.multiple=!0:a.size&&(t.size=a.size);break;default:t=typeof a.is=="string"?n.createElement(l,{is:a.is}):n.createElement(l)}}t[ue]=e,t[ve]=a;t:for(n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.tag!==27&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break t;for(;n.sibling===null;){if(n.return===null||n.return===e)break t;n=n.return}n.sibling.return=n.return,n=n.sibling}e.stateNode=t;t:switch(ee(t,l,a),l){case"button":case"input":case"select":case"textarea":t=!!a.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&Tl(e)}}return jt(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&Tl(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(f(166));if(t=ql.current,su(e)){if(t=e.stateNode,l=e.memoizedProps,a=null,n=de,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}t[ue]=e,t=!!(t.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||i0(t.nodeValue,l)),t||Da(e)}else t=Pi(t).createTextNode(a),t[ue]=e,e.stateNode=t}return jt(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=su(e),a!==null&&a.dehydrated!==null){if(t===null){if(!n)throw Error(f(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(f(317));n[ue]=e}else fu(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;jt(e),n=!1}else ke!==null&&(pf(ke),ke=null),n=!0;if(!n)return e.flags&256?(vl(e),e):(vl(e),null)}if(vl(e),e.flags&128)return e.lanes=l,e;if(l=a!==null,t=t!==null&&t.memoizedState!==null,l){a=e.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool);var u=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)}return l!==t&&l&&(e.child.flags|=8192),Gi(e,e.updateQueue),jt(e),null;case 4:return tn(),t===null&&Uf(e.stateNode.containerInfo),jt(e),null;case 10:return Sl(e.type),jt(e),null;case 19:if(Xt(Kt),n=e.memoizedState,n===null)return jt(e),null;if(a=(e.flags&128)!==0,u=n.rendering,u===null)if(a)Mu(n,!1);else{if(Qt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(u=Ai(t),u!==null){for(e.flags|=128,Mu(n,!1),t=u.updateQueue,e.updateQueue=t,Gi(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Hh(l,t),l=l.sibling;return Nt(Kt,Kt.current&1|2),e.child}t=t.sibling}n.tail!==null&&ll()>Xi&&(e.flags|=128,a=!0,Mu(n,!1),e.lanes=4194304)}else{if(!a)if(t=Ai(u),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,Gi(e,t),Mu(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!pt)return jt(e),null}else 2*ll()-n.renderingStartTime>Xi&&l!==536870912&&(e.flags|=128,a=!0,Mu(n,!1),e.lanes=4194304);n.isBackwards?(u.sibling=e.child,e.child=u):(t=n.last,t!==null?t.sibling=u:e.child=u,n.last=u)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=ll(),e.sibling=null,t=Kt.current,Nt(Kt,a?t&1|2:t&1),e):(jt(e),null);case 22:case 23:return vl(e),bs(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?l&536870912&&!(e.flags&128)&&(jt(e),e.subtreeFlags&6&&(e.flags|=8192)):jt(e),l=e.updateQueue,l!==null&&Gi(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==l&&(e.flags|=2048),t!==null&&Xt(Ra),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Sl(Jt),jt(e),null;case 25:return null}throw Error(f(156,e.tag))}function Cm(t,e){switch(ys(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Sl(Jt),tn(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Iu(e),null;case 13:if(vl(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(f(340));fu()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Xt(Kt),null;case 4:return tn(),null;case 10:return Sl(e.type),null;case 22:case 23:return vl(e),bs(),t!==null&&Xt(Ra),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Sl(Jt),null;case 25:return null;default:return null}}function Qh(t,e){switch(ys(e),e.tag){case 3:Sl(Jt),tn();break;case 26:case 27:case 5:Iu(e);break;case 4:tn();break;case 13:vl(e);break;case 19:Xt(Kt);break;case 10:Sl(e.type);break;case 22:case 23:vl(e),bs(),t!==null&&Xt(Ra);break;case 24:Sl(Jt)}}var Um={getCacheForType:function(t){var e=ie(Jt),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l}},Nm=typeof WeakMap=="function"?WeakMap:Map,Ht=0,Mt=null,ft=null,mt=0,Ct=0,Oe=null,Al=!1,zn=!1,hf=!1,Ol=0,Qt=0,Il=0,Qa=0,yf=0,Ye=0,Rn=0,Cu=null,il=null,vf=!1,mf=0,Xi=1/0,Vi=null,ta=null,Li=!1,Ba=null,Uu=0,gf=0,bf=null,Nu=0,Sf=null;function De(){if(Ht&2&&mt!==0)return mt&-mt;if(H.T!==null){var t=Sn;return t!==0?t:zf()}return ao()}function Bh(){Ye===0&&(Ye=!(mt&536870912)||pt?Pr():536870912);var t=qe.current;return t!==null&&(t.flags|=32),Ye}function he(t,e,l){(t===Mt&&Ct===2||t.cancelPendingCommit!==null)&&(Mn(t,0),Dl(t,mt,Ye,!1)),Fn(t,l),(!(Ht&2)||t!==Mt)&&(t===Mt&&(!(Ht&2)&&(Qa|=l),Qt===4&&Dl(t,mt,Ye,!1)),cl(t))}function wh(t,e,l){if(Ht&6)throw Error(f(327));var a=!l&&(e&60)===0&&(e&t.expiredLanes)===0||$n(t,e),n=a?xm(t,e):Tf(t,e,!0),u=a;do{if(n===0){zn&&!a&&Dl(t,e,0,!1);break}else if(n===6)Dl(t,e,0,!Al);else{if(l=t.current.alternate,u&&!jm(l)){n=Tf(t,e,!1),u=!1;continue}if(n===2){if(u=e,t.errorRecoveryDisabledLanes&u)var s=0;else s=t.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){e=s;t:{var o=t;n=Cu;var d=o.current.memoizedState.isDehydrated;if(d&&(Mn(o,s).flags|=256),s=Tf(o,s,!1),s!==2){if(hf&&!d){o.errorRecoveryDisabledLanes|=u,Qa|=u,n=4;break t}u=il,il=n,u!==null&&pf(u)}n=s}if(u=!1,n!==2)continue}}if(n===1){Mn(t,0),Dl(t,e,0,!0);break}t:{switch(a=t,n){case 0:case 1:throw Error(f(345));case 4:if((e&4194176)===e){Dl(a,e,Ye,!Al);break t}break;case 2:il=null;break;case 3:case 5:break;default:throw Error(f(329))}if(a.finishedWork=l,a.finishedLanes=e,(e&62914560)===e&&(u=mf+300-ll(),10l?32:l,H.T=null,Ba===null)var u=!1;else{l=bf,bf=null;var s=Ba,o=Uu;if(Ba=null,Uu=0,Ht&6)throw Error(f(331));var d=Ht;if(Ht|=4,Nh(s.current),Mh(s,s.current,o,l),Ht=d,ju(0,!1),pe&&typeof pe.onPostCommitFiberRoot=="function")try{pe.onPostCommitFiberRoot(kn,s)}catch{}u=!0}return u}finally{B.p=n,H.T=a,kh(t,e)}}return!1}function $h(t,e,l){e=je(l,e),e=Ys(t.stateNode,e,2),t=kl(t,e,2),t!==null&&(Fn(t,2),cl(t))}function Rt(t,e,l){if(t.tag===3)$h(t,t,l);else for(;e!==null;){if(e.tag===3){$h(e,t,l);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ta===null||!ta.has(a))){t=je(l,t),l=Pd(2),a=kl(e,l,2),a!==null&&(Id(l,a,e,t),Fn(a,2),cl(a));break}}e=e.return}}function Af(t,e,l){var a=t.pingCache;if(a===null){a=t.pingCache=new Nm;var n=new Set;a.set(e,n)}else n=a.get(e),n===void 0&&(n=new Set,a.set(e,n));n.has(l)||(hf=!0,n.add(l),t=Bm.bind(null,t,e,l),e.then(t,t))}function Bm(t,e,l){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Mt===t&&(mt&l)===l&&(Qt===4||Qt===3&&(mt&62914560)===mt&&300>ll()-mf?!(Ht&2)&&Mn(t,0):yf|=l,Rn===mt&&(Rn=0)),cl(t)}function Fh(t,e){e===0&&(e=Ir()),t=Yl(t,e),t!==null&&(Fn(t,e),cl(t))}function wm(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Fh(t,l)}function Ym(t,e){var l=0;switch(t.tag){case 13:var a=t.stateNode,n=t.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(f(314))}a!==null&&a.delete(e),Fh(t,l)}function Gm(t,e){return Gc(t,e)}var Ji=null,Nn=null,Of=!1,ki=!1,Df=!1,wa=0;function cl(t){t!==Nn&&t.next===null&&(Nn===null?Ji=Nn=t:Nn=Nn.next=t),ki=!0,Of||(Of=!0,Vm(Xm))}function ju(t,e){if(!Df&&ki){Df=!0;do for(var l=!1,a=Ji;a!==null;){if(t!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var s=a.suspendedLanes,o=a.pingedLanes;u=(1<<31-Ee(42|t)+1)-1,u&=n&~(s&~o),u=u&201326677?u&201326677|1:u?u|2:0}u!==0&&(l=!0,Ih(a,u))}else u=mt,u=ai(a,a===Mt?u:0),!(u&3)||$n(a,u)||(l=!0,Ih(a,u));a=a.next}while(l);Df=!1}}function Xm(){ki=Of=!1;var t=0;wa!==0&&(Wm()&&(t=wa),wa=0);for(var e=ll(),l=null,a=Ji;a!==null;){var n=a.next,u=Wh(a,e);u===0?(a.next=null,l===null?Ji=n:l.next=n,n===null&&(Nn=l)):(l=a,(t!==0||u&3)&&(ki=!0)),a=n}ju(t)}function Wh(t,e){for(var l=t.suspendedLanes,a=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0"u"?null:document;function y0(t,e,l){var a=Hn;if(a&&typeof e=="string"&&e){var n=Ue(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),h0.has(n)||(h0.add(n),t={rel:t,crossOrigin:l,href:e},a.querySelector(n)===null&&(e=a.createElement("link"),ee(e,"link",t),kt(e),a.head.appendChild(e)))}}function u1(t){zl.D(t),y0("dns-prefetch",t,null)}function i1(t,e){zl.C(t,e),y0("preconnect",t,e)}function c1(t,e,l){zl.L(t,e,l);var a=Hn;if(a&&t&&e){var n='link[rel="preload"][as="'+Ue(e)+'"]';e==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Ue(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Ue(l.imageSizes)+'"]')):n+='[href="'+Ue(t)+'"]';var u=n;switch(e){case"style":u=xn(t);break;case"script":u=qn(t)}Ge.has(u)||(t=ut({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Ge.set(u,t),a.querySelector(n)!==null||e==="style"&&a.querySelector(qu(u))||e==="script"&&a.querySelector(Qu(u))||(e=a.createElement("link"),ee(e,"link",t),kt(e),a.head.appendChild(e)))}}function s1(t,e){zl.m(t,e);var l=Hn;if(l&&t){var a=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+Ue(a)+'"][href="'+Ue(t)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=qn(t)}if(!Ge.has(u)&&(t=ut({rel:"modulepreload",href:t},e),Ge.set(u,t),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Qu(u)))return}a=l.createElement("link"),ee(a,"link",t),kt(a),l.head.appendChild(a)}}}function f1(t,e,l){zl.S(t,e,l);var a=Hn;if(a&&t){var n=an(a).hoistableStyles,u=xn(t);e=e||"default";var s=n.get(u);if(!s){var o={loading:0,preload:null};if(s=a.querySelector(qu(u)))o.loading=5;else{t=ut({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Ge.get(u))&&Yf(t,l);var d=s=a.createElement("link");kt(d),ee(d,"link",t),d._p=new Promise(function(g,z){d.onload=g,d.onerror=z}),d.addEventListener("load",function(){o.loading|=1}),d.addEventListener("error",function(){o.loading|=2}),o.loading|=4,tc(s,e,a)}s={type:"stylesheet",instance:s,count:1,state:o},n.set(u,s)}}}function r1(t,e){zl.X(t,e);var l=Hn;if(l&&t){var a=an(l).hoistableScripts,n=qn(t),u=a.get(n);u||(u=l.querySelector(Qu(n)),u||(t=ut({src:t,async:!0},e),(e=Ge.get(n))&&Gf(t,e),u=l.createElement("script"),kt(u),ee(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function o1(t,e){zl.M(t,e);var l=Hn;if(l&&t){var a=an(l).hoistableScripts,n=qn(t),u=a.get(n);u||(u=l.querySelector(Qu(n)),u||(t=ut({src:t,async:!0,type:"module"},e),(e=Ge.get(n))&&Gf(t,e),u=l.createElement("script"),kt(u),ee(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function v0(t,e,l,a){var n=(n=ql.current)?Ii(n):null;if(!n)throw Error(f(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=xn(l.href),l=an(n).hoistableStyles,a=l.get(e),a||(a={type:"style",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=xn(l.href);var u=an(n).hoistableStyles,s=u.get(t);if(s||(n=n.ownerDocument||n,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,s),(u=n.querySelector(qu(t)))&&!u._p&&(s.instance=u,s.state.loading=5),Ge.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ge.set(t,l),u||d1(n,t,l,s.state))),e&&a===null)throw Error(f(528,""));return s}if(e&&a!==null)throw Error(f(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=qn(l),l=an(n).hoistableScripts,a=l.get(e),a||(a={type:"script",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(f(444,t))}}function xn(t){return'href="'+Ue(t)+'"'}function qu(t){return'link[rel="stylesheet"]['+t+"]"}function m0(t){return ut({},t,{"data-precedence":t.precedence,precedence:null})}function d1(t,e,l,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),ee(e,"link",l),kt(e),t.head.appendChild(e))}function qn(t){return'[src="'+Ue(t)+'"]'}function Qu(t){return"script[async]"+t}function g0(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+Ue(l.href)+'"]');if(a)return e.instance=a,kt(a),a;var n=ut({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),kt(a),ee(a,"style",n),tc(a,l.precedence,t),e.instance=a;case"stylesheet":n=xn(l.href);var u=t.querySelector(qu(n));if(u)return e.state.loading|=4,e.instance=u,kt(u),u;a=m0(l),(n=Ge.get(n))&&Yf(a,n),u=(t.ownerDocument||t).createElement("link"),kt(u);var s=u;return s._p=new Promise(function(o,d){s.onload=o,s.onerror=d}),ee(u,"link",a),e.state.loading|=4,tc(u,l.precedence,t),e.instance=u;case"script":return u=qn(l.src),(n=t.querySelector(Qu(u)))?(e.instance=n,kt(n),n):(a=l,(n=Ge.get(u))&&(a=ut({},l),Gf(a,n)),t=t.ownerDocument||t,n=t.createElement("script"),kt(n),ee(n,"link",a),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(f(443,e.type))}else e.type==="stylesheet"&&!(e.state.loading&4)&&(a=e.instance,e.state.loading|=4,tc(a,l.precedence,t));return e.instance}function tc(t,e,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,s=0;s title"):null)}function h1(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function p0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}var Bu=null;function y1(){}function v1(t,e,l){if(Bu===null)throw Error(f(475));var a=Bu;if(e.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var n=xn(l.href),u=t.querySelector(qu(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(a.count++,a=lc.bind(a),t.then(a,a)),e.state.loading|=4,e.instance=u,kt(u);return}u=t.ownerDocument||t,l=m0(l),(n=Ge.get(n))&&Yf(l,n),u=u.createElement("link"),kt(u);var s=u;s._p=new Promise(function(o,d){s.onload=o,s.onerror=d}),ee(u,"link",l),e.instance=u}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(e,t),(t=e.state.preload)&&!(e.state.loading&3)&&(a.count++,e=lc.bind(a),t.addEventListener("load",e),t.addEventListener("error",e))}}function m1(){if(Bu===null)throw Error(f(475));var t=Bu;return t.stylesheets&&t.count===0&&Xf(t,t.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(i){console.error(i)}}return c(),vc.exports=Y0(),vc.exports}var X0=G0();const V0=St(X0);var Bn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(c){return this.listeners.add(c),this.onSubscribe(),()=>{this.listeners.delete(c),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sa=typeof window>"u"||"Deno"in globalThis;function ze(){}function L0(c,i){return typeof c=="function"?c(i):c}function Sc(c){return typeof c=="number"&&c>=0&&c!==1/0}function dr(c,i){return Math.max(c+(i||0)-Date.now(),0)}function Ya(c,i){return typeof c=="function"?c(i):c}function Xe(c,i){return typeof c=="function"?c(i):c}function hr(c,i){const{type:r="all",exact:f,fetchStatus:h,predicate:_,queryKey:A,stale:M}=c;if(A){if(f){if(i.queryHash!==pc(A,i.options))return!1}else if(!Yn(i.queryKey,A))return!1}if(r!=="all"){const T=i.isActive();if(r==="active"&&!T||r==="inactive"&&T)return!1}return!(typeof M=="boolean"&&i.isStale()!==M||h&&h!==i.state.fetchStatus||_&&!_(i))}function yr(c,i){const{exact:r,status:f,predicate:h,mutationKey:_}=c;if(_){if(!i.options.mutationKey)return!1;if(r){if(wn(i.options.mutationKey)!==wn(_))return!1}else if(!Yn(i.options.mutationKey,_))return!1}return!(f&&i.state.status!==f||h&&!h(i))}function pc(c,i){return((i==null?void 0:i.queryKeyHashFn)||wn)(c)}function wn(c){return JSON.stringify(c,(i,r)=>_c(r)?Object.keys(r).sort().reduce((f,h)=>(f[h]=r[h],f),{}):r)}function Yn(c,i){return c===i?!0:typeof c!=typeof i?!1:c&&i&&typeof c=="object"&&typeof i=="object"?!Object.keys(i).some(r=>!Yn(c[r],i[r])):!1}function vr(c,i){if(c===i)return c;const r=mr(c)&&mr(i);if(r||_c(c)&&_c(i)){const f=r?c:Object.keys(c),h=f.length,_=r?i:Object.keys(i),A=_.length,M=r?[]:{};let T=0;for(let p=0;p{setTimeout(i,c)})}function Tc(c,i,r){return typeof r.structuralSharing=="function"?r.structuralSharing(c,i):r.structuralSharing!==!1?vr(c,i):i}function K0(c,i,r=0){const f=[...c,i];return r&&f.length>r?f.slice(1):f}function J0(c,i,r=0){const f=[i,...c];return r&&f.length>r?f.slice(0,-1):f}var Ac=Symbol();function br(c,i){return!c.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!c.queryFn||c.queryFn===Ac?()=>Promise.reject(new Error(`Missing queryFn: '${c.queryHash}'`)):c.queryFn}var k0=(Yr=class extends Bn{constructor(){super();W(this,fa);W(this,Ml);W(this,Ga);w(this,Ga,i=>{if(!sa&&window.addEventListener){const r=()=>i();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){m(this,Ml)||this.setEventListener(m(this,Ga))}onUnsubscribe(){var i;this.hasListeners()||((i=m(this,Ml))==null||i.call(this),w(this,Ml,void 0))}setEventListener(i){var r;w(this,Ga,i),(r=m(this,Ml))==null||r.call(this),w(this,Ml,i(f=>{typeof f=="boolean"?this.setFocused(f):this.onFocus()}))}setFocused(i){m(this,fa)!==i&&(w(this,fa,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(r=>{r(i)})}isFocused(){var i;return typeof m(this,fa)=="boolean"?m(this,fa):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},fa=new WeakMap,Ml=new WeakMap,Ga=new WeakMap,Yr),Oc=new k0,$0=(Gr=class extends Bn{constructor(){super();W(this,Xa,!0);W(this,Cl);W(this,Va);w(this,Va,i=>{if(!sa&&window.addEventListener){const r=()=>i(!0),f=()=>i(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",f,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",f)}}})}onSubscribe(){m(this,Cl)||this.setEventListener(m(this,Va))}onUnsubscribe(){var i;this.hasListeners()||((i=m(this,Cl))==null||i.call(this),w(this,Cl,void 0))}setEventListener(i){var r;w(this,Va,i),(r=m(this,Cl))==null||r.call(this),w(this,Cl,i(this.setOnline.bind(this)))}setOnline(i){m(this,Xa)!==i&&(w(this,Xa,i),this.listeners.forEach(f=>{f(i)}))}isOnline(){return m(this,Xa)}},Xa=new WeakMap,Cl=new WeakMap,Va=new WeakMap,Gr),Zu=new $0;function Dc(){let c,i;const r=new Promise((h,_)=>{c=h,i=_});r.status="pending",r.catch(()=>{});function f(h){Object.assign(r,h),delete r.resolve,delete r.reject}return r.resolve=h=>{f({status:"fulfilled",value:h}),c(h)},r.reject=h=>{f({status:"rejected",reason:h}),i(h)},r}function F0(c){return Math.min(1e3*2**c,3e4)}function Sr(c){return(c??"online")==="online"?Zu.isOnline():!0}var pr=class extends Error{constructor(c){super("CancelledError"),this.revert=c==null?void 0:c.revert,this.silent=c==null?void 0:c.silent}};function zc(c){return c instanceof pr}function Er(c){let i=!1,r=0,f=!1,h;const _=Dc(),A=Y=>{var V;f||(q(new pr(Y)),(V=c.abort)==null||V.call(c))},M=()=>{i=!0},T=()=>{i=!1},p=()=>Oc.isFocused()&&(c.networkMode==="always"||Zu.isOnline())&&c.canRun(),j=()=>Sr(c.networkMode)&&c.canRun(),U=Y=>{var V;f||(f=!0,(V=c.onSuccess)==null||V.call(c,Y),h==null||h(),_.resolve(Y))},q=Y=>{var V;f||(f=!0,(V=c.onError)==null||V.call(c,Y),h==null||h(),_.reject(Y))},Q=()=>new Promise(Y=>{var V;h=I=>{(f||p())&&Y(I)},(V=c.onPause)==null||V.call(c)}).then(()=>{var Y;h=void 0,f||(Y=c.onContinue)==null||Y.call(c)}),Z=()=>{if(f)return;let Y;const V=r===0?c.initialPromise:void 0;try{Y=V??c.fn()}catch(I){Y=Promise.reject(I)}Promise.resolve(Y).then(U).catch(I=>{var ot;if(f)return;const P=c.retry??(sa?0:3),nt=c.retryDelay??F0,tt=typeof nt=="function"?nt(r,I):nt,X=P===!0||typeof P=="number"&&rp()?void 0:Q()).then(()=>{i?q(I):Z()})})};return{promise:_,cancel:A,continue:()=>(h==null||h(),_),cancelRetry:M,continueRetry:T,canStart:j,start:()=>(j()?Z():Q().then(Z),_)}}function W0(){let c=[],i=0,r=M=>{M()},f=M=>{M()},h=M=>setTimeout(M,0);const _=M=>{i?c.push(M):h(()=>{r(M)})},A=()=>{const M=c;c=[],M.length&&h(()=>{f(()=>{M.forEach(T=>{r(T)})})})};return{batch:M=>{let T;i++;try{T=M()}finally{i--,i||A()}return T},batchCalls:M=>(...T)=>{_(()=>{M(...T)})},schedule:_,setNotifyFunction:M=>{r=M},setBatchNotifyFunction:M=>{f=M},setScheduler:M=>{h=M}}}var Pt=W0(),_r=(Xr=class{constructor(){W(this,ra)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sc(this.gcTime)&&w(this,ra,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(c){this.gcTime=Math.max(this.gcTime||0,c??(sa?1/0:5*60*1e3))}clearGcTimeout(){m(this,ra)&&(clearTimeout(m(this,ra)),w(this,ra,void 0))}},ra=new WeakMap,Xr),P0=(Vr=class extends _r{constructor(i){super();W(this,Ze);W(this,La);W(this,Za);W(this,Re);W(this,oa);W(this,ae);W(this,Vn);W(this,da);w(this,da,!1),w(this,Vn,i.defaultOptions),this.setOptions(i.options),this.observers=[],w(this,oa,i.client),w(this,Re,m(this,oa).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,w(this,La,I0(this.options)),this.state=i.state??m(this,La),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var i;return(i=m(this,ae))==null?void 0:i.promise}setOptions(i){this.options={...m(this,Vn),...i},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&m(this,Re).remove(this)}setData(i,r){const f=Tc(this.state.data,i,this.options);return ht(this,Ze,Rl).call(this,{data:f,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),f}setState(i,r){ht(this,Ze,Rl).call(this,{type:"setState",state:i,setStateOptions:r})}cancel(i){var f,h;const r=(f=m(this,ae))==null?void 0:f.promise;return(h=m(this,ae))==null||h.cancel(i),r?r.then(ze).catch(ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(m(this,La))}isActive(){return this.observers.some(i=>Xe(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ac||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(i=0){return this.state.isInvalidated||this.state.data===void 0||!dr(this.state.dataUpdatedAt,i)}onFocus(){var r;const i=this.observers.find(f=>f.shouldFetchOnWindowFocus());i==null||i.refetch({cancelRefetch:!1}),(r=m(this,ae))==null||r.continue()}onOnline(){var r;const i=this.observers.find(f=>f.shouldFetchOnReconnect());i==null||i.refetch({cancelRefetch:!1}),(r=m(this,ae))==null||r.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),m(this,Re).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){this.observers.includes(i)&&(this.observers=this.observers.filter(r=>r!==i),this.observers.length||(m(this,ae)&&(m(this,da)?m(this,ae).cancel({revert:!0}):m(this,ae).cancelRetry()),this.scheduleGc()),m(this,Re).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ht(this,Ze,Rl).call(this,{type:"invalidate"})}fetch(i,r){var T,p,j;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(m(this,ae))return m(this,ae).continueRetry(),m(this,ae).promise}if(i&&this.setOptions(i),!this.options.queryFn){const U=this.observers.find(q=>q.options.queryFn);U&&this.setOptions(U.options)}const f=new AbortController,h=U=>{Object.defineProperty(U,"signal",{enumerable:!0,get:()=>(w(this,da,!0),f.signal)})},_=()=>{const U=br(this.options,r),q={client:m(this,oa),queryKey:this.queryKey,meta:this.meta};return h(q),w(this,da,!1),this.options.persister?this.options.persister(U,q,this):U(q)},A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:m(this,oa),state:this.state,fetchFn:_};h(A),(T=this.options.behavior)==null||T.onFetch(A,this),w(this,Za,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=A.fetchOptions)==null?void 0:p.meta))&&ht(this,Ze,Rl).call(this,{type:"fetch",meta:(j=A.fetchOptions)==null?void 0:j.meta});const M=U=>{var q,Q,Z,Y;zc(U)&&U.silent||ht(this,Ze,Rl).call(this,{type:"error",error:U}),zc(U)||((Q=(q=m(this,Re).config).onError)==null||Q.call(q,U,this),(Y=(Z=m(this,Re).config).onSettled)==null||Y.call(Z,this.state.data,U,this)),this.scheduleGc()};return w(this,ae,Er({initialPromise:r==null?void 0:r.initialPromise,fn:A.fetchFn,abort:f.abort.bind(f),onSuccess:U=>{var q,Q,Z,Y;if(U===void 0){M(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(U)}catch(V){M(V);return}(Q=(q=m(this,Re).config).onSuccess)==null||Q.call(q,U,this),(Y=(Z=m(this,Re).config).onSettled)==null||Y.call(Z,U,this.state.error,this),this.scheduleGc()},onError:M,onFail:(U,q)=>{ht(this,Ze,Rl).call(this,{type:"failed",failureCount:U,error:q})},onPause:()=>{ht(this,Ze,Rl).call(this,{type:"pause"})},onContinue:()=>{ht(this,Ze,Rl).call(this,{type:"continue"})},retry:A.options.retry,retryDelay:A.options.retryDelay,networkMode:A.options.networkMode,canRun:()=>!0})),m(this,ae).start()}},La=new WeakMap,Za=new WeakMap,Re=new WeakMap,oa=new WeakMap,ae=new WeakMap,Vn=new WeakMap,da=new WeakMap,Ze=new WeakSet,Rl=function(i){const r=f=>{switch(i.type){case"failed":return{...f,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...f,fetchStatus:"paused"};case"continue":return{...f,fetchStatus:"fetching"};case"fetch":return{...f,...Tr(f.data,this.options),fetchMeta:i.meta??null};case"success":return{...f,data:i.data,dataUpdateCount:f.dataUpdateCount+1,dataUpdatedAt:i.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const h=i.error;return zc(h)&&h.revert&&m(this,Za)?{...m(this,Za),fetchStatus:"idle"}:{...f,error:h,errorUpdateCount:f.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:f.fetchFailureCount+1,fetchFailureReason:h,fetchStatus:"idle",status:"error"};case"invalidate":return{...f,isInvalidated:!0};case"setState":return{...f,...i.state}}};this.state=r(this.state),Pt.batch(()=>{this.observers.forEach(f=>{f.onQueryUpdate()}),m(this,Re).notify({query:this,type:"updated",action:i})})},Vr);function Tr(c,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sr(i.networkMode)?"fetching":"paused",...c===void 0&&{error:null,status:"pending"}}}function I0(c){const i=typeof c.initialData=="function"?c.initialData():c.initialData,r=i!==void 0,f=r?typeof c.initialDataUpdatedAt=="function"?c.initialDataUpdatedAt():c.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:r?f??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var ty=(Lr=class extends Bn{constructor(i={}){super();W(this,We);this.config=i,w(this,We,new Map)}build(i,r,f){const h=r.queryKey,_=r.queryHash??pc(h,r);let A=this.get(_);return A||(A=new P0({client:i,queryKey:h,queryHash:_,options:i.defaultQueryOptions(r),state:f,defaultOptions:i.getQueryDefaults(h)}),this.add(A)),A}add(i){m(this,We).has(i.queryHash)||(m(this,We).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const r=m(this,We).get(i.queryHash);r&&(i.destroy(),r===i&&m(this,We).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){Pt.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return m(this,We).get(i)}getAll(){return[...m(this,We).values()]}find(i){const r={exact:!0,...i};return this.getAll().find(f=>hr(r,f))}findAll(i={}){const r=this.getAll();return Object.keys(i).length>0?r.filter(f=>hr(i,f)):r}notify(i){Pt.batch(()=>{this.listeners.forEach(r=>{r(i)})})}onFocus(){Pt.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){Pt.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},We=new WeakMap,Lr),ey=(Zr=class extends _r{constructor(i){super();W(this,Ie);W(this,Pe);W(this,se);W(this,ha);this.mutationId=i.mutationId,w(this,se,i.mutationCache),w(this,Pe,[]),this.state=i.state||ly(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){m(this,Pe).includes(i)||(m(this,Pe).push(i),this.clearGcTimeout(),m(this,se).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){w(this,Pe,m(this,Pe).filter(r=>r!==i)),this.scheduleGc(),m(this,se).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){m(this,Pe).length||(this.state.status==="pending"?this.scheduleGc():m(this,se).remove(this))}continue(){var i;return((i=m(this,ha))==null?void 0:i.continue())??this.execute(this.state.variables)}async execute(i){var h,_,A,M,T,p,j,U,q,Q,Z,Y,V,I,P,nt,tt,X,ot,At;w(this,ha,Er({fn:()=>this.options.mutationFn?this.options.mutationFn(i):Promise.reject(new Error("No mutationFn found")),onFail:(bt,H)=>{ht(this,Ie,ia).call(this,{type:"failed",failureCount:bt,error:H})},onPause:()=>{ht(this,Ie,ia).call(this,{type:"pause"})},onContinue:()=>{ht(this,Ie,ia).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>m(this,se).canRun(this)}));const r=this.state.status==="pending",f=!m(this,ha).canStart();try{if(!r){ht(this,Ie,ia).call(this,{type:"pending",variables:i,isPaused:f}),await((_=(h=m(this,se).config).onMutate)==null?void 0:_.call(h,i,this));const H=await((M=(A=this.options).onMutate)==null?void 0:M.call(A,i));H!==this.state.context&&ht(this,Ie,ia).call(this,{type:"pending",context:H,variables:i,isPaused:f})}const bt=await m(this,ha).start();return await((p=(T=m(this,se).config).onSuccess)==null?void 0:p.call(T,bt,i,this.state.context,this)),await((U=(j=this.options).onSuccess)==null?void 0:U.call(j,bt,i,this.state.context)),await((Q=(q=m(this,se).config).onSettled)==null?void 0:Q.call(q,bt,null,this.state.variables,this.state.context,this)),await((Y=(Z=this.options).onSettled)==null?void 0:Y.call(Z,bt,null,i,this.state.context)),ht(this,Ie,ia).call(this,{type:"success",data:bt}),bt}catch(bt){try{throw await((I=(V=m(this,se).config).onError)==null?void 0:I.call(V,bt,i,this.state.context,this)),await((nt=(P=this.options).onError)==null?void 0:nt.call(P,bt,i,this.state.context)),await((X=(tt=m(this,se).config).onSettled)==null?void 0:X.call(tt,void 0,bt,this.state.variables,this.state.context,this)),await((At=(ot=this.options).onSettled)==null?void 0:At.call(ot,void 0,bt,i,this.state.context)),bt}finally{ht(this,Ie,ia).call(this,{type:"error",error:bt})}}finally{m(this,se).runNext(this)}}},Pe=new WeakMap,se=new WeakMap,ha=new WeakMap,Ie=new WeakSet,ia=function(i){const r=f=>{switch(i.type){case"failed":return{...f,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...f,isPaused:!0};case"continue":return{...f,isPaused:!1};case"pending":return{...f,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...f,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...f,data:void 0,error:i.error,failureCount:f.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Pt.batch(()=>{m(this,Pe).forEach(f=>{f.onMutationUpdate(i)}),m(this,se).notify({mutation:this,type:"updated",action:i})})},Zr);function ly(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ay=(Kr=class extends Bn{constructor(i={}){super();W(this,rl);W(this,Ke);W(this,Ln);this.config=i,w(this,rl,new Set),w(this,Ke,new Map),w(this,Ln,0)}build(i,r,f){const h=new ey({mutationCache:this,mutationId:++oc(this,Ln)._,options:i.defaultMutationOptions(r),state:f});return this.add(h),h}add(i){m(this,rl).add(i);const r=Ku(i);if(typeof r=="string"){const f=m(this,Ke).get(r);f?f.push(i):m(this,Ke).set(r,[i])}this.notify({type:"added",mutation:i})}remove(i){if(m(this,rl).delete(i)){const r=Ku(i);if(typeof r=="string"){const f=m(this,Ke).get(r);if(f)if(f.length>1){const h=f.indexOf(i);h!==-1&&f.splice(h,1)}else f[0]===i&&m(this,Ke).delete(r)}}this.notify({type:"removed",mutation:i})}canRun(i){const r=Ku(i);if(typeof r=="string"){const f=m(this,Ke).get(r),h=f==null?void 0:f.find(_=>_.state.status==="pending");return!h||h===i}else return!0}runNext(i){var f;const r=Ku(i);if(typeof r=="string"){const h=(f=m(this,Ke).get(r))==null?void 0:f.find(_=>_!==i&&_.state.isPaused);return(h==null?void 0:h.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Pt.batch(()=>{m(this,rl).forEach(i=>{this.notify({type:"removed",mutation:i})}),m(this,rl).clear(),m(this,Ke).clear()})}getAll(){return Array.from(m(this,rl))}find(i){const r={exact:!0,...i};return this.getAll().find(f=>yr(r,f))}findAll(i={}){return this.getAll().filter(r=>yr(i,r))}notify(i){Pt.batch(()=>{this.listeners.forEach(r=>{r(i)})})}resumePausedMutations(){const i=this.getAll().filter(r=>r.state.isPaused);return Pt.batch(()=>Promise.all(i.map(r=>r.continue().catch(ze))))}},rl=new WeakMap,Ke=new WeakMap,Ln=new WeakMap,Kr);function Ku(c){var i;return(i=c.options.scope)==null?void 0:i.id}function Ar(c){return{onFetch:(i,r)=>{var j,U,q,Q,Z;const f=i.options,h=(q=(U=(j=i.fetchOptions)==null?void 0:j.meta)==null?void 0:U.fetchMore)==null?void 0:q.direction,_=((Q=i.state.data)==null?void 0:Q.pages)||[],A=((Z=i.state.data)==null?void 0:Z.pageParams)||[];let M={pages:[],pageParams:[]},T=0;const p=async()=>{let Y=!1;const V=nt=>{Object.defineProperty(nt,"signal",{enumerable:!0,get:()=>(i.signal.aborted?Y=!0:i.signal.addEventListener("abort",()=>{Y=!0}),i.signal)})},I=br(i.options,i.fetchOptions),P=async(nt,tt,X)=>{if(Y)return Promise.reject();if(tt==null&&nt.pages.length)return Promise.resolve(nt);const ot={client:i.client,queryKey:i.queryKey,pageParam:tt,direction:X?"backward":"forward",meta:i.options.meta};V(ot);const At=await I(ot),{maxPages:bt}=i.options,H=X?J0:K0;return{pages:H(nt.pages,At,bt),pageParams:H(nt.pageParams,tt,bt)}};if(h&&_.length){const nt=h==="backward",tt=nt?ny:Or,X={pages:_,pageParams:A},ot=tt(f,X);M=await P(X,ot,nt)}else{const nt=c??_.length;do{const tt=T===0?A[0]??f.initialPageParam:Or(f,M);if(T>0&&tt==null)break;M=await P(M,tt),T++}while(T{var Y,V;return(V=(Y=i.options).persister)==null?void 0:V.call(Y,p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},r)}:i.fetchFn=p}}}function Or(c,{pages:i,pageParams:r}){const f=i.length-1;return i.length>0?c.getNextPageParam(i[f],i,r[f],r):void 0}function ny(c,{pages:i,pageParams:r}){var f;return i.length>0?(f=c.getPreviousPageParam)==null?void 0:f.call(c,i[0],i,r[0],r):void 0}var uy=(Jr=class{constructor(c={}){W(this,xt);W(this,Ul);W(this,Nl);W(this,Ka);W(this,Ja);W(this,jl);W(this,ka);W(this,$a);w(this,xt,c.queryCache||new ty),w(this,Ul,c.mutationCache||new ay),w(this,Nl,c.defaultOptions||{}),w(this,Ka,new Map),w(this,Ja,new Map),w(this,jl,0)}mount(){oc(this,jl)._++,m(this,jl)===1&&(w(this,ka,Oc.subscribe(async c=>{c&&(await this.resumePausedMutations(),m(this,xt).onFocus())})),w(this,$a,Zu.subscribe(async c=>{c&&(await this.resumePausedMutations(),m(this,xt).onOnline())})))}unmount(){var c,i;oc(this,jl)._--,m(this,jl)===0&&((c=m(this,ka))==null||c.call(this),w(this,ka,void 0),(i=m(this,$a))==null||i.call(this),w(this,$a,void 0))}isFetching(c){return m(this,xt).findAll({...c,fetchStatus:"fetching"}).length}isMutating(c){return m(this,Ul).findAll({...c,status:"pending"}).length}getQueryData(c){var r;const i=this.defaultQueryOptions({queryKey:c});return(r=m(this,xt).get(i.queryHash))==null?void 0:r.state.data}ensureQueryData(c){const i=this.defaultQueryOptions(c),r=m(this,xt).build(this,i),f=r.state.data;return f===void 0?this.fetchQuery(c):(c.revalidateIfStale&&r.isStaleByTime(Ya(i.staleTime,r))&&this.prefetchQuery(i),Promise.resolve(f))}getQueriesData(c){return m(this,xt).findAll(c).map(({queryKey:i,state:r})=>{const f=r.data;return[i,f]})}setQueryData(c,i,r){const f=this.defaultQueryOptions({queryKey:c}),h=m(this,xt).get(f.queryHash),_=h==null?void 0:h.state.data,A=L0(i,_);if(A!==void 0)return m(this,xt).build(this,f).setData(A,{...r,manual:!0})}setQueriesData(c,i,r){return Pt.batch(()=>m(this,xt).findAll(c).map(({queryKey:f})=>[f,this.setQueryData(f,i,r)]))}getQueryState(c){var r;const i=this.defaultQueryOptions({queryKey:c});return(r=m(this,xt).get(i.queryHash))==null?void 0:r.state}removeQueries(c){const i=m(this,xt);Pt.batch(()=>{i.findAll(c).forEach(r=>{i.remove(r)})})}resetQueries(c,i){const r=m(this,xt),f={type:"active",...c};return Pt.batch(()=>(r.findAll(c).forEach(h=>{h.reset()}),this.refetchQueries(f,i)))}cancelQueries(c,i={}){const r={revert:!0,...i},f=Pt.batch(()=>m(this,xt).findAll(c).map(h=>h.cancel(r)));return Promise.all(f).then(ze).catch(ze)}invalidateQueries(c,i={}){return Pt.batch(()=>{if(m(this,xt).findAll(c).forEach(f=>{f.invalidate()}),(c==null?void 0:c.refetchType)==="none")return Promise.resolve();const r={...c,type:(c==null?void 0:c.refetchType)??(c==null?void 0:c.type)??"active"};return this.refetchQueries(r,i)})}refetchQueries(c,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},f=Pt.batch(()=>m(this,xt).findAll(c).filter(h=>!h.isDisabled()).map(h=>{let _=h.fetch(void 0,r);return r.throwOnError||(_=_.catch(ze)),h.state.fetchStatus==="paused"?Promise.resolve():_}));return Promise.all(f).then(ze)}fetchQuery(c){const i=this.defaultQueryOptions(c);i.retry===void 0&&(i.retry=!1);const r=m(this,xt).build(this,i);return r.isStaleByTime(Ya(i.staleTime,r))?r.fetch(i):Promise.resolve(r.state.data)}prefetchQuery(c){return this.fetchQuery(c).then(ze).catch(ze)}fetchInfiniteQuery(c){return c.behavior=Ar(c.pages),this.fetchQuery(c)}prefetchInfiniteQuery(c){return this.fetchInfiniteQuery(c).then(ze).catch(ze)}ensureInfiniteQueryData(c){return c.behavior=Ar(c.pages),this.ensureQueryData(c)}resumePausedMutations(){return Zu.isOnline()?m(this,Ul).resumePausedMutations():Promise.resolve()}getQueryCache(){return m(this,xt)}getMutationCache(){return m(this,Ul)}getDefaultOptions(){return m(this,Nl)}setDefaultOptions(c){w(this,Nl,c)}setQueryDefaults(c,i){m(this,Ka).set(wn(c),{queryKey:c,defaultOptions:i})}getQueryDefaults(c){const i=[...m(this,Ka).values()],r={};return i.forEach(f=>{Yn(c,f.queryKey)&&Object.assign(r,f.defaultOptions)}),r}setMutationDefaults(c,i){m(this,Ja).set(wn(c),{mutationKey:c,defaultOptions:i})}getMutationDefaults(c){const i=[...m(this,Ja).values()];let r={};return i.forEach(f=>{Yn(c,f.mutationKey)&&(r={...r,...f.defaultOptions})}),r}defaultQueryOptions(c){if(c._defaulted)return c;const i={...m(this,Nl).queries,...this.getQueryDefaults(c.queryKey),...c,_defaulted:!0};return i.queryHash||(i.queryHash=pc(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Ac&&(i.enabled=!1),i}defaultMutationOptions(c){return c!=null&&c._defaulted?c:{...m(this,Nl).mutations,...(c==null?void 0:c.mutationKey)&&this.getMutationDefaults(c.mutationKey),...c,_defaulted:!0}}clear(){m(this,xt).clear(),m(this,Ul).clear()}},xt=new WeakMap,Ul=new WeakMap,Nl=new WeakMap,Ka=new WeakMap,Ja=new WeakMap,jl=new WeakMap,ka=new WeakMap,$a=new WeakMap,Jr),iy=(kr=class extends Bn{constructor(i,r){super();W(this,_t);W(this,ye);W(this,rt);W(this,Zn);W(this,fe);W(this,ya);W(this,Fa);W(this,Hl);W(this,tl);W(this,Kn);W(this,Wa);W(this,Pa);W(this,va);W(this,ma);W(this,xl);W(this,Ia,new Set);this.options=r,w(this,ye,i),w(this,tl,null),w(this,Hl,Dc()),this.options.experimental_prefetchInRender||m(this,Hl).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(m(this,rt).addObserver(this),Dr(m(this,rt),this.options)?ht(this,_t,Lu).call(this):this.updateResult(),ht(this,_t,If).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rc(m(this,rt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rc(m(this,rt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ht(this,_t,tr).call(this),ht(this,_t,er).call(this),m(this,rt).removeObserver(this)}setOptions(i,r){const f=this.options,h=m(this,rt);if(this.options=m(this,ye).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xe(this.options.enabled,m(this,rt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ht(this,_t,lr).call(this),m(this,rt).setOptions(this.options),f._defaulted&&!Ec(this.options,f)&&m(this,ye).getQueryCache().notify({type:"observerOptionsUpdated",query:m(this,rt),observer:this});const _=this.hasListeners();_&&zr(m(this,rt),h,this.options,f)&&ht(this,_t,Lu).call(this),this.updateResult(r),_&&(m(this,rt)!==h||Xe(this.options.enabled,m(this,rt))!==Xe(f.enabled,m(this,rt))||Ya(this.options.staleTime,m(this,rt))!==Ya(f.staleTime,m(this,rt)))&&ht(this,_t,Ff).call(this);const A=ht(this,_t,Wf).call(this);_&&(m(this,rt)!==h||Xe(this.options.enabled,m(this,rt))!==Xe(f.enabled,m(this,rt))||A!==m(this,xl))&&ht(this,_t,Pf).call(this,A)}getOptimisticResult(i){const r=m(this,ye).getQueryCache().build(m(this,ye),i),f=this.createResult(r,i);return sy(this,f)&&(w(this,fe,f),w(this,Fa,this.options),w(this,ya,m(this,rt).state)),f}getCurrentResult(){return m(this,fe)}trackResult(i,r){const f={};return Object.keys(i).forEach(h=>{Object.defineProperty(f,h,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(h),r==null||r(h),i[h])})}),f}trackProp(i){m(this,Ia).add(i)}getCurrentQuery(){return m(this,rt)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const r=m(this,ye).defaultQueryOptions(i),f=m(this,ye).getQueryCache().build(m(this,ye),r);return f.fetch().then(()=>this.createResult(f,r))}fetch(i){return ht(this,_t,Lu).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),m(this,fe)))}createResult(i,r){var bt;const f=m(this,rt),h=this.options,_=m(this,fe),A=m(this,ya),M=m(this,Fa),p=i!==f?i.state:m(this,Zn),{state:j}=i;let U={...j},q=!1,Q;if(r._optimisticResults){const H=this.hasListeners(),ut=!H&&Dr(i,r),wt=H&&zr(i,f,r,h);(ut||wt)&&(U={...U,...Tr(j.data,i.options)}),r._optimisticResults==="isRestoring"&&(U.fetchStatus="idle")}let{error:Z,errorUpdatedAt:Y,status:V}=U;if(r.select&&U.data!==void 0)if(_&&U.data===(A==null?void 0:A.data)&&r.select===m(this,Kn))Q=m(this,Wa);else try{w(this,Kn,r.select),Q=r.select(U.data),Q=Tc(_==null?void 0:_.data,Q,r),w(this,Wa,Q),w(this,tl,null)}catch(H){w(this,tl,H)}else Q=U.data;if(r.placeholderData!==void 0&&Q===void 0&&V==="pending"){let H;if(_!=null&&_.isPlaceholderData&&r.placeholderData===(M==null?void 0:M.placeholderData))H=_.data;else if(H=typeof r.placeholderData=="function"?r.placeholderData((bt=m(this,Pa))==null?void 0:bt.state.data,m(this,Pa)):r.placeholderData,r.select&&H!==void 0)try{H=r.select(H),w(this,tl,null)}catch(ut){w(this,tl,ut)}H!==void 0&&(V="success",Q=Tc(_==null?void 0:_.data,H,r),q=!0)}m(this,tl)&&(Z=m(this,tl),Q=m(this,Wa),Y=Date.now(),V="error");const I=U.fetchStatus==="fetching",P=V==="pending",nt=V==="error",tt=P&&I,X=Q!==void 0,At={status:V,fetchStatus:U.fetchStatus,isPending:P,isSuccess:V==="success",isError:nt,isInitialLoading:tt,isLoading:tt,data:Q,dataUpdatedAt:U.dataUpdatedAt,error:Z,errorUpdatedAt:Y,failureCount:U.fetchFailureCount,failureReason:U.fetchFailureReason,errorUpdateCount:U.errorUpdateCount,isFetched:U.dataUpdateCount>0||U.errorUpdateCount>0,isFetchedAfterMount:U.dataUpdateCount>p.dataUpdateCount||U.errorUpdateCount>p.errorUpdateCount,isFetching:I,isRefetching:I&&!P,isLoadingError:nt&&!X,isPaused:U.fetchStatus==="paused",isPlaceholderData:q,isRefetchError:nt&&X,isStale:Mc(i,r),refetch:this.refetch,promise:m(this,Hl)};if(this.options.experimental_prefetchInRender){const H=Yt=>{At.status==="error"?Yt.reject(At.error):At.data!==void 0&&Yt.resolve(At.data)},ut=()=>{const Yt=w(this,Hl,At.promise=Dc());H(Yt)},wt=m(this,Hl);switch(wt.status){case"pending":i.queryHash===f.queryHash&&H(wt);break;case"fulfilled":(At.status==="error"||At.data!==wt.value)&&ut();break;case"rejected":(At.status!=="error"||At.error!==wt.reason)&&ut();break}}return At}updateResult(i){const r=m(this,fe),f=this.createResult(m(this,rt),this.options);if(w(this,ya,m(this,rt).state),w(this,Fa,this.options),m(this,ya).data!==void 0&&w(this,Pa,m(this,rt)),Ec(f,r))return;w(this,fe,f);const h={},_=()=>{if(!r)return!0;const{notifyOnChangeProps:A}=this.options,M=typeof A=="function"?A():A;if(M==="all"||!M&&!m(this,Ia).size)return!0;const T=new Set(M??m(this,Ia));return this.options.throwOnError&&T.add("error"),Object.keys(m(this,fe)).some(p=>{const j=p;return m(this,fe)[j]!==r[j]&&T.has(j)})};(i==null?void 0:i.listeners)!==!1&&_()&&(h.listeners=!0),ht(this,_t,j0).call(this,{...h,...i})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ht(this,_t,If).call(this)}},ye=new WeakMap,rt=new WeakMap,Zn=new WeakMap,fe=new WeakMap,ya=new WeakMap,Fa=new WeakMap,Hl=new WeakMap,tl=new WeakMap,Kn=new WeakMap,Wa=new WeakMap,Pa=new WeakMap,va=new WeakMap,ma=new WeakMap,xl=new WeakMap,Ia=new WeakMap,_t=new WeakSet,Lu=function(i){ht(this,_t,lr).call(this);let r=m(this,rt).fetch(this.options,i);return i!=null&&i.throwOnError||(r=r.catch(ze)),r},Ff=function(){ht(this,_t,tr).call(this);const i=Ya(this.options.staleTime,m(this,rt));if(sa||m(this,fe).isStale||!Sc(i))return;const f=dr(m(this,fe).dataUpdatedAt,i)+1;w(this,va,setTimeout(()=>{m(this,fe).isStale||this.updateResult()},f))},Wf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(m(this,rt)):this.options.refetchInterval)??!1},Pf=function(i){ht(this,_t,er).call(this),w(this,xl,i),!(sa||Xe(this.options.enabled,m(this,rt))===!1||!Sc(m(this,xl))||m(this,xl)===0)&&w(this,ma,setInterval(()=>{(this.options.refetchIntervalInBackground||Oc.isFocused())&&ht(this,_t,Lu).call(this)},m(this,xl)))},If=function(){ht(this,_t,Ff).call(this),ht(this,_t,Pf).call(this,ht(this,_t,Wf).call(this))},tr=function(){m(this,va)&&(clearTimeout(m(this,va)),w(this,va,void 0))},er=function(){m(this,ma)&&(clearInterval(m(this,ma)),w(this,ma,void 0))},lr=function(){const i=m(this,ye).getQueryCache().build(m(this,ye),this.options);if(i===m(this,rt))return;const r=m(this,rt);w(this,rt,i),w(this,Zn,i.state),this.hasListeners()&&(r==null||r.removeObserver(this),i.addObserver(this))},j0=function(i){Pt.batch(()=>{i.listeners&&this.listeners.forEach(r=>{r(m(this,fe))}),m(this,ye).getQueryCache().notify({query:m(this,rt),type:"observerResultsUpdated"})})},kr);function cy(c,i){return Xe(i.enabled,c)!==!1&&c.state.data===void 0&&!(c.state.status==="error"&&i.retryOnMount===!1)}function Dr(c,i){return cy(c,i)||c.state.data!==void 0&&Rc(c,i,i.refetchOnMount)}function Rc(c,i,r){if(Xe(i.enabled,c)!==!1){const f=typeof r=="function"?r(c):r;return f==="always"||f!==!1&&Mc(c,i)}return!1}function zr(c,i,r,f){return(c!==i||Xe(f.enabled,c)===!1)&&(!r.suspense||c.state.status!=="error")&&Mc(c,r)}function Mc(c,i){return Xe(i.enabled,c)!==!1&&c.isStaleByTime(Ya(i.staleTime,c))}function sy(c,i){return!Ec(c.getCurrentResult(),i)}var Rr=yt.createContext(void 0),fy=c=>{const i=yt.useContext(Rr);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},ry=({client:c,children:i})=>(yt.useEffect(()=>(c.mount(),()=>{c.unmount()}),[c]),O.jsx(Rr.Provider,{value:c,children:i})),Mr=yt.createContext(!1),oy=()=>yt.useContext(Mr);Mr.Provider;function dy(){let c=!1;return{clearReset:()=>{c=!1},reset:()=>{c=!0},isReset:()=>c}}var hy=yt.createContext(dy()),yy=()=>yt.useContext(hy);function vy(c,i){return typeof c=="function"?c(...i):!!c}function Cr(){}var my=(c,i)=>{(c.suspense||c.throwOnError||c.experimental_prefetchInRender)&&(i.isReset()||(c.retryOnMount=!1))},gy=c=>{yt.useEffect(()=>{c.clearReset()},[c])},by=({result:c,errorResetBoundary:i,throwOnError:r,query:f,suspense:h})=>c.isError&&!i.isReset()&&!c.isFetching&&f&&(h&&c.data===void 0||vy(r,[c.error,f])),Sy=c=>{const i=c.staleTime;c.suspense&&(c.staleTime=typeof i=="function"?(...r)=>Math.max(i(...r),1e3):Math.max(i??1e3,1e3),typeof c.gcTime=="number"&&(c.gcTime=Math.max(c.gcTime,1e3)))},py=(c,i)=>c.isLoading&&c.isFetching&&!i,Ey=(c,i)=>(c==null?void 0:c.suspense)&&i.isPending,Ur=(c,i,r)=>i.fetchOptimistic(c).catch(()=>{r.clearReset()});function _y(c,i,r){var U,q,Q,Z,Y;const f=fy(),h=oy(),_=yy(),A=f.defaultQueryOptions(c);(q=(U=f.getDefaultOptions().queries)==null?void 0:U._experimental_beforeQuery)==null||q.call(U,A),A._optimisticResults=h?"isRestoring":"optimistic",Sy(A),my(A,_),gy(_);const M=!f.getQueryCache().get(A.queryHash),[T]=yt.useState(()=>new i(f,A)),p=T.getOptimisticResult(A),j=!h&&c.subscribed!==!1;if(yt.useSyncExternalStore(yt.useCallback(V=>{const I=j?T.subscribe(Pt.batchCalls(V)):Cr;return T.updateResult(),I},[T,j]),()=>T.getCurrentResult(),()=>T.getCurrentResult()),yt.useEffect(()=>{T.setOptions(A,{listeners:!1})},[A,T]),Ey(A,p))throw Ur(A,T,_);if(by({result:p,errorResetBoundary:_,throwOnError:A.throwOnError,query:f.getQueryCache().get(A.queryHash),suspense:A.suspense}))throw p.error;if((Z=(Q=f.getDefaultOptions().queries)==null?void 0:Q._experimental_afterQuery)==null||Z.call(Q,A,p),A.experimental_prefetchInRender&&!sa&&py(p,h)){const V=M?Ur(A,T,_):(Y=f.getQueryCache().get(A.queryHash))==null?void 0:Y.promise;V==null||V.catch(Cr).finally(()=>{T.updateResult()})}return A.notifyOnChangeProps?p:T.trackResult(p)}function Ty(c,i){return _y(c,iy)}const Ve={wrap:"_wrap_ip60s_1",viewport:"_viewport_ip60s_8",grayBackground:"_grayBackground_ip60s_12",container:"_container_ip60s_25",arrowWrap:"_arrowWrap_ip60s_33",arrowNext:"_arrowNext_ip60s_38",arrowPrev:"_arrowPrev_ip60s_39",disabled:"_disabled_ip60s_83"},be={wrap:"_wrap_1am3e_1",image:"_image_1am3e_17",title:"_title_1am3e_32",content:"_content_1am3e_49",price:"_price_1am3e_65",rental:"_rental_1am3e_73",unit:"_unit_1am3e_80"},Ay={image:"_image_ox479_1"},Oy="https://cdn1.idek.cz/img/2711ac4e3e85e0ac6233b02388095dbb.webp",Nr=({src:c,alt:i,resolutionList:r})=>{c??(c=Oy);const f=[...r],h=f.shift();return O.jsxs("picture",{className:"r-image",children:[f.map(({width:_,height:A,maxWidth:M},T)=>O.jsx("source",{media:M?`(max-width: ${M}px)`:void 0,srcSet:c.replace(".webp",`_ew${_}_eh${A}.webp`),type:"image/webp",width:_,height:A},T)),O.jsx("img",{className:Ay.image,src:c.replace(".webp",`_ew${h==null?void 0:h.width}_eh${h==null?void 0:h.height}.webp`),width:h==null?void 0:h.width,height:h==null?void 0:h.height,alt:i})]})};/*! js-cookie v3.0.5 | MIT */function Ju(c){for(var i=1;i"u")){A=Ju({},i,A),typeof A.expires=="number"&&(A.expires=new Date(Date.now()+A.expires*864e5)),A.expires&&(A.expires=A.expires.toUTCString()),h=encodeURIComponent(h).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var M="";for(var T in A)A[T]&&(M+="; "+T,A[T]!==!0&&(M+="="+A[T].split(";")[0]));return document.cookie=h+"="+c.write(_,h)+M}}function f(h){if(!(typeof document>"u"||arguments.length&&!h)){for(var _=document.cookie?document.cookie.split("; "):[],A={},M=0;M<_.length;M++){var T=_[M].split("="),p=T.slice(1).join("=");try{var j=decodeURIComponent(T[0]);if(A[j]=c.read(p,j),h===j)break}catch{}}return h?A[h]:A}}return Object.create({set:r,get:f,remove:function(h,_){r(h,"",Ju({},_,{expires:-1}))},withAttributes:function(h){return Cc(this.converter,Ju({},this.attributes,h))},withConverter:function(h){return Cc(Ju({},this.converter,h),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(c)}})}var Uc=Cc(Dy,{path:"/"});class zy{constructor(i){sl(this,"response");this.response=i}toJson(){return Ny(this.response),this.response.json()}}class Nc extends Error{constructor(r){super("ErrorClient");sl(this,"response");sl(this,"status");this.name="ErrorClient",this.response=r,this.status=r.status}}class jc extends Error{constructor(r){super("ErrorServer");sl(this,"response");sl(this,"status");this.name="ErrorServer",this.response=r,this.status=r.status}}const jr=c=>async function(r,f={}){const h=Cy(c,r,f.search);f=Uy(f);const _=await fetch(h.toString(),f);return new zy(_)};function Ry(){const c=Uc.get("dek_eshop_token");if(!c)throw new Error("DEK Eshop token was not found.");return new Headers({Authorization:"Bearer "+c})}function My(){const c=Uc.get("dek_config");if(!c)throw new Error("DEK Config was not found.");const i=atob(c);return JSON.parse(i)}function Cy(c=void 0,i,r=void 0){const f=My(),h=c?f.api.hasOwnProperty(c)?f.api[c]:c:f.api.base,_=new URL(h+i);return r&&(_.search=r.toString()),_}function Uy(c){const i={...c},r=new Headers(i.headers);return i.headers=Ry(),r.forEach((f,h)=>{var _;(_=i.headers)==null||_.set(h,f)}),i}function Ny(c){if(!c.ok&&c.status>=500)throw new jc(c);if(!c.ok&&c.status>=400&&c.status<500)throw new Nc(c);return c}const ga=class ga{};sl(ga,"add",({message:i,type:r})=>{dispatchEvent(new CustomEvent("ES_ADD_MESSAGE_FLASH",{detail:{message:i,type:r}}))}),sl(ga,"addByError",i=>{const r=i;console.error(r),r instanceof Nc||r instanceof jc?(r instanceof Nc&&ga.add({message:`Nastala neočekávaná klientská chyba. (${r.status})`,type:"error"}),r instanceof jc&&ga.add({message:`Nastala neočekávaná serverová chyba. (${r.status})`,type:"error"})):ga.add({message:"Nastala neočekávaná chyba.",type:"error"})});let Gn=ga;const ku={async getProductEshopByCode(c,i){if(Array.isArray(c)||(c=[c]),c.length===0)return[];const r=jr(),f=new URLSearchParams;for(const h of c)f.append("codes",h);for(const h of i)f.append("parts",h);try{return await(await r("/product/get-products-eshop-by-codes",{search:f})).toJson()}catch(h){Gn.addByError(h)}return[]},async getProductRentalByCode(c,i){if(Array.isArray(c)||(c=[c]),c.length===0)return[];const r=jr(),f=new URLSearchParams;for(const h of c)f.append("codes",h);for(const h of i)f.append("parts",h);try{return await(await r("/product/get-products-rental-by-codes",{search:f})).toJson()}catch(h){Gn.addByError(h)}return[]}};class Xn{static getConfig(){if(!this.config){const i=Uc.get("dek_config");if(i===void 0)throw new Error("Config not found");try{const r=atob(i);this.config=JSON.parse(r)}catch(r){throw console.error(r),Gn.add({type:"error",message:"Nepodařilo se načíst konfiguraci."}),new Error("Config is not valid")}}return this.config}static getApiBase(){return this.getConfig().api.base}static getApiSearch(){return this.getConfig().api.search}static getBaseCdn(){return this.getConfig().cdn.base}static getBranchCode(){return this.getConfig().branchCode}static getBranchTitle(){return this.getConfig().branchTitle}static getDomain(){switch(this.getShopId()){case"argos_cz":return"argos.cz";case"dek_cz":return"dek.cz";case"dek_sk":return"dek.sk"}}static getEmail(){return this.getConfig().email}static getLang(){switch(this.getShopId()){case"argos_cz":case"dek_cz":return"cz";case"dek_sk":return"sk";default:return"cz"}}static getSearchCompany(){return this.getShopId().replace("_","-")}static getShopId(){const i=this.getConfig().shopId;return i==="dek"?"dek_cz":i}static isDev(){return this.getConfig().isDev}}sl(Xn,"config");const jy=(c,i,r=!0)=>{const f=c.split("|");if(f.length!==3&&f.length!==4)return console.warn(`Daný text "${c}" nemá správný formát`),r?`${i} ${c}`:c;let h,_,A,M;f.length===3?([_,A,M]=f.map(p=>p.trim()),h=M):[h,_,A,M]=f.map(p=>p.trim());let T=M;return i===0&&(T=h),i===1&&(T=_),i>=2&&i<=4&&(T=A),r?`${i} ${T}`:T},Hy=c=>c.replace(/m2/g,"m²").replace(/m3/g,"m³");class Se{static formatPrice(i,r){const f=new Intl.NumberFormat("cs-CZ",{style:"currency",currency:r}).format(i);return r==="EUR"?f.replace("€","EUR"):f.toString()}static formatUnit(i){return i.replace("m2","m²").replace("m3","m³")}static formatQuantity(i){return(Number(i)===i&&i%1!==0?i.toFixed(2):i).toLocaleString().replace(".",",")}static calculateQuantityUnitEshopToSales(i,r){const f=r.isPackagePrimary?i*1e6*(r.unitsInPackage*1e6)/1e12:i;return{unitPrimary:i,unitSecondary:r.isPackagePrimary?f:i,unitSales:f,unitPackage:r.isPackagePrimary?i:f}}static calculateQuantityUnitEshop(i,r){return Se.calculateQuantityUnitEshopToSales(i,r)}static calculateQuantityUnitEshopToPrimary(i,r){const f=r.isPackagePrimary?i*1e12/(r.unitsInPackage*1e6)/1e6:i;return{unitPrimary:f,unitSecondary:r.isPackagePrimary?i:f,unitSales:i,unitPackage:r.isPackagePrimary?f:i}}static calculateQuantityPriceEshop(i,r){const f=Math.round(r.priceNoVatPrimary*i*100)/100,h=Math.round(f*r.vat/100*100)/100,_=Math.round((f+h)*100)/100;return{priceNoVatPrimary:f,priceVatPrimary:_}}static getAvailabilityStatusByBranchCode(i,r,f){switch(i.availabilityBranchCode){case"P00":case"P01":case"P05":case"P06":return{showButton:!0,color:"green",buttonText:f,buttonColor:"green"};case"P02":case"P07":case"P08":case"P10":return{showButton:!1,color:"red"};case"P04":return{showButton:!0,color:"red",buttonText:r,buttonColor:"blue"};case"P03":return{showButton:!0,color:"blue",buttonText:r,buttonColor:"blue"};case"P09":return{showButton:!1,color:"gray"};default:return{showButton:!0,color:"blue",buttonText:r,buttonColor:"blue"}}}static addToCartEshop(i,r,f,h){window.dispatchEvent(new CustomEvent("ES_ADD_TO_CART_ESHOP",{detail:{code:i,quantitySales:r,unitSales:f,eventInvoker:h}}))}static addToCartRental(i){const{unionCode:r,quantity:f,date:h,hasGuarantee:_,typeOfRental:A,eventInvoker:M}=i;window.dispatchEvent(new CustomEvent("ES_ADD_TO_CART_RENTAL",{detail:{unionCode:r,quantity:f,quantitySales:f,dateFrom:h.from,dateTo:h.to,withGuarantee:_,typeOfRental:A,eventInvoker:M}}))}static async getProductEshopByCode(i,r){return ku.getProductEshopByCode(i,r)}static async getProductRentalByCode(i,r){return ku.getProductRentalByCode(i,r)}static calculateSeasonPoints(i,r){if(i.season===null||i.season===void 0)return 0;const f=i.season;if(f.rewardFor==="Quantity")return Math.floor(r/f.requiredQuantity)*f.rewardPoints;if(f.rewardFor==="Price"){const h=i.price.priceNoVatSales*r;return Math.floor(h/f.requiredQuantity)*f.rewardPoints}return 0}static getNumberOfDaysByTypeOfRental(i,r){if(r==="HalfDay")return"4 hodiny";const f=Math.ceil((i.to.getTime()-i.from.getTime())/864e5),h=_=>jy(Xn.getLang()==="sk"?"deň | dni | dní":"den | dny | dní",_);return h(r==="FullDay"?f:f+1)}}const Hc={cz:{toCart:"Do košíku",demand:"Poptat",labelAddToCart:(c,i)=>O.jsxs(O.Fragment,{children:["do košíku přidáte"," ",O.jsxs("strong",{children:[Se.formatQuantity(c)," ",Se.formatUnit(i)]})]}),addToCart:"Přidat",addedToCart:"Přidáno",unit:c=>`za ${c}`,withDPH:"s DPH",total:"celkem"},sk:{toCart:"Do košíka",demand:"Na dopyt",labelAddToCart:(c,i)=>O.jsxs(O.Fragment,{children:["do košíka pridáte"," ",O.jsxs("strong",{children:[Se.formatQuantity(c)," ",Se.formatUnit(i)]})]}),addToCart:"Pridať",addedToCart:"Pridané",unit:c=>`za ${c}`,withDPH:"s DPH",total:"celkom"}},ce={container:"_container_1nbmo_1",inputs:"_inputs_1nbmo_11",quantity:"_quantity_1nbmo_17",button:"_button_1nbmo_25",row:"_row_1nbmo_28",compact:"_compact_1nbmo_33",price:"_price_1nbmo_40",addToCart:"_addToCart_1nbmo_52",loading:"_loading_1nbmo_65",spin:"_spin_1nbmo_1",input:"_input_1nbmo_11",alreadyInCart:"_alreadyInCart_1nbmo_95",slide:"_slide_1nbmo_109"},xy={event:"recobox",recobox_pagetype:"modal_cart",recobox_boxName:"mohlo_by_se_vam_hodit"},Hr=c=>{window.dataLayer??(window.dataLayer=[]),window.dataLayer.push({...xy,recobox_action:"add_to_cart",recobox_product_id:c})};let qy=(Bc=class{},sl(Bc,"getFormSize",i=>i?`dek-form-width--${i}`:""),Bc);const xc=({onChange:c,children:i,disabled:r,size:f,state:h,type:_,onChangeLazy:A,onBlur:M,...T})=>{const p=yt.useId(),j=Z=>{if(!c)return;const{value:Y}=Z.target;if(_==="number"){c(Number(Y)||Number.NaN,Z);return}c(Y,Z)},U=Z=>{if(A){const{value:Y}=Z.target;if(_==="number"){A(Number(Y)||Number.NaN,Z);return}A(Y,Z)}M==null||M(Z)},q=qy.getFormSize(f),Q=[q];return h&&Q.push(h.level),O.jsxs(O.Fragment,{children:[i&&O.jsx("label",{htmlFor:p,children:i}),O.jsx("input",{id:p,role:"textbox",disabled:r,className:Q.join(" "),onChange:j,onBlur:U,type:_,...T}),h&&!r&&h.message&&O.jsx("div",{className:`input-${h.level} ${q}`,children:h.message})]})},Qy=c=>{const{type:i}=c;if(i==="compact")return O.jsx(wy,{...c});if(i==="slide")return O.jsx(Yy,{...c});if(i==="long")return O.jsx(By,{...c})},By=({lang:c,product:i})=>{const{availability:r,code:f,price:h,unit:_}=i,{addToCartEshop:A,calculateQuantityPriceEshop:M,calculateQuantityUnitEshopToSales:T,formatPrice:p,formatUnit:j,getAvailabilityStatusByBranchCode:U}=Se,q=Hc[c],Q=yt.useRef(null),[Z,Y]=yt.useState({unitPrimary:_.minimumCountUnitPrimary,unitSecondary:_.unitsInPackage,unitSales:_.minimumCountUnitSales}),[V,I]=yt.useState({priceVatPrimary:h.priceVatPrimary}),P=X=>{X=X<_.minimumCountUnitPrimary?_.minimumCountUnitPrimary:X;const ot=T(X,_),At=M(X,h);Y({unitPrimary:ot.unitPrimary,unitSecondary:ot.unitSecondary,unitSales:ot.unitSales}),I({priceVatPrimary:At.priceVatPrimary})},nt=()=>{var X;A(f,Z.unitSales,_.unitSales,"long"),(X=Q.current)==null||X.blur()},tt=U(r,q.demand,q.toCart);return tt.showButton?O.jsxs("div",{className:`r-add-to-cart-eshop-long ${ce.container}`,children:[O.jsxs("div",{className:ce.inputs,children:[O.jsxs("div",{className:ce.quantity,children:[O.jsx(xc,{onChange:P,type:"number",min:"1",value:Z.unitPrimary,autoComplete:"off"}),O.jsx("label",{children:j(_.unitPrimary)})]}),O.jsx("button",{type:"button",ref:Q,role:"button",className:`dek-button-${tt.buttonColor} ${ce.button}`,onClick:nt,children:tt.buttonText})]}),_.isPackagePrimary&&O.jsx("div",{className:ce.row,children:q.labelAddToCart(Z.unitSecondary,_.unitSecondary)}),O.jsxs("div",{className:ce.row,children:[O.jsx("strong",{children:p(V.priceVatPrimary,h.currencyCode)})," ",q.total," ",q.withDPH]})]}):O.jsx("div",{className:`r-add-to-cart-eshop-long ${ce.container}`})},wy=({lang:c,product:i})=>{const{code:r,unit:f}=i,{addToCartEshop:h,calculateQuantityPriceEshop:_,calculateQuantityUnitEshopToSales:A,formatPrice:M}=Se,T=Hc[c],[p,j]=yt.useState({unitPrimary:f.minimumCountUnitPrimary,unitSecondary:f.unitsInPackage,unitSales:f.minimumCountUnitSales}),[U,q]=yt.useState(!1),[Q,Z]=yt.useState(!1),[Y,V]=yt.useState(i.price.priceVatPrimary),I=tt=>{tt=tt{Z(!0),window.addEventListener("ES_ADD_TO_CART_ESHOP_AFTER",nt),h(r,p.unitSales,f.unitSales,"compact")},nt=tt=>{i.code===tt.detail.code&&(Z(!1),q(tt.detail.isSuccess),tt.detail.isSuccess&&Hr(r),window.removeEventListener("ES_ADD_TO_CART_ESHOP_AFTER",nt))};return O.jsxs("div",{className:`r-add-to-cart-eshop-compact ${ce.compact}`,children:[O.jsxs("div",{className:ce.price,children:[O.jsx("strong",{children:M(Y,i.price.currencyCode)}),O.jsxs("div",{children:[T.unit(i.unit.unitPrimary)," ",T.withDPH]})]}),O.jsx("div",{className:ce.addToCart,children:U?O.jsxs("div",{className:ce.alreadyInCart,children:[O.jsx("img",{src:"https://cdn1.idek.cz/file/check-7c33cfe0.svg",width:16,height:16}),O.jsx("span",{children:T.addedToCart})]}):O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:ce.input,children:[O.jsx(xc,{type:"number",min:1,defaultValue:p.unitPrimary,onChange:I,disabled:Q}),i.unit.unitPrimary]}),O.jsxs("button",{type:"button",role:"button",className:"dek-button-green",onClick:P,disabled:Q,children:[Q&&O.jsx("span",{className:ce.loading}),T.addToCart]})]})})]})},Yy=({lang:c,product:i})=>{const r=Hc[c],f=()=>{const h=i.unit.isPackagePrimary?i.unit.minimumCountUnitSales:i.unit.minimumCountUnitPrimary;Se.addToCartEshop(i.code,h,i.unit.unitSales,"slide")};return O.jsx("div",{className:`r-add-to-cart-eshop-slide ${ce.slide}`,children:O.jsx("button",{type:"button",role:"button",onClick:f,className:`dek-button-green dek-button-small ${ce.button}`,children:r.toCart})})},qc={cz:{toDetail:"Detail zapůjčení",unit:c=>`za ${c}`,withDPH:"s DPH",addToCart:"Přidat",addedToCart:"Přidáno"},sk:{toDetail:"Detail zapožičania",unit:c=>`za ${c}`,withDPH:"s DPH",addToCart:"Pridať",addedToCart:"Pridané"}},Le={container:"_container_qt28n_1",topDivider:"_topDivider_qt28n_4",button:"_button_qt28n_9",compact:"_compact_qt28n_16",price:"_price_qt28n_23",addToCart:"_addToCart_qt28n_35",loading:"_loading_qt28n_48",spin:"_spin_qt28n_1",input:"_input_qt28n_68",alreadyInCart:"_alreadyInCart_qt28n_78"},Gy=(c,i)=>`/produkty/detail/${c}${i?`-${i}`:""}`,Qc=(c,i)=>`/pujcovna/detail/${c.replace("|","/")}${i?`-${i}`:""}`,Xy=c=>{const{type:i}=c;if(i==="compact")return O.jsx(Zy,{...c});if(i==="long")return O.jsx(Ly,{...c});if(i==="slide")return O.jsx(Vy,{...c})},Vy=({product:c,lang:i})=>{const r=qc[i];return O.jsx("div",{className:`r-add-to-cart-rental-slide ${Le.container}`,children:O.jsx("a",{role:"button",className:`dek-button dek-button-green dek-button-small ${Le.button}`,href:Qc(c.code,c.detail.slug),children:r.toDetail})})},Ly=({product:c,lang:i})=>{const r=qc[i];return O.jsx("div",{className:`r-add-to-cart-rental-long ${Le.container} ${Le.topDivider}`,children:O.jsx("a",{role:"button",className:`dek-button dek-button-green ${Le.button}`,href:Qc(c.code,c.detail.slug),children:r.toDetail})})},Zy=({product:c,lang:i,date:r,hasGuarantee:f,typeOfRental:h})=>{const{formatPrice:_}=Se,A=qc[i],[M,T]=yt.useState(1),[p,j]=yt.useState(c.detail.priceVatOrigin),[U,q]=yt.useState(!1),[Q,Z]=yt.useState(!1),Y=P=>{T(P),j(P*c.detail.priceVatOrigin)},V=()=>{Z(!0),window.addEventListener("ES_ADD_TO_CART_RENTAL_AFTER",I),Se.addToCartRental({unionCode:c.code,quantity:M,date:r,hasGuarantee:f,typeOfRental:h,eventInvoker:"compact"})},I=P=>{c.code===P.detail.unionCode&&(Z(!1),q(P.detail.isSuccess),P.detail.isSuccess&&Hr(c.code),window.removeEventListener("ES_ADD_TO_CART_RENTAL_AFTER",I))};return O.jsxs("div",{className:`r-add-to-cart-rental-compact ${Le.compact}`,children:[O.jsxs("div",{className:Le.price,children:[O.jsx("strong",{children:_(p,c.detail.currencyCode)}),O.jsxs("div",{children:[A.unit(c.detail.unitPrice)," ",A.withDPH]})]}),O.jsx("div",{className:Le.addToCart,children:U?O.jsxs("div",{className:Le.alreadyInCart,children:[O.jsx("img",{src:"https://cdn1.idek.cz/file/check-7c33cfe0.svg",width:16,height:16}),O.jsx("span",{children:A.addedToCart})]}):O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:Le.input,children:[O.jsx(xc,{type:"number",min:1,defaultValue:M,onChange:Y,disabled:Q}),c.detail.unitQuantity]}),O.jsxs("button",{type:"button",role:"button",className:"dek-button-green",onClick:V,disabled:Q,children:[Q&&O.jsx("span",{className:Le.loading}),A.addToCart]})]})})]})},xr={icons:"_icons_4p8mm_1"},Ky={cz:{hasVariants:"Více variant",hasGift:"Dárek k nákupu",hasPpl:"Doprava PPL"},sk:{hasVariants:"Viac variantov",hasGift:"Darček na nákup",hasPpl:"Doprava PPL"}},qr=({product:c})=>{const i=Xn.getLang(),r=Ky[i];if(c.type==="eshop")return O.jsxs("div",{className:`r-product-icon ${xr.icons}`,children:[c.detail.hasVariant&&O.jsx("img",{title:r.hasVariants,alt:r.hasVariants,src:"https://cdn1.idek.cz/img/a32ef0de7bf6d55e5b00748dfe951840_rw24.png",width:24,height:24}),c.detail.hasGift&&O.jsx("img",{alt:r.hasGift,title:r.hasGift,src:"https://cdn1.idek.cz/img/13ac7588db7f1b49cbce256f5abd255f_rw24.png",width:24,height:24}),c.detail.hasPpl&&O.jsx("img",{title:r.hasPpl,alt:r.hasPpl,src:"https://cdn1.idek.cz/img/8c6599f32f6f4d9cbc8d20951dba4952_rw24.jpg",width:24,height:24})]});if(c.type==="rental")return O.jsx("div",{className:`r-product-icon ${xr.icons}`})},Jy={cz:{stocksLast:"Do vyprodání zásob",recommended:"Doporučujeme",isRecent:"Novinka",isFeatured:"Výhodná cena"},sk:{stocksLast:"Do vypredania zásob",recommended:"Odporúčame",isRecent:"Novinka",isFeatured:"Výhodná ponuka"}},fl={labels:"_labels_14jqs_1",recommended:"_recommended_14jqs_12",isRecent:"_isRecent_14jqs_13",isFeatured:"_isFeatured_14jqs_14",isWhileStockLast:"_isWhileStockLast_14jqs_15",title:"_title_14jqs_39",content:"_content_14jqs_43",generousSeason:"_generousSeason_14jqs_50"},Qr=({product:c})=>{const i=Xn.getLang(),r=Jy[i],f=()=>{if(c.type==="eshop")switch(!0){case c.availability.isWhileStockLast:return O.jsx("div",{className:fl.isWhileStockLast,children:r.stocksLast});case c.detail.isFeatured:return O.jsx("div",{className:fl.isFeatured,children:O.jsx("div",{className:fl.title,children:r.isFeatured})});case c.detail.isRecommended:return O.jsx("div",{className:fl.recommended,children:r.recommended});case c.detail.isRecent:return O.jsx("div",{className:fl.isRecent,children:r.isRecent});case!0:return null}if(c.type==="rental")switch(!0){case c.detail.isFeatured:return O.jsx("div",{className:fl.isFeatured,children:O.jsx("div",{className:fl.title,children:r.isFeatured})});case!0:return null}return null};return O.jsxs("div",{className:`r-product-label ${fl.labels}`,children:[f(),c.type==="eshop"&&c.detail.seasonPointsText&&O.jsxs("div",{className:fl.generousSeason,children:[O.jsx("img",{src:"https://cdn1.idek.cz/file/plus-white-a6e119fe.svg",width:22,height:22}),O.jsx("div",{children:Hy(c.detail.seasonPointsText)})]})]})},ky=({lang:c,product:i,showAddToCartButton:r})=>{const f=[{width:225,height:135},{width:320,height:192,maxWidth:680},{width:225,height:135,maxWidth:490},{width:170,height:170,maxWidth:370}];if(i.type==="eshop")return O.jsx($y,{lang:c,product:i,resolutionList:f,showAddToCartButton:r});if(i.type==="rental")return O.jsx(Fy,{lang:c,product:i,resolutionList:f,showAddToCartButton:r})},$y=({lang:c,product:i,resolutionList:r,showAddToCartButton:f})=>{const h=Gy(i.code,i.detail.slug),_=Se.formatPrice(i.price.priceVatPrimary,i.price.currencyCode).split(",");return O.jsxs("div",{className:`r-product-preview-slide ${be.wrap}`,"data-product-code":i.code,children:[O.jsxs("a",{className:be.image,href:h,children:[O.jsx(Qr,{product:i}),O.jsx(qr,{product:i}),O.jsx(Nr,{src:i.detail.image,alt:i.detail.title,resolutionList:r})]}),O.jsxs("div",{className:be.content,children:[O.jsxs("a",{href:h,children:[O.jsx("span",{className:be.title,children:i.detail.title}),O.jsxs("div",{children:[O.jsxs("div",{className:be.price,children:[_[0],O.jsxs("span",{children:[",",_[1]]})]}),O.jsxs("div",{className:be.unit,children:["cena za"," ",i.unit.unitPrimary," ","s DPH"]})]})]}),f&&O.jsx(Qy,{lang:c,product:i,type:"slide"})]})]})},Fy=({lang:c,product:i,resolutionList:r,showAddToCartButton:f})=>{const h=Qc(i.code,i.detail.slug),_=Se.formatPrice(i.detail.priceVatOrigin,i.detail.currencyCode).split(",");return O.jsxs("div",{className:`r-product-preview-slide ${be.wrap} ${be.rental}`,"data-product-code":i.code,children:[O.jsxs("a",{className:be.image,href:h,children:[O.jsx(Qr,{product:i}),O.jsx(qr,{product:i}),O.jsx(Nr,{src:i.detail.image,alt:i.detail.titleShort??i.detail.title,resolutionList:r})]}),O.jsxs("div",{className:be.content,children:[O.jsxs("a",{href:h,children:[O.jsx("span",{className:be.title,children:i.detail.titleShort??i.detail.title}),O.jsxs("div",{children:[O.jsxs("div",{className:be.price,children:[_[0],O.jsxs("span",{children:[",",_[1]]})]}),O.jsxs("div",{className:be.unit,children:["cena za"," ",i.detail.unitPrice," ","s DPH"]})]})]}),f&&O.jsx(Xy,{lang:c,product:i,type:"slide"})]})]})};let $u,Fu;const Br=c=>{const i=c.touches[0];$u=i.clientX,Fu=i.clientY},Wy=(c,i)=>{var A,M,T,p;if(!$u||!Fu)return;const r=c.touches[0].clientX,f=c.touches[0].clientY,h=$u-r,_=Fu-f;Math.abs(h)>Math.abs(_)?h>0?(A=i.onRight)==null||A.call(i):(M=i.onLeft)==null||M.call(i):_>0?(T=i.onDown)==null||T.call(i):(p=i.onUp)==null||p.call(i),$u=void 0,Fu=void 0},Py=(c,i)=>{yt.useEffect(()=>{if(c==null)return;const r=f=>Wy(f,i);return c.addEventListener("touchstart",Br,!1),c.addEventListener("touchmove",r,!1),()=>{c.removeEventListener("touchstart",Br,!1),c.removeEventListener("touchmove",r,!1)}},[c,i])},wr=c=>{const{hasGrayBackground:i,itemsMaxCount:r,loadingState:f,productList:h,showAddToCart:_,sliderMaxWidth:A}=c,M=Xn.getLang(),T=yt.useRef(null),p=yt.useRef(null),j=yt.useRef(null),[U,q]=yt.useState(0),[Q,Z]=yt.useState(0),[Y,V]=yt.useState(!1),[I,P]=yt.useState(0);yt.useEffect(()=>{const Yt=()=>{if(!T.current||!p.current||!j.current||!h)return;const Me=T.current.offsetWidth??0,re=p.current.offsetWidth??0,ne=Me-re,et=(A-ne)/r,k=Math.floor(re/et),Ot=re/k,y=Ot*h.length;q(y),Z(re/Math.floor(re/Ot)),V(!0),P(0)};return Yt(),window.addEventListener("resize",Yt),()=>{window.removeEventListener("resize",Yt)}},[A,r,h]);const nt=T.current?T.current.offsetWidth:0,tt=p.current?p.current.offsetWidth:0,X=nt-tt,ot=Math.abs(I)+tt{ot&&P(I-tt)},H=()=>{At&&P(I+tt)},ut=(X/2+12)*-1,wt=ut;return Py(p.current,{onRight:bt,onLeft:H}),f?O.jsx("div",{className:`r-slider-product ${Ve.wrap} ${i?Ve.grayBackground:""}`,role:"slider",style:{maxWidth:A},children:O.jsx("div",{className:Ve.viewport,children:O.jsx("div",{className:`${Ve.container} loading`,style:{transform:`translateX(${I}px)`,width:A,height:300}})})}):O.jsxs("div",{className:`r-slider-product ${Ve.wrap} ${i?Ve.grayBackground:""}`,ref:T,role:"slider",style:{maxWidth:A},children:[O.jsxs("div",{className:Ve.arrowWrap,children:[At&&O.jsx("div",{className:Ve.arrowPrev,onClick:H,style:{left:wt}}),ot&&O.jsx("div",{className:Ve.arrowNext,onClick:bt,style:{right:ut}})]}),O.jsx("div",{className:Ve.viewport,ref:p,children:O.jsx("div",{className:Ve.container,ref:j,style:{transform:`translateX(${I}px)`,width:U},children:Y&&h.map(Yt=>O.jsx("div",{style:{width:Q},children:O.jsx(ky,{lang:M,product:Yt,showAddToCartButton:_})},Yt.code))})})]})},Iy=({itemsMaxCount:c,sliderMaxWidth:i})=>{let r=!0;return c===void 0&&(console.error("[SliderProduct]: itemsMaxCount is required"),r=!1),i===void 0&&(console.error("[SliderProduct]: sliderMaxWidth is required"),r=!1),r},tv=({productCodeList:c,...i})=>{const r=c!==void 0&&c.length>0&&Iy({...i}),f=Ty({queryKey:["productList",c],queryFn:async()=>(await ev(c.map(String))).filter(Boolean),enabled:r});return r?O.jsxs("div",{className:"r-a-product-slider",children:[f.isLoading&&O.jsx(wr,{loadingState:!0,...i}),f.isSuccess&&O.jsx(wr,{productList:f.data,...i})]}):null},ev=async c=>{const i=c.filter(_=>_.length===10),r=c.filter(_=>_.length===7||_.length===15&&_.includes("|")),f=await ku.getProductEshopByCode(i,["detail","availability","price","unit"]),h=await ku.getProductRentalByCode(r,["detail","price"]);return[...f,...h]},lv=new uy({defaultOptions:{queries:{staleTime:1/0,gcTime:1/0,refetchOnWindowFocus:!1,retry:!1}}});function av(c,i){V0.createRoot(document.querySelector(`#${c}`)).render(O.jsx(yt.StrictMode,{children:O.jsx(ry,{client:lv,children:O.jsx(tv,{...i})})}))}return av}); //# sourceMappingURL=index.umd.cjs.map