diff --git a/frontend/dist/assets/index-687cd30b.css b/frontend/dist/assets/index-687cd30b.css new file mode 100644 index 0000000..052c054 --- /dev/null +++ b/frontend/dist/assets/index-687cd30b.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background-color:#151f29;border-radius:4px}::-webkit-scrollbar-thumb{background-color:#4a41c2;border-radius:4px}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-\[20\%\]{bottom:20%}.left-2\/4,.left-\[50\%\]{left:50%}.top-2\/4{top:50%}.z-10{z-index:10}.m-auto{margin:auto}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-3{margin-bottom:.75rem}.mr-0{margin-right:0}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.h-\[100vh\]{height:100vh}.h-\[10vh\]{height:10vh}.h-\[30vh\]{height:30vh}.h-\[40vh\]{height:40vh}.h-\[80\%\]{height:80%}.max-h-\[1\/3vh\]{max-height:1/3vh}.max-h-\[2\/3vh\]{max-height:2/3vh}.min-h-full{min-height:100%}.w-\[100vw\]{width:100vw}.w-\[15vw\]{width:15vw}.w-\[25vw\]{width:25vw}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.max-w-\[80vw\]{max-width:80vw}.basis-1{flex-basis:.25rem}.basis-1\/12{flex-basis:8.333333%}.basis-1\/3{flex-basis:33.333333%}.basis-1\/4{flex-basis:25%}.basis-1\/5{flex-basis:20%}.basis-2\/12{flex-basis:16.666667%}.basis-2\/3{flex-basis:66.666667%}.basis-4\/5{flex-basis:80%}.basis-5{flex-basis:1.25rem}.basis-9\/12{flex-basis:75%}.border-spacing-2{--tw-border-spacing-x: .5rem;--tw-border-spacing-y: .5rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-2\/3{--tw-translate-y: -66.666667%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize-none{resize:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-b-2{border-bottom-width:2px}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity))}.border-t-stone-900{--tw-border-opacity: 1;border-top-color:rgb(28 25 23 / var(--tw-border-opacity))}.bg-blue-300{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-emerald-200{--tw-bg-opacity: 1;background-color:rgb(167 243 208 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\[20px\]{padding:20px}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\[12px\]{padding-left:12px;padding-right:12px}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-\[8px\]{padding-top:8px;padding-bottom:8px}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-3{line-height:.75rem}.leading-6{line-height:1.5rem}.tracking-wider{letter-spacing:.05em}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:-translate-x-1:hover{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:border-b-4:hover{border-bottom-width:4px}.hover\:border-r-4:hover{border-right-width:4px}.hover\:border-solid:hover{border-style:solid}.hover\:border-slate-900:hover{--tw-border-opacity: 1;border-color:rgb(15 23 42 / var(--tw-border-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width: 640px){.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-center{align-items:center}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pb-4{padding-bottom:1rem}.sm\:text-left{text-align:left}} diff --git a/frontend/dist/assets/index-9fb6f926.js b/frontend/dist/assets/index-9fb6f926.js new file mode 100644 index 0000000..b0a66f8 --- /dev/null +++ b/frontend/dist/assets/index-9fb6f926.js @@ -0,0 +1,68 @@ +function Bh(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function $h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ac={exports:{}},Po={},zc={exports:{}},W={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var li=Symbol.for("react.element"),Vh=Symbol.for("react.portal"),Wh=Symbol.for("react.fragment"),Hh=Symbol.for("react.strict_mode"),Qh=Symbol.for("react.profiler"),Kh=Symbol.for("react.provider"),qh=Symbol.for("react.context"),bh=Symbol.for("react.forward_ref"),Yh=Symbol.for("react.suspense"),Xh=Symbol.for("react.memo"),Gh=Symbol.for("react.lazy"),Ga=Symbol.iterator;function Jh(e){return e===null||typeof e!="object"?null:(e=Ga&&e[Ga]||e["@@iterator"],typeof e=="function"?e:null)}var Ic={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fc=Object.assign,Uc={};function sr(e,t,n){this.props=e,this.context=t,this.refs=Uc,this.updater=n||Ic}sr.prototype.isReactComponent={};sr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};sr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bc(){}Bc.prototype=sr.prototype;function zs(e,t,n){this.props=e,this.context=t,this.refs=Uc,this.updater=n||Ic}var Is=zs.prototype=new Bc;Is.constructor=zs;Fc(Is,sr.prototype);Is.isPureReactComponent=!0;var Ja=Array.isArray,$c=Object.prototype.hasOwnProperty,Fs={current:null},Vc={key:!0,ref:!0,__self:!0,__source:!0};function Wc(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)$c.call(t,r)&&!Vc.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,de=T[ie];if(0>>1;ie<_n;){var J=2*(ie+1)-1,xt=T[J],ht=J+1,Rn=T[ht];if(0>i(xt,$))hti(Rn,xt)?(T[ie]=Rn,T[ht]=$,ie=ht):(T[ie]=xt,T[J]=$,ie=J);else if(hti(Rn,$))T[ie]=Rn,T[ht]=$,ie=ht;else break e}}return z}function i(T,z){var $=T.sortIndex-z.sortIndex;return $!==0?$:T.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var a=[],u=[],h=1,y=null,p=3,x=!1,v=!1,S=!1,L=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(T){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=T)r(u),z.sortIndex=z.expirationTime,t(a,z);else break;z=n(u)}}function f(T){if(S=!1,m(T),!v)if(n(a)!==null)v=!0,Be(C);else{var z=n(u);z!==null&&dt(f,z.startTime-T)}}function C(T,z){v=!1,S&&(S=!1,d(j),j=-1),x=!0;var $=p;try{for(m(z),y=n(a);y!==null&&(!(y.expirationTime>z)||T&&!we());){var ie=y.callback;if(typeof ie=="function"){y.callback=null,p=y.priorityLevel;var de=ie(y.expirationTime<=z);z=e.unstable_now(),typeof de=="function"?y.callback=de:y===n(a)&&r(a),m(z)}else r(a);y=n(a)}if(y!==null)var _n=!0;else{var J=n(u);J!==null&&dt(f,J.startTime-z),_n=!1}return _n}finally{y=null,p=$,x=!1}}var P=!1,N=null,j=-1,Q=5,I=-1;function we(){return!(e.unstable_now()-IT||125ie?(T.sortIndex=$,t(u,T),n(a)===null&&T===n(u)&&(S?(d(j),j=-1):S=!0,dt(f,$-ie))):(T.sortIndex=de,t(a,T),v||x||(v=!0,Be(C))),T},e.unstable_shouldYield=we,e.unstable_wrapCallback=function(T){var z=p;return function(){var $=p;p=z;try{return T.apply(this,arguments)}finally{p=$}}}})(bc);qc.exports=bc;var cp=qc.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Yc=R,He=cp;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ml=Object.prototype.hasOwnProperty,fp=/^[: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]*$/,eu={},tu={};function dp(e){return Ml.call(tu,e)?!0:Ml.call(eu,e)?!1:fp.test(e)?tu[e]=!0:(eu[e]=!0,!1)}function hp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pp(e,t,n,r){if(t===null||typeof t>"u"||hp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Me(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Re[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Re[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Re[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Re[e]=new Me(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){Re[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Re[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Re[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Re[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Re[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bs=/[\-:]([a-z])/g;function $s(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(Bs,$s);Re[t]=new Me(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(Bs,$s);Re[t]=new Me(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(Bs,$s);Re[t]=new Me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Re[e]=new Me(e,1,!1,e.toLowerCase(),null,!1,!1)});Re.xlinkHref=new Me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Re[e]=new Me(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vs(e,t,n,r){var i=Re.hasOwnProperty(t)?Re[t]:null;(i!==null?i.type!==0:r||!(2s||i[l]!==o[s]){var a=` +`+i[l].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{ol=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nr(e):""}function mp(e){switch(e.tag){case 5:return Nr(e.type);case 16:return Nr("Lazy");case 13:return Nr("Suspense");case 19:return Nr("SuspenseList");case 0:case 2:case 15:return e=ll(e.type,!1),e;case 11:return e=ll(e.type.render,!1),e;case 1:return e=ll(e.type,!0),e;default:return""}}function Fl(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 Dn:return"Fragment";case Tn:return"Portal";case Al:return"Profiler";case Ws:return"StrictMode";case zl:return"Suspense";case Il:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jc:return(e.displayName||"Context")+".Consumer";case Gc:return(e._context.displayName||"Context")+".Provider";case Hs:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qs:return t=e.displayName||null,t!==null?t:Fl(e.type)||"Memo";case Bt:t=e._payload,e=e._init;try{return Fl(e(t))}catch{}}return null}function yp(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 Fl(t);case 8:return t===Ws?"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 tn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ef(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gp(e){var t=ef(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vi(e){e._valueTracker||(e._valueTracker=gp(e))}function tf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ef(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function to(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 Ul(e,t){var n=t.checked;return se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ru(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=tn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nf(e,t){t=t.checked,t!=null&&Vs(e,"checked",t,!1)}function Bl(e,t){nf(e,t);var n=tn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$l(e,t.type,n):t.hasOwnProperty("defaultValue")&&$l(e,t.type,tn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function iu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $l(e,t,n){(t!=="number"||to(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pr=Array.isArray;function Hn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=wi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var jr={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},vp=["Webkit","ms","Moz","O"];Object.keys(jr).forEach(function(e){vp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jr[t]=jr[e]})});function sf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||jr.hasOwnProperty(e)&&jr[e]?(""+t).trim():t+"px"}function af(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=sf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var wp=se({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 Hl(e,t){if(t){if(wp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Ql(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 Kl=null;function Ks(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ql=null,Qn=null,Kn=null;function su(e){if(e=ui(e)){if(typeof ql!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Oo(t),ql(e.stateNode,e.type,t))}}function uf(e){Qn?Kn?Kn.push(e):Kn=[e]:Qn=e}function cf(){if(Qn){var e=Qn,t=Kn;if(Kn=Qn=null,su(e),t)for(e=0;e>>=0,e===0?32:31-(Tp(e)/Dp|0)|0}var xi=64,Si=4194304;function Lr(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 oo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=Lr(s):(o&=l,o!==0&&(r=Lr(o)))}else l=n&~i,l!==0?r=Lr(l):o!==0&&(r=Lr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function si(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-at(t),e[t]=n}function Ap(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=Mr),yu=String.fromCharCode(32),gu=!1;function Tf(e,t){switch(e){case"keyup":return um.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Df(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jn=!1;function fm(e,t){switch(e){case"compositionend":return Df(t);case"keypress":return t.which!==32?null:(gu=!0,yu);case"textInput":return e=t.data,e===yu&&gu?null:e;default:return null}}function dm(e,t){if(jn)return e==="compositionend"||!ea&&Tf(e,t)?(e=Pf(),Vi=Gs=Ht=null,jn=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Su(n)}}function Af(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Af(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zf(){for(var e=window,t=to();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=to(e.document)}return t}function ta(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 Sm(e){var t=zf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Af(n.ownerDocument.documentElement,n)){if(r!==null&&ta(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Eu(n,o);var l=Eu(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,On=null,Zl=null,zr=null,es=!1;function ku(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;es||On==null||On!==to(r)||(r=On,"selectionStart"in r&&ta(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zr&&Yr(zr,r)||(zr=r,r=ao(Zl,"onSelect"),0zn||(e.current=ls[zn],ls[zn]=null,zn--)}function Z(e,t){zn++,ls[zn]=e.current,e.current=t}var nn={},Te=on(nn),Ie=on(!1),gn=nn;function Zn(e,t){var n=e.type.contextTypes;if(!n)return nn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Fe(e){return e=e.childContextTypes,e!=null}function co(){te(Ie),te(Te)}function Tu(e,t,n){if(Te.current!==nn)throw Error(_(168));Z(Te,t),Z(Ie,n)}function Qf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(_(108,yp(e)||"Unknown",i));return se({},n,r)}function fo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||nn,gn=Te.current,Z(Te,e),Z(Ie,Ie.current),!0}function Du(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Qf(e,t,gn),r.__reactInternalMemoizedMergedChildContext=e,te(Ie),te(Te),Z(Te,e)):te(Ie),Z(Ie,n)}var Ct=null,Mo=!1,xl=!1;function Kf(e){Ct===null?Ct=[e]:Ct.push(e)}function Om(e){Mo=!0,Kf(e)}function ln(){if(!xl&&Ct!==null){xl=!0;var e=0,t=q;try{var n=Ct;for(q=1;e>=l,i-=l,_t=1<<32-at(t)+i|n<j?(Q=N,N=null):Q=N.sibling;var I=p(d,N,m[j],f);if(I===null){N===null&&(N=Q);break}e&&N&&I.alternate===null&&t(d,N),c=o(I,c,j),P===null?C=I:P.sibling=I,P=I,N=Q}if(j===m.length)return n(d,N),re&&un(d,j),C;if(N===null){for(;jj?(Q=N,N=null):Q=N.sibling;var we=p(d,N,I.value,f);if(we===null){N===null&&(N=Q);break}e&&N&&we.alternate===null&&t(d,N),c=o(we,c,j),P===null?C=we:P.sibling=we,P=we,N=Q}if(I.done)return n(d,N),re&&un(d,j),C;if(N===null){for(;!I.done;j++,I=m.next())I=y(d,I.value,f),I!==null&&(c=o(I,c,j),P===null?C=I:P.sibling=I,P=I);return re&&un(d,j),C}for(N=r(d,N);!I.done;j++,I=m.next())I=x(N,d,j,I.value,f),I!==null&&(e&&I.alternate!==null&&N.delete(I.key===null?j:I.key),c=o(I,c,j),P===null?C=I:P.sibling=I,P=I);return e&&N.forEach(function(G){return t(d,G)}),re&&un(d,j),C}function L(d,c,m,f){if(typeof m=="object"&&m!==null&&m.type===Dn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case gi:e:{for(var C=m.key,P=c;P!==null;){if(P.key===C){if(C=m.type,C===Dn){if(P.tag===7){n(d,P.sibling),c=i(P,m.props.children),c.return=d,d=c;break e}}else if(P.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Bt&&Fu(C)===P.type){n(d,P.sibling),c=i(P,m.props),c.ref=wr(d,P,m),c.return=d,d=c;break e}n(d,P);break}else t(d,P);P=P.sibling}m.type===Dn?(c=yn(m.props.children,d.mode,f,m.key),c.return=d,d=c):(f=Xi(m.type,m.key,m.props,null,d.mode,f),f.ref=wr(d,c,m),f.return=d,d=f)}return l(d);case Tn:e:{for(P=m.key;c!==null;){if(c.key===P)if(c.tag===4&&c.stateNode.containerInfo===m.containerInfo&&c.stateNode.implementation===m.implementation){n(d,c.sibling),c=i(c,m.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else t(d,c);c=c.sibling}c=Pl(m,d.mode,f),c.return=d,d=c}return l(d);case Bt:return P=m._init,L(d,c,P(m._payload),f)}if(Pr(m))return v(d,c,m,f);if(pr(m))return S(d,c,m,f);Pi(d,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,c!==null&&c.tag===6?(n(d,c.sibling),c=i(c,m),c.return=d,d=c):(n(d,c),c=Nl(m,d.mode,f),c.return=d,d=c),l(d)):n(d,c)}return L}var tr=ed(!0),td=ed(!1),ci={},vt=on(ci),Zr=on(ci),ei=on(ci);function hn(e){if(e===ci)throw Error(_(174));return e}function ca(e,t){switch(Z(ei,t),Z(Zr,e),Z(vt,ci),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wl(t,e)}te(vt),Z(vt,t)}function nr(){te(vt),te(Zr),te(ei)}function nd(e){hn(ei.current);var t=hn(vt.current),n=Wl(t,e.type);t!==n&&(Z(Zr,e),Z(vt,n))}function fa(e){Zr.current===e&&(te(vt),te(Zr))}var oe=on(0);function vo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Sl=[];function da(){for(var e=0;en?n:4,e(!0);var r=El.transition;El.transition={};try{e(!1),t()}finally{q=n,El.transition=r}}function vd(){return et().memoizedState}function Im(e,t,n){var r=Jt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},wd(e))xd(t,n);else if(n=Xf(e,t,n,r),n!==null){var i=je();ut(n,e,r,i),Sd(n,t,r)}}function Fm(e,t,n){var r=Jt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(wd(e))xd(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,ct(s,l)){var a=t.interleaved;a===null?(i.next=i,aa(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Xf(e,t,i,r),n!==null&&(i=je(),ut(n,e,r,i),Sd(n,t,r))}}function wd(e){var t=e.alternate;return e===le||t!==null&&t===le}function xd(e,t){Ir=wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bs(e,n)}}var xo={readContext:Ze,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useInsertionEffect:Ne,useLayoutEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useDeferredValue:Ne,useTransition:Ne,useMutableSource:Ne,useSyncExternalStore:Ne,useId:Ne,unstable_isNewReconciler:!1},Um={readContext:Ze,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:Ze,useEffect:Bu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ki(4194308,4,hd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ki(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ki(4,2,e,t)},useMemo:function(e,t){var n=mt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Im.bind(null,le,e),[r.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:Uu,useDebugValue:ga,useDeferredValue:function(e){return mt().memoizedState=e},useTransition:function(){var e=Uu(!1),t=e[0];return e=zm.bind(null,e[1]),mt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=le,i=mt();if(re){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),Ee===null)throw Error(_(349));wn&30||od(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Bu(sd.bind(null,r,o,e),[e]),r.flags|=2048,ri(9,ld.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=mt(),t=Ee.identifierPrefix;if(re){var n=Rt,r=_t;n=(r&~(1<<32-at(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ti++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[yt]=t,e[Jr]=r,Td(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ql(n,r),n){case"dialog":ee("cancel",e),ee("close",e),i=r;break;case"iframe":case"object":case"embed":ee("load",e),i=r;break;case"video":case"audio":for(i=0;iir&&(t.flags|=128,r=!0,xr(o,!1),t.lanes=4194304)}else{if(!r)if(e=vo(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!re)return Pe(t),null}else 2*fe()-o.renderingStartTime>ir&&n!==1073741824&&(t.flags|=128,r=!0,xr(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=fe(),t.sibling=null,n=oe.current,Z(oe,r?n&1|2:n&1),t):(Pe(t),null);case 22:case 23:return ka(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function qm(e,t){switch(ra(t),t.tag){case 1:return Fe(t.type)&&co(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nr(),te(Ie),te(Te),da(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fa(t),null;case 13:if(te(oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(oe),null;case 4:return nr(),null;case 10:return sa(t.type._context),null;case 22:case 23:return ka(),null;case 24:return null;default:return null}}var Ti=!1,Le=!1,bm=typeof WeakSet=="function"?WeakSet:Set,D=null;function Bn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ae(e,t,r)}else n.current=null}function vs(e,t,n){try{n()}catch(r){ae(e,t,r)}}var Yu=!1;function Ym(e,t){if(ts=lo,e=zf(),ta(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,h=0,y=e,p=null;t:for(;;){for(var x;y!==n||i!==0&&y.nodeType!==3||(s=l+i),y!==o||r!==0&&y.nodeType!==3||(a=l+r),y.nodeType===3&&(l+=y.nodeValue.length),(x=y.firstChild)!==null;)p=y,y=x;for(;;){if(y===e)break t;if(p===n&&++u===i&&(s=l),p===o&&++h===r&&(a=l),(x=y.nextSibling)!==null)break;y=p,p=y.parentNode}y=x}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ns={focusedElem:e,selectionRange:n},lo=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var S=v.memoizedProps,L=v.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?S:rt(t.type,S),L);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(f){ae(t,t.return,f)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return v=Yu,Yu=!1,v}function Fr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&vs(t,n,o)}i=i.next}while(i!==r)}}function Io(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ws(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Od(e){var t=e.alternate;t!==null&&(e.alternate=null,Od(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[Jr],delete t[os],delete t[Dm],delete t[jm])),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 Md(e){return e.tag===5||e.tag===3||e.tag===4}function Xu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Md(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 xs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=uo));else if(r!==4&&(e=e.child,e!==null))for(xs(e,t,n),e=e.sibling;e!==null;)xs(e,t,n),e=e.sibling}function Ss(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ss(e,t,n),e=e.sibling;e!==null;)Ss(e,t,n),e=e.sibling}var Ce=null,it=!1;function Ut(e,t,n){for(n=n.child;n!==null;)Ad(e,t,n),n=n.sibling}function Ad(e,t,n){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Lo,n)}catch{}switch(n.tag){case 5:Le||Bn(n,t);case 6:var r=Ce,i=it;Ce=null,Ut(e,t,n),Ce=r,it=i,Ce!==null&&(it?(e=Ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ce.removeChild(n.stateNode));break;case 18:Ce!==null&&(it?(e=Ce,n=n.stateNode,e.nodeType===8?wl(e.parentNode,n):e.nodeType===1&&wl(e,n),qr(e)):wl(Ce,n.stateNode));break;case 4:r=Ce,i=it,Ce=n.stateNode.containerInfo,it=!0,Ut(e,t,n),Ce=r,it=i;break;case 0:case 11:case 14:case 15:if(!Le&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&vs(n,t,l),i=i.next}while(i!==r)}Ut(e,t,n);break;case 1:if(!Le&&(Bn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){ae(n,t,s)}Ut(e,t,n);break;case 21:Ut(e,t,n);break;case 22:n.mode&1?(Le=(r=Le)||n.memoizedState!==null,Ut(e,t,n),Le=r):Ut(e,t,n);break;default:Ut(e,t,n)}}function Gu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new bm),t.forEach(function(r){var i=iy.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function nt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Gm(r/1960))-r,10e?16:e,Qt===null)var r=!1;else{if(e=Qt,Qt=null,ko=0,K&6)throw Error(_(331));var i=K;for(K|=4,D=e.current;D!==null;){var o=D,l=o.child;if(D.flags&16){var s=o.deletions;if(s!==null){for(var a=0;afe()-Sa?mn(e,0):xa|=n),Ue(e,t)}function Wd(e,t){t===0&&(e.mode&1?(t=Si,Si<<=1,!(Si&130023424)&&(Si=4194304)):t=1);var n=je();e=Tt(e,t),e!==null&&(si(e,t,n),Ue(e,n))}function ry(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wd(e,n)}function iy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Wd(e,n)}var Hd;Hd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ze=!1,Qm(e,t,n);ze=!!(e.flags&131072)}else ze=!1,re&&t.flags&1048576&&qf(t,po,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qi(e,t),e=t.pendingProps;var i=Zn(t,Te.current);bn(t,n),i=pa(null,t,r,e,i,n);var o=ma();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Fe(r)?(o=!0,fo(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ua(t),i.updater=Ao,t.stateNode=i,i._reactInternals=t,fs(t,r,e,n),t=ps(null,t,r,!0,o,n)):(t.tag=0,re&&o&&na(t),De(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qi(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ly(r),e=rt(r,e),i){case 0:t=hs(null,t,r,e,n);break e;case 1:t=Ku(null,t,r,e,n);break e;case 11:t=Hu(null,t,r,e,n);break e;case 14:t=Qu(null,t,r,rt(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:rt(r,i),hs(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:rt(r,i),Ku(e,t,r,i,n);case 3:e:{if(Nd(t),e===null)throw Error(_(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Gf(e,t),go(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=rr(Error(_(423)),t),t=qu(e,t,r,n,i);break e}else if(r!==i){i=rr(Error(_(424)),t),t=qu(e,t,r,n,i);break e}else for(Ve=Yt(t.stateNode.containerInfo.firstChild),We=t,re=!0,st=null,n=td(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(er(),r===i){t=Dt(e,t,n);break e}De(e,t,r,n)}t=t.child}return t;case 5:return nd(t),e===null&&as(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,rs(r,i)?l=null:o!==null&&rs(r,o)&&(t.flags|=32),Rd(e,t),De(e,t,l,n),t.child;case 6:return e===null&&as(t),null;case 13:return Pd(e,t,n);case 4:return ca(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tr(t,null,r,n):De(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:rt(r,i),Hu(e,t,r,i,n);case 7:return De(e,t,t.pendingProps,n),t.child;case 8:return De(e,t,t.pendingProps.children,n),t.child;case 12:return De(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Z(mo,r._currentValue),r._currentValue=l,o!==null)if(ct(o.value,l)){if(o.children===i.children&&!Ie.current){t=Dt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Nt(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?a.next=a:(a.next=h.next,h.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),us(o.return,n,t),s.lanes|=n;break}a=a.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(_(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),us(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}De(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,bn(t,n),i=Ze(i),r=r(i),t.flags|=1,De(e,t,r,n),t.child;case 14:return r=t.type,i=rt(r,t.pendingProps),i=rt(r.type,i),Qu(e,t,r,i,n);case 15:return Cd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:rt(r,i),qi(e,t),t.tag=1,Fe(r)?(e=!0,fo(t)):e=!1,bn(t,n),Zf(t,r,i),fs(t,r,i,n),ps(null,t,r,!0,e,n);case 19:return Ld(e,t,n);case 22:return _d(e,t,n)}throw Error(_(156,t.tag))};function Qd(e,t){return gf(e,t)}function oy(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ge(e,t,n,r){return new oy(e,t,n,r)}function _a(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ly(e){if(typeof e=="function")return _a(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hs)return 11;if(e===Qs)return 14}return 2}function Zt(e,t){var n=e.alternate;return n===null?(n=Ge(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xi(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")_a(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Dn:return yn(n.children,i,o,t);case Ws:l=8,i|=8;break;case Al:return e=Ge(12,n,t,i|2),e.elementType=Al,e.lanes=o,e;case zl:return e=Ge(13,n,t,i),e.elementType=zl,e.lanes=o,e;case Il:return e=Ge(19,n,t,i),e.elementType=Il,e.lanes=o,e;case Zc:return Uo(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Gc:l=10;break e;case Jc:l=9;break e;case Hs:l=11;break e;case Qs:l=14;break e;case Bt:l=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Ge(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function yn(e,t,n,r){return e=Ge(7,e,r,t),e.lanes=n,e}function Uo(e,t,n,r){return e=Ge(22,e,r,t),e.elementType=Zc,e.lanes=n,e.stateNode={isHidden:!1},e}function Nl(e,t,n){return e=Ge(6,e,null,t),e.lanes=n,e}function Pl(e,t,n){return t=Ge(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sy(e,t,n,r,i){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=al(0),this.expirationTimes=al(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=al(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ra(e,t,n,r,i,o,l,s,a){return e=new sy(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ge(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ua(o),e}function ay(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yd)}catch(e){console.error(e)}}Yd(),Kc.exports=Qe;var hy=Kc.exports,oc=hy;Ol.createRoot=oc.createRoot,Ol.hydrateRoot=oc.hydrateRoot;/** + * @remix-run/router v1.8.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function or(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function my(){return Math.random().toString(36).substr(2,8)}function sc(e,t){return{usr:e.state,key:e.key,idx:t}}function oi(e,t,n,r){return n===void 0&&(n=null),ne({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ot(t):t,{state:n,key:t&&t.key||r||my()})}function fi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ot(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function yy(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,s=he.Pop,a=null,u=h();u==null&&(u=0,l.replaceState(ne({},l.state,{idx:u}),""));function h(){return(l.state||{idx:null}).idx}function y(){s=he.Pop;let L=h(),d=L==null?null:L-u;u=L,a&&a({action:s,location:S.location,delta:d})}function p(L,d){s=he.Push;let c=oi(S.location,L,d);n&&n(c,L),u=h()+1;let m=sc(c,u),f=S.createHref(c);try{l.pushState(m,"",f)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(f)}o&&a&&a({action:s,location:S.location,delta:1})}function x(L,d){s=he.Replace;let c=oi(S.location,L,d);n&&n(c,L),u=h();let m=sc(c,u),f=S.createHref(c);l.replaceState(m,"",f),o&&a&&a({action:s,location:S.location,delta:0})}function v(L){let d=i.location.origin!=="null"?i.location.origin:i.location.href,c=typeof L=="string"?L:fi(L);return V(d,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,d)}let S={get action(){return s},get location(){return e(i,l)},listen(L){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(lc,y),a=L,()=>{i.removeEventListener(lc,y),a=null}},createHref(L){return t(i,L)},createURL:v,encodeLocation(L){let d=v(L);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:p,replace:x,go(L){return l.go(L)}};return S}var ce;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ce||(ce={}));const gy=new Set(["lazy","caseSensitive","path","id","index","children"]);function vy(e){return e.index===!0}function Rs(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let l=[...n,o],s=typeof i.id=="string"?i.id:l.join("-");if(V(i.index!==!0||!i.children,"Cannot specify children on an index route"),V(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),vy(i)){let a=ne({},i,t(i),{id:s});return r[s]=a,a}else{let a=ne({},i,t(i),{id:s,children:void 0});return r[s]=a,i.children&&(a.children=Rs(i.children,t,l,r)),a}})}function Vn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Ot(t):t,i=di(r.pathname||"/",n);if(i==null)return null;let o=Xd(e);wy(o);let l=null;for(let s=0;l==null&&s{let a={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};a.relativePath.startsWith("/")&&(V(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=en([r,a.relativePath]),h=n.concat(a);o.children&&o.children.length>0&&(V(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Xd(o.children,t,h,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Ry(u,o.index),routesMeta:h})};return e.forEach((o,l)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,l);else for(let a of Gd(o.path))i(o,l,a)}),t}function Gd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=Gd(r.join("/")),s=[];return s.push(...l.map(a=>a===""?o:[o,a].join("/"))),i&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function wy(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ny(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const xy=/^:\w+$/,Sy=3,Ey=2,ky=1,Cy=10,_y=-2,ac=e=>e==="*";function Ry(e,t){let n=e.split("/"),r=n.length;return n.some(ac)&&(r+=_y),t&&(r+=Ey),n.filter(i=>!ac(i)).reduce((i,o)=>i+(xy.test(o)?Sy:o===""?ky:Cy),r)}function Ny(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Py(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let l=0;l{if(h==="*"){let p=s[y]||"";l=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return u[h]=jy(s[y]||"",h),u},{}),pathname:o,pathnameBase:l,pattern:e}}function Ty(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),or(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(l,s)=>(r.push(s),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Dy(e){try{return decodeURI(e)}catch(t){return or(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function jy(e,t){try{return decodeURIComponent(e)}catch(n){return or(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function di(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Oy(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ot(e):e;return{pathname:n?n.startsWith("/")?n:My(n,t):t,search:zy(r),hash:Iy(i)}}function My(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ll(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Ta(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Jd(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ot(e):(i=ne({},e),V(!i.pathname||!i.pathname.includes("?"),Ll("?","pathname","search",i)),V(!i.pathname||!i.pathname.includes("#"),Ll("#","pathname","hash",i)),V(!i.search||!i.search.includes("#"),Ll("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,s;if(r||l==null)s=n;else{let y=t.length-1;if(l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),y-=1;i.pathname=p.join("/")}s=y>=0?t[y]:"/"}let a=Oy(i,s),u=l&&l!=="/"&&l.endsWith("/"),h=(o||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||h)&&(a.pathname+="/"),a}const en=e=>e.join("/").replace(/\/\/+/g,"/"),Ay=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zy=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Iy=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class uc extends Error{}class Fy{constructor(t,n){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],V(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let r;this.abortPromise=new Promise((o,l)=>r=l),this.controller=new AbortController;let i=()=>r(new uc("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",i),this.controller.signal.addEventListener("abort",i),this.data=Object.entries(t).reduce((o,l)=>{let[s,a]=l;return Object.assign(o,{[s]:this.trackPromise(s,a)})},{}),this.done&&this.unlistenAbortSignal(),this.init=n}trackPromise(t,n){if(!(n instanceof Promise))return n;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let r=Promise.race([n,this.abortPromise]).then(i=>this.onSettle(r,t,void 0,i),i=>this.onSettle(r,t,i));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(t,n,r,i){if(this.controller.signal.aborted&&r instanceof uc)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(n),this.done&&this.unlistenAbortSignal(),r===void 0&&i===void 0){let o=new Error('Deferred data for key "'+n+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>o}),this.emit(!1,n),Promise.reject(o)}return i===void 0?(Object.defineProperty(t,"_error",{get:()=>r}),this.emit(!1,n),Promise.reject(r)):(Object.defineProperty(t,"_data",{get:()=>i}),this.emit(!1,n),i)}emit(t,n){this.subscribers.forEach(r=>r(t,n))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,n)=>this.pendingKeysSet.delete(n)),this.emit(!0)}async resolveData(t){let n=!1;if(!this.done){let r=()=>this.cancel();t.addEventListener("abort",r),n=await new Promise(i=>{this.subscribe(o=>{t.removeEventListener("abort",r),(o||this.done)&&i(o)})})}return n}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return V(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,n)=>{let[r,i]=n;return Object.assign(t,{[r]:By(i)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Uy(e){return e instanceof Promise&&e._tracked===!0}function By(e){if(!Uy(e))return e;if(e._error)throw e._error;return e._data}const $y=function(t,n){n===void 0&&(n={});let r=typeof n=="number"?{status:n}:n;return new Fy(t,r)};class Da{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Zd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const eh=["post","put","patch","delete"],Vy=new Set(eh),Wy=["get",...eh],Hy=new Set(Wy),Qy=new Set([301,302,303,307,308]),Ky=new Set([307,308]),Tl={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qy={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Er={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},th=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,by=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function Yy(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;V(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let g=e.detectErrorBoundary;i=w=>({hasErrorBoundary:g(w)})}else i=by;let o={},l=Rs(e.routes,i,void 0,o),s,a=e.basename||"/",u=ne({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),h=null,y=new Set,p=null,x=null,v=null,S=e.hydrationData!=null,L=Vn(l,e.history.location,a),d=null;if(L==null){let g=qe(404,{pathname:e.history.location.pathname}),{matches:w,route:k}=gc(l);L=w,d={[k.id]:g}}let c=!L.some(g=>g.route.lazy)&&(!L.some(g=>g.route.loader)||e.hydrationData!=null),m,f={historyAction:e.history.action,location:e.history.location,matches:L,initialized:c,navigation:Tl,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||d,fetchers:new Map,blockers:new Map},C=he.Pop,P=!1,N,j=!1,Q=!1,I=[],we=[],G=new Map,ft=0,Mt=-1,At=new Map,Be=new Set,dt=new Map,T=new Map,z=new Map,$=!1;function ie(){return h=e.history.listen(g=>{let{action:w,location:k,delta:O}=g;if($){$=!1;return}or(z.size===0||O!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let B=qa({currentLocation:f.location,nextLocation:k,historyAction:w});if(B&&O!=null){$=!0,e.history.go(O*-1),pi(B,{state:"blocked",location:k,proceed(){pi(B,{state:"proceeding",proceed:void 0,reset:void 0,location:k}),e.history.go(O)},reset(){let F=new Map(f.blockers);F.set(B,Er),J({blockers:F})}});return}return zt(w,k)}),f.initialized||zt(he.Pop,f.location),m}function de(){h&&h(),y.clear(),N&&N.abort(),f.fetchers.forEach((g,w)=>Xo(w)),f.blockers.forEach((g,w)=>Ka(w))}function _n(g){return y.add(g),()=>y.delete(g)}function J(g){f=ne({},f,g),y.forEach(w=>w(f))}function xt(g,w){var k,O;let B=f.actionData!=null&&f.navigation.formMethod!=null&&ot(f.navigation.formMethod)&&f.navigation.state==="loading"&&((k=g.state)==null?void 0:k._isRedirect)!==!0,F;w.actionData?Object.keys(w.actionData).length>0?F=w.actionData:F=null:B?F=f.actionData:F=null;let U=w.loaderData?yc(f.loaderData,w.loaderData,w.matches||[],w.errors):f.loaderData,A=f.blockers;A.size>0&&(A=new Map(A),A.forEach((X,ke)=>A.set(ke,Er)));let M=P===!0||f.navigation.formMethod!=null&&ot(f.navigation.formMethod)&&((O=g.state)==null?void 0:O._isRedirect)!==!0;s&&(l=s,s=void 0),j||C===he.Pop||(C===he.Push?e.history.push(g,g.state):C===he.Replace&&e.history.replace(g,g.state)),J(ne({},w,{actionData:F,loaderData:U,historyAction:C,location:g,initialized:!0,navigation:Tl,revalidation:"idle",restoreScrollPosition:Ya(g,w.matches||f.matches),preventScrollReset:M,blockers:A})),C=he.Pop,P=!1,j=!1,Q=!1,I=[],we=[]}async function ht(g,w){if(typeof g=="number"){e.history.go(g);return}let k=Ns(f.location,f.matches,a,u.v7_prependBasename,g,w==null?void 0:w.fromRouteId,w==null?void 0:w.relative),{path:O,submission:B,error:F}=cc(u.v7_normalizeFormMethod,!1,k,w),U=f.location,A=oi(f.location,O,w&&w.state);A=ne({},A,e.history.encodeLocation(A));let M=w&&w.replace!=null?w.replace:void 0,X=he.Push;M===!0?X=he.Replace:M===!1||B!=null&&ot(B.formMethod)&&B.formAction===f.location.pathname+f.location.search&&(X=he.Replace);let ke=w&&"preventScrollReset"in w?w.preventScrollReset===!0:void 0,b=qa({currentLocation:U,nextLocation:A,historyAction:X});if(b){pi(b,{state:"blocked",location:A,proceed(){pi(b,{state:"proceeding",proceed:void 0,reset:void 0,location:A}),ht(g,w)},reset(){let ue=new Map(f.blockers);ue.set(b,Er),J({blockers:ue})}});return}return await zt(X,A,{submission:B,pendingError:F,preventScrollReset:ke,replace:w&&w.replace})}function Rn(){if(Yo(),J({revalidation:"loading"}),f.navigation.state!=="submitting"){if(f.navigation.state==="idle"){zt(f.historyAction,f.location,{startUninterruptedRevalidation:!0});return}zt(C||f.historyAction,f.navigation.location,{overrideNavigation:f.navigation})}}async function zt(g,w,k){N&&N.abort(),N=null,C=g,j=(k&&k.startUninterruptedRevalidation)===!0,Ih(f.location,f.matches),P=(k&&k.preventScrollReset)===!0;let O=s||l,B=k&&k.overrideNavigation,F=Vn(O,w,a);if(!F){let ue=qe(404,{pathname:w.pathname}),{matches:xe,route:sn}=gc(O);Go(),xt(w,{matches:xe,loaderData:{},errors:{[sn.id]:ue}});return}if(f.initialized&&!Q&&eg(f.location,w)&&!(k&&k.submission&&ot(k.submission.formMethod))){xt(w,{matches:F});return}N=new AbortController;let U=Cr(e.history,w,N.signal,k&&k.submission),A,M;if(k&&k.pendingError)M={[Wn(F).route.id]:k.pendingError};else if(k&&k.submission&&ot(k.submission.formMethod)){let ue=await Th(U,w,k.submission,F,{replace:k.replace});if(ue.shortCircuited)return;A=ue.pendingActionData,M=ue.pendingActionError,B=Oi(w,k.submission),U=new Request(U.url,{signal:U.signal})}let{shortCircuited:X,loaderData:ke,errors:b}=await Dh(U,w,F,B,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,A,M);X||(N=null,xt(w,ne({matches:F},A?{actionData:A}:{},{loaderData:ke,errors:b})))}async function Th(g,w,k,O,B){B===void 0&&(B={}),Yo();let F=og(w,k);J({navigation:F});let U,A=Ls(O,w);if(!A.route.action&&!A.route.lazy)U={type:ce.error,error:qe(405,{method:g.method,pathname:w.pathname,routeId:A.route.id})};else if(U=await kr("action",g,A,O,o,i,a),g.signal.aborted)return{shortCircuited:!0};if(Xn(U)){let M;return B&&B.replace!=null?M=B.replace:M=U.location===f.location.pathname+f.location.search,await fr(f,U,{submission:k,replace:M}),{shortCircuited:!0}}if($r(U)){let M=Wn(O,A.route.id);return(B&&B.replace)!==!0&&(C=he.Push),{pendingActionData:{},pendingActionError:{[M.route.id]:U.error}}}if(pn(U))throw qe(400,{type:"defer-action"});return{pendingActionData:{[A.route.id]:U.data}}}async function Dh(g,w,k,O,B,F,U,A,M){let X=O||Oi(w,B),ke=B||F||xc(X),b=s||l,[ue,xe]=fc(e.history,f,k,ke,w,Q,I,we,dt,Be,b,a,A,M);if(Go(Y=>!(k&&k.some(tt=>tt.route.id===Y))||ue&&ue.some(tt=>tt.route.id===Y)),Mt=++ft,ue.length===0&&xe.length===0){let Y=Ha();return xt(w,ne({matches:k,loaderData:{},errors:M||null},A?{actionData:A}:{},Y?{fetchers:new Map(f.fetchers)}:{})),{shortCircuited:!0}}if(!j){xe.forEach(tt=>{let Ft=f.fetchers.get(tt.key),nl=_r(void 0,Ft?Ft.data:void 0);f.fetchers.set(tt.key,nl)});let Y=A||f.actionData;J(ne({navigation:X},Y?Object.keys(Y).length===0?{actionData:null}:{actionData:Y}:{},xe.length>0?{fetchers:new Map(f.fetchers)}:{}))}xe.forEach(Y=>{G.has(Y.key)&&It(Y.key),Y.controller&&G.set(Y.key,Y.controller)});let sn=()=>xe.forEach(Y=>It(Y.key));N&&N.signal.addEventListener("abort",sn);let{results:an,loaderResults:dr,fetcherResults:Jo}=await Va(f.matches,k,ue,xe,g);if(g.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",sn),xe.forEach(Y=>G.delete(Y.key));let St=vc(an);if(St){if(St.idx>=ue.length){let Y=xe[St.idx-ue.length].key;Be.add(Y)}return await fr(f,St.result,{replace:U}),{shortCircuited:!0}}let{loaderData:Et,errors:mi}=mc(f,k,ue,dr,M,xe,Jo,T);T.forEach((Y,tt)=>{Y.subscribe(Ft=>{(Ft||Y.done)&&T.delete(tt)})});let Zo=Ha(),el=Qa(Mt),tl=Zo||el||xe.length>0;return ne({loaderData:Et,errors:mi},tl?{fetchers:new Map(f.fetchers)}:{})}function $a(g){return f.fetchers.get(g)||qy}function jh(g,w,k,O){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");G.has(g)&&It(g);let B=s||l,F=Ns(f.location,f.matches,a,u.v7_prependBasename,k,w,O==null?void 0:O.relative),U=Vn(B,F,a);if(!U){hi(g,w,qe(404,{pathname:F}));return}let{path:A,submission:M,error:X}=cc(u.v7_normalizeFormMethod,!0,F,O);if(X){hi(g,w,X);return}let ke=Ls(U,A);if(P=(O&&O.preventScrollReset)===!0,M&&ot(M.formMethod)){Oh(g,w,A,ke,U,M);return}dt.set(g,{routeId:w,path:A}),Mh(g,w,A,ke,U,M)}async function Oh(g,w,k,O,B,F){if(Yo(),dt.delete(g),!O.route.action&&!O.route.lazy){let ye=qe(405,{method:F.formMethod,pathname:k,routeId:w});hi(g,w,ye);return}let U=f.fetchers.get(g),A=lg(F,U);f.fetchers.set(g,A),J({fetchers:new Map(f.fetchers)});let M=new AbortController,X=Cr(e.history,k,M.signal,F);G.set(g,M);let ke=ft,b=await kr("action",X,O,B,o,i,a);if(X.signal.aborted){G.get(g)===M&&G.delete(g);return}if(Xn(b))if(G.delete(g),Mt>ke){let ye=Pn(void 0);f.fetchers.set(g,ye),J({fetchers:new Map(f.fetchers)});return}else{Be.add(g);let ye=_r(F);return f.fetchers.set(g,ye),J({fetchers:new Map(f.fetchers)}),fr(f,b,{submission:F,isFetchActionRedirect:!0})}if($r(b)){hi(g,w,b.error);return}if(pn(b))throw qe(400,{type:"defer-action"});let ue=f.navigation.location||f.location,xe=Cr(e.history,ue,M.signal),sn=s||l,an=f.navigation.state!=="idle"?Vn(sn,f.navigation.location,a):f.matches;V(an,"Didn't find any matches after fetcher action");let dr=++ft;At.set(g,dr);let Jo=_r(F,b.data);f.fetchers.set(g,Jo);let[St,Et]=fc(e.history,f,an,F,ue,Q,I,we,dt,Be,sn,a,{[O.route.id]:b.data},void 0);Et.filter(ye=>ye.key!==g).forEach(ye=>{let hr=ye.key,Xa=f.fetchers.get(hr),Uh=_r(void 0,Xa?Xa.data:void 0);f.fetchers.set(hr,Uh),G.has(hr)&&It(hr),ye.controller&&G.set(hr,ye.controller)}),J({fetchers:new Map(f.fetchers)});let mi=()=>Et.forEach(ye=>It(ye.key));M.signal.addEventListener("abort",mi);let{results:Zo,loaderResults:el,fetcherResults:tl}=await Va(f.matches,an,St,Et,xe);if(M.signal.aborted)return;M.signal.removeEventListener("abort",mi),At.delete(g),G.delete(g),Et.forEach(ye=>G.delete(ye.key));let Y=vc(Zo);if(Y){if(Y.idx>=St.length){let ye=Et[Y.idx-St.length].key;Be.add(ye)}return fr(f,Y.result)}let{loaderData:tt,errors:Ft}=mc(f,f.matches,St,el,void 0,Et,tl,T);if(f.fetchers.has(g)){let ye=Pn(b.data);f.fetchers.set(g,ye)}let nl=Qa(dr);f.navigation.state==="loading"&&dr>Mt?(V(C,"Expected pending action"),N&&N.abort(),xt(f.navigation.location,{matches:an,loaderData:tt,errors:Ft,fetchers:new Map(f.fetchers)})):(J(ne({errors:Ft,loaderData:yc(f.loaderData,tt,an,Ft)},nl||Et.length>0?{fetchers:new Map(f.fetchers)}:{})),Q=!1)}async function Mh(g,w,k,O,B,F){let U=f.fetchers.get(g),A=_r(F,U?U.data:void 0);f.fetchers.set(g,A),J({fetchers:new Map(f.fetchers)});let M=new AbortController,X=Cr(e.history,k,M.signal);G.set(g,M);let ke=ft,b=await kr("loader",X,O,B,o,i,a);if(pn(b)&&(b=await ih(b,X.signal,!0)||b),G.get(g)===M&&G.delete(g),X.signal.aborted)return;if(Xn(b))if(Mt>ke){let xe=Pn(void 0);f.fetchers.set(g,xe),J({fetchers:new Map(f.fetchers)});return}else{Be.add(g),await fr(f,b);return}if($r(b)){let xe=Wn(f.matches,w);f.fetchers.delete(g),J({fetchers:new Map(f.fetchers),errors:{[xe.route.id]:b.error}});return}V(!pn(b),"Unhandled fetcher deferred data");let ue=Pn(b.data);f.fetchers.set(g,ue),J({fetchers:new Map(f.fetchers)})}async function fr(g,w,k){let{submission:O,replace:B,isFetchActionRedirect:F}=k===void 0?{}:k;w.revalidate&&(Q=!0);let U=oi(g.location,w.location,ne({_isRedirect:!0},F?{_isFetchActionRedirect:!0}:{}));if(V(U,"Expected a location on the redirect navigation"),n){let X=!1;if(w.reloadDocument)X=!0;else if(th.test(w.location)){const ke=e.history.createURL(w.location);X=ke.origin!==t.location.origin||di(ke.pathname,a)==null}if(X){B?t.location.replace(w.location):t.location.assign(w.location);return}}N=null;let A=B===!0?he.Replace:he.Push,M=O||xc(g.navigation);if(Ky.has(w.status)&&M&&ot(M.formMethod))await zt(A,U,{submission:ne({},M,{formAction:w.location}),preventScrollReset:P});else if(F)await zt(A,U,{overrideNavigation:Oi(U),fetcherSubmission:M,preventScrollReset:P});else{let X=Oi(U,M);await zt(A,U,{overrideNavigation:X,preventScrollReset:P})}}async function Va(g,w,k,O,B){let F=await Promise.all([...k.map(M=>kr("loader",B,M,w,o,i,a)),...O.map(M=>M.matches&&M.match&&M.controller?kr("loader",Cr(e.history,M.path,M.controller.signal),M.match,M.matches,o,i,a):{type:ce.error,error:qe(404,{pathname:M.path})})]),U=F.slice(0,k.length),A=F.slice(k.length);return await Promise.all([wc(g,k,U,U.map(()=>B.signal),!1,f.loaderData),wc(g,O.map(M=>M.match),A,O.map(M=>M.controller?M.controller.signal:null),!0)]),{results:F,loaderResults:U,fetcherResults:A}}function Yo(){Q=!0,I.push(...Go()),dt.forEach((g,w)=>{G.has(w)&&(we.push(w),It(w))})}function hi(g,w,k){let O=Wn(f.matches,w);Xo(g),J({errors:{[O.route.id]:k},fetchers:new Map(f.fetchers)})}function Xo(g){let w=f.fetchers.get(g);G.has(g)&&!(w&&w.state==="loading"&&At.has(g))&&It(g),dt.delete(g),At.delete(g),Be.delete(g),f.fetchers.delete(g)}function It(g){let w=G.get(g);V(w,"Expected fetch controller: "+g),w.abort(),G.delete(g)}function Wa(g){for(let w of g){let k=$a(w),O=Pn(k.data);f.fetchers.set(w,O)}}function Ha(){let g=[],w=!1;for(let k of Be){let O=f.fetchers.get(k);V(O,"Expected fetcher: "+k),O.state==="loading"&&(Be.delete(k),g.push(k),w=!0)}return Wa(g),w}function Qa(g){let w=[];for(let[k,O]of At)if(O0}function Ah(g,w){let k=f.blockers.get(g)||Er;return z.get(g)!==w&&z.set(g,w),k}function Ka(g){f.blockers.delete(g),z.delete(g)}function pi(g,w){let k=f.blockers.get(g)||Er;V(k.state==="unblocked"&&w.state==="blocked"||k.state==="blocked"&&w.state==="blocked"||k.state==="blocked"&&w.state==="proceeding"||k.state==="blocked"&&w.state==="unblocked"||k.state==="proceeding"&&w.state==="unblocked","Invalid blocker state transition: "+k.state+" -> "+w.state);let O=new Map(f.blockers);O.set(g,w),J({blockers:O})}function qa(g){let{currentLocation:w,nextLocation:k,historyAction:O}=g;if(z.size===0)return;z.size>1&&or(!1,"A router only supports one blocker at a time");let B=Array.from(z.entries()),[F,U]=B[B.length-1],A=f.blockers.get(F);if(!(A&&A.state==="proceeding")&&U({currentLocation:w,nextLocation:k,historyAction:O}))return F}function Go(g){let w=[];return T.forEach((k,O)=>{(!g||g(O))&&(k.cancel(),w.push(O),T.delete(O))}),w}function zh(g,w,k){if(p=g,v=w,x=k||null,!S&&f.navigation===Tl){S=!0;let O=Ya(f.location,f.matches);O!=null&&J({restoreScrollPosition:O})}return()=>{p=null,v=null,x=null}}function ba(g,w){return x&&x(g,w.map(O=>ig(O,f.loaderData)))||g.key}function Ih(g,w){if(p&&v){let k=ba(g,w);p[k]=v()}}function Ya(g,w){if(p){let k=ba(g,w),O=p[k];if(typeof O=="number")return O}return null}function Fh(g){o={},s=Rs(g,i,void 0,o)}return m={get basename(){return a},get state(){return f},get routes(){return l},initialize:ie,subscribe:_n,enableScrollRestoration:zh,navigate:ht,fetch:jh,revalidate:Rn,createHref:g=>e.history.createHref(g),encodeLocation:g=>e.history.encodeLocation(g),getFetcher:$a,deleteFetcher:Xo,dispose:de,getBlocker:Ah,deleteBlocker:Ka,_internalFetchControllers:G,_internalActiveDeferreds:T,_internalSetRoutes:Fh},m}function Xy(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ns(e,t,n,r,i,o,l){let s,a;if(o!=null&&l!=="path"){s=[];for(let h of t)if(s.push(h),h.route.id===o){a=h;break}}else s=t,a=t[t.length-1];let u=Jd(i||".",Ta(s).map(h=>h.pathnameBase),di(e.pathname,n)||e.pathname,l==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&a&&a.route.index&&!ja(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:en([n,u.pathname])),fi(u)}function cc(e,t,n,r){if(!r||!Xy(r))return{path:n};if(r.formMethod&&!rg(r.formMethod))return{path:n,error:qe(405,{method:r.formMethod})};let i=()=>({path:n,error:qe(400,{type:"invalid-body"})}),o=r.formMethod||"get",l=e?o.toUpperCase():o.toLowerCase(),s=rh(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ot(l))return i();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((x,v)=>{let[S,L]=v;return""+x+S+"="+L+` +`},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!ot(l))return i();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return i()}}}V(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=Ps(r.formData),u=r.formData;else if(r.body instanceof FormData)a=Ps(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=pc(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=pc(a)}catch{return i()}let h={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(ot(h.formMethod))return{path:n,submission:h};let y=Ot(n);return t&&y.search&&ja(y.search)&&a.append("index",""),y.search="?"+a,{path:fi(y),submission:h}}function Gy(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function fc(e,t,n,r,i,o,l,s,a,u,h,y,p,x){let v=x?Object.values(x)[0]:p?Object.values(p)[0]:void 0,S=e.createURL(t.location),L=e.createURL(i),d=x?Object.keys(x)[0]:void 0,m=Gy(n,d).filter((C,P)=>{if(C.route.lazy)return!0;if(C.route.loader==null)return!1;if(Jy(t.loaderData,t.matches[P],C)||l.some(Q=>Q===C.route.id))return!0;let N=t.matches[P],j=C;return dc(C,ne({currentUrl:S,currentParams:N.params,nextUrl:L,nextParams:j.params},r,{actionResult:v,defaultShouldRevalidate:o||S.pathname+S.search===L.pathname+L.search||S.search!==L.search||nh(N,j)}))}),f=[];return a.forEach((C,P)=>{if(!n.some(we=>we.route.id===C.routeId))return;let N=Vn(h,C.path,y);if(!N){f.push({key:P,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let j=t.fetchers.get(P),Q=Ls(N,C.path),I=!1;u.has(P)?I=!1:s.includes(P)?I=!0:j&&j.state!=="idle"&&j.data===void 0?I=o:I=dc(Q,ne({currentUrl:S,currentParams:t.matches[t.matches.length-1].params,nextUrl:L,nextParams:n[n.length-1].params},r,{actionResult:v,defaultShouldRevalidate:o})),I&&f.push({key:P,routeId:C.routeId,path:C.path,matches:N,match:Q,controller:new AbortController})}),[m,f]}function Jy(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function nh(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function dc(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function hc(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];V(i,"No route found in manifest");let o={};for(let l in r){let a=i[l]!==void 0&&l!=="hasErrorBoundary";or(!a,'Route "'+i.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!a&&!gy.has(l)&&(o[l]=r[l])}Object.assign(i,o),Object.assign(i,ne({},t(i),{lazy:void 0}))}async function kr(e,t,n,r,i,o,l,s){s===void 0&&(s={});let a,u,h,y=v=>{let S,L=new Promise((d,c)=>S=c);return h=()=>S(),t.signal.addEventListener("abort",h),Promise.race([v({request:t,params:n.params,context:s.requestContext}),L])};try{let v=n.route[e];if(n.route.lazy)if(v)u=(await Promise.all([y(v),hc(n.route,o,i)]))[0];else if(await hc(n.route,o,i),v=n.route[e],v)u=await y(v);else if(e==="action"){let S=new URL(t.url),L=S.pathname+S.search;throw qe(405,{method:t.method,pathname:L,routeId:n.route.id})}else return{type:ce.data,data:void 0};else if(v)u=await y(v);else{let S=new URL(t.url),L=S.pathname+S.search;throw qe(404,{pathname:L})}V(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(v){a=ce.error,u=v}finally{h&&t.signal.removeEventListener("abort",h)}if(ng(u)){let v=u.status;if(Qy.has(v)){let d=u.headers.get("Location");if(V(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!th.test(d))d=Ns(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,d);else if(!s.isStaticRequest){let c=new URL(t.url),m=d.startsWith("//")?new URL(c.protocol+d):new URL(d),f=di(m.pathname,l)!=null;m.origin===c.origin&&f&&(d=m.pathname+m.search+m.hash)}if(s.isStaticRequest)throw u.headers.set("Location",d),u;return{type:ce.redirect,status:v,location:d,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:a===ce.error?ce.error:ce.data,response:u};let S,L=u.headers.get("Content-Type");return L&&/\bapplication\/json\b/.test(L)?S=await u.json():S=await u.text(),a===ce.error?{type:a,error:new Da(v,u.statusText,S),headers:u.headers}:{type:ce.data,data:S,statusCode:u.status,headers:u.headers}}if(a===ce.error)return{type:a,error:u};if(tg(u)){var p,x;return{type:ce.deferred,deferredData:u,statusCode:(p=u.init)==null?void 0:p.status,headers:((x=u.init)==null?void 0:x.headers)&&new Headers(u.init.headers)}}return{type:ce.data,data:u}}function Cr(e,t,n,r){let i=e.createURL(rh(t)).toString(),o={signal:n};if(r&&ot(r.formMethod)){let{formMethod:l,formEncType:s}=r;o.method=l.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=Ps(r.formData):o.body=r.formData}return new Request(i,o)}function Ps(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function pc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Zy(e,t,n,r,i){let o={},l=null,s,a=!1,u={};return n.forEach((h,y)=>{let p=t[y].route.id;if(V(!Xn(h),"Cannot handle redirect results in processLoaderData"),$r(h)){let x=Wn(e,p),v=h.error;r&&(v=Object.values(r)[0],r=void 0),l=l||{},l[x.route.id]==null&&(l[x.route.id]=v),o[p]=void 0,a||(a=!0,s=Zd(h.error)?h.error.status:500),h.headers&&(u[p]=h.headers)}else pn(h)?(i.set(p,h.deferredData),o[p]=h.deferredData.data):o[p]=h.data,h.statusCode!=null&&h.statusCode!==200&&!a&&(s=h.statusCode),h.headers&&(u[p]=h.headers)}),r&&(l=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:l,statusCode:s||200,loaderHeaders:u}}function mc(e,t,n,r,i,o,l,s){let{loaderData:a,errors:u}=Zy(t,n,r,i,s);for(let h=0;hr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function gc(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function qe(e,t){let{pathname:n,routeId:r,method:i,type:o}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(l="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",s='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new Da(e||500,l,new Error(s),!0)}function vc(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Xn(n))return{result:n,idx:t}}}function rh(e){let t=typeof e=="string"?Ot(e):e;return fi(ne({},t,{hash:""}))}function eg(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function pn(e){return e.type===ce.deferred}function $r(e){return e.type===ce.error}function Xn(e){return(e&&e.type)===ce.redirect}function tg(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function ng(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function rg(e){return Hy.has(e.toLowerCase())}function ot(e){return Vy.has(e.toLowerCase())}async function wc(e,t,n,r,i,o){for(let l=0;ly.route.id===a.route.id),h=u!=null&&!nh(u,a)&&(o&&o[a.route.id])!==void 0;if(pn(s)&&(i||h)){let y=r[l];V(y,"Expected an AbortSignal for revalidating fetcher deferred result"),await ih(s,y,i).then(p=>{p&&(n[l]=p||n[l])})}}}async function ih(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ce.data,data:e.deferredData.unwrappedData}}catch(i){return{type:ce.error,error:i}}return{type:ce.data,data:e.deferredData.data}}}function ja(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ig(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function Ls(e,t){let n=typeof t=="string"?Ot(t).search:t.search;if(e[e.length-1].route.index&&ja(n||""))return e[e.length-1];let r=Ta(e);return r[r.length-1]}function xc(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:l}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function Oi(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function og(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function _r(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function lg(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}function Pn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}/** + * React Router v6.15.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ro(){return Ro=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.pathnameBase)),l=R.useRef(!1);return ah(()=>{l.current=!0}),R.useCallback(function(a,u){if(u===void 0&&(u={}),!l.current)return;if(typeof a=="number"){n.go(a);return}let h=Jd(a,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:en([t,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[t,n,o,i,e])}const uh=R.createContext(null);function Oa(){return R.useContext(uh)}function ug(e){let t=R.useContext(Cn).outlet;return t&&R.createElement(uh.Provider,{value:e},t)}function cg(e,t,n){qo()||V(!1);let{navigator:r}=R.useContext(Qo),{matches:i}=R.useContext(Cn),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let a=sh(),u;if(t){var h;let S=typeof t=="string"?Ot(t):t;s==="/"||(h=S.pathname)!=null&&h.startsWith(s)||V(!1),u=S}else u=a;let y=u.pathname||"/",p=s==="/"?y:y.slice(s.length)||"/",x=Vn(e,{pathname:p}),v=mg(x&&x.map(S=>Object.assign({},S,{params:Object.assign({},l,S.params),pathname:en([s,r.encodeLocation?r.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?s:en([s,r.encodeLocation?r.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),i,n);return t&&v?R.createElement(Ko.Provider,{value:{location:Ro({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:he.Pop}},v):v}function fg(){let e=dh(),t=Zd(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:i},n):null,o)}const dg=R.createElement(fg,null);class hg extends R.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?R.createElement(Cn.Provider,{value:this.props.routeContext},R.createElement(lh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pg(e){let{routeContext:t,match:n,children:r}=e,i=R.useContext(Ho);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(Cn.Provider,{value:t},r)}function mg(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,l=(r=n)==null?void 0:r.errors;if(l!=null){let s=o.findIndex(a=>a.route.id&&(l==null?void 0:l[a.route.id]));s>=0||V(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((s,a,u)=>{let h=a.route.id?l==null?void 0:l[a.route.id]:null,y=null;n&&(y=a.route.errorElement||dg);let p=t.concat(o.slice(0,u+1)),x=()=>{let v;return h?v=y:a.route.Component?v=R.createElement(a.route.Component,null):a.route.element?v=a.route.element:v=s,R.createElement(pg,{match:a,routeContext:{outlet:s,matches:p,isDataRoute:n!=null},children:v})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?R.createElement(hg,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:x(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):x()},null)}var ch=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ch||{}),lr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(lr||{});function yg(e){let t=R.useContext(Ho);return t||V(!1),t}function fh(e){let t=R.useContext(oh);return t||V(!1),t}function gg(e){let t=R.useContext(Cn);return t||V(!1),t}function Ma(e){let t=gg(),n=t.matches[t.matches.length-1];return n.route.id||V(!1),n.route.id}function vg(){let e=fh(lr.UseLoaderData),t=Ma(lr.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function dh(){var e;let t=R.useContext(lh),n=fh(lr.UseRouteError),r=Ma(lr.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function wg(){let{router:e}=yg(ch.UseNavigateStable),t=Ma(lr.UseNavigateStable),n=R.useRef(!1);return ah(()=>{n.current=!0}),R.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ro({fromRouteId:t},o)))},[e,t])}const xg="startTransition",Sc=rp[xg];function Sg(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=R.useState(n.state),{v7_startTransition:l}=r||{},s=R.useCallback(y=>{l&&Sc?Sc(()=>o(y)):o(y)},[o,l]);R.useLayoutEffect(()=>n.subscribe(s),[n,s]);let a=R.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:y=>n.navigate(y),push:(y,p,x)=>n.navigate(y,{state:p,preventScrollReset:x==null?void 0:x.preventScrollReset}),replace:(y,p,x)=>n.navigate(y,{replace:!0,state:p,preventScrollReset:x==null?void 0:x.preventScrollReset})}),[n]),u=n.basename||"/",h=R.useMemo(()=>({router:n,navigator:a,static:!1,basename:u}),[n,a,u]);return R.createElement(R.Fragment,null,R.createElement(Ho.Provider,{value:h},R.createElement(oh.Provider,{value:i},R.createElement(Cg,{basename:u,location:i.location,navigationType:i.historyAction,navigator:a},i.initialized?R.createElement(Eg,{routes:n.routes,state:i}):t))),null)}function Eg(e){let{routes:t,state:n}=e;return cg(t,void 0,n)}function kg(e){return ug(e.context)}function Cg(e){let{basename:t="/",children:n=null,location:r,navigationType:i=he.Pop,navigator:o,static:l=!1}=e;qo()&&V(!1);let s=t.replace(/^\/*/,"/"),a=R.useMemo(()=>({basename:s,navigator:o,static:l}),[s,o,l]);typeof r=="string"&&(r=Ot(r));let{pathname:u="/",search:h="",hash:y="",state:p=null,key:x="default"}=r,v=R.useMemo(()=>{let S=di(u,s);return S==null?null:{location:{pathname:S,search:h,hash:y,state:p,key:x},navigationType:i}},[s,u,h,y,p,x,i]);return v==null?null:R.createElement(Qo.Provider,{value:a},R.createElement(Ko.Provider,{children:n,value:v}))}new Promise(()=>{});function _g(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:R.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:R.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.15.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function No(){return No=Object.assign?Object.assign.bind():function(e){for(var t=1;t{Gi[wt[e]]=e});const Ts={type:"error",data:"parser error"},hh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ph=typeof ArrayBuffer=="function",mh=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Aa=({type:e,data:t},n,r)=>hh&&t instanceof Blob?n?r(t):Cc(t,r):ph&&(t instanceof ArrayBuffer||mh(t))?n?r(t):Cc(new Blob([t]),r):r(wt[e]+(t||"")),Cc=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function _c(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Dl;function Lg(e,t){if(hh&&e.data instanceof Blob)return e.data.arrayBuffer().then(_c).then(t);if(ph&&(e.data instanceof ArrayBuffer||mh(e.data)))return t(_c(e.data));Aa(e,!1,n=>{Dl||(Dl=new TextEncoder),t(Dl.encode(n))})}const Rc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,l,s,a;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(l&15)<<4|s>>2,h[i++]=(s&3)<<6|a&63;return u},Dg=typeof ArrayBuffer=="function",za=(e,t)=>{if(typeof e!="string")return{type:"message",data:yh(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:jg(e.substring(1),t)}:Gi[n]?e.length>1?{type:Gi[n],data:e.substring(1)}:{type:Gi[n]}:Ts},jg=(e,t)=>{if(Dg){const n=Tg(e);return yh(n,t)}else return{base64:!0,data:e}},yh=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},gh=String.fromCharCode(30),Og=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,l)=>{Aa(o,!1,s=>{r[l]=s,++i===n&&t(r.join(gh))})})},Mg=(e,t)=>{const n=e.split(gh),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let jl;function Mi(e){return e.reduce((t,n)=>t+n.length,0)}function Ai(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){s.enqueue(Ts);break}i=h*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Mi(n)e){s.enqueue(Ts);break}}}})}const vh=4;function me(e){if(e)return Ig(e)}function Ig(e){for(var t in me.prototype)e[t]=me.prototype[t];return e}me.prototype.on=me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};me.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};me.prototype.off=me.prototype.removeListener=me.prototype.removeAllListeners=me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function wh(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Fg=Xe.setTimeout,Ug=Xe.clearTimeout;function bo(e,t){t.useNativeTimers?(e.setTimeoutFn=Fg.bind(Xe),e.clearTimeoutFn=Ug.bind(Xe)):(e.setTimeoutFn=Xe.setTimeout.bind(Xe),e.clearTimeoutFn=Xe.clearTimeout.bind(Xe))}const Bg=1.33;function $g(e){return typeof e=="string"?Vg(e):Math.ceil((e.byteLength||e.size)*Bg)}function Vg(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function Wg(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Hg(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function Sh(){const e=Lc(+new Date);return e!==Pc?(Nc=0,Pc=e):e+"."+Lc(Nc++)}for(;zi{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Mg(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Og(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Sh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Gn(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let Gn=class Ji extends me{constructor(t,n){super(),bo(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=wh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new kh(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Ji.requestsCount++,Ji.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=bg,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ji.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};Gn.requestsCount=0;Gn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Tc);else if(typeof addEventListener=="function"){const e="onpagehide"in Xe?"pagehide":"unload";addEventListener(e,Tc,!1)}}function Tc(){for(let e in Gn.requests)Gn.requests.hasOwnProperty(e)&&Gn.requests[e].abort()}const Fa=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Ii=Xe.WebSocket||Xe.MozWebSocket,Dc=!0,Gg="arraybuffer",jc=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Jg extends Ia{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=jc?{}:wh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Dc&&!jc?n?new Ii(t,n):new Ii(t):new Ii(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const l={};try{Dc&&this.ws.send(o)}catch{}i&&Fa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Sh()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!Ii}}class Zg extends Ia{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=zg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Ag();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:s,value:a})=>{s||(this.onPacket(a),o())}).catch(s=>{})};o();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this.writer.write(l).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&Fa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const ev={websocket:Jg,webtransport:Zg,polling:Xg},tv=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,nv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function js(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=tv.exec(e||""),o={},l=14;for(;l--;)o[nv[l]]=i[l]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=rv(o,o.path),o.queryKey=iv(o,o.query),o}function rv(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function iv(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Ch=class Ln extends me{constructor(t,n={}){super(),this.binaryType=Gg,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=js(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=js(n.host).host),bo(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Hg(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=vh,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new ev[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ln.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Ln.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!r)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ln.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const l=y=>{const p=new Error("probe error: "+y);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function s(){l("transport closed")}function a(){l("socket closed")}function u(y){n&&y.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",l),n.removeListener("close",s),this.off("close",a),this.off("upgrading",u)};n.once("open",i),n.once("error",l),n.once("close",s),this.once("close",a),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Ln.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Ln.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_h=Object.prototype.toString,av=typeof Blob=="function"||typeof Blob<"u"&&_h.call(Blob)==="[object BlobConstructor]",uv=typeof File=="function"||typeof File<"u"&&_h.call(File)==="[object FileConstructor]";function Ua(e){return lv&&(e instanceof ArrayBuffer||sv(e))||av&&e instanceof Blob||uv&&e instanceof File}function Zi(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let l=0;l{this.io.clearTimeoutFn(o),n.apply(this,[null,...l])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((l,s)=>r?l?o(l):i(s):i(l)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:H.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case H.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case H.EVENT:case H.BINARY_EVENT:this.onevent(t);break;case H.ACK:case H.BINARY_ACK:this.onack(t);break;case H.DISCONNECT:this.ondisconnect();break;case H.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:H.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:H.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}cr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};cr.prototype.reset=function(){this.attempts=0};cr.prototype.setMin=function(e){this.ms=e};cr.prototype.setMax=function(e){this.max=e};cr.prototype.setJitter=function(e){this.jitter=e};class As extends me{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,bo(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new cr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||yv;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ch(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=lt(n,"open",function(){r.onopen(),t&&t()}),o=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},l=lt(n,"error",o);if(this._timeout!==!1){const s=this._timeout,a=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},s);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(i),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(lt(t,"ping",this.onping.bind(this)),lt(t,"data",this.ondata.bind(this)),lt(t,"error",this.onerror.bind(this)),lt(t,"close",this.onclose.bind(this)),lt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Fa(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Rh(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Rr={};function eo(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=ov(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,l=Rr[i]&&o in Rr[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let a;return s?a=new As(r,t):(Rr[i]||(Rr[i]=new As(r,t)),a=Rr[i]),n.query&&!t.query&&(t.query=n.queryKey),a.socket(n.path,t)}Object.assign(eo,{Manager:As,Socket:Rh,io:eo,connect:eo});const Nh=({children:e})=>E.jsx("div",{className:"text-center font-mono",children:e}),vv=()=>{const{error:e,stack:t}=dh();return E.jsx(Nh,{children:E.jsxs("div",{className:"bg-red-500 rounded-lg text-left",children:[E.jsx("div",{className:"text-lg font-bold",children:"An error happenned :("}),E.jsx("br",{}),E.jsx("div",{className:"font-bold",children:e}),E.jsx("div",{children:t})]})})},Ph=()=>E.jsx("div",{children:"loading..."}),wv=({data:e})=>{const[t,n]=R.useState([]);return R.useEffect(()=>{const r=[],i=Object.keys(e[0]);r.push(i),e.forEach(o=>{const l=Object.values(o);r.push(l)}),n(r)},[e]),E.jsx("table",{className:"border-2 border-spacing-2 border-cyan-300 mb-3",children:t.map((r,i)=>i===0?E.jsx("thead",{className:"font-bold border-b-2",children:E.jsx("tr",{children:r.map((o,l)=>E.jsx("th",{className:"p-2",children:o},l))})},i):E.jsx("tbody",{children:E.jsx("tr",{children:r.map((o,l)=>E.jsx("td",{className:"p-2",children:o!==""&&o!==null?o.toString():"-"},l))})},i))})},Lh=({isDisabled:e,type:t,text:n,onClick:r})=>E.jsx("button",{onClick:r,type:t,disabled:e,className:"hover:-translate-x-1 hover:-translate-y-1 hover:cursor-pointer hover:border-solid hover:border-r-4 hover:border-b-4 hover:border-slate-900 transition-all ease-in-out duration-100 tracking-wider w-max block m-auto py-[8px] px-[12px] text-lg font-bold",style:{cursor:e?"not-allowed":"pointer",backgroundColor:e?"lightgray":"#347de3"},children:n}),xv=()=>{var p;const e=Oa(),[t,n]=R.useState(((p=window.sessionStorage.getItem("query"))==null?void 0:p.toString())||""),[r,i]=R.useState([]),[o,l]=R.useState(!1),[s,a]=R.useState(""),u=()=>{window.sessionStorage.setItem("query",t),e.emit("query",t,window.sessionStorage.getItem("sessionId"))},h=({command:x,rowCount:v,rows:S})=>{const L=S.length>0;let d="";L?i(S):(i([]),x.toLowerCase()==="select"?d="no data to be showed":d=`command ${x} runned successfully, ${v||"0"} rows affected`),l(!1),a(d)},y=x=>{l(!0),a(x),i([])};return R.useEffect(()=>(e.on("queryResults",h),e.on("queryResultsError",y),()=>{e.removeAllListeners("queryResults"),e.removeAllListeners("queryResultsError")}),[]),E.jsxs("div",{className:"basis-2/3 max-h-[2/3vh] overflow-hidden",children:[E.jsxs("div",{className:"flex justify-between items-center h-[10vh] p-4",children:[E.jsx("div",{className:"text-left",children:"Output:"}),E.jsx("div",{className:"mr-0",children:E.jsx(Lh,{isDisabled:!t,type:"button",text:"run",onClick:u})})]}),E.jsx("div",{className:"h-[40vh] px-4 overflow-x-auto",children:r.length>0?E.jsx(wv,{data:r}):E.jsxs("span",{className:`block text-left ${o?"text-red-500":""}`,role:o?"alert":"",children:[o&&"Error: "," ",s]})}),E.jsx("textarea",{className:"border-2 rounded-lg h-[30vh] w-full resize-none focus:outline-none",placeholder:"query here!",value:t,onInput:x=>{const v=x.target.value;n(v)},cols:40,rows:60})]})};function Sv({onClick:e}){const t="#ddd",[n,r]=R.useState(t);return E.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"#000000",viewBox:"0 0 256 256",className:"hover:cursor-pointer",onClick:e,onMouseOver:()=>r("darkred"),onMouseLeave:()=>r(t),children:[E.jsx("rect",{width:"256",height:"256",fill:"none"}),E.jsx("line",{x1:"216",y1:"56",x2:"40",y2:"56",fill:"none",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),E.jsx("line",{x1:"104",y1:"104",x2:"104",y2:"168",fill:"none",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),E.jsx("line",{x1:"152",y1:"104",x2:"152",y2:"168",fill:"none",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),E.jsx("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56",fill:"none",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),E.jsx("path",{d:"M168,56V40a16,16,0,0,0-16-16H104A16,16,0,0,0,88,40V56",fill:"none",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})}function Mc({onClick:e,size:t,isFixedColor:n,highlightColor:r}){const i=n?r:"#ddd",[o,l]=R.useState(i);return E.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:t,height:t,onClick:e,onMouseOver:n?void 0:()=>l(r),onMouseLeave:n?void 0:()=>l(i),children:[E.jsx("rect",{width:"256",height:"256",fill:"none"}),E.jsx("path",{d:"M200,224H56a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h96l56,56V216A8,8,0,0,1,200,224Z",fill:"none",stroke:o,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),E.jsx("polyline",{points:"152 32 152 88 208 88",fill:"none",stroke:o,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),E.jsx("polyline",{points:"104 144 128 120 152 144",fill:"none",stroke:o,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),E.jsx("line",{x1:"128",y1:"184",x2:"128",y2:"120",fill:"none",stroke:o,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})}const Ev=({children:e,ctaText:t,setIsModalOpen:n,onSubmit:r,icon:i,title:o})=>{const l=R.useRef(!0),s=a=>{if(l.current){l.current=!1;return}!!a.target.closest("form")||n(!1)};return R.useEffect(()=>(document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}),[]),E.jsxs("div",{className:"relative z-10","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[E.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),E.jsx("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:E.jsx("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:E.jsxs("form",{onSubmit:r,className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[E.jsx("div",{className:"px-4 py-5 sm:p-6 sm:pb-4",children:E.jsxs("div",{className:"flex items-center justify-start",children:[E.jsx("div",{children:i}),E.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[E.jsx("h3",{className:"text-base font-semibold leading-6 text-gray-900",id:"modal-title",children:o}),E.jsx("div",{className:"mt-2 text-sm text-gray-500",children:e})]})]})}),E.jsxs("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[E.jsx("button",{type:"submit",className:"inline-flex w-full justify-center rounded-md bg-blue-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-700 sm:ml-3 sm:w-auto",children:t}),E.jsx("button",{onClick:()=>n(!1),type:"button",className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",children:"Cancel"})]})]})})})]})},kv=()=>{const e=Oa(),[t,n]=R.useState([]),[r,i]=R.useState(!1),[o,l]=R.useState(""),[s,a]=R.useState(""),[u,h]=R.useState(!1),y=d=>{n(d)},p=d=>{h(!0),a(d)},x=d=>{const c=`DROP TABLE IF EXISTS ${d}`;e.emit("query",c,window.sessionStorage.getItem("sessionId"))},v=async d=>{d.preventDefault();try{const c=new FormData(d.target),m=c.get("file"),f=await fetch(`/upload/presign-url?tableName=${o}&socketId=${e.id}`),{presignedUrl:C}=await f.json();await fetch(C,{method:"PUT",body:m});const P=c.get("insert-mode");e.emit("insertData",P?P.toString():"",o)}catch(c){h(!0),a(c.message)}finally{i(!1)}},S=()=>{h(!1),a("data sucessfully inserted")},L=d=>{h(!0),a(d)};return R.useEffect(()=>(e.emit("getTables"),e.on("tables",y),e.on("tablesError",p),e.on("dataInserted",S),e.on("dataInsertedError",L),()=>{e.removeAllListeners("tables"),e.removeAllListeners("tablesError"),e.removeAllListeners("dataInserted"),e.removeAllListeners("dataInsertedError")}),[]),E.jsxs("div",{className:"basis-1/5 bg-slate-500 text-left py-3 overflow-x-hidden overflow-y-auto relative",children:[r&&E.jsx(Ev,{title:"Upload data",icon:E.jsx(Mc,{size:80,isFixedColor:!0,highlightColor:"black"}),onSubmit:v,ctaText:"Upload",setIsModalOpen:i,children:E.jsxs("div",{className:"flex flex-col items-start py-4 gap-4",children:[E.jsx("div",{children:E.jsx("input",{type:"file",accept:"csv",name:"file","aria-label":"choose file",placeholder:"file..."})}),E.jsxs("div",{className:"flex justify-start gap-4",children:[E.jsxs("div",{className:"flex gap-1",children:[E.jsx("input",{type:"radio",name:"insert-mode",id:"append",value:"append",defaultChecked:!0}),E.jsx("label",{htmlFor:"append",children:"append data"})]}),E.jsxs("div",{className:"flex gap-1",children:[E.jsx("input",{type:"radio",name:"insert-mode",id:"replace",value:"replace"}),E.jsx("label",{htmlFor:"replace",children:"replace data"})]})]})]})}),E.jsx("div",{className:"text-lg font-bold pl-3 text-center",children:"Tables"}),t.length>0?E.jsx("div",{className:"w-full",children:t.map((d,c)=>{const m=d.tablename;return E.jsxs("div",{className:"pl-2 my-5 flex justify-between items-center",children:[E.jsx("div",{className:"basis-1/12",children:c+1}),E.jsx("div",{className:"basis-9/12 px-4 w-[15vw]",children:E.jsxs("div",{className:"flex flex-col justify-start items-start gap-2 overflow-x-auto whitespace-nowrap",children:[E.jsxs("div",{children:["name: ",m]}),E.jsxs("div",{className:"flex flex-col justify-start text-xs gap-1",children:[E.jsxs("div",{children:["indexes: ",String(d.hasindexes)]}),E.jsxs("div",{children:["owner: ",String(d.tableowner)]})]})]})}),E.jsxs("div",{className:"basis-2/12 flex flex-col gap-3 items-center",children:[E.jsx("div",{role:"button","aria-label":`Upload data to table ${m}`,children:E.jsx(Mc,{size:20,highlightColor:"lightgreen",isFixedColor:!1,onClick:()=>{i(!0),l(m)}})}),E.jsx("div",{role:"button","aria-label":`Delete table ${m}`,children:E.jsx(Sv,{onClick:()=>x(m)})})]})]},c)})}):E.jsx("div",{className:"text-center pt-2",children:"There are no tables yet"}),s&&E.jsxs("div",{className:`${u?"bg-red-200 text-red-500":"bg-emerald-200 text-green-700"} absolute bottom-[20%] left-[50%] translate-x-[-50%] z-10 flex items-center justify-between gap-6 p-3 rounded-md`,children:[E.jsxs("div",{role:"alert",className:"basis-5",children:[u&&"Error: "," ",s]}),E.jsx("button",{onClick:()=>a(""),className:"basis-1",children:"x"})]})]})},Cv=()=>{const e=Oa(),[t,n]=R.useState([]),r=async()=>{const i=await fetch(`/commands?sessionId=${window.sessionStorage.getItem("sessionId")}`),{commands:o}=await i.json();o&&n(o)};return R.useEffect(()=>(e.on("queryResults",r),e.on("queryResultsError",r),fetch(`/commands?sessionId=${window.sessionStorage.getItem("sessionId")}`).then(i=>i.json()).then(({commands:i})=>{i&&n(i)}),()=>{e.removeAllListeners("queryResults"),e.removeAllListeners("queryResultsError")}),[]),E.jsxs("div",{className:"basis-1/3 max-h-[1/3vh] bg-blue-300 w-full overflow-y-auto",children:[E.jsxs("div",{className:"flex justify-start gap-5 p-3 items-center font-bold",children:[E.jsx("div",{className:"basis-1/4",children:"timestamp"}),E.jsx("div",{className:"basis-1/4",children:"query"}),E.jsx("div",{className:"basis-1/4",children:"command type"}),E.jsx("div",{className:"basis-1/4",children:"rows affected"})]}),E.jsx("hr",{className:"border-t-stone-900"}),E.jsx("div",{className:"h-[80%] overflow-y-auto",children:t.map((i,o)=>E.jsxs("div",{children:[E.jsxs("div",{className:"flex justify-start gap-5 p-3 items-center",children:[E.jsx("div",{className:"basis-1/4",children:i.timestamp.split(".")[0]}),E.jsx("div",{className:"basis-1/4",children:i.query}),E.jsxs("div",{className:"basis-1/4",children:["command type: ",i.command]}),E.jsxs("div",{className:"basis-1/4",children:["rows affected: ",i.rowCount]})]}),E.jsx("hr",{})]},o))})]})},_v=()=>E.jsxs("div",{className:"flex flex-row justify-start w-[100vw] h-[100vh]",children:[E.jsx(kv,{}),E.jsxs("div",{className:"flex flex-col max-w-[80vw] basis-4/5",children:[E.jsx(xv,{}),E.jsx(Cv,{})]})]}),Fi=({name:e,placeholder:t,type:n,validValues:r})=>{const[i,o]=R.useState(""),l=s=>{const a=s.target.value;r&&!(r!=null&&r.includes(a))?o(`The values must be one of the following: ${r.join(", ")}`):o(""),setTimeout(()=>{document.forms[0].dispatchEvent(new Event("input"))},0)};return E.jsxs(E.Fragment,{children:[E.jsx("input",{"aria-invalid":!!i,"aria-errormessage":i,onInput:l,required:!0,className:"border-2 rounded pl-1 text-sm",type:n,name:e,placeholder:t}),i&&E.jsx("span",{className:"text-left text-red-500 text-sm leading-3",role:"alert",children:i})]})},Rv=()=>{const[e,t]=R.useState(!0),n=()=>{const o=[...document.forms[0].elements].filter(a=>a.tagName==="INPUT"),l=o.length;let s=0;if(o.forEach(a=>{const u=a.value,h=a.getAttribute("aria-invalid")==="false";u&&h&&s++}),s===l)return t(!1);t(!0)},r=i=>{const o=new FormData(i.target);for(const l of o.entries()){const s=l[0],a=String(l[1])||"";window.sessionStorage.setItem(s,a)}};return R.useEffect(()=>{const i=document.forms[0];return i&&i.addEventListener("input",n),()=>{i&&i.removeEventListener("input",n)}},[]),E.jsxs("form",{method:"get",action:"/",onSubmit:r,className:"absolute top-2/4 left-2/4 -translate-x-1/2 -translate-y-2/3 p-[20px] rounded-md border border-slate-300 flex flex-col gap-3 justify-center w-[25vw]",children:[E.jsx("span",{className:"text-lg text-slate-800",children:"Login to your database"}),E.jsx(Fi,{name:"database",placeholder:"database name...",type:"text"}),E.jsx(Fi,{name:"username",placeholder:"username...",type:"text"}),E.jsx(Fi,{name:"password",placeholder:"password...",type:"password"}),E.jsx(Fi,{name:"port",placeholder:"port...",type:"text"}),E.jsx(Lh,{type:"submit",isDisabled:e,text:"Login"})]})},Nv=(e,{request:t})=>{const n=new URL(t.url),r=Object.fromEntries(n.searchParams);let i={};const o=["username","password","database","port"],l=o.length,s=Object.keys(r),a=s.length===l,u=s.every(p=>o.includes(p)&&r[p]);a&&u?i={...r}:o.forEach(p=>{const x=window.sessionStorage.getItem(p);x&&(i[p]=x)});const h=Object.keys(i).length===l;let y={};return h?(e.emit("connectClientToDb",{...i}),y=new Promise((p,x)=>{try{e.on("isConnectedToDb",v=>{p(v)})}catch(v){x(v)}})):y=Promise.resolve(!1),$y({isConnectedToDbPromise:y,socket:e})},Pv=()=>{const{isConnectedToDbPromise:e,socket:t}=vg(),n=sg(),[r,i]=R.useState(!0);return R.useEffect(()=>{e.then(o=>{if(o)return window.sessionStorage.getItem("sessionId")||window.sessionStorage.setItem("sessionId",String(new Date().getTime())),n("/app");n("/login")}).catch(o=>{throw o}).finally(()=>{i(!1)})},[]),E.jsx(Nh,{children:r?E.jsx(Ph,{}):E.jsx(kg,{context:t})})},Lv=e=>Rg([{path:"/",element:E.jsx(Pv,{}),loader:t=>Nv(e,t),shouldRevalidate:()=>!1,errorElement:E.jsx(vv,{}),children:[{path:"/login",element:E.jsx(Rv,{})},{path:"/app",element:E.jsx(_v,{})}]}]);function Tv(){const[e,t]=R.useState({});return R.useEffect(()=>{const n=eo();t(n)},[]),e?E.jsx(Sg,{router:Lv(e)}):E.jsx(Ph,{})}Ol.createRoot(document.getElementById("root")).render(E.jsx(Hc.StrictMode,{children:E.jsx(Tv,{})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html new file mode 100644 index 0000000..46ea82a --- /dev/null +++ b/frontend/dist/index.html @@ -0,0 +1,18 @@ + + + + + + + Postgres Web Control + + + + +
+ + + diff --git a/package.json b/package.json index 1dd3b83..ae823d0 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "start": "node ./dist/src/app.js", "test": "NODE_ENV=test jest --detectOpenHandles --forceExit --coverage", "test:e2e": "npx playwright test --ui", - "test:e2e:ci": "sleep 15 && npx playwright test --ui", + "test:e2e:ci": "sleep 15 && npx playwright test", "lint": "eslint ." }, "keywords": [], diff --git a/tests/statifFiles.test.ts b/tests/statifFiles.test.ts index 5d8a9e4..1d775db 100644 --- a/tests/statifFiles.test.ts +++ b/tests/statifFiles.test.ts @@ -22,7 +22,7 @@ describe('static files delivering', () => { it('should return an HTML document file for an unmapped root', async () => { const response = await app.inject({ method: 'GET', - url: '/' + url: '/anything' }) expect(response.statusCode).toBe(200)