(function(bt,gt){typeof exports=="object"&&typeof module<"u"?module.exports=gt():typeof define=="function"&&define.amd?define(gt):(bt=typeof globalThis<"u"?globalThis:bt||self,bt.ReactProductSlider=gt())})(this,function(){"use strict";var B1=Object.defineProperty;var Yy=bt=>{throw TypeError(bt)};var Y1=(bt,gt,Ut)=>gt in bt?B1(bt,gt,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):bt[gt]=Ut;var kt=(bt,gt,Ut)=>Y1(bt,typeof gt!="symbol"?gt+"":gt,Ut),Fr=(bt,gt,Ut)=>gt.has(bt)||Yy("Cannot "+Ut);var v=(bt,gt,Ut)=>(Fr(bt,gt,"read from private field"),Ut?Ut.call(bt):gt.get(bt)),I=(bt,gt,Ut)=>gt.has(bt)?Yy("Cannot add the same private member more than once"):gt instanceof WeakSet?gt.add(bt):gt.set(bt,Ut),B=(bt,gt,Ut,rl)=>(Fr(bt,gt,"write to private field"),rl?rl.call(bt,Ut):gt.set(bt,Ut),Ut),dt=(bt,gt,Ut)=>(Fr(bt,gt,"access private method"),Ut);var mc=(bt,gt,Ut,rl)=>({set _(vc){B(bt,gt,vc,Ut)},get _(){return v(bt,gt,rl)}});var hl,Ua,Vl,kf,Zl,Na,Kl,$f,dl,Ff,Jl,kl,Ue,yl,ne,Kn,ml,ke,Ma,Wf,ta,Pf,ea,re,vl,aa,sl,If,ha,$e,Jn,to,xt,Ha,ja,$l,Fl,xa,Wl,Pl,eo,ve,ft,kn,fe,gl,Il,wa,la,$n,tn,en,pl,bl,qa,an,Tt,Ju,Wr,Pr,Ir,tf,ef,af,lf,Gy,ao;function bt(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 rl;function vc(){if(rl)return Ut;rl=1;var c=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(f,d,p){var T=null;if(p!==void 0&&(T=""+p),d.key!==void 0&&(T=""+d.key),"key"in d){p={};for(var R in d)R!=="key"&&(p[R]=d[R])}else p=d;return d=p.ref,{$$typeof:c,type:f,key:T,ref:d!==void 0?d:null,props:p}}return Ut.Fragment=i,Ut.jsx=s,Ut.jsxs=s,Ut}var gc={exports:{}},lt={};/** * @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 nf;function Ly(){if(nf)return lt;nf=1;var c=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),U=Symbol.iterator;function w(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(){}},$=Object.assign,L={};function G(y,N,P){this.props=y,this.context=N,this.refs=L,this.updater=P||q}G.prototype.isReactComponent={},G.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")},G.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function K(){}K.prototype=G.prototype;function J(y,N,P){this.props=y,this.context=N,this.refs=L,this.updater=P||q}var nt=J.prototype=new K;nt.constructor=J,$(nt,G.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,P,k,Q,mt){return P=mt.ref,{$$typeof:c,type:y,key:N,ref:P!==void 0?P:null,props:mt}}function pt(y,N){return At(y.type,N,void 0,void 0,void 0,y.props)}function j(y){return typeof y=="object"&&y!==null&&y.$$typeof===c}function ut(y){var N={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(P){return N[P]})}var Bt=/\/+/g;function Yt(y,N){return typeof y=="object"&&y!==null&&y.key!=null?ut(""+y.key):N.toString(36)}function Ne(){}function oe(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(Ne,Ne):(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 ue(y,N,P,k,Q){var mt=typeof y;(mt==="undefined"||mt==="boolean")&&(y=null);var it=!1;if(y===null)it=!0;else switch(mt){case"bigint":case"string":case"number":it=!0;break;case"object":switch(y.$$typeof){case c:case i:it=!0;break;case H:return it=y._init,ue(it(y._payload),N,P,k,Q)}}if(it)return Q=Q(y),it=k===""?"."+Yt(y,0):k,tt(Q)?(P="",it!=null&&(P=it.replace(Bt,"$&/")+"/"),ue(Q,N,P,"",function(Lt){return Lt})):Q!=null&&(j(Q)&&(Q=pt(Q,P+(Q.key==null||y&&y.key===Q.key?"":(""+Q.key).replace(Bt,"$&/")+"/")+it)),N.push(Q)),1;it=0;var he=k===""?".":k+":";if(tt(y))for(var _t=0;_t>>1,y=x[Ot];if(0>>1;Otd(k,F))Qd(mt,k)?(x[Ot]=mt,x[Q]=F,Ot=Q):(x[Ot]=k,x[P]=F,Ot=P);else if(Qd(mt,F))x[Ot]=mt,x[Q]=F,Ot=Q;else break t}}return et}function d(x,et){var F=x.sortIndex-et.sortIndex;return F!==0?F:x.id-et.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;c.unstable_now=function(){return p.now()}}else{var T=Date,R=T.now();c.unstable_now=function(){return T.now()-R}}var _=[],S=[],H=1,U=null,w=3,q=!1,$=!1,L=!1,G=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null;function nt(x){for(var et=s(S);et!==null;){if(et.callback===null)f(S);else if(et.startTime<=x)f(S),et.sortIndex=et.expirationTime,i(_,et);else break;et=s(S)}}function tt(x){if(L=!1,nt(x),!$)if(s(_)!==null)$=!0,oe();else{var et=s(S);et!==null&&ue(tt,et.startTime-x)}}var X=!1,ot=-1,At=5,pt=-1;function j(){return!(c.unstable_now()-ptx&&j());){var Ot=U.callback;if(typeof Ot=="function"){U.callback=null,w=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===s(_)&&f(_),nt(x)}else f(_);U=s(_)}if(U!==null)et=!0;else{var N=s(S);N!==null&&ue(tt,N.startTime-x),et=!1}}break t}finally{U=null,w=F,q=!1}et=void 0}}finally{et?Bt():X=!1}}}var Bt;if(typeof J=="function")Bt=function(){J(ut)};else if(typeof MessageChannel<"u"){var Yt=new MessageChannel,Ne=Yt.port2;Yt.port1.onmessage=ut,Bt=function(){Ne.postMessage(null)}}else Bt=function(){G(ut,0)};function oe(){X||(X=!0,Bt())}function ue(x,et){ot=G(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(){$||q||($=!0,oe())},c.unstable_forceFrameRate=function(x){0>x||125Ot?(x.sortIndex=F,i(S,x),s(_)===null&&x===s(S)&&(L?(K(ot),ot=-1):L=!0,ue(tt,F-Ot))):(x.sortIndex=y,i(_,x),$||q||($=!0,oe())),x},c.unstable_shouldYield=j,c.unstable_wrapCallback=function(x){var et=w;return function(){var F=w;w=et;try{return x.apply(this,arguments)}finally{w=F}}}}(Ec)),Ec}var rf;function Zy(){return rf||(rf=1,Sc.exports=Vy()),Sc.exports}var Tc={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 ff;function Ky(){if(ff)return le;ff=1;var c=pc();function i(_){var S="https://react.dev/errors/"+_;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(i){console.error(i)}}return c(),Tc.exports=Ky(),Tc.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 hf;function ky(){if(hf)return Yn;hf=1;var c=Zy(),i=pc(),s=Jy();function f(t){var e="https://react.dev/errors/"+t;if(1)":-1n||h[l]!==g[n]){var z=` `+h[l].replace(" at new "," at ");return t.displayName&&z.includes("")&&(z=z.replace("",t.displayName)),z}while(1<=l&&0<=n);break}}}finally{oe=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ne(a):""}function x(t){switch(t.tag){case 26:case 27:case 5:return Ne(t.type);case 16:return Ne("Lazy");case 13:return Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return t=ue(t.type,!1),t;case 11:return t=ue(t.type.render,!1),t;case 1:return t=ue(t.type,!0),t;default:return""}}function et(t){try{var e="";do e+=x(t),t=t.return;while(t);return e}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}function F(t){var e=t,a=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(a=e.return),t=e.return;while(t)}return e.tag===3?a: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(F(t)!==t)throw Error(f(188))}function N(t){var e=t.alternate;if(!e){if(e=F(t),e===null)throw Error(f(188));return e!==t?null:t}for(var a=t,l=e;;){var n=a.return;if(n===null)break;var u=n.alternate;if(u===null){if(l=n.return,l!==null){a=l;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===a)return y(n),t;if(u===l)return y(n),e;u=u.sibling}throw Error(f(188))}if(a.return!==l.return)a=n,l=u;else{for(var r=!1,o=n.child;o;){if(o===a){r=!0,a=n,l=u;break}if(o===l){r=!0,l=n,a=u;break}o=o.sibling}if(!r){for(o=u.child;o;){if(o===a){r=!0,a=u,l=n;break}if(o===l){r=!0,l=u,a=n;break}o=o.sibling}if(!r)throw Error(f(189))}}if(a.alternate!==l)throw Error(f(190))}if(a.tag!==3)throw Error(f(188));return a.stateNode.current===a?t:e}function P(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=P(t),e!==null)return e;t=t.sibling}return null}var k=Array.isArray,Q=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,mt={pending:!1,data:null,method:null,action:null},it=[],he=-1;function _t(t){return{current:t}}function Lt(t){0>he||(t.current=it[he],it[he]=null,he--)}function Nt(t,e){he++,it[he]=t.current,t.current=e}var na=_t(null),Fn=_t(null),Qa=_t(null),ei=_t(null);function ai(t,e){switch(Nt(Qa,e),Nt(Fn,t),Nt(na,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?my(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=my(t),e=vy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Lt(na),Nt(na,e)}function ln(){Lt(na),Lt(Fn),Lt(Qa)}function Gc(t){t.memoizedState!==null&&Nt(ei,t);var e=na.current,a=vy(e,t.type);e!==a&&(Nt(Fn,t),Nt(na,a))}function li(t){Fn.current===t&&(Lt(na),Lt(Fn)),ei.current===t&&(Lt(ei),Lu._currentValue=mt)}var Lc=Object.prototype.hasOwnProperty,Xc=c.unstable_scheduleCallback,Vc=c.unstable_cancelCallback,gm=c.unstable_shouldYield,pm=c.unstable_requestPaint,ua=c.unstable_now,bm=c.unstable_getCurrentPriorityLevel,lo=c.unstable_ImmediatePriority,no=c.unstable_UserBlockingPriority,ni=c.unstable_NormalPriority,Sm=c.unstable_LowPriority,uo=c.unstable_IdlePriority,Em=c.log,Tm=c.unstable_setDisableYieldValue,Wn=null,Te=null;function _m(t){if(Te&&typeof Te.onCommitFiberRoot=="function")try{Te.onCommitFiberRoot(Wn,t,void 0,(t.current.flags&128)===128)}catch{}}function Ba(t){if(typeof Em=="function"&&Tm(t),Te&&typeof Te.setStrictMode=="function")try{Te.setStrictMode(Wn,t)}catch{}}var _e=Math.clz32?Math.clz32:Dm,Am=Math.log,Om=Math.LN2;function Dm(t){return t>>>=0,t===0?32:31-(Am(t)/Om|0)|0}var ui=128,ii=4194304;function Sl(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 ci(t,e){var a=t.pendingLanes;if(a===0)return 0;var l=0,n=t.suspendedLanes,u=t.pingedLanes,r=t.warmLanes;t=t.finishedLanes!==0;var o=a&134217727;return o!==0?(a=o&~n,a!==0?l=Sl(a):(u&=o,u!==0?l=Sl(u):t||(r=o&~r,r!==0&&(l=Sl(r))))):(o=a&~n,o!==0?l=Sl(o):u!==0?l=Sl(u):t||(r=a&~r,r!==0&&(l=Sl(r)))),l===0?0:e!==0&&e!==l&&!(e&n)&&(n=l&-l,r=e&-e,n>=r||n===32&&(r&4194176)!==0)?e:l}function Pn(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Rm(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 io(){var t=ui;return ui<<=1,!(ui&4194176)&&(ui=128),t}function co(){var t=ii;return ii<<=1,!(ii&62914560)&&(ii=4194304),t}function Zc(t){for(var e=[],a=0;31>a;a++)e.push(t);return e}function In(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function zm(t,e,a,l,n,u){var r=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var o=t.entanglements,h=t.expirationTimes,g=t.hiddenUpdates;for(a=r&~a;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nm=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]*$"),vo={},go={};function Hm(t){return Lc.call(go,t)?!0:Lc.call(vo,t)?!1:Nm.test(t)?go[t]=!0:(vo[t]=!0,!1)}function si(t,e,a){if(Hm(e))if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+a)}}function ri(t,e,a){if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+a)}}function ya(t,e,a,l){if(l===null)t.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(e,a,""+l)}}function He(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function po(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function jm(t){var e=po(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),l=""+t[e];if(!t.hasOwnProperty(e)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,u=a.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(r){l=""+r,u.call(this,r)}}),Object.defineProperty(t,e,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(r){l=""+r},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function fi(t){t._valueTracker||(t._valueTracker=jm(t))}function bo(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var a=e.getValue(),l="";return t&&(l=po(t)?t.checked?"true":"false":t.value),t=l,t!==a?(e.setValue(t),!0):!1}function oi(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 xm=/[\n"\\]/g;function je(t){return t.replace(xm,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function kc(t,e,a,l,n,u,r,o){t.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?t.type=r:t.removeAttribute("type"),e!=null?r==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+He(e)):t.value!==""+He(e)&&(t.value=""+He(e)):r!=="submit"&&r!=="reset"||t.removeAttribute("value"),e!=null?$c(t,r,He(e)):a!=null?$c(t,r,He(a)):l!=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=""+He(o):t.removeAttribute("name")}function So(t,e,a,l,n,u,r,o){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||e!=null))return;a=a!=null?""+He(a):"",e=e!=null?""+He(e):a,o||e===t.value||(t.value=e),t.defaultValue=e}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=o?t.checked:!!l,t.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(t.name=r)}function $c(t,e,a){e==="number"&&oi(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function rn(t,e,a,l){if(t=t.options,e){e={};for(var n=0;n=iu),Ho=" ",jo=!1;function xo(t,e){switch(t){case"keyup":return rv.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wo(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var dn=!1;function ov(t,e){switch(t){case"compositionend":return wo(e);case"keypress":return e.which!==32?null:(jo=!0,Ho);case"textInput":return t=e.data,t===Ho&&jo?null:t;default:return null}}function hv(t,e){if(dn)return t==="compositionend"||!is&&xo(t,e)?(t=Ro(),di=es=Ga=null,dn=!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:a,offset:e-t};t=l}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=Vo(a)}}function Ko(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Ko(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Jo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=oi(t.document);e instanceof t.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)t=e.contentWindow;else break;e=oi(t.document)}return e}function rs(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 Sv(t,e){var a=Jo(e);e=t.focusedElem;var l=t.selectionRange;if(a!==e&&e&&e.ownerDocument&&Ko(e.ownerDocument.documentElement,e)){if(l!==null&&rs(e)){if(t=l.start,a=l.end,a===void 0&&(a=t),"selectionStart"in e)e.selectionStart=t,e.selectionEnd=Math.min(a,e.value.length);else if(a=(t=e.ownerDocument||document)&&t.defaultView||window,a.getSelection){a=a.getSelection();var n=e.textContent.length,u=Math.min(l.start,n);l=l.end===void 0?u:Math.min(l.end,n),!a.extend&&u>l&&(n=l,l=u,u=n),n=Zo(e,u);var r=Zo(e,l);n&&r&&(a.rangeCount!==1||a.anchorNode!==n.node||a.anchorOffset!==n.offset||a.focusNode!==r.node||a.focusOffset!==r.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),a.removeAllRanges(),u>l?(a.addRange(t),a.extend(r.node,r.offset)):(t.setEnd(r.node,r.offset),a.addRange(t)))}}for(t=[],a=e;a=a.parentNode;)a.nodeType===1&&t.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof e.focus=="function"&&e.focus(),e=0;e=document.documentMode,yn=null,fs=null,fu=null,os=!1;function ko(t,e,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;os||yn==null||yn!==oi(l)||(l=yn,"selectionStart"in l&&rs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),fu&&ru(fu,l)||(fu=l,l=tc(fs,"onSelect"),0>=r,n-=r,ma=1<<32-_e(e)+n|a<W?(Pt=Z,Z=null):Pt=Z.sibling;var Et=A(b,Z,E[W],C);if(Et===null){Z===null&&(Z=Pt);break}t&&Z&&Et.alternate===null&&e(b,Z),m=u(Et,m,W),st===null?Y=Et:st.sibling=Et,st=Et,Z=Pt}if(W===E.length)return a(b,Z),St&&Rl(b,W),Y;if(Z===null){for(;WW?(Pt=Z,Z=null):Pt=Z.sibling;var cl=A(b,Z,Et.value,C);if(cl===null){Z===null&&(Z=Pt);break}t&&Z&&cl.alternate===null&&e(b,Z),m=u(cl,m,W),st===null?Y=cl:st.sibling=cl,st=cl,Z=Pt}if(Et.done)return a(b,Z),St&&Rl(b,W),Y;if(Z===null){for(;!Et.done;W++,Et=E.next())Et=M(b,Et.value,C),Et!==null&&(m=u(Et,m,W),st===null?Y=Et:st.sibling=Et,st=Et);return St&&Rl(b,W),Y}for(Z=l(Z);!Et.done;W++,Et=E.next())Et=D(Z,b,W,Et.value,C),Et!==null&&(t&&Et.alternate!==null&&Z.delete(Et.key===null?W:Et.key),m=u(Et,m,W),st===null?Y=Et:st.sibling=Et,st=Et);return t&&Z.forEach(function(Q1){return e(b,Q1)}),St&&Rl(b,W),Y}function Qt(b,m,E,C){if(typeof E=="object"&&E!==null&&E.type===_&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case T:t:{for(var Y=E.key;m!==null;){if(m.key===Y){if(Y=E.type,Y===_){if(m.tag===7){a(b,m.sibling),C=n(m,E.props.children),C.return=b,b=C;break t}}else if(m.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===J&&oh(Y)===m.type){a(b,m.sibling),C=n(m,E.props),gu(C,E),C.return=b,b=C;break t}a(b,m);break}else e(b,m);m=m.sibling}E.type===_?(C=Ql(E.props.children,b.mode,C,E.key),C.return=b,b=C):(C=Vi(E.type,E.key,E.props,null,b.mode,C),gu(C,E),C.return=b,b=C)}return r(b);case R:t:{for(Y=E.key;m!==null;){if(m.key===Y)if(m.tag===4&&m.stateNode.containerInfo===E.containerInfo&&m.stateNode.implementation===E.implementation){a(b,m.sibling),C=n(m,E.children||[]),C.return=b,b=C;break t}else{a(b,m);break}else e(b,m);m=m.sibling}C=dr(E,b.mode,C),C.return=b,b=C}return r(b);case J:return Y=E._init,E=Y(E._payload),Qt(b,m,E,C)}if(k(E))return V(b,m,E,C);if(ot(E)){if(Y=ot(E),typeof Y!="function")throw Error(f(150));return E=Y.call(E),at(b,m,E,C)}if(typeof E.then=="function")return Qt(b,m,Oi(E),C);if(E.$$typeof===q)return Qt(b,m,Gi(b,E),C);Di(b,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,m!==null&&m.tag===6?(a(b,m.sibling),C=n(m,E),C.return=b,b=C):(a(b,m),C=hr(E,b.mode,C),C.return=b,b=C),r(b)):a(b,m)}return function(b,m,E,C){try{vu=0;var Y=Qt(b,m,E,C);return Sn=null,Y}catch(Z){if(Z===yu)throw Z;var st=Le(29,Z,null,b.mode);return st.lanes=C,st.return=b,st}finally{}}}var Cl=hh(!0),dh=hh(!1),En=_t(null),Ri=_t(0);function yh(t,e){t=Ra,Nt(Ri,t),Nt(En,e),Ra=t|e.baseLanes}function bs(){Nt(Ri,Ra),Nt(En,En.current)}function Ss(){Ra=Ri.current,Lt(En),Lt(Ri)}var Be=_t(null),ca=null;function Xa(t){var e=t.alternate;Nt(Kt,Kt.current&1),Nt(Be,t),ca===null&&(e===null||En.current!==null||e.memoizedState!==null)&&(ca=t)}function mh(t){if(t.tag===22){if(Nt(Kt,Kt.current),Nt(Be,t),ca===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(ca=t)}}else Va()}function Va(){Nt(Kt,Kt.current),Nt(Be,Be.current)}function ga(t){Lt(Be),ca===t&&(ca=null),Lt(Kt)}var Kt=_t(0);function zi(t){for(var e=t;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.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 Ov=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(a,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(a){return a()})}},Dv=c.unstable_scheduleCallback,Rv=c.unstable_NormalPriority,Jt={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Es(){return{controller:new Ov,data:new Map,refCount:0}}function pu(t){t.refCount--,t.refCount===0&&Dv(Rv,function(){t.controller.abort()})}var bu=null,Ts=0,Tn=0,_n=null;function zv(t,e){if(bu===null){var a=bu=[];Ts=0,Tn=zr(),_n={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ts++,e.then(vh,vh),e}function vh(){if(--Ts===0&&bu!==null){_n!==null&&(_n.status="fulfilled");var t=bu;bu=null,Tn=0,_n=null;for(var e=0;eu?u:8;var r=j.T,o={};j.T=o,Bs(t,!1,e,a);try{var h=n(),g=j.S;if(g!==null&&g(o,h),h!==null&&typeof h=="object"&&typeof h.then=="function"){var z=Cv(h,l);Tu(t,e,z,ze(t))}else Tu(t,e,l,ze(t))}catch(M){Tu(t,e,{then:function(){},status:"rejected",reason:M},ze())}finally{Q.p=u,j.T=r}}function jv(){}function qs(t,e,a,l){if(t.tag!==5)throw Error(f(476));var n=Jh(t).queue;Kh(t,n,e,mt,a===null?jv:function(){return kh(t),a(l)})}function Jh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:mt,baseState:mt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:mt},next:null};var a={};return e.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:a},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function kh(t){var e=Jh(t).next.queue;Tu(t,e,{},ze())}function Qs(){return ce(Lu)}function $h(){return Vt().memoizedState}function Fh(){return Vt().memoizedState}function xv(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var a=ze();t=$a(a);var l=Fa(e,t,a);l!==null&&(ye(l,e,a),Ou(l,e,a)),e={cache:Es()},t.payload=e;return}e=e.return}}function wv(t,e,a){var l=ze();a={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},qi(t)?Ph(e,a):(a=ys(t,e,a,l),a!==null&&(ye(a,t,l),Ih(a,e,l)))}function Wh(t,e,a){var l=ze();Tu(t,e,a,l)}function Tu(t,e,a,l){var n={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(qi(t))Ph(e,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var r=e.lastRenderedState,o=u(r,a);if(n.hasEagerState=!0,n.eagerState=o,Ae(o,r))return Si(t,e,n,0),Ct===null&&bi(),!1}catch{}finally{}if(a=ys(t,e,n,l),a!==null)return ye(a,t,l),Ih(a,e,l),!0}return!1}function Bs(t,e,a,l){if(l={lane:2,revertLane:zr(),action:l,hasEagerState:!1,eagerState:null,next:null},qi(t)){if(e)throw Error(f(479))}else e=ys(t,a,l,2),e!==null&&ye(e,t,2)}function qi(t){var e=t.alternate;return t===ct||e!==null&&e===ct}function Ph(t,e){An=Mi=!0;var a=t.pending;a===null?e.next=e:(e.next=a.next,a.next=e),t.pending=e}function Ih(t,e,a){if(a&4194176){var l=e.lanes;l&=t.pendingLanes,a|=l,e.lanes=a,ro(t,a)}}var sa={readContext:ce,use:Hi,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};sa.useCacheRefresh=Gt,sa.useMemoCache=Gt,sa.useHostTransitionStatus=Gt,sa.useFormState=Gt,sa.useActionState=Gt,sa.useOptimistic=Gt;var Nl={readContext:ce,use:Hi,useCallback:function(t,e){return be().memoizedState=[t,e===void 0?null:e],t},useContext:ce,useEffect:Qh,useImperativeHandle:function(t,e,a){a=a!=null?a.concat([t]):null,xi(4194308,4,Gh.bind(null,e,t),a)},useLayoutEffect:function(t,e){return xi(4194308,4,t,e)},useInsertionEffect:function(t,e){xi(4,2,t,e)},useMemo:function(t,e){var a=be();e=e===void 0?null:e;var l=t();if(Ul){Ba(!0);try{t()}finally{Ba(!1)}}return a.memoizedState=[l,e],l},useReducer:function(t,e,a){var l=be();if(a!==void 0){var n=a(e);if(Ul){Ba(!0);try{a(e)}finally{Ba(!1)}}}else n=e;return l.memoizedState=l.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},l.queue=t,t=t.dispatch=wv.bind(null,ct,t),[l.memoizedState,t]},useRef:function(t){var e=be();return t={current:t},e.memoizedState=t},useState:function(t){t=Ns(t);var e=t.queue,a=Wh.bind(null,ct,e);return e.dispatch=a,[t.memoizedState,a]},useDebugValue:xs,useDeferredValue:function(t,e){var a=be();return ws(a,t,e)},useTransition:function(){var t=Ns(!1);return t=Kh.bind(null,ct,t.queue,!0,!1),be().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,a){var l=ct,n=be();if(St){if(a===void 0)throw Error(f(407));a=a()}else{if(a=e(),Ct===null)throw Error(f(349));vt&60||Th(l,e,a)}n.memoizedState=a;var u={value:a,getSnapshot:e};return n.queue=u,Qh(Ah.bind(null,l,u,t),[t]),l.flags|=2048,Dn(9,_h.bind(null,l,u,a,e),{destroy:void 0},null),a},useId:function(){var t=be(),e=Ct.identifierPrefix;if(St){var a=va,l=ma;a=(l&~(1<<32-_e(l)-1)).toString(32)+a,e=":"+e+"R"+a,a=Ui++,0 title"))),ae(u,l,a),u[ie]=t,$t(u),l=u;break t;case"link":var r=Dy("link","href",n).get(l+(a.href||""));if(r){for(var o=0;o<\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?n.createElement("select",{is:l.is}):n.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?n.createElement(a,{is:l.is}):n.createElement(a)}}t[ie]=e,t[ge]=l;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(ae(t,a,l),a){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&Oa(e)}}return Ht(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&Oa(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(f(166));if(t=Qa.current,ou(e)){if(t=e.stateNode,a=e.memoizedProps,l=null,n=de,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}t[ie]=e,t=!!(t.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||yy(t.nodeValue,a)),t||zl(e)}else t=ac(t).createTextNode(l),t[ie]=e,e.stateNode=t}return Ht(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=ou(e),l!==null&&l.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[ie]=e}else hu(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ht(e),n=!1}else We!==null&&(Er(We),We=null),n=!0;if(!n)return e.flags&256?(ga(e),e):(ga(e),null)}if(ga(e),e.flags&128)return e.lanes=a,e;if(a=l!==null,t=t!==null&&t.memoizedState!==null,a){l=e.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool);var u=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==n&&(l.flags|=2048)}return a!==t&&a&&(e.child.flags|=8192),Zi(e,e.updateQueue),Ht(e),null;case 4:return ln(),t===null&&Nr(e.stateNode.containerInfo),Ht(e),null;case 10:return Ea(e.type),Ht(e),null;case 19:if(Lt(Kt),n=e.memoizedState,n===null)return Ht(e),null;if(l=(e.flags&128)!==0,u=n.rendering,u===null)if(l)Nu(n,!1);else{if(qt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(u=zi(t),u!==null){for(e.flags|=128,Nu(n,!1),t=u.updateQueue,e.updateQueue=t,Zi(e,t),e.subtreeFlags=0,t=a,a=e.child;a!==null;)Ld(a,t),a=a.sibling;return Nt(Kt,Kt.current&1|2),e.child}t=t.sibling}n.tail!==null&&ua()>Ki&&(e.flags|=128,l=!0,Nu(n,!1),e.lanes=4194304)}else{if(!l)if(t=zi(u),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Zi(e,t),Nu(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!St)return Ht(e),null}else 2*ua()-n.renderingStartTime>Ki&&a!==536870912&&(e.flags|=128,l=!0,Nu(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=ua(),e.sibling=null,t=Kt.current,Nt(Kt,l?t&1|2:t&1),e):(Ht(e),null);case 22:case 23:return ga(e),Ss(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?a&536870912&&!(e.flags&128)&&(Ht(e),e.subtreeFlags&6&&(e.flags|=8192)):Ht(e),a=e.updateQueue,a!==null&&Zi(e,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==a&&(e.flags|=2048),t!==null&&Lt(Ml),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Ea(Jt),Ht(e),null;case 25:return null}throw Error(f(156,e.tag))}function Xv(t,e){switch(vs(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ea(Jt),ln(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return li(e),null;case 13:if(ga(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(f(340));hu()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Lt(Kt),null;case 4:return ln(),null;case 10:return Ea(e.type),null;case 22:case 23:return ga(e),Ss(),t!==null&&Lt(Ml),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Ea(Jt),null;case 25:return null;default:return null}}function Zd(t,e){switch(vs(e),e.tag){case 3:Ea(Jt),ln();break;case 26:case 27:case 5:li(e);break;case 4:ln();break;case 13:ga(e);break;case 19:Lt(Kt);break;case 10:Ea(e.type);break;case 22:case 23:ga(e),Ss(),t!==null&&Lt(Ml);break;case 24:Ea(Jt)}}var Vv={getCacheForType:function(t){var e=ce(Jt),a=e.data.get(t);return a===void 0&&(a=t(),e.data.set(t,a)),a}},Zv=typeof WeakMap=="function"?WeakMap:Map,jt=0,Ct=null,rt=null,vt=0,Mt=0,Re=null,Da=!1,Mn=!1,yr=!1,Ra=0,qt=0,el=0,Bl=0,mr=0,Xe=0,Un=0,Hu=null,ra=null,vr=!1,gr=0,Ki=1/0,Ji=null,al=null,ki=!1,Yl=null,ju=0,pr=0,br=null,xu=0,Sr=null;function ze(){if(jt&2&&vt!==0)return vt&-vt;if(j.T!==null){var t=Tn;return t!==0?t:zr()}return oo()}function Kd(){Xe===0&&(Xe=!(vt&536870912)||St?io():536870912);var t=Be.current;return t!==null&&(t.flags|=32),Xe}function ye(t,e,a){(t===Ct&&Mt===2||t.cancelPendingCommit!==null)&&(Nn(t,0),za(t,vt,Xe,!1)),In(t,a),(!(jt&2)||t!==Ct)&&(t===Ct&&(!(jt&2)&&(Bl|=a),qt===4&&za(t,vt,Xe,!1)),fa(t))}function Jd(t,e,a){if(jt&6)throw Error(f(327));var l=!a&&(e&60)===0&&(e&t.expiredLanes)===0||Pn(t,e),n=l?kv(t,e):Ar(t,e,!0),u=l;do{if(n===0){Mn&&!l&&za(t,e,0,!1);break}else if(n===6)za(t,e,0,!Da);else{if(a=t.current.alternate,u&&!Kv(a)){n=Ar(t,e,!1),u=!1;continue}if(n===2){if(u=e,t.errorRecoveryDisabledLanes&u)var r=0;else r=t.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){e=r;t:{var o=t;n=Hu;var h=o.current.memoizedState.isDehydrated;if(h&&(Nn(o,r).flags|=256),r=Ar(o,r,!1),r!==2){if(yr&&!h){o.errorRecoveryDisabledLanes|=u,Bl|=u,n=4;break t}u=ra,ra=n,u!==null&&Er(u)}n=r}if(u=!1,n!==2)continue}}if(n===1){Nn(t,0),za(t,e,0,!0);break}t:{switch(l=t,n){case 0:case 1:throw Error(f(345));case 4:if((e&4194176)===e){za(l,e,Xe,!Da);break t}break;case 2:ra=null;break;case 3:case 5:break;default:throw Error(f(329))}if(l.finishedWork=a,l.finishedLanes=e,(e&62914560)===e&&(u=gr+300-ua(),10a?32:a,j.T=null,Yl===null)var u=!1;else{a=br,br=null;var r=Yl,o=ju;if(Yl=null,ju=0,jt&6)throw Error(f(331));var h=jt;if(jt|=4,Yd(r.current),qd(r,r.current,o,a),jt=h,wu(0,!1),Te&&typeof Te.onPostCommitFiberRoot=="function")try{Te.onPostCommitFiberRoot(Wn,r)}catch{}u=!0}return u}finally{Q.p=n,j.T=l,ay(t,e)}}return!1}function ly(t,e,a){e=we(a,e),e=Ls(t.stateNode,e,2),t=Fa(t,e,2),t!==null&&(In(t,2),fa(t))}function zt(t,e,a){if(t.tag===3)ly(t,t,a);else for(;e!==null;){if(e.tag===3){ly(e,t,a);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(al===null||!al.has(l))){t=we(a,t),a=id(2),l=Fa(e,a,2),l!==null&&(cd(a,l,e,t),In(l,2),fa(l));break}}e=e.return}}function Or(t,e,a){var l=t.pingCache;if(l===null){l=t.pingCache=new Zv;var n=new Set;l.set(e,n)}else n=l.get(e),n===void 0&&(n=new Set,l.set(e,n));n.has(a)||(yr=!0,n.add(a),t=Wv.bind(null,t,e,a),e.then(t,t))}function Wv(t,e,a){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Ct===t&&(vt&a)===a&&(qt===4||qt===3&&(vt&62914560)===vt&&300>ua()-gr?!(jt&2)&&Nn(t,0):mr|=a,Un===vt&&(Un=0)),fa(t)}function ny(t,e){e===0&&(e=co()),t=La(t,e),t!==null&&(In(t,e),fa(t))}function Pv(t){var e=t.memoizedState,a=0;e!==null&&(a=e.retryLane),ny(t,a)}function Iv(t,e){var a=0;switch(t.tag){case 13:var l=t.stateNode,n=t.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(f(314))}l!==null&&l.delete(e),ny(t,a)}function t1(t,e){return Xc(t,e)}var Wi=null,xn=null,Dr=!1,Pi=!1,Rr=!1,Gl=0;function fa(t){t!==xn&&t.next===null&&(xn===null?Wi=xn=t:xn=xn.next=t),Pi=!0,Dr||(Dr=!0,a1(e1))}function wu(t,e){if(!Rr&&Pi){Rr=!0;do for(var a=!1,l=Wi;l!==null;){if(t!==0){var n=l.pendingLanes;if(n===0)var u=0;else{var r=l.suspendedLanes,o=l.pingedLanes;u=(1<<31-_e(42|t)+1)-1,u&=n&~(r&~o),u=u&201326677?u&201326677|1:u?u|2:0}u!==0&&(a=!0,cy(l,u))}else u=vt,u=ci(l,l===Ct?u:0),!(u&3)||Pn(l,u)||(a=!0,cy(l,u));l=l.next}while(a);Rr=!1}}function e1(){Pi=Dr=!1;var t=0;Gl!==0&&(f1()&&(t=Gl),Gl=0);for(var e=ua(),a=null,l=Wi;l!==null;){var n=l.next,u=uy(l,e);u===0?(l.next=null,a===null?Wi=n:a.next=n,n===null&&(xn=a)):(a=l,(t!==0||u&3)&&(Pi=!0)),l=n}wu(t)}function uy(t,e){for(var a=t.suspendedLanes,l=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0"u"?null:document;function Ty(t,e,a){var l=qn;if(l&&typeof e=="string"&&e){var n=je(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),Ey.has(n)||(Ey.add(n),t={rel:t,crossOrigin:a,href:e},l.querySelector(n)===null&&(e=l.createElement("link"),ae(e,"link",t),$t(e),l.head.appendChild(e)))}}function p1(t){Ca.D(t),Ty("dns-prefetch",t,null)}function b1(t,e){Ca.C(t,e),Ty("preconnect",t,e)}function S1(t,e,a){Ca.L(t,e,a);var l=qn;if(l&&t&&e){var n='link[rel="preload"][as="'+je(e)+'"]';e==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+je(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+je(a.imageSizes)+'"]')):n+='[href="'+je(t)+'"]';var u=n;switch(e){case"style":u=Qn(t);break;case"script":u=Bn(t)}Ve.has(u)||(t=ut({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),Ve.set(u,t),l.querySelector(n)!==null||e==="style"&&l.querySelector(Bu(u))||e==="script"&&l.querySelector(Yu(u))||(e=l.createElement("link"),ae(e,"link",t),$t(e),l.head.appendChild(e)))}}function E1(t,e){Ca.m(t,e);var a=qn;if(a&&t){var l=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+je(l)+'"][href="'+je(t)+'"]',u=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Bn(t)}if(!Ve.has(u)&&(t=ut({rel:"modulepreload",href:t},e),Ve.set(u,t),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Yu(u)))return}l=a.createElement("link"),ae(l,"link",t),$t(l),a.head.appendChild(l)}}}function T1(t,e,a){Ca.S(t,e,a);var l=qn;if(l&&t){var n=cn(l).hoistableStyles,u=Qn(t);e=e||"default";var r=n.get(u);if(!r){var o={loading:0,preload:null};if(r=l.querySelector(Bu(u)))o.loading=5;else{t=ut({rel:"stylesheet",href:t,"data-precedence":e},a),(a=Ve.get(u))&&Gr(t,a);var h=r=l.createElement("link");$t(h),ae(h,"link",t),h._p=new Promise(function(g,z){h.onload=g,h.onerror=z}),h.addEventListener("load",function(){o.loading|=1}),h.addEventListener("error",function(){o.loading|=2}),o.loading|=4,nc(r,e,l)}r={type:"stylesheet",instance:r,count:1,state:o},n.set(u,r)}}}function _1(t,e){Ca.X(t,e);var a=qn;if(a&&t){var l=cn(a).hoistableScripts,n=Bn(t),u=l.get(n);u||(u=a.querySelector(Yu(n)),u||(t=ut({src:t,async:!0},e),(e=Ve.get(n))&&Lr(t,e),u=a.createElement("script"),$t(u),ae(u,"link",t),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(n,u))}}function A1(t,e){Ca.M(t,e);var a=qn;if(a&&t){var l=cn(a).hoistableScripts,n=Bn(t),u=l.get(n);u||(u=a.querySelector(Yu(n)),u||(t=ut({src:t,async:!0,type:"module"},e),(e=Ve.get(n))&&Lr(t,e),u=a.createElement("script"),$t(u),ae(u,"link",t),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(n,u))}}function _y(t,e,a,l){var n=(n=Qa.current)?lc(n):null;if(!n)throw Error(f(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(e=Qn(a.href),a=cn(n).hoistableStyles,l=a.get(e),l||(l={type:"style",instance:null,count:0,state:null},a.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Qn(a.href);var u=cn(n).hoistableStyles,r=u.get(t);if(r||(n=n.ownerDocument||n,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,r),(u=n.querySelector(Bu(t)))&&!u._p&&(r.instance=u,r.state.loading=5),Ve.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ve.set(t,a),u||O1(n,t,a,r.state))),e&&l===null)throw Error(f(528,""));return r}if(e&&l!==null)throw Error(f(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Bn(a),a=cn(n).hoistableScripts,l=a.get(e),l||(l={type:"script",instance:null,count:0,state:null},a.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(f(444,t))}}function Qn(t){return'href="'+je(t)+'"'}function Bu(t){return'link[rel="stylesheet"]['+t+"]"}function Ay(t){return ut({},t,{"data-precedence":t.precedence,precedence:null})}function O1(t,e,a,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),ae(e,"link",a),$t(e),t.head.appendChild(e))}function Bn(t){return'[src="'+je(t)+'"]'}function Yu(t){return"script[async]"+t}function Oy(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+je(a.href)+'"]');if(l)return e.instance=l,$t(l),l;var n=ut({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),$t(l),ae(l,"style",n),nc(l,a.precedence,t),e.instance=l;case"stylesheet":n=Qn(a.href);var u=t.querySelector(Bu(n));if(u)return e.state.loading|=4,e.instance=u,$t(u),u;l=Ay(a),(n=Ve.get(n))&&Gr(l,n),u=(t.ownerDocument||t).createElement("link"),$t(u);var r=u;return r._p=new Promise(function(o,h){r.onload=o,r.onerror=h}),ae(u,"link",l),e.state.loading|=4,nc(u,a.precedence,t),e.instance=u;case"script":return u=Bn(a.src),(n=t.querySelector(Yu(u)))?(e.instance=n,$t(n),n):(l=a,(n=Ve.get(u))&&(l=ut({},a),Lr(l,n)),t=t.ownerDocument||t,n=t.createElement("script"),$t(n),ae(n,"link",l),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)&&(l=e.instance,e.state.loading|=4,nc(l,a.precedence,t));return e.instance}function nc(t,e,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,u=n,r=0;r title"):null)}function D1(t,e,a){if(a===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 zy(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}var Gu=null;function R1(){}function z1(t,e,a){if(Gu===null)throw Error(f(475));var l=Gu;if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var n=Qn(a.href),u=t.querySelector(Bu(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=ic.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=u,$t(u);return}u=t.ownerDocument||t,a=Ay(a),(n=Ve.get(n))&&Gr(a,n),u=u.createElement("link"),$t(u);var r=u;r._p=new Promise(function(o,h){r.onload=o,r.onerror=h}),ae(u,"link",a),e.instance=u}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&!(e.state.loading&3)&&(l.count++,e=ic.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}function C1(){if(Gu===null)throw Error(f(475));var t=Gu;return t.stylesheets&&t.count===0&&Xr(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(),bc.exports=ky(),bc.exports}var Fy=$y();const Wy=bt(Fy);var Gn=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(){}},fl=typeof window>"u"||"Deno"in globalThis;function Ce(){}function Py(c,i){return typeof c=="function"?c(i):c}function _c(c){return typeof c=="number"&&c>=0&&c!==1/0}function yf(c,i){return Math.max(c+(i||0)-Date.now(),0)}function Ll(c,i){return typeof c=="function"?c(i):c}function Ze(c,i){return typeof c=="function"?c(i):c}function mf(c,i){const{type:s="all",exact:f,fetchStatus:d,predicate:p,queryKey:T,stale:R}=c;if(T){if(f){if(i.queryHash!==Ac(T,i.options))return!1}else if(!Xn(i.queryKey,T))return!1}if(s!=="all"){const _=i.isActive();if(s==="active"&&!_||s==="inactive"&&_)return!1}return!(typeof R=="boolean"&&i.isStale()!==R||d&&d!==i.state.fetchStatus||p&&!p(i))}function vf(c,i){const{exact:s,status:f,predicate:d,mutationKey:p}=c;if(p){if(!i.options.mutationKey)return!1;if(s){if(Ln(i.options.mutationKey)!==Ln(p))return!1}else if(!Xn(i.options.mutationKey,p))return!1}return!(f&&i.state.status!==f||d&&!d(i))}function Ac(c,i){return((i==null?void 0:i.queryKeyHashFn)||Ln)(c)}function Ln(c){return JSON.stringify(c,(i,s)=>Dc(s)?Object.keys(s).sort().reduce((f,d)=>(f[d]=s[d],f),{}):s)}function Xn(c,i){return c===i?!0:typeof c!=typeof i?!1:c&&i&&typeof c=="object"&&typeof i=="object"?!Object.keys(i).some(s=>!Xn(c[s],i[s])):!1}function gf(c,i){if(c===i)return c;const s=pf(c)&&pf(i);if(s||Dc(c)&&Dc(i)){const f=s?c:Object.keys(c),d=f.length,p=s?i:Object.keys(i),T=p.length,R=s?[]:{};let _=0;for(let S=0;S{setTimeout(i,c)})}function Rc(c,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(c,i):s.structuralSharing!==!1?gf(c,i):i}function t0(c,i,s=0){const f=[...c,i];return s&&f.length>s?f.slice(1):f}function e0(c,i,s=0){const f=[i,...c];return s&&f.length>s?f.slice(0,-1):f}var zc=Symbol();function Sf(c,i){return!c.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!c.queryFn||c.queryFn===zc?()=>Promise.reject(new Error(`Missing queryFn: '${c.queryHash}'`)):c.queryFn}var a0=(kf=class extends Gn{constructor(){super();I(this,hl);I(this,Ua);I(this,Vl);B(this,Vl,i=>{if(!fl&&window.addEventListener){const s=()=>i();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){v(this,Ua)||this.setEventListener(v(this,Vl))}onUnsubscribe(){var i;this.hasListeners()||((i=v(this,Ua))==null||i.call(this),B(this,Ua,void 0))}setEventListener(i){var s;B(this,Vl,i),(s=v(this,Ua))==null||s.call(this),B(this,Ua,i(f=>{typeof f=="boolean"?this.setFocused(f):this.onFocus()}))}setFocused(i){v(this,hl)!==i&&(B(this,hl,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(s=>{s(i)})}isFocused(){var i;return typeof v(this,hl)=="boolean"?v(this,hl):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},hl=new WeakMap,Ua=new WeakMap,Vl=new WeakMap,kf),Cc=new a0,l0=($f=class extends Gn{constructor(){super();I(this,Zl,!0);I(this,Na);I(this,Kl);B(this,Kl,i=>{if(!fl&&window.addEventListener){const s=()=>i(!0),f=()=>i(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",f,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",f)}}})}onSubscribe(){v(this,Na)||this.setEventListener(v(this,Kl))}onUnsubscribe(){var i;this.hasListeners()||((i=v(this,Na))==null||i.call(this),B(this,Na,void 0))}setEventListener(i){var s;B(this,Kl,i),(s=v(this,Na))==null||s.call(this),B(this,Na,i(this.setOnline.bind(this)))}setOnline(i){v(this,Zl)!==i&&(B(this,Zl,i),this.listeners.forEach(f=>{f(i)}))}isOnline(){return v(this,Zl)}},Zl=new WeakMap,Na=new WeakMap,Kl=new WeakMap,$f),ku=new l0;function Mc(){let c,i;const s=new Promise((d,p)=>{c=d,i=p});s.status="pending",s.catch(()=>{});function f(d){Object.assign(s,d),delete s.resolve,delete s.reject}return s.resolve=d=>{f({status:"fulfilled",value:d}),c(d)},s.reject=d=>{f({status:"rejected",reason:d}),i(d)},s}function n0(c){return Math.min(1e3*2**c,3e4)}function Ef(c){return(c??"online")==="online"?ku.isOnline():!0}var Tf=class extends Error{constructor(c){super("CancelledError"),this.revert=c==null?void 0:c.revert,this.silent=c==null?void 0:c.silent}};function Uc(c){return c instanceof Tf}function _f(c){let i=!1,s=0,f=!1,d;const p=Mc(),T=L=>{var G;f||(w(new Tf(L)),(G=c.abort)==null||G.call(c))},R=()=>{i=!0},_=()=>{i=!1},S=()=>Cc.isFocused()&&(c.networkMode==="always"||ku.isOnline())&&c.canRun(),H=()=>Ef(c.networkMode)&&c.canRun(),U=L=>{var G;f||(f=!0,(G=c.onSuccess)==null||G.call(c,L),d==null||d(),p.resolve(L))},w=L=>{var G;f||(f=!0,(G=c.onError)==null||G.call(c,L),d==null||d(),p.reject(L))},q=()=>new Promise(L=>{var G;d=K=>{(f||S())&&L(K)},(G=c.onPause)==null||G.call(c)}).then(()=>{var L;d=void 0,f||(L=c.onContinue)==null||L.call(c)}),$=()=>{if(f)return;let L;const G=s===0?c.initialPromise:void 0;try{L=G??c.fn()}catch(K){L=Promise.reject(K)}Promise.resolve(L).then(U).catch(K=>{var ot;if(f)return;const J=c.retry??(fl?0:3),nt=c.retryDelay??n0,tt=typeof nt=="function"?nt(s,K):nt,X=J===!0||typeof J=="number"&&sS()?void 0:q()).then(()=>{i?w(K):$()})})};return{promise:p,cancel:T,continue:()=>(d==null||d(),p),cancelRetry:R,continueRetry:_,canStart:H,start:()=>(H()?$():q().then($),p)}}function u0(){let c=[],i=0,s=R=>{R()},f=R=>{R()},d=R=>setTimeout(R,0);const p=R=>{i?c.push(R):d(()=>{s(R)})},T=()=>{const R=c;c=[],R.length&&d(()=>{f(()=>{R.forEach(_=>{s(_)})})})};return{batch:R=>{let _;i++;try{_=R()}finally{i--,i||T()}return _},batchCalls:R=>(..._)=>{p(()=>{R(..._)})},schedule:p,setNotifyFunction:R=>{s=R},setBatchNotifyFunction:R=>{f=R},setScheduler:R=>{d=R}}}var It=u0(),Af=(Ff=class{constructor(){I(this,dl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_c(this.gcTime)&&B(this,dl,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(c){this.gcTime=Math.max(this.gcTime||0,c??(fl?1/0:5*60*1e3))}clearGcTimeout(){v(this,dl)&&(clearTimeout(v(this,dl)),B(this,dl,void 0))}},dl=new WeakMap,Ff),i0=(Wf=class extends Af{constructor(i){super();I(this,ke);I(this,Jl);I(this,kl);I(this,Ue);I(this,yl);I(this,ne);I(this,Kn);I(this,ml);B(this,ml,!1),B(this,Kn,i.defaultOptions),this.setOptions(i.options),this.observers=[],B(this,yl,i.client),B(this,Ue,v(this,yl).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,B(this,Jl,c0(this.options)),this.state=i.state??v(this,Jl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var i;return(i=v(this,ne))==null?void 0:i.promise}setOptions(i){this.options={...v(this,Kn),...i},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&v(this,Ue).remove(this)}setData(i,s){const f=Rc(this.state.data,i,this.options);return dt(this,ke,Ma).call(this,{data:f,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),f}setState(i,s){dt(this,ke,Ma).call(this,{type:"setState",state:i,setStateOptions:s})}cancel(i){var f,d;const s=(f=v(this,ne))==null?void 0:f.promise;return(d=v(this,ne))==null||d.cancel(i),s?s.then(Ce).catch(Ce):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(v(this,Jl))}isActive(){return this.observers.some(i=>Ze(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zc||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||!yf(this.state.dataUpdatedAt,i)}onFocus(){var s;const i=this.observers.find(f=>f.shouldFetchOnWindowFocus());i==null||i.refetch({cancelRefetch:!1}),(s=v(this,ne))==null||s.continue()}onOnline(){var s;const i=this.observers.find(f=>f.shouldFetchOnReconnect());i==null||i.refetch({cancelRefetch:!1}),(s=v(this,ne))==null||s.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),v(this,Ue).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){this.observers.includes(i)&&(this.observers=this.observers.filter(s=>s!==i),this.observers.length||(v(this,ne)&&(v(this,ml)?v(this,ne).cancel({revert:!0}):v(this,ne).cancelRetry()),this.scheduleGc()),v(this,Ue).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||dt(this,ke,Ma).call(this,{type:"invalidate"})}fetch(i,s){var _,S,H;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(v(this,ne))return v(this,ne).continueRetry(),v(this,ne).promise}if(i&&this.setOptions(i),!this.options.queryFn){const U=this.observers.find(w=>w.options.queryFn);U&&this.setOptions(U.options)}const f=new AbortController,d=U=>{Object.defineProperty(U,"signal",{enumerable:!0,get:()=>(B(this,ml,!0),f.signal)})},p=()=>{const U=Sf(this.options,s),w={client:v(this,yl),queryKey:this.queryKey,meta:this.meta};return d(w),B(this,ml,!1),this.options.persister?this.options.persister(U,w,this):U(w)},T={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:v(this,yl),state:this.state,fetchFn:p};d(T),(_=this.options.behavior)==null||_.onFetch(T,this),B(this,kl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((S=T.fetchOptions)==null?void 0:S.meta))&&dt(this,ke,Ma).call(this,{type:"fetch",meta:(H=T.fetchOptions)==null?void 0:H.meta});const R=U=>{var w,q,$,L;Uc(U)&&U.silent||dt(this,ke,Ma).call(this,{type:"error",error:U}),Uc(U)||((q=(w=v(this,Ue).config).onError)==null||q.call(w,U,this),(L=($=v(this,Ue).config).onSettled)==null||L.call($,this.state.data,U,this)),this.scheduleGc()};return B(this,ne,_f({initialPromise:s==null?void 0:s.initialPromise,fn:T.fetchFn,abort:f.abort.bind(f),onSuccess:U=>{var w,q,$,L;if(U===void 0){R(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(U)}catch(G){R(G);return}(q=(w=v(this,Ue).config).onSuccess)==null||q.call(w,U,this),(L=($=v(this,Ue).config).onSettled)==null||L.call($,U,this.state.error,this),this.scheduleGc()},onError:R,onFail:(U,w)=>{dt(this,ke,Ma).call(this,{type:"failed",failureCount:U,error:w})},onPause:()=>{dt(this,ke,Ma).call(this,{type:"pause"})},onContinue:()=>{dt(this,ke,Ma).call(this,{type:"continue"})},retry:T.options.retry,retryDelay:T.options.retryDelay,networkMode:T.options.networkMode,canRun:()=>!0})),v(this,ne).start()}},Jl=new WeakMap,kl=new WeakMap,Ue=new WeakMap,yl=new WeakMap,ne=new WeakMap,Kn=new WeakMap,ml=new WeakMap,ke=new WeakSet,Ma=function(i){const s=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,...Of(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 d=i.error;return Uc(d)&&d.revert&&v(this,kl)?{...v(this,kl),fetchStatus:"idle"}:{...f,error:d,errorUpdateCount:f.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:f.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...f,isInvalidated:!0};case"setState":return{...f,...i.state}}};this.state=s(this.state),It.batch(()=>{this.observers.forEach(f=>{f.onQueryUpdate()}),v(this,Ue).notify({query:this,type:"updated",action:i})})},Wf);function Of(c,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ef(i.networkMode)?"fetching":"paused",...c===void 0&&{error:null,status:"pending"}}}function c0(c){const i=typeof c.initialData=="function"?c.initialData():c.initialData,s=i!==void 0,f=s?typeof c.initialDataUpdatedAt=="function"?c.initialDataUpdatedAt():c.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?f??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var s0=(Pf=class extends Gn{constructor(i={}){super();I(this,ta);this.config=i,B(this,ta,new Map)}build(i,s,f){const d=s.queryKey,p=s.queryHash??Ac(d,s);let T=this.get(p);return T||(T=new i0({client:i,queryKey:d,queryHash:p,options:i.defaultQueryOptions(s),state:f,defaultOptions:i.getQueryDefaults(d)}),this.add(T)),T}add(i){v(this,ta).has(i.queryHash)||(v(this,ta).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const s=v(this,ta).get(i.queryHash);s&&(i.destroy(),s===i&&v(this,ta).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){It.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return v(this,ta).get(i)}getAll(){return[...v(this,ta).values()]}find(i){const s={exact:!0,...i};return this.getAll().find(f=>mf(s,f))}findAll(i={}){const s=this.getAll();return Object.keys(i).length>0?s.filter(f=>mf(i,f)):s}notify(i){It.batch(()=>{this.listeners.forEach(s=>{s(i)})})}onFocus(){It.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){It.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},ta=new WeakMap,Pf),r0=(If=class extends Af{constructor(i){super();I(this,aa);I(this,ea);I(this,re);I(this,vl);this.mutationId=i.mutationId,B(this,re,i.mutationCache),B(this,ea,[]),this.state=i.state||f0(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){v(this,ea).includes(i)||(v(this,ea).push(i),this.clearGcTimeout(),v(this,re).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){B(this,ea,v(this,ea).filter(s=>s!==i)),this.scheduleGc(),v(this,re).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){v(this,ea).length||(this.state.status==="pending"?this.scheduleGc():v(this,re).remove(this))}continue(){var i;return((i=v(this,vl))==null?void 0:i.continue())??this.execute(this.state.variables)}async execute(i){var d,p,T,R,_,S,H,U,w,q,$,L,G,K,J,nt,tt,X,ot,At;B(this,vl,_f({fn:()=>this.options.mutationFn?this.options.mutationFn(i):Promise.reject(new Error("No mutationFn found")),onFail:(pt,j)=>{dt(this,aa,sl).call(this,{type:"failed",failureCount:pt,error:j})},onPause:()=>{dt(this,aa,sl).call(this,{type:"pause"})},onContinue:()=>{dt(this,aa,sl).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>v(this,re).canRun(this)}));const s=this.state.status==="pending",f=!v(this,vl).canStart();try{if(!s){dt(this,aa,sl).call(this,{type:"pending",variables:i,isPaused:f}),await((p=(d=v(this,re).config).onMutate)==null?void 0:p.call(d,i,this));const j=await((R=(T=this.options).onMutate)==null?void 0:R.call(T,i));j!==this.state.context&&dt(this,aa,sl).call(this,{type:"pending",context:j,variables:i,isPaused:f})}const pt=await v(this,vl).start();return await((S=(_=v(this,re).config).onSuccess)==null?void 0:S.call(_,pt,i,this.state.context,this)),await((U=(H=this.options).onSuccess)==null?void 0:U.call(H,pt,i,this.state.context)),await((q=(w=v(this,re).config).onSettled)==null?void 0:q.call(w,pt,null,this.state.variables,this.state.context,this)),await((L=($=this.options).onSettled)==null?void 0:L.call($,pt,null,i,this.state.context)),dt(this,aa,sl).call(this,{type:"success",data:pt}),pt}catch(pt){try{throw await((K=(G=v(this,re).config).onError)==null?void 0:K.call(G,pt,i,this.state.context,this)),await((nt=(J=this.options).onError)==null?void 0:nt.call(J,pt,i,this.state.context)),await((X=(tt=v(this,re).config).onSettled)==null?void 0:X.call(tt,void 0,pt,this.state.variables,this.state.context,this)),await((At=(ot=this.options).onSettled)==null?void 0:At.call(ot,void 0,pt,i,this.state.context)),pt}finally{dt(this,aa,sl).call(this,{type:"error",error:pt})}}finally{v(this,re).runNext(this)}}},ea=new WeakMap,re=new WeakMap,vl=new WeakMap,aa=new WeakSet,sl=function(i){const s=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=s(this.state),It.batch(()=>{v(this,ea).forEach(f=>{f.onMutationUpdate(i)}),v(this,re).notify({mutation:this,type:"updated",action:i})})},If);function f0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var o0=(to=class extends Gn{constructor(i={}){super();I(this,ha);I(this,$e);I(this,Jn);this.config=i,B(this,ha,new Set),B(this,$e,new Map),B(this,Jn,0)}build(i,s,f){const d=new r0({mutationCache:this,mutationId:++mc(this,Jn)._,options:i.defaultMutationOptions(s),state:f});return this.add(d),d}add(i){v(this,ha).add(i);const s=$u(i);if(typeof s=="string"){const f=v(this,$e).get(s);f?f.push(i):v(this,$e).set(s,[i])}this.notify({type:"added",mutation:i})}remove(i){if(v(this,ha).delete(i)){const s=$u(i);if(typeof s=="string"){const f=v(this,$e).get(s);if(f)if(f.length>1){const d=f.indexOf(i);d!==-1&&f.splice(d,1)}else f[0]===i&&v(this,$e).delete(s)}}this.notify({type:"removed",mutation:i})}canRun(i){const s=$u(i);if(typeof s=="string"){const f=v(this,$e).get(s),d=f==null?void 0:f.find(p=>p.state.status==="pending");return!d||d===i}else return!0}runNext(i){var f;const s=$u(i);if(typeof s=="string"){const d=(f=v(this,$e).get(s))==null?void 0:f.find(p=>p!==i&&p.state.isPaused);return(d==null?void 0:d.continue())??Promise.resolve()}else return Promise.resolve()}clear(){It.batch(()=>{v(this,ha).forEach(i=>{this.notify({type:"removed",mutation:i})}),v(this,ha).clear(),v(this,$e).clear()})}getAll(){return Array.from(v(this,ha))}find(i){const s={exact:!0,...i};return this.getAll().find(f=>vf(s,f))}findAll(i={}){return this.getAll().filter(s=>vf(i,s))}notify(i){It.batch(()=>{this.listeners.forEach(s=>{s(i)})})}resumePausedMutations(){const i=this.getAll().filter(s=>s.state.isPaused);return It.batch(()=>Promise.all(i.map(s=>s.continue().catch(Ce))))}},ha=new WeakMap,$e=new WeakMap,Jn=new WeakMap,to);function $u(c){var i;return(i=c.options.scope)==null?void 0:i.id}function Df(c){return{onFetch:(i,s)=>{var H,U,w,q,$;const f=i.options,d=(w=(U=(H=i.fetchOptions)==null?void 0:H.meta)==null?void 0:U.fetchMore)==null?void 0:w.direction,p=((q=i.state.data)==null?void 0:q.pages)||[],T=(($=i.state.data)==null?void 0:$.pageParams)||[];let R={pages:[],pageParams:[]},_=0;const S=async()=>{let L=!1;const G=nt=>{Object.defineProperty(nt,"signal",{enumerable:!0,get:()=>(i.signal.aborted?L=!0:i.signal.addEventListener("abort",()=>{L=!0}),i.signal)})},K=Sf(i.options,i.fetchOptions),J=async(nt,tt,X)=>{if(L)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};G(ot);const At=await K(ot),{maxPages:pt}=i.options,j=X?e0:t0;return{pages:j(nt.pages,At,pt),pageParams:j(nt.pageParams,tt,pt)}};if(d&&p.length){const nt=d==="backward",tt=nt?h0:Rf,X={pages:p,pageParams:T},ot=tt(f,X);R=await J(X,ot,nt)}else{const nt=c??p.length;do{const tt=_===0?T[0]??f.initialPageParam:Rf(f,R);if(_>0&&tt==null)break;R=await J(R,tt),_++}while(_{var L,G;return(G=(L=i.options).persister)==null?void 0:G.call(L,S,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s)}:i.fetchFn=S}}}function Rf(c,{pages:i,pageParams:s}){const f=i.length-1;return i.length>0?c.getNextPageParam(i[f],i,s[f],s):void 0}function h0(c,{pages:i,pageParams:s}){var f;return i.length>0?(f=c.getPreviousPageParam)==null?void 0:f.call(c,i[0],i,s[0],s):void 0}var d0=(eo=class{constructor(c={}){I(this,xt);I(this,Ha);I(this,ja);I(this,$l);I(this,Fl);I(this,xa);I(this,Wl);I(this,Pl);B(this,xt,c.queryCache||new s0),B(this,Ha,c.mutationCache||new o0),B(this,ja,c.defaultOptions||{}),B(this,$l,new Map),B(this,Fl,new Map),B(this,xa,0)}mount(){mc(this,xa)._++,v(this,xa)===1&&(B(this,Wl,Cc.subscribe(async c=>{c&&(await this.resumePausedMutations(),v(this,xt).onFocus())})),B(this,Pl,ku.subscribe(async c=>{c&&(await this.resumePausedMutations(),v(this,xt).onOnline())})))}unmount(){var c,i;mc(this,xa)._--,v(this,xa)===0&&((c=v(this,Wl))==null||c.call(this),B(this,Wl,void 0),(i=v(this,Pl))==null||i.call(this),B(this,Pl,void 0))}isFetching(c){return v(this,xt).findAll({...c,fetchStatus:"fetching"}).length}isMutating(c){return v(this,Ha).findAll({...c,status:"pending"}).length}getQueryData(c){var s;const i=this.defaultQueryOptions({queryKey:c});return(s=v(this,xt).get(i.queryHash))==null?void 0:s.state.data}ensureQueryData(c){const i=this.defaultQueryOptions(c),s=v(this,xt).build(this,i),f=s.state.data;return f===void 0?this.fetchQuery(c):(c.revalidateIfStale&&s.isStaleByTime(Ll(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(f))}getQueriesData(c){return v(this,xt).findAll(c).map(({queryKey:i,state:s})=>{const f=s.data;return[i,f]})}setQueryData(c,i,s){const f=this.defaultQueryOptions({queryKey:c}),d=v(this,xt).get(f.queryHash),p=d==null?void 0:d.state.data,T=Py(i,p);if(T!==void 0)return v(this,xt).build(this,f).setData(T,{...s,manual:!0})}setQueriesData(c,i,s){return It.batch(()=>v(this,xt).findAll(c).map(({queryKey:f})=>[f,this.setQueryData(f,i,s)]))}getQueryState(c){var s;const i=this.defaultQueryOptions({queryKey:c});return(s=v(this,xt).get(i.queryHash))==null?void 0:s.state}removeQueries(c){const i=v(this,xt);It.batch(()=>{i.findAll(c).forEach(s=>{i.remove(s)})})}resetQueries(c,i){const s=v(this,xt),f={type:"active",...c};return It.batch(()=>(s.findAll(c).forEach(d=>{d.reset()}),this.refetchQueries(f,i)))}cancelQueries(c,i={}){const s={revert:!0,...i},f=It.batch(()=>v(this,xt).findAll(c).map(d=>d.cancel(s)));return Promise.all(f).then(Ce).catch(Ce)}invalidateQueries(c,i={}){return It.batch(()=>{if(v(this,xt).findAll(c).forEach(f=>{f.invalidate()}),(c==null?void 0:c.refetchType)==="none")return Promise.resolve();const s={...c,type:(c==null?void 0:c.refetchType)??(c==null?void 0:c.type)??"active"};return this.refetchQueries(s,i)})}refetchQueries(c,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},f=It.batch(()=>v(this,xt).findAll(c).filter(d=>!d.isDisabled()).map(d=>{let p=d.fetch(void 0,s);return s.throwOnError||(p=p.catch(Ce)),d.state.fetchStatus==="paused"?Promise.resolve():p}));return Promise.all(f).then(Ce)}fetchQuery(c){const i=this.defaultQueryOptions(c);i.retry===void 0&&(i.retry=!1);const s=v(this,xt).build(this,i);return s.isStaleByTime(Ll(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(c){return this.fetchQuery(c).then(Ce).catch(Ce)}fetchInfiniteQuery(c){return c.behavior=Df(c.pages),this.fetchQuery(c)}prefetchInfiniteQuery(c){return this.fetchInfiniteQuery(c).then(Ce).catch(Ce)}ensureInfiniteQueryData(c){return c.behavior=Df(c.pages),this.ensureQueryData(c)}resumePausedMutations(){return ku.isOnline()?v(this,Ha).resumePausedMutations():Promise.resolve()}getQueryCache(){return v(this,xt)}getMutationCache(){return v(this,Ha)}getDefaultOptions(){return v(this,ja)}setDefaultOptions(c){B(this,ja,c)}setQueryDefaults(c,i){v(this,$l).set(Ln(c),{queryKey:c,defaultOptions:i})}getQueryDefaults(c){const i=[...v(this,$l).values()],s={};return i.forEach(f=>{Xn(c,f.queryKey)&&Object.assign(s,f.defaultOptions)}),s}setMutationDefaults(c,i){v(this,Fl).set(Ln(c),{mutationKey:c,defaultOptions:i})}getMutationDefaults(c){const i=[...v(this,Fl).values()];let s={};return i.forEach(f=>{Xn(c,f.mutationKey)&&(s={...s,...f.defaultOptions})}),s}defaultQueryOptions(c){if(c._defaulted)return c;const i={...v(this,ja).queries,...this.getQueryDefaults(c.queryKey),...c,_defaulted:!0};return i.queryHash||(i.queryHash=Ac(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===zc&&(i.enabled=!1),i}defaultMutationOptions(c){return c!=null&&c._defaulted?c:{...v(this,ja).mutations,...(c==null?void 0:c.mutationKey)&&this.getMutationDefaults(c.mutationKey),...c,_defaulted:!0}}clear(){v(this,xt).clear(),v(this,Ha).clear()}},xt=new WeakMap,Ha=new WeakMap,ja=new WeakMap,$l=new WeakMap,Fl=new WeakMap,xa=new WeakMap,Wl=new WeakMap,Pl=new WeakMap,eo),y0=(ao=class extends Gn{constructor(i,s){super();I(this,Tt);I(this,ve);I(this,ft);I(this,kn);I(this,fe);I(this,gl);I(this,Il);I(this,wa);I(this,la);I(this,$n);I(this,tn);I(this,en);I(this,pl);I(this,bl);I(this,qa);I(this,an,new Set);this.options=s,B(this,ve,i),B(this,la,null),B(this,wa,Mc()),this.options.experimental_prefetchInRender||v(this,wa).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(v(this,ft).addObserver(this),zf(v(this,ft),this.options)?dt(this,Tt,Ju).call(this):this.updateResult(),dt(this,Tt,tf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nc(v(this,ft),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nc(v(this,ft),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,dt(this,Tt,ef).call(this),dt(this,Tt,af).call(this),v(this,ft).removeObserver(this)}setOptions(i,s){const f=this.options,d=v(this,ft);if(this.options=v(this,ve).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ze(this.options.enabled,v(this,ft))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");dt(this,Tt,lf).call(this),v(this,ft).setOptions(this.options),f._defaulted&&!Oc(this.options,f)&&v(this,ve).getQueryCache().notify({type:"observerOptionsUpdated",query:v(this,ft),observer:this});const p=this.hasListeners();p&&Cf(v(this,ft),d,this.options,f)&&dt(this,Tt,Ju).call(this),this.updateResult(s),p&&(v(this,ft)!==d||Ze(this.options.enabled,v(this,ft))!==Ze(f.enabled,v(this,ft))||Ll(this.options.staleTime,v(this,ft))!==Ll(f.staleTime,v(this,ft)))&&dt(this,Tt,Wr).call(this);const T=dt(this,Tt,Pr).call(this);p&&(v(this,ft)!==d||Ze(this.options.enabled,v(this,ft))!==Ze(f.enabled,v(this,ft))||T!==v(this,qa))&&dt(this,Tt,Ir).call(this,T)}getOptimisticResult(i){const s=v(this,ve).getQueryCache().build(v(this,ve),i),f=this.createResult(s,i);return v0(this,f)&&(B(this,fe,f),B(this,Il,this.options),B(this,gl,v(this,ft).state)),f}getCurrentResult(){return v(this,fe)}trackResult(i,s){const f={};return Object.keys(i).forEach(d=>{Object.defineProperty(f,d,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(d),s==null||s(d),i[d])})}),f}trackProp(i){v(this,an).add(i)}getCurrentQuery(){return v(this,ft)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const s=v(this,ve).defaultQueryOptions(i),f=v(this,ve).getQueryCache().build(v(this,ve),s);return f.fetch().then(()=>this.createResult(f,s))}fetch(i){return dt(this,Tt,Ju).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),v(this,fe)))}createResult(i,s){var pt;const f=v(this,ft),d=this.options,p=v(this,fe),T=v(this,gl),R=v(this,Il),S=i!==f?i.state:v(this,kn),{state:H}=i;let U={...H},w=!1,q;if(s._optimisticResults){const j=this.hasListeners(),ut=!j&&zf(i,s),Bt=j&&Cf(i,f,s,d);(ut||Bt)&&(U={...U,...Of(H.data,i.options)}),s._optimisticResults==="isRestoring"&&(U.fetchStatus="idle")}let{error:$,errorUpdatedAt:L,status:G}=U;if(s.select&&U.data!==void 0)if(p&&U.data===(T==null?void 0:T.data)&&s.select===v(this,$n))q=v(this,tn);else try{B(this,$n,s.select),q=s.select(U.data),q=Rc(p==null?void 0:p.data,q,s),B(this,tn,q),B(this,la,null)}catch(j){B(this,la,j)}else q=U.data;if(s.placeholderData!==void 0&&q===void 0&&G==="pending"){let j;if(p!=null&&p.isPlaceholderData&&s.placeholderData===(R==null?void 0:R.placeholderData))j=p.data;else if(j=typeof s.placeholderData=="function"?s.placeholderData((pt=v(this,en))==null?void 0:pt.state.data,v(this,en)):s.placeholderData,s.select&&j!==void 0)try{j=s.select(j),B(this,la,null)}catch(ut){B(this,la,ut)}j!==void 0&&(G="success",q=Rc(p==null?void 0:p.data,j,s),w=!0)}v(this,la)&&($=v(this,la),q=v(this,tn),L=Date.now(),G="error");const K=U.fetchStatus==="fetching",J=G==="pending",nt=G==="error",tt=J&&K,X=q!==void 0,At={status:G,fetchStatus:U.fetchStatus,isPending:J,isSuccess:G==="success",isError:nt,isInitialLoading:tt,isLoading:tt,data:q,dataUpdatedAt:U.dataUpdatedAt,error:$,errorUpdatedAt:L,failureCount:U.fetchFailureCount,failureReason:U.fetchFailureReason,errorUpdateCount:U.errorUpdateCount,isFetched:U.dataUpdateCount>0||U.errorUpdateCount>0,isFetchedAfterMount:U.dataUpdateCount>S.dataUpdateCount||U.errorUpdateCount>S.errorUpdateCount,isFetching:K,isRefetching:K&&!J,isLoadingError:nt&&!X,isPaused:U.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:nt&&X,isStale:Hc(i,s),refetch:this.refetch,promise:v(this,wa)};if(this.options.experimental_prefetchInRender){const j=Yt=>{At.status==="error"?Yt.reject(At.error):At.data!==void 0&&Yt.resolve(At.data)},ut=()=>{const Yt=B(this,wa,At.promise=Mc());j(Yt)},Bt=v(this,wa);switch(Bt.status){case"pending":i.queryHash===f.queryHash&&j(Bt);break;case"fulfilled":(At.status==="error"||At.data!==Bt.value)&&ut();break;case"rejected":(At.status!=="error"||At.error!==Bt.reason)&&ut();break}}return At}updateResult(i){const s=v(this,fe),f=this.createResult(v(this,ft),this.options);if(B(this,gl,v(this,ft).state),B(this,Il,this.options),v(this,gl).data!==void 0&&B(this,en,v(this,ft)),Oc(f,s))return;B(this,fe,f);const d={},p=()=>{if(!s)return!0;const{notifyOnChangeProps:T}=this.options,R=typeof T=="function"?T():T;if(R==="all"||!R&&!v(this,an).size)return!0;const _=new Set(R??v(this,an));return this.options.throwOnError&&_.add("error"),Object.keys(v(this,fe)).some(S=>{const H=S;return v(this,fe)[H]!==s[H]&&_.has(H)})};(i==null?void 0:i.listeners)!==!1&&p()&&(d.listeners=!0),dt(this,Tt,Gy).call(this,{...d,...i})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&dt(this,Tt,tf).call(this)}},ve=new WeakMap,ft=new WeakMap,kn=new WeakMap,fe=new WeakMap,gl=new WeakMap,Il=new WeakMap,wa=new WeakMap,la=new WeakMap,$n=new WeakMap,tn=new WeakMap,en=new WeakMap,pl=new WeakMap,bl=new WeakMap,qa=new WeakMap,an=new WeakMap,Tt=new WeakSet,Ju=function(i){dt(this,Tt,lf).call(this);let s=v(this,ft).fetch(this.options,i);return i!=null&&i.throwOnError||(s=s.catch(Ce)),s},Wr=function(){dt(this,Tt,ef).call(this);const i=Ll(this.options.staleTime,v(this,ft));if(fl||v(this,fe).isStale||!_c(i))return;const f=yf(v(this,fe).dataUpdatedAt,i)+1;B(this,pl,setTimeout(()=>{v(this,fe).isStale||this.updateResult()},f))},Pr=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(v(this,ft)):this.options.refetchInterval)??!1},Ir=function(i){dt(this,Tt,af).call(this),B(this,qa,i),!(fl||Ze(this.options.enabled,v(this,ft))===!1||!_c(v(this,qa))||v(this,qa)===0)&&B(this,bl,setInterval(()=>{(this.options.refetchIntervalInBackground||Cc.isFocused())&&dt(this,Tt,Ju).call(this)},v(this,qa)))},tf=function(){dt(this,Tt,Wr).call(this),dt(this,Tt,Ir).call(this,dt(this,Tt,Pr).call(this))},ef=function(){v(this,pl)&&(clearTimeout(v(this,pl)),B(this,pl,void 0))},af=function(){v(this,bl)&&(clearInterval(v(this,bl)),B(this,bl,void 0))},lf=function(){const i=v(this,ve).getQueryCache().build(v(this,ve),this.options);if(i===v(this,ft))return;const s=v(this,ft);B(this,ft,i),B(this,kn,i.state),this.hasListeners()&&(s==null||s.removeObserver(this),i.addObserver(this))},Gy=function(i){It.batch(()=>{i.listeners&&this.listeners.forEach(s=>{s(v(this,fe))}),v(this,ve).getQueryCache().notify({query:v(this,ft),type:"observerResultsUpdated"})})},ao);function m0(c,i){return Ze(i.enabled,c)!==!1&&c.state.data===void 0&&!(c.state.status==="error"&&i.retryOnMount===!1)}function zf(c,i){return m0(c,i)||c.state.data!==void 0&&Nc(c,i,i.refetchOnMount)}function Nc(c,i,s){if(Ze(i.enabled,c)!==!1){const f=typeof s=="function"?s(c):s;return f==="always"||f!==!1&&Hc(c,i)}return!1}function Cf(c,i,s,f){return(c!==i||Ze(f.enabled,c)===!1)&&(!s.suspense||c.state.status!=="error")&&Hc(c,s)}function Hc(c,i){return Ze(i.enabled,c)!==!1&&c.isStaleByTime(Ll(i.staleTime,c))}function v0(c,i){return!Oc(c.getCurrentResult(),i)}var Mf=yt.createContext(void 0),g0=c=>{const i=yt.useContext(Mf);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},p0=({client:c,children:i})=>(yt.useEffect(()=>(c.mount(),()=>{c.unmount()}),[c]),O.jsx(Mf.Provider,{value:c,children:i})),Uf=yt.createContext(!1),b0=()=>yt.useContext(Uf);Uf.Provider;function S0(){let c=!1;return{clearReset:()=>{c=!1},reset:()=>{c=!0},isReset:()=>c}}var E0=yt.createContext(S0()),T0=()=>yt.useContext(E0);function _0(c,i){return typeof c=="function"?c(...i):!!c}function Nf(){}var A0=(c,i)=>{(c.suspense||c.throwOnError||c.experimental_prefetchInRender)&&(i.isReset()||(c.retryOnMount=!1))},O0=c=>{yt.useEffect(()=>{c.clearReset()},[c])},D0=({result:c,errorResetBoundary:i,throwOnError:s,query:f,suspense:d})=>c.isError&&!i.isReset()&&!c.isFetching&&f&&(d&&c.data===void 0||_0(s,[c.error,f])),R0=c=>{const i=c.staleTime;c.suspense&&(c.staleTime=typeof i=="function"?(...s)=>Math.max(i(...s),1e3):Math.max(i??1e3,1e3),typeof c.gcTime=="number"&&(c.gcTime=Math.max(c.gcTime,1e3)))},z0=(c,i)=>c.isLoading&&c.isFetching&&!i,C0=(c,i)=>(c==null?void 0:c.suspense)&&i.isPending,Hf=(c,i,s)=>i.fetchOptimistic(c).catch(()=>{s.clearReset()});function M0(c,i,s){var U,w,q,$,L;const f=g0(),d=b0(),p=T0(),T=f.defaultQueryOptions(c);(w=(U=f.getDefaultOptions().queries)==null?void 0:U._experimental_beforeQuery)==null||w.call(U,T),T._optimisticResults=d?"isRestoring":"optimistic",R0(T),A0(T,p),O0(p);const R=!f.getQueryCache().get(T.queryHash),[_]=yt.useState(()=>new i(f,T)),S=_.getOptimisticResult(T),H=!d&&c.subscribed!==!1;if(yt.useSyncExternalStore(yt.useCallback(G=>{const K=H?_.subscribe(It.batchCalls(G)):Nf;return _.updateResult(),K},[_,H]),()=>_.getCurrentResult(),()=>_.getCurrentResult()),yt.useEffect(()=>{_.setOptions(T,{listeners:!1})},[T,_]),C0(T,S))throw Hf(T,_,p);if(D0({result:S,errorResetBoundary:p,throwOnError:T.throwOnError,query:f.getQueryCache().get(T.queryHash),suspense:T.suspense}))throw S.error;if(($=(q=f.getDefaultOptions().queries)==null?void 0:q._experimental_afterQuery)==null||$.call(q,T,S),T.experimental_prefetchInRender&&!fl&&z0(S,d)){const G=R?Hf(T,_,p):(L=f.getQueryCache().get(T.queryHash))==null?void 0:L.promise;G==null||G.catch(Nf).finally(()=>{_.updateResult()})}return T.notifyOnChangeProps?S:_.trackResult(S)}function U0(c,i){return M0(c,y0)}const Ke={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"},Se={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"},N0={image:"_image_ox479_1"},H0="https://cdn1.idek.cz/img/2711ac4e3e85e0ac6233b02388095dbb.webp",jf=({src:c,alt:i,resolutionList:s})=>{c??(c=H0);const f=[...s],d=f.shift();return O.jsxs("picture",{className:"r-image",children:[f.map(({width:p,height:T,maxWidth:R},_)=>O.jsx("source",{media:R?`(max-width: ${R}px)`:void 0,srcSet:c.replace(".webp",`_ew${p}_eh${T}.webp`),type:"image/webp",width:p,height:T},_)),O.jsx("img",{className:N0.image,src:c.replace(".webp",`_ew${d==null?void 0:d.width}_eh${d==null?void 0:d.height}.webp`),width:d==null?void 0:d.width,height:d==null?void 0:d.height,alt:i})]})},j0=(c,i,s=!0)=>{const f=c.split("|");if(f.length!==3&&f.length!==4)return console.warn(`Daný text "${c}" nemá správný formát`),s?`${i} ${c}`:c;let d,p,T,R;f.length===3?([p,T,R]=f.map(S=>S.trim()),d=R):[d,p,T,R]=f.map(S=>S.trim());let _=R;return i===0&&(_=d),i===1&&(_=p),i>=2&&i<=4&&(_=T),s?`${i} ${_}`:_},x0=c=>c.replace(/m2/g,"m²").replace(/m3/g,"m³");/*! js-cookie v3.0.5 | MIT */function Fu(c){for(var i=1;i"u")){T=Fu({},i,T),typeof T.expires=="number"&&(T.expires=new Date(Date.now()+T.expires*864e5)),T.expires&&(T.expires=T.expires.toUTCString()),d=encodeURIComponent(d).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var R="";for(var _ in T)T[_]&&(R+="; "+_,T[_]!==!0&&(R+="="+T[_].split(";")[0]));return document.cookie=d+"="+c.write(p,d)+R}}function f(d){if(!(typeof document>"u"||arguments.length&&!d)){for(var p=document.cookie?document.cookie.split("; "):[],T={},R=0;R{R&&_&&T.append(_,R)}),p.search=T.toString()}return p}catch(p){throw new Error(`Invalid URL configuration: ${p instanceof Error?p.message:"Unknown error"}`)}}function xf(c){const i={...c},s=new Headers(i.headers);try{return i.headers=Q0(),s.forEach((f,d)=>{var p;f&&d&&((p=i.headers)==null||p.set(d,f))}),(c.defaultContentType??!0)&&i.headers.set("Content-Type","application/json"),i}catch(f){throw new Error(`Failed to add default headers: ${f instanceof Error?f.message:"Unknown error"}`)}}const Y0="<>: Došlo k chybě při přístupu na <> s parametry <>";class me extends Error{constructor(s,f=418){super(s);kt(this,"status");this.status=f}}class Xl extends me{constructor(i,s,f,d){super(qf(i.toString(),JSON.stringify(s),f),d),this.name=f}}class G0 extends Xl{constructor(i,s){super(i,s,"CORS chyba [CorsError]",418)}}class L0 extends Xl{constructor(i,s){super(i,s,"Síťová chyba [NetworkError]",418)}}class X0 extends Xl{constructor(i,s){super(i,s,"Chyba časového limitu [TimeoutError]",408)}}class V0 extends Xl{constructor(i,s){super(i,s,"Není připojení k internetu [OfflineError]",418)}}function wf(c,i,s,f=!0){c instanceof me?f&&ol(c):c instanceof TypeError&&(c.message.includes("CORS")||c.message.includes("Cross-Origin Resource Sharing")||c.message.includes("Access-Control-Allow-Origin"))?f&&ol(new G0(i,s)):c instanceof TypeError&&(c.message.includes("NetworkError")||c.message.includes("network error")||c.message.includes("Network request failed"))?f&&ol(new L0(i,s)):c instanceof TypeError&&c.message.includes("timeout")?f&&ol(new X0(i,s)):c instanceof DOMException&&c.name==="AbortError"||(c instanceof TypeError&&!navigator.onLine?f&&ol(new V0(i,s)):c instanceof TypeError&&c.message.includes("Failed to fetch")?f&&ol(new Xl(i,s,"Typová chyba (CORS?)",418)):f&&ol(new Xl(i,s,"Neznámá chyba",418)))}function qf(c,i,s){return Y0.replace("<>",s).replace("<>",c).replace("<>",i)}function Z0(c){if(!c)return"";const s=c.split(` `).find(T=>T.includes("at "));if(!s)return"";const f=s.indexOf("/react/"),d=s.indexOf("/index");return f===-1||d===-1?"[react]: Neznámá app":`[react]: ${s.slice(f+7,d)}`}async function ol(c){try{const i=Z0(c.stack),s={status:c.status,origin:i,message:c.message},f=new URL("/log/save-error","https://api-eshop.delta.dek.cz"),d=new Headers;d.set("Content-Type","application/json");const p=xf({headers:d}),T=await fetch(f,{...p,method:"POST",body:JSON.stringify(s)});T.ok||console.error("Nepodařilo se uložit error log:",T.status,T.statusText)}catch(i){console.error("Nepodařilo se uložit error log:",i)}}class Qf extends Error{constructor(s){super("Chyba klienta");kt(this,"response");kt(this,"status");this.name="ErrorClient",this.response=s,this.status=s.status}}class Bf extends Error{constructor(s){super("Chyba serveru");kt(this,"response");kt(this,"status");this.name="ErrorServer",this.response=s,this.status=s.status}}class K0{constructor(i){kt(this,"response");kt(this,"options");kt(this,"responseHandlerList",{});this.response=i}setResponse(i){return this.response=i,this}setOptions(i){return this.options=i,this}hasResponseHandlers(i,s){return!!this.responseHandlerList[i]||!!this.responseHandlerList[s]}setDefaultResponseHandler(i){this.hasResponseHandlers(200,"2xx")||this.addResponseHandler(200,i)}addResponseHandler(i,s){var f;return(f=this.responseHandlerList)[i]??(f[i]=[]),this.responseHandlerList[i].push(s),this}async runResponseHandlers(){var p,T;if(!this.response)throw new me("Response není nastavena, byla setnutá?");const i=this.response.status,s=`${Math.floor(i/100)}xx`,f=this.hasResponseHandlers(i,s);let d;if(f){(p=this.responseHandlerList)[i]??(p[i]=[]),(T=this.responseHandlerList)[s]??(T[s]=[]);for(const R of this.responseHandlerList[i]){const _=await(R==null?void 0:R(this.response.clone()));d??(d=_)}for(const R of this.responseHandlerList[s]){const _=await(R==null?void 0:R(this.response.clone()));d??(d=_)}}return!f&&i>=400&&await this.handleError(),d}async handleError(i){if(!this.response)throw new me("Response není nastavena, byla setnutá?");(i==null?void 0:i.hideMessage)!==!0&&await this.showMessage(i==null?void 0:i.customMessage),i&&(i.options=i.options??this.options);const s=i!=null&&i.options?J0(i.options):void 0,f=await this.response.clone().text(),d=qf(this.response.url,JSON.stringify(s),`Chyba: [${this.response.status}${this.response.statusText?` - ${this.response.statusText}`:""}]`)+(f?` => ${f.slice(0,100)}${f.length>100?"...":""}`:"");throw new me(d,this.response.status)}async showMessage(i){if(!this.response)throw new me("Response není nastavena, byla setnutá?");if(i===!1)return;const s=i??(this.response.status in wc?wc[this.response.status]:`Nastala neočekávaná chyba při požadavku na server: ${this.response.status}`),f=await this.response.clone().text(),d=this.response.status===500||Object.keys(wc).includes(this.response.status.toString())||!!i;if(f===""||d)this.dispatchError(s);else try{await this.parseResponseForError()||this.dispatchError(s)}catch(p){throw this.dispatchError(s),new me("Chyba při ApiHandler.showMessage: "+p.message)}}async parseResponseForError(){if(!this.response)throw new me("Response není nastavena, byla setnutá?");const i=await this.response.clone().json();if(i.some(s=>s.message)){for(const{message:s}of i.filter(f=>f.message))s&&this.dispatchError(s);return!0}else return!1}dispatchError(i){dispatchEvent(new CustomEvent("ES_ADD_MESSAGE_FLASH",{detail:{message:i,type:"error"}}))}}const wc={429:"Překročili jste limit požadavků. Zkuste to znovu později. (429)"};function J0(c){const i=["password","token","secret","key","credential"],s={...c},f=p=>{const T={};for(const[R,_]of Object.entries(p))i.some(S=>R.toLowerCase().includes(S))?T[R]="***FILTERED***":_&&typeof _=="object"&&!Array.isArray(_)?T[R]=f(_):T[R]=_;return T},d=p=>{try{const T=JSON.parse(p),R=f(T);return JSON.stringify(R)}catch{return p}};if(s.options){const p=s.options;p.body&&(typeof p.body=="string"?p.body=d(p.body):typeof p.body=="object"&&!(p.body instanceof FormData)&&(p.body=f(p.body))),s.options=f(p)}return s.parameters&&(s.parameters=f(s.parameters)),s.path&&(s.path=f(s.path)),s.body&&(typeof s.body=="string"?s.body=d(s.body):typeof s.body=="object"&&!(s.body instanceof FormData)&&(s.body=f(s.body))),s}class Yf{constructor(i){kt(this,"fetchParams");kt(this,"settings",{});kt(this,"responseHandler",new K0);kt(this,"response");this.checkForRequired(i);const s=i.body instanceof FormData?!1:i.defaultContentType??!0;this.fetchParams={baseUrl:i.baseUrl,uri:i.uri,body:i.body,parameters:i.parameters,path:i.path,options:{defaultContentType:s,method:i.method??"GET",signal:i.signal,...i.options}},this.settings={silent:i.silent??!1,responseType:i.responseType??"json"},this.applyPathParameters(),this.applySearchParameters(),this.applyBody()}checkForRequired(i){try{if(!i.uri)throw new me("URI je povinný")}catch(s){throw console.error(s),wf(s,new URL(i.uri,i.baseUrl),i.options??{},!i.silent),s}}applyPathParameters(){if("path"in this.fetchParams&&this.fetchParams.path){Object.entries(this.fetchParams.path).forEach(([s,f])=>{this.fetchParams.uri=this.fetchParams.uri.replace(`{${s}}`,f)});const i=this.fetchParams.uri.match(/\{([^}]+)\}/g);if(i)throw new me(`Nepodařilo se nahradit všechny parametry v URL: ${i.join(", ")}`)}}applySearchParameters(){if("parameters"in this.fetchParams&&this.fetchParams.parameters){const i=f=>typeof f=="string"||typeof f=="number"||typeof f=="boolean",s=new URLSearchParams;for(const[f,d]of Object.entries(this.fetchParams.parameters))if(i(d))s.set(f,d.toString());else if(Array.isArray(d))for(const p of d)i(p)?s.append(f,p.toString()):console.warn(`Neznámý typ parametru: ${f} => ${p}`);else typeof d<"u"&&console.warn(`Neznámý typ parametru: ${f} => ${d}`);this.fetchParams.options.search=s}}applyBody(){"body"in this.fetchParams&&this.fetchParams.body&&(typeof this.fetchParams.body=="string"||this.fetchParams.body instanceof FormData?this.fetchParams.options.body=this.fetchParams.body:this.fetchParams.options.body=JSON.stringify(this.fetchParams.body))}setDefaultResponseHandler(){this.responseHandler.setDefaultResponseHandler(async()=>this.getData())}addResponseHandler(i,s){return this.responseHandler.addResponseHandler(i,s),this}async send(){var f;const i=xf(this.fetchParams.options),s=B0(this.fetchParams.baseUrl,this.fetchParams.uri,i.search);this.setDefaultResponseHandler();try{return this.response=await fetch(s.toString(),i),this.responseHandler.setResponse(this.response),this.responseHandler.setOptions(this.fetchParams.options),await this.responseHandler.runResponseHandlers()}catch(d){console.error(d);const p=this.settings.silent===!0?!1:Array.isArray(this.settings.silent)?!this.settings.silent.includes(((f=this.response)==null?void 0:f.status)??0):!0;throw wf(d,s,i,p),d}}async handleError(i){await this.responseHandler.handleError({...i,options:this.fetchParams})}async getData(i){if(!this.response)throw new me("Response není nastavena, byl volán send()?");if(!this.response.ok&&!i)throw new me(`Response není v pořádku: ${this.response.status}`);try{const s=await this.response.clone().text();if(s==="")return;switch(this.settings.responseType){case"text":return s;case"json":return await this.response.clone().json();case"blob":return await this.response.clone().blob();case"arrayBuffer":return await this.response.clone().arrayBuffer();default:{const f=this.settings.responseType;throw new me(`Neznámý typ response: ${f}`)}}}catch(s){throw new me("Chyba při ApiHandler.getData: "+s.message)}}}const Ee=class Ee{};kt(Ee,"add",({message:i,type:s})=>{dispatchEvent(new CustomEvent("ES_ADD_MESSAGE_FLASH",{detail:{message:i,type:s}}))}),kt(Ee,"addError",i=>Ee.add({message:i,type:"error"})),kt(Ee,"addSuccess",i=>Ee.add({message:i,type:"success"})),kt(Ee,"addWarning",i=>Ee.add({message:i,type:"warning"})),kt(Ee,"addByError",i=>{const s=i;console.error(s),s instanceof Qf||s instanceof Bf?(s instanceof Qf&&Ee.add({message:`Nastala neočekávaná klientská chyba. (${s.status})`,type:"error"}),s instanceof Bf&&Ee.add({message:`Nastala neočekávaná serverová chyba. (${s.status})`,type:"error"})):Ee.add({message:"Nastala neočekávaná chyba.",type:"error"})});let Vn=Ee;const Pu={async getProductEshopByCode(c,i){if(Array.isArray(c)||(c=[c]),c.length===0)return[];try{return await new Yf({uri:"/product/get-products-eshop-by-codes",parameters:{codes:c,parts:i}}).send()??[]}catch(s){Vn.addByError(s)}return[]},async getProductRentalByCode(c,i){if(Array.isArray(c)||(c=[c]),c.length===0)return[];try{return await new Yf({uri:"/product/get-products-rental-by-codes",parameters:{codes:c,parts:i}}).send()??[]}catch(s){Vn.addByError(s)}return[]}};class Zn{static getConfig(){if(!this.config){const i=xc.get("dek_config");if(i===void 0)throw new Error("Config not found");try{const s=atob(i);this.config=JSON.parse(s)}catch(s){throw console.error(s),Vn.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";case"stachema_cz":return"stachema.cz";case"stachema_sk":return"stachema.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}}kt(Zn,"config");const Me={formatPrice(c,i){const s=new Intl.NumberFormat("cs-CZ",{style:"currency",currency:i}).format(c);return i==="EUR"?s.replace("€","EUR"):s.toString()},formatUnit(c){return c.replace("m2","m²").replace("m3","m³")},formatQuantity(c){return(Number(c)===c&&c%1!==0?c.toFixed(2):c).toLocaleString().replace(".",",")},calculateQuantityUnitEshopToSales(c,i){const s=i.isPackagePrimary?c*1e6*(i.unitsInPackage*1e6)/1e12:c;return{unitPrimary:c,unitSecondary:i.isPackagePrimary?s:c,unitSales:s,unitPackage:i.isPackagePrimary?c:s}},calculateQuantityUnitEshop(c,i){return Me.calculateQuantityUnitEshopToSales(c,i)},calculateQuantityUnitEshopToPrimary(c,i){const s=i.isPackagePrimary?c*1e12/(i.unitsInPackage*1e6)/1e6:c;return{unitPrimary:s,unitSecondary:i.isPackagePrimary?c:s,unitSales:c,unitPackage:i.isPackagePrimary?s:c}},calculateQuantityPriceEshop(c,i){const s=Math.round(i.priceNoVatPrimary*c*100)/100,f=Math.round(s*i.vat/100*100)/100,d=Math.round((s+f)*100)/100;return{priceNoVatPrimary:s,priceVatPrimary:d}},getAvailabilityStatusByBranchCode(c,i,s){switch(c.availabilityBranchCode){case"P00":case"P01":case"P05":case"P06":return{showButton:!0,color:"green",buttonText:s,buttonColor:"green"};case"P02":case"P07":case"P08":case"P10":return{showButton:!1,color:"red"};case"P03":return{showButton:!0,color:"blue",buttonText:i,buttonColor:"blue"};case"P04":return{showButton:!0,color:"red",buttonText:i,buttonColor:"blue"};case"P09":return{showButton:!1,color:"gray"};default:return{showButton:!0,color:"blue",buttonText:i,buttonColor:"blue"}}},addToCartEshop(c,i,s,f){window.dispatchEvent(new CustomEvent("ES_ADD_TO_CART_ESHOP",{detail:{code:c,quantitySales:i,unitSales:s,eventInvoker:f}}))},addToCartRental(c){const{date:i,eventInvoker:s,hasGuarantee:f,quantity:d,typeOfRental:p,unionCode:T}=c;window.dispatchEvent(new CustomEvent("ES_ADD_TO_CART_RENTAL",{detail:{unionCode:T,quantity:d,quantitySales:d,dateFrom:i.from,dateTo:i.to,withGuarantee:f,typeOfRental:p,eventInvoker:s}}))},async getProductEshopByCode(c,i){return Pu.getProductEshopByCode(c,i)},async getProductRentalByCode(c,i){return Pu.getProductRentalByCode(c,i)},calculateSeasonPoints(c,i){if(c.season===null||c.season===void 0)return 0;const s=c.season;if(s.rewardFor==="Quantity")return Math.floor(i/s.requiredQuantity)*s.rewardPoints;if(s.rewardFor==="Price"){const f=c.price.priceNoVatSales*i;return Math.floor(f/s.requiredQuantity)*s.rewardPoints}return 0},getNumberOfDaysByTypeOfRental(c,i){if(i==="HalfDay")return"4 hodiny";const s=Math.ceil((c.to.getTime()-c.from.getTime())/864e5),f=d=>j0(Zn.getLang()==="sk"?"deň | dni | dní":"den | dny | dní",d);return f(i==="FullDay"?s:s+1)}},qc={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:[Me.formatQuantity(c)," ",Me.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:[Me.formatQuantity(c)," ",Me.formatUnit(i)]})]}),addToCart:"Pridať",addedToCart:"Pridané",unit:c=>`za ${c}`,withDPH:"s DPH",total:"celkom"}},se={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"},k0={event:"recobox",recobox_pagetype:"modal_cart",recobox_boxName:"mohlo_by_se_vam_hodit"},Gf=c=>{window.dataLayer??(window.dataLayer=[]),window.dataLayer.push({...k0,recobox_action:"add_to_cart",recobox_product_id:c})},$0=({formWidth:c,state:i})=>O.jsx("div",{className:`input-${i.level} ${c||""}`,children:i.message}),Lf={getFormSize:c=>c?`dek-form-width--${c}`:"",formatNumber:(c,i)=>{const s=c.replaceAll(/\D/g,"");s.lengths[f++]||"")},formatPhone:c=>Lf.formatNumber(c,c.replaceAll(/\D/g,"").length===12&&c[0]==="+"?"+### ### ### ###":"### ### ###")},Qc=({onChange:c,children:i,size:s,state:f,type:d,onChangeLazy:p,onBlur:T,className:R,useSizeOnState:_,...S})=>{const H=yt.useId(),{disabled:U,required:w}=S,q=K=>{if(!c)return;const{value:J}=K.target;if(d==="number"){c(Number(J)||Number.NaN,K);return}c(J,K)},$=K=>{if(p){const{value:J}=K.target;if(d==="number"){p(Number(J)||Number.NaN,K);return}p(J,K)}T==null||T(K)},L=Lf.getFormSize(s),G=[L];return f&&G.push(f.level),R&&G.push(R),O.jsxs(O.Fragment,{children:[i!==void 0&&O.jsxs("label",{htmlFor:H,children:[i,w&&O.jsx("span",{className:"dek-form-required-indicator",children:"*"})]}),O.jsx("input",{id:H,role:"textbox",className:G.join(" "),onChange:q,onBlur:$,type:d,...S}),f&&!U&&f.message&&O.jsx($0,{formWidth:_?L:void 0,state:f})]})},F0=c=>{const{type:i}=c;if(i==="compact")return O.jsx(P0,{...c});if(i==="slide")return O.jsx(I0,{...c});if(i==="long")return O.jsx(W0,{...c})},W0=({lang:c,product:i})=>{const{availability:s,code:f,price:d,unit:p}=i,{addToCartEshop:T,calculateQuantityPriceEshop:R,calculateQuantityUnitEshopToSales:_,formatPrice:S,formatUnit:H,getAvailabilityStatusByBranchCode:U}=Me,w=qc[c],q=yt.useRef(null),[$,L]=yt.useState({unitPrimary:p.minimumCountUnitPrimary,unitSecondary:p.unitsInPackage,unitSales:p.minimumCountUnitSales}),[G,K]=yt.useState({priceVatPrimary:d.priceVatPrimary}),J=X=>{X=X{var X;T(f,$.unitSales,p.unitSales,"long"),(X=q.current)==null||X.blur()},tt=U(s,w.demand,w.toCart);return tt.showButton?O.jsxs("div",{className:`r-add-to-cart-eshop-long ${se.container}`,children:[O.jsxs("div",{className:se.inputs,children:[O.jsxs("div",{className:se.quantity,children:[O.jsx(Qc,{onChange:J,type:"number",min:"1",value:$.unitPrimary,autoComplete:"off"}),O.jsx("label",{children:H(p.unitPrimary)})]}),O.jsx("button",{type:"button",ref:q,role:"button",className:`dek-button-${tt.buttonColor} ${se.button}`,onClick:nt,children:tt.buttonText})]}),p.isPackagePrimary&&O.jsx("div",{className:se.row,children:w.labelAddToCart($.unitSecondary,p.unitSecondary)}),O.jsxs("div",{className:se.row,children:[O.jsx("strong",{children:S(G.priceVatPrimary,d.currencyCode)})," ",w.total," ",w.withDPH]})]}):O.jsx("div",{className:`r-add-to-cart-eshop-long ${se.container}`})},P0=({lang:c,product:i})=>{const{code:s,unit:f}=i,{addToCartEshop:d,calculateQuantityPriceEshop:p,calculateQuantityUnitEshopToSales:T,formatPrice:R}=Me,_=qc[c],[S,H]=yt.useState({unitPrimary:f.minimumCountUnitPrimary,unitSecondary:f.unitsInPackage,unitSales:f.minimumCountUnitSales}),[U,w]=yt.useState(!1),[q,$]=yt.useState(!1),[L,G]=yt.useState(i.price.priceVatPrimary),K=tt=>{tt=tt{$(!0),window.addEventListener("ES_ADD_TO_CART_ESHOP_AFTER",nt),d(s,S.unitSales,f.unitSales,"compact")},nt=tt=>{i.code===tt.detail.code&&($(!1),w(tt.detail.isSuccess),tt.detail.isSuccess&&Gf(s),window.removeEventListener("ES_ADD_TO_CART_ESHOP_AFTER",nt))};return O.jsxs("div",{className:`r-add-to-cart-eshop-compact ${se.compact}`,children:[O.jsxs("div",{className:se.price,children:[O.jsx("strong",{children:R(L,i.price.currencyCode)}),O.jsxs("div",{children:[_.unit(i.unit.unitPrimary)," ",_.withDPH]})]}),O.jsx("div",{className:se.addToCart,children:U?O.jsxs("div",{className:se.alreadyInCart,children:[O.jsx("img",{src:"https://cdn1.idek.cz/file/check-7c33cfe0.svg",width:16,height:16}),O.jsx("span",{children:_.addedToCart})]}):O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:se.input,children:[O.jsx(Qc,{type:"number",min:1,defaultValue:S.unitPrimary,onChange:K,disabled:q}),i.unit.unitPrimary]}),O.jsxs("button",{type:"button",role:"button",className:"dek-button-green",onClick:J,disabled:q,children:[q&&O.jsx("span",{className:se.loading}),_.addToCart]})]})})]})},I0=({lang:c,product:i})=>{const s=qc[c],f=()=>{const d=i.unit.isPackagePrimary?i.unit.minimumCountUnitSales:i.unit.minimumCountUnitPrimary;Me.addToCartEshop(i.code,d,i.unit.unitSales,"slide")};return O.jsx("div",{className:`r-add-to-cart-eshop-slide ${se.slide}`,children:O.jsx("button",{type:"button",role:"button",onClick:f,className:`dek-button-green dek-button-small ${se.button}`,children:s.toCart})})},Bc={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é"}},Je={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"},tm=(c,i)=>`/produkty/detail/${c}${i?`-${i}`:""}`,Yc=(c,i)=>`/pujcovna/detail/${c.replace("|","/")}${i?`-${i}`:""}`,em=c=>{const{type:i}=c;if(i==="compact")return O.jsx(nm,{...c});if(i==="long")return O.jsx(lm,{...c});if(i==="slide")return O.jsx(am,{...c})},am=({product:c,lang:i})=>{const s=Bc[i];return O.jsx("div",{className:`r-add-to-cart-rental-slide ${Je.container}`,children:O.jsx("a",{role:"button",className:`dek-button dek-button-green dek-button-small ${Je.button}`,href:Yc(c.code,c.detail.slug),children:s.toDetail})})},lm=({product:c,lang:i})=>{const s=Bc[i];return O.jsx("div",{className:`r-add-to-cart-rental-long ${Je.container} ${Je.topDivider}`,children:O.jsx("a",{role:"button",className:`dek-button dek-button-green ${Je.button}`,href:Yc(c.code,c.detail.slug),children:s.toDetail})})},nm=({product:c,lang:i,date:s,hasGuarantee:f,typeOfRental:d})=>{const{formatPrice:p}=Me,T=Bc[i],[R,_]=yt.useState(1),[S,H]=yt.useState(c.detail.priceVatOrigin),[U,w]=yt.useState(!1),[q,$]=yt.useState(!1),L=J=>{_(J),H(J*c.detail.priceVatOrigin)},G=()=>{$(!0),window.addEventListener("ES_ADD_TO_CART_RENTAL_AFTER",K),Me.addToCartRental({unionCode:c.code,quantity:R,date:s,hasGuarantee:f,typeOfRental:d,eventInvoker:"compact"})},K=J=>{c.code===J.detail.unionCode&&($(!1),w(J.detail.isSuccess),J.detail.isSuccess&&Gf(c.code),window.removeEventListener("ES_ADD_TO_CART_RENTAL_AFTER",K))};return O.jsxs("div",{className:`r-add-to-cart-rental-compact ${Je.compact}`,children:[O.jsxs("div",{className:Je.price,children:[O.jsx("strong",{children:p(S,c.detail.currencyCode)}),O.jsxs("div",{children:[T.unit(c.detail.unitPrice)," ",T.withDPH]})]}),O.jsx("div",{className:Je.addToCart,children:U?O.jsxs("div",{className:Je.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:Je.input,children:[O.jsx(Qc,{type:"number",min:1,defaultValue:R,onChange:L,disabled:q}),c.detail.unitQuantity]}),O.jsxs("button",{type:"button",role:"button",className:"dek-button-green",onClick:G,disabled:q,children:[q&&O.jsx("span",{className:Je.loading}),T.addToCart]})]})})]})},Xf={icons:"_icons_4p8mm_1"},um={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"}},Vf=({product:c})=>{const i=Zn.getLang(),s=um[i];if(c.type==="eshop")return O.jsxs("div",{className:`r-product-icon ${Xf.icons}`,children:[c.detail.hasVariant&&O.jsx("img",{title:s.hasVariants,alt:s.hasVariants,src:"https://cdn1.idek.cz/img/a32ef0de7bf6d55e5b00748dfe951840_rw24.png",width:24,height:24}),c.detail.hasGift&&O.jsx("img",{alt:s.hasGift,title:s.hasGift,src:"https://cdn1.idek.cz/img/13ac7588db7f1b49cbce256f5abd255f_rw24.png",width:24,height:24}),c.detail.hasPpl&&O.jsx("img",{title:s.hasPpl,alt:s.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 ${Xf.icons}`})},im={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"}},oa={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"},Zf=({product:c})=>{const i=Zn.getLang(),s=im[i],f=()=>{if(c.type==="eshop")switch(!0){case c.availability.isWhileStockLast:return O.jsx("div",{className:oa.isWhileStockLast,children:s.stocksLast});case c.detail.isFeatured:return O.jsx("div",{className:oa.isFeatured,children:O.jsx("div",{className:oa.title,children:s.isFeatured})});case c.detail.isRecommended:return O.jsx("div",{className:oa.recommended,children:s.recommended});case c.detail.isRecent:return O.jsx("div",{className:oa.isRecent,children:s.isRecent});case!0:return null}if(c.type==="rental")switch(!0){case c.detail.isFeatured:return O.jsx("div",{className:oa.isFeatured,children:O.jsx("div",{className:oa.title,children:s.isFeatured})});case!0:return null}return null};return O.jsxs("div",{className:`r-product-label ${oa.labels}`,children:[f(),c.type==="eshop"&&c.detail.seasonPointsText&&O.jsxs("div",{className:oa.generousSeason,children:[O.jsx("img",{src:"https://cdn1.idek.cz/file/plus-white-a6e119fe.svg",width:22,height:22}),O.jsx("div",{children:x0(c.detail.seasonPointsText)})]})]})},cm=({lang:c,product:i,showAddToCartButton:s})=>{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(sm,{lang:c,product:i,resolutionList:f,showAddToCartButton:s});if(i.type==="rental")return O.jsx(rm,{lang:c,product:i,resolutionList:f,showAddToCartButton:s})},sm=({lang:c,product:i,resolutionList:s,showAddToCartButton:f})=>{const d=tm(i.code,i.detail.slug),p=Me.formatPrice(i.price.priceVatPrimary,i.price.currencyCode).split(",");return O.jsxs("div",{className:`r-product-preview-slide ${Se.wrap}`,"data-product-code":i.code,children:[O.jsxs("a",{className:Se.image,href:d,children:[O.jsx(Zf,{product:i}),O.jsx(Vf,{product:i}),O.jsx(jf,{src:i.detail.image,alt:i.detail.title,resolutionList:s})]}),O.jsxs("div",{className:Se.content,children:[O.jsxs("a",{href:d,children:[O.jsx("span",{className:Se.title,children:i.detail.title}),O.jsxs("div",{children:[O.jsxs("div",{className:Se.price,children:[p[0],O.jsxs("span",{children:[",",p[1]]})]}),O.jsxs("div",{className:Se.unit,children:["cena za"," ",i.unit.unitPrimary," ","s DPH"]})]})]}),f&&O.jsx(F0,{lang:c,product:i,type:"slide"})]})]})},rm=({lang:c,product:i,resolutionList:s,showAddToCartButton:f})=>{const d=Yc(i.code,i.detail.slug),p=Me.formatPrice(i.detail.priceVatOrigin,i.detail.currencyCode).split(",");return O.jsxs("div",{className:`r-product-preview-slide ${Se.wrap} ${Se.rental}`,"data-product-code":i.code,children:[O.jsxs("a",{className:Se.image,href:d,children:[O.jsx(Zf,{product:i}),O.jsx(Vf,{product:i}),O.jsx(jf,{src:i.detail.image,alt:i.detail.titleShort??i.detail.title,resolutionList:s})]}),O.jsxs("div",{className:Se.content,children:[O.jsxs("a",{href:d,children:[O.jsx("span",{className:Se.title,children:i.detail.titleShort??i.detail.title}),O.jsxs("div",{children:[O.jsxs("div",{className:Se.price,children:[p[0],O.jsxs("span",{children:[",",p[1]]})]}),O.jsxs("div",{className:Se.unit,children:["cena za"," ",i.detail.unitPrice," ","s DPH"]})]})]}),f&&O.jsx(em,{lang:c,product:i,type:"slide"})]})]})},fm=(c,i)=>{yt.useEffect(()=>{if(c==null)return;const s=f=>om(f,i);return c.addEventListener("touchstart",Kf,!1),c.addEventListener("touchmove",s,!1),()=>{c.removeEventListener("touchstart",Kf,!1),c.removeEventListener("touchmove",s,!1)}},[c,i])};let Iu,ti;const Kf=c=>{const i=c.touches[0];Iu=i.clientX,ti=i.clientY},om=(c,i)=>{var T,R,_,S;if(!Iu||!ti)return;const s=c.touches[0].clientX,f=c.touches[0].clientY,d=Iu-s,p=ti-f;Math.abs(d)>Math.abs(p)?d>0?(T=i.onRight)==null||T.call(i):(R=i.onLeft)==null||R.call(i):p>0?(_=i.onDown)==null||_.call(i):(S=i.onUp)==null||S.call(i),Iu=void 0,ti=void 0},Jf=c=>{const{hasGrayBackground:i,itemsMaxCount:s,loadingState:f,productList:d,showAddToCart:p,sliderMaxWidth:T}=c,R=Zn.getLang(),_=yt.useRef(null),S=yt.useRef(null),H=yt.useRef(null),[U,w]=yt.useState(0),[q,$]=yt.useState(0),[L,G]=yt.useState(!1),[K,J]=yt.useState(0);yt.useEffect(()=>{const Yt=()=>{if(!_.current||!S.current||!H.current||!d)return;const Ne=_.current.offsetWidth??0,oe=S.current.offsetWidth??0,ue=Ne-oe,et=(T-ue)/s,F=Math.floor(oe/et),Ot=oe/F,y=Ot*d.length;w(y),$(oe/Math.floor(oe/Ot)),G(!0),J(0)};return Yt(),window.addEventListener("resize",Yt),()=>{window.removeEventListener("resize",Yt)}},[T,s,d]);const nt=_.current?_.current.offsetWidth:0,tt=S.current?S.current.offsetWidth:0,X=nt-tt,ot=Math.abs(K)+tt{ot&&J(K-tt)},j=()=>{At&&J(K+tt)},ut=(X/2+12)*-1,Bt=ut;return fm(S.current,{onRight:pt,onLeft:j}),f?O.jsx("div",{className:`r-slider-product ${Ke.wrap} ${i?Ke.grayBackground:""}`,role:"slider",style:{maxWidth:T},children:O.jsx("div",{className:Ke.viewport,children:O.jsx("div",{className:`${Ke.container} loading`,style:{transform:`translateX(${K}px)`,width:T,height:300}})})}):O.jsxs("div",{className:`r-slider-product ${Ke.wrap} ${i?Ke.grayBackground:""}`,ref:_,role:"slider",style:{maxWidth:T},children:[O.jsxs("div",{className:Ke.arrowWrap,children:[At&&O.jsx("div",{className:Ke.arrowPrev,onClick:j,style:{left:Bt}}),ot&&O.jsx("div",{className:Ke.arrowNext,onClick:pt,style:{right:ut}})]}),O.jsx("div",{className:Ke.viewport,ref:S,children:O.jsx("div",{className:Ke.container,ref:H,style:{transform:`translateX(${K}px)`,width:U},children:L&&d.map(Yt=>O.jsx("div",{style:{width:q},children:O.jsx(cm,{lang:R,product:Yt,showAddToCartButton:p})},Yt.code))})})]})},hm=({itemsMaxCount:c,sliderMaxWidth:i})=>{let s=!0;return c===void 0&&(console.error("[SliderProduct]: itemsMaxCount is required"),s=!1),i===void 0&&(console.error("[SliderProduct]: sliderMaxWidth is required"),s=!1),s},dm=({productCodeList:c,...i})=>{const s=c!==void 0&&c.length>0&&hm({...i}),f=U0({queryKey:["productList",c],queryFn:async()=>(await ym(c.map(String))).filter(Boolean),enabled:s});return s?O.jsxs("div",{className:"r-a-product-slider",children:[f.isLoading&&O.jsx(Jf,{loadingState:!0,...i}),f.isSuccess&&O.jsx(Jf,{productList:f.data,...i})]}):null},ym=async c=>{const i=c.filter(p=>p.length===10),s=c.filter(p=>p.length===7||p.length===15&&p.includes("|")),f=await Pu.getProductEshopByCode(i,["detail","availability","price","unit"]),d=await Pu.getProductRentalByCode(s,["detail","price"]);return[...f,...d]},mm=new d0({defaultOptions:{queries:{staleTime:1/0,gcTime:1/0,refetchOnWindowFocus:!1,retry:!1}}});function vm(c,i){Wy.createRoot(document.querySelector(`#${c}`)).render(O.jsx(yt.StrictMode,{children:O.jsx(p0,{client:mm,children:O.jsx(dm,{...i})})}))}return vm}); //# sourceMappingURL=index.umd.cjs.map