datapeek 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/cli/chunk-3XB4P3G3.js +228 -0
  2. package/dist/cli/{chunk-5X2YZYYM.js → chunk-G7KSYREO.js} +43 -5
  3. package/dist/cli/chunk-Y3EHCZQX.js +220 -0
  4. package/dist/cli/{chunk-PTI2CUG6.js → chunk-Z2LV7EWL.js} +75 -4
  5. package/dist/cli/dev.js +317 -49
  6. package/dist/cli/index.js +317 -49
  7. package/dist/cli/{mssql-D7NDIUG7.js → mssql-AYS72PRQ.js} +1 -1
  8. package/dist/cli/{mssql-5VFXLOGV.js → mssql-HI3S4B7E.js} +3 -1
  9. package/dist/cli/{mssql-4KECNFPA.js → mssql-JB63TSGG.js} +4 -1
  10. package/dist/cli/mssql-Y5A62OYG.js +20 -0
  11. package/dist/client/assets/index-BhZ7NrhL.css +1 -0
  12. package/dist/client/assets/index-D-mash8_.js +370 -0
  13. package/dist/client/index.html +2 -2
  14. package/dist/server/{chunk-XFS5KTMI.js → chunk-JYZHE6GB.js} +43 -5
  15. package/dist/server/{chunk-7G2KHS5I.js → chunk-MJJGJZFC.js} +75 -4
  16. package/dist/server/chunk-VEX42Z2L.js +225 -0
  17. package/dist/server/chunk-VQPGGH2I.js +217 -0
  18. package/dist/server/dev.js +317 -49
  19. package/dist/server/index.js +317 -49
  20. package/dist/server/{mssql-UUT2IKOP.js → mssql-H6LKT5KN.js} +1 -1
  21. package/dist/server/mssql-JDRJT5H4.js +18 -0
  22. package/dist/server/mssql-LLTFKNX2.js +18 -0
  23. package/dist/server/mssql-UZUN227W.js +18 -0
  24. package/package.json +4 -3
  25. package/dist/cli/chunk-4IGBRCNN.js +0 -118
  26. package/dist/cli/chunk-IPR5JXB5.js +0 -108
  27. package/dist/cli/mssql-2REU4IX7.js +0 -17
  28. package/dist/client/assets/index-C32MC3if.js +0 -239
  29. package/dist/client/assets/index-piPKidzx.css +0 -1
  30. package/dist/server/chunk-XMPF5YCJ.js +0 -106
  31. package/dist/server/mssql-7KV6MCZK.js +0 -16
  32. package/dist/server/mssql-XRYTOVSF.js +0 -16
@@ -1,239 +0,0 @@
1
- var wf=n=>{throw TypeError(n)};var Bu=(n,o,s)=>o.has(n)||wf("Cannot "+s);var k=(n,o,s)=>(Bu(n,o,"read from private field"),s?s.call(n):o.get(n)),Ee=(n,o,s)=>o.has(n)?wf("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(n):o.set(n,s),le=(n,o,s,l)=>(Bu(n,o,"write to private field"),l?l.call(n,s):o.set(n,s),s),$e=(n,o,s)=>(Bu(n,o,"access private method"),s);var Ki=(n,o,s,l)=>({set _(a){le(n,o,a,s)},get _(){return k(n,o,l)}});(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const d of a)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&l(h)}).observe(document,{childList:!0,subtree:!0});function s(a){const d={};return a.integrity&&(d.integrity=a.integrity),a.referrerPolicy&&(d.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?d.credentials="include":a.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(a){if(a.ep)return;a.ep=!0;const d=s(a);fetch(a.href,d)}})();function vp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var qu={exports:{}},vs={},Gu={exports:{}},Te={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var xf;function um(){if(xf)return Te;xf=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),E=Symbol.iterator;function P(y){return y===null||typeof y!="object"?null:(y=E&&y[E]||y["@@iterator"],typeof y=="function"?y:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,T={};function b(y,N,G){this.props=y,this.context=N,this.refs=T,this.updater=G||j}b.prototype.isReactComponent={},b.prototype.setState=function(y,N){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("setState(...): 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")},b.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function V(){}V.prototype=b.prototype;function $(y,N,G){this.props=y,this.context=N,this.refs=T,this.updater=G||j}var U=$.prototype=new V;U.constructor=$,z(U,b.prototype),U.isPureReactComponent=!0;var L=Array.isArray,X=Object.prototype.hasOwnProperty,I={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function J(y,N,G){var fe,ae={},Se=null,Fe=null;if(N!=null)for(fe in N.ref!==void 0&&(Fe=N.ref),N.key!==void 0&&(Se=""+N.key),N)X.call(N,fe)&&!q.hasOwnProperty(fe)&&(ae[fe]=N[fe]);var A=arguments.length-2;if(A===1)ae.children=G;else if(1<A){for(var Ge=Array(A),it=0;it<A;it++)Ge[it]=arguments[it+2];ae.children=Ge}if(y&&y.defaultProps)for(fe in A=y.defaultProps,A)ae[fe]===void 0&&(ae[fe]=A[fe]);return{$$typeof:n,type:y,key:Se,ref:Fe,props:ae,_owner:I.current}}function Z(y,N){return{$$typeof:n,type:y.type,key:N,ref:y.ref,props:y.props,_owner:y._owner}}function te(y){return typeof y=="object"&&y!==null&&y.$$typeof===n}function K(y){var N={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(G){return N[G]})}var Ie=/\/+/g;function Le(y,N){return typeof y=="object"&&y!==null&&y.key!=null?K(""+y.key):N.toString(36)}function ze(y,N,G,fe,ae){var Se=typeof y;(Se==="undefined"||Se==="boolean")&&(y=null);var Fe=!1;if(y===null)Fe=!0;else switch(Se){case"string":case"number":Fe=!0;break;case"object":switch(y.$$typeof){case n:case o:Fe=!0}}if(Fe)return Fe=y,ae=ae(Fe),y=fe===""?"."+Le(Fe,0):fe,L(ae)?(G="",y!=null&&(G=y.replace(Ie,"$&/")+"/"),ze(ae,N,G,"",function(it){return it})):ae!=null&&(te(ae)&&(ae=Z(ae,G+(!ae.key||Fe&&Fe.key===ae.key?"":(""+ae.key).replace(Ie,"$&/")+"/")+y)),N.push(ae)),1;if(Fe=0,fe=fe===""?".":fe+":",L(y))for(var A=0;A<y.length;A++){Se=y[A];var Ge=fe+Le(Se,A);Fe+=ze(Se,N,G,Ge,ae)}else if(Ge=P(y),typeof Ge=="function")for(y=Ge.call(y),A=0;!(Se=y.next()).done;)Se=Se.value,Ge=fe+Le(Se,A++),Fe+=ze(Se,N,G,Ge,ae);else if(Se==="object")throw N=String(y),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.");return Fe}function ie(y,N,G){if(y==null)return y;var fe=[],ae=0;return ze(y,fe,"","",function(Se){return N.call(G,Se,ae++)}),fe}function Re(y){if(y._status===-1){var N=y._result;N=N(),N.then(function(G){(y._status===0||y._status===-1)&&(y._status=1,y._result=G)},function(G){(y._status===0||y._status===-1)&&(y._status=2,y._result=G)}),y._status===-1&&(y._status=0,y._result=N)}if(y._status===1)return y._result.default;throw y._result}var _e={current:null},Y={transition:null},oe={ReactCurrentDispatcher:_e,ReactCurrentBatchConfig:Y,ReactCurrentOwner:I};function D(){throw Error("act(...) is not supported in production builds of React.")}return Te.Children={map:ie,forEach:function(y,N,G){ie(y,function(){N.apply(this,arguments)},G)},count:function(y){var N=0;return ie(y,function(){N++}),N},toArray:function(y){return ie(y,function(N){return N})||[]},only:function(y){if(!te(y))throw Error("React.Children.only expected to receive a single React element child.");return y}},Te.Component=b,Te.Fragment=s,Te.Profiler=a,Te.PureComponent=$,Te.StrictMode=l,Te.Suspense=g,Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,Te.act=D,Te.cloneElement=function(y,N,G){if(y==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+y+".");var fe=z({},y.props),ae=y.key,Se=y.ref,Fe=y._owner;if(N!=null){if(N.ref!==void 0&&(Se=N.ref,Fe=I.current),N.key!==void 0&&(ae=""+N.key),y.type&&y.type.defaultProps)var A=y.type.defaultProps;for(Ge in N)X.call(N,Ge)&&!q.hasOwnProperty(Ge)&&(fe[Ge]=N[Ge]===void 0&&A!==void 0?A[Ge]:N[Ge])}var Ge=arguments.length-2;if(Ge===1)fe.children=G;else if(1<Ge){A=Array(Ge);for(var it=0;it<Ge;it++)A[it]=arguments[it+2];fe.children=A}return{$$typeof:n,type:y.type,key:ae,ref:Se,props:fe,_owner:Fe}},Te.createContext=function(y){return y={$$typeof:h,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},y.Provider={$$typeof:d,_context:y},y.Consumer=y},Te.createElement=J,Te.createFactory=function(y){var N=J.bind(null,y);return N.type=y,N},Te.createRef=function(){return{current:null}},Te.forwardRef=function(y){return{$$typeof:m,render:y}},Te.isValidElement=te,Te.lazy=function(y){return{$$typeof:w,_payload:{_status:-1,_result:y},_init:Re}},Te.memo=function(y,N){return{$$typeof:S,type:y,compare:N===void 0?null:N}},Te.startTransition=function(y){var N=Y.transition;Y.transition={};try{y()}finally{Y.transition=N}},Te.unstable_act=D,Te.useCallback=function(y,N){return _e.current.useCallback(y,N)},Te.useContext=function(y){return _e.current.useContext(y)},Te.useDebugValue=function(){},Te.useDeferredValue=function(y){return _e.current.useDeferredValue(y)},Te.useEffect=function(y,N){return _e.current.useEffect(y,N)},Te.useId=function(){return _e.current.useId()},Te.useImperativeHandle=function(y,N,G){return _e.current.useImperativeHandle(y,N,G)},Te.useInsertionEffect=function(y,N){return _e.current.useInsertionEffect(y,N)},Te.useLayoutEffect=function(y,N){return _e.current.useLayoutEffect(y,N)},Te.useMemo=function(y,N){return _e.current.useMemo(y,N)},Te.useReducer=function(y,N,G){return _e.current.useReducer(y,N,G)},Te.useRef=function(y){return _e.current.useRef(y)},Te.useState=function(y){return _e.current.useState(y)},Te.useSyncExternalStore=function(y,N,G){return _e.current.useSyncExternalStore(y,N,G)},Te.useTransition=function(){return _e.current.useTransition()},Te.version="18.3.1",Te}var Sf;function Ma(){return Sf||(Sf=1,Gu.exports=um()),Gu.exports}/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Cf;function am(){if(Cf)return vs;Cf=1;var n=Ma(),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function h(m,g,S){var w,E={},P=null,j=null;S!==void 0&&(P=""+S),g.key!==void 0&&(P=""+g.key),g.ref!==void 0&&(j=g.ref);for(w in g)l.call(g,w)&&!d.hasOwnProperty(w)&&(E[w]=g[w]);if(m&&m.defaultProps)for(w in g=m.defaultProps,g)E[w]===void 0&&(E[w]=g[w]);return{$$typeof:o,type:m,key:P,ref:j,props:E,_owner:a.current}}return vs.Fragment=s,vs.jsx=h,vs.jsxs=h,vs}var kf;function cm(){return kf||(kf=1,qu.exports=am()),qu.exports}var f=cm(),C=Ma();const qr=vp(C);var Wi={},Ku={exports:{}},Tt={},Wu={exports:{}},Yu={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var Rf;function dm(){return Rf||(Rf=1,(function(n){function o(Y,oe){var D=Y.length;Y.push(oe);e:for(;0<D;){var y=D-1>>>1,N=Y[y];if(0<a(N,oe))Y[y]=oe,Y[D]=N,D=y;else break e}}function s(Y){return Y.length===0?null:Y[0]}function l(Y){if(Y.length===0)return null;var oe=Y[0],D=Y.pop();if(D!==oe){Y[0]=D;e:for(var y=0,N=Y.length,G=N>>>1;y<G;){var fe=2*(y+1)-1,ae=Y[fe],Se=fe+1,Fe=Y[Se];if(0>a(ae,D))Se<N&&0>a(Fe,ae)?(Y[y]=Fe,Y[Se]=D,y=Se):(Y[y]=ae,Y[fe]=D,y=fe);else if(Se<N&&0>a(Fe,D))Y[y]=Fe,Y[Se]=D,y=Se;else break e}}return oe}function a(Y,oe){var D=Y.sortIndex-oe.sortIndex;return D!==0?D:Y.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();n.unstable_now=function(){return h.now()-m}}var g=[],S=[],w=1,E=null,P=3,j=!1,z=!1,T=!1,b=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function U(Y){for(var oe=s(S);oe!==null;){if(oe.callback===null)l(S);else if(oe.startTime<=Y)l(S),oe.sortIndex=oe.expirationTime,o(g,oe);else break;oe=s(S)}}function L(Y){if(T=!1,U(Y),!z)if(s(g)!==null)z=!0,Re(X);else{var oe=s(S);oe!==null&&_e(L,oe.startTime-Y)}}function X(Y,oe){z=!1,T&&(T=!1,V(J),J=-1),j=!0;var D=P;try{for(U(oe),E=s(g);E!==null&&(!(E.expirationTime>oe)||Y&&!K());){var y=E.callback;if(typeof y=="function"){E.callback=null,P=E.priorityLevel;var N=y(E.expirationTime<=oe);oe=n.unstable_now(),typeof N=="function"?E.callback=N:E===s(g)&&l(g),U(oe)}else l(g);E=s(g)}if(E!==null)var G=!0;else{var fe=s(S);fe!==null&&_e(L,fe.startTime-oe),G=!1}return G}finally{E=null,P=D,j=!1}}var I=!1,q=null,J=-1,Z=5,te=-1;function K(){return!(n.unstable_now()-te<Z)}function Ie(){if(q!==null){var Y=n.unstable_now();te=Y;var oe=!0;try{oe=q(!0,Y)}finally{oe?Le():(I=!1,q=null)}}else I=!1}var Le;if(typeof $=="function")Le=function(){$(Ie)};else if(typeof MessageChannel<"u"){var ze=new MessageChannel,ie=ze.port2;ze.port1.onmessage=Ie,Le=function(){ie.postMessage(null)}}else Le=function(){b(Ie,0)};function Re(Y){q=Y,I||(I=!0,Le())}function _e(Y,oe){J=b(function(){Y(n.unstable_now())},oe)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Y){Y.callback=null},n.unstable_continueExecution=function(){z||j||(z=!0,Re(X))},n.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<Y?Math.floor(1e3/Y):5},n.unstable_getCurrentPriorityLevel=function(){return P},n.unstable_getFirstCallbackNode=function(){return s(g)},n.unstable_next=function(Y){switch(P){case 1:case 2:case 3:var oe=3;break;default:oe=P}var D=P;P=oe;try{return Y()}finally{P=D}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(Y,oe){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var D=P;P=Y;try{return oe()}finally{P=D}},n.unstable_scheduleCallback=function(Y,oe,D){var y=n.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?y+D:y):D=y,Y){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=D+N,Y={id:w++,callback:oe,priorityLevel:Y,startTime:D,expirationTime:N,sortIndex:-1},D>y?(Y.sortIndex=D,o(S,Y),s(g)===null&&Y===s(S)&&(T?(V(J),J=-1):T=!0,_e(L,D-y))):(Y.sortIndex=N,o(g,Y),z||j||(z=!0,Re(X))),Y},n.unstable_shouldYield=K,n.unstable_wrapCallback=function(Y){var oe=P;return function(){var D=P;P=oe;try{return Y.apply(this,arguments)}finally{P=D}}}})(Yu)),Yu}var Ef;function fm(){return Ef||(Ef=1,Wu.exports=dm()),Wu.exports}/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var jf;function pm(){if(jf)return Tt;jf=1;var n=Ma(),o=fm();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,a={};function d(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(a[e]=t,e=0;e<t.length;e++)l.add(t[e])}var m=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,S=/^[: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]*$/,w={},E={};function P(e){return g.call(E,e)?!0:g.call(w,e)?!1:S.test(e)?E[e]=!0:(w[e]=!0,!1)}function j(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function z(e,t,r,i){if(t===null||typeof t>"u"||j(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function T(e,t,r,i,u,c,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=u,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=p}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new T(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new T(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new T(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new T(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new T(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new T(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new T(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new T(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new T(e,5,!1,e.toLowerCase(),null,!1,!1)});var V=/[\-:]([a-z])/g;function $(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(V,$);b[t]=new T(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(V,$);b[t]=new T(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(V,$);b[t]=new T(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new T(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new T(e,1,!1,e.toLowerCase(),null,!0,!0)});function U(e,t,r,i){var u=b.hasOwnProperty(t)?b[t]:null;(u!==null?u.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(z(t,r,u,i)&&(r=null),i||u===null?P(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):u.mustUseProperty?e[u.propertyName]=r===null?u.type===3?!1:"":r:(t=u.attributeName,i=u.attributeNamespace,r===null?e.removeAttribute(t):(u=u.type,r=u===3||u===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var L=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),I=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),te=Symbol.for("react.provider"),K=Symbol.for("react.context"),Ie=Symbol.for("react.forward_ref"),Le=Symbol.for("react.suspense"),ze=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),Re=Symbol.for("react.lazy"),_e=Symbol.for("react.offscreen"),Y=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=Y&&e[Y]||e["@@iterator"],typeof e=="function"?e:null)}var D=Object.assign,y;function N(e){if(y===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);y=t&&t[1]||""}return`
34
- `+y+e}var G=!1;function fe(e,t){if(!e||G)return"";G=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(O){var i=O}Reflect.construct(e,[],t)}else{try{t.call()}catch(O){i=O}e.call(t.prototype)}else{try{throw Error()}catch(O){i=O}e()}}catch(O){if(O&&i&&typeof O.stack=="string"){for(var u=O.stack.split(`
35
- `),c=i.stack.split(`
36
- `),p=u.length-1,v=c.length-1;1<=p&&0<=v&&u[p]!==c[v];)v--;for(;1<=p&&0<=v;p--,v--)if(u[p]!==c[v]){if(p!==1||v!==1)do if(p--,v--,0>v||u[p]!==c[v]){var x=`
37
- `+u[p].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),x}while(1<=p&&0<=v);break}}}finally{G=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?N(e):""}function ae(e){switch(e.tag){case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 2:case 15:return e=fe(e.type,!1),e;case 11:return e=fe(e.type.render,!1),e;case 1:return e=fe(e.type,!0),e;default:return""}}function Se(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case q:return"Fragment";case I:return"Portal";case Z:return"Profiler";case J:return"StrictMode";case Le:return"Suspense";case ze:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case K:return(e.displayName||"Context")+".Consumer";case te:return(e._context.displayName||"Context")+".Provider";case Ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ie:return t=e.displayName||null,t!==null?t:Se(e.type)||"Memo";case Re:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}function Fe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Se(t);case 8:return t===J?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function A(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ge(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function it(e){var t=Ge(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(p){i=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(p){i=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ne(e){e._valueTracker||(e._valueTracker=it(e))}function ce(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Ge(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Pe(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function we(e,t){var r=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function He(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=A(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $t(e,t){t=t.checked,t!=null&&U(e,"checked",t,!1)}function ht(e,t){$t(e,t);var r=A(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?xe(e,t.type,r):t.hasOwnProperty("defaultValue")&&xe(e,t.type,A(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nt(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function xe(e,t,r){(t!=="number"||Pe(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var tn=Array.isArray;function Rt(e,t,r,i){if(e=e.options,t){t={};for(var u=0;u<r.length;u++)t["$"+r[u]]=!0;for(r=0;r<e.length;r++)u=t.hasOwnProperty("$"+e[r].value),e[r].selected!==u&&(e[r].selected=u),u&&i&&(e[r].defaultSelected=!0)}else{for(r=""+A(r),t=null,u=0;u<e.length;u++){if(e[u].value===r){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function kn(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ls(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(s(92));if(tn(r)){if(1<r.length)throw Error(s(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:A(r)}}function zs(e,t){var r=A(t.value),i=A(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function $s(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Vs(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Do(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Vs(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wr,As=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,u){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,u)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wr=Wr||document.createElement("div"),Wr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function wr(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var xr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},al=["Webkit","ms","Moz","O"];Object.keys(xr).forEach(function(e){al.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xr[t]=xr[e]})});function To(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||xr.hasOwnProperty(e)&&xr[e]?(""+t).trim():t+"px"}function M(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,u=To(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,u):e[r]=u}}var H=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function re(e,t){if(t){if(H[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Oe(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var me=null;function pe(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ye=null,ge=null,De=null;function lt(e){if(e=ns(e)){if(typeof ye!="function")throw Error(s(280));var t=e.stateNode;t&&(t=ai(t),ye(e.stateNode,e.type,t))}}function qt(e){ge?De?De.push(e):De=[e]:ge=e}function pn(){if(ge){var e=ge,t=De;if(De=ge=null,lt(e),t)for(e=0;e<t.length;e++)lt(t[e])}}function Vn(e,t){return e(t)}function Lo(){}var Sr=!1;function Et(e,t,r){if(Sr)return e(t,r);Sr=!0;try{return Vn(e,t,r)}finally{Sr=!1,(ge!==null||De!==null)&&(Lo(),pn())}}function Rn(e,t){var r=e.stateNode;if(r===null)return null;var i=ai(r);if(i===null)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(s(231,t,typeof r));return r}var Cr=!1;if(m)try{var Yr={};Object.defineProperty(Yr,"passive",{get:function(){Cr=!0}}),window.addEventListener("test",Yr,Yr),window.removeEventListener("test",Yr,Yr)}catch{Cr=!1}function hh(e,t,r,i,u,c,p,v,x){var O=Array.prototype.slice.call(arguments,3);try{t.apply(r,O)}catch(B){this.onError(B)}}var zo=!1,bs=null,Hs=!1,cl=null,gh={onError:function(e){zo=!0,bs=e}};function mh(e,t,r,i,u,c,p,v,x){zo=!1,bs=null,hh.apply(gh,arguments)}function vh(e,t,r,i,u,c,p,v,x){if(mh.apply(this,arguments),zo){if(zo){var O=bs;zo=!1,bs=null}else throw Error(s(198));Hs||(Hs=!0,cl=O)}}function kr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function ba(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ha(e){if(kr(e)!==e)throw Error(s(188))}function yh(e){var t=e.alternate;if(!t){if(t=kr(e),t===null)throw Error(s(188));return t!==e?null:e}for(var r=e,i=t;;){var u=r.return;if(u===null)break;var c=u.alternate;if(c===null){if(i=u.return,i!==null){r=i;continue}break}if(u.child===c.child){for(c=u.child;c;){if(c===r)return Ha(u),e;if(c===i)return Ha(u),t;c=c.sibling}throw Error(s(188))}if(r.return!==i.return)r=u,i=c;else{for(var p=!1,v=u.child;v;){if(v===r){p=!0,r=u,i=c;break}if(v===i){p=!0,i=u,r=c;break}v=v.sibling}if(!p){for(v=c.child;v;){if(v===r){p=!0,r=c,i=u;break}if(v===i){p=!0,i=c,r=u;break}v=v.sibling}if(!p)throw Error(s(189))}}if(r.alternate!==i)throw Error(s(190))}if(r.tag!==3)throw Error(s(188));return r.stateNode.current===r?e:t}function Ua(e){return e=yh(e),e!==null?Qa(e):null}function Qa(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Qa(e);if(t!==null)return t;e=e.sibling}return null}var Ba=o.unstable_scheduleCallback,qa=o.unstable_cancelCallback,wh=o.unstable_shouldYield,xh=o.unstable_requestPaint,rt=o.unstable_now,Sh=o.unstable_getCurrentPriorityLevel,dl=o.unstable_ImmediatePriority,Ga=o.unstable_UserBlockingPriority,Us=o.unstable_NormalPriority,Ch=o.unstable_LowPriority,Ka=o.unstable_IdlePriority,Qs=null,hn=null;function kh(e){if(hn&&typeof hn.onCommitFiberRoot=="function")try{hn.onCommitFiberRoot(Qs,e,void 0,(e.current.flags&128)===128)}catch{}}var nn=Math.clz32?Math.clz32:jh,Rh=Math.log,Eh=Math.LN2;function jh(e){return e>>>=0,e===0?32:31-(Rh(e)/Eh|0)|0}var Bs=64,qs=4194304;function $o(e){switch(e&-e){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Gs(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,u=e.suspendedLanes,c=e.pingedLanes,p=r&268435455;if(p!==0){var v=p&~u;v!==0?i=$o(v):(c&=p,c!==0&&(i=$o(c)))}else p=r&~u,p!==0?i=$o(p):c!==0&&(i=$o(c));if(i===0)return 0;if(t!==0&&t!==i&&(t&u)===0&&(u=i&-i,c=t&-t,u>=c||u===16&&(c&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-nn(t),u=1<<r,i|=e[r],t&=~u;return i}function Nh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function _h(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes;0<c;){var p=31-nn(c),v=1<<p,x=u[p];x===-1?((v&r)===0||(v&i)!==0)&&(u[p]=Nh(v,t)):x<=t&&(e.expiredLanes|=v),c&=~v}}function fl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Wa(){var e=Bs;return Bs<<=1,(Bs&4194240)===0&&(Bs=64),e}function pl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Vo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nn(t),e[t]=r}function Ph(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var u=31-nn(r),c=1<<u;t[u]=0,i[u]=-1,e[u]=-1,r&=~c}}function hl(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-nn(r),u=1<<i;u&t|e[i]&t&&(e[i]|=t),r&=~u}}var Be=0;function Ya(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Ja,gl,Xa,Za,ec,ml=!1,Ks=[],An=null,bn=null,Hn=null,Ao=new Map,bo=new Map,Un=[],Mh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function tc(e,t){switch(e){case"focusin":case"focusout":An=null;break;case"dragenter":case"dragleave":bn=null;break;case"mouseover":case"mouseout":Hn=null;break;case"pointerover":case"pointerout":Ao.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bo.delete(t.pointerId)}}function Ho(e,t,r,i,u,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:c,targetContainers:[u]},t!==null&&(t=ns(t),t!==null&&gl(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Fh(e,t,r,i,u){switch(t){case"focusin":return An=Ho(An,e,t,r,i,u),!0;case"dragenter":return bn=Ho(bn,e,t,r,i,u),!0;case"mouseover":return Hn=Ho(Hn,e,t,r,i,u),!0;case"pointerover":var c=u.pointerId;return Ao.set(c,Ho(Ao.get(c)||null,e,t,r,i,u)),!0;case"gotpointercapture":return c=u.pointerId,bo.set(c,Ho(bo.get(c)||null,e,t,r,i,u)),!0}return!1}function nc(e){var t=Rr(e.target);if(t!==null){var r=kr(t);if(r!==null){if(t=r.tag,t===13){if(t=ba(r),t!==null){e.blockedOn=t,ec(e.priority,function(){Xa(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ws(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=yl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);me=i,r.target.dispatchEvent(i),me=null}else return t=ns(r),t!==null&&gl(t),e.blockedOn=r,!1;t.shift()}return!0}function rc(e,t,r){Ws(e)&&r.delete(t)}function Oh(){ml=!1,An!==null&&Ws(An)&&(An=null),bn!==null&&Ws(bn)&&(bn=null),Hn!==null&&Ws(Hn)&&(Hn=null),Ao.forEach(rc),bo.forEach(rc)}function Uo(e,t){e.blockedOn===t&&(e.blockedOn=null,ml||(ml=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Oh)))}function Qo(e){function t(u){return Uo(u,e)}if(0<Ks.length){Uo(Ks[0],e);for(var r=1;r<Ks.length;r++){var i=Ks[r];i.blockedOn===e&&(i.blockedOn=null)}}for(An!==null&&Uo(An,e),bn!==null&&Uo(bn,e),Hn!==null&&Uo(Hn,e),Ao.forEach(t),bo.forEach(t),r=0;r<Un.length;r++)i=Un[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<Un.length&&(r=Un[0],r.blockedOn===null);)nc(r),r.blockedOn===null&&Un.shift()}var Jr=L.ReactCurrentBatchConfig,Ys=!0;function Ih(e,t,r,i){var u=Be,c=Jr.transition;Jr.transition=null;try{Be=1,vl(e,t,r,i)}finally{Be=u,Jr.transition=c}}function Dh(e,t,r,i){var u=Be,c=Jr.transition;Jr.transition=null;try{Be=4,vl(e,t,r,i)}finally{Be=u,Jr.transition=c}}function vl(e,t,r,i){if(Ys){var u=yl(e,t,r,i);if(u===null)Tl(e,t,i,Js,r),tc(e,i);else if(Fh(u,e,t,r,i))i.stopPropagation();else if(tc(e,i),t&4&&-1<Mh.indexOf(e)){for(;u!==null;){var c=ns(u);if(c!==null&&Ja(c),c=yl(e,t,r,i),c===null&&Tl(e,t,i,Js,r),c===u)break;u=c}u!==null&&i.stopPropagation()}else Tl(e,t,i,null,r)}}var Js=null;function yl(e,t,r,i){if(Js=null,e=pe(i),e=Rr(e),e!==null)if(t=kr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ba(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Js=e,null}function oc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Sh()){case dl:return 1;case Ga:return 4;case Us:case Ch:return 16;case Ka:return 536870912;default:return 16}default:return 16}}var Qn=null,wl=null,Xs=null;function sc(){if(Xs)return Xs;var e,t=wl,r=t.length,i,u="value"in Qn?Qn.value:Qn.textContent,c=u.length;for(e=0;e<r&&t[e]===u[e];e++);var p=r-e;for(i=1;i<=p&&t[r-i]===u[c-i];i++);return Xs=u.slice(e,1<i?1-i:void 0)}function Zs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ei(){return!0}function ic(){return!1}function Vt(e){function t(r,i,u,c,p){this._reactName=r,this._targetInst=u,this.type=i,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(r=e[v],this[v]=r?r(c):c[v]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ei:ic,this.isPropagationStopped=ic,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ei)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ei)},persist:function(){},isPersistent:ei}),t}var Xr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=Vt(Xr),Bo=D({},Xr,{view:0,detail:0}),Th=Vt(Bo),Sl,Cl,qo,ti=D({},Bo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==qo&&(qo&&e.type==="mousemove"?(Sl=e.screenX-qo.screenX,Cl=e.screenY-qo.screenY):Cl=Sl=0,qo=e),Sl)},movementY:function(e){return"movementY"in e?e.movementY:Cl}}),lc=Vt(ti),Lh=D({},ti,{dataTransfer:0}),zh=Vt(Lh),$h=D({},Bo,{relatedTarget:0}),kl=Vt($h),Vh=D({},Xr,{animationName:0,elapsedTime:0,pseudoElement:0}),Ah=Vt(Vh),bh=D({},Xr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Hh=Vt(bh),Uh=D({},Xr,{data:0}),uc=Vt(Uh),Qh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bh={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},qh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qh[e])?!!t[e]:!1}function Rl(){return Gh}var Kh=D({},Bo,{key:function(e){if(e.key){var t=Qh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Zs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rl,charCode:function(e){return e.type==="keypress"?Zs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Wh=Vt(Kh),Yh=D({},ti,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ac=Vt(Yh),Jh=D({},Bo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rl}),Xh=Vt(Jh),Zh=D({},Xr,{propertyName:0,elapsedTime:0,pseudoElement:0}),eg=Vt(Zh),tg=D({},ti,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ng=Vt(tg),rg=[9,13,27,32],El=m&&"CompositionEvent"in window,Go=null;m&&"documentMode"in document&&(Go=document.documentMode);var og=m&&"TextEvent"in window&&!Go,cc=m&&(!El||Go&&8<Go&&11>=Go),dc=" ",fc=!1;function pc(e,t){switch(e){case"keyup":return rg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zr=!1;function sg(e,t){switch(e){case"compositionend":return hc(t);case"keypress":return t.which!==32?null:(fc=!0,dc);case"textInput":return e=t.data,e===dc&&fc?null:e;default:return null}}function ig(e,t){if(Zr)return e==="compositionend"||!El&&pc(e,t)?(e=sc(),Xs=wl=Qn=null,Zr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return cc&&t.locale!=="ko"?null:t.data;default:return null}}var lg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function gc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!lg[e.type]:t==="textarea"}function mc(e,t,r,i){qt(i),t=ii(t,"onChange"),0<t.length&&(r=new xl("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Ko=null,Wo=null;function ug(e){Dc(e,0)}function ni(e){var t=oo(e);if(ce(t))return e}function ag(e,t){if(e==="change")return t}var vc=!1;if(m){var jl;if(m){var Nl="oninput"in document;if(!Nl){var yc=document.createElement("div");yc.setAttribute("oninput","return;"),Nl=typeof yc.oninput=="function"}jl=Nl}else jl=!1;vc=jl&&(!document.documentMode||9<document.documentMode)}function wc(){Ko&&(Ko.detachEvent("onpropertychange",xc),Wo=Ko=null)}function xc(e){if(e.propertyName==="value"&&ni(Wo)){var t=[];mc(t,Wo,e,pe(e)),Et(ug,t)}}function cg(e,t,r){e==="focusin"?(wc(),Ko=t,Wo=r,Ko.attachEvent("onpropertychange",xc)):e==="focusout"&&wc()}function dg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ni(Wo)}function fg(e,t){if(e==="click")return ni(t)}function pg(e,t){if(e==="input"||e==="change")return ni(t)}function hg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rn=typeof Object.is=="function"?Object.is:hg;function Yo(e,t){if(rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var u=r[i];if(!g.call(t,u)||!rn(e[u],t[u]))return!1}return!0}function Sc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cc(e,t){var r=Sc(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Sc(r)}}function kc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rc(){for(var e=window,t=Pe();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Pe(e.document)}return t}function _l(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gg(e){var t=Rc(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&kc(r.ownerDocument.documentElement,r)){if(i!==null&&_l(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var u=r.textContent.length,c=Math.min(i.start,u);i=i.end===void 0?c:Math.min(i.end,u),!e.extend&&c>i&&(u=i,i=c,c=u),u=Cc(r,c);var p=Cc(r,i);u&&p&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),c>i?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mg=m&&"documentMode"in document&&11>=document.documentMode,eo=null,Pl=null,Jo=null,Ml=!1;function Ec(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ml||eo==null||eo!==Pe(i)||(i=eo,"selectionStart"in i&&_l(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Jo&&Yo(Jo,i)||(Jo=i,i=ii(Pl,"onSelect"),0<i.length&&(t=new xl("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=eo)))}function ri(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var to={animationend:ri("Animation","AnimationEnd"),animationiteration:ri("Animation","AnimationIteration"),animationstart:ri("Animation","AnimationStart"),transitionend:ri("Transition","TransitionEnd")},Fl={},jc={};m&&(jc=document.createElement("div").style,"AnimationEvent"in window||(delete to.animationend.animation,delete to.animationiteration.animation,delete to.animationstart.animation),"TransitionEvent"in window||delete to.transitionend.transition);function oi(e){if(Fl[e])return Fl[e];if(!to[e])return e;var t=to[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in jc)return Fl[e]=t[r];return e}var Nc=oi("animationend"),_c=oi("animationiteration"),Pc=oi("animationstart"),Mc=oi("transitionend"),Fc=new Map,Oc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Bn(e,t){Fc.set(e,t),d(t,[e])}for(var Ol=0;Ol<Oc.length;Ol++){var Il=Oc[Ol],vg=Il.toLowerCase(),yg=Il[0].toUpperCase()+Il.slice(1);Bn(vg,"on"+yg)}Bn(Nc,"onAnimationEnd"),Bn(_c,"onAnimationIteration"),Bn(Pc,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(Mc,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),wg=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xo));function Ic(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,vh(i,t,void 0,e),e.currentTarget=null}function Dc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],u=i.event;i=i.listeners;e:{var c=void 0;if(t)for(var p=i.length-1;0<=p;p--){var v=i[p],x=v.instance,O=v.currentTarget;if(v=v.listener,x!==c&&u.isPropagationStopped())break e;Ic(u,v,O),c=x}else for(p=0;p<i.length;p++){if(v=i[p],x=v.instance,O=v.currentTarget,v=v.listener,x!==c&&u.isPropagationStopped())break e;Ic(u,v,O),c=x}}}if(Hs)throw e=cl,Hs=!1,cl=null,e}function We(e,t){var r=t[bl];r===void 0&&(r=t[bl]=new Set);var i=e+"__bubble";r.has(i)||(Tc(t,e,2,!1),r.add(i))}function Dl(e,t,r){var i=0;t&&(i|=4),Tc(r,e,i,t)}var si="_reactListening"+Math.random().toString(36).slice(2);function Zo(e){if(!e[si]){e[si]=!0,l.forEach(function(r){r!=="selectionchange"&&(wg.has(r)||Dl(r,!1,e),Dl(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[si]||(t[si]=!0,Dl("selectionchange",!1,t))}}function Tc(e,t,r,i){switch(oc(t)){case 1:var u=Ih;break;case 4:u=Dh;break;default:u=vl}r=u.bind(null,t,r,e),u=void 0,!Cr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(t,r,{capture:!0,passive:u}):e.addEventListener(t,r,!0):u!==void 0?e.addEventListener(t,r,{passive:u}):e.addEventListener(t,r,!1)}function Tl(e,t,r,i,u){var c=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var p=i.tag;if(p===3||p===4){var v=i.stateNode.containerInfo;if(v===u||v.nodeType===8&&v.parentNode===u)break;if(p===4)for(p=i.return;p!==null;){var x=p.tag;if((x===3||x===4)&&(x=p.stateNode.containerInfo,x===u||x.nodeType===8&&x.parentNode===u))return;p=p.return}for(;v!==null;){if(p=Rr(v),p===null)return;if(x=p.tag,x===5||x===6){i=c=p;continue e}v=v.parentNode}}i=i.return}Et(function(){var O=c,B=pe(r),W=[];e:{var Q=Fc.get(e);if(Q!==void 0){var se=xl,de=e;switch(e){case"keypress":if(Zs(r)===0)break e;case"keydown":case"keyup":se=Wh;break;case"focusin":de="focus",se=kl;break;case"focusout":de="blur",se=kl;break;case"beforeblur":case"afterblur":se=kl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=lc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=zh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=Xh;break;case Nc:case _c:case Pc:se=Ah;break;case Mc:se=eg;break;case"scroll":se=Th;break;case"wheel":se=ng;break;case"copy":case"cut":case"paste":se=Hh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=ac}var he=(t&4)!==0,ot=!he&&e==="scroll",_=he?Q!==null?Q+"Capture":null:Q;he=[];for(var R=O,F;R!==null;){F=R;var ee=F.stateNode;if(F.tag===5&&ee!==null&&(F=ee,_!==null&&(ee=Rn(R,_),ee!=null&&he.push(es(R,ee,F)))),ot)break;R=R.return}0<he.length&&(Q=new se(Q,de,null,r,B),W.push({event:Q,listeners:he}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",se=e==="mouseout"||e==="pointerout",Q&&r!==me&&(de=r.relatedTarget||r.fromElement)&&(Rr(de)||de[En]))break e;if((se||Q)&&(Q=B.window===B?B:(Q=B.ownerDocument)?Q.defaultView||Q.parentWindow:window,se?(de=r.relatedTarget||r.toElement,se=O,de=de?Rr(de):null,de!==null&&(ot=kr(de),de!==ot||de.tag!==5&&de.tag!==6)&&(de=null)):(se=null,de=O),se!==de)){if(he=lc,ee="onMouseLeave",_="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(he=ac,ee="onPointerLeave",_="onPointerEnter",R="pointer"),ot=se==null?Q:oo(se),F=de==null?Q:oo(de),Q=new he(ee,R+"leave",se,r,B),Q.target=ot,Q.relatedTarget=F,ee=null,Rr(B)===O&&(he=new he(_,R+"enter",de,r,B),he.target=F,he.relatedTarget=ot,ee=he),ot=ee,se&&de)t:{for(he=se,_=de,R=0,F=he;F;F=no(F))R++;for(F=0,ee=_;ee;ee=no(ee))F++;for(;0<R-F;)he=no(he),R--;for(;0<F-R;)_=no(_),F--;for(;R--;){if(he===_||_!==null&&he===_.alternate)break t;he=no(he),_=no(_)}he=null}else he=null;se!==null&&Lc(W,Q,se,he,!1),de!==null&&ot!==null&&Lc(W,ot,de,he,!0)}}e:{if(Q=O?oo(O):window,se=Q.nodeName&&Q.nodeName.toLowerCase(),se==="select"||se==="input"&&Q.type==="file")var ve=ag;else if(gc(Q))if(vc)ve=pg;else{ve=dg;var Ce=cg}else(se=Q.nodeName)&&se.toLowerCase()==="input"&&(Q.type==="checkbox"||Q.type==="radio")&&(ve=fg);if(ve&&(ve=ve(e,O))){mc(W,ve,r,B);break e}Ce&&Ce(e,Q,O),e==="focusout"&&(Ce=Q._wrapperState)&&Ce.controlled&&Q.type==="number"&&xe(Q,"number",Q.value)}switch(Ce=O?oo(O):window,e){case"focusin":(gc(Ce)||Ce.contentEditable==="true")&&(eo=Ce,Pl=O,Jo=null);break;case"focusout":Jo=Pl=eo=null;break;case"mousedown":Ml=!0;break;case"contextmenu":case"mouseup":case"dragend":Ml=!1,Ec(W,r,B);break;case"selectionchange":if(mg)break;case"keydown":case"keyup":Ec(W,r,B)}var ke;if(El)e:{switch(e){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Zr?pc(e,r)&&(Me="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Me="onCompositionStart");Me&&(cc&&r.locale!=="ko"&&(Zr||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Zr&&(ke=sc()):(Qn=B,wl="value"in Qn?Qn.value:Qn.textContent,Zr=!0)),Ce=ii(O,Me),0<Ce.length&&(Me=new uc(Me,e,null,r,B),W.push({event:Me,listeners:Ce}),ke?Me.data=ke:(ke=hc(r),ke!==null&&(Me.data=ke)))),(ke=og?sg(e,r):ig(e,r))&&(O=ii(O,"onBeforeInput"),0<O.length&&(B=new uc("onBeforeInput","beforeinput",null,r,B),W.push({event:B,listeners:O}),B.data=ke))}Dc(W,t)})}function es(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ii(e,t){for(var r=t+"Capture",i=[];e!==null;){var u=e,c=u.stateNode;u.tag===5&&c!==null&&(u=c,c=Rn(e,r),c!=null&&i.unshift(es(e,c,u)),c=Rn(e,t),c!=null&&i.push(es(e,c,u))),e=e.return}return i}function no(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Lc(e,t,r,i,u){for(var c=t._reactName,p=[];r!==null&&r!==i;){var v=r,x=v.alternate,O=v.stateNode;if(x!==null&&x===i)break;v.tag===5&&O!==null&&(v=O,u?(x=Rn(r,c),x!=null&&p.unshift(es(r,x,v))):u||(x=Rn(r,c),x!=null&&p.push(es(r,x,v)))),r=r.return}p.length!==0&&e.push({event:t,listeners:p})}var xg=/\r\n?/g,Sg=/\u0000|\uFFFD/g;function zc(e){return(typeof e=="string"?e:""+e).replace(xg,`
38
- `).replace(Sg,"")}function li(e,t,r){if(t=zc(t),zc(e)!==t&&r)throw Error(s(425))}function ui(){}var Ll=null,zl=null;function $l(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vl=typeof setTimeout=="function"?setTimeout:void 0,Cg=typeof clearTimeout=="function"?clearTimeout:void 0,$c=typeof Promise=="function"?Promise:void 0,kg=typeof queueMicrotask=="function"?queueMicrotask:typeof $c<"u"?function(e){return $c.resolve(null).then(e).catch(Rg)}:Vl;function Rg(e){setTimeout(function(){throw e})}function Al(e,t){var r=t,i=0;do{var u=r.nextSibling;if(e.removeChild(r),u&&u.nodeType===8)if(r=u.data,r==="/$"){if(i===0){e.removeChild(u),Qo(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=u}while(r);Qo(t)}function qn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Vc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ro=Math.random().toString(36).slice(2),gn="__reactFiber$"+ro,ts="__reactProps$"+ro,En="__reactContainer$"+ro,bl="__reactEvents$"+ro,Eg="__reactListeners$"+ro,jg="__reactHandles$"+ro;function Rr(e){var t=e[gn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[En]||r[gn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Vc(e);e!==null;){if(r=e[gn])return r;e=Vc(e)}return t}e=r,r=e.parentNode}return null}function ns(e){return e=e[gn]||e[En],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function oo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function ai(e){return e[ts]||null}var Hl=[],so=-1;function Gn(e){return{current:e}}function Ye(e){0>so||(e.current=Hl[so],Hl[so]=null,so--)}function Ke(e,t){so++,Hl[so]=e.current,e.current=t}var Kn={},yt=Gn(Kn),Mt=Gn(!1),Er=Kn;function io(e,t){var r=e.type.contextTypes;if(!r)return Kn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var u={},c;for(c in r)u[c]=t[c];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function Ft(e){return e=e.childContextTypes,e!=null}function ci(){Ye(Mt),Ye(yt)}function Ac(e,t,r){if(yt.current!==Kn)throw Error(s(168));Ke(yt,t),Ke(Mt,r)}function bc(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var u in i)if(!(u in t))throw Error(s(108,Fe(e)||"Unknown",u));return D({},r,i)}function di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,Er=yt.current,Ke(yt,e),Ke(Mt,Mt.current),!0}function Hc(e,t,r){var i=e.stateNode;if(!i)throw Error(s(169));r?(e=bc(e,t,Er),i.__reactInternalMemoizedMergedChildContext=e,Ye(Mt),Ye(yt),Ke(yt,e)):Ye(Mt),Ke(Mt,r)}var jn=null,fi=!1,Ul=!1;function Uc(e){jn===null?jn=[e]:jn.push(e)}function Ng(e){fi=!0,Uc(e)}function Wn(){if(!Ul&&jn!==null){Ul=!0;var e=0,t=Be;try{var r=jn;for(Be=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}jn=null,fi=!1}catch(u){throw jn!==null&&(jn=jn.slice(e+1)),Ba(dl,Wn),u}finally{Be=t,Ul=!1}}return null}var lo=[],uo=0,pi=null,hi=0,Gt=[],Kt=0,jr=null,Nn=1,_n="";function Nr(e,t){lo[uo++]=hi,lo[uo++]=pi,pi=e,hi=t}function Qc(e,t,r){Gt[Kt++]=Nn,Gt[Kt++]=_n,Gt[Kt++]=jr,jr=e;var i=Nn;e=_n;var u=32-nn(i)-1;i&=~(1<<u),r+=1;var c=32-nn(t)+u;if(30<c){var p=u-u%5;c=(i&(1<<p)-1).toString(32),i>>=p,u-=p,Nn=1<<32-nn(t)+u|r<<u|i,_n=c+e}else Nn=1<<c|r<<u|i,_n=e}function Ql(e){e.return!==null&&(Nr(e,1),Qc(e,1,0))}function Bl(e){for(;e===pi;)pi=lo[--uo],lo[uo]=null,hi=lo[--uo],lo[uo]=null;for(;e===jr;)jr=Gt[--Kt],Gt[Kt]=null,_n=Gt[--Kt],Gt[Kt]=null,Nn=Gt[--Kt],Gt[Kt]=null}var At=null,bt=null,Je=!1,on=null;function Bc(e,t){var r=Xt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function qc(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,At=e,bt=qn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,At=e,bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=jr!==null?{id:Nn,overflow:_n}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Xt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,At=e,bt=null,!0):!1;default:return!1}}function ql(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gl(e){if(Je){var t=bt;if(t){var r=t;if(!qc(e,t)){if(ql(e))throw Error(s(418));t=qn(r.nextSibling);var i=At;t&&qc(e,t)?Bc(i,r):(e.flags=e.flags&-4097|2,Je=!1,At=e)}}else{if(ql(e))throw Error(s(418));e.flags=e.flags&-4097|2,Je=!1,At=e}}}function Gc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;At=e}function gi(e){if(e!==At)return!1;if(!Je)return Gc(e),Je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$l(e.type,e.memoizedProps)),t&&(t=bt)){if(ql(e))throw Kc(),Error(s(418));for(;t;)Bc(e,t),t=qn(t.nextSibling)}if(Gc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){bt=qn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}bt=null}}else bt=At?qn(e.stateNode.nextSibling):null;return!0}function Kc(){for(var e=bt;e;)e=qn(e.nextSibling)}function ao(){bt=At=null,Je=!1}function Kl(e){on===null?on=[e]:on.push(e)}var _g=L.ReactCurrentBatchConfig;function rs(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(s(309));var i=r.stateNode}if(!i)throw Error(s(147,e));var u=i,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(p){var v=u.refs;p===null?delete v[c]:v[c]=p},t._stringRef=c,t)}if(typeof e!="string")throw Error(s(284));if(!r._owner)throw Error(s(290,e))}return e}function mi(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wc(e){var t=e._init;return t(e._payload)}function Yc(e){function t(_,R){if(e){var F=_.deletions;F===null?(_.deletions=[R],_.flags|=16):F.push(R)}}function r(_,R){if(!e)return null;for(;R!==null;)t(_,R),R=R.sibling;return null}function i(_,R){for(_=new Map;R!==null;)R.key!==null?_.set(R.key,R):_.set(R.index,R),R=R.sibling;return _}function u(_,R){return _=rr(_,R),_.index=0,_.sibling=null,_}function c(_,R,F){return _.index=F,e?(F=_.alternate,F!==null?(F=F.index,F<R?(_.flags|=2,R):F):(_.flags|=2,R)):(_.flags|=1048576,R)}function p(_){return e&&_.alternate===null&&(_.flags|=2),_}function v(_,R,F,ee){return R===null||R.tag!==6?(R=Vu(F,_.mode,ee),R.return=_,R):(R=u(R,F),R.return=_,R)}function x(_,R,F,ee){var ve=F.type;return ve===q?B(_,R,F.props.children,ee,F.key):R!==null&&(R.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===Re&&Wc(ve)===R.type)?(ee=u(R,F.props),ee.ref=rs(_,R,F),ee.return=_,ee):(ee=Ai(F.type,F.key,F.props,null,_.mode,ee),ee.ref=rs(_,R,F),ee.return=_,ee)}function O(_,R,F,ee){return R===null||R.tag!==4||R.stateNode.containerInfo!==F.containerInfo||R.stateNode.implementation!==F.implementation?(R=Au(F,_.mode,ee),R.return=_,R):(R=u(R,F.children||[]),R.return=_,R)}function B(_,R,F,ee,ve){return R===null||R.tag!==7?(R=Tr(F,_.mode,ee,ve),R.return=_,R):(R=u(R,F),R.return=_,R)}function W(_,R,F){if(typeof R=="string"&&R!==""||typeof R=="number")return R=Vu(""+R,_.mode,F),R.return=_,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case X:return F=Ai(R.type,R.key,R.props,null,_.mode,F),F.ref=rs(_,null,R),F.return=_,F;case I:return R=Au(R,_.mode,F),R.return=_,R;case Re:var ee=R._init;return W(_,ee(R._payload),F)}if(tn(R)||oe(R))return R=Tr(R,_.mode,F,null),R.return=_,R;mi(_,R)}return null}function Q(_,R,F,ee){var ve=R!==null?R.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return ve!==null?null:v(_,R,""+F,ee);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case X:return F.key===ve?x(_,R,F,ee):null;case I:return F.key===ve?O(_,R,F,ee):null;case Re:return ve=F._init,Q(_,R,ve(F._payload),ee)}if(tn(F)||oe(F))return ve!==null?null:B(_,R,F,ee,null);mi(_,F)}return null}function se(_,R,F,ee,ve){if(typeof ee=="string"&&ee!==""||typeof ee=="number")return _=_.get(F)||null,v(R,_,""+ee,ve);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case X:return _=_.get(ee.key===null?F:ee.key)||null,x(R,_,ee,ve);case I:return _=_.get(ee.key===null?F:ee.key)||null,O(R,_,ee,ve);case Re:var Ce=ee._init;return se(_,R,F,Ce(ee._payload),ve)}if(tn(ee)||oe(ee))return _=_.get(F)||null,B(R,_,ee,ve,null);mi(R,ee)}return null}function de(_,R,F,ee){for(var ve=null,Ce=null,ke=R,Me=R=0,ft=null;ke!==null&&Me<F.length;Me++){ke.index>Me?(ft=ke,ke=null):ft=ke.sibling;var Ue=Q(_,ke,F[Me],ee);if(Ue===null){ke===null&&(ke=ft);break}e&&ke&&Ue.alternate===null&&t(_,ke),R=c(Ue,R,Me),Ce===null?ve=Ue:Ce.sibling=Ue,Ce=Ue,ke=ft}if(Me===F.length)return r(_,ke),Je&&Nr(_,Me),ve;if(ke===null){for(;Me<F.length;Me++)ke=W(_,F[Me],ee),ke!==null&&(R=c(ke,R,Me),Ce===null?ve=ke:Ce.sibling=ke,Ce=ke);return Je&&Nr(_,Me),ve}for(ke=i(_,ke);Me<F.length;Me++)ft=se(ke,_,Me,F[Me],ee),ft!==null&&(e&&ft.alternate!==null&&ke.delete(ft.key===null?Me:ft.key),R=c(ft,R,Me),Ce===null?ve=ft:Ce.sibling=ft,Ce=ft);return e&&ke.forEach(function(or){return t(_,or)}),Je&&Nr(_,Me),ve}function he(_,R,F,ee){var ve=oe(F);if(typeof ve!="function")throw Error(s(150));if(F=ve.call(F),F==null)throw Error(s(151));for(var Ce=ve=null,ke=R,Me=R=0,ft=null,Ue=F.next();ke!==null&&!Ue.done;Me++,Ue=F.next()){ke.index>Me?(ft=ke,ke=null):ft=ke.sibling;var or=Q(_,ke,Ue.value,ee);if(or===null){ke===null&&(ke=ft);break}e&&ke&&or.alternate===null&&t(_,ke),R=c(or,R,Me),Ce===null?ve=or:Ce.sibling=or,Ce=or,ke=ft}if(Ue.done)return r(_,ke),Je&&Nr(_,Me),ve;if(ke===null){for(;!Ue.done;Me++,Ue=F.next())Ue=W(_,Ue.value,ee),Ue!==null&&(R=c(Ue,R,Me),Ce===null?ve=Ue:Ce.sibling=Ue,Ce=Ue);return Je&&Nr(_,Me),ve}for(ke=i(_,ke);!Ue.done;Me++,Ue=F.next())Ue=se(ke,_,Me,Ue.value,ee),Ue!==null&&(e&&Ue.alternate!==null&&ke.delete(Ue.key===null?Me:Ue.key),R=c(Ue,R,Me),Ce===null?ve=Ue:Ce.sibling=Ue,Ce=Ue);return e&&ke.forEach(function(lm){return t(_,lm)}),Je&&Nr(_,Me),ve}function ot(_,R,F,ee){if(typeof F=="object"&&F!==null&&F.type===q&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case X:e:{for(var ve=F.key,Ce=R;Ce!==null;){if(Ce.key===ve){if(ve=F.type,ve===q){if(Ce.tag===7){r(_,Ce.sibling),R=u(Ce,F.props.children),R.return=_,_=R;break e}}else if(Ce.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===Re&&Wc(ve)===Ce.type){r(_,Ce.sibling),R=u(Ce,F.props),R.ref=rs(_,Ce,F),R.return=_,_=R;break e}r(_,Ce);break}else t(_,Ce);Ce=Ce.sibling}F.type===q?(R=Tr(F.props.children,_.mode,ee,F.key),R.return=_,_=R):(ee=Ai(F.type,F.key,F.props,null,_.mode,ee),ee.ref=rs(_,R,F),ee.return=_,_=ee)}return p(_);case I:e:{for(Ce=F.key;R!==null;){if(R.key===Ce)if(R.tag===4&&R.stateNode.containerInfo===F.containerInfo&&R.stateNode.implementation===F.implementation){r(_,R.sibling),R=u(R,F.children||[]),R.return=_,_=R;break e}else{r(_,R);break}else t(_,R);R=R.sibling}R=Au(F,_.mode,ee),R.return=_,_=R}return p(_);case Re:return Ce=F._init,ot(_,R,Ce(F._payload),ee)}if(tn(F))return de(_,R,F,ee);if(oe(F))return he(_,R,F,ee);mi(_,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,R!==null&&R.tag===6?(r(_,R.sibling),R=u(R,F),R.return=_,_=R):(r(_,R),R=Vu(F,_.mode,ee),R.return=_,_=R),p(_)):r(_,R)}return ot}var co=Yc(!0),Jc=Yc(!1),vi=Gn(null),yi=null,fo=null,Wl=null;function Yl(){Wl=fo=yi=null}function Jl(e){var t=vi.current;Ye(vi),e._currentValue=t}function Xl(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function po(e,t){yi=e,Wl=fo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ot=!0),e.firstContext=null)}function Wt(e){var t=e._currentValue;if(Wl!==e)if(e={context:e,memoizedValue:t,next:null},fo===null){if(yi===null)throw Error(s(308));fo=e,yi.dependencies={lanes:0,firstContext:e}}else fo=fo.next=e;return t}var _r=null;function Zl(e){_r===null?_r=[e]:_r.push(e)}function Xc(e,t,r,i){var u=t.interleaved;return u===null?(r.next=r,Zl(t)):(r.next=u.next,u.next=r),t.interleaved=r,Pn(e,i)}function Pn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Yn=!1;function eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ae&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,Pn(e,r)}return u=i.interleaved,u===null?(t.next=t,Zl(i)):(t.next=u.next,u.next=t),i.interleaved=t,Pn(e,r)}function wi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,hl(e,r)}}function ed(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var u=null,c=null;if(r=r.firstBaseUpdate,r!==null){do{var p={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};c===null?u=c=p:c=c.next=p,r=r.next}while(r!==null);c===null?u=c=t:c=c.next=t}else u=c=t;r={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:c,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function xi(e,t,r,i){var u=e.updateQueue;Yn=!1;var c=u.firstBaseUpdate,p=u.lastBaseUpdate,v=u.shared.pending;if(v!==null){u.shared.pending=null;var x=v,O=x.next;x.next=null,p===null?c=O:p.next=O,p=x;var B=e.alternate;B!==null&&(B=B.updateQueue,v=B.lastBaseUpdate,v!==p&&(v===null?B.firstBaseUpdate=O:v.next=O,B.lastBaseUpdate=x))}if(c!==null){var W=u.baseState;p=0,B=O=x=null,v=c;do{var Q=v.lane,se=v.eventTime;if((i&Q)===Q){B!==null&&(B=B.next={eventTime:se,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var de=e,he=v;switch(Q=t,se=r,he.tag){case 1:if(de=he.payload,typeof de=="function"){W=de.call(se,W,Q);break e}W=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=he.payload,Q=typeof de=="function"?de.call(se,W,Q):de,Q==null)break e;W=D({},W,Q);break e;case 2:Yn=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,Q=u.effects,Q===null?u.effects=[v]:Q.push(v))}else se={eventTime:se,lane:Q,tag:v.tag,payload:v.payload,callback:v.callback,next:null},B===null?(O=B=se,x=W):B=B.next=se,p|=Q;if(v=v.next,v===null){if(v=u.shared.pending,v===null)break;Q=v,v=Q.next,Q.next=null,u.lastBaseUpdate=Q,u.shared.pending=null}}while(!0);if(B===null&&(x=W),u.baseState=x,u.firstBaseUpdate=O,u.lastBaseUpdate=B,t=u.shared.interleaved,t!==null){u=t;do p|=u.lane,u=u.next;while(u!==t)}else c===null&&(u.shared.lanes=0);Fr|=p,e.lanes=p,e.memoizedState=W}}function td(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],u=i.callback;if(u!==null){if(i.callback=null,i=r,typeof u!="function")throw Error(s(191,u));u.call(i)}}}var os={},mn=Gn(os),ss=Gn(os),is=Gn(os);function Pr(e){if(e===os)throw Error(s(174));return e}function tu(e,t){switch(Ke(is,t),Ke(ss,e),Ke(mn,os),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Do(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Do(t,e)}Ye(mn),Ke(mn,t)}function ho(){Ye(mn),Ye(ss),Ye(is)}function nd(e){Pr(is.current);var t=Pr(mn.current),r=Do(t,e.type);t!==r&&(Ke(ss,e),Ke(mn,r))}function nu(e){ss.current===e&&(Ye(mn),Ye(ss))}var Xe=Gn(0);function Si(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ru=[];function ou(){for(var e=0;e<ru.length;e++)ru[e]._workInProgressVersionPrimary=null;ru.length=0}var Ci=L.ReactCurrentDispatcher,su=L.ReactCurrentBatchConfig,Mr=0,Ze=null,ut=null,ct=null,ki=!1,ls=!1,us=0,Pg=0;function wt(){throw Error(s(321))}function iu(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!rn(e[r],t[r]))return!1;return!0}function lu(e,t,r,i,u,c){if(Mr=c,Ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ci.current=e===null||e.memoizedState===null?Ig:Dg,e=r(i,u),ls){c=0;do{if(ls=!1,us=0,25<=c)throw Error(s(301));c+=1,ct=ut=null,t.updateQueue=null,Ci.current=Tg,e=r(i,u)}while(ls)}if(Ci.current=ji,t=ut!==null&&ut.next!==null,Mr=0,ct=ut=Ze=null,ki=!1,t)throw Error(s(300));return e}function uu(){var e=us!==0;return us=0,e}function vn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?Ze.memoizedState=ct=e:ct=ct.next=e,ct}function Yt(){if(ut===null){var e=Ze.alternate;e=e!==null?e.memoizedState:null}else e=ut.next;var t=ct===null?Ze.memoizedState:ct.next;if(t!==null)ct=t,ut=e;else{if(e===null)throw Error(s(310));ut=e,e={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},ct===null?Ze.memoizedState=ct=e:ct=ct.next=e}return ct}function as(e,t){return typeof t=="function"?t(e):t}function au(e){var t=Yt(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=ut,u=i.baseQueue,c=r.pending;if(c!==null){if(u!==null){var p=u.next;u.next=c.next,c.next=p}i.baseQueue=u=c,r.pending=null}if(u!==null){c=u.next,i=i.baseState;var v=p=null,x=null,O=c;do{var B=O.lane;if((Mr&B)===B)x!==null&&(x=x.next={lane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),i=O.hasEagerState?O.eagerState:e(i,O.action);else{var W={lane:B,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null};x===null?(v=x=W,p=i):x=x.next=W,Ze.lanes|=B,Fr|=B}O=O.next}while(O!==null&&O!==c);x===null?p=i:x.next=v,rn(i,t.memoizedState)||(Ot=!0),t.memoizedState=i,t.baseState=p,t.baseQueue=x,r.lastRenderedState=i}if(e=r.interleaved,e!==null){u=e;do c=u.lane,Ze.lanes|=c,Fr|=c,u=u.next;while(u!==e)}else u===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function cu(e){var t=Yt(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=r.dispatch,u=r.pending,c=t.memoizedState;if(u!==null){r.pending=null;var p=u=u.next;do c=e(c,p.action),p=p.next;while(p!==u);rn(c,t.memoizedState)||(Ot=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),r.lastRenderedState=c}return[c,i]}function rd(){}function od(e,t){var r=Ze,i=Yt(),u=t(),c=!rn(i.memoizedState,u);if(c&&(i.memoizedState=u,Ot=!0),i=i.queue,du(ld.bind(null,r,i,e),[e]),i.getSnapshot!==t||c||ct!==null&&ct.memoizedState.tag&1){if(r.flags|=2048,cs(9,id.bind(null,r,i,u,t),void 0,null),dt===null)throw Error(s(349));(Mr&30)!==0||sd(r,t,u)}return u}function sd(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ze.updateQueue,t===null?(t={lastEffect:null,stores:null},Ze.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function id(e,t,r,i){t.value=r,t.getSnapshot=i,ud(t)&&ad(e)}function ld(e,t,r){return r(function(){ud(t)&&ad(e)})}function ud(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!rn(e,r)}catch{return!0}}function ad(e){var t=Pn(e,1);t!==null&&an(t,e,1,-1)}function cd(e){var t=vn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:e},t.queue=e,e=e.dispatch=Og.bind(null,Ze,e),[t.memoizedState,e]}function cs(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=Ze.updateQueue,t===null?(t={lastEffect:null,stores:null},Ze.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function dd(){return Yt().memoizedState}function Ri(e,t,r,i){var u=vn();Ze.flags|=e,u.memoizedState=cs(1|t,r,void 0,i===void 0?null:i)}function Ei(e,t,r,i){var u=Yt();i=i===void 0?null:i;var c=void 0;if(ut!==null){var p=ut.memoizedState;if(c=p.destroy,i!==null&&iu(i,p.deps)){u.memoizedState=cs(t,r,c,i);return}}Ze.flags|=e,u.memoizedState=cs(1|t,r,c,i)}function fd(e,t){return Ri(8390656,8,e,t)}function du(e,t){return Ei(2048,8,e,t)}function pd(e,t){return Ei(4,2,e,t)}function hd(e,t){return Ei(4,4,e,t)}function gd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function md(e,t,r){return r=r!=null?r.concat([e]):null,Ei(4,4,gd.bind(null,t,e),r)}function fu(){}function vd(e,t){var r=Yt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&iu(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function yd(e,t){var r=Yt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&iu(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function wd(e,t,r){return(Mr&21)===0?(e.baseState&&(e.baseState=!1,Ot=!0),e.memoizedState=r):(rn(r,t)||(r=Wa(),Ze.lanes|=r,Fr|=r,e.baseState=!0),t)}function Mg(e,t){var r=Be;Be=r!==0&&4>r?r:4,e(!0);var i=su.transition;su.transition={};try{e(!1),t()}finally{Be=r,su.transition=i}}function xd(){return Yt().memoizedState}function Fg(e,t,r){var i=tr(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Sd(e))Cd(t,r);else if(r=Xc(e,t,r,i),r!==null){var u=Nt();an(r,e,i,u),kd(r,t,i)}}function Og(e,t,r){var i=tr(e),u={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Sd(e))Cd(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,v=c(p,r);if(u.hasEagerState=!0,u.eagerState=v,rn(v,p)){var x=t.interleaved;x===null?(u.next=u,Zl(t)):(u.next=x.next,x.next=u),t.interleaved=u;return}}catch{}finally{}r=Xc(e,t,u,i),r!==null&&(u=Nt(),an(r,e,i,u),kd(r,t,i))}}function Sd(e){var t=e.alternate;return e===Ze||t!==null&&t===Ze}function Cd(e,t){ls=ki=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function kd(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,hl(e,r)}}var ji={readContext:Wt,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useInsertionEffect:wt,useLayoutEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useMutableSource:wt,useSyncExternalStore:wt,useId:wt,unstable_isNewReconciler:!1},Ig={readContext:Wt,useCallback:function(e,t){return vn().memoizedState=[e,t===void 0?null:t],e},useContext:Wt,useEffect:fd,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ri(4194308,4,gd.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ri(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ri(4,2,e,t)},useMemo:function(e,t){var r=vn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=vn();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Fg.bind(null,Ze,e),[i.memoizedState,e]},useRef:function(e){var t=vn();return e={current:e},t.memoizedState=e},useState:cd,useDebugValue:fu,useDeferredValue:function(e){return vn().memoizedState=e},useTransition:function(){var e=cd(!1),t=e[0];return e=Mg.bind(null,e[1]),vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Ze,u=vn();if(Je){if(r===void 0)throw Error(s(407));r=r()}else{if(r=t(),dt===null)throw Error(s(349));(Mr&30)!==0||sd(i,t,r)}u.memoizedState=r;var c={value:r,getSnapshot:t};return u.queue=c,fd(ld.bind(null,i,c,e),[e]),i.flags|=2048,cs(9,id.bind(null,i,c,r,t),void 0,null),r},useId:function(){var e=vn(),t=dt.identifierPrefix;if(Je){var r=_n,i=Nn;r=(i&~(1<<32-nn(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=us++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Pg++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Dg={readContext:Wt,useCallback:vd,useContext:Wt,useEffect:du,useImperativeHandle:md,useInsertionEffect:pd,useLayoutEffect:hd,useMemo:yd,useReducer:au,useRef:dd,useState:function(){return au(as)},useDebugValue:fu,useDeferredValue:function(e){var t=Yt();return wd(t,ut.memoizedState,e)},useTransition:function(){var e=au(as)[0],t=Yt().memoizedState;return[e,t]},useMutableSource:rd,useSyncExternalStore:od,useId:xd,unstable_isNewReconciler:!1},Tg={readContext:Wt,useCallback:vd,useContext:Wt,useEffect:du,useImperativeHandle:md,useInsertionEffect:pd,useLayoutEffect:hd,useMemo:yd,useReducer:cu,useRef:dd,useState:function(){return cu(as)},useDebugValue:fu,useDeferredValue:function(e){var t=Yt();return ut===null?t.memoizedState=e:wd(t,ut.memoizedState,e)},useTransition:function(){var e=cu(as)[0],t=Yt().memoizedState;return[e,t]},useMutableSource:rd,useSyncExternalStore:od,useId:xd,unstable_isNewReconciler:!1};function sn(e,t){if(e&&e.defaultProps){t=D({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function pu(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:D({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Ni={isMounted:function(e){return(e=e._reactInternals)?kr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Nt(),u=tr(e),c=Mn(i,u);c.payload=t,r!=null&&(c.callback=r),t=Jn(e,c,u),t!==null&&(an(t,e,u,i),wi(t,e,u))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Nt(),u=tr(e),c=Mn(i,u);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=Jn(e,c,u),t!==null&&(an(t,e,u,i),wi(t,e,u))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Nt(),i=tr(e),u=Mn(r,i);u.tag=2,t!=null&&(u.callback=t),t=Jn(e,u,i),t!==null&&(an(t,e,i,r),wi(t,e,i))}};function Rd(e,t,r,i,u,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,c,p):t.prototype&&t.prototype.isPureReactComponent?!Yo(r,i)||!Yo(u,c):!0}function Ed(e,t,r){var i=!1,u=Kn,c=t.contextType;return typeof c=="object"&&c!==null?c=Wt(c):(u=Ft(t)?Er:yt.current,i=t.contextTypes,c=(i=i!=null)?io(e,u):Kn),t=new t(r,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ni,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=c),t}function jd(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Ni.enqueueReplaceState(t,t.state,null)}function hu(e,t,r,i){var u=e.stateNode;u.props=r,u.state=e.memoizedState,u.refs={},eu(e);var c=t.contextType;typeof c=="object"&&c!==null?u.context=Wt(c):(c=Ft(t)?Er:yt.current,u.context=io(e,c)),u.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(pu(e,t,c,r),u.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(t=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),t!==u.state&&Ni.enqueueReplaceState(u,u.state,null),xi(e,r,u,i),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function go(e,t){try{var r="",i=t;do r+=ae(i),i=i.return;while(i);var u=r}catch(c){u=`
39
- Error generating stack: `+c.message+`
40
- `+c.stack}return{value:e,source:t,stack:u,digest:null}}function gu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function mu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Lg=typeof WeakMap=="function"?WeakMap:Map;function Nd(e,t,r){r=Mn(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Di||(Di=!0,Fu=i),mu(e,t)},r}function _d(e,t,r){r=Mn(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var u=t.value;r.payload=function(){return i(u)},r.callback=function(){mu(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(r.callback=function(){mu(e,t),typeof i!="function"&&(Zn===null?Zn=new Set([this]):Zn.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),r}function Pd(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Lg;var u=new Set;i.set(t,u)}else u=i.get(t),u===void 0&&(u=new Set,i.set(t,u));u.has(r)||(u.add(r),e=Yg.bind(null,e,t,r),t.then(e,e))}function Md(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Fd(e,t,r,i,u){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Mn(-1,1),t.tag=2,Jn(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var zg=L.ReactCurrentOwner,Ot=!1;function jt(e,t,r,i){t.child=e===null?Jc(t,null,r,i):co(t,e.child,r,i)}function Od(e,t,r,i,u){r=r.render;var c=t.ref;return po(t,u),i=lu(e,t,r,i,c,u),r=uu(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,Fn(e,t,u)):(Je&&r&&Ql(t),t.flags|=1,jt(e,t,i,u),t.child)}function Id(e,t,r,i,u){if(e===null){var c=r.type;return typeof c=="function"&&!$u(c)&&c.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=c,Dd(e,t,c,i,u)):(e=Ai(r.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&u)===0){var p=c.memoizedProps;if(r=r.compare,r=r!==null?r:Yo,r(p,i)&&e.ref===t.ref)return Fn(e,t,u)}return t.flags|=1,e=rr(c,i),e.ref=t.ref,e.return=t,t.child=e}function Dd(e,t,r,i,u){if(e!==null){var c=e.memoizedProps;if(Yo(c,i)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=i=c,(e.lanes&u)!==0)(e.flags&131072)!==0&&(Ot=!0);else return t.lanes=e.lanes,Fn(e,t,u)}return vu(e,t,r,i,u)}function Td(e,t,r){var i=t.pendingProps,u=i.children,c=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ke(vo,Ht),Ht|=r;else{if((r&1073741824)===0)return e=c!==null?c.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ke(vo,Ht),Ht|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=c!==null?c.baseLanes:r,Ke(vo,Ht),Ht|=i}else c!==null?(i=c.baseLanes|r,t.memoizedState=null):i=r,Ke(vo,Ht),Ht|=i;return jt(e,t,u,r),t.child}function Ld(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function vu(e,t,r,i,u){var c=Ft(r)?Er:yt.current;return c=io(t,c),po(t,u),r=lu(e,t,r,i,c,u),i=uu(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,Fn(e,t,u)):(Je&&i&&Ql(t),t.flags|=1,jt(e,t,r,u),t.child)}function zd(e,t,r,i,u){if(Ft(r)){var c=!0;di(t)}else c=!1;if(po(t,u),t.stateNode===null)Pi(e,t),Ed(t,r,i),hu(t,r,i,u),i=!0;else if(e===null){var p=t.stateNode,v=t.memoizedProps;p.props=v;var x=p.context,O=r.contextType;typeof O=="object"&&O!==null?O=Wt(O):(O=Ft(r)?Er:yt.current,O=io(t,O));var B=r.getDerivedStateFromProps,W=typeof B=="function"||typeof p.getSnapshotBeforeUpdate=="function";W||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==i||x!==O)&&jd(t,p,i,O),Yn=!1;var Q=t.memoizedState;p.state=Q,xi(t,i,p,u),x=t.memoizedState,v!==i||Q!==x||Mt.current||Yn?(typeof B=="function"&&(pu(t,r,B,i),x=t.memoizedState),(v=Yn||Rd(t,r,v,i,Q,x,O))?(W||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=x),p.props=i,p.state=x,p.context=O,i=v):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{p=t.stateNode,Zc(e,t),v=t.memoizedProps,O=t.type===t.elementType?v:sn(t.type,v),p.props=O,W=t.pendingProps,Q=p.context,x=r.contextType,typeof x=="object"&&x!==null?x=Wt(x):(x=Ft(r)?Er:yt.current,x=io(t,x));var se=r.getDerivedStateFromProps;(B=typeof se=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==W||Q!==x)&&jd(t,p,i,x),Yn=!1,Q=t.memoizedState,p.state=Q,xi(t,i,p,u);var de=t.memoizedState;v!==W||Q!==de||Mt.current||Yn?(typeof se=="function"&&(pu(t,r,se,i),de=t.memoizedState),(O=Yn||Rd(t,r,O,i,Q,de,x)||!1)?(B||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(i,de,x),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(i,de,x)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=de),p.props=i,p.state=de,p.context=x,i=O):(typeof p.componentDidUpdate!="function"||v===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),i=!1)}return yu(e,t,r,i,c,u)}function yu(e,t,r,i,u,c){Ld(e,t);var p=(t.flags&128)!==0;if(!i&&!p)return u&&Hc(t,r,!1),Fn(e,t,c);i=t.stateNode,zg.current=t;var v=p&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&p?(t.child=co(t,e.child,null,c),t.child=co(t,null,v,c)):jt(e,t,v,c),t.memoizedState=i.state,u&&Hc(t,r,!0),t.child}function $d(e){var t=e.stateNode;t.pendingContext?Ac(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ac(e,t.context,!1),tu(e,t.containerInfo)}function Vd(e,t,r,i,u){return ao(),Kl(u),t.flags|=256,jt(e,t,r,i),t.child}var wu={dehydrated:null,treeContext:null,retryLane:0};function xu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ad(e,t,r){var i=t.pendingProps,u=Xe.current,c=!1,p=(t.flags&128)!==0,v;if((v=p)||(v=e!==null&&e.memoizedState===null?!1:(u&2)!==0),v?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),Ke(Xe,u&1),e===null)return Gl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(p=i.children,e=i.fallback,c?(i=t.mode,c=t.child,p={mode:"hidden",children:p},(i&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=p):c=bi(p,i,0,null),e=Tr(e,i,r,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=xu(r),t.memoizedState=wu,e):Su(t,p));if(u=e.memoizedState,u!==null&&(v=u.dehydrated,v!==null))return $g(e,t,p,i,v,u,r);if(c){c=i.fallback,p=t.mode,u=e.child,v=u.sibling;var x={mode:"hidden",children:i.children};return(p&1)===0&&t.child!==u?(i=t.child,i.childLanes=0,i.pendingProps=x,t.deletions=null):(i=rr(u,x),i.subtreeFlags=u.subtreeFlags&14680064),v!==null?c=rr(v,c):(c=Tr(c,p,r,null),c.flags|=2),c.return=t,i.return=t,i.sibling=c,t.child=i,i=c,c=t.child,p=e.child.memoizedState,p=p===null?xu(r):{baseLanes:p.baseLanes|r,cachePool:null,transitions:p.transitions},c.memoizedState=p,c.childLanes=e.childLanes&~r,t.memoizedState=wu,i}return c=e.child,e=c.sibling,i=rr(c,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Su(e,t){return t=bi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function _i(e,t,r,i){return i!==null&&Kl(i),co(t,e.child,null,r),e=Su(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $g(e,t,r,i,u,c,p){if(r)return t.flags&256?(t.flags&=-257,i=gu(Error(s(422))),_i(e,t,p,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=i.fallback,u=t.mode,i=bi({mode:"visible",children:i.children},u,0,null),c=Tr(c,u,p,null),c.flags|=2,i.return=t,c.return=t,i.sibling=c,t.child=i,(t.mode&1)!==0&&co(t,e.child,null,p),t.child.memoizedState=xu(p),t.memoizedState=wu,c);if((t.mode&1)===0)return _i(e,t,p,null);if(u.data==="$!"){if(i=u.nextSibling&&u.nextSibling.dataset,i)var v=i.dgst;return i=v,c=Error(s(419)),i=gu(c,i,void 0),_i(e,t,p,i)}if(v=(p&e.childLanes)!==0,Ot||v){if(i=dt,i!==null){switch(p&-p){case 4:u=2;break;case 16:u=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(i.suspendedLanes|p))!==0?0:u,u!==0&&u!==c.retryLane&&(c.retryLane=u,Pn(e,u),an(i,e,u,-1))}return zu(),i=gu(Error(s(421))),_i(e,t,p,i)}return u.data==="$?"?(t.flags|=128,t.child=e.child,t=Jg.bind(null,e),u._reactRetry=t,null):(e=c.treeContext,bt=qn(u.nextSibling),At=t,Je=!0,on=null,e!==null&&(Gt[Kt++]=Nn,Gt[Kt++]=_n,Gt[Kt++]=jr,Nn=e.id,_n=e.overflow,jr=t),t=Su(t,i.children),t.flags|=4096,t)}function bd(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Xl(e.return,t,r)}function Cu(e,t,r,i,u){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:u}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=i,c.tail=r,c.tailMode=u)}function Hd(e,t,r){var i=t.pendingProps,u=i.revealOrder,c=i.tail;if(jt(e,t,i.children,r),i=Xe.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bd(e,r,t);else if(e.tag===19)bd(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Ke(Xe,i),(t.mode&1)===0)t.memoizedState=null;else switch(u){case"forwards":for(r=t.child,u=null;r!==null;)e=r.alternate,e!==null&&Si(e)===null&&(u=r),r=r.sibling;r=u,r===null?(u=t.child,t.child=null):(u=r.sibling,r.sibling=null),Cu(t,!1,u,r,c);break;case"backwards":for(r=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Si(e)===null){t.child=u;break}e=u.sibling,u.sibling=r,r=u,u=e}Cu(t,!0,r,null,c);break;case"together":Cu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Pi(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Fr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,r=rr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=rr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Vg(e,t,r){switch(t.tag){case 3:$d(t),ao();break;case 5:nd(t);break;case 1:Ft(t.type)&&di(t);break;case 4:tu(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,u=t.memoizedProps.value;Ke(vi,i._currentValue),i._currentValue=u;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(Ke(Xe,Xe.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Ad(e,t,r):(Ke(Xe,Xe.current&1),e=Fn(e,t,r),e!==null?e.sibling:null);Ke(Xe,Xe.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return Hd(e,t,r);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Ke(Xe,Xe.current),i)break;return null;case 22:case 23:return t.lanes=0,Td(e,t,r)}return Fn(e,t,r)}var Ud,ku,Qd,Bd;Ud=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},ku=function(){},Qd=function(e,t,r,i){var u=e.memoizedProps;if(u!==i){e=t.stateNode,Pr(mn.current);var c=null;switch(r){case"input":u=we(e,u),i=we(e,i),c=[];break;case"select":u=D({},u,{value:void 0}),i=D({},i,{value:void 0}),c=[];break;case"textarea":u=kn(e,u),i=kn(e,i),c=[];break;default:typeof u.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=ui)}re(r,i);var p;r=null;for(O in u)if(!i.hasOwnProperty(O)&&u.hasOwnProperty(O)&&u[O]!=null)if(O==="style"){var v=u[O];for(p in v)v.hasOwnProperty(p)&&(r||(r={}),r[p]="")}else O!=="dangerouslySetInnerHTML"&&O!=="children"&&O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(a.hasOwnProperty(O)?c||(c=[]):(c=c||[]).push(O,null));for(O in i){var x=i[O];if(v=u!=null?u[O]:void 0,i.hasOwnProperty(O)&&x!==v&&(x!=null||v!=null))if(O==="style")if(v){for(p in v)!v.hasOwnProperty(p)||x&&x.hasOwnProperty(p)||(r||(r={}),r[p]="");for(p in x)x.hasOwnProperty(p)&&v[p]!==x[p]&&(r||(r={}),r[p]=x[p])}else r||(c||(c=[]),c.push(O,r)),r=x;else O==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,v=v?v.__html:void 0,x!=null&&v!==x&&(c=c||[]).push(O,x)):O==="children"?typeof x!="string"&&typeof x!="number"||(c=c||[]).push(O,""+x):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&(a.hasOwnProperty(O)?(x!=null&&O==="onScroll"&&We("scroll",e),c||v===x||(c=[])):(c=c||[]).push(O,x))}r&&(c=c||[]).push("style",r);var O=c;(t.updateQueue=O)&&(t.flags|=4)}},Bd=function(e,t,r,i){r!==i&&(t.flags|=4)};function ds(e,t){if(!Je)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var u=e.child;u!==null;)r|=u.lanes|u.childLanes,i|=u.subtreeFlags&14680064,i|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)r|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Ag(e,t,r){var i=t.pendingProps;switch(Bl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(t),null;case 1:return Ft(t.type)&&ci(),xt(t),null;case 3:return i=t.stateNode,ho(),Ye(Mt),Ye(yt),ou(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(gi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,on!==null&&(Du(on),on=null))),ku(e,t),xt(t),null;case 5:nu(t);var u=Pr(is.current);if(r=t.type,e!==null&&t.stateNode!=null)Qd(e,t,r,i,u),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(s(166));return xt(t),null}if(e=Pr(mn.current),gi(t)){i=t.stateNode,r=t.type;var c=t.memoizedProps;switch(i[gn]=t,i[ts]=c,e=(t.mode&1)!==0,r){case"dialog":We("cancel",i),We("close",i);break;case"iframe":case"object":case"embed":We("load",i);break;case"video":case"audio":for(u=0;u<Xo.length;u++)We(Xo[u],i);break;case"source":We("error",i);break;case"img":case"image":case"link":We("error",i),We("load",i);break;case"details":We("toggle",i);break;case"input":He(i,c),We("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!c.multiple},We("invalid",i);break;case"textarea":Ls(i,c),We("invalid",i)}re(r,c),u=null;for(var p in c)if(c.hasOwnProperty(p)){var v=c[p];p==="children"?typeof v=="string"?i.textContent!==v&&(c.suppressHydrationWarning!==!0&&li(i.textContent,v,e),u=["children",v]):typeof v=="number"&&i.textContent!==""+v&&(c.suppressHydrationWarning!==!0&&li(i.textContent,v,e),u=["children",""+v]):a.hasOwnProperty(p)&&v!=null&&p==="onScroll"&&We("scroll",i)}switch(r){case"input":ne(i),nt(i,c,!0);break;case"textarea":ne(i),$s(i);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(i.onclick=ui)}i=u,t.updateQueue=i,i!==null&&(t.flags|=4)}else{p=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Vs(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=p.createElement(r,{is:i.is}):(e=p.createElement(r),r==="select"&&(p=e,i.multiple?p.multiple=!0:i.size&&(p.size=i.size))):e=p.createElementNS(e,r),e[gn]=t,e[ts]=i,Ud(e,t,!1,!1),t.stateNode=e;e:{switch(p=Oe(r,i),r){case"dialog":We("cancel",e),We("close",e),u=i;break;case"iframe":case"object":case"embed":We("load",e),u=i;break;case"video":case"audio":for(u=0;u<Xo.length;u++)We(Xo[u],e);u=i;break;case"source":We("error",e),u=i;break;case"img":case"image":case"link":We("error",e),We("load",e),u=i;break;case"details":We("toggle",e),u=i;break;case"input":He(e,i),u=we(e,i),We("invalid",e);break;case"option":u=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},u=D({},i,{value:void 0}),We("invalid",e);break;case"textarea":Ls(e,i),u=kn(e,i),We("invalid",e);break;default:u=i}re(r,u),v=u;for(c in v)if(v.hasOwnProperty(c)){var x=v[c];c==="style"?M(e,x):c==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,x!=null&&As(e,x)):c==="children"?typeof x=="string"?(r!=="textarea"||x!=="")&&wr(e,x):typeof x=="number"&&wr(e,""+x):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(a.hasOwnProperty(c)?x!=null&&c==="onScroll"&&We("scroll",e):x!=null&&U(e,c,x,p))}switch(r){case"input":ne(e),nt(e,i,!1);break;case"textarea":ne(e),$s(e);break;case"option":i.value!=null&&e.setAttribute("value",""+A(i.value));break;case"select":e.multiple=!!i.multiple,c=i.value,c!=null?Rt(e,!!i.multiple,c,!1):i.defaultValue!=null&&Rt(e,!!i.multiple,i.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=ui)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return xt(t),null;case 6:if(e&&t.stateNode!=null)Bd(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(s(166));if(r=Pr(is.current),Pr(mn.current),gi(t)){if(i=t.stateNode,r=t.memoizedProps,i[gn]=t,(c=i.nodeValue!==r)&&(e=At,e!==null))switch(e.tag){case 3:li(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&li(i.nodeValue,r,(e.mode&1)!==0)}c&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[gn]=t,t.stateNode=i}return xt(t),null;case 13:if(Ye(Xe),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Je&&bt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Kc(),ao(),t.flags|=98560,c=!1;else if(c=gi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[gn]=t}else ao(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;xt(t),c=!1}else on!==null&&(Du(on),on=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Xe.current&1)!==0?at===0&&(at=3):zu())),t.updateQueue!==null&&(t.flags|=4),xt(t),null);case 4:return ho(),ku(e,t),e===null&&Zo(t.stateNode.containerInfo),xt(t),null;case 10:return Jl(t.type._context),xt(t),null;case 17:return Ft(t.type)&&ci(),xt(t),null;case 19:if(Ye(Xe),c=t.memoizedState,c===null)return xt(t),null;if(i=(t.flags&128)!==0,p=c.rendering,p===null)if(i)ds(c,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=Si(e),p!==null){for(t.flags|=128,ds(c,!1),i=p.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)c=r,e=i,c.flags&=14680066,p=c.alternate,p===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=p.childLanes,c.lanes=p.lanes,c.child=p.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=p.memoizedProps,c.memoizedState=p.memoizedState,c.updateQueue=p.updateQueue,c.type=p.type,e=p.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ke(Xe,Xe.current&1|2),t.child}e=e.sibling}c.tail!==null&&rt()>yo&&(t.flags|=128,i=!0,ds(c,!1),t.lanes=4194304)}else{if(!i)if(e=Si(p),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ds(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!Je)return xt(t),null}else 2*rt()-c.renderingStartTime>yo&&r!==1073741824&&(t.flags|=128,i=!0,ds(c,!1),t.lanes=4194304);c.isBackwards?(p.sibling=t.child,t.child=p):(r=c.last,r!==null?r.sibling=p:t.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=rt(),t.sibling=null,r=Xe.current,Ke(Xe,i?r&1|2:r&1),t):(xt(t),null);case 22:case 23:return Lu(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(Ht&1073741824)!==0&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function bg(e,t){switch(Bl(t),t.tag){case 1:return Ft(t.type)&&ci(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ho(),Ye(Mt),Ye(yt),ou(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return nu(t),null;case 13:if(Ye(Xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));ao()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ye(Xe),null;case 4:return ho(),null;case 10:return Jl(t.type._context),null;case 22:case 23:return Lu(),null;case 24:return null;default:return null}}var Mi=!1,St=!1,Hg=typeof WeakSet=="function"?WeakSet:Set,ue=null;function mo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){et(e,t,i)}else r.current=null}function Ru(e,t,r){try{r()}catch(i){et(e,t,i)}}var qd=!1;function Ug(e,t){if(Ll=Ys,e=Rc(),_l(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var u=i.anchorOffset,c=i.focusNode;i=i.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var p=0,v=-1,x=-1,O=0,B=0,W=e,Q=null;t:for(;;){for(var se;W!==r||u!==0&&W.nodeType!==3||(v=p+u),W!==c||i!==0&&W.nodeType!==3||(x=p+i),W.nodeType===3&&(p+=W.nodeValue.length),(se=W.firstChild)!==null;)Q=W,W=se;for(;;){if(W===e)break t;if(Q===r&&++O===u&&(v=p),Q===c&&++B===i&&(x=p),(se=W.nextSibling)!==null)break;W=Q,Q=W.parentNode}W=se}r=v===-1||x===-1?null:{start:v,end:x}}else r=null}r=r||{start:0,end:0}}else r=null;for(zl={focusedElem:e,selectionRange:r},Ys=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;try{var de=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(de!==null){var he=de.memoizedProps,ot=de.memoizedState,_=t.stateNode,R=_.getSnapshotBeforeUpdate(t.elementType===t.type?he:sn(t.type,he),ot);_.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var F=t.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(ee){et(t,t.return,ee)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return de=qd,qd=!1,de}function fs(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var u=i=i.next;do{if((u.tag&e)===e){var c=u.destroy;u.destroy=void 0,c!==void 0&&Ru(t,r,c)}u=u.next}while(u!==i)}}function Fi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function Eu(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Gd(e){var t=e.alternate;t!==null&&(e.alternate=null,Gd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gn],delete t[ts],delete t[bl],delete t[Eg],delete t[jg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Kd(e){return e.tag===5||e.tag===3||e.tag===4}function Wd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Kd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ju(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ui));else if(i!==4&&(e=e.child,e!==null))for(ju(e,t,r),e=e.sibling;e!==null;)ju(e,t,r),e=e.sibling}function Nu(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Nu(e,t,r),e=e.sibling;e!==null;)Nu(e,t,r),e=e.sibling}var gt=null,ln=!1;function Xn(e,t,r){for(r=r.child;r!==null;)Yd(e,t,r),r=r.sibling}function Yd(e,t,r){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(Qs,r)}catch{}switch(r.tag){case 5:St||mo(r,t);case 6:var i=gt,u=ln;gt=null,Xn(e,t,r),gt=i,ln=u,gt!==null&&(ln?(e=gt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):gt.removeChild(r.stateNode));break;case 18:gt!==null&&(ln?(e=gt,r=r.stateNode,e.nodeType===8?Al(e.parentNode,r):e.nodeType===1&&Al(e,r),Qo(e)):Al(gt,r.stateNode));break;case 4:i=gt,u=ln,gt=r.stateNode.containerInfo,ln=!0,Xn(e,t,r),gt=i,ln=u;break;case 0:case 11:case 14:case 15:if(!St&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){u=i=i.next;do{var c=u,p=c.destroy;c=c.tag,p!==void 0&&((c&2)!==0||(c&4)!==0)&&Ru(r,t,p),u=u.next}while(u!==i)}Xn(e,t,r);break;case 1:if(!St&&(mo(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(v){et(r,t,v)}Xn(e,t,r);break;case 21:Xn(e,t,r);break;case 22:r.mode&1?(St=(i=St)||r.memoizedState!==null,Xn(e,t,r),St=i):Xn(e,t,r);break;default:Xn(e,t,r)}}function Jd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Hg),t.forEach(function(i){var u=Xg.bind(null,e,i);r.has(i)||(r.add(i),i.then(u,u))})}}function un(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var u=r[i];try{var c=e,p=t,v=p;e:for(;v!==null;){switch(v.tag){case 5:gt=v.stateNode,ln=!1;break e;case 3:gt=v.stateNode.containerInfo,ln=!0;break e;case 4:gt=v.stateNode.containerInfo,ln=!0;break e}v=v.return}if(gt===null)throw Error(s(160));Yd(c,p,u),gt=null,ln=!1;var x=u.alternate;x!==null&&(x.return=null),u.return=null}catch(O){et(u,t,O)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xd(t,e),t=t.sibling}function Xd(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(un(t,e),yn(e),i&4){try{fs(3,e,e.return),Fi(3,e)}catch(he){et(e,e.return,he)}try{fs(5,e,e.return)}catch(he){et(e,e.return,he)}}break;case 1:un(t,e),yn(e),i&512&&r!==null&&mo(r,r.return);break;case 5:if(un(t,e),yn(e),i&512&&r!==null&&mo(r,r.return),e.flags&32){var u=e.stateNode;try{wr(u,"")}catch(he){et(e,e.return,he)}}if(i&4&&(u=e.stateNode,u!=null)){var c=e.memoizedProps,p=r!==null?r.memoizedProps:c,v=e.type,x=e.updateQueue;if(e.updateQueue=null,x!==null)try{v==="input"&&c.type==="radio"&&c.name!=null&&$t(u,c),Oe(v,p);var O=Oe(v,c);for(p=0;p<x.length;p+=2){var B=x[p],W=x[p+1];B==="style"?M(u,W):B==="dangerouslySetInnerHTML"?As(u,W):B==="children"?wr(u,W):U(u,B,W,O)}switch(v){case"input":ht(u,c);break;case"textarea":zs(u,c);break;case"select":var Q=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!c.multiple;var se=c.value;se!=null?Rt(u,!!c.multiple,se,!1):Q!==!!c.multiple&&(c.defaultValue!=null?Rt(u,!!c.multiple,c.defaultValue,!0):Rt(u,!!c.multiple,c.multiple?[]:"",!1))}u[ts]=c}catch(he){et(e,e.return,he)}}break;case 6:if(un(t,e),yn(e),i&4){if(e.stateNode===null)throw Error(s(162));u=e.stateNode,c=e.memoizedProps;try{u.nodeValue=c}catch(he){et(e,e.return,he)}}break;case 3:if(un(t,e),yn(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Qo(t.containerInfo)}catch(he){et(e,e.return,he)}break;case 4:un(t,e),yn(e);break;case 13:un(t,e),yn(e),u=e.child,u.flags&8192&&(c=u.memoizedState!==null,u.stateNode.isHidden=c,!c||u.alternate!==null&&u.alternate.memoizedState!==null||(Mu=rt())),i&4&&Jd(e);break;case 22:if(B=r!==null&&r.memoizedState!==null,e.mode&1?(St=(O=St)||B,un(t,e),St=O):un(t,e),yn(e),i&8192){if(O=e.memoizedState!==null,(e.stateNode.isHidden=O)&&!B&&(e.mode&1)!==0)for(ue=e,B=e.child;B!==null;){for(W=ue=B;ue!==null;){switch(Q=ue,se=Q.child,Q.tag){case 0:case 11:case 14:case 15:fs(4,Q,Q.return);break;case 1:mo(Q,Q.return);var de=Q.stateNode;if(typeof de.componentWillUnmount=="function"){i=Q,r=Q.return;try{t=i,de.props=t.memoizedProps,de.state=t.memoizedState,de.componentWillUnmount()}catch(he){et(i,r,he)}}break;case 5:mo(Q,Q.return);break;case 22:if(Q.memoizedState!==null){tf(W);continue}}se!==null?(se.return=Q,ue=se):tf(W)}B=B.sibling}e:for(B=null,W=e;;){if(W.tag===5){if(B===null){B=W;try{u=W.stateNode,O?(c=u.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(v=W.stateNode,x=W.memoizedProps.style,p=x!=null&&x.hasOwnProperty("display")?x.display:null,v.style.display=To("display",p))}catch(he){et(e,e.return,he)}}}else if(W.tag===6){if(B===null)try{W.stateNode.nodeValue=O?"":W.memoizedProps}catch(he){et(e,e.return,he)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===e)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===e)break e;for(;W.sibling===null;){if(W.return===null||W.return===e)break e;B===W&&(B=null),W=W.return}B===W&&(B=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:un(t,e),yn(e),i&4&&Jd(e);break;case 21:break;default:un(t,e),yn(e)}}function yn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Kd(r)){var i=r;break e}r=r.return}throw Error(s(160))}switch(i.tag){case 5:var u=i.stateNode;i.flags&32&&(wr(u,""),i.flags&=-33);var c=Wd(e);Nu(e,c,u);break;case 3:case 4:var p=i.stateNode.containerInfo,v=Wd(e);ju(e,v,p);break;default:throw Error(s(161))}}catch(x){et(e,e.return,x)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qg(e,t,r){ue=e,Zd(e)}function Zd(e,t,r){for(var i=(e.mode&1)!==0;ue!==null;){var u=ue,c=u.child;if(u.tag===22&&i){var p=u.memoizedState!==null||Mi;if(!p){var v=u.alternate,x=v!==null&&v.memoizedState!==null||St;v=Mi;var O=St;if(Mi=p,(St=x)&&!O)for(ue=u;ue!==null;)p=ue,x=p.child,p.tag===22&&p.memoizedState!==null?nf(u):x!==null?(x.return=p,ue=x):nf(u);for(;c!==null;)ue=c,Zd(c),c=c.sibling;ue=u,Mi=v,St=O}ef(e)}else(u.subtreeFlags&8772)!==0&&c!==null?(c.return=u,ue=c):ef(e)}}function ef(e){for(;ue!==null;){var t=ue;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:St||Fi(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!St)if(r===null)i.componentDidMount();else{var u=t.elementType===t.type?r.memoizedProps:sn(t.type,r.memoizedProps);i.componentDidUpdate(u,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&td(t,c,i);break;case 3:var p=t.updateQueue;if(p!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}td(t,p,r)}break;case 5:var v=t.stateNode;if(r===null&&t.flags&4){r=v;var x=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":x.autoFocus&&r.focus();break;case"img":x.src&&(r.src=x.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var O=t.alternate;if(O!==null){var B=O.memoizedState;if(B!==null){var W=B.dehydrated;W!==null&&Qo(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}St||t.flags&512&&Eu(t)}catch(Q){et(t,t.return,Q)}}if(t===e){ue=null;break}if(r=t.sibling,r!==null){r.return=t.return,ue=r;break}ue=t.return}}function tf(e){for(;ue!==null;){var t=ue;if(t===e){ue=null;break}var r=t.sibling;if(r!==null){r.return=t.return,ue=r;break}ue=t.return}}function nf(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Fi(4,t)}catch(x){et(t,r,x)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var u=t.return;try{i.componentDidMount()}catch(x){et(t,u,x)}}var c=t.return;try{Eu(t)}catch(x){et(t,c,x)}break;case 5:var p=t.return;try{Eu(t)}catch(x){et(t,p,x)}}}catch(x){et(t,t.return,x)}if(t===e){ue=null;break}var v=t.sibling;if(v!==null){v.return=t.return,ue=v;break}ue=t.return}}var Bg=Math.ceil,Oi=L.ReactCurrentDispatcher,_u=L.ReactCurrentOwner,Jt=L.ReactCurrentBatchConfig,Ae=0,dt=null,st=null,mt=0,Ht=0,vo=Gn(0),at=0,ps=null,Fr=0,Ii=0,Pu=0,hs=null,It=null,Mu=0,yo=1/0,On=null,Di=!1,Fu=null,Zn=null,Ti=!1,er=null,Li=0,gs=0,Ou=null,zi=-1,$i=0;function Nt(){return(Ae&6)!==0?rt():zi!==-1?zi:zi=rt()}function tr(e){return(e.mode&1)===0?1:(Ae&2)!==0&&mt!==0?mt&-mt:_g.transition!==null?($i===0&&($i=Wa()),$i):(e=Be,e!==0||(e=window.event,e=e===void 0?16:oc(e.type)),e)}function an(e,t,r,i){if(50<gs)throw gs=0,Ou=null,Error(s(185));Vo(e,r,i),((Ae&2)===0||e!==dt)&&(e===dt&&((Ae&2)===0&&(Ii|=r),at===4&&nr(e,mt)),Dt(e,i),r===1&&Ae===0&&(t.mode&1)===0&&(yo=rt()+500,fi&&Wn()))}function Dt(e,t){var r=e.callbackNode;_h(e,t);var i=Gs(e,e===dt?mt:0);if(i===0)r!==null&&qa(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&qa(r),t===1)e.tag===0?Ng(of.bind(null,e)):Uc(of.bind(null,e)),kg(function(){(Ae&6)===0&&Wn()}),r=null;else{switch(Ya(i)){case 1:r=dl;break;case 4:r=Ga;break;case 16:r=Us;break;case 536870912:r=Ka;break;default:r=Us}r=pf(r,rf.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function rf(e,t){if(zi=-1,$i=0,(Ae&6)!==0)throw Error(s(327));var r=e.callbackNode;if(wo()&&e.callbackNode!==r)return null;var i=Gs(e,e===dt?mt:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Vi(e,i);else{t=i;var u=Ae;Ae|=2;var c=lf();(dt!==e||mt!==t)&&(On=null,yo=rt()+500,Ir(e,t));do try{Kg();break}catch(v){sf(e,v)}while(!0);Yl(),Oi.current=c,Ae=u,st!==null?t=0:(dt=null,mt=0,t=at)}if(t!==0){if(t===2&&(u=fl(e),u!==0&&(i=u,t=Iu(e,u))),t===1)throw r=ps,Ir(e,0),nr(e,i),Dt(e,rt()),r;if(t===6)nr(e,i);else{if(u=e.current.alternate,(i&30)===0&&!qg(u)&&(t=Vi(e,i),t===2&&(c=fl(e),c!==0&&(i=c,t=Iu(e,c))),t===1))throw r=ps,Ir(e,0),nr(e,i),Dt(e,rt()),r;switch(e.finishedWork=u,e.finishedLanes=i,t){case 0:case 1:throw Error(s(345));case 2:Dr(e,It,On);break;case 3:if(nr(e,i),(i&130023424)===i&&(t=Mu+500-rt(),10<t)){if(Gs(e,0)!==0)break;if(u=e.suspendedLanes,(u&i)!==i){Nt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Vl(Dr.bind(null,e,It,On),t);break}Dr(e,It,On);break;case 4:if(nr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,u=-1;0<i;){var p=31-nn(i);c=1<<p,p=t[p],p>u&&(u=p),i&=~c}if(i=u,i=rt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Bg(i/1960))-i,10<i){e.timeoutHandle=Vl(Dr.bind(null,e,It,On),i);break}Dr(e,It,On);break;case 5:Dr(e,It,On);break;default:throw Error(s(329))}}}return Dt(e,rt()),e.callbackNode===r?rf.bind(null,e):null}function Iu(e,t){var r=hs;return e.current.memoizedState.isDehydrated&&(Ir(e,t).flags|=256),e=Vi(e,t),e!==2&&(t=It,It=r,t!==null&&Du(t)),e}function Du(e){It===null?It=e:It.push.apply(It,e)}function qg(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var u=r[i],c=u.getSnapshot;u=u.value;try{if(!rn(c(),u))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function nr(e,t){for(t&=~Pu,t&=~Ii,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-nn(t),i=1<<r;e[r]=-1,t&=~i}}function of(e){if((Ae&6)!==0)throw Error(s(327));wo();var t=Gs(e,0);if((t&1)===0)return Dt(e,rt()),null;var r=Vi(e,t);if(e.tag!==0&&r===2){var i=fl(e);i!==0&&(t=i,r=Iu(e,i))}if(r===1)throw r=ps,Ir(e,0),nr(e,t),Dt(e,rt()),r;if(r===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dr(e,It,On),Dt(e,rt()),null}function Tu(e,t){var r=Ae;Ae|=1;try{return e(t)}finally{Ae=r,Ae===0&&(yo=rt()+500,fi&&Wn())}}function Or(e){er!==null&&er.tag===0&&(Ae&6)===0&&wo();var t=Ae;Ae|=1;var r=Jt.transition,i=Be;try{if(Jt.transition=null,Be=1,e)return e()}finally{Be=i,Jt.transition=r,Ae=t,(Ae&6)===0&&Wn()}}function Lu(){Ht=vo.current,Ye(vo)}function Ir(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Cg(r)),st!==null)for(r=st.return;r!==null;){var i=r;switch(Bl(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ci();break;case 3:ho(),Ye(Mt),Ye(yt),ou();break;case 5:nu(i);break;case 4:ho();break;case 13:Ye(Xe);break;case 19:Ye(Xe);break;case 10:Jl(i.type._context);break;case 22:case 23:Lu()}r=r.return}if(dt=e,st=e=rr(e.current,null),mt=Ht=t,at=0,ps=null,Pu=Ii=Fr=0,It=hs=null,_r!==null){for(t=0;t<_r.length;t++)if(r=_r[t],i=r.interleaved,i!==null){r.interleaved=null;var u=i.next,c=r.pending;if(c!==null){var p=c.next;c.next=u,i.next=p}r.pending=i}_r=null}return e}function sf(e,t){do{var r=st;try{if(Yl(),Ci.current=ji,ki){for(var i=Ze.memoizedState;i!==null;){var u=i.queue;u!==null&&(u.pending=null),i=i.next}ki=!1}if(Mr=0,ct=ut=Ze=null,ls=!1,us=0,_u.current=null,r===null||r.return===null){at=1,ps=t,st=null;break}e:{var c=e,p=r.return,v=r,x=t;if(t=mt,v.flags|=32768,x!==null&&typeof x=="object"&&typeof x.then=="function"){var O=x,B=v,W=B.tag;if((B.mode&1)===0&&(W===0||W===11||W===15)){var Q=B.alternate;Q?(B.updateQueue=Q.updateQueue,B.memoizedState=Q.memoizedState,B.lanes=Q.lanes):(B.updateQueue=null,B.memoizedState=null)}var se=Md(p);if(se!==null){se.flags&=-257,Fd(se,p,v,c,t),se.mode&1&&Pd(c,O,t),t=se,x=O;var de=t.updateQueue;if(de===null){var he=new Set;he.add(x),t.updateQueue=he}else de.add(x);break e}else{if((t&1)===0){Pd(c,O,t),zu();break e}x=Error(s(426))}}else if(Je&&v.mode&1){var ot=Md(p);if(ot!==null){(ot.flags&65536)===0&&(ot.flags|=256),Fd(ot,p,v,c,t),Kl(go(x,v));break e}}c=x=go(x,v),at!==4&&(at=2),hs===null?hs=[c]:hs.push(c),c=p;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var _=Nd(c,x,t);ed(c,_);break e;case 1:v=x;var R=c.type,F=c.stateNode;if((c.flags&128)===0&&(typeof R.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(Zn===null||!Zn.has(F)))){c.flags|=65536,t&=-t,c.lanes|=t;var ee=_d(c,v,t);ed(c,ee);break e}}c=c.return}while(c!==null)}af(r)}catch(ve){t=ve,st===r&&r!==null&&(st=r=r.return);continue}break}while(!0)}function lf(){var e=Oi.current;return Oi.current=ji,e===null?ji:e}function zu(){(at===0||at===3||at===2)&&(at=4),dt===null||(Fr&268435455)===0&&(Ii&268435455)===0||nr(dt,mt)}function Vi(e,t){var r=Ae;Ae|=2;var i=lf();(dt!==e||mt!==t)&&(On=null,Ir(e,t));do try{Gg();break}catch(u){sf(e,u)}while(!0);if(Yl(),Ae=r,Oi.current=i,st!==null)throw Error(s(261));return dt=null,mt=0,at}function Gg(){for(;st!==null;)uf(st)}function Kg(){for(;st!==null&&!wh();)uf(st)}function uf(e){var t=ff(e.alternate,e,Ht);e.memoizedProps=e.pendingProps,t===null?af(e):st=t,_u.current=null}function af(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Ag(r,t,Ht),r!==null){st=r;return}}else{if(r=bg(r,t),r!==null){r.flags&=32767,st=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{at=6,st=null;return}}if(t=t.sibling,t!==null){st=t;return}st=t=e}while(t!==null);at===0&&(at=5)}function Dr(e,t,r){var i=Be,u=Jt.transition;try{Jt.transition=null,Be=1,Wg(e,t,r,i)}finally{Jt.transition=u,Be=i}return null}function Wg(e,t,r,i){do wo();while(er!==null);if((Ae&6)!==0)throw Error(s(327));r=e.finishedWork;var u=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var c=r.lanes|r.childLanes;if(Ph(e,c),e===dt&&(st=dt=null,mt=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Ti||(Ti=!0,pf(Us,function(){return wo(),null})),c=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||c){c=Jt.transition,Jt.transition=null;var p=Be;Be=1;var v=Ae;Ae|=4,_u.current=null,Ug(e,r),Xd(r,e),gg(zl),Ys=!!Ll,zl=Ll=null,e.current=r,Qg(r),xh(),Ae=v,Be=p,Jt.transition=c}else e.current=r;if(Ti&&(Ti=!1,er=e,Li=u),c=e.pendingLanes,c===0&&(Zn=null),kh(r.stateNode),Dt(e,rt()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)u=t[r],i(u.value,{componentStack:u.stack,digest:u.digest});if(Di)throw Di=!1,e=Fu,Fu=null,e;return(Li&1)!==0&&e.tag!==0&&wo(),c=e.pendingLanes,(c&1)!==0?e===Ou?gs++:(gs=0,Ou=e):gs=0,Wn(),null}function wo(){if(er!==null){var e=Ya(Li),t=Jt.transition,r=Be;try{if(Jt.transition=null,Be=16>e?16:e,er===null)var i=!1;else{if(e=er,er=null,Li=0,(Ae&6)!==0)throw Error(s(331));var u=Ae;for(Ae|=4,ue=e.current;ue!==null;){var c=ue,p=c.child;if((ue.flags&16)!==0){var v=c.deletions;if(v!==null){for(var x=0;x<v.length;x++){var O=v[x];for(ue=O;ue!==null;){var B=ue;switch(B.tag){case 0:case 11:case 15:fs(8,B,c)}var W=B.child;if(W!==null)W.return=B,ue=W;else for(;ue!==null;){B=ue;var Q=B.sibling,se=B.return;if(Gd(B),B===O){ue=null;break}if(Q!==null){Q.return=se,ue=Q;break}ue=se}}}var de=c.alternate;if(de!==null){var he=de.child;if(he!==null){de.child=null;do{var ot=he.sibling;he.sibling=null,he=ot}while(he!==null)}}ue=c}}if((c.subtreeFlags&2064)!==0&&p!==null)p.return=c,ue=p;else e:for(;ue!==null;){if(c=ue,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:fs(9,c,c.return)}var _=c.sibling;if(_!==null){_.return=c.return,ue=_;break e}ue=c.return}}var R=e.current;for(ue=R;ue!==null;){p=ue;var F=p.child;if((p.subtreeFlags&2064)!==0&&F!==null)F.return=p,ue=F;else e:for(p=R;ue!==null;){if(v=ue,(v.flags&2048)!==0)try{switch(v.tag){case 0:case 11:case 15:Fi(9,v)}}catch(ve){et(v,v.return,ve)}if(v===p){ue=null;break e}var ee=v.sibling;if(ee!==null){ee.return=v.return,ue=ee;break e}ue=v.return}}if(Ae=u,Wn(),hn&&typeof hn.onPostCommitFiberRoot=="function")try{hn.onPostCommitFiberRoot(Qs,e)}catch{}i=!0}return i}finally{Be=r,Jt.transition=t}}return!1}function cf(e,t,r){t=go(r,t),t=Nd(e,t,1),e=Jn(e,t,1),t=Nt(),e!==null&&(Vo(e,1,t),Dt(e,t))}function et(e,t,r){if(e.tag===3)cf(e,e,r);else for(;t!==null;){if(t.tag===3){cf(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Zn===null||!Zn.has(i))){e=go(r,e),e=_d(t,e,1),t=Jn(t,e,1),e=Nt(),t!==null&&(Vo(t,1,e),Dt(t,e));break}}t=t.return}}function Yg(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=Nt(),e.pingedLanes|=e.suspendedLanes&r,dt===e&&(mt&r)===r&&(at===4||at===3&&(mt&130023424)===mt&&500>rt()-Mu?Ir(e,0):Pu|=r),Dt(e,t)}function df(e,t){t===0&&((e.mode&1)===0?t=1:(t=qs,qs<<=1,(qs&130023424)===0&&(qs=4194304)));var r=Nt();e=Pn(e,t),e!==null&&(Vo(e,t,r),Dt(e,r))}function Jg(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),df(e,r)}function Xg(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(r=u.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(t),df(e,r)}var ff;ff=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)Ot=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Ot=!1,Vg(e,t,r);Ot=(e.flags&131072)!==0}else Ot=!1,Je&&(t.flags&1048576)!==0&&Qc(t,hi,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Pi(e,t),e=t.pendingProps;var u=io(t,yt.current);po(t,r),u=lu(null,t,i,e,u,r);var c=uu();return t.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ft(i)?(c=!0,di(t)):c=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,eu(t),u.updater=Ni,t.stateNode=u,u._reactInternals=t,hu(t,i,e,r),t=yu(null,t,i,!0,c,r)):(t.tag=0,Je&&c&&Ql(t),jt(null,t,u,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Pi(e,t),e=t.pendingProps,u=i._init,i=u(i._payload),t.type=i,u=t.tag=em(i),e=sn(i,e),u){case 0:t=vu(null,t,i,e,r);break e;case 1:t=zd(null,t,i,e,r);break e;case 11:t=Od(null,t,i,e,r);break e;case 14:t=Id(null,t,i,sn(i.type,e),r);break e}throw Error(s(306,i,""))}return t;case 0:return i=t.type,u=t.pendingProps,u=t.elementType===i?u:sn(i,u),vu(e,t,i,u,r);case 1:return i=t.type,u=t.pendingProps,u=t.elementType===i?u:sn(i,u),zd(e,t,i,u,r);case 3:e:{if($d(t),e===null)throw Error(s(387));i=t.pendingProps,c=t.memoizedState,u=c.element,Zc(e,t),xi(t,i,null,r);var p=t.memoizedState;if(i=p.element,c.isDehydrated)if(c={element:i,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){u=go(Error(s(423)),t),t=Vd(e,t,i,r,u);break e}else if(i!==u){u=go(Error(s(424)),t),t=Vd(e,t,i,r,u);break e}else for(bt=qn(t.stateNode.containerInfo.firstChild),At=t,Je=!0,on=null,r=Jc(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ao(),i===u){t=Fn(e,t,r);break e}jt(e,t,i,r)}t=t.child}return t;case 5:return nd(t),e===null&&Gl(t),i=t.type,u=t.pendingProps,c=e!==null?e.memoizedProps:null,p=u.children,$l(i,u)?p=null:c!==null&&$l(i,c)&&(t.flags|=32),Ld(e,t),jt(e,t,p,r),t.child;case 6:return e===null&&Gl(t),null;case 13:return Ad(e,t,r);case 4:return tu(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=co(t,null,i,r):jt(e,t,i,r),t.child;case 11:return i=t.type,u=t.pendingProps,u=t.elementType===i?u:sn(i,u),Od(e,t,i,u,r);case 7:return jt(e,t,t.pendingProps,r),t.child;case 8:return jt(e,t,t.pendingProps.children,r),t.child;case 12:return jt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,u=t.pendingProps,c=t.memoizedProps,p=u.value,Ke(vi,i._currentValue),i._currentValue=p,c!==null)if(rn(c.value,p)){if(c.children===u.children&&!Mt.current){t=Fn(e,t,r);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var v=c.dependencies;if(v!==null){p=c.child;for(var x=v.firstContext;x!==null;){if(x.context===i){if(c.tag===1){x=Mn(-1,r&-r),x.tag=2;var O=c.updateQueue;if(O!==null){O=O.shared;var B=O.pending;B===null?x.next=x:(x.next=B.next,B.next=x),O.pending=x}}c.lanes|=r,x=c.alternate,x!==null&&(x.lanes|=r),Xl(c.return,r,t),v.lanes|=r;break}x=x.next}}else if(c.tag===10)p=c.type===t.type?null:c.child;else if(c.tag===18){if(p=c.return,p===null)throw Error(s(341));p.lanes|=r,v=p.alternate,v!==null&&(v.lanes|=r),Xl(p,r,t),p=c.sibling}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===t){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}jt(e,t,u.children,r),t=t.child}return t;case 9:return u=t.type,i=t.pendingProps.children,po(t,r),u=Wt(u),i=i(u),t.flags|=1,jt(e,t,i,r),t.child;case 14:return i=t.type,u=sn(i,t.pendingProps),u=sn(i.type,u),Id(e,t,i,u,r);case 15:return Dd(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,u=t.pendingProps,u=t.elementType===i?u:sn(i,u),Pi(e,t),t.tag=1,Ft(i)?(e=!0,di(t)):e=!1,po(t,r),Ed(t,i,u),hu(t,i,u,r),yu(null,t,i,!0,e,r);case 19:return Hd(e,t,r);case 22:return Td(e,t,r)}throw Error(s(156,t.tag))};function pf(e,t){return Ba(e,t)}function Zg(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,r,i){return new Zg(e,t,r,i)}function $u(e){return e=e.prototype,!(!e||!e.isReactComponent)}function em(e){if(typeof e=="function")return $u(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ie)return 11;if(e===ie)return 14}return 2}function rr(e,t){var r=e.alternate;return r===null?(r=Xt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ai(e,t,r,i,u,c){var p=2;if(i=e,typeof e=="function")$u(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case q:return Tr(r.children,u,c,t);case J:p=8,u|=8;break;case Z:return e=Xt(12,r,t,u|2),e.elementType=Z,e.lanes=c,e;case Le:return e=Xt(13,r,t,u),e.elementType=Le,e.lanes=c,e;case ze:return e=Xt(19,r,t,u),e.elementType=ze,e.lanes=c,e;case _e:return bi(r,u,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case te:p=10;break e;case K:p=9;break e;case Ie:p=11;break e;case ie:p=14;break e;case Re:p=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Xt(p,r,t,u),t.elementType=e,t.type=i,t.lanes=c,t}function Tr(e,t,r,i){return e=Xt(7,e,i,t),e.lanes=r,e}function bi(e,t,r,i){return e=Xt(22,e,i,t),e.elementType=_e,e.lanes=r,e.stateNode={isHidden:!1},e}function Vu(e,t,r){return e=Xt(6,e,null,t),e.lanes=r,e}function Au(e,t,r){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tm(e,t,r,i,u){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pl(0),this.expirationTimes=pl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pl(0),this.identifierPrefix=i,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function bu(e,t,r,i,u,c,p,v,x){return e=new tm(e,t,r,v,x),t===1?(t=1,c===!0&&(t|=8)):t=0,c=Xt(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},eu(c),e}function nm(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function hf(e){if(!e)return Kn;e=e._reactInternals;e:{if(kr(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var r=e.type;if(Ft(r))return bc(e,r,t)}return t}function gf(e,t,r,i,u,c,p,v,x){return e=bu(r,i,!0,e,u,c,p,v,x),e.context=hf(null),r=e.current,i=Nt(),u=tr(r),c=Mn(i,u),c.callback=t??null,Jn(r,c,u),e.current.lanes=u,Vo(e,u,i),Dt(e,i),e}function Hi(e,t,r,i){var u=t.current,c=Nt(),p=tr(u);return r=hf(r),t.context===null?t.context=r:t.pendingContext=r,t=Mn(c,p),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Jn(u,t,p),e!==null&&(an(e,u,p,c),wi(e,u,p)),p}function Ui(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function mf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Hu(e,t){mf(e,t),(e=e.alternate)&&mf(e,t)}function rm(){return null}var vf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Uu(e){this._internalRoot=e}Qi.prototype.render=Uu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));Hi(e,t,null,null)},Qi.prototype.unmount=Uu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Or(function(){Hi(null,e,null,null)}),t[En]=null}};function Qi(e){this._internalRoot=e}Qi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Za();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Un.length&&t!==0&&t<Un[r].priority;r++);Un.splice(r,0,e),r===0&&nc(e)}};function Qu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yf(){}function om(e,t,r,i,u){if(u){if(typeof i=="function"){var c=i;i=function(){var O=Ui(p);c.call(O)}}var p=gf(t,i,e,0,null,!1,!1,"",yf);return e._reactRootContainer=p,e[En]=p.current,Zo(e.nodeType===8?e.parentNode:e),Or(),p}for(;u=e.lastChild;)e.removeChild(u);if(typeof i=="function"){var v=i;i=function(){var O=Ui(x);v.call(O)}}var x=bu(e,0,!1,null,null,!1,!1,"",yf);return e._reactRootContainer=x,e[En]=x.current,Zo(e.nodeType===8?e.parentNode:e),Or(function(){Hi(t,x,r,i)}),x}function qi(e,t,r,i,u){var c=r._reactRootContainer;if(c){var p=c;if(typeof u=="function"){var v=u;u=function(){var x=Ui(p);v.call(x)}}Hi(t,p,e,u)}else p=om(r,t,e,u,i);return Ui(p)}Ja=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=$o(t.pendingLanes);r!==0&&(hl(t,r|1),Dt(t,rt()),(Ae&6)===0&&(yo=rt()+500,Wn()))}break;case 13:Or(function(){var i=Pn(e,1);if(i!==null){var u=Nt();an(i,e,1,u)}}),Hu(e,1)}},gl=function(e){if(e.tag===13){var t=Pn(e,134217728);if(t!==null){var r=Nt();an(t,e,134217728,r)}Hu(e,134217728)}},Xa=function(e){if(e.tag===13){var t=tr(e),r=Pn(e,t);if(r!==null){var i=Nt();an(r,e,t,i)}Hu(e,t)}},Za=function(){return Be},ec=function(e,t){var r=Be;try{return Be=e,t()}finally{Be=r}},ye=function(e,t,r){switch(t){case"input":if(ht(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var u=ai(i);if(!u)throw Error(s(90));ce(i),ht(i,u)}}}break;case"textarea":zs(e,r);break;case"select":t=r.value,t!=null&&Rt(e,!!r.multiple,t,!1)}},Vn=Tu,Lo=Or;var sm={usingClientEntryPoint:!1,Events:[ns,oo,ai,qt,pn,Tu]},ms={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},im={bundleType:ms.bundleType,version:ms.version,rendererPackageName:ms.rendererPackageName,rendererConfig:ms.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ua(e),e===null?null:e.stateNode},findFiberByHostInstance:ms.findFiberByHostInstance||rm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gi.isDisabled&&Gi.supportsFiber)try{Qs=Gi.inject(im),hn=Gi}catch{}}return Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sm,Tt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qu(t))throw Error(s(200));return nm(e,t,null,r)},Tt.createRoot=function(e,t){if(!Qu(e))throw Error(s(299));var r=!1,i="",u=vf;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=bu(e,1,!1,null,null,r,!1,i,u),e[En]=t.current,Zo(e.nodeType===8?e.parentNode:e),new Uu(t)},Tt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=Ua(t),e=e===null?null:e.stateNode,e},Tt.flushSync=function(e){return Or(e)},Tt.hydrate=function(e,t,r){if(!Bi(t))throw Error(s(200));return qi(null,e,t,!0,r)},Tt.hydrateRoot=function(e,t,r){if(!Qu(e))throw Error(s(405));var i=r!=null&&r.hydratedSources||null,u=!1,c="",p=vf;if(r!=null&&(r.unstable_strictMode===!0&&(u=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),t=gf(t,null,e,1,r??null,u,!1,c,p),e[En]=t.current,Zo(e),i)for(e=0;e<i.length;e++)r=i[e],u=r._getVersion,u=u(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,u]:t.mutableSourceEagerHydrationData.push(r,u);return new Qi(t)},Tt.render=function(e,t,r){if(!Bi(t))throw Error(s(200));return qi(null,e,t,!1,r)},Tt.unmountComponentAtNode=function(e){if(!Bi(e))throw Error(s(40));return e._reactRootContainer?(Or(function(){qi(null,null,e,!1,function(){e._reactRootContainer=null,e[En]=null})}),!0):!1},Tt.unstable_batchedUpdates=Tu,Tt.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Bi(r))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return qi(e,t,r,!1,i)},Tt.version="18.3.1-next-f1338f8080-20240426",Tt}var Nf;function hm(){if(Nf)return Ku.exports;Nf=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),Ku.exports=pm(),Ku.exports}var _f;function gm(){if(_f)return Wi;_f=1;var n=hm();return Wi.createRoot=n.createRoot,Wi.hydrateRoot=n.hydrateRoot,Wi}var mm=gm();const vm=vp(mm);var Is=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ym={setTimeout:(n,o)=>setTimeout(n,o),clearTimeout:n=>clearTimeout(n),setInterval:(n,o)=>setInterval(n,o),clearInterval:n=>clearInterval(n)},lr,Pa,lp,wm=(lp=class{constructor(){Ee(this,lr,ym);Ee(this,Pa,!1)}setTimeoutProvider(n){le(this,lr,n)}setTimeout(n,o){return k(this,lr).setTimeout(n,o)}clearTimeout(n){k(this,lr).clearTimeout(n)}setInterval(n,o){return k(this,lr).setInterval(n,o)}clearInterval(n){k(this,lr).clearInterval(n)}},lr=new WeakMap,Pa=new WeakMap,lp),Lr=new wm;function xm(n){setTimeout(n,0)}var Kr=typeof window>"u"||"Deno"in globalThis;function zt(){}function Sm(n,o){return typeof n=="function"?n(o):n}function ua(n){return typeof n=="number"&&n>=0&&n!==1/0}function yp(n,o){return Math.max(n+(o||0)-Date.now(),0)}function mr(n,o){return typeof n=="function"?n(o):n}function en(n,o){return typeof n=="function"?n(o):n}function Pf(n,o){const{type:s="all",exact:l,fetchStatus:a,predicate:d,queryKey:h,stale:m}=n;if(h){if(l){if(o.queryHash!==Fa(h,o.options))return!1}else if(!Es(o.queryKey,h))return!1}if(s!=="all"){const g=o.isActive();if(s==="active"&&!g||s==="inactive"&&g)return!1}return!(typeof m=="boolean"&&o.isStale()!==m||a&&a!==o.state.fetchStatus||d&&!d(o))}function Mf(n,o){const{exact:s,status:l,predicate:a,mutationKey:d}=n;if(d){if(!o.options.mutationKey)return!1;if(s){if(Rs(o.options.mutationKey)!==Rs(d))return!1}else if(!Es(o.options.mutationKey,d))return!1}return!(l&&o.state.status!==l||a&&!a(o))}function Fa(n,o){return((o==null?void 0:o.queryKeyHashFn)||Rs)(n)}function Rs(n){return JSON.stringify(n,(o,s)=>ca(s)?Object.keys(s).sort().reduce((l,a)=>(l[a]=s[a],l),{}):s)}function Es(n,o){return n===o?!0:typeof n!=typeof o?!1:n&&o&&typeof n=="object"&&typeof o=="object"?Object.keys(o).every(s=>Es(n[s],o[s])):!1}var Cm=Object.prototype.hasOwnProperty;function wp(n,o,s=0){if(n===o)return n;if(s>500)return o;const l=Ff(n)&&Ff(o);if(!l&&!(ca(n)&&ca(o)))return o;const d=(l?n:Object.keys(n)).length,h=l?o:Object.keys(o),m=h.length,g=l?new Array(m):{};let S=0;for(let w=0;w<m;w++){const E=l?w:h[w],P=n[E],j=o[E];if(P===j){g[E]=P,(l?w<d:Cm.call(n,E))&&S++;continue}if(P===null||j===null||typeof P!="object"||typeof j!="object"){g[E]=j;continue}const z=wp(P,j,s+1);g[E]=z,z===P&&S++}return d===m&&S===d?n:g}function aa(n,o){if(!o||Object.keys(n).length!==Object.keys(o).length)return!1;for(const s in n)if(n[s]!==o[s])return!1;return!0}function Ff(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ca(n){if(!Of(n))return!1;const o=n.constructor;if(o===void 0)return!0;const s=o.prototype;return!(!Of(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Of(n){return Object.prototype.toString.call(n)==="[object Object]"}function km(n){return new Promise(o=>{Lr.setTimeout(o,n)})}function da(n,o,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,o):s.structuralSharing!==!1?wp(n,o):o}function Rm(n,o,s=0){const l=[...n,o];return s&&l.length>s?l.slice(1):l}function Em(n,o,s=0){const l=[o,...n];return s&&l.length>s?l.slice(0,-1):l}var Oa=Symbol();function xp(n,o){return!n.queryFn&&(o!=null&&o.initialPromise)?()=>o.initialPromise:!n.queryFn||n.queryFn===Oa?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Sp(n,o){return typeof n=="function"?n(...o):!!n}function jm(n,o,s){let l=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=o()),l||(l=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),n}var zr,ur,So,up,Nm=(up=class extends Is{constructor(){super();Ee(this,zr);Ee(this,ur);Ee(this,So);le(this,So,o=>{if(!Kr&&window.addEventListener){const s=()=>o();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){k(this,ur)||this.setEventListener(k(this,So))}onUnsubscribe(){var o;this.hasListeners()||((o=k(this,ur))==null||o.call(this),le(this,ur,void 0))}setEventListener(o){var s;le(this,So,o),(s=k(this,ur))==null||s.call(this),le(this,ur,o(l=>{typeof l=="boolean"?this.setFocused(l):this.onFocus()}))}setFocused(o){k(this,zr)!==o&&(le(this,zr,o),this.onFocus())}onFocus(){const o=this.isFocused();this.listeners.forEach(s=>{s(o)})}isFocused(){var o;return typeof k(this,zr)=="boolean"?k(this,zr):((o=globalThis.document)==null?void 0:o.visibilityState)!=="hidden"}},zr=new WeakMap,ur=new WeakMap,So=new WeakMap,up),Ia=new Nm;function fa(){let n,o;const s=new Promise((a,d)=>{n=a,o=d});s.status="pending",s.catch(()=>{});function l(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{l({status:"fulfilled",value:a}),n(a)},s.reject=a=>{l({status:"rejected",reason:a}),o(a)},s}var _m=xm;function Pm(){let n=[],o=0,s=m=>{m()},l=m=>{m()},a=_m;const d=m=>{o?n.push(m):a(()=>{s(m)})},h=()=>{const m=n;n=[],m.length&&a(()=>{l(()=>{m.forEach(g=>{s(g)})})})};return{batch:m=>{let g;o++;try{g=m()}finally{o--,o||h()}return g},batchCalls:m=>(...g)=>{d(()=>{m(...g)})},schedule:d,setNotifyFunction:m=>{s=m},setBatchNotifyFunction:m=>{l=m},setScheduler:m=>{a=m}}}var vt=Pm(),Co,ar,ko,ap,Mm=(ap=class extends Is{constructor(){super();Ee(this,Co,!0);Ee(this,ar);Ee(this,ko);le(this,ko,o=>{if(!Kr&&window.addEventListener){const s=()=>o(!0),l=()=>o(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",l,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",l)}}})}onSubscribe(){k(this,ar)||this.setEventListener(k(this,ko))}onUnsubscribe(){var o;this.hasListeners()||((o=k(this,ar))==null||o.call(this),le(this,ar,void 0))}setEventListener(o){var s;le(this,ko,o),(s=k(this,ar))==null||s.call(this),le(this,ar,o(this.setOnline.bind(this)))}setOnline(o){k(this,Co)!==o&&(le(this,Co,o),this.listeners.forEach(l=>{l(o)}))}isOnline(){return k(this,Co)}},Co=new WeakMap,ar=new WeakMap,ko=new WeakMap,ap),rl=new Mm;function Fm(n){return Math.min(1e3*2**n,3e4)}function Cp(n){return(n??"online")==="online"?rl.isOnline():!0}var pa=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function kp(n){let o=!1,s=0,l;const a=fa(),d=()=>a.status!=="pending",h=T=>{var b;if(!d()){const V=new pa(T);P(V),(b=n.onCancel)==null||b.call(n,V)}},m=()=>{o=!0},g=()=>{o=!1},S=()=>Ia.isFocused()&&(n.networkMode==="always"||rl.isOnline())&&n.canRun(),w=()=>Cp(n.networkMode)&&n.canRun(),E=T=>{d()||(l==null||l(),a.resolve(T))},P=T=>{d()||(l==null||l(),a.reject(T))},j=()=>new Promise(T=>{var b;l=V=>{(d()||S())&&T(V)},(b=n.onPause)==null||b.call(n)}).then(()=>{var T;l=void 0,d()||(T=n.onContinue)==null||T.call(n)}),z=()=>{if(d())return;let T;const b=s===0?n.initialPromise:void 0;try{T=b??n.fn()}catch(V){T=Promise.reject(V)}Promise.resolve(T).then(E).catch(V=>{var I;if(d())return;const $=n.retry??(Kr?0:3),U=n.retryDelay??Fm,L=typeof U=="function"?U(s,V):U,X=$===!0||typeof $=="number"&&s<$||typeof $=="function"&&$(s,V);if(o||!X){P(V);return}s++,(I=n.onFail)==null||I.call(n,s,V),km(L).then(()=>S()?void 0:j()).then(()=>{o?P(V):z()})})};return{promise:a,status:()=>a.status,cancel:h,continue:()=>(l==null||l(),a),cancelRetry:m,continueRetry:g,canStart:w,start:()=>(w()?z():j().then(z),a)}}var $r,cp,Rp=(cp=class{constructor(){Ee(this,$r)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ua(this.gcTime)&&le(this,$r,Lr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Kr?1/0:300*1e3))}clearGcTimeout(){k(this,$r)&&(Lr.clearTimeout(k(this,$r)),le(this,$r,void 0))}},$r=new WeakMap,cp),Vr,Ro,Zt,Ar,pt,_s,br,cn,In,dp,Om=(dp=class extends Rp{constructor(o){super();Ee(this,cn);Ee(this,Vr);Ee(this,Ro);Ee(this,Zt);Ee(this,Ar);Ee(this,pt);Ee(this,_s);Ee(this,br);le(this,br,!1),le(this,_s,o.defaultOptions),this.setOptions(o.options),this.observers=[],le(this,Ar,o.client),le(this,Zt,k(this,Ar).getQueryCache()),this.queryKey=o.queryKey,this.queryHash=o.queryHash,le(this,Vr,Df(this.options)),this.state=o.state??k(this,Vr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var o;return(o=k(this,pt))==null?void 0:o.promise}setOptions(o){if(this.options={...k(this,_s),...o},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Df(this.options);s.data!==void 0&&(this.setState(If(s.data,s.dataUpdatedAt)),le(this,Vr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Zt).remove(this)}setData(o,s){const l=da(this.state.data,o,this.options);return $e(this,cn,In).call(this,{data:l,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),l}setState(o,s){$e(this,cn,In).call(this,{type:"setState",state:o,setStateOptions:s})}cancel(o){var l,a;const s=(l=k(this,pt))==null?void 0:l.promise;return(a=k(this,pt))==null||a.cancel(o),s?s.then(zt).catch(zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,Vr))}isActive(){return this.observers.some(o=>en(o.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Oa||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(o=>mr(o.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(o=>o.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(o=0){return this.state.data===void 0?!0:o==="static"?!1:this.state.isInvalidated?!0:!yp(this.state.dataUpdatedAt,o)}onFocus(){var s;const o=this.observers.find(l=>l.shouldFetchOnWindowFocus());o==null||o.refetch({cancelRefetch:!1}),(s=k(this,pt))==null||s.continue()}onOnline(){var s;const o=this.observers.find(l=>l.shouldFetchOnReconnect());o==null||o.refetch({cancelRefetch:!1}),(s=k(this,pt))==null||s.continue()}addObserver(o){this.observers.includes(o)||(this.observers.push(o),this.clearGcTimeout(),k(this,Zt).notify({type:"observerAdded",query:this,observer:o}))}removeObserver(o){this.observers.includes(o)&&(this.observers=this.observers.filter(s=>s!==o),this.observers.length||(k(this,pt)&&(k(this,br)?k(this,pt).cancel({revert:!0}):k(this,pt).cancelRetry()),this.scheduleGc()),k(this,Zt).notify({type:"observerRemoved",query:this,observer:o}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,cn,In).call(this,{type:"invalidate"})}async fetch(o,s){var g,S,w,E,P,j,z,T,b,V,$,U;if(this.state.fetchStatus!=="idle"&&((g=k(this,pt))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(k(this,pt))return k(this,pt).continueRetry(),k(this,pt).promise}if(o&&this.setOptions(o),!this.options.queryFn){const L=this.observers.find(X=>X.options.queryFn);L&&this.setOptions(L.options)}const l=new AbortController,a=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(le(this,br,!0),l.signal)})},d=()=>{const L=xp(this.options,s),I=(()=>{const q={client:k(this,Ar),queryKey:this.queryKey,meta:this.meta};return a(q),q})();return le(this,br,!1),this.options.persister?this.options.persister(L,I,this):L(I)},m=(()=>{const L={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:k(this,Ar),state:this.state,fetchFn:d};return a(L),L})();(S=this.options.behavior)==null||S.onFetch(m,this),le(this,Ro,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=m.fetchOptions)==null?void 0:w.meta))&&$e(this,cn,In).call(this,{type:"fetch",meta:(E=m.fetchOptions)==null?void 0:E.meta}),le(this,pt,kp({initialPromise:s==null?void 0:s.initialPromise,fn:m.fetchFn,onCancel:L=>{L instanceof pa&&L.revert&&this.setState({...k(this,Ro),fetchStatus:"idle"}),l.abort()},onFail:(L,X)=>{$e(this,cn,In).call(this,{type:"failed",failureCount:L,error:X})},onPause:()=>{$e(this,cn,In).call(this,{type:"pause"})},onContinue:()=>{$e(this,cn,In).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const L=await k(this,pt).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(j=(P=k(this,Zt).config).onSuccess)==null||j.call(P,L,this),(T=(z=k(this,Zt).config).onSettled)==null||T.call(z,L,this.state.error,this),L}catch(L){if(L instanceof pa){if(L.silent)return k(this,pt).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw $e(this,cn,In).call(this,{type:"error",error:L}),(V=(b=k(this,Zt).config).onError)==null||V.call(b,L,this),(U=($=k(this,Zt).config).onSettled)==null||U.call($,this.state.data,L,this),L}finally{this.scheduleGc()}}},Vr=new WeakMap,Ro=new WeakMap,Zt=new WeakMap,Ar=new WeakMap,pt=new WeakMap,_s=new WeakMap,br=new WeakMap,cn=new WeakSet,In=function(o){const s=l=>{switch(o.type){case"failed":return{...l,fetchFailureCount:o.failureCount,fetchFailureReason:o.error};case"pause":return{...l,fetchStatus:"paused"};case"continue":return{...l,fetchStatus:"fetching"};case"fetch":return{...l,...Ep(l.data,this.options),fetchMeta:o.meta??null};case"success":const a={...l,...If(o.data,o.dataUpdatedAt),dataUpdateCount:l.dataUpdateCount+1,...!o.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return le(this,Ro,o.manual?a:void 0),a;case"error":const d=o.error;return{...l,error:d,errorUpdateCount:l.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:l.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...l,isInvalidated:!0};case"setState":return{...l,...o.state}}};this.state=s(this.state),vt.batch(()=>{this.observers.forEach(l=>{l.onQueryUpdate()}),k(this,Zt).notify({query:this,type:"updated",action:o})})},dp);function Ep(n,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Cp(o.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function If(n,o){return{data:n,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Df(n){const o=typeof n.initialData=="function"?n.initialData():n.initialData,s=o!==void 0,l=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:s?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Lt,Ve,Ps,_t,Hr,Eo,Ln,cr,Ms,jo,No,Ur,Qr,dr,_o,Qe,ws,ha,ga,ma,va,ya,wa,xa,jp,fp,Im=(fp=class extends Is{constructor(o,s){super();Ee(this,Qe);Ee(this,Lt);Ee(this,Ve);Ee(this,Ps);Ee(this,_t);Ee(this,Hr);Ee(this,Eo);Ee(this,Ln);Ee(this,cr);Ee(this,Ms);Ee(this,jo);Ee(this,No);Ee(this,Ur);Ee(this,Qr);Ee(this,dr);Ee(this,_o,new Set);this.options=s,le(this,Lt,o),le(this,cr,null),le(this,Ln,fa()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,Ve).addObserver(this),Tf(k(this,Ve),this.options)?$e(this,Qe,ws).call(this):this.updateResult(),$e(this,Qe,va).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sa(k(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sa(k(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,Qe,ya).call(this),$e(this,Qe,wa).call(this),k(this,Ve).removeObserver(this)}setOptions(o){const s=this.options,l=k(this,Ve);if(this.options=k(this,Lt).defaultQueryOptions(o),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof en(this.options.enabled,k(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,Qe,xa).call(this),k(this,Ve).setOptions(this.options),s._defaulted&&!aa(this.options,s)&&k(this,Lt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,Ve),observer:this});const a=this.hasListeners();a&&Lf(k(this,Ve),l,this.options,s)&&$e(this,Qe,ws).call(this),this.updateResult(),a&&(k(this,Ve)!==l||en(this.options.enabled,k(this,Ve))!==en(s.enabled,k(this,Ve))||mr(this.options.staleTime,k(this,Ve))!==mr(s.staleTime,k(this,Ve)))&&$e(this,Qe,ha).call(this);const d=$e(this,Qe,ga).call(this);a&&(k(this,Ve)!==l||en(this.options.enabled,k(this,Ve))!==en(s.enabled,k(this,Ve))||d!==k(this,dr))&&$e(this,Qe,ma).call(this,d)}getOptimisticResult(o){const s=k(this,Lt).getQueryCache().build(k(this,Lt),o),l=this.createResult(s,o);return Tm(this,l)&&(le(this,_t,l),le(this,Eo,this.options),le(this,Hr,k(this,Ve).state)),l}getCurrentResult(){return k(this,_t)}trackResult(o,s){return new Proxy(o,{get:(l,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,Ln).status==="pending"&&k(this,Ln).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(l,a))})}trackProp(o){k(this,_o).add(o)}getCurrentQuery(){return k(this,Ve)}refetch({...o}={}){return this.fetch({...o})}fetchOptimistic(o){const s=k(this,Lt).defaultQueryOptions(o),l=k(this,Lt).getQueryCache().build(k(this,Lt),s);return l.fetch().then(()=>this.createResult(l,s))}fetch(o){return $e(this,Qe,ws).call(this,{...o,cancelRefetch:o.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,_t)))}createResult(o,s){var Z;const l=k(this,Ve),a=this.options,d=k(this,_t),h=k(this,Hr),m=k(this,Eo),S=o!==l?o.state:k(this,Ps),{state:w}=o;let E={...w},P=!1,j;if(s._optimisticResults){const te=this.hasListeners(),K=!te&&Tf(o,s),Ie=te&&Lf(o,l,s,a);(K||Ie)&&(E={...E,...Ep(w.data,o.options)}),s._optimisticResults==="isRestoring"&&(E.fetchStatus="idle")}let{error:z,errorUpdatedAt:T,status:b}=E;j=E.data;let V=!1;if(s.placeholderData!==void 0&&j===void 0&&b==="pending"){let te;d!=null&&d.isPlaceholderData&&s.placeholderData===(m==null?void 0:m.placeholderData)?(te=d.data,V=!0):te=typeof s.placeholderData=="function"?s.placeholderData((Z=k(this,No))==null?void 0:Z.state.data,k(this,No)):s.placeholderData,te!==void 0&&(b="success",j=da(d==null?void 0:d.data,te,s),P=!0)}if(s.select&&j!==void 0&&!V)if(d&&j===(h==null?void 0:h.data)&&s.select===k(this,Ms))j=k(this,jo);else try{le(this,Ms,s.select),j=s.select(j),j=da(d==null?void 0:d.data,j,s),le(this,jo,j),le(this,cr,null)}catch(te){le(this,cr,te)}k(this,cr)&&(z=k(this,cr),j=k(this,jo),T=Date.now(),b="error");const $=E.fetchStatus==="fetching",U=b==="pending",L=b==="error",X=U&&$,I=j!==void 0,J={status:b,fetchStatus:E.fetchStatus,isPending:U,isSuccess:b==="success",isError:L,isInitialLoading:X,isLoading:X,data:j,dataUpdatedAt:E.dataUpdatedAt,error:z,errorUpdatedAt:T,failureCount:E.fetchFailureCount,failureReason:E.fetchFailureReason,errorUpdateCount:E.errorUpdateCount,isFetched:E.dataUpdateCount>0||E.errorUpdateCount>0,isFetchedAfterMount:E.dataUpdateCount>S.dataUpdateCount||E.errorUpdateCount>S.errorUpdateCount,isFetching:$,isRefetching:$&&!U,isLoadingError:L&&!I,isPaused:E.fetchStatus==="paused",isPlaceholderData:P,isRefetchError:L&&I,isStale:Da(o,s),refetch:this.refetch,promise:k(this,Ln),isEnabled:en(s.enabled,o)!==!1};if(this.options.experimental_prefetchInRender){const te=J.data!==void 0,K=J.status==="error"&&!te,Ie=ie=>{K?ie.reject(J.error):te&&ie.resolve(J.data)},Le=()=>{const ie=le(this,Ln,J.promise=fa());Ie(ie)},ze=k(this,Ln);switch(ze.status){case"pending":o.queryHash===l.queryHash&&Ie(ze);break;case"fulfilled":(K||J.data!==ze.value)&&Le();break;case"rejected":(!K||J.error!==ze.reason)&&Le();break}}return J}updateResult(){const o=k(this,_t),s=this.createResult(k(this,Ve),this.options);if(le(this,Hr,k(this,Ve).state),le(this,Eo,this.options),k(this,Hr).data!==void 0&&le(this,No,k(this,Ve)),aa(s,o))return;le(this,_t,s);const l=()=>{if(!o)return!0;const{notifyOnChangeProps:a}=this.options,d=typeof a=="function"?a():a;if(d==="all"||!d&&!k(this,_o).size)return!0;const h=new Set(d??k(this,_o));return this.options.throwOnError&&h.add("error"),Object.keys(k(this,_t)).some(m=>{const g=m;return k(this,_t)[g]!==o[g]&&h.has(g)})};$e(this,Qe,jp).call(this,{listeners:l()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,Qe,va).call(this)}},Lt=new WeakMap,Ve=new WeakMap,Ps=new WeakMap,_t=new WeakMap,Hr=new WeakMap,Eo=new WeakMap,Ln=new WeakMap,cr=new WeakMap,Ms=new WeakMap,jo=new WeakMap,No=new WeakMap,Ur=new WeakMap,Qr=new WeakMap,dr=new WeakMap,_o=new WeakMap,Qe=new WeakSet,ws=function(o){$e(this,Qe,xa).call(this);let s=k(this,Ve).fetch(this.options,o);return o!=null&&o.throwOnError||(s=s.catch(zt)),s},ha=function(){$e(this,Qe,ya).call(this);const o=mr(this.options.staleTime,k(this,Ve));if(Kr||k(this,_t).isStale||!ua(o))return;const l=yp(k(this,_t).dataUpdatedAt,o)+1;le(this,Ur,Lr.setTimeout(()=>{k(this,_t).isStale||this.updateResult()},l))},ga=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,Ve)):this.options.refetchInterval)??!1},ma=function(o){$e(this,Qe,wa).call(this),le(this,dr,o),!(Kr||en(this.options.enabled,k(this,Ve))===!1||!ua(k(this,dr))||k(this,dr)===0)&&le(this,Qr,Lr.setInterval(()=>{(this.options.refetchIntervalInBackground||Ia.isFocused())&&$e(this,Qe,ws).call(this)},k(this,dr)))},va=function(){$e(this,Qe,ha).call(this),$e(this,Qe,ma).call(this,$e(this,Qe,ga).call(this))},ya=function(){k(this,Ur)&&(Lr.clearTimeout(k(this,Ur)),le(this,Ur,void 0))},wa=function(){k(this,Qr)&&(Lr.clearInterval(k(this,Qr)),le(this,Qr,void 0))},xa=function(){const o=k(this,Lt).getQueryCache().build(k(this,Lt),this.options);if(o===k(this,Ve))return;const s=k(this,Ve);le(this,Ve,o),le(this,Ps,o.state),this.hasListeners()&&(s==null||s.removeObserver(this),o.addObserver(this))},jp=function(o){vt.batch(()=>{o.listeners&&this.listeners.forEach(s=>{s(k(this,_t))}),k(this,Lt).getQueryCache().notify({query:k(this,Ve),type:"observerResultsUpdated"})})},fp);function Dm(n,o){return en(o.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&o.retryOnMount===!1)}function Tf(n,o){return Dm(n,o)||n.state.data!==void 0&&Sa(n,o,o.refetchOnMount)}function Sa(n,o,s){if(en(o.enabled,n)!==!1&&mr(o.staleTime,n)!=="static"){const l=typeof s=="function"?s(n):s;return l==="always"||l!==!1&&Da(n,o)}return!1}function Lf(n,o,s,l){return(n!==o||en(l.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&Da(n,s)}function Da(n,o){return en(o.enabled,n)!==!1&&n.isStaleByTime(mr(o.staleTime,n))}function Tm(n,o){return!aa(n.getCurrentResult(),o)}function zf(n){return{onFetch:(o,s)=>{var w,E,P,j,z;const l=o.options,a=(P=(E=(w=o.fetchOptions)==null?void 0:w.meta)==null?void 0:E.fetchMore)==null?void 0:P.direction,d=((j=o.state.data)==null?void 0:j.pages)||[],h=((z=o.state.data)==null?void 0:z.pageParams)||[];let m={pages:[],pageParams:[]},g=0;const S=async()=>{let T=!1;const b=U=>{jm(U,()=>o.signal,()=>T=!0)},V=xp(o.options,o.fetchOptions),$=async(U,L,X)=>{if(T)return Promise.reject();if(L==null&&U.pages.length)return Promise.resolve(U);const q=(()=>{const K={client:o.client,queryKey:o.queryKey,pageParam:L,direction:X?"backward":"forward",meta:o.options.meta};return b(K),K})(),J=await V(q),{maxPages:Z}=o.options,te=X?Em:Rm;return{pages:te(U.pages,J,Z),pageParams:te(U.pageParams,L,Z)}};if(a&&d.length){const U=a==="backward",L=U?Lm:$f,X={pages:d,pageParams:h},I=L(l,X);m=await $(X,I,U)}else{const U=n??d.length;do{const L=g===0?h[0]??l.initialPageParam:$f(l,m);if(g>0&&L==null)break;m=await $(m,L),g++}while(g<U)}return m};o.options.persister?o.fetchFn=()=>{var T,b;return(b=(T=o.options).persister)==null?void 0:b.call(T,S,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},s)}:o.fetchFn=S}}}function $f(n,{pages:o,pageParams:s}){const l=o.length-1;return o.length>0?n.getNextPageParam(o[l],o,s[l],s):void 0}function Lm(n,{pages:o,pageParams:s}){var l;return o.length>0?(l=n.getPreviousPageParam)==null?void 0:l.call(n,o[0],o,s[0],s):void 0}var Fs,xn,kt,Br,Sn,sr,pp,zm=(pp=class extends Rp{constructor(o){super();Ee(this,Sn);Ee(this,Fs);Ee(this,xn);Ee(this,kt);Ee(this,Br);le(this,Fs,o.client),this.mutationId=o.mutationId,le(this,kt,o.mutationCache),le(this,xn,[]),this.state=o.state||$m(),this.setOptions(o.options),this.scheduleGc()}setOptions(o){this.options=o,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(o){k(this,xn).includes(o)||(k(this,xn).push(o),this.clearGcTimeout(),k(this,kt).notify({type:"observerAdded",mutation:this,observer:o}))}removeObserver(o){le(this,xn,k(this,xn).filter(s=>s!==o)),this.scheduleGc(),k(this,kt).notify({type:"observerRemoved",mutation:this,observer:o})}optionalRemove(){k(this,xn).length||(this.state.status==="pending"?this.scheduleGc():k(this,kt).remove(this))}continue(){var o;return((o=k(this,Br))==null?void 0:o.continue())??this.execute(this.state.variables)}async execute(o){var h,m,g,S,w,E,P,j,z,T,b,V,$,U,L,X,I,q;const s=()=>{$e(this,Sn,sr).call(this,{type:"continue"})},l={client:k(this,Fs),meta:this.options.meta,mutationKey:this.options.mutationKey};le(this,Br,kp({fn:()=>this.options.mutationFn?this.options.mutationFn(o,l):Promise.reject(new Error("No mutationFn found")),onFail:(J,Z)=>{$e(this,Sn,sr).call(this,{type:"failed",failureCount:J,error:Z})},onPause:()=>{$e(this,Sn,sr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,kt).canRun(this)}));const a=this.state.status==="pending",d=!k(this,Br).canStart();try{if(a)s();else{$e(this,Sn,sr).call(this,{type:"pending",variables:o,isPaused:d}),k(this,kt).config.onMutate&&await k(this,kt).config.onMutate(o,this,l);const Z=await((m=(h=this.options).onMutate)==null?void 0:m.call(h,o,l));Z!==this.state.context&&$e(this,Sn,sr).call(this,{type:"pending",context:Z,variables:o,isPaused:d})}const J=await k(this,Br).start();return await((S=(g=k(this,kt).config).onSuccess)==null?void 0:S.call(g,J,o,this.state.context,this,l)),await((E=(w=this.options).onSuccess)==null?void 0:E.call(w,J,o,this.state.context,l)),await((j=(P=k(this,kt).config).onSettled)==null?void 0:j.call(P,J,null,this.state.variables,this.state.context,this,l)),await((T=(z=this.options).onSettled)==null?void 0:T.call(z,J,null,o,this.state.context,l)),$e(this,Sn,sr).call(this,{type:"success",data:J}),J}catch(J){try{await((V=(b=k(this,kt).config).onError)==null?void 0:V.call(b,J,o,this.state.context,this,l))}catch(Z){Promise.reject(Z)}try{await((U=($=this.options).onError)==null?void 0:U.call($,J,o,this.state.context,l))}catch(Z){Promise.reject(Z)}try{await((X=(L=k(this,kt).config).onSettled)==null?void 0:X.call(L,void 0,J,this.state.variables,this.state.context,this,l))}catch(Z){Promise.reject(Z)}try{await((q=(I=this.options).onSettled)==null?void 0:q.call(I,void 0,J,o,this.state.context,l))}catch(Z){Promise.reject(Z)}throw $e(this,Sn,sr).call(this,{type:"error",error:J}),J}finally{k(this,kt).runNext(this)}}},Fs=new WeakMap,xn=new WeakMap,kt=new WeakMap,Br=new WeakMap,Sn=new WeakSet,sr=function(o){const s=l=>{switch(o.type){case"failed":return{...l,failureCount:o.failureCount,failureReason:o.error};case"pause":return{...l,isPaused:!0};case"continue":return{...l,isPaused:!1};case"pending":return{...l,context:o.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:o.isPaused,status:"pending",variables:o.variables,submittedAt:Date.now()};case"success":return{...l,data:o.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...l,data:void 0,error:o.error,failureCount:l.failureCount+1,failureReason:o.error,isPaused:!1,status:"error"}}};this.state=s(this.state),vt.batch(()=>{k(this,xn).forEach(l=>{l.onMutationUpdate(o)}),k(this,kt).notify({mutation:this,type:"updated",action:o})})},pp);function $m(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zn,dn,Os,hp,Vm=(hp=class extends Is{constructor(o={}){super();Ee(this,zn);Ee(this,dn);Ee(this,Os);this.config=o,le(this,zn,new Set),le(this,dn,new Map),le(this,Os,0)}build(o,s,l){const a=new zm({client:o,mutationCache:this,mutationId:++Ki(this,Os)._,options:o.defaultMutationOptions(s),state:l});return this.add(a),a}add(o){k(this,zn).add(o);const s=Yi(o);if(typeof s=="string"){const l=k(this,dn).get(s);l?l.push(o):k(this,dn).set(s,[o])}this.notify({type:"added",mutation:o})}remove(o){if(k(this,zn).delete(o)){const s=Yi(o);if(typeof s=="string"){const l=k(this,dn).get(s);if(l)if(l.length>1){const a=l.indexOf(o);a!==-1&&l.splice(a,1)}else l[0]===o&&k(this,dn).delete(s)}}this.notify({type:"removed",mutation:o})}canRun(o){const s=Yi(o);if(typeof s=="string"){const l=k(this,dn).get(s),a=l==null?void 0:l.find(d=>d.state.status==="pending");return!a||a===o}else return!0}runNext(o){var l;const s=Yi(o);if(typeof s=="string"){const a=(l=k(this,dn).get(s))==null?void 0:l.find(d=>d!==o&&d.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){vt.batch(()=>{k(this,zn).forEach(o=>{this.notify({type:"removed",mutation:o})}),k(this,zn).clear(),k(this,dn).clear()})}getAll(){return Array.from(k(this,zn))}find(o){const s={exact:!0,...o};return this.getAll().find(l=>Mf(s,l))}findAll(o={}){return this.getAll().filter(s=>Mf(o,s))}notify(o){vt.batch(()=>{this.listeners.forEach(s=>{s(o)})})}resumePausedMutations(){const o=this.getAll().filter(s=>s.state.isPaused);return vt.batch(()=>Promise.all(o.map(s=>s.continue().catch(zt))))}},zn=new WeakMap,dn=new WeakMap,Os=new WeakMap,hp);function Yi(n){var o;return(o=n.options.scope)==null?void 0:o.id}var Cn,gp,Am=(gp=class extends Is{constructor(o={}){super();Ee(this,Cn);this.config=o,le(this,Cn,new Map)}build(o,s,l){const a=s.queryKey,d=s.queryHash??Fa(a,s);let h=this.get(d);return h||(h=new Om({client:o,queryKey:a,queryHash:d,options:o.defaultQueryOptions(s),state:l,defaultOptions:o.getQueryDefaults(a)}),this.add(h)),h}add(o){k(this,Cn).has(o.queryHash)||(k(this,Cn).set(o.queryHash,o),this.notify({type:"added",query:o}))}remove(o){const s=k(this,Cn).get(o.queryHash);s&&(o.destroy(),s===o&&k(this,Cn).delete(o.queryHash),this.notify({type:"removed",query:o}))}clear(){vt.batch(()=>{this.getAll().forEach(o=>{this.remove(o)})})}get(o){return k(this,Cn).get(o)}getAll(){return[...k(this,Cn).values()]}find(o){const s={exact:!0,...o};return this.getAll().find(l=>Pf(s,l))}findAll(o={}){const s=this.getAll();return Object.keys(o).length>0?s.filter(l=>Pf(o,l)):s}notify(o){vt.batch(()=>{this.listeners.forEach(s=>{s(o)})})}onFocus(){vt.batch(()=>{this.getAll().forEach(o=>{o.onFocus()})})}onOnline(){vt.batch(()=>{this.getAll().forEach(o=>{o.onOnline()})})}},Cn=new WeakMap,gp),tt,fr,pr,Po,Mo,hr,Fo,Oo,mp,bm=(mp=class{constructor(n={}){Ee(this,tt);Ee(this,fr);Ee(this,pr);Ee(this,Po);Ee(this,Mo);Ee(this,hr);Ee(this,Fo);Ee(this,Oo);le(this,tt,n.queryCache||new Am),le(this,fr,n.mutationCache||new Vm),le(this,pr,n.defaultOptions||{}),le(this,Po,new Map),le(this,Mo,new Map),le(this,hr,0)}mount(){Ki(this,hr)._++,k(this,hr)===1&&(le(this,Fo,Ia.subscribe(async n=>{n&&(await this.resumePausedMutations(),k(this,tt).onFocus())})),le(this,Oo,rl.subscribe(async n=>{n&&(await this.resumePausedMutations(),k(this,tt).onOnline())})))}unmount(){var n,o;Ki(this,hr)._--,k(this,hr)===0&&((n=k(this,Fo))==null||n.call(this),le(this,Fo,void 0),(o=k(this,Oo))==null||o.call(this),le(this,Oo,void 0))}isFetching(n){return k(this,tt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return k(this,fr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const o=this.defaultQueryOptions({queryKey:n});return(s=k(this,tt).get(o.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const o=this.defaultQueryOptions(n),s=k(this,tt).build(this,o),l=s.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(mr(o.staleTime,s))&&this.prefetchQuery(o),Promise.resolve(l))}getQueriesData(n){return k(this,tt).findAll(n).map(({queryKey:o,state:s})=>{const l=s.data;return[o,l]})}setQueryData(n,o,s){const l=this.defaultQueryOptions({queryKey:n}),a=k(this,tt).get(l.queryHash),d=a==null?void 0:a.state.data,h=Sm(o,d);if(h!==void 0)return k(this,tt).build(this,l).setData(h,{...s,manual:!0})}setQueriesData(n,o,s){return vt.batch(()=>k(this,tt).findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,o,s)]))}getQueryState(n){var s;const o=this.defaultQueryOptions({queryKey:n});return(s=k(this,tt).get(o.queryHash))==null?void 0:s.state}removeQueries(n){const o=k(this,tt);vt.batch(()=>{o.findAll(n).forEach(s=>{o.remove(s)})})}resetQueries(n,o){const s=k(this,tt);return vt.batch(()=>(s.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},o)))}cancelQueries(n,o={}){const s={revert:!0,...o},l=vt.batch(()=>k(this,tt).findAll(n).map(a=>a.cancel(s)));return Promise.all(l).then(zt).catch(zt)}invalidateQueries(n,o={}){return vt.batch(()=>(k(this,tt).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},o)))}refetchQueries(n,o={}){const s={...o,cancelRefetch:o.cancelRefetch??!0},l=vt.batch(()=>k(this,tt).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let d=a.fetch(void 0,s);return s.throwOnError||(d=d.catch(zt)),a.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(l).then(zt)}fetchQuery(n){const o=this.defaultQueryOptions(n);o.retry===void 0&&(o.retry=!1);const s=k(this,tt).build(this,o);return s.isStaleByTime(mr(o.staleTime,s))?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(zt).catch(zt)}fetchInfiniteQuery(n){return n.behavior=zf(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(zt).catch(zt)}ensureInfiniteQueryData(n){return n.behavior=zf(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return rl.isOnline()?k(this,fr).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,tt)}getMutationCache(){return k(this,fr)}getDefaultOptions(){return k(this,pr)}setDefaultOptions(n){le(this,pr,n)}setQueryDefaults(n,o){k(this,Po).set(Rs(n),{queryKey:n,defaultOptions:o})}getQueryDefaults(n){const o=[...k(this,Po).values()],s={};return o.forEach(l=>{Es(n,l.queryKey)&&Object.assign(s,l.defaultOptions)}),s}setMutationDefaults(n,o){k(this,Mo).set(Rs(n),{mutationKey:n,defaultOptions:o})}getMutationDefaults(n){const o=[...k(this,Mo).values()],s={};return o.forEach(l=>{Es(n,l.mutationKey)&&Object.assign(s,l.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const o={...k(this,pr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return o.queryHash||(o.queryHash=Fa(o.queryKey,o)),o.refetchOnReconnect===void 0&&(o.refetchOnReconnect=o.networkMode!=="always"),o.throwOnError===void 0&&(o.throwOnError=!!o.suspense),!o.networkMode&&o.persister&&(o.networkMode="offlineFirst"),o.queryFn===Oa&&(o.enabled=!1),o}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...k(this,pr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){k(this,tt).clear(),k(this,fr).clear()}},tt=new WeakMap,fr=new WeakMap,pr=new WeakMap,Po=new WeakMap,Mo=new WeakMap,hr=new WeakMap,Fo=new WeakMap,Oo=new WeakMap,mp),Np=C.createContext(void 0),Hm=n=>{const o=C.useContext(Np);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},Um=({client:n,children:o})=>(C.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Np.Provider,{value:n,children:o})),_p=C.createContext(!1),Qm=()=>C.useContext(_p);_p.Provider;function Bm(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var qm=C.createContext(Bm()),Gm=()=>C.useContext(qm),Km=(n,o,s)=>{const l=s!=null&&s.state.error&&typeof n.throwOnError=="function"?Sp(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(o.isReset()||(n.retryOnMount=!1))},Wm=n=>{C.useEffect(()=>{n.clearReset()},[n])},Ym=({result:n,errorResetBoundary:o,throwOnError:s,query:l,suspense:a})=>n.isError&&!o.isReset()&&!n.isFetching&&l&&(a&&n.data===void 0||Sp(s,[n.error,l])),Jm=n=>{if(n.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...a)=>s(l(...a)):s(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Xm=(n,o)=>n.isLoading&&n.isFetching&&!o,Zm=(n,o)=>(n==null?void 0:n.suspense)&&o.isPending,Vf=(n,o,s)=>o.fetchOptimistic(n).catch(()=>{s.clearReset()});function ev(n,o,s){var P,j,z,T;const l=Qm(),a=Gm(),d=Hm(),h=d.defaultQueryOptions(n);(j=(P=d.getDefaultOptions().queries)==null?void 0:P._experimental_beforeQuery)==null||j.call(P,h);const m=d.getQueryCache().get(h.queryHash);h._optimisticResults=l?"isRestoring":"optimistic",Jm(h),Km(h,a,m),Wm(a);const g=!d.getQueryCache().get(h.queryHash),[S]=C.useState(()=>new o(d,h)),w=S.getOptimisticResult(h),E=!l&&n.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(b=>{const V=E?S.subscribe(vt.batchCalls(b)):zt;return S.updateResult(),V},[S,E]),()=>S.getCurrentResult(),()=>S.getCurrentResult()),C.useEffect(()=>{S.setOptions(h)},[h,S]),Zm(h,w))throw Vf(h,S,a);if(Ym({result:w,errorResetBoundary:a,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw w.error;if((T=(z=d.getDefaultOptions().queries)==null?void 0:z._experimental_afterQuery)==null||T.call(z,h,w),h.experimental_prefetchInRender&&!Kr&&Xm(w,l)){const b=g?Vf(h,S,a):m==null?void 0:m.promise;b==null||b.catch(zt).finally(()=>{S.updateResult()})}return h.notifyOnChangeProps?w:S.trackResult(w)}function sl(n,o){return ev(n,Im)}function Pp(n){var o,s,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(o=0;o<a;o++)n[o]&&(s=Pp(n[o]))&&(l&&(l+=" "),l+=s)}else for(s in n)n[s]&&(l&&(l+=" "),l+=s);return l}function tv(){for(var n,o,s=0,l="",a=arguments.length;s<a;s++)(n=arguments[s])&&(o=Pp(n))&&(l&&(l+=" "),l+=o);return l}function be(...n){return tv(n)}/**
41
- * @license lucide-react v0.468.0 - ISC
42
- *
43
- * This source code is licensed under the ISC license.
44
- * See the LICENSE file in the root directory of this source tree.
45
- */const nv=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mp=(...n)=>n.filter((o,s,l)=>!!o&&o.trim()!==""&&l.indexOf(o)===s).join(" ").trim();/**
46
- * @license lucide-react v0.468.0 - ISC
47
- *
48
- * This source code is licensed under the ISC license.
49
- * See the LICENSE file in the root directory of this source tree.
50
- */var rv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51
- * @license lucide-react v0.468.0 - ISC
52
- *
53
- * This source code is licensed under the ISC license.
54
- * See the LICENSE file in the root directory of this source tree.
55
- */const ov=C.forwardRef(({color:n="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:a="",children:d,iconNode:h,...m},g)=>C.createElement("svg",{ref:g,...rv,width:o,height:o,stroke:n,strokeWidth:l?Number(s)*24/Number(o):s,className:Mp("lucide",a),...m},[...h.map(([S,w])=>C.createElement(S,w)),...Array.isArray(d)?d:[d]]));/**
56
- * @license lucide-react v0.468.0 - ISC
57
- *
58
- * This source code is licensed under the ISC license.
59
- * See the LICENSE file in the root directory of this source tree.
60
- */const qe=(n,o)=>{const s=C.forwardRef(({className:l,...a},d)=>C.createElement(ov,{ref:d,iconNode:o,className:Mp(`lucide-${nv(n)}`,l),...a}));return s.displayName=`${n}`,s};/**
61
- * @license lucide-react v0.468.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const Af=qe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
66
- * @license lucide-react v0.468.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */const bf=qe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
71
- * @license lucide-react v0.468.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const sv=qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
76
- * @license lucide-react v0.468.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const Gr=qe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
81
- * @license lucide-react v0.468.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const Hf=qe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
86
- * @license lucide-react v0.468.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const Ss=qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
91
- * @license lucide-react v0.468.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const Fp=qe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
96
- * @license lucide-react v0.468.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const iv=qe("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
101
- * @license lucide-react v0.468.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const lv=qe("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
106
- * @license lucide-react v0.468.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const Uf=qe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
111
- * @license lucide-react v0.468.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const Ju=qe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
116
- * @license lucide-react v0.468.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const uv=qe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
121
- * @license lucide-react v0.468.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const av=qe("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/**
126
- * @license lucide-react v0.468.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const Ta=qe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
131
- * @license lucide-react v0.468.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const cv=qe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
136
- * @license lucide-react v0.468.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const Op=qe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
141
- * @license lucide-react v0.468.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const Qf=qe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
146
- * @license lucide-react v0.468.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const dv=qe("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
151
- * @license lucide-react v0.468.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const $n=qe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
156
- * @license lucide-react v0.468.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const fv=qe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
161
- * @license lucide-react v0.468.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const pv=qe("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
166
- * @license lucide-react v0.468.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const Ip=qe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
171
- * @license lucide-react v0.468.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const hv=qe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
176
- * @license lucide-react v0.468.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const gv=qe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
181
- * @license lucide-react v0.468.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const mv=qe("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
186
- * @license lucide-react v0.468.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const vv=qe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
191
- * @license lucide-react v0.468.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const Bf=qe("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
196
- * @license lucide-react v0.468.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const yv=qe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
201
- * @license lucide-react v0.468.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const js=qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wv=({open:n,onOpenChange:o,children:s})=>(C.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n]),n?f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:()=>o==null?void 0:o(!1),children:[f.jsx("div",{className:"fixed inset-0 bg-black/50"}),f.jsx("div",{onClick:l=>l.stopPropagation(),children:s})]}):null),Dp=C.forwardRef(({className:n,children:o,...s},l)=>f.jsx("div",{ref:l,className:be("relative z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg sm:rounded-lg",n),...s,children:o}));Dp.displayName="DialogContent";const Tp=({className:n,...o})=>f.jsx("div",{className:be("flex flex-col space-y-1.5 text-center sm:text-left",n),...o});Tp.displayName="DialogHeader";const Lp=C.forwardRef(({className:n,...o},s)=>f.jsx("h2",{ref:s,className:be("text-lg font-semibold leading-none tracking-tight",n),...o}));Lp.displayName="DialogTitle";const zp=C.forwardRef(({className:n,...o},s)=>f.jsx("p",{ref:s,className:be("text-sm text-muted-foreground",n),...o}));zp.displayName="DialogDescription";const xv=C.forwardRef(({className:n,onClose:o,...s},l)=>f.jsxs("button",{ref:l,type:"button",className:be("absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",n),onClick:o,...s,children:[f.jsx(js,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]}));xv.displayName="DialogClose";const Pt=C.forwardRef(({className:n,variant:o="default",size:s="default",...l},a)=>f.jsx("button",{className:be("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{"bg-primary text-primary-foreground shadow hover:bg-primary/90":o==="default","bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90":o==="destructive","border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground":o==="outline","bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80":o==="secondary","hover:bg-accent hover:text-accent-foreground":o==="ghost","text-primary underline-offset-4 hover:underline":o==="link"},{"h-9 px-4 py-2":s==="default","h-8 rounded-md px-3 text-xs":s==="sm","h-10 rounded-md px-8":s==="lg","h-9 w-9":s==="icon"},n),ref:a,...l}));Pt.displayName="Button";const ir=C.forwardRef(({className:n,type:o,...s},l)=>f.jsx("input",{type:o,className:be("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:l,...s}));ir.displayName="Input";const Dn=C.forwardRef(({className:n,...o},s)=>f.jsx("label",{ref:s,className:be("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...o}));Dn.displayName="Label";const $p=C.forwardRef(({className:n,children:o,...s},l)=>f.jsxs("div",{className:"relative",children:[f.jsx("select",{className:be("flex h-9 w-full appearance-none rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:l,...s,children:o}),f.jsx(Gr,{className:"absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 pointer-events-none opacity-50"})]}));$p.displayName="Select";const wn="/api",Qt={async testConnection(n){return(await fetch(`${wn}/connect/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})).json()},async connect(n){const o=await fetch(`${wn}/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return o.ok?o.json():{success:!1,message:await o.text().catch(()=>"Connection failed")||`Connection failed: ${o.status} ${o.statusText}`}},async disconnect(){await fetch(`${wn}/connect`,{method:"DELETE"})},async getConnectionStatus(){try{return(await fetch(`${wn}/connect/status`)).json()}catch{return{connected:!1}}},async getProvidedConnectionString(){try{return(await fetch(`${wn}/connect/provided`)).json()}catch{await new Promise(o=>setTimeout(o,500));try{return(await fetch(`${wn}/connect/provided`)).json()}catch{return{connectionString:null}}}},async getTables(){const n=await fetch(`${wn}/tables`);if(!n.ok){const s=(await n.json().catch(()=>({error:"Failed to fetch tables"}))).error||`Failed to fetch tables: ${n.status} ${n.statusText}`;throw new Error(s)}return n.json()},async getTableStructure(n,o){const s=await fetch(`${wn}/tables/${encodeURIComponent(n)}/${encodeURIComponent(o)}`);if(!s.ok)throw new Error("Failed to fetch table structure");return s.json()},async getTableData(n,o,s=1,l=100,a,d,h){const m=new URLSearchParams({page:s.toString(),pageSize:l.toString()});a&&(m.append("sortColumn",a),m.append("sortDirection",d||"asc")),h&&Object.entries(h).forEach(([S,w])=>{w&&m.append(`filter[${S}]`,w)});const g=await fetch(`${wn}/tables/${encodeURIComponent(n)}/${encodeURIComponent(o)}/data?${m.toString()}`);if(!g.ok){const S=await g.json().catch(()=>({error:"Failed to fetch table data"})),w=S.details?`${S.error}: ${S.details}`:S.error||`Failed to fetch table data: ${g.status} ${g.statusText}`;throw new Error(w)}return g.json()},async executeQuery(n){const o=await fetch(`${wn}/query`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n})});if(!o.ok){const s=await o.json();throw new Error(s.error||"Query failed")}return o.json()}},qf="datapeek_recent_connections";function Sv({open:n,onConnect:o,onError:s}){var V;const[l,a]=C.useState({server:"",database:"",user:"",password:"",port:1433,options:{encrypt:!0,trustServerCertificate:!1}}),[d,h]=C.useState("sql"),[m,g]=C.useState(!1),[S,w]=C.useState(null),[E,P]=C.useState([]);async function j($){const U=$||l;g(!0),w(null);try{await Qt.testConnection(U),await Qt.connect(U);const L=[U,...E.filter(X=>!(X.server===U.server&&X.database===U.database))].slice(0,5);P(L),localStorage.setItem(qf,JSON.stringify(L)),o()}catch(L){w(L.message||"Connection failed"),s&&s()}finally{g(!1)}}C.useEffect(()=>{const $=localStorage.getItem(qf);if($)try{P(JSON.parse($))}catch{}Qt.getProvidedConnectionString().then(({connectionString:U})=>{if(U){console.log("Received connection string from server");try{const L=z(U);console.log("Parsed connection config:",{server:L.server,database:L.database,port:L.port,user:L.user,hasPassword:!!L.password}),a(L),L.server&&L.database&&n?(console.log("Auto-connecting with provided connection string..."),setTimeout(()=>{j(L)},100)):(!L.server||!L.database)&&(console.warn("Connection string missing required fields:",L),s&&s())}catch(L){console.error("Failed to parse connection string:",L),w(`Failed to parse connection string: ${L instanceof Error?L.message:"Unknown error"}`),s&&s()}}else console.log("No connection string provided")}).catch(U=>{console.error("Failed to get connection string:",U)})},[]);function z($){const U=$.split(";"),L={server:"",database:"",port:1433,options:{encrypt:!0,trustServerCertificate:!1}};for(const X of U){const[I,...q]=X.split("="),J=q.join("=").trim(),Z=I.trim().toLowerCase();if(Z==="server"||Z==="data source"){let te=J;te.startsWith("tcp:")&&(te=te.substring(4));const[K,Ie]=te.split(",");L.server=K.trim(),Ie&&(L.port=parseInt(Ie.trim(),10))}else Z==="database"||Z==="initial catalog"?L.database=J:Z==="user id"||Z==="userid"||Z==="uid"?L.user=J:Z==="password"||Z==="pwd"?L.password=J:Z==="encrypt"?L.options.encrypt=J.toLowerCase()==="true":Z==="trustservercertificate"&&(L.options.trustServerCertificate=J.toLowerCase()==="true")}return L}async function T(){g(!0),w(null);try{await Qt.testConnection(l),w(null)}catch($){w($.message||"Connection test failed")}finally{g(!1)}}function b($){a($)}return f.jsx(wv,{open:n,onOpenChange:()=>{},children:f.jsxs(Dp,{className:"sm:max-w-[500px]",children:[f.jsxs(Tp,{children:[f.jsxs(Lp,{className:"flex items-center gap-2",children:[f.jsx(Ta,{className:"h-5 w-5"}),"Connect to SQL Server"]}),f.jsx(zp,{children:"Enter your SQL Server connection details"})]}),f.jsxs("div",{className:"space-y-4 py-4",children:[E.length>0&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(Dn,{children:"Recent Connections"}),f.jsx("div",{className:"flex flex-wrap gap-2",children:E.map(($,U)=>f.jsxs(Pt,{variant:"outline",size:"sm",onClick:()=>b($),className:"text-xs",children:[$.server,"/",$.database]},U))})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Dn,{htmlFor:"server",children:"Server"}),f.jsx(ir,{id:"server",placeholder:"localhost",value:l.server,onChange:$=>a({...l,server:$.target.value})})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Dn,{htmlFor:"port",children:"Port"}),f.jsx(ir,{id:"port",type:"number",placeholder:"1433",value:l.port||"",onChange:$=>a({...l,port:parseInt($.target.value)||1433})})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Dn,{htmlFor:"database",children:"Database"}),f.jsx(ir,{id:"database",placeholder:"master",value:l.database,onChange:$=>a({...l,database:$.target.value})})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Dn,{htmlFor:"auth",children:"Authentication"}),f.jsxs($p,{id:"auth",value:d,onChange:$=>h($.target.value),children:[f.jsx("option",{value:"sql",children:"SQL Server Authentication"}),f.jsx("option",{value:"windows",children:"Windows Authentication"})]})]}),d==="sql"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Dn,{htmlFor:"user",children:"Username"}),f.jsx(ir,{id:"user",placeholder:"sa",value:l.user||"",onChange:$=>a({...l,user:$.target.value})})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Dn,{htmlFor:"password",children:"Password"}),f.jsx(ir,{id:"password",type:"password",placeholder:"••••••••",value:l.password||"",onChange:$=>a({...l,password:$.target.value})})]})]}),f.jsx("div",{className:"space-y-2",children:f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx("input",{type:"checkbox",id:"trustCert",checked:((V=l.options)==null?void 0:V.trustServerCertificate)||!1,onChange:$=>a({...l,options:{...l.options,trustServerCertificate:$.target.checked}}),className:"h-4 w-4 rounded border-gray-300"}),f.jsx(Dn,{htmlFor:"trustCert",className:"cursor-pointer",children:"Trust server certificate"})]})}),S&&f.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:S}),f.jsxs("div",{className:"flex gap-2 pt-2",children:[f.jsx(Pt,{variant:"outline",onClick:T,disabled:m||!l.server||!l.database,className:"flex-1",children:m?f.jsxs(f.Fragment,{children:[f.jsx($n,{className:"mr-2 h-4 w-4 animate-spin"}),"Testing..."]}):"Test Connection"}),f.jsx(Pt,{onClick:()=>j(),disabled:m||!l.server||!l.database,className:"flex-1",children:m?f.jsxs(f.Fragment,{children:[f.jsx($n,{className:"mr-2 h-4 w-4 animate-spin"}),"Connecting..."]}):"Connect"})]})]})]})})}const Vp="datapeek_favorites",Ap="datapeek_queries";function Gf(){try{const n=localStorage.getItem(Vp);return n?JSON.parse(n):[]}catch{return[]}}function Kf(n){localStorage.setItem(Vp,JSON.stringify(n))}function nl(){try{const n=localStorage.getItem(Ap);return n?JSON.parse(n):[]}catch{return[]}}function Cv(n){localStorage.setItem(Ap,JSON.stringify(n))}function kv(n){return n.endsWith(".sql")?n.slice(0,-4):n}function Rv(){const n=nl(),o=n.map(d=>{const h=d.name.match(/Query(\d+)\.sql/);return h?parseInt(h[1],10):0}).filter(d=>d>0),s=o.length>0?Math.max(...o)+1:1,l={id:`query-${Date.now()}`,name:`Query${s.toString().padStart(2,"0")}.sql`,query:"SELECT TOP 100 * FROM ",createdAt:Date.now(),updatedAt:Date.now()},a=[...n,l];return Cv(a),l}function Ev({onTableSelect:n,selectedTable:o,onQuerySelect:s,selectedQuery:l,queriesUpdated:a,favoritesUpdated:d}){const[h,m]=C.useState(""),[g,S]=C.useState(new Set(["Favorites","Queries"])),[w,E]=C.useState(Gf()),[P,j]=C.useState(nl()),{data:z=[],isLoading:T,error:b}=sl({queryKey:["tables"],queryFn:()=>Qt.getTables(),refetchInterval:3e4}),V=C.useMemo(()=>z.reduce((I,q)=>(I[q.schemaName]||(I[q.schemaName]=[]),I[q.schemaName].push(q),I),{}),[z]),$=Object.entries(V).filter(([I,q])=>{if(!h)return!0;const J=h.toLowerCase();return I.toLowerCase().includes(J)||q.some(Z=>Z.tableName.toLowerCase().includes(J))}),U=I=>{const q=new Set(g);q.has(I)?q.delete(I):q.add(I),S(q)};C.useEffect(()=>{a&&(j(nl()),S(I=>new Set([...I,"Queries"])))},[a]),C.useEffect(()=>{d&&E(Gf())},[d]),C.useEffect(()=>{if(h){const I=new Set(["Favorites","Queries"]),q=h.toLowerCase();Object.entries(V).forEach(([J,Z])=>{(J.toLowerCase().includes(q)||Z.some(te=>te.tableName.toLowerCase().includes(q)))&&I.add(J)}),P.some(J=>J.name.toLowerCase().includes(q)||J.query.toLowerCase().includes(q))&&I.add("Queries"),S(J=>{const Z=Array.from(J).sort().join(","),te=Array.from(I).sort().join(",");return Z===te?J:I})}else{const I=new Set(["Favorites","Queries"]);S(q=>{const J=Array.from(q).sort().join(","),Z=Array.from(I).sort().join(",");return J===Z?q:I})}},[h,z,P,V]),C.useCallback((I,q,J)=>{J.stopPropagation();const Z=[...w],te=Z.findIndex(K=>K.schema===I&&K.table===q);te>=0?Z.splice(te,1):Z.push({schema:I,table:q}),E(Z),Kf(Z)},[w]),C.useCallback((I,q)=>{const J=[...w],Z=q==="up"?I-1:I+1;Z>=0&&Z<J.length&&([J[I],J[Z]]=[J[Z],J[I]],E(J),Kf(J))},[w]);const L=w.map(I=>{const q=z.find(J=>J.schemaName===I.schema&&J.tableName===I.table);return q?{...I,tableInfo:q}:null}).filter(I=>I!==null),X=h?L.filter(I=>I.tableInfo.tableName.toLowerCase().includes(h.toLowerCase())||I.schema.toLowerCase().includes(h.toLowerCase())):L;return f.jsxs("div",{className:"flex h-full flex-col border-r bg-sidebar-bg dark:bg-sidebar-bg",children:[f.jsx("div",{className:"border-b p-4",children:f.jsxs("div",{className:"relative",children:[f.jsx(gv,{className:"absolute left-2 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),f.jsx(ir,{placeholder:"Search tables...",value:h,onChange:I=>m(I.target.value),className:"pl-8 pr-8 h-8 text-sm"}),h&&f.jsx("button",{onClick:()=>m(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-accent transition-colors",title:"Clear search",children:f.jsx(js,{className:"h-3.5 w-3.5 text-muted-foreground"})})]})}),f.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:T?f.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Loading tables..."}):b?f.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-sm text-destructive px-4 text-center",children:[f.jsx(Ta,{className:"h-8 w-8 mb-2 opacity-50"}),f.jsx("div",{className:"font-medium",children:"Failed to load tables"}),f.jsx("div",{className:"text-xs mt-1 text-muted-foreground",children:b instanceof Error?b.message:"Unknown error"})]}):$.length===0&&X.length===0?f.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:h?"No tables found":"No tables"}):f.jsxs("div",{className:"space-y-1",children:[w.length>0&&f.jsxs("div",{className:"space-y-0.5 mb-2",children:[f.jsxs("button",{onClick:()=>U("Favorites"),className:"flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-sm font-medium hover:bg-accent transition-colors",children:[g.has("Favorites")?f.jsx(Gr,{className:"h-3.5 w-3.5"}):f.jsx(Ss,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"flex-1 truncate",children:"Favorites"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:X.length})]}),g.has("Favorites")&&f.jsx("div",{className:"ml-4 space-y-0.5",children:X.map(I=>{const q=(o==null?void 0:o.schema)===I.schema&&(o==null?void 0:o.table)===I.tableInfo.tableName;return f.jsxs("button",{onClick:()=>n(I.schema,I.tableInfo.tableName),className:be("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors",q?"bg-primary text-primary-foreground":"hover:bg-accent"),children:[f.jsx(Bf,{className:"h-3.5 w-3.5 flex-shrink-0"}),f.jsx("span",{className:"flex-1 truncate",children:I.tableInfo.tableName}),f.jsx("span",{className:"text-xs opacity-60 truncate",children:I.schema})]},`fav-${I.schema}.${I.tableInfo.tableName}`)})})]}),f.jsxs("div",{className:"space-y-0.5 mb-2",children:[f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsxs("button",{onClick:()=>U("Queries"),className:"flex-1 flex items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-sm font-medium hover:bg-accent transition-colors",children:[g.has("Queries")?f.jsx(Gr,{className:"h-3.5 w-3.5"}):f.jsx(Ss,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"flex-1 truncate",children:"Queries"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:P.length})]}),f.jsx("button",{onClick:I=>{I.stopPropagation();const q=Rv();j(nl()),s&&s(q.id)},className:"p-1 rounded hover:bg-accent transition-colors",title:"New Query",children:f.jsx(hv,{className:"h-3.5 w-3.5"})})]}),g.has("Queries")&&f.jsxs("div",{className:"ml-4 space-y-0.5",children:[P.map(I=>{const q=l===I.id;return f.jsxs("button",{onClick:()=>{s&&s(I.id)},className:be("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors",q?"bg-primary text-primary-foreground":"hover:bg-accent"),children:[f.jsx(Op,{className:"h-3.5 w-3.5 flex-shrink-0"}),f.jsx("span",{className:"flex-1 truncate",children:kv(I.name)})]},I.id)}),P.length===0&&f.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"No queries yet"})]})]}),$.map(([I,q])=>{const J=g.has(I),Z=h?q.filter(te=>te.tableName.toLowerCase().includes(h.toLowerCase())):q;return f.jsxs("div",{className:"space-y-0.5",children:[f.jsxs("button",{onClick:()=>U(I),className:"flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-sm font-medium hover:bg-accent transition-colors",children:[J?f.jsx(Gr,{className:"h-3.5 w-3.5"}):f.jsx(Ss,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"flex-1 truncate",children:I}),f.jsx("span",{className:"text-xs text-muted-foreground",children:Z.length})]}),J&&f.jsx("div",{className:"ml-4 space-y-0.5",children:Z.map(te=>{const K=(o==null?void 0:o.schema)===I&&(o==null?void 0:o.table)===te.tableName;return f.jsxs("button",{onClick:()=>n(I,te.tableName),className:be("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors",K?"bg-primary text-primary-foreground":"hover:bg-accent"),children:[f.jsx(Bf,{className:"h-3.5 w-3.5 flex-shrink-0"}),f.jsx("span",{className:"flex-1 truncate",children:te.tableName})]},`${I}.${te.tableName}`)})})]},I)})]})}),f.jsxs("div",{className:"border-t p-2 text-xs text-muted-foreground",children:[z.length," ",z.length===1?"table":"tables"]})]})}/**
206
- * table-core
207
- *
208
- * Copyright (c) TanStack
209
- *
210
- * This source code is licensed under the MIT license found in the
211
- * LICENSE.md file in the root directory of this source tree.
212
- *
213
- * @license MIT
214
- */function gr(n,o){return typeof n=="function"?n(o):n}function Bt(n,o){return s=>{o.setState(l=>({...l,[n]:gr(s,l[n])}))}}function il(n){return n instanceof Function}function jv(n){return Array.isArray(n)&&n.every(o=>typeof o=="number")}function Nv(n,o){const s=[],l=a=>{a.forEach(d=>{s.push(d);const h=o(d);h!=null&&h.length&&l(h)})};return l(n),s}function je(n,o,s){let l=[],a;return d=>{let h;s.key&&s.debug&&(h=Date.now());const m=n(d);if(!(m.length!==l.length||m.some((w,E)=>l[E]!==w)))return a;l=m;let S;if(s.key&&s.debug&&(S=Date.now()),a=o(...m),s==null||s.onChange==null||s.onChange(a),s.key&&s.debug&&s!=null&&s.debug()){const w=Math.round((Date.now()-h)*100)/100,E=Math.round((Date.now()-S)*100)/100,P=E/16,j=(z,T)=>{for(z=String(z);z.length<T;)z=" "+z;return z};console.info(`%c⏱ ${j(E,5)} /${j(w,5)} ms`,`
215
- font-size: .6rem;
216
- font-weight: bold;
217
- color: hsl(${Math.max(0,Math.min(120-120*P,120))}deg 100% 31%);`,s==null?void 0:s.key)}return a}}function Ne(n,o,s,l){return{debug:()=>{var a;return(a=n==null?void 0:n.debugAll)!=null?a:n[o]},key:!1,onChange:l}}function _v(n,o,s,l){const a=()=>{var h;return(h=d.getValue())!=null?h:n.options.renderFallbackValue},d={id:`${o.id}_${s.id}`,row:o,column:s,getValue:()=>o.getValue(l),renderValue:a,getContext:je(()=>[n,s,o,d],(h,m,g,S)=>({table:h,column:m,row:g,cell:S,getValue:S.getValue,renderValue:S.renderValue}),Ne(n.options,"debugCells"))};return n._features.forEach(h=>{h.createCell==null||h.createCell(d,s,o,n)},{}),d}function Pv(n,o,s,l){var a,d;const m={...n._getDefaultColumnDef(),...o},g=m.accessorKey;let S=(a=(d=m.id)!=null?d:g?typeof String.prototype.replaceAll=="function"?g.replaceAll(".","_"):g.replace(/\./g,"_"):void 0)!=null?a:typeof m.header=="string"?m.header:void 0,w;if(m.accessorFn?w=m.accessorFn:g&&(g.includes(".")?w=P=>{let j=P;for(const T of g.split(".")){var z;j=(z=j)==null?void 0:z[T]}return j}:w=P=>P[m.accessorKey]),!S)throw new Error;let E={id:`${String(S)}`,accessorFn:w,parent:l,depth:s,columnDef:m,columns:[],getFlatColumns:je(()=>[!0],()=>{var P;return[E,...(P=E.columns)==null?void 0:P.flatMap(j=>j.getFlatColumns())]},Ne(n.options,"debugColumns")),getLeafColumns:je(()=>[n._getOrderColumnsFn()],P=>{var j;if((j=E.columns)!=null&&j.length){let z=E.columns.flatMap(T=>T.getLeafColumns());return P(z)}return[E]},Ne(n.options,"debugColumns"))};for(const P of n._features)P.createColumn==null||P.createColumn(E,n);return E}const Ct="debugHeaders";function Wf(n,o,s){var l;let d={id:(l=s.id)!=null?l:o.id,column:o,index:s.index,isPlaceholder:!!s.isPlaceholder,placeholderId:s.placeholderId,depth:s.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const h=[],m=g=>{g.subHeaders&&g.subHeaders.length&&g.subHeaders.map(m),h.push(g)};return m(d),h},getContext:()=>({table:n,header:d,column:o})};return n._features.forEach(h=>{h.createHeader==null||h.createHeader(d,n)}),d}const Mv={createTable:n=>{n.getHeaderGroups=je(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,s,l,a)=>{var d,h;const m=(d=l==null?void 0:l.map(E=>s.find(P=>P.id===E)).filter(Boolean))!=null?d:[],g=(h=a==null?void 0:a.map(E=>s.find(P=>P.id===E)).filter(Boolean))!=null?h:[],S=s.filter(E=>!(l!=null&&l.includes(E.id))&&!(a!=null&&a.includes(E.id)));return Ji(o,[...m,...S,...g],n)},Ne(n.options,Ct)),n.getCenterHeaderGroups=je(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,s,l,a)=>(s=s.filter(d=>!(l!=null&&l.includes(d.id))&&!(a!=null&&a.includes(d.id))),Ji(o,s,n,"center")),Ne(n.options,Ct)),n.getLeftHeaderGroups=je(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(o,s,l)=>{var a;const d=(a=l==null?void 0:l.map(h=>s.find(m=>m.id===h)).filter(Boolean))!=null?a:[];return Ji(o,d,n,"left")},Ne(n.options,Ct)),n.getRightHeaderGroups=je(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(o,s,l)=>{var a;const d=(a=l==null?void 0:l.map(h=>s.find(m=>m.id===h)).filter(Boolean))!=null?a:[];return Ji(o,d,n,"right")},Ne(n.options,Ct)),n.getFooterGroups=je(()=>[n.getHeaderGroups()],o=>[...o].reverse(),Ne(n.options,Ct)),n.getLeftFooterGroups=je(()=>[n.getLeftHeaderGroups()],o=>[...o].reverse(),Ne(n.options,Ct)),n.getCenterFooterGroups=je(()=>[n.getCenterHeaderGroups()],o=>[...o].reverse(),Ne(n.options,Ct)),n.getRightFooterGroups=je(()=>[n.getRightHeaderGroups()],o=>[...o].reverse(),Ne(n.options,Ct)),n.getFlatHeaders=je(()=>[n.getHeaderGroups()],o=>o.map(s=>s.headers).flat(),Ne(n.options,Ct)),n.getLeftFlatHeaders=je(()=>[n.getLeftHeaderGroups()],o=>o.map(s=>s.headers).flat(),Ne(n.options,Ct)),n.getCenterFlatHeaders=je(()=>[n.getCenterHeaderGroups()],o=>o.map(s=>s.headers).flat(),Ne(n.options,Ct)),n.getRightFlatHeaders=je(()=>[n.getRightHeaderGroups()],o=>o.map(s=>s.headers).flat(),Ne(n.options,Ct)),n.getCenterLeafHeaders=je(()=>[n.getCenterFlatHeaders()],o=>o.filter(s=>{var l;return!((l=s.subHeaders)!=null&&l.length)}),Ne(n.options,Ct)),n.getLeftLeafHeaders=je(()=>[n.getLeftFlatHeaders()],o=>o.filter(s=>{var l;return!((l=s.subHeaders)!=null&&l.length)}),Ne(n.options,Ct)),n.getRightLeafHeaders=je(()=>[n.getRightFlatHeaders()],o=>o.filter(s=>{var l;return!((l=s.subHeaders)!=null&&l.length)}),Ne(n.options,Ct)),n.getLeafHeaders=je(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(o,s,l)=>{var a,d,h,m,g,S;return[...(a=(d=o[0])==null?void 0:d.headers)!=null?a:[],...(h=(m=s[0])==null?void 0:m.headers)!=null?h:[],...(g=(S=l[0])==null?void 0:S.headers)!=null?g:[]].map(w=>w.getLeafHeaders()).flat()},Ne(n.options,Ct))}};function Ji(n,o,s,l){var a,d;let h=0;const m=function(P,j){j===void 0&&(j=1),h=Math.max(h,j),P.filter(z=>z.getIsVisible()).forEach(z=>{var T;(T=z.columns)!=null&&T.length&&m(z.columns,j+1)},0)};m(n);let g=[];const S=(P,j)=>{const z={depth:j,id:[l,`${j}`].filter(Boolean).join("_"),headers:[]},T=[];P.forEach(b=>{const V=[...T].reverse()[0],$=b.column.depth===z.depth;let U,L=!1;if($&&b.column.parent?U=b.column.parent:(U=b.column,L=!0),V&&(V==null?void 0:V.column)===U)V.subHeaders.push(b);else{const X=Wf(s,U,{id:[l,j,U.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:L,placeholderId:L?`${T.filter(I=>I.column===U).length}`:void 0,depth:j,index:T.length});X.subHeaders.push(b),T.push(X)}z.headers.push(b),b.headerGroup=z}),g.push(z),j>0&&S(T,j-1)},w=o.map((P,j)=>Wf(s,P,{depth:h,index:j}));S(w,h-1),g.reverse();const E=P=>P.filter(z=>z.column.getIsVisible()).map(z=>{let T=0,b=0,V=[0];z.subHeaders&&z.subHeaders.length?(V=[],E(z.subHeaders).forEach(U=>{let{colSpan:L,rowSpan:X}=U;T+=L,V.push(X)})):T=1;const $=Math.min(...V);return b=b+$,z.colSpan=T,z.rowSpan=b,{colSpan:T,rowSpan:b}});return E((a=(d=g[0])==null?void 0:d.headers)!=null?a:[]),g}const Fv=(n,o,s,l,a,d,h)=>{let m={id:o,index:l,original:s,depth:a,parentId:h,_valuesCache:{},_uniqueValuesCache:{},getValue:g=>{if(m._valuesCache.hasOwnProperty(g))return m._valuesCache[g];const S=n.getColumn(g);if(S!=null&&S.accessorFn)return m._valuesCache[g]=S.accessorFn(m.original,l),m._valuesCache[g]},getUniqueValues:g=>{if(m._uniqueValuesCache.hasOwnProperty(g))return m._uniqueValuesCache[g];const S=n.getColumn(g);if(S!=null&&S.accessorFn)return S.columnDef.getUniqueValues?(m._uniqueValuesCache[g]=S.columnDef.getUniqueValues(m.original,l),m._uniqueValuesCache[g]):(m._uniqueValuesCache[g]=[m.getValue(g)],m._uniqueValuesCache[g])},renderValue:g=>{var S;return(S=m.getValue(g))!=null?S:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>Nv(m.subRows,g=>g.subRows),getParentRow:()=>m.parentId?n.getRow(m.parentId,!0):void 0,getParentRows:()=>{let g=[],S=m;for(;;){const w=S.getParentRow();if(!w)break;g.push(w),S=w}return g.reverse()},getAllCells:je(()=>[n.getAllLeafColumns()],g=>g.map(S=>_v(n,m,S,S.id)),Ne(n.options,"debugRows")),_getAllCellsByColumnId:je(()=>[m.getAllCells()],g=>g.reduce((S,w)=>(S[w.column.id]=w,S),{}),Ne(n.options,"debugRows"))};for(let g=0;g<n._features.length;g++){const S=n._features[g];S==null||S.createRow==null||S.createRow(m,n)}return m},Ov={createColumn:(n,o)=>{n._getFacetedRowModel=o.options.getFacetedRowModel&&o.options.getFacetedRowModel(o,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():o.getPreFilteredRowModel(),n._getFacetedUniqueValues=o.options.getFacetedUniqueValues&&o.options.getFacetedUniqueValues(o,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=o.options.getFacetedMinMaxValues&&o.options.getFacetedMinMaxValues(o,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},bp=(n,o,s)=>{var l,a;const d=s==null||(l=s.toString())==null?void 0:l.toLowerCase();return!!(!((a=n.getValue(o))==null||(a=a.toString())==null||(a=a.toLowerCase())==null)&&a.includes(d))};bp.autoRemove=n=>fn(n);const Hp=(n,o,s)=>{var l;return!!(!((l=n.getValue(o))==null||(l=l.toString())==null)&&l.includes(s))};Hp.autoRemove=n=>fn(n);const Up=(n,o,s)=>{var l;return((l=n.getValue(o))==null||(l=l.toString())==null?void 0:l.toLowerCase())===(s==null?void 0:s.toLowerCase())};Up.autoRemove=n=>fn(n);const Qp=(n,o,s)=>{var l;return(l=n.getValue(o))==null?void 0:l.includes(s)};Qp.autoRemove=n=>fn(n);const Bp=(n,o,s)=>!s.some(l=>{var a;return!((a=n.getValue(o))!=null&&a.includes(l))});Bp.autoRemove=n=>fn(n)||!(n!=null&&n.length);const qp=(n,o,s)=>s.some(l=>{var a;return(a=n.getValue(o))==null?void 0:a.includes(l)});qp.autoRemove=n=>fn(n)||!(n!=null&&n.length);const Gp=(n,o,s)=>n.getValue(o)===s;Gp.autoRemove=n=>fn(n);const Kp=(n,o,s)=>n.getValue(o)==s;Kp.autoRemove=n=>fn(n);const La=(n,o,s)=>{let[l,a]=s;const d=n.getValue(o);return d>=l&&d<=a};La.resolveFilterValue=n=>{let[o,s]=n,l=typeof o!="number"?parseFloat(o):o,a=typeof s!="number"?parseFloat(s):s,d=o===null||Number.isNaN(l)?-1/0:l,h=s===null||Number.isNaN(a)?1/0:a;if(d>h){const m=d;d=h,h=m}return[d,h]};La.autoRemove=n=>fn(n)||fn(n[0])&&fn(n[1]);const Tn={includesString:bp,includesStringSensitive:Hp,equalsString:Up,arrIncludes:Qp,arrIncludesAll:Bp,arrIncludesSome:qp,equals:Gp,weakEquals:Kp,inNumberRange:La};function fn(n){return n==null||n===""}const Iv={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:Bt("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,o)=>{n.getAutoFilterFn=()=>{const s=o.getCoreRowModel().flatRows[0],l=s==null?void 0:s.getValue(n.id);return typeof l=="string"?Tn.includesString:typeof l=="number"?Tn.inNumberRange:typeof l=="boolean"||l!==null&&typeof l=="object"?Tn.equals:Array.isArray(l)?Tn.arrIncludes:Tn.weakEquals},n.getFilterFn=()=>{var s,l;return il(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(s=(l=o.options.filterFns)==null?void 0:l[n.columnDef.filterFn])!=null?s:Tn[n.columnDef.filterFn]},n.getCanFilter=()=>{var s,l,a;return((s=n.columnDef.enableColumnFilter)!=null?s:!0)&&((l=o.options.enableColumnFilters)!=null?l:!0)&&((a=o.options.enableFilters)!=null?a:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var s;return(s=o.getState().columnFilters)==null||(s=s.find(l=>l.id===n.id))==null?void 0:s.value},n.getFilterIndex=()=>{var s,l;return(s=(l=o.getState().columnFilters)==null?void 0:l.findIndex(a=>a.id===n.id))!=null?s:-1},n.setFilterValue=s=>{o.setColumnFilters(l=>{const a=n.getFilterFn(),d=l==null?void 0:l.find(w=>w.id===n.id),h=gr(s,d?d.value:void 0);if(Yf(a,h,n)){var m;return(m=l==null?void 0:l.filter(w=>w.id!==n.id))!=null?m:[]}const g={id:n.id,value:h};if(d){var S;return(S=l==null?void 0:l.map(w=>w.id===n.id?g:w))!=null?S:[]}return l!=null&&l.length?[...l,g]:[g]})}},createRow:(n,o)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=o=>{const s=n.getAllLeafColumns(),l=a=>{var d;return(d=gr(o,a))==null?void 0:d.filter(h=>{const m=s.find(g=>g.id===h.id);if(m){const g=m.getFilterFn();if(Yf(g,h.value,m))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(l)},n.resetColumnFilters=o=>{var s,l;n.setColumnFilters(o?[]:(s=(l=n.initialState)==null?void 0:l.columnFilters)!=null?s:[])},n.getPreFilteredRowModel=()=>n.getCoreRowModel(),n.getFilteredRowModel=()=>(!n._getFilteredRowModel&&n.options.getFilteredRowModel&&(n._getFilteredRowModel=n.options.getFilteredRowModel(n)),n.options.manualFiltering||!n._getFilteredRowModel?n.getPreFilteredRowModel():n._getFilteredRowModel())}};function Yf(n,o,s){return(n&&n.autoRemove?n.autoRemove(o,s):!1)||typeof o>"u"||typeof o=="string"&&!o}const Dv=(n,o,s)=>s.reduce((l,a)=>{const d=a.getValue(n);return l+(typeof d=="number"?d:0)},0),Tv=(n,o,s)=>{let l;return s.forEach(a=>{const d=a.getValue(n);d!=null&&(l>d||l===void 0&&d>=d)&&(l=d)}),l},Lv=(n,o,s)=>{let l;return s.forEach(a=>{const d=a.getValue(n);d!=null&&(l<d||l===void 0&&d>=d)&&(l=d)}),l},zv=(n,o,s)=>{let l,a;return s.forEach(d=>{const h=d.getValue(n);h!=null&&(l===void 0?h>=h&&(l=a=h):(l>h&&(l=h),a<h&&(a=h)))}),[l,a]},$v=(n,o)=>{let s=0,l=0;if(o.forEach(a=>{let d=a.getValue(n);d!=null&&(d=+d)>=d&&(++s,l+=d)}),s)return l/s},Vv=(n,o)=>{if(!o.length)return;const s=o.map(d=>d.getValue(n));if(!jv(s))return;if(s.length===1)return s[0];const l=Math.floor(s.length/2),a=s.sort((d,h)=>d-h);return s.length%2!==0?a[l]:(a[l-1]+a[l])/2},Av=(n,o)=>Array.from(new Set(o.map(s=>s.getValue(n))).values()),bv=(n,o)=>new Set(o.map(s=>s.getValue(n))).size,Hv=(n,o)=>o.length,Xu={sum:Dv,min:Tv,max:Lv,extent:zv,mean:$v,median:Vv,unique:Av,uniqueCount:bv,count:Hv},Uv={getDefaultColumnDef:()=>({aggregatedCell:n=>{var o,s;return(o=(s=n.getValue())==null||s.toString==null?void 0:s.toString())!=null?o:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:Bt("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,o)=>{n.toggleGrouping=()=>{o.setGrouping(s=>s!=null&&s.includes(n.id)?s.filter(l=>l!==n.id):[...s??[],n.id])},n.getCanGroup=()=>{var s,l;return((s=n.columnDef.enableGrouping)!=null?s:!0)&&((l=o.options.enableGrouping)!=null?l:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var s;return(s=o.getState().grouping)==null?void 0:s.includes(n.id)},n.getGroupedIndex=()=>{var s;return(s=o.getState().grouping)==null?void 0:s.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const s=n.getCanGroup();return()=>{s&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const s=o.getCoreRowModel().flatRows[0],l=s==null?void 0:s.getValue(n.id);if(typeof l=="number")return Xu.sum;if(Object.prototype.toString.call(l)==="[object Date]")return Xu.extent},n.getAggregationFn=()=>{var s,l;if(!n)throw new Error;return il(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(s=(l=o.options.aggregationFns)==null?void 0:l[n.columnDef.aggregationFn])!=null?s:Xu[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=o=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(o),n.resetGrouping=o=>{var s,l;n.setGrouping(o?[]:(s=(l=n.initialState)==null?void 0:l.grouping)!=null?s:[])},n.getPreGroupedRowModel=()=>n.getFilteredRowModel(),n.getGroupedRowModel=()=>(!n._getGroupedRowModel&&n.options.getGroupedRowModel&&(n._getGroupedRowModel=n.options.getGroupedRowModel(n)),n.options.manualGrouping||!n._getGroupedRowModel?n.getPreGroupedRowModel():n._getGroupedRowModel())},createRow:(n,o)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=s=>{if(n._groupingValuesCache.hasOwnProperty(s))return n._groupingValuesCache[s];const l=o.getColumn(s);return l!=null&&l.columnDef.getGroupingValue?(n._groupingValuesCache[s]=l.columnDef.getGroupingValue(n.original),n._groupingValuesCache[s]):n.getValue(s)},n._groupingValuesCache={}},createCell:(n,o,s,l)=>{n.getIsGrouped=()=>o.getIsGrouped()&&o.id===s.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&o.getIsGrouped(),n.getIsAggregated=()=>{var a;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((a=s.subRows)!=null&&a.length)}}};function Qv(n,o,s){if(!(o!=null&&o.length)||!s)return n;const l=n.filter(d=>!o.includes(d.id));return s==="remove"?l:[...o.map(d=>n.find(h=>h.id===d)).filter(Boolean),...l]}const Bv={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:Bt("columnOrder",n)}),createColumn:(n,o)=>{n.getIndex=je(s=>[Cs(o,s)],s=>s.findIndex(l=>l.id===n.id),Ne(o.options,"debugColumns")),n.getIsFirstColumn=s=>{var l;return((l=Cs(o,s)[0])==null?void 0:l.id)===n.id},n.getIsLastColumn=s=>{var l;const a=Cs(o,s);return((l=a[a.length-1])==null?void 0:l.id)===n.id}},createTable:n=>{n.setColumnOrder=o=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(o),n.resetColumnOrder=o=>{var s;n.setColumnOrder(o?[]:(s=n.initialState.columnOrder)!=null?s:[])},n._getOrderColumnsFn=je(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(o,s,l)=>a=>{let d=[];if(!(o!=null&&o.length))d=a;else{const h=[...o],m=[...a];for(;m.length&&h.length;){const g=h.shift(),S=m.findIndex(w=>w.id===g);S>-1&&d.push(m.splice(S,1)[0])}d=[...d,...m]}return Qv(d,s,l)},Ne(n.options,"debugTable"))}},Zu=()=>({left:[],right:[]}),qv={getInitialState:n=>({columnPinning:Zu(),...n}),getDefaultOptions:n=>({onColumnPinningChange:Bt("columnPinning",n)}),createColumn:(n,o)=>{n.pin=s=>{const l=n.getLeafColumns().map(a=>a.id).filter(Boolean);o.setColumnPinning(a=>{var d,h;if(s==="right"){var m,g;return{left:((m=a==null?void 0:a.left)!=null?m:[]).filter(E=>!(l!=null&&l.includes(E))),right:[...((g=a==null?void 0:a.right)!=null?g:[]).filter(E=>!(l!=null&&l.includes(E))),...l]}}if(s==="left"){var S,w;return{left:[...((S=a==null?void 0:a.left)!=null?S:[]).filter(E=>!(l!=null&&l.includes(E))),...l],right:((w=a==null?void 0:a.right)!=null?w:[]).filter(E=>!(l!=null&&l.includes(E)))}}return{left:((d=a==null?void 0:a.left)!=null?d:[]).filter(E=>!(l!=null&&l.includes(E))),right:((h=a==null?void 0:a.right)!=null?h:[]).filter(E=>!(l!=null&&l.includes(E)))}})},n.getCanPin=()=>n.getLeafColumns().some(l=>{var a,d,h;return((a=l.columnDef.enablePinning)!=null?a:!0)&&((d=(h=o.options.enableColumnPinning)!=null?h:o.options.enablePinning)!=null?d:!0)}),n.getIsPinned=()=>{const s=n.getLeafColumns().map(m=>m.id),{left:l,right:a}=o.getState().columnPinning,d=s.some(m=>l==null?void 0:l.includes(m)),h=s.some(m=>a==null?void 0:a.includes(m));return d?"left":h?"right":!1},n.getPinnedIndex=()=>{var s,l;const a=n.getIsPinned();return a?(s=(l=o.getState().columnPinning)==null||(l=l[a])==null?void 0:l.indexOf(n.id))!=null?s:-1:0}},createRow:(n,o)=>{n.getCenterVisibleCells=je(()=>[n._getAllVisibleCells(),o.getState().columnPinning.left,o.getState().columnPinning.right],(s,l,a)=>{const d=[...l??[],...a??[]];return s.filter(h=>!d.includes(h.column.id))},Ne(o.options,"debugRows")),n.getLeftVisibleCells=je(()=>[n._getAllVisibleCells(),o.getState().columnPinning.left],(s,l)=>(l??[]).map(d=>s.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"left"})),Ne(o.options,"debugRows")),n.getRightVisibleCells=je(()=>[n._getAllVisibleCells(),o.getState().columnPinning.right],(s,l)=>(l??[]).map(d=>s.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"right"})),Ne(o.options,"debugRows"))},createTable:n=>{n.setColumnPinning=o=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(o),n.resetColumnPinning=o=>{var s,l;return n.setColumnPinning(o?Zu():(s=(l=n.initialState)==null?void 0:l.columnPinning)!=null?s:Zu())},n.getIsSomeColumnsPinned=o=>{var s;const l=n.getState().columnPinning;if(!o){var a,d;return!!((a=l.left)!=null&&a.length||(d=l.right)!=null&&d.length)}return!!((s=l[o])!=null&&s.length)},n.getLeftLeafColumns=je(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(o,s)=>(s??[]).map(l=>o.find(a=>a.id===l)).filter(Boolean),Ne(n.options,"debugColumns")),n.getRightLeafColumns=je(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(o,s)=>(s??[]).map(l=>o.find(a=>a.id===l)).filter(Boolean),Ne(n.options,"debugColumns")),n.getCenterLeafColumns=je(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,s,l)=>{const a=[...s??[],...l??[]];return o.filter(d=>!a.includes(d.id))},Ne(n.options,"debugColumns"))}};function Gv(n){return n||(typeof document<"u"?document:null)}const Xi={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ea=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Kv={getDefaultColumnDef:()=>Xi,getInitialState:n=>({columnSizing:{},columnSizingInfo:ea(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Bt("columnSizing",n),onColumnSizingInfoChange:Bt("columnSizingInfo",n)}),createColumn:(n,o)=>{n.getSize=()=>{var s,l,a;const d=o.getState().columnSizing[n.id];return Math.min(Math.max((s=n.columnDef.minSize)!=null?s:Xi.minSize,(l=d??n.columnDef.size)!=null?l:Xi.size),(a=n.columnDef.maxSize)!=null?a:Xi.maxSize)},n.getStart=je(s=>[s,Cs(o,s),o.getState().columnSizing],(s,l)=>l.slice(0,n.getIndex(s)).reduce((a,d)=>a+d.getSize(),0),Ne(o.options,"debugColumns")),n.getAfter=je(s=>[s,Cs(o,s),o.getState().columnSizing],(s,l)=>l.slice(n.getIndex(s)+1).reduce((a,d)=>a+d.getSize(),0),Ne(o.options,"debugColumns")),n.resetSize=()=>{o.setColumnSizing(s=>{let{[n.id]:l,...a}=s;return a})},n.getCanResize=()=>{var s,l;return((s=n.columnDef.enableResizing)!=null?s:!0)&&((l=o.options.enableColumnResizing)!=null?l:!0)},n.getIsResizing=()=>o.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,o)=>{n.getSize=()=>{let s=0;const l=a=>{if(a.subHeaders.length)a.subHeaders.forEach(l);else{var d;s+=(d=a.column.getSize())!=null?d:0}};return l(n),s},n.getStart=()=>{if(n.index>0){const s=n.headerGroup.headers[n.index-1];return s.getStart()+s.getSize()}return 0},n.getResizeHandler=s=>{const l=o.getColumn(n.column.id),a=l==null?void 0:l.getCanResize();return d=>{if(!l||!a||(d.persist==null||d.persist(),ta(d)&&d.touches&&d.touches.length>1))return;const h=n.getSize(),m=n?n.getLeafHeaders().map(V=>[V.column.id,V.column.getSize()]):[[l.id,l.getSize()]],g=ta(d)?Math.round(d.touches[0].clientX):d.clientX,S={},w=(V,$)=>{typeof $=="number"&&(o.setColumnSizingInfo(U=>{var L,X;const I=o.options.columnResizeDirection==="rtl"?-1:1,q=($-((L=U==null?void 0:U.startOffset)!=null?L:0))*I,J=Math.max(q/((X=U==null?void 0:U.startSize)!=null?X:0),-.999999);return U.columnSizingStart.forEach(Z=>{let[te,K]=Z;S[te]=Math.round(Math.max(K+K*J,0)*100)/100}),{...U,deltaOffset:q,deltaPercentage:J}}),(o.options.columnResizeMode==="onChange"||V==="end")&&o.setColumnSizing(U=>({...U,...S})))},E=V=>w("move",V),P=V=>{w("end",V),o.setColumnSizingInfo($=>({...$,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},j=Gv(s),z={moveHandler:V=>E(V.clientX),upHandler:V=>{j==null||j.removeEventListener("mousemove",z.moveHandler),j==null||j.removeEventListener("mouseup",z.upHandler),P(V.clientX)}},T={moveHandler:V=>(V.cancelable&&(V.preventDefault(),V.stopPropagation()),E(V.touches[0].clientX),!1),upHandler:V=>{var $;j==null||j.removeEventListener("touchmove",T.moveHandler),j==null||j.removeEventListener("touchend",T.upHandler),V.cancelable&&(V.preventDefault(),V.stopPropagation()),P(($=V.touches[0])==null?void 0:$.clientX)}},b=Wv()?{passive:!1}:!1;ta(d)?(j==null||j.addEventListener("touchmove",T.moveHandler,b),j==null||j.addEventListener("touchend",T.upHandler,b)):(j==null||j.addEventListener("mousemove",z.moveHandler,b),j==null||j.addEventListener("mouseup",z.upHandler,b)),o.setColumnSizingInfo(V=>({...V,startOffset:g,startSize:h,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:l.id}))}}},createTable:n=>{n.setColumnSizing=o=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(o),n.setColumnSizingInfo=o=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(o),n.resetColumnSizing=o=>{var s;n.setColumnSizing(o?{}:(s=n.initialState.columnSizing)!=null?s:{})},n.resetHeaderSizeInfo=o=>{var s;n.setColumnSizingInfo(o?ea():(s=n.initialState.columnSizingInfo)!=null?s:ea())},n.getTotalSize=()=>{var o,s;return(o=(s=n.getHeaderGroups()[0])==null?void 0:s.headers.reduce((l,a)=>l+a.getSize(),0))!=null?o:0},n.getLeftTotalSize=()=>{var o,s;return(o=(s=n.getLeftHeaderGroups()[0])==null?void 0:s.headers.reduce((l,a)=>l+a.getSize(),0))!=null?o:0},n.getCenterTotalSize=()=>{var o,s;return(o=(s=n.getCenterHeaderGroups()[0])==null?void 0:s.headers.reduce((l,a)=>l+a.getSize(),0))!=null?o:0},n.getRightTotalSize=()=>{var o,s;return(o=(s=n.getRightHeaderGroups()[0])==null?void 0:s.headers.reduce((l,a)=>l+a.getSize(),0))!=null?o:0}}};let Zi=null;function Wv(){if(typeof Zi=="boolean")return Zi;let n=!1;try{const o={get passive(){return n=!0,!1}},s=()=>{};window.addEventListener("test",s,o),window.removeEventListener("test",s)}catch{n=!1}return Zi=n,Zi}function ta(n){return n.type==="touchstart"}const Yv={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:Bt("columnVisibility",n)}),createColumn:(n,o)=>{n.toggleVisibility=s=>{n.getCanHide()&&o.setColumnVisibility(l=>({...l,[n.id]:s??!n.getIsVisible()}))},n.getIsVisible=()=>{var s,l;const a=n.columns;return(s=a.length?a.some(d=>d.getIsVisible()):(l=o.getState().columnVisibility)==null?void 0:l[n.id])!=null?s:!0},n.getCanHide=()=>{var s,l;return((s=n.columnDef.enableHiding)!=null?s:!0)&&((l=o.options.enableHiding)!=null?l:!0)},n.getToggleVisibilityHandler=()=>s=>{n.toggleVisibility==null||n.toggleVisibility(s.target.checked)}},createRow:(n,o)=>{n._getAllVisibleCells=je(()=>[n.getAllCells(),o.getState().columnVisibility],s=>s.filter(l=>l.column.getIsVisible()),Ne(o.options,"debugRows")),n.getVisibleCells=je(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(s,l,a)=>[...s,...l,...a],Ne(o.options,"debugRows"))},createTable:n=>{const o=(s,l)=>je(()=>[l(),l().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(d=>d.getIsVisible==null?void 0:d.getIsVisible()),Ne(n.options,"debugColumns"));n.getVisibleFlatColumns=o("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=o("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=o("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=o("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=o("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=s=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(s),n.resetColumnVisibility=s=>{var l;n.setColumnVisibility(s?{}:(l=n.initialState.columnVisibility)!=null?l:{})},n.toggleAllColumnsVisible=s=>{var l;s=(l=s)!=null?l:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((a,d)=>({...a,[d.id]:s||!(d.getCanHide!=null&&d.getCanHide())}),{}))},n.getIsAllColumnsVisible=()=>!n.getAllLeafColumns().some(s=>!(s.getIsVisible!=null&&s.getIsVisible())),n.getIsSomeColumnsVisible=()=>n.getAllLeafColumns().some(s=>s.getIsVisible==null?void 0:s.getIsVisible()),n.getToggleAllColumnsVisibilityHandler=()=>s=>{var l;n.toggleAllColumnsVisible((l=s.target)==null?void 0:l.checked)}}};function Cs(n,o){return o?o==="center"?n.getCenterVisibleLeafColumns():o==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const Jv={createTable:n=>{n._getGlobalFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,"__global__"),n.getGlobalFacetedRowModel=()=>n.options.manualFiltering||!n._getGlobalFacetedRowModel?n.getPreFilteredRowModel():n._getGlobalFacetedRowModel(),n._getGlobalFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,"__global__"),n.getGlobalFacetedUniqueValues=()=>n._getGlobalFacetedUniqueValues?n._getGlobalFacetedUniqueValues():new Map,n._getGlobalFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,"__global__"),n.getGlobalFacetedMinMaxValues=()=>{if(n._getGlobalFacetedMinMaxValues)return n._getGlobalFacetedMinMaxValues()}}},Xv={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:Bt("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:o=>{var s;const l=(s=n.getCoreRowModel().flatRows[0])==null||(s=s._getAllCellsByColumnId()[o.id])==null?void 0:s.getValue();return typeof l=="string"||typeof l=="number"}}),createColumn:(n,o)=>{n.getCanGlobalFilter=()=>{var s,l,a,d;return((s=n.columnDef.enableGlobalFilter)!=null?s:!0)&&((l=o.options.enableGlobalFilter)!=null?l:!0)&&((a=o.options.enableFilters)!=null?a:!0)&&((d=o.options.getColumnCanGlobalFilter==null?void 0:o.options.getColumnCanGlobalFilter(n))!=null?d:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>Tn.includesString,n.getGlobalFilterFn=()=>{var o,s;const{globalFilterFn:l}=n.options;return il(l)?l:l==="auto"?n.getGlobalAutoFilterFn():(o=(s=n.options.filterFns)==null?void 0:s[l])!=null?o:Tn[l]},n.setGlobalFilter=o=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(o)},n.resetGlobalFilter=o=>{n.setGlobalFilter(o?void 0:n.initialState.globalFilter)}}},Zv={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:Bt("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let o=!1,s=!1;n._autoResetExpanded=()=>{var l,a;if(!o){n._queue(()=>{o=!0});return}if((l=(a=n.options.autoResetAll)!=null?a:n.options.autoResetExpanded)!=null?l:!n.options.manualExpanding){if(s)return;s=!0,n._queue(()=>{n.resetExpanded(),s=!1})}},n.setExpanded=l=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(l),n.toggleAllRowsExpanded=l=>{l??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=l=>{var a,d;n.setExpanded(l?{}:(a=(d=n.initialState)==null?void 0:d.expanded)!=null?a:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(l=>l.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>l=>{l.persist==null||l.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const l=n.getState().expanded;return l===!0||Object.values(l).some(Boolean)},n.getIsAllRowsExpanded=()=>{const l=n.getState().expanded;return typeof l=="boolean"?l===!0:!(!Object.keys(l).length||n.getRowModel().flatRows.some(a=>!a.getIsExpanded()))},n.getExpandedDepth=()=>{let l=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(d=>{const h=d.split(".");l=Math.max(l,h.length)}),l},n.getPreExpandedRowModel=()=>n.getSortedRowModel(),n.getExpandedRowModel=()=>(!n._getExpandedRowModel&&n.options.getExpandedRowModel&&(n._getExpandedRowModel=n.options.getExpandedRowModel(n)),n.options.manualExpanding||!n._getExpandedRowModel?n.getPreExpandedRowModel():n._getExpandedRowModel())},createRow:(n,o)=>{n.toggleExpanded=s=>{o.setExpanded(l=>{var a;const d=l===!0?!0:!!(l!=null&&l[n.id]);let h={};if(l===!0?Object.keys(o.getRowModel().rowsById).forEach(m=>{h[m]=!0}):h=l,s=(a=s)!=null?a:!d,!d&&s)return{...h,[n.id]:!0};if(d&&!s){const{[n.id]:m,...g}=h;return g}return l})},n.getIsExpanded=()=>{var s;const l=o.getState().expanded;return!!((s=o.options.getIsRowExpanded==null?void 0:o.options.getIsRowExpanded(n))!=null?s:l===!0||l!=null&&l[n.id])},n.getCanExpand=()=>{var s,l,a;return(s=o.options.getRowCanExpand==null?void 0:o.options.getRowCanExpand(n))!=null?s:((l=o.options.enableExpanding)!=null?l:!0)&&!!((a=n.subRows)!=null&&a.length)},n.getIsAllParentsExpanded=()=>{let s=!0,l=n;for(;s&&l.parentId;)l=o.getRow(l.parentId,!0),s=l.getIsExpanded();return s},n.getToggleExpandedHandler=()=>{const s=n.getCanExpand();return()=>{s&&n.toggleExpanded()}}}},Ca=0,ka=10,na=()=>({pageIndex:Ca,pageSize:ka}),ey={getInitialState:n=>({...n,pagination:{...na(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:Bt("pagination",n)}),createTable:n=>{let o=!1,s=!1;n._autoResetPageIndex=()=>{var l,a;if(!o){n._queue(()=>{o=!0});return}if((l=(a=n.options.autoResetAll)!=null?a:n.options.autoResetPageIndex)!=null?l:!n.options.manualPagination){if(s)return;s=!0,n._queue(()=>{n.resetPageIndex(),s=!1})}},n.setPagination=l=>{const a=d=>gr(l,d);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(a)},n.resetPagination=l=>{var a;n.setPagination(l?na():(a=n.initialState.pagination)!=null?a:na())},n.setPageIndex=l=>{n.setPagination(a=>{let d=gr(l,a.pageIndex);const h=typeof n.options.pageCount>"u"||n.options.pageCount===-1?Number.MAX_SAFE_INTEGER:n.options.pageCount-1;return d=Math.max(0,Math.min(d,h)),{...a,pageIndex:d}})},n.resetPageIndex=l=>{var a,d;n.setPageIndex(l?Ca:(a=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageIndex)!=null?a:Ca)},n.resetPageSize=l=>{var a,d;n.setPageSize(l?ka:(a=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageSize)!=null?a:ka)},n.setPageSize=l=>{n.setPagination(a=>{const d=Math.max(1,gr(l,a.pageSize)),h=a.pageSize*a.pageIndex,m=Math.floor(h/d);return{...a,pageIndex:m,pageSize:d}})},n.setPageCount=l=>n.setPagination(a=>{var d;let h=gr(l,(d=n.options.pageCount)!=null?d:-1);return typeof h=="number"&&(h=Math.max(-1,h)),{...a,pageCount:h}}),n.getPageOptions=je(()=>[n.getPageCount()],l=>{let a=[];return l&&l>0&&(a=[...new Array(l)].fill(null).map((d,h)=>h)),a},Ne(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:l}=n.getState().pagination,a=n.getPageCount();return a===-1?!0:a===0?!1:l<a-1},n.previousPage=()=>n.setPageIndex(l=>l-1),n.nextPage=()=>n.setPageIndex(l=>l+1),n.firstPage=()=>n.setPageIndex(0),n.lastPage=()=>n.setPageIndex(n.getPageCount()-1),n.getPrePaginationRowModel=()=>n.getExpandedRowModel(),n.getPaginationRowModel=()=>(!n._getPaginationRowModel&&n.options.getPaginationRowModel&&(n._getPaginationRowModel=n.options.getPaginationRowModel(n)),n.options.manualPagination||!n._getPaginationRowModel?n.getPrePaginationRowModel():n._getPaginationRowModel()),n.getPageCount=()=>{var l;return(l=n.options.pageCount)!=null?l:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var l;return(l=n.options.rowCount)!=null?l:n.getPrePaginationRowModel().rows.length}}},ra=()=>({top:[],bottom:[]}),ty={getInitialState:n=>({rowPinning:ra(),...n}),getDefaultOptions:n=>({onRowPinningChange:Bt("rowPinning",n)}),createRow:(n,o)=>{n.pin=(s,l,a)=>{const d=l?n.getLeafRows().map(g=>{let{id:S}=g;return S}):[],h=a?n.getParentRows().map(g=>{let{id:S}=g;return S}):[],m=new Set([...h,n.id,...d]);o.setRowPinning(g=>{var S,w;if(s==="bottom"){var E,P;return{top:((E=g==null?void 0:g.top)!=null?E:[]).filter(T=>!(m!=null&&m.has(T))),bottom:[...((P=g==null?void 0:g.bottom)!=null?P:[]).filter(T=>!(m!=null&&m.has(T))),...Array.from(m)]}}if(s==="top"){var j,z;return{top:[...((j=g==null?void 0:g.top)!=null?j:[]).filter(T=>!(m!=null&&m.has(T))),...Array.from(m)],bottom:((z=g==null?void 0:g.bottom)!=null?z:[]).filter(T=>!(m!=null&&m.has(T)))}}return{top:((S=g==null?void 0:g.top)!=null?S:[]).filter(T=>!(m!=null&&m.has(T))),bottom:((w=g==null?void 0:g.bottom)!=null?w:[]).filter(T=>!(m!=null&&m.has(T)))}})},n.getCanPin=()=>{var s;const{enableRowPinning:l,enablePinning:a}=o.options;return typeof l=="function"?l(n):(s=l??a)!=null?s:!0},n.getIsPinned=()=>{const s=[n.id],{top:l,bottom:a}=o.getState().rowPinning,d=s.some(m=>l==null?void 0:l.includes(m)),h=s.some(m=>a==null?void 0:a.includes(m));return d?"top":h?"bottom":!1},n.getPinnedIndex=()=>{var s,l;const a=n.getIsPinned();if(!a)return-1;const d=(s=a==="top"?o.getTopRows():o.getBottomRows())==null?void 0:s.map(h=>{let{id:m}=h;return m});return(l=d==null?void 0:d.indexOf(n.id))!=null?l:-1}},createTable:n=>{n.setRowPinning=o=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(o),n.resetRowPinning=o=>{var s,l;return n.setRowPinning(o?ra():(s=(l=n.initialState)==null?void 0:l.rowPinning)!=null?s:ra())},n.getIsSomeRowsPinned=o=>{var s;const l=n.getState().rowPinning;if(!o){var a,d;return!!((a=l.top)!=null&&a.length||(d=l.bottom)!=null&&d.length)}return!!((s=l[o])!=null&&s.length)},n._getPinnedRows=(o,s,l)=>{var a;return((a=n.options.keepPinnedRows)==null||a?(s??[]).map(h=>{const m=n.getRow(h,!0);return m.getIsAllParentsExpanded()?m:null}):(s??[]).map(h=>o.find(m=>m.id===h))).filter(Boolean).map(h=>({...h,position:l}))},n.getTopRows=je(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(o,s)=>n._getPinnedRows(o,s,"top"),Ne(n.options,"debugRows")),n.getBottomRows=je(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(o,s)=>n._getPinnedRows(o,s,"bottom"),Ne(n.options,"debugRows")),n.getCenterRows=je(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(o,s,l)=>{const a=new Set([...s??[],...l??[]]);return o.filter(d=>!a.has(d.id))},Ne(n.options,"debugRows"))}},ny={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:Bt("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=o=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(o),n.resetRowSelection=o=>{var s;return n.setRowSelection(o?{}:(s=n.initialState.rowSelection)!=null?s:{})},n.toggleAllRowsSelected=o=>{n.setRowSelection(s=>{o=typeof o<"u"?o:!n.getIsAllRowsSelected();const l={...s},a=n.getPreGroupedRowModel().flatRows;return o?a.forEach(d=>{d.getCanSelect()&&(l[d.id]=!0)}):a.forEach(d=>{delete l[d.id]}),l})},n.toggleAllPageRowsSelected=o=>n.setRowSelection(s=>{const l=typeof o<"u"?o:!n.getIsAllPageRowsSelected(),a={...s};return n.getRowModel().rows.forEach(d=>{Ra(a,d.id,l,!0,n)}),a}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=je(()=>[n.getState().rowSelection,n.getCoreRowModel()],(o,s)=>Object.keys(o).length?oa(n,s):{rows:[],flatRows:[],rowsById:{}},Ne(n.options,"debugTable")),n.getFilteredSelectedRowModel=je(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(o,s)=>Object.keys(o).length?oa(n,s):{rows:[],flatRows:[],rowsById:{}},Ne(n.options,"debugTable")),n.getGroupedSelectedRowModel=je(()=>[n.getState().rowSelection,n.getSortedRowModel()],(o,s)=>Object.keys(o).length?oa(n,s):{rows:[],flatRows:[],rowsById:{}},Ne(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const o=n.getFilteredRowModel().flatRows,{rowSelection:s}=n.getState();let l=!!(o.length&&Object.keys(s).length);return l&&o.some(a=>a.getCanSelect()&&!s[a.id])&&(l=!1),l},n.getIsAllPageRowsSelected=()=>{const o=n.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:s}=n.getState();let l=!!o.length;return l&&o.some(a=>!s[a.id])&&(l=!1),l},n.getIsSomeRowsSelected=()=>{var o;const s=Object.keys((o=n.getState().rowSelection)!=null?o:{}).length;return s>0&&s<n.getFilteredRowModel().flatRows.length},n.getIsSomePageRowsSelected=()=>{const o=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:o.filter(s=>s.getCanSelect()).some(s=>s.getIsSelected()||s.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>o=>{n.toggleAllRowsSelected(o.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>o=>{n.toggleAllPageRowsSelected(o.target.checked)}},createRow:(n,o)=>{n.toggleSelected=(s,l)=>{const a=n.getIsSelected();o.setRowSelection(d=>{var h;if(s=typeof s<"u"?s:!a,n.getCanSelect()&&a===s)return d;const m={...d};return Ra(m,n.id,s,(h=l==null?void 0:l.selectChildren)!=null?h:!0,o),m})},n.getIsSelected=()=>{const{rowSelection:s}=o.getState();return za(n,s)},n.getIsSomeSelected=()=>{const{rowSelection:s}=o.getState();return Ea(n,s)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:s}=o.getState();return Ea(n,s)==="all"},n.getCanSelect=()=>{var s;return typeof o.options.enableRowSelection=="function"?o.options.enableRowSelection(n):(s=o.options.enableRowSelection)!=null?s:!0},n.getCanSelectSubRows=()=>{var s;return typeof o.options.enableSubRowSelection=="function"?o.options.enableSubRowSelection(n):(s=o.options.enableSubRowSelection)!=null?s:!0},n.getCanMultiSelect=()=>{var s;return typeof o.options.enableMultiRowSelection=="function"?o.options.enableMultiRowSelection(n):(s=o.options.enableMultiRowSelection)!=null?s:!0},n.getToggleSelectedHandler=()=>{const s=n.getCanSelect();return l=>{var a;s&&n.toggleSelected((a=l.target)==null?void 0:a.checked)}}}},Ra=(n,o,s,l,a)=>{var d;const h=a.getRow(o,!0);s?(h.getCanMultiSelect()||Object.keys(n).forEach(m=>delete n[m]),h.getCanSelect()&&(n[o]=!0)):delete n[o],l&&(d=h.subRows)!=null&&d.length&&h.getCanSelectSubRows()&&h.subRows.forEach(m=>Ra(n,m.id,s,l,a))};function oa(n,o){const s=n.getState().rowSelection,l=[],a={},d=function(h,m){return h.map(g=>{var S;const w=za(g,s);if(w&&(l.push(g),a[g.id]=g),(S=g.subRows)!=null&&S.length&&(g={...g,subRows:d(g.subRows)}),w)return g}).filter(Boolean)};return{rows:d(o.rows),flatRows:l,rowsById:a}}function za(n,o){var s;return(s=o[n.id])!=null?s:!1}function Ea(n,o,s){var l;if(!((l=n.subRows)!=null&&l.length))return!1;let a=!0,d=!1;return n.subRows.forEach(h=>{if(!(d&&!a)&&(h.getCanSelect()&&(za(h,o)?d=!0:a=!1),h.subRows&&h.subRows.length)){const m=Ea(h,o);m==="all"?d=!0:(m==="some"&&(d=!0),a=!1)}}),a?"all":d?"some":!1}const ja=/([0-9]+)/gm,ry=(n,o,s)=>Wp(yr(n.getValue(s)).toLowerCase(),yr(o.getValue(s)).toLowerCase()),oy=(n,o,s)=>Wp(yr(n.getValue(s)),yr(o.getValue(s))),sy=(n,o,s)=>$a(yr(n.getValue(s)).toLowerCase(),yr(o.getValue(s)).toLowerCase()),iy=(n,o,s)=>$a(yr(n.getValue(s)),yr(o.getValue(s))),ly=(n,o,s)=>{const l=n.getValue(s),a=o.getValue(s);return l>a?1:l<a?-1:0},uy=(n,o,s)=>$a(n.getValue(s),o.getValue(s));function $a(n,o){return n===o?0:n>o?1:-1}function yr(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function Wp(n,o){const s=n.split(ja).filter(Boolean),l=o.split(ja).filter(Boolean);for(;s.length&&l.length;){const a=s.shift(),d=l.shift(),h=parseInt(a,10),m=parseInt(d,10),g=[h,m].sort();if(isNaN(g[0])){if(a>d)return 1;if(d>a)return-1;continue}if(isNaN(g[1]))return isNaN(h)?-1:1;if(h>m)return 1;if(m>h)return-1}return s.length-l.length}const ys={alphanumeric:ry,alphanumericCaseSensitive:oy,text:sy,textCaseSensitive:iy,datetime:ly,basic:uy},ay={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:Bt("sorting",n),isMultiSortEvent:o=>o.shiftKey}),createColumn:(n,o)=>{n.getAutoSortingFn=()=>{const s=o.getFilteredRowModel().flatRows.slice(10);let l=!1;for(const a of s){const d=a==null?void 0:a.getValue(n.id);if(Object.prototype.toString.call(d)==="[object Date]")return ys.datetime;if(typeof d=="string"&&(l=!0,d.split(ja).length>1))return ys.alphanumeric}return l?ys.text:ys.basic},n.getAutoSortDir=()=>{const s=o.getFilteredRowModel().flatRows[0];return typeof(s==null?void 0:s.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var s,l;if(!n)throw new Error;return il(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(s=(l=o.options.sortingFns)==null?void 0:l[n.columnDef.sortingFn])!=null?s:ys[n.columnDef.sortingFn]},n.toggleSorting=(s,l)=>{const a=n.getNextSortingOrder(),d=typeof s<"u"&&s!==null;o.setSorting(h=>{const m=h==null?void 0:h.find(j=>j.id===n.id),g=h==null?void 0:h.findIndex(j=>j.id===n.id);let S=[],w,E=d?s:a==="desc";if(h!=null&&h.length&&n.getCanMultiSort()&&l?m?w="toggle":w="add":h!=null&&h.length&&g!==h.length-1?w="replace":m?w="toggle":w="replace",w==="toggle"&&(d||a||(w="remove")),w==="add"){var P;S=[...h,{id:n.id,desc:E}],S.splice(0,S.length-((P=o.options.maxMultiSortColCount)!=null?P:Number.MAX_SAFE_INTEGER))}else w==="toggle"?S=h.map(j=>j.id===n.id?{...j,desc:E}:j):w==="remove"?S=h.filter(j=>j.id!==n.id):S=[{id:n.id,desc:E}];return S})},n.getFirstSortDir=()=>{var s,l;return((s=(l=n.columnDef.sortDescFirst)!=null?l:o.options.sortDescFirst)!=null?s:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=s=>{var l,a;const d=n.getFirstSortDir(),h=n.getIsSorted();return h?h!==d&&((l=o.options.enableSortingRemoval)==null||l)&&(!(s&&(a=o.options.enableMultiRemove)!=null)||a)?!1:h==="desc"?"asc":"desc":d},n.getCanSort=()=>{var s,l;return((s=n.columnDef.enableSorting)!=null?s:!0)&&((l=o.options.enableSorting)!=null?l:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var s,l;return(s=(l=n.columnDef.enableMultiSort)!=null?l:o.options.enableMultiSort)!=null?s:!!n.accessorFn},n.getIsSorted=()=>{var s;const l=(s=o.getState().sorting)==null?void 0:s.find(a=>a.id===n.id);return l?l.desc?"desc":"asc":!1},n.getSortIndex=()=>{var s,l;return(s=(l=o.getState().sorting)==null?void 0:l.findIndex(a=>a.id===n.id))!=null?s:-1},n.clearSorting=()=>{o.setSorting(s=>s!=null&&s.length?s.filter(l=>l.id!==n.id):[])},n.getToggleSortingHandler=()=>{const s=n.getCanSort();return l=>{s&&(l.persist==null||l.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?o.options.isMultiSortEvent==null?void 0:o.options.isMultiSortEvent(l):!1))}}},createTable:n=>{n.setSorting=o=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(o),n.resetSorting=o=>{var s,l;n.setSorting(o?[]:(s=(l=n.initialState)==null?void 0:l.sorting)!=null?s:[])},n.getPreSortedRowModel=()=>n.getGroupedRowModel(),n.getSortedRowModel=()=>(!n._getSortedRowModel&&n.options.getSortedRowModel&&(n._getSortedRowModel=n.options.getSortedRowModel(n)),n.options.manualSorting||!n._getSortedRowModel?n.getPreSortedRowModel():n._getSortedRowModel())}},cy=[Mv,Yv,Bv,qv,Ov,Iv,Jv,Xv,ay,Uv,Zv,ey,ty,ny,Kv];function dy(n){var o,s;const l=[...cy,...(o=n._features)!=null?o:[]];let a={_features:l};const d=a._features.reduce((P,j)=>Object.assign(P,j.getDefaultOptions==null?void 0:j.getDefaultOptions(a)),{}),h=P=>a.options.mergeOptions?a.options.mergeOptions(d,P):{...d,...P};let g={...{},...(s=n.initialState)!=null?s:{}};a._features.forEach(P=>{var j;g=(j=P.getInitialState==null?void 0:P.getInitialState(g))!=null?j:g});const S=[];let w=!1;const E={_features:l,options:{...d,...n},initialState:g,_queue:P=>{S.push(P),w||(w=!0,Promise.resolve().then(()=>{for(;S.length;)S.shift()();w=!1}).catch(j=>setTimeout(()=>{throw j})))},reset:()=>{a.setState(a.initialState)},setOptions:P=>{const j=gr(P,a.options);a.options=h(j)},getState:()=>a.options.state,setState:P=>{a.options.onStateChange==null||a.options.onStateChange(P)},_getRowId:(P,j,z)=>{var T;return(T=a.options.getRowId==null?void 0:a.options.getRowId(P,j,z))!=null?T:`${z?[z.id,j].join("."):j}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(P,j)=>{let z=(j?a.getPrePaginationRowModel():a.getRowModel()).rowsById[P];if(!z&&(z=a.getCoreRowModel().rowsById[P],!z))throw new Error;return z},_getDefaultColumnDef:je(()=>[a.options.defaultColumn],P=>{var j;return P=(j=P)!=null?j:{},{header:z=>{const T=z.header.column.columnDef;return T.accessorKey?T.accessorKey:T.accessorFn?T.id:null},cell:z=>{var T,b;return(T=(b=z.renderValue())==null||b.toString==null?void 0:b.toString())!=null?T:null},...a._features.reduce((z,T)=>Object.assign(z,T.getDefaultColumnDef==null?void 0:T.getDefaultColumnDef()),{}),...P}},Ne(n,"debugColumns")),_getColumnDefs:()=>a.options.columns,getAllColumns:je(()=>[a._getColumnDefs()],P=>{const j=function(z,T,b){return b===void 0&&(b=0),z.map(V=>{const $=Pv(a,V,b,T),U=V;return $.columns=U.columns?j(U.columns,$,b+1):[],$})};return j(P)},Ne(n,"debugColumns")),getAllFlatColumns:je(()=>[a.getAllColumns()],P=>P.flatMap(j=>j.getFlatColumns()),Ne(n,"debugColumns")),_getAllFlatColumnsById:je(()=>[a.getAllFlatColumns()],P=>P.reduce((j,z)=>(j[z.id]=z,j),{}),Ne(n,"debugColumns")),getAllLeafColumns:je(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(P,j)=>{let z=P.flatMap(T=>T.getLeafColumns());return j(z)},Ne(n,"debugColumns")),getColumn:P=>a._getAllFlatColumnsById()[P]};Object.assign(a,E);for(let P=0;P<a._features.length;P++){const j=a._features[P];j==null||j.createTable==null||j.createTable(a)}return a}function fy(){return n=>je(()=>[n.options.data],o=>{const s={rows:[],flatRows:[],rowsById:{}},l=function(a,d,h){d===void 0&&(d=0);const m=[];for(let S=0;S<a.length;S++){const w=Fv(n,n._getRowId(a[S],S,h),a[S],S,d,void 0,h==null?void 0:h.id);if(s.flatRows.push(w),s.rowsById[w.id]=w,m.push(w),n.options.getSubRows){var g;w.originalSubRows=n.options.getSubRows(a[S],S),(g=w.originalSubRows)!=null&&g.length&&(w.subRows=l(w.originalSubRows,d+1,w))}}return m};return s.rows=l(o),s},Ne(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function py(n){const o=[],s=l=>{var a;o.push(l),(a=l.subRows)!=null&&a.length&&l.getIsExpanded()&&l.subRows.forEach(s)};return n.rows.forEach(s),{rows:o,flatRows:n.flatRows,rowsById:n.rowsById}}function hy(n){return o=>je(()=>[o.getState().pagination,o.getPrePaginationRowModel(),o.options.paginateExpandedRows?void 0:o.getState().expanded],(s,l)=>{if(!l.rows.length)return l;const{pageSize:a,pageIndex:d}=s;let{rows:h,flatRows:m,rowsById:g}=l;const S=a*d,w=S+a;h=h.slice(S,w);let E;o.options.paginateExpandedRows?E={rows:h,flatRows:m,rowsById:g}:E=py({rows:h,flatRows:m,rowsById:g}),E.flatRows=[];const P=j=>{E.flatRows.push(j),j.subRows.length&&j.subRows.forEach(P)};return E.rows.forEach(P),E},Ne(o.options,"debugTable"))}function gy(){return n=>je(()=>[n.getState().sorting,n.getPreSortedRowModel()],(o,s)=>{if(!s.rows.length||!(o!=null&&o.length))return s;const l=n.getState().sorting,a=[],d=l.filter(g=>{var S;return(S=n.getColumn(g.id))==null?void 0:S.getCanSort()}),h={};d.forEach(g=>{const S=n.getColumn(g.id);S&&(h[g.id]={sortUndefined:S.columnDef.sortUndefined,invertSorting:S.columnDef.invertSorting,sortingFn:S.getSortingFn()})});const m=g=>{const S=g.map(w=>({...w}));return S.sort((w,E)=>{for(let j=0;j<d.length;j+=1){var P;const z=d[j],T=h[z.id],b=T.sortUndefined,V=(P=z==null?void 0:z.desc)!=null?P:!1;let $=0;if(b){const U=w.getValue(z.id),L=E.getValue(z.id),X=U===void 0,I=L===void 0;if(X||I){if(b==="first")return X?-1:1;if(b==="last")return X?1:-1;$=X&&I?0:X?b:-b}}if($===0&&($=T.sortingFn(w,E,z.id)),$!==0)return V&&($*=-1),T.invertSorting&&($*=-1),$}return w.index-E.index}),S.forEach(w=>{var E;a.push(w),(E=w.subRows)!=null&&E.length&&(w.subRows=m(w.subRows))}),S};return{rows:m(s.rows),flatRows:a,rowsById:s.rowsById}},Ne(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
218
- * react-table
219
- *
220
- * Copyright (c) TanStack
221
- *
222
- * This source code is licensed under the MIT license found in the
223
- * LICENSE.md file in the root directory of this source tree.
224
- *
225
- * @license MIT
226
- */function Jf(n,o){return n?my(n)?C.createElement(n,o):n:null}function my(n){return vy(n)||typeof n=="function"||yy(n)}function vy(n){return typeof n=="function"&&(()=>{const o=Object.getPrototypeOf(n);return o.prototype&&o.prototype.isReactComponent})()}function yy(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function wy(n){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[s]=C.useState(()=>({current:dy(o)})),[l,a]=C.useState(()=>s.current.initialState);return s.current.setOptions(d=>({...d,...n,state:{...l,...n.state},onStateChange:h=>{a(h),n.onStateChange==null||n.onStateChange(h)}})),s.current}const Ds=C.createContext(void 0);function Yp({children:n,open:o,onOpenChange:s}){const[l,a]=C.useState(!1),d=o!==void 0?o:l,h=C.useCallback(m=>{o===void 0&&a(m),s==null||s(m)},[o,s]);return C.useEffect(()=>{if(!d)return;const m=S=>{S.target.closest("[data-dropdown-menu]")||h(!1)},g=S=>{S.key==="Escape"&&h(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",g)}},[d,h]),f.jsx(Ds.Provider,{value:{open:d,setOpen:h},children:f.jsx("div",{className:"relative","data-dropdown-menu":!0,children:n})})}function Jp({children:n,className:o,asChild:s,...l}){const a=C.useContext(Ds);if(!a)throw new Error("DropdownMenuTrigger must be used within DropdownMenu");const d=()=>{a.setOpen(!a.open)};return s&&C.isValidElement(n)?C.cloneElement(n,{onClick:h=>{d(),n.props.onClick&&n.props.onClick(h)},className:be(n.props.className,o)}):f.jsx("button",{type:"button",className:be("outline-none",o),onClick:d,...l,children:n})}function Xp({children:n,className:o,align:s="end",...l}){const a=C.useContext(Ds);if(!a)throw new Error("DropdownMenuContent must be used within DropdownMenu");return a.open?f.jsx("div",{className:be("absolute z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md","mt-1",s==="end"?"right-0":"left-0",o),...l,children:n}):null}function Na({children:n,className:o,variant:s="default",...l}){const a=C.useContext(Ds);if(!a)throw new Error("DropdownMenuItem must be used within DropdownMenu");return f.jsx("button",{type:"button",className:be("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s==="destructive"&&"text-destructive focus:bg-destructive/10 focus:text-destructive",o),onClick:d=>{var h;(h=l.onClick)==null||h.call(l,d),a.setOpen(!1)},...l,children:n})}function Xf({className:n,...o}){return f.jsx("div",{className:be("my-1 h-px bg-border",n),...o})}function xy({children:n,className:o,checked:s,onCheckedChange:l,...a}){if(!C.useContext(Ds))throw new Error("DropdownMenuCheckboxItem must be used within DropdownMenu");return f.jsxs("button",{type:"button",className:be("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),onClick:h=>{var m;h.stopPropagation(),l==null||l(!s),(m=a.onClick)==null||m.call(a,h)},...a,children:[f.jsx("span",{className:be("mr-2 flex h-4 w-4 items-center justify-center flex-shrink-0"),children:s&&f.jsx("svg",{className:"h-3 w-3",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),n]})}const Va="datapeek_table_config",Zp="datapeek_column_order",eh="datapeek_column_visibility",th="datapeek_column_sorting";function ll(n,o,s){try{const l=`${Va}_${n}_${o}`;localStorage.setItem(l,JSON.stringify(s))}catch{}}function Sy(n,o){try{const s=`${Zp}_${n}_${o}`,l=`${eh}_${n}_${o}`,a=`${th}_${n}_${o}`,d=localStorage.getItem(s),h=localStorage.getItem(l),m=localStorage.getItem(a);if(d||h||m){const g={};if(d)try{g.columnOrder=JSON.parse(d)}catch{}if(h)try{g.columnVisibility=JSON.parse(h)}catch{}if(m)try{g.sorting=JSON.parse(m)}catch{}return Object.keys(g).length>0&&(ll(n,o,g),localStorage.removeItem(s),localStorage.removeItem(l),localStorage.removeItem(a)),g}}catch{}return null}function Io(n,o){try{const s=`${Va}_${n}_${o}`,l=localStorage.getItem(s);if(l)return JSON.parse(l);const a=Sy(n,o);return a||{}}catch{return{}}}function Cy(n,o,s){return Io(n,o).columnOrder||s}function ky(n,o,s){const l=Io(n,o);l.columnOrder=s,ll(n,o,l)}function Ry(n,o){return Io(n,o).sorting||[]}function Zf(n,o,s){const l=Io(n,o);l.sorting=s,ll(n,o,l)}function Ey(n,o,s){const a=Io(n,o).columnVisibility;if(a){const h={};return s.forEach(m=>{h[m]=a[m]!==!1}),h}const d={};return s.forEach(h=>{d[h]=!0}),d}function jy(n,o,s){const l=Io(n,o);l.columnVisibility=s,ll(n,o,l)}function Ny({schema:n,table:o,onQueryChange:s,onCreateQuery:l}){const[a,d]=C.useState(1),[h,m]=C.useState(100),[g,S]=C.useState([]),[w,E]=C.useState([]),[P,j]=C.useState({}),[z,T]=C.useState([]),[b,V]=C.useState({}),[$,U]=C.useState(!1),[L,X]=C.useState(null),I=C.useRef({}),[q,J]=C.useState(null),[Z,te]=C.useState(null);C.useRef(null);const[K,Ie]=C.useState(null),[Le,ze]=C.useState(!1),ie=C.useRef(null),[Re,_e]=C.useState(null),[Y,oe]=C.useState(null),[D,y]=C.useState(36),N=C.useRef({}),G=C.useRef(null),fe=C.useRef(null);C.useEffect(()=>{try{const M=`${Zp}_${n}_${o}`,H=`${eh}_${n}_${o}`,re=`${th}_${n}_${o}`,Oe=`${Va}_${n}_${o}`;localStorage.getItem(Oe)&&(localStorage.removeItem(M),localStorage.removeItem(H),localStorage.removeItem(re))}catch{}},[n,o]),C.useEffect(()=>{d(1),Ie(null),_e(null),oe(null),T([]),V({}),X(null),Object.values(I.current).forEach(clearTimeout),I.current={},G.current&&(clearTimeout(G.current),G.current=null)},[n,o]),C.useEffect(()=>{const M=new Set(z.map(H=>H.id));V(H=>{const re={...H};return Object.keys(re).forEach(Oe=>{M.has(Oe)||delete re[Oe]}),re})},[z]),C.useEffect(()=>{const M=Ry(n,o);M.length>0?S(M):S([])},[n,o]),C.useEffect(()=>{if(g.length>0){const M=setTimeout(()=>{Zf(n,o,g)},100);return()=>clearTimeout(M)}else{const M=setTimeout(()=>{Zf(n,o,[])},100);return()=>clearTimeout(M)}},[g,n,o]),C.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]);const ae=g.length>0?g[0].id:void 0,Se=g.length>0?g[0].desc?"desc":"asc":void 0,Fe=C.useMemo(()=>{const M={};return z.forEach(H=>{H.value&&typeof H.value=="string"&&H.value.trim()&&(M[H.id]=H.value.trim())}),console.log("Column filters:",z),console.log("Converted filters for API:",M),M},[z]);C.useEffect(()=>(Object.values(I.current).forEach(clearTimeout),I.current={},Object.entries(b).forEach(([M,H])=>{I.current[M]=setTimeout(()=>{T(re=>{const Oe=re.filter(me=>me.id!==M);return H.trim()?[...Oe,{id:M,value:H.trim()}]:Oe})},500)}),()=>{Object.values(I.current).forEach(clearTimeout),I.current={}}),[b]),C.useEffect(()=>{Object.keys(Fe).length>0&&a!==1&&d(1)},[JSON.stringify(Fe)]);const{data:A,isLoading:Ge,error:it,isFetching:ne}=sl({queryKey:["table-data",n,o,a,h,ae,Se,Fe],queryFn:()=>Qt.getTableData(n,o,a,h,ae,Se,Fe),enabled:!!n&&!!o,keepPreviousData:!0});C.useEffect(()=>{A!=null&&A.query&&s&&s(A.query)},[A==null?void 0:A.query,s]);const ce=C.useMemo(()=>!(A!=null&&A.data)||A.data.length===0?[]:Object.keys(A.data[0]),[A==null?void 0:A.data]);C.useEffect(()=>{if(ce.length>0){const M=Ey(n,o,ce);j(M)}},[ce.join(","),n,o]),C.useEffect(()=>{if(Object.keys(P).length>0&&ce.length>0){const M=setTimeout(()=>{jy(n,o,P)},100);return()=>clearTimeout(M)}},[P,n,o]),C.useEffect(()=>{if(ce.length>0){const M=Cy(n,o,ce);if(JSON.stringify(M)===JSON.stringify(ce))JSON.stringify(w)!==JSON.stringify(ce)&&E(ce);else{const re=new Set(M),Oe=M.filter(ye=>ce.includes(ye)),me=ce.filter(ye=>!re.has(ye)),pe=[...Oe,...me];JSON.stringify(pe)!==JSON.stringify(w)&&E(pe)}}},[ce.join(","),n,o]),C.useEffect(()=>{if(w.length>0&&ce.length>0){const M=setTimeout(()=>{ky(n,o,w)},100);return()=>clearTimeout(M)}},[w.join(","),n,o]);const Pe=C.useMemo(()=>{if(!(A!=null&&A.data)||A.data.length===0)return[];const M=Object.keys(A.data[0]);return(w.length>0&&w.length===M.length?w:M).map(re=>{const Oe=z.find(pe=>pe.id===re),me=!!(Oe!=null&&Oe.value);return{id:re,accessorKey:re,header:({column:pe})=>{const ye=pe.getIsSorted(),ge=ye==="asc"?"asc":ye==="desc"?"desc":null;return f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("span",{children:re}),me&&f.jsx(Qf,{className:"h-3 w-3 text-primary shrink-0"}),ge&&f.jsx("span",{className:"inline-flex items-center shrink-0",children:ge==="asc"?f.jsx(bf,{className:"h-3.5 w-3.5 text-primary"}):f.jsx(Af,{className:"h-3.5 w-3.5 text-primary"})})]})},cell:({getValue:pe})=>{const ye=pe();if(ye==null)return f.jsx("span",{className:"text-muted-foreground italic",children:"NULL"});const ge=String(ye);return f.jsx("span",{className:"font-mono text-xs truncate max-w-md",children:ge})}}})},[A==null?void 0:A.data,w,q,Z,z]),we=wy({data:(A==null?void 0:A.data)||[],columns:Pe,getCoreRowModel:fy(),getSortedRowModel:gy(),getPaginationRowModel:hy(),onSortingChange:S,onColumnOrderChange:E,onColumnVisibilityChange:j,onColumnFiltersChange:T,state:{sorting:g,columnOrder:w,columnVisibility:P,columnFilters:z},manualPagination:!0,pageCount:(A==null?void 0:A.pagination.totalPages)||0}),He=C.useMemo(()=>Pe.map(M=>M.id||M.accessorKey).filter(M=>!!M),[Pe]),$t=C.useCallback(()=>{const M=we.getVisibleLeafColumns().map(me=>me.id).filter(me=>!!me),H=He,re=M.length===H.length?"*":M.map(me=>`[${me}]`).join(", ");let Oe=`SELECT TOP ${h} ${re}
227
- FROM [${n}].[${o}]`;return ae&&Se&&(Oe+=`
228
- ORDER BY [${ae}] ${Se.toUpperCase()}`),Oe},[n,o,we,He,h,ae,Se]),ht=C.useCallback(()=>{if(!l)return;const M=$t();l(M)},[$t,l]),nt=C.useMemo(()=>w.length===0||He.length===0?He:w.filter(M=>He.includes(M)).concat(He.filter(M=>!w.includes(M))),[He,w]),xe=C.useMemo(()=>nt.filter(M=>{const H=we.getColumn(M);return H==null?void 0:H.getIsVisible()}),[nt,we]),tn=C.useCallback((M,H)=>{if(!K)return!1;const re=K.selectionType||"cell",Oe=xe.indexOf(H);if(re==="row"){const me=Math.min(K.startRow,K.endRow),pe=Math.max(K.startRow,K.endRow);return M>=me&&M<=pe}else if(re==="column"){const me=xe.indexOf(K.startCol),pe=xe.indexOf(K.endCol),ye=Math.min(me,pe),ge=Math.max(me,pe);return Oe>=ye&&Oe<=ge}else{const me=Math.min(K.startRow,K.endRow),pe=Math.max(K.startRow,K.endRow),ye=xe.indexOf(K.startCol),ge=xe.indexOf(K.endCol),De=Math.min(ye,ge),lt=Math.max(ye,ge);return M>=me&&M<=pe&&Oe>=De&&Oe<=lt}},[K,xe]),Rt=C.useCallback(M=>{if(!K||K.selectionType!=="row")return!1;const H=Math.min(K.startRow,K.endRow),re=Math.max(K.startRow,K.endRow);return M>=H&&M<=re},[K]),kn=C.useCallback(M=>{if(!K||K.selectionType!=="column")return!1;const H=xe.indexOf(K.startCol),re=xe.indexOf(K.endCol),Oe=Math.min(H,re),me=Math.max(H,re),pe=xe.indexOf(M);return pe>=Oe&&pe<=me},[K,xe]),Ls=C.useCallback((M,H,re)=>{M.target.closest("button")||M.target.closest("a")||M.target.closest('[draggable="true"]')||(M.preventDefault(),ze(!0),Ie({startRow:H,startCol:re,endRow:H,endCol:re,selectionType:"cell"}))},[]),zs=C.useCallback((M,H)=>{M.preventDefault(),M.stopPropagation(),ze(!0),Ie({startRow:H,startCol:xe[0],endRow:H,endCol:xe[xe.length-1],selectionType:"row"})},[xe]),$s=C.useCallback(M=>{M.preventDefault(),M.stopPropagation(),A!=null&&A.data&&xe.length>0&&Ie({startRow:0,startCol:xe[0],endRow:A.data.length-1,endCol:xe[xe.length-1],selectionType:"cell"})},[A==null?void 0:A.data,xe]),Vs=C.useCallback((M,H)=>{M.target.closest("button")||M.target.closest("a")||M.target.closest('[draggable="true"]')||M.target.closest("[data-column-menu]")||(M.preventDefault(),M.stopPropagation(),ze(!0),A!=null&&A.data&&Ie({startRow:0,startCol:H,endRow:A.data.length-1,endCol:H,selectionType:"column"}))},[A==null?void 0:A.data,xe]),Do=C.useCallback(M=>{if(w.length===0)return;const H=w.indexOf(M);if(H>0){const re=[...w];re.splice(H,1),re.splice(H-1,0,M),E(re)}},[w]),Wr=C.useCallback(M=>{if(w.length===0)return;const H=w.indexOf(M);if(H<w.length-1){const re=[...w];re.splice(H,1),re.splice(H+1,0,M),E(re)}},[w]),As=C.useCallback(M=>{const H=we.getColumn(M);H==null||H.toggleVisibility(!1)},[we]),wr=C.useCallback((M,H)=>{if(Le&&K){const re=K.selectionType||"cell";Ie(re==="row"?{...K,endRow:M}:re==="column"?{...K,endCol:H}:{...K,endRow:M,endCol:H})}},[Le,K]),xr=C.useCallback(M=>{Le&&K&&K.selectionType==="row"&&Ie({...K,endRow:M})},[Le,K]),al=C.useCallback(M=>{Le&&K&&K.selectionType==="column"&&Ie({...K,endCol:M})},[Le,K]),To=C.useCallback(async()=>{if(!K||!(A!=null&&A.data))return;const M=K.selectionType||"cell",H=Math.min(K.startRow,K.endRow),re=Math.max(K.startRow,K.endRow),Oe=xe.indexOf(K.startCol),me=xe.indexOf(K.endCol);if(Oe===-1||me===-1){console.error("Invalid column selection:",{startCol:K.startCol,endCol:K.endCol,visibleColumnIds:xe});return}const pe=Math.min(Oe,me),ye=Math.max(Oe,me);let ge,De;M==="row"?(ge=xe,De=A.data.slice(H,re+1)):M==="column"?(ge=xe.slice(pe,ye+1),De=A.data):(ge=xe.slice(pe,ye+1),De=A.data.slice(H,re+1));const lt=M==="cell"&&H===re&&pe===ye,qt=M==="column"&&ge.length===1,pn=!lt&&!qt&&ge.length>1,Vn=[];pn&&Vn.push(ge.join(" ")),De.forEach(Sr=>{const Et=ge.map(Rn=>{const Cr=Sr[Rn];return Cr==null?"":String(Cr).replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g,"")});Vn.push(Et.join(" "))});const Lo=Vn.join(`
229
- `);try{await navigator.clipboard.writeText(Lo)}catch(Sr){console.error("Failed to copy to clipboard:",Sr);try{const Et=document.createElement("textarea");Et.value=Lo,Et.style.position="fixed",Et.style.left="-999999px",Et.style.top="-999999px",document.body.appendChild(Et),Et.focus(),Et.select();const Rn=document.execCommand("copy");document.body.removeChild(Et),Rn||console.error("Fallback copy method also failed")}catch(Et){console.error("Fallback copy method error:",Et)}}},[K,A==null?void 0:A.data,xe]);return C.useEffect(()=>{const M=()=>{ze(!1)};if(Le)return document.addEventListener("mouseup",M),()=>document.removeEventListener("mouseup",M)},[Le]),C.useEffect(()=>{if(!Re||!Y)return;const M=()=>{_e(null),oe(null)},H=ie.current;if(H)return H.addEventListener("scroll",M,!0),()=>H.removeEventListener("scroll",M,!0)},[Re,Y]),C.useEffect(()=>{const M=H=>{var Oe;const re=((Oe=ie.current)==null?void 0:Oe.contains(document.activeElement))||document.activeElement===ie.current;if((H.ctrlKey||H.metaKey)&&H.key==="a")re&&(H.preventDefault(),A!=null&&A.data&&xe.length>0&&Ie({startRow:0,startCol:xe[0],endRow:A.data.length-1,endCol:xe[xe.length-1],selectionType:"cell"}));else if((H.ctrlKey||H.metaKey)&&H.key==="c"&&K){const me=document.activeElement;me&&(me.tagName==="INPUT"||me.tagName==="TEXTAREA"||me.isContentEditable)||(H.preventDefault(),To().catch(ye=>{console.error("Failed to copy selection:",ye)}))}};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[K,A==null?void 0:A.data,xe,To]),Ge&&!A?f.jsxs("div",{className:"flex items-center justify-center h-64 text-sm text-muted-foreground",children:[f.jsx($n,{className:"h-4 w-4 animate-spin mr-2"}),"Loading data..."]}):it?f.jsxs("div",{className:"flex items-center justify-center h-64 text-sm text-destructive",children:["Error loading data: ",it instanceof Error?it.message:"Unknown error"]}):!A||A.data.length===0?f.jsx("div",{className:"flex items-center justify-center h-64 text-sm text-muted-foreground",children:"No data found"}):f.jsxs("div",{className:"flex flex-col h-full bg-grid-bg dark:bg-grid-bg",children:[f.jsxs("div",{className:"border-b p-2 flex items-center justify-between bg-muted/30 relative",children:[f.jsxs("div",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[A?f.jsxs(f.Fragment,{children:["Showing ",(a-1)*h+1," - ",Math.min(a*h,A.pagination.total)," of"," ",A.pagination.total," rows"]}):f.jsx("span",{children:"Loading..."}),ne&&f.jsx($n,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[l&&f.jsxs(Pt,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:ht,title:"Create query from current view",children:[f.jsx(Op,{className:"h-3 w-3 mr-1.5"}),"Create Query"]}),f.jsxs(Yp,{open:$,onOpenChange:U,children:[f.jsx(Jp,{asChild:!0,children:f.jsxs(Pt,{variant:"outline",size:"sm",className:"h-7 text-xs",children:[f.jsx(av,{className:"h-3 w-3 mr-1.5"}),"Columns (",Object.values(P).filter(M=>M).length,"/",He.length,")"]})}),f.jsxs(Xp,{align:"end",className:"w-64 max-h-96 overflow-y-auto",children:[f.jsx("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:"Toggle columns"}),f.jsx(Xf,{}),nt.map((M,H)=>{const re=we.getColumn(M);if(!re)return null;const Oe=re.getIsVisible(),me=w.length>0?w.indexOf(M):H,pe=me===0,ye=me===(w.length>0?w.length-1:He.length-1);return f.jsxs("div",{className:"group flex items-center gap-1 px-2 py-1 hover:bg-accent rounded-sm",children:[f.jsx(xy,{checked:Oe,onCheckedChange:ge=>{re.toggleVisibility(!!ge)},className:"text-xs flex-1 p-0 h-auto hover:bg-transparent",children:M}),f.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[f.jsx("button",{onClick:ge=>{if(ge.stopPropagation(),ge.preventDefault(),!pe&&w.length>0){const De=[...w],lt=De.indexOf(M);lt>0&&(De.splice(lt,1),De.splice(lt-1,0,M),E(De))}},disabled:pe,className:be("p-0.5 rounded hover:bg-accent",pe&&"opacity-30 cursor-not-allowed"),title:"Move up",children:f.jsx(Fp,{className:"h-3 w-3"})}),f.jsx("button",{onClick:ge=>{if(ge.stopPropagation(),ge.preventDefault(),!ye&&w.length>0){const De=[...w],lt=De.indexOf(M);lt<De.length-1&&(De.splice(lt,1),De.splice(lt+1,0,M),E(De))}},disabled:ye,className:be("p-0.5 rounded hover:bg-accent",ye&&"opacity-30 cursor-not-allowed"),title:"Move down",children:f.jsx(Gr,{className:"h-3 w-3"})})]})]},M)}),f.jsx(Xf,{}),f.jsx(Na,{onClick:()=>{He.forEach(M=>{const H=we.getColumn(M);H==null||H.toggleVisibility(!0)})},className:"text-xs",children:"Show all"}),f.jsx(Na,{onClick:()=>{He.forEach(M=>{const H=we.getColumn(M);H==null||H.toggleVisibility(!1)})},className:"text-xs",children:"Hide all"})]})]}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Rows per page:"}),f.jsxs("select",{value:h,onChange:M=>{m(Number(M.target.value)),d(1)},className:"h-7 rounded border border-input bg-background px-2 text-xs",children:[f.jsx("option",{value:50,children:"50"}),f.jsx("option",{value:100,children:"100"}),f.jsx("option",{value:250,children:"250"}),f.jsx("option",{value:500,children:"500"}),f.jsx("option",{value:1e3,children:"1000"})]})]})]}),f.jsxs("div",{ref:ie,className:"flex-1 overflow-auto relative",tabIndex:0,onMouseLeave:()=>ze(!1),children:[ne&&A&&f.jsxs("div",{className:"absolute top-0 right-0 m-2 z-20 flex items-center gap-2 bg-background/80 backdrop-blur-sm border rounded-md px-2 py-1 text-xs text-muted-foreground",children:[f.jsx($n,{className:"h-3 w-3 animate-spin"}),f.jsx("span",{children:"Refreshing..."})]}),f.jsxs("table",{className:"w-full border-collapse",children:[f.jsx("thead",{className:"sticky top-0 bg-muted z-10",children:we.getHeaderGroups().map(M=>f.jsxs("tr",{children:[f.jsx("th",{className:"border-b border-r border-border/50 p-2 text-xs font-medium text-muted-foreground select-none bg-muted/50 w-12 cursor-pointer hover:bg-muted/70 transition-colors",onMouseDown:$s,title:"Select All"}),M.headers.map(H=>{const re=H.column.id||String(H.column.accessorKey),Oe=H.column,me=kn(re);return Oe.getIsSorted(),xe.indexOf(re),xe.indexOf(re),xe.length-1,f.jsx("th",{ref:pe=>{pe&&(N.current[re]=pe)},onDragOver:pe=>{q&&q!==re&&(pe.preventDefault(),pe.dataTransfer.dropEffect="move",te(re))},onDragLeave:()=>{te(null)},onDrop:pe=>{if(pe.preventDefault(),q&&q!==re){const ye=w.length>0?w.indexOf(q):xe.indexOf(q),ge=w.length>0?w.indexOf(re):xe.indexOf(re);if(ye!==-1&&ge!==-1){const De=[...w];De.splice(ye,1),De.splice(ge,0,q),E(De)}}J(null),te(null)},className:be("relative border-b border-r border-border/50 p-2 text-left text-xs font-medium text-muted-foreground last:border-r-0 select-none cursor-pointer group",me&&"bg-primary/20",q===re&&"opacity-50",Z===re&&"border-l-2 border-primary"),onMouseDown:pe=>Vs(pe,re),onMouseEnter:()=>{G.current&&(clearTimeout(G.current),G.current=null),al(re),_e(re);const pe=N.current[re];if(pe){const ye=pe.getBoundingClientRect();oe({top:ye.top,left:ye.left})}},onMouseLeave:pe=>{G.current&&clearTimeout(G.current);const ye=pe.relatedTarget,ge=ye==null?void 0:ye.closest("[data-column-menu]"),De=ye==null?void 0:ye.closest("[data-column-filter]"),lt=ye==null?void 0:ye.closest("th");!ge&&!De&&!lt&&(G.current=setTimeout(()=>{const qt=document.querySelector("[data-column-menu]"),pn=document.querySelector("[data-column-filter]"),Vn=document.querySelector("th:hover");!(qt!=null&&qt.matches(":hover"))&&!(pn!=null&&pn.matches(":hover"))&&!Vn&&(_e(null),oe(null),X(null)),G.current=null},200))},children:H.isPlaceholder?null:Jf(H.column.columnDef.header,H.getContext())},H.id)})]},M.id))}),f.jsx("tbody",{children:we.getRowModel().rows.map((M,H)=>{const re=Rt(H),Oe=(a-1)*h+H+1;return f.jsxs("tr",{className:"border-b hover:bg-muted/30 transition-colors",children:[f.jsx("td",{className:be("border-r border-border/50 p-2 text-xs text-muted-foreground select-none cursor-pointer bg-muted/30 w-12 text-center",re&&"bg-primary/20"),onMouseDown:me=>zs(me,H),onMouseEnter:()=>xr(H),children:Oe}),M.getVisibleCells().map(me=>{const pe=me.column.id||String(me.column.accessorKey),ye=tn(H,pe);return f.jsx("td",{className:be("border-r border-border/50 p-2 text-xs last:border-r-0 cursor-cell",ye&&"bg-primary/20"),onMouseDown:ge=>Ls(ge,H,pe),onMouseEnter:()=>wr(H,pe),children:Jf(me.column.columnDef.cell,me.getContext())},me.id)})]},M.id)})})]})]}),Re&&Y&&(()=>{const M=Re,H=we.getColumn(M),re=H==null?void 0:H.getIsSorted(),Oe=re==="asc"?"asc":re==="desc"?"desc":null,me=w.length>0?w.indexOf(M):xe.indexOf(M),pe=me===0,ye=me===(w.length>0?w.length-1:xe.length-1);return f.jsxs("div",{ref:ge=>{fe.current=ge,ge&&y(ge.offsetHeight)},"data-column-menu":M,className:"fixed z-50 bg-popover border rounded-md shadow-lg flex items-center gap-0.5 p-0.5",style:{top:`${Y.top}px`,left:`${Y.left}px`,transform:"translateY(-100%)"},onMouseEnter:()=>{G.current&&(clearTimeout(G.current),G.current=null),_e(M)},onMouseLeave:ge=>{const De=ge.relatedTarget;(De==null?void 0:De.closest("th"))||(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{const qt=document.querySelector("[data-column-menu]"),pn=document.querySelector("th:hover");!(qt!=null&&qt.matches(":hover"))&&!pn&&(_e(null),oe(null)),G.current=null},200))},children:[f.jsx("button",{onClick:ge=>{ge.stopPropagation(),H==null||H.toggleSorting(!1),_e(null),oe(null)},className:be("p-1.5 hover:bg-accent rounded transition-colors",Oe==="asc"&&"bg-accent"),title:"Sort Ascending",children:f.jsx(bf,{className:"h-3.5 w-3.5"})}),f.jsx("button",{onClick:ge=>{ge.stopPropagation(),H==null||H.toggleSorting(!0),_e(null),oe(null)},className:be("p-1.5 hover:bg-accent rounded transition-colors",Oe==="desc"&&"bg-accent"),title:"Sort Descending",children:f.jsx(Af,{className:"h-3.5 w-3.5"})}),f.jsx("div",{className:"w-px h-4 bg-border"}),f.jsx("button",{onClick:ge=>{ge.stopPropagation(),Do(M),_e(null),oe(null)},disabled:pe,className:be("p-1.5 hover:bg-accent rounded transition-colors",pe&&"opacity-50 cursor-not-allowed"),title:"Move Left",children:f.jsx(Hf,{className:"h-3.5 w-3.5"})}),f.jsx("button",{onClick:ge=>{ge.stopPropagation(),Wr(M),_e(null),oe(null)},disabled:ye,className:be("p-1.5 hover:bg-accent rounded transition-colors",ye&&"opacity-50 cursor-not-allowed"),title:"Move Right",children:f.jsx(Ss,{className:"h-3.5 w-3.5"})}),f.jsx("div",{className:"w-px h-4 bg-border"}),f.jsx("button",{onClick:ge=>{ge.stopPropagation(),X(L===M?null:M)},className:be("p-1.5 hover:bg-accent rounded transition-colors",(H==null?void 0:H.getFilterValue())&&"bg-accent"),title:"Filter Column",children:f.jsx(Qf,{className:"h-3.5 w-3.5"})}),f.jsx("div",{className:"w-px h-4 bg-border"}),f.jsx("button",{onClick:ge=>{ge.stopPropagation(),As(M),_e(null),oe(null)},className:"p-1.5 hover:bg-accent rounded transition-colors text-destructive",title:"Hide Column",children:f.jsx(cv,{className:"h-3.5 w-3.5"})})]})})(),L&&Re&&Y&&(()=>{const M=L,H=we.getColumn(M),re=b[M]||"",Oe=H==null?void 0:H.getFilterValue();return f.jsx("div",{className:"fixed z-50 bg-popover border rounded-md shadow-lg p-2",style:{top:`${Y.top-D}px`,left:`${Y.left}px`,transform:"translateY(-100%)",minWidth:"200px"},onMouseEnter:()=>{G.current&&(clearTimeout(G.current),G.current=null)},onMouseLeave:me=>{const pe=me.relatedTarget;(pe==null?void 0:pe.closest("[data-column-menu]"))||(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{const ge=document.querySelector("[data-column-menu]"),De=document.querySelector("[data-column-filter]"),lt=document.querySelector("th:hover");!(ge!=null&&ge.matches(":hover"))&&!(De!=null&&De.matches(":hover"))&&!lt&&X(null),G.current=null},200))},"data-column-filter":M,children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(ir,{type:"text",placeholder:`Filter ${M}...`,value:re,onChange:me=>{const pe=me.target.value;V(ye=>({...ye,[M]:pe}))},className:"h-7 text-xs",autoFocus:!0,onClick:me=>me.stopPropagation(),onKeyDown:me=>{me.stopPropagation(),me.key==="Escape"&&X(null)},disabled:ne}),(re||Oe)&&f.jsx("button",{onClick:me=>{me.stopPropagation(),I.current[M]&&(clearTimeout(I.current[M]),delete I.current[M]),V(pe=>{const ye={...pe};return delete ye[M],ye}),T(pe=>pe.filter(ye=>ye.id!==M))},className:"p-1 hover:bg-accent rounded transition-colors",title:"Clear Filter",disabled:ne,children:f.jsx(js,{className:"h-3 w-3"})})]})})})(),f.jsxs("div",{className:"border-t p-2 flex items-center justify-between bg-muted/30",children:[f.jsx("div",{className:"text-xs text-muted-foreground",children:A?f.jsxs(f.Fragment,{children:["Page ",a," of ",A.pagination.totalPages]}):f.jsx(f.Fragment,{children:"Loading..."})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(Pt,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:()=>d(1),disabled:!A||a===1||ne,children:f.jsx(iv,{className:"h-3 w-3"})}),f.jsx(Pt,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:()=>d(M=>Math.max(1,M-1)),disabled:!A||a===1||ne,children:f.jsx(Hf,{className:"h-3 w-3"})}),f.jsx(Pt,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:()=>d(M=>Math.min((A==null?void 0:A.pagination.totalPages)||1,M+1)),disabled:!A||a>=((A==null?void 0:A.pagination.totalPages)||1)||ne,children:f.jsx(Ss,{className:"h-3 w-3"})}),f.jsx(Pt,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:()=>d((A==null?void 0:A.pagination.totalPages)||1),disabled:!A||a>=((A==null?void 0:A.pagination.totalPages)||1)||ne,children:f.jsx(lv,{className:"h-3 w-3"})})]})]})]})}function ep(n,o){(o==null||o>n.length)&&(o=n.length);for(var s=0,l=Array(o);s<o;s++)l[s]=n[s];return l}function _y(n){if(Array.isArray(n))return n}function Py(n,o,s){return(o=Ly(o))in n?Object.defineProperty(n,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[o]=s,n}function My(n,o){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var l,a,d,h,m=[],g=!0,S=!1;try{if(d=(s=s.call(n)).next,o!==0)for(;!(g=(l=d.call(s)).done)&&(m.push(l.value),m.length!==o);g=!0);}catch(w){S=!0,a=w}finally{try{if(!g&&s.return!=null&&(h=s.return(),Object(h)!==h))return}finally{if(S)throw a}}return m}}function Fy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
230
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tp(n,o){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);o&&(l=l.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),s.push.apply(s,l)}return s}function np(n){for(var o=1;o<arguments.length;o++){var s=arguments[o]!=null?arguments[o]:{};o%2?tp(Object(s),!0).forEach(function(l){Py(n,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):tp(Object(s)).forEach(function(l){Object.defineProperty(n,l,Object.getOwnPropertyDescriptor(s,l))})}return n}function Oy(n,o){if(n==null)return{};var s,l,a=Iy(n,o);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(l=0;l<d.length;l++)s=d[l],o.indexOf(s)===-1&&{}.propertyIsEnumerable.call(n,s)&&(a[s]=n[s])}return a}function Iy(n,o){if(n==null)return{};var s={};for(var l in n)if({}.hasOwnProperty.call(n,l)){if(o.indexOf(l)!==-1)continue;s[l]=n[l]}return s}function Dy(n,o){return _y(n)||My(n,o)||zy(n,o)||Fy()}function Ty(n,o){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var l=s.call(n,o);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}function Ly(n){var o=Ty(n,"string");return typeof o=="symbol"?o:o+""}function zy(n,o){if(n){if(typeof n=="string")return ep(n,o);var s={}.toString.call(n).slice(8,-1);return s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set"?Array.from(n):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?ep(n,o):void 0}}function $y(n,o,s){return o in n?Object.defineProperty(n,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[o]=s,n}function rp(n,o){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);o&&(l=l.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),s.push.apply(s,l)}return s}function op(n){for(var o=1;o<arguments.length;o++){var s=arguments[o]!=null?arguments[o]:{};o%2?rp(Object(s),!0).forEach(function(l){$y(n,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):rp(Object(s)).forEach(function(l){Object.defineProperty(n,l,Object.getOwnPropertyDescriptor(s,l))})}return n}function Vy(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return function(l){return o.reduceRight(function(a,d){return d(a)},l)}}function xs(n){return function o(){for(var s=this,l=arguments.length,a=new Array(l),d=0;d<l;d++)a[d]=arguments[d];return a.length>=n.length?n.apply(this,a):function(){for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return o.apply(s,[].concat(a,m))}}}function ol(n){return{}.toString.call(n).includes("Object")}function Ay(n){return!Object.keys(n).length}function Ns(n){return typeof n=="function"}function by(n,o){return Object.prototype.hasOwnProperty.call(n,o)}function Hy(n,o){return ol(o)||vr("changeType"),Object.keys(o).some(function(s){return!by(n,s)})&&vr("changeField"),o}function Uy(n){Ns(n)||vr("selectorType")}function Qy(n){Ns(n)||ol(n)||vr("handlerType"),ol(n)&&Object.values(n).some(function(o){return!Ns(o)})&&vr("handlersType")}function By(n){n||vr("initialIsRequired"),ol(n)||vr("initialType"),Ay(n)&&vr("initialContent")}function qy(n,o){throw new Error(n[o]||n.default)}var Gy={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},vr=xs(qy)(Gy),el={changes:Hy,selector:Uy,handler:Qy,initial:By};function Ky(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};el.initial(n),el.handler(o);var s={current:n},l=xs(Jy)(s,o),a=xs(Yy)(s),d=xs(el.changes)(n),h=xs(Wy)(s);function m(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(w){return w};return el.selector(S),S(s.current)}function g(S){Vy(l,a,d,h)(S)}return[m,g]}function Wy(n,o){return Ns(o)?o(n.current):o}function Yy(n,o){return n.current=op(op({},n.current),o),o}function Jy(n,o,s){return Ns(o)?o(n.current):Object.keys(s).forEach(function(l){var a;return(a=o[l])===null||a===void 0?void 0:a.call(o,n.current[l])}),s}var Xy={create:Ky},Zy={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function e0(n){return function o(){for(var s=this,l=arguments.length,a=new Array(l),d=0;d<l;d++)a[d]=arguments[d];return a.length>=n.length?n.apply(this,a):function(){for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return o.apply(s,[].concat(a,m))}}}function t0(n){return{}.toString.call(n).includes("Object")}function n0(n){return n||sp("configIsRequired"),t0(n)||sp("configType"),n.urls?(r0(),{paths:{vs:n.urls.monacoBase}}):n}function r0(){console.warn(nh.deprecation)}function o0(n,o){throw new Error(n[o]||n.default)}var nh={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
231
- You are using deprecated way of configuration.
232
-
233
- Instead of using
234
- monaco.config({ urls: { monacoBase: '...' } })
235
- use
236
- monaco.config({ paths: { vs: '...' } })
237
-
238
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
239
- `},sp=e0(o0)(nh),s0={config:n0},i0=function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];return function(a){return s.reduceRight(function(d,h){return h(d)},a)}};function rh(n,o){return Object.keys(o).forEach(function(s){o[s]instanceof Object&&n[s]&&Object.assign(o[s],rh(n[s],o[s]))}),np(np({},n),o)}var l0={type:"cancelation",msg:"operation is manually canceled"};function sa(n){var o=!1,s=new Promise(function(l,a){n.then(function(d){return o?a(l0):l(d)}),n.catch(a)});return s.cancel=function(){return o=!0},s}var u0=["monaco"],a0=Xy.create({config:Zy,isInitialized:!1,resolve:null,reject:null,monaco:null}),oh=Dy(a0,2),Ts=oh[0],ul=oh[1];function c0(n){var o=s0.config(n),s=o.monaco,l=Oy(o,u0);ul(function(a){return{config:rh(a.config,l),monaco:s}})}function d0(){var n=Ts(function(o){var s=o.monaco,l=o.isInitialized,a=o.resolve;return{monaco:s,isInitialized:l,resolve:a}});if(!n.isInitialized){if(ul({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),sa(ia);if(window.monaco&&window.monaco.editor)return sh(window.monaco),n.resolve(window.monaco),sa(ia);i0(f0,h0)(g0)}return sa(ia)}function f0(n){return document.body.appendChild(n)}function p0(n){var o=document.createElement("script");return n&&(o.src=n),o}function h0(n){var o=Ts(function(l){var a=l.config,d=l.reject;return{config:a,reject:d}}),s=p0("".concat(o.config.paths.vs,"/loader.js"));return s.onload=function(){return n()},s.onerror=o.reject,s}function g0(){var n=Ts(function(s){var l=s.config,a=s.resolve,d=s.reject;return{config:l,resolve:a,reject:d}}),o=window.require;o.config(n.config),o(["vs/editor/editor.main"],function(s){var l=s.m||s;sh(l),n.resolve(l)},function(s){n.reject(s)})}function sh(n){Ts().monaco||ul({monaco:n})}function m0(){return Ts(function(n){var o=n.monaco;return o})}var ia=new Promise(function(n,o){return ul({resolve:n,reject:o})}),ih={config:c0,init:d0,__getMonacoInstance:m0},v0={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},la=v0,y0={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},w0=y0;function x0({children:n}){return qr.createElement("div",{style:w0.container},n)}var S0=x0,C0=S0;function k0({width:n,height:o,isEditorReady:s,loading:l,_ref:a,className:d,wrapperProps:h}){return qr.createElement("section",{style:{...la.wrapper,width:n,height:o},...h},!s&&qr.createElement(C0,null,l),qr.createElement("div",{ref:a,style:{...la.fullWidth,...!s&&la.hide},className:d}))}var R0=k0,lh=C.memo(R0);function E0(n){C.useEffect(n,[])}var uh=E0;function j0(n,o,s=!0){let l=C.useRef(!0);C.useEffect(l.current||!s?()=>{l.current=!1}:n,o)}var Ut=j0;function ks(){}function xo(n,o,s,l){return N0(n,l)||_0(n,o,s,l)}function N0(n,o){return n.editor.getModel(ah(n,o))}function _0(n,o,s,l){return n.editor.createModel(o,s,l?ah(n,l):void 0)}function ah(n,o){return n.Uri.parse(o)}function P0({original:n,modified:o,language:s,originalLanguage:l,modifiedLanguage:a,originalModelPath:d,modifiedModelPath:h,keepCurrentOriginalModel:m=!1,keepCurrentModifiedModel:g=!1,theme:S="light",loading:w="Loading...",options:E={},height:P="100%",width:j="100%",className:z,wrapperProps:T={},beforeMount:b=ks,onMount:V=ks}){let[$,U]=C.useState(!1),[L,X]=C.useState(!0),I=C.useRef(null),q=C.useRef(null),J=C.useRef(null),Z=C.useRef(V),te=C.useRef(b),K=C.useRef(!1);uh(()=>{let ie=ih.init();return ie.then(Re=>(q.current=Re)&&X(!1)).catch(Re=>(Re==null?void 0:Re.type)!=="cancelation"&&console.error("Monaco initialization: error:",Re)),()=>I.current?ze():ie.cancel()}),Ut(()=>{if(I.current&&q.current){let ie=I.current.getOriginalEditor(),Re=xo(q.current,n||"",l||s||"text",d||"");Re!==ie.getModel()&&ie.setModel(Re)}},[d],$),Ut(()=>{if(I.current&&q.current){let ie=I.current.getModifiedEditor(),Re=xo(q.current,o||"",a||s||"text",h||"");Re!==ie.getModel()&&ie.setModel(Re)}},[h],$),Ut(()=>{let ie=I.current.getModifiedEditor();ie.getOption(q.current.editor.EditorOption.readOnly)?ie.setValue(o||""):o!==ie.getValue()&&(ie.executeEdits("",[{range:ie.getModel().getFullModelRange(),text:o||"",forceMoveMarkers:!0}]),ie.pushUndoStop())},[o],$),Ut(()=>{var ie,Re;(Re=(ie=I.current)==null?void 0:ie.getModel())==null||Re.original.setValue(n||"")},[n],$),Ut(()=>{let{original:ie,modified:Re}=I.current.getModel();q.current.editor.setModelLanguage(ie,l||s||"text"),q.current.editor.setModelLanguage(Re,a||s||"text")},[s,l,a],$),Ut(()=>{var ie;(ie=q.current)==null||ie.editor.setTheme(S)},[S],$),Ut(()=>{var ie;(ie=I.current)==null||ie.updateOptions(E)},[E],$);let Ie=C.useCallback(()=>{var _e;if(!q.current)return;te.current(q.current);let ie=xo(q.current,n||"",l||s||"text",d||""),Re=xo(q.current,o||"",a||s||"text",h||"");(_e=I.current)==null||_e.setModel({original:ie,modified:Re})},[s,o,a,n,l,d,h]),Le=C.useCallback(()=>{var ie;!K.current&&J.current&&(I.current=q.current.editor.createDiffEditor(J.current,{automaticLayout:!0,...E}),Ie(),(ie=q.current)==null||ie.editor.setTheme(S),U(!0),K.current=!0)},[E,S,Ie]);C.useEffect(()=>{$&&Z.current(I.current,q.current)},[$]),C.useEffect(()=>{!L&&!$&&Le()},[L,$,Le]);function ze(){var Re,_e,Y,oe;let ie=(Re=I.current)==null?void 0:Re.getModel();m||((_e=ie==null?void 0:ie.original)==null||_e.dispose()),g||((Y=ie==null?void 0:ie.modified)==null||Y.dispose()),(oe=I.current)==null||oe.dispose()}return qr.createElement(lh,{width:j,height:P,isEditorReady:$,loading:w,_ref:J,className:z,wrapperProps:T})}var M0=P0;C.memo(M0);function F0(n){let o=C.useRef();return C.useEffect(()=>{o.current=n},[n]),o.current}var O0=F0,tl=new Map;function I0({defaultValue:n,defaultLanguage:o,defaultPath:s,value:l,language:a,path:d,theme:h="light",line:m,loading:g="Loading...",options:S={},overrideServices:w={},saveViewState:E=!0,keepCurrentModel:P=!1,width:j="100%",height:z="100%",className:T,wrapperProps:b={},beforeMount:V=ks,onMount:$=ks,onChange:U,onValidate:L=ks}){let[X,I]=C.useState(!1),[q,J]=C.useState(!0),Z=C.useRef(null),te=C.useRef(null),K=C.useRef(null),Ie=C.useRef($),Le=C.useRef(V),ze=C.useRef(),ie=C.useRef(l),Re=O0(d),_e=C.useRef(!1),Y=C.useRef(!1);uh(()=>{let y=ih.init();return y.then(N=>(Z.current=N)&&J(!1)).catch(N=>(N==null?void 0:N.type)!=="cancelation"&&console.error("Monaco initialization: error:",N)),()=>te.current?D():y.cancel()}),Ut(()=>{var N,G,fe,ae;let y=xo(Z.current,n||l||"",o||a||"",d||s||"");y!==((N=te.current)==null?void 0:N.getModel())&&(E&&tl.set(Re,(G=te.current)==null?void 0:G.saveViewState()),(fe=te.current)==null||fe.setModel(y),E&&((ae=te.current)==null||ae.restoreViewState(tl.get(d))))},[d],X),Ut(()=>{var y;(y=te.current)==null||y.updateOptions(S)},[S],X),Ut(()=>{!te.current||l===void 0||(te.current.getOption(Z.current.editor.EditorOption.readOnly)?te.current.setValue(l):l!==te.current.getValue()&&(Y.current=!0,te.current.executeEdits("",[{range:te.current.getModel().getFullModelRange(),text:l,forceMoveMarkers:!0}]),te.current.pushUndoStop(),Y.current=!1))},[l],X),Ut(()=>{var N,G;let y=(N=te.current)==null?void 0:N.getModel();y&&a&&((G=Z.current)==null||G.editor.setModelLanguage(y,a))},[a],X),Ut(()=>{var y;m!==void 0&&((y=te.current)==null||y.revealLine(m))},[m],X),Ut(()=>{var y;(y=Z.current)==null||y.editor.setTheme(h)},[h],X);let oe=C.useCallback(()=>{var y;if(!(!K.current||!Z.current)&&!_e.current){Le.current(Z.current);let N=d||s,G=xo(Z.current,l||n||"",o||a||"",N||"");te.current=(y=Z.current)==null?void 0:y.editor.create(K.current,{model:G,automaticLayout:!0,...S},w),E&&te.current.restoreViewState(tl.get(N)),Z.current.editor.setTheme(h),m!==void 0&&te.current.revealLine(m),I(!0),_e.current=!0}},[n,o,s,l,a,d,S,w,E,h,m]);C.useEffect(()=>{X&&Ie.current(te.current,Z.current)},[X]),C.useEffect(()=>{!q&&!X&&oe()},[q,X,oe]),ie.current=l,C.useEffect(()=>{var y,N;X&&U&&((y=ze.current)==null||y.dispose(),ze.current=(N=te.current)==null?void 0:N.onDidChangeModelContent(G=>{Y.current||U(te.current.getValue(),G)}))},[X,U]),C.useEffect(()=>{if(X){let y=Z.current.editor.onDidChangeMarkers(N=>{var fe;let G=(fe=te.current.getModel())==null?void 0:fe.uri;if(G&&N.find(ae=>ae.path===G.path)){let ae=Z.current.editor.getModelMarkers({resource:G});L==null||L(ae)}});return()=>{y==null||y.dispose()}}return()=>{}},[X,L]);function D(){var y,N;(y=ze.current)==null||y.dispose(),P?E&&tl.set(d,te.current.saveViewState()):(N=te.current.getModel())==null||N.dispose(),te.current.dispose()}return qr.createElement(lh,{width:j,height:z,isEditorReady:X,loading:g,_ref:K,className:T,wrapperProps:b})}var D0=I0,T0=C.memo(D0),ch=T0;const ip="datapeek_query_history",L0=20;function z0({initialQuery:n}){const[o,s]=C.useState(n||"SELECT TOP 100 * FROM "),[l,a]=C.useState("");C.useEffect(()=>{n&&n.trim()&&n!==l?(s(n),a(n)):!n&&l&&a("")},[n,l]);const[d,h]=C.useState(()=>{const V=localStorage.getItem(ip);return V?JSON.parse(V):[]}),[m,g]=C.useState(!1),[S,w]=C.useState(!1);C.useEffect(()=>{const V=()=>{const U=document.documentElement.classList.contains("dark");w(U)};V();const $=new MutationObserver(V);return $.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>$.disconnect()},[]);const{data:E,isLoading:P,error:j,refetch:z}=sl({queryKey:["query",o],queryFn:()=>Qt.executeQuery(o),enabled:!1}),T=()=>{if(!o.trim())return;const V=[o.trim(),...d.filter($=>$!==o.trim())].slice(0,L0);h(V),localStorage.setItem(ip,JSON.stringify(V)),z()},b=V=>{s(V),g(!1)};return C.useEffect(()=>{const V=$=>{($.ctrlKey||$.metaKey)&&$.key==="Enter"&&($.preventDefault(),o.trim()&&!P&&T())};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[o,P]),f.jsxs("div",{className:"flex flex-col h-full border-t bg-grid-bg dark:bg-grid-bg",children:[f.jsxs("div",{className:"border-b p-2 flex items-center justify-between bg-muted/30",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Pt,{onClick:T,disabled:P||!o.trim(),size:"sm",className:"h-7",children:P?f.jsxs(f.Fragment,{children:[f.jsx($n,{className:"mr-2 h-3 w-3 animate-spin"}),"Executing..."]}):f.jsxs(f.Fragment,{children:[f.jsx(Ip,{className:"mr-2 h-3 w-3"}),"Execute (Ctrl+Enter)"]})}),f.jsxs("div",{className:"relative",children:[f.jsxs(Pt,{variant:"outline",size:"sm",className:"h-7",onClick:()=>g(!m),children:[f.jsx(dv,{className:"h-3 w-3 mr-1"}),"History"]}),m&&d.length>0&&f.jsx("div",{className:"absolute top-full left-0 mt-1 w-64 bg-popover border rounded-md shadow-lg z-50 max-h-64 overflow-y-auto",children:d.map((V,$)=>f.jsx("button",{onClick:()=>b(V),className:"w-full text-left px-3 py-2 text-xs hover:bg-accent border-b last:border-b-0 font-mono truncate",children:V},$))})]})]}),j&&f.jsx("div",{className:"text-xs text-destructive",children:j instanceof Error?j.message:"Query failed"})]}),f.jsx("div",{className:"flex-1 relative",children:f.jsx(ch,{height:"100%",defaultLanguage:"sql",value:o,onChange:V=>s(V||""),theme:S?"datapeek-dark":"datapeek-light",options:{minimap:{enabled:!1},fontSize:13,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,tabSize:2,formatOnPaste:!0,formatOnType:!0},beforeMount:V=>{V.editor.defineTheme("datapeek-light",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#ffffff","editor.foreground":"#09090b","editorLineNumber.foreground":"#d4d4d8","editorLineNumber.activeForeground":"#a1a1aa","editor.selectionBackground":"#e4e4e7","editor.lineHighlightBackground":"#fafafa","editorCursor.foreground":"#09090b"}}),V.editor.defineTheme("datapeek-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#09090b","editor.foreground":"#fafafa","editorLineNumber.foreground":"#3f3f46","editorLineNumber.activeForeground":"#52525b","editor.selectionBackground":"#27272a","editor.lineHighlightBackground":"#18181b","editorCursor.foreground":"#fafafa"}})},onMount:(V,$)=>{const U=()=>{const X=document.documentElement.classList.contains("dark");$.editor.setTheme(X?"datapeek-dark":"datapeek-light")};new MutationObserver(U).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}})}),E&&f.jsxs("div",{className:"border-t max-h-64 overflow-auto",children:[f.jsxs("div",{className:"p-2 border-b bg-muted/30 text-xs text-muted-foreground",children:["Results (",E.data.length," ",E.data.length===1?"row":"rows",")"]}),E.data.length>0?f.jsxs("div",{className:"overflow-auto",children:[f.jsxs("table",{className:"w-full text-xs",children:[f.jsx("thead",{className:"sticky top-0 bg-muted/50",children:f.jsx("tr",{children:Object.keys(E.data[0]).map(V=>f.jsx("th",{className:"border-b p-2 text-left font-medium text-muted-foreground",children:V},V))})}),f.jsx("tbody",{children:E.data.slice(0,100).map((V,$)=>f.jsx("tr",{className:"border-b hover:bg-muted/30",children:Object.values(V).map((U,L)=>f.jsx("td",{className:"p-2 font-mono",children:U==null?f.jsx("span",{className:"text-muted-foreground italic",children:"NULL"}):String(U)},L))},$))})]}),E.data.length>100&&f.jsxs("div",{className:"p-2 text-xs text-muted-foreground text-center",children:["Showing first 100 of ",E.data.length," rows"]})]}):f.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:"Query executed successfully (no rows returned)"})]})]})}const dh="datapeek_queries";function _a(){try{const n=localStorage.getItem(dh);return n?JSON.parse(n):[]}catch{return[]}}function $0(n){localStorage.setItem(dh,JSON.stringify(n))}function V0(n,o){const s=_a(),l=s.findIndex(a=>a.id===n);l>=0&&(s[l]={...s[l],...o,updatedAt:Date.now()},$0(s))}function A0({queryId:n,onQueryUpdate:o}){const[s,l]=C.useState(()=>_a().find(y=>y.id===n)),[a,d]=C.useState((s==null?void 0:s.query)||"SELECT TOP 100 * FROM "),[h,m]=C.useState(!1),[g,S]=C.useState(null),[w,E]=C.useState([]),[P,j]=C.useState(40),[z,T]=C.useState(35),[b,V]=C.useState(25),[$,U]=C.useState(null),L=C.useRef(null),X=C.useRef(n),I=C.useRef(!1),q=C.useRef(""),J=C.useRef(null);C.useEffect(()=>{if(!s||s.query===a)return;const D=setTimeout(()=>{V0(n,{query:a}),l(y=>y&&{...y,query:a,updatedAt:Date.now()}),o&&o(n,a)},500);return()=>clearTimeout(D)},[a,n,o,s]),C.useEffect(()=>{const D=()=>{const N=document.documentElement.classList.contains("dark");m(N)};D();const y=new MutationObserver(D);return y.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>y.disconnect()},[]);const Z=C.useRef(new Map),[te,K]=C.useState([]),[Ie,Le]=C.useState(null),[ze,ie]=C.useState(!1);C.useEffect(()=>{if(X.current===n)return;const D=X.current;D&&Z.current.set(D,{resultSets:te,error:Ie,executionTime:g,messages:w}),X.current=n,I.current=!0;const N=_a().find(fe=>fe.id===n);N&&(l(N),d(N.query),q.current=N.query);const G=Z.current.get(n);G?(K(G.resultSets),Le(G.error),S(G.executionTime),E(G.messages)):(K([]),Le(null),S(null),E([])),setTimeout(()=>{I.current=!1},100)},[n]),C.useEffect(()=>{I.current||(q.current=a)},[a]);const Re=async()=>{if(!(!a.trim()||ze)){ie(!0),Le(null),K([]),E([]);try{const D=await Qt.executeQuery(a),y=D.executionTime||0;S(y);const N=D.resultSets&&D.resultSets.length>0?D.resultSets:D.data?[D.data]:[];K(N);const G=N.reduce((Fe,A)=>Fe+A.length,0),fe=N.length,Se=[{type:"success",message:fe>1?`Query executed successfully. ${fe} result set(s) returned with ${G} total row(s).`:`Query executed successfully. ${G} row(s) returned.`,time:y}];E(Se),Z.current.set(n,{resultSets:N,error:null,executionTime:y,messages:Se})}catch(D){S(null),Le(D);const N=[{type:"error",message:D.message||"Query execution failed",time:0}];E(N),Z.current.set(n,{resultSets:[],error:D,executionTime:null,messages:N})}finally{ie(!1)}}},_e=C.useCallback(D=>{U(D)},[]),Y=C.useCallback(D=>{if(!$||!L.current)return;const N=L.current.getBoundingClientRect(),fe=(D.clientY-N.top)/N.height*100;if($==="editor"){const ae=Math.max(20,Math.min(70,fe)),Se=100-ae;j(ae),T(Se*.6),V(Se*.4)}else if($==="results"){const ae=100-P,Se=Math.max(15,Math.min(ae-15,fe-P)),Fe=ae-Se;T(Se),V(Fe)}},[$,P]),oe=C.useCallback(()=>{U(null)},[]);return C.useEffect(()=>{if($)return document.addEventListener("mousemove",Y),document.addEventListener("mouseup",oe),()=>{document.removeEventListener("mousemove",Y),document.removeEventListener("mouseup",oe)}},[$,Y,oe]),C.useEffect(()=>{const D=y=>{(y.ctrlKey||y.metaKey)&&y.key==="Enter"&&(y.preventDefault(),a.trim()&&!ze&&Re())};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[a,ze]),s?f.jsxs("div",{ref:L,className:"flex flex-col h-full bg-grid-bg dark:bg-grid-bg",children:[f.jsxs("div",{className:"border-b p-2 flex items-center justify-between bg-muted/30",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Pt,{onClick:Re,disabled:ze||!a.trim(),size:"sm",className:"h-7",children:ze?f.jsxs(f.Fragment,{children:[f.jsx($n,{className:"mr-2 h-3 w-3 animate-spin"}),"Executing..."]}):f.jsxs(f.Fragment,{children:[f.jsx(Ip,{className:"mr-2 h-3 w-3"}),"Execute (Ctrl+Enter)"]})}),g!==null&&f.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[f.jsx(uv,{className:"h-3 w-3"}),g,"ms"]})]}),f.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:s.name})]}),f.jsxs("div",{style:{height:`${P}%`},className:"relative border-b",children:[f.jsx(ch,{height:"100%",language:"sql",value:a,onChange:D=>d(D||""),loading:f.jsx("div",{className:"flex items-center justify-center h-full",children:"Loading editor..."}),theme:h?"datapeek-dark":"datapeek-light",options:{minimap:{enabled:!1},fontSize:13,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,tabSize:2,formatOnPaste:!0,formatOnType:!0},beforeMount:D=>{D.editor.defineTheme("datapeek-light",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#ffffff","editor.foreground":"#09090b","editorLineNumber.foreground":"#d4d4d8","editorLineNumber.activeForeground":"#a1a1aa","editor.selectionBackground":"#e4e4e7","editor.lineHighlightBackground":"#fafafa","editorCursor.foreground":"#09090b"}}),D.editor.defineTheme("datapeek-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#09090b","editor.foreground":"#fafafa","editorLineNumber.foreground":"#3f3f46","editorLineNumber.activeForeground":"#52525b","editor.selectionBackground":"#27272a","editor.lineHighlightBackground":"#18181b","editorCursor.foreground":"#fafafa"}})},onMount:(D,y)=>{J.current=D;const N=D.getModel();if(N){y.editor.setModelLanguage(N,"sql");const ae=N.getValue();if(ae&&ae.trim()){const Se=()=>{try{const Fe=N._tokenization;if(Fe&&typeof Fe._resetTokenizationState=="function")return Fe._resetTokenizationState(),!0}catch{}try{const Fe=N.getValue();return N.setValue(Fe+" "),N.setValue(Fe),!0}catch{return!1}};Se(),setTimeout(()=>{Se(),D.layout()},50),setTimeout(()=>{D.layout()},150)}}setTimeout(()=>{D.focus()},200);const G=()=>{const ae=document.documentElement.classList.contains("dark");y.editor.setTheme(ae?"datapeek-dark":"datapeek-light")};new MutationObserver(G).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}},n),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-border cursor-row-resize hover:bg-primary/50 transition-colors z-10",onMouseDown:D=>{D.preventDefault(),D.stopPropagation(),_e("editor")},style:{pointerEvents:"auto"}})]}),f.jsxs("div",{style:{height:`${z}%`},className:"relative border-b flex flex-col",children:[f.jsxs("div",{className:"border-b p-2 bg-muted/30 text-xs text-muted-foreground flex items-center justify-between",children:[f.jsx("span",{children:"Results"}),te.length>1&&f.jsxs("span",{children:[te.length," result sets"]})]}),f.jsx("div",{className:"flex-1 overflow-auto",children:ze?f.jsxs("div",{className:"p-4 text-sm text-muted-foreground flex items-center justify-center gap-2 h-full",children:[f.jsx($n,{className:"h-4 w-4 animate-spin"}),f.jsx("span",{children:"Executing query..."})]}):Ie?f.jsxs("div",{className:"p-4 text-sm text-destructive flex items-center gap-2",children:[f.jsx(Uf,{className:"h-4 w-4"}),Ie instanceof Error?Ie.message:"Query execution failed"]}):te.length>0?te.length===1?(()=>{const D=te[0];return D.length===0?f.jsxs("div",{className:"p-4 text-sm text-muted-foreground text-center flex items-center justify-center gap-2",children:[f.jsx(Ju,{className:"h-4 w-4"}),"No rows returned"]}):f.jsx("div",{className:"overflow-auto h-full",children:f.jsxs("table",{className:"w-full text-xs border-collapse",style:{tableLayout:"auto",minWidth:"100%"},children:[f.jsx("thead",{className:"sticky top-0 bg-muted",children:f.jsx("tr",{children:Object.keys(D[0]).map(y=>f.jsx("th",{className:"border-b p-2 text-left font-medium text-muted-foreground",children:y},y))})}),f.jsx("tbody",{children:D.map((y,N)=>f.jsx("tr",{className:"border-b hover:bg-muted/30",children:Object.values(y).map((G,fe)=>f.jsx("td",{className:"p-2 font-mono text-xs whitespace-nowrap",children:G==null?f.jsx("span",{className:"text-muted-foreground italic",children:"NULL"}):f.jsx("span",{className:"truncate max-w-md block",children:String(G)})},fe))},N))})]})})})():f.jsx("div",{className:"space-y-4 p-2",children:te.map((D,y)=>f.jsxs("div",{className:"border rounded-md overflow-hidden",children:[f.jsxs("div",{className:"border-b p-2 bg-muted/50 text-xs font-medium text-muted-foreground",children:["Result Set ",y+1," (",D.length," ",D.length===1?"row":"rows",")"]}),D.length>0?f.jsx("div",{className:"overflow-auto max-h-96",children:f.jsxs("table",{className:"w-full text-xs border-collapse",style:{tableLayout:"auto",minWidth:"100%"},children:[f.jsx("thead",{className:"sticky top-0 bg-muted",children:f.jsx("tr",{children:Object.keys(D[0]).map(N=>f.jsx("th",{className:"border-b p-2 text-left font-medium text-muted-foreground",children:N},N))})}),f.jsx("tbody",{children:D.map((N,G)=>f.jsx("tr",{className:"border-b hover:bg-muted/30",children:Object.values(N).map((fe,ae)=>f.jsx("td",{className:"p-2 font-mono text-xs whitespace-nowrap",children:fe==null?f.jsx("span",{className:"text-muted-foreground italic",children:"NULL"}):f.jsx("span",{className:"truncate max-w-md block",children:String(fe)})},ae))},G))})]})}):f.jsxs("div",{className:"p-4 text-sm text-muted-foreground text-center flex items-center justify-center gap-2",children:[f.jsx(Ju,{className:"h-4 w-4"}),"No rows returned"]})]},y))}):f.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:"No results yet. Execute a query to see results."})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-border cursor-row-resize hover:bg-primary/50 transition-colors z-10",onMouseDown:D=>{D.preventDefault(),D.stopPropagation(),_e("results")},style:{pointerEvents:"auto"}})]}),f.jsxs("div",{style:{height:`${b}%`},className:"flex flex-col",children:[f.jsxs("div",{className:"border-b p-2 bg-muted/30 text-xs text-muted-foreground",children:["Messages (",w.length,")"]}),f.jsx("div",{className:"flex-1 overflow-auto p-2 space-y-1",children:w.length===0?f.jsx("div",{className:"text-xs text-muted-foreground text-center py-4",children:"No messages yet"}):w.map((D,y)=>f.jsxs("div",{className:`text-xs p-2 rounded flex items-start gap-2 ${D.type==="error"?"bg-destructive/10 text-destructive":D.type==="success"?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-muted"}`,children:[D.type==="error"?f.jsx(Uf,{className:"h-3 w-3 mt-0.5 flex-shrink-0"}):f.jsx(Ju,{className:"h-3 w-3 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{children:D.message}),f.jsxs("div",{className:"text-muted-foreground mt-0.5",children:[D.time,"ms"]})]})]},y))})]})]}):f.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Query not found"})}const fh="datapeek-theme";function Aa(){if(typeof window>"u")return"light";const n=localStorage.getItem(fh);return n==="light"||n==="dark"?n:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ph(n){typeof window>"u"||(localStorage.setItem(fh,n),n==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"))}function b0(){const o=Aa()==="dark"?"light":"dark";return ph(o),o}function H0(){const n=Aa();ph(n)}function U0(){const[n,o]=C.useState("light");C.useEffect(()=>{o(Aa());const l=new MutationObserver(()=>{const a=document.documentElement.classList.contains("dark")?"dark":"light";o(a)});return l.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>l.disconnect()},[]);const s=()=>{const l=b0();o(l)};return f.jsx(Pt,{variant:"ghost",size:"icon",onClick:s,className:"h-8 w-8","aria-label":"Toggle theme",children:n==="dark"?f.jsx(vv,{className:"h-4 w-4"}):f.jsx(fv,{className:"h-4 w-4"})})}const Q0=new bm({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function B0(){const[n,o]=C.useState(!1),[s,l]=C.useState(!1),[a,d]=C.useState(!0),[h,m]=C.useState(""),[g,S]=C.useState(),[w,E]=C.useState(),[P,j]=C.useState("table"),[z,T]=C.useState(""),[b,V]=C.useState(0),[$,U]=C.useState(!1),[L,X]=C.useState(""),I=C.useRef(null),[q,J]=C.useState(0),Z=ne=>{if(ne)try{const ce=localStorage.getItem("datapeek_queries");if(ce){const we=JSON.parse(ce).find(He=>He.id===ne);return we!=null&&we.name?we.name.endsWith(".sql")?we.name.slice(0,-4):we.name:void 0}}catch{return}},te=ne=>{if(g)try{const ce=localStorage.getItem("datapeek_queries"),Pe=ce?JSON.parse(ce):[],we=`${g.schema}.${g.table}`,He=Pe.filter(xe=>xe.name.startsWith(we));let $t;if(He.length===0)$t=`${we}.sql`;else{const xe=He.map(Rt=>{const kn=Rt.name.match(new RegExp(`^${we.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?: \\((\\d+)\\))?\\.sql$`));return kn&&kn[1]?parseInt(kn[1],10):0}).filter(Rt=>Rt>0),tn=xe.length>0?Math.max(...xe)+1:1;$t=`${we} (${tn}).sql`}const ht={id:`query-${Date.now()}`,name:$t,query:ne,createdAt:Date.now(),updatedAt:Date.now()},nt=[...Pe,ht];localStorage.setItem("datapeek_queries",JSON.stringify(nt)),V(Date.now()),E(ht.id),S(void 0),j("query")}catch(ce){console.error("Failed to create query:",ce)}},K=Z(w),Ie=ne=>{if(ne)try{const ce=localStorage.getItem("datapeek_queries");if(ce){const we=JSON.parse(ce).find(He=>He.id===ne);return we==null?void 0:we.name}}catch{return}};C.useEffect(()=>{$&&I.current&&(I.current.focus(),I.current.select())},[$]);const Le=(ne,ce)=>{try{const Pe=localStorage.getItem("datapeek_queries");if(!Pe)return!1;const we=JSON.parse(Pe),He=we.findIndex(ht=>ht.id===ne);if(He===-1)return!1;const $t=ce.endsWith(".sql")?ce:`${ce}.sql`;return we[He]={...we[He],name:$t,updatedAt:Date.now()},localStorage.setItem("datapeek_queries",JSON.stringify(we)),V(Date.now()),!0}catch{return!1}},ze=()=>{if(!w)return;const ne=Ie(w);if(ne){const ce=ne.endsWith(".sql")?ne.slice(0,-4):ne;X(ce),U(!0)}},ie=()=>{if(!w)return;const ne=L.trim();if(!ne){U(!1);return}Le(w,ne)&&(U(!1),X(""))},Re=()=>{U(!1),X("")},_e=ne=>{ne.key==="Enter"?(ne.preventDefault(),ie()):ne.key==="Escape"&&(ne.preventDefault(),Re())};C.useEffect(()=>{T("")},[g]),C.useEffect(()=>{U(!1),X("")},[w]);const Y=ne=>{try{const ce=localStorage.getItem("datapeek_queries");if(!ce)return!1;const Pe=JSON.parse(ce),we=Pe.filter(He=>He.id!==ne);return we.length===Pe.length?!1:(localStorage.setItem("datapeek_queries",JSON.stringify(we)),V(Date.now()),!0)}catch{return!1}},oe=()=>{if(!w)return;const ne=Ie(w),ce=ne?ne.endsWith(".sql")?ne.slice(0,-4):ne:"this query";confirm(`Are you sure you want to delete "${ce}"?`)&&Y(w)&&(E(void 0),S(void 0),j("table"))},D=()=>{try{const ne=localStorage.getItem("datapeek_favorites");return ne?JSON.parse(ne):[]}catch{return[]}},y=ne=>{localStorage.setItem("datapeek_favorites",JSON.stringify(ne)),J(Date.now())},N=(ne,ce)=>D().some(we=>we.schema===ne&&we.table===ce),G=()=>{if(!g)return;const ne=D(),ce=ne.findIndex(Pe=>Pe.schema===g.schema&&Pe.table===g.table);ce>=0?ne.splice(ce,1):ne.push({schema:g.schema,table:g.table}),y(ne)},fe=ne=>{if(!g)return;const ce=D(),Pe=ce.findIndex(He=>He.schema===g.schema&&He.table===g.table);if(Pe<0)return;const we=ne==="up"?Pe-1:Pe+1;we<0||we>=ce.length||([ce[Pe],ce[we]]=[ce[we],ce[Pe]],y(ce))},{data:ae}=sl({queryKey:["connection-status"],queryFn:()=>Qt.getConnectionStatus(),refetchInterval:3e4,enabled:n});C.useEffect(()=>{ae&&(ae.connected?ae.databaseName?m(ae.databaseName):m(""):(o(!1),m(""),S(void 0),E(void 0)))},[ae]),C.useEffect(()=>{Se()},[]);async function Se(){try{console.log("Checking connection status..."),await new Promise(ce=>setTimeout(ce,500));const ne=await Qt.getConnectionStatus();if(console.log("Connection status:",ne),ne.connected)console.log("Already connected"),o(!0),l(!1),d(!1);else{console.log("Not connected, checking for provided connection string...");const{connectionString:ce}=await Qt.getProvidedConnectionString();console.log("Provided connection string:",ce?"Found":"Not found"),ce?(console.log("Starting auto-connect..."),d(!0),l(!1),await Fe(ce)):(console.log("No connection string provided, showing dialog"),d(!1),l(!0))}}catch(ne){console.error("Error in checkConnection:",ne),d(!1),l(!0)}}async function Fe(ne){try{const ce=ne.split(";"),Pe={server:"",database:"",port:1433,options:{encrypt:!0,trustServerCertificate:!1}};for(const we of ce){const[He,...$t]=we.split("="),ht=$t.join("=").trim(),nt=He.trim().toLowerCase();if(nt==="server"||nt==="data source"){let xe=ht;xe.startsWith("tcp:")&&(xe=xe.substring(4));const[tn,Rt]=xe.split(",");Pe.server=tn.trim(),Rt&&(Pe.port=parseInt(Rt.trim(),10))}else nt==="database"||nt==="initial catalog"?Pe.database=ht:nt==="user id"||nt==="userid"||nt==="uid"?Pe.user=ht:nt==="password"||nt==="pwd"?Pe.password=ht:nt==="encrypt"?Pe.options.encrypt=ht.toLowerCase()==="true":(nt==="trustservercertificate"||nt==="trust server certificate")&&(Pe.options.trustServerCertificate=ht.toLowerCase()==="true")}if(console.log("Auto-connect config:",{server:Pe.server,database:Pe.database,port:Pe.port,hasUser:!!Pe.user,hasPassword:!!Pe.password,encrypt:Pe.options.encrypt}),Pe.server&&Pe.database){console.log("Connecting directly...");const we=await Qt.connect(Pe);if(we.success)console.log("Connected successfully!"),o(!0),d(!1);else throw new Error(we.message||"Connection failed")}else throw new Error(`Connection string missing required fields. Server: ${Pe.server}, Database: ${Pe.database}`)}catch(ce){console.error("Auto-connect failed:",ce),console.error("Error details:",{message:ce.message,stack:ce.stack}),d(!1),l(!0)}}function A(){o(!0),l(!1),d(!1)}function Ge(){d(!1),l(!0)}async function it(){try{await Qt.disconnect(),o(!1),S(void 0),l(!0)}catch(ne){console.error("Disconnect error:",ne)}}return f.jsxs("div",{className:"flex h-screen flex-col bg-content-bg dark:bg-content-bg",children:[f.jsx("header",{className:"border-b bg-header-bg dark:bg-header-bg",children:f.jsxs("div",{className:"flex h-12 items-center justify-between px-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("img",{src:"/assets/logo.png",alt:"Datapeek",className:"h-6 w-auto"}),h&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-muted-foreground",children:"/"}),f.jsx("span",{className:"text-sm text-muted-foreground",children:h})]}),g&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-muted-foreground",children:"/"}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:[g.schema,".",g.table]})]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(U0,{}),n&&f.jsxs(Yp,{children:[f.jsx(Jp,{asChild:!0,children:f.jsxs("button",{className:"flex items-center gap-2 px-2 py-1 rounded bg-green-500/10 text-green-600 dark:text-green-400 text-xs hover:bg-green-500/20 transition-colors cursor-pointer",children:[f.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"}),"Connected",f.jsx(Gr,{className:"h-3 w-3 opacity-70"})]})}),f.jsx(Xp,{align:"end",children:f.jsxs(Na,{variant:"destructive",onClick:it,children:[f.jsx(js,{className:"h-3 w-3 mr-2"}),"Disconnect"]})})]})]})]})}),a?f.jsx("div",{className:"flex items-center justify-center flex-1 bg-background",children:f.jsxs("div",{className:"text-center space-y-4",children:[f.jsx("div",{className:"flex justify-center",children:f.jsx($n,{className:"h-8 w-8 animate-spin text-primary"})}),f.jsxs("div",{children:[f.jsx("h2",{className:"text-lg font-semibold",children:"Connecting..."}),f.jsx("p",{className:"text-sm text-muted-foreground mt-1.5",children:"Establishing connection to database"})]})]})}):n?f.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[f.jsx("div",{className:"w-64 flex-shrink-0",children:f.jsx(Ev,{onTableSelect:(ne,ce)=>{S({schema:ne,table:ce}),E(void 0),j("table")},selectedTable:g,onQuerySelect:ne=>{ne?(E(ne),S(void 0),j("query")):(E(void 0),S(void 0),j("table"))},selectedQuery:w,queriesUpdated:b,favoritesUpdated:q})}),f.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden bg-content-bg dark:bg-content-bg",children:[K?f.jsx("div",{className:"border-b flex items-center justify-between bg-tabs-bg dark:bg-tabs-bg",children:$?f.jsxs("div",{className:"flex items-center gap-2 px-4 py-2",children:[f.jsx("input",{ref:I,type:"text",value:L,onChange:ne=>X(ne.target.value),onBlur:ie,onKeyDown:_e,className:"bg-background border border-primary rounded px-2 py-1 text-sm",onClick:ne=>ne.stopPropagation()}),f.jsx("button",{onClick:ie,className:"p-1 rounded hover:bg-accent transition-colors",title:"Save",children:f.jsx(sv,{className:"h-4 w-4"})}),f.jsx("button",{onClick:Re,className:"p-1 rounded hover:bg-accent transition-colors",title:"Cancel",children:f.jsx(js,{className:"h-4 w-4"})})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b-2 border-primary",children:[f.jsx("span",{className:"text-sm font-medium",children:K}),f.jsx("button",{onClick:ze,className:"p-0.5 rounded hover:bg-accent transition-colors",title:"Rename query",children:f.jsx(pv,{className:"h-3.5 w-3.5"})})]}),f.jsx("div",{className:"px-4 py-2",children:f.jsx("button",{onClick:oe,className:"p-1 rounded hover:bg-accent transition-colors",title:"Delete query",children:f.jsx(yv,{className:"h-4 w-4"})})})]})}):g?f.jsxs("div",{className:"border-b flex items-center justify-between bg-tabs-bg dark:bg-tabs-bg",children:[f.jsx("div",{className:"flex items-center gap-2 px-4 py-2 border-b-2 border-primary",children:f.jsxs("span",{className:"text-sm font-medium",children:[g.schema,".",g.table]})}),f.jsxs("div",{className:"flex items-center gap-1 px-4 py-2",children:[f.jsx("button",{onClick:G,className:be("p-1 rounded hover:bg-accent transition-colors",N(g.schema,g.table)&&"bg-accent"),title:N(g.schema,g.table)?"Remove from favorites":"Add to favorites",children:f.jsx(mv,{className:be("h-4 w-4",N(g.schema,g.table)&&"fill-yellow-500 text-yellow-500")})}),N(g.schema,g.table)&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"w-px h-4 bg-border mx-1"}),f.jsx("button",{onClick:()=>fe("up"),disabled:D().findIndex(ne=>ne.schema===g.schema&&ne.table===g.table)===0,className:be("p-1 rounded hover:bg-accent transition-colors",D().findIndex(ne=>ne.schema===g.schema&&ne.table===g.table)===0&&"opacity-50 cursor-not-allowed"),title:"Move Up",children:f.jsx(Fp,{className:"h-4 w-4"})}),f.jsx("button",{onClick:()=>fe("down"),disabled:D().findIndex(ne=>ne.schema===g.schema&&ne.table===g.table)===D().length-1,className:be("p-1 rounded hover:bg-accent transition-colors",D().findIndex(ne=>ne.schema===g.schema&&ne.table===g.table)===D().length-1&&"opacity-50 cursor-not-allowed"),title:"Move Down",children:f.jsx(Gr,{className:"h-4 w-4"})})]})]})]}):f.jsx("div",{className:"border-b flex bg-tabs-bg dark:bg-tabs-bg",children:f.jsx("div",{className:"px-4 py-2 text-sm font-medium border-b-2 border-primary",children:"Data"})}),f.jsx("div",{className:"flex-1 overflow-hidden",children:P==="table"?g?f.jsx(Ny,{schema:g.schema,table:g.table,onQueryChange:T,onCreateQuery:te}):f.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Select a table from the sidebar to view data"}):w?f.jsx(A0,{queryId:w}):f.jsx(z0,{initialQuery:z||void 0})})]})]}):f.jsx("div",{className:"flex items-center justify-center flex-1",children:f.jsxs("div",{className:"text-center space-y-4",children:[f.jsx(Ta,{className:"h-12 w-12 mx-auto text-muted-foreground"}),f.jsxs("div",{children:[f.jsx("h2",{className:"text-lg font-semibold",children:"Not Connected"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect to a SQL Server database to get started"})]}),f.jsx(Pt,{onClick:()=>l(!0),children:"Connect to Database"})]})}),f.jsx(Sv,{open:s&&!n&&!a,onConnect:A,onError:Ge})]})}function q0(){return f.jsx(Um,{client:Q0,children:f.jsx(B0,{})})}H0();vm.createRoot(document.getElementById("root")).render(f.jsx(qr.StrictMode,{children:f.jsx(q0,{})}));