diff --git a/app/dist/.vite/manifest.json b/app/dist/.vite/manifest.json index cc64078..6159d44 100644 --- a/app/dist/.vite/manifest.json +++ b/app/dist/.vite/manifest.json @@ -1,11 +1,11 @@ { "index.html": { - "file": "assets/js/index-C1cVM5uK.js", + "file": "assets/js/index-Cuah7aaC.js", "name": "index", "src": "index.html", "isEntry": true, "css": [ - "assets/css/index-DoC2znbt.css" + "assets/css/index-DSfgb3Su.css" ] } } \ No newline at end of file diff --git a/app/dist/assets/css/index-DSfgb3Su.css b/app/dist/assets/css/index-DSfgb3Su.css new file mode 100644 index 0000000..4997f97 --- /dev/null +++ b/app/dist/assets/css/index-DSfgb3Su.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap";*,: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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{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,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}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-feature-settings:normal;font-variation-settings:normal;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;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([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]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--radius: .5rem;--sidebar-background: 0 0% 98%;--sidebar-foreground: 240 5.3% 26.1%;--sidebar-primary: 240 5.9% 10%;--sidebar-primary-foreground: 0 0% 98%;--sidebar-accent: 240 4.8% 95.9%;--sidebar-accent-foreground: 240 5.9% 10%;--sidebar-border: 220 13% 91%;--sidebar-ring: 217.2 91.2% 59.8%}.dark{--background: 0 0% 3.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%;--sidebar-background: 240 5.9% 10%;--sidebar-foreground: 240 4.8% 95.9%;--sidebar-primary: 224.3 76.3% 48%;--sidebar-primary-foreground: 0 0% 100%;--sidebar-accent: 240 3.7% 15.9%;--sidebar-accent-foreground: 240 4.8% 95.9%;--sidebar-border: 240 3.7% 15.9%;--sidebar-ring: 217.2 91.2% 59.8%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-3\.5{top:.875rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[100\]{z-index:100}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-full{grid-column:1 / -1}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3\.5{margin-left:.875rem;margin-right:.875rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mr-8{margin-right:2rem}.mr-auto{margin-right:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-4{width:1rem;height:1rem}.h-0\.5{height:.125rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[400px\]{height:400px}.h-\[600px\]{height:600px}.h-\[80vh\]{height:80vh}.h-\[calc\(100vh-20rem\)\]{height:calc(100vh - 20rem)}.h-\[calc\(80vh-8rem\)\]{height:calc(80vh - 8rem)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-96{max-height:24rem}.max-h-\[200px\]{max-height:200px}.max-h-\[400px\]{max-height:400px}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-\[100px\]{min-height:100px}.min-h-\[200px\]{min-height:200px}.min-h-\[400px\]{min-height:400px}.min-h-\[60px\]{min-height:60px}.min-h-\[calc\(100vh-3\.5rem\)\]{min-height:calc(100vh - 3.5rem)}.min-h-screen{min-height:100vh}.min-h-svh{min-height:100svh}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[--sidebar-width\]{width:var(--sidebar-width)}.w-\[100px\]{width:100px}.w-\[150px\]{width:150px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-5{min-width:1.25rem}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[--skeleton-width\]{max-width:var(--skeleton-width)}.max-w-\[1600px\]{max-width:1600px}.max-w-\[calc\(100\%-16rem\)\]{max-width:calc(100% - 16rem)}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-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-x-px{--tw-translate-x: -1px;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))}.translate-x-px{--tw-translate-x: 1px;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-4{--tw-translate-y: 1rem;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-\[-50\%\]{--tw-translate-y: -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))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-500\/20{border-color:#3b82f633}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-green-500\/20{border-color:#22c55e33}.border-input{border-color:hsl(var(--input))}.border-neutral-300{--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity, 1))}.border-neutral-500\/20{border-color:#73737333}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-neutral-800\/20{border-color:#26262633}.border-neutral-800\/40{border-color:#26262666}.border-neutral-800\/50{border-color:#26262680}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500\/20{border-color:#ef444433}.border-sidebar-border{border-color:hsl(var(--sidebar-border))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-yellow-500\/20{border-color:#eab30833}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-900\/20{background-color:#14532d33}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-neutral-500\/10{background-color:#7373731a}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.bg-neutral-800\/20{background-color:#26262633}.bg-neutral-800\/50{background-color:#26262680}.bg-neutral-800\/75{background-color:#262626bf}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-neutral-900\/20{background-color:#17171733}.bg-neutral-900\/40{background-color:#17171766}.bg-neutral-900\/95{background-color:#171717f2}.bg-neutral-950{--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity, 1))}.bg-neutral-950\/50{background-color:#0a0a0a80}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-red-900\/20{background-color:#7f1d1d33}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sidebar{background-color:hsl(var(--sidebar-background))}.bg-sidebar-border{background-color:hsl(var(--sidebar-border))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity, 1))}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.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-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-\[\'JetBrains_Mono\'\]{font-family:JetBrains Mono}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.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-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-cyan-500{--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/80{color:hsl(var(--muted-foreground) / .8)}.text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity, 1))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.text-neutral-700{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sidebar-foreground{color:hsl(var(--sidebar-foreground))}.text-sidebar-foreground\/70{color:hsl(var(--sidebar-foreground) / .7)}.text-violet-500{--tw-text-opacity: 1;color:rgb(139 92 246 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px 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-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-border));--tw-shadow-colored: 0 0 0 1px 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-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px 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-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px 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-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-sidebar-ring{--tw-ring-color: hsl(var(--sidebar-ring))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);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)}.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)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\,opa\]{transition-property:margin,opa;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;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}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.delay-200{transition-delay:.2s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in,.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-1000{animation-duration:1s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.delay-100{animation-delay:.1s}.delay-200{animation-delay:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{animation-timing-function:linear}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.font-mono{font-family:JetBrains Mono,monospace}@font-face{font-family:Mozilla Text;src:url(/assets/MozillaText-Variable.woff2) format("woff2-variations"),url(/assets/MozillaText-Variable.woff) format("woff-variations"),url(/assets/MozillaText-Variable.ttf) format("truetype-variations");font-weight:100 900;font-style:normal}@font-face{font-family:Mozilla Text;src:url(/assets/MozillaTextItalic-Variable.woff2) format("woff2-variations"),url(/assets/MozillaTextItalic-Variable.woff) format("woff-variations"),url(/assets/MozillaTextItalic-Variable.ttf) format("truetype-variations");font-weight:100 900;font-style:italic}*{font-family:Mozilla Text,sans-serif}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);top:-.5rem;right:-.5rem;bottom:-.5rem;left:-.5rem}.after\:inset-y-0:after{content:var(--tw-content);top:0;bottom:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.hover\:border-neutral-700\/50:hover{border-color:#40404080}.hover\:border-primary:hover{border-color:hsl(var(--primary))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-800\/50:hover{background-color:#26262680}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-sidebar-accent:hover{background-color:hsl(var(--sidebar-accent))}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-neutral-400:hover{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-sidebar-accent-foreground:hover{color:hsl(var(--sidebar-accent-foreground))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-accent));--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:hsl(var(--sidebar-border))}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-destructive:focus{color:hsl(var(--destructive))}.focus\:text-red-400:focus{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.focus\:text-white:focus{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--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(0px + 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)}.focus\:ring-1:focus{--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)}.focus\:ring-2:focus{--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(2px + 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)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--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(0px + 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)}.focus-visible\:ring-1:focus-visible{--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)}.focus-visible\:ring-2:focus-visible{--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(2px + 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)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-sidebar-ring:focus-visible{--tw-ring-color: hsl(var(--sidebar-ring))}.focus-visible\:ring-offset-0:focus-visible{--tw-ring-offset-width: 0px}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\:bg-sidebar-accent:active{background-color:hsl(var(--sidebar-accent))}.active\:text-sidebar-accent-foreground:active{color:hsl(var(--sidebar-accent-foreground))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group\/menu-item:focus-within .group-focus-within\/menu-item\:opacity-100{opacity:1}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:translate-y-0{--tw-translate-y: 0px;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))}.group:hover .group-hover\:bg-neutral-800\/50{background-color:#26262680}.group\/menu-item:hover .group-hover\/menu-item\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer\/menu-button:hover~.peer-hover\/menu-button\:text-sidebar-accent-foreground{color:hsl(var(--sidebar-accent-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\[data-variant\=inset\]\]\:bg-sidebar:has([data-variant=inset]){background-color:hsl(var(--sidebar-background))}.group\/menu-item:has([data-sidebar=menu-action]) .group-has-\[\[data-sidebar\=menu-action\]\]\/menu-item\:pr-8{padding-right:2rem}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--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))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--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))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--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))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--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))}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;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))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);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))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);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))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{background-color:hsl(var(--sidebar-accent))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[active\=true\]\:font-medium[data-active=true]{font-weight:500}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{color:hsl(var(--sidebar-accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.data-\[state\=open\]\:hover\:bg-sidebar-accent:hover[data-state=open]{background-color:hsl(var(--sidebar-accent))}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground:hover[data-state=open]{color:hsl(var(--sidebar-accent-foreground))}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]{left:calc(var(--sidebar-width) * -1)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]{right:calc(var(--sidebar-width) * -1)}.group[data-side=left] .group-data-\[side\=left\]\:-right-4{right:-1rem}.group[data-side=right] .group-data-\[side\=right\]\:left-0{left:0}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:-mt-8{margin-top:-2rem}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:hidden{display:none}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!size-8{width:2rem!important;height:2rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[--sidebar-width-icon\]{width:var(--sidebar-width-icon)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)\)\]{width:calc(var(--sidebar-width-icon) + 1rem)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)_\+2px\)\]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:w-0{width:0px}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:translate-x-0{--tw-translate-x: 0px;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))}.group[data-side=right] .group-data-\[side\=right\]\:rotate-180{--tw-rotate: 180deg;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))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:overflow-hidden{overflow:hidden}.group[data-variant=floating] .group-data-\[variant\=floating\]\:rounded-lg{border-radius:var(--radius)}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border{border-width:1px}.group[data-side=left] .group-data-\[side\=left\]\:border-r{border-right-width:1px}.group[data-side=right] .group-data-\[side\=right\]\:border-l{border-left-width:1px}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border-sidebar-border{border-color:hsl(var(--sidebar-border))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!p-0{padding:0!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!p-2{padding:.5rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:opacity-0{opacity:0}.group[data-variant=floating] .group-data-\[variant\=floating\]\:shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:after\:left-full:after{content:var(--tw-content);left:100%}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:hover\:bg-sidebar:hover{background-color:hsl(var(--sidebar-background))}.peer\/menu-button[data-size=default]~.peer-data-\[size\=default\]\/menu-button\:top-1\.5{top:.375rem}.peer\/menu-button[data-size=lg]~.peer-data-\[size\=lg\]\/menu-button\:top-2\.5{top:.625rem}.peer\/menu-button[data-size=sm]~.peer-data-\[size\=sm\]\/menu-button\:top-1{top:.25rem}.peer[data-variant=inset]~.peer-data-\[variant\=inset\]\:min-h-\[calc\(100svh-theme\(spacing\.4\)\)\]{min-height:calc(100svh - 1rem)}.peer\/menu-button[data-active=true]~.peer-data-\[active\=true\]\/menu-button\:text-sidebar-accent-foreground{color:hsl(var(--sidebar-accent-foreground))}@supports ((-webkit-backdrop-filter: var(--tw)) or (backdrop-filter: var(--tw))){.supports-\[backdrop-filter\]\:bg-neutral-900\/60{background-color:#17171799}}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:max-w-2xl{max-width:42rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:.625rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:block{display:block}.md\:flex{display:flex}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:opacity-0{opacity:0}.after\:md\:hidden:after{content:var(--tw-content);display:none}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:m-2{margin:.5rem}.peer[data-state=collapsed][data-variant=inset]~.md\:peer-data-\[state\=collapsed\]\:peer-data-\[variant\=inset\]\:ml-2{margin-left:.5rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:ml-0{margin-left:0}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:rounded-xl{border-radius:.75rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}}@media (min-width: 1024px){.lg\:inline{display:inline}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:col-span-3{grid-column:span 3 / span 3}.xl\:col-span-9{grid-column:span 9 / span 9}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;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))}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\:last-child\]\:truncate>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;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))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:h-3\.5>svg{height:.875rem}.\[\&\>svg\]\:w-3\.5>svg{width:.875rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:hsl(var(--sidebar-accent-foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;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))}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:-.5rem}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=left] .\[\[data-side\=left\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:-.5rem}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-side=right] .\[\[data-side\=right\]_\&\]\:cursor-e-resize{cursor:e-resize} diff --git a/app/dist/assets/css/index-DoC2znbt.css b/app/dist/assets/css/index-DoC2znbt.css deleted file mode 100644 index 7f26810..0000000 --- a/app/dist/assets/css/index-DoC2znbt.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap";*,: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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{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,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}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-feature-settings:normal;font-variation-settings:normal;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;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([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]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--radius: .5rem;--sidebar-background: 0 0% 98%;--sidebar-foreground: 240 5.3% 26.1%;--sidebar-primary: 240 5.9% 10%;--sidebar-primary-foreground: 0 0% 98%;--sidebar-accent: 240 4.8% 95.9%;--sidebar-accent-foreground: 240 5.9% 10%;--sidebar-border: 220 13% 91%;--sidebar-ring: 217.2 91.2% 59.8%}.dark{--background: 0 0% 3.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%;--sidebar-background: 240 5.9% 10%;--sidebar-foreground: 240 4.8% 95.9%;--sidebar-primary: 224.3 76.3% 48%;--sidebar-primary-foreground: 0 0% 100%;--sidebar-accent: 240 3.7% 15.9%;--sidebar-accent-foreground: 240 4.8% 95.9%;--sidebar-border: 240 3.7% 15.9%;--sidebar-ring: 217.2 91.2% 59.8%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-3\.5{top:.875rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[100\]{z-index:100}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-full{grid-column:1 / -1}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3\.5{margin-left:.875rem;margin-right:.875rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mr-8{margin-right:2rem}.mr-auto{margin-right:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-4{width:1rem;height:1rem}.h-0\.5{height:.125rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[400px\]{height:400px}.h-\[600px\]{height:600px}.h-\[80vh\]{height:80vh}.h-\[calc\(100vh-20rem\)\]{height:calc(100vh - 20rem)}.h-\[calc\(80vh-8rem\)\]{height:calc(80vh - 8rem)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-96{max-height:24rem}.max-h-\[200px\]{max-height:200px}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-\[200px\]{min-height:200px}.min-h-\[400px\]{min-height:400px}.min-h-\[60px\]{min-height:60px}.min-h-\[calc\(100vh-3\.5rem\)\]{min-height:calc(100vh - 3.5rem)}.min-h-screen{min-height:100vh}.min-h-svh{min-height:100svh}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[--sidebar-width\]{width:var(--sidebar-width)}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-5{min-width:1.25rem}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[--skeleton-width\]{max-width:var(--skeleton-width)}.max-w-\[1600px\]{max-width:1600px}.max-w-\[calc\(100\%-16rem\)\]{max-width:calc(100% - 16rem)}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-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-x-px{--tw-translate-x: -1px;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))}.translate-x-px{--tw-translate-x: 1px;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-4{--tw-translate-y: 1rem;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-\[-50\%\]{--tw-translate-y: -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))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-500\/20{border-color:#3b82f633}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-green-500\/20{border-color:#22c55e33}.border-input{border-color:hsl(var(--input))}.border-neutral-300{--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity, 1))}.border-neutral-500\/20{border-color:#73737333}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-neutral-800\/20{border-color:#26262633}.border-neutral-800\/40{border-color:#26262666}.border-neutral-800\/50{border-color:#26262680}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500\/20{border-color:#ef444433}.border-sidebar-border{border-color:hsl(var(--sidebar-border))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-yellow-500\/20{border-color:#eab30833}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-900\/20{background-color:#14532d33}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-neutral-500\/10{background-color:#7373731a}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.bg-neutral-800\/20{background-color:#26262633}.bg-neutral-800\/50{background-color:#26262680}.bg-neutral-800\/75{background-color:#262626bf}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-neutral-900\/20{background-color:#17171733}.bg-neutral-900\/40{background-color:#17171766}.bg-neutral-900\/95{background-color:#171717f2}.bg-neutral-950{--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity, 1))}.bg-neutral-950\/50{background-color:#0a0a0a80}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-red-900\/20{background-color:#7f1d1d33}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sidebar{background-color:hsl(var(--sidebar-background))}.bg-sidebar-border{background-color:hsl(var(--sidebar-border))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity, 1))}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.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-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-\[\'JetBrains_Mono\'\]{font-family:JetBrains Mono}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.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-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-cyan-500{--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/80{color:hsl(var(--muted-foreground) / .8)}.text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity, 1))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.text-neutral-700{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sidebar-foreground{color:hsl(var(--sidebar-foreground))}.text-sidebar-foreground\/70{color:hsl(var(--sidebar-foreground) / .7)}.text-violet-500{--tw-text-opacity: 1;color:rgb(139 92 246 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px 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-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-border));--tw-shadow-colored: 0 0 0 1px 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-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px 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-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px 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-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-sidebar-ring{--tw-ring-color: hsl(var(--sidebar-ring))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);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)}.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)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\,opa\]{transition-property:margin,opa;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;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}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.delay-200{transition-delay:.2s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in,.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-1000{animation-duration:1s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.delay-100{animation-delay:.1s}.delay-200{animation-delay:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{animation-timing-function:linear}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.font-mono{font-family:JetBrains Mono,monospace}@font-face{font-family:Mozilla Text;src:url(/assets/MozillaText-Variable.woff2) format("woff2-variations"),url(/assets/MozillaText-Variable.woff) format("woff-variations"),url(/assets/MozillaText-Variable.ttf) format("truetype-variations");font-weight:100 900;font-style:normal}@font-face{font-family:Mozilla Text;src:url(/assets/MozillaTextItalic-Variable.woff2) format("woff2-variations"),url(/assets/MozillaTextItalic-Variable.woff) format("woff-variations"),url(/assets/MozillaTextItalic-Variable.ttf) format("truetype-variations");font-weight:100 900;font-style:italic}*{font-family:Mozilla Text,sans-serif}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);top:-.5rem;right:-.5rem;bottom:-.5rem;left:-.5rem}.after\:inset-y-0:after{content:var(--tw-content);top:0;bottom:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.hover\:border-neutral-700\/50:hover{border-color:#40404080}.hover\:border-primary:hover{border-color:hsl(var(--primary))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-800\/50:hover{background-color:#26262680}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-sidebar-accent:hover{background-color:hsl(var(--sidebar-accent))}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-neutral-400:hover{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-sidebar-accent-foreground:hover{color:hsl(var(--sidebar-accent-foreground))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-accent));--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:hsl(var(--sidebar-border))}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-destructive:focus{color:hsl(var(--destructive))}.focus\:text-red-400:focus{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.focus\:text-white:focus{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--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(0px + 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)}.focus\:ring-1:focus{--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)}.focus\:ring-2:focus{--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(2px + 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)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--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(0px + 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)}.focus-visible\:ring-1:focus-visible{--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)}.focus-visible\:ring-2:focus-visible{--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(2px + 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)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-sidebar-ring:focus-visible{--tw-ring-color: hsl(var(--sidebar-ring))}.focus-visible\:ring-offset-0:focus-visible{--tw-ring-offset-width: 0px}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\:bg-sidebar-accent:active{background-color:hsl(var(--sidebar-accent))}.active\:text-sidebar-accent-foreground:active{color:hsl(var(--sidebar-accent-foreground))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group\/menu-item:focus-within .group-focus-within\/menu-item\:opacity-100{opacity:1}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:translate-y-0{--tw-translate-y: 0px;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))}.group:hover .group-hover\:bg-neutral-800\/50{background-color:#26262680}.group\/menu-item:hover .group-hover\/menu-item\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer\/menu-button:hover~.peer-hover\/menu-button\:text-sidebar-accent-foreground{color:hsl(var(--sidebar-accent-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\[data-variant\=inset\]\]\:bg-sidebar:has([data-variant=inset]){background-color:hsl(var(--sidebar-background))}.group\/menu-item:has([data-sidebar=menu-action]) .group-has-\[\[data-sidebar\=menu-action\]\]\/menu-item\:pr-8{padding-right:2rem}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--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))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--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))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--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))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--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))}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;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))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);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))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);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))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{background-color:hsl(var(--sidebar-accent))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[active\=true\]\:font-medium[data-active=true]{font-weight:500}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{color:hsl(var(--sidebar-accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.data-\[state\=open\]\:hover\:bg-sidebar-accent:hover[data-state=open]{background-color:hsl(var(--sidebar-accent))}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground:hover[data-state=open]{color:hsl(var(--sidebar-accent-foreground))}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]{left:calc(var(--sidebar-width) * -1)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]{right:calc(var(--sidebar-width) * -1)}.group[data-side=left] .group-data-\[side\=left\]\:-right-4{right:-1rem}.group[data-side=right] .group-data-\[side\=right\]\:left-0{left:0}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:-mt-8{margin-top:-2rem}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:hidden{display:none}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!size-8{width:2rem!important;height:2rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[--sidebar-width-icon\]{width:var(--sidebar-width-icon)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)\)\]{width:calc(var(--sidebar-width-icon) + 1rem)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)_\+2px\)\]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:w-0{width:0px}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:translate-x-0{--tw-translate-x: 0px;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))}.group[data-side=right] .group-data-\[side\=right\]\:rotate-180{--tw-rotate: 180deg;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))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:overflow-hidden{overflow:hidden}.group[data-variant=floating] .group-data-\[variant\=floating\]\:rounded-lg{border-radius:var(--radius)}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border{border-width:1px}.group[data-side=left] .group-data-\[side\=left\]\:border-r{border-right-width:1px}.group[data-side=right] .group-data-\[side\=right\]\:border-l{border-left-width:1px}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border-sidebar-border{border-color:hsl(var(--sidebar-border))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!p-0{padding:0!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!p-2{padding:.5rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:opacity-0{opacity:0}.group[data-variant=floating] .group-data-\[variant\=floating\]\:shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:after\:left-full:after{content:var(--tw-content);left:100%}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:hover\:bg-sidebar:hover{background-color:hsl(var(--sidebar-background))}.peer\/menu-button[data-size=default]~.peer-data-\[size\=default\]\/menu-button\:top-1\.5{top:.375rem}.peer\/menu-button[data-size=lg]~.peer-data-\[size\=lg\]\/menu-button\:top-2\.5{top:.625rem}.peer\/menu-button[data-size=sm]~.peer-data-\[size\=sm\]\/menu-button\:top-1{top:.25rem}.peer[data-variant=inset]~.peer-data-\[variant\=inset\]\:min-h-\[calc\(100svh-theme\(spacing\.4\)\)\]{min-height:calc(100svh - 1rem)}.peer\/menu-button[data-active=true]~.peer-data-\[active\=true\]\/menu-button\:text-sidebar-accent-foreground{color:hsl(var(--sidebar-accent-foreground))}@supports ((-webkit-backdrop-filter: var(--tw)) or (backdrop-filter: var(--tw))){.supports-\[backdrop-filter\]\:bg-neutral-900\/60{background-color:#17171799}}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:max-w-2xl{max-width:42rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:.625rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:block{display:block}.md\:flex{display:flex}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:opacity-0{opacity:0}.after\:md\:hidden:after{content:var(--tw-content);display:none}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:m-2{margin:.5rem}.peer[data-state=collapsed][data-variant=inset]~.md\:peer-data-\[state\=collapsed\]\:peer-data-\[variant\=inset\]\:ml-2{margin-left:.5rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:ml-0{margin-left:0}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:rounded-xl{border-radius:.75rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}}@media (min-width: 1024px){.lg\:inline{display:inline}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:col-span-3{grid-column:span 3 / span 3}.xl\:col-span-9{grid-column:span 9 / span 9}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;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))}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\:last-child\]\:truncate>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;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))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:h-3\.5>svg{height:.875rem}.\[\&\>svg\]\:w-3\.5>svg{width:.875rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:hsl(var(--sidebar-accent-foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;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))}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:-.5rem}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=left] .\[\[data-side\=left\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:-.5rem}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-side=right] .\[\[data-side\=right\]_\&\]\:cursor-e-resize{cursor:e-resize} diff --git a/app/dist/assets/js/index-C1cVM5uK.js b/app/dist/assets/js/index-C1cVM5uK.js deleted file mode 100644 index ca1451f..0000000 --- a/app/dist/assets/js/index-C1cVM5uK.js +++ /dev/null @@ -1,711 +0,0 @@ -var a8=Object.defineProperty;var EO=e=>{throw TypeError(e)};var o8=(e,t,n)=>t in e?a8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var s0=(e,t,n)=>o8(e,typeof t!="symbol"?t+"":t,n),l0=(e,t,n)=>t.has(e)||EO("Cannot "+n);var L=(e,t,n)=>(l0(e,t,"read from private field"),n?n.call(e):t.get(e)),me=(e,t,n)=>t.has(e)?EO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ce=(e,t,n,r)=>(l0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ke=(e,t,n)=>(l0(e,t,"access private method"),n);var Ph=(e,t,n,r)=>({set _(i){ce(e,t,i,n)},get _(){return L(e,t,r)}});function s8(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 a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Ch=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var TM={exports:{}},Gv={},_M={exports:{}},Ie={};/** - * @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 Hf=Symbol.for("react.element"),l8=Symbol.for("react.portal"),c8=Symbol.for("react.fragment"),u8=Symbol.for("react.strict_mode"),d8=Symbol.for("react.profiler"),f8=Symbol.for("react.provider"),h8=Symbol.for("react.context"),p8=Symbol.for("react.forward_ref"),m8=Symbol.for("react.suspense"),v8=Symbol.for("react.memo"),g8=Symbol.for("react.lazy"),NO=Symbol.iterator;function y8(e){return e===null||typeof e!="object"?null:(e=NO&&e[NO]||e["@@iterator"],typeof e=="function"?e:null)}var kM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MM=Object.assign,RM={};function Bc(e,t,n){this.props=e,this.context=t,this.refs=RM,this.updater=n||kM}Bc.prototype.isReactComponent={};Bc.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")};Bc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $M(){}$M.prototype=Bc.prototype;function CS(e,t,n){this.props=e,this.context=t,this.refs=RM,this.updater=n||kM}var OS=CS.prototype=new $M;OS.constructor=CS;MM(OS,Bc.prototype);OS.isPureReactComponent=!0;var TO=Array.isArray,DM=Object.prototype.hasOwnProperty,AS={current:null},IM={key:!0,ref:!0,__self:!0,__source:!0};function LM(e,t,n){var r,i={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)DM.call(t,r)&&!IM.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,U=I[z];if(0>>1;zi(ae,F))eei(K,ae)?(I[z]=K,I[ee]=F,z=ee):(I[z]=ae,I[Z]=F,z=Z);else if(eei(K,F))I[z]=K,I[ee]=F,z=ee;else break e}}return R}function i(I,R){var F=I.sortIndex-R.sortIndex;return F!==0?F:I.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],u=[],d=1,f=null,h=3,p=!1,v=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(I){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=I)r(u),R.sortIndex=R.expirationTime,t(c,R);else break;R=n(u)}}function P(I){if(m=!1,w(I),!v)if(n(c)!==null)v=!0,D(S);else{var R=n(u);R!==null&&B(P,R.startTime-I)}}function S(I,R){v=!1,m&&(m=!1,b(O),O=-1),p=!0;var F=h;try{for(w(R),f=n(c);f!==null&&(!(f.expirationTime>R)||I&&!_());){var z=f.callback;if(typeof z=="function"){f.callback=null,h=f.priorityLevel;var U=z(f.expirationTime<=R);R=e.unstable_now(),typeof U=="function"?f.callback=U:f===n(c)&&r(c),w(R)}else r(c);f=n(c)}if(f!==null)var W=!0;else{var Z=n(u);Z!==null&&B(P,Z.startTime-R),W=!1}return W}finally{f=null,h=F,p=!1}}var j=!1,C=null,O=-1,A=5,E=-1;function _(){return!(e.unstable_now()-EI||125z?(I.sortIndex=F,t(u,I),n(c)===null&&I===n(u)&&(m?(b(O),O=-1):m=!0,B(P,F-z))):(I.sortIndex=U,t(c,I),v||p||(v=!0,D(S))),I},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(I){var R=h;return function(){var F=h;h=R;try{return I.apply(this,arguments)}finally{h=F}}}})(WM);VM.exports=WM;var N8=VM.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 T8=g,lr=N8;function Q(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"),Gx=Object.prototype.hasOwnProperty,_8=/^[: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]*$/,kO={},MO={};function k8(e){return Gx.call(MO,e)?!0:Gx.call(kO,e)?!1:_8.test(e)?MO[e]=!0:(kO[e]=!0,!1)}function M8(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 R8(e,t,n,r){if(t===null||typeof t>"u"||M8(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 Mn(e,t,n,r,i,a,o){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=a,this.removeEmptyString=o}var cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[e]=new Mn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cn[t]=new Mn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new Mn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[e]=new Mn(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){cn[e]=new Mn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new Mn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new Mn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new Mn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new Mn(e,5,!1,e.toLowerCase(),null,!1,!1)});var NS=/[\-:]([a-z])/g;function TS(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(NS,TS);cn[t]=new Mn(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(NS,TS);cn[t]=new Mn(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(NS,TS);cn[t]=new Mn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new Mn(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new Mn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new Mn(e,1,!1,e.toLowerCase(),null,!0,!0)});function _S(e,t,n,r){var i=cn.hasOwnProperty(t)?cn[t]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==a[s]){var c=` -`+i[o].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=o&&0<=s);break}}}finally{d0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wu(e):""}function $8(e){switch(e.tag){case 5:return Wu(e.type);case 16:return Wu("Lazy");case 13:return Wu("Suspense");case 19:return Wu("SuspenseList");case 0:case 2:case 15:return e=f0(e.type,!1),e;case 11:return e=f0(e.type.render,!1),e;case 1:return e=f0(e.type,!0),e;default:return""}}function Zx(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 al:return"Fragment";case il:return"Portal";case Yx:return"Profiler";case kS:return"StrictMode";case Xx:return"Suspense";case Qx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qM:return(e.displayName||"Context")+".Consumer";case KM:return(e._context.displayName||"Context")+".Provider";case MS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case RS:return t=e.displayName||null,t!==null?t:Zx(e.type)||"Memo";case La:t=e._payload,e=e._init;try{return Zx(e(t))}catch{}}return null}function D8(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 Zx(t);case 8:return t===kS?"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 yo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function YM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function I8(e){var t=YM(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,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Eh(e){e._valueTracker||(e._valueTracker=I8(e))}function XM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=YM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hp(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 Jx(e,t){var n=t.checked;return St({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $O(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yo(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 QM(e,t){t=t.checked,t!=null&&_S(e,"checked",t,!1)}function eb(e,t){QM(e,t);var n=yo(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")?tb(e,t.type,n):t.hasOwnProperty("defaultValue")&&tb(e,t.type,yo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function DO(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 tb(e,t,n){(t!=="number"||Hp(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hu=Array.isArray;function Cl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Nh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ad(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rd={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},L8=["Webkit","ms","Moz","O"];Object.keys(rd).forEach(function(e){L8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rd[t]=rd[e]})});function tR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rd.hasOwnProperty(e)&&rd[e]?(""+t).trim():t+"px"}function nR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=tR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var F8=St({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 ib(e,t){if(t){if(F8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function ab(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 ob=null;function $S(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sb=null,Ol=null,Al=null;function FO(e){if(e=Gf(e)){if(typeof sb!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=Jv(t),sb(e.stateNode,e.type,t))}}function rR(e){Ol?Al?Al.push(e):Al=[e]:Ol=e}function iR(){if(Ol){var e=Ol,t=Al;if(Al=Ol=null,FO(e),t)for(e=0;e>>=0,e===0?32:31-(X8(e)/Q8|0)|0}var Th=64,_h=4194304;function Ku(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 Yp(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=Ku(s):(a&=o,a!==0&&(r=Ku(a)))}else o=n&~i,o!==0?r=Ku(o):a!==0&&(r=Ku(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&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 Kf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ei(t),e[t]=n}function tV(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=ad),GO=" ",YO=!1;function PR(e,t){switch(e){case"keyup":return NV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ol=!1;function _V(e,t){switch(e){case"compositionend":return CR(t);case"keypress":return t.which!==32?null:(YO=!0,GO);case"textInput":return e=t.data,e===GO&&YO?null:e;default:return null}}function kV(e,t){if(ol)return e==="compositionend"||!VS&&PR(e,t)?(e=SR(),Pp=BS=Za=null,ol=!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=JO(n)}}function NR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?NR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function TR(){for(var e=window,t=Hp();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hp(e.document)}return t}function WS(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 UV(e){var t=TR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&NR(n.ownerDocument.documentElement,n)){if(r!==null&&WS(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,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=eA(n,a);var o=eA(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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,sl=null,hb=null,sd=null,pb=!1;function tA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;pb||sl==null||sl!==Hp(r)||(r=sl,"selectionStart"in r&&WS(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}),sd&&Md(sd,r)||(sd=r,r=Zp(hb,"onSelect"),0ul||(e.current=bb[ul],bb[ul]=null,ul--)}function tt(e,t){ul++,bb[ul]=e.current,e.current=t}var xo={},Sn=To(xo),Bn=To(!1),js=xo;function nc(e,t){var n=e.type.contextTypes;if(!n)return xo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Un(e){return e=e.childContextTypes,e!=null}function em(){dt(Bn),dt(Sn)}function lA(e,t,n){if(Sn.current!==xo)throw Error(Q(168));tt(Sn,t),tt(Bn,n)}function FR(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(Q(108,D8(e)||"Unknown",i));return St({},n,r)}function tm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xo,js=Sn.current,tt(Sn,e),tt(Bn,Bn.current),!0}function cA(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=FR(e,t,js),r.__reactInternalMemoizedMergedChildContext=e,dt(Bn),dt(Sn),tt(Sn,e)):dt(Bn),tt(Bn,n)}var Ji=null,eg=!1,O0=!1;function BR(e){Ji===null?Ji=[e]:Ji.push(e)}function JV(e){eg=!0,BR(e)}function _o(){if(!O0&&Ji!==null){O0=!0;var e=0,t=Ke;try{var n=Ji;for(Ke=1;e>=o,i-=o,ta=1<<32-ei(t)+i|n<O?(A=C,C=null):A=C.sibling;var E=h(b,C,w[O],P);if(E===null){C===null&&(C=A);break}e&&C&&E.alternate===null&&t(b,C),x=a(E,x,O),j===null?S=E:j.sibling=E,j=E,C=A}if(O===w.length)return n(b,C),mt&&Wo(b,O),S;if(C===null){for(;OO?(A=C,C=null):A=C.sibling;var _=h(b,C,E.value,P);if(_===null){C===null&&(C=A);break}e&&C&&_.alternate===null&&t(b,C),x=a(_,x,O),j===null?S=_:j.sibling=_,j=_,C=A}if(E.done)return n(b,C),mt&&Wo(b,O),S;if(C===null){for(;!E.done;O++,E=w.next())E=f(b,E.value,P),E!==null&&(x=a(E,x,O),j===null?S=E:j.sibling=E,j=E);return mt&&Wo(b,O),S}for(C=r(b,C);!E.done;O++,E=w.next())E=p(C,b,O,E.value,P),E!==null&&(e&&E.alternate!==null&&C.delete(E.key===null?O:E.key),x=a(E,x,O),j===null?S=E:j.sibling=E,j=E);return e&&C.forEach(function(N){return t(b,N)}),mt&&Wo(b,O),S}function y(b,x,w,P){if(typeof w=="object"&&w!==null&&w.type===al&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Ah:e:{for(var S=w.key,j=x;j!==null;){if(j.key===S){if(S=w.type,S===al){if(j.tag===7){n(b,j.sibling),x=i(j,w.props.children),x.return=b,b=x;break e}}else if(j.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===La&&fA(S)===j.type){n(b,j.sibling),x=i(j,w.props),x.ref=Au(b,j,w),x.return=b,b=x;break e}n(b,j);break}else t(b,j);j=j.sibling}w.type===al?(x=ms(w.props.children,b.mode,P,w.key),x.return=b,b=x):(P=kp(w.type,w.key,w.props,null,b.mode,P),P.ref=Au(b,x,w),P.return=b,b=P)}return o(b);case il:e:{for(j=w.key;x!==null;){if(x.key===j)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(b,x.sibling),x=i(x,w.children||[]),x.return=b,b=x;break e}else{n(b,x);break}else t(b,x);x=x.sibling}x=R0(w,b.mode,P),x.return=b,b=x}return o(b);case La:return j=w._init,y(b,x,j(w._payload),P)}if(Hu(w))return v(b,x,w,P);if(Su(w))return m(b,x,w,P);Lh(b,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(b,x.sibling),x=i(x,w),x.return=b,b=x):(n(b,x),x=M0(w,b.mode,P),x.return=b,b=x),o(b)):n(b,x)}return y}var ic=WR(!0),HR=WR(!1),im=To(null),am=null,hl=null,GS=null;function YS(){GS=hl=am=null}function XS(e){var t=im.current;dt(im),e._currentValue=t}function jb(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Nl(e,t){am=e,GS=hl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ln=!0),e.firstContext=null)}function Nr(e){var t=e._currentValue;if(GS!==e)if(e={context:e,memoizedValue:t,next:null},hl===null){if(am===null)throw Error(Q(308));hl=e,am.dependencies={lanes:0,firstContext:e}}else hl=hl.next=e;return t}var Zo=null;function QS(e){Zo===null?Zo=[e]:Zo.push(e)}function KR(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,QS(t)):(n.next=i.next,i.next=n),t.interleaved=n,pa(e,r)}function pa(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Fa=!1;function ZS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qR(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function aa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Be&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,pa(e,n)}return i=r.interleaved,i===null?(t.next=t,QS(r)):(t.next=i.next,i.next=t),r.interleaved=t,pa(e,n)}function Op(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,IS(e,n)}}function hA(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function om(e,t,n,r){var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==o&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=c))}if(a!==null){var f=i.baseState;o=0,d=u=c=null,s=a;do{var h=s.lane,p=s.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,m=s;switch(h=t,p=n,m.tag){case 1:if(v=m.payload,typeof v=="function"){f=v.call(p,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,h=typeof v=="function"?v.call(p,f,h):v,h==null)break e;f=St({},f,h);break e;case 2:Fa=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Os|=o,e.lanes=o,e.memoizedState=f}}function pA(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=E0.transition;E0.transition={};try{e(!1),t()}finally{Ke=n,E0.transition=r}}function u$(){return Tr().memoizedState}function rW(e,t,n){var r=co(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},d$(e))f$(t,n);else if(n=KR(e,t,n,r),n!==null){var i=Tn();ti(n,e,r,i),h$(n,t,r)}}function iW(e,t,n){var r=co(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(d$(e))f$(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ni(s,o)){var c=t.interleaved;c===null?(i.next=i,QS(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=KR(e,t,i,r),n!==null&&(i=Tn(),ti(n,e,r,i),h$(n,t,r))}}function d$(e){var t=e.alternate;return e===wt||t!==null&&t===wt}function f$(e,t){ld=lm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function h$(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,IS(e,n)}}var cm={readContext:Nr,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},aW={readContext:Nr,useCallback:function(e,t){return fi().memoizedState=[e,t===void 0?null:t],e},useContext:Nr,useEffect:vA,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ep(4194308,4,a$.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ep(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ep(4,2,e,t)},useMemo:function(e,t){var n=fi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=fi();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=rW.bind(null,wt,e),[r.memoizedState,e]},useRef:function(e){var t=fi();return e={current:e},t.memoizedState=e},useState:mA,useDebugValue:oj,useDeferredValue:function(e){return fi().memoizedState=e},useTransition:function(){var e=mA(!1),t=e[0];return e=nW.bind(null,e[1]),fi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=wt,i=fi();if(mt){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),Qt===null)throw Error(Q(349));Cs&30||QR(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,vA(JR.bind(null,r,a,e),[e]),r.flags|=2048,Ud(9,ZR.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=fi(),t=Qt.identifierPrefix;if(mt){var n=na,r=ta;n=(r&~(1<<32-ei(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[gi]=t,e[Dd]=r,j$(e,t,!1,!1),t.stateNode=e;e:{switch(o=ab(n,r),n){case"dialog":at("cancel",e),at("close",e),i=r;break;case"iframe":case"object":case"embed":at("load",e),i=r;break;case"video":case"audio":for(i=0;isc&&(t.flags|=128,r=!0,Eu(a,!1),t.lanes=4194304)}else{if(!r)if(e=sm(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Eu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!mt)return hn(t),null}else 2*Tt()-a.renderingStartTime>sc&&n!==1073741824&&(t.flags|=128,r=!0,Eu(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Tt(),t.sibling=null,n=yt.current,tt(yt,r?n&1|2:n&1),t):(hn(t),null);case 22:case 23:return fj(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xn&1073741824&&(hn(t),t.subtreeFlags&6&&(t.flags|=8192)):hn(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function hW(e,t){switch(KS(t),t.tag){case 1:return Un(t.type)&&em(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ac(),dt(Bn),dt(Sn),tj(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ej(t),null;case 13:if(dt(yt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));rc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return dt(yt),null;case 4:return ac(),null;case 10:return XS(t.type._context),null;case 22:case 23:return fj(),null;case 24:return null;default:return null}}var Bh=!1,yn=!1,pW=typeof WeakSet=="function"?WeakSet:Set,de=null;function pl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ct(e,t,r)}else n.current=null}function kb(e,t,n){try{n()}catch(r){Ct(e,t,r)}}var AA=!1;function mW(e,t){if(mb=Xp,e=TR(),WS(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,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=o+i),f!==a||r!==0&&f.nodeType!==3||(c=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===i&&(s=o),h===a&&++d===r&&(c=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(vb={focusedElem:e,selectionRange:n},Xp=!1,de=t;de!==null;)if(t=de,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,de=e;else for(;de!==null;){t=de;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 m=v.memoizedProps,y=v.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?m:Vr(t.type,m),y);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(P){Ct(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,de=e;break}de=t.return}return v=AA,AA=!1,v}function cd(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 a=i.destroy;i.destroy=void 0,a!==void 0&&kb(t,n,a)}i=i.next}while(i!==r)}}function rg(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 Mb(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 O$(e){var t=e.alternate;t!==null&&(e.alternate=null,O$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gi],delete t[Dd],delete t[xb],delete t[QV],delete t[ZV])),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 A$(e){return e.tag===5||e.tag===3||e.tag===4}function EA(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||A$(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 Rb(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=Jp));else if(r!==4&&(e=e.child,e!==null))for(Rb(e,t,n),e=e.sibling;e!==null;)Rb(e,t,n),e=e.sibling}function $b(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($b(e,t,n),e=e.sibling;e!==null;)$b(e,t,n),e=e.sibling}var rn=null,Hr=!1;function _a(e,t,n){for(n=n.child;n!==null;)E$(e,t,n),n=n.sibling}function E$(e,t,n){if(wi&&typeof wi.onCommitFiberUnmount=="function")try{wi.onCommitFiberUnmount(Yv,n)}catch{}switch(n.tag){case 5:yn||pl(n,t);case 6:var r=rn,i=Hr;rn=null,_a(e,t,n),rn=r,Hr=i,rn!==null&&(Hr?(e=rn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rn.removeChild(n.stateNode));break;case 18:rn!==null&&(Hr?(e=rn,n=n.stateNode,e.nodeType===8?C0(e.parentNode,n):e.nodeType===1&&C0(e,n),_d(e)):C0(rn,n.stateNode));break;case 4:r=rn,i=Hr,rn=n.stateNode.containerInfo,Hr=!0,_a(e,t,n),rn=r,Hr=i;break;case 0:case 11:case 14:case 15:if(!yn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&kb(n,t,o),i=i.next}while(i!==r)}_a(e,t,n);break;case 1:if(!yn&&(pl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ct(n,t,s)}_a(e,t,n);break;case 21:_a(e,t,n);break;case 22:n.mode&1?(yn=(r=yn)||n.memoizedState!==null,_a(e,t,n),yn=r):_a(e,t,n);break;default:_a(e,t,n)}}function NA(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new pW),t.forEach(function(r){var i=PW.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ir(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~a}if(r=i,r=Tt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gW(r/1960))-r,10e?16:e,Ja===null)var r=!1;else{if(e=Ja,Ja=null,fm=0,Be&6)throw Error(Q(331));var i=Be;for(Be|=4,de=e.current;de!==null;){var a=de,o=a.child;if(de.flags&16){var s=a.deletions;if(s!==null){for(var c=0;cTt()-uj?ps(e,0):cj|=n),zn(e,t)}function D$(e,t){t===0&&(e.mode&1?(t=_h,_h<<=1,!(_h&130023424)&&(_h=4194304)):t=1);var n=Tn();e=pa(e,t),e!==null&&(Kf(e,t,n),zn(e,n))}function jW(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),D$(e,n)}function PW(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(Q(314))}r!==null&&r.delete(t),D$(e,n)}var I$;I$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Bn.current)Ln=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ln=!1,dW(e,t,n);Ln=!!(e.flags&131072)}else Ln=!1,mt&&t.flags&1048576&&UR(t,rm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Np(e,t),e=t.pendingProps;var i=nc(t,Sn.current);Nl(t,n),i=rj(null,t,r,e,i,n);var a=ij();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,Un(r)?(a=!0,tm(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ZS(t),i.updater=ng,t.stateNode=i,i._reactInternals=t,Cb(t,r,e,n),t=Eb(null,t,r,!0,a,n)):(t.tag=0,mt&&a&&HS(t),An(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Np(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=OW(r),e=Vr(r,e),i){case 0:t=Ab(null,t,r,e,n);break e;case 1:t=PA(null,t,r,e,n);break e;case 11:t=SA(null,t,r,e,n);break e;case 14:t=jA(null,t,r,Vr(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Vr(r,i),Ab(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Vr(r,i),PA(e,t,r,i,n);case 3:e:{if(b$(t),e===null)throw Error(Q(387));r=t.pendingProps,a=t.memoizedState,i=a.element,qR(e,t),om(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=oc(Error(Q(423)),t),t=CA(e,t,r,n,i);break e}else if(r!==i){i=oc(Error(Q(424)),t),t=CA(e,t,r,n,i);break e}else for(tr=oo(t.stateNode.containerInfo.firstChild),nr=t,mt=!0,Yr=null,n=HR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rc(),r===i){t=ma(e,t,n);break e}An(e,t,r,n)}t=t.child}return t;case 5:return GR(t),e===null&&Sb(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,gb(r,i)?o=null:a!==null&&gb(r,a)&&(t.flags|=32),x$(e,t),An(e,t,o,n),t.child;case 6:return e===null&&Sb(t),null;case 13:return w$(e,t,n);case 4:return JS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ic(t,null,r,n):An(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Vr(r,i),SA(e,t,r,i,n);case 7:return An(e,t,t.pendingProps,n),t.child;case 8:return An(e,t,t.pendingProps.children,n),t.child;case 12:return An(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,tt(im,r._currentValue),r._currentValue=o,a!==null)if(ni(a.value,o)){if(a.children===i.children&&!Bn.current){t=ma(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=aa(-1,n&-n),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),jb(a.return,n,t),s.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Q(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),jb(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}An(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Nl(t,n),i=Nr(i),r=r(i),t.flags|=1,An(e,t,r,n),t.child;case 14:return r=t.type,i=Vr(r,t.pendingProps),i=Vr(r.type,i),jA(e,t,r,i,n);case 15:return g$(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Vr(r,i),Np(e,t),t.tag=1,Un(r)?(e=!0,tm(t)):e=!1,Nl(t,n),p$(t,r,i),Cb(t,r,i,n),Eb(null,t,r,!0,e,n);case 19:return S$(e,t,n);case 22:return y$(e,t,n)}throw Error(Q(156,t.tag))};function L$(e,t){return dR(e,t)}function CW(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 jr(e,t,n,r){return new CW(e,t,n,r)}function pj(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OW(e){if(typeof e=="function")return pj(e)?1:0;if(e!=null){if(e=e.$$typeof,e===MS)return 11;if(e===RS)return 14}return 2}function uo(e,t){var n=e.alternate;return n===null?(n=jr(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 kp(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")pj(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case al:return ms(n.children,i,a,t);case kS:o=8,i|=8;break;case Yx:return e=jr(12,n,t,i|2),e.elementType=Yx,e.lanes=a,e;case Xx:return e=jr(13,n,t,i),e.elementType=Xx,e.lanes=a,e;case Qx:return e=jr(19,n,t,i),e.elementType=Qx,e.lanes=a,e;case GM:return ag(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case KM:o=10;break e;case qM:o=9;break e;case MS:o=11;break e;case RS:o=14;break e;case La:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=jr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function ms(e,t,n,r){return e=jr(7,e,r,t),e.lanes=n,e}function ag(e,t,n,r){return e=jr(22,e,r,t),e.elementType=GM,e.lanes=n,e.stateNode={isHidden:!1},e}function M0(e,t,n){return e=jr(6,e,null,t),e.lanes=n,e}function R0(e,t,n){return t=jr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function AW(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=p0(0),this.expirationTimes=p0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=p0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mj(e,t,n,r,i,a,o,s,c){return e=new AW(e,t,n,s,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=jr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ZS(a),e}function EW(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(z$)}catch(e){console.error(e)}}z$(),zM.exports=ur;var Vc=zM.exports;const V$=Ze(Vc);var IA=Vc;qx.createRoot=IA.createRoot,qx.hydrateRoot=IA.hydrateRoot;/** - * @remix-run/router v1.21.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 Vd(){return Vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function W$(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function MW(){return Math.random().toString(36).substr(2,8)}function FA(e,t){return{usr:e.state,key:e.key,idx:t}}function Bb(e,t,n,r){return n===void 0&&(n=null),Vd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Wc(t):t,{state:n,key:t&&t.key||r||MW()})}function mm(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 Wc(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 RW(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=eo.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Vd({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){s=eo.Pop;let y=d(),b=y==null?null:y-u;u=y,c&&c({action:s,location:m.location,delta:b})}function h(y,b){s=eo.Push;let x=Bb(m.location,y,b);u=d()+1;let w=FA(x,u),P=m.createHref(x);try{o.pushState(w,"",P)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(P)}a&&c&&c({action:s,location:m.location,delta:1})}function p(y,b){s=eo.Replace;let x=Bb(m.location,y,b);u=d();let w=FA(x,u),P=m.createHref(x);o.replaceState(w,"",P),a&&c&&c({action:s,location:m.location,delta:0})}function v(y){let b=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof y=="string"?y:mm(y);return x=x.replace(/ $/,"%20"),_t(b,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,b)}let m={get action(){return s},get location(){return e(i,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(LA,f),c=y,()=>{i.removeEventListener(LA,f),c=null}},createHref(y){return t(i,y)},createURL:v,encodeLocation(y){let b=v(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:h,replace:p,go(y){return o.go(y)}};return m}var BA;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(BA||(BA={}));function $W(e,t,n){return n===void 0&&(n="/"),DW(e,t,n)}function DW(e,t,n,r){let i=typeof t=="string"?Wc(t):t,a=xj(i.pathname||"/",n);if(a==null)return null;let o=H$(e);IW(o);let s=null;for(let c=0;s==null&&c{let c={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(_t(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=fo([r,c.relativePath]),d=n.concat(c);a.children&&a.children.length>0&&(_t(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),H$(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:WW(u,a.index),routesMeta:d})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let c of K$(a.path))i(a,o,c)}),t}function K$(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=K$(r.join("/")),s=[];return s.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&s.push(...o),s.map(c=>e.startsWith("/")&&c===""?"/":c)}function IW(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:HW(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const LW=/^:[\w-]+$/,FW=3,BW=2,UW=1,zW=10,VW=-2,UA=e=>e==="*";function WW(e,t){let n=e.split("/"),r=n.length;return n.some(UA)&&(r+=VW),t&&(r+=BW),n.filter(i=>!UA(i)).reduce((i,a)=>i+(LW.test(a)?FW:a===""?UW:zW),r)}function HW(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 KW(e,t,n){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:p}=d;if(h==="*"){let m=s[f]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[f];return p&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function GW(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),W$(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,(o,s,c)=>(r.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function YW(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return W$(!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 xj(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 XW(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Wc(e):e;return{pathname:n?n.startsWith("/")?n:QW(n,t):t,search:e9(r),hash:t9(i)}}function QW(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 $0(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 ZW(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function bj(e,t){let n=ZW(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function wj(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Wc(e):(i=Vd({},e),_t(!i.pathname||!i.pathname.includes("?"),$0("?","pathname","search",i)),_t(!i.pathname||!i.pathname.includes("#"),$0("#","pathname","hash",i)),_t(!i.search||!i.search.includes("#"),$0("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let c=XW(i,s),u=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const fo=e=>e.join("/").replace(/\/\/+/g,"/"),JW=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),e9=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,t9=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function n9(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const q$=["post","put","patch","delete"];new Set(q$);const r9=["get",...q$];new Set(r9);/** - * React Router v6.28.1 - * - * 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 Wd(){return Wd=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let f=wj(u,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:fo([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,a,e])}const s9=g.createContext(null);function l9(e){let t=g.useContext(Bi).outlet;return t&&g.createElement(s9.Provider,{value:e},t)}function Ui(){let{matches:e}=g.useContext(Bi),t=e[e.length-1];return t?t.params:{}}function X$(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(ko),{matches:i}=g.useContext(Bi),{pathname:a}=Kc(),o=JSON.stringify(bj(i,r.v7_relativeSplatPath));return g.useMemo(()=>wj(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function c9(e,t){return u9(e,t)}function u9(e,t,n,r){Hc()||_t(!1);let{navigator:i}=g.useContext(ko),{matches:a}=g.useContext(Bi),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Kc(),d;if(t){var f;let y=typeof t=="string"?Wc(t):t;c==="/"||(f=y.pathname)!=null&&f.startsWith(c)||_t(!1),d=y}else d=u;let h=d.pathname||"/",p=h;if(c!=="/"){let y=c.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=$W(e,{pathname:p}),m=m9(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:fo([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:fo([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r);return t&&m?g.createElement(ug.Provider,{value:{location:Wd({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:eo.Pop}},m):m}function d9(){let e=x9(),t=n9(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)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,null)}const f9=g.createElement(d9,null);class h9 extends g.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!==void 0?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!==void 0?g.createElement(Bi.Provider,{value:this.props.routeContext},g.createElement(G$.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function p9(e){let{routeContext:t,match:n,children:r}=e,i=g.useContext(Sj);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Bi.Provider,{value:t},r)}function m9(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let d=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);d>=0||_t(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let p,v=!1,m=null,y=null;n&&(p=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||f9,c&&(u<0&&h===0?(v=!0,y=null):u===h&&(v=!0,y=f.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,h+1)),x=()=>{let w;return p?w=m:v?w=y:f.route.Component?w=g.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,g.createElement(p9,{match:f,routeContext:{outlet:d,matches:b,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?g.createElement(h9,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:x(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):x()},null)}var Q$=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Q$||{}),vm=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}(vm||{});function v9(e){let t=g.useContext(Sj);return t||_t(!1),t}function g9(e){let t=g.useContext(i9);return t||_t(!1),t}function y9(e){let t=g.useContext(Bi);return t||_t(!1),t}function Z$(e){let t=y9(),n=t.matches[t.matches.length-1];return n.route.id||_t(!1),n.route.id}function x9(){var e;let t=g.useContext(G$),n=g9(vm.UseRouteError),r=Z$(vm.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function b9(){let{router:e}=v9(Q$.UseNavigateStable),t=Z$(vm.UseNavigateStable),n=g.useRef(!1);return Y$(()=>{n.current=!0}),g.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Wd({fromRouteId:t},a)))},[e,t])}const zA={};function w9(e,t){zA[t]||(zA[t]=!0,console.warn(t))}const VA=(e,t,n)=>w9(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function S9(e,t){(e==null?void 0:e.v7_startTransition)===void 0&&VA("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),(e==null?void 0:e.v7_relativeSplatPath)===void 0&&!t&&VA("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function j9(e){let{to:t,replace:n,state:r,relative:i}=e;Hc()||_t(!1);let{future:a,static:o}=g.useContext(ko),{matches:s}=g.useContext(Bi),{pathname:c}=Kc(),u=Us(),d=wj(t,bj(s,a.v7_relativeSplatPath),c,i==="path"),f=JSON.stringify(d);return g.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:i}),[u,f,i,n,r]),null}function P9(e){return l9(e.context)}function pt(e){_t(!1)}function C9(e){let{basename:t="/",children:n=null,location:r,navigationType:i=eo.Pop,navigator:a,static:o=!1,future:s}=e;Hc()&&_t(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:a,static:o,future:Wd({v7_relativeSplatPath:!1},s)}),[c,s,a,o]);typeof r=="string"&&(r=Wc(r));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:v="default"}=r,m=g.useMemo(()=>{let y=xj(d,c);return y==null?null:{location:{pathname:y,search:f,hash:h,state:p,key:v},navigationType:i}},[c,d,f,h,p,v,i]);return m==null?null:g.createElement(ko.Provider,{value:u},g.createElement(ug.Provider,{children:n,value:m}))}function O9(e){let{children:t,location:n}=e;return c9(Ub(t),n)}new Promise(()=>{});function Ub(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,i)=>{if(!g.isValidElement(r))return;let a=[...t,i];if(r.type===g.Fragment){n.push.apply(n,Ub(r.props.children,a));return}r.type!==pt&&_t(!1),!r.props.index||!r.props.children||_t(!1);let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ub(r.props.children,a)),n.push(o)}),n}/** - * React Router DOM v6.28.1 - * - * 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 zb(){return zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function E9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function N9(e,t){return e.button===0&&(!t||t==="_self")&&!E9(e)}const T9=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],_9="6";try{window.__reactRouterVersion=_9}catch{}const k9="startTransition",WA=BM[k9];function M9(e){let{basename:t,children:n,future:r,window:i}=e,a=g.useRef();a.current==null&&(a.current=kW({window:i,v5Compat:!0}));let o=a.current,[s,c]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=g.useCallback(f=>{u&&WA?WA(()=>c(f)):c(f)},[c,u]);return g.useLayoutEffect(()=>o.listen(d),[o,d]),g.useEffect(()=>S9(r),[r]),g.createElement(C9,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const R9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lr=g.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:s,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,h=A9(t,T9),{basename:p}=g.useContext(ko),v,m=!1;if(typeof u=="string"&&$9.test(u)&&(v=u,R9))try{let w=new URL(window.location.href),P=u.startsWith("//")?new URL(w.protocol+u):new URL(u),S=xj(P.pathname,p);P.origin===w.origin&&S!=null?u=S+P.search+P.hash:m=!0}catch{}let y=a9(u,{relative:i}),b=D9(u,{replace:o,state:s,target:c,preventScrollReset:d,relative:i,viewTransition:f});function x(w){r&&r(w),w.defaultPrevented||b(w)}return g.createElement("a",zb({},h,{href:v||y,onClick:m||a?r:x,ref:n,target:c}))});var HA;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(HA||(HA={}));var KA;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(KA||(KA={}));function D9(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,c=Us(),u=Kc(),d=X$(e,{relative:o});return g.useCallback(f=>{if(N9(f,n)){f.preventDefault();let h=r!==void 0?r:mm(u)===mm(d);c(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,c,d,r,i,n,e,a,o,s])}var qc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Es=typeof window>"u"||"Deno"in globalThis;function br(){}function I9(e,t){return typeof e=="function"?e(t):e}function Vb(e){return typeof e=="number"&&e>=0&&e!==1/0}function J$(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _l(e,t){return typeof e=="function"?e(t):e}function Xr(e,t){return typeof e=="function"?e(t):e}function qA(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==jj(o,t.options))return!1}else if(!Hd(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function GA(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Ns(t.options.mutationKey)!==Ns(a))return!1}else if(!Hd(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function jj(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ns)(e)}function Ns(e){return JSON.stringify(e,(t,n)=>Wb(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Hd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Hd(e[n],t[n])):!1}function eD(e,t){if(e===t)return e;const n=YA(e)&&YA(t);if(n||Wb(e)&&Wb(t)){const r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),o=a.length,s=n?[]:{};let c=0;for(let u=0;u{setTimeout(t,e)})}function Hb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?eD(e,t):t}function F9(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function B9(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Pj=Symbol();function tD(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Pj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ss,Va,zl,bM,U9=(bM=class extends qc{constructor(){super();me(this,ss);me(this,Va);me(this,zl);ce(this,zl,t=>{if(!Es&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){L(this,Va)||this.setEventListener(L(this,zl))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Va))==null||t.call(this),ce(this,Va,void 0))}setEventListener(t){var n;ce(this,zl,t),(n=L(this,Va))==null||n.call(this),ce(this,Va,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){L(this,ss)!==t&&(ce(this,ss,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof L(this,ss)=="boolean"?L(this,ss):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ss=new WeakMap,Va=new WeakMap,zl=new WeakMap,bM),Cj=new U9,Vl,Wa,Wl,wM,z9=(wM=class extends qc{constructor(){super();me(this,Vl,!0);me(this,Wa);me(this,Wl);ce(this,Wl,t=>{if(!Es&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){L(this,Wa)||this.setEventListener(L(this,Wl))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Wa))==null||t.call(this),ce(this,Wa,void 0))}setEventListener(t){var n;ce(this,Wl,t),(n=L(this,Wa))==null||n.call(this),ce(this,Wa,t(this.setOnline.bind(this)))}setOnline(t){L(this,Vl)!==t&&(ce(this,Vl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,Vl)}},Vl=new WeakMap,Wa=new WeakMap,Wl=new WeakMap,wM),ym=new z9;function Kb(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function V9(e){return Math.min(1e3*2**e,3e4)}function nD(e){return(e??"online")==="online"?ym.isOnline():!0}var rD=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function D0(e){return e instanceof rD}function iD(e){let t=!1,n=0,r=!1,i;const a=Kb(),o=m=>{var y;r||(h(new rD(m)),(y=e.abort)==null||y.call(e))},s=()=>{t=!0},c=()=>{t=!1},u=()=>Cj.isFocused()&&(e.networkMode==="always"||ym.isOnline())&&e.canRun(),d=()=>nD(e.networkMode)&&e.canRun(),f=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),i==null||i(),a.resolve(m))},h=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),i==null||i(),a.reject(m))},p=()=>new Promise(m=>{var y;i=b=>{(r||u())&&m(b)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(b){m=Promise.reject(b)}Promise.resolve(m).then(f).catch(b=>{var j;if(r)return;const x=e.retry??(Es?0:3),w=e.retryDelay??V9,P=typeof w=="function"?w(n,b):w,S=x===!0||typeof x=="number"&&nu()?void 0:p()).then(()=>{t?h(b):v()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:c,canStart:d,start:()=>(d()?v():p().then(v),a)}}function W9(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(c=>{n(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||o()}return c},batchCalls:s=>(...c)=>{a(()=>{s(...c)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ut=W9(),ls,SM,aD=(SM=class{constructor(){me(this,ls)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vb(this.gcTime)&&ce(this,ls,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Es?1/0:5*60*1e3))}clearGcTimeout(){L(this,ls)&&(clearTimeout(L(this,ls)),ce(this,ls,void 0))}},ls=new WeakMap,SM),Hl,Kl,xr,pn,Uf,cs,Wr,Qi,jM,H9=(jM=class extends aD{constructor(t){super();me(this,Wr);me(this,Hl);me(this,Kl);me(this,xr);me(this,pn);me(this,Uf);me(this,cs);ce(this,cs,!1),ce(this,Uf,t.defaultOptions),this.setOptions(t.options),this.observers=[],ce(this,xr,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ce(this,Hl,K9(this.options)),this.state=t.state??L(this,Hl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=L(this,pn))==null?void 0:t.promise}setOptions(t){this.options={...L(this,Uf),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,xr).remove(this)}setData(t,n){const r=Hb(this.state.data,t,this.options);return ke(this,Wr,Qi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ke(this,Wr,Qi).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=L(this,pn))==null?void 0:r.promise;return(i=L(this,pn))==null||i.cancel(t),n?n.then(br).catch(br):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(L(this,Hl))}isActive(){return this.observers.some(t=>Xr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!J$(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,pn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,pn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,xr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(L(this,pn)&&(L(this,cs)?L(this,pn).cancel({revert:!0}):L(this,pn).cancelRetry()),this.scheduleGc()),L(this,xr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ke(this,Wr,Qi).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(L(this,pn))return L(this,pn).continueRetry(),L(this,pn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ce(this,cs,!0),r.signal)})},a=()=>{const f=tD(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),ce(this,cs,!1),this.options.persister?this.options.persister(f,h,this):f(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(o),(c=this.options.behavior)==null||c.onFetch(o,this),ce(this,Kl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&ke(this,Wr,Qi).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const s=f=>{var h,p,v,m;D0(f)&&f.silent||ke(this,Wr,Qi).call(this,{type:"error",error:f}),D0(f)||((p=(h=L(this,xr).config).onError)==null||p.call(h,f,this),(m=(v=L(this,xr).config).onSettled)==null||m.call(v,this.state.data,f,this)),this.scheduleGc()};return ce(this,pn,iD({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,p,v,m;if(f===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){s(y);return}(p=(h=L(this,xr).config).onSuccess)==null||p.call(h,f,this),(m=(v=L(this,xr).config).onSettled)==null||m.call(v,f,this.state.error,this),this.scheduleGc()},onError:s,onFail:(f,h)=>{ke(this,Wr,Qi).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{ke(this,Wr,Qi).call(this,{type:"pause"})},onContinue:()=>{ke(this,Wr,Qi).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),L(this,pn).start()}},Hl=new WeakMap,Kl=new WeakMap,xr=new WeakMap,pn=new WeakMap,Uf=new WeakMap,cs=new WeakMap,Wr=new WeakSet,Qi=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...oD(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return D0(i)&&i.revert&&L(this,Kl)?{...L(this,Kl),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ut.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),L(this,xr).notify({query:this,type:"updated",action:t})})},jM);function oD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function K9(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var hi,PM,q9=(PM=class extends qc{constructor(t={}){super();me(this,hi);this.config=t,ce(this,hi,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??jj(i,n);let o=this.get(a);return o||(o=new H9({cache:this,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){L(this,hi).has(t.queryHash)||(L(this,hi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=L(this,hi).get(t.queryHash);n&&(t.destroy(),n===t&&L(this,hi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ut.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,hi).get(t)}getAll(){return[...L(this,hi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>qA(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>qA(t,r)):n}notify(t){Ut.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ut.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ut.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},hi=new WeakMap,PM),pi,Cn,us,mi,Ra,CM,G9=(CM=class extends aD{constructor(t){super();me(this,mi);me(this,pi);me(this,Cn);me(this,us);this.mutationId=t.mutationId,ce(this,Cn,t.mutationCache),ce(this,pi,[]),this.state=t.state||sD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,pi).includes(t)||(L(this,pi).push(t),this.clearGcTimeout(),L(this,Cn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ce(this,pi,L(this,pi).filter(n=>n!==t)),this.scheduleGc(),L(this,Cn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,pi).length||(this.state.status==="pending"?this.scheduleGc():L(this,Cn).remove(this))}continue(){var t;return((t=L(this,us))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,o,s,c,u,d,f,h,p,v,m,y,b,x,w,P,S,j,C;ce(this,us,iD({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,A)=>{ke(this,mi,Ra).call(this,{type:"failed",failureCount:O,error:A})},onPause:()=>{ke(this,mi,Ra).call(this,{type:"pause"})},onContinue:()=>{ke(this,mi,Ra).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Cn).canRun(this)}));const n=this.state.status==="pending",r=!L(this,us).canStart();try{if(!n){ke(this,mi,Ra).call(this,{type:"pending",variables:t,isPaused:r}),await((a=(i=L(this,Cn).config).onMutate)==null?void 0:a.call(i,t,this));const A=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,t));A!==this.state.context&&ke(this,mi,Ra).call(this,{type:"pending",context:A,variables:t,isPaused:r})}const O=await L(this,us).start();return await((u=(c=L(this,Cn).config).onSuccess)==null?void 0:u.call(c,O,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,O,t,this.state.context)),await((p=(h=L(this,Cn).config).onSettled)==null?void 0:p.call(h,O,null,this.state.variables,this.state.context,this)),await((m=(v=this.options).onSettled)==null?void 0:m.call(v,O,null,t,this.state.context)),ke(this,mi,Ra).call(this,{type:"success",data:O}),O}catch(O){try{throw await((b=(y=L(this,Cn).config).onError)==null?void 0:b.call(y,O,t,this.state.context,this)),await((w=(x=this.options).onError)==null?void 0:w.call(x,O,t,this.state.context)),await((S=(P=L(this,Cn).config).onSettled)==null?void 0:S.call(P,void 0,O,this.state.variables,this.state.context,this)),await((C=(j=this.options).onSettled)==null?void 0:C.call(j,void 0,O,t,this.state.context)),O}finally{ke(this,mi,Ra).call(this,{type:"error",error:O})}}finally{L(this,Cn).runNext(this)}}},pi=new WeakMap,Cn=new WeakMap,us=new WeakMap,mi=new WeakSet,Ra=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ut.batch(()=>{L(this,pi).forEach(r=>{r.onMutationUpdate(t)}),L(this,Cn).notify({mutation:this,type:"updated",action:t})})},CM);function sD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gn,zf,OM,Y9=(OM=class extends qc{constructor(t={}){super();me(this,Gn);me(this,zf);this.config=t,ce(this,Gn,new Map),ce(this,zf,Date.now())}build(t,n,r){const i=new G9({mutationCache:this,mutationId:++Ph(this,zf)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Vh(t),r=L(this,Gn).get(n)??[];r.push(t),L(this,Gn).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Vh(t);if(L(this,Gn).has(n)){const i=(r=L(this,Gn).get(n))==null?void 0:r.filter(a=>a!==t);i&&(i.length===0?L(this,Gn).delete(n):L(this,Gn).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=L(this,Gn).get(Vh(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=L(this,Gn).get(Vh(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ut.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...L(this,Gn).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>GA(n,r))}findAll(t={}){return this.getAll().filter(n=>GA(t,n))}notify(t){Ut.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ut.batch(()=>Promise.all(t.map(n=>n.continue().catch(br))))}},Gn=new WeakMap,zf=new WeakMap,OM);function Vh(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function QA(e){return{onFetch:(t,n)=>{var d,f,h,p,v;const r=t.options,i=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const u=async()=>{let m=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},b=tD(t.options,t.fetchOptions),x=async(w,P,S)=>{if(m)return Promise.reject();if(P==null&&w.pages.length)return Promise.resolve(w);const j={queryKey:t.queryKey,pageParam:P,direction:S?"backward":"forward",meta:t.options.meta};y(j);const C=await b(j),{maxPages:O}=t.options,A=S?B9:F9;return{pages:A(w.pages,C,O),pageParams:A(w.pageParams,P,O)}};if(i&&a.length){const w=i==="backward",P=w?X9:ZA,S={pages:a,pageParams:o},j=P(r,S);s=await x(S,j,w)}else{const w=e??a.length;do{const P=c===0?o[0]??r.initialPageParam:ZA(r,s);if(c>0&&P==null)break;s=await x(s,P),c++}while(c{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function ZA(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function X9(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var jt,Ha,Ka,ql,Gl,qa,Yl,Xl,AM,Q9=(AM=class{constructor(e={}){me(this,jt);me(this,Ha);me(this,Ka);me(this,ql);me(this,Gl);me(this,qa);me(this,Yl);me(this,Xl);ce(this,jt,e.queryCache||new q9),ce(this,Ha,e.mutationCache||new Y9),ce(this,Ka,e.defaultOptions||{}),ce(this,ql,new Map),ce(this,Gl,new Map),ce(this,qa,0)}mount(){Ph(this,qa)._++,L(this,qa)===1&&(ce(this,Yl,Cj.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,jt).onFocus())})),ce(this,Xl,ym.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,jt).onOnline())})))}unmount(){var e,t;Ph(this,qa)._--,L(this,qa)===0&&((e=L(this,Yl))==null||e.call(this),ce(this,Yl,void 0),(t=L(this,Xl))==null||t.call(this),ce(this,Xl,void 0))}isFetching(e){return L(this,jt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,Ha).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,jt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=L(this,jt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(_l(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return L(this,jt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=L(this,jt).get(r.queryHash),a=i==null?void 0:i.state.data,o=I9(t,a);if(o!==void 0)return L(this,jt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ut.batch(()=>L(this,jt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,jt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=L(this,jt);Ut.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=L(this,jt),r={type:"active",...e};return Ut.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ut.batch(()=>L(this,jt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(br).catch(br)}invalidateQueries(e,t={}){return Ut.batch(()=>{if(L(this,jt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ut.batch(()=>L(this,jt).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(br)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(br)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=L(this,jt).build(this,t);return n.isStaleByTime(_l(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(br).catch(br)}fetchInfiniteQuery(e){return e.behavior=QA(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(br).catch(br)}ensureInfiniteQueryData(e){return e.behavior=QA(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ym.isOnline()?L(this,Ha).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,jt)}getMutationCache(){return L(this,Ha)}getDefaultOptions(){return L(this,Ka)}setDefaultOptions(e){ce(this,Ka,e)}setQueryDefaults(e,t){L(this,ql).set(Ns(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,ql).values()],n={};return t.forEach(r=>{Hd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){L(this,Gl).set(Ns(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Gl).values()];let n={};return t.forEach(r=>{Hd(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,Ka).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=jj(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Pj&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,Ka).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,jt).clear(),L(this,Ha).clear()}},jt=new WeakMap,Ha=new WeakMap,Ka=new WeakMap,ql=new WeakMap,Gl=new WeakMap,qa=new WeakMap,Yl=new WeakMap,Xl=new WeakMap,AM),$n,Fe,Vf,On,ds,Ql,Ga,vi,Wf,Zl,Jl,fs,hs,Ya,ec,He,Gu,qb,Gb,Yb,Xb,Qb,Zb,Jb,lD,EM,Z9=(EM=class extends qc{constructor(t,n){super();me(this,He);me(this,$n);me(this,Fe);me(this,Vf);me(this,On);me(this,ds);me(this,Ql);me(this,Ga);me(this,vi);me(this,Wf);me(this,Zl);me(this,Jl);me(this,fs);me(this,hs);me(this,Ya);me(this,ec,new Set);this.options=n,ce(this,$n,t),ce(this,vi,null),ce(this,Ga,Kb()),this.options.experimental_prefetchInRender||L(this,Ga).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Fe).addObserver(this),JA(L(this,Fe),this.options)?ke(this,He,Gu).call(this):this.updateResult(),ke(this,He,Xb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ew(L(this,Fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ew(L(this,Fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ke(this,He,Qb).call(this),ke(this,He,Zb).call(this),L(this,Fe).removeObserver(this)}setOptions(t,n){const r=this.options,i=L(this,Fe);if(this.options=L(this,$n).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xr(this.options.enabled,L(this,Fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ke(this,He,Jb).call(this),L(this,Fe).setOptions(this.options),r._defaulted&&!gm(this.options,r)&&L(this,$n).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Fe),observer:this});const a=this.hasListeners();a&&eE(L(this,Fe),i,this.options,r)&&ke(this,He,Gu).call(this),this.updateResult(n),a&&(L(this,Fe)!==i||Xr(this.options.enabled,L(this,Fe))!==Xr(r.enabled,L(this,Fe))||_l(this.options.staleTime,L(this,Fe))!==_l(r.staleTime,L(this,Fe)))&&ke(this,He,qb).call(this);const o=ke(this,He,Gb).call(this);a&&(L(this,Fe)!==i||Xr(this.options.enabled,L(this,Fe))!==Xr(r.enabled,L(this,Fe))||o!==L(this,Ya))&&ke(this,He,Yb).call(this,o)}getOptimisticResult(t){const n=L(this,$n).getQueryCache().build(L(this,$n),t),r=this.createResult(n,t);return e7(this,r)&&(ce(this,On,r),ce(this,Ql,this.options),ce(this,ds,L(this,Fe).state)),r}getCurrentResult(){return L(this,On)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){L(this,ec).add(t)}getCurrentQuery(){return L(this,Fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=L(this,$n).defaultQueryOptions(t),r=L(this,$n).getQueryCache().build(L(this,$n),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ke(this,He,Gu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,On)))}createResult(t,n){var O;const r=L(this,Fe),i=this.options,a=L(this,On),o=L(this,ds),s=L(this,Ql),u=t!==r?t.state:L(this,Vf),{state:d}=t;let f={...d},h=!1,p;if(n._optimisticResults){const A=this.hasListeners(),E=!A&&JA(t,n),_=A&&eE(t,r,n,i);(E||_)&&(f={...f,...oD(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:y}=f;if(n.select&&f.data!==void 0)if(a&&f.data===(o==null?void 0:o.data)&&n.select===L(this,Wf))p=L(this,Zl);else try{ce(this,Wf,n.select),p=n.select(f.data),p=Hb(a==null?void 0:a.data,p,n),ce(this,Zl,p),ce(this,vi,null)}catch(A){ce(this,vi,A)}else p=f.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let A;if(a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))A=a.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((O=L(this,Jl))==null?void 0:O.state.data,L(this,Jl)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),ce(this,vi,null)}catch(E){ce(this,vi,E)}A!==void 0&&(y="success",p=Hb(a==null?void 0:a.data,A,n),h=!0)}L(this,vi)&&(v=L(this,vi),p=L(this,Zl),m=Date.now(),y="error");const b=f.fetchStatus==="fetching",x=y==="pending",w=y==="error",P=x&&b,S=p!==void 0,C={status:y,fetchStatus:f.fetchStatus,isPending:x,isSuccess:y==="success",isError:w,isInitialLoading:P,isLoading:P,data:p,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:w&&!S,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&S,isStale:Oj(t,n),refetch:this.refetch,promise:L(this,Ga)};if(this.options.experimental_prefetchInRender){const A=N=>{C.status==="error"?N.reject(C.error):C.data!==void 0&&N.resolve(C.data)},E=()=>{const N=ce(this,Ga,C.promise=Kb());A(N)},_=L(this,Ga);switch(_.status){case"pending":t.queryHash===r.queryHash&&A(_);break;case"fulfilled":(C.status==="error"||C.data!==_.value)&&E();break;case"rejected":(C.status!=="error"||C.error!==_.reason)&&E();break}}return C}updateResult(t){const n=L(this,On),r=this.createResult(L(this,Fe),this.options);if(ce(this,ds,L(this,Fe).state),ce(this,Ql,this.options),L(this,ds).data!==void 0&&ce(this,Jl,L(this,Fe)),gm(r,n))return;ce(this,On,r);const i={},a=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!L(this,ec).size)return!0;const c=new Set(s??L(this,ec));return this.options.throwOnError&&c.add("error"),Object.keys(L(this,On)).some(u=>{const d=u;return L(this,On)[d]!==n[d]&&c.has(d)})};(t==null?void 0:t.listeners)!==!1&&a()&&(i.listeners=!0),ke(this,He,lD).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ke(this,He,Xb).call(this)}},$n=new WeakMap,Fe=new WeakMap,Vf=new WeakMap,On=new WeakMap,ds=new WeakMap,Ql=new WeakMap,Ga=new WeakMap,vi=new WeakMap,Wf=new WeakMap,Zl=new WeakMap,Jl=new WeakMap,fs=new WeakMap,hs=new WeakMap,Ya=new WeakMap,ec=new WeakMap,He=new WeakSet,Gu=function(t){ke(this,He,Jb).call(this);let n=L(this,Fe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(br)),n},qb=function(){ke(this,He,Qb).call(this);const t=_l(this.options.staleTime,L(this,Fe));if(Es||L(this,On).isStale||!Vb(t))return;const r=J$(L(this,On).dataUpdatedAt,t)+1;ce(this,fs,setTimeout(()=>{L(this,On).isStale||this.updateResult()},r))},Gb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Fe)):this.options.refetchInterval)??!1},Yb=function(t){ke(this,He,Zb).call(this),ce(this,Ya,t),!(Es||Xr(this.options.enabled,L(this,Fe))===!1||!Vb(L(this,Ya))||L(this,Ya)===0)&&ce(this,hs,setInterval(()=>{(this.options.refetchIntervalInBackground||Cj.isFocused())&&ke(this,He,Gu).call(this)},L(this,Ya)))},Xb=function(){ke(this,He,qb).call(this),ke(this,He,Yb).call(this,ke(this,He,Gb).call(this))},Qb=function(){L(this,fs)&&(clearTimeout(L(this,fs)),ce(this,fs,void 0))},Zb=function(){L(this,hs)&&(clearInterval(L(this,hs)),ce(this,hs,void 0))},Jb=function(){const t=L(this,$n).getQueryCache().build(L(this,$n),this.options);if(t===L(this,Fe))return;const n=L(this,Fe);ce(this,Fe,t),ce(this,Vf,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},lD=function(t){Ut.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(L(this,On))}),L(this,$n).getQueryCache().notify({query:L(this,Fe),type:"observerResultsUpdated"})})},EM);function J9(e,t){return Xr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function JA(e,t){return J9(e,t)||e.state.data!==void 0&&ew(e,t,t.refetchOnMount)}function ew(e,t,n){if(Xr(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Oj(e,t)}return!1}function eE(e,t,n,r){return(e!==t||Xr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Oj(e,n)}function Oj(e,t){return Xr(t.enabled,e)!==!1&&e.isStaleByTime(_l(t.staleTime,e))}function e7(e,t){return!gm(e.getCurrentResult(),t)}var Xa,Qa,Dn,ea,da,Mp,tw,NM,t7=(NM=class extends qc{constructor(n,r){super();me(this,da);me(this,Xa);me(this,Qa);me(this,Dn);me(this,ea);ce(this,Xa,n),this.setOptions(r),this.bindMethods(),ke(this,da,Mp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=L(this,Xa).defaultMutationOptions(n),gm(this.options,r)||L(this,Xa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:L(this,Dn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ns(r.mutationKey)!==Ns(this.options.mutationKey)?this.reset():((i=L(this,Dn))==null?void 0:i.state.status)==="pending"&&L(this,Dn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=L(this,Dn))==null||n.removeObserver(this)}onMutationUpdate(n){ke(this,da,Mp).call(this),ke(this,da,tw).call(this,n)}getCurrentResult(){return L(this,Qa)}reset(){var n;(n=L(this,Dn))==null||n.removeObserver(this),ce(this,Dn,void 0),ke(this,da,Mp).call(this),ke(this,da,tw).call(this)}mutate(n,r){var i;return ce(this,ea,r),(i=L(this,Dn))==null||i.removeObserver(this),ce(this,Dn,L(this,Xa).getMutationCache().build(L(this,Xa),this.options)),L(this,Dn).addObserver(this),L(this,Dn).execute(n)}},Xa=new WeakMap,Qa=new WeakMap,Dn=new WeakMap,ea=new WeakMap,da=new WeakSet,Mp=function(){var r;const n=((r=L(this,Dn))==null?void 0:r.state)??sD();ce(this,Qa,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},tw=function(n){Ut.batch(()=>{var r,i,a,o,s,c,u,d;if(L(this,ea)&&this.hasListeners()){const f=L(this,Qa).variables,h=L(this,Qa).context;(n==null?void 0:n.type)==="success"?((i=(r=L(this,ea)).onSuccess)==null||i.call(r,n.data,f,h),(o=(a=L(this,ea)).onSettled)==null||o.call(a,n.data,null,f,h)):(n==null?void 0:n.type)==="error"&&((c=(s=L(this,ea)).onError)==null||c.call(s,n.error,f,h),(d=(u=L(this,ea)).onSettled)==null||d.call(u,void 0,n.error,f,h))}this.listeners.forEach(f=>{f(L(this,Qa))})})},NM),cD=g.createContext(void 0),Xf=e=>{const t=g.useContext(cD);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},n7=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(cD.Provider,{value:e,children:t})),uD=g.createContext(!1),r7=()=>g.useContext(uD);uD.Provider;function i7(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var a7=g.createContext(i7()),o7=()=>g.useContext(a7);function dD(e,t){return typeof e=="function"?e(...t):!!e}function nw(){}var s7=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},l7=e=>{g.useEffect(()=>{e.clearReset()},[e])},c7=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&dD(n,[e.error,r]),u7=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},d7=(e,t)=>e.isLoading&&e.isFetching&&!t,f7=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,tE=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function h7(e,t,n){var d,f,h,p,v;const r=Xf(),i=r7(),a=o7(),o=r.defaultQueryOptions(e);(f=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",u7(o),s7(o,a),l7(a);const s=!r.getQueryCache().get(o.queryHash),[c]=g.useState(()=>new t(r,o)),u=c.getOptimisticResult(o);if(g.useSyncExternalStore(g.useCallback(m=>{const y=i?nw:c.subscribe(Ut.batchCalls(m));return c.updateResult(),y},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),f7(o,u))throw tE(o,c,a);if(c7({result:u,errorResetBoundary:a,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((p=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||p.call(h,o,u),o.experimental_prefetchInRender&&!Es&&d7(u,i)){const m=s?tE(o,c,a):(v=r.getQueryCache().get(o.queryHash))==null?void 0:v.promise;m==null||m.catch(nw).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function kt(e,t){return h7(e,Z9)}function I0(e,t){const n=Xf(),[r]=g.useState(()=>new t7(n,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);const i=g.useSyncExternalStore(g.useCallback(o=>r.subscribe(Ut.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=g.useCallback((o,s)=>{r.mutate(o,s).catch(nw)},[r]);if(i.error&&dD(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const p7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fD=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var m7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const v7=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},c)=>g.createElement("svg",{ref:c,...m7,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fD("lucide",i),...s},[...o.map(([u,d])=>g.createElement(u,d)),...Array.isArray(a)?a:[a]]));/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const re=(e,t)=>{const n=g.forwardRef(({className:r,...i},a)=>g.createElement(v7,{ref:a,iconNode:t,className:fD(`lucide-${p7(e)}`,r),...i}));return n.displayName=`${e}`,n};/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const g7=re("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vs=re("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hD=re("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y7=re("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const x7=re("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b7=re("Binary",[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const w7=re("Blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const S7=re("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Gc=re("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dg=re("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nE=re("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xm=re("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const j7=re("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rr=re("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const P7=re("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const C7=re("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const O7=re("CircuitBoard",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const A7=re("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rE=re("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const E7=re("Coffee",[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iE=re("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fg=re("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hg=re("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const N7=re("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const T7=re("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bm=re("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _7=re("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pD=re("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k7=re("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mD=re("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wm=re("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const M7=re("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const R7=re("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vD=re("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $7=re("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const D7=re("FolderClosed",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M2 10h20",key:"1ir3d8"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gD=re("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aE=re("Gem",[["path",{d:"M6 3h12l4 6-10 13L2 9Z",key:"1pcd5k"}],["path",{d:"M11 3 8 9l4 13 4-13-3-6",key:"1fcu3u"}],["path",{d:"M2 9h20",key:"16fsjt"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const I7=re("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qf=re("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const L7=re("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Aj=re("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const F7=re("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ji=re("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const B7=re("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const U7=re("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zf=re("MemoryStick",[["path",{d:"M6 19v-3",key:"1nvgqn"}],["path",{d:"M10 19v-3",key:"iu8nkm"}],["path",{d:"M14 19v-3",key:"kcehxu"}],["path",{d:"M18 19v-3",key:"1vh91z"}],["path",{d:"M8 11V9",key:"63erz4"}],["path",{d:"M16 11V9",key:"fru6f3"}],["path",{d:"M12 11V9",key:"ha00sb"}],["path",{d:"M2 15h20",key:"16ne18"}],["path",{d:"M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z",key:"lhddv3"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const z7=re("MessageCircleQuestion",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const V7=re("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oE=re("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const W7=re("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const H7=re("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const K7=re("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Wn=re("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const q7=re("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yD=re("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const G7=re("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ve=re("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Y7=re("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xD=re("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yc=re("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const X7=re("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Q7=re("SendToBack",[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",key:"1b0bso"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",key:"1x09vl"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1",key:"pao6x6"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1",key:"19tdru"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const va=re("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bD=re("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Z7=re("ShieldBan",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wD=re("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const J7=re("SquareKanban",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 7v7",key:"1x2jlm"}],["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M16 7v9",key:"1hp2iy"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eH=re("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const SD=re("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sE=re("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tH=re("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nH=re("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pg=re("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rH=re("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bo=re("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ej=re("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jD=re("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iH=re("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aH=re("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rw=re("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fd=re("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oH=re("Variable",[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sH=re("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/** - * @license lucide-react v0.469.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PD=re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function CD(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=uH(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(Nj);return s[0]===""&&s.length!==1&&s.shift(),OD(s,t)||cH(o)},getConflictingClassGroupIds:(o,s)=>{const c=n[o]||[];return s&&r[o]?[...c,...r[o]]:c}}},OD=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?OD(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Nj);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},lE=/^\[(.+)\]$/,cH=e=>{if(lE.test(e)){const t=lE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},uH=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return fH(Object.entries(e.classGroups),n).forEach(([a,o])=>{iw(o,r,a,t)}),r},iw=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:cE(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(dH(i)){iw(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{iw(o,cE(t,a),n,r)})})},cE=(e,t)=>{let n=e;return t.split(Nj).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},dH=e=>e.isThemeGetter,fH=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[n,i]}):e,hH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},AD="!",pH=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const c=[];let u=0,d=0,f;for(let y=0;yd?f-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}};return n?s=>n({className:s,parseClassName:o}):o},mH=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},vH=e=>({cache:hH(e.cacheSize),parseClassName:pH(e),...lH(e)}),gH=/\s+/,yH=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(gH);let s="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let v=!!p,m=r(v?h.substring(0,p):h);if(!m){if(!v){s=u+(s.length>0?" "+s:s);continue}if(m=r(h),!m){s=u+(s.length>0?" "+s:s);continue}v=!1}const y=mH(d).join(":"),b=f?y+AD:y,x=b+m;if(a.includes(x))continue;a.push(x);const w=i(m,v);for(let P=0;P0?" "+s:s)}return s};function xH(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(d),e());return n=vH(u),r=n.cache.get,i=n.cache.set,a=s,s(c)}function s(c){const u=r(c);if(u)return u;const d=yH(c,n);return i(c,d),d}return function(){return a(xH.apply(null,arguments))}}const it=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ND=/^\[(?:([a-z-]+):)?(.+)\]$/i,wH=/^\d+\/\d+$/,SH=new Set(["px","full","screen"]),jH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,CH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,OH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yi=e=>kl(e)||SH.has(e)||wH.test(e),ka=e=>Xc(e,"length",$H),kl=e=>!!e&&!Number.isNaN(Number(e)),L0=e=>Xc(e,"number",kl),Tu=e=>!!e&&Number.isInteger(Number(e)),EH=e=>e.endsWith("%")&&kl(e.slice(0,-1)),Ne=e=>ND.test(e),Ma=e=>jH.test(e),NH=new Set(["length","size","percentage"]),TH=e=>Xc(e,NH,TD),_H=e=>Xc(e,"position",TD),kH=new Set(["image","url"]),MH=e=>Xc(e,kH,IH),RH=e=>Xc(e,"",DH),_u=()=>!0,Xc=(e,t,n)=>{const r=ND.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},$H=e=>PH.test(e)&&!CH.test(e),TD=()=>!1,DH=e=>OH.test(e),IH=e=>AH.test(e),LH=()=>{const e=it("colors"),t=it("spacing"),n=it("blur"),r=it("brightness"),i=it("borderColor"),a=it("borderRadius"),o=it("borderSpacing"),s=it("borderWidth"),c=it("contrast"),u=it("grayscale"),d=it("hueRotate"),f=it("invert"),h=it("gap"),p=it("gradientColorStops"),v=it("gradientColorStopPositions"),m=it("inset"),y=it("margin"),b=it("opacity"),x=it("padding"),w=it("saturate"),P=it("scale"),S=it("sepia"),j=it("skew"),C=it("space"),O=it("translate"),A=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",Ne,t],N=()=>[Ne,t],k=()=>["",Yi,ka],M=()=>["auto",kl,Ne],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Ne],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[kl,Ne];return{cacheSize:500,separator:":",theme:{colors:[_u],spacing:[Yi,ka],blur:["none","",Ma,Ne],brightness:z(),borderColor:[e],borderRadius:["none","","full",Ma,Ne],borderSpacing:N(),borderWidth:k(),contrast:z(),grayscale:R(),hueRotate:z(),invert:R(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[EH,ka],inset:_(),margin:_(),opacity:z(),padding:N(),saturate:z(),scale:z(),sepia:R(),skew:z(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[Ma]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),Ne]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Tu,Ne]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ne]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",Tu,Ne]}],"grid-cols":[{"grid-cols":[_u]}],"col-start-end":[{col:["auto",{span:["full",Tu,Ne]},Ne]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[_u]}],"row-start-end":[{row:["auto",{span:[Tu,Ne]},Ne]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ne]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ne,t]}],"min-w":[{"min-w":[Ne,t,"min","max","fit"]}],"max-w":[{"max-w":[Ne,t,"none","full","min","max","fit","prose",{screen:[Ma]},Ma]}],h:[{h:[Ne,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ne,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ne,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ne,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ma,ka]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",L0]}],"font-family":[{font:[_u]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ne]}],"line-clamp":[{"line-clamp":["none",kl,L0]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yi,Ne]}],"list-image":[{"list-image":["none",Ne]}],"list-style-type":[{list:["none","disc","decimal",Ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yi,ka]}],"underline-offset":[{"underline-offset":["auto",Yi,Ne]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),_H]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",TH]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},MH]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:D()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[Yi,Ne]}],"outline-w":[{outline:[Yi,ka]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Yi,ka]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ma,RH]}],"shadow-color":[{shadow:[_u]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ma,Ne]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ne]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",Ne]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Tu,Ne]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ne]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ne]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Yi,ka,L0]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},FH=bH(LH);function le(...e){return FH(Le(e))}const ve=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ve.displayName="Card";const je=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("flex flex-col space-y-1.5 p-6",e),...t}));je.displayName="CardHeader";const Te=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";const En=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("text-sm text-muted-foreground",e),...t}));En.displayName="CardDescription";const xe=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("p-6 pt-0",e),...t}));xe.displayName="CardContent";const Jf=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("flex items-center p-6 pt-0",e),...t}));Jf.displayName="CardFooter";function BH(e,t){const n=g.createContext(t),r=a=>{const{children:o,...s}=a,c=g.useMemo(()=>s,Object.values(s));return l.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(a){const o=g.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function un(e,t=[]){let n=[];function r(a,o){const s=g.createContext(o),c=n.length;n=[...n,o];const u=f=>{var b;const{scope:h,children:p,...v}=f,m=((b=h==null?void 0:h[e])==null?void 0:b[c])||s,y=g.useMemo(()=>v,Object.values(v));return l.jsx(m.Provider,{value:y,children:p})};u.displayName=a+"Provider";function d(f,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[c])||s,v=g.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,d]}const i=()=>{const a=n.map(o=>g.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return g.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[r,UH(i,...t)]}function UH(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:c,scopeName:u})=>{const f=c(a)[`__scope${u}`];return{...s,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function uE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mg(...e){return t=>{let n=!1;const r=e.map(i=>{const a=uE(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=g.Children.toArray(n),a=i.find(zH);if(a){const o=a.props.children,s=i.map(c=>c===a?g.Children.count(o)>1?g.Children.only(null):g.isValidElement(o)?o.props.children:null:c);return l.jsx(aw,{...r,ref:t,children:g.isValidElement(o)?g.cloneElement(o,void 0,s):null})}return l.jsx(aw,{...r,ref:t,children:n})});wo.displayName="Slot";var aw=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const i=WH(n);return g.cloneElement(n,{...VH(r,n.props),ref:t?mg(t,i):i})}return g.Children.count(n)>1?g.Children.only(null):null});aw.displayName="SlotClone";var Tj=({children:e})=>l.jsx(l.Fragment,{children:e});function zH(e){return g.isValidElement(e)&&e.type===Tj}function VH(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function WH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function vg(e){const t=e+"CollectionProvider",[n,r]=un(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:v,children:m}=p,y=T.useRef(null),b=T.useRef(new Map).current;return l.jsx(i,{scope:v,itemMap:b,collectionRef:y,children:m})};o.displayName=t;const s=e+"CollectionSlot",c=T.forwardRef((p,v)=>{const{scope:m,children:y}=p,b=a(s,m),x=_e(v,b.collectionRef);return l.jsx(wo,{ref:x,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=T.forwardRef((p,v)=>{const{scope:m,children:y,...b}=p,x=T.useRef(null),w=_e(v,x),P=a(u,m);return T.useEffect(()=>(P.itemMap.set(x,{ref:x,...b}),()=>void P.itemMap.delete(x))),l.jsx(wo,{[d]:"",ref:w,children:y})});f.displayName=u;function h(p){const v=a(e+"CollectionConsumer",p);return T.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((P,S)=>b.indexOf(P.ref.current)-b.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},h,r]}function ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Dt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function _r({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=HH({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Dt(n),c=g.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[a,e,i,s]);return[o,c]}function HH({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,i=g.useRef(r),a=Dt(t);return g.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var KH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pe=KH.reduce((e,t)=>{const n=g.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?wo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function _D(e,t){e&&Vc.flushSync(()=>e.dispatchEvent(t))}var Kt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{};function qH(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Zt=e=>{const{present:t,children:n}=e,r=GH(t),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),a=_e(r.ref,YH(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:a}):null};Zt.displayName="Presence";function GH(e){const[t,n]=g.useState(),r=g.useRef({}),i=g.useRef(e),a=g.useRef("none"),o=e?"mounted":"unmounted",[s,c]=qH(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=Wh(r.current);a.current=s==="mounted"?u:"none"},[s]),Kt(()=>{const u=r.current,d=i.current;if(d!==e){const h=a.current,p=Wh(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Kt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const m=Wh(r.current).includes(p.animationName);if(p.target===t&&m&&(c("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(a.current=Wh(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Wh(e){return(e==null?void 0:e.animationName)||"none"}function YH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var XH=BM.useId||(()=>{}),QH=0;function ir(e){const[t,n]=g.useState(XH());return Kt(()=>{n(r=>r??String(QH++))},[e]),t?`radix-${t}`:""}var _j="Collapsible",[ZH,kD]=un(_j),[JH,kj]=ZH(_j),MD=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c=!1,u]=_r({prop:r,defaultProp:i,onChange:o});return l.jsx(JH,{scope:n,disabled:a,contentId:ir(),open:c,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),children:l.jsx(pe.div,{"data-state":Rj(c),"data-disabled":a?"":void 0,...s,ref:t})})});MD.displayName=_j;var RD="CollapsibleTrigger",$D=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=kj(RD,n);return l.jsx(pe.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Rj(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:ne(e.onClick,i.onOpenToggle)})});$D.displayName=RD;var Mj="CollapsibleContent",DD=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=kj(Mj,e.__scopeCollapsible);return l.jsx(Zt,{present:n||i.open,children:({present:a})=>l.jsx(eK,{...r,ref:t,present:a})})});DD.displayName=Mj;var eK=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=kj(Mj,n),[s,c]=g.useState(r),u=g.useRef(null),d=_e(t,u),f=g.useRef(0),h=f.current,p=g.useRef(0),v=p.current,m=o.open||s,y=g.useRef(m),b=g.useRef(void 0);return g.useEffect(()=>{const x=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(x)},[]),Kt(()=>{const x=u.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();f.current=w.height,p.current=w.width,y.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),c(r)}},[o.open,r]),l.jsx(pe.div,{"data-state":Rj(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...a,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:m&&i})});function Rj(e){return e?"open":"closed"}var tK=MD,nK=$D,rK=DD,iK=g.createContext(void 0);function Qc(e){const t=g.useContext(iK);return e||t||"ltr"}var Ca="Accordion",aK=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[$j,oK,sK]=vg(Ca),[gg,S_e]=un(Ca,[sK,kD]),Dj=kD(),ID=T.forwardRef((e,t)=>{const{type:n,...r}=e,i=r,a=r;return l.jsx($j.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(dK,{...a,ref:t}):l.jsx(uK,{...i,ref:t})})});ID.displayName=Ca;var[LD,lK]=gg(Ca),[FD,cK]=gg(Ca,{collapsible:!1}),uK=T.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=_r({prop:n,defaultProp:r,onChange:i});return l.jsx(LD,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:T.useCallback(()=>a&&c(""),[a,c]),children:l.jsx(FD,{scope:e.__scopeAccordion,collapsible:a,children:l.jsx(BD,{...o,ref:t})})})}),dK=T.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o=[],s]=_r({prop:n,defaultProp:r,onChange:i}),c=T.useCallback(d=>s((f=[])=>[...f,d]),[s]),u=T.useCallback(d=>s((f=[])=>f.filter(h=>h!==d)),[s]);return l.jsx(LD,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:l.jsx(FD,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(BD,{...a,ref:t})})})}),[fK,yg]=gg(Ca),BD=T.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:a="vertical",...o}=e,s=T.useRef(null),c=_e(s,t),u=oK(n),f=Qc(i)==="ltr",h=ne(e.onKeyDown,p=>{var O;if(!aK.includes(p.key))return;const v=p.target,m=u().filter(A=>{var E;return!((E=A.ref.current)!=null&&E.disabled)}),y=m.findIndex(A=>A.ref.current===v),b=m.length;if(y===-1)return;p.preventDefault();let x=y;const w=0,P=b-1,S=()=>{x=y+1,x>P&&(x=w)},j=()=>{x=y-1,x{const{__scopeAccordion:n,value:r,...i}=e,a=yg(Sm,n),o=lK(Sm,n),s=Dj(n),c=ir(),u=r&&o.value.includes(r)||!1,d=a.disabled||e.disabled;return l.jsx(hK,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx(tK,{"data-orientation":a.orientation,"data-state":qD(u),...s,...i,ref:t,disabled:d,open:u,onOpenChange:f=>{f?o.onItemOpen(r):o.onItemClose(r)}})})});UD.displayName=Sm;var zD="AccordionHeader",VD=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=yg(Ca,n),a=Ij(zD,n);return l.jsx(pe.h3,{"data-orientation":i.orientation,"data-state":qD(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});VD.displayName=zD;var ow="AccordionTrigger",WD=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=yg(Ca,n),a=Ij(ow,n),o=cK(ow,n),s=Dj(n);return l.jsx($j.ItemSlot,{scope:n,children:l.jsx(nK,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});WD.displayName=ow;var HD="AccordionContent",KD=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=yg(Ca,n),a=Ij(HD,n),o=Dj(n);return l.jsx(rK,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});KD.displayName=HD;function qD(e){return e?"open":"closed"}var pK=ID,mK=UD,vK=VD,GD=WD,YD=KD;const gK=pK,XD=g.forwardRef(({className:e,...t},n)=>l.jsx(mK,{ref:n,className:le("border-b",e),...t}));XD.displayName="AccordionItem";const QD=g.forwardRef(({className:e,children:t,...n},r)=>l.jsx(vK,{className:"flex",children:l.jsxs(GD,{ref:r,className:le("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(dg,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));QD.displayName=GD.displayName;const ZD=g.forwardRef(({className:e,children:t,...n},r)=>l.jsx(YD,{ref:r,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:le("pb-4 pt-0",e),children:t})}));ZD.displayName=YD.displayName;const dE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fE=Le,xg=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return fE(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],f=a==null?void 0:a[u];if(d===null)return null;const h=dE(d)||dE(f);return i[u][h]}),s=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(v=>{let[m,y]=v;return Array.isArray(y)?y.includes({...a,...s}[m]):{...a,...s}[m]===y})?[...u,f,h]:u},[]);return fE(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},Lj=xg("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Y=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?wo:"button";return l.jsx(o,{className:le(Lj({variant:t,size:n,className:e})),ref:a,...i})});Y.displayName="Button";function yK(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function bg(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const sw=e=>Array.isArray(e);function JD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Fj(e,t,n,r){if(typeof t=="function"){const[i,a]=hE(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=hE(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function wg(e,t,n){const r=e.getProps();return Fj(r,t,n!==void 0?n:r.custom,e)}const Bj=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Uj=["initial",...Bj],eh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zs=new Set(eh),oa=e=>e*1e3,sa=e=>e/1e3,xK={type:"spring",stiffness:500,damping:25,restSpeed:10},bK=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wK={type:"keyframes",duration:.8},SK={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jK=(e,{keyframes:t})=>t.length>2?wK:zs.has(e)?e.startsWith("scale")?bK(t[1]):xK:SK;function zj(e,t){return e?e[t]||e.default||e:void 0}const PK={skipAnimations:!1,useManualTiming:!1},CK=e=>e!==null;function Sg(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(CK),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const ar=e=>e;let lw=ar;function OK(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(u){a.has(u)&&(c.schedule(u),e()),u(o)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&r?t:n;return d&&a.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),a.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(u))}};return c}const Hh=["read","resolveKeyframes","update","preRender","render","postRender"],AK=40;function eI(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Hh.reduce((b,x)=>(b[x]=OK(a),b),{}),{read:s,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=o,p=()=>{const b=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,AK),1),i.timestamp=b,i.isProcessing=!0,s.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},v=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Hh.reduce((b,x)=>{const w=o[x];return b[x]=(P,S=!1,j=!1)=>(n||v(),w.schedule(P,S,j)),b},{}),cancel:b=>{for(let x=0;x(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,EK=1e-7,NK=12;function TK(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=tI(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>EK&&++sTK(a,0,1,e,n);return a=>a===0||a===1?a:tI(i(a),t,r)}const nI=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rI=e=>t=>1-e(1-t),iI=th(.33,1.53,.69,.99),Vj=rI(iI),aI=nI(Vj),oI=e=>(e*=2)<1?.5*Vj(e):.5*(2-Math.pow(2,-10*(e-1))),Wj=e=>1-Math.sin(Math.acos(e)),sI=rI(Wj),lI=nI(Wj),cI=e=>/^0[^.\s]+$/u.test(e);function _K(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||cI(e):!0}const uI=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),dI=e=>t=>typeof t=="string"&&t.startsWith(e),fI=dI("--"),kK=dI("var(--"),Hj=e=>kK(e)?MK.test(e.split("/*")[0].trim()):!1,MK=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,RK=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $K(e){const t=RK.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function hI(e,t,n=1){const[r,i]=$K(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return uI(o)?parseFloat(o):o}return Hj(i)?hI(i,t,n+1):i}const ga=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},qd={...Zc,transform:e=>ga(0,1,e)},Kh={...Zc,default:1},nh=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$a=nh("deg"),Pi=nh("%"),ye=nh("px"),DK=nh("vh"),IK=nh("vw"),pE={...Pi,parse:e=>Pi.parse(e)/100,transform:e=>Pi.transform(e*100)},LK=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),mE=e=>e===Zc||e===ye,vE=(e,t)=>parseFloat(e.split(", ")[t]),gE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return vE(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?vE(a[1],e):0}},FK=new Set(["x","y","z"]),BK=eh.filter(e=>!FK.has(e));function UK(e){const t=[];return BK.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const lc={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:gE(4,13),y:gE(5,14)};lc.translateX=lc.x;lc.translateY=lc.y;const pI=e=>t=>t.test(e),zK={test:e=>e==="auto",parse:e=>e},mI=[Zc,ye,Pi,$a,IK,DK,zK],yE=e=>mI.find(pI(e)),gs=new Set;let cw=!1,uw=!1;function vI(){if(uw){const e=Array.from(gs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=UK(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}uw=!1,cw=!1,gs.forEach(e=>e.complete()),gs.clear()}function gI(){gs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(uw=!0)})}function VK(){gI(),vI()}class Kj{constructor(t,n,r,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(gs.add(this),cw||(cw=!0,ft.read(gI),ft.resolveKeyframes(vI))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;aMath.round(e*1e5)/1e5,qj=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function WK(e){return e==null}const HK=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gj=(e,t)=>n=>!!(typeof n=="string"&&HK.test(n)&&n.startsWith(e)||t&&!WK(n)&&Object.prototype.hasOwnProperty.call(n,t)),yI=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(qj);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},KK=e=>ga(0,255,e),B0={...Zc,transform:e=>Math.round(KK(e))},es={test:Gj("rgb","red"),parse:yI("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+B0.transform(e)+", "+B0.transform(t)+", "+B0.transform(n)+", "+hd(qd.transform(r))+")"};function qK(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const dw={test:Gj("#"),parse:qK,transform:es.transform},vl={test:Gj("hsl","hue"),parse:yI("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pi.transform(hd(t))+", "+Pi.transform(hd(n))+", "+hd(qd.transform(r))+")"},mn={test:e=>es.test(e)||dw.test(e)||vl.test(e),parse:e=>es.test(e)?es.parse(e):vl.test(e)?vl.parse(e):dw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?es.transform(e):vl.transform(e)},GK=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function YK(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(qj))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(GK))===null||n===void 0?void 0:n.length)||0)>0}const xI="number",bI="color",XK="var",QK="var(",xE="${}",ZK=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Gd(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(ZK,c=>(mn.test(c)?(r.color.push(a),i.push(bI),n.push(mn.parse(c))):c.startsWith(QK)?(r.var.push(a),i.push(XK),n.push(c)):(r.number.push(a),i.push(xI),n.push(parseFloat(c))),++a,xE)).split(xE);return{values:n,split:s,indexes:r,types:i}}function wI(e){return Gd(e).values}function SI(e){const{split:t,types:n}=Gd(e),r=t.length;return i=>{let a="";for(let o=0;otypeof e=="number"?0:e;function eq(e){const t=wI(e);return SI(e)(t.map(JK))}const jo={test:YK,parse:wI,createTransformer:SI,getAnimatableNone:eq},tq=new Set(["brightness","contrast","saturate","opacity"]);function nq(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(qj)||[];if(!r)return e;const i=n.replace(r,"");let a=tq.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const rq=/\b([a-z-]*)\(.*?\)/gu,fw={...jo,getAnimatableNone:e=>{const t=e.match(rq);return t?t.map(nq).join(" "):e}},iq={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},aq={rotate:$a,rotateX:$a,rotateY:$a,rotateZ:$a,scale:Kh,scaleX:Kh,scaleY:Kh,scaleZ:Kh,skew:$a,skewX:$a,skewY:$a,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:qd,originX:pE,originY:pE,originZ:ye},bE={...Zc,transform:Math.round},Yj={...iq,...aq,zIndex:bE,size:ye,fillOpacity:qd,strokeOpacity:qd,numOctaves:bE},oq={...Yj,color:mn,backgroundColor:mn,outlineColor:mn,fill:mn,stroke:mn,borderColor:mn,borderTopColor:mn,borderRightColor:mn,borderBottomColor:mn,borderLeftColor:mn,filter:fw,WebkitFilter:fw},Xj=e=>oq[e];function jI(e,t){let n=Xj(e);return n!==fw&&(n=jo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const sq=new Set(["auto","none","0"]);function lq(e,t,n){let r=0,i;for(;r{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Qj(e){return typeof e=="function"}let Rp;function cq(){Rp=void 0}const Ci={now:()=>(Rp===void 0&&Ci.set(an.isProcessing||PK.useManualTiming?an.timestamp:performance.now()),Rp),set:e=>{Rp=e,queueMicrotask(cq)}},wE=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(jo.test(e)||e==="0")&&!e.startsWith("url("));function uq(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nfq?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&VK(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ci.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:c,isGenerator:u}=this.options;if(!u&&!dq(t,r,i,a))if(o)this.options.duration=0;else{c==null||c(Sg(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const cc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},OI=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a{const d=u*o,f=d*e,h=d-n,p=hw(u,o),v=Math.exp(-f);return U0-h/p*v},a=u=>{const f=u*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-f),m=hw(Math.pow(u,2),o);return(-i(u)+U0>0?-1:1)*((h-p)*v)/m}):(i=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-U0+d*f},a=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const s=5/e,c=vq(i,a,s);if(e=oa(e),isNaN(c))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const mq=12;function vq(e,t,n){let r=n;for(let i=1;i=pw?1/0:t}const gq=["duration","bounce"],yq=["stiffness","damping","mass"];function SE(e,t){return t.some(n=>e[n]!==void 0)}function xq(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!SE(e,yq)&&SE(e,gq))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ga(.05,1,1-e.bounce)*Math.sqrt(i);t={...t,mass:Pt.mass,stiffness:i,damping:a}}else{const n=pq(e);t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function TI(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=xq({...n,velocity:-sa(n.velocity||0)}),v=h||0,m=u/(2*Math.sqrt(c*d)),y=o-a,b=sa(Math.sqrt(c/d)),x=Math.abs(y)<5;r||(r=x?Pt.restSpeed.granular:Pt.restSpeed.default),i||(i=x?Pt.restDelta.granular:Pt.restDelta.default);let w;if(m<1){const S=hw(b,m);w=j=>{const C=Math.exp(-m*b*j);return o-C*((v+m*b*y)/S*Math.sin(S*j)+y*Math.cos(S*j))}}else if(m===1)w=S=>o-Math.exp(-b*S)*(y+(v+b*y)*S);else{const S=b*Math.sqrt(m*m-1);w=j=>{const C=Math.exp(-m*b*j),O=Math.min(S*j,300);return o-C*((v+m*b*y)*Math.sinh(O)+S*y*Math.cosh(O))/S}}const P={calculatedDuration:p&&f||null,next:S=>{const j=w(S);if(p)s.done=S>=f;else{let C=0;m<1&&(C=S===0?oa(v):EI(w,S,j));const O=Math.abs(C)<=r,A=Math.abs(o-j)<=i;s.done=O&&A}return s.value=s.done?o:j,s},toString:()=>{const S=Math.min(NI(P),pw),j=OI(C=>P.next(S*C).value,S,30);return S+"ms "+j}};return P}function jE({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=O=>s!==void 0&&Oc,v=O=>s===void 0?c:c===void 0||Math.abs(s-O)-m*Math.exp(-O/r),w=O=>b+x(O),P=O=>{const A=x(O),E=w(O);h.done=Math.abs(A)<=u,h.value=h.done?b:E};let S,j;const C=O=>{p(h.value)&&(S=O,j=TI({keyframes:[h.value,v(h.value)],velocity:EI(w,O,h.value),damping:i,stiffness:a,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:O=>{let A=!1;return!j&&S===void 0&&(A=!0,P(O),C(O)),S!==void 0&&O>=S?j.next(O-S):(!A&&P(O),h)}}}const bq=th(.42,0,1,1),wq=th(0,0,.58,1),_I=th(.42,0,.58,1),Sq=e=>Array.isArray(e)&&typeof e[0]!="number",Zj=e=>Array.isArray(e)&&typeof e[0]=="number",PE={linear:ar,easeIn:bq,easeInOut:_I,easeOut:wq,circIn:Wj,circInOut:lI,circOut:sI,backIn:Vj,backInOut:aI,backOut:iI,anticipate:oI},CE=e=>{if(Zj(e)){lw(e.length===4);const[t,n,r,i]=e;return th(t,n,r,i)}else if(typeof e=="string")return lw(PE[e]!==void 0),PE[e];return e},jq=(e,t)=>n=>t(e(n)),rh=(...e)=>e.reduce(jq),bt=(e,t,n)=>e+(t-e)*n;function z0(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Pq({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=z0(c,s,e+1/3),a=z0(c,s,e),o=z0(c,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function jm(e,t){return n=>n>0?t:e}const V0=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Cq=[dw,es,vl],Oq=e=>Cq.find(t=>t.test(e));function OE(e){const t=Oq(e);if(!t)return!1;let n=t.parse(e);return t===vl&&(n=Pq(n)),n}const AE=(e,t)=>{const n=OE(e),r=OE(t);if(!n||!r)return jm(e,t);const i={...n};return a=>(i.red=V0(n.red,r.red,a),i.green=V0(n.green,r.green,a),i.blue=V0(n.blue,r.blue,a),i.alpha=bt(n.alpha,r.alpha,a),es.transform(i))},mw=new Set(["none","hidden"]);function Aq(e,t){return mw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Eq(e,t){return n=>bt(e,t,n)}function Jj(e){return typeof e=="number"?Eq:typeof e=="string"?Hj(e)?jm:mn.test(e)?AE:_q:Array.isArray(e)?kI:typeof e=="object"?mn.test(e)?AE:Nq:jm}function kI(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>Jj(a)(a,t[o]));return a=>{for(let o=0;o{for(const a in r)n[a]=r[a](i);return n}}function Tq(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a{const n=jo.createTransformer(t),r=Gd(e),i=Gd(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?mw.has(e)&&!i.values.length||mw.has(t)&&!r.values.length?Aq(e,t):rh(kI(Tq(r,i),i.values),n):jm(e,t)};function MI(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?bt(e,t,n):Jj(e)(e,t)}function kq(e,t,n){const r=[],i=n||MI,a=e.length-1;for(let o=0;ot[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=kq(t,r,i),s=o.length,c=u=>{let d=0;if(s>1)for(;dc(ga(e[0],e[a-1],u)):c}function Rq(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=cc(0,t,r);e.push(bt(n,1,i))}}function $q(e){const t=[0];return Rq(t,e.length-1),t}function Dq(e,t){return e.map(n=>n*t)}function Iq(e,t){return e.map(()=>t||_I).splice(0,e.length-1)}function Pm({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Sq(r)?r.map(CE):CE(r),a={done:!1,value:t[0]},o=Dq(n&&n.length===t.length?n:$q(t),e),s=Mq(o,t,{ease:Array.isArray(i)?i:Iq(t,i)});return{calculatedDuration:e,next:c=>(a.value=s(c),a.done=c>=e,a)}}const Lq=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ft.update(t,!0),stop:()=>So(t),now:()=>an.isProcessing?an.timestamp:Ci.now()}},Fq={decay:jE,inertia:jE,tween:Pm,keyframes:Pm,spring:TI},Bq=e=>e/100;class eP extends CI{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Kj,s=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=Qj(n)?n:Fq[n]||Pm;let c,u;s!==Pm&&typeof t[0]!="number"&&(c=rh(Bq,MI(t[0],t[1])),t=[0,100]);const d=s({...this.options,keyframes:t});a==="mirror"&&(u=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=NI(d));const{calculatedDuration:f}=d,h=f+i,p=h*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return a.next(0);const{delay:h,repeat:p,repeatType:v,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?b<0:b>d;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,P=a;if(p){const O=Math.min(this.currentTime,d)/f;let A=Math.floor(O),E=O%1;!E&&O>=1&&(E=1),E===1&&A--,A=Math.min(A,p+1),!!(A%2)&&(v==="reverse"?(E=1-E,m&&(E-=m/f)):v==="mirror"&&(P=o)),w=ga(0,1,E)*f}const S=x?{done:!1,value:c[0]}:P.next(w);s&&(S.value=s(S.value));let{done:j}=S;!x&&u!==null&&(j=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return C&&i!==void 0&&(S.value=Sg(c,this.options,i)),y&&y(S.value),C&&this.finish(),S}get duration(){const{resolved:t}=this;return t?sa(t.calculatedDuration):0}get time(){return sa(this.currentTime)}set time(t){t=oa(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=sa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Lq,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Uq=new Set(["opacity","clipPath","filter","transform"]);function tP(e){let t;return()=>(t===void 0&&(t=e()),t)}const zq={linearEasing:void 0};function Vq(e,t){const n=tP(e);return()=>{var r;return(r=zq[t])!==null&&r!==void 0?r:n()}}const Cm=Vq(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function RI(e){return!!(typeof e=="function"&&Cm()||!e||typeof e=="string"&&(e in vw||Cm())||Zj(e)||Array.isArray(e)&&e.every(RI))}const Yu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,vw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yu([0,.65,.55,1]),circOut:Yu([.55,0,1,.45]),backIn:Yu([.31,.01,.66,-.59]),backOut:Yu([.33,1.53,.69,.99])};function $I(e,t){if(e)return typeof e=="function"&&Cm()?OI(e,t):Zj(e)?Yu(e):Array.isArray(e)?e.map(n=>$I(n,t)||vw.easeOut):vw[e]}function Wq(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=$I(s,i);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function EE(e,t){e.timeline=t,e.onfinish=null}const Hq=tP(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Om=10,Kq=2e4;function qq(e){return Qj(e.type)||e.type==="spring"||!RI(e.ease)}function Gq(e,t){const n=new eP({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&athis.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:s,motionValue:c,name:u,startTime:d}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Cm()&&Yq(o)&&(o=DI[o]),qq(this.options)){const{onComplete:h,onUpdate:p,motionValue:v,element:m,...y}=this.options,b=Gq(t,y);t=b.keyframes,t.length===1&&(t[1]=t[0]),i=b.duration,a=b.times,o=b.ease,s="keyframes"}const f=Wq(c.owner.current,u,t,{...this.options,duration:i,times:a,ease:o});return f.startTime=d??this.calcStartTime(),this.pendingTimeline?(EE(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:h}=this.options;c.set(Sg(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:a,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return sa(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return sa(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=oa(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ar;const{animation:r}=n;EE(r,t)}return ar}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...p}=this.options,v=new eP({...p,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),m=oa(this.time);u.setWithVelocity(v.sample(m-Om).value,v.sample(m).value,Om)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:s}=t;return Hq()&&r&&Uq.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const Xq=tP(()=>window.ScrollTimeline!==void 0);class Qq{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;rXq()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Zq({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const nP=(e,t,n,r={},i,a)=>o=>{const s=zj(r,e)||{},c=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-oa(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Zq(s)||(d={...d,...jK(e,d)}),d.duration&&(d.duration=oa(d.duration)),d.repeatDelay&&(d.repeatDelay=oa(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!a&&t.get()!==void 0){const h=Sg(d.keyframes,s);if(h!==void 0)return ft.update(()=>{d.onUpdate(h),d.onComplete()}),new Qq([])}return!a&&NE.supports(d)?new NE(d):new eP(d)},Jq=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),eG=e=>sw(e)?e[e.length-1]||0:e;function rP(e,t){e.indexOf(t)===-1&&e.push(t)}function iP(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class aP{constructor(){this.subscriptions=[]}add(t){return rP(this.subscriptions,t),()=>iP(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a!isNaN(parseFloat(e));class nG{constructor(t,n={}){this.version="11.15.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Ci.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ci.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tG(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new aP);const r=this.events[t].add(n);return t==="change"?()=>{r(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ci.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>TE)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,TE);return AI(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Yd(e,t){return new nG(e,t)}function rG(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yd(n))}function iG(e,t){const n=wg(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=eG(a[o]);rG(e,o,s)}}const oP=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),aG="framerAppearId",II="data-"+oP(aG);function LI(e){return e.props[II]}const wn=e=>!!(e&&e.getVelocity);function oG(e){return!!(wn(e)&&e.add)}function gw(e,t){const n=e.getValue("willChange");if(oG(n))return n.add(t)}function sG({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function FI(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...c}=t;r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in c){const h=e.getValue(f,(a=e.latestValues[f])!==null&&a!==void 0?a:null),p=c[f];if(p===void 0||d&&sG(d,f))continue;const v={delay:n,...zj(o||{},f)};let m=!1;if(window.MotionHandoffAnimation){const b=LI(e);if(b){const x=window.MotionHandoffAnimation(b,f,ft);x!==null&&(v.startTime=x,m=!0)}}gw(e,f),h.start(nP(f,h,p,e.shouldReduceMotion&&zs.has(f)?{type:!1}:v,e,m));const y=h.animation;y&&u.push(y)}return s&&Promise.all(u).then(()=>{ft.update(()=>{s&&iG(e,s)})}),u}function yw(e,t,n={}){var r;const i=wg(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(FI(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=a;return lG(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=a;if(c){const[u,d]=c==="beforeChildren"?[o,s]:[s,o];return u().then(()=>d())}else return Promise.all([o(),s(n.delay)])}function lG(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,c=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(cG).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(yw(u,t,{...a,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function cG(e,t){return e.sortNodePosition(t)}function uG(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>yw(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=yw(e,t,n);else{const i=typeof t=="function"?wg(e,t,n.custom):t;r=Promise.all(FI(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const dG=Uj.length;function BI(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?BI(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>uG(e,n,r)))}function mG(e){let t=pG(e),n=_E(),r=!0;const i=c=>(u,d)=>{var f;const h=wg(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:v,...m}=h;u={...u,...m,...v}}return u};function a(c){t=c(e)}function o(c){const{props:u}=e,d=BI(e.parent)||{},f=[],h=new Set;let p={},v=1/0;for(let y=0;yv&&P,A=!1;const E=Array.isArray(w)?w:[w];let _=E.reduce(i(b),{});S===!1&&(_={});const{prevResolvedValues:N={}}=x,k={...N,..._},M=B=>{O=!0,h.has(B)&&(A=!0,h.delete(B)),x.needsAnimating[B]=!0;const I=e.getValue(B);I&&(I.liveStyle=!1)};for(const B in k){const I=_[B],R=N[B];if(p.hasOwnProperty(B))continue;let F=!1;sw(I)&&sw(R)?F=!JD(I,R):F=I!==R,F?I!=null?M(B):h.add(B):I!==void 0&&h.has(B)?M(B):x.protectedKeys[B]=!0}x.prevProp=w,x.prevResolvedValues=_,x.isActive&&(p={...p,..._}),r&&e.blockInitialAnimation&&(O=!1),O&&(!(j&&C)||A)&&f.push(...E.map(B=>({animation:B,options:{type:b}})))}if(h.size){const y={};h.forEach(b=>{const x=e.getBaseTarget(b),w=e.getValue(b);w&&(w.liveStyle=!0),y[b]=x??null}),f.push({animation:y})}let m=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function s(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=o(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=_E(),r=!0}}}function vG(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!JD(t,e):!1}function zo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _E(){return{animate:zo(!0),whileInView:zo(),whileHover:zo(),whileTap:zo(),whileDrag:zo(),whileFocus:zo(),exit:zo()}}class Mo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class gG extends Mo{constructor(t){super(t),t.animationState||(t.animationState=mG(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();bg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let yG=0;class xG extends Mo{constructor(){super(...arguments),this.id=yG++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const bG={animation:{Feature:gG},exit:{Feature:xG}},Ur={x:!1,y:!1};function UI(){return Ur.x||Ur.y}function wG(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const a=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function zI(e,t){const n=wG(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function kE(e){return t=>{t.pointerType==="touch"||UI()||e(t)}}function SG(e,t,n={}){const[r,i,a]=zI(e,n),o=kE(s=>{const{target:c}=s,u=t(s);if(!u||!c)return;const d=kE(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,i)});return r.forEach(s=>{s.addEventListener("pointerenter",o,i)}),a}const sP=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Xu=new WeakSet;function ME(e){return t=>{t.key==="Enter"&&e(t)}}function W0(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const jG=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ME(()=>{if(Xu.has(n))return;W0(n,"down");const i=ME(()=>{W0(n,"up")}),a=()=>W0(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)},PG=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function CG(e){return PG.has(e.tagName)||e.tabIndex!==-1}const VI=(e,t)=>t?e===t?!0:VI(e,t.parentElement):!1;function RE(e){return sP(e)&&!UI()}function OG(e,t,n={}){const[r,i,a]=zI(e,n),o=s=>{const c=s.currentTarget;if(!RE(s)||Xu.has(c))return;Xu.add(c);const u=t(s),d=(p,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!RE(p)||!Xu.has(c))&&(Xu.delete(c),u&&u(p,{success:v}))},f=p=>{d(p,n.useGlobalTarget||VI(c,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return r.forEach(s=>{CG(s)||(s.tabIndex=0),(n.useGlobalTarget?window:s).addEventListener("pointerdown",o,i),s.addEventListener("focus",u=>jG(u,i),i)}),a}function AG(e){return e==="x"||e==="y"?Ur[e]?null:(Ur[e]=!0,()=>{Ur[e]=!1}):Ur.x||Ur.y?null:(Ur.x=Ur.y=!0,()=>{Ur.x=Ur.y=!1})}function ih(e){return{point:{x:e.pageX,y:e.pageY}}}const EG=e=>t=>sP(t)&&e(t,ih(t));function Xd(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function pd(e,t,n,r){return Xd(e,t,EG(n),r)}const $E=(e,t)=>Math.abs(e-t);function NG(e,t){const n=$E(e.x,t.x),r=$E(e.y,t.y);return Math.sqrt(n**2+r**2)}class WI{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=K0(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=NG(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:v}=f,{timestamp:m}=an;this.history.push({...v,timestamp:m});const{onStart:y,onMove:b}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=H0(h,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:v,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=K0(f.type==="pointercancel"?this.lastMoveEventInfo:H0(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,y),v&&v(f,y)},!sP(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=ih(t),s=H0(o,this.transformPagePoint),{point:c}=s,{timestamp:u}=an;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,K0(s,this.history)),this.removeListeners=rh(pd(this.contextWindow,"pointermove",this.handlePointerMove),pd(this.contextWindow,"pointerup",this.handlePointerUp),pd(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),So(this.updatePoint)}}function H0(e,t){return t?{point:t(e.point)}:e}function DE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function K0({point:e},t){return{point:e,delta:DE(e,HI(t)),offset:DE(e,TG(t)),velocity:_G(t,.1)}}function TG(e){return e[0]}function HI(e){return e[e.length-1]}function _G(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=HI(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oa(t)));)n--;if(!r)return{x:0,y:0};const a=sa(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function gl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const KI=1e-4,kG=1-KI,MG=1+KI,qI=.01,RG=0-qI,$G=0+qI;function cr(e){return e.max-e.min}function DG(e,t,n){return Math.abs(e-t)<=n}function IE(e,t,n,r=.5){e.origin=r,e.originPoint=bt(t.min,t.max,e.origin),e.scale=cr(n)/cr(t),e.translate=bt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=kG&&e.scale<=MG||isNaN(e.scale))&&(e.scale=1),(e.translate>=RG&&e.translate<=$G||isNaN(e.translate))&&(e.translate=0)}function md(e,t,n,r){IE(e.x,t.x,n.x,r?r.originX:void 0),IE(e.y,t.y,n.y,r?r.originY:void 0)}function LE(e,t,n){e.min=n.min+t.min,e.max=e.min+cr(t)}function IG(e,t,n){LE(e.x,t.x,n.x),LE(e.y,t.y,n.y)}function FE(e,t,n){e.min=t.min-n.min,e.max=e.min+cr(t)}function vd(e,t,n){FE(e.x,t.x,n.x),FE(e.y,t.y,n.y)}function LG(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?bt(n,e,r.max):Math.min(e,n)),e}function BE(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function FG(e,{top:t,left:n,bottom:r,right:i}){return{x:BE(e.x,n,i),y:BE(e.y,t,r)}}function UE(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=cc(t.min,t.max-r,e.min):r>i&&(n=cc(e.min,e.max-i,t.min)),ga(0,1,n)}function zG(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const xw=.35;function VG(e=xw){return e===!1?e=0:e===!0&&(e=xw),{x:zE(e,"left","right"),y:zE(e,"top","bottom")}}function zE(e,t,n){return{min:VE(e,t),max:VE(e,n)}}function VE(e,t){return typeof e=="number"?e:e[t]||0}const WE=()=>({translate:0,scale:1,origin:0,originPoint:0}),yl=()=>({x:WE(),y:WE()}),HE=()=>({min:0,max:0}),Nt=()=>({x:HE(),y:HE()});function yr(e){return[e("x"),e("y")]}function GI({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function WG({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function HG(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function q0(e){return e===void 0||e===1}function bw({scale:e,scaleX:t,scaleY:n}){return!q0(e)||!q0(t)||!q0(n)}function Ko(e){return bw(e)||YI(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function YI(e){return KE(e.x)||KE(e.y)}function KE(e){return e&&e!=="0%"}function Am(e,t,n){const r=e-n,i=t*r;return n+i}function qE(e,t,n,r,i){return i!==void 0&&(e=Am(e,i,r)),Am(e,n,r)+t}function ww(e,t=0,n=1,r,i){e.min=qE(e.min,t,n,r,i),e.max=qE(e.max,t,n,r,i)}function XI(e,{x:t,y:n}){ww(e.x,t.translate,t.scale,t.originPoint),ww(e.y,n.translate,n.scale,n.originPoint)}const GE=.999999999999,YE=1.0000000000001;function KG(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;sGE&&(t.x=1),t.yGE&&(t.y=1)}function xl(e,t){e.min=e.min+t,e.max=e.max+t}function XE(e,t,n,r,i=.5){const a=bt(e.min,e.max,i);ww(e,t,n,a,r)}function bl(e,t){XE(e.x,t.x,t.scaleX,t.scale,t.originX),XE(e.y,t.y,t.scaleY,t.scale,t.originY)}function QI(e,t){return GI(HG(e.getBoundingClientRect(),t))}function qG(e,t,n){const r=QI(e,n),{scroll:i}=t;return i&&(xl(r.x,i.offset.x),xl(r.y,i.offset.y)),r}const ZI=({current:e})=>e?e.ownerDocument.defaultView:null,GG=new WeakMap;class YG{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Nt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ih(d).point)},a=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:v}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=AG(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yr(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Pi.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[y];w&&(b=cr(w)*(parseFloat(b)/100))}}this.originPoint[y]=b}),v&&ft.postRender(()=>v(d,f)),gw(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:v,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=XG(y),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(d,f)},s=(d,f)=>this.stop(d,f),c=()=>yr(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new WI(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:ZI(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&ft.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!qh(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=LG(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&gl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=FG(i.layoutBox,n):this.constraints=!1,this.elastic=VG(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&yr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=zG(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gl(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=qG(r,i.root,this.visualElement.getTransformPagePoint());let o=BG(i.layout.layoutBox,a);if(n){const s=n(WG(o));this.hasMutatedConstraints=!!s,s&&(o=GI(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},u=yr(d=>{if(!qh(d,n,this.currentDirection))return;let f=c[d]||{};o&&(f={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,v={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(d,v)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return gw(this.visualElement,t),r.start(nP(t,r,0,n,this.visualElement,!1))}stopAnimation(){yr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){yr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yr(n=>{const{drag:r}=this.getProps();if(!qh(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-bt(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gl(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};yr(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const c=s.get();i[o]=UG({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),yr(o=>{if(!qh(o,t,null))return;const s=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];s.set(bt(c,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;GG.set(this.visualElement,this);const t=this.visualElement.current,n=pd(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();gl(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ft.read(r);const o=Xd(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(yr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=xw,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function qh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function XG(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class QG extends Mo{constructor(t){super(t),this.removeGroupControls=ar,this.removeListeners=ar,this.controls=new YG(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ar}unmount(){this.removeGroupControls(),this.removeListeners()}}const QE=e=>(t,n)=>{e&&ft.postRender(()=>e(t,n))};class ZG extends Mo{constructor(){super(...arguments),this.removePointerDownListener=ar}onPointerDown(t){this.session=new WI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ZI(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:QE(t),onStart:QE(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&ft.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=pd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const jg=g.createContext(null);function JG(){const e=g.useContext(jg);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=g.useId();g.useEffect(()=>r(i),[]);const a=g.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const lP=g.createContext({}),JI=g.createContext({}),$p={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ZE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ku={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=ZE(e,t.target.x),r=ZE(e,t.target.y);return`${n}% ${r}%`}},eY={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=jo.parse(e);if(i.length>5)return r;const a=jo.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;const u=bt(s,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}},Em={};function tY(e){Object.assign(Em,e)}const{schedule:cP,cancel:j_e}=eI(queueMicrotask,!1);class nY extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;tY(rY),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),$p.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||ft.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),cP.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function e4(e){const[t,n]=JG(),r=g.useContext(lP);return l.jsx(nY,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(JI),isPresent:t,safeToRemove:n})}const rY={borderRadius:{...ku,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ku,borderTopRightRadius:ku,borderBottomLeftRadius:ku,borderBottomRightRadius:ku,boxShadow:eY},t4=["TopLeft","TopRight","BottomLeft","BottomRight"],iY=t4.length,JE=e=>typeof e=="string"?parseFloat(e):e,eN=e=>typeof e=="number"||ye.test(e);function aY(e,t,n,r,i,a){i?(e.opacity=bt(0,n.opacity!==void 0?n.opacity:1,oY(r)),e.opacityExit=bt(t.opacity!==void 0?t.opacity:1,0,sY(r))):a&&(e.opacity=bt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(cc(e,t,r))}function nN(e,t){e.min=t.min,e.max=t.max}function pr(e,t){nN(e.x,t.x),nN(e.y,t.y)}function rN(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function iN(e,t,n,r,i){return e-=t,e=Am(e,1/n,r),i!==void 0&&(e=Am(e,1/i,r)),e}function lY(e,t=0,n=1,r=.5,i,a=e,o=e){if(Pi.test(t)&&(t=parseFloat(t),t=bt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=bt(a.min,a.max,r);e===a&&(s-=t),e.min=iN(e.min,t,n,s,i),e.max=iN(e.max,t,n,s,i)}function aN(e,t,[n,r,i],a,o){lY(e,t[n],t[r],t[i],t.scale,a,o)}const cY=["x","scaleX","originX"],uY=["y","scaleY","originY"];function oN(e,t,n,r){aN(e.x,t,cY,n?n.x:void 0,r?r.x:void 0),aN(e.y,t,uY,n?n.y:void 0,r?r.y:void 0)}function sN(e){return e.translate===0&&e.scale===1}function r4(e){return sN(e.x)&&sN(e.y)}function lN(e,t){return e.min===t.min&&e.max===t.max}function dY(e,t){return lN(e.x,t.x)&&lN(e.y,t.y)}function cN(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function i4(e,t){return cN(e.x,t.x)&&cN(e.y,t.y)}function uN(e){return cr(e.x)/cr(e.y)}function dN(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class fY{constructor(){this.members=[]}add(t){rP(this.members,t),t.scheduleRender()}remove(t){if(iP(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function hY(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const pY=(e,t)=>e.depth-t.depth;class mY{constructor(){this.children=[],this.isDirty=!1}add(t){rP(this.children,t),this.isDirty=!0}remove(t){iP(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pY),this.isDirty=!1,this.children.forEach(t)}}function Dp(e){const t=wn(e)?e.get():e;return Jq(t)?t.toValue():t}function vY(e,t){const n=Ci.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(So(r),e(a-t))};return ft.read(r,!0),()=>So(r)}function gY(e){return e instanceof SVGElement&&e.tagName!=="svg"}function yY(e,t,n){const r=wn(e)?e:Yd(e);return r.start(nP("",r,t,n)),r.animation}const qo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Qu=typeof window<"u"&&window.MotionDebug!==void 0,G0=["","X","Y","Z"],xY={visibility:"hidden"},fN=1e3;let bY=0;function Y0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function a4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=LI(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&a4(r)}function o4({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=bY++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Qu&&(qo.totalNodes=qo.resolvedTargetDeltas=qo.recalculatedProjection=0),this.nodes.forEach(jY),this.nodes.forEach(EY),this.nodes.forEach(NY),this.nodes.forEach(PY),Qu&&window.MotionDebug.record(qo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=vY(h,250),$p.hasAnimatedSinceResize&&($p.hasAnimatedSinceResize=!1,this.nodes.forEach(pN))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||RY,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=d.getProps(),x=!this.targetLayout||!i4(this.targetLayout,v)||p,w=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const P={...zj(m,"layout"),onPlay:y,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else h||pN(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,So(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(TY),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&a4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const S=P/1e3;mN(f.x,o.x,S),mN(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vd(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kY(this.relativeTarget,this.relativeTargetOrigin,h,S),w&&dY(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Nt()),pr(w,this.relativeTarget)),m&&(this.animationValues=d,aY(d,u,this.latestValues,S,x,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(So(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{$p.hasAnimatedSinceResize=!0,this.currentAnimation=yY(0,fN,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:c,layout:u,latestValues:d}=o;if(!(!s||!c||!u)){if(this!==o&&this.layout&&u&&s4(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Nt();const f=cr(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=cr(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}pr(s,c),bl(s,d),md(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new fY),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const u={};c.z&&Y0("z",o,u,this.animationValues);for(let d=0;d{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(hN),this.root.sharedNodes.clear()}}}function wY(e){e.updateLayout()}function SY(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?yr(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=cr(h);h.min=r[f].min,h.max=h.min+p}):s4(a,n.layoutBox,r)&&yr(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=cr(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const s=yl();md(s,r,n.layoutBox);const c=yl();o?md(c,e.applyTransform(i,!0),n.measuredBox):md(c,r,n.layoutBox);const u=!r4(s);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const v=Nt();vd(v,n.layoutBox,h.layoutBox);const m=Nt();vd(m,r,p.layoutBox),i4(v,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function jY(e){Qu&&qo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function PY(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function CY(e){e.clearSnapshot()}function hN(e){e.clearMeasurements()}function OY(e){e.isLayoutDirty=!1}function AY(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function pN(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function EY(e){e.resolveTargetDelta()}function NY(e){e.calcProjection()}function TY(e){e.resetSkewAndRotation()}function _Y(e){e.removeLeadSnapshot()}function mN(e,t,n){e.translate=bt(t.translate,0,n),e.scale=bt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function vN(e,t,n,r){e.min=bt(t.min,n.min,r),e.max=bt(t.max,n.max,r)}function kY(e,t,n,r){vN(e.x,t.x,n.x,r),vN(e.y,t.y,n.y,r)}function MY(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const RY={duration:.45,ease:[.4,0,.1,1]},gN=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),yN=gN("applewebkit/")&&!gN("chrome/")?Math.round:ar;function xN(e){e.min=yN(e.min),e.max=yN(e.max)}function $Y(e){xN(e.x),xN(e.y)}function s4(e,t,n){return e==="position"||e==="preserve-aspect"&&!DG(uN(t),uN(n),.2)}function DY(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const IY=o4({attachResizeListener:(e,t)=>Xd(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),X0={current:void 0},l4=o4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!X0.current){const e=new IY({});e.mount(window),e.setOptions({layoutScroll:!0}),X0.current=e}return X0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),LY={pan:{Feature:ZG},drag:{Feature:QG,ProjectionNode:l4,MeasureLayout:e4}};function bN(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&ft.postRender(()=>a(t,ih(t)))}class FY extends Mo{mount(){const{current:t}=this.node;t&&(this.unmount=SG(t,n=>(bN(this.node,n,"Start"),r=>bN(this.node,r,"End"))))}unmount(){}}class BY extends Mo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=rh(Xd(this.node.current,"focus",()=>this.onFocus()),Xd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function wN(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&ft.postRender(()=>a(t,ih(t)))}class UY extends Mo{mount(){const{current:t}=this.node;t&&(this.unmount=OG(t,n=>(wN(this.node,n,"Start"),(r,{success:i})=>wN(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Sw=new WeakMap,Q0=new WeakMap,zY=e=>{const t=Sw.get(e.target);t&&t(e)},VY=e=>{e.forEach(zY)};function WY({root:e,...t}){const n=e||document;Q0.has(n)||Q0.set(n,{});const r=Q0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(VY,{root:e,...t})),r[i]}function HY(e,t,n){const r=WY(t);return Sw.set(e,n),r.observe(e),()=>{Sw.delete(e),r.unobserve(e)}}const KY={some:0,all:1};class qY extends Mo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:KY[i]},s=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return HY(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(GY(t,n))&&this.startObserver()}unmount(){}}function GY({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const YY={inView:{Feature:qY},tap:{Feature:UY},focus:{Feature:BY},hover:{Feature:FY}},XY={layout:{ProjectionNode:l4,MeasureLayout:e4}},uP=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Pg=g.createContext({}),dP=typeof window<"u",c4=dP?g.useLayoutEffect:g.useEffect,u4=g.createContext({strict:!1});function QY(e,t,n,r,i){var a,o;const{visualElement:s}=g.useContext(Pg),c=g.useContext(u4),u=g.useContext(jg),d=g.useContext(uP).reducedMotion,f=g.useRef(null);r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,p=g.useContext(JI);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&ZY(f.current,n,i,p);const v=g.useRef(!1);g.useInsertionEffect(()=>{h&&v.current&&h.update(n,u)});const m=n[II],y=g.useRef(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return c4(()=>{h&&(v.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),cP.render(h.render),y.current&&h.animationState&&h.animationState.animateChanges())}),g.useEffect(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),h}function ZY(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:d4(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&gl(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function d4(e){if(e)return e.options.allowProjection!==!1?e.projection:d4(e.parent)}function JY(e,t,n){return g.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):gl(n)&&(n.current=r))},[t])}function Cg(e){return bg(e.animate)||Uj.some(t=>Kd(e[t]))}function f4(e){return!!(Cg(e)||e.variants)}function eX(e,t){if(Cg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Kd(n)?n:void 0,animate:Kd(r)?r:void 0}}return e.inherit!==!1?t:{}}function tX(e){const{initial:t,animate:n}=eX(e,g.useContext(Pg));return g.useMemo(()=>({initial:t,animate:n}),[SN(t),SN(n)])}function SN(e){return Array.isArray(e)?e.join(" "):e}const jN={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},uc={};for(const e in jN)uc[e]={isEnabled:t=>jN[e].some(n=>!!t[n])};function nX(e){for(const t in e)uc[t]={...uc[t],...e[t]}}const rX=Symbol.for("motionComponentSymbol");function iX({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&nX(e);function a(s,c){let u;const d={...g.useContext(uP),...s,layoutId:aX(s)},{isStatic:f}=d,h=tX(s),p=r(s,f);if(!f&&dP){oX();const v=sX(d);u=v.MeasureLayout,h.visualElement=QY(i,p,d,t,v.ProjectionNode)}return l.jsxs(Pg.Provider,{value:h,children:[u&&h.visualElement?l.jsx(u,{visualElement:h.visualElement,...d}):null,n(i,s,JY(p,h.visualElement,c),p,f,h.visualElement)]})}const o=g.forwardRef(a);return o[rX]=i,o}function aX({layoutId:e}){const t=g.useContext(lP).id;return t&&e!==void 0?t+"-"+e:e}function oX(e,t){g.useContext(u4).strict}function sX(e){const{drag:t,layout:n}=uc;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const lX=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fP(e){return typeof e!="string"||e.includes("-")?!1:!!(lX.indexOf(e)>-1||/[A-Z]/u.test(e))}function h4(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const p4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function m4(e,t,n,r){h4(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(p4.has(i)?i:oP(i),t.attrs[i])}function v4(e,{layout:t,layoutId:n}){return zs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Em[e]||e==="opacity")}function hP(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(wn(i[o])||t.style&&wn(t.style[o])||v4(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return a}function g4(e,t,n){const r=hP(e,t,n);for(const i in e)if(wn(e[i])||wn(t[i])){const a=eh.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function pP(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}function cX({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:uX(r,i,a,e),renderState:t()};return n&&(o.mount=s=>n(r,s,o)),o}const y4=e=>(t,n)=>{const r=g.useContext(Pg),i=g.useContext(jg),a=()=>cX(e,t,r,i);return n?a():pP(a)};function uX(e,t,n,r){const i={},a=r(e,{});for(const h in a)i[h]=Dp(a[h]);let{initial:o,animate:s}=e;const c=Cg(e),u=f4(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?s:o;if(f&&typeof f!="boolean"&&!bg(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p({style:{},transform:{},transformOrigin:{},vars:{}}),x4=()=>({...mP(),attrs:{}}),b4=(e,t)=>t&&typeof e=="number"?t.transform(e):e,dX={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fX=eh.length;function hX(e,t,n){let r="",i=!0;for(let a=0;atypeof e=="string"&&e.toLowerCase()==="svg",yX={useVisualState:y4({scrapeMotionValuesFromProps:g4,createRenderState:x4,onMount:(e,t,{renderState:n,latestValues:r})=>{ft.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ft.render(()=>{gP(n,r,yP(t.tagName),e.transformTemplate),m4(t,n)})}})},xX={useVisualState:y4({scrapeMotionValuesFromProps:hP,createRenderState:mP})};function w4(e,t,n){for(const r in t)!wn(t[r])&&!v4(r,n)&&(e[r]=t[r])}function bX({transformTemplate:e},t){return g.useMemo(()=>{const n=mP();return vP(n,t,e),Object.assign({},n.vars,n.style)},[t])}function wX(e,t){const n=e.style||{},r={};return w4(r,n,e),Object.assign(r,bX(e,t)),r}function SX(e,t){const n={},r=wX(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const jX=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Nm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jX.has(e)}let S4=e=>!Nm(e);function PX(e){e&&(S4=t=>t.startsWith("on")?!Nm(t):e(t))}try{PX(require("@emotion/is-prop-valid").default)}catch{}function CX(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(S4(i)||n===!0&&Nm(i)||!t&&!Nm(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function OX(e,t,n,r){const i=g.useMemo(()=>{const a=x4();return gP(a,t,yP(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};w4(a,e.style,e),i.style={...a,...i.style}}return i}function AX(e=!1){return(n,r,i,{latestValues:a},o)=>{const c=(fP(n)?OX:SX)(r,a,o,n),u=CX(r,typeof n=="string",e),d=n!==g.Fragment?{...u,...c,ref:i}:{},{children:f}=r,h=g.useMemo(()=>wn(f)?f.get():f,[f]);return g.createElement(n,{...d,children:h})}}function EX(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...fP(r)?yX:xX,preloadedFeatures:e,useRender:AX(i),createVisualElement:t,Component:r};return iX(o)}}const jw={current:null},j4={current:!1};function NX(){if(j4.current=!0,!!dP)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jw.current=e.matches;e.addListener(t),t()}else jw.current=!1}function TX(e,t,n){for(const r in t){const i=t[r],a=n[r];if(wn(i))e.addValue(r,i);else if(wn(a))e.addValue(r,Yd(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Yd(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const CN=new WeakMap,_X=[...mI,mn,jo],kX=e=>_X.find(pI(e)),ON=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class MX{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kj,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Ci.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),j4.current||NX(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:jw.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){CN.delete(this.current),this.projection&&this.projection.unmount(),So(this.notifyUpdate),So(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=zs.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ft.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in uc){const n=uc[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Nt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Yd(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(uI(i)||cI(i))?i=parseFloat(i):!kX(i)&&jo.test(n)&&(i=jI(t,n)),this.setBaseTarget(t,wn(i)?i.get():i)),wn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Fj(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!wn(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new aP),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class P4 extends MX{constructor(){super(...arguments),this.KeyframeResolver=PI}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function RX(e){return window.getComputedStyle(e)}class $X extends P4{constructor(){super(...arguments),this.type="html",this.renderInstance=h4}readValueFromInstance(t,n){if(zs.has(n)){const r=Xj(n);return r&&r.default||0}else{const r=RX(t),i=(fI(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return QI(t,n)}build(t,n,r){vP(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return hP(t,n,r)}}class DX extends P4{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Nt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(zs.has(n)){const r=Xj(n);return r&&r.default||0}return n=p4.has(n)?n:oP(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return g4(t,n,r)}build(t,n,r){gP(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){m4(t,n,r,i)}mount(t){this.isSVGTag=yP(t.tagName),super.mount(t)}}const IX=(e,t)=>fP(e)?new DX(t):new $X(t,{allowProjection:e!==g.Fragment}),LX=EX({...bG,...YY,...LY,...XY},IX),FX=yK(LX);class BX extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function UX({children:e,isPresent:t}){const n=g.useId(),r=g.useRef(null),i=g.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=g.useContext(uP);return g.useInsertionEffect(()=>{const{width:o,height:s,top:c,left:u}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return a&&(d.nonce=a),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${s}px !important; - top: ${c}px !important; - left: ${u}px !important; - } - `),()=>{document.head.removeChild(d)}},[t]),l.jsx(BX,{isPresent:t,childRef:r,sizeRef:i,children:g.cloneElement(e,{ref:r})})}const zX=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{const s=pP(VX),c=g.useId(),u=g.useCallback(f=>{s.set(f,!0);for(const h of s.values())if(!h)return;r&&r()},[s,r]),d=g.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:u,register:f=>(s.set(f,!1),()=>s.delete(f))}),a?[Math.random(),u]:[n,u]);return g.useMemo(()=>{s.forEach((f,h)=>s.set(h,!1))},[n]),g.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),o==="popLayout"&&(e=l.jsx(UX,{isPresent:n,children:e})),l.jsx(jg.Provider,{value:d,children:e})};function VX(){return new Map}const Gh=e=>e.key||"";function AN(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const C4=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o="sync"})=>{const s=g.useMemo(()=>AN(e),[e]),c=s.map(Gh),u=g.useRef(!0),d=g.useRef(s),f=pP(()=>new Map),[h,p]=g.useState(s),[v,m]=g.useState(s);c4(()=>{u.current=!1,d.current=s;for(let x=0;x{const w=Gh(x),P=s===v||c.includes(w),S=()=>{if(f.has(w))f.set(w,!0);else return;let j=!0;f.forEach(C=>{C||(j=!1)}),j&&(b==null||b(),m(d.current),i&&i())};return l.jsx(zX,{isPresent:P,initial:!u.current||r?void 0:!1,custom:P?void 0:n,presenceAffectsLayout:a,mode:o,onExitComplete:P?void 0:S,children:x},w)})})};function WX(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e);g.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var HX="DismissableLayer",Pw="dismissableLayer.update",KX="dismissableLayer.pointerDownOutside",qX="dismissableLayer.focusOutside",EN,O4=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jc=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,u=g.useContext(O4),[d,f]=g.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=g.useState({}),v=_e(t,C=>f(C)),m=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(y),x=d?m.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,P=x>=b,S=XX(C=>{const O=C.target,A=[...u.branches].some(E=>E.contains(O));!P||A||(i==null||i(C),o==null||o(C),C.defaultPrevented||s==null||s())},h),j=QX(C=>{const O=C.target;[...u.branches].some(E=>E.contains(O))||(a==null||a(C),o==null||o(C),C.defaultPrevented||s==null||s())},h);return WX(C=>{x===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},h),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(EN=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),NN(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=EN)}},[d,h,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),NN())},[d,u]),g.useEffect(()=>{const C=()=>p({});return document.addEventListener(Pw,C),()=>document.removeEventListener(Pw,C)},[]),l.jsx(pe.div,{...c,ref:v,style:{pointerEvents:w?P?"auto":"none":void 0,...e.style},onFocusCapture:ne(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ne(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ne(e.onPointerDownCapture,S.onPointerDownCapture)})});Jc.displayName=HX;var GX="DismissableLayerBranch",YX=g.forwardRef((e,t)=>{const n=g.useContext(O4),r=g.useRef(null),i=_e(t,r);return g.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(pe.div,{...e,ref:i})});YX.displayName=GX;function XX(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){A4(KX,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function QX(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=g.useRef(!1);return g.useEffect(()=>{const i=a=>{a.target&&!r.current&&A4(qX,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function NN(){const e=new CustomEvent(Pw);document.dispatchEvent(e)}function A4(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?_D(i,a):i.dispatchEvent(a)}var Z0=0;function xP(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??TN()),document.body.insertAdjacentElement("beforeend",e[1]??TN()),Z0++,()=>{Z0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Z0--}},[])}function TN(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var J0="focusScope.autoFocusOnMount",ex="focusScope.autoFocusOnUnmount",_N={bubbles:!1,cancelable:!0},ZX="FocusScope",Og=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=g.useState(null),u=Dt(i),d=Dt(a),f=g.useRef(null),h=_e(t,m=>c(m)),p=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let m=function(w){if(p.paused||!s)return;const P=w.target;s.contains(P)?f.current=P:Da(f.current,{select:!0})},y=function(w){if(p.paused||!s)return;const P=w.relatedTarget;P!==null&&(s.contains(P)||Da(f.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Da(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const x=new MutationObserver(b);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),x.disconnect()}}},[r,s,p.paused]),g.useEffect(()=>{if(s){MN.add(p);const m=document.activeElement;if(!s.contains(m)){const b=new CustomEvent(J0,_N);s.addEventListener(J0,u),s.dispatchEvent(b),b.defaultPrevented||(JX(iQ(E4(s)),{select:!0}),document.activeElement===m&&Da(s))}return()=>{s.removeEventListener(J0,u),setTimeout(()=>{const b=new CustomEvent(ex,_N);s.addEventListener(ex,d),s.dispatchEvent(b),b.defaultPrevented||Da(m??document.body,{select:!0}),s.removeEventListener(ex,d),MN.remove(p)},0)}}},[s,u,d,p]);const v=g.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(y&&b){const x=m.currentTarget,[w,P]=eQ(x);w&&P?!m.shiftKey&&b===P?(m.preventDefault(),n&&Da(w,{select:!0})):m.shiftKey&&b===w&&(m.preventDefault(),n&&Da(P,{select:!0})):b===x&&m.preventDefault()}},[n,r,p.paused]);return l.jsx(pe.div,{tabIndex:-1,...o,ref:h,onKeyDown:v})});Og.displayName=ZX;function JX(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Da(r,{select:t}),document.activeElement!==n)return}function eQ(e){const t=E4(e),n=kN(t,e),r=kN(t.reverse(),e);return[n,r]}function E4(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kN(e,t){for(const n of e)if(!tQ(n,{upTo:t}))return n}function tQ(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function nQ(e){return e instanceof HTMLInputElement&&"select"in e}function Da(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nQ(e)&&t&&e.select()}}var MN=rQ();function rQ(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=RN(e,t),e.unshift(t)},remove(t){var n;e=RN(e,t),(n=e[0])==null||n.resume()}}}function RN(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function iQ(e){return e.filter(t=>t.tagName!=="A")}const aQ=["top","right","bottom","left"],Po=Math.min,Jn=Math.max,Tm=Math.round,Yh=Math.floor,Oi=e=>({x:e,y:e}),oQ={left:"right",right:"left",bottom:"top",top:"bottom"},sQ={start:"end",end:"start"};function Cw(e,t,n){return Jn(e,Po(t,n))}function ya(e,t){return typeof e=="function"?e(t):e}function xa(e){return e.split("-")[0]}function eu(e){return e.split("-")[1]}function bP(e){return e==="x"?"y":"x"}function wP(e){return e==="y"?"height":"width"}function Co(e){return["top","bottom"].includes(xa(e))?"y":"x"}function SP(e){return bP(Co(e))}function lQ(e,t,n){n===void 0&&(n=!1);const r=eu(e),i=SP(e),a=wP(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=_m(o)),[o,_m(o)]}function cQ(e){const t=_m(e);return[Ow(e),t,Ow(t)]}function Ow(e){return e.replace(/start|end/g,t=>sQ[t])}function uQ(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function dQ(e,t,n,r){const i=eu(e);let a=uQ(xa(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(Ow)))),a}function _m(e){return e.replace(/left|right|bottom|top/g,t=>oQ[t])}function fQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function N4(e){return typeof e!="number"?fQ(e):{top:e,right:e,bottom:e,left:e}}function km(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function $N(e,t,n){let{reference:r,floating:i}=e;const a=Co(t),o=SP(t),s=wP(o),c=xa(t),u=a==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[s]/2-i[s]/2;let p;switch(c){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(eu(t)){case"start":p[o]-=h*(n&&u?-1:1);break;case"end":p[o]+=h*(n&&u?-1:1);break}return p}const hQ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=$N(u,r,c),h=r,p={},v=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:u,padding:d=0}=ya(e,t)||{};if(u==null)return{};const f=N4(d),h={x:n,y:r},p=SP(i),v=wP(p),m=await o.getDimensions(u),y=p==="y",b=y?"top":"left",x=y?"bottom":"right",w=y?"clientHeight":"clientWidth",P=a.reference[v]+a.reference[p]-h[p]-a.floating[v],S=h[p]-a.reference[p],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=j?j[w]:0;(!C||!await(o.isElement==null?void 0:o.isElement(j)))&&(C=s.floating[w]||a.floating[v]);const O=P/2-S/2,A=C/2-m[v]/2-1,E=Po(f[b],A),_=Po(f[x],A),N=E,k=C-m[v]-_,M=C/2-m[v]/2+O,$=Cw(N,M,k),D=!c.arrow&&eu(i)!=null&&M!==$&&a.reference[v]/2-(MM<=0)){var _,N;const M=(((_=a.flip)==null?void 0:_.index)||0)+1,$=C[M];if($)return{data:{index:M,overflows:E},reset:{placement:$}};let D=(N=E.filter(B=>B.overflows[0]<=0).sort((B,I)=>B.overflows[1]-I.overflows[1])[0])==null?void 0:N.placement;if(!D)switch(p){case"bestFit":{var k;const B=(k=E.filter(I=>{if(j){const R=Co(I.placement);return R===x||R==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(R=>R>0).reduce((R,F)=>R+F,0)]).sort((I,R)=>I[1]-R[1])[0])==null?void 0:k[0];B&&(D=B);break}case"initialPlacement":D=s;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function DN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function IN(e){return aQ.some(t=>e[t]>=0)}const vQ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ya(e,t);switch(r){case"referenceHidden":{const a=await Qd(t,{...i,elementContext:"reference"}),o=DN(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:IN(o)}}}case"escaped":{const a=await Qd(t,{...i,altBoundary:!0}),o=DN(a,n.floating);return{data:{escapedOffsets:o,escaped:IN(o)}}}default:return{}}}}};async function gQ(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=xa(n),s=eu(n),c=Co(n)==="y",u=["left","top"].includes(o)?-1:1,d=a&&c?-1:1,f=ya(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const yQ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,c=await gQ(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},xQ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...c}=ya(e,t),u={x:n,y:r},d=await Qd(t,c),f=Co(xa(i)),h=bP(f);let p=u[h],v=u[f];if(a){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=p+d[y],w=p-d[b];p=Cw(x,p,w)}if(o){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=v+d[y],w=v-d[b];v=Cw(x,v,w)}const m=s.fn({...t,[h]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:a,[f]:o}}}}}},bQ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=ya(e,t),d={x:n,y:r},f=Co(i),h=bP(f);let p=d[h],v=d[f];const m=ya(s,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const w=h==="y"?"height":"width",P=a.reference[h]-a.floating[w]+y.mainAxis,S=a.reference[h]+a.reference[w]-y.mainAxis;pS&&(p=S)}if(u){var b,x;const w=h==="y"?"width":"height",P=["top","left"].includes(xa(i)),S=a.reference[f]-a.floating[w]+(P&&((b=o.offset)==null?void 0:b[f])||0)+(P?0:y.crossAxis),j=a.reference[f]+a.reference[w]+(P?0:((x=o.offset)==null?void 0:x[f])||0)-(P?y.crossAxis:0);vj&&(v=j)}return{[h]:p,[f]:v}}}},wQ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...u}=ya(e,t),d=await Qd(t,u),f=xa(i),h=eu(i),p=Co(i)==="y",{width:v,height:m}=a.floating;let y,b;f==="top"||f==="bottom"?(y=f,b=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(b=f,y=h==="end"?"top":"bottom");const x=m-d.top-d.bottom,w=v-d.left-d.right,P=Po(m-d[y],x),S=Po(v-d[b],w),j=!t.middlewareData.shift;let C=P,O=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=x),j&&!h){const E=Jn(d.left,0),_=Jn(d.right,0),N=Jn(d.top,0),k=Jn(d.bottom,0);p?O=v-2*(E!==0||_!==0?E+_:Jn(d.left,d.right)):C=m-2*(N!==0||k!==0?N+k:Jn(d.top,d.bottom))}await c({...t,availableWidth:O,availableHeight:C});const A=await o.getDimensions(s.floating);return v!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Ag(){return typeof window<"u"}function tu(e){return T4(e)?(e.nodeName||"").toLowerCase():"#document"}function or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zi(e){var t;return(t=(T4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function T4(e){return Ag()?e instanceof Node||e instanceof or(e).Node:!1}function ri(e){return Ag()?e instanceof Element||e instanceof or(e).Element:!1}function Ti(e){return Ag()?e instanceof HTMLElement||e instanceof or(e).HTMLElement:!1}function LN(e){return!Ag()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof or(e).ShadowRoot}function ah(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ii(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function SQ(e){return["table","td","th"].includes(tu(e))}function Eg(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function jP(e){const t=PP(),n=ri(e)?ii(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function jQ(e){let t=Oo(e);for(;Ti(t)&&!dc(t);){if(jP(t))return t;if(Eg(t))return null;t=Oo(t)}return null}function PP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function dc(e){return["html","body","#document"].includes(tu(e))}function ii(e){return or(e).getComputedStyle(e)}function Ng(e){return ri(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oo(e){if(tu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||LN(e)&&e.host||zi(e);return LN(t)?t.host:t}function _4(e){const t=Oo(e);return dc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ti(t)&&ah(t)?t:_4(t)}function Zd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=_4(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=or(i);if(a){const s=Aw(o);return t.concat(o,o.visualViewport||[],ah(i)?i:[],s&&n?Zd(s):[])}return t.concat(i,Zd(i,[],n))}function Aw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function k4(e){const t=ii(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ti(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Tm(n)!==a||Tm(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function CP(e){return ri(e)?e:e.contextElement}function Ml(e){const t=CP(e);if(!Ti(t))return Oi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=k4(t);let o=(a?Tm(n.width):n.width)/r,s=(a?Tm(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const PQ=Oi(0);function M4(e){const t=or(e);return!PP()||!t.visualViewport?PQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==or(e)?!1:t}function Ts(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=CP(e);let o=Oi(1);t&&(r?ri(r)&&(o=Ml(r)):o=Ml(e));const s=CQ(a,n,r)?M4(a):Oi(0);let c=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(a){const h=or(a),p=r&&ri(r)?or(r):r;let v=h,m=Aw(v);for(;m&&r&&p!==v;){const y=Ml(m),b=m.getBoundingClientRect(),x=ii(m),w=b.left+(m.clientLeft+parseFloat(x.paddingLeft))*y.x,P=b.top+(m.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=w,u+=P,v=or(m),m=Aw(v)}}return km({width:d,height:f,x:c,y:u})}function OP(e,t){const n=Ng(e).scrollLeft;return t?t.left+n:Ts(zi(e)).left+n}function R4(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:OP(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function OQ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=zi(r),s=t?Eg(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Oi(1);const d=Oi(0),f=Ti(r);if((f||!f&&!a)&&((tu(r)!=="body"||ah(o))&&(c=Ng(r)),Ti(r))){const p=Ts(r);u=Ml(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=o&&!f&&!a?R4(o,c,!0):Oi(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function AQ(e){return Array.from(e.getClientRects())}function EQ(e){const t=zi(e),n=Ng(e),r=e.ownerDocument.body,i=Jn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Jn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+OP(e);const s=-n.scrollTop;return ii(r).direction==="rtl"&&(o+=Jn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function NQ(e,t){const n=or(e),r=zi(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const u=PP();(!u||u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function TQ(e,t){const n=Ts(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ti(e)?Ml(e):Oi(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,u=r*a.y;return{width:o,height:s,x:c,y:u}}function FN(e,t,n){let r;if(t==="viewport")r=NQ(e,n);else if(t==="document")r=EQ(zi(e));else if(ri(t))r=TQ(t,n);else{const i=M4(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return km(r)}function $4(e,t){const n=Oo(e);return n===t||!ri(n)||dc(n)?!1:ii(n).position==="fixed"||$4(n,t)}function _Q(e,t){const n=t.get(e);if(n)return n;let r=Zd(e,[],!1).filter(s=>ri(s)&&tu(s)!=="body"),i=null;const a=ii(e).position==="fixed";let o=a?Oo(e):e;for(;ri(o)&&!dc(o);){const s=ii(o),c=jP(o);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ah(o)&&!c&&$4(e,o))?r=r.filter(d=>d!==o):i=s,o=Oo(o)}return t.set(e,r),r}function kQ(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Eg(t)?[]:_Q(t,this._c):[].concat(n),r],s=o[0],c=o.reduce((u,d)=>{const f=FN(t,d,i);return u.top=Jn(f.top,u.top),u.right=Po(f.right,u.right),u.bottom=Po(f.bottom,u.bottom),u.left=Jn(f.left,u.left),u},FN(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function MQ(e){const{width:t,height:n}=k4(e);return{width:t,height:n}}function RQ(e,t,n){const r=Ti(t),i=zi(t),a=n==="fixed",o=Ts(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Oi(0);if(r||!r&&!a)if((tu(t)!=="body"||ah(i))&&(s=Ng(t)),r){const h=Ts(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&(c.x=OP(i));const u=i&&!r&&!a?R4(i,s):Oi(0),d=o.left+s.scrollLeft-c.x-u.x,f=o.top+s.scrollTop-c.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function tx(e){return ii(e).position==="static"}function BN(e,t){if(!Ti(e)||ii(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zi(e)===n&&(n=n.ownerDocument.body),n}function D4(e,t){const n=or(e);if(Eg(e))return n;if(!Ti(e)){let i=Oo(e);for(;i&&!dc(i);){if(ri(i)&&!tx(i))return i;i=Oo(i)}return n}let r=BN(e,t);for(;r&&SQ(r)&&tx(r);)r=BN(r,t);return r&&dc(r)&&tx(r)&&!jP(r)?n:r||jQ(e)||n}const $Q=async function(e){const t=this.getOffsetParent||D4,n=this.getDimensions,r=await n(e.floating);return{reference:RQ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function DQ(e){return ii(e).direction==="rtl"}const IQ={convertOffsetParentRelativeRectToViewportRelativeRect:OQ,getDocumentElement:zi,getClippingRect:kQ,getOffsetParent:D4,getElementRects:$Q,getClientRects:AQ,getDimensions:MQ,getScale:Ml,isElement:ri,isRTL:DQ};function LQ(e,t){let n=null,r;const i=zi(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=Yh(d),v=Yh(i.clientWidth-(u+f)),m=Yh(i.clientHeight-(d+h)),y=Yh(u),x={rootMargin:-p+"px "+-v+"px "+-m+"px "+-y+"px",threshold:Jn(0,Po(1,c))||1};let w=!0;function P(S){const j=S[0].intersectionRatio;if(j!==c){if(!w)return o();j?o(!1,j):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(P,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(P,x)}n.observe(e)}return o(!0),a}function FQ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=CP(e),d=i||a?[...u?Zd(u):[],...Zd(t)]:[];d.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const f=u&&s?LQ(u,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let v,m=c?Ts(e):null;c&&y();function y(){const b=Ts(e);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&n(),m=b,v=requestAnimationFrame(y)}return n(),()=>{var b;d.forEach(x=>{i&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const BQ=yQ,UQ=xQ,zQ=mQ,VQ=wQ,WQ=vQ,UN=pQ,HQ=bQ,KQ=(e,t,n)=>{const r=new Map,i={platform:IQ,...n},a={...i.platform,_c:r};return hQ(e,t,{...i,platform:a})};var Ip=typeof document<"u"?g.useLayoutEffect:g.useEffect;function Mm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Mm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Mm(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function I4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zN(e,t){const n=I4(e);return Math.round(t*n)/n}function nx(e){const t=g.useRef(e);return Ip(()=>{t.current=e}),t}function qQ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,f]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=g.useState(r);Mm(h,r)||p(r);const[v,m]=g.useState(null),[y,b]=g.useState(null),x=g.useCallback(I=>{I!==j.current&&(j.current=I,m(I))},[]),w=g.useCallback(I=>{I!==C.current&&(C.current=I,b(I))},[]),P=a||v,S=o||y,j=g.useRef(null),C=g.useRef(null),O=g.useRef(d),A=c!=null,E=nx(c),_=nx(i),N=nx(u),k=g.useCallback(()=>{if(!j.current||!C.current)return;const I={placement:t,strategy:n,middleware:h};_.current&&(I.platform=_.current),KQ(j.current,C.current,I).then(R=>{const F={...R,isPositioned:N.current!==!1};M.current&&!Mm(O.current,F)&&(O.current=F,Vc.flushSync(()=>{f(F)}))})},[h,t,n,_,N]);Ip(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[u]);const M=g.useRef(!1);Ip(()=>(M.current=!0,()=>{M.current=!1}),[]),Ip(()=>{if(P&&(j.current=P),S&&(C.current=S),P&&S){if(E.current)return E.current(P,S,k);k()}},[P,S,k,E,A]);const $=g.useMemo(()=>({reference:j,floating:C,setReference:x,setFloating:w}),[x,w]),D=g.useMemo(()=>({reference:P,floating:S}),[P,S]),B=g.useMemo(()=>{const I={position:n,left:0,top:0};if(!D.floating)return I;const R=zN(D.floating,d.x),F=zN(D.floating,d.y);return s?{...I,transform:"translate("+R+"px, "+F+"px)",...I4(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:F}},[n,s,D.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:k,refs:$,elements:D,floatingStyles:B}),[d,k,$,D,B])}const GQ=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?UN({element:r.current,padding:i}).fn(n):{}:r?UN({element:r,padding:i}).fn(n):{}}}},YQ=(e,t)=>({...BQ(e),options:[e,t]}),XQ=(e,t)=>({...UQ(e),options:[e,t]}),QQ=(e,t)=>({...HQ(e),options:[e,t]}),ZQ=(e,t)=>({...zQ(e),options:[e,t]}),JQ=(e,t)=>({...VQ(e),options:[e,t]}),eZ=(e,t)=>({...WQ(e),options:[e,t]}),tZ=(e,t)=>({...GQ(e),options:[e,t]});var nZ="Arrow",L4=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return l.jsx(pe.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});L4.displayName=nZ;var rZ=L4;function F4(e){const[t,n]=g.useState(void 0);return Kt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,s=u.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var AP="Popper",[B4,Ro]=un(AP),[iZ,U4]=B4(AP),z4=e=>{const{__scopePopper:t,children:n}=e,[r,i]=g.useState(null);return l.jsx(iZ,{scope:t,anchor:r,onAnchorChange:i,children:n})};z4.displayName=AP;var V4="PopperAnchor",W4=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=U4(V4,n),o=g.useRef(null),s=_e(t,o);return g.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:l.jsx(pe.div,{...i,ref:s})});W4.displayName=V4;var EP="PopperContent",[aZ,oZ]=B4(EP),H4=g.forwardRef((e,t)=>{var K,se,X,J,te,V;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:v,...m}=e,y=U4(EP,n),[b,x]=g.useState(null),w=_e(t,Se=>x(Se)),[P,S]=g.useState(null),j=F4(P),C=(j==null?void 0:j.width)??0,O=(j==null?void 0:j.height)??0,A=r+(a!=="center"?"-"+a:""),E=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},_=Array.isArray(u)?u:[u],N=_.length>0,k={padding:E,boundary:_.filter(lZ),altBoundary:N},{refs:M,floatingStyles:$,placement:D,isPositioned:B,middlewareData:I}=qQ({strategy:"fixed",placement:A,whileElementsMounted:(...Se)=>FQ(...Se,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[YQ({mainAxis:i+O,alignmentAxis:o}),c&&XQ({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?QQ():void 0,...k}),c&&ZQ({...k}),JQ({...k,apply:({elements:Se,rects:be,availableWidth:Ue,availableHeight:We})=>{const{width:Ye,height:tn}=be.reference,dn=Se.floating.style;dn.setProperty("--radix-popper-available-width",`${Ue}px`),dn.setProperty("--radix-popper-available-height",`${We}px`),dn.setProperty("--radix-popper-anchor-width",`${Ye}px`),dn.setProperty("--radix-popper-anchor-height",`${tn}px`)}}),P&&tZ({element:P,padding:s}),cZ({arrowWidth:C,arrowHeight:O}),h&&eZ({strategy:"referenceHidden",...k})]}),[R,F]=G4(D),z=Dt(v);Kt(()=>{B&&(z==null||z())},[B,z]);const U=(K=I.arrow)==null?void 0:K.x,W=(se=I.arrow)==null?void 0:se.y,Z=((X=I.arrow)==null?void 0:X.centerOffset)!==0,[ae,ee]=g.useState();return Kt(()=>{b&&ee(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(J=I.transformOrigin)==null?void 0:J.x,(te=I.transformOrigin)==null?void 0:te.y].join(" "),...((V=I.hide)==null?void 0:V.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(aZ,{scope:n,placedSide:R,onArrowChange:S,arrowX:U,arrowY:W,shouldHideArrow:Z,children:l.jsx(pe.div,{"data-side":R,"data-align":F,...m,ref:w,style:{...m.style,animation:B?void 0:"none"}})})})});H4.displayName=EP;var K4="PopperArrow",sZ={top:"bottom",right:"left",bottom:"top",left:"right"},q4=g.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=oZ(K4,r),o=sZ[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(rZ,{...i,ref:n,style:{...i.style,display:"block"}})})});q4.displayName=K4;function lZ(e){return e!==null}var cZ=e=>({name:"transformOrigin",options:e,fn(t){var y,b,x;const{placement:n,rects:r,middlewareData:i}=t,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,s=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=G4(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((b=i.arrow)==null?void 0:b.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+c/2;let v="",m="";return u==="bottom"?(v=o?f:`${h}px`,m=`${-c}px`):u==="top"?(v=o?f:`${h}px`,m=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,m=o?f:`${p}px`):u==="left"&&(v=`${r.floating.width+c}px`,m=o?f:`${p}px`),{data:{x:v,y:m}}}});function G4(e){const[t,n="center"]=e.split("-");return[t,n]}var Tg=z4,_g=W4,kg=H4,Mg=q4,uZ="Portal",oh=g.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=g.useState(!1);Kt(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?V$.createPortal(l.jsx(pe.div,{...r,ref:t}),o):null});oh.displayName=uZ;var rx="rovingFocusGroup.onEntryFocus",dZ={bubbles:!1,cancelable:!0},Rg="RovingFocusGroup",[Ew,Y4,fZ]=vg(Rg),[hZ,$g]=un(Rg,[fZ]),[pZ,mZ]=hZ(Rg),X4=g.forwardRef((e,t)=>l.jsx(Ew.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ew.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(vZ,{...e,ref:t})})}));X4.displayName=Rg;var vZ=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=g.useRef(null),p=_e(t,h),v=Qc(a),[m=null,y]=_r({prop:o,defaultProp:s,onChange:c}),[b,x]=g.useState(!1),w=Dt(u),P=Y4(n),S=g.useRef(!1),[j,C]=g.useState(0);return g.useEffect(()=>{const O=h.current;if(O)return O.addEventListener(rx,w),()=>O.removeEventListener(rx,w)},[w]),l.jsx(pZ,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:m,onItemFocus:g.useCallback(O=>y(O),[y]),onItemShiftTab:g.useCallback(()=>x(!0),[]),onFocusableItemAdd:g.useCallback(()=>C(O=>O+1),[]),onFocusableItemRemove:g.useCallback(()=>C(O=>O-1),[]),children:l.jsx(pe.div,{tabIndex:b||j===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:ne(e.onMouseDown,()=>{S.current=!0}),onFocus:ne(e.onFocus,O=>{const A=!S.current;if(O.target===O.currentTarget&&A&&!b){const E=new CustomEvent(rx,dZ);if(O.currentTarget.dispatchEvent(E),!E.defaultPrevented){const _=P().filter(D=>D.focusable),N=_.find(D=>D.active),k=_.find(D=>D.id===m),$=[N,k,..._].filter(Boolean).map(D=>D.ref.current);J4($,d)}}S.current=!1}),onBlur:ne(e.onBlur,()=>x(!1))})})}),Q4="RovingFocusGroupItem",Z4=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=ir(),c=a||s,u=mZ(Q4,n),d=u.currentTabStopId===c,f=Y4(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=u;return g.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),l.jsx(Ew.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:l.jsx(pe.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:ne(e.onMouseDown,v=>{r?u.onItemFocus(c):v.preventDefault()}),onFocus:ne(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ne(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const m=xZ(v,u.orientation,u.dir);if(m!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=f().filter(x=>x.focusable).map(x=>x.ref.current);if(m==="last")b.reverse();else if(m==="prev"||m==="next"){m==="prev"&&b.reverse();const x=b.indexOf(v.currentTarget);b=u.loop?bZ(b,x+1):b.slice(x+1)}setTimeout(()=>J4(b))}})})})});Z4.displayName=Q4;var gZ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yZ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function xZ(e,t,n){const r=yZ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return gZ[r]}function J4(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var eL=X4,tL=Z4,wZ=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xs=new WeakMap,Xh=new WeakMap,Qh={},ix=0,nL=function(e){return e&&(e.host||nL(e.parentNode))},SZ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=nL(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},jZ=function(e,t,n,r){var i=SZ(t,Array.isArray(e)?e:[e]);Qh[n]||(Qh[n]=new WeakMap);var a=Qh[n],o=[],s=new Set,c=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))d(h);else try{var p=h.getAttribute(r),v=p!==null&&p!=="false",m=(Xs.get(h)||0)+1,y=(a.get(h)||0)+1;Xs.set(h,m),a.set(h,y),o.push(h),m===1&&v&&Xh.set(h,!0),y===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return d(t),s.clear(),ix++,function(){o.forEach(function(f){var h=Xs.get(f)-1,p=a.get(f)-1;Xs.set(f,h),a.set(f,p),h||(Xh.has(f)||f.removeAttribute(r),Xh.delete(f)),p||f.removeAttribute(n)}),ix--,ix||(Xs=new WeakMap,Xs=new WeakMap,Xh=new WeakMap,Qh={})}},NP=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=wZ(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),jZ(r,i,n,"aria-hidden")):function(){return null}},yi=function(){return yi=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return BZ;var t=UZ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},VZ=oL(),Rl="data-scroll-locked",WZ=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(CZ,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body[`).concat(Rl,`] { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(a,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(Lp,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(Fp,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(Lp," .").concat(Lp,` { - right: 0 `).concat(r,`; - } - - .`).concat(Fp," .").concat(Fp,` { - margin-right: 0 `).concat(r,`; - } - - body[`).concat(Rl,`] { - `).concat(OZ,": ").concat(s,`px; - } -`)},WN=function(){var e=parseInt(document.body.getAttribute(Rl)||"0",10);return isFinite(e)?e:0},HZ=function(){g.useEffect(function(){return document.body.setAttribute(Rl,(WN()+1).toString()),function(){var e=WN()-1;e<=0?document.body.removeAttribute(Rl):document.body.setAttribute(Rl,e.toString())}},[])},KZ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;HZ();var a=g.useMemo(function(){return zZ(i)},[i]);return g.createElement(VZ,{styles:WZ(a,!t,i,n?"":"!important")})},Nw=!1;if(typeof window<"u")try{var Zh=Object.defineProperty({},"passive",{get:function(){return Nw=!0,!0}});window.addEventListener("test",Zh,Zh),window.removeEventListener("test",Zh,Zh)}catch{Nw=!1}var Qs=Nw?{passive:!1}:!1,qZ=function(e){return e.tagName==="TEXTAREA"},sL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!qZ(e)&&n[t]==="visible")},GZ=function(e){return sL(e,"overflowY")},YZ=function(e){return sL(e,"overflowX")},HN=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=lL(e,r);if(i){var a=cL(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},XZ=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},QZ=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},lL=function(e,t){return e==="v"?GZ(t):YZ(t)},cL=function(e,t){return e==="v"?XZ(t):QZ(t)},ZZ=function(e,t){return e==="h"&&t==="rtl"?-1:1},JZ=function(e,t,n,r,i){var a=ZZ(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),u=!1,d=o>0,f=0,h=0;do{var p=cL(e,s),v=p[0],m=p[1],y=p[2],b=m-y-a*v;(v||b)&&lL(e,s)&&(f+=b,h+=v),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(d&&(Math.abs(f)<1||!i)||!d&&(Math.abs(h)<1||!i))&&(u=!0),u},Jh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},KN=function(e){return[e.deltaX,e.deltaY]},qN=function(e){return e&&"current"in e?e.current:e},eJ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tJ=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},nJ=0,Zs=[];function rJ(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(nJ++)[0],a=g.useState(oL)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=PZ([e.lockRef.current],(e.shards||[]).map(qN),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var b=Jh(m),x=n.current,w="deltaX"in m?m.deltaX:x[0]-b[0],P="deltaY"in m?m.deltaY:x[1]-b[1],S,j=m.target,C=Math.abs(w)>Math.abs(P)?"h":"v";if("touches"in m&&C==="h"&&j.type==="range")return!1;var O=HN(C,j);if(!O)return!0;if(O?S=C:(S=C==="v"?"h":"v",O=HN(C,j)),!O)return!1;if(!r.current&&"changedTouches"in m&&(w||P)&&(r.current=S),!S)return!0;var A=r.current||S;return JZ(A,y,m,A==="h"?w:P,!0)},[]),c=g.useCallback(function(m){var y=m;if(!(!Zs.length||Zs[Zs.length-1]!==a)){var b="deltaY"in y?KN(y):Jh(y),x=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&eJ(S.delta,b)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var w=(o.current.shards||[]).map(qN).filter(Boolean).filter(function(S){return S.contains(y.target)}),P=w.length>0?s(y,w[0]):!o.current.noIsolation;P&&y.cancelable&&y.preventDefault()}}},[]),u=g.useCallback(function(m,y,b,x){var w={name:m,delta:y,target:b,should:x,shadowParent:iJ(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(P){return P!==w})},1)},[]),d=g.useCallback(function(m){n.current=Jh(m),r.current=void 0},[]),f=g.useCallback(function(m){u(m.type,KN(m),m.target,s(m,e.lockRef.current))},[]),h=g.useCallback(function(m){u(m.type,Jh(m),m.target,s(m,e.lockRef.current))},[]);g.useEffect(function(){return Zs.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Qs),document.addEventListener("touchmove",c,Qs),document.addEventListener("touchstart",d,Qs),function(){Zs=Zs.filter(function(m){return m!==a}),document.removeEventListener("wheel",c,Qs),document.removeEventListener("touchmove",c,Qs),document.removeEventListener("touchstart",d,Qs)}},[]);var p=e.removeScrollBar,v=e.inert;return g.createElement(g.Fragment,null,v?g.createElement(a,{styles:tJ(i)}):null,p?g.createElement(KZ,{gapMode:e.gapMode}):null)}function iJ(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const aJ=MZ(aL,rJ);var Ig=g.forwardRef(function(e,t){return g.createElement(Dg,yi({},e,{ref:t,sideCar:aJ}))});Ig.classNames=Dg.classNames;var Tw=["Enter"," "],oJ=["ArrowDown","PageUp","Home"],uL=["ArrowUp","PageDown","End"],sJ=[...oJ,...uL],lJ={ltr:[...Tw,"ArrowRight"],rtl:[...Tw,"ArrowLeft"]},cJ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},sh="Menu",[Jd,uJ,dJ]=vg(sh),[Vs,dL]=un(sh,[dJ,Ro,$g]),Lg=Ro(),fL=$g(),[fJ,Ws]=Vs(sh),[hJ,lh]=Vs(sh),hL=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Lg(t),[c,u]=g.useState(null),d=g.useRef(!1),f=Dt(a),h=Qc(i);return g.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),l.jsx(Tg,{...s,children:l.jsx(fJ,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:l.jsx(hJ,{scope:t,onClose:g.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:o,children:r})})})};hL.displayName=sh;var pJ="MenuAnchor",TP=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Lg(n);return l.jsx(_g,{...i,...r,ref:t})});TP.displayName=pJ;var _P="MenuPortal",[mJ,pL]=Vs(_P,{forceMount:void 0}),mL=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Ws(_P,t);return l.jsx(mJ,{scope:t,forceMount:n,children:l.jsx(Zt,{present:n||a.open,children:l.jsx(oh,{asChild:!0,container:i,children:r})})})};mL.displayName=_P;var Or="MenuContent",[vJ,kP]=Vs(Or),vL=g.forwardRef((e,t)=>{const n=pL(Or,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ws(Or,e.__scopeMenu),o=lh(Or,e.__scopeMenu);return l.jsx(Jd.Provider,{scope:e.__scopeMenu,children:l.jsx(Zt,{present:r||a.open,children:l.jsx(Jd.Slot,{scope:e.__scopeMenu,children:o.modal?l.jsx(gJ,{...i,ref:t}):l.jsx(yJ,{...i,ref:t})})})})}),gJ=g.forwardRef((e,t)=>{const n=Ws(Or,e.__scopeMenu),r=g.useRef(null),i=_e(t,r);return g.useEffect(()=>{const a=r.current;if(a)return NP(a)},[]),l.jsx(MP,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ne(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),yJ=g.forwardRef((e,t)=>{const n=Ws(Or,e.__scopeMenu);return l.jsx(MP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),MP=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:v,...m}=e,y=Ws(Or,n),b=lh(Or,n),x=Lg(n),w=fL(n),P=uJ(n),[S,j]=g.useState(null),C=g.useRef(null),O=_e(t,C,y.onContentChange),A=g.useRef(0),E=g.useRef(""),_=g.useRef(0),N=g.useRef(null),k=g.useRef("right"),M=g.useRef(0),$=v?Ig:g.Fragment,D=v?{as:wo,allowPinchZoom:!0}:void 0,B=R=>{var K,se;const F=E.current+R,z=P().filter(X=>!X.disabled),U=document.activeElement,W=(K=z.find(X=>X.ref.current===U))==null?void 0:K.textValue,Z=z.map(X=>X.textValue),ae=TJ(Z,F,W),ee=(se=z.find(X=>X.textValue===ae))==null?void 0:se.ref.current;(function X(J){E.current=J,window.clearTimeout(A.current),J!==""&&(A.current=window.setTimeout(()=>X(""),1e3))})(F),ee&&setTimeout(()=>ee.focus())};g.useEffect(()=>()=>window.clearTimeout(A.current),[]),xP();const I=g.useCallback(R=>{var z,U;return k.current===((z=N.current)==null?void 0:z.side)&&kJ(R,(U=N.current)==null?void 0:U.area)},[]);return l.jsx(vJ,{scope:n,searchRef:E,onItemEnter:g.useCallback(R=>{I(R)&&R.preventDefault()},[I]),onItemLeave:g.useCallback(R=>{var F;I(R)||((F=C.current)==null||F.focus(),j(null))},[I]),onTriggerLeave:g.useCallback(R=>{I(R)&&R.preventDefault()},[I]),pointerGraceTimerRef:_,onPointerGraceIntentChange:g.useCallback(R=>{N.current=R},[]),children:l.jsx($,{...D,children:l.jsx(Og,{asChild:!0,trapped:i,onMountAutoFocus:ne(a,R=>{var F;R.preventDefault(),(F=C.current)==null||F.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:l.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:l.jsx(eL,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:j,onEntryFocus:ne(c,R=>{b.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(kg,{role:"menu","aria-orientation":"vertical","data-state":kL(y.open),"data-radix-menu-content":"",dir:b.dir,...x,...m,ref:O,style:{outline:"none",...m.style},onKeyDown:ne(m.onKeyDown,R=>{const z=R.target.closest("[data-radix-menu-content]")===R.currentTarget,U=R.ctrlKey||R.altKey||R.metaKey,W=R.key.length===1;z&&(R.key==="Tab"&&R.preventDefault(),!U&&W&&B(R.key));const Z=C.current;if(R.target!==Z||!sJ.includes(R.key))return;R.preventDefault();const ee=P().filter(K=>!K.disabled).map(K=>K.ref.current);uL.includes(R.key)&&ee.reverse(),EJ(ee)}),onBlur:ne(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(A.current),E.current="")}),onPointerMove:ne(e.onPointerMove,ef(R=>{const F=R.target,z=M.current!==R.clientX;if(R.currentTarget.contains(F)&&z){const U=R.clientX>M.current?"right":"left";k.current=U,M.current=R.clientX}}))})})})})})})});vL.displayName=Or;var xJ="MenuGroup",RP=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(pe.div,{role:"group",...r,ref:t})});RP.displayName=xJ;var bJ="MenuLabel",gL=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(pe.div,{...r,ref:t})});gL.displayName=bJ;var Rm="MenuItem",GN="menu.itemSelect",Fg=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=g.useRef(null),o=lh(Rm,e.__scopeMenu),s=kP(Rm,e.__scopeMenu),c=_e(t,a),u=g.useRef(!1),d=()=>{const f=a.current;if(!n&&f){const h=new CustomEvent(GN,{bubbles:!0,cancelable:!0});f.addEventListener(GN,p=>r==null?void 0:r(p),{once:!0}),_D(f,h),h.defaultPrevented?u.current=!1:o.onClose()}};return l.jsx(yL,{...i,ref:c,disabled:n,onClick:ne(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:ne(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:ne(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||Tw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Fg.displayName=Rm;var yL=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=kP(Rm,n),s=fL(n),c=g.useRef(null),u=_e(t,c),[d,f]=g.useState(!1),[h,p]=g.useState("");return g.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[a.children]),l.jsx(Jd.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:l.jsx(tL,{asChild:!0,...s,focusable:!r,children:l.jsx(pe.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:ne(e.onPointerMove,ef(v=>{r?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ne(e.onPointerLeave,ef(v=>o.onItemLeave(v))),onFocus:ne(e.onFocus,()=>f(!0)),onBlur:ne(e.onBlur,()=>f(!1))})})})}),wJ="MenuCheckboxItem",xL=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return l.jsx(PL,{scope:e.__scopeMenu,checked:n,children:l.jsx(Fg,{role:"menuitemcheckbox","aria-checked":$m(n)?"mixed":n,...i,ref:t,"data-state":DP(n),onSelect:ne(i.onSelect,()=>r==null?void 0:r($m(n)?!0:!n),{checkForDefaultPrevented:!1})})})});xL.displayName=wJ;var bL="MenuRadioGroup",[SJ,jJ]=Vs(bL,{value:void 0,onValueChange:()=>{}}),wL=g.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=Dt(r);return l.jsx(SJ,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(RP,{...i,ref:t})})});wL.displayName=bL;var SL="MenuRadioItem",jL=g.forwardRef((e,t)=>{const{value:n,...r}=e,i=jJ(SL,e.__scopeMenu),a=n===i.value;return l.jsx(PL,{scope:e.__scopeMenu,checked:a,children:l.jsx(Fg,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":DP(a),onSelect:ne(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});jL.displayName=SL;var $P="MenuItemIndicator",[PL,PJ]=Vs($P,{checked:!1}),CL=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=PJ($P,n);return l.jsx(Zt,{present:r||$m(a.checked)||a.checked===!0,children:l.jsx(pe.span,{...i,ref:t,"data-state":DP(a.checked)})})});CL.displayName=$P;var CJ="MenuSeparator",OL=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(pe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});OL.displayName=CJ;var OJ="MenuArrow",AL=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Lg(n);return l.jsx(Mg,{...i,...r,ref:t})});AL.displayName=OJ;var AJ="MenuSub",[C_e,EL]=Vs(AJ),Zu="MenuSubTrigger",NL=g.forwardRef((e,t)=>{const n=Ws(Zu,e.__scopeMenu),r=lh(Zu,e.__scopeMenu),i=EL(Zu,e.__scopeMenu),a=kP(Zu,e.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>d,[d]),g.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),c(null)}},[s,c]),l.jsx(TP,{asChild:!0,...u,children:l.jsx(yL,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":kL(n.open),...e,ref:mg(t,i.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ne(e.onPointerMove,ef(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ne(e.onPointerLeave,ef(f=>{var p,v;d();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const m=(v=n.content)==null?void 0:v.dataset.side,y=m==="right",b=y?-5:5,x=h[y?"left":"right"],w=h[y?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+b,y:f.clientY},{x,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x,y:h.bottom}],side:m}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:ne(e.onKeyDown,f=>{var p;const h=a.searchRef.current!=="";e.disabled||h&&f.key===" "||lJ[r.dir].includes(f.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),f.preventDefault())})})})});NL.displayName=Zu;var TL="MenuSubContent",_L=g.forwardRef((e,t)=>{const n=pL(Or,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ws(Or,e.__scopeMenu),o=lh(Or,e.__scopeMenu),s=EL(TL,e.__scopeMenu),c=g.useRef(null),u=_e(t,c);return l.jsx(Jd.Provider,{scope:e.__scopeMenu,children:l.jsx(Zt,{present:r||a.open,children:l.jsx(Jd.Slot,{scope:e.__scopeMenu,children:l.jsx(MP,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ne(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:ne(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:ne(e.onKeyDown,d=>{var p;const f=d.currentTarget.contains(d.target),h=cJ[o.dir].includes(d.key);f&&h&&(a.onOpenChange(!1),(p=s.trigger)==null||p.focus(),d.preventDefault())})})})})})});_L.displayName=TL;function kL(e){return e?"open":"closed"}function $m(e){return e==="indeterminate"}function DP(e){return $m(e)?"indeterminate":e?"checked":"unchecked"}function EJ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function NJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function TJ(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=NJ(e,Math.max(a,0));i.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function _J(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;ar!=d>r&&n<(u-s)*(r-c)/(d-c)+s&&(i=!i)}return i}function kJ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return _J(n,t)}function ef(e){return t=>t.pointerType==="mouse"?e(t):void 0}var MJ=hL,RJ=TP,$J=mL,DJ=vL,IJ=RP,LJ=gL,FJ=Fg,BJ=xL,UJ=wL,zJ=jL,VJ=CL,WJ=OL,HJ=AL,KJ=NL,qJ=_L,IP="DropdownMenu",[GJ,O_e]=un(IP,[dL]),Rn=dL(),[YJ,ML]=GJ(IP),RL=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Rn(t),u=g.useRef(null),[d=!1,f]=_r({prop:i,defaultProp:a,onChange:o});return l.jsx(YJ,{scope:t,triggerId:ir(),triggerRef:u,contentId:ir(),open:d,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(h=>!h),[f]),modal:s,children:l.jsx(MJ,{...c,open:d,onOpenChange:f,dir:r,modal:s,children:n})})};RL.displayName=IP;var $L="DropdownMenuTrigger",DL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=ML($L,n),o=Rn(n);return l.jsx(RJ,{asChild:!0,...o,children:l.jsx(pe.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:mg(t,a.triggerRef),onPointerDown:ne(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:ne(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});DL.displayName=$L;var XJ="DropdownMenuPortal",IL=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Rn(t);return l.jsx($J,{...r,...n})};IL.displayName=XJ;var LL="DropdownMenuContent",FL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ML(LL,n),a=Rn(n),o=g.useRef(!1);return l.jsx(DJ,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:ne(e.onCloseAutoFocus,s=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:ne(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!i.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});FL.displayName=LL;var QJ="DropdownMenuGroup",ZJ=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(IJ,{...i,...r,ref:t})});ZJ.displayName=QJ;var JJ="DropdownMenuLabel",BL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(LJ,{...i,...r,ref:t})});BL.displayName=JJ;var eee="DropdownMenuItem",UL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(FJ,{...i,...r,ref:t})});UL.displayName=eee;var tee="DropdownMenuCheckboxItem",zL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(BJ,{...i,...r,ref:t})});zL.displayName=tee;var nee="DropdownMenuRadioGroup",ree=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(UJ,{...i,...r,ref:t})});ree.displayName=nee;var iee="DropdownMenuRadioItem",VL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(zJ,{...i,...r,ref:t})});VL.displayName=iee;var aee="DropdownMenuItemIndicator",WL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(VJ,{...i,...r,ref:t})});WL.displayName=aee;var oee="DropdownMenuSeparator",HL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(WJ,{...i,...r,ref:t})});HL.displayName=oee;var see="DropdownMenuArrow",lee=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(HJ,{...i,...r,ref:t})});lee.displayName=see;var cee="DropdownMenuSubTrigger",KL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(KJ,{...i,...r,ref:t})});KL.displayName=cee;var uee="DropdownMenuSubContent",qL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(qJ,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qL.displayName=uee;var dee=RL,fee=DL,hee=IL,GL=FL,YL=BL,XL=UL,QL=zL,ZL=VL,JL=WL,eF=HL,tF=KL,nF=qL;const tf=dee,nf=fee,pee=g.forwardRef(({className:e,inset:t,children:n,...r},i)=>l.jsxs(tF,{ref:i,className:le("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,l.jsx(xm,{className:"ml-auto"})]}));pee.displayName=tF.displayName;const mee=g.forwardRef(({className:e,...t},n)=>l.jsx(nF,{ref:n,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));mee.displayName=nF.displayName;const fc=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(hee,{children:l.jsx(GL,{ref:r,sideOffset:t,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));fc.displayName=GL.displayName;const gn=g.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(XL,{ref:r,className:le("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));gn.displayName=XL.displayName;const vee=g.forwardRef(({className:e,children:t,checked:n,...r},i)=>l.jsxs(QL,{ref:i,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(JL,{children:l.jsx(Gc,{className:"h-4 w-4"})})}),t]}));vee.displayName=QL.displayName;const gee=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(ZL,{ref:r,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(JL,{children:l.jsx(C7,{className:"h-2 w-2 fill-current"})})}),t]}));gee.displayName=ZL.displayName;const Bg=g.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(YL,{ref:r,className:le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Bg.displayName=YL.displayName;const LP=g.forwardRef(({className:e,...t},n)=>l.jsx(eF,{ref:n,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));LP.displayName=eF.displayName;var FP="Avatar",[yee,A_e]=un(FP),[xee,rF]=yee(FP),iF=g.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=g.useState("idle");return l.jsx(xee,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:l.jsx(pe.span,{...r,ref:t})})});iF.displayName=FP;var aF="AvatarImage",oF=g.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=rF(aF,n),s=bee(r,a.referrerPolicy),c=Dt(u=>{i(u),o.onImageLoadingStatusChange(u)});return Kt(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?l.jsx(pe.img,{...a,ref:t,src:r}):null});oF.displayName=aF;var sF="AvatarFallback",lF=g.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=rF(sF,n),[o,s]=g.useState(r===void 0);return g.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(c)}},[r]),o&&a.imageLoadingStatus!=="loaded"?l.jsx(pe.span,{...i,ref:t}):null});lF.displayName=sF;function bee(e,t){const[n,r]=g.useState("idle");return Kt(()=>{if(!e){r("error");return}let i=!0;const a=new window.Image,o=s=>()=>{i&&r(s)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var cF=iF,uF=oF,dF=lF;const Ug=g.forwardRef(({className:e,...t},n)=>l.jsx(cF,{ref:n,className:le("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ug.displayName=cF.displayName;const BP=g.forwardRef(({className:e,...t},n)=>l.jsx(uF,{ref:n,className:le("aspect-square h-full w-full",e),...t}));BP.displayName=uF.displayName;const zg=g.forwardRef(({className:e,...t},n)=>l.jsx(dF,{ref:n,className:le("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));zg.displayName=dF.displayName;var wee="Separator",YN="horizontal",See=["horizontal","vertical"],fF=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=YN,...i}=e,a=jee(r)?r:YN,s=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return l.jsx(pe.div,{"data-orientation":a,...s,...i,ref:t})});fF.displayName=wee;function jee(e){return See.includes(e)}var hF=fF;const _w=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},i)=>l.jsx(hF,{ref:i,decorative:n,orientation:t,className:le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));_w.displayName=hF.displayName;const Pee=xg("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function qt({className:e,variant:t,...n}){return l.jsx("div",{className:le(Pee({variant:t}),e),...n})}function Cee(){const[e,t]=g.useState(0);return g.useEffect(()=>{const n=setTimeout(()=>{t(100)},100);return()=>clearTimeout(n)},[]),l.jsxs("div",{className:"fixed inset-0 bg-neutral-950 z-50 flex flex-col items-center justify-center",children:[l.jsx("div",{className:"fixed top-0 left-0 w-full h-0.5 bg-neutral-900",children:l.jsx("div",{className:"h-full bg-white transition-all duration-1000 ease-out",style:{width:`${e}%`}})}),l.jsxs("div",{className:"flex flex-col items-center gap-8",children:[l.jsx(ji,{className:"h-10 w-10 text-white animate-spin"}),l.jsx("div",{className:"font-mono text-xs text-neutral-500",children:"Prism 0.5.0-alpha2 (Adelante)"})]})]})}function Oee({children:e}){const[t,n]=g.useState(!0),[r,i]=g.useState(0);g.useEffect(()=>{const o=setInterval(()=>{i(c=>c<100?c+10:100)},60),s=setTimeout(()=>{n(!1),clearInterval(o)},600);return()=>{clearTimeout(s),clearInterval(o)}},[]);const a={initial:{opacity:0,y:40,scale:.98,filter:"blur(12px)"},animate:{opacity:1,y:0,scale:1,filter:"blur(0px)",transition:{type:"spring",stiffness:120,damping:18,mass:1.1,duration:.3}},exit:{opacity:0,y:-40,scale:.98,filter:"blur(12px)",transition:{duration:.15}}};return l.jsx("div",{className:"relative w-full min-h-[200px]",children:l.jsx(C4,{mode:"wait",children:t?l.jsxs("div",{className:"fixed inset-0 bg-transparent z-50 flex flex-col items-center justify-center",children:[l.jsx("div",{className:"fixed top-0 left-0 w-full h-0.5 bg-neutral-900",children:l.jsx("div",{className:"h-full bg-white transition-all duration-1000 ease-out",style:{width:`${r}%`}})}),l.jsx(ji,{className:"h-10 w-10 text-white animate-spin"})]}):l.jsx(FX.div,{initial:"initial",animate:"animate",exit:"exit",variants:a,className:"w-full",style:{transformOrigin:"center",willChange:"transform, opacity, filter"},children:e},"content")})})}function Aee(){var k;const[e,t]=g.useState(!0),[n,r]=g.useState(!1),[i,a]=g.useState(0),[o,s]=g.useState({username:"",id:""}),[c,u]=g.useState({name:"",status:"offline",ip:"",port:""}),[d,f]=g.useState(0),h=5,p=5e3,v=Us(),m=Kc(),{id:y}=Ui(),b=m.pathname.includes("/server/"),x=m.pathname.includes("/admin/"),w=g.useRef(null),P=g.useRef(!0),S=async()=>{try{const M=await fetch("/api/user/logout",{method:"POST",headers:{"Content-Type":"application/json"}});M.ok?v("/auth"):console.error("Logout failed:",await M.text())}catch(M){console.error("Logout error:",M)}},j=M=>{var $;if(P.current)try{const D=JSON.parse(M.data);switch(D.event){case"auth success":($=w.current)==null||$.send(JSON.stringify({event:"send stats",args:[null]}));break;case"status":u(B=>({...B,status:D.args[0]}));break}}catch(D){console.error("WebSocket message handling error:",D)}};g.useEffect(()=>{P.current=!0;const M=async()=>{if(!(!y||!P.current))try{const D=await(await fetch(`/api/server/${y}/websocket`)).json(),B=new WebSocket(D.data.socket);B.onopen=()=>{if(!P.current){B.close();return}console.log("WebSocket connected"),f(0),B.send(JSON.stringify({event:"auth",args:[D.data.token]}))},B.onmessage=j,B.onclose=()=>{P.current&&(console.log("WebSocket disconnected"),d{P.current&&(f(I=>I+1),M())},p))},B.onerror=I=>{console.error("WebSocket error:",I)},w.current=B}catch($){console.error("WebSocket connection error:",$)}};return M(),()=>{P.current=!1,w.current&&(w.current.close(),w.current=null)}},[y,d]),g.useEffect(()=>{const M=async()=>{try{const z=await(await fetch("/api/admin")).json();r(z.admin===!0)}catch(F){console.error("Failed to check admin status:",F),r(!1)}};M();const $=setInterval(M,3e4),D=async()=>{try{const z=await(await fetch("/api/user")).json();s(z)}catch(F){console.error("Failed to fetch user data:",F),s({username:"User",id:"00000"})}},B=async()=>{try{const z=await(await fetch("/api/coins")).json();a(z.coins)}catch(F){console.error("Failed to fetch coins balance:",F),a(0)}};setInterval(B,3e3);const I=async()=>{var F,z,U,W,Z,ae,ee,K,se,X;if(y)try{const te=await(await fetch(`/api/server/${y}`)).json();u({name:te.attributes.name,status:te.attributes.status,ip:(Z=(W=(U=(z=(F=te.attributes.relationships)==null?void 0:F.allocations)==null?void 0:z.data)==null?void 0:U[0])==null?void 0:W.attributes)==null?void 0:Z.ip_alias,port:(X=(se=(K=(ee=(ae=te.attributes.relationships)==null?void 0:ae.allocations)==null?void 0:ee.data)==null?void 0:K[0])==null?void 0:se.attributes)==null?void 0:X.port})}catch(J){console.error("Failed to fetch server info:",J)}},R=setTimeout(()=>{t(!1)},1500);return D(),B(),I(),()=>{clearTimeout(R),clearInterval($)}},[y]);const C=M=>{var $;(($=w.current)==null?void 0:$.readyState)===WebSocket.OPEN&&w.current.send(JSON.stringify({event:"set state",args:[M]}))},O=M=>{switch(M==null?void 0:M.toLowerCase()){case"running":return"success";case"starting":case"stopping":return"warning";case"offline":case"stopped":return"secondary";default:return"secondary"}},A=[{icon:l.jsx(W7,{className:"w-4 h-4"}),label:"Overview",path:`/server/${y}/overview`},{icon:l.jsx(pg,{className:"w-4 h-4"}),label:"Console",path:`/server/${y}/console`},{icon:l.jsx(D7,{className:"w-4 h-4"}),label:"Files",path:`/server/${y}/files`},{icon:l.jsx(I7,{className:"w-4 h-4"}),label:"Network",path:`/server/${y}/network`},{icon:l.jsx(rw,{className:"w-4 h-4"}),label:"Users",path:`/server/${y}/users`},{icon:l.jsx(vs,{className:"w-4 h-4"}),label:"Backups",path:`/server/${y}/backups`},{icon:l.jsx(iE,{className:"w-4 h-4"}),label:"Settings",path:`/server/${y}/settings`}],E=[{icon:l.jsx(w7,{className:"w-4 h-4"}),label:"Plugins",path:`/server/${y}/plugins`},{icon:l.jsx(Q7,{className:"w-4 h-4"}),label:"Players",path:`/server/${y}/players`}],_=[{icon:l.jsx(J7,{className:"w-4 h-4"}),label:"Overview",path:"/admin/overview"},{icon:l.jsx(fd,{className:"w-4 h-4"}),label:"Users",path:"/admin/users"},{icon:l.jsx(sH,{className:"w-4 h-4"}),label:"Nodes",path:"/admin/nodes"},{icon:l.jsx(Z7,{className:"w-4 h-4"}),label:"Radar",path:"/admin/radar"},{icon:l.jsx(rH,{className:"w-4 h-4"}),label:"Tickets",path:"/admin/tickets"}],N=M=>m.pathname===M;return e?l.jsx(Cee,{}):l.jsxs("div",{className:"min-h-screen bg-neutral-950",children:[l.jsx("style",{jsx:!0,global:!0,children:` - * { - --removed-focus-outline: none !important; - } - `}),l.jsx("header",{className:"sticky top-0 z-50 w-full border-b border-neutral-800 bg-neutral-900/95 backdrop-blur supports-[backdrop-filter]:bg-neutral-900/60",children:l.jsxs("div",{className:"flex h-14 items-center px-4",children:[l.jsxs("div",{className:"flex items-center gap-4 mr-4",children:[l.jsx(Lr,{to:"/dashboard",className:"flex items-center gap-2 text-neutral-400 hover:text-white transition-colors",children:l.jsx("img",{src:"https://i.imgur.com/TinuetS.png",alt:"Logo",className:"w-6 h-6 ml-1.5"})}),l.jsx(_w,{orientation:"vertical",className:"h-6 bg-neutral-800"})]}),l.jsxs("nav",{className:"flex items-center space-x-2",children:[l.jsx(Y,{variant:m.pathname==="/dashboard"?"secondary":"ghost",size:"sm",className:`${m.pathname==="/dashboard"?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Lr,{to:"/dashboard",className:"flex items-center gap-2",children:[l.jsx(F7,{className:"w-4 h-4"}),l.jsx("span",{children:"Dashboard"})]})}),l.jsx(Y,{variant:m.pathname==="/account"?"secondary":"ghost",size:"sm",className:`${m.pathname==="/account"?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Lr,{to:"/account",className:"flex items-center gap-2",children:[l.jsx(rw,{className:"w-4 h-4"}),l.jsx("span",{children:"Account"})]})}),l.jsx(Y,{variant:m.pathname==="/referrals"?"secondary":"ghost",size:"sm",className:`${m.pathname==="/referrals"?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Lr,{to:"/referrals",className:"flex items-center gap-2",children:[l.jsx(nH,{className:"w-4 h-4"}),l.jsx("span",{children:"Referrals"})]})}),l.jsx(Y,{variant:m.pathname==="/tickets"?"secondary":"ghost",size:"sm",className:`${m.pathname==="/tickets"?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Lr,{to:"/tickets",className:"flex items-center gap-2",children:[l.jsx(z7,{className:"w-4 h-4"}),l.jsx("span",{children:"Support"})]})}),n&&l.jsx(Y,{variant:m.pathname.startsWith("/admin/")?"secondary":"ghost",size:"sm",className:`${m.pathname.startsWith("/admin/")?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Lr,{to:"/admin/overview",className:"flex items-center gap-2",children:[l.jsx(iE,{className:"w-4 h-4"}),l.jsx("span",{children:"Admin"})]})})]}),l.jsxs("div",{className:"flex items-center ml-auto gap-4",children:[l.jsxs("div",{className:"relative group",children:[l.jsxs(Y,{variant:"ghost",size:"sm",className:"flex items-center gap-2 text-neutral-400 focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 group-hover:bg-neutral-800/50",children:[l.jsx(fg,{className:"w-4 h-4"}),l.jsxs("span",{className:"text-sm",children:[i.toFixed(2)," coins"]})]}),l.jsx("div",{className:"absolute right-0 w-72 mt-1 invisible translate-y-4 opacity-0 group-hover:visible group-hover:translate-y-0 group-hover:opacity-100 transition-all duration-300 ease-[cubic-bezier(0.26,1.05,0.7,1)]",children:l.jsxs("div",{className:"bg-neutral-900 border border-neutral-800 rounded-md shadow-lg p-2",children:[l.jsxs(Lr,{to:"/coins/afk",className:"flex items-start gap-3 p-3 rounded-md hover:bg-neutral-800/50 transition-colors duration-200",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-800/75 flex items-center justify-center",children:l.jsx(E7,{className:"w-5 h-5 text-neutral-400"})})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium text-neutral-200",children:"AFK Page"}),l.jsx("p",{className:"text-xs text-neutral-400 mt-0.5",children:"Earn coins while being AFK"})]})]}),l.jsxs(Lr,{to:"/coins/store",className:"flex items-start gap-3 p-3 mt-1 rounded-md hover:bg-neutral-800/50 transition-colors duration-200",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-800/75 flex items-center justify-center",children:l.jsx(tH,{className:"w-5 h-5 text-neutral-400"})})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium text-neutral-200",children:"Resources Store"}),l.jsx("p",{className:"text-xs text-neutral-400 mt-0.5",children:"Buy resources with your coins"})]})]})]})})]}),l.jsx(_w,{orientation:"vertical",className:"h-6 bg-neutral-800"}),l.jsxs(tf,{children:[l.jsx(nf,{asChild:!0,children:l.jsxs(Y,{variant:"ghost",size:"sm",className:"flex items-center gap-2 text-neutral-400 focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0",children:[l.jsxs(Ug,{className:"h-6 w-6",children:[l.jsx(BP,{src:"https://i.imgur.com/J4jb4zO.png"}),l.jsx(zg,{children:"U"})]}),l.jsx("span",{className:"hidden lg:inline",children:o.username}),n&&l.jsx(qt,{variant:"secondary",className:"ml-1 text-xs bg-white/10 hover:bg-white/20",children:"Admin"}),l.jsx(dg,{className:"w-4 h-4"})]})}),l.jsxs(fc,{align:"end",className:"w-56 bg-neutral-900 border-neutral-800",children:[l.jsxs(Bg,{className:"text-neutral-400 text-xs font-mono",children:["User ",o.id]}),l.jsx(LP,{className:"bg-neutral-800"}),l.jsxs(gn,{className:"text-neutral-400 hover:text-white focus:text-white cursor-pointer focus:bg-neutral-800 hover:bg-neutral-800",children:[l.jsx(bD,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:"Settings"})]}),l.jsxs(gn,{className:"cursor-pointer text-red-500 hover:text-red-400 focus:text-red-400 focus:bg-neutral-800 hover:bg-neutral-800",onClick:S,children:[l.jsx(B7,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:"Log out"})]})]})]})]})]})}),l.jsxs("div",{className:"flex",children:[b&&l.jsx("aside",{className:"w-64 min-h-[calc(100vh-3.5rem)] bg-neutral-900/20 border-r border-neutral-800/20",children:l.jsxs("div",{className:"p-4",children:[l.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start text-neutral-400 hover:text-white mb-4",onClick:()=>v("/dashboard"),children:[l.jsx(nE,{className:"w-4 h-4 mr-2"}),"Back to Dashboard"]}),l.jsxs(ve,{className:"p-4 mb-4 bg-neutral-900/40 border-neutral-800/40",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(va,{className:"w-4 h-4 text-neutral-400"}),l.jsx("span",{className:"font-medium text-sm text-white",children:c.name})]}),l.jsxs(tf,{children:[l.jsx(nf,{asChild:!0,children:l.jsx(Y,{variant:"ghost",size:"icon",className:"h-8 w-8",children:l.jsx(pD,{className:"w-4 h-4"})})}),l.jsxs(fc,{align:"end",className:"w-40 bg-neutral-900 border-neutral-800",children:[l.jsxs(gn,{className:"text-neutral-400 hover:text-white cursor-pointer",onClick:()=>C("start"),disabled:["starting","running"].includes(c.status),children:[l.jsx(yD,{className:"w-4 h-4 mr-2"}),"Start"]}),l.jsxs(gn,{className:"text-neutral-400 hover:text-white cursor-pointer",onClick:()=>C("restart"),disabled:!["running"].includes(c.status),children:[l.jsx(xD,{className:"w-4 h-4 mr-2"}),"Restart"]}),l.jsxs(gn,{className:"text-neutral-400 hover:text-white cursor-pointer",onClick:()=>C("stop"),disabled:!["running"].includes(c.status),children:[l.jsx(SD,{className:"w-4 h-4 mr-2"}),"Stop"]})]})]})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx(qt,{variant:O(c.status),className:"mb-2",children:(k=c.status)==null?void 0:k.toUpperCase()}),l.jsxs("p",{className:"text-xs text-neutral-400",children:[c.ip,":",c.port]})]})]}),l.jsx("div",{className:"space-y-1",children:A.map(M=>l.jsx(Y,{variant:N(M.path)?"secondary":"ghost",size:"sm",className:`w-full justify-start ${N(M.path)?"":"text-neutral-400"}`,asChild:!0,children:l.jsxs(Lr,{to:M.path,className:"flex items-center gap-2",children:[M.icon,l.jsx("span",{children:M.label})]})},M.label))}),l.jsxs("div",{className:"mt-4",children:[l.jsx("h3",{className:"text-xs font-medium text-neutral-500 mb-2 px-2",children:"More"}),l.jsx("div",{className:"space-y-1",children:E.map(M=>l.jsx(Y,{variant:N(M.path)?"secondary":"ghost",size:"sm",className:`w-full justify-start ${N(M.path)?"":"text-neutral-400"}`,asChild:!0,children:l.jsxs(Lr,{to:M.path,className:"flex items-center gap-2",children:[M.icon,l.jsx("span",{children:M.label})]})},M.label))})]})]})}),x&&l.jsx("aside",{className:"w-64 min-h-[calc(100vh-3.5rem)] bg-neutral-900/20 border-r border-neutral-800/20",children:l.jsxs("div",{className:"p-4",children:[l.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start text-neutral-400 hover:text-white mb-4",onClick:()=>v("/dashboard"),children:[l.jsx(nE,{className:"w-4 h-4 mr-2"}),"Back to Dashboard"]}),l.jsx("nav",{className:"space-y-2",children:_.map(M=>l.jsx(Y,{variant:N(M.path)?"secondary":"ghost",size:"sm",className:`w-full justify-start ${N(M.path)?"":"text-neutral-400"}`,asChild:!0,children:l.jsxs(Lr,{to:M.path,className:"flex items-center gap-2",children:[M.icon,l.jsx("span",{children:M.label})]})},M.label))})]})}),l.jsx(C4,{mode:"wait",children:l.jsx("main",{className:`flex-1 ${b||x?"max-w-[calc(100%-16rem)]":"max-w-7xl mx-auto"} px-4 sm:px-6 lg:px-8 py-6 text-white`,children:l.jsx(Oee,{children:l.jsx(P9,{})},m.pathname)})})]})]})}var Eee=Array.isArray,Hn=Eee,Nee=typeof Ch=="object"&&Ch&&Ch.Object===Object&&Ch,pF=Nee,Tee=pF,_ee=typeof self=="object"&&self&&self.Object===Object&&self,kee=Tee||_ee||Function("return this")(),Vi=kee,Mee=Vi,Ree=Mee.Symbol,ch=Ree,XN=ch,mF=Object.prototype,$ee=mF.hasOwnProperty,Dee=mF.toString,Mu=XN?XN.toStringTag:void 0;function Iee(e){var t=$ee.call(e,Mu),n=e[Mu];try{e[Mu]=void 0;var r=!0}catch{}var i=Dee.call(e);return r&&(t?e[Mu]=n:delete e[Mu]),i}var Lee=Iee,Fee=Object.prototype,Bee=Fee.toString;function Uee(e){return Bee.call(e)}var zee=Uee,QN=ch,Vee=Lee,Wee=zee,Hee="[object Null]",Kee="[object Undefined]",ZN=QN?QN.toStringTag:void 0;function qee(e){return e==null?e===void 0?Kee:Hee:ZN&&ZN in Object(e)?Vee(e):Wee(e)}var Oa=qee;function Gee(e){return e!=null&&typeof e=="object"}var Aa=Gee,Yee=Oa,Xee=Aa,Qee="[object Symbol]";function Zee(e){return typeof e=="symbol"||Xee(e)&&Yee(e)==Qee}var nu=Zee,Jee=Hn,ete=nu,tte=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nte=/^\w*$/;function rte(e,t){if(Jee(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ete(e)?!0:nte.test(e)||!tte.test(e)||t!=null&&e in Object(t)}var UP=rte;function ite(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var $o=ite;const ru=Ze($o);var ate=Oa,ote=$o,ste="[object AsyncFunction]",lte="[object Function]",cte="[object GeneratorFunction]",ute="[object Proxy]";function dte(e){if(!ote(e))return!1;var t=ate(e);return t==lte||t==cte||t==ste||t==ute}var zP=dte;const Re=Ze(zP);var fte=Vi,hte=fte["__core-js_shared__"],pte=hte,lx=pte,JN=function(){var e=/[^.]+$/.exec(lx&&lx.keys&&lx.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function mte(e){return!!JN&&JN in e}var vte=mte,gte=Function.prototype,yte=gte.toString;function xte(e){if(e!=null){try{return yte.call(e)}catch{}try{return e+""}catch{}}return""}var vF=xte,bte=zP,wte=vte,Ste=$o,jte=vF,Pte=/[\\^$.*+?()[\]{}|]/g,Cte=/^\[object .+?Constructor\]$/,Ote=Function.prototype,Ate=Object.prototype,Ete=Ote.toString,Nte=Ate.hasOwnProperty,Tte=RegExp("^"+Ete.call(Nte).replace(Pte,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _te(e){if(!Ste(e)||wte(e))return!1;var t=bte(e)?Tte:Cte;return t.test(jte(e))}var kte=_te;function Mte(e,t){return e==null?void 0:e[t]}var Rte=Mte,$te=kte,Dte=Rte;function Ite(e,t){var n=Dte(e,t);return $te(n)?n:void 0}var Hs=Ite,Lte=Hs,Fte=Lte(Object,"create"),Vg=Fte,e2=Vg;function Bte(){this.__data__=e2?e2(null):{},this.size=0}var Ute=Bte;function zte(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Vte=zte,Wte=Vg,Hte="__lodash_hash_undefined__",Kte=Object.prototype,qte=Kte.hasOwnProperty;function Gte(e){var t=this.__data__;if(Wte){var n=t[e];return n===Hte?void 0:n}return qte.call(t,e)?t[e]:void 0}var Yte=Gte,Xte=Vg,Qte=Object.prototype,Zte=Qte.hasOwnProperty;function Jte(e){var t=this.__data__;return Xte?t[e]!==void 0:Zte.call(t,e)}var ene=Jte,tne=Vg,nne="__lodash_hash_undefined__";function rne(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=tne&&t===void 0?nne:t,this}var ine=rne,ane=Ute,one=Vte,sne=Yte,lne=ene,cne=ine;function iu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var One=Cne,Ane=Wg;function Ene(e,t){var n=this.__data__,r=Ane(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Nne=Ene,Tne=fne,_ne=bne,kne=jne,Mne=One,Rne=Nne;function au(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},ts=function(t){return uh(t)&&t.indexOf("%")===t.length-1},oe=function(t){return nie(t)&&!su(t)},Vt=function(t){return oe(t)||uh(t)},oie=0,lu=function(t){var n=++oie;return"".concat(t||"").concat(n)},_s=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!oe(t)&&!uh(t))return r;var a;if(ts(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return su(a)&&(a=r),i&&a>n&&(a=n),a},rl=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},sie=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mw(e){"@babel/helpers - typeof";return Mw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mw(e)}var s2={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},la=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},l2=null,ux=null,ZP=function e(t){if(t===l2&&Array.isArray(ux))return ux;var n=[];return g.Children.forEach(t,function(r){De(r)||(Qre.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),ux=n,l2=t,n};function Er(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return la(i)}):r=[la(t)],ZP(e).forEach(function(i){var a=Ar(i,"type.displayName")||Ar(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function Qn(e,t){var n=Er(e,t);return n[0]}var c2=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!oe(r)||r<=0||!oe(i)||i<=0)},pie=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],mie=function(t){return t&&t.type&&uh(t.type)&&pie.indexOf(t.type)>=0},OF=function(t){return t&&Mw(t)==="object"&&"clipDot"in t},vie=function(t,n,r,i){var a,o=(a=cx==null?void 0:cx[i])!==null&&a!==void 0?a:[];return!Re(t)&&(i&&o.includes(n)||cie.includes(n))||r&&QP.includes(n)},Me=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(g.isValidElement(t)&&(i=t.props),!ru(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;vie((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},Rw=function e(t,n){if(t===n)return!0;var r=g.Children.count(t);if(r!==g.Children.count(n))return!1;if(r===0)return!0;if(r===1)return u2(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Dw(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,u=bie(e,xie),d=i||{width:n,height:r,x:0,y:0},f=Le("recharts-surface",a);return T.createElement("svg",$w({},Me(u,!0,"svg"),{className:f,width:n,height:r,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),T.createElement("title",null,s),T.createElement("desc",null,c),t)}var Sie=["children","className"];function Iw(){return Iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var nt=T.forwardRef(function(e,t){var n=e.children,r=e.className,i=jie(e,Sie),a=Le("recharts-layer",r);return T.createElement("g",Iw({className:a},Me(i,!0),{ref:t}),n)}),ys=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;ai?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=r?e:Aie(e,t,n)}var Nie=Eie,Tie="\\ud800-\\udfff",_ie="\\u0300-\\u036f",kie="\\ufe20-\\ufe2f",Mie="\\u20d0-\\u20ff",Rie=_ie+kie+Mie,$ie="\\ufe0e\\ufe0f",Die="\\u200d",Iie=RegExp("["+Die+Tie+Rie+$ie+"]");function Lie(e){return Iie.test(e)}var AF=Lie;function Fie(e){return e.split("")}var Bie=Fie,EF="\\ud800-\\udfff",Uie="\\u0300-\\u036f",zie="\\ufe20-\\ufe2f",Vie="\\u20d0-\\u20ff",Wie=Uie+zie+Vie,Hie="\\ufe0e\\ufe0f",Kie="["+EF+"]",Lw="["+Wie+"]",Fw="\\ud83c[\\udffb-\\udfff]",qie="(?:"+Lw+"|"+Fw+")",NF="[^"+EF+"]",TF="(?:\\ud83c[\\udde6-\\uddff]){2}",_F="[\\ud800-\\udbff][\\udc00-\\udfff]",Gie="\\u200d",kF=qie+"?",MF="["+Hie+"]?",Yie="(?:"+Gie+"(?:"+[NF,TF,_F].join("|")+")"+MF+kF+")*",Xie=MF+kF+Yie,Qie="(?:"+[NF+Lw+"?",Lw,TF,_F,Kie].join("|")+")",Zie=RegExp(Fw+"(?="+Fw+")|"+Qie+Xie,"g");function Jie(e){return e.match(Zie)||[]}var eae=Jie,tae=Bie,nae=AF,rae=eae;function iae(e){return nae(e)?rae(e):tae(e)}var aae=iae,oae=Nie,sae=AF,lae=aae,cae=bF;function uae(e){return function(t){t=cae(t);var n=sae(t)?lae(t):void 0,r=n?n[0]:t.charAt(0),i=n?oae(n,1).join(""):t.slice(1);return r[e]()+i}}var dae=uae,fae=dae,hae=fae("toUpperCase"),pae=hae;const iy=Ze(pae);function et(e){return function(){return e}}const RF=Math.cos,Fm=Math.sin,ai=Math.sqrt,Bm=Math.PI,ay=2*Bm,Bw=Math.PI,Uw=2*Bw,Go=1e-6,mae=Uw-Go;function $F(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $F;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;iGo)if(!(Math.abs(f*c-u*d)>Go)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-o,v=i-s,m=c*c+u*u,y=p*p+v*v,b=Math.sqrt(m),x=Math.sqrt(h),w=a*Math.tan((Bw-Math.acos((m+h-y)/(2*b*x)))/2),P=w/x,S=w/b;Math.abs(P-1)>Go&&this._append`L${t+P*d},${n+P*f}`,this._append`A${a},${a},0,0,${+(f*p>d*v)},${this._x1=t+S*c},${this._y1=n+S*u}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),u=t+s,d=n+c,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Go||Math.abs(this._y1-d)>Go)&&this._append`L${u},${d}`,r&&(h<0&&(h=h%Uw+Uw),h>mae?this._append`A${r},${r},0,1,${f},${t-s},${n-c}A${r},${r},0,1,${f},${this._x1=u},${this._y1=d}`:h>Go&&this._append`A${r},${r},0,${+(h>=Bw)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function JP(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new gae(t)}function eC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function DF(e){this._context=e}DF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function oy(e){return new DF(e)}function IF(e){return e[0]}function LF(e){return e[1]}function FF(e,t){var n=et(!0),r=null,i=oy,a=null,o=JP(s);e=typeof e=="function"?e:e===void 0?IF:et(e),t=typeof t=="function"?t:t===void 0?LF:et(t);function s(c){var u,d=(c=eC(c)).length,f,h=!1,p;for(r==null&&(a=i(p=o())),u=0;u<=d;++u)!(u=p;--v)s.point(w[v],P[v]);s.lineEnd(),s.areaEnd()}b&&(w[h]=+e(y,h,f),P[h]=+t(y,h,f),s.point(r?+r(y,h,f):w[h],n?+n(y,h,f):P[h]))}if(x)return s=null,x+""||null}function d(){return FF().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:et(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:et(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:et(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:et(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:et(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:et(+f),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:et(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class BF{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function yae(e){return new BF(e,!0)}function xae(e){return new BF(e,!1)}const tC={draw(e,t){const n=ai(t/Bm);e.moveTo(n,0),e.arc(0,0,n,0,ay)}},bae={draw(e,t){const n=ai(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},UF=ai(1/3),wae=UF*2,Sae={draw(e,t){const n=ai(t/wae),r=n*UF;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},jae={draw(e,t){const n=ai(t),r=-n/2;e.rect(r,r,n,n)}},Pae=.8908130915292852,zF=Fm(Bm/10)/Fm(7*Bm/10),Cae=Fm(ay/10)*zF,Oae=-RF(ay/10)*zF,Aae={draw(e,t){const n=ai(t*Pae),r=Cae*n,i=Oae*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=ay*a/5,s=RF(o),c=Fm(o);e.lineTo(c*n,-s*n),e.lineTo(s*r-c*i,c*r+s*i)}e.closePath()}},dx=ai(3),Eae={draw(e,t){const n=-ai(t/(dx*3));e.moveTo(0,n*2),e.lineTo(-dx*n,-n),e.lineTo(dx*n,-n),e.closePath()}},mr=-.5,vr=ai(3)/2,zw=1/ai(12),Nae=(zw/2+1)*3,Tae={draw(e,t){const n=ai(t/Nae),r=n/2,i=n*zw,a=r,o=n*zw+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(mr*r-vr*i,vr*r+mr*i),e.lineTo(mr*a-vr*o,vr*a+mr*o),e.lineTo(mr*s-vr*c,vr*s+mr*c),e.lineTo(mr*r+vr*i,mr*i-vr*r),e.lineTo(mr*a+vr*o,mr*o-vr*a),e.lineTo(mr*s+vr*c,mr*c-vr*s),e.closePath()}};function _ae(e,t){let n=null,r=JP(i);e=typeof e=="function"?e:et(e||tC),t=typeof t=="function"?t:et(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:et(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:et(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function Um(){}function zm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function VF(e){this._context=e}VF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:zm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:zm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kae(e){return new VF(e)}function WF(e){this._context=e}WF.prototype={areaStart:Um,areaEnd:Um,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:zm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Mae(e){return new WF(e)}function HF(e){this._context=e}HF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:zm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Rae(e){return new HF(e)}function KF(e){this._context=e}KF.prototype={areaStart:Um,areaEnd:Um,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function $ae(e){return new KF(e)}function f2(e){return e<0?-1:1}function h2(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(f2(a)+f2(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function p2(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function fx(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Vm(e){this._context=e}Vm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:fx(this,this._t0,p2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,fx(this,p2(this,n=h2(this,e,t)),n);break;default:fx(this,this._t0,n=h2(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function qF(e){this._context=new GF(e)}(qF.prototype=Object.create(Vm.prototype)).point=function(e,t){Vm.prototype.point.call(this,t,e)};function GF(e){this._context=e}GF.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Dae(e){return new Vm(e)}function Iae(e){return new qF(e)}function YF(e){this._context=e}YF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=m2(e),i=m2(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Fae(e){return new sy(e,.5)}function Bae(e){return new sy(e,0)}function Uae(e){return new sy(e,1)}function hc(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function zae(e,t){return e[t]}function Vae(e){const t=[];return t.key=e,t}function Wae(){var e=et([]),t=Vw,n=hc,r=zae;function i(a){var o=Array.from(e.apply(this,arguments),Vae),s,c=o.length,u=-1,d;for(const f of a)for(s=0,++u;s0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var XF={symbolCircle:tC,symbolCross:bae,symbolDiamond:Sae,symbolSquare:jae,symbolStar:Aae,symbolTriangle:Eae,symbolWye:Tae},eoe=Math.PI/180,toe=function(t){var n="symbol".concat(iy(t));return XF[n]||tC},noe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*eoe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},roe=function(t,n){XF["symbol".concat(iy(t))]=n},nC=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,c=Zae(t,Gae),u=g2(g2({},c),{},{type:r,size:a,sizeType:s}),d=function(){var y=toe(r),b=_ae().type(y).size(noe(a,s,r));return b()},f=u.className,h=u.cx,p=u.cy,v=Me(u,!0);return h===+h&&p===+p&&a===+a?T.createElement("path",Ww({},v,{className:Le("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};nC.registerSymbol=roe;function pc(e){"@babel/helpers - typeof";return pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(e)}function Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=p.inactive?u:p.color;return T.createElement("li",Hw({className:y,style:f,key:"legend-item-".concat(v)},Lm(r.props,p,v)),T.createElement(Dw,{width:o,height:o,viewBox:d,style:h},r.renderIcon(p)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(b,p,v):b))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(g.PureComponent);af(rC,"displayName","Legend");af(rC,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var hoe=Hg;function poe(){this.__data__=new hoe,this.size=0}var moe=poe;function voe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var goe=voe;function yoe(e){return this.__data__.get(e)}var xoe=yoe;function boe(e){return this.__data__.has(e)}var woe=boe,Soe=Hg,joe=WP,Poe=HP,Coe=200;function Ooe(e,t){var n=this.__data__;if(n instanceof Soe){var r=n.__data__;if(!joe||r.lengths))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=n&Goe?new Woe:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=Zse}var sC=Jse,ele=Oa,tle=sC,nle=Aa,rle="[object Arguments]",ile="[object Array]",ale="[object Boolean]",ole="[object Date]",sle="[object Error]",lle="[object Function]",cle="[object Map]",ule="[object Number]",dle="[object Object]",fle="[object RegExp]",hle="[object Set]",ple="[object String]",mle="[object WeakMap]",vle="[object ArrayBuffer]",gle="[object DataView]",yle="[object Float32Array]",xle="[object Float64Array]",ble="[object Int8Array]",wle="[object Int16Array]",Sle="[object Int32Array]",jle="[object Uint8Array]",Ple="[object Uint8ClampedArray]",Cle="[object Uint16Array]",Ole="[object Uint32Array]",ot={};ot[yle]=ot[xle]=ot[ble]=ot[wle]=ot[Sle]=ot[jle]=ot[Ple]=ot[Cle]=ot[Ole]=!0;ot[rle]=ot[ile]=ot[vle]=ot[ale]=ot[gle]=ot[ole]=ot[sle]=ot[lle]=ot[cle]=ot[ule]=ot[dle]=ot[fle]=ot[hle]=ot[ple]=ot[mle]=!1;function Ale(e){return nle(e)&&tle(e.length)&&!!ot[ele(e)]}var Ele=Ale;function Nle(e){return function(t){return e(t)}}var s5=Nle,qm={exports:{}};qm.exports;(function(e,t){var n=pF,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(qm,qm.exports);var Tle=qm.exports,_le=Ele,kle=s5,P2=Tle,C2=P2&&P2.isTypedArray,Mle=C2?kle(C2):_le,l5=Mle,Rle=Ise,$le=aC,Dle=Hn,Ile=o5,Lle=oC,Fle=l5,Ble=Object.prototype,Ule=Ble.hasOwnProperty;function zle(e,t){var n=Dle(e),r=!n&&$le(e),i=!n&&!r&&Ile(e),a=!n&&!r&&!i&&Fle(e),o=n||r||i||a,s=o?Rle(e.length,String):[],c=s.length;for(var u in e)(t||Ule.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Lle(u,c)))&&s.push(u);return s}var Vle=zle,Wle=Object.prototype;function Hle(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Wle;return e===n}var Kle=Hle;function qle(e,t){return function(n){return e(t(n))}}var c5=qle,Gle=c5,Yle=Gle(Object.keys,Object),Xle=Yle,Qle=Kle,Zle=Xle,Jle=Object.prototype,ece=Jle.hasOwnProperty;function tce(e){if(!Qle(e))return Zle(e);var t=[];for(var n in Object(e))ece.call(e,n)&&n!="constructor"&&t.push(n);return t}var nce=tce,rce=zP,ice=sC;function ace(e){return e!=null&&ice(e.length)&&!rce(e)}var ly=ace,oce=Vle,sce=nce,lce=ly;function cce(e){return lce(e)?oce(e):sce(e)}var lC=cce,uce=Cse,dce=$se,fce=lC;function hce(e){return uce(e,fce,dce)}var pce=hce,O2=pce,mce=1,vce=Object.prototype,gce=vce.hasOwnProperty;function yce(e,t,n,r,i,a){var o=n&mce,s=O2(e),c=s.length,u=O2(t),d=u.length;if(c!=d&&!o)return!1;for(var f=c;f--;){var h=s[f];if(!(o?h in t:gce.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=o;++f-1}var gde=vde;function yde(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=Mde){var u=t?null:_de(e);if(u)return kde(u);o=!1,i=Tde,c=new Ade}else c=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Xde(e){return e.value}function Qde(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var n=Gde(t,Bde);return T.createElement(rC,n)}var z2=1,Dl=function(e){function t(){var n;Ude(this,t);for(var r=arguments.length,i=new Array(r),a=0;az2||Math.abs(i.height-this.lastBoundingBox.height)>z2)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Xi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,c=i.margin,u=i.chartWidth,d=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();h={top:((d||0)-v.height)/2}}else h=s==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Xi(Xi({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,s=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,d=i.payload,f=Xi(Xi({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(c)),c);return T.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},Qde(a,Xi(Xi({},this.props),{},{payload:m5(d,u,Xde)})))}}],[{key:"getWithHeight",value:function(r,i){var a=Xi(Xi({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&oe(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])}(g.PureComponent);cy(Dl,"displayName","Legend");cy(Dl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var V2=ch,Zde=aC,Jde=Hn,W2=V2?V2.isConcatSpreadable:void 0;function efe(e){return Jde(e)||Zde(e)||!!(W2&&e&&e[W2])}var tfe=efe,nfe=i5,rfe=tfe;function y5(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=rfe),i||(i=[]);++a0&&n(s)?t>1?y5(s,t-1,n,r,i):nfe(i,s):r||(i[i.length]=s)}return i}var x5=y5;function ife(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var afe=ife,ofe=afe,sfe=ofe(),lfe=sfe,cfe=lfe,ufe=lC;function dfe(e,t){return e&&cfe(e,t,ufe)}var b5=dfe,ffe=ly;function hfe(e,t){return function(n,r){if(n==null)return n;if(!ffe(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++at||a&&o&&c&&!s&&!u||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&e=s)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var Afe=Ofe,vx=qP,Efe=GP,Nfe=fu,Tfe=w5,_fe=Sfe,kfe=s5,Mfe=Afe,Rfe=du,$fe=Hn;function Dfe(e,t,n){t.length?t=vx(t,function(a){return $fe(a)?function(o){return Efe(o,a.length===1?a[0]:a)}:a}):t=[Rfe];var r=-1;t=vx(t,kfe(Nfe));var i=Tfe(e,function(a,o,s){var c=vx(t,function(u){return u(a)});return{criteria:c,index:++r,value:a}});return _fe(i,function(a,o){return Mfe(a,o,n)})}var Ife=Dfe;function Lfe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Ffe=Lfe,Bfe=Ffe,K2=Math.max;function Ufe(e,t,n){return t=K2(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=K2(r.length-t,0),o=Array(a);++i0){if(++t>=Qfe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var the=ehe,nhe=Xfe,rhe=the,ihe=rhe(nhe),ahe=ihe,ohe=du,she=zfe,lhe=ahe;function che(e,t){return lhe(she(e,t,ohe),e+"")}var uhe=che,dhe=VP,fhe=ly,hhe=oC,phe=$o;function mhe(e,t,n){if(!phe(n))return!1;var r=typeof t;return(r=="number"?fhe(n)&&hhe(t,n.length):r=="string"&&t in n)?dhe(n[t],e):!1}var uy=mhe,vhe=x5,ghe=Ife,yhe=uhe,G2=uy,xhe=yhe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&G2(e,t[0],t[1])?t=[]:n>2&&G2(t[0],t[1],t[2])&&(t=[t[0]]),ghe(e,vhe(t,1),[])}),bhe=xhe;const dC=Ze(bhe);function of(e){"@babel/helpers - typeof";return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function Jw(){return Jw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Ru,"-left"),oe(n)&&t&&oe(t.x)&&n=t.y),"".concat(Ru,"-top"),oe(r)&&t&&oe(t.y)&&rm?Math.max(d,c[r]):Math.max(f,c[r])}function $he(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Dhe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,u,d,f;return o.height>0&&o.width>0&&n?(d=Q2({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),f=Q2({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=$he({translateX:d,translateY:f,useTranslate3d:s})):u=Mhe,{cssProperties:u,cssClasses:Rhe({translateX:d,translateY:f,coordinate:n})}}function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function Z2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function J2(e){for(var t=1;teT||Math.abs(r.height-this.state.lastBoundingBox.height)>eT)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,c=i.animationEasing,u=i.children,d=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,v=i.position,m=i.reverseDirection,y=i.useTranslate3d,b=i.viewBox,x=i.wrapperStyle,w=Dhe({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:p,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:b}),P=w.cssClasses,S=w.cssProperties,j=J2(J2({transition:h&&a?"transform ".concat(s,"ms ").concat(c):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return T.createElement("div",{tabIndex:-1,className:P,style:j,ref:function(O){r.wrapperNode=O}},u)}}])}(g.PureComponent),Khe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ai={isSsr:Khe(),get:function(t){return Ai[t]},set:function(t,n){if(typeof t=="string")Ai[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){Ai[i]=t[i]})}}};function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}function tT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nT(e){for(var t=1;t0;return T.createElement(Hhe,{allowEscapeViewBox:o,animationDuration:s,animationEasing:c,isAnimationActive:h,active:a,coordinate:d,hasPayload:j,offset:p,position:y,reverseDirection:b,useTranslate3d:x,viewBox:w,wrapperStyle:P},npe(u,nT(nT({},this.props),{},{payload:S})))}}])}(g.PureComponent);fC(Kr,"displayName","Tooltip");fC(Kr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ai.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var rpe=Vi,ipe=function(){return rpe.Date.now()},ape=ipe,ope=/\s/;function spe(e){for(var t=e.length;t--&&ope.test(e.charAt(t)););return t}var lpe=spe,cpe=lpe,upe=/^\s+/;function dpe(e){return e&&e.slice(0,cpe(e)+1).replace(upe,"")}var fpe=dpe,hpe=fpe,rT=$o,ppe=nu,iT=NaN,mpe=/^[-+]0x[0-9a-f]+$/i,vpe=/^0b[01]+$/i,gpe=/^0o[0-7]+$/i,ype=parseInt;function xpe(e){if(typeof e=="number")return e;if(ppe(e))return iT;if(rT(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=rT(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=hpe(e);var n=vpe.test(e);return n||gpe.test(e)?ype(e.slice(2),n?2:8):mpe.test(e)?iT:+e}var A5=xpe,bpe=$o,yx=ape,aT=A5,wpe="Expected a function",Spe=Math.max,jpe=Math.min;function Ppe(e,t,n){var r,i,a,o,s,c,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(wpe);t=aT(t)||0,bpe(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Spe(aT(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h);function p(j){var C=r,O=i;return r=i=void 0,u=j,o=e.apply(O,C),o}function v(j){return u=j,s=setTimeout(b,t),d?p(j):o}function m(j){var C=j-c,O=j-u,A=t-C;return f?jpe(A,a-O):A}function y(j){var C=j-c,O=j-u;return c===void 0||C>=t||C<0||f&&O>=a}function b(){var j=yx();if(y(j))return x(j);s=setTimeout(b,m(j))}function x(j){return s=void 0,h&&r?p(j):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),u=0,r=c=i=s=void 0}function P(){return s===void 0?o:x(yx())}function S(){var j=yx(),C=y(j);if(r=arguments,i=this,c=j,C){if(s===void 0)return v(c);if(f)return clearTimeout(s),s=setTimeout(b,t),p(c)}return s===void 0&&(s=setTimeout(b,t)),o}return S.cancel=w,S.flush=P,S}var Cpe=Ppe,Ope=Cpe,Ape=$o,Epe="Expected a function";function Npe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(Epe);return Ape(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ope(e,t,{leading:r,maxWait:t,trailing:i})}var Tpe=Npe;const E5=Ze(Tpe);function lf(e){"@babel/helpers - typeof";return lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(e)}function oT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rp(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(k=E5(k,m,{trailing:!0,leading:!1}));var M=new ResizeObserver(k),$=S.current.getBoundingClientRect(),D=$.width,B=$.height;return _(D,B),M.observe(S.current),function(){M.disconnect()}},[_,m]);var N=g.useMemo(function(){var k=A.containerWidth,M=A.containerHeight;if(k<0||M<0)return null;ys(ts(o)||ts(c),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,c),ys(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=ts(o)?k:o,D=ts(c)?M:c;n&&n>0&&($?D=$/n:D&&($=D*n),h&&D>h&&(D=h)),ys($>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,$,D,o,c,d,f,n);var B=!Array.isArray(p)&&la(p.type).endsWith("Chart");return T.Children.map(p,function(I){return T.isValidElement(I)?g.cloneElement(I,rp({width:$,height:D},B?{style:rp({height:"100%",width:"100%",maxHeight:D,maxWidth:$},I.props.style)}:{})):I})},[n,p,c,h,f,d,A,o]);return T.createElement("div",{id:y?"".concat(y):void 0,className:Le("recharts-responsive-container",b),style:rp(rp({},P),{},{width:o,height:c,minWidth:d,minHeight:f,maxHeight:h}),ref:S},N)}),T5=function(t){return null};T5.displayName="Cell";function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}function lT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function r1(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ai.isSsr)return{width:0,height:0};var r=Wpe(n),i=JSON.stringify({text:t,copyStyle:r});if(Js.widthCache[i])return Js.widthCache[i];try{var a=document.getElementById(cT);a||(a=document.createElement("span"),a.setAttribute("id",cT),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=r1(r1({},Vpe),r);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),c={width:s.width,height:s.height};return Js.widthCache[i]=c,++Js.cacheCount>zpe&&(Js.cacheCount=0,Js.widthCache={}),c}catch{return{width:0,height:0}}},Hpe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uf(e)}function Qm(e,t){return Ype(e)||Gpe(e,t)||qpe(e,t)||Kpe()}function Kpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qpe(e,t){if(e){if(typeof e=="string")return uT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uT(e,t)}}function uT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function vT(e,t){return hme(e)||fme(e,t)||dme(e,t)||ume()}function ume(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dme(e,t){if(e){if(typeof e=="string")return gT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gT(e,t)}}function gT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(D,B){var I=B.word,R=B.width,F=D[D.length-1];if(F&&(i==null||a||F.width+R+rB.width?D:B})};if(!d)return p;for(var m="…",y=function($){var D=f.slice(0,$),B=R5({breakAll:u,style:c,children:D+m}).wordsWithComputedWidth,I=h(B),R=I.length>o||v(I).width>Number(i);return[R,I]},b=0,x=f.length-1,w=0,P;b<=x&&w<=f.length-1;){var S=Math.floor((b+x)/2),j=S-1,C=y(j),O=vT(C,2),A=O[0],E=O[1],_=y(S),N=vT(_,1),k=N[0];if(!A&&!k&&(b=S+1),A&&k&&(x=S-1),!A&&k){P=E;break}w++}return P||p},yT=function(t){var n=De(t)?[]:t.toString().split(M5);return[{words:n}]},mme=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((n||r)&&!Ai.isSsr){var c,u,d=R5({breakAll:o,children:i,style:a});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;c=f,u=h}else return yT(i);return pme({breakAll:o,children:i,maxLines:s,style:a},c,u,n,r)}return yT(i)},xT="#808080",Zm=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,v=t.verticalAnchor,m=v===void 0?"end":v,y=t.fill,b=y===void 0?xT:y,x=mT(t,sme),w=g.useMemo(function(){return mme({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),P=x.dx,S=x.dy,j=x.angle,C=x.className,O=x.breakAll,A=mT(x,lme);if(!Vt(r)||!Vt(a))return null;var E=r+(oe(P)?P:0),_=a+(oe(S)?S:0),N;switch(m){case"start":N=xx("calc(".concat(u,")"));break;case"middle":N=xx("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:N=xx("calc(".concat(w.length-1," * -").concat(s,")"));break}var k=[];if(f){var M=w[0].width,$=x.width;k.push("scale(".concat((oe($)?$/M:1)/M,")"))}return j&&k.push("rotate(".concat(j,", ").concat(E,", ").concat(_,")")),k.length&&(A.transform=k.join(" ")),T.createElement("text",i1({},Me(A,!0),{x:E,y:_,className:Le("recharts-text",C),textAnchor:p,fill:b.includes("url")?xT:b}),w.map(function(D,B){var I=D.words.join(O?"":" ");return T.createElement("tspan",{x:E,dy:B===0?N:s,key:"".concat(I,"-").concat(B)},I)}))};function ho(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function vme(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function hC(e){let t,n,r;e.length!==2?(t=ho,n=(s,c)=>ho(e(s),c),r=(s,c)=>e(s)-c):(t=e===ho||e===vme?e:gme,n=e,r=e);function i(s,c,u=0,d=s.length){if(u>>1;n(s[f],c)<0?u=f+1:d=f}while(u>>1;n(s[f],c)<=0?u=f+1:d=f}while(uu&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:i,center:o,right:a}}function gme(){return 0}function $5(e){return e===null?NaN:+e}function*yme(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const xme=hC(ho),dh=xme.right;hC($5).center;class bT extends Map{constructor(t,n=Sme){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(wT(this,t))}has(t){return super.has(wT(this,t))}set(t,n){return super.set(bme(this,t),n)}delete(t){return super.delete(wme(this,t))}}function wT({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function bme({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function wme({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Sme(e){return e!==null&&typeof e=="object"?e.valueOf():e}function jme(e=ho){if(e===ho)return D5;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function D5(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Pme=Math.sqrt(50),Cme=Math.sqrt(10),Ome=Math.sqrt(2);function Jm(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=Pme?10:a>=Cme?5:a>=Ome?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),c=Math.round(t*u),s/ut&&--c,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),c=Math.round(t/u),s*ut&&--c),c0))return[];if(e===t)return[e];const r=t=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let u=0;u=r)&&(n=r);return n}function jT(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function I5(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?D5:jme(i);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(t-u*f/c+h)),v=Math.min(r,Math.floor(t+(c-u)*f/c+h));I5(e,t,p,v,i)}const a=e[t];let o=n,s=r;for($u(e,n,t),i(e[r],a)>0&&$u(e,n,r);o0;)--s}i(e[n],a)===0?$u(e,n,s):(++s,$u(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function $u(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Ame(e,t,n){if(e=Float64Array.from(yme(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return jT(e);if(t>=1)return ST(e);var r,i=(r-1)*t,a=Math.floor(i),o=ST(I5(e,a).subarray(0,a+1)),s=jT(e.subarray(a+1));return o+(s-o)*(i-a)}}function Eme(e,t,n=$5){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function Nme(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ap(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ap(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=_me.exec(e))?new Fn(t[1],t[2],t[3],1):(t=kme.exec(e))?new Fn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Mme.exec(e))?ap(t[1],t[2],t[3],t[4]):(t=Rme.exec(e))?ap(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$me.exec(e))?TT(t[1],t[2]/100,t[3]/100,1):(t=Dme.exec(e))?TT(t[1],t[2]/100,t[3]/100,t[4]):PT.hasOwnProperty(e)?AT(PT[e]):e==="transparent"?new Fn(NaN,NaN,NaN,0):null}function AT(e){return new Fn(e>>16&255,e>>8&255,e&255,1)}function ap(e,t,n,r){return r<=0&&(e=t=n=NaN),new Fn(e,t,n,r)}function Fme(e){return e instanceof fh||(e=pf(e)),e?(e=e.rgb(),new Fn(e.r,e.g,e.b,e.opacity)):new Fn}function c1(e,t,n,r){return arguments.length===1?Fme(e):new Fn(e,t,n,r??1)}function Fn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}mC(Fn,c1,F5(fh,{brighter(e){return e=e==null?ev:Math.pow(ev,e),new Fn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ff:Math.pow(ff,e),new Fn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fn(xs(this.r),xs(this.g),xs(this.b),tv(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ET,formatHex:ET,formatHex8:Bme,formatRgb:NT,toString:NT}));function ET(){return`#${ns(this.r)}${ns(this.g)}${ns(this.b)}`}function Bme(){return`#${ns(this.r)}${ns(this.g)}${ns(this.b)}${ns((isNaN(this.opacity)?1:this.opacity)*255)}`}function NT(){const e=tv(this.opacity);return`${e===1?"rgb(":"rgba("}${xs(this.r)}, ${xs(this.g)}, ${xs(this.b)}${e===1?")":`, ${e})`}`}function tv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ns(e){return e=xs(e),(e<16?"0":"")+e.toString(16)}function TT(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qr(e,t,n,r)}function B5(e){if(e instanceof Qr)return new Qr(e.h,e.s,e.l,e.opacity);if(e instanceof fh||(e=pf(e)),!e)return new Qr;if(e instanceof Qr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(n-r)/s+(n0&&c<1?0:o,new Qr(o,s,c,e.opacity)}function Ume(e,t,n,r){return arguments.length===1?B5(e):new Qr(e,t,n,r??1)}function Qr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}mC(Qr,Ume,F5(fh,{brighter(e){return e=e==null?ev:Math.pow(ev,e),new Qr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ff:Math.pow(ff,e),new Qr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Fn(bx(e>=240?e-240:e+120,i,r),bx(e,i,r),bx(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Qr(_T(this.h),op(this.s),op(this.l),tv(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=tv(this.opacity);return`${e===1?"hsl(":"hsla("}${_T(this.h)}, ${op(this.s)*100}%, ${op(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _T(e){return e=(e||0)%360,e<0?e+360:e}function op(e){return Math.max(0,Math.min(1,e||0))}function bx(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const vC=e=>()=>e;function zme(e,t){return function(n){return e+n*t}}function Vme(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Wme(e){return(e=+e)==1?U5:function(t,n){return n-t?Vme(t,n,e):vC(isNaN(t)?n:t)}}function U5(e,t){var n=t-e;return n?zme(e,n):vC(isNaN(e)?t:e)}const kT=function e(t){var n=Wme(t);function r(i,a){var o=n((i=c1(i)).r,(a=c1(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),u=U5(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=s(d),i.b=c(d),i.opacity=u(d),i+""}}return r.gamma=e,r}(1);function Hme(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;in&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:nv(r,i)})),n=wx.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function nve(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?rve:nve,c=u=null,f}function f(h){return h==null||isNaN(h=+h)?a:(c||(c=s(e.map(r),t,n)))(r(o(h)))}return f.invert=function(h){return o(i((u||(u=s(t,e.map(r),nv)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,rv),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=gC,d()},f.clamp=function(h){return arguments.length?(o=h?!0:Nn,d()):o!==Nn},f.interpolate=function(h){return arguments.length?(n=h,d()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return r=h,i=p,d()}}function yC(){return dy()(Nn,Nn)}function ive(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function iv(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function yc(e){return e=iv(Math.abs(e)),e?e[1]:NaN}function ave(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function ove(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var sve=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mf(e){if(!(t=sve.exec(e)))throw new Error("invalid format: "+e);var t;return new xC({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}mf.prototype=xC.prototype;function xC(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}xC.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function lve(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var z5;function cve(e,t){var n=iv(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(z5=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+iv(e,Math.max(0,t+a-1))[0]}function RT(e,t){var n=iv(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const $T={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ive,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>RT(e*100,t),r:RT,s:cve,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function DT(e){return e}var IT=Array.prototype.map,LT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function uve(e){var t=e.grouping===void 0||e.thousands===void 0?DT:ave(IT.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?DT:ove(IT.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=mf(f);var h=f.fill,p=f.align,v=f.sign,m=f.symbol,y=f.zero,b=f.width,x=f.comma,w=f.precision,P=f.trim,S=f.type;S==="n"?(x=!0,S="g"):$T[S]||(w===void 0&&(w=12),P=!0,S="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var j=m==="$"?n:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",C=m==="$"?r:/[%p]/.test(S)?o:"",O=$T[S],A=/[defgprs%]/.test(S);w=w===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function E(_){var N=j,k=C,M,$,D;if(S==="c")k=O(_)+k,_="";else{_=+_;var B=_<0||1/_<0;if(_=isNaN(_)?c:O(Math.abs(_),w),P&&(_=lve(_)),B&&+_==0&&v!=="+"&&(B=!1),N=(B?v==="("?v:s:v==="-"||v==="("?"":v)+N,k=(S==="s"?LT[8+z5/3]:"")+k+(B&&v==="("?")":""),A){for(M=-1,$=_.length;++M<$;)if(D=_.charCodeAt(M),48>D||D>57){k=(D===46?i+_.slice(M+1):_.slice(M))+k,_=_.slice(0,M);break}}}x&&!y&&(_=t(_,1/0));var I=N.length+_.length+k.length,R=I>1)+N+_+k+R.slice(I);break;default:_=R+N+_+k;break}return a(_)}return E.toString=function(){return f+""},E}function d(f,h){var p=u((f=mf(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(yc(h)/3)))*3,m=Math.pow(10,-v),y=LT[8+v/3];return function(b){return p(m*b)+y}}return{format:u,formatPrefix:d}}var sp,bC,V5;dve({thousands:",",grouping:[3],currency:["$",""]});function dve(e){return sp=uve(e),bC=sp.format,V5=sp.formatPrefix,sp}function fve(e){return Math.max(0,-yc(Math.abs(e)))}function hve(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yc(t)/3)))*3-yc(Math.abs(e)))}function pve(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yc(t)-yc(e))+1}function W5(e,t,n,r){var i=s1(e,t,n),a;switch(r=mf(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=hve(i,o))&&(r.precision=a),V5(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=pve(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=fve(i))&&(r.precision=a-(r.type==="%")*2);break}}return bC(r)}function Do(e){var t=e.domain;return e.ticks=function(n){var r=t();return a1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return W5(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,u,d=10;for(s0;){if(u=o1(o,s,n),u===c)return r[i]=o,r[a]=s,t(r);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;c=u}return e},e}function av(){var e=yC();return e.copy=function(){return hh(e,av())},Rr.apply(e,arguments),Do(e)}function H5(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,rv),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return H5(e).unknown(t)},e=arguments.length?Array.from(e,rv):[0,1],Do(n)}function K5(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return aMath.pow(e,t)}function xve(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function UT(e){return(t,n)=>-e(-t,n)}function wC(e){const t=e(FT,BT),n=t.domain;let r=10,i,a;function o(){return i=xve(r),a=yve(r),n()[0]<0?(i=UT(i),a=UT(a),e(mve,vve)):e(FT,BT),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const c=n();let u=c[0],d=c[c.length-1];const f=d0){for(;h<=p;++h)for(v=1;vd)break;b.push(m)}}else for(;h<=p;++h)for(v=r-1;v>=1;--v)if(m=h>0?v/a(-h):v*a(h),!(md)break;b.push(m)}b.length*2{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=mf(c)).precision==null&&(c.trim=!0),c=bC(c)),s===1/0)return c;const u=Math.max(1,r*s/t.ticks().length);return d=>{let f=d/a(Math.round(i(d)));return f*rn(K5(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function q5(){const e=wC(dy()).domain([1,10]);return e.copy=()=>hh(e,q5()).base(e.base()),Rr.apply(e,arguments),e}function zT(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function VT(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function SC(e){var t=1,n=e(zT(t),VT(t));return n.constant=function(r){return arguments.length?e(zT(t=+r),VT(t)):t},Do(n)}function G5(){var e=SC(dy());return e.copy=function(){return hh(e,G5()).constant(e.constant())},Rr.apply(e,arguments)}function WT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function bve(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function wve(e){return e<0?-e*e:e*e}function jC(e){var t=e(Nn,Nn),n=1;function r(){return n===1?e(Nn,Nn):n===.5?e(bve,wve):e(WT(n),WT(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Do(t)}function PC(){var e=jC(dy());return e.copy=function(){return hh(e,PC()).exponent(e.exponent())},Rr.apply(e,arguments),e}function Sve(){return PC.apply(null,arguments).exponent(.5)}function HT(e){return Math.sign(e)*e*e}function jve(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Y5(){var e=yC(),t=[0,1],n=!1,r;function i(a){var o=jve(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(HT(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,rv)).map(HT)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Y5(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Rr.apply(i,arguments),Do(i)}function X5(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Q5().domain([e,t]).range(i).unknown(a)},Rr.apply(Do(o),arguments)}function Z5(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[dh(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Z5().domain(e).range(t).unknown(n)},Rr.apply(i,arguments)}const Sx=new Date,jx=new Date;function Gt(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return c;let u;do c.push(u=new Date(+a)),t(a,s),e(a);while(uGt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Sx.setTime(+a),jx.setTime(+o),e(Sx),e(jx),Math.floor(n(Sx,jx))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const ov=Gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ov.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ov);ov.range;const ra=1e3,Pr=ra*60,ia=Pr*60,ba=ia*24,CC=ba*7,KT=ba*30,Px=ba*365,rs=Gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ra)},(e,t)=>(t-e)/ra,e=>e.getUTCSeconds());rs.range;const OC=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ra)},(e,t)=>{e.setTime(+e+t*Pr)},(e,t)=>(t-e)/Pr,e=>e.getMinutes());OC.range;const AC=Gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pr)},(e,t)=>(t-e)/Pr,e=>e.getUTCMinutes());AC.range;const EC=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ra-e.getMinutes()*Pr)},(e,t)=>{e.setTime(+e+t*ia)},(e,t)=>(t-e)/ia,e=>e.getHours());EC.range;const NC=Gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ia)},(e,t)=>(t-e)/ia,e=>e.getUTCHours());NC.range;const ph=Gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Pr)/ba,e=>e.getDate()-1);ph.range;const fy=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ba,e=>e.getUTCDate()-1);fy.range;const J5=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ba,e=>Math.floor(e/ba));J5.range;function Ks(e){return Gt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Pr)/CC)}const hy=Ks(0),sv=Ks(1),Pve=Ks(2),Cve=Ks(3),xc=Ks(4),Ove=Ks(5),Ave=Ks(6);hy.range;sv.range;Pve.range;Cve.range;xc.range;Ove.range;Ave.range;function qs(e){return Gt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/CC)}const py=qs(0),lv=qs(1),Eve=qs(2),Nve=qs(3),bc=qs(4),Tve=qs(5),_ve=qs(6);py.range;lv.range;Eve.range;Nve.range;bc.range;Tve.range;_ve.range;const TC=Gt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());TC.range;const _C=Gt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());_C.range;const wa=Gt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());wa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});wa.range;const Sa=Gt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Sa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Sa.range;function e3(e,t,n,r,i,a){const o=[[rs,1,ra],[rs,5,5*ra],[rs,15,15*ra],[rs,30,30*ra],[a,1,Pr],[a,5,5*Pr],[a,15,15*Pr],[a,30,30*Pr],[i,1,ia],[i,3,3*ia],[i,6,6*ia],[i,12,12*ia],[r,1,ba],[r,2,2*ba],[n,1,CC],[t,1,KT],[t,3,3*KT],[e,1,Px]];function s(u,d,f){const h=dy).right(o,h);if(p===o.length)return e.every(s1(u/Px,d/Px,f));if(p===0)return ov.every(Math.max(s1(u,d,f),1));const[v,m]=o[h/o[p-1][2]53)return null;"w"in V||(V.w=1),"Z"in V?(be=Ox(Du(V.y,0,1)),Ue=be.getUTCDay(),be=Ue>4||Ue===0?lv.ceil(be):lv(be),be=fy.offset(be,(V.V-1)*7),V.y=be.getUTCFullYear(),V.m=be.getUTCMonth(),V.d=be.getUTCDate()+(V.w+6)%7):(be=Cx(Du(V.y,0,1)),Ue=be.getDay(),be=Ue>4||Ue===0?sv.ceil(be):sv(be),be=ph.offset(be,(V.V-1)*7),V.y=be.getFullYear(),V.m=be.getMonth(),V.d=be.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Ue="Z"in V?Ox(Du(V.y,0,1)).getUTCDay():Cx(Du(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Ue+5)%7:V.w+V.U*7-(Ue+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Ox(V)):Cx(V)}}function O(X,J,te,V){for(var Se=0,be=J.length,Ue=te.length,We,Ye;Se=Ue)return-1;if(We=J.charCodeAt(Se++),We===37){if(We=J.charAt(Se++),Ye=S[We in qT?J.charAt(Se++):We],!Ye||(V=Ye(X,te,V))<0)return-1}else if(We!=te.charCodeAt(V++))return-1}return V}function A(X,J,te){var V=u.exec(J.slice(te));return V?(X.p=d.get(V[0].toLowerCase()),te+V[0].length):-1}function E(X,J,te){var V=p.exec(J.slice(te));return V?(X.w=v.get(V[0].toLowerCase()),te+V[0].length):-1}function _(X,J,te){var V=f.exec(J.slice(te));return V?(X.w=h.get(V[0].toLowerCase()),te+V[0].length):-1}function N(X,J,te){var V=b.exec(J.slice(te));return V?(X.m=x.get(V[0].toLowerCase()),te+V[0].length):-1}function k(X,J,te){var V=m.exec(J.slice(te));return V?(X.m=y.get(V[0].toLowerCase()),te+V[0].length):-1}function M(X,J,te){return O(X,t,J,te)}function $(X,J,te){return O(X,n,J,te)}function D(X,J,te){return O(X,r,J,te)}function B(X){return o[X.getDay()]}function I(X){return a[X.getDay()]}function R(X){return c[X.getMonth()]}function F(X){return s[X.getMonth()]}function z(X){return i[+(X.getHours()>=12)]}function U(X){return 1+~~(X.getMonth()/3)}function W(X){return o[X.getUTCDay()]}function Z(X){return a[X.getUTCDay()]}function ae(X){return c[X.getUTCMonth()]}function ee(X){return s[X.getUTCMonth()]}function K(X){return i[+(X.getUTCHours()>=12)]}function se(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var J=j(X+="",w);return J.toString=function(){return X},J},parse:function(X){var J=C(X+="",!1);return J.toString=function(){return X},J},utcFormat:function(X){var J=j(X+="",P);return J.toString=function(){return X},J},utcParse:function(X){var J=C(X+="",!0);return J.toString=function(){return X},J}}}var qT={"-":"",_:" ",0:"0"},Jt=/^\s*\d+/,Ive=/^%/,Lve=/[\\^$*+?|[\]().{}]/g;function ze(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[t.toLowerCase(),n]))}function Bve(e,t,n){var r=Jt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Uve(e,t,n){var r=Jt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function zve(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Vve(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wve(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function GT(e,t,n){var r=Jt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function YT(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Hve(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Kve(e,t,n){var r=Jt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function qve(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function XT(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Gve(e,t,n){var r=Jt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function QT(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Yve(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Xve(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Qve(e,t,n){var r=Jt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Zve(e,t,n){var r=Jt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Jve(e,t,n){var r=Ive.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ege(e,t,n){var r=Jt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function tge(e,t,n){var r=Jt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ZT(e,t){return ze(e.getDate(),t,2)}function nge(e,t){return ze(e.getHours(),t,2)}function rge(e,t){return ze(e.getHours()%12||12,t,2)}function ige(e,t){return ze(1+ph.count(wa(e),e),t,3)}function t3(e,t){return ze(e.getMilliseconds(),t,3)}function age(e,t){return t3(e,t)+"000"}function oge(e,t){return ze(e.getMonth()+1,t,2)}function sge(e,t){return ze(e.getMinutes(),t,2)}function lge(e,t){return ze(e.getSeconds(),t,2)}function cge(e){var t=e.getDay();return t===0?7:t}function uge(e,t){return ze(hy.count(wa(e)-1,e),t,2)}function n3(e){var t=e.getDay();return t>=4||t===0?xc(e):xc.ceil(e)}function dge(e,t){return e=n3(e),ze(xc.count(wa(e),e)+(wa(e).getDay()===4),t,2)}function fge(e){return e.getDay()}function hge(e,t){return ze(sv.count(wa(e)-1,e),t,2)}function pge(e,t){return ze(e.getFullYear()%100,t,2)}function mge(e,t){return e=n3(e),ze(e.getFullYear()%100,t,2)}function vge(e,t){return ze(e.getFullYear()%1e4,t,4)}function gge(e,t){var n=e.getDay();return e=n>=4||n===0?xc(e):xc.ceil(e),ze(e.getFullYear()%1e4,t,4)}function yge(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ze(t/60|0,"0",2)+ze(t%60,"0",2)}function JT(e,t){return ze(e.getUTCDate(),t,2)}function xge(e,t){return ze(e.getUTCHours(),t,2)}function bge(e,t){return ze(e.getUTCHours()%12||12,t,2)}function wge(e,t){return ze(1+fy.count(Sa(e),e),t,3)}function r3(e,t){return ze(e.getUTCMilliseconds(),t,3)}function Sge(e,t){return r3(e,t)+"000"}function jge(e,t){return ze(e.getUTCMonth()+1,t,2)}function Pge(e,t){return ze(e.getUTCMinutes(),t,2)}function Cge(e,t){return ze(e.getUTCSeconds(),t,2)}function Oge(e){var t=e.getUTCDay();return t===0?7:t}function Age(e,t){return ze(py.count(Sa(e)-1,e),t,2)}function i3(e){var t=e.getUTCDay();return t>=4||t===0?bc(e):bc.ceil(e)}function Ege(e,t){return e=i3(e),ze(bc.count(Sa(e),e)+(Sa(e).getUTCDay()===4),t,2)}function Nge(e){return e.getUTCDay()}function Tge(e,t){return ze(lv.count(Sa(e)-1,e),t,2)}function _ge(e,t){return ze(e.getUTCFullYear()%100,t,2)}function kge(e,t){return e=i3(e),ze(e.getUTCFullYear()%100,t,2)}function Mge(e,t){return ze(e.getUTCFullYear()%1e4,t,4)}function Rge(e,t){var n=e.getUTCDay();return e=n>=4||n===0?bc(e):bc.ceil(e),ze(e.getUTCFullYear()%1e4,t,4)}function $ge(){return"+0000"}function e_(){return"%"}function t_(e){return+e}function n_(e){return Math.floor(+e/1e3)}var el,a3,o3;Dge({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Dge(e){return el=Dve(e),a3=el.format,el.parse,o3=el.utcFormat,el.utcParse,el}function Ige(e){return new Date(e)}function Lge(e){return e instanceof Date?+e:+new Date(+e)}function kC(e,t,n,r,i,a,o,s,c,u){var d=yC(),f=d.invert,h=d.domain,p=u(".%L"),v=u(":%S"),m=u("%I:%M"),y=u("%I %p"),b=u("%a %d"),x=u("%b %d"),w=u("%B"),P=u("%Y");function S(j){return(c(j)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>Ame(e,a/r))},n.copy=function(){return u3(t).domain(e)},Ea.apply(n,arguments)}function vy(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,u=Nn,d,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+d(m))-a)*(r*mt}var Kge=Hge,qge=p3,Gge=Kge,Yge=du;function Xge(e){return e&&e.length?qge(e,Yge,Gge):void 0}var Qge=Xge;const to=Ze(Qge);function Zge(e,t){return ee.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=re.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};fe.decimalPlaces=fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*st;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};fe.dividedBy=fe.div=function(e){return ca(this,new this.constructor(e))};fe.dividedToIntegerBy=fe.idiv=function(e){var t=this,n=t.constructor;return Je(ca(t,new n(e),0,1),n.precision)};fe.equals=fe.eq=function(e){return!this.cmp(e)};fe.exponent=function(){return It(this)};fe.greaterThan=fe.gt=function(e){return this.cmp(e)>0};fe.greaterThanOrEqualTo=fe.gte=function(e){return this.cmp(e)>=0};fe.isInteger=fe.isint=function(){return this.e>this.d.length-2};fe.isNegative=fe.isneg=function(){return this.s<0};fe.isPositive=fe.ispos=function(){return this.s>0};fe.isZero=function(){return this.s===0};fe.lessThan=fe.lt=function(e){return this.cmp(e)<0};fe.lessThanOrEqualTo=fe.lte=function(e){return this.cmp(e)<1};fe.logarithm=fe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(er))throw Error(kr+"NaN");if(n.s<1)throw Error(kr+(n.s?"NaN":"-Infinity"));return n.eq(er)?new r(0):(gt=!1,t=ca(vf(n,a),vf(e,a),a),gt=!0,Je(t,i))};fe.minus=fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?y3(t,e):v3(t,(e.s=-e.s,e))};fe.modulo=fe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(kr+"NaN");return n.s?(gt=!1,t=ca(n,e,0,1).times(e),gt=!0,n.minus(t)):Je(new r(n),i)};fe.naturalExponential=fe.exp=function(){return g3(this)};fe.naturalLogarithm=fe.ln=function(){return vf(this)};fe.negated=fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};fe.plus=fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?v3(t,e):y3(t,(e.s=-e.s,e))};fe.precision=fe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(bs+e);if(t=It(i)+1,r=i.d.length-1,n=r*st+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};fe.squareRoot=fe.sqrt=function(){var e,t,n,r,i,a,o,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(kr+"NaN")}for(e=It(s),gt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=xi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=mu((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(i.toString()),n=c.precision,i=o=n+3;;)if(a=r,r=a.plus(ca(s,a,o+2)).times(.5),xi(a.d).slice(0,o)===(t=xi(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Je(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return gt=!0,Je(r,n)};fe.times=fe.mul=function(e){var t,n,r,i,a,o,s,c,u,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,c=h.length,u=p.length,c=0;){for(t=0,i=c+r;i>r;)s=a[i]+p[r]*h[i-r-1]+t,a[i--]=s%Yt|0,t=s/Yt|0;a[i]=(a[i]+t)%Yt|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,gt?Je(e,f.precision):e};fe.toDecimalPlaces=fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(_i(e,0,pu),t===void 0?t=r.rounding:_i(t,0,8),Je(n,e+It(n)+1,t))};fe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ks(r,!0):(_i(e,0,pu),t===void 0?t=i.rounding:_i(t,0,8),r=Je(new i(r),e+1,t),n=ks(r,!0,e+1)),n};fe.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?ks(i):(_i(e,0,pu),t===void 0?t=a.rounding:_i(t,0,8),r=Je(new a(i),e+It(i)+1,t),n=ks(r.abs(),!1,e+It(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};fe.toInteger=fe.toint=function(){var e=this,t=e.constructor;return Je(new t(e),It(e)+1,t.rounding)};fe.toNumber=function(){return+this};fe.toPower=fe.pow=function(e){var t,n,r,i,a,o,s=this,c=s.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(er);if(s=new c(s),!s.s){if(e.s<1)throw Error(kr+"Infinity");return s}if(s.eq(er))return s;if(r=c.precision,e.eq(er))return Je(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=d<0?-d:d)<=m3){for(i=new c(er),t=Math.ceil(r/st+4),gt=!1;n%2&&(i=i.times(s),a_(i.d,t)),n=mu(n/2),n!==0;)s=s.times(s),a_(s.d,t);return gt=!0,e.s<0?new c(er).div(i):Je(i,r)}}else if(a<0)throw Error(kr+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,gt=!1,i=e.times(vf(s,r+u)),gt=!0,i=g3(i),i.s=a,i};fe.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=It(i),r=ks(i,n<=a.toExpNeg||n>=a.toExpPos)):(_i(e,1,pu),t===void 0?t=a.rounding:_i(t,0,8),i=Je(new a(i),e,t),n=It(i),r=ks(i,e<=n||n<=a.toExpNeg,e)),r};fe.toSignificantDigits=fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(_i(e,1,pu),t===void 0?t=r.rounding:_i(t,0,8)),Je(new r(n),e,t)};fe.toString=fe.valueOf=fe.val=fe.toJSON=fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=It(e),n=e.constructor;return ks(e,t<=n.toExpNeg||t>=n.toExpPos)};function v3(e,t){var n,r,i,a,o,s,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),gt?Je(t,f):t;if(c=e.d,u=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(r=c,a=-a,s=u.length):(r=u,i=o,s=c.length),o=Math.ceil(f/st),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=c.length,a=u.length,s-a<0&&(a=s,r=u,u=c,c=r),n=0;a;)n=(c[--a]=c[a]+u[a]+n)/Yt|0,c[a]%=Yt;for(n&&(c.unshift(n),++i),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=i,gt?Je(t,f):t}function _i(e,t,n){if(e!==~~e||en)throw Error(bs+e)}function xi(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=c=0;si[s]?1:-1;break}return c}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]1;)r.shift()}return function(r,i,a,o){var s,c,u,d,f,h,p,v,m,y,b,x,w,P,S,j,C,O,A=r.constructor,E=r.s==i.s?1:-1,_=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(kr+"Division by zero");for(c=r.e-i.e,C=N.length,S=_.length,p=new A(E),v=p.d=[],u=0;N[u]==(_[u]||0);)++u;if(N[u]>(_[u]||0)&&--c,a==null?x=a=A.precision:o?x=a+(It(r)-It(i))+1:x=a,x<0)return new A(0);if(x=x/st+2|0,u=0,C==1)for(d=0,N=N[0],x++;(u1&&(N=e(N,d),_=e(_,d),C=N.length,S=_.length),P=C,m=_.slice(0,C),y=m.length;y=Yt/2&&++j;do d=0,s=t(N,m,C,y),s<0?(b=m[0],C!=y&&(b=b*Yt+(m[1]||0)),d=b/j|0,d>1?(d>=Yt&&(d=Yt-1),f=e(N,d),h=f.length,y=m.length,s=t(f,m,h,y),s==1&&(d--,n(f,C16)throw Error($C+It(e));if(!e.s)return new d(er);for(t==null?(gt=!1,s=f):s=t,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(Xo(2,u))/Math.LN10*2+5|0,s+=r,n=i=a=new d(er),d.precision=s;;){if(i=Je(i.times(e),s),n=n.times(++c),o=a.plus(ca(i,n,s)),xi(o.d).slice(0,s)===xi(a.d).slice(0,s)){for(;u--;)a=Je(a.times(a),s);return d.precision=f,t==null?(gt=!0,Je(a,f)):a}a=o}}function It(e){for(var t=e.e*st,n=e.d[0];n>=10;n/=10)t++;return t}function Ax(e,t,n){if(t>e.LN10.sd())throw gt=!0,n&&(e.precision=n),Error(kr+"LN10 precision limit exceeded");return Je(new e(e.LN10),t)}function Ba(e){for(var t="";e--;)t+="0";return t}function vf(e,t){var n,r,i,a,o,s,c,u,d,f=1,h=10,p=e,v=p.d,m=p.constructor,y=m.precision;if(p.s<1)throw Error(kr+(p.s?"NaN":"-Infinity"));if(p.eq(er))return new m(0);if(t==null?(gt=!1,u=y):u=t,p.eq(10))return t==null&&(gt=!0),Ax(m,u);if(u+=h,m.precision=u,n=xi(v),r=n.charAt(0),a=It(p),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=xi(p.d),r=n.charAt(0),f++;a=It(p),r>1?(p=new m("0."+n),a++):p=new m(r+"."+n.slice(1))}else return c=Ax(m,u+2,y).times(a+""),p=vf(new m(r+"."+n.slice(1)),u-h).plus(c),m.precision=y,t==null?(gt=!0,Je(p,y)):p;for(s=o=p=ca(p.minus(er),p.plus(er),u),d=Je(p.times(p),u),i=3;;){if(o=Je(o.times(d),u),c=s.plus(ca(o,new m(i),u)),xi(c.d).slice(0,u)===xi(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Ax(m,u+2,y).times(a+""))),s=ca(s,new m(f),u),m.precision=y,t==null?(gt=!0,Je(s,y)):s;s=c,i+=2}}function i_(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=mu(n/st),e.d=[],r=(n+1)%st,n<0&&(r+=st),rcv||e.e<-cv))throw Error($C+n)}else e.s=0,e.e=0,e.d=[0];return e}function Je(e,t,n){var r,i,a,o,s,c,u,d,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=st,i=t,u=f[d=0];else{if(d=Math.ceil((r+1)/st),a=f.length,d>=a)return e;for(u=a=f[d],o=1;a>=10;a/=10)o++;r%=st,i=r-st+o}if(n!==void 0&&(a=Xo(10,o-i-1),s=u/a%10|0,c=t<0||f[d+1]!==void 0||u%a,c=n<4?(s||c)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||c||n==6&&(r>0?i>0?u/Xo(10,o-i):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(a=It(e),f.length=1,t=t-a-1,f[0]=Xo(10,(st-t%st)%st),e.e=mu(-t/st)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,a=1,d--):(f.length=d+1,a=Xo(10,st-r),f[d]=i>0?(u/Xo(10,o-i)%Xo(10,i)|0)*a:0),c)for(;;)if(d==0){(f[0]+=a)==Yt&&(f[0]=1,++e.e);break}else{if(f[d]+=a,f[d]!=Yt)break;f[d--]=0,a=1}for(r=f.length;f[--r]===0;)f.pop();if(gt&&(e.e>cv||e.e<-cv))throw Error($C+It(e));return e}function y3(e,t){var n,r,i,a,o,s,c,u,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),gt?Je(t,p):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),o=u-r,o){for(d=o<0,d?(n=c,o=-o,s=f.length):(n=f,r=u,s=c.length),i=Math.max(Math.ceil(p/st),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=c.length,s=f.length,d=i0;--i)c[s++]=0;for(i=f.length;i>o;){if(c[--i]0?a=a.charAt(0)+"."+a.slice(1)+Ba(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ba(-i-1)+a,n&&(r=n-o)>0&&(a+=Ba(r))):i>=o?(a+=Ba(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Ba(r))):((r=i+1)0&&(i+1===o&&(a+="."),a+=Ba(r))),e.s<0?"-"+a:a}function a_(e,t){if(e.length>t)return e.length=t,!0}function x3(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(bs+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return i_(o,a.toString())}else if(typeof a!="string")throw Error(bs+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,bye.test(a))i_(o,a);else throw Error(bs+a)}if(i.prototype=fe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=x3,i.config=i.set=wye,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(bs+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(bs+n+": "+r);return this}var DC=x3(xye);er=new DC(1);const Qe=DC;function Sye(e){return Oye(e)||Cye(e)||Pye(e)||jye()}function jye(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pye(e,t){if(e){if(typeof e=="string")return f1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f1(e,t)}}function Cye(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Oye(e){if(Array.isArray(e))return f1(e)}function f1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-o,o_(function(){for(var s=arguments.length,c=new Array(s),u=0;ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,a=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function Uye(e){if(Array.isArray(e))return e}function P3(e){var t=gf(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function C3(e,t,n){if(e.lte(0))return new Qe(0);var r=xy.getDigitCount(e.toNumber()),i=new Qe(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new Qe(Math.ceil(a.div(o).toNumber())).add(n).mul(o),c=s.mul(i);return t?c:new Qe(Math.ceil(c))}function zye(e,t,n){var r=1,i=new Qe(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Qe(10).pow(xy.getDigitCount(e)-1),i=new Qe(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Qe(Math.floor(e)))}else e===0?i=new Qe(Math.floor((t-1)/2)):n||(i=new Qe(Math.floor(e)));var o=Math.floor((t-1)/2),s=Tye(Nye(function(c){return i.add(new Qe(c-o).mul(r)).toNumber()}),h1);return s(0,t)}function O3(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Qe(0),tickMin:new Qe(0),tickMax:new Qe(0)};var a=C3(new Qe(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Qe(0):(o=new Qe(e).add(t).div(2),o=o.sub(new Qe(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new Qe(t).sub(o).div(a).toNumber()),u=s+c+1;return u>n?O3(e,t,n,r,i+1):(u0?c+(n-u):c,s=t>0?s:s+(n-u)),{step:a,tickMin:o.sub(new Qe(s).mul(a)),tickMax:o.add(new Qe(c).mul(a))})}function Vye(e){var t=gf(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=P3([n,r]),c=gf(s,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(m1(h1(0,i-1).map(function(){return 1/0}))):[].concat(m1(h1(0,i-1).map(function(){return-1/0})),[d]);return n>r?p1(f):f}if(u===d)return zye(u,i,a);var h=O3(u,d,o,a),p=h.step,v=h.tickMin,m=h.tickMax,y=xy.rangeStep(v,m.add(new Qe(.1).mul(p)),p);return n>r?p1(y):y}function Wye(e,t){var n=gf(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=P3([r,i]),s=gf(o,2),c=s[0],u=s[1];if(c===-1/0||u===1/0)return[r,i];if(c===u)return[c];var d=Math.max(t,2),f=C3(new Qe(u).sub(c).div(d-1),a,0),h=[].concat(m1(xy.rangeStep(new Qe(c),new Qe(u).sub(new Qe(.99).mul(f)),f)),[u]);return r>i?p1(h):h}var Hye=S3(Vye),Kye=S3(Wye),qye="Invariant failed";function Ms(e,t){throw new Error(qye)}var Gye=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Sc(e){"@babel/helpers - typeof";return Sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sc(e)}function uv(){return uv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function t0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function n0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r0e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Jr(f-d)!==Jr(h-f)){var v=[];if(Jr(h-f)===Jr(c[1]-c[0])){p=h;var m=f+c[1]-c[0];v[0]=Math.min(m,(m+d)/2),v[1]=Math.max(m,(m+d)/2)}else{p=d;var y=h+c[1]-c[0];v[0]=Math.min(f,(y+f)/2),v[1]=Math.max(f,(y+f)/2)}var b=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>b[0]&&t<=b[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var x=Math.min(d,h),w=Math.max(d,h);if(t>(x+f)/2&&t<=(w+f)/2){o=i[u].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){o=r[P].index;break}return o},IC=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Ot(Ot({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:s;break;default:c=s;break}return c},b0e=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),c=0,u=s.length;c=0});if(b&&b.length){var x=b[0].type.defaultProps,w=x!==void 0?Ot(Ot({},x),b[0].props):b[0].props,P=w.barSize,S=w[y];o[S]||(o[S]=[]);var j=De(P)?n:P;o[S].push({item:b[0],stackList:b.slice(1),barSize:De(j)?void 0:_s(j,r,0)})}}return o},w0e=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,c=o.length;if(c<1)return null;var u=_s(n,i,0,!0),d,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=i/c,v=o.reduce(function(P,S){return P+S.barSize||0},0);v+=(c-1)*u,v>=i&&(v-=(c-1)*u,u=0),v>=i&&p>0&&(h=!0,p*=.9,v=c*p);var m=(i-v)/2>>0,y={offset:m-u,size:0};d=o.reduce(function(P,S){var j={item:S.item,position:{offset:y.offset+y.size+u,size:h?p:S.barSize}},C=[].concat(c_(P),[j]);return y=C[C.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(O){C.push({item:O,position:y})}),C},f)}else{var b=_s(r,i,0,!0);i-2*b-(c-1)*u<=0&&(u=0);var x=(i-2*b-(c-1)*u)/c;x>1&&(x>>=0);var w=s===+s?Math.min(x,s):x;d=o.reduce(function(P,S,j){var C=[].concat(c_(P),[{item:S.item,position:{offset:b+(x+u)*j+(x-w)/2,size:w}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(O){C.push({item:O,position:C[C.length-1].position})}),C},f)}return d},S0e=function(t,n,r,i){var a=r.children,o=r.width,s=r.margin,c=o-(s.left||0)-(s.right||0),u=T3({children:a,legendWidth:c});if(u){var d=i||{},f=d.width,h=d.height,p=u.align,v=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&p!=="center"&&oe(t[p]))return Ot(Ot({},t),{},Ll({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&v!=="middle"&&oe(t[v]))return Ot(Ot({},t),{},Ll({},v,t[v]+(h||0)))}return t},j0e=function(t,n,r){return De(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},_3=function(t,n,r,i,a){var o=n.props.children,s=Er(o,mh).filter(function(u){return j0e(i,a,u.props.direction)});if(s&&s.length){var c=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=_n(d,r);if(De(f))return u;var h=Array.isArray(f)?[gy(f),to(f)]:[f,f],p=c.reduce(function(v,m){var y=_n(d,m,0),b=h[0]-Math.abs(Array.isArray(y)?y[0]:y),x=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(b,v[0]),Math.max(x,v[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},P0e=function(t,n,r,i,a){var o=n.map(function(s){return _3(t,s,r,a,i)}).filter(function(s){return!De(s)});return o&&o.length?o.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]):null},k3=function(t,n,r,i,a){var o=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&_3(t,c,u,i)||xd(t,u,r,a)});if(r==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(c,u){for(var d=0,f=u.length;d=2?Jr(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+u,value:f,offset:u}});return d.filter(function(f){return!su(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+u,value:f,index:h,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,h){return{coordinate:i(f)+u,value:a?a[f]:f,index:h,offset:u}})},Ex=new WeakMap,lp=function(t,n){if(typeof n!="function")return t;Ex.has(t)||Ex.set(t,new WeakMap);var r=Ex.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},C0e=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:df(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:av(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:yd(),realScaleType:"point"}:a==="category"?{scale:df(),realScaleType:"band"}:{scale:av(),realScaleType:"linear"};if(uh(i)){var c="scale".concat(iy(i));return{scale:(r_[c]||yd)(),realScaleType:r_[c]?c:"point"}}return Re(i)?{scale:i}:{scale:yd(),realScaleType:"point"}},d_=1e-4,O0e=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-d_,o=Math.max(i[0],i[1])+d_,s=t(n[0]),c=t(n[r-1]);(so||co)&&t.domain([n[0],n[r-1]])}},A0e=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][r][0]=a,t[s][r][1]=a+c,a=t[s][r][1]):(t[s][r][0]=o,t[s][r][1]=o+c,o=t[s][r][1])}},T0e=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[o][r][0]=a,t[o][r][1]=a+s,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},_0e={sign:N0e,expand:Hae,none:hc,silhouette:Kae,wiggle:qae,positive:T0e},k0e=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),a=_0e[r],o=Wae().keys(i).value(function(s,c){return+_n(s,c,0)}).order(Vw).offset(a);return o(t)},M0e=function(t,n,r,i,a,o){if(!t)return null;var s=o?n.reverse():n,c={},u=s.reduce(function(f,h){var p,v=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Ot(Ot({},h.type.defaultProps),h.props):h.props,m=v.stackId,y=v.hide;if(y)return f;var b=v[r],x=f[b]||{hasStack:!1,stackGroups:{}};if(Vt(m)){var w=x.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};w.items.push(h),x.hasStack=!0,x.stackGroups[m]=w}else x.stackGroups[lu("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return Ot(Ot({},f),{},Ll({},b,x))},c),d={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,y){var b=p.stackGroups[y];return Ot(Ot({},m),{},Ll({},y,{numericAxisId:r,cateAxisId:i,items:b.items,stackedData:k0e(t,b.items,a)}))},v)}return Ot(Ot({},f),{},Ll({},h,p))},d)},R0e=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=Hye(u,a,s);return t.domain([gy(d),to(d)]),{niceTicks:d}}if(a&&i==="number"){var f=t.domain(),h=Kye(f,a,s);return{niceTicks:h}}return null};function fv(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!De(i[t.dataKey])){var s=Dm(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var c=_n(i,De(o)?t.dataKey:o);return De(c)?null:t.scale(c)}var f_=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var c=_n(o,n.dataKey,n.domain[s]);return De(c)?null:n.scale(c)-a/2+i},$0e=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},D0e=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Ot(Ot({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Vt(a)){var o=n[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},I0e=function(t){return t.reduce(function(n,r){return[gy(r.concat([n[0]]).filter(oe)),to(r.concat([n[1]]).filter(oe))]},[1/0,-1/0])},R3=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,c=s.reduce(function(u,d){var f=I0e(d.slice(n,r+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},h_=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,p_=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,x1=function(t,n,r){if(Re(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(oe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(h_.test(t[0])){var a=+h_.exec(t[0])[1];i[0]=n[0]-a}else Re(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(oe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(p_.test(t[1])){var o=+p_.exec(t[1])[1];i[1]=n[1]+o}else Re(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},hv=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=dC(n,function(f){return f.coordinate}),o=1/0,s=1,c=a.length;so&&(u=2*Math.PI-u),{radius:s,angle:U0e(u),angleInRadian:u}},W0e=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},H0e=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},y_=function(t,n){var r=t.x,i=t.y,a=V0e({x:r,y:i},n),o=a.radius,s=a.angle,c=n.innerRadius,u=n.outerRadius;if(ou)return!1;if(o===0)return!0;var d=W0e(n),f=d.startAngle,h=d.endAngle,p=s,v;if(f<=h){for(;p>h;)p-=360;for(;p=f&&p<=h}else{for(;p>f;)p-=360;for(;p=h&&p<=f}return v?g_(g_({},n),{},{radius:o,angle:H0e(p,n)}):null};function wf(e){"@babel/helpers - typeof";return wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wf(e)}var K0e=["offset"];function q0e(e){return Q0e(e)||X0e(e)||Y0e(e)||G0e()}function G0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y0e(e,t){if(e){if(typeof e=="string")return b1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b1(e,t)}}function X0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Q0e(e){if(Array.isArray(e))return b1(e)}function b1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function J0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function x_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t=0?1:-1,w,P;i==="insideStart"?(w=p+x*o,P=m):i==="insideEnd"?(w=v-x*o,P=!m):i==="end"&&(w=v+x*o,P=m),P=b<=0?P:!P;var S=sn(u,d,y,w),j=sn(u,d,y,w+(P?1:-1)*359),C="M".concat(S.x,",").concat(S.y,` - A`).concat(y,",").concat(y,",0,1,").concat(P?0:1,`, - `).concat(j.x,",").concat(j.y),O=De(t.id)?lu("recharts-radial-line-"):t.id;return T.createElement("text",Sf({},r,{dominantBaseline:"central",className:Le("recharts-radial-bar-label",s)}),T.createElement("defs",null,T.createElement("path",{id:O,d:C})),T.createElement("textPath",{xlinkHref:"#".concat(O)},n))},oxe=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,s=a.cy,c=a.innerRadius,u=a.outerRadius,d=a.startAngle,f=a.endAngle,h=(d+f)/2;if(i==="outside"){var p=sn(o,s,u+r,h),v=p.x,m=p.y;return{x:v,y:m,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(c+u)/2,b=sn(o,s,y,h),x=b.x,w=b.y;return{x,y:w,textAnchor:"middle",verticalAnchor:"middle"}},sxe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,s=o.x,c=o.y,u=o.width,d=o.height,f=d>=0?1:-1,h=f*i,p=f>0?"end":"start",v=f>0?"start":"end",m=u>=0?1:-1,y=m*i,b=m>0?"end":"start",x=m>0?"start":"end";if(a==="top"){var w={x:s+u/2,y:c-f*i,textAnchor:"middle",verticalAnchor:p};return Lt(Lt({},w),r?{height:Math.max(c-r.y,0),width:u}:{})}if(a==="bottom"){var P={x:s+u/2,y:c+d+h,textAnchor:"middle",verticalAnchor:v};return Lt(Lt({},P),r?{height:Math.max(r.y+r.height-(c+d),0),width:u}:{})}if(a==="left"){var S={x:s-y,y:c+d/2,textAnchor:b,verticalAnchor:"middle"};return Lt(Lt({},S),r?{width:Math.max(S.x-r.x,0),height:d}:{})}if(a==="right"){var j={x:s+u+y,y:c+d/2,textAnchor:x,verticalAnchor:"middle"};return Lt(Lt({},j),r?{width:Math.max(r.x+r.width-j.x,0),height:d}:{})}var C=r?{width:u,height:d}:{};return a==="insideLeft"?Lt({x:s+y,y:c+d/2,textAnchor:x,verticalAnchor:"middle"},C):a==="insideRight"?Lt({x:s+u-y,y:c+d/2,textAnchor:b,verticalAnchor:"middle"},C):a==="insideTop"?Lt({x:s+u/2,y:c+h,textAnchor:"middle",verticalAnchor:v},C):a==="insideBottom"?Lt({x:s+u/2,y:c+d-h,textAnchor:"middle",verticalAnchor:p},C):a==="insideTopLeft"?Lt({x:s+y,y:c+h,textAnchor:x,verticalAnchor:v},C):a==="insideTopRight"?Lt({x:s+u-y,y:c+h,textAnchor:b,verticalAnchor:v},C):a==="insideBottomLeft"?Lt({x:s+y,y:c+d-h,textAnchor:x,verticalAnchor:p},C):a==="insideBottomRight"?Lt({x:s+u-y,y:c+d-h,textAnchor:b,verticalAnchor:p},C):ru(a)&&(oe(a.x)||ts(a.x))&&(oe(a.y)||ts(a.y))?Lt({x:s+_s(a.x,u),y:c+_s(a.y,d),textAnchor:"end",verticalAnchor:"end"},C):Lt({x:s+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},C)},lxe=function(t){return"cx"in t&&oe(t.cx)};function xn(e){var t=e.offset,n=t===void 0?5:t,r=Z0e(e,K0e),i=Lt({offset:n},r),a=i.viewBox,o=i.position,s=i.value,c=i.children,u=i.content,d=i.className,f=d===void 0?"":d,h=i.textBreakAll;if(!a||De(s)&&De(c)&&!g.isValidElement(u)&&!Re(u))return null;if(g.isValidElement(u))return g.cloneElement(u,i);var p;if(Re(u)){if(p=g.createElement(u,i),g.isValidElement(p))return p}else p=rxe(i);var v=lxe(a),m=Me(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return axe(i,p,m);var y=v?oxe(i):sxe(i);return T.createElement(Zm,Sf({className:Le("recharts-label",f)},m,y,{breakAll:h}),p)}xn.displayName="Label";var D3=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,v=t.left,m=t.width,y=t.height,b=t.clockWise,x=t.labelViewBox;if(x)return x;if(oe(m)&&oe(y)){if(oe(f)&&oe(h))return{x:f,y:h,width:m,height:y};if(oe(p)&&oe(v))return{x:p,y:v,width:m,height:y}}return oe(f)&&oe(h)?{x:f,y:h,width:0,height:0}:oe(n)&&oe(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:d||c||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},cxe=function(t,n){return t?t===!0?T.createElement(xn,{key:"label-implicit",viewBox:n}):Vt(t)?T.createElement(xn,{key:"label-implicit",viewBox:n,value:t}):g.isValidElement(t)?t.type===xn?g.cloneElement(t,{key:"label-implicit",viewBox:n}):T.createElement(xn,{key:"label-implicit",content:t,viewBox:n}):Re(t)?T.createElement(xn,{key:"label-implicit",content:t,viewBox:n}):ru(t)?T.createElement(xn,Sf({viewBox:n},t,{key:"label-implicit"})):null:null},uxe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=D3(t),o=Er(i,xn).map(function(c,u){return g.cloneElement(c,{viewBox:n||a,key:"label-".concat(u)})});if(!r)return o;var s=cxe(t.label,n||a);return[s].concat(q0e(o))};xn.parseViewBox=D3;xn.renderCallByParent=uxe;function dxe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var fxe=dxe;const hxe=Ze(fxe);function jf(e){"@babel/helpers - typeof";return jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jf(e)}var pxe=["valueAccessor"],mxe=["data","dataKey","clockWise","id","textBreakAll"];function vxe(e){return bxe(e)||xxe(e)||yxe(e)||gxe()}function gxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yxe(e,t){if(e){if(typeof e=="string")return w1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w1(e,t)}}function xxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bxe(e){if(Array.isArray(e))return w1(e)}function w1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Cxe=function(t){return Array.isArray(t.value)?hxe(t.value):t.value};function ua(e){var t=e.valueAccessor,n=t===void 0?Cxe:t,r=S_(e,pxe),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,c=r.textBreakAll,u=S_(r,mxe);return!i||!i.length?null:T.createElement(nt,{className:"recharts-label-list"},i.map(function(d,f){var h=De(a)?n(d,f):_n(d&&d.payload,a),p=De(s)?{}:{id:"".concat(s,"-").concat(f)};return T.createElement(xn,mv({},Me(d,!0),u,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:c,viewBox:xn.parseViewBox(De(o)?d:w_(w_({},d),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}ua.displayName="LabelList";function Oxe(e,t){return e?e===!0?T.createElement(ua,{key:"labelList-implicit",data:t}):T.isValidElement(e)||Re(e)?T.createElement(ua,{key:"labelList-implicit",data:t,content:e}):ru(e)?T.createElement(ua,mv({data:t},e,{key:"labelList-implicit"})):null:null}function Axe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Er(r,ua).map(function(o,s){return g.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var a=Oxe(e.label,t);return[a].concat(vxe(i))}ua.renderCallByParent=Axe;function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}function S1(){return S1=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, - `).concat(f.x,",").concat(f.y,` - `);if(i>0){var p=sn(n,r,i,o),v=sn(n,r,i,u);h+="L ".concat(v.x,",").concat(v.y,` - A `).concat(i,",").concat(i,`,0, - `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`, - `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},kxe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=Jr(d-u),h=cp({cx:n,cy:r,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:c}),p=h.circleTangency,v=h.lineTangency,m=h.theta,y=cp({cx:n,cy:r,radius:a,angle:d,sign:-f,cornerRadius:o,cornerIsExternal:c}),b=y.circleTangency,x=y.lineTangency,w=y.theta,P=c?Math.abs(u-d):Math.abs(u-d)-m-w;if(P<0)return s?"M ".concat(v.x,",").concat(v.y,` - a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 - a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 - `):I3({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d});var S="M ".concat(v.x,",").concat(v.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` - A`).concat(a,",").concat(a,",0,").concat(+(P>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,` - `);if(i>0){var j=cp({cx:n,cy:r,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),C=j.circleTangency,O=j.lineTangency,A=j.theta,E=cp({cx:n,cy:r,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),_=E.circleTangency,N=E.lineTangency,k=E.theta,M=c?Math.abs(u-d):Math.abs(u-d)-A-k;if(M<0&&o===0)return"".concat(S,"L").concat(n,",").concat(r,"Z");S+="L".concat(N.x,",").concat(N.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,` - A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(f>0),",").concat(C.x,",").concat(C.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,"Z")}else S+="L".concat(n,",").concat(r,"Z");return S},Mxe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},L3=function(t){var n=P_(P_({},Mxe),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,d=n.startAngle,f=n.endAngle,h=n.className;if(o0&&Math.abs(d-f)<360?y=kxe({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,v/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):y=I3({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:d,endAngle:f}),T.createElement("path",S1({},Me(n,!0),{className:p,d:y,role:"img"}))};function Cf(e){"@babel/helpers - typeof";return Cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(e)}function j1(){return j1=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Gxe(e,t){return vu(e.getTime(),t.getTime())}function k_(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),a=0,o,s;(o=i.next())&&!o.done;){for(var c=t.entries(),u=!1,d=0;(s=c.next())&&!s.done;){var f=o.value,h=f[0],p=f[1],v=s.value,m=v[0],y=v[1];!u&&!r[d]&&(u=n.equals(h,m,a,d,e,t,n)&&n.equals(p,y,h,m,e,t,n))&&(r[d]=!0),d++}if(!u)return!1;a++}return!0}function Yxe(e,t,n){var r=__(e),i=r.length;if(__(t).length!==i)return!1;for(var a;i-- >0;)if(a=r[i],a===V3&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!z3(t,a)||!n.equals(e[a],t[a],a,a,e,t,n))return!1;return!0}function Uu(e,t,n){var r=N_(e),i=r.length;if(N_(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=r[i],a===V3&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!z3(t,a)||!n.equals(e[a],t[a],a,a,e,t,n)||(o=T_(e,a),s=T_(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Xxe(e,t){return vu(e.valueOf(),t.valueOf())}function Qxe(e,t){return e.source===t.source&&e.flags===t.flags}function M_(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),a,o;(a=i.next())&&!a.done;){for(var s=t.values(),c=!1,u=0;(o=s.next())&&!o.done;)!c&&!r[u]&&(c=n.equals(a.value,o.value,a.value,o.value,e,t,n))&&(r[u]=!0),u++;if(!c)return!1}return!0}function Zxe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var Jxe="[object Arguments]",ebe="[object Boolean]",tbe="[object Date]",nbe="[object Map]",rbe="[object Number]",ibe="[object Object]",abe="[object RegExp]",obe="[object Set]",sbe="[object String]",lbe=Array.isArray,R_=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,$_=Object.assign,cbe=Object.prototype.toString.call.bind(Object.prototype.toString);function ube(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,a=e.arePrimitiveWrappersEqual,o=e.areRegExpsEqual,s=e.areSetsEqual,c=e.areTypedArraysEqual;return function(d,f,h){if(d===f)return!0;if(d==null||f==null||typeof d!="object"||typeof f!="object")return d!==d&&f!==f;var p=d.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(d,f,h);if(lbe(d))return t(d,f,h);if(R_!=null&&R_(d))return c(d,f,h);if(p===Date)return n(d,f,h);if(p===RegExp)return o(d,f,h);if(p===Map)return r(d,f,h);if(p===Set)return s(d,f,h);var v=cbe(d);return v===tbe?n(d,f,h):v===abe?o(d,f,h):v===nbe?r(d,f,h):v===obe?s(d,f,h):v===ibe?typeof d.then!="function"&&typeof f.then!="function"&&i(d,f,h):v===Jxe?i(d,f,h):v===ebe||v===rbe||v===sbe?a(d,f,h):!1}}function dbe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Uu:qxe,areDatesEqual:Gxe,areMapsEqual:r?E_(k_,Uu):k_,areObjectsEqual:r?Uu:Yxe,arePrimitiveWrappersEqual:Xxe,areRegExpsEqual:Qxe,areSetsEqual:r?E_(M_,Uu):M_,areTypedArraysEqual:r?Uu:Zxe};if(n&&(i=$_({},i,n(i))),t){var a=dp(i.areArraysEqual),o=dp(i.areMapsEqual),s=dp(i.areObjectsEqual),c=dp(i.areSetsEqual);i=$_({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:c})}return i}function fbe(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function hbe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,a=e.strict;if(r)return function(c,u){var d=r(),f=d.cache,h=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return n(c,u,{cache:h,equals:i,meta:p,strict:a})};if(t)return function(c,u){return n(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(c,u){return n(c,u,o)}}var pbe=Lo();Lo({strict:!0});Lo({circular:!0});Lo({circular:!0,strict:!0});Lo({createInternalComparator:function(){return vu}});Lo({strict:!0,createInternalComparator:function(){return vu}});Lo({circular:!0,createInternalComparator:function(){return vu}});Lo({circular:!0,createInternalComparator:function(){return vu},strict:!0});function Lo(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=dbe(e),c=ube(s),u=r?r(c):fbe(c);return hbe({circular:n,comparator:c,createState:i,equals:u,strict:o})}function mbe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function D_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):mbe(i)};requestAnimationFrame(r)}function P1(e){"@babel/helpers - typeof";return P1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P1(e)}function vbe(e){return bbe(e)||xbe(e)||ybe(e)||gbe()}function gbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ybe(e,t){if(e){if(typeof e=="string")return I_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I_(e,t)}}function I_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:b<0?0:b},m=function(b){for(var x=b>1?1:b,w=x,P=0;P<8;++P){var S=f(w)-x,j=p(w);if(Math.abs(S-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,c=function(d,f,h){var p=-(d-f)*r,v=h*a,m=h+(p-v)*s/1e3,y=h*s/1e3+d;return Math.abs(y-f)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qbe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Nx(e){return twe(e)||ewe(e)||Jbe(e)||Zbe()}function Zbe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jbe(e,t){if(e){if(typeof e=="string")return N1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N1(e,t)}}function ewe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function twe(e){if(Array.isArray(e))return N1(e)}function N1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yv(e){return yv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yv(e)}var ki=function(e){owe(n,e);var t=swe(n);function n(r,i){var a;nwe(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,c=o.attributeName,u=o.from,d=o.to,f=o.steps,h=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(k1(a)),a.changeStyle=a.changeStyle.bind(k1(a)),!s||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:d}),_1(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof h=="function")return a.state={style:u},_1(a);a.state={style:c?Ju({},c,u):u}}else a.state={style:{}};return a}return iwe(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,c=a.attributeName,u=a.shouldReAnimate,d=a.to,f=a.from,h=this.state.style;if(s){if(!o){var p={style:c?Ju({},c,d):d};this.state&&h&&(c&&h[c]!==d||!c&&h!==d)&&this.setState(p);return}if(!(pbe(i.to,d)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||u?f:i.to;if(this.state&&h){var y={style:c?Ju({},c,m):m};(c&&h[c]!==m||!c&&h!==m)&&this.setState(y)}this.runAnimation(Fr(Fr({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,c=i.duration,u=i.easing,d=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=Gbe(o,s,Ibe(u),c,this.changeStyle),v=function(){a.stopJSAnimation=p()};this.manager.start([h,d,v,c,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,c=i.onAnimationStart,u=o[0],d=u.style,f=u.duration,h=f===void 0?0:f,p=function(m,y,b){if(b===0)return m;var x=y.duration,w=y.easing,P=w===void 0?"ease":w,S=y.style,j=y.properties,C=y.onAnimationEnd,O=b>0?o[b-1]:y,A=j||Object.keys(S);if(typeof P=="function"||P==="spring")return[].concat(Nx(m),[a.runJSAnimation.bind(a,{from:O.style,to:S,duration:x,easing:P}),x]);var E=B_(A,x,P),_=Fr(Fr(Fr({},O.style),S),{},{transition:E});return[].concat(Nx(m),[_,x,C]).filter(Cbe)};return this.manager.start([c].concat(Nx(o.reduce(p,[d,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=wbe());var a=i.begin,o=i.duration,s=i.attributeName,c=i.to,u=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=s?Ju({},s,c):c,y=B_(Object.keys(m),o,u);v.start([d,a,Fr(Fr({},m),{},{transition:y}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=Xbe(i,Ybe),u=g.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!s||u===0||o<=0)return a;var f=function(p){var v=p.props,m=v.style,y=m===void 0?{}:m,b=v.className,x=g.cloneElement(p,Fr(Fr({},c),{},{style:Fr(Fr({},y),d),className:b}));return x};return u===1?f(g.Children.only(a)):T.createElement("div",null,g.Children.map(a,function(h){return f(h)}))}}]),n}(g.PureComponent);ki.displayName="Animate";ki.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ki.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function xv(){return xv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,c=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,d;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,p=4;ho?o:a[h];d="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(n)),d+="L ".concat(t+r-c*f[1],",").concat(n),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, - `).concat(t+r,",").concat(n+s*f[1])),d+="L ".concat(t+r,",").concat(n+i-s*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, - `).concat(t+r-c*f[2],",").concat(n+i)),d+="L ".concat(t+c*f[3],",").concat(n+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, - `).concat(t,",").concat(n+i-s*f[3])),d+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);d="M ".concat(t,",").concat(n+s*v,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+c*v,",").concat(n,` - L `).concat(t+r-c*v,",").concat(n,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*v,` - L `).concat(t+r,",").concat(n+i-s*v,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+r-c*v,",").concat(n+i,` - L `).concat(t+c*v,",").concat(n+i,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(n+i-s*v," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},gwe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,c=n.height;if(Math.abs(s)>0&&Math.abs(c)>0){var u=Math.min(a,a+s),d=Math.max(a,a+s),f=Math.min(o,o+c),h=Math.max(o,o+c);return r>=u&&r<=d&&i>=f&&i<=h}return!1},ywe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},LC=function(t){var n=G_(G_({},ywe),t),r=g.useRef(),i=g.useState(-1),a=cwe(i,2),o=a[0],s=a[1];g.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var c=n.x,u=n.y,d=n.width,f=n.height,h=n.radius,p=n.className,v=n.animationEasing,m=n.animationDuration,y=n.animationBegin,b=n.isAnimationActive,x=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var w=Le("recharts-rectangle",p);return x?T.createElement(ki,{canBegin:o>0,from:{width:d,height:f,x:c,y:u},to:{width:d,height:f,x:c,y:u},duration:m,animationEasing:v,isActive:x},function(P){var S=P.width,j=P.height,C=P.x,O=P.y;return T.createElement(ki,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:b,easing:v},T.createElement("path",xv({},Me(n,!0),{className:w,d:Y_(C,O,S,j,h),ref:r})))}):T.createElement("path",xv({},Me(n,!0),{className:w,d:Y_(c,u,d,f,h)}))};function M1(){return M1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Owe=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},Awe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,v=t.className,m=Pwe(t,xwe),y=bwe({x:r,y:a,top:s,left:u,width:f,height:p},m);return!oe(r)||!oe(a)||!oe(f)||!oe(p)||!oe(s)||!oe(u)?null:T.createElement("path",R1({},Me(y,!0),{className:Le("recharts-cross",v),d:Owe(r,a,f,p,s,u)}))},Ewe=c5,Nwe=Ewe(Object.getPrototypeOf,Object),Twe=Nwe,_we=Oa,kwe=Twe,Mwe=Aa,Rwe="[object Object]",$we=Function.prototype,Dwe=Object.prototype,X3=$we.toString,Iwe=Dwe.hasOwnProperty,Lwe=X3.call(Object);function Fwe(e){if(!Mwe(e)||_we(e)!=Rwe)return!1;var t=kwe(e);if(t===null)return!0;var n=Iwe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&X3.call(n)==Lwe}var Bwe=Fwe;const Uwe=Ze(Bwe);var zwe=Oa,Vwe=Aa,Wwe="[object Boolean]";function Hwe(e){return e===!0||e===!1||Vwe(e)&&zwe(e)==Wwe}var Kwe=Hwe;const qwe=Ze(Kwe);function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}function bv(){return bv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:h,x:c,y:u},duration:m,animationEasing:v,isActive:b},function(w){var P=w.upperWidth,S=w.lowerWidth,j=w.height,C=w.x,O=w.y;return T.createElement(ki,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:v},T.createElement("path",bv({},Me(n,!0),{className:x,d:ek(C,O,P,S,j),ref:r})))}):T.createElement("g",null,T.createElement("path",bv({},Me(n,!0),{className:x,d:ek(c,u,d,f,h)})))},i1e=["option","shapeType","propTransformer","activeClassName","isActive"];function _f(e){"@babel/helpers - typeof";return _f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_f(e)}function a1e(e,t){if(e==null)return{};var n=o1e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function o1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wv(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),qn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),qn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),qn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),qn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),qn(r,"handleSlideDragStart",function(i){var a=lk(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return H1e(t,e),U1e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,c=s.gap,u=s.data,d=u.length-1,f=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(o,f),v=t.getIndexInRange(o,h);return{startIndex:p-p%c,endIndex:v===d?d:v-v%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,c=_n(a[r],s,r);return Re(o)?o(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,h=c.startIndex,p=c.endIndex,v=c.onChange,m=r.pageX-a;m>0?m=Math.min(m,u+d-f-s,u+d-f-o):m<0&&(m=Math.max(m,u-o,u-s));var y=this.getIndex({startX:o+m,endX:s+m});(y.startIndex!==h||y.endIndex!==p)&&v&&v(y),this.setState({startX:o+m,endX:s+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=lk(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,c=i.startX,u=this.state[o],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,v=d.onChange,m=d.gap,y=d.data,b={startX:this.state.startX,endX:this.state.endX},x=r.pageX-a;x>0?x=Math.min(x,f+h-p-u):x<0&&(x=Math.max(x,f-u)),b[o]=u+x;var w=this.getIndex(b),P=w.startIndex,S=w.endIndex,j=function(){var O=y.length-1;return o==="startX"&&(s>c?P%m===0:S%m===0)||sc?S%m===0:P%m===0)||s>c&&S===O};this.setState(qn(qn({},o,u+x),"brushMoveStartX",r.pageX),function(){v&&j()&&v(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,c=o.startX,u=o.endX,d=this.state[i],f=s.indexOf(d);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=u||i==="endX"&&p<=c||this.setState(qn({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,c=r.fill,u=r.stroke;return T.createElement("rect",{stroke:u,fill:c,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,c=r.data,u=r.children,d=r.padding,f=g.Children.only(u);return f?T.cloneElement(f,{x:i,y:a,width:o,height:s,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,s=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,h=c.traveller,p=c.ariaLabel,v=c.data,m=c.startIndex,y=c.endIndex,b=Math.max(r,this.props.x),x=_x(_x({},Me(this.props,!1)),{},{x:b,y:u,width:d,height:f}),w=p||"Min value: ".concat((a=v[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[y])===null||o===void 0?void 0:o.name);return T.createElement(nt,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),s.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,c=a.stroke,u=a.travellerWidth,d=Math.min(r,i)+u,f=Math.max(Math.abs(i-r)-u,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:o,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,c=r.travellerWidth,u=r.stroke,d=this.state,f=d.startX,h=d.endX,p=5,v={pointerEvents:"none",fill:u};return T.createElement(nt,{className:"recharts-brush-texts"},T.createElement(Zm,jv({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:o+s/2},v),this.getTextOfTick(i)),T.createElement(Zm,jv({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+c+p,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,c=r.y,u=r.width,d=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,v=h.endX,m=h.isTextActive,y=h.isSlideMoving,b=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!oe(s)||!oe(c)||!oe(u)||!oe(d)||u<=0||d<=0)return null;var w=Le("recharts-brush",a),P=T.Children.count(o)===1,S=F1e("userSelect","none");return T.createElement(nt,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(m||y||b||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,c=r.stroke,u=Math.floor(a+s/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:i,y:a,width:o,height:s,fill:c,stroke:"none"}),T.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return T.isValidElement(r)?a=T.cloneElement(r,i):Re(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,c=r.travellerWidth,u=r.updateId,d=r.startIndex,f=r.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return _x({prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?q1e({data:a,width:o,x:s,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([s,s+o-c]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var c=Math.floor((o+s)/2);r[c]>i?s=c:o=c}return i>=r[s]?s:o}}])}(g.PureComponent);qn(Cc,"displayName","Brush");qn(Cc,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var G1e=uC;function Y1e(e,t){var n;return G1e(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var X1e=Y1e,Q1e=t5,Z1e=fu,J1e=X1e,eSe=Hn,tSe=uy;function nSe(e,t,n){var r=eSe(e)?Q1e:J1e;return n&&tSe(e,t,n)&&(t=void 0),r(e,Z1e(t))}var rSe=nSe;const iSe=Ze(rSe);var Ni=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},ck=S5;function aSe(e,t,n){t=="__proto__"&&ck?ck(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var oSe=aSe,sSe=oSe,lSe=b5,cSe=fu;function uSe(e,t){var n={};return t=cSe(t),lSe(e,function(r,i,a){sSe(n,i,t(r,i,a))}),n}var dSe=uSe;const fSe=Ze(dSe);function hSe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _Se(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kSe(e,t){var n=e.x,r=e.y,i=TSe(e,OSe),a="".concat(n),o=parseInt(a,10),s="".concat(r),c=parseInt(s,10),u="".concat(t.height||i.height),d=parseInt(u,10),f="".concat(t.width||i.width),h=parseInt(f,10);return zu(zu(zu(zu(zu({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function dk(e){return T.createElement(h1e,D1({shapeType:"rectangle",propTransformer:kSe,activeClassName:"recharts-active-bar"},e))}var MSe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=typeof r=="number";return a?t(r,i):(a||Ms(),n)}},RSe=["value","background"],eB;function Oc(e){"@babel/helpers - typeof";return Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oc(e)}function $Se(e,t){if(e==null)return{};var n=DSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Cv(){return Cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs($)0&&Math.abs(M)0&&(k=Math.min((Z||0)-(M[ae-1]||0),k))}),Number.isFinite(k)){var $=k/N,D=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(C=$*D/2),m.padding==="no-gap"){var B=_s(t.barCategoryGap,$*D),I=$*D/2;C=I-B-(I-B)/D*B}}}i==="xAxis"?O=[r.left+(w.left||0)+(C||0),r.left+r.width-(w.right||0)-(C||0)]:i==="yAxis"?O=c==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(C||0),r.top+r.height-(w.bottom||0)-(C||0)]:O=m.range,S&&(O=[O[1],O[0]]);var R=C0e(m,a,h),F=R.scale,z=R.realScaleType;F.domain(b).range(O),O0e(F);var U=R0e(F,qr(qr({},m),{},{realScaleType:z}));i==="xAxis"?(_=y==="top"&&!P||y==="bottom"&&P,A=r.left,E=f[j]-_*m.height):i==="yAxis"&&(_=y==="left"&&!P||y==="right"&&P,A=f[j]-_*m.width,E=r.top);var W=qr(qr(qr({},m),U),{},{realScaleType:z,x:A,y:E,scale:F,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return W.bandSize=hv(W,U),!m.hide&&i==="xAxis"?f[j]+=(_?-1:1)*W.height:m.hide||(f[j]+=(_?-1:1)*W.width),qr(qr({},p),{},jy({},v,W))},{})},aB=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},qSe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return aB({x:n,y:r},{x:i,y:a})},oB=function(){function e(t){WSe(this,e),this.scale=t}return HSe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();jy(oB,"EPS",1e-4);var FC=function(t){var n=Object.keys(t).reduce(function(r,i){return qr(qr({},r),{},jy({},i,oB.create(t[i])))},{});return qr(qr({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return fSe(i,function(c,u){return n[u].apply(c,{bandAware:o,position:s})})},isInRange:function(i){return CSe(i,function(a,o){return n[o].isInRange(a)})}})};function GSe(e){return(e%180+180)%180}var YSe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=GSe(i),o=a*Math.PI/180,s=Math.atan(r/n),c=o>s&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function Dje(e,t){return jB(e,t+1)}function Ije(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,u=1,d=o,f=function(){var v=r==null?void 0:r[c];if(v===void 0)return{v:jB(r,u)};var m=c,y,b=function(){return y===void 0&&(y=n(v,m)),y},x=v.coordinate,w=c===0||Tv(e,x,b,d,s);w||(c=0,d=o,u+=1),w&&(d=x+e*(b()/2+i),c+=u)},h;u<=a.length;)if(h=f(),h)return h.v;return[]}function Df(e){"@babel/helpers - typeof";return Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(e)}function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t0?p.coordinate-y*e:p.coordinate})}else a[h]=p=vn(vn({},p),{},{tickCoord:p.coordinate});var b=Tv(e,p.tickCoord,m,s,c);b&&(c=p.tickCoord-e*(m()/2+i),a[h]=vn(vn({},p),{},{isShow:!0}))},d=o-1;d>=0;d--)u(d);return a}function zje(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,u=t.end;if(a){var d=r[s-1],f=n(d,s-1),h=e*(d.coordinate+e*f/2-u);o[s-1]=d=vn(vn({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=Tv(e,d.tickCoord,function(){return f},c,u);p&&(u=d.tickCoord-e*(f/2+i),o[s-1]=vn(vn({},d),{},{isShow:!0}))}for(var v=a?s-1:s,m=function(x){var w=o[x],P,S=function(){return P===void 0&&(P=n(w,x)),P};if(x===0){var j=e*(w.coordinate-e*S()/2-c);o[x]=w=vn(vn({},w),{},{tickCoord:j<0?w.coordinate-j*e:w.coordinate})}else o[x]=w=vn(vn({},w),{},{tickCoord:w.coordinate});var C=Tv(e,w.tickCoord,S,c,u);C&&(c=w.tickCoord+e*(S()/2+i),o[x]=vn(vn({},w),{},{isShow:!0}))},y=0;y=2?Jr(i[1].coordinate-i[0].coordinate):1,b=$je(a,y,p);return c==="equidistantPreserveStart"?Ije(y,b,m,i,o):(c==="preserveStart"||c==="preserveStartEnd"?h=zje(y,b,m,i,o,c==="preserveStartEnd"):h=Uje(y,b,m,i,o),h.filter(function(x){return x.isShow}))}var Wje=["viewBox"],Hje=["viewBox"],Kje=["ticks"];function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Gje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ok(e,t){for(var n=0;n0?c(this.props):c(p)),o<=0||s<=0||!v||!v.length?null:T.createElement(nt,{className:Le("recharts-cartesian-axis",u),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),xn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o;return T.isValidElement(r)?o=T.cloneElement(r,i):Re(r)?o=r(i):o=T.createElement(Zm,Sl({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(g.Component);zC(Ey,"displayName","CartesianAxis");zC(Ey,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var tPe=["type","layout","connectNulls","ref"],nPe=["key"];function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function Ak(e,t){if(e==null)return{};var n=rPe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wd(){return wd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nf){p=[].concat(tl(c.slice(0,v)),[f-m]);break}var y=p.length%2===0?[0,h]:[h];return[].concat(tl(t.repeat(c,d)),tl(p),y).map(function(b){return"".concat(b,"px")}).join(", ")}),Gr(n,"id",lu("recharts-line-")),Gr(n,"pathRef",function(o){n.mainCurve=o}),Gr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Gr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return hPe(t,e),cPe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,c=a.yAxis,u=a.layout,d=a.children,f=Er(d,mh);if(!f)return null;var h=function(m,y){return{x:m.x,y:m.y,value:m.value,errorVal:_n(m.payload,y)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return T.createElement(nt,p,f.map(function(v){return T.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,c=s.dot,u=s.points,d=s.dataKey,f=Me(this.props,!1),h=Me(c,!0),p=u.map(function(m,y){var b=Kn(Kn(Kn({key:"dot-".concat(y),r:3},f),h),{},{value:m.value,dataKey:d,cx:m.x,cy:m.y,index:y,payload:m.payload});return t.renderDotItem(c,b)}),v={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return T.createElement(nt,wd({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(r,i,a,o){var s=this.props,c=s.type,u=s.layout,d=s.connectNulls;s.ref;var f=Ak(s,tPe),h=Kn(Kn(Kn({},Me(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:r},o),{},{type:c,layout:u,connectNulls:d});return T.createElement(Fl,wd({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var a=this,o=this.props,s=o.points,c=o.strokeDasharray,u=o.isAnimationActive,d=o.animationBegin,f=o.animationDuration,h=o.animationEasing,p=o.animationId,v=o.animateNewValues,m=o.width,y=o.height,b=this.state,x=b.prevPoints,w=b.totalLength;return T.createElement(ki,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var S=P.t;if(x){var j=x.length/s.length,C=s.map(function(N,k){var M=Math.floor(k*j);if(x[M]){var $=x[M],D=on($.x,N.x),B=on($.y,N.y);return Kn(Kn({},N),{},{x:D(S),y:B(S)})}if(v){var I=on(m*2,N.x),R=on(y/2,N.y);return Kn(Kn({},N),{},{x:I(S),y:R(S)})}return Kn(Kn({},N),{},{x:N.x,y:N.y})});return a.renderCurveStatically(C,r,i)}var O=on(0,w),A=O(S),E;if(c){var _="".concat(c).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});E=a.getStrokeDasharray(A,w,_)}else E=a.generateSimpleStrokeDasharray(w,A);return a.renderCurveStatically(s,r,i,{strokeDasharray:E})})}},{key:"renderCurve",value:function(r,i){var a=this.props,o=a.points,s=a.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return s&&o&&o.length&&(!u&&d>0||!wc(u,o))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(o,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,s=i.points,c=i.className,u=i.xAxis,d=i.yAxis,f=i.top,h=i.left,p=i.width,v=i.height,m=i.isAnimationActive,y=i.id;if(a||!s||!s.length)return null;var b=this.state.isAnimationFinished,x=s.length===1,w=Le("recharts-line",c),P=u&&u.allowDataOverflow,S=d&&d.allowDataOverflow,j=P||S,C=De(y)?this.id:y,O=(r=Me(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=O.r,E=A===void 0?3:A,_=O.strokeWidth,N=_===void 0?2:_,k=OF(o)?o:{},M=k.clipDot,$=M===void 0?!0:M,D=E*2+N;return T.createElement(nt,{className:w},P||S?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(C)},T.createElement("rect",{x:P?h:h-p/2,y:S?f:f-v/2,width:P?p:p*2,height:S?v:v*2})),!$&&T.createElement("clipPath",{id:"clipPath-dots-".concat(C)},T.createElement("rect",{x:h-D/2,y:f-D/2,width:p+D,height:v+D}))):null,!x&&this.renderCurve(j,C),this.renderErrorBar(j,C),(x||o)&&this.renderDots(j,$,C),(!m||b)&&ua.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var a=r.length%2!==0?[].concat(tl(r),[0]):r,o=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function as(){return as=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!wc(d,o)||!wc(f,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,s,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,s=i.points,c=i.className,u=i.top,d=i.left,f=i.xAxis,h=i.yAxis,p=i.width,v=i.height,m=i.isAnimationActive,y=i.id;if(a||!s||!s.length)return null;var b=this.state.isAnimationFinished,x=s.length===1,w=Le("recharts-area",c),P=f&&f.allowDataOverflow,S=h&&h.allowDataOverflow,j=P||S,C=De(y)?this.id:y,O=(r=Me(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=O.r,E=A===void 0?3:A,_=O.strokeWidth,N=_===void 0?2:_,k=OF(o)?o:{},M=k.clipDot,$=M===void 0?!0:M,D=E*2+N;return T.createElement(nt,{className:w},P||S?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(C)},T.createElement("rect",{x:P?d:d-p/2,y:S?u:u-v/2,width:P?p:p*2,height:S?v:v*2})),!$&&T.createElement("clipPath",{id:"clipPath-dots-".concat(C)},T.createElement("rect",{x:d-D/2,y:u-D/2,width:p+D,height:v+D}))):null,x?null:this.renderArea(j,C),(o||x)&&this.renderDots(j,$,C),(!m||b)&&ua.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(g.PureComponent);EB=Fo;bi(Fo,"displayName","Area");bi(Fo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ai.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});bi(Fo,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(oe(s)&&typeof s=="number")return s;var c=i==="horizontal"?r:n,u=c.scale.domain();if(c.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});bi(Fo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,v=u&&u.length,m=EB.getBaseValue(t,n,r,i),y=p==="horizontal",b=!1,x=f.map(function(P,S){var j;v?j=u[d+S]:(j=_n(P,c),Array.isArray(j)?b=!0:j=[m,j]);var C=j[1]==null||v&&_n(P,c)==null;return y?{x:fv({axis:r,ticks:a,bandSize:s,entry:P,index:S}),y:C?null:i.scale(j[1]),value:j,payload:P}:{x:C?null:r.scale(j[1]),y:fv({axis:i,ticks:o,bandSize:s,entry:P,index:S}),value:j,payload:P}}),w;return v||b?w=x.map(function(P){var S=Array.isArray(P.value)?P.value[0]:null;return y?{x:P.x,y:S!=null&&P.y!=null?i.scale(S):null}:{x:S!=null?r.scale(S):null,y:P.y}}):w=y?i.scale(m):r.scale(m),Ia({points:x,baseLine:w,layout:p,isRange:b},h)});bi(Fo,"renderDotItem",function(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(Re(e))n=e(t);else{var r=Le("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=NB(t,vPe);n=T.createElement(by,as({},a,{key:i,className:r}))}return n});function Rc(e){"@babel/helpers - typeof";return Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rc(e)}function CPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OPe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fCe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pCe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?o:t&&t.length&&oe(i)&&oe(a)?t.slice(i,a+1):[]};function HB(e){return e==="number"?[0,"auto"]:void 0}var nS=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Ny(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?s:f;h=Dm(p,o.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Ic(c),[$3(u,h)]):c},[])},Ik=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=OCe(a,r),s=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=x0e(o,s,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,h=nS(t,n,d,f),p=ACe(r,s,d,a);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},ECe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=M3(d,a);return r.reduce(function(v,m){var y,b=m.type.defaultProps!==void 0?G(G({},m.type.defaultProps),m.props):m.props,x=b.type,w=b.dataKey,P=b.allowDataOverflow,S=b.allowDuplicatedCategory,j=b.scale,C=b.ticks,O=b.includeHidden,A=b[o];if(v[A])return v;var E=Ny(t.data,{graphicalItems:i.filter(function(U){var W,Z=o in U.props?U.props[o]:(W=U.type.defaultProps)===null||W===void 0?void 0:W[o];return Z===A}),dataStartIndex:c,dataEndIndex:u}),_=E.length,N,k,M;eCe(b.domain,P,x)&&(N=x1(b.domain,null,P),p&&(x==="number"||j!=="auto")&&(M=xd(E,w,"category")));var $=HB(x);if(!N||N.length===0){var D,B=(D=b.domain)!==null&&D!==void 0?D:$;if(w){if(N=xd(E,w,x),x==="category"&&p){var I=sie(N);S&&I?(k=N,N=Sv(0,_)):S||(N=m_(B,N,m).reduce(function(U,W){return U.indexOf(W)>=0?U:[].concat(Ic(U),[W])},[]))}else if(x==="category")S?N=N.filter(function(U){return U!==""&&!De(U)}):N=m_(B,N,m).reduce(function(U,W){return U.indexOf(W)>=0||W===""||De(W)?U:[].concat(Ic(U),[W])},[]);else if(x==="number"){var R=P0e(E,i.filter(function(U){var W,Z,ae=o in U.props?U.props[o]:(W=U.type.defaultProps)===null||W===void 0?void 0:W[o],ee="hide"in U.props?U.props.hide:(Z=U.type.defaultProps)===null||Z===void 0?void 0:Z.hide;return ae===A&&(O||!ee)}),w,a,d);R&&(N=R)}p&&(x==="number"||j!=="auto")&&(M=xd(E,w,"category"))}else p?N=Sv(0,_):s&&s[A]&&s[A].hasStack&&x==="number"?N=h==="expand"?[0,1]:R3(s[A].stackGroups,c,u):N=k3(E,i.filter(function(U){var W=o in U.props?U.props[o]:U.type.defaultProps[o],Z="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return W===A&&(O||!Z)}),x,d,!0);if(x==="number")N=J1(f,N,A,a,C),B&&(N=x1(B,N,P));else if(x==="category"&&B){var F=B,z=N.every(function(U){return F.indexOf(U)>=0});z&&(N=F)}}return G(G({},v),{},ge({},A,G(G({},b),{},{axisType:a,domain:N,categoricalDomain:M,duplicateDomain:k,originalDomain:(y=b.domain)!==null&&y!==void 0?y:$,isCategorical:p,layout:d})))},{})},NCe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,h=Ny(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),p=h.length,v=M3(d,a),m=-1;return r.reduce(function(y,b){var x=b.type.defaultProps!==void 0?G(G({},b.type.defaultProps),b.props):b.props,w=x[o],P=HB("number");if(!y[w]){m++;var S;return v?S=Sv(0,p):s&&s[w]&&s[w].hasStack?(S=R3(s[w].stackGroups,c,u),S=J1(f,S,w,a)):(S=x1(P,k3(h,r.filter(function(j){var C,O,A=o in j.props?j.props[o]:(C=j.type.defaultProps)===null||C===void 0?void 0:C[o],E="hide"in j.props?j.props.hide:(O=j.type.defaultProps)===null||O===void 0?void 0:O.hide;return A===w&&!E}),"number",d),i.defaultProps.allowDataOverflow),S=J1(f,S,w,a)),G(G({},y),{},ge({},w,G(G({axisType:a},i.defaultProps),{},{hide:!0,orientation:Ar(PCe,"".concat(a,".").concat(m%2),null),domain:S,originalDomain:P,isCategorical:v,layout:d})))}return y},{})},TCe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.children,f="".concat(i,"Id"),h=Er(d,a),p={};return h.length?p=ECe(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(p=NCe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:c,dataEndIndex:u})),p},_Ce=function(t){var n=rl(t),r=is(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:dC(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:hv(n,r)}},Lk=function(t){var n=t.children,r=t.defaultShowTooltip,i=Qn(n,Cc),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},kCe=function(t){return!t||!t.length?!1:t.some(function(n){var r=la(n&&n.type);return r&&r.indexOf("Bar")>=0})},Fk=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},MCe=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,c=s===void 0?{}:s,u=r.width,d=r.height,f=r.children,h=r.margin||{},p=Qn(f,Cc),v=Qn(f,Dl),m=Object.keys(c).reduce(function(S,j){var C=c[j],O=C.orientation;return!C.mirror&&!C.hide?G(G({},S),{},ge({},O,S[O]+C.width)):S},{left:h.left||0,right:h.right||0}),y=Object.keys(o).reduce(function(S,j){var C=o[j],O=C.orientation;return!C.mirror&&!C.hide?G(G({},S),{},ge({},O,Ar(S,"".concat(O))+C.height)):S},{top:h.top||0,bottom:h.bottom||0}),b=G(G({},y),m),x=b.bottom;p&&(b.bottom+=p.props.height||Cc.defaultProps.height),v&&n&&(b=S0e(b,i,r,n));var w=u-b.left-b.right,P=d-b.top-b.bottom;return G(G({brushBottom:x},b),{},{width:Math.max(w,0),height:Math.max(P,0)})},RCe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},KB=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(b,x){var w=x.graphicalItems,P=x.stackGroups,S=x.offset,j=x.updateId,C=x.dataStartIndex,O=x.dataEndIndex,A=b.barSize,E=b.layout,_=b.barGap,N=b.barCategoryGap,k=b.maxBarSize,M=Fk(E),$=M.numericAxisName,D=M.cateAxisName,B=kCe(w),I=[];return w.forEach(function(R,F){var z=Ny(b.data,{graphicalItems:[R],dataStartIndex:C,dataEndIndex:O}),U=R.type.defaultProps!==void 0?G(G({},R.type.defaultProps),R.props):R.props,W=U.dataKey,Z=U.maxBarSize,ae=U["".concat($,"Id")],ee=U["".concat(D,"Id")],K={},se=c.reduce(function(ue,we){var $e=x["".concat(we.axisType,"Map")],Mt=U["".concat(we.axisType,"Id")];$e&&$e[Mt]||we.axisType==="zAxis"||Ms();var jn=$e[Mt];return G(G({},ue),{},ge(ge({},we.axisType,jn),"".concat(we.axisType,"Ticks"),is(jn)))},K),X=se[D],J=se["".concat(D,"Ticks")],te=P&&P[ae]&&P[ae].hasStack&&D0e(R,P[ae].stackGroups),V=la(R.type).indexOf("Bar")>=0,Se=hv(X,J),be=[],Ue=B&&b0e({barSize:A,stackGroups:P,totalSize:RCe(se,D)});if(V){var We,Ye,tn=De(Z)?k:Z,dn=(We=(Ye=hv(X,J,!0))!==null&&Ye!==void 0?Ye:tn)!==null&&We!==void 0?We:0;be=w0e({barGap:_,barCategoryGap:N,bandSize:dn!==Se?dn:Se,sizeList:Ue[ee],maxBarSize:tn}),dn!==Se&&(be=be.map(function(ue){return G(G({},ue),{},{position:G(G({},ue.position),{},{offset:ue.position.offset-dn/2})})}))}var q=R&&R.type&&R.type.getComposedData;q&&I.push({props:G(G({},q(G(G({},se),{},{displayedData:z,props:b,dataKey:W,item:R,bandSize:Se,barPosition:be,offset:S,stackedData:te,layout:E,dataStartIndex:C,dataEndIndex:O}))),{},ge(ge(ge({key:R.key||"item-".concat(F)},$,se[$]),D,se[D]),"animationId",j)),childIndex:yie(R,b.children),item:R})}),I},p=function(b,x){var w=b.props,P=b.dataStartIndex,S=b.dataEndIndex,j=b.updateId;if(!c2({props:w}))return null;var C=w.children,O=w.layout,A=w.stackOffset,E=w.data,_=w.reverseStackOrder,N=Fk(O),k=N.numericAxisName,M=N.cateAxisName,$=Er(C,r),D=M0e(E,$,"".concat(k,"Id"),"".concat(M,"Id"),A,_),B=c.reduce(function(U,W){var Z="".concat(W.axisType,"Map");return G(G({},U),{},ge({},Z,TCe(w,G(G({},W),{},{graphicalItems:$,stackGroups:W.axisType===k&&D,dataStartIndex:P,dataEndIndex:S}))))},{}),I=MCe(G(G({},B),{},{props:w,graphicalItems:$}),x==null?void 0:x.legendBBox);Object.keys(B).forEach(function(U){B[U]=d(w,B[U],I,U.replace("Map",""),n)});var R=B["".concat(M,"Map")],F=_Ce(R),z=h(w,G(G({},B),{},{dataStartIndex:P,dataEndIndex:S,updateId:j,graphicalItems:$,stackGroups:D,offset:I}));return G(G({formattedGraphicalItems:z,graphicalItems:$,offset:I,stackGroups:D},F),B)},v=function(y){function b(x){var w,P,S;return hCe(this,b),S=vCe(this,b,[x]),ge(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ge(S,"accessibilityManager",new JPe),ge(S,"handleLegendBBoxUpdate",function(j){if(j){var C=S.state,O=C.dataStartIndex,A=C.dataEndIndex,E=C.updateId;S.setState(G({legendBBox:j},p({props:S.props,dataStartIndex:O,dataEndIndex:A,updateId:E},G(G({},S.state),{},{legendBBox:j}))))}}),ge(S,"handleReceiveSyncEvent",function(j,C,O){if(S.props.syncId===j){if(O===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(C)}}),ge(S,"handleBrushChange",function(j){var C=j.startIndex,O=j.endIndex;if(C!==S.state.dataStartIndex||O!==S.state.dataEndIndex){var A=S.state.updateId;S.setState(function(){return G({dataStartIndex:C,dataEndIndex:O},p({props:S.props,dataStartIndex:C,dataEndIndex:O,updateId:A},S.state))}),S.triggerSyncEvent({dataStartIndex:C,dataEndIndex:O})}}),ge(S,"handleMouseEnter",function(j){var C=S.getMouseInfo(j);if(C){var O=G(G({},C),{},{isTooltipActive:!0});S.setState(O),S.triggerSyncEvent(O);var A=S.props.onMouseEnter;Re(A)&&A(O,j)}}),ge(S,"triggeredAfterMouseMove",function(j){var C=S.getMouseInfo(j),O=C?G(G({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(O),S.triggerSyncEvent(O);var A=S.props.onMouseMove;Re(A)&&A(O,j)}),ge(S,"handleItemMouseEnter",function(j){S.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),ge(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),ge(S,"handleMouseMove",function(j){j.persist(),S.throttleTriggeredAfterMouseMove(j)}),ge(S,"handleMouseLeave",function(j){S.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};S.setState(C),S.triggerSyncEvent(C);var O=S.props.onMouseLeave;Re(O)&&O(C,j)}),ge(S,"handleOuterEvent",function(j){var C=gie(j),O=Ar(S.props,"".concat(C));if(C&&Re(O)){var A,E;/.*touch.*/i.test(C)?E=S.getMouseInfo(j.changedTouches[0]):E=S.getMouseInfo(j),O((A=E)!==null&&A!==void 0?A:{},j)}}),ge(S,"handleClick",function(j){var C=S.getMouseInfo(j);if(C){var O=G(G({},C),{},{isTooltipActive:!0});S.setState(O),S.triggerSyncEvent(O);var A=S.props.onClick;Re(A)&&A(O,j)}}),ge(S,"handleMouseDown",function(j){var C=S.props.onMouseDown;if(Re(C)){var O=S.getMouseInfo(j);C(O,j)}}),ge(S,"handleMouseUp",function(j){var C=S.props.onMouseUp;if(Re(C)){var O=S.getMouseInfo(j);C(O,j)}}),ge(S,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),ge(S,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseDown(j.changedTouches[0])}),ge(S,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseUp(j.changedTouches[0])}),ge(S,"handleDoubleClick",function(j){var C=S.props.onDoubleClick;if(Re(C)){var O=S.getMouseInfo(j);C(O,j)}}),ge(S,"handleContextMenu",function(j){var C=S.props.onContextMenu;if(Re(C)){var O=S.getMouseInfo(j);C(O,j)}}),ge(S,"triggerSyncEvent",function(j){S.props.syncId!==void 0&&Mx.emit(Rx,S.props.syncId,j,S.eventEmitterSymbol)}),ge(S,"applySyncEvent",function(j){var C=S.props,O=C.layout,A=C.syncMethod,E=S.state.updateId,_=j.dataStartIndex,N=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)S.setState(G({dataStartIndex:_,dataEndIndex:N},p({props:S.props,dataStartIndex:_,dataEndIndex:N,updateId:E},S.state)));else if(j.activeTooltipIndex!==void 0){var k=j.chartX,M=j.chartY,$=j.activeTooltipIndex,D=S.state,B=D.offset,I=D.tooltipTicks;if(!B)return;if(typeof A=="function")$=A(I,j);else if(A==="value"){$=-1;for(var R=0;R=0){var te,V;if(k.dataKey&&!k.allowDuplicatedCategory){var Se=typeof k.dataKey=="function"?J:"payload.".concat(k.dataKey.toString());te=Dm(R,Se,$),V=F&&z&&Dm(z,Se,$)}else te=R==null?void 0:R[M],V=F&&z&&z[M];if(ee||ae){var be=j.props.activeIndex!==void 0?j.props.activeIndex:M;return[g.cloneElement(j,G(G(G({},A.props),se),{},{activeIndex:be})),null,null]}if(!De(te))return[X].concat(Ic(S.renderActivePoints({item:A,activePoint:te,basePoint:V,childIndex:M,isRange:F})))}else{var Ue,We=(Ue=S.getItemByXY(S.state.activeCoordinate))!==null&&Ue!==void 0?Ue:{graphicalItem:X},Ye=We.graphicalItem,tn=Ye.item,dn=tn===void 0?j:tn,q=Ye.childIndex,ue=G(G(G({},A.props),se),{},{activeIndex:q});return[g.cloneElement(dn,ue),null,null]}return F?[X,null,null]:[X,null]}),ge(S,"renderCustomized",function(j,C,O){return g.cloneElement(j,G(G({key:"recharts-customized-".concat(O)},S.props),S.state))}),ge(S,"renderMap",{CartesianGrid:{handler:hp,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:hp},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:hp},YAxis:{handler:hp},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((w=x.id)!==null&&w!==void 0?w:lu("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=E5(S.triggeredAfterMouseMove,(P=x.throttleDelay)!==null&&P!==void 0?P:1e3/60),S.state={},S}return xCe(b,y),mCe(b,[{key:"componentDidMount",value:function(){var w,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,P=w.children,S=w.data,j=w.height,C=w.layout,O=Qn(P,Kr);if(O){var A=O.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var E=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,_=nS(this.state,S,A,E),N=this.state.tooltipTicks[A].coordinate,k=(this.state.offset.top+j)/2,M=C==="horizontal",$=M?{x:N,y:k}:{y:N,x:k},D=this.state.formattedGraphicalItems.find(function(I){var R=I.item;return R.type.name==="Scatter"});D&&($=G(G({},$),D.props.points[A].tooltipPosition),_=D.props.points[A].tooltipPayload);var B={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:E,activePayload:_,activeCoordinate:$};this.setState(B),this.renderCursor(O),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var S,j;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(w){Rw([Qn(w.children,Kr)],[Qn(this.props.children,Kr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=Qn(this.props.children,Kr);if(w&&typeof w.props.shared=="boolean"){var P=w.props.shared?"axis":"item";return s.indexOf(P)>=0?P:a}return a}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var P=this.container,S=P.getBoundingClientRect(),j=Hpe(S),C={chartX:Math.round(w.pageX-j.left),chartY:Math.round(w.pageY-j.top)},O=S.width/P.offsetWidth||1,A=this.inRange(C.chartX,C.chartY,O);if(!A)return null;var E=this.state,_=E.xAxisMap,N=E.yAxisMap,k=this.getTooltipEventType();if(k!=="axis"&&_&&N){var M=rl(_).scale,$=rl(N).scale,D=M&&M.invert?M.invert(C.chartX):null,B=$&&$.invert?$.invert(C.chartY):null;return G(G({},C),{},{xValue:D,yValue:B})}var I=Ik(this.state,this.props.data,this.props.layout,A);return I?G(G({},C),I):null}},{key:"inRange",value:function(w,P){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,C=w/S,O=P/S;if(j==="horizontal"||j==="vertical"){var A=this.state.offset,E=C>=A.left&&C<=A.left+A.width&&O>=A.top&&O<=A.top+A.height;return E?{x:C,y:O}:null}var _=this.state,N=_.angleAxisMap,k=_.radiusAxisMap;if(N&&k){var M=rl(N);return y_({x:C,y:O},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,P=this.getTooltipEventType(),S=Qn(w,Kr),j={};S&&P==="axis"&&(S.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var C=Im(this.props,this.handleOuterEvent);return G(G({},C),j)}},{key:"addListener",value:function(){Mx.on(Rx,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Mx.removeListener(Rx,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,P,S){for(var j=this.state.formattedGraphicalItems,C=0,O=j.length;Cl.jsx("input",{type:t,className:le("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ce.displayName="Input";function rS(e,[t,n]){return Math.min(n,Math.max(t,e))}function ICe(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var VC="ScrollArea",[qB,E_e]=un(VC),[LCe,$r]=qB(VC),GB=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(null),[p,v]=g.useState(null),[m,y]=g.useState(null),[b,x]=g.useState(0),[w,P]=g.useState(0),[S,j]=g.useState(!1),[C,O]=g.useState(!1),A=_e(t,_=>c(_)),E=Qc(i);return l.jsx(LCe,{scope:n,type:r,dir:E,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:v,scrollbarXEnabled:S,onScrollbarXEnabledChange:j,scrollbarY:m,onScrollbarYChange:y,scrollbarYEnabled:C,onScrollbarYEnabledChange:O,onCornerWidthChange:x,onCornerHeightChange:P,children:l.jsx(pe.div,{dir:E,...o,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});GB.displayName=VC;var YB="ScrollAreaViewport",XB=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=$r(YB,n),s=g.useRef(null),c=_e(t,s,o.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),l.jsx(pe.div,{"data-radix-scroll-area-viewport":"",...a,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});XB.displayName=YB;var Wi="ScrollAreaScrollbar",WC=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=$r(Wi,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation==="horizontal";return g.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type==="hover"?l.jsx(FCe,{...r,ref:t,forceMount:n}):i.type==="scroll"?l.jsx(BCe,{...r,ref:t,forceMount:n}):i.type==="auto"?l.jsx(QB,{...r,ref:t,forceMount:n}):i.type==="always"?l.jsx(HC,{...r,ref:t}):null});WC.displayName=Wi;var FCe=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=$r(Wi,e.__scopeScrollArea),[a,o]=g.useState(!1);return g.useEffect(()=>{const s=i.scrollArea;let c=0;if(s){const u=()=>{window.clearTimeout(c),o(!0)},d=()=>{c=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),l.jsx(Zt,{present:n||a,children:l.jsx(QB,{"data-state":a?"visible":"hidden",...r,ref:t})})}),BCe=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=$r(Wi,e.__scopeScrollArea),a=e.orientation==="horizontal",o=_y(()=>c("SCROLL_END"),100),[s,c]=ICe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,i.scrollHideDelay,c]),g.useEffect(()=>{const u=i.viewport,d=a?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const p=u[d];f!==p&&(c("SCROLL"),o()),f=p};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[i.viewport,a,c,o]),l.jsx(Zt,{present:n||s!=="hidden",children:l.jsx(HC,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ne(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ne(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),QB=g.forwardRef((e,t)=>{const n=$r(Wi,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=g.useState(!1),s=e.orientation==="horizontal",c=_y(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=$r(Wi,e.__scopeScrollArea),a=g.useRef(null),o=g.useRef(0),[s,c]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=n6(s.viewport,s.content),d={...r,sizes:s,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function f(h,p){return KCe(h,o.current,s,p)}return n==="horizontal"?l.jsx(UCe,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const h=i.viewport.scrollLeft,p=Bk(h,s,i.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=f(h,i.dir))}}):n==="vertical"?l.jsx(zCe,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const h=i.viewport.scrollTop,p=Bk(h,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=f(h))}}):null}),UCe=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=$r(Wi,e.__scopeScrollArea),[o,s]=g.useState(),c=g.useRef(null),u=_e(t,c,a.onScrollbarXChange);return g.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),l.jsx(JB,{"data-orientation":"horizontal",...i,ref:u,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ty(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(a.viewport){const h=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),i6(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Lv(o.paddingLeft),paddingEnd:Lv(o.paddingRight)}})}})}),zCe=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=$r(Wi,e.__scopeScrollArea),[o,s]=g.useState(),c=g.useRef(null),u=_e(t,c,a.onScrollbarYChange);return g.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),l.jsx(JB,{"data-orientation":"vertical",...i,ref:u,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ty(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(a.viewport){const h=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),i6(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Lv(o.paddingTop),paddingEnd:Lv(o.paddingBottom)}})}})}),[VCe,ZB]=qB(Wi),JB=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,p=$r(Wi,n),[v,m]=g.useState(null),y=_e(t,A=>m(A)),b=g.useRef(null),x=g.useRef(""),w=p.viewport,P=r.content-r.viewport,S=Dt(d),j=Dt(c),C=_y(f,10);function O(A){if(b.current){const E=A.clientX-b.current.left,_=A.clientY-b.current.top;u({x:E,y:_})}}return g.useEffect(()=>{const A=E=>{const _=E.target;(v==null?void 0:v.contains(_))&&S(E,P)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[w,v,P,S]),g.useEffect(j,[r,j]),Lc(v,C),Lc(p.content,C),l.jsx(VCe,{scope:n,scrollbar:v,hasThumb:i,onThumbChange:Dt(a),onThumbPointerUp:Dt(o),onThumbPositionChange:j,onThumbPointerDown:Dt(s),children:l.jsx(pe.div,{...h,ref:y,style:{position:"absolute",...h.style},onPointerDown:ne(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),b.current=v.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),O(A))}),onPointerMove:ne(e.onPointerMove,O),onPointerUp:ne(e.onPointerUp,A=>{const E=A.target;E.hasPointerCapture(A.pointerId)&&E.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),b.current=null})})})}),Iv="ScrollAreaThumb",e6=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ZB(Iv,e.__scopeScrollArea);return l.jsx(Zt,{present:n||i.hasThumb,children:l.jsx(WCe,{ref:t,...r})})}),WCe=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,a=$r(Iv,n),o=ZB(Iv,n),{onThumbPositionChange:s}=o,c=_e(t,f=>o.onThumbChange(f)),u=g.useRef(void 0),d=_y(()=>{u.current&&(u.current(),u.current=void 0)},100);return g.useEffect(()=>{const f=a.viewport;if(f){const h=()=>{if(d(),!u.current){const p=qCe(f,s);u.current=p,s()}};return s(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[a.viewport,d,s]),l.jsx(pe.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ne(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),v=f.clientX-p.left,m=f.clientY-p.top;o.onThumbPointerDown({x:v,y:m})}),onPointerUp:ne(e.onPointerUp,o.onThumbPointerUp)})});e6.displayName=Iv;var KC="ScrollAreaCorner",t6=g.forwardRef((e,t)=>{const n=$r(KC,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(HCe,{...e,ref:t}):null});t6.displayName=KC;var HCe=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=$r(KC,n),[a,o]=g.useState(0),[s,c]=g.useState(0),u=!!(a&&s);return Lc(i.scrollbarX,()=>{var f;const d=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(d),c(d)}),Lc(i.scrollbarY,()=>{var f;const d=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(d),o(d)}),u?l.jsx(pe.div,{...r,ref:t,style:{width:a,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Lv(e){return e?parseInt(e,10):0}function n6(e,t){const n=e/t;return isNaN(n)?0:n}function Ty(e){const t=n6(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function KCe(e,t,n,r="ltr"){const i=Ty(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return r6([c,u],f)(e)}function Bk(e,t,n="ltr"){const r=Ty(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=n==="ltr"?[0,o]:[o*-1,0],u=rS(e,c);return r6([0,o],[0,s])(u)}function r6(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function i6(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function _y(e,t){const n=Dt(e),r=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),g.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Lc(e,t){const n=Dt(t);Kt(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var a6=GB,GCe=XB,YCe=t6;const fr=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(a6,{ref:r,className:le("relative overflow-hidden",e),...n,children:[l.jsx(GCe,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(o6,{}),l.jsx(YCe,{})]}));fr.displayName=a6.displayName;const o6=g.forwardRef(({className:e,orientation:t="vertical",...n},r)=>l.jsx(WC,{ref:r,orientation:t,className:le("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:l.jsx(e6,{className:"relative flex-1 rounded-full bg-border"})}));o6.displayName=WC.displayName;var XCe="VisuallyHidden",qC=g.forwardRef((e,t)=>l.jsx(pe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));qC.displayName=XCe;var QCe=qC,[ky,N_e]=un("Tooltip",[Ro]),My=Ro(),s6="TooltipProvider",ZCe=700,iS="tooltip.open",[JCe,GC]=ky(s6),l6=e=>{const{__scopeTooltip:t,delayDuration:n=ZCe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,[o,s]=g.useState(!0),c=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(JCe,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:g.useCallback(d=>{c.current=d},[]),disableHoverableContent:i,children:a})};l6.displayName=s6;var Ry="Tooltip",[eOe,gh]=ky(Ry),c6=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=GC(Ry,e.__scopeTooltip),u=My(t),[d,f]=g.useState(null),h=ir(),p=g.useRef(0),v=o??c.disableHoverableContent,m=s??c.delayDuration,y=g.useRef(!1),[b=!1,x]=_r({prop:r,defaultProp:i,onChange:C=>{C?(c.onOpen(),document.dispatchEvent(new CustomEvent(iS))):c.onClose(),a==null||a(C)}}),w=g.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),P=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,x(!0)},[x]),S=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),j=g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,x(!0),p.current=0},m)},[m,x]);return g.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),l.jsx(Tg,{...u,children:l.jsx(eOe,{scope:t,contentId:h,open:b,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayed?j():P()},[c.isOpenDelayed,j,P]),onTriggerLeave:g.useCallback(()=>{v?S():(window.clearTimeout(p.current),p.current=0)},[S,v]),onOpen:P,onClose:S,disableHoverableContent:v,children:n})})};c6.displayName=Ry;var aS="TooltipTrigger",u6=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=gh(aS,n),a=GC(aS,n),o=My(n),s=g.useRef(null),c=_e(t,s,i.onTriggerChange),u=g.useRef(!1),d=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(_g,{asChild:!0,...o,children:l.jsx(pe.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:ne(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:ne(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:ne(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ne(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:ne(e.onBlur,i.onClose),onClick:ne(e.onClick,i.onClose)})})});u6.displayName=aS;var YC="TooltipPortal",[tOe,nOe]=ky(YC,{forceMount:void 0}),d6=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=gh(YC,t);return l.jsx(tOe,{scope:t,forceMount:n,children:l.jsx(Zt,{present:n||a.open,children:l.jsx(oh,{asChild:!0,container:i,children:r})})})};d6.displayName=YC;var Fc="TooltipContent",f6=g.forwardRef((e,t)=>{const n=nOe(Fc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=gh(Fc,e.__scopeTooltip);return l.jsx(Zt,{present:r||o.open,children:o.disableHoverableContent?l.jsx(h6,{side:i,...a,ref:t}):l.jsx(rOe,{side:i,...a,ref:t})})}),rOe=g.forwardRef((e,t)=>{const n=gh(Fc,e.__scopeTooltip),r=GC(Fc,e.__scopeTooltip),i=g.useRef(null),a=_e(t,i),[o,s]=g.useState(null),{trigger:c,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,h=g.useCallback(()=>{s(null),f(!1)},[f]),p=g.useCallback((v,m)=>{const y=v.currentTarget,b={x:v.clientX,y:v.clientY},x=sOe(b,y.getBoundingClientRect()),w=lOe(b,x),P=cOe(m.getBoundingClientRect()),S=dOe([...w,...P]);s(S),f(!0)},[f]);return g.useEffect(()=>()=>h(),[h]),g.useEffect(()=>{if(c&&d){const v=y=>p(y,d),m=y=>p(y,c);return c.addEventListener("pointerleave",v),d.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",m)}}},[c,d,p,h]),g.useEffect(()=>{if(o){const v=m=>{const y=m.target,b={x:m.clientX,y:m.clientY},x=(c==null?void 0:c.contains(y))||(d==null?void 0:d.contains(y)),w=!uOe(b,o);x?h():w&&(h(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,d,o,u,h]),l.jsx(h6,{...e,ref:a})}),[iOe,aOe]=ky(Ry,{isInside:!1}),h6=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=gh(Fc,n),u=My(n),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(iS,d),()=>document.removeEventListener(iS,d)),[d]),g.useEffect(()=>{if(c.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(kg,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(Tj,{children:r}),l.jsx(iOe,{scope:n,isInside:!0,children:l.jsx(QCe,{id:c.contentId,role:"tooltip",children:i||r})})]})})});f6.displayName=Fc;var p6="TooltipArrow",oOe=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=My(n);return aOe(p6,n).isInside?null:l.jsx(Mg,{...i,...r,ref:t})});oOe.displayName=p6;function sOe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function lOe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function cOe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function uOe(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;ar!=d>r&&n<(u-s)*(r-c)/(d-c)+s&&(i=!i)}return i}function dOe(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),fOe(t)}function fOe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var hOe=l6,pOe=c6,mOe=u6,vOe=d6,m6=f6;const oS=hOe,Sd=pOe,jd=mOe,Bl=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(vOe,{children:l.jsx(m6,{ref:r,sideOffset:t,className:le("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Bl.displayName=m6.displayName;var XC="Tabs",[gOe,T_e]=un(XC,[$g]),v6=$g(),[yOe,QC]=gOe(XC),g6=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:s,activationMode:c="automatic",...u}=e,d=Qc(s),[f,h]=_r({prop:r,onChange:i,defaultProp:a});return l.jsx(yOe,{scope:n,baseId:ir(),value:f,onValueChange:h,orientation:o,dir:d,activationMode:c,children:l.jsx(pe.div,{dir:d,"data-orientation":o,...u,ref:t})})});g6.displayName=XC;var y6="TabsList",x6=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=QC(y6,n),o=v6(n);return l.jsx(eL,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:l.jsx(pe.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});x6.displayName=y6;var b6="TabsTrigger",w6=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=QC(b6,n),s=v6(n),c=P6(o.baseId,r),u=C6(o.baseId,r),d=r===o.value;return l.jsx(tL,{asChild:!0,...s,focusable:!i,active:d,children:l.jsx(pe.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:t,onMouseDown:ne(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:ne(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:ne(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!i&&f&&o.onValueChange(r)})})})});w6.displayName=b6;var S6="TabsContent",j6=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=QC(S6,n),c=P6(s.baseId,r),u=C6(s.baseId,r),d=r===s.value,f=g.useRef(d);return g.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(Zt,{present:i||d,children:({present:h})=>l.jsx(pe.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&a})})});j6.displayName=S6;function P6(e,t){return`${e}-trigger-${t}`}function C6(e,t){return`${e}-content-${t}`}var xOe=g6,O6=x6,A6=w6,E6=j6;const ZC=xOe,$y=g.forwardRef(({className:e,...t},n)=>l.jsx(O6,{ref:n,className:le("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));$y.displayName=O6.displayName;const po=g.forwardRef(({className:e,...t},n)=>l.jsx(A6,{ref:n,className:le("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));po.displayName=A6.displayName;const mo=g.forwardRef(({className:e,...t},n)=>l.jsx(E6,{ref:n,className:le("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));mo.displayName=E6.displayName;function N6(e,t){return function(){return e.apply(t,arguments)}}const{toString:bOe}=Object.prototype,{getPrototypeOf:JC}=Object,Dy=(e=>t=>{const n=bOe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),oi=e=>(e=e.toLowerCase(),t=>Dy(t)===e),Iy=e=>t=>typeof t===e,{isArray:xu}=Array,Ff=Iy("undefined");function wOe(e){return e!==null&&!Ff(e)&&e.constructor!==null&&!Ff(e.constructor)&&sr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const T6=oi("ArrayBuffer");function SOe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&T6(e.buffer),t}const jOe=Iy("string"),sr=Iy("function"),_6=Iy("number"),Ly=e=>e!==null&&typeof e=="object",POe=e=>e===!0||e===!1,Bp=e=>{if(Dy(e)!=="object")return!1;const t=JC(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},COe=oi("Date"),OOe=oi("File"),AOe=oi("Blob"),EOe=oi("FileList"),NOe=e=>Ly(e)&&sr(e.pipe),TOe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||sr(e.append)&&((t=Dy(e))==="formdata"||t==="object"&&sr(e.toString)&&e.toString()==="[object FormData]"))},_Oe=oi("URLSearchParams"),[kOe,MOe,ROe,$Oe]=["ReadableStream","Request","Response","Headers"].map(oi),DOe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function yh(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),xu(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const os=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,M6=e=>!Ff(e)&&e!==os;function sS(){const{caseless:e}=M6(this)&&this||{},t={},n=(r,i)=>{const a=e&&k6(t,i)||i;Bp(t[a])&&Bp(r)?t[a]=sS(t[a],r):Bp(r)?t[a]=sS({},r):xu(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r(yh(t,(i,a)=>{n&&sr(i)?e[a]=N6(i,n):e[a]=i},{allOwnKeys:r}),e),LOe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),FOe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},BOe=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&JC(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},UOe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},zOe=e=>{if(!e)return null;if(xu(e))return e;let t=e.length;if(!_6(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},VOe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&JC(Uint8Array)),WOe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},HOe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},KOe=oi("HTMLFormElement"),qOe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Uk=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),GOe=oi("RegExp"),R6=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};yh(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},YOe=e=>{R6(e,(t,n)=>{if(sr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(sr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},XOe=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return xu(e)?r(e):r(String(e).split(t)),n},QOe=()=>{},ZOe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Dx="abcdefghijklmnopqrstuvwxyz",zk="0123456789",$6={DIGIT:zk,ALPHA:Dx,ALPHA_DIGIT:Dx+Dx.toUpperCase()+zk},JOe=(e=16,t=$6.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function eAe(e){return!!(e&&sr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const tAe=e=>{const t=new Array(10),n=(r,i)=>{if(Ly(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=xu(r)?[]:{};return yh(r,(o,s)=>{const c=n(o,i+1);!Ff(c)&&(a[s]=c)}),t[i]=void 0,a}}return r};return n(e,0)},nAe=oi("AsyncFunction"),rAe=e=>e&&(Ly(e)||sr(e))&&sr(e.then)&&sr(e.catch),D6=((e,t)=>e?setImmediate:t?((n,r)=>(os.addEventListener("message",({source:i,data:a})=>{i===os&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),os.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",sr(os.postMessage)),iAe=typeof queueMicrotask<"u"?queueMicrotask.bind(os):typeof process<"u"&&process.nextTick||D6,H={isArray:xu,isArrayBuffer:T6,isBuffer:wOe,isFormData:TOe,isArrayBufferView:SOe,isString:jOe,isNumber:_6,isBoolean:POe,isObject:Ly,isPlainObject:Bp,isReadableStream:kOe,isRequest:MOe,isResponse:ROe,isHeaders:$Oe,isUndefined:Ff,isDate:COe,isFile:OOe,isBlob:AOe,isRegExp:GOe,isFunction:sr,isStream:NOe,isURLSearchParams:_Oe,isTypedArray:VOe,isFileList:EOe,forEach:yh,merge:sS,extend:IOe,trim:DOe,stripBOM:LOe,inherits:FOe,toFlatObject:BOe,kindOf:Dy,kindOfTest:oi,endsWith:UOe,toArray:zOe,forEachEntry:WOe,matchAll:HOe,isHTMLForm:KOe,hasOwnProperty:Uk,hasOwnProp:Uk,reduceDescriptors:R6,freezeMethods:YOe,toObjectSet:XOe,toCamelCase:qOe,noop:QOe,toFiniteNumber:ZOe,findKey:k6,global:os,isContextDefined:M6,ALPHABET:$6,generateString:JOe,isSpecCompliantForm:eAe,toJSONObject:tAe,isAsyncFn:nAe,isThenable:rAe,setImmediate:D6,asap:iAe};function Ee(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}H.inherits(Ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const I6=Ee.prototype,L6={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{L6[e]={value:e}});Object.defineProperties(Ee,L6);Object.defineProperty(I6,"isAxiosError",{value:!0});Ee.from=(e,t,n,r,i,a)=>{const o=Object.create(I6);return H.toFlatObject(e,o,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Ee.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const aAe=null;function lS(e){return H.isPlainObject(e)||H.isArray(e)}function F6(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function Vk(e,t,n){return e?e.concat(t).map(function(i,a){return i=F6(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function oAe(e){return H.isArray(e)&&!e.some(lS)}const sAe=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function Fy(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!H.isUndefined(y[m])});const r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(H.isDate(v))return v.toISOString();if(!c&&H.isBlob(v))throw new Ee("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(v)||H.isTypedArray(v)?c&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,m,y){let b=v;if(v&&!y&&typeof v=="object"){if(H.endsWith(m,"{}"))m=r?m:m.slice(0,-2),v=JSON.stringify(v);else if(H.isArray(v)&&oAe(v)||(H.isFileList(v)||H.endsWith(m,"[]"))&&(b=H.toArray(v)))return m=F6(m),b.forEach(function(w,P){!(H.isUndefined(w)||w===null)&&t.append(o===!0?Vk([m],P,a):o===null?m:m+"[]",u(w))}),!1}return lS(v)?!0:(t.append(Vk(y,m,a),u(v)),!1)}const f=[],h=Object.assign(sAe,{defaultVisitor:d,convertValue:u,isVisitable:lS});function p(v,m){if(!H.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(v),H.forEach(v,function(b,x){(!(H.isUndefined(b)||b===null)&&i.call(t,b,H.isString(x)?x.trim():x,m,h))===!0&&p(b,m?m.concat(x):[x])}),f.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Wk(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function eO(e,t){this._pairs=[],e&&Fy(e,this,t)}const B6=eO.prototype;B6.append=function(t,n){this._pairs.push([t,n])};B6.toString=function(t){const n=t?function(r){return t.call(this,r,Wk)}:Wk;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function lAe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function U6(e,t,n){if(!t)return e;const r=n&&n.encode||lAe;H.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(i?a=i(t,n):a=H.isURLSearchParams(t)?t.toString():new eO(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Hk{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){H.forEach(this.handlers,function(r){r!==null&&t(r)})}}const z6={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cAe=typeof URLSearchParams<"u"?URLSearchParams:eO,uAe=typeof FormData<"u"?FormData:null,dAe=typeof Blob<"u"?Blob:null,fAe={isBrowser:!0,classes:{URLSearchParams:cAe,FormData:uAe,Blob:dAe},protocols:["http","https","file","blob","url","data"]},tO=typeof window<"u"&&typeof document<"u",cS=typeof navigator=="object"&&navigator||void 0,hAe=tO&&(!cS||["ReactNative","NativeScript","NS"].indexOf(cS.product)<0),pAe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mAe=tO&&window.location.href||"http://localhost",vAe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:tO,hasStandardBrowserEnv:hAe,hasStandardBrowserWebWorkerEnv:pAe,navigator:cS,origin:mAe},Symbol.toStringTag,{value:"Module"})),bn={...vAe,...fAe};function gAe(e,t){return Fy(e,new bn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return bn.isNode&&H.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function yAe(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function xAe(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r=n.length;return o=!o&&H.isArray(i)?i.length:o,c?(H.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!H.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&H.isArray(i[o])&&(i[o]=xAe(i[o])),!s)}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,(r,i)=>{t(yAe(r),i,n,0)}),n}return null}function bAe(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const xh={transitional:z6,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=H.isObject(t);if(a&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return i?JSON.stringify(V6(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return gAe(t,this.formSerializer).toString();if((s=H.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Fy(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),bAe(t)):t}],transformResponse:[function(t){const n=this.transitional||xh.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?Ee.from(s,Ee.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bn.classes.FormData,Blob:bn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{xh.headers[e]={}});const wAe=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),SAe=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&wAe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Kk=Symbol("internals");function Vu(e){return e&&String(e).trim().toLowerCase()}function Up(e){return e===!1||e==null?e:H.isArray(e)?e.map(Up):String(e)}function jAe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const PAe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ix(e,t,n,r,i){if(H.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!H.isString(t)){if(H.isString(r))return t.indexOf(r)!==-1;if(H.isRegExp(r))return r.test(t)}}function CAe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function OAe(e,t){const n=H.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class Vn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,c,u){const d=Vu(c);if(!d)throw new Error("header name must be a non-empty string");const f=H.findKey(i,d);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=Up(s))}const o=(s,c)=>H.forEach(s,(u,d)=>a(u,d,c));if(H.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(H.isString(t)&&(t=t.trim())&&!PAe(t))o(SAe(t),n);else if(H.isHeaders(t))for(const[s,c]of t.entries())a(c,s,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=Vu(t),t){const r=H.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return jAe(i);if(H.isFunction(n))return n.call(this,i,r);if(H.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Vu(t),t){const r=H.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ix(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Vu(o),o){const s=H.findKey(r,o);s&&(!n||Ix(r,r[s],s,n))&&(delete r[s],i=!0)}}return H.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||Ix(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return H.forEach(this,(i,a)=>{const o=H.findKey(r,a);if(o){n[o]=Up(i),delete n[a];return}const s=t?CAe(a):String(a).trim();s!==a&&delete n[a],n[s]=Up(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return H.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&H.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Kk]=this[Kk]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Vu(o);r[s]||(OAe(i,o),r[s]=!0)}return H.isArray(t)?t.forEach(a):a(t),this}}Vn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(Vn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});H.freezeMethods(Vn);function Lx(e,t){const n=this||xh,r=t||n,i=Vn.from(r.headers);let a=r.data;return H.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function W6(e){return!!(e&&e.__CANCEL__)}function bu(e,t,n){Ee.call(this,e??"canceled",Ee.ERR_CANCELED,t,n),this.name="CanceledError"}H.inherits(bu,Ee,{__CANCEL__:!0});function H6(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ee("Request failed with status code "+n.status,[Ee.ERR_BAD_REQUEST,Ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function AAe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function EAe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[a];o||(o=u),n[i]=c,r[i]=u;let f=a,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{n=d,i=null,a&&(clearTimeout(a),a=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?o(u,d):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},r-f)))},()=>i&&o(i)]}const Fv=(e,t,n=3)=>{let r=0;const i=EAe(50,250);return NAe(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,c=o-r,u=i(c),d=o<=s;r=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&d?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},qk=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Gk=e=>(...t)=>H.asap(()=>e(...t)),TAe=bn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,bn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(bn.origin),bn.navigator&&/(msie|trident)/i.test(bn.navigator.userAgent)):()=>!0,_Ae=bn.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];H.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),H.isString(r)&&o.push("path="+r),H.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kAe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function MAe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function K6(e,t){return e&&!kAe(t)?MAe(e,t):t}const Yk=e=>e instanceof Vn?{...e}:e;function Rs(e,t){t=t||{};const n={};function r(u,d,f,h){return H.isPlainObject(u)&&H.isPlainObject(d)?H.merge.call({caseless:h},u,d):H.isPlainObject(d)?H.merge({},d):H.isArray(d)?d.slice():d}function i(u,d,f,h){if(H.isUndefined(d)){if(!H.isUndefined(u))return r(void 0,u,f,h)}else return r(u,d,f,h)}function a(u,d){if(!H.isUndefined(d))return r(void 0,d)}function o(u,d){if(H.isUndefined(d)){if(!H.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function s(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,d,f)=>i(Yk(u),Yk(d),f,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=c[d]||i,h=f(e[d],t[d],d);H.isUndefined(h)&&f!==s||(n[d]=h)}),n}const q6=e=>{const t=Rs({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;t.headers=o=Vn.from(o),t.url=U6(K6(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(H.isFormData(n)){if(bn.hasStandardBrowserEnv||bn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...d].join("; "))}}if(bn.hasStandardBrowserEnv&&(r&&H.isFunction(r)&&(r=r(t)),r||r!==!1&&TAe(t.url))){const u=i&&a&&_Ae.read(a);u&&o.set(i,u)}return t},RAe=typeof XMLHttpRequest<"u",$Ae=RAe&&function(e){return new Promise(function(n,r){const i=q6(e);let a=i.data;const o=Vn.from(i.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:u}=i,d,f,h,p,v;function m(){p&&p(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function b(){if(!y)return;const w=Vn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:e,request:y};H6(function(C){n(C),m()},function(C){r(C),m()},S),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new Ee("Request aborted",Ee.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new Ee("Network Error",Ee.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let P=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||z6;i.timeoutErrorMessage&&(P=i.timeoutErrorMessage),r(new Ee(P,S.clarifyTimeoutError?Ee.ETIMEDOUT:Ee.ECONNABORTED,e,y)),y=null},a===void 0&&o.setContentType(null),"setRequestHeader"in y&&H.forEach(o.toJSON(),function(P,S){y.setRequestHeader(S,P)}),H.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),s&&s!=="json"&&(y.responseType=i.responseType),u&&([h,v]=Fv(u,!0),y.addEventListener("progress",h)),c&&y.upload&&([f,p]=Fv(c),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(d=w=>{y&&(r(!w||w.type?new bu(null,e,y):w),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const x=AAe(i.url);if(x&&bn.protocols.indexOf(x)===-1){r(new Ee("Unsupported protocol "+x+":",Ee.ERR_BAD_REQUEST,e));return}y.send(a||null)})},DAe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(u){if(!i){i=!0,s();const d=u instanceof Error?u:this.reason;r.abort(d instanceof Ee?d:new bu(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,a(new Ee(`timeout ${t} of ms exceeded`,Ee.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>H.asap(s),c}},IAe=function*(e,t){let n=e.byteLength;if(n{const i=LAe(e,t);let a=0,o,s=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){s(),c.close();return}let f=d.byteLength;if(n){let h=a+=f;n(h)}c.enqueue(new Uint8Array(d))}catch(u){throw s(u),u}},cancel(c){return s(c),i.return()}},{highWaterMark:2})},By=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",G6=By&&typeof ReadableStream=="function",BAe=By&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Y6=(e,...t)=>{try{return!!e(...t)}catch{return!1}},UAe=G6&&Y6(()=>{let e=!1;const t=new Request(bn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Qk=64*1024,uS=G6&&Y6(()=>H.isReadableStream(new Response("").body)),Bv={stream:uS&&(e=>e.body)};By&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Bv[t]&&(Bv[t]=H.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ee(`Response type '${t}' is not supported`,Ee.ERR_NOT_SUPPORT,r)})})})(new Response);const zAe=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(bn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await BAe(e)).byteLength},VAe=async(e,t)=>{const n=H.toFiniteNumber(e.getContentLength());return n??zAe(t)},WAe=By&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:h}=q6(e);u=u?(u+"").toLowerCase():"text";let p=DAe([i,a&&a.toAbortSignal()],o),v;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(c&&UAe&&n!=="get"&&n!=="head"&&(y=await VAe(d,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),j;if(H.isFormData(r)&&(j=S.headers.get("content-type"))&&d.setContentType(j),S.body){const[C,O]=qk(y,Fv(Gk(c)));r=Xk(S.body,Qk,C,O)}}H.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;v=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:b?f:void 0});let x=await fetch(v);const w=uS&&(u==="stream"||u==="response");if(uS&&(s||w&&m)){const S={};["status","statusText","headers"].forEach(A=>{S[A]=x[A]});const j=H.toFiniteNumber(x.headers.get("content-length")),[C,O]=s&&qk(j,Fv(Gk(s),!0))||[];x=new Response(Xk(x.body,Qk,C,()=>{O&&O(),m&&m()}),S)}u=u||"text";let P=await Bv[H.findKey(Bv,u)||"text"](x,e);return!w&&m&&m(),await new Promise((S,j)=>{H6(S,j,{data:P,headers:Vn.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:v})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Ee("Network Error",Ee.ERR_NETWORK,e,v),{cause:b.cause||b}):Ee.from(b,b&&b.code,e,v)}}),dS={http:aAe,xhr:$Ae,fetch:WAe};H.forEach(dS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Zk=e=>`- ${e}`,HAe=e=>H.isFunction(e)||e===null||e===!1,X6={getAdapter:e=>{e=H.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since : -`+a.map(Zk).join(` -`):" "+Zk(a[0]):"as no adapter specified";throw new Ee("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:dS};function Fx(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bu(null,e)}function Jk(e){return Fx(e),e.headers=Vn.from(e.headers),e.data=Lx.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),X6.getAdapter(e.adapter||xh.adapter)(e).then(function(r){return Fx(e),r.data=Lx.call(e,e.transformResponse,r),r.headers=Vn.from(r.headers),r},function(r){return W6(r)||(Fx(e),r&&r.response&&(r.response.data=Lx.call(e,e.transformResponse,r.response),r.response.headers=Vn.from(r.response.headers))),Promise.reject(r)})}const Q6="1.7.9",Uy={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Uy[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const eM={};Uy.transitional=function(t,n,r){function i(a,o){return"[Axios v"+Q6+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new Ee(i(o," has been removed"+(n?" in "+n:"")),Ee.ERR_DEPRECATED);return n&&!eM[o]&&(eM[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};Uy.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function KAe(e,t,n){if(typeof e!="object")throw new Ee("options must be an object",Ee.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],c=s===void 0||o(s,a,e);if(c!==!0)throw new Ee("option "+a+" must be "+c,Ee.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ee("Unknown option "+a,Ee.ERR_BAD_OPTION)}}const zp={assertOptions:KAe,validators:Uy},di=zp.validators;class ws{constructor(t){this.defaults=t,this.interceptors={request:new Hk,response:new Hk}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Rs(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&zp.assertOptions(r,{silentJSONParsing:di.transitional(di.boolean),forcedJSONParsing:di.transitional(di.boolean),clarifyTimeoutError:di.transitional(di.boolean)},!1),i!=null&&(H.isFunction(i)?n.paramsSerializer={serialize:i}:zp.assertOptions(i,{encode:di.function,serialize:di.function},!0)),zp.assertOptions(n,{baseUrl:di.spelling("baseURL"),withXsrfToken:di.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&H.merge(a.common,a[n.method]);a&&H.forEach(["delete","get","head","post","put","patch","common"],v=>{delete a[v]}),n.headers=Vn.concat(o,a);const s=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,h;if(!c){const v=[Jk.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,u),h=v.length,d=Promise.resolve(n);f{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new bu(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new nO(function(i){t=i}),cancel:t}}}function qAe(e){return function(n){return e.apply(null,n)}}function GAe(e){return H.isObject(e)&&e.isAxiosError===!0}const fS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fS).forEach(([e,t])=>{fS[t]=e});function Z6(e){const t=new ws(e),n=N6(ws.prototype.request,t);return H.extend(n,ws.prototype,t,{allOwnKeys:!0}),H.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Z6(Rs(e,i))},n}const ie=Z6(xh);ie.Axios=ws;ie.CanceledError=bu;ie.CancelToken=nO;ie.isCancel=W6;ie.VERSION=Q6;ie.toFormData=Fy;ie.AxiosError=Ee;ie.Cancel=ie.CanceledError;ie.all=function(t){return Promise.all(t)};ie.spread=qAe;ie.isAxiosError=GAe;ie.mergeConfig=Rs;ie.AxiosHeaders=Vn;ie.formToJSON=e=>V6(H.isHTMLForm(e)?new FormData(e):e);ie.getAdapter=X6.getAdapter;ie.HttpStatusCode=fS;ie.default=ie;const YAe=5,XAe=5e3,pp=50,ed={cpu:"#3B82F6",memory:"#3B82F6",disk:"#A855F7",network:"#F59E0B"},QAe=({data:e,dataKey:t,color:n,label:r,unit:i="",domain:a})=>l.jsx("div",{className:"h-36",children:l.jsx(N5,{width:"100%",height:"100%",children:l.jsxs(DCe,{data:e,margin:{top:5,right:5,left:5,bottom:5},children:[l.jsx("defs",{children:l.jsxs("linearGradient",{id:`gradient-${t}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"5%",stopColor:n,stopOpacity:.3}),l.jsx("stop",{offset:"95%",stopColor:n,stopOpacity:0})]})}),l.jsx(gu,{dataKey:"time",tick:{fontSize:10,fill:"#6B7280"},stroke:"#374151",interval:"preserveStart"}),l.jsx(yu,{domain:a||[0,"auto"],tick:{fontSize:10,fill:"#6B7280"},stroke:"#374151",width:40}),l.jsx(Kr,{content:({active:o,payload:s})=>o&&(s!=null&&s[0])?l.jsxs("div",{className:"bg-neutral-900 border border-neutral-800 p-2 rounded-lg shadow-lg",children:[l.jsx("p",{className:"text-sm text-neutral-300",children:`${r}: ${s[0].value.toFixed(1)}${i}`}),l.jsx("p",{className:"text-xs text-neutral-500",children:s[0].payload.time})]}):null}),l.jsx(Fo,{type:"monotone",dataKey:t,stroke:n,fill:`url(#gradient-${t})`,strokeWidth:2,isAnimationActive:!1})]})})}),mp=({icon:e,title:t,value:n,secondaryValue:r,chartData:i,dataKey:a,color:o,unit:s,domain:c})=>l.jsxs(ve,{className:"border-neutral-800/50 overflow-hidden",children:[l.jsx(je,{className:"p-4 pb-0",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"bg-neutral-900 p-2.5 rounded-lg",children:l.jsx(e,{className:"w-5 h-5 text-neutral-400"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium text-neutral-400",children:t}),l.jsxs("div",{className:"flex items-baseline gap-2",children:[l.jsx("p",{className:"text-lg font-semibold text-white truncate",children:n}),r&&l.jsx("p",{className:"text-sm text-neutral-500 truncate",children:r})]})]})]})}),l.jsx(xe,{className:"p-4 pt-2",children:(i==null?void 0:i.length)>0&&l.jsx(QAe,{data:i,dataKey:a,color:o,label:t,unit:s,domain:c})})]}),ZAe=({data:e})=>l.jsx("div",{className:"h-36",children:l.jsx(N5,{width:"100%",height:"100%",children:l.jsxs($Ce,{data:e,margin:{top:5,right:5,left:5,bottom:5},children:[l.jsx(gu,{dataKey:"time",tick:{fontSize:10,fill:"#6B7280"},stroke:"#374151",interval:"preserveStart"}),l.jsx(yu,{tick:{fontSize:10,fill:"#6B7280"},stroke:"#374151",width:40}),l.jsx(Kr,{content:({active:t,payload:n})=>t&&(n!=null&&n.length)?l.jsxs("div",{className:"bg-neutral-900 border border-neutral-800 p-2 rounded-lg shadow-lg",children:[l.jsx("p",{className:"text-sm text-neutral-300",children:`Upload: ${n[0].value.toFixed(1)} KB/s`}),l.jsx("p",{className:"text-sm text-neutral-300",children:`Download: ${n[1].value.toFixed(1)} KB/s`}),l.jsx("p",{className:"text-xs text-neutral-500",children:n[0].payload.time})]}):null}),l.jsx(kc,{type:"monotone",dataKey:"up",stroke:ed.network,strokeWidth:2,dot:!1,isAnimationActive:!1}),l.jsx(kc,{type:"monotone",dataKey:"down",stroke:"#60A5FA",strokeWidth:2,dot:!1,isAnimationActive:!1})]})})}),JAe=e=>e.replace(/\u001b\[(\d+)m/g,(t,n)=>``).replace(/\u001b\[0m/g,"").replace(/\n/g,"
");function eEe(){var k,M,$,D,B,I,R,F,z,U,W,Z,ae;const{id:e}=Ui(),t=g.useRef(null),[n,r]=g.useState("offline"),[i,a]=g.useState([]),[o,s]=g.useState(""),[c,u]=g.useState([]),[d,f]=g.useState(-1),[h,p]=g.useState(0),[v,m]=g.useState({cpu:[],memory:[],disk:[],network:[]}),[y,b]=g.useState({cpu:0,memory:0,disk:0,network:{up:0,down:0},uptime:"0h 0m 0s"});g.useRef(null);const x=g.useRef(!0),{data:w,error:P}=kt({queryKey:["server",e],queryFn:async()=>{const{data:ee}=await ie.get(`/api/server/${e}`);return ee.attributes}}),S=g.useCallback(ee=>{var K,se;if(x.current)try{const X=JSON.parse(ee.data);switch(X.event){case"auth success":(K=t.current)==null||K.send(JSON.stringify({event:"send logs",args:[null]})),(se=t.current)==null||se.send(JSON.stringify({event:"send stats",args:[null]}));break;case"console output":a(te=>[...te.slice(-1e3),X.args[0]]);break;case"stats":const J=JSON.parse(X.args[0]);if(!J||!x.current)return;b(te=>{var V,Se;return{...te,cpu:(J.cpu_absolute||0).toFixed(1),memory:(J.memory_bytes/1024/1024||0).toFixed(0),disk:(J.disk_bytes/1024/1024||0).toFixed(0),network:{up:(((V=J.network)==null?void 0:V.tx_bytes)/1024||0).toFixed(2),down:(((Se=J.network)==null?void 0:Se.rx_bytes)/1024||0).toFixed(2)}}});break;case"status":r(X.args[0]);break}}catch(X){console.error("WebSocket message handling error:",X)}},[]);g.useEffect(()=>{x.current=!0;const ee=async()=>{try{if(!x.current)return;const{data:K}=await ie.get(`/api/server/${e}/websocket`),se=new WebSocket(K.data.socket);se.onopen=()=>{if(!x.current){se.close();return}console.log("WebSocket connected"),p(0),se.send(JSON.stringify({event:"auth",args:[K.data.token]}))},se.onmessage=S,se.onclose=()=>{x.current&&(console.log("WebSocket disconnected"),h{x.current&&(p(X=>X+1),ee())},XAe))},se.onerror=X=>{console.error("WebSocket error:",X)},t.current=se}catch(K){console.error("WebSocket connection error:",K)}};return ee(),()=>{x.current=!1,t.current&&(t.current.close(),t.current=null)}},[e,h,S]),g.useEffect(()=>{if(!x.current)return;const ee=new Date().toLocaleTimeString();m(K=>({cpu:[...K.cpu.slice(-pp),{time:ee,value:parseFloat(y.cpu)}],memory:[...K.memory.slice(-pp),{time:ee,value:parseFloat(y.memory)}],disk:[...K.disk.slice(-pp),{time:ee,value:parseFloat(y.disk)}],network:[...K.network.slice(-pp),{time:ee,up:parseFloat(y.network.up)||0,down:parseFloat(y.network.down)||0}]}))},[y]);const j=g.useRef(null),[C,O]=g.useState(!0);g.useEffect(()=>{if(C&&j.current){const ee=j.current.querySelector("[data-radix-scroll-area-viewport]");ee&&setTimeout(()=>{ee.scrollTo({top:ee.scrollHeight,behavior:"instant"})},0)}},[i,C]);const A=g.useCallback(ee=>{const K=ee.currentTarget,se=Math.abs(K.scrollHeight-K.clientHeight-K.scrollTop)<50;O(se)},[]),E=ee=>{ee==null||ee.preventDefault(),!(!o.trim()||!t.current)&&(t.current.send(JSON.stringify({event:"send command",args:[o]})),u(K=>[o,...K.slice(0,99)]),s(""),f(-1))},_=ee=>{ee.key==="ArrowUp"?(ee.preventDefault(),f(K=>{if(K{if(K>-1){const se=K-1;return s(se===-1?"":c[se]),se}return K}))},N=ee=>{var K;((K=t.current)==null?void 0:K.readyState)===WebSocket.OPEN&&t.current.send(JSON.stringify({event:"set state",args:[ee]}))};return w?P?l.jsx("div",{className:"flex items-center justify-center min-h-[400px] text-red-400",children:"Failed to load server data"}):l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:w==null?void 0:w.name}),l.jsx(qt,{variant:n==="running"?"success":n==="starting"?"warning":"secondary",className:"rounded-md",children:n.toUpperCase()})]}),l.jsx(oS,{children:l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(Y,{variant:"outline",size:"icon",onClick:()=>N("start"),disabled:["starting","running"].includes(n),children:l.jsx(yD,{className:"w-4 h-4"})})}),l.jsx(Bl,{children:"Start Server"})]}),l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(Y,{variant:"outline",size:"icon",onClick:()=>N("restart"),disabled:!["running"].includes(n),children:l.jsx(xD,{className:"w-4 h-4"})})}),l.jsx(Bl,{children:"Restart Server"})]}),l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(Y,{variant:"outline",size:"icon",onClick:()=>N("stop"),disabled:!["running"].includes(n),children:l.jsx(SD,{className:"w-4 h-4"})})}),l.jsx(Bl,{children:"Stop Server"})]})]})})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-4 gap-4",children:[l.jsx(mp,{icon:hg,title:"CPU Usage",value:`${(y==null?void 0:y.cpu)??0}%`,secondaryValue:`${((k=w==null?void 0:w.limits)==null?void 0:k.cpu)??0}% Limit`,chartData:v.cpu,dataKey:"value",color:ed.cpu,unit:"%",domain:[0,100]}),l.jsx(mp,{icon:Zf,title:"Memory Usage",value:`${y.memory} MB`,secondaryValue:`${w==null?void 0:w.limits.memory} MB Limit`,chartData:v.memory,dataKey:"value",color:ed.memory,unit:" MB",domain:[0,w==null?void 0:w.limits.memory]}),l.jsx(mp,{icon:Qf,title:"Storage Usage",value:`${y.disk} MB`,secondaryValue:`${(w==null?void 0:w.limits.disk)===0?"∞":(w==null?void 0:w.limits.disk)+" MB"} Limit`,chartData:v.disk,dataKey:"value",color:ed.disk,unit:" MB",domain:w!=null&&w.limits.disk?[0,w.limits.disk]:void 0}),l.jsx(mp,{icon:oE,title:"Network Traffic",value:`↑${y.network.up} KB/s`,secondaryValue:`↓${y.network.down} KB/s`,chartData:v.network,dataKey:"up",color:ed.network,unit:" KB/s",Chart:ZAe})]}),l.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-12 gap-6",children:[l.jsx("div",{className:"xl:col-span-9",children:l.jsx(ve,{className:"border-neutral-800/50",children:l.jsxs(ZC,{defaultValue:"console",className:"w-full",children:[l.jsx(je,{className:"border-b border-neutral-800/50",children:l.jsx("div",{className:"flex items-center justify-between",children:l.jsxs($y,{className:"bg-neutral-900",children:[l.jsxs(po,{value:"console",className:"gap-2",children:[l.jsx(pg,{className:"w-4 h-4"}),"Console"]}),l.jsxs(po,{value:"stats",className:"gap-2",children:[l.jsx(T7,{className:"w-4 h-4"}),"Statistics"]})]})})}),l.jsx(mo,{value:"console",className:"m-0",children:l.jsxs(xe,{className:"p-0",children:[l.jsx(fr,{ref:j,className:"h-[600px] p-4 font-['JetBrains_Mono'] text-sm bg-neutral-950/50",onScroll:A,children:i.map((ee,K)=>l.jsx("div",{className:"py-0.5 font-['JetBrains_Mono']",dangerouslySetInnerHTML:{__html:JAe(ee)}},K))}),l.jsxs("div",{className:"p-4 border-t border-neutral-800/50",children:[l.jsx("div",{className:"flex items-center gap-2 mb-2",children:l.jsxs(Y,{variant:"ghost",size:"sm",className:"h-8 hidden",onClick:()=>O(!C),children:[l.jsx(Ve,{className:`w-4 h-4 mr-2 ${C?"text-green-500":"text-neutral-500"}`}),"Auto-scroll ",C?"enabled":"disabled"]})}),l.jsxs("form",{onSubmit:E,className:"flex gap-2",children:[l.jsx(Ce,{value:o,onChange:ee=>s(ee.target.value),onKeyDown:_,placeholder:"Type a command...",className:"flex-1 bg-neutral-950/50 border-neutral-800/50"}),l.jsx(Y,{type:"submit",children:"Send"})]})]})]})}),l.jsx(mo,{value:"stats",className:"m-0",children:l.jsx(xe,{className:"p-4",children:l.jsx("div",{className:"space-y-6",children:l.jsxs("div",{className:"grid gap-4",children:[l.jsx("div",{className:"flex items-center gap-3",children:l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"Uptime"}),l.jsx("p",{className:"text-sm text-white font-medium",children:y.uptime||"-"})]})}),l.jsx("div",{className:"flex items-center gap-3",children:l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"Status"}),l.jsx("p",{className:"text-sm text-white font-medium",children:n})]})})]})})})})]})})}),l.jsx("div",{className:"xl:col-span-3 space-y-6",children:l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"flex items-center gap-2 text-base",children:"Server information"})}),l.jsx(xe,{className:"space-y-4",children:l.jsxs("div",{className:"grid gap-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(va,{className:"w-4 h-4 text-neutral-400"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"Node"}),l.jsx("p",{className:"text-sm text-white font-medium",children:w==null?void 0:w.node})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(oE,{className:"w-4 h-4 text-neutral-400"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"IP Address"}),l.jsxs("p",{className:"text-sm text-white font-medium",children:[(I=(B=(D=($=(M=w==null?void 0:w.relationships)==null?void 0:M.allocations)==null?void 0:$.data)==null?void 0:D[0])==null?void 0:B.attributes)==null?void 0:I.ip_alias,":",(W=(U=(z=(F=(R=w==null?void 0:w.relationships)==null?void 0:R.allocations)==null?void 0:F.data)==null?void 0:z[0])==null?void 0:U.attributes)==null?void 0:W.port]})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(iH,{className:"w-4 h-4 text-neutral-400"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"SFTP"}),l.jsxs("p",{className:"text-sm text-white font-medium",children:[((Z=w==null?void 0:w.sftp_details)==null?void 0:Z.ip)||"-",":",((ae=w==null?void 0:w.sftp_details)==null?void 0:ae.port)||"-"]})]})]})]})})]})})]})]}):l.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})})}function tEe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nM(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function rEe(e,t){if(e==null)return{};var n=nEe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iEe(e,t){return aEe(e)||oEe(e,t)||sEe(e,t)||lEe()}function aEe(e){if(Array.isArray(e))return e}function oEe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,a=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function sEe(e,t){if(e){if(typeof e=="string")return rM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rM(e,t)}}function rM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,i):function(){for(var o=arguments.length,s=new Array(o),c=0;c1&&arguments[1]!==void 0?arguments[1]:{};vp.initial(e),vp.handler(t);var n={current:e},r=td(SEe)(n,t),i=td(wEe)(n),a=td(vp.changes)(e),o=td(bEe)(n);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return vp.selector(u),u(n.current)}function c(u){uEe(r,i,a,o)(u)}return[s,c]}function bEe(e,t){return Bf(t)?t(e.current):t}function wEe(e,t){return e.current=aM(aM({},e.current),t),t}function SEe(e,t,n){return Bf(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var jEe={create:xEe},PEe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function CEe(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),a=0;a=e.length?e.apply(this,i):function(){for(var o=arguments.length,s=new Array(o),c=0;c{r.current=!1}:e,t)}var Zn=XEe;function Pd(){}function Pl(e,t,n,r){return QEe(e,r)||ZEe(e,t,n,r)}function QEe(e,t){return e.editor.getModel(oU(e,t))}function ZEe(e,t,n,r){return e.editor.createModel(t,n,r?oU(e,r):void 0)}function oU(e,t){return e.Uri.parse(t)}function JEe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:a,modifiedModelPath:o,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:f={},height:h="100%",width:p="100%",className:v,wrapperProps:m={},beforeMount:y=Pd,onMount:b=Pd}){let[x,w]=g.useState(!1),[P,S]=g.useState(!0),j=g.useRef(null),C=g.useRef(null),O=g.useRef(null),A=g.useRef(b),E=g.useRef(y),_=g.useRef(!1);aU(()=>{let $=rU.init();return $.then(D=>(C.current=D)&&S(!1)).catch(D=>(D==null?void 0:D.type)!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>j.current?M():$.cancel()}),Zn(()=>{if(j.current&&C.current){let $=j.current.getOriginalEditor(),D=Pl(C.current,e||"",r||n||"text",a||"");D!==$.getModel()&&$.setModel(D)}},[a],x),Zn(()=>{if(j.current&&C.current){let $=j.current.getModifiedEditor(),D=Pl(C.current,t||"",i||n||"text",o||"");D!==$.getModel()&&$.setModel(D)}},[o],x),Zn(()=>{let $=j.current.getModifiedEditor();$.getOption(C.current.editor.EditorOption.readOnly)?$.setValue(t||""):t!==$.getValue()&&($.executeEdits("",[{range:$.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),$.pushUndoStop())},[t],x),Zn(()=>{var $,D;(D=($=j.current)==null?void 0:$.getModel())==null||D.original.setValue(e||"")},[e],x),Zn(()=>{let{original:$,modified:D}=j.current.getModel();C.current.editor.setModelLanguage($,r||n||"text"),C.current.editor.setModelLanguage(D,i||n||"text")},[n,r,i],x),Zn(()=>{var $;($=C.current)==null||$.editor.setTheme(u)},[u],x),Zn(()=>{var $;($=j.current)==null||$.updateOptions(f)},[f],x);let N=g.useCallback(()=>{var B;if(!C.current)return;E.current(C.current);let $=Pl(C.current,e||"",r||n||"text",a||""),D=Pl(C.current,t||"",i||n||"text",o||"");(B=j.current)==null||B.setModel({original:$,modified:D})},[n,t,i,e,r,a,o]),k=g.useCallback(()=>{var $;!_.current&&O.current&&(j.current=C.current.editor.createDiffEditor(O.current,{automaticLayout:!0,...f}),N(),($=C.current)==null||$.editor.setTheme(u),w(!0),_.current=!0)},[f,u,N]);g.useEffect(()=>{x&&A.current(j.current,C.current)},[x]),g.useEffect(()=>{!P&&!x&&k()},[P,x,k]);function M(){var D,B,I,R;let $=(D=j.current)==null?void 0:D.getModel();s||((B=$==null?void 0:$.original)==null||B.dispose()),c||((I=$==null?void 0:$.modified)==null||I.dispose()),(R=j.current)==null||R.dispose()}return T.createElement(iU,{width:p,height:h,isEditorReady:x,loading:d,_ref:O,className:v,wrapperProps:m})}var eNe=JEe;g.memo(eNe);function tNe(e){let t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}var nNe=tNe,gp=new Map;function rNe({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:a,theme:o="light",line:s,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:h=!1,width:p="100%",height:v="100%",className:m,wrapperProps:y={},beforeMount:b=Pd,onMount:x=Pd,onChange:w,onValidate:P=Pd}){let[S,j]=g.useState(!1),[C,O]=g.useState(!0),A=g.useRef(null),E=g.useRef(null),_=g.useRef(null),N=g.useRef(x),k=g.useRef(b),M=g.useRef(),$=g.useRef(r),D=nNe(a),B=g.useRef(!1),I=g.useRef(!1);aU(()=>{let z=rU.init();return z.then(U=>(A.current=U)&&O(!1)).catch(U=>(U==null?void 0:U.type)!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>E.current?F():z.cancel()}),Zn(()=>{var U,W,Z,ae;let z=Pl(A.current,e||r||"",t||i||"",a||n||"");z!==((U=E.current)==null?void 0:U.getModel())&&(f&&gp.set(D,(W=E.current)==null?void 0:W.saveViewState()),(Z=E.current)==null||Z.setModel(z),f&&((ae=E.current)==null||ae.restoreViewState(gp.get(a))))},[a],S),Zn(()=>{var z;(z=E.current)==null||z.updateOptions(u)},[u],S),Zn(()=>{!E.current||r===void 0||(E.current.getOption(A.current.editor.EditorOption.readOnly)?E.current.setValue(r):r!==E.current.getValue()&&(I.current=!0,E.current.executeEdits("",[{range:E.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),E.current.pushUndoStop(),I.current=!1))},[r],S),Zn(()=>{var U,W;let z=(U=E.current)==null?void 0:U.getModel();z&&i&&((W=A.current)==null||W.editor.setModelLanguage(z,i))},[i],S),Zn(()=>{var z;s!==void 0&&((z=E.current)==null||z.revealLine(s))},[s],S),Zn(()=>{var z;(z=A.current)==null||z.editor.setTheme(o)},[o],S);let R=g.useCallback(()=>{var z;if(!(!_.current||!A.current)&&!B.current){k.current(A.current);let U=a||n,W=Pl(A.current,r||e||"",t||i||"",U||"");E.current=(z=A.current)==null?void 0:z.editor.create(_.current,{model:W,automaticLayout:!0,...u},d),f&&E.current.restoreViewState(gp.get(U)),A.current.editor.setTheme(o),s!==void 0&&E.current.revealLine(s),j(!0),B.current=!0}},[e,t,n,r,i,a,u,d,f,o,s]);g.useEffect(()=>{S&&N.current(E.current,A.current)},[S]),g.useEffect(()=>{!C&&!S&&R()},[C,S,R]),$.current=r,g.useEffect(()=>{var z,U;S&&w&&((z=M.current)==null||z.dispose(),M.current=(U=E.current)==null?void 0:U.onDidChangeModelContent(W=>{I.current||w(E.current.getValue(),W)}))},[S,w]),g.useEffect(()=>{if(S){let z=A.current.editor.onDidChangeMarkers(U=>{var Z;let W=(Z=E.current.getModel())==null?void 0:Z.uri;if(W&&U.find(ae=>ae.path===W.path)){let ae=A.current.editor.getModelMarkers({resource:W});P==null||P(ae)}});return()=>{z==null||z.dispose()}}return()=>{}},[S,P]);function F(){var z,U;(z=M.current)==null||z.dispose(),h?f&&gp.set(a,E.current.saveViewState()):(U=E.current.getModel())==null||U.dispose(),E.current.dispose()}return T.createElement(iU,{width:p,height:v,isEditorReady:S,loading:c,_ref:_,className:m,wrapperProps:y})}var iNe=rNe,aNe=g.memo(iNe),rO="Dialog",[sU,lU]=un(rO),[oNe,si]=sU(rO),cU=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=g.useRef(null),c=g.useRef(null),[u=!1,d]=_r({prop:r,defaultProp:i,onChange:a});return l.jsx(oNe,{scope:t,triggerRef:s,contentRef:c,contentId:ir(),titleId:ir(),descriptionId:ir(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:o,children:n})};cU.displayName=rO;var uU="DialogTrigger",dU=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=si(uU,n),a=_e(t,i.triggerRef);return l.jsx(pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":oO(i.open),...r,ref:a,onClick:ne(e.onClick,i.onOpenToggle)})});dU.displayName=uU;var iO="DialogPortal",[sNe,fU]=sU(iO,{forceMount:void 0}),hU=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=si(iO,t);return l.jsx(sNe,{scope:t,forceMount:n,children:g.Children.map(r,o=>l.jsx(Zt,{present:n||a.open,children:l.jsx(oh,{asChild:!0,container:i,children:o})}))})};hU.displayName=iO;var zv="DialogOverlay",pU=g.forwardRef((e,t)=>{const n=fU(zv,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=si(zv,e.__scopeDialog);return a.modal?l.jsx(Zt,{present:r||a.open,children:l.jsx(lNe,{...i,ref:t})}):null});pU.displayName=zv;var lNe=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=si(zv,n);return l.jsx(Ig,{as:wo,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(pe.div,{"data-state":oO(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),$s="DialogContent",mU=g.forwardRef((e,t)=>{const n=fU($s,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=si($s,e.__scopeDialog);return l.jsx(Zt,{present:r||a.open,children:a.modal?l.jsx(cNe,{...i,ref:t}):l.jsx(uNe,{...i,ref:t})})});mU.displayName=$s;var cNe=g.forwardRef((e,t)=>{const n=si($s,e.__scopeDialog),r=g.useRef(null),i=_e(t,n.contentRef,r);return g.useEffect(()=>{const a=r.current;if(a)return NP(a)},[]),l.jsx(vU,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ne(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:ne(e.onFocusOutside,a=>a.preventDefault())})}),uNe=g.forwardRef((e,t)=>{const n=si($s,e.__scopeDialog),r=g.useRef(!1),i=g.useRef(!1);return l.jsx(vU,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),vU=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=si($s,n),c=g.useRef(null),u=_e(t,c);return xP(),l.jsxs(l.Fragment,{children:[l.jsx(Og,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(Jc,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":oO(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(fNe,{titleId:s.titleId}),l.jsx(pNe,{contentRef:c,descriptionId:s.descriptionId})]})]})}),aO="DialogTitle",gU=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=si(aO,n);return l.jsx(pe.h2,{id:i.titleId,...r,ref:t})});gU.displayName=aO;var yU="DialogDescription",xU=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=si(yU,n);return l.jsx(pe.p,{id:i.descriptionId,...r,ref:t})});xU.displayName=yU;var bU="DialogClose",wU=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=si(bU,n);return l.jsx(pe.button,{type:"button",...r,ref:t,onClick:ne(e.onClick,()=>i.onOpenChange(!1))})});wU.displayName=bU;function oO(e){return e?"open":"closed"}var SU="DialogTitleWarning",[dNe,jU]=BH(SU,{contentName:$s,titleName:aO,docsSlug:"dialog"}),fNe=({titleId:e})=>{const t=jU(SU),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},hNe="DialogDescriptionWarning",pNe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jU(hNe).contentName}}.`;return g.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},PU=cU,mNe=dU,CU=hU,sO=pU,lO=mU,cO=gU,uO=xU,dO=wU;const vt=PU,vNe=CU,OU=g.forwardRef(({className:e,...t},n)=>l.jsx(sO,{ref:n,className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));OU.displayName=sO.displayName;const lt=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(vNe,{children:[l.jsx(OU,{}),l.jsxs(lO,{ref:r,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(dO,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(PD,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));lt.displayName=lO.displayName;const ct=({className:e,...t})=>l.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ct.displayName="DialogHeader";const Ht=({className:e,...t})=>l.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ht.displayName="DialogFooter";const ut=g.forwardRef(({className:e,...t},n)=>l.jsx(cO,{ref:n,className:le("text-lg font-semibold leading-none tracking-tight",e),...t}));ut.displayName=cO.displayName;const Wt=g.forwardRef(({className:e,...t},n)=>l.jsx(uO,{ref:n,className:le("text-sm text-muted-foreground",e),...t}));Wt.displayName=uO.displayName;const gNe=xg("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),At=g.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("div",{ref:r,role:"alert",className:le(gNe({variant:t}),e),...n}));At.displayName="Alert";const AU=g.forwardRef(({className:e,...t},n)=>l.jsx("h5",{ref:n,className:le("mb-1 font-medium leading-none tracking-tight",e),...t}));AU.displayName="AlertTitle";const Et=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("text-sm [&_p]:leading-relaxed",e),...t}));Et.displayName="AlertDescription";var yNe="Label",EU=g.forwardRef((e,t)=>l.jsx(pe.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));EU.displayName=yNe;var NU=EU;const xNe=xg("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Zr=g.forwardRef(({className:e,...t},n)=>l.jsx(NU,{ref:n,className:le(xNe(),e),...t}));Zr.displayName=NU.displayName;const Hi=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:le("w-full caption-bottom text-sm",e),...t})}));Hi.displayName="Table";const Ki=g.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:le("[&_tr]:border-b",e),...t}));Ki.displayName="TableHeader";const qi=g.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:le("[&_tr:last-child]:border-0",e),...t}));qi.displayName="TableBody";const bNe=g.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:le("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));bNe.displayName="TableFooter";const rt=g.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:le("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));rt.displayName="TableRow";const Oe=g.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:le("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Oe.displayName="TableHead";const he=g.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:le("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));he.displayName="TableCell";const wNe=g.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:le("mt-4 text-sm text-muted-foreground",e),...t}));wNe.displayName="TableCaption";var fO="Progress",hO=100,[SNe,__e]=un(fO),[jNe,PNe]=SNe(fO),TU=g.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=CNe,...o}=e;(i||i===0)&&!sM(i)&&console.error(ONe(`${i}`,"Progress"));const s=sM(i)?i:hO;r!==null&&!lM(r,s)&&console.error(ANe(`${r}`,"Progress"));const c=lM(r,s)?r:null,u=Vv(c)?a(c,s):void 0;return l.jsx(jNe,{scope:n,value:c,max:s,children:l.jsx(pe.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Vv(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":MU(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});TU.displayName=fO;var _U="ProgressIndicator",kU=g.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=PNe(_U,n);return l.jsx(pe.div,{"data-state":MU(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});kU.displayName=_U;function CNe(e,t){return`${Math.round(e/t*100)}%`}function MU(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Vv(e){return typeof e=="number"}function sM(e){return Vv(e)&&!isNaN(e)&&e>0}function lM(e,t){return Vv(e)&&!isNaN(e)&&e<=t&&e>=0}function ONe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${hO}\`.`}function ANe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: - - a positive number - - less than the value passed to \`max\` (or ${hO} if no \`max\` prop is set) - - \`null\` or \`undefined\` if the progress is indeterminate. - -Defaulting to \`null\`.`}var RU=TU,ENe=kU;const Ss=g.forwardRef(({className:e,value:t,...n},r)=>l.jsx(RU,{ref:r,className:le("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:l.jsx(ENe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ss.displayName=RU.displayName;function $U(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var pO="Checkbox",[NNe,k_e]=un(pO),[TNe,_Ne]=NNe(pO),DU=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c="on",onCheckedChange:u,form:d,...f}=e,[h,p]=g.useState(null),v=_e(t,P=>p(P)),m=g.useRef(!1),y=h?d||!!h.closest("form"):!0,[b=!1,x]=_r({prop:i,defaultProp:a,onChange:u}),w=g.useRef(b);return g.useEffect(()=>{const P=h==null?void 0:h.form;if(P){const S=()=>x(w.current);return P.addEventListener("reset",S),()=>P.removeEventListener("reset",S)}},[h,x]),l.jsxs(TNe,{scope:n,state:b,disabled:s,children:[l.jsx(pe.button,{type:"button",role:"checkbox","aria-checked":go(b)?"mixed":b,"aria-required":o,"data-state":FU(b),"data-disabled":s?"":void 0,disabled:s,value:c,...f,ref:v,onKeyDown:ne(e.onKeyDown,P=>{P.key==="Enter"&&P.preventDefault()}),onClick:ne(e.onClick,P=>{x(S=>go(S)?!0:!S),y&&(m.current=P.isPropagationStopped(),m.current||P.stopPropagation())})}),y&&l.jsx(kNe,{control:h,bubbles:!m.current,name:r,value:c,checked:b,required:o,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:go(a)?!1:a})]})});DU.displayName=pO;var IU="CheckboxIndicator",LU=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=_Ne(IU,n);return l.jsx(Zt,{present:r||go(a.state)||a.state===!0,children:l.jsx(pe.span,{"data-state":FU(a.state),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});LU.displayName=IU;var kNe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...a}=e,o=g.useRef(null),s=$U(n),c=F4(t);g.useEffect(()=>{const d=o.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&p){const v=new Event("click",{bubbles:r});d.indeterminate=go(n),p.call(d,go(n)?!1:n),d.dispatchEvent(v)}},[s,n,r]);const u=g.useRef(go(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??u.current,...a,tabIndex:-1,ref:o,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function go(e){return e==="indeterminate"}function FU(e){return go(e)?"indeterminate":e?"checked":"unchecked"}var BU=DU,MNe=LU;const Wv=g.forwardRef(({className:e,...t},n)=>l.jsx(BU,{ref:n,className:le("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(MNe,{className:le("flex items-center justify-center text-current"),children:l.jsx(Gc,{className:"h-4 w-4"})})}));Wv.displayName=BU.displayName;const RNe=1,$Ne=1e6;let Vx=0;function DNe(){return Vx=(Vx+1)%Number.MAX_SAFE_INTEGER,Vx.toString()}const Wx=new Map,cM=e=>{if(Wx.has(e))return;const t=setTimeout(()=>{Wx.delete(e),Cd({type:"REMOVE_TOAST",toastId:e})},$Ne);Wx.set(e,t)},INe=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,RNe)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?cM(n):e.toasts.forEach(r=>{cM(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Vp=[];let Wp={toasts:[]};function Cd(e){Wp=INe(Wp,e),Vp.forEach(t=>{t(Wp)})}function hS({...e}){const t=DNe(),n=i=>Cd({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Cd({type:"DISMISS_TOAST",toastId:t});return Cd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function LNe(){const[e,t]=g.useState(Wp);return g.useEffect(()=>(Vp.push(t),()=>{const n=Vp.indexOf(t);n>-1&&Vp.splice(n,1)}),[e]),{...e,toast:hS,dismiss:n=>Cd({type:"DISMISS_TOAST",toastId:n})}}const FNe=e=>{if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,n)).toFixed(1)} ${t[n]}`},BNe=e=>{const t=new Date(e);return new Intl.DateTimeFormat("en-US",{dateStyle:"medium",timeStyle:"short"}).format(t)},UNe=e=>{var r;const t=(r=e.split(".").pop())==null?void 0:r.toLowerCase();return{js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",java:"java",json:"json",xml:"xml",html:"html",css:"css",md:"markdown",yml:"yaml",yaml:"yaml",sh:"shell",bash:"shell",txt:"plaintext",properties:"properties",ini:"ini",sql:"sql",php:"php",rb:"ruby",rs:"rust",go:"go",c:"c",cpp:"cpp",cs:"csharp"}[t]||"plaintext"},uM=e=>{var i,a,o;if(!(e!=null&&e.is_file))return l.jsx(gD,{className:"h-4 w-4 text-blue-500"});const t=(i=e.name.split(".").pop())==null?void 0:i.toLowerCase(),n=["js","jsx","ts","tsx","py","java","php","rb","go","rs","c","cpp","cs"],r=["zip","tar","gz","rar","7z"];return n.includes(t)?l.jsx(wm,{className:"h-4 w-4 text-violet-500"}):r.includes(t)?l.jsx(vs,{className:"h-4 w-4 text-yellow-500"}):(a=e.mimetype)!=null&&a.includes("json")?l.jsx(M7,{className:"h-4 w-4 text-green-500"}):(o=e.mimetype)!=null&&o.includes("text")?l.jsx(vD,{className:"h-4 w-4 text-orange-500"}):["jar","exe","bin","dll"].includes(t)?l.jsx(b7,{className:"h-4 w-4 text-purple-500"}):l.jsx($7,{className:"h-4 w-4 text-gray-500"})},zNe=()=>{const{id:e}=Ui(),[t,n]=g.useState([]),[r,i]=g.useState("/"),[a,o]=g.useState(["/"]),[s,c]=g.useState(!1),[u,d]=g.useState(null),[f,h]=g.useState(null),[p,v]=g.useState([]),[m,y]=g.useState(!1),[b,x]=g.useState(null),[w,P]=g.useState(""),[S,j]=g.useState(!1),[C,O]=g.useState(0),[A,E]=g.useState(!1),[_,N]=g.useState({oldName:"",newName:""}),[k,M]=g.useState(!1),[$,D]=g.useState(""),[B,I]=g.useState("plaintext"),[R,F]=g.useState(!1),[z,U]=g.useState(!1),W=g.useCallback(q=>(q=q.replace(/\/+/g,"/"),q.endsWith("/")?q:`${q}/`),[]),Z=g.useCallback((...q)=>W(q.join("/")),[W]),ae=g.useCallback((q,ue=null)=>{var $e,Mt;console.error("Operation failed:",q);const we=ue||((Mt=($e=q==null?void 0:q.response)==null?void 0:$e.data)==null?void 0:Mt.error)||q.message||"Operation failed";d(we),hS({variant:"destructive",title:"Error",description:we,duration:5e3})},[]),ee=g.useCallback(q=>{hS({title:"Success",description:q,duration:3e3})},[]),K=g.useCallback(async(q="/")=>{c(!0),d(null);try{const ue=W(q),we=await fetch(`/api/server/${e}/files/list?directory=${encodeURIComponent(ue)}`);if(!we.ok)throw new Error(`Failed to fetch files: ${we.statusText}`);const $e=await we.json();if($e.object==="list"){n($e.data.map(jn=>jn.attributes)),i(ue);const Mt=ue==="/"?["/"]:["/",...ue.split("/").filter(Boolean)];o(Mt)}else throw new Error("Invalid response format")}catch(ue){ae(ue,"Failed to fetch files")}finally{c(!1)}},[e,W,ae]),se=g.useCallback(async q=>{try{c(!0);const ue=Z(r,q.name),we=await fetch(`/api/server/${e}/files/contents?file=${encodeURIComponent(ue)}`);if(!we.ok)throw new Error(`Failed to fetch file contents: ${we.statusText}`);const $e=await we.text();I(UNe(q.name)),D($e),h(q),F(!1)}catch(ue){ae(ue,"Failed to view file contents")}finally{c(!1)}},[e,r,Z,ae]),X=async()=>{if(f)try{U(!0);const q=Z(r,f.name),ue=await fetch(`/api/server/${e}/files/write?file=${encodeURIComponent(q)}`,{method:"POST",body:$});if(!ue.ok)throw new Error(`Failed to save file: ${ue.statusText}`);ee("File saved successfully"),F(!1)}catch(q){ae(q,"Failed to save file")}finally{U(!1)}},J=async()=>{if(!w.trim()){ae(new Error("Name cannot be empty"));return}try{const q=W(r);if(b==="folder"){const ue=await fetch(`/api/server/${e}/files/create-folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:q,name:w})});if(!ue.ok)throw new Error(`Failed to create folder: ${ue.statusText}`)}else{const ue=Z(r,w),we=await fetch(`/api/server/${e}/files/write?file=${encodeURIComponent(ue)}`,{method:"POST",body:" "});if(!we.ok)throw new Error(`Failed to create file: ${we.statusText}`)}ee(`${b==="folder"?"Folder":"File"} created successfully`),K(q),y(!1),P(""),x(null)}catch(q){ae(q,`Failed to create ${b}`)}},te=async()=>{if(!_.newName.trim()){ae(new Error("New name cannot be empty"));return}try{const q=W(r),ue=await fetch(`/api/server/${e}/files/rename`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:q,files:[{from:_.oldName,to:_.newName}]})});if(!ue.ok)throw new Error(`Failed to rename file: ${ue.statusText}`);ee("File renamed successfully"),K(q),E(!1),N({oldName:"",newName:""})}catch(q){ae(q,"Failed to rename file")}},V=async q=>{const ue=Array.isArray(q)?q:[q];try{const we=W(r),$e=await fetch(`/api/server/${e}/files/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:we,files:ue})});if(!$e.ok)throw new Error(`Failed to delete files: ${$e.statusText}`);ee(ue.length>1?`${ue.length} files deleted`:"File deleted successfully"),K(we),v([])}catch(we){ae(we,"Failed to delete file(s)")}},Se=async q=>{const ue=Array.isArray(q)?q:[q];try{const we=W(r),$e=await fetch(`/api/server/${e}/files/compress`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:we,files:ue})});if(!$e.ok)throw new Error(`Failed to create archive: ${$e.statusText}`);ee("Files archived successfully"),K(we),M(!1),v([])}catch(we){ae(we,"Failed to archive files")}},be=async q=>{try{const ue=W(r),we=await fetch(`/api/server/${e}/files/decompress`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ue,file:q.name})});if(!we.ok)throw new Error(`Failed to unarchive file: ${we.statusText}`);ee("File unarchived successfully"),K(ue)}catch(ue){ae(ue,"Failed to unarchive file")}},Ue=async q=>{try{const ue=W(r),we=Z(ue,q.name),$e=await fetch(`/api/server/${e}/files/download?file=${encodeURIComponent(we)}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(!$e.ok)throw new Error(`Failed to get download URL: ${$e.statusText}`);const Mt=await $e.json();if(Mt.object==="signed_url"){const jn=document.createElement("a");jn.href=Mt.attributes.url,jn.download=q.name,document.body.appendChild(jn),jn.click(),document.body.removeChild(jn),ee("Download started")}else throw new Error("Invalid download URL response")}catch(ue){ae(ue,"Failed to download file")}},We=async q=>{const ue=Array.from(q.target.files);if(ue.length!==0)try{O(0);const we=W(r),$e=await fetch(`/api/server/${e}/files/upload`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(!$e.ok)throw new Error(`Failed to get upload URL: ${$e.statusText}`);const Mt=await $e.json();if(Mt.object!=="signed_url")throw new Error("Invalid upload URL response");const jn=new FormData;ue.forEach(li=>jn.append("files",li));const Gi=new XMLHttpRequest;Gi.open("POST",Mt.attributes.url),Gi.upload.onprogress=li=>{if(li.lengthComputable){const i0=Math.round(li.loaded/li.total*100);O(i0)}},Gi.onload=()=>{if(Gi.status===200)ee(`${ue.length} file(s) uploaded successfully`),K(we),j(!1),O(0);else throw new Error(`Upload failed with status: ${Gi.status}`)},Gi.onerror=()=>{throw new Error("Upload failed")},Gi.send(jn)}catch(we){ae(we,"Failed to upload file(s)"),O(0)}},Ye=g.useCallback(q=>{R?window.confirm("You have unsaved changes. Are you sure you want to navigate away?")&&(h(null),D(""),F(!1),K(q)):K(q)},[R,K]),tn=g.useCallback(()=>{if(r==="/")return;const q=r.split("/").slice(0,-2).join("/")||"/";Ye(q)},[r,Ye]);g.useEffect(()=>{K()},[K]),g.useEffect(()=>{const q=ue=>{(ue.ctrlKey||ue.metaKey)&&ue.key==="s"&&f&&(ue.preventDefault(),X())};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[f,X]);const dn=g.useCallback(q=>l.jsxs(tf,{children:[l.jsx(nf,{asChild:!0,children:l.jsx(Y,{variant:"ghost",size:"icon",children:l.jsx(pD,{className:"h-4 w-4"})})}),l.jsxs(fc,{align:"end",className:"w-48",children:[l.jsx(Bg,{children:"Actions"}),q.is_file&&l.jsxs(l.Fragment,{children:[l.jsxs(gn,{onClick:()=>se(q),children:[l.jsx(vD,{className:"mr-2 h-4 w-4"})," View/Edit"]}),l.jsxs(gn,{onClick:()=>Ue(q),children:[l.jsx(bm,{className:"mr-2 h-4 w-4"})," Download"]}),q.name.match(/\.(zip|tar|gz|rar|7z)$/i)?l.jsxs(gn,{onClick:()=>be(q),children:[l.jsx(vs,{className:"mr-2 h-4 w-4"})," Extract"]}):l.jsxs(gn,{onClick:()=>Se(q.name),children:[l.jsx(vs,{className:"mr-2 h-4 w-4"})," Archive"]}),l.jsx(LP,{})]}),l.jsxs(gn,{onClick:()=>{N({oldName:q.name,newName:q.name}),E(!0)},children:[l.jsx(H7,{className:"mr-2 h-4 w-4"})," Rename"]}),l.jsxs(gn,{className:"text-destructive focus:text-destructive",onClick:()=>V(q.name),children:[l.jsx(bo,{className:"mr-2 h-4 w-4"})," Delete"]})]})]}),[se,Ue,be,Se,V]);return l.jsxs("div",{className:"min-h-screen bg-background p-6",children:[l.jsxs(ve,{className:"max-w-[1600px] mx-auto",children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[r!=="/"&&l.jsx(oS,{children:l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(Y,{variant:"ghost",size:"icon",onClick:tn,children:l.jsx(hD,{className:"h-4 w-4"})})}),l.jsx(Bl,{children:"Go up"})]})}),l.jsx("div",{className:"flex items-center space-x-1",children:a.map((q,ue)=>l.jsxs(T.Fragment,{children:[l.jsx(Y,{variant:"ghost",className:"h-8 text-sm px-2 hover:bg-accent",onClick:()=>{const we=a.slice(0,ue+1).join("");Ye(we)},children:q==="/"?"Root":q}),ue{x("file"),y(!0)},children:[l.jsx(R7,{className:"mr-2 h-4 w-4"})," New File"]}),l.jsxs(gn,{onClick:()=>{x("folder"),y(!0)},children:[l.jsx(gD,{className:"mr-2 h-4 w-4"})," New Folder"]})]})]}),l.jsxs(Y,{variant:"outline",onClick:()=>j(!0),children:[l.jsx(rE,{className:"mr-2 h-4 w-4"})," Upload"]}),l.jsx(oS,{children:l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(Y,{variant:"outline",size:"icon",onClick:()=>K(r),disabled:s,children:l.jsx(G7,{className:`h-4 w-4 ${s?"animate-spin":""}`})})}),l.jsx(Bl,{children:"Refresh"})]})})]})]})}),l.jsxs(xe,{children:[u&&l.jsxs(At,{variant:"destructive",className:"mb-4",children:[l.jsx(jD,{className:"h-4 w-4"}),l.jsx(AU,{children:"Error"}),l.jsx(Et,{children:u})]}),l.jsx(fr,{className:"h-[600px] rounded-md border",children:l.jsxs(Hi,{children:[l.jsx(Ki,{children:l.jsxs(rt,{children:[l.jsx(Oe,{className:"w-12",children:l.jsx(Wv,{checked:t.length>0&&p.length===t.length,onCheckedChange:q=>{v(q?t.map(ue=>ue.name):[])}})}),l.jsx(Oe,{children:"Name"}),l.jsx(Oe,{children:"Size"}),l.jsx(Oe,{children:"Modified"}),l.jsx(Oe,{children:"Permissions"}),l.jsx(Oe,{className:"w-[100px]",children:"Actions"})]})}),l.jsxs(qi,{children:[t.map(q=>l.jsxs(rt,{className:p.includes(q.name)?"bg-accent":"",children:[l.jsx(he,{children:l.jsx(Wv,{checked:p.includes(q.name),onCheckedChange:ue=>{v(ue?[...p,q.name]:p.filter(we=>we!==q.name))}})}),l.jsx(he,{children:l.jsxs("div",{className:"flex items-center space-x-2 cursor-pointer hover:text-primary",onClick:()=>{q.is_file?se(q):Ye(Z(r,q.name))},children:[uM(q),l.jsx("span",{className:"font-medium",children:q.name})]})}),l.jsx(he,{children:FNe(q.size)}),l.jsx(he,{children:BNe(q.modified_at)}),l.jsx(he,{children:l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:q.mode})}),l.jsx(he,{children:dn(q)})]},q.name)),t.length===0&&!s&&l.jsx(rt,{children:l.jsx(he,{colSpan:6,className:"h-32 text-center text-muted-foreground",children:"This folder is empty"})})]})]})})]})]}),l.jsx(vt,{open:m,onOpenChange:y,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsxs(ut,{children:["Create New ",b==="folder"?"Folder":"File"]}),l.jsxs(Wt,{children:["Enter a name for the new ",b]})]}),l.jsx("div",{className:"grid gap-4 py-4",children:l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Zr,{htmlFor:"name",children:"Name"}),l.jsx(Ce,{id:"name",value:w,onChange:q=>P(q.target.value),placeholder:b==="folder"?"New Folder":"file.txt",onKeyDown:q=>{q.key==="Enter"&&J()}})]})}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"outline",onClick:()=>{y(!1),P(""),x(null)},children:"Cancel"}),l.jsx(Y,{onClick:J,disabled:!w.trim(),children:"Create"})]})]})}),l.jsx(vt,{open:S,onOpenChange:j,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Upload Files"}),l.jsx(Wt,{children:"Drag and drop files or click to select"})]}),l.jsxs("div",{className:"grid gap-4 py-4",children:[l.jsxs("div",{className:"border-2 border-dashed rounded-lg p-12 text-center cursor-pointer hover:border-primary transition-colors relative",onClick:()=>document.getElementById("file-upload").click(),onDragOver:q=>{q.preventDefault(),q.currentTarget.classList.add("border-primary")},onDragLeave:q=>{q.preventDefault(),q.currentTarget.classList.remove("border-primary")},onDrop:q=>{if(q.preventDefault(),q.currentTarget.classList.remove("border-primary"),Array.from(q.dataTransfer.files).length>0){const we=document.getElementById("file-upload");we.files=q.dataTransfer.files,We({target:we})}},children:[l.jsx(rE,{className:"h-12 w-12 mx-auto text-muted-foreground"}),l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Drop files here or click to browse"}),l.jsx("input",{id:"file-upload",type:"file",className:"hidden",multiple:!0,onChange:We})]}),C>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ss,{value:C,className:"w-full"}),l.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:[C,"% uploaded"]})]})]})]})}),l.jsx(vt,{open:f!==null,onOpenChange:q=>{!q&&R?window.confirm("You have unsaved changes. Are you sure you want to close?")&&(h(null),D(""),F(!1)):q||(h(null),D(""),F(!1))},children:l.jsxs(lt,{className:"max-w-6xl h-[80vh]",children:[l.jsx(ct,{children:l.jsxs(ut,{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[uM(f||{}),l.jsx("span",{children:f==null?void 0:f.name}),R&&l.jsx("span",{className:"text-sm text-muted-foreground",children:"(unsaved)"})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(Y,{variant:R?"default":"outline",size:"sm",onClick:X,disabled:!R||z,children:z?l.jsxs(l.Fragment,{children:[l.jsx(ji,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Yc,{className:"h-4 w-4 mr-2"}),"Save"]})}),l.jsx(Y,{variant:"ghost",size:"icon",onClick:()=>{R?window.confirm("You have unsaved changes. Are you sure you want to close?")&&(h(null),D(""),F(!1)):(h(null),D(""))},children:l.jsx(PD,{className:"h-4 w-4"})})]})]})}),l.jsx("div",{className:"h-[calc(80vh-8rem)]",children:l.jsx(aNe,{height:"100%",language:B,value:$,onChange:q=>{D(q||""),F(!0)},theme:"vs-dark",options:{minimap:{enabled:!0},fontSize:14,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,tabSize:2,renderWhitespace:"selection",cursorBlinking:"smooth",smoothScrolling:!0,bracketPairColorization:!0},loading:l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx(ji,{className:"h-8 w-8 animate-spin"})})})})]})}),l.jsx(vt,{open:A,onOpenChange:E,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Rename Item"}),l.jsx(Wt,{children:"Enter a new name for the item"})]}),l.jsx("div",{className:"grid gap-4 py-4",children:l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Zr,{htmlFor:"newName",children:"New name"}),l.jsx(Ce,{id:"newName",value:_.newName,onChange:q=>N({..._,newName:q.target.value}),onKeyDown:q=>{q.key==="Enter"&&te()}})]})}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"outline",onClick:()=>{E(!1),N({oldName:"",newName:""})},children:"Cancel"}),l.jsx(Y,{onClick:te,disabled:!_.newName.trim()||_.newName===_.oldName,children:"Rename"})]})]})}),l.jsx(vt,{open:k,onOpenChange:M,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Create Archive"}),l.jsxs(Wt,{children:[p.length," file(s) will be archived"]})]}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"outline",onClick:()=>{M(!1)},children:"Cancel"}),l.jsx(Y,{onClick:Se,children:"Create Archive"})]})]})}),p.length>0&&l.jsx("div",{className:"fixed bottom-6 left-1/2 transform -translate-x-1/2 z-50",children:l.jsx(ve,{className:"shadow-lg",children:l.jsxs(xe,{className:"flex items-center gap-4 p-4",children:[l.jsxs("span",{className:"text-sm text-muted-foreground",children:[p.length," item",p.length!==1?"s":""," selected"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>Se(p),children:[l.jsx(vs,{className:"h-4 w-4 mr-2"}),"Archive Selected"]}),l.jsxs(Y,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive-foreground hover:bg-destructive",onClick:()=>{window.confirm(`Are you sure you want to delete ${p.length} file(s)?`)&&V(p)},children:[l.jsx(bo,{className:"h-4 w-4 mr-2"}),"Delete Selected"]})]})]})})}),s&&l.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm flex items-center justify-center z-50",children:l.jsxs("div",{className:"flex items-center gap-2 bg-background p-4 rounded-lg shadow-lg",children:[l.jsx(ji,{className:"h-6 w-6 animate-spin"}),l.jsx("span",{className:"text-sm",children:"Loading..."})]})})]})},VNe=()=>{var S,j,C,O;const{id:e}=Ui(),[t,n]=g.useState([]),[r,i]=g.useState(""),[a,o]=g.useState(!1),[s,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(!1),[p,v]=g.useState({success:null,message:""}),[m,y]=g.useState(!1),b=async(A="")=>{o(!0),c(null);try{console.log("Fetching plugins with query:",A);const E=A?"/api/plugins/search":"/api/plugins/list",_=await ie.get(E,{params:{query:A}});console.log("Plugins fetched:",_.data),n(_.data)}catch(E){c("Failed to fetch plugins. Please try again later."),console.error(E)}finally{o(!1)}},x=A=>{A.preventDefault(),b(r)},w=async A=>{var E,_;y(!0);try{const N=await ie.post(`/api/plugins/install/${e}`,{pluginId:A});v({success:!0,message:N.data.message})}catch(N){v({success:!1,message:((_=(E=N.response)==null?void 0:E.data)==null?void 0:_.message)||"Failed to install plugin."}),console.error(N)}finally{y(!1),h(!0)}},P=A=>{d(A),h(!0)};return g.useEffect(()=>{b()},[]),l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:"Plugins"}),l.jsxs("form",{onSubmit:x,className:"flex gap-2",children:[l.jsx(Ce,{value:r,onChange:A=>i(A.target.value),placeholder:"Search plugins...",className:"flex-1 bg-neutral-950/50 border-neutral-800/50"}),l.jsxs(Y,{type:"submit",children:[l.jsx(X7,{className:"w-4 h-4 mr-2"}),"Search"]})]})]}),l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Available Plugins"})}),l.jsx(xe,{children:a?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})}):s?l.jsx("div",{className:"flex items-center justify-center min-h-[200px] text-red-400",children:s}):l.jsx(fr,{className:"h-[600px]",children:l.jsxs(Hi,{children:[l.jsx(Ki,{children:l.jsxs(rt,{children:[l.jsx(Oe,{children:"Name"}),l.jsx(Oe,{children:"Description"}),l.jsx(Oe,{children:"Downloads"}),l.jsx(Oe,{children:"Rating"}),l.jsx(Oe,{children:"Actions"})]})}),l.jsx(qi,{children:t.map(A=>{var E,_;return l.jsxs(rt,{onClick:()=>P(A),className:"cursor-pointer hover:bg-neutral-800/50",children:[l.jsx(he,{className:"font-medium",children:A.name}),l.jsx(he,{className:"text-neutral-400",children:A.tag}),l.jsx(he,{children:l.jsx(qt,{variant:"secondary",children:A.downloads.toLocaleString()})}),l.jsx(he,{children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(sE,{className:"w-4 h-4 text-yellow-400"}),l.jsx("span",{children:((_=(E=A.rating)==null?void 0:E.average)==null?void 0:_.toFixed(1))||"N/A"})]})}),l.jsx(he,{children:A.premium?l.jsxs(Y,{size:"sm",variant:"premium",disabled:!0,children:[l.jsx(aE,{className:"w-4 h-4 mr-2"}),"Premium"]}):l.jsxs(Y,{size:"sm",onClick:N=>{N.stopPropagation(),w(A.id)},disabled:m,children:[m?l.jsx(ji,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(bm,{className:"w-4 h-4 mr-2"}),m?"Installing...":"Install"]})})]},A.id)})})]})})})]}),l.jsx(vt,{open:f,onOpenChange:h,children:l.jsx(lt,{children:u?l.jsxs(l.Fragment,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:u.name}),l.jsx(Wt,{children:u.tag})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(qt,{variant:"secondary",children:["Downloads: ",u.downloads.toLocaleString()]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(sE,{className:"w-4 h-4 text-yellow-400"}),l.jsx("span",{children:((j=(S=u.rating)==null?void 0:S.average)==null?void 0:j.toFixed(1))||"N/A"})]})]}),l.jsxs("p",{className:"text-sm text-neutral-400",children:["Author: ",((C=u.author)==null?void 0:C.id)||"Unknown"]}),l.jsxs("p",{className:"text-sm text-neutral-400",children:["Version: ",((O=u.version)==null?void 0:O.id)||"N/A"]})]}),l.jsx(Ht,{children:u.premium?l.jsxs(Y,{variant:"premium",disabled:!0,className:"w-full",children:[l.jsx(aE,{className:"w-4 h-4 mr-2"}),"Premium"]}):l.jsxs(Y,{onClick:()=>w(u.id),className:"w-full",disabled:m,children:[m?l.jsx(ji,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(bm,{className:"w-4 h-4 mr-2"}),m?"Installing...":"Install Plugin"]})})]}):l.jsxs(l.Fragment,{children:[l.jsx(ct,{children:l.jsx(ut,{children:p.success?"Success":"Error"})}),l.jsx(Wt,{children:p.message}),l.jsx(Ht,{children:l.jsx(Y,{onClick:()=>h(!1),children:"Close"})})]})})})]})},WNe=5,HNe=5e3,KNe=e=>e.replace(/\u001b\[(\d+)m/g,(t,n)=>``).replace(/\u001b\[0m/g,"").replace(/\n/g,"
");function qNe(){const{id:e}=Ui(),t=g.useRef(null),[n,r]=g.useState("offline"),[i,a]=g.useState([]),[o,s]=g.useState(""),[c,u]=g.useState([]),[d,f]=g.useState(-1),[h,p]=g.useState(0),[v,m]=g.useState(!0),y=g.useRef(null),b=g.useRef(!0),x=g.useCallback(j=>{var C;if(b.current)try{const O=JSON.parse(j.data);switch(O.event){case"auth success":(C=t.current)==null||C.send(JSON.stringify({event:"send logs",args:[null]}));break;case"console output":a(A=>[...A.slice(-1e3),O.args[0]]);break;case"status":r(O.args[0]);break}}catch(O){console.error("WebSocket message handling error:",O)}},[]);g.useEffect(()=>{b.current=!0;const j=async()=>{try{if(!b.current)return;const{data:C}=await ie.get(`/api/server/${e}/websocket`),O=new WebSocket(C.data.socket);O.onopen=()=>{if(!b.current){O.close();return}console.log("WebSocket connected"),p(0),O.send(JSON.stringify({event:"auth",args:[C.data.token]}))},O.onmessage=x,O.onclose=()=>{b.current&&(console.log("WebSocket disconnected"),h{b.current&&(p(A=>A+1),j())},HNe))},t.current=O}catch(C){console.error("WebSocket connection error:",C)}};return j(),()=>{b.current=!1,t.current&&(t.current.close(),t.current=null)}},[e,h,x]),g.useEffect(()=>{if(v&&y.current){const j=y.current.querySelector("[data-radix-scroll-area-viewport]");j&&setTimeout(()=>{j.scrollTo({top:j.scrollHeight,behavior:"instant"})},0)}},[i,v]);const w=g.useCallback(j=>{const C=j.currentTarget,O=Math.abs(C.scrollHeight-C.clientHeight-C.scrollTop)<50;m(O)},[]),P=j=>{j==null||j.preventDefault(),!(!o.trim()||!t.current)&&(t.current.send(JSON.stringify({event:"send command",args:[o]})),u(C=>[o,...C.slice(0,99)]),s(""),f(-1))},S=j=>{j.key==="ArrowUp"?(j.preventDefault(),f(C=>{if(C{if(C>-1){const O=C-1;return s(O===-1?"":c[O]),O}return C}))};return l.jsxs("div",{className:"min-h-screen bg-neutral-950 p-6",children:[l.jsx(fr,{ref:y,className:"h-[600px] p-4 font-mono text-sm bg-neutral-950/50",onScroll:w,children:i.map((j,C)=>l.jsx("div",{className:"py-0.5",dangerouslySetInnerHTML:{__html:KNe(j)}},C))}),l.jsxs("div",{className:"border-t border-neutral-800/50",children:[l.jsx("div",{className:"hidden flex items-center gap-2 mb-2 pt-4",children:l.jsxs(Y,{variant:"ghost",size:"sm",className:"h-8",onClick:()=>m(!v),children:[l.jsx(Ve,{className:`w-4 h-4 mr-2 ${v?"text-green-500":"text-neutral-500"}`}),"Auto-scroll ",v?"enabled":"disabled"]})}),l.jsxs("form",{onSubmit:P,className:"flex gap-2 pt-4",children:[l.jsx(Ce,{value:o,onChange:j=>s(j.target.value),onKeyDown:S,placeholder:"Type a command...",className:"flex-1 bg-neutral-950/50 border-neutral-800/50"}),l.jsx(Y,{type:"submit",children:"Send"})]})]})]})}const GNe=()=>{const{id:e}=Ui(),[t,n]=g.useState([]),[r,i]=g.useState(!1),[a,o]=g.useState(null),[s,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(!1),[p,v]=g.useState(!1),[m,y]=g.useState(null),[b,x]=g.useState(!1),[w,P]=g.useState(!1),S=async()=>{i(!0),o(null);try{const O=await ie.get(`/api/server/${e}/allocations`);n(O.data)}catch(O){o("Failed to fetch allocations. Please try again later."),console.error(O)}finally{i(!1)}},j=async()=>{var O,A,E,_,N;d(null),x(!0);try{const k=await ie.post(`/api/server/${e}/allocations`,{});n([...t,k.data]),h(!1)}catch(k){const M=(N=(_=(E=(A=(O=k.response)==null?void 0:O.data)==null?void 0:A.details)==null?void 0:E.errors)==null?void 0:_[0])==null?void 0:N.detail;d(M||"Failed to create allocation. Please try again later."),console.error(k)}finally{x(!1)}},C=async()=>{var O,A,E,_,N;c(null),P(!0);try{await ie.delete(`/api/server/${e}/allocations/${m.id}`),n(t.filter(k=>k.id!==m.id)),v(!1)}catch(k){const M=(N=(_=(E=(A=(O=k.response)==null?void 0:O.data)==null?void 0:A.details)==null?void 0:E.errors)==null?void 0:_[0])==null?void 0:N.detail;c(M||"Failed to delete allocation. Please try again later."),console.error(k)}finally{P(!1)}};return g.useEffect(()=>{S()},[e]),g.useEffect(()=>{p||(c(null),P(!1))},[p]),g.useEffect(()=>{f||(d(null),x(!1))},[f]),l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:"Network"}),l.jsxs(Y,{onClick:()=>h(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add Allocation"]})]}),l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"IP allocations"})}),l.jsx(xe,{children:r?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})}):a?l.jsx("div",{className:"flex items-center justify-center min-h-[200px] text-red-400",children:a}):l.jsx(fr,{className:"h-[600px]",children:l.jsxs(Hi,{children:[l.jsx(Ki,{children:l.jsxs(rt,{children:[l.jsx(Oe,{children:"IP Address"}),l.jsx(Oe,{children:"Port"}),l.jsx(Oe,{children:"Primary"}),l.jsx(Oe,{children:"Alias"}),l.jsx(Oe,{children:"Actions"})]})}),l.jsx(qi,{children:t.map(O=>l.jsxs(rt,{children:[l.jsx(he,{children:O.ip}),l.jsx(he,{children:O.port}),l.jsx(he,{children:O.is_primary?"Yes":"No"}),l.jsx(he,{children:O.alias||"N/A"}),l.jsx(he,{children:l.jsxs(Y,{size:"sm",variant:"destructive",onClick:()=>{y(O),v(!0)},children:[l.jsx(bo,{className:"w-4 h-4 mr-2"}),"Delete"]})})]},O.id))})]})})})]}),l.jsx(vt,{open:f,onOpenChange:h,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Add Allocation"}),l.jsx(Wt,{children:"A new allocation with a random port will be added to the server."})]}),u&&l.jsx(At,{variant:"destructive",className:"mt-2",children:l.jsx(Et,{children:u})}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"secondary",onClick:()=>h(!1),children:"Cancel"}),l.jsxs(Y,{onClick:j,disabled:b,children:[b?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add Allocation"]})]})]})}),l.jsx(vt,{open:p,onOpenChange:v,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Delete Allocation"}),l.jsx(Wt,{children:"Are you sure you want to delete this allocation?"})]}),s&&l.jsx(At,{variant:"destructive",className:"mt-2",children:l.jsx(Et,{children:s})}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"secondary",onClick:()=>v(!1),children:"Cancel"}),l.jsxs(Y,{variant:"destructive",onClick:C,disabled:w,children:[w?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(bo,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})]})},YNe=()=>{const{id:e}=Ui(),[t,n]=g.useState([]),[r,i]=g.useState(!1),[a,o]=g.useState(null),[s,c]=g.useState(!1),[u,d]=g.useState(!1),[f,h]=g.useState(null),[p,v]=g.useState(""),m=async()=>{try{await ie.post("/api/subuser-servers-sync")}catch(w){console.error("Failed to sync subuser servers:",w)}},y=async()=>{i(!0),o(null);try{const w=await ie.get(`/api/server/${e}/users`);n(w.data.data),await m()}catch(w){o("Failed to fetch users. Please try again later."),console.error(w)}finally{i(!1)}},b=async()=>{try{const w=await ie.post(`/api/server/${e}/users`,{email:p});n([...t,w.data]),c(!1),v(""),await m()}catch(w){o("Failed to add user. Please try again later."),console.error(w)}},x=async()=>{try{await ie.delete(`/api/server/${e}/users/${f.attributes.uuid}`),n(t.filter(w=>w.attributes.uuid!==f.attributes.uuid)),d(!1),await m()}catch(w){o("Failed to delete user. Please try again later."),console.error(w)}};return g.useEffect(()=>{y()},[e]),l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:"Users"}),l.jsxs(Y,{onClick:()=>c(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add User"]})]}),l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Sub-users"})}),l.jsx(xe,{children:r?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})}):a?l.jsx("div",{className:"flex items-center justify-center min-h-[200px] text-red-400",children:a}):l.jsx(fr,{className:"h-[600px]",children:l.jsxs(Hi,{children:[l.jsx(Ki,{children:l.jsxs(rt,{children:[l.jsx(Oe,{children:"Username"}),l.jsx(Oe,{children:"Email"}),l.jsx(Oe,{children:"Actions"})]})}),l.jsx(qi,{children:t.map(w=>l.jsxs(rt,{children:[l.jsx(he,{children:w.attributes.username}),l.jsx(he,{children:w.attributes.email}),l.jsx(he,{children:l.jsxs(Y,{size:"sm",variant:"destructive",onClick:()=>{h(w),d(!0)},children:[l.jsx(bo,{className:"w-4 h-4 mr-2"}),"Delete"]})})]},w.attributes.username))})]})})})]}),l.jsx(vt,{open:s,onOpenChange:c,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Add User"}),l.jsx(Wt,{children:"Add a new user to the server by entering their email address."})]}),l.jsx("div",{className:"space-y-4",children:l.jsx(Ce,{placeholder:"Email",value:p,onChange:w=>v(w.target.value)})}),l.jsx(Ht,{children:l.jsxs(Y,{onClick:b,children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add User"]})})]})}),l.jsx(vt,{open:u,onOpenChange:d,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Delete User"}),l.jsx(Wt,{children:"Are you sure you want to delete this user?"})]}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"secondary",onClick:()=>d(!1),children:"Cancel"}),l.jsxs(Y,{variant:"destructive",onClick:x,children:[l.jsx(bo,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})]})};var UU="AlertDialog",[XNe,M_e]=un(UU,[lU]),Na=lU(),zU=e=>{const{__scopeAlertDialog:t,...n}=e,r=Na(t);return l.jsx(PU,{...r,...n,modal:!0})};zU.displayName=UU;var QNe="AlertDialogTrigger",ZNe=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Na(n);return l.jsx(mNe,{...i,...r,ref:t})});ZNe.displayName=QNe;var JNe="AlertDialogPortal",VU=e=>{const{__scopeAlertDialog:t,...n}=e,r=Na(t);return l.jsx(CU,{...r,...n})};VU.displayName=JNe;var e2e="AlertDialogOverlay",WU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Na(n);return l.jsx(sO,{...i,...r,ref:t})});WU.displayName=e2e;var Ul="AlertDialogContent",[t2e,n2e]=XNe(Ul),HU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,a=Na(n),o=g.useRef(null),s=_e(t,o),c=g.useRef(null);return l.jsx(dNe,{contentName:Ul,titleName:KU,docsSlug:"alert-dialog",children:l.jsx(t2e,{scope:n,cancelRef:c,children:l.jsxs(lO,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:ne(i.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(Tj,{children:r}),l.jsx(i2e,{contentRef:o})]})})})});HU.displayName=Ul;var KU="AlertDialogTitle",qU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Na(n);return l.jsx(cO,{...i,...r,ref:t})});qU.displayName=KU;var GU="AlertDialogDescription",YU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Na(n);return l.jsx(uO,{...i,...r,ref:t})});YU.displayName=GU;var r2e="AlertDialogAction",XU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Na(n);return l.jsx(dO,{...i,...r,ref:t})});XU.displayName=r2e;var QU="AlertDialogCancel",ZU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=n2e(QU,n),a=Na(n),o=_e(t,i);return l.jsx(dO,{...a,...r,ref:o})});ZU.displayName=QU;var i2e=({contentRef:e})=>{const t=`\`${Ul}\` requires a description for the component to be accessible for screen reader users. - -You can add a description to the \`${Ul}\` by passing a \`${GU}\` component as a child, which also benefits sighted users by adding visible context to the dialog. - -Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ul}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. - -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},a2e=zU,o2e=VU,JU=WU,ez=HU,tz=XU,nz=ZU,rz=qU,iz=YU;const ja=a2e,s2e=o2e,az=g.forwardRef(({className:e,...t},n)=>l.jsx(JU,{className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));az.displayName=JU.displayName;const Mi=g.forwardRef(({className:e,...t},n)=>l.jsxs(s2e,{children:[l.jsx(az,{}),l.jsx(ez,{ref:n,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Mi.displayName=ez.displayName;const Ri=({className:e,...t})=>l.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ri.displayName="AlertDialogHeader";const $i=({className:e,...t})=>l.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$i.displayName="AlertDialogFooter";const Di=g.forwardRef(({className:e,...t},n)=>l.jsx(rz,{ref:n,className:le("text-lg font-semibold",e),...t}));Di.displayName=rz.displayName;const Ii=g.forwardRef(({className:e,...t},n)=>l.jsx(iz,{ref:n,className:le("text-sm text-muted-foreground",e),...t}));Ii.displayName=iz.displayName;const Li=g.forwardRef(({className:e,...t},n)=>l.jsx(tz,{ref:n,className:le(Lj(),e),...t}));Li.displayName=tz.displayName;const Fi=g.forwardRef(({className:e,...t},n)=>l.jsx(nz,{ref:n,className:le(Lj({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Fi.displayName=nz.displayName;const l2e=6e4,c2e=({player:e,onAction:t})=>{const[n,r]=g.useState(!1),[i,a]=g.useState(null),o=c=>{a(c),r(!0)},s=()=>{t(i,e.name),r(!1)};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Y,{variant:"destructive",size:"sm",onClick:()=>o("ban"),children:[l.jsx(x7,{className:"w-4 h-4 mr-2"}),"Ban"]}),l.jsxs(Y,{variant:"default",size:"sm",onClick:()=>o("op"),children:[l.jsx(N7,{className:"w-4 h-4 mr-2"}),"Make OP"]})]}),l.jsx(ja,{open:n,onOpenChange:r,children:l.jsxs(Mi,{children:[l.jsxs(Ri,{children:[l.jsx(Di,{children:i==="ban"?"Ban Player":"Make Player OP"}),l.jsx(Ii,{children:i==="ban"?`Are you sure you want to ban ${e.name}? This action can be undone later.`:`Are you sure you want to give ${e.name} operator privileges?`})]}),l.jsxs($i,{children:[l.jsx(Fi,{children:"Cancel"}),l.jsx(Li,{onClick:s,variant:i==="ban"?"destructive":"default",children:"Confirm"})]})]})})]})};function u2e(){var p;const{id:e}=Ui(),t=g.useRef(null),[n,r]=g.useState(null),[i,a]=g.useState(!0),[o,s]=g.useState(null),c=g.useRef(!0),u=g.useRef(null),d=g.useCallback(async()=>{var v,m,y,b,x,w,P,S,j,C;try{const{data:O}=await ie.get(`/api/server/${e}`);console.log("Server Info:",O);const{data:A}=await ie.get(`https://api.mcsrvstat.us/3/${(x=(b=(y=(m=(v=O==null?void 0:O.attributes.relationships)==null?void 0:v.allocations)==null?void 0:m.data)==null?void 0:y[0])==null?void 0:b.attributes)==null?void 0:x.ip_alias}:${(C=(j=(S=(P=(w=O==null?void 0:O.attributes.relationships)==null?void 0:w.allocations)==null?void 0:P.data)==null?void 0:S[0])==null?void 0:j.attributes)==null?void 0:C.port}`);c.current&&(r(A),s(null))}catch(O){c.current&&s(O.message)}finally{c.current&&a(!1)}},[e]);g.useEffect(()=>(c.current=!0,d(),u.current=setInterval(d,l2e),()=>{c.current=!1,u.current&&clearInterval(u.current)}),[d]),g.useEffect(()=>((async()=>{try{const{data:m}=await ie.get(`/api/server/${e}/websocket`),y=new WebSocket(m.data.socket);y.onopen=()=>{if(!c.current){y.close();return}y.send(JSON.stringify({event:"auth",args:[m.data.token]}))},t.current=y}catch(m){console.error("WebSocket connection error:",m)}})(),()=>{t.current&&(t.current.close(),t.current=null)}),[e]);const f=(v,m)=>{if(!t.current)return;const y=v==="ban"?`ban ${m}`:`op ${m}`;t.current.send(JSON.stringify({event:"send command",args:[y]}))},h=()=>{a(!0),d()};return i?l.jsx(ve,{className:"mt-6",children:l.jsx(je,{children:l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(fd,{className:"w-5 h-5"}),"Loading Server Status..."]})})}):o||!n?l.jsxs(ve,{className:"mt-6",children:[l.jsx(je,{children:l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(fd,{className:"w-5 h-5"}),"Server Error"]})}),l.jsxs(xe,{children:[l.jsx("p",{className:"text-neutral-500",children:"Unable to query the Minecraft server. This might mean the server is offline or not running Minecraft: Java Edition."}),l.jsxs(Y,{variant:"outline",size:"sm",onClick:h,className:"mt-4",children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})]}):n.online?l.jsxs(ve,{className:"mt-6",children:[l.jsxs(je,{className:"flex flex-row items-center justify-between",children:[l.jsxs("div",{children:[l.jsxs(Te,{className:"flex items-center gap-2",children:["Online Players (",n.players.online,"/",n.players.max,")"]}),l.jsxs("p",{className:"text-sm text-neutral-500 mt-1",children:["Minecraft version ",n.version]})]}),l.jsxs(Y,{variant:"outline",size:"sm",onClick:h,children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),l.jsx(xe,{children:(p=n.players.list)!=null&&p.length?l.jsx(fr,{className:"h-[400px] pr-4",children:l.jsx("div",{className:"space-y-4",children:n.players.list.map(v=>l.jsx(ve,{className:"bg-neutral-950/50",children:l.jsxs(xe,{className:"flex items-center justify-between p-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("img",{src:`https://minotar.net/avatar/${v.name}/64`,alt:`${v.name}'s skin`,className:"w-10 h-10 rounded"}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium",children:v.name}),l.jsxs("a",{href:`https://namemc.com/profile/${v.uuid}`,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-neutral-500 hover:text-neutral-400 flex items-center gap-1",children:["View on NameMC",l.jsx(y7,{className:"w-3 h-3"})]})]})]}),l.jsx(c2e,{player:v,onAction:f})]})},v.uuid))})}):l.jsx("p",{className:"text-neutral-500",children:"No players are currently online."})})]}):l.jsxs(ve,{className:"mt-6",children:[l.jsx(je,{children:l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(fd,{className:"w-5 h-5"}),"Server Offline"]})}),l.jsxs(xe,{children:[l.jsx("p",{className:"text-neutral-500",children:"The Minecraft server is currently offline."}),l.jsxs(Y,{variant:"outline",size:"sm",onClick:h,className:"mt-4",children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Check Again"]})]})]})}const d2e=()=>{const{id:e}=Ui(),[t,n]=g.useState([]),[r,i]=g.useState(!1),[a,o]=g.useState(null),[s,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(!1),[p,v]=g.useState(!1),[m,y]=g.useState(null),[b,x]=g.useState(!1),[w,P]=g.useState(!1),S=async()=>{i(!1),o(null);try{const N=await ie.get(`/api/server/${e}/backups`);n(N.data.data)}catch(N){o("Failed to fetch backups. Please try again later."),console.error(N)}},j=async()=>{c(null),x(!0);try{const N=await ie.post(`/api/server/${e}/backups`);n([...t,N.data]),h(!1)}catch(N){c("Failed to create backup. Please try again later."),console.error(N)}finally{x(!1)}},C=async()=>{d(null),P(!0);try{await ie.delete(`/api/server/${e}/backups/${m.attributes.uuid}`),n(t.filter(N=>N.attributes.uuid!==m.attributes.uuid)),v(!1)}catch(N){d("Failed to delete backup. Please try again later."),console.error(N)}finally{P(!1)}},O=async N=>{try{const k=await ie.get(`/api/server/${e}/backups/${N.attributes.uuid}/download`);window.open(k.data.attributes.url,"_blank")}catch(k){console.error("Failed to generate download link:",k)}},A=N=>!N.attributes.is_successful&&N.attributes.bytes===0?"Creating":N.attributes.is_successful?"Completed":"Failed",E=N=>{if(N===0)return"Pending";const k=1024,M=["Bytes","KB","MB","GB","TB"],$=Math.floor(Math.log(N)/Math.log(k));return parseFloat((N/Math.pow(k,$)).toFixed(2))+" "+M[$]},_=N=>new Date(N).toLocaleString();return g.useEffect(()=>{S();const N=setInterval(S,3e3);return()=>clearInterval(N)},[e]),g.useEffect(()=>{p||(d(null),P(!1))},[p]),g.useEffect(()=>{f||(c(null),x(!1))},[f]),l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:"Backups"}),l.jsxs(Y,{onClick:()=>h(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Backup"]})]}),l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Server backups"})}),l.jsx(xe,{children:r?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})}):a?l.jsx("div",{className:"flex items-center justify-center min-h-[200px] text-red-400",children:a}):l.jsx(fr,{className:"h-[600px]",children:l.jsxs(Hi,{children:[l.jsx(Ki,{children:l.jsxs(rt,{children:[l.jsx(Oe,{children:"Name"}),l.jsx(Oe,{children:"Size"}),l.jsx(Oe,{children:"Created"}),l.jsx(Oe,{children:"Status"}),l.jsx(Oe,{children:"Actions"})]})}),l.jsx(qi,{children:t.map(N=>l.jsxs(rt,{children:[l.jsx(he,{children:N.attributes.name||"Backup"}),l.jsx(he,{children:E(N.attributes.bytes)}),l.jsx(he,{children:_(N.attributes.created_at)}),l.jsx(he,{children:l.jsxs("div",{className:"flex items-center",children:[A(N)==="Creating"&&l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),A(N)]})}),l.jsxs(he,{className:"space-x-2",children:[l.jsxs(Y,{size:"sm",variant:"secondary",onClick:()=>O(N),disabled:!N.attributes.is_successful,children:[l.jsx(bm,{className:"w-4 h-4 mr-2"}),"Download"]}),l.jsxs(Y,{size:"sm",variant:"destructive",onClick:()=>{y(N),v(!0)},children:[l.jsx(bo,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]},N.attributes.uuid))})]})})})]}),l.jsx(vt,{open:f,onOpenChange:h,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Create Backup"}),l.jsx(Wt,{children:"Create a new backup of your server. This may take some time depending on the size of your server."})]}),s&&l.jsx(At,{variant:"destructive",className:"mt-2",children:l.jsx(Et,{children:s})}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"secondary",onClick:()=>h(!1),children:"Cancel"}),l.jsxs(Y,{onClick:j,disabled:b,children:[b?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Backup"]})]})]})}),l.jsx(vt,{open:p,onOpenChange:v,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Delete Backup"}),l.jsx(Wt,{children:"Are you sure you want to delete this backup? This action cannot be undone."})]}),u&&l.jsx(At,{variant:"destructive",className:"mt-2",children:l.jsx(Et,{children:u})}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"secondary",onClick:()=>v(!1),children:"Cancel"}),l.jsxs(Y,{variant:"destructive",onClick:C,disabled:w,children:[w?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(bo,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})]})};var f2e=e=>{switch(e){case"success":return m2e;case"info":return g2e;case"warning":return v2e;case"error":return y2e;default:return null}},h2e=Array(12).fill(0),p2e=({visible:e,className:t})=>T.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},T.createElement("div",{className:"sonner-spinner"},h2e.map((n,r)=>T.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),m2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},T.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),v2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},T.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),g2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},T.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),y2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},T.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),x2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},T.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),T.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),b2e=()=>{let[e,t]=T.useState(document.hidden);return T.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},pS=1,w2e=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:pS++,a=this.toasts.find(s=>s.id===i),o=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:n}),{...s,...e,id:i,dismissible:o,title:n}):s):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,a,o=r.then(async c=>{if(a=["resolve",c],T.isValidElement(c))i=!1,this.create({id:n,type:"default",message:c});else if(j2e(c)&&!c.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;i&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),s=()=>new Promise((c,u)=>o.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||pS++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Yn=new w2e,S2e=(e,t)=>{let n=(t==null?void 0:t.id)||pS++;return Yn.addToast({title:e,...t,id:n}),n},j2e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",P2e=S2e,C2e=()=>Yn.toasts,nl=Object.assign(P2e,{success:Yn.success,info:Yn.info,warning:Yn.warning,error:Yn.error,custom:Yn.custom,message:Yn.message,promise:Yn.promise,dismiss:Yn.dismiss,loading:Yn.loading},{getHistory:C2e});function O2e(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}O2e(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);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;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function yp(e){return e.label!==void 0}var A2e=3,E2e="32px",dM=4e3,N2e=356,T2e=14,_2e=20,k2e=200;function M2e(...e){return e.filter(Boolean).join(" ")}var R2e=e=>{var t,n,r,i,a,o,s,c,u,d,f;let{invert:h,toast:p,unstyled:v,interacting:m,setHeights:y,visibleToasts:b,heights:x,index:w,toasts:P,expanded:S,removeToast:j,defaultRichColors:C,closeButton:O,style:A,cancelButtonStyle:E,actionButtonStyle:_,className:N="",descriptionClassName:k="",duration:M,position:$,gap:D,loadingIcon:B,expandByDefault:I,classNames:R,icons:F,closeButtonAriaLabel:z="Close toast",pauseWhenPageIsHidden:U,cn:W}=e,[Z,ae]=T.useState(!1),[ee,K]=T.useState(!1),[se,X]=T.useState(!1),[J,te]=T.useState(!1),[V,Se]=T.useState(!1),[be,Ue]=T.useState(0),[We,Ye]=T.useState(0),tn=T.useRef(p.duration||M||dM),dn=T.useRef(null),q=T.useRef(null),ue=w===0,we=w+1<=b,$e=p.type,Mt=p.dismissible!==!1,jn=p.className||"",Gi=p.descriptionClassName||"",li=T.useMemo(()=>x.findIndex(Ae=>Ae.toastId===p.id)||0,[x,p.id]),i0=T.useMemo(()=>{var Ae;return(Ae=p.closeButton)!=null?Ae:O},[p.closeButton,O]);T.useMemo(()=>p.duration||M||dM,[p.duration,M]);let a0=T.useRef(0),Gs=T.useRef(0),PO=T.useRef(0),Sh=T.useRef(null),[CO,t8]=$.split("-"),OO=T.useMemo(()=>x.reduce((Ae,Xe,ht)=>ht>=li?Ae:Ae+Xe.height,0),[x,li]),AO=b2e(),n8=p.invert||h,o0=$e==="loading";Gs.current=T.useMemo(()=>li*D+OO,[li,OO]),T.useEffect(()=>{ae(!0)},[]),T.useEffect(()=>{let Ae=q.current;if(Ae){let Xe=Ae.getBoundingClientRect().height;return Ye(Xe),y(ht=>[{toastId:p.id,height:Xe,position:p.position},...ht]),()=>y(ht=>ht.filter(Dr=>Dr.toastId!==p.id))}},[y,p.id]),T.useLayoutEffect(()=>{if(!Z)return;let Ae=q.current,Xe=Ae.style.height;Ae.style.height="auto";let ht=Ae.getBoundingClientRect().height;Ae.style.height=Xe,Ye(ht),y(Dr=>Dr.find(ci=>ci.toastId===p.id)?Dr.map(ci=>ci.toastId===p.id?{...ci,height:ht}:ci):[{toastId:p.id,height:ht,position:p.position},...Dr])},[Z,p.title,p.description,y,p.id]);let Ta=T.useCallback(()=>{K(!0),Ue(Gs.current),y(Ae=>Ae.filter(Xe=>Xe.toastId!==p.id)),setTimeout(()=>{j(p)},k2e)},[p,j,y,Gs]);T.useEffect(()=>{if(p.promise&&$e==="loading"||p.duration===1/0||p.type==="loading")return;let Ae;return S||m||U&&AO?(()=>{if(PO.current{var Xe;(Xe=p.onAutoClose)==null||Xe.call(p,p),Ta()},tn.current)),()=>clearTimeout(Ae)},[S,m,p,$e,U,AO,Ta]),T.useEffect(()=>{p.delete&&Ta()},[Ta,p.delete]);function r8(){var Ae,Xe,ht;return F!=null&&F.loading?T.createElement("div",{className:W(R==null?void 0:R.loader,(Ae=p==null?void 0:p.classNames)==null?void 0:Ae.loader,"sonner-loader"),"data-visible":$e==="loading"},F.loading):B?T.createElement("div",{className:W(R==null?void 0:R.loader,(Xe=p==null?void 0:p.classNames)==null?void 0:Xe.loader,"sonner-loader"),"data-visible":$e==="loading"},B):T.createElement(p2e,{className:W(R==null?void 0:R.loader,(ht=p==null?void 0:p.classNames)==null?void 0:ht.loader),visible:$e==="loading"})}return T.createElement("li",{tabIndex:0,ref:q,className:W(N,jn,R==null?void 0:R.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[$e],(n=p==null?void 0:p.classNames)==null?void 0:n[$e]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:C,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":Z,"data-promise":!!p.promise,"data-swiped":V,"data-removed":ee,"data-visible":we,"data-y-position":CO,"data-x-position":t8,"data-index":w,"data-front":ue,"data-swiping":se,"data-dismissible":Mt,"data-type":$e,"data-invert":n8,"data-swipe-out":J,"data-expanded":!!(S||I&&Z),style:{"--index":w,"--toasts-before":w,"--z-index":P.length-w,"--offset":`${ee?be:Gs.current}px`,"--initial-height":I?"auto":`${We}px`,...A,...p.style},onPointerDown:Ae=>{o0||!Mt||(dn.current=new Date,Ue(Gs.current),Ae.target.setPointerCapture(Ae.pointerId),Ae.target.tagName!=="BUTTON"&&(X(!0),Sh.current={x:Ae.clientX,y:Ae.clientY}))},onPointerUp:()=>{var Ae,Xe,ht,Dr;if(J||!Mt)return;Sh.current=null;let ci=Number(((Ae=q.current)==null?void 0:Ae.style.getPropertyValue("--swipe-amount").replace("px",""))||0),jh=new Date().getTime()-((Xe=dn.current)==null?void 0:Xe.getTime()),i8=Math.abs(ci)/jh;if(Math.abs(ci)>=_2e||i8>.11){Ue(Gs.current),(ht=p.onDismiss)==null||ht.call(p,p),Ta(),te(!0),Se(!1);return}(Dr=q.current)==null||Dr.style.setProperty("--swipe-amount","0px"),X(!1)},onPointerMove:Ae=>{var Xe,ht;if(!Sh.current||!Mt)return;let Dr=Ae.clientY-Sh.current.y,ci=((Xe=window.getSelection())==null?void 0:Xe.toString().length)>0,jh=CO==="top"?Math.min(0,Dr):Math.max(0,Dr);Math.abs(jh)>0&&Se(!0),!ci&&((ht=q.current)==null||ht.style.setProperty("--swipe-amount",`${jh}px`))}},i0&&!p.jsx?T.createElement("button",{"aria-label":z,"data-disabled":o0,"data-close-button":!0,onClick:o0||!Mt?()=>{}:()=>{var Ae;Ta(),(Ae=p.onDismiss)==null||Ae.call(p,p)},className:W(R==null?void 0:R.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},(a=F==null?void 0:F.close)!=null?a:x2e):null,p.jsx||T.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:T.createElement(T.Fragment,null,$e||p.icon||p.promise?T.createElement("div",{"data-icon":"",className:W(R==null?void 0:R.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||r8():null,p.type!=="loading"?p.icon||(F==null?void 0:F[$e])||f2e($e):null):null,T.createElement("div",{"data-content":"",className:W(R==null?void 0:R.content,(s=p==null?void 0:p.classNames)==null?void 0:s.content)},T.createElement("div",{"data-title":"",className:W(R==null?void 0:R.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?T.createElement("div",{"data-description":"",className:W(k,Gi,R==null?void 0:R.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),T.isValidElement(p.cancel)?p.cancel:p.cancel&&yp(p.cancel)?T.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||E,onClick:Ae=>{var Xe,ht;yp(p.cancel)&&Mt&&((ht=(Xe=p.cancel).onClick)==null||ht.call(Xe,Ae),Ta())},className:W(R==null?void 0:R.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,T.isValidElement(p.action)?p.action:p.action&&yp(p.action)?T.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||_,onClick:Ae=>{var Xe,ht;yp(p.action)&&((ht=(Xe=p.action).onClick)==null||ht.call(Xe,Ae),!Ae.defaultPrevented&&Ta())},className:W(R==null?void 0:R.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function fM(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}g.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:o,className:s,offset:c,theme:u="light",richColors:d,duration:f,style:h,visibleToasts:p=A2e,toastOptions:v,dir:m=fM(),gap:y=T2e,loadingIcon:b,icons:x,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:P,cn:S=M2e}=e,[j,C]=T.useState([]),O=T.useMemo(()=>Array.from(new Set([r].concat(j.filter(U=>U.position).map(U=>U.position)))),[j,r]),[A,E]=T.useState([]),[_,N]=T.useState(!1),[k,M]=T.useState(!1),[$,D]=T.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=T.useRef(null),I=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=T.useRef(null),F=T.useRef(!1),z=T.useCallback(U=>{C(W=>{var Z;return(Z=W.find(ae=>ae.id===U.id))!=null&&Z.delete||Yn.dismiss(U.id),W.filter(({id:ae})=>ae!==U.id)})},[]);return T.useEffect(()=>Yn.subscribe(U=>{if(U.dismiss){C(W=>W.map(Z=>Z.id===U.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{V$.flushSync(()=>{C(W=>{let Z=W.findIndex(ae=>ae.id===U.id);return Z!==-1?[...W.slice(0,Z),{...W[Z],...U},...W.slice(Z+1)]:[U,...W]})})})}),[]),T.useEffect(()=>{if(u!=="system"){D(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:W})=>{D(W?"dark":"light")})}catch{U.addListener(({matches:Z})=>{try{D(Z?"dark":"light")}catch(ae){console.error(ae)}})}},[u]),T.useEffect(()=>{j.length<=1&&N(!1)},[j]),T.useEffect(()=>{let U=W=>{var Z,ae;i.every(ee=>W[ee]||W.code===ee)&&(N(!0),(Z=B.current)==null||Z.focus()),W.code==="Escape"&&(document.activeElement===B.current||(ae=B.current)!=null&&ae.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[i]),T.useEffect(()=>{if(B.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,F.current=!1)}},[B.current]),T.createElement("section",{"aria-label":`${w} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},O.map((U,W)=>{var Z;let[ae,ee]=U.split("-");return j.length?T.createElement("ol",{key:U,dir:m==="auto"?fM():m,tabIndex:-1,ref:B,className:s,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":ae,"data-lifted":_&&j.length>1&&!a,"data-x-position":ee,style:{"--front-toast-height":`${((Z=A[0])==null?void 0:Z.height)||0}px`,"--offset":typeof c=="number"?`${c}px`:c||E2e,"--width":`${N2e}px`,"--gap":`${y}px`,...h},onBlur:K=>{F.current&&!K.currentTarget.contains(K.relatedTarget)&&(F.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:K=>{K.target instanceof HTMLElement&&K.target.dataset.dismissible==="false"||F.current||(F.current=!0,R.current=K.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{k||N(!1)},onPointerDown:K=>{K.target instanceof HTMLElement&&K.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},j.filter(K=>!K.position&&W===0||K.position===U).map((K,se)=>{var X,J;return T.createElement(R2e,{key:K.id,icons:x,index:se,toast:K,defaultRichColors:d,duration:(X=v==null?void 0:v.duration)!=null?X:f,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:p,closeButton:(J=v==null?void 0:v.closeButton)!=null?J:o,interacting:k,position:U,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:z,toasts:j.filter(te=>te.position==K.position),heights:A.filter(te=>te.position==K.position),setHeights:E,expandByDefault:a,gap:y,loadingIcon:b,expanded:_,pauseWhenPageIsHidden:P,cn:S})})):null}))});var $2e=[" ","Enter","ArrowUp","ArrowDown"],D2e=[" ","Enter"],wh="Select",[Vy,Wy,I2e]=vg(wh),[wu,R_e]=un(wh,[I2e,Ro]),Hy=Ro(),[L2e,Bo]=wu(wh),[F2e,B2e]=wu(wh),oz=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:p,form:v}=e,m=Hy(t),[y,b]=g.useState(null),[x,w]=g.useState(null),[P,S]=g.useState(!1),j=Qc(u),[C=!1,O]=_r({prop:r,defaultProp:i,onChange:a}),[A,E]=_r({prop:o,defaultProp:s,onChange:c}),_=g.useRef(null),N=y?v||!!y.closest("form"):!0,[k,M]=g.useState(new Set),$=Array.from(k).map(D=>D.props.value).join(";");return l.jsx(Tg,{...m,children:l.jsxs(L2e,{required:p,scope:t,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:P,onValueNodeHasChildrenChange:S,contentId:ir(),value:A,onValueChange:E,open:C,onOpenChange:O,dir:j,triggerPointerDownPosRef:_,disabled:h,children:[l.jsx(Vy.Provider,{scope:t,children:l.jsx(F2e,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(D=>{M(B=>new Set(B).add(D))},[]),onNativeOptionRemove:g.useCallback(D=>{M(B=>{const I=new Set(B);return I.delete(D),I})},[]),children:n})}),N?l.jsxs(_z,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:A,onChange:D=>E(D.target.value),disabled:h,form:v,children:[A===void 0?l.jsx("option",{value:""}):null,Array.from(k)]},$):null]})})};oz.displayName=wh;var sz="SelectTrigger",lz=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=Hy(n),o=Bo(sz,n),s=o.disabled||r,c=_e(t,o.onTriggerChange),u=Wy(n),d=g.useRef("touch"),[f,h,p]=kz(m=>{const y=u().filter(w=>!w.disabled),b=y.find(w=>w.value===o.value),x=Mz(y,m,b);x!==void 0&&o.onValueChange(x.value)}),v=m=>{s||(o.onOpenChange(!0),p()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(_g,{asChild:!0,...a,children:l.jsx(pe.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Tz(o.value)?"":void 0,...i,ref:c,onClick:ne(i.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&v(m)}),onPointerDown:ne(i.onPointerDown,m=>{d.current=m.pointerType;const y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:ne(i.onKeyDown,m=>{const y=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(y&&m.key===" ")&&$2e.includes(m.key)&&(v(),m.preventDefault())})})})});lz.displayName=sz;var cz="SelectValue",uz=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...s}=e,c=Bo(cz,n),{onValueNodeHasChildrenChange:u}=c,d=a!==void 0,f=_e(t,c.onValueNodeChange);return Kt(()=>{u(d)},[u,d]),l.jsx(pe.span,{...s,ref:f,style:{pointerEvents:"none"},children:Tz(c.value)?l.jsx(l.Fragment,{children:o}):a})});uz.displayName=cz;var U2e="SelectIcon",dz=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return l.jsx(pe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});dz.displayName=U2e;var z2e="SelectPortal",fz=e=>l.jsx(oh,{asChild:!0,...e});fz.displayName=z2e;var Ds="SelectContent",hz=g.forwardRef((e,t)=>{const n=Bo(Ds,e.__scopeSelect),[r,i]=g.useState();if(Kt(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?Vc.createPortal(l.jsx(pz,{scope:e.__scopeSelect,children:l.jsx(Vy.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(mz,{...e,ref:t})});hz.displayName=Ds;var zr=10,[pz,Uo]=wu(Ds),V2e="SelectContentImpl",mz=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:m,avoidCollisions:y,...b}=e,x=Bo(Ds,n),[w,P]=g.useState(null),[S,j]=g.useState(null),C=_e(t,K=>P(K)),[O,A]=g.useState(null),[E,_]=g.useState(null),N=Wy(n),[k,M]=g.useState(!1),$=g.useRef(!1);g.useEffect(()=>{if(w)return NP(w)},[w]),xP();const D=g.useCallback(K=>{const[se,...X]=N().map(V=>V.ref.current),[J]=X.slice(-1),te=document.activeElement;for(const V of K)if(V===te||(V==null||V.scrollIntoView({block:"nearest"}),V===se&&S&&(S.scrollTop=0),V===J&&S&&(S.scrollTop=S.scrollHeight),V==null||V.focus(),document.activeElement!==te))return},[N,S]),B=g.useCallback(()=>D([O,w]),[D,O,w]);g.useEffect(()=>{k&&B()},[k,B]);const{onOpenChange:I,triggerPointerDownPosRef:R}=x;g.useEffect(()=>{if(w){let K={x:0,y:0};const se=J=>{var te,V;K={x:Math.abs(Math.round(J.pageX)-(((te=R.current)==null?void 0:te.x)??0)),y:Math.abs(Math.round(J.pageY)-(((V=R.current)==null?void 0:V.y)??0))}},X=J=>{K.x<=10&&K.y<=10?J.preventDefault():w.contains(J.target)||I(!1),document.removeEventListener("pointermove",se),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",se),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",se),document.removeEventListener("pointerup",X,{capture:!0})}}},[w,I,R]),g.useEffect(()=>{const K=()=>I(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[I]);const[F,z]=kz(K=>{const se=N().filter(te=>!te.disabled),X=se.find(te=>te.ref.current===document.activeElement),J=Mz(se,K,X);J&&setTimeout(()=>J.ref.current.focus())}),U=g.useCallback((K,se,X)=>{const J=!$.current&&!X;(x.value!==void 0&&x.value===se||J)&&(A(K),J&&($.current=!0))},[x.value]),W=g.useCallback(()=>w==null?void 0:w.focus(),[w]),Z=g.useCallback((K,se,X)=>{const J=!$.current&&!X;(x.value!==void 0&&x.value===se||J)&&_(K)},[x.value]),ae=r==="popper"?mS:vz,ee=ae===mS?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:m,avoidCollisions:y}:{};return l.jsx(pz,{scope:n,content:w,viewport:S,onViewportChange:j,itemRefCallback:U,selectedItem:O,onItemLeave:W,itemTextRefCallback:Z,focusSelectedItem:B,selectedItemText:E,position:r,isPositioned:k,searchRef:F,children:l.jsx(Ig,{as:wo,allowPinchZoom:!0,children:l.jsx(Og,{asChild:!0,trapped:x.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:ne(i,K=>{var se;(se=x.trigger)==null||se.focus({preventScroll:!0}),K.preventDefault()}),children:l.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:l.jsx(ae,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:K=>K.preventDefault(),...b,...ee,onPlaced:()=>M(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:ne(b.onKeyDown,K=>{const se=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!se&&K.key.length===1&&z(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let J=N().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(K.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const te=K.target,V=J.indexOf(te);J=J.slice(V+1)}setTimeout(()=>D(J)),K.preventDefault()}})})})})})})});mz.displayName=V2e;var W2e="SelectItemAlignedPosition",vz=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=Bo(Ds,n),o=Uo(Ds,n),[s,c]=g.useState(null),[u,d]=g.useState(null),f=_e(t,C=>d(C)),h=Wy(n),p=g.useRef(!1),v=g.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=o,w=g.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&m&&y&&b){const C=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),A=a.valueNode.getBoundingClientRect(),E=b.getBoundingClientRect();if(a.dir!=="rtl"){const te=E.left-O.left,V=A.left-te,Se=C.left-V,be=C.width+Se,Ue=Math.max(be,O.width),We=window.innerWidth-zr,Ye=rS(V,[zr,Math.max(zr,We-Ue)]);s.style.minWidth=be+"px",s.style.left=Ye+"px"}else{const te=O.right-E.right,V=window.innerWidth-A.right-te,Se=window.innerWidth-C.right-V,be=C.width+Se,Ue=Math.max(be,O.width),We=window.innerWidth-zr,Ye=rS(V,[zr,Math.max(zr,We-Ue)]);s.style.minWidth=be+"px",s.style.right=Ye+"px"}const _=h(),N=window.innerHeight-zr*2,k=m.scrollHeight,M=window.getComputedStyle(u),$=parseInt(M.borderTopWidth,10),D=parseInt(M.paddingTop,10),B=parseInt(M.borderBottomWidth,10),I=parseInt(M.paddingBottom,10),R=$+D+k+I+B,F=Math.min(y.offsetHeight*5,R),z=window.getComputedStyle(m),U=parseInt(z.paddingTop,10),W=parseInt(z.paddingBottom,10),Z=C.top+C.height/2-zr,ae=N-Z,ee=y.offsetHeight/2,K=y.offsetTop+ee,se=$+D+K,X=R-se;if(se<=Z){const te=_.length>0&&y===_[_.length-1].ref.current;s.style.bottom="0px";const V=u.clientHeight-m.offsetTop-m.offsetHeight,Se=Math.max(ae,ee+(te?W:0)+V+B),be=se+Se;s.style.height=be+"px"}else{const te=_.length>0&&y===_[0].ref.current;s.style.top="0px";const Se=Math.max(Z,$+m.offsetTop+(te?U:0)+ee)+X;s.style.height=Se+"px",m.scrollTop=se-Z+m.offsetTop}s.style.margin=`${zr}px 0`,s.style.minHeight=F+"px",s.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,s,u,m,y,b,a.dir,r]);Kt(()=>w(),[w]);const[P,S]=g.useState();Kt(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const j=g.useCallback(C=>{C&&v.current===!0&&(w(),x==null||x(),v.current=!1)},[w,x]);return l.jsx(K2e,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:l.jsx(pe.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});vz.displayName=W2e;var H2e="SelectPopperPosition",mS=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=zr,...a}=e,o=Hy(n);return l.jsx(kg,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});mS.displayName=H2e;var[K2e,mO]=wu(Ds,{}),vS="SelectViewport",gz=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=Uo(vS,n),o=mO(vS,n),s=_e(t,a.onViewportChange),c=g.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Vy.Slot,{scope:n,children:l.jsx(pe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ne(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const p=Math.abs(c.current-d.scrollTop);if(p>0){const v=window.innerHeight-zr*2,m=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),b=Math.max(m,y);if(b0?P:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});gz.displayName=vS;var yz="SelectGroup",[q2e,G2e]=wu(yz),Y2e=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=ir();return l.jsx(q2e,{scope:n,id:i,children:l.jsx(pe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Y2e.displayName=yz;var xz="SelectLabel",bz=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=G2e(xz,n);return l.jsx(pe.div,{id:i.id,...r,ref:t})});bz.displayName=xz;var Hv="SelectItem",[X2e,wz]=wu(Hv),Sz=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Bo(Hv,n),c=Uo(Hv,n),u=s.value===r,[d,f]=g.useState(a??""),[h,p]=g.useState(!1),v=_e(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,r,i)}),m=ir(),y=g.useRef("touch"),b=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(X2e,{scope:n,value:r,disabled:i,textId:m,isSelected:u,onItemTextChange:g.useCallback(x=>{f(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:l.jsx(Vy.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:l.jsx(pe.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:v,onFocus:ne(o.onFocus,()=>p(!0)),onBlur:ne(o.onBlur,()=>p(!1)),onClick:ne(o.onClick,()=>{y.current!=="mouse"&&b()}),onPointerUp:ne(o.onPointerUp,()=>{y.current==="mouse"&&b()}),onPointerDown:ne(o.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:ne(o.onPointerMove,x=>{var w;y.current=x.pointerType,i?(w=c.onItemLeave)==null||w.call(c):y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(o.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:ne(o.onKeyDown,x=>{var P;((P=c.searchRef)==null?void 0:P.current)!==""&&x.key===" "||(D2e.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});Sz.displayName=Hv;var nd="SelectItemText",jz=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=Bo(nd,n),s=Uo(nd,n),c=wz(nd,n),u=B2e(nd,n),[d,f]=g.useState(null),h=_e(t,b=>f(b),c.onItemTextChange,b=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,b,c.value,c.disabled)}),p=d==null?void 0:d.textContent,v=g.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=u;return Kt(()=>(m(v),()=>y(v)),[m,y,v]),l.jsxs(l.Fragment,{children:[l.jsx(pe.span,{id:c.textId,...a,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Vc.createPortal(a.children,o.valueNode):null]})});jz.displayName=nd;var Pz="SelectItemIndicator",Cz=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return wz(Pz,n).isSelected?l.jsx(pe.span,{"aria-hidden":!0,...r,ref:t}):null});Cz.displayName=Pz;var gS="SelectScrollUpButton",Oz=g.forwardRef((e,t)=>{const n=Uo(gS,e.__scopeSelect),r=mO(gS,e.__scopeSelect),[i,a]=g.useState(!1),o=_e(t,r.onScrollButtonChange);return Kt(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?l.jsx(Ez,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});Oz.displayName=gS;var yS="SelectScrollDownButton",Az=g.forwardRef((e,t)=>{const n=Uo(yS,e.__scopeSelect),r=mO(yS,e.__scopeSelect),[i,a]=g.useState(!1),o=_e(t,r.onScrollButtonChange);return Kt(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?l.jsx(Ez,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});Az.displayName=yS;var Ez=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Uo("SelectScrollButton",n),o=g.useRef(null),s=Wy(n),c=g.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),Kt(()=>{var d;const u=s().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),l.jsx(pe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ne(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ne(i.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ne(i.onPointerLeave,()=>{c()})})}),Q2e="SelectSeparator",Nz=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(pe.div,{"aria-hidden":!0,...r,ref:t})});Nz.displayName=Q2e;var xS="SelectArrow",Z2e=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Hy(n),a=Bo(xS,n),o=Uo(xS,n);return a.open&&o.position==="popper"?l.jsx(Mg,{...i,...r,ref:t}):null});Z2e.displayName=xS;function Tz(e){return e===""||e===void 0}var _z=g.forwardRef((e,t)=>{const{value:n,...r}=e,i=g.useRef(null),a=_e(t,i),o=$U(n);return g.useEffect(()=>{const s=i.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==n&&d){const f=new Event("change",{bubbles:!0});d.call(s,n),s.dispatchEvent(f)}},[o,n]),l.jsx(qC,{asChild:!0,children:l.jsx("select",{...r,ref:a,defaultValue:n})})});_z.displayName="BubbleSelect";function kz(e){const t=Dt(e),n=g.useRef(""),r=g.useRef(0),i=g.useCallback(o=>{const s=n.current+o;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),a=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Mz(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=J2e(e,Math.max(a,0));i.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function J2e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var eTe=oz,Rz=lz,tTe=uz,nTe=dz,rTe=fz,$z=hz,iTe=gz,Dz=bz,Iz=Sz,aTe=jz,oTe=Cz,Lz=Oz,Fz=Az,Bz=Nz;const Is=eTe,Ls=tTe,Ao=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Rz,{ref:r,className:le("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(nTe,{asChild:!0,children:l.jsx(dg,{className:"h-4 w-4 opacity-50"})})]}));Ao.displayName=Rz.displayName;const Uz=g.forwardRef(({className:e,...t},n)=>l.jsx(Lz,{ref:n,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(j7,{className:"h-4 w-4"})}));Uz.displayName=Lz.displayName;const zz=g.forwardRef(({className:e,...t},n)=>l.jsx(Fz,{ref:n,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(dg,{className:"h-4 w-4"})}));zz.displayName=Fz.displayName;const Eo=g.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>l.jsx(rTe,{children:l.jsxs($z,{ref:i,className:le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(Uz,{}),l.jsx(iTe,{className:le("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(zz,{})]})}));Eo.displayName=$z.displayName;const sTe=g.forwardRef(({className:e,...t},n)=>l.jsx(Dz,{ref:n,className:le("px-2 py-1.5 text-sm font-semibold",e),...t}));sTe.displayName=Dz.displayName;const Bt=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Iz,{ref:r,className:le("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(oTe,{children:l.jsx(Gc,{className:"h-4 w-4"})})}),l.jsx(aTe,{children:t})]}));Bt.displayName=Iz.displayName;const lTe=g.forwardRef(({className:e,...t},n)=>l.jsx(Bz,{ref:n,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));lTe.displayName=Bz.displayName;const cTe=()=>{var j,C,O;const{id:e}=Ui(),t=Xf(),[n,r]=g.useState(!1),[i,a]=g.useState(""),[o,s]=g.useState(!1),{data:c,isLoading:u}=kt({queryKey:["server",e],queryFn:async()=>{const{data:A}=await ie.get(`/api/server/${e}`);return a(A.attributes.name),A}}),{data:d,isLoading:f}=kt({queryKey:["server",e,"startup"],queryFn:async()=>{const{data:A}=await ie.get(`/api/server/${e}/variables`);return A}}),h=I0({mutationFn:async({key:A,value:E})=>{await ie.put(`/api/server/${e}/variables`,{key:A,value:E})},onSuccess:()=>{t.invalidateQueries(["server",e,"startup"]),nl.success("Variable updated successfully")},onError:A=>{var E,_;nl.error(((_=(E=A.response)==null?void 0:E.data)==null?void 0:_.error)||"Failed to update variable")}}),p=I0({mutationFn:async()=>{await ie.post(`/api/server/${e}/reinstall`)},onSuccess:()=>{nl.success("Server reinstallation initiated"),r(!1)},onError:A=>{var E,_;nl.error(((_=(E=A.response)==null?void 0:E.data)==null?void 0:_.error)||"Failed to reinstall server")}}),v=I0({mutationFn:async A=>{await ie.post(`/api/server/${e}/rename`,{name:A})},onSuccess:()=>{t.invalidateQueries(["server",e]),nl.success("Server renamed successfully"),s(!1)},onError:A=>{var E,_;nl.error(((_=(E=A.response)==null?void 0:E.data)==null?void 0:_.error)||"Failed to rename server")}});if(u||f)return l.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})});const m=c==null?void 0:c.attributes,y=(d==null?void 0:d.data)||[],b=((j=d==null?void 0:d.meta)==null?void 0:j.docker_images)||{},x=((C=d==null?void 0:d.meta)==null?void 0:C.startup_command)||(m==null?void 0:m.invocation),w=(O=d==null?void 0:d.meta)==null?void 0:O.raw_startup_command,P=async(A,E)=>{h.mutate({key:A,value:E})},S=async A=>{A.preventDefault(),i.trim()&&i!==m.name&&v.mutate(i)};return l.jsxs("div",{className:"space-y-6 p-6",children:[l.jsx("div",{className:"flex items-center justify-between",children:l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Settings"}),l.jsx("p",{className:"text-sm text-neutral-400",children:"Manage your server configuration and variables"})]})}),l.jsxs(ZC,{defaultValue:"general",children:[l.jsxs($y,{children:[l.jsxs(po,{value:"general",className:"flex items-center gap-2",children:[l.jsx(bD,{className:"w-4 h-4"}),"General"]}),l.jsxs(po,{value:"startup",className:"flex items-center gap-2",children:[l.jsx(pg,{className:"w-4 h-4"}),"Startup"]}),l.jsxs(po,{value:"variables",className:"flex items-center gap-2",children:[l.jsx(oH,{className:"w-4 h-4"}),"Variables"]})]}),l.jsx(mo,{value:"general",className:"space-y-4",children:l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Server Details"}),l.jsx(En,{children:"View and modify basic server settings"})]}),l.jsxs(xe,{className:"space-y-4",children:[l.jsx("form",{onSubmit:S,className:"space-y-4",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx(Zr,{htmlFor:"name",children:"Server Name"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Ce,{id:"name",value:i,onChange:A=>a(A.target.value),placeholder:"Enter server name"}),l.jsxs(Y,{type:"submit",disabled:!i.trim()||i===m.name||v.isLoading,children:[v.isLoading?l.jsx(ji,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Yc,{className:"w-4 h-4 mr-2"}),"Save"]})]})]})}),l.jsx("div",{className:"pt-4 space-y-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium",children:"Dangerous Zone"}),l.jsx("p",{className:"text-sm text-neutral-400",children:"These actions can cause data loss"})]}),l.jsxs(Y,{variant:"destructive",onClick:()=>r(!0),disabled:p.isLoading,children:[p.isLoading?l.jsx(ji,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(q7,{className:"w-4 h-4 mr-2"}),"Reinstall Server"]})]})})]})]})}),l.jsx(mo,{value:"startup",className:"space-y-4",children:l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Startup Configuration"}),l.jsx(En,{children:"View and modify server startup parameters"})]}),l.jsx(xe,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Zr,{children:"Startup Command"}),l.jsxs("div",{className:"relative",children:[l.jsx(Ce,{value:x||"",disabled:!0}),w&&l.jsxs("div",{className:"mt-2",children:[l.jsx(Zr,{className:"text-xs text-neutral-400",children:"Raw Command"}),l.jsx(Ce,{value:w,disabled:!0,className:"mt-1 font-mono text-sm"})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Zr,{children:"Docker Image"}),l.jsxs(Is,{disabled:!0,defaultValue:m==null?void 0:m.docker_image,children:[l.jsx(Ao,{children:l.jsx(Ls,{placeholder:"Select Docker image"})}),l.jsx(Eo,{children:Object.entries(b).map(([A,E])=>l.jsx(Bt,{value:E,children:A},E))})]})]})]})})]})}),l.jsx(mo,{value:"variables",className:"space-y-4",children:l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Environment Variables"}),l.jsx(En,{children:"Configure environment-specific settings"})]}),l.jsx(xe,{children:l.jsx(fr,{className:"h-[400px] pr-4",children:l.jsx("div",{className:"space-y-4",children:y.map(A=>l.jsxs("div",{className:"space-y-2",children:[l.jsxs(Zr,{htmlFor:A.attributes.env_variable,children:[A.attributes.name,A.attributes.description&&l.jsx("span",{className:"block text-xs text-neutral-400 mt-1",children:A.attributes.description})]}),l.jsx("div",{className:"flex gap-2",children:l.jsx(Ce,{id:A.attributes.env_variable,defaultValue:A.attributes.server_value||A.attributes.default_value,disabled:!A.attributes.is_editable,onBlur:E=>{E.target.value!==(A.attributes.server_value||A.attributes.default_value)&&P(A.attributes.env_variable,E.target.value)}})})]},A.attributes.env_variable))})})})]})})]}),l.jsx(ja,{open:n,onOpenChange:r,children:l.jsxs(Mi,{children:[l.jsxs(Ri,{children:[l.jsx(Di,{children:"Are you absolutely sure?"}),l.jsx(Ii,{children:"This action will reinstall your server. All data will be lost and cannot be recovered."})]}),l.jsxs($i,{children:[l.jsx(Fi,{children:"Cancel"}),l.jsx(Li,{onClick:()=>p.mutate(),className:"bg-red-600 hover:bg-red-700",children:"Reinstall Server"})]})]})})]})};function xt({className:e,...t}){return l.jsx("div",{className:le("animate-pulse rounded-md bg-primary/10",e),...t})}function hM(e,t=2){if(e===0)return"0 MB";const n=1024,r=t<0?0:t,i=["B","KB","MB","GB","TB"],a=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,a)).toFixed(r))+" "+i[a]}function xp({icon:e,title:t,used:n,total:r,unit:i}){const a=r?n/r*100:0,o=a>90?"bg-red-500":a>70?"bg-yellow-500":"bg-zinc-800";return l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{className:"pb-2",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(e,{className:"w-4 h-4 text-neutral-400"})}),l.jsx(Te,{className:"text-sm font-medium",children:t})]}),l.jsxs("span",{className:"text-sm text-neutral-400",children:[n,i," / ",r,i]})]})}),l.jsxs(xe,{children:[l.jsx(Ss,{value:a,className:`h-2 ${o}`}),l.jsxs("p",{className:"text-xs text-neutral-500 mt-2",children:[a.toFixed(1),"% utilized"]})]})]})}function uTe({isOpen:e,onClose:t,server:n}){var v;const[r,i]=g.useState(""),[a,o]=g.useState(""),[s,c]=g.useState(""),[u,d]=g.useState(""),[f,h]=g.useState(!1);g.useEffect(()=>{n!=null&&n.attributes&&(i(n.attributes.limits.memory.toString()),o(n.attributes.limits.disk.toString()),c(n.attributes.limits.cpu.toString()))},[n]);const p=async()=>{var m,y;try{if(d(""),h(!0),!r||!a||!s)throw new Error("All resource values are required");await ie.patch(`/api/v5/servers/${n.attributes.id}`,{ram:parseInt(r),disk:parseInt(a),cpu:parseInt(s)}),t(),window.location.reload()}catch(b){d(((y=(m=b.response)==null?void 0:m.data)==null?void 0:y.error)||b.message)}finally{h(!1)}};return l.jsx(vt,{open:e,onOpenChange:t,children:l.jsxs(lt,{children:[l.jsx(ct,{children:l.jsxs(ut,{children:["Edit Server - ",(v=n==null?void 0:n.attributes)==null?void 0:v.name]})}),l.jsxs("div",{className:"grid gap-4 py-4",children:[l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"RAM (MB)"}),l.jsx(Ce,{type:"number",placeholder:"2048",value:r,onChange:m=>i(m.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Disk (MB)"}),l.jsx(Ce,{type:"number",placeholder:"10240",value:a,onChange:m=>o(m.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"CPU (%)"}),l.jsx(Ce,{type:"number",placeholder:"100",value:s,onChange:m=>c(m.target.value)})]})]}),u&&l.jsxs(At,{variant:"destructive",children:[l.jsx(rr,{className:"w-4 h-4"}),l.jsx(Et,{children:u})]})]}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"outline",onClick:t,children:"Cancel"}),l.jsxs(Y,{onClick:p,disabled:f,children:[f?l.jsx(Ve,{className:"w-4 h-4 animate-spin mr-2"}):l.jsx(Yc,{className:"w-4 h-4 mr-2"}),"Update Server"]})]})]})})}function dTe({isOpen:e,onClose:t}){const[n,r]=g.useState(""),[i,a]=g.useState(""),[o,s]=g.useState(""),[c,u]=g.useState(""),[d,f]=g.useState(""),[h,p]=g.useState(""),[v,m]=g.useState(""),[y,b]=g.useState(!1),{data:x}=kt({queryKey:["eggs"],queryFn:async()=>{const{data:j}=await ie.get("/api/v5/eggs");return j}}),{data:w}=kt({queryKey:["locations"],queryFn:async()=>{const{data:j}=await ie.get("/api/v5/locations");return j}}),P=x==null?void 0:x.find(j=>j.id===i),S=async()=>{var j,C;try{if(m(""),b(!0),!(n!=null&&n.trim()))throw new Error("Server name is required");if(!i)throw new Error("Server type is required");if(!o)throw new Error("Location is required");if(!c||!d||!h)throw new Error("Resource values are required");await ie.post("/api/v5/servers",{name:n.trim(),egg:i,location:o,ram:parseInt(c),disk:parseInt(d),cpu:parseInt(h)}),t(),window.location.reload()}catch(O){m(((C=(j=O.response)==null?void 0:j.data)==null?void 0:C.error)||O.message)}finally{b(!1)}};return l.jsx(vt,{open:e,onOpenChange:t,children:l.jsxs(lt,{children:[l.jsx(ct,{children:l.jsx(ut,{children:"Create New Server"})}),l.jsxs("div",{className:"grid gap-4 py-4",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Server Name"}),l.jsx(Ce,{placeholder:"My Awesome Server",value:n,onChange:j=>r(j.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Server Type"}),l.jsxs(Is,{value:i,onValueChange:a,children:[l.jsx(Ao,{children:l.jsx(Ls,{placeholder:"Select Server Type"})}),l.jsx(Eo,{children:x==null?void 0:x.map(j=>l.jsx(Bt,{value:j.id,children:j.name},j.id))})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Location"}),l.jsxs(Is,{value:o,onValueChange:s,children:[l.jsx(Ao,{children:l.jsx(Ls,{placeholder:"Select Location"})}),l.jsx(Eo,{children:w==null?void 0:w.map(j=>l.jsx(Bt,{value:j.id,children:j.name},j.id))})]})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"RAM (MB)"}),l.jsx(Ce,{type:"number",placeholder:"2048",value:c,onChange:j=>u(j.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Disk (MB)"}),l.jsx(Ce,{type:"number",placeholder:"10240",value:d,onChange:j=>f(j.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"CPU (%)"}),l.jsx(Ce,{type:"number",placeholder:"100",value:h,onChange:j=>p(j.target.value)})]})]}),P&&l.jsxs(At,{children:[l.jsx(rr,{className:"w-4 h-4"}),l.jsxs(Et,{children:["Minimum requirements: ",P.minimum.ram,"MB RAM, ",P.minimum.disk,"MB Disk, ",P.minimum.cpu,"% CPU"]})]}),v&&l.jsxs(At,{variant:"destructive",children:[l.jsx(rr,{className:"w-4 h-4"}),l.jsx(Et,{children:v})]})]}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"outline",onClick:t,children:"Cancel"}),l.jsxs(Y,{onClick:S,disabled:y,children:[y?l.jsx(Ve,{className:"w-4 h-4 animate-spin mr-2"}):l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Server"]})]})]})})}function pM({server:e,onDelete:t,onEdit:n,wsStatus:r,stats:i}){var m,y;const a=Us(),o={running:"bg-green-500/10 text-green-500 border-green-500/20",starting:"bg-yellow-500/10 text-yellow-500 border-yellow-500/20",stopping:"bg-yellow-500/10 text-yellow-500 border-yellow-500/20",offline:"bg-neutral-500/10 text-neutral-500 border-neutral-500/20"},{id:s,identifier:c,name:u,limits:d={}}=(e==null?void 0:e.attributes)||{};let f,h;e!=null&&e.attributes?f=e.attributes.identifier:f=e.id,e!=null&&e.attributes?h=e.attributes.name:h=e.name;const p=(r==null?void 0:r[f])||"offline",v=(i==null?void 0:i[f])||{cpu:0,memory:0,disk:0};return l.jsxs(ve,{className:"border-neutral-800/50 hover:border-neutral-700/50 transition-all",children:[l.jsx(je,{className:"pb-3",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(va,{className:"w-4 h-4 text-neutral-400"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-sm",children:h||"Unnamed Server"}),l.jsx("p",{className:"text-xs text-neutral-500",children:f||"Unknown"})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>a(`/server/${f}/overview`),children:l.jsx(pg,{className:"w-4 h-4"})}),n&&l.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>n(e),children:l.jsx(K7,{className:"w-4 h-4"})}),t&&l.jsx(Y,{variant:"ghost",size:"sm",className:"text-red-500",onClick:()=>t(s,u),children:l.jsx(Ej,{className:"w-4 h-4"})})]})]})}),l.jsx(xe,{className:"pb-3",children:l.jsxs("div",{className:"grid gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between text-xs text-neutral-400 mb-1",children:[l.jsx("span",{children:"Memory"}),l.jsxs("span",{children:[((m=v.memory)==null?void 0:m.toFixed(0))||0," / ",d.memory||0," MB"]})]}),l.jsx(Ss,{value:d.memory?v.memory/d.memory*100:0,className:"h-1.5"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between text-xs text-neutral-400 mb-1",children:[l.jsx("span",{children:"CPU"}),l.jsxs("span",{children:[((y=v.cpu)==null?void 0:y.toFixed(1))||0," / ",d.cpu||0,"%"]})]}),l.jsx(Ss,{value:d.cpu?v.cpu/d.cpu*100:0,className:"h-1.5"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between text-xs text-neutral-400 mb-1",children:[l.jsx("span",{children:"Disk"}),l.jsxs("span",{children:[hM(v.disk||0)," / ",hM((d.disk||0)*1024*1024)]})]}),l.jsx(Ss,{value:d.disk?v.disk/(d.disk*1024*1024)*100:0,className:"h-1.5"})]})]})}),l.jsx(Jf,{children:l.jsx(qt,{variant:"outline",className:`w-full justify-center ${o[p]}`,children:p.toUpperCase()})})]})}function fTe(){var N,k,M,$,D,B,I,R;const[e,t]=g.useState(!1),[n,r]=g.useState(!1),[i,a]=g.useState(!1),[o,s]=g.useState(null),[c,u]=g.useState(null),[d,f]=g.useState({}),[h,p]=g.useState({}),v=g.useRef({}),{data:m,isLoading:y}=kt({queryKey:["resources"],queryFn:async()=>{const{data:F}=await ie.get("/api/v5/resources");return F}}),{data:b,isLoading:x}=kt({queryKey:["servers"],queryFn:async()=>{const{data:F}=await ie.get("/api/v5/servers");return F}}),{data:w,isLoading:P}=kt({queryKey:["subuser-servers"],queryFn:async()=>{const{data:F}=await ie.get("/api/subuser-servers");return F}});g.useEffect(()=>{if(!(!b&&!w))return b==null||b.forEach(F=>{v.current[F.attributes.identifier]||S(F)}),w==null||w.forEach(F=>{v.current[F.id]||S(F)}),()=>{Object.values(v.current).forEach(F=>F.close()),v.current={}}},[b,w]);const S=async F=>{try{const{data:z}=await ie.get(`/api/server/${F.attributes.identifier}/websocket`),U=new WebSocket(z.data.socket);U.onopen=()=>{U.send(JSON.stringify({event:"auth",args:[z.data.token]}))},U.onmessage=W=>{const Z=JSON.parse(W.data);j(Z,F.attributes.identifier)},U.onclose=()=>{delete v.current[F.attributes.identifier],setTimeout(()=>S(F),5e3)},v.current[F.attributes.identifier]=U}catch(z){console.error(`WebSocket connection error for ${F.attributes.identifier}:`,z)}},j=(F,z)=>{switch(F.event){case"auth success":v.current[z].send(JSON.stringify({event:"send stats",args:[null]}));break;case"stats":const U=JSON.parse(F.args[0]);if(!U)return;p(W=>({...W,[z]:{cpu:U.cpu_absolute||0,memory:U.memory_bytes/1024/1024||0,disk:U.disk_bytes||0}}));break;case"status":f(W=>({...W,[z]:F.args[0]}));break}},C=async(F,z)=>{u({id:F,name:z}),a(!0)},O=async()=>{if(c)try{await ie.delete(`/api/v5/servers/${c.id}`),window.location.reload()}catch(F){console.error("Failed to delete server:",F),alert("Failed to delete server. Please try again.")}finally{a(!1),u(null)}},A=F=>{s(F),r(!0)};if(y||x||P)return l.jsxs("div",{className:"space-y-6 p-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(xt,{className:"h-8 w-32"}),l.jsx(xt,{className:"h-10 w-24"})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[...Array(4)].map((F,z)=>l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{className:"pb-2",children:l.jsx(xt,{className:"h-6 w-32"})}),l.jsx(xe,{children:l.jsx(xt,{className:"h-2 w-full"})})]},z))}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(3)].map((F,z)=>l.jsx(xt,{className:"h-[200px]"},z))})]});const E=(w==null?void 0:w.length)>0,_=(b==null?void 0:b.length)>0;return l.jsxs("div",{className:"space-y-6 p-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Dashboard"}),l.jsxs(Y,{onClick:()=>t(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"New Server"]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[l.jsx(xp,{icon:Zf,title:"Memory",used:((N=m==null?void 0:m.current)==null?void 0:N.ram)||0,total:((k=m==null?void 0:m.limits)==null?void 0:k.ram)||0,unit:"MB"}),l.jsx(xp,{icon:hg,title:"CPU",used:((M=m==null?void 0:m.current)==null?void 0:M.cpu)||0,total:(($=m==null?void 0:m.limits)==null?void 0:$.cpu)||0,unit:"%"}),l.jsx(xp,{icon:Qf,title:"Storage",used:((D=m==null?void 0:m.current)==null?void 0:D.disk)/1024||0,total:((B=m==null?void 0:m.limits)==null?void 0:B.disk)/1024||0,unit:"GB"}),l.jsx(xp,{icon:va,title:"Servers",used:((I=m==null?void 0:m.current)==null?void 0:I.servers)||0,total:((R=m==null?void 0:m.limits)==null?void 0:R.servers)||0,unit:""})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx("h2",{className:"text-lg font-medium flex items-center gap-2",children:"Your servers"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[b==null?void 0:b.map(F=>l.jsx(pM,{server:F,onDelete:C,onEdit:A,wsStatus:d,stats:h},F.attributes.id)),!_&&l.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center p-12 text-center border border-dashed border-neutral-800 rounded-lg",children:[l.jsx(va,{className:"w-12 h-12 text-neutral-600 mb-4"}),l.jsx("h3",{className:"text-lg font-medium text-neutral-400 mb-2",children:"No servers yet"}),l.jsx("p",{className:"text-sm text-neutral-500 mb-4",children:"Create your first server to get started"}),l.jsxs(Y,{onClick:()=>t(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Server"]})]})]})]}),E&&l.jsxs("div",{className:"space-y-4",children:[l.jsx("h2",{className:"text-lg font-medium flex items-center gap-2",children:"Servers you can access"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:w.map(F=>l.jsx(pM,{server:F,onDelete:null,onEdit:null,wsStatus:d,stats:h},F.id))})]}),l.jsx(dTe,{isOpen:e,onClose:()=>t(!1)}),l.jsx(uTe,{isOpen:n,onClose:()=>{r(!1),s(null)},server:o}),l.jsx(ja,{open:i,onOpenChange:a,children:l.jsxs(Mi,{children:[l.jsxs(Ri,{children:[l.jsx(Di,{children:"Delete Server"}),l.jsxs(Ii,{children:["Are you sure you want to delete ",c==null?void 0:c.name,"? This action cannot be undone."]})]}),l.jsxs($i,{children:[l.jsx(Fi,{onClick:()=>u(null),children:"Cancel"}),l.jsx(Li,{onClick:O,className:"bg-red-500 hover:bg-red-600",children:"Delete Server"})]})]})})]})}var hTe=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function bS(){return bS=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function bp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mTe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wS(e,t)}function wS(e,t){return wS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wS(e,t)}var Ky=function(e){mTe(t,e);function t(){var r;return r=e.call(this)||this,r.handleExpired=r.handleExpired.bind(bp(r)),r.handleErrored=r.handleErrored.bind(bp(r)),r.handleChange=r.handleChange.bind(bp(r)),r.handleRecaptchaRef=r.handleRecaptchaRef.bind(bp(r)),r}var n=t.prototype;return n.getCaptchaFunction=function(i){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[i]:this.props.grecaptcha[i]:null},n.getValue=function(){var i=this.getCaptchaFunction("getResponse");return i&&this._widgetId!==void 0?i(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var i=this.getCaptchaFunction("execute");if(i&&this._widgetId!==void 0)return i(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var i=this;return new Promise(function(a,o){i.executionResolve=a,i.executionReject=o,i.execute()})},n.reset=function(){var i=this.getCaptchaFunction("reset");i&&this._widgetId!==void 0&&i(this._widgetId)},n.forceReset=function(){var i=this.getCaptchaFunction("reset");i&&i()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(i){this.props.onChange&&this.props.onChange(i),this.executionResolve&&(this.executionResolve(i),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var i=this.getCaptchaFunction("render");if(i&&this._widgetId===void 0){var a=document.createElement("div");this._widgetId=i(a,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(a)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(i){this.captcha=i},n.render=function(){var i=this.props;i.sitekey,i.onChange,i.theme,i.type,i.tabindex,i.onExpired,i.onErrored,i.size,i.stoken,i.grecaptcha,i.badge,i.hl,i.isolated;var a=pTe(i,hTe);return g.createElement("div",bS({},a,{ref:this.handleRecaptchaRef}))},t}(g.Component);Ky.displayName="ReCAPTCHA";Ky.propTypes={sitekey:Pe.string.isRequired,onChange:Pe.func,grecaptcha:Pe.object,theme:Pe.oneOf(["dark","light"]),type:Pe.oneOf(["image","audio"]),tabindex:Pe.number,onExpired:Pe.func,onErrored:Pe.func,size:Pe.oneOf(["compact","normal","invisible"]),stoken:Pe.string,hl:Pe.string,badge:Pe.oneOf(["bottomright","bottomleft","inline"]),isolated:Pe.bool};Ky.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Vz={exports:{}},Ge={};/** @license React v16.13.1 - * react-is.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 en=typeof Symbol=="function"&&Symbol.for,vO=en?Symbol.for("react.element"):60103,gO=en?Symbol.for("react.portal"):60106,qy=en?Symbol.for("react.fragment"):60107,Gy=en?Symbol.for("react.strict_mode"):60108,Yy=en?Symbol.for("react.profiler"):60114,Xy=en?Symbol.for("react.provider"):60109,Qy=en?Symbol.for("react.context"):60110,yO=en?Symbol.for("react.async_mode"):60111,Zy=en?Symbol.for("react.concurrent_mode"):60111,Jy=en?Symbol.for("react.forward_ref"):60112,e0=en?Symbol.for("react.suspense"):60113,vTe=en?Symbol.for("react.suspense_list"):60120,t0=en?Symbol.for("react.memo"):60115,n0=en?Symbol.for("react.lazy"):60116,gTe=en?Symbol.for("react.block"):60121,yTe=en?Symbol.for("react.fundamental"):60117,xTe=en?Symbol.for("react.responder"):60118,bTe=en?Symbol.for("react.scope"):60119;function hr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case vO:switch(e=e.type,e){case yO:case Zy:case qy:case Yy:case Gy:case e0:return e;default:switch(e=e&&e.$$typeof,e){case Qy:case Jy:case n0:case t0:case Xy:return e;default:return t}}case gO:return t}}}function Wz(e){return hr(e)===Zy}Ge.AsyncMode=yO;Ge.ConcurrentMode=Zy;Ge.ContextConsumer=Qy;Ge.ContextProvider=Xy;Ge.Element=vO;Ge.ForwardRef=Jy;Ge.Fragment=qy;Ge.Lazy=n0;Ge.Memo=t0;Ge.Portal=gO;Ge.Profiler=Yy;Ge.StrictMode=Gy;Ge.Suspense=e0;Ge.isAsyncMode=function(e){return Wz(e)||hr(e)===yO};Ge.isConcurrentMode=Wz;Ge.isContextConsumer=function(e){return hr(e)===Qy};Ge.isContextProvider=function(e){return hr(e)===Xy};Ge.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===vO};Ge.isForwardRef=function(e){return hr(e)===Jy};Ge.isFragment=function(e){return hr(e)===qy};Ge.isLazy=function(e){return hr(e)===n0};Ge.isMemo=function(e){return hr(e)===t0};Ge.isPortal=function(e){return hr(e)===gO};Ge.isProfiler=function(e){return hr(e)===Yy};Ge.isStrictMode=function(e){return hr(e)===Gy};Ge.isSuspense=function(e){return hr(e)===e0};Ge.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===qy||e===Zy||e===Yy||e===Gy||e===e0||e===vTe||typeof e=="object"&&e!==null&&(e.$$typeof===n0||e.$$typeof===t0||e.$$typeof===Xy||e.$$typeof===Qy||e.$$typeof===Jy||e.$$typeof===yTe||e.$$typeof===xTe||e.$$typeof===bTe||e.$$typeof===gTe)};Ge.typeOf=hr;Vz.exports=Ge;var wTe=Vz.exports,xO=wTe,STe={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},jTe={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},PTe={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Hz={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},bO={};bO[xO.ForwardRef]=PTe;bO[xO.Memo]=Hz;function mM(e){return xO.isMemo(e)?Hz:bO[e.$$typeof]||STe}var CTe=Object.defineProperty,OTe=Object.getOwnPropertyNames,vM=Object.getOwnPropertySymbols,ATe=Object.getOwnPropertyDescriptor,ETe=Object.getPrototypeOf,gM=Object.prototype;function Kz(e,t,n){if(typeof t!="string"){if(gM){var r=ETe(t);r&&r!==gM&&Kz(e,r,n)}var i=OTe(t);vM&&(i=i.concat(vM(t)));for(var a=mM(e),o=mM(t),s=0;s=0)&&(n[i]=e[i]);return n}function kTe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Br={},MTe=0;function RTe(e,t){return t=t||{},function(r){var i=r.displayName||r.name||"Component",a=function(s){kTe(c,s);function c(d,f){var h;return h=s.call(this,d,f)||this,h.state={},h.__scriptURL="",h}var u=c.prototype;return u.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+MTe++),this.__scriptLoaderID},u.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},u.asyncScriptLoaderHandleLoad=function(f){var h=this;this.setState(f,function(){return h.props.asyncScriptOnLoad&&h.props.asyncScriptOnLoad(h.state)})},u.asyncScriptLoaderTriggerOnScriptLoaded=function(){var f=Br[this.__scriptURL];if(!f||!f.loaded)throw new Error("Script is not loaded.");for(var h in f.observers)f.observers[h](f);delete window[t.callbackName]},u.componentDidMount=function(){var f=this,h=this.setupScriptURL(),p=this.asyncScriptLoaderGetScriptLoaderID(),v=t,m=v.globalName,y=v.callbackName,b=v.scriptId;if(m&&typeof window[m]<"u"&&(Br[h]={loaded:!0,observers:{}}),Br[h]){var x=Br[h];if(x&&(x.loaded||x.errored)){this.asyncScriptLoaderHandleLoad(x);return}x.observers[p]=function(C){return f.asyncScriptLoaderHandleLoad(C)};return}var w={};w[p]=function(C){return f.asyncScriptLoaderHandleLoad(C)},Br[h]={loaded:!1,observers:w};var P=document.createElement("script");P.src=h,P.async=!0;for(var S in t.attributes)P.setAttribute(S,t.attributes[S]);b&&(P.id=b);var j=function(O){if(Br[h]){var A=Br[h],E=A.observers;for(var _ in E)O(E[_])&&delete E[_]}};y&&typeof window<"u"&&(window[y]=function(){return f.asyncScriptLoaderTriggerOnScriptLoaded()}),P.onload=function(){var C=Br[h];C&&(C.loaded=!0,j(function(O){return y?!1:(O(C),!0)}))},P.onerror=function(){var C=Br[h];C&&(C.errored=!0,j(function(O){return O(C),!0}))},document.body.appendChild(P)},u.componentWillUnmount=function(){var f=this.__scriptURL;if(t.removeOnUnmount===!0)for(var h=document.getElementsByTagName("script"),p=0;p-1&&h[p].parentNode&&h[p].parentNode.removeChild(h[p]);var v=Br[f];v&&(delete v.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Br[f])},u.render=function(){var f=t.globalName,h=this.props;h.asyncScriptOnLoad;var p=h.forwardedRef,v=_Te(h,["asyncScriptOnLoad","forwardedRef"]);return f&&typeof window<"u"&&(v[f]=typeof window[f]<"u"?window[f]:void 0),v.ref=p,g.createElement(r,v)},c}(g.Component),o=g.forwardRef(function(s,c){return g.createElement(a,SS({},s,{forwardedRef:c}))});return o.displayName="AsyncScriptLoader("+i+")",o.propTypes={asyncScriptOnLoad:Pe.func},TTe(o,r)}}var jS="onloadcallback",$Te="grecaptcha";function PS(){return typeof window<"u"&&window.recaptchaOptions||{}}function DTe(){var e=PS(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+jS+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+jS+"&render=explicit"}const ITe=RTe(DTe,{callbackName:jS,globalName:$Te,attributes:PS().nonce?{nonce:PS().nonce}:{}})(Ky),LTe=()=>{const[e,t]=g.useState("signin"),[n,r]=g.useState(!1),[i,a]=g.useState(""),[o,s]=g.useState({enabled:!1,site_key:null}),[c,u]=g.useState(null),d=Us(),{toast:f}=LNe(),h=T.useRef(null),[p,v]=g.useState(""),[m,y]=g.useState(""),[b,x]=g.useState("");g.useEffect(()=>{(async()=>{try{const O=await(await fetch("/api/captcha")).json();s({enabled:O.captcha_enabled,site_key:O.captcha_site_key})}catch(C){console.error("Failed to fetch captcha config:",C)}})()},[]),g.useEffect(()=>{u(null),h.current&&h.current.reset()},[e]);const w=j=>{u(j)},P=j=>j.length>=12&&/[A-Z]/.test(j)&&/[a-z]/.test(j)&&/[0-9]/.test(j)&&/[^A-Za-z0-9]/.test(j),S=async j=>{if(j.preventDefault(),e==="register"&&o.enabled&&!c){a("Please complete the reCAPTCHA");return}if((e==="signin"||e==="register")&&!m){a("Password is required");return}if(e==="register"&&!P(m)){a("Password must be at least 12 characters long and contain uppercase, lowercase, number, and special character");return}r(!0),a("");try{const C={signin:"/auth/login",register:"/auth/register",reset:"/auth/reset-password-request",magic:"/auth/magic-link"}[e],O={email:p,...e!=="reset"&&e!=="magic"&&{password:m},...e==="register"&&{username:b},...e==="register"&&o.enabled&&{recaptchaResponse:c}},A=await fetch(C,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)}),E=await A.json();A.ok?e==="signin"?d("/dashboard"):(f({title:"Success",description:E.message||"Operation completed successfully"}),e!=="magic"&&(t("signin"),v(""),y(""),x(""))):a(E.error||"An error occurred")}catch{a("An error occurred. Please try again.")}finally{r(!1),o.enabled&&e==="register"&&h.current&&(h.current.reset(),u(null))}};return l.jsx("div",{className:"min-h-screen grid place-items-center bg-background p-4",children:l.jsxs(ve,{className:"w-full max-w-md",children:[l.jsxs(je,{className:"space-y-1",children:[e!=="signin"&&l.jsx(Y,{variant:"ghost",size:"icon",className:"absolute left-4 top-4",onClick:()=>{a(""),v(""),y(""),x(""),t("signin")},children:l.jsx(hD,{className:"h-4 w-4"})}),l.jsx(Te,{className:"text-2xl font-semibold tracking-tight",children:e==="signin"?"Welcome back":e==="register"?"Create account":e==="reset"?"Reset password":"Magic link"}),l.jsx(En,{className:"text-muted-foreground",children:e==="signin"?"Sign in to your account":e==="register"?"Create a new account to get started":e==="reset"?"Enter your email to reset your password":"Get a passwordless login link"})]}),l.jsxs(xe,{children:[i&&l.jsxs(At,{variant:"destructive",className:"mb-6 border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(Et,{className:"ml-2",children:i})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[e==="register"&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(Zr,{htmlFor:"username",children:"Username"}),l.jsx(Ce,{id:"username",placeholder:"johndoe",value:b,onChange:j=>x(j.target.value),required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Zr,{htmlFor:"email",children:"Email"}),l.jsx(Ce,{id:"email",type:"email",placeholder:"name@example.com",value:p,onChange:j=>v(j.target.value),required:!0})]}),(e==="signin"||e==="register")&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(Zr,{htmlFor:"password",children:"Password"}),l.jsx(Ce,{id:"password",type:"password",placeholder:"••••••••",value:m,onChange:j=>y(j.target.value),required:!0}),e==="register"&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Must be at least 12 characters with uppercase, lowercase, number and special character."})]}),e==="register"&&o.enabled&&l.jsx("div",{className:"flex justify-center py-2",children:l.jsx(ITe,{ref:h,sitekey:o.site_key,onChange:w})}),l.jsxs(Y,{type:"submit",className:"w-full",disabled:n||e==="register"&&o.enabled&&!c,children:[n&&l.jsx(ji,{className:"mr-2 h-4 w-4 animate-spin"}),e==="signin"?"Sign in":e==="register"?"Create account":e==="reset"?"Send reset link":"Send magic link"]})]}),e==="signin"&&l.jsxs("div",{className:"mt-4 space-y-2",children:[l.jsxs(Y,{variant:"outline",className:"w-full hidden",onClick:()=>t("magic"),children:[l.jsx(U7,{className:"mr-2 h-4 w-4"}),"Continue with magic link"]}),l.jsxs("div",{className:"flex items-center justify-between text-sm",children:[l.jsx(Y,{variant:"link",className:"px-0 text-muted-foreground",onClick:()=>t("register"),children:"Create account"}),l.jsx(Y,{variant:"link",className:"px-0 text-muted-foreground hidden",onClick:()=>t("reset"),children:"Forgot password?"})]})]})]})]})})},FTe=()=>{const e=Us();return l.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:[l.jsx(ve,{className:"w-full max-w-md",children:l.jsx(xe,{className:"pt-6",children:l.jsxs("div",{className:"text-center space-y-16",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx("h1",{className:"text-4xl mt-8 font-bold animate-fade-in",children:"404"}),l.jsx("div",{className:"h-px w-16 bg-border mx-auto animate-scale-x"}),l.jsx("p",{className:"text-xl text-muted-foreground animate-fade-in-up",children:"Oops! This page seems to be missing."}),l.jsx("p",{className:"text-sm text-muted-foreground/80 animate-fade-in-up delay-100",children:"Prism couldn't find the page you were looking for."})]}),l.jsxs("div",{className:"space-y-3 animate-fade-in-up delay-200",children:[l.jsxs(Y,{className:"w-full",onClick:()=>e("/dashboard"),children:[l.jsx(L7,{className:"mr-2 h-4 w-4"}),"Return to Dashboard"]}),l.jsx(Y,{variant:"outline",className:"w-full",onClick:()=>e(-1),children:"Go Back"})]})]})})}),l.jsx("style",{jsx:!0,global:!0,children:` - @keyframes scale-x { - from { transform: scaleX(0); } - to { transform: scaleX(1); } - } - - @keyframes fade-in { - from { opacity: 0; } - to { opacity: 1; } - } - - @keyframes fade-in-up { - from { - opacity: 0; - transform: translateY(10px); - } - to { - opacity: 1; - transform: translateY(0); - } - } - - .animate-scale-x { - animation: scale-x 0.5s ease-out forwards; - } - - .animate-fade-in { - animation: fade-in 0.5s ease-out forwards; - } - - .animate-fade-in-up { - animation: fade-in-up 0.5s ease-out forwards; - } - - .delay-100 { - animation-delay: 100ms; - } - - .delay-200 { - animation-delay: 200ms; - } - `})]})};function BTe(){const[e,t]=g.useState(!1),[n,r]=g.useState(6e4),[i,a]=g.useState(1.5),[o,s]=g.useState(0),[c,u]=g.useState(0),[d,f]=g.useState("");g.useEffect(()=>{const p=new WebSocket("/ws");p.onopen=()=>{t(!0),f("")},p.onmessage=m=>{const y=JSON.parse(m.data);y.type==="afk_state"&&(r(y.nextRewardIn),a(y.coinsPerMinute),s(b=>b+(y.nextRewardIn===0?y.coinsPerMinute:0)))},p.onclose=m=>{t(!1),m.code===4001?f("You must be logged in to earn AFK rewards"):m.code===4002?f("AFK rewards are already running in another tab"):f("Connection lost. Please refresh the page.")};const v=setInterval(()=>{u(m=>m+1)},1e3);return()=>{p.close(),clearInterval(v)}},[]);const h=p=>{const v=Math.floor(p/3600),m=Math.floor(p%3600/60),y=p%60;return`${v.toString().padStart(2,"0")}:${m.toString().padStart(2,"0")}:${y.toString().padStart(2,"0")}`};return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"AFK page"}),l.jsx(qt,{variant:e?"success":"destructive",className:"px-4 py-1",children:e?"CONNECTED":"DISCONNECTED"})]}),d&&l.jsxs(At,{variant:"destructive",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(Et,{children:d})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 gap-6",children:[l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(fg,{className:"w-4 h-4 text-white"})}),l.jsx(Te,{className:"text-sm",children:"Earnings Rate"})]})}),l.jsx(xe,{children:l.jsxs("div",{className:"text-2xl font-bold text-white",children:[i.toFixed(1)," coins/min"]})})]}),l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(A7,{className:"w-4 h-4 text-white"})}),l.jsx(Te,{className:"text-sm",children:"Session Time"})]})}),l.jsx(xe,{children:l.jsx("div",{className:"text-2xl font-bold text-white",children:h(c)})})]})]}),l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-sm",children:"Next Reward"})}),l.jsx(xe,{children:l.jsx(Ss,{value:(6e4-n)/6e4*100,className:"h-2"})}),l.jsx(Jf,{children:l.jsxs("p",{className:"text-sm text-neutral-400",children:["Next reward in ",Math.ceil(n/1e3)," seconds"]})})]}),l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{children:"How it works"})}),l.jsxs(xe,{className:"space-y-2",children:[l.jsxs("p",{className:"text-sm text-neutral-400",children:["Earn coins automatically just by keeping this page open! You'll receive ",i," coins every minute."]}),l.jsx("p",{className:"text-sm text-neutral-400",children:"You can use these coins to purchase resources and upgrades in the store."})]})]})]})}function UTe(){const[e,t]=g.useState({}),[n,r]=g.useState(""),[i,a]=g.useState(null),{data:o}=kt({queryKey:["storeConfig"],queryFn:async()=>(await ie.get("/api/store/config")).data,retry:!1}),s={ram:"MB RAM",disk:"MB Storage",cpu:"% CPU",servers:"Server Slots"},c=async(d,f)=>{var h,p;try{t(v=>({...v,[d]:!0})),r(""),await ie.post("/api/store/buy",{resourceType:d,amount:parseInt(f)}),window.location.reload()}catch(v){r(((p=(h=v.response)==null?void 0:h.data)==null?void 0:p.error)||"Failed to make purchase")}finally{t(v=>({...v,[d]:!1})),a(null)}},u=({title:d,icon:f,type:h,description:p,pricePerUnit:v})=>{var j,C,O;const[m,y]=g.useState(1),b=m*v,x=((j=o==null?void 0:o.canAfford)==null?void 0:j[h])&&o.userBalance>=b,w=m*(((C=o==null?void 0:o.multipliers)==null?void 0:C[h])||0),P=((O=o==null?void 0:o.limits)==null?void 0:O[h])||10,S=()=>{a({type:h,amount:m,resourceAmount:w,totalPrice:b,title:d,unit:s[h]})};return l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(f,{className:"w-4 h-4 text-white"})}),l.jsx(Te,{className:"text-sm",children:d})]})}),l.jsxs(xe,{className:"space-y-4",children:[l.jsx("p",{className:"text-sm text-neutral-400",children:p}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ce,{type:"number",min:"1",max:P,value:m,onChange:A=>y(Math.max(1,Math.min(P,parseInt(A.target.value)||1))),className:"w-24"}),l.jsx("span",{className:"text-sm text-neutral-400",children:"units"})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-neutral-400",children:"Amount:"}),l.jsxs("span",{className:"text-white",children:[w," ",s[h]]})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-neutral-400",children:"Price:"}),l.jsxs("span",{className:"text-white",children:[b," coins"]})]})]})]}),l.jsx(Jf,{children:l.jsxs(Y,{className:"w-full",onClick:S,disabled:!x||e[h],children:[e[h]?l.jsx(Ve,{className:"w-4 h-4 animate-spin mr-2"}):x?l.jsx(Wn,{className:"w-4 h-4 mr-2"}):l.jsx("div",{}),x?"Purchase":"Insufficient balance"]})})]})};return o?l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Resources store"}),l.jsxs(qt,{variant:"outline",className:"px-4 py-1 flex items-center gap-2",children:[l.jsx(fg,{className:"w-4 h-4"}),o.userBalance," coins"]})]}),n&&l.jsxs(At,{variant:"destructive",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(Et,{children:n})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(u,{title:"Memory",icon:Zf,type:"ram",description:"Purchase additional RAM for your servers",pricePerUnit:o.prices.resources.ram}),l.jsx(u,{title:"Storage",icon:Qf,type:"disk",description:"Purchase additional storage space",pricePerUnit:o.prices.resources.disk}),l.jsx(u,{title:"CPU",icon:hg,type:"cpu",description:"Purchase additional CPU power",pricePerUnit:o.prices.resources.cpu}),l.jsx(u,{title:"Server Slots",icon:va,type:"servers",description:"Purchase additional server slots",pricePerUnit:o.prices.resources.servers})]}),l.jsxs(ve,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{children:"More information"})}),l.jsx(xe,{className:"space-y-2",children:l.jsxs("p",{className:"text-sm text-neutral-400",children:["Purchase additional resources for your servers using coins. Maximum limits per resource type:",Object.entries(o.limits).map(([d,f])=>l.jsxs("span",{className:"ml-1",children:[d,": ",f,","]},d))]})})]}),l.jsx(vt,{open:!!i,onOpenChange:()=>a(null),children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Confirm Purchase"}),l.jsxs(Wt,{className:"pt-4",children:["Are you sure you want to purchase:",l.jsxs("div",{className:"mt-4 space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Resource:"}),l.jsx("span",{className:"font-medium",children:i==null?void 0:i.title})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Amount:"}),l.jsxs("span",{className:"font-medium",children:[i==null?void 0:i.resourceAmount," ",i==null?void 0:i.unit]})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Cost:"}),l.jsxs("span",{className:"font-medium",children:[i==null?void 0:i.totalPrice," coins"]})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Balance after purchase:"}),l.jsxs("span",{className:"font-medium",children:[o.userBalance-((i==null?void 0:i.totalPrice)||0)," coins"]})]})]})]})]}),l.jsxs(Ht,{className:"mt-4",children:[l.jsx(Y,{variant:"outline",onClick:()=>a(null),children:"Cancel"}),l.jsx(Y,{onClick:()=>c(i.type,i.amount),children:"Confirm Purchase"})]})]})})]}):l.jsx("div",{className:"p-6",children:l.jsxs(At,{children:[l.jsx(Ve,{className:"h-4 w-4 animate-spin"}),l.jsx(Et,{children:"Loading store configuration..."})]})})}const zTe=()=>{const[e,t]=g.useState(""),[n,r]=g.useState(null),[i,a]=g.useState(!1),o=async()=>{if(!e){r({type:"error",text:"Please enter a code"});return}a(!0);try{const c=await(await fetch(`/generate?code=${encodeURIComponent(e)}`)).json();c.error?r({type:"error",text:c.error}):(r({type:"success",text:"Successfully created referral code!"}),t(""))}catch{r({type:"error",text:"Failed to generate code. Please try again."})}a(!1)};return l.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[l.jsxs(ve,{children:[l.jsx(je,{children:l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(P7,{className:"h-5 w-5"}),"Information"]})}),l.jsx(xe,{children:l.jsx("div",{className:"space-y-4",children:l.jsxs("div",{className:"bg-neutral-800/20 rounded-lg p-4",children:[l.jsx("h3",{className:"font-medium flex items-center gap-2 mb-2",children:"Rewards"}),l.jsxs("ul",{className:"space-y-2 text-sm text-neutral-300",children:[l.jsxs("li",{children:["• When someone uses your code, you get ",l.jsx("span",{className:"text-yellow-500",children:"80 coins"})]}),l.jsxs("li",{children:["• They receive ",l.jsx("span",{className:"text-yellow-500",children:"250 coins"})," for using a referral code"]}),l.jsx("li",{children:"• Each user can only claim one referral code"}),l.jsx("li",{children:"• You cannot claim your own referral code"})]})]})})})]}),l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Generate Referral Code"}),l.jsx(En,{children:"Create a unique code for others to use"})]}),l.jsxs(xe,{children:[l.jsxs("div",{className:"flex gap-3",children:[l.jsx(Ce,{placeholder:"Enter desired code (max 15 chars)",value:e,onChange:s=>t(s.target.value),maxLength:15,className:"bg-neutral-800/50"}),l.jsx(Y,{onClick:o,disabled:i,children:i?"Creating...":"Generate"})]}),n&&l.jsx(At,{className:`mt-3 ${n.type==="error"?"bg-red-900/20 text-red-400":"bg-green-900/20 text-green-400"}`,children:l.jsx(Et,{children:n.text})})]})]})]})},wO=g.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:le("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));wO.displayName="Textarea";const qz=({priority:e})=>{const t={low:"bg-blue-100 text-blue-800 border-blue-200",medium:"bg-yellow-100 text-yellow-800 border-yellow-200",high:"bg-orange-100 text-orange-800 border-orange-200",urgent:"bg-red-100 text-red-800 border-red-200"};return l.jsx(qt,{variant:"outline",className:t[e],children:e.charAt(0).toUpperCase()+e.slice(1)})},VTe=({isOpen:e,onClose:t})=>{const[n,r]=g.useState({subject:"",category:"technical",priority:"low",description:""}),[i,a]=g.useState(!1),o=async s=>{s.preventDefault(),a(!0);try{if(!(await fetch("/api/tickets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})).ok)throw new Error("Failed to create ticket");window.location.reload(),t()}catch(c){console.error("Error creating ticket:",c)}finally{a(!1)}};return l.jsx(vt,{open:e,onOpenChange:t,children:l.jsxs(lt,{className:"sm:max-w-xl",children:[l.jsx(ct,{children:l.jsx(ut,{children:"Create New Ticket"})}),l.jsxs("form",{onSubmit:o,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Subject"}),l.jsx(Ce,{value:n.subject,onChange:s=>r(c=>({...c,subject:s.target.value})),placeholder:"Enter ticket subject",required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Category"}),l.jsxs(Is,{value:n.category,onValueChange:s=>r(c=>({...c,category:s})),children:[l.jsx(Ao,{children:l.jsx(Ls,{placeholder:"Select category"})}),l.jsxs(Eo,{children:[l.jsx(Bt,{value:"technical",children:"Technical Support"}),l.jsx(Bt,{value:"billing",children:"Billing"}),l.jsx(Bt,{value:"general",children:"General Inquiry"}),l.jsx(Bt,{value:"abuse",children:"Abuse Report"})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Priority"}),l.jsxs(Is,{value:n.priority,onValueChange:s=>r(c=>({...c,priority:s})),children:[l.jsx(Ao,{children:l.jsx(Ls,{placeholder:"Select priority"})}),l.jsxs(Eo,{children:[l.jsx(Bt,{value:"low",children:"Low"}),l.jsx(Bt,{value:"medium",children:"Medium"}),l.jsx(Bt,{value:"high",children:"High"}),l.jsx(Bt,{value:"urgent",children:"Urgent"})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Description"}),l.jsx(wO,{value:n.description,onChange:s=>r(c=>({...c,description:s.target.value})),placeholder:"Describe your issue",rows:4,required:!0})]}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"outline",onClick:t,children:"Cancel"}),l.jsxs(Y,{type:"submit",disabled:i,children:[i?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Ticket"]})]})]})]})})},WTe=({isOpen:e,onClose:t,ticketId:n})=>{const[r,i]=g.useState(""),[a,o]=g.useState(!1),{data:s,isLoading:c}=kt({queryKey:["ticket",n],queryFn:async()=>(await fetch(`/api/tickets/${n}`)).json(),enabled:!!n}),u=async d=>{d.preventDefault(),o(!0);try{if(!(await fetch(`/api/tickets/${n}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:r})})).ok)throw new Error("Failed to send reply");i("")}catch(f){console.error("Error sending reply:",f)}finally{o(!1)}};return c||!s?null:l.jsx(vt,{open:e,onOpenChange:t,children:l.jsxs(lt,{className:"sm:max-w-2xl",children:[l.jsx(ct,{children:l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{children:[l.jsx(ut,{children:s.subject}),l.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["#",s.id.slice(0,8)]})]}),l.jsx(qz,{priority:s.priority})]})}),l.jsx("div",{className:"space-y-4 max-h-96 overflow-y-auto",children:s.messages.map((d,f)=>l.jsxs("div",{className:`bg-gray-50 rounded-lg p-4 ${d.isStaff?"ml-8":"mr-8"}`,children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsx(qt,{variant:d.isStaff?"secondary":"outline",children:d.isStaff?"Staff":"You"}),l.jsx("span",{className:"text-xs text-gray-400",children:new Date(d.timestamp).toLocaleString()})]}),l.jsx("p",{className:"mt-2 text-sm",children:d.content})]},f))}),s.status==="open"&&l.jsxs("form",{onSubmit:u,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Reply"}),l.jsx(wO,{value:r,onChange:d=>i(d.target.value),placeholder:"Type your reply...",rows:3,required:!0})]}),l.jsxs(Ht,{children:[l.jsx(Y,{variant:"destructive",onClick:()=>{},type:"button",children:"Close Ticket"}),l.jsxs(Y,{type:"submit",disabled:a,children:[a?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Yc,{className:"w-4 h-4 mr-2"}),"Send Reply"]})]})]})]})})},yM=({tickets:e,onViewTicket:t})=>e!=null&&e.length?l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b",children:[l.jsx("th",{className:"text-left py-3 px-4",children:"Subject"}),l.jsx("th",{className:"text-left py-3 px-4",children:"Category"}),l.jsx("th",{className:"text-left py-3 px-4",children:"Priority"}),l.jsx("th",{className:"text-left py-3 px-4",children:"Last Update"}),l.jsx("th",{className:"text-center py-3 px-4",children:"Status"}),l.jsx("th",{className:"text-center py-3 px-4",children:"Actions"})]})}),l.jsx("tbody",{children:e.map(n=>l.jsxs("tr",{className:"border-b",children:[l.jsx("td",{className:"py-3 px-4",children:l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:n.subject}),l.jsxs("div",{className:"text-sm text-gray-500",children:["#",n.id.slice(0,8)]})]})}),l.jsx("td",{className:"py-3 px-4",children:l.jsx(qt,{variant:"outline",children:n.category})}),l.jsx("td",{className:"py-3 px-4",children:l.jsx(qz,{priority:n.priority})}),l.jsx("td",{className:"py-3 px-4 text-sm text-gray-500",children:new Date(n.updated).toLocaleString()}),l.jsx("td",{className:"py-3 px-4 text-center",children:l.jsx(qt,{variant:n.status==="open"?"success":"secondary",children:n.status})}),l.jsx("td",{className:"py-3 px-4 text-center",children:l.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>t(n.id),children:l.jsx(mD,{className:"w-4 h-4"})})})]},n.id))})]})}):l.jsxs("div",{className:"text-center py-12",children:[l.jsx(V7,{className:"mx-auto h-12 w-12 text-gray-400"}),l.jsx("h3",{className:"mt-4 text-sm font-medium",children:"No tickets found"}),l.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Create a new ticket to get started."})]});function HTe(){const[e,t]=g.useState(!1),[n,r]=g.useState(null),[i,a]=g.useState(!1),[o,s]=g.useState(null),{data:c,refetch:u}=kt({queryKey:["ticket-stats"],queryFn:async()=>(await fetch("/api/tickets/count")).json()}),{data:d,refetch:f}=kt({queryKey:["tickets"],queryFn:async()=>(await fetch("/api/tickets")).json()}),h=(d==null?void 0:d.filter(x=>x.status==="open"))||[],p=(d==null?void 0:d.filter(x=>x.status==="closed"))||[],v=async()=>{await Promise.all([u(),f()]),t(!1)},m=async()=>{await Promise.all([u(),f()]),a(!1),s(null)},y=x=>{s(x),a(!0)},b=async()=>{if(o)try{if(!(await fetch(`/api/tickets/${o.id}`,{method:"DELETE"})).ok)throw new Error("Failed to delete ticket");await m()}catch(x){console.error("Error deleting ticket:",x)}};return l.jsxs("div",{className:"space-y-6 p-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"flex items-center gap-3",children:l.jsx("div",{children:l.jsx("h1",{className:"text-2xl font-semibold",children:"Support"})})}),l.jsxs(Y,{onClick:()=>t(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"New Ticket"]})]}),l.jsxs(ve,{children:[l.jsx(je,{children:l.jsx(Te,{children:"Active Tickets"})}),l.jsx(xe,{children:l.jsx(yM,{tickets:h,onViewTicket:r,onDelete:y})})]}),l.jsxs(ve,{children:[l.jsx(je,{children:l.jsx(Te,{children:"Closed Tickets"})}),l.jsx(xe,{children:l.jsx(yM,{tickets:p,onViewTicket:r})})]}),l.jsx(VTe,{isOpen:e,onClose:()=>t(!1),onCreated:v}),l.jsx(WTe,{isOpen:!!n,onClose:()=>r(null),ticketId:n}),l.jsx(ja,{open:i,onOpenChange:a,children:l.jsxs(Mi,{children:[l.jsxs(Ri,{children:[l.jsx(Di,{children:"Delete Ticket"}),l.jsx(Ii,{children:"Are you sure you want to delete this ticket? This action cannot be undone."})]}),l.jsxs($i,{children:[l.jsx(Fi,{onClick:()=>s(null),children:"Cancel"}),l.jsx(Li,{onClick:b,className:"bg-red-500 hover:bg-red-600",children:"Delete Ticket"})]})]})})]})}const KTe=()=>{const[e,t]=g.useState(""),[n,r]=g.useState(null),[i,a]=g.useState(!1),[o,s]=g.useState(null),[c,u]=g.useState(0),[d,f]=g.useState(!0),[h,p]=g.useState(!1),[v,m]=g.useState(""),[y,b]=g.useState(""),[x,w]=g.useState(""),[P,S]=g.useState(null);g.useEffect(()=>{(async()=>{try{const _=await(await fetch("/api/user")).json();s(_);const k=await(await fetch("/api/coins")).json();u(k.coins);const $=await(await fetch("/api/password")).json();m($.password)}catch(E){console.error("Failed to fetch data:",E)}finally{f(!1)}})();const A=setInterval(async()=>{try{const _=await(await fetch("/api/coins")).json();u(_.coins)}catch(E){console.error("Failed to fetch coins balance:",E)}},3e3);return()=>clearInterval(A)},[]);const j=async()=>{if(!e){r({type:"error",text:"Please enter a referral code"});return}a(!0);try{const A=await(await fetch(`/claim?code=${encodeURIComponent(e)}`)).json();A.error?r({type:"error",text:A.error}):(r({type:"success",text:"Successfully claimed referral code! You received 250 coins."}),t(""))}catch{r({type:"error",text:"Failed to claim code. Please try again."})}a(!1)},C=async()=>{if(y!==x){S({type:"error",text:"Passwords do not match"});return}try{const A=await(await fetch("/api/password/change",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:y,confirmPassword:x})})).json();if(A.error)S({type:"error",text:A.error});else{S({type:"success",text:"Password updated successfully"}),b(""),w("");const _=await(await fetch("/api/password")).json();m(_.password)}}catch{S({type:"error",text:"Failed to update password"})}};return d||!o?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:"Loading..."}):l.jsx("div",{className:"max-w-4xl mx-auto space-y-6 p-6",children:l.jsxs("div",{className:"grid gap-6",children:[l.jsxs(ve,{children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsxs(Ug,{className:"h-16 w-16",children:[l.jsx(BP,{src:"https://i.imgur.com/J4jb4zO.png"}),l.jsx(zg,{children:l.jsx(rw,{className:"h-8 w-8"})})]}),l.jsxs("div",{children:[l.jsx(Te,{className:"text-2xl font-bold",children:o.username}),l.jsx(En,{children:l.jsxs("div",{className:"space-y-1",children:[l.jsxs("p",{children:["User ID: ",o.id]}),l.jsxs("p",{children:["Email: ",o.email]}),o.global_name&&l.jsxs("p",{children:["Display Name: ",o.global_name]})]})})]})]})}),l.jsx(xe,{children:l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx("div",{className:"p-2 bg-neutral-800 rounded-lg",children:l.jsx(fg,{className:"h-5 w-5 text-yellow-500"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm text-neutral-400",children:"Coins Balance"}),l.jsx("p",{className:"text-lg font-medium",children:c.toFixed(2)})]})]})})]}),l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"SFTP Credentials"}),l.jsx(En,{children:"Your SFTP login details for server access"})]}),l.jsx(xe,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm text-neutral-400 mb-1",children:"Username"}),l.jsx("p",{className:"font-medium",children:o.username})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm text-neutral-400 mb-1",children:"Password"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ce,{type:h?"text":"password",value:v,readOnly:!0,className:"bg-neutral-800/50"}),l.jsx(Y,{variant:"outline",size:"icon",onClick:()=>p(!h),children:h?l.jsx(k7,{className:"h-4 w-4"}):l.jsx(mD,{className:"h-4 w-4"})})]})]})]})})]}),l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Change SFTP Password"}),l.jsx(En,{children:"Set a custom password for SFTP"})]}),l.jsx(xe,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{children:l.jsx(Ce,{type:"password",placeholder:"New password",value:y,onChange:O=>b(O.target.value),className:"bg-neutral-800/50"})}),l.jsx("div",{children:l.jsx(Ce,{type:"password",placeholder:"Confirm new password",value:x,onChange:O=>w(O.target.value),className:"bg-neutral-800/50"})}),l.jsx(Y,{onClick:C,children:"Update Password"}),P&&l.jsx(At,{className:`mt-3 ${P.type==="error"?"bg-red-900/20 text-red-400":"bg-green-900/20 text-green-400"}`,children:l.jsx(Et,{children:P.text})})]})})]}),l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Claim Referral Code"}),l.jsx(En,{children:"Enter a referral code to claim 250 coins. The code owner will receive 80 coins."})]}),l.jsxs(xe,{children:[l.jsxs("div",{className:"flex gap-3",children:[l.jsx(Ce,{placeholder:"Enter referral code",value:e,onChange:O=>t(O.target.value),className:"bg-neutral-800/50",maxLength:15}),l.jsx(Y,{onClick:j,disabled:i,children:i?"Claiming...":"Claim Code"})]}),n&&l.jsx(At,{className:`mt-3 ${n.type==="error"?"bg-red-900/20 text-red-400":"bg-green-900/20 text-green-400"}`,children:l.jsx(Et,{children:n.text})})]})]})]})})};function qTe({isOpen:e,onClose:t}){const[n,r]=g.useState(!1),i=()=>{n&&localStorage.setItem("prismWelcomeShown","true"),t()};return l.jsx(vt,{open:e,onOpenChange:t,children:l.jsxs(lt,{className:"max-w-2xl",children:[l.jsx("div",{className:"py-10",children:l.jsxs("div",{className:"relative space-y-4",children:[l.jsx("img",{src:"https://i.imgur.com/ZLb7kak.png",alt:"Prism Logo",className:"w-auto h-12 mb-6"}),l.jsx("h2",{className:"text-3xl font-bold text-black",children:"Prism 0.5 (Adelante)"}),l.jsx("p",{className:"text-neutral-700 max-w-lg",children:"The next generation of Prism is here. New year, new look, new features and improvements. We're excited to have you join us now that you've upgraded from Heliactyl!"}),l.jsxs("div",{className:"flex space-x-4 items-center",children:[l.jsx(Wv,{id:"dontShowAgain",checked:n,onCheckedChange:r,className:"text-primary-500"}),l.jsx("label",{htmlFor:"dontShowAgain",className:"text-sm text-neutral-600 cursor-pointer",children:"Don't show this again"})]})]})}),l.jsx(Ht,{className:"flex-col space-y-4",children:l.jsx(Y,{onClick:i,className:"w-96 mr-auto",children:"Explore Prism"})})]})})}function GTe(){const{data:e,isLoading:t}=kt({queryKey:["system-stats"],queryFn:async()=>{const[r,i,a]=await Promise.all([ie.get("/api/servers"),ie.get("/api/users"),ie.get("/api/nodes")]);return{servers:r.data.meta.pagination.total||0,users:i.data.meta.pagination.total||0,nodes:a.data.meta.pagination.total||0}},refetchInterval:6e4}),n=[{icon:va,label:"Total Servers",value:(e==null?void 0:e.servers)||0},{icon:fd,label:"Total Users",value:(e==null?void 0:e.users)||0},{icon:O7,label:"Active Nodes",value:(e==null?void 0:e.nodes)||0}];return l.jsx("div",{className:"grid grid-cols-3 gap-4",children:n.map((r,i)=>l.jsx(ve,{children:l.jsx(xe,{className:"pt-6",children:l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx("div",{className:"p-3 bg-neutral-900 rounded-lg",children:l.jsx(r.icon,{className:"w-6 h-6 text-neutral-400"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-neutral-400",children:r.label}),l.jsx("p",{className:"text-2xl font-bold",children:t?l.jsx("div",{className:"h-8 w-16 bg-neutral-800 animate-pulse rounded"}):r.value.toLocaleString()})]})]})})},i))})}function YTe({isOpen:e,onClose:t}){const[n,r]=g.useState(null),[i,a]=g.useState(!1),[o,s]=g.useState(""),[c,u]=g.useState(!1),{data:d,isLoading:f,refetch:h}=kt({queryKey:["backups"],queryFn:async()=>{const{data:y}=await ie.get("/api/config/backups");return y},enabled:e}),p=async()=>{var y,b;try{a(!0),s(""),await ie.post(`/api/config/backups/${n.name}/restore`),u(!0),h()}catch(x){s(((b=(y=x.response)==null?void 0:y.data)==null?void 0:b.error)||"Failed to restore backup")}finally{a(!1)}},v=async()=>{try{await ie.post("/api/reboot"),t(),setTimeout(()=>window.location.reload(),7e3)}catch{s("Failed to reboot dashboard")}},m=y=>new Date(y).toLocaleString();return c?l.jsx(ja,{open:!0,onOpenChange:()=>u(!1),children:l.jsxs(Mi,{children:[l.jsxs(Ri,{children:[l.jsx(Di,{children:"Configuration Restored"}),l.jsx(Ii,{children:"The configuration has been restored. Would you like to reboot the dashboard now to apply the changes?"})]}),l.jsxs($i,{children:[l.jsx(Fi,{onClick:()=>{u(!1),t()},children:"Later"}),l.jsx(Li,{onClick:v,children:"Reboot Now"})]})]})}):l.jsx(vt,{open:e,onOpenChange:t,children:l.jsxs(lt,{className:"max-w-4xl",children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Configuration Backups"}),l.jsx(Wt,{children:"View and manage your dashboard configuration backups. You can restore to a previous version if needed."})]}),l.jsxs("div",{className:"space-y-4",children:[o&&l.jsxs(At,{variant:"destructive",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(Et,{children:o})]}),l.jsx(fr,{className:"h-[400px] rounded-md border border-neutral-800",children:l.jsxs(Hi,{children:[l.jsx(Ki,{children:l.jsxs(rt,{children:[l.jsx(Oe,{children:"Date"}),l.jsx(Oe,{children:"Filename"}),l.jsx(Oe,{className:"text-right",children:"Actions"})]})}),l.jsx(qi,{children:f?l.jsx(rt,{children:l.jsx(he,{colSpan:3,children:l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx(Ve,{className:"w-4 h-4 animate-spin"})})})}):l.jsxs(l.Fragment,{children:[d==null?void 0:d.map(y=>l.jsxs(rt,{children:[l.jsx(he,{children:m(y.timestamp)}),l.jsx(he,{className:"font-mono text-sm",children:y.name}),l.jsxs(he,{className:"text-right space-x-2",children:[l.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>window.open(`/api/config/backups/${y.name}`,"_blank"),children:[l.jsx(wm,{className:"w-4 h-4 mr-2"}),"View"]}),l.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>r(y),children:[l.jsx(Y7,{className:"w-4 h-4 mr-2"}),"Restore"]})]})]},y.name)),!(d!=null&&d.length)&&l.jsx(rt,{children:l.jsx(he,{colSpan:3,className:"text-center text-neutral-500",children:"No backups found"})})]})})]})})]}),n&&l.jsx(ja,{open:!0,onOpenChange:()=>r(null),children:l.jsxs(Mi,{children:[l.jsxs(Ri,{children:[l.jsx(Di,{children:"Restore Configuration"}),l.jsxs(Ii,{children:["Are you sure you want to restore the configuration from ",m(n.timestamp),"? This will overwrite your current configuration and require a dashboard reboot."]})]}),l.jsxs($i,{children:[l.jsx(Fi,{onClick:()=>r(null),children:"Cancel"}),l.jsx(Li,{onClick:p,disabled:i,children:i?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),"Restoring..."]}):"Restore Configuration"})]})]})}),l.jsx(Ht,{children:l.jsx(Y,{variant:"outline",onClick:t,children:"Close"})})]})})}function XTe(){const[e,t]=g.useState(()=>!localStorage.getItem("prismWelcomeShown")),[n,r]=g.useState(""),[i,a]=g.useState(!1),[o,s]=g.useState(!1),[c,u]=g.useState(""),[d,f]=g.useState(!1),[h,p]=g.useState(!1),{data:v,isLoading:m}=kt({queryKey:["config"],queryFn:async()=>{const{data:S}=await ie.get("/api/config");return S}}),{data:y,isLoading:b}=kt({queryKey:["rebootStatus"],queryFn:async()=>{const{data:S}=await ie.get("/api/reboot/status");return S},refetchInterval:5e3});g.useEffect(()=>{(async()=>{try{const{data:j}=await ie.get("/api/config/raw");r(j)}catch{u("Failed to load configuration file")}})()},[]);const x=async()=>{var S,j;try{f(!0),u("");const O=`config-${Date.now()}.toml`;await ie.post("/api/config/raw",n,{headers:{"Content-Type":"text/plain"}}),u("Configuration saved successfully. A reboot is required to apply changes.")}catch(C){u(((j=(S=C.response)==null?void 0:S.data)==null?void 0:j.error)||"Failed to save configuration")}finally{f(!1)}},w=async()=>{try{p(!0),a(!1),await ie.post("/api/reboot"),setTimeout(()=>window.location.reload(),7e3)}catch{u("Failed to initiate reboot"),p(!1)}},P=async()=>{try{u(""),await x(),s(!0)}catch{u("Failed to create backup")}};return m||b?l.jsxs("div",{className:"p-6",children:[l.jsx("div",{className:"h-8 w-32 bg-neutral-800 rounded animate-pulse mb-6"}),l.jsxs("div",{className:"grid gap-6",children:[l.jsx("div",{className:"h-40 bg-neutral-800 rounded animate-pulse"}),l.jsx("div",{className:"h-40 bg-neutral-800 rounded animate-pulse"})]})]}):l.jsxs("div",{className:"min-h-screen bg-neutral-950",children:[l.jsx(qTe,{isOpen:e,onClose:()=>t(!1)}),l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsx("div",{children:l.jsx("h1",{className:"text-2xl font-bold",children:"Overview"})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(Y,{variant:"outline",onClick:P,children:[l.jsx(vs,{className:"w-4 h-4 mr-2"}),"Create Backup"]}),l.jsx(Y,{onClick:()=>a(!0),variant:y!=null&&y.needsReboot?"default":"outline",disabled:h,children:h?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),"Rebooting..."]}):y!=null&&y.needsReboot?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Reboot Required"]}):l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Reboot Dashboard"]})})]})]}),l.jsx("div",{className:"grid gap-6 mb-6",children:l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"System Overview"}),l.jsx(En,{children:"Current system status and statistics"})]}),l.jsxs(xe,{className:"space-y-6",children:[l.jsx("div",{className:"space-y-1",children:l.jsxs("div",{className:"flex items-center text-sm",children:[l.jsx(qt,{variant:"outline",className:"mr-2",children:v==null?void 0:v.version}),l.jsx(xm,{className:"w-4 h-4 text-neutral-500"}),l.jsxs("span",{className:"text-neutral-400",children:["Platform Level ",v==null?void 0:v.platform_level]}),l.jsx(xm,{className:"w-4 h-4 text-neutral-500"}),l.jsx("span",{className:"text-neutral-400",children:v==null?void 0:v.platform_codename})]})}),l.jsx(GTe,{})]})]})}),l.jsxs("div",{className:"grid gap-6 grid-cols-4",children:[l.jsx("div",{className:"col-span-3",children:l.jsxs(ve,{className:"flex flex-col h-[calc(100vh-20rem)]",children:[l.jsxs(je,{children:[l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(wm,{className:"w-4 h-4"}),"Configuration Editor"]}),l.jsx(En,{children:"Edit your dashboard's configuration file directly. Be careful as incorrect changes may break your dashboard."})]}),l.jsx(xe,{className:"flex-1 pb-0",children:l.jsx("div",{className:"h-full",children:l.jsx("textarea",{value:n,onChange:S=>r(S.target.value),className:"w-full h-full p-4 bg-neutral-950 font-mono text-sm resize-none focus:outline-none border border-neutral-800 rounded-md",spellCheck:!1})})}),l.jsxs(Jf,{className:"flex justify-between mt-4",children:[l.jsx("div",{className:"text-sm text-neutral-500",children:(y==null?void 0:y.needsReboot)&&l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(rr,{className:"w-4 h-4 text-yellow-500"}),"Reboot required to apply changes"]})}),l.jsxs(Y,{onClick:x,disabled:d,children:[d?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Yc,{className:"w-4 h-4 mr-2"}),"Save Changes"]})]})]})}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Quick Actions"}),l.jsx(En,{children:"Common administrative tasks"})]}),l.jsx(xe,{children:l.jsxs("div",{className:"space-y-2",children:[l.jsxs(Y,{variant:"outline",className:"w-full justify-start",onClick:()=>s(!0),children:[l.jsx(vs,{className:"w-4 h-4 mr-2"}),"Manage Backups"]}),l.jsxs(Y,{variant:"outline",className:"w-full justify-start",onClick:()=>window.open("/api/config/backups","_blank"),children:[l.jsx(wm,{className:"w-4 h-4 mr-2"}),"View Backup Files"]}),l.jsxs(Y,{variant:"outline",className:"w-full justify-start",onClick:async()=>{try{await ie.post("/api/panel/rebuild"),u("Panel rebuild initiated successfully")}catch{u("Failed to rebuild panel")}},children:[l.jsx(S7,{className:"w-4 h-4 mr-2"}),"Rebuild Panel"]})]})})]}),c&&l.jsxs(At,{variant:c.includes("successfully")?"default":"destructive",children:[c.includes("successfully")?l.jsx(Gc,{className:"h-4 w-4"}):l.jsx(rr,{className:"h-4 w-4"}),l.jsx(Et,{children:c})]})]})]})]}),l.jsx(YTe,{isOpen:o,onClose:()=>s(!1)}),l.jsx(ja,{open:i,onOpenChange:a,children:l.jsxs(Mi,{children:[l.jsxs(Ri,{children:[l.jsx(Di,{children:"Reboot Dashboard"}),l.jsxs(Ii,{children:["Are you sure you want to reboot the dashboard? All active connections will be temporarily disconnected.",(y==null?void 0:y.needsReboot)&&l.jsxs(At,{className:"mt-2",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(Et,{children:"Configuration changes have been detected that require a reboot to take effect."})]})]})]}),l.jsxs($i,{children:[l.jsx(Fi,{onClick:()=>a(!1),children:"Cancel"}),l.jsx(Li,{onClick:w,disabled:h,children:h?"Rebooting...":"Reboot Dashboard"})]})]})})]})}var Hx,SO="HoverCard",[Gz,$_e]=un(SO,[Ro]),r0=Ro(),[QTe,jO]=Gz(SO),Yz=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,c=r0(t),u=g.useRef(0),d=g.useRef(0),f=g.useRef(!1),h=g.useRef(!1),[p=!1,v]=_r({prop:r,defaultProp:i,onChange:a}),m=g.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>v(!0),o)},[o,v]),y=g.useCallback(()=>{clearTimeout(u.current),!f.current&&!h.current&&(d.current=window.setTimeout(()=>v(!1),s))},[s,v]),b=g.useCallback(()=>v(!1),[v]);return g.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),l.jsx(QTe,{scope:t,open:p,onOpenChange:v,onOpen:m,onClose:y,onDismiss:b,hasSelectionRef:f,isPointerDownOnContentRef:h,children:l.jsx(Tg,{...c,children:n})})};Yz.displayName=SO;var Xz="HoverCardTrigger",Qz=g.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=jO(Xz,n),a=r0(n);return l.jsx(_g,{asChild:!0,...a,children:l.jsx(pe.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:ne(e.onPointerEnter,qv(i.onOpen)),onPointerLeave:ne(e.onPointerLeave,qv(i.onClose)),onFocus:ne(e.onFocus,i.onOpen),onBlur:ne(e.onBlur,i.onClose),onTouchStart:ne(e.onTouchStart,o=>o.preventDefault())})})});Qz.displayName=Xz;var ZTe="HoverCardPortal",[D_e,JTe]=Gz(ZTe,{forceMount:void 0}),Kv="HoverCardContent",Zz=g.forwardRef((e,t)=>{const n=JTe(Kv,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=jO(Kv,e.__scopeHoverCard);return l.jsx(Zt,{present:r||a.open,children:l.jsx(e_e,{"data-state":a.open?"open":"closed",...i,onPointerEnter:ne(e.onPointerEnter,qv(a.onOpen)),onPointerLeave:ne(e.onPointerLeave,qv(a.onClose)),ref:t})})});Zz.displayName=Kv;var e_e=g.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,c=jO(Kv,n),u=r0(n),d=g.useRef(null),f=_e(t,d),[h,p]=g.useState(!1);return g.useEffect(()=>{if(h){const v=document.body;return Hx=v.style.userSelect||v.style.webkitUserSelect,v.style.userSelect="none",v.style.webkitUserSelect="none",()=>{v.style.userSelect=Hx,v.style.webkitUserSelect=Hx}}},[h]),g.useEffect(()=>{if(d.current){const v=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",v),()=>{document.removeEventListener("pointerup",v),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),g.useEffect(()=>{d.current&&r_e(d.current).forEach(m=>m.setAttribute("tabindex","-1"))}),l.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:ne(a,v=>{v.preventDefault()}),onDismiss:c.onDismiss,children:l.jsx(kg,{...u,...s,onPointerDown:ne(s.onPointerDown,v=>{v.currentTarget.contains(v.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:f,style:{...s.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),t_e="HoverCardArrow",n_e=g.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=r0(n);return l.jsx(Mg,{...i,...r,ref:t})});n_e.displayName=t_e;function qv(e){return t=>t.pointerType==="touch"?void 0:e()}function r_e(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var i_e=Yz,a_e=Qz,Jz=Zz;const o_e=i_e,s_e=a_e,e8=g.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>l.jsx(Jz,{ref:i,align:t,sideOffset:n,className:le("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));e8.displayName=Jz.displayName;function Kx({label:e,icon:t,used:n,total:r,unit:i}){return l.jsx("div",{className:"space-y-1 w-48",children:l.jsxs("div",{className:"flex items-center justify-between text-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 text-neutral-400",children:[l.jsx(t,{className:"w-4 h-4"}),e]}),l.jsxs("span",{children:[r.toLocaleString(),i]})]})})}function xM({user:e,onSubmit:t,isSubmitting:n}){const[r,i]=g.useState({email:"",username:"",first_name:"",last_name:"",password:"",coins:0,ram:0,disk:0,cpu:0,servers:0,admin:!1});return g.useEffect(()=>{var a,o,s,c;e&&i({email:e.attributes.email||"",username:e.attributes.username||"",first_name:e.attributes.first_name||"",last_name:e.attributes.last_name||"",password:"",coins:e.coins||0,ram:((a=e.resources)==null?void 0:a.ram)||0,disk:((o=e.resources)==null?void 0:o.disk)||0,cpu:((s=e.resources)==null?void 0:s.cpu)||0,servers:((c=e.resources)==null?void 0:c.servers)||0,admin:e.attributes.root_admin||!1})},[e]),l.jsxs("div",{className:"grid gap-6 py-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Email"}),l.jsx(Ce,{value:r.email,onChange:a=>i({...r,email:a.target.value}),placeholder:"user@example.com"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Username"}),l.jsx(Ce,{value:r.username,onChange:a=>i({...r,username:a.target.value}),placeholder:"username"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"First Name"}),l.jsx(Ce,{value:r.first_name,onChange:a=>i({...r,first_name:a.target.value}),placeholder:"John"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Last Name"}),l.jsx(Ce,{value:r.last_name,onChange:a=>i({...r,last_name:a.target.value}),placeholder:"Doe"})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:e?"New Password (leave empty to keep unchanged)":"Password"}),l.jsx(Ce,{type:"password",value:r.password,onChange:a=>i({...r,password:a.target.value}),placeholder:"••••••••"})]}),l.jsxs(ZC,{defaultValue:"resources",children:[l.jsxs($y,{children:[l.jsx(po,{value:"resources",children:"Resources"}),l.jsx(po,{value:"permissions",children:"Permissions"})]}),l.jsxs(mo,{value:"resources",className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Coins"}),l.jsx(Ce,{type:"number",value:r.coins,onChange:a=>i({...r,coins:parseInt(a.target.value)||0})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Server Limit"}),l.jsx(Ce,{type:"number",value:r.servers,onChange:a=>i({...r,servers:parseInt(a.target.value)||0})})]})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"RAM (MB)"}),l.jsx(Ce,{type:"number",value:r.ram,onChange:a=>i({...r,ram:parseInt(a.target.value)||0})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Disk (MB)"}),l.jsx(Ce,{type:"number",value:r.disk,onChange:a=>i({...r,disk:parseInt(a.target.value)||0})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"CPU (%)"}),l.jsx(Ce,{type:"number",value:r.cpu,onChange:a=>i({...r,cpu:parseInt(a.target.value)||0})})]})]})]}),l.jsx(mo,{value:"permissions",children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("input",{type:"checkbox",id:"admin",checked:r.admin,onChange:a=>i({...r,admin:a.target.checked}),className:"rounded border-neutral-300"}),l.jsx("label",{htmlFor:"admin",className:"text-sm font-medium",children:"Administrator Access"})]}),r.admin&&l.jsxs(At,{children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(Et,{children:"This user will have full administrative access to the panel."})]})]})})]}),l.jsxs("div",{className:"flex justify-end space-x-2",children:[l.jsx(Y,{variant:"outline",onClick:()=>t(null),children:"Cancel"}),l.jsx(Y,{onClick:()=>t(r),disabled:n,children:n?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving Changes..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Yc,{className:"w-4 h-4 mr-2"}),"Save Changes"]})})]})]})}function l_e(){var _,N;const e=Xf(),[t,n]=g.useState(""),[r,i]=g.useState("10"),[a,o]=g.useState(1),[s,c]=g.useState(!1),[u,d]=g.useState(!1),[f,h]=g.useState(!1),[p,v]=g.useState(null),[m,y]=g.useState(""),[b,x]=g.useState(!1),{data:w,isLoading:P}=kt({queryKey:["users"],queryFn:async()=>{const{data:k}=await ie.get("/api/users");return await Promise.all(k.data.map(async $=>{try{const[D,B]=await Promise.all([ie.get(`/api/users/${$.attributes.id}/coins`),ie.get(`/api/users/${$.attributes.id}/resources`)]);return{...$,coins:D.data.coins||0,resources:B.data||{ram:0,disk:0,cpu:0,servers:0}}}catch(D){return console.error(`Error fetching data for user ${$.attributes.username}:`,D),{...$,coins:0,resources:{ram:0,disk:0,cpu:0,servers:0}}}}))},refetchInterval:3e4}),S=g.useMemo(()=>w?w.filter(k=>k.attributes.username.toLowerCase().includes(t.toLowerCase())||k.attributes.email.toLowerCase().includes(t.toLowerCase())||k.attributes.first_name.toLowerCase().includes(t.toLowerCase())||k.attributes.last_name.toLowerCase().includes(t.toLowerCase())).sort((k,M)=>k.attributes.root_admin!==M.attributes.root_admin?M.attributes.root_admin?1:-1:k.attributes.username.localeCompare(M.attributes.username)):[],[w,t]),j=S.slice((a-1)*parseInt(r),a*parseInt(r)),C=Math.ceil(S.length/parseInt(r)),O=async k=>{var M,$;if(!k){c(!1);return}try{x(!0),y("");const{data:D}=await ie.post("/api/users",{email:k.email,username:k.username,first_name:k.first_name,last_name:k.last_name,password:k.password,root_admin:k.admin});await new Promise(B=>setTimeout(B,1e3)),await Promise.all([ie.patch(`/api/users/${D.data.attributes.id}/resources`,{ram:k.ram,disk:k.disk,cpu:k.cpu,servers:k.servers}),ie.patch(`/api/users/${D.data.attributes.id}/coins`,{coins:k.coins})]),c(!1),e.invalidateQueries("users"),y("success:User created successfully")}catch(D){y((($=(M=D.response)==null?void 0:M.data)==null?void 0:$.error)||"Failed to create user")}finally{x(!1)}},A=async k=>{var M,$;if(!k){d(!1),v(null);return}try{x(!0),y("");const D={email:k.email,username:k.username,first_name:k.first_name,last_name:k.last_name,root_admin:k.admin};k.password&&(D.password=k.password),await ie.patch(`/api/users/${p.attributes.id}`,D),await Promise.all([ie.patch(`/api/users/${p.attributes.id}/resources`,{ram:k.ram,disk:k.disk,cpu:k.cpu,servers:k.servers}),ie.patch(`/api/users/${p.attributes.id}/coins`,{coins:k.coins})]),d(!1),v(null),e.invalidateQueries("users"),y("success:User updated successfully")}catch(D){y((($=(M=D.response)==null?void 0:M.data)==null?void 0:$.error)||"Failed to update user")}finally{x(!1)}},E=async()=>{var k,M;try{await ie.delete(`/api/users/${p.attributes.id}`),h(!1),v(null),e.invalidateQueries("users"),y("success:User deleted successfully")}catch($){y(((M=(k=$.response)==null?void 0:k.data)==null?void 0:M.error)||"Failed to delete user")}};return l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Users"}),l.jsx("p",{className:"text-sm text-neutral-500",children:"Manage user accounts and permissions"})]}),l.jsxs(Y,{onClick:()=>c(!0),children:[l.jsx(aH,{className:"w-4 h-4 mr-2"}),"New User"]})]}),m&&l.jsxs(At,{variant:m.startsWith("success:")?"default":"destructive",className:"mb-6",children:[m.startsWith("success:")?l.jsx(Gc,{className:"h-4 w-4"}):l.jsx(rr,{className:"h-4 w-4"}),l.jsx(Et,{children:m.replace("success:","")})]}),l.jsxs(ve,{children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Te,{children:"Users"}),l.jsxs("div",{className:"flex gap-4",children:[l.jsx(Ce,{placeholder:"Search users...",value:t,onChange:k=>n(k.target.value),className:"w-64"}),l.jsxs(Is,{value:r,onValueChange:i,children:[l.jsx(Ao,{className:"w-36",children:l.jsx(Ls,{})}),l.jsxs(Eo,{children:[l.jsx(Bt,{value:"10",children:"10 per page"}),l.jsx(Bt,{value:"25",children:"25 per page"}),l.jsx(Bt,{value:"50",children:"50 per page"}),l.jsx(Bt,{value:"100",children:"100 per page"})]})]})]})]})}),l.jsxs(xe,{children:[l.jsxs(Hi,{children:[l.jsx(Ki,{children:l.jsxs(rt,{children:[l.jsx(Oe,{children:"User"}),l.jsx(Oe,{children:"Email"}),l.jsx(Oe,{children:"Purchased Resources"}),l.jsx(Oe,{children:"Coins"}),l.jsx(Oe,{children:"Status"}),l.jsx(Oe,{className:"text-right",children:"Actions"})]})}),l.jsx(qi,{children:P?[...Array(5)].map((k,M)=>l.jsxs(rt,{children:[l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-32"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-48"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-64"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-16"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-24"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-24"})})]},M)):j.map(k=>{var M,$,D,B,I,R;return l.jsxs(rt,{children:[l.jsx(he,{children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Ug,{className:"h-8 w-8",children:l.jsx(zg,{children:k.attributes.username.slice(0,2).toUpperCase()})}),l.jsxs("div",{children:[l.jsxs("div",{className:"font-medium flex items-center gap-2",children:[k.attributes.username,k.attributes.root_admin&&l.jsxs(o_e,{children:[l.jsx(s_e,{children:l.jsx(qt,{variant:"default",className:"bg-red-500",children:"Admin"})}),l.jsx(e8,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(wD,{className:"w-4 h-4 text-red-500"}),l.jsx("span",{className:"text-sm",children:"Administrator account with full access"})]})})]})]}),l.jsxs("div",{className:"text-sm text-neutral-500",children:[k.attributes.first_name," ",k.attributes.last_name]})]})]})}),l.jsx(he,{children:l.jsx("div",{className:"text-sm",children:k.attributes.email})}),l.jsx(he,{children:l.jsxs("div",{className:"space-y-2",children:[l.jsx(Kx,{label:"Memory",icon:Zf,used:((M=k.resources)==null?void 0:M.ram)||0,total:(($=k.resources)==null?void 0:$.ram)||0,unit:"MB"}),l.jsx(Kx,{label:"Storage",icon:Qf,used:((D=k.resources)==null?void 0:D.disk)||0,total:((B=k.resources)==null?void 0:B.disk)||0,unit:"MB"}),l.jsx(Kx,{label:"CPU",icon:hg,used:((I=k.resources)==null?void 0:I.cpu)||0,total:((R=k.resources)==null?void 0:R.cpu)||0,unit:"%"})]})}),l.jsx(he,{children:l.jsx("div",{className:"space-y-1",children:l.jsxs("div",{className:"text-sm text-neutral-500",children:[k.coins.toFixed(2)||"Unknown"," coins"]})})}),l.jsx(he,{children:l.jsx(qt,{variant:k.attributes.root_admin?"destructive":"success",children:k.attributes.root_admin?"Administrator":"User"})}),l.jsx(he,{children:l.jsx("div",{className:"flex justify-end",children:l.jsxs(tf,{children:[l.jsx(nf,{asChild:!0,children:l.jsx(Y,{variant:"ghost",size:"sm",children:l.jsx(_7,{className:"w-4 h-4"})})}),l.jsxs(fc,{align:"end",className:"w-48",children:[l.jsx(Bg,{children:"User Actions"}),l.jsxs(gn,{onClick:()=>{v(k),d(!0)},children:[l.jsx(eH,{className:"w-4 h-4 mr-2"}),"Edit User"]}),l.jsxs(gn,{onClick:()=>{v(k),h(!0)},children:[l.jsx(Ej,{className:"w-4 h-4 mr-2 text-red-500"}),"Delete User"]})]})]})})})]},k.attributes.id)})})]}),l.jsxs("div",{className:"flex items-center justify-between mt-4",children:[l.jsxs("div",{className:"text-sm text-neutral-500",children:["Showing ",(a-1)*parseInt(r)+1," to ",Math.min(a*parseInt(r),S.length)," of ",S.length," users"]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Y,{variant:"outline",size:"sm",onClick:()=>o(k=>k-1),disabled:a===1,children:"Previous"}),[...Array(C)].map((k,M)=>l.jsx(Y,{variant:a===M+1?"default":"outline",size:"sm",onClick:()=>o(M+1),children:M+1},M)),l.jsx(Y,{variant:"outline",size:"sm",onClick:()=>o(k=>k+1),disabled:a===C,children:"Next"})]})]})]})]}),l.jsx(vt,{open:s,onOpenChange:c,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Create New User"}),l.jsx(Wt,{children:"Create a new user account with specified permissions and resources."})]}),l.jsx(xM,{onSubmit:O,isSubmitting:b})]})}),l.jsx(vt,{open:u,onOpenChange:d,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsxs(ut,{children:["Edit User - ",(_=p==null?void 0:p.attributes)==null?void 0:_.username]}),l.jsx(Wt,{children:"Modify user account settings, permissions, and resources."})]}),l.jsx(xM,{user:p,onSubmit:A,isSubmitting:b})]})}),l.jsx(ja,{open:f,onOpenChange:h,children:l.jsxs(Mi,{children:[l.jsxs(Ri,{children:[l.jsx(Di,{children:"Delete User"}),l.jsxs(Ii,{children:["Are you sure you want to delete ",(N=p==null?void 0:p.attributes)==null?void 0:N.username,"? This action cannot be undone, and all associated servers will be removed."]})]}),l.jsxs($i,{children:[l.jsx(Fi,{onClick:()=>h(!1),children:"Cancel"}),l.jsx(Li,{onClick:E,className:"bg-red-500 hover:bg-red-600",children:"Delete User"})]})]})})]})}function c_e({status:e}){const t={online:"bg-green-500/10 text-green-500 border-green-500/20",offline:"bg-red-500/10 text-red-500 border-red-500/20",maintenance:"bg-yellow-500/10 text-yellow-500 border-yellow-500/20",installing:"bg-blue-500/10 text-blue-500 border-blue-500/20"};return l.jsx(qt,{variant:"outline",className:t[e==null?void 0:e.toLowerCase()]||t.offline,children:e||"Unknown"})}function u_e({node:e,isOpen:t,onClose:n}){var a,o,s,c,u,d,f,h;const{data:r,isLoading:i}=kt({queryKey:["nodeConfig",(a=e==null?void 0:e.attributes)==null?void 0:a.id],queryFn:async()=>{var v;const{data:p}=await ie.get(`/api/nodes/${(v=e==null?void 0:e.attributes)==null?void 0:v.id}/configuration`);return p},enabled:t&&!!((o=e==null?void 0:e.attributes)!=null&&o.id)});return l.jsx(vt,{open:t,onOpenChange:n,children:l.jsxs(lt,{className:"max-w-4xl",children:[l.jsx(ct,{children:l.jsxs(ut,{className:"flex items-center gap-2",children:[l.jsx(va,{className:"w-5 h-5"}),"Node Details - ",(s=e==null?void 0:e.attributes)==null?void 0:s.name]})}),l.jsxs("div",{className:"grid gap-6",children:[l.jsxs(ve,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Basic Information"})}),l.jsx(xe,{className:"grid gap-4",children:l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-400",children:"Name"}),l.jsx("div",{children:(c=e==null?void 0:e.attributes)==null?void 0:c.name})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-400",children:"FQDN"}),l.jsx("div",{children:(u=e==null?void 0:e.attributes)==null?void 0:u.fqdn})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-400",children:"Status"}),l.jsx("div",{children:l.jsx(c_e,{status:(d=e==null?void 0:e.attributes)==null?void 0:d.status})})]})]})})]}),l.jsxs(ve,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Resources"})}),l.jsx(xe,{children:l.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-neutral-400",children:[l.jsx(Zf,{className:"w-4 h-4"}),"Memory"]}),l.jsxs("div",{children:[((f=e==null?void 0:e.attributes)==null?void 0:f.memory)/1024||0," GB"]})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-neutral-400",children:[l.jsx(Qf,{className:"w-4 h-4"}),"Storage"]}),l.jsxs("div",{children:[((h=e==null?void 0:e.attributes)==null?void 0:h.disk)/1024||0," GB"]})]})]})})]}),l.jsxs(ve,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Node Configuration"})}),l.jsx(xe,{children:i?l.jsxs("div",{className:"space-y-2",children:[l.jsx(xt,{className:"h-4 w-full"}),l.jsx(xt,{className:"h-4 w-3/4"}),l.jsx(xt,{className:"h-4 w-1/2"})]}):l.jsx(fr,{className:"h-64 rounded-md border p-4",children:l.jsx("pre",{className:"text-sm font-mono",children:JSON.stringify(r,null,2)})})})]})]})]})})}function d_e(){const[e,t]=g.useState(""),[n,r]=g.useState("10"),[i,a]=g.useState(1),[o,s]=g.useState(null),{data:c,isLoading:u}=kt({queryKey:["nodes"],queryFn:async()=>{const{data:p}=await ie.get("/api/nodes");return p.data}}),d=(c==null?void 0:c.filter(p=>p.attributes.name.toLowerCase().includes(e.toLowerCase())||p.attributes.fqdn.toLowerCase().includes(e.toLowerCase())))||[],f=d.slice((i-1)*parseInt(n),i*parseInt(n)),h=Math.ceil(d.length/parseInt(n));return l.jsxs("div",{className:"p-6",children:[l.jsx("div",{className:"flex items-center justify-between mb-6",children:l.jsx("h1",{className:"text-2xl font-bold",children:"Nodes"})}),l.jsxs(ve,{children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Te,{children:"Nodes"}),l.jsxs("div",{className:"flex gap-4",children:[l.jsx(Ce,{placeholder:"Search nodes...",value:e,onChange:p=>t(p.target.value),className:"w-64"}),l.jsxs(Is,{value:n,onValueChange:r,children:[l.jsx(Ao,{className:"w-36",children:l.jsx(Ls,{})}),l.jsxs(Eo,{children:[l.jsx(Bt,{value:"10",children:"10 per page"}),l.jsx(Bt,{value:"25",children:"25 per page"}),l.jsx(Bt,{value:"50",children:"50 per page"})]})]})]})]})}),l.jsxs(xe,{children:[l.jsxs(Hi,{children:[l.jsx(Ki,{children:l.jsxs(rt,{children:[l.jsx(Oe,{children:"Node"}),l.jsx(Oe,{children:"Memory"}),l.jsx(Oe,{children:"Storage"}),l.jsx(Oe,{className:"text-right",children:"Actions"})]})}),l.jsx(qi,{children:u?[...Array(5)].map((p,v)=>l.jsxs(rt,{children:[l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-48"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-16"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-24"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-24"})})]},v)):f.map(p=>l.jsxs(rt,{children:[l.jsx(he,{children:l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:p.attributes.name}),l.jsx("div",{className:"text-sm text-neutral-500",children:p.attributes.fqdn})]})}),l.jsxs(he,{children:[p.attributes.memory/1024||0," GB"]}),l.jsxs(he,{children:[p.attributes.disk/1024||0," GB"]}),l.jsx(he,{className:"text-right",children:l.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>s(p),children:l.jsx(Aj,{className:"w-4 h-4"})})})]},p.attributes.id))})]}),l.jsxs("div",{className:"flex items-center justify-between mt-4",children:[l.jsxs("div",{className:"text-sm text-neutral-500",children:["Showing ",(i-1)*parseInt(n)+1," to ",Math.min(i*parseInt(n),d.length)," of ",d.length," nodes"]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Y,{variant:"outline",size:"sm",onClick:()=>a(p=>p-1),disabled:i===1,children:"Previous"}),[...Array(h)].map((p,v)=>l.jsx(Y,{variant:i===v+1?"default":"outline",size:"sm",onClick:()=>a(v+1),children:v+1},v)),l.jsx(Y,{variant:"outline",size:"sm",onClick:()=>a(p=>p+1),disabled:i===h,children:"Next"})]})]})]})]}),l.jsx(u_e,{node:o,isOpen:!!o,onClose:()=>s(null)})]})}function f_e({node:e,onSubmit:t,isSubmitting:n}){const[r,i]=g.useState({name:(e==null?void 0:e.name)||"",fqdn:(e==null?void 0:e.fqdn)||"",port:(e==null?void 0:e.port)||"",webhookUrl:(e==null?void 0:e.webhookUrl)||""});return l.jsxs("div",{className:"grid gap-6 py-4",children:[l.jsxs("div",{className:"grid gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Node Name"}),l.jsx(Ce,{value:r.name,onChange:a=>i({...r,name:a.target.value}),placeholder:"Production Node 1"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"FQDN / IP Address"}),l.jsx(Ce,{value:r.fqdn,onChange:a=>i({...r,fqdn:a.target.value}),placeholder:"radar.example.com"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Port"}),l.jsx(Ce,{type:"number",value:r.port,onChange:a=>i({...r,port:a.target.value}),placeholder:"8080"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Webhook URL (Optional)"}),l.jsx(Ce,{value:r.webhookUrl,onChange:a=>i({...r,webhookUrl:a.target.value}),placeholder:"https://discord.com/api/webhooks/..."})]})]}),l.jsxs("div",{className:"flex justify-end space-x-2",children:[l.jsx(Y,{variant:"outline",onClick:()=>t(null),children:"Cancel"}),l.jsx(Y,{onClick:()=>t(r),disabled:n,children:n?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving Changes..."]}):l.jsx(l.Fragment,{children:"Save Changes"})})]})]})}function h_e({node:e,onClose:t}){var i,a;const{data:n,isLoading:r}=kt({queryKey:["node",e==null?void 0:e.id],queryFn:async()=>{const{data:o}=await ie.get(`/api/radar/nodes/${e==null?void 0:e.id}`);return o},enabled:!!(e!=null&&e.id),refetchInterval:5e3});return l.jsx(vt,{open:!!e,onOpenChange:t,children:l.jsxs(lt,{className:"max-w-3xl",children:[l.jsxs(ct,{children:[l.jsxs(ut,{className:"flex items-center gap-2",children:[l.jsx(va,{className:"w-5 h-5"}),"Node Details - ",e==null?void 0:e.name]}),l.jsx(Wt,{children:"View detailed information and statistics for this Radar node"})]}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs(ve,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Node Information"})}),l.jsx(xe,{className:"space-y-4",children:l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Status"}),l.jsx(qt,{variant:(n==null?void 0:n.status)==="online"?"success":"destructive",children:(n==null?void 0:n.status)||"Unknown"})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Address"}),l.jsxs("div",{children:[e==null?void 0:e.fqdn,":",e==null?void 0:e.port]})]}),(e==null?void 0:e.webhookUrl)&&l.jsxs("div",{className:"col-span-2",children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Webhook URL"}),l.jsx("div",{className:"font-mono text-sm truncate",children:e==null?void 0:e.webhookUrl})]})]})})]}),(n==null?void 0:n.status)==="online"&&(n==null?void 0:n.stats)&&l.jsxs(ve,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Detection Statistics"})}),l.jsxs(xe,{children:[l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Total Detections"}),l.jsx("div",{className:"text-2xl font-bold",children:((i=n.stats.total_detections)==null?void 0:i.toLocaleString())||0})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Recent Detections"}),l.jsx("div",{className:"text-2xl font-bold",children:((a=n.stats.recent_detections)==null?void 0:a.toLocaleString())||0})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Detection Types"}),l.jsx("div",{className:"text-2xl font-bold",children:Object.keys(n.stats.detection_types||{}).length})]})]}),n.stats.detection_types&&l.jsxs("div",{className:"mt-6",children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500 mb-2",children:"Detection Breakdown"}),l.jsx(fr,{className:"h-48",children:l.jsx("div",{className:"space-y-2",children:Object.entries(n.stats.detection_types).map(([o,s])=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"font-mono text-sm",children:o}),l.jsx(qt,{variant:"secondary",children:s.toLocaleString()})]},o))})})]})]})]})]})]})})}function p_e(){const e=Xf(),[t,n]=g.useState(!1),[r,i]=g.useState(!1),[a,o]=g.useState(null),[s,c]=g.useState(null),[u,d]=g.useState(""),[f,h]=g.useState(!1),{data:p,isLoading:v}=kt({queryKey:["radar-nodes"],queryFn:async()=>{const{data:b}=await ie.get("/api/radar/nodes");return b},refetchInterval:1e4}),m=async b=>{var x,w;if(!b){n(!1);return}try{h(!0),d(""),await ie.post("/api/radar/nodes",b),n(!1),e.invalidateQueries("radar-nodes"),d("success:Node created successfully")}catch(P){d(((w=(x=P.response)==null?void 0:x.data)==null?void 0:w.error)||"Failed to create node")}finally{h(!1)}},y=async()=>{var b,x;try{await ie.delete(`/api/radar/nodes/${a.id}`),i(!1),o(null),e.invalidateQueries("radar-nodes"),d("success:Node deleted successfully")}catch(w){d(((x=(b=w.response)==null?void 0:b.data)==null?void 0:x.error)||"Failed to delete node")}};return l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Radar"}),l.jsx("p",{className:"text-sm text-neutral-500",children:"Manage and monitor your Radar 6 nodes"})]}),l.jsxs(Y,{onClick:()=>n(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add Node"]})]}),u&&l.jsxs(At,{variant:u.startsWith("success:")?"default":"destructive",className:"mb-6",children:[u.startsWith("success:")?l.jsx(Gc,{className:"h-4 w-4"}):l.jsx(rr,{className:"h-4 w-4"}),l.jsx(Et,{children:u.replace("success:","")})]}),l.jsxs(ve,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Radar Nodes"}),l.jsx(En,{children:"Active detection nodes in your network"})]}),l.jsx(xe,{children:l.jsxs(Hi,{children:[l.jsx(Ki,{children:l.jsxs(rt,{children:[l.jsx(Oe,{children:"Node"}),l.jsx(Oe,{children:"Status"}),l.jsx(Oe,{children:"Total Detections"}),l.jsx(Oe,{children:"Recent Activity"}),l.jsx(Oe,{className:"text-right",children:"Actions"})]})}),l.jsx(qi,{children:v?[...Array(3)].map((b,x)=>l.jsxs(rt,{children:[l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-48"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-24"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-32"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-32"})}),l.jsx(he,{children:l.jsx(xt,{className:"h-6 w-24"})})]},x)):(p==null?void 0:p.length)===0?l.jsx(rt,{children:l.jsx(he,{colSpan:5,className:"text-center text-neutral-500 py-8",children:l.jsxs("div",{className:"flex flex-col items-center gap-2",children:[l.jsx(wD,{className:"w-8 h-8 text-neutral-400"}),l.jsx("div",{children:"No Radar nodes found"}),l.jsx(Y,{variant:"outline",size:"sm",onClick:()=>n(!0),children:"Add Your First Node"})]})})}):p==null?void 0:p.map(b=>{var x,w,P;return l.jsxs(rt,{children:[l.jsx(he,{children:l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:b.name}),l.jsxs("div",{className:"text-sm text-neutral-500",children:[b.fqdn,":",b.port]})]})}),l.jsx(he,{children:l.jsx(qt,{variant:b.status==="online"?"success":"destructive",className:"capitalize",children:b.status})}),l.jsx(he,{children:b.status==="online"?((w=(x=b.stats)==null?void 0:x.total_detections)==null?void 0:w.toLocaleString())||"0":"-"}),l.jsx(he,{children:b.status==="online"?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(g7,{className:"w-4 h-4 text-green-500"}),((P=b.stats)==null?void 0:P.recent_detections)||0," recent"]}):"-"}),l.jsx(he,{children:l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>c(b),children:l.jsx(Aj,{className:"w-4 h-4"})}),l.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>{o(b),i(!0)},children:l.jsx(Ej,{className:"w-4 h-4"})})]})})]},b.id)})})]})})]}),l.jsx(vt,{open:t,onOpenChange:n,children:l.jsxs(lt,{children:[l.jsxs(ct,{children:[l.jsx(ut,{children:"Add Radar Node"}),l.jsx(Wt,{children:"Add a new Radar detection node to your network"})]}),l.jsx(f_e,{onSubmit:m,isSubmitting:f})]})}),l.jsx(ja,{open:r,onOpenChange:i,children:l.jsxs(Mi,{children:[l.jsxs(Ri,{children:[l.jsx(Di,{children:"Delete Node"}),l.jsxs(Ii,{children:["Are you sure you want to delete ",a==null?void 0:a.name,"? This action cannot be undone, and all historical detection data will be lost."]})]}),l.jsxs($i,{children:[l.jsx(Fi,{onClick:()=>i(!1),children:"Cancel"}),l.jsx(Li,{onClick:y,className:"bg-red-500 hover:bg-red-600",children:"Delete Node"})]})]})}),l.jsx(h_e,{node:s,onClose:()=>c(null)})]})}class m_e extends T.Component{constructor(n){super(n);s0(this,"startCountdown",()=>{this.countdownInterval=setInterval(()=>{this.setState(n=>({countdown:n.countdown-1}),()=>{this.state.countdown===0&&(clearInterval(this.countdownInterval),window.location.reload())})},1e3)});s0(this,"handleRefreshNow",()=>{window.location.reload()});this.state={hasError:!1,error:null,countdown:3}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,r){console.error("Error caught by boundary:",n,r)}componentDidUpdate(n,r){this.state.hasError&&!r.hasError&&this.startCountdown()}componentWillUnmount(){this.countdownInterval&&clearInterval(this.countdownInterval)}render(){var n;return this.state.hasError?l.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:l.jsxs(ve,{className:"w-full max-w-md",children:[l.jsxs(je,{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jD,{className:"h-5 w-5 text-destructive"}),l.jsx(Te,{children:"Something went wrong with Prism"})]}),l.jsx(En,{children:"An error occurred while rendering the page."})]}),l.jsxs(xe,{className:"space-y-4",children:[l.jsx("div",{className:"bg-muted/50 rounded-lg p-4 text-sm font-mono overflow-auto max-h-[200px]",children:((n=this.state.error)==null?void 0:n.message)||"Unknown error"}),l.jsx(gK,{type:"single",collapsible:!0,className:"w-full",children:l.jsxs(XD,{value:"system-info",children:[l.jsx(QD,{className:"text-sm",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Aj,{className:"h-4 w-4"}),"System information"]})}),l.jsx(ZD,{children:l.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[l.jsx("p",{children:"Version: Prism 0.5.0-alpha2"}),l.jsx("p",{children:"Codename: Adelante"}),l.jsx("p",{children:"Platform: 120"}),l.jsxs("p",{children:["User Agent: ",navigator.userAgent]}),l.jsxs("p",{children:["Timestamp: ",new Date().toISOString()]})]})})]})}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Refreshing in ",this.state.countdown,"..."]}),l.jsxs(Y,{variant:"outline",size:"sm",onClick:this.handleRefreshNow,className:"gap-2",children:[l.jsx(Ve,{className:"h-4 w-4"}),"Refresh Now"]})]})]})]})}):this.props.children}}const v_e=()=>l.jsx(j9,{to:"/dashboard",replace:!0}),g_e=({children:e})=>{const[t,n]=g.useState(!0),r=Us();return g.useEffect(()=>{(async()=>{try{if(!(await fetch("/api/v5/state",{credentials:"include"})).ok)throw new Error("Unauthorized");n(!1)}catch(a){console.error("Auth check failed:",a),window.location.href="/auth"}})()},[r]),t?null:e};function y_e(){return l.jsx(m_e,{children:l.jsx("div",{className:"dark",children:l.jsxs(O9,{children:[l.jsx(pt,{path:"/",element:l.jsx(v_e,{})}),l.jsxs(pt,{element:l.jsx(g_e,{children:l.jsx(Aee,{})}),children:[l.jsx(pt,{path:"/server/:id/overview",element:l.jsx(eEe,{})}),l.jsx(pt,{path:"/server/:id/console",element:l.jsx(qNe,{})}),l.jsx(pt,{path:"/server/:id/files",element:l.jsx(zNe,{})}),l.jsx(pt,{path:"/server/:id/plugins",element:l.jsx(VNe,{})}),l.jsx(pt,{path:"/server/:id/network",element:l.jsx(GNe,{})}),l.jsx(pt,{path:"/server/:id/users",element:l.jsx(YNe,{})}),l.jsx(pt,{path:"/server/:id/players",element:l.jsx(u2e,{})}),l.jsx(pt,{path:"/server/:id/backups",element:l.jsx(d2e,{})}),l.jsx(pt,{path:"/server/:id/settings",element:l.jsx(cTe,{})}),l.jsx(pt,{path:"/dashboard",element:l.jsx(fTe,{})}),l.jsx(pt,{path:"/coins/afk",element:l.jsx(BTe,{})}),l.jsx(pt,{path:"/coins/store",element:l.jsx(UTe,{})}),l.jsx(pt,{path:"/referrals",element:l.jsx(zTe,{})}),l.jsx(pt,{path:"/tickets",element:l.jsx(HTe,{})}),l.jsx(pt,{path:"/account",element:l.jsx(KTe,{})}),l.jsx(pt,{path:"/admin/overview",element:l.jsx(XTe,{})}),l.jsx(pt,{path:"/admin/users",element:l.jsx(l_e,{})}),l.jsx(pt,{path:"/admin/nodes",element:l.jsx(d_e,{})}),l.jsx(pt,{path:"/admin/radar",element:l.jsx(p_e,{})})]}),l.jsx(pt,{path:"/auth",element:l.jsx(LTe,{})}),l.jsx(pt,{path:"*",element:l.jsx(FTe,{})})]})})})}const x_e=new Q9;qx.createRoot(document.getElementById("MonoApp")).render(l.jsx(T.StrictMode,{children:l.jsx(n7,{client:x_e,children:l.jsx(M9,{basename:"/app",children:l.jsx(y_e,{})})})})); diff --git a/app/dist/assets/js/index-Cuah7aaC.js b/app/dist/assets/js/index-Cuah7aaC.js new file mode 100644 index 0000000..76c20c7 --- /dev/null +++ b/app/dist/assets/js/index-Cuah7aaC.js @@ -0,0 +1,711 @@ +var c8=Object.defineProperty;var MO=e=>{throw TypeError(e)};var u8=(e,t,n)=>t in e?c8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var u0=(e,t,n)=>u8(e,typeof t!="symbol"?t+"":t,n),d0=(e,t,n)=>t.has(e)||MO("Cannot "+n);var L=(e,t,n)=>(d0(e,t,"read from private field"),n?n.call(e):t.get(e)),ve=(e,t,n)=>t.has(e)?MO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ce=(e,t,n,r)=>(d0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ke=(e,t,n)=>(d0(e,t,"access private method"),n);var Ph=(e,t,n,r)=>({set _(i){ce(e,t,i,n)},get _(){return L(e,t,r)}});function d8(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 a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Oh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $M={exports:{}},Yv={},DM={exports:{}},Ie={};/** + * @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 Kf=Symbol.for("react.element"),f8=Symbol.for("react.portal"),h8=Symbol.for("react.fragment"),p8=Symbol.for("react.strict_mode"),m8=Symbol.for("react.profiler"),v8=Symbol.for("react.provider"),g8=Symbol.for("react.context"),y8=Symbol.for("react.forward_ref"),x8=Symbol.for("react.suspense"),b8=Symbol.for("react.memo"),w8=Symbol.for("react.lazy"),RO=Symbol.iterator;function S8(e){return e===null||typeof e!="object"?null:(e=RO&&e[RO]||e["@@iterator"],typeof e=="function"?e:null)}var IM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},LM=Object.assign,FM={};function Uc(e,t,n){this.props=e,this.context=t,this.refs=FM,this.updater=n||IM}Uc.prototype.isReactComponent={};Uc.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")};Uc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function BM(){}BM.prototype=Uc.prototype;function AS(e,t,n){this.props=e,this.context=t,this.refs=FM,this.updater=n||IM}var ES=AS.prototype=new BM;ES.constructor=AS;LM(ES,Uc.prototype);ES.isPureReactComponent=!0;var $O=Array.isArray,UM=Object.prototype.hasOwnProperty,TS={current:null},zM={key:!0,ref:!0,__self:!0,__source:!0};function VM(e,t,n){var r,i={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)UM.call(t,r)&&!zM.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,U=I[z];if(0>>1;zi(ae,F))eei(q,ae)?(I[z]=q,I[ee]=F,z=ee):(I[z]=ae,I[J]=F,z=J);else if(eei(q,F))I[z]=q,I[ee]=F,z=ee;else break e}}return R}function i(I,R){var F=I.sortIndex-R.sortIndex;return F!==0?F:I.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],u=[],d=1,f=null,h=3,p=!1,v=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(I){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=I)r(u),R.sortIndex=R.expirationTime,t(c,R);else break;R=n(u)}}function C(I){if(m=!1,w(I),!v)if(n(c)!==null)v=!0,D(S);else{var R=n(u);R!==null&&B(C,R.startTime-I)}}function S(I,R){v=!1,m&&(m=!1,x(O),O=-1),p=!0;var F=h;try{for(w(R),f=n(c);f!==null&&(!(f.expirationTime>R)||I&&!_());){var z=f.callback;if(typeof z=="function"){f.callback=null,h=f.priorityLevel;var U=z(f.expirationTime<=R);R=e.unstable_now(),typeof U=="function"?f.callback=U:f===n(c)&&r(c),w(R)}else r(c);f=n(c)}if(f!==null)var H=!0;else{var J=n(u);J!==null&&B(C,J.startTime-R),H=!1}return H}finally{f=null,h=F,p=!1}}var j=!1,P=null,O=-1,N=5,A=-1;function _(){return!(e.unstable_now()-AI||125z?(I.sortIndex=F,t(u,I),n(c)===null&&I===n(u)&&(m?(x(O),O=-1):m=!0,B(C,F-z))):(I.sortIndex=U,t(c,I),v||p||(v=!0,D(S))),I},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(I){var R=h;return function(){var F=h;h=R;try{return I.apply(this,arguments)}finally{h=F}}}})(YM);GM.exports=YM;var M8=GM.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 R8=g,lr=M8;function Q(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"),Qx=Object.prototype.hasOwnProperty,$8=/^[: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]*$/,IO={},LO={};function D8(e){return Qx.call(LO,e)?!0:Qx.call(IO,e)?!1:$8.test(e)?LO[e]=!0:(IO[e]=!0,!1)}function I8(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 L8(e,t,n,r){if(t===null||typeof t>"u"||I8(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 Mn(e,t,n,r,i,a,o){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=a,this.removeEmptyString=o}var cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[e]=new Mn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cn[t]=new Mn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new Mn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[e]=new Mn(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){cn[e]=new Mn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new Mn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new Mn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new Mn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new Mn(e,5,!1,e.toLowerCase(),null,!1,!1)});var kS=/[\-:]([a-z])/g;function MS(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(kS,MS);cn[t]=new Mn(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(kS,MS);cn[t]=new Mn(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(kS,MS);cn[t]=new Mn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new Mn(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new Mn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new Mn(e,1,!1,e.toLowerCase(),null,!0,!0)});function RS(e,t,n,r){var i=cn.hasOwnProperty(t)?cn[t]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==a[s]){var c=` +`+i[o].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=o&&0<=s);break}}}finally{p0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wu(e):""}function F8(e){switch(e.tag){case 5:return Wu(e.type);case 16:return Wu("Lazy");case 13:return Wu("Suspense");case 19:return Wu("SuspenseList");case 0:case 2:case 15:return e=m0(e.type,!1),e;case 11:return e=m0(e.type.render,!1),e;case 1:return e=m0(e.type,!0),e;default:return""}}function tb(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 ol:return"Fragment";case al:return"Portal";case Jx:return"Profiler";case $S:return"StrictMode";case Zx:return"Suspense";case eb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case JM:return(e.displayName||"Context")+".Consumer";case QM:return(e._context.displayName||"Context")+".Provider";case DS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case IS:return t=e.displayName||null,t!==null?t:tb(e.type)||"Memo";case za:t=e._payload,e=e._init;try{return tb(e(t))}catch{}}return null}function B8(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 tb(t);case 8:return t===$S?"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 So(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function eR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function U8(e){var t=eR(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,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Eh(e){e._valueTracker||(e._valueTracker=U8(e))}function tR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=eR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function qp(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 nb(e,t){var n=t.checked;return Ct({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function BO(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=So(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 nR(e,t){t=t.checked,t!=null&&RS(e,"checked",t,!1)}function rb(e,t){nR(e,t);var n=So(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")?ib(e,t.type,n):t.hasOwnProperty("defaultValue")&&ib(e,t.type,So(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function UO(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 ib(e,t,n){(t!=="number"||qp(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hu=Array.isArray;function Ol(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Th.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Nd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rd={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},z8=["Webkit","ms","Moz","O"];Object.keys(rd).forEach(function(e){z8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rd[t]=rd[e]})});function oR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rd.hasOwnProperty(e)&&rd[e]?(""+t).trim():t+"px"}function sR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=oR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var V8=Ct({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 sb(e,t){if(t){if(V8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function lb(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 cb=null;function LS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ub=null,Nl=null,Al=null;function WO(e){if(e=Yf(e)){if(typeof ub!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=eg(t),ub(e.stateNode,e.type,t))}}function lR(e){Nl?Al?Al.push(e):Al=[e]:Nl=e}function cR(){if(Nl){var e=Nl,t=Al;if(Al=Nl=null,WO(e),t)for(e=0;e>>=0,e===0?32:31-(eV(e)/tV|0)|0}var _h=64,kh=4194304;function Ku(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 Qp(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=Ku(s):(a&=o,a!==0&&(r=Ku(a)))}else o=n&~i,o!==0?r=Ku(o):a!==0&&(r=Ku(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&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 qf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ni(t),e[t]=n}function aV(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=ad),ZO=" ",eN=!1;function ER(e,t){switch(e){case"keyup":return MV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sl=!1;function $V(e,t){switch(e){case"compositionend":return TR(t);case"keypress":return t.which!==32?null:(eN=!0,ZO);case"textInput":return e=t.data,e===ZO&&eN?null:e;default:return null}}function DV(e,t){if(sl)return e==="compositionend"||!KS&&ER(e,t)?(e=NR(),Op=VS=no=null,sl=!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=iN(n)}}function RR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?RR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $R(){for(var e=window,t=qp();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qp(e.document)}return t}function qS(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 HV(e){var t=$R(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&RR(n.ownerDocument.documentElement,n)){if(r!==null&&qS(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,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=aN(n,a);var o=aN(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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,ll=null,vb=null,sd=null,gb=!1;function oN(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;gb||ll==null||ll!==qp(r)||(r=ll,"selectionStart"in r&&qS(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}),sd&&Md(sd,r)||(sd=r,r=em(vb,"onSelect"),0dl||(e.current=jb[dl],jb[dl]=null,dl--)}function at(e,t){dl++,jb[dl]=e.current,e.current=t}var jo={},Sn=ko(jo),Bn=ko(!1),Ps=jo;function rc(e,t){var n=e.type.contextTypes;if(!n)return jo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Un(e){return e=e.childContextTypes,e!=null}function nm(){pt(Bn),pt(Sn)}function hN(e,t,n){if(Sn.current!==jo)throw Error(Q(168));at(Sn,t),at(Bn,n)}function WR(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(Q(108,B8(e)||"Unknown",i));return Ct({},n,r)}function rm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jo,Ps=Sn.current,at(Sn,e),at(Bn,Bn.current),!0}function pN(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=WR(e,t,Ps),r.__reactInternalMemoizedMergedChildContext=e,pt(Bn),pt(Sn),at(Sn,e)):pt(Bn),at(Bn,n)}var ra=null,tg=!1,E0=!1;function HR(e){ra===null?ra=[e]:ra.push(e)}function rW(e){tg=!0,HR(e)}function Mo(){if(!E0&&ra!==null){E0=!0;var e=0,t=qe;try{var n=ra;for(qe=1;e>=o,i-=o,aa=1<<32-ni(t)+i|n<O?(N=P,P=null):N=P.sibling;var A=h(x,P,w[O],C);if(A===null){P===null&&(P=N);break}e&&P&&A.alternate===null&&t(x,P),b=a(A,b,O),j===null?S=A:j.sibling=A,j=A,P=N}if(O===w.length)return n(x,P),gt&&Ko(x,O),S;if(P===null){for(;OO?(N=P,P=null):N=P.sibling;var _=h(x,P,A.value,C);if(_===null){P===null&&(P=N);break}e&&P&&_.alternate===null&&t(x,P),b=a(_,b,O),j===null?S=_:j.sibling=_,j=_,P=N}if(A.done)return n(x,P),gt&&Ko(x,O),S;if(P===null){for(;!A.done;O++,A=w.next())A=f(x,A.value,C),A!==null&&(b=a(A,b,O),j===null?S=A:j.sibling=A,j=A);return gt&&Ko(x,O),S}for(P=r(x,P);!A.done;O++,A=w.next())A=p(P,x,O,A.value,C),A!==null&&(e&&A.alternate!==null&&P.delete(A.key===null?O:A.key),b=a(A,b,O),j===null?S=A:j.sibling=A,j=A);return e&&P.forEach(function(E){return t(x,E)}),gt&&Ko(x,O),S}function y(x,b,w,C){if(typeof w=="object"&&w!==null&&w.type===ol&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Ah:e:{for(var S=w.key,j=b;j!==null;){if(j.key===S){if(S=w.type,S===ol){if(j.tag===7){n(x,j.sibling),b=i(j,w.props.children),b.return=x,x=b;break e}}else if(j.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===za&&gN(S)===j.type){n(x,j.sibling),b=i(j,w.props),b.ref=Nu(x,j,w),b.return=x,x=b;break e}n(x,j);break}else t(x,j);j=j.sibling}w.type===ol?(b=gs(w.props.children,x.mode,C,w.key),b.return=x,x=b):(C=Rp(w.type,w.key,w.props,null,x.mode,C),C.ref=Nu(x,b,w),C.return=x,x=C)}return o(x);case al:e:{for(j=w.key;b!==null;){if(b.key===j)if(b.tag===4&&b.stateNode.containerInfo===w.containerInfo&&b.stateNode.implementation===w.implementation){n(x,b.sibling),b=i(b,w.children||[]),b.return=x,x=b;break e}else{n(x,b);break}else t(x,b);b=b.sibling}b=I0(w,x.mode,C),b.return=x,x=b}return o(x);case za:return j=w._init,y(x,b,j(w._payload),C)}if(Hu(w))return v(x,b,w,C);if(Su(w))return m(x,b,w,C);Fh(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,b!==null&&b.tag===6?(n(x,b.sibling),b=i(b,w),b.return=x,x=b):(n(x,b),b=D0(w,x.mode,C),b.return=x,x=b),o(x)):n(x,b)}return y}var ac=YR(!0),XR=YR(!1),om=ko(null),sm=null,pl=null,QS=null;function JS(){QS=pl=sm=null}function ZS(e){var t=om.current;pt(om),e._currentValue=t}function Ob(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Tl(e,t){sm=e,QS=pl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ln=!0),e.firstContext=null)}function _r(e){var t=e._currentValue;if(QS!==e)if(e={context:e,memoizedValue:t,next:null},pl===null){if(sm===null)throw Error(Q(308));pl=e,sm.dependencies={lanes:0,firstContext:e}}else pl=pl.next=e;return t}var es=null;function ej(e){es===null?es=[e]:es.push(e)}function QR(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ej(t)):(n.next=i.next,i.next=n),t.interleaved=n,ya(e,r)}function ya(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Va=!1;function tj(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function JR(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ca(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ue&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ya(e,n)}return i=r.interleaved,i===null?(t.next=t,ej(r)):(t.next=i.next,i.next=t),r.interleaved=t,ya(e,n)}function Ap(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,BS(e,n)}}function yN(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function lm(e,t,n,r){var i=e.updateQueue;Va=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==o&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=c))}if(a!==null){var f=i.baseState;o=0,d=u=c=null,s=a;do{var h=s.lane,p=s.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,m=s;switch(h=t,p=n,m.tag){case 1:if(v=m.payload,typeof v=="function"){f=v.call(p,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,h=typeof v=="function"?v.call(p,f,h):v,h==null)break e;f=Ct({},f,h);break e;case 2:Va=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);As|=o,e.lanes=o,e.memoizedState=f}}function xN(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=_0.transition;_0.transition={};try{e(!1),t()}finally{qe=n,_0.transition=r}}function m$(){return kr().memoizedState}function sW(e,t,n){var r=po(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},v$(e))g$(t,n);else if(n=QR(e,t,n,r),n!==null){var i=Tn();ri(n,e,r,i),y$(n,t,r)}}function lW(e,t,n){var r=po(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(v$(e))g$(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,oi(s,o)){var c=t.interleaved;c===null?(i.next=i,ej(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=QR(e,t,i,r),n!==null&&(i=Tn(),ri(n,e,r,i),y$(n,t,r))}}function v$(e){var t=e.alternate;return e===jt||t!==null&&t===jt}function g$(e,t){ld=um=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function y$(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,BS(e,n)}}var dm={readContext:_r,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},cW={readContext:_r,useCallback:function(e,t){return vi().memoizedState=[e,t===void 0?null:t],e},useContext:_r,useEffect:wN,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Tp(4194308,4,u$.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tp(4194308,4,e,t)},useInsertionEffect:function(e,t){return Tp(4,2,e,t)},useMemo:function(e,t){var n=vi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vi();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=sW.bind(null,jt,e),[r.memoizedState,e]},useRef:function(e){var t=vi();return e={current:e},t.memoizedState=e},useState:bN,useDebugValue:cj,useDeferredValue:function(e){return vi().memoizedState=e},useTransition:function(){var e=bN(!1),t=e[0];return e=oW.bind(null,e[1]),vi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=jt,i=vi();if(gt){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),Qt===null)throw Error(Q(349));Ns&30||n$(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,wN(i$.bind(null,r,a,e),[e]),r.flags|=2048,Ud(9,r$.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=vi(),t=Qt.identifierPrefix;if(gt){var n=oa,r=aa;n=(r&~(1<<32-ni(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[wi]=t,e[Dd]=r,A$(e,t,!1,!1),t.stateNode=e;e:{switch(o=lb(n,r),n){case"dialog":ut("cancel",e),ut("close",e),i=r;break;case"iframe":case"object":case"embed":ut("load",e),i=r;break;case"video":case"audio":for(i=0;ilc&&(t.flags|=128,r=!0,Au(a,!1),t.lanes=4194304)}else{if(!r)if(e=cm(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Au(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!gt)return hn(t),null}else 2*Mt()-a.renderingStartTime>lc&&n!==1073741824&&(t.flags|=128,r=!0,Au(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Mt(),t.sibling=null,n=bt.current,at(bt,r?n&1|2:n&1),t):(hn(t),null);case 22:case 23:return mj(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xn&1073741824&&(hn(t),t.subtreeFlags&6&&(t.flags|=8192)):hn(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function gW(e,t){switch(YS(t),t.tag){case 1:return Un(t.type)&&nm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oc(),pt(Bn),pt(Sn),ij(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rj(t),null;case 13:if(pt(bt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));ic()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pt(bt),null;case 4:return oc(),null;case 10:return ZS(t.type._context),null;case 22:case 23:return mj(),null;case 24:return null;default:return null}}var Uh=!1,yn=!1,yW=typeof WeakSet=="function"?WeakSet:Set,de=null;function ml(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){At(e,t,r)}else n.current=null}function $b(e,t,n){try{n()}catch(r){At(e,t,r)}}var kN=!1;function xW(e,t){if(yb=Jp,e=$R(),qS(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,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=o+i),f!==a||r!==0&&f.nodeType!==3||(c=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===i&&(s=o),h===a&&++d===r&&(c=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(xb={focusedElem:e,selectionRange:n},Jp=!1,de=t;de!==null;)if(t=de,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,de=e;else for(;de!==null;){t=de;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 m=v.memoizedProps,y=v.memoizedState,x=t.stateNode,b=x.getSnapshotBeforeUpdate(t.elementType===t.type?m:Hr(t.type,m),y);x.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(C){At(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,de=e;break}de=t.return}return v=kN,kN=!1,v}function cd(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 a=i.destroy;i.destroy=void 0,a!==void 0&&$b(t,n,a)}i=i.next}while(i!==r)}}function ig(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 Db(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 _$(e){var t=e.alternate;t!==null&&(e.alternate=null,_$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wi],delete t[Dd],delete t[Sb],delete t[tW],delete t[nW])),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 k$(e){return e.tag===5||e.tag===3||e.tag===4}function MN(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||k$(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 Ib(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=tm));else if(r!==4&&(e=e.child,e!==null))for(Ib(e,t,n),e=e.sibling;e!==null;)Ib(e,t,n),e=e.sibling}function Lb(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(Lb(e,t,n),e=e.sibling;e!==null;)Lb(e,t,n),e=e.sibling}var rn=null,qr=!1;function $a(e,t,n){for(n=n.child;n!==null;)M$(e,t,n),n=n.sibling}function M$(e,t,n){if(Pi&&typeof Pi.onCommitFiberUnmount=="function")try{Pi.onCommitFiberUnmount(Xv,n)}catch{}switch(n.tag){case 5:yn||ml(n,t);case 6:var r=rn,i=qr;rn=null,$a(e,t,n),rn=r,qr=i,rn!==null&&(qr?(e=rn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rn.removeChild(n.stateNode));break;case 18:rn!==null&&(qr?(e=rn,n=n.stateNode,e.nodeType===8?A0(e.parentNode,n):e.nodeType===1&&A0(e,n),_d(e)):A0(rn,n.stateNode));break;case 4:r=rn,i=qr,rn=n.stateNode.containerInfo,qr=!0,$a(e,t,n),rn=r,qr=i;break;case 0:case 11:case 14:case 15:if(!yn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&$b(n,t,o),i=i.next}while(i!==r)}$a(e,t,n);break;case 1:if(!yn&&(ml(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){At(n,t,s)}$a(e,t,n);break;case 21:$a(e,t,n);break;case 22:n.mode&1?(yn=(r=yn)||n.memoizedState!==null,$a(e,t,n),yn=r):$a(e,t,n);break;default:$a(e,t,n)}}function RN(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yW),t.forEach(function(r){var i=AW.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Fr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~a}if(r=i,r=Mt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wW(r/1960))-r,10e?16:e,ro===null)var r=!1;else{if(e=ro,ro=null,pm=0,Ue&6)throw Error(Q(331));var i=Ue;for(Ue|=4,de=e.current;de!==null;){var a=de,o=a.child;if(de.flags&16){var s=a.deletions;if(s!==null){for(var c=0;cMt()-hj?vs(e,0):fj|=n),zn(e,t)}function U$(e,t){t===0&&(e.mode&1?(t=kh,kh<<=1,!(kh&130023424)&&(kh=4194304)):t=1);var n=Tn();e=ya(e,t),e!==null&&(qf(e,t,n),zn(e,n))}function NW(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),U$(e,n)}function AW(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(Q(314))}r!==null&&r.delete(t),U$(e,n)}var z$;z$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Bn.current)Ln=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ln=!1,mW(e,t,n);Ln=!!(e.flags&131072)}else Ln=!1,gt&&t.flags&1048576&&KR(t,am,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_p(e,t),e=t.pendingProps;var i=rc(t,Sn.current);Tl(t,n),i=oj(null,t,r,e,i,n);var a=sj();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,Un(r)?(a=!0,rm(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,tj(t),i.updater=rg,t.stateNode=i,i._reactInternals=t,Ab(t,r,e,n),t=_b(null,t,r,!0,a,n)):(t.tag=0,gt&&a&&GS(t),Nn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_p(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=TW(r),e=Hr(r,e),i){case 0:t=Tb(null,t,r,e,n);break e;case 1:t=EN(null,t,r,e,n);break e;case 11:t=NN(null,t,r,e,n);break e;case 14:t=AN(null,t,r,Hr(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Hr(r,i),Tb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Hr(r,i),EN(e,t,r,i,n);case 3:e:{if(P$(t),e===null)throw Error(Q(387));r=t.pendingProps,a=t.memoizedState,i=a.element,JR(e,t),lm(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=sc(Error(Q(423)),t),t=TN(e,t,r,n,i);break e}else if(r!==i){i=sc(Error(Q(424)),t),t=TN(e,t,r,n,i);break e}else for(tr=uo(t.stateNode.containerInfo.firstChild),nr=t,gt=!0,Qr=null,n=XR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ic(),r===i){t=xa(e,t,n);break e}Nn(e,t,r,n)}t=t.child}return t;case 5:return ZR(t),e===null&&Pb(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,bb(r,i)?o=null:a!==null&&bb(r,a)&&(t.flags|=32),C$(e,t),Nn(e,t,o,n),t.child;case 6:return e===null&&Pb(t),null;case 13:return O$(e,t,n);case 4:return nj(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ac(t,null,r,n):Nn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Hr(r,i),NN(e,t,r,i,n);case 7:return Nn(e,t,t.pendingProps,n),t.child;case 8:return Nn(e,t,t.pendingProps.children,n),t.child;case 12:return Nn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,at(om,r._currentValue),r._currentValue=o,a!==null)if(oi(a.value,o)){if(a.children===i.children&&!Bn.current){t=xa(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=ca(-1,n&-n),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Ob(a.return,n,t),s.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Q(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Ob(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Nn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Tl(t,n),i=_r(i),r=r(i),t.flags|=1,Nn(e,t,r,n),t.child;case 14:return r=t.type,i=Hr(r,t.pendingProps),i=Hr(r.type,i),AN(e,t,r,i,n);case 15:return S$(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Hr(r,i),_p(e,t),t.tag=1,Un(r)?(e=!0,rm(t)):e=!1,Tl(t,n),x$(t,r,i),Ab(t,r,i,n),_b(null,t,r,!0,e,n);case 19:return N$(e,t,n);case 22:return j$(e,t,n)}throw Error(Q(156,t.tag))};function V$(e,t){return vR(e,t)}function EW(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 jr(e,t,n,r){return new EW(e,t,n,r)}function gj(e){return e=e.prototype,!(!e||!e.isReactComponent)}function TW(e){if(typeof e=="function")return gj(e)?1:0;if(e!=null){if(e=e.$$typeof,e===DS)return 11;if(e===IS)return 14}return 2}function mo(e,t){var n=e.alternate;return n===null?(n=jr(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 Rp(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")gj(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ol:return gs(n.children,i,a,t);case $S:o=8,i|=8;break;case Jx:return e=jr(12,n,t,i|2),e.elementType=Jx,e.lanes=a,e;case Zx:return e=jr(13,n,t,i),e.elementType=Zx,e.lanes=a,e;case eb:return e=jr(19,n,t,i),e.elementType=eb,e.lanes=a,e;case ZM:return og(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case QM:o=10;break e;case JM:o=9;break e;case DS:o=11;break e;case IS:o=14;break e;case za:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=jr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function gs(e,t,n,r){return e=jr(7,e,r,t),e.lanes=n,e}function og(e,t,n,r){return e=jr(22,e,r,t),e.elementType=ZM,e.lanes=n,e.stateNode={isHidden:!1},e}function D0(e,t,n){return e=jr(6,e,null,t),e.lanes=n,e}function I0(e,t,n){return t=jr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _W(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=g0(0),this.expirationTimes=g0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yj(e,t,n,r,i,a,o,s,c){return e=new _W(e,t,n,s,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=jr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},tj(a),e}function kW(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q$)}catch(e){console.error(e)}}q$(),qM.exports=ur;var Wc=qM.exports;const G$=Ze(Wc);var zN=Wc;Xx.createRoot=zN.createRoot,Xx.hydrateRoot=zN.hydrateRoot;/** + * @remix-run/router v1.21.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 Vd(){return Vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Y$(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function IW(){return Math.random().toString(36).substr(2,8)}function WN(e,t){return{usr:e.state,key:e.key,idx:t}}function Vb(e,t,n,r){return n===void 0&&(n=null),Vd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Hc(t):t,{state:n,key:t&&t.key||r||IW()})}function gm(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 Hc(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 LW(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=io.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Vd({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){s=io.Pop;let y=d(),x=y==null?null:y-u;u=y,c&&c({action:s,location:m.location,delta:x})}function h(y,x){s=io.Push;let b=Vb(m.location,y,x);u=d()+1;let w=WN(b,u),C=m.createHref(b);try{o.pushState(w,"",C)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(C)}a&&c&&c({action:s,location:m.location,delta:1})}function p(y,x){s=io.Replace;let b=Vb(m.location,y,x);u=d();let w=WN(b,u),C=m.createHref(b);o.replaceState(w,"",C),a&&c&&c({action:s,location:m.location,delta:0})}function v(y){let x=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:gm(y);return b=b.replace(/ $/,"%20"),Rt(x,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,x)}let m={get action(){return s},get location(){return e(i,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(VN,f),c=y,()=>{i.removeEventListener(VN,f),c=null}},createHref(y){return t(i,y)},createURL:v,encodeLocation(y){let x=v(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:p,go(y){return o.go(y)}};return m}var HN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(HN||(HN={}));function FW(e,t,n){return n===void 0&&(n="/"),BW(e,t,n)}function BW(e,t,n,r){let i=typeof t=="string"?Hc(t):t,a=Sj(i.pathname||"/",n);if(a==null)return null;let o=X$(e);UW(o);let s=null;for(let c=0;s==null&&c{let c={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(Rt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=vo([r,c.relativePath]),d=n.concat(c);a.children&&a.children.length>0&&(Rt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),X$(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:GW(u,a.index),routesMeta:d})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let c of Q$(a.path))i(a,o,c)}),t}function Q$(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=Q$(r.join("/")),s=[];return s.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&s.push(...o),s.map(c=>e.startsWith("/")&&c===""?"/":c)}function UW(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:YW(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const zW=/^:[\w-]+$/,VW=3,WW=2,HW=1,KW=10,qW=-2,KN=e=>e==="*";function GW(e,t){let n=e.split("/"),r=n.length;return n.some(KN)&&(r+=qW),t&&(r+=WW),n.filter(i=>!KN(i)).reduce((i,a)=>i+(zW.test(a)?VW:a===""?HW:KW),r)}function YW(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 XW(e,t,n){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:p}=d;if(h==="*"){let m=s[f]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[f];return p&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function JW(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Y$(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,(o,s,c)=>(r.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function ZW(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Y$(!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 Sj(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 e7(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Hc(e):e;return{pathname:n?n.startsWith("/")?n:t7(n,t):t,search:i7(r),hash:a7(i)}}function t7(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 L0(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 n7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function jj(e,t){let n=n7(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Cj(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Hc(e):(i=Vd({},e),Rt(!i.pathname||!i.pathname.includes("?"),L0("?","pathname","search",i)),Rt(!i.pathname||!i.pathname.includes("#"),L0("#","pathname","hash",i)),Rt(!i.search||!i.search.includes("#"),L0("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let c=e7(i,s),u=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const vo=e=>e.join("/").replace(/\/\/+/g,"/"),r7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),i7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,a7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function o7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const J$=["post","put","patch","delete"];new Set(J$);const s7=["get",...J$];new Set(s7);/** + * React Router v6.28.1 + * + * 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 Wd(){return Wd=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let f=Cj(u,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:vo([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,a,e])}const d7=g.createContext(null);function f7(e){let t=g.useContext(Wi).outlet;return t&&g.createElement(d7.Provider,{value:e},t)}function Hi(){let{matches:e}=g.useContext(Wi),t=e[e.length-1];return t?t.params:{}}function tD(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(Ro),{matches:i}=g.useContext(Wi),{pathname:a}=qc(),o=JSON.stringify(jj(i,r.v7_relativeSplatPath));return g.useMemo(()=>Cj(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function h7(e,t){return p7(e,t)}function p7(e,t,n,r){Kc()||Rt(!1);let{navigator:i}=g.useContext(Ro),{matches:a}=g.useContext(Wi),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=qc(),d;if(t){var f;let y=typeof t=="string"?Hc(t):t;c==="/"||(f=y.pathname)!=null&&f.startsWith(c)||Rt(!1),d=y}else d=u;let h=d.pathname||"/",p=h;if(c!=="/"){let y=c.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=FW(e,{pathname:p}),m=x7(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:vo([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:vo([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r);return t&&m?g.createElement(dg.Provider,{value:{location:Wd({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:io.Pop}},m):m}function m7(){let e=j7(),t=o7(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)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,null)}const v7=g.createElement(m7,null);class g7 extends g.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!==void 0?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!==void 0?g.createElement(Wi.Provider,{value:this.props.routeContext},g.createElement(Z$.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function y7(e){let{routeContext:t,match:n,children:r}=e,i=g.useContext(Pj);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Wi.Provider,{value:t},r)}function x7(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let d=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);d>=0||Rt(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let p,v=!1,m=null,y=null;n&&(p=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||v7,c&&(u<0&&h===0?(v=!0,y=null):u===h&&(v=!0,y=f.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,h+1)),b=()=>{let w;return p?w=m:v?w=y:f.route.Component?w=g.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,g.createElement(y7,{match:f,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?g.createElement(g7,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:b(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):b()},null)}var nD=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(nD||{}),ym=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}(ym||{});function b7(e){let t=g.useContext(Pj);return t||Rt(!1),t}function w7(e){let t=g.useContext(l7);return t||Rt(!1),t}function S7(e){let t=g.useContext(Wi);return t||Rt(!1),t}function rD(e){let t=S7(),n=t.matches[t.matches.length-1];return n.route.id||Rt(!1),n.route.id}function j7(){var e;let t=g.useContext(Z$),n=w7(ym.UseRouteError),r=rD(ym.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function C7(){let{router:e}=b7(nD.UseNavigateStable),t=rD(ym.UseNavigateStable),n=g.useRef(!1);return eD(()=>{n.current=!0}),g.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Wd({fromRouteId:t},a)))},[e,t])}const qN={};function P7(e,t){qN[t]||(qN[t]=!0,console.warn(t))}const GN=(e,t,n)=>P7(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function O7(e,t){(e==null?void 0:e.v7_startTransition)===void 0&&GN("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),(e==null?void 0:e.v7_relativeSplatPath)===void 0&&!t&&GN("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function N7(e){let{to:t,replace:n,state:r,relative:i}=e;Kc()||Rt(!1);let{future:a,static:o}=g.useContext(Ro),{matches:s}=g.useContext(Wi),{pathname:c}=qc(),u=Us(),d=Cj(t,jj(s,a.v7_relativeSplatPath),c,i==="path"),f=JSON.stringify(d);return g.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:i}),[u,f,i,n,r]),null}function A7(e){return f7(e.context)}function dt(e){Rt(!1)}function E7(e){let{basename:t="/",children:n=null,location:r,navigationType:i=io.Pop,navigator:a,static:o=!1,future:s}=e;Kc()&&Rt(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:a,static:o,future:Wd({v7_relativeSplatPath:!1},s)}),[c,s,a,o]);typeof r=="string"&&(r=Hc(r));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:v="default"}=r,m=g.useMemo(()=>{let y=Sj(d,c);return y==null?null:{location:{pathname:y,search:f,hash:h,state:p,key:v},navigationType:i}},[c,d,f,h,p,v,i]);return m==null?null:g.createElement(Ro.Provider,{value:u},g.createElement(dg.Provider,{children:n,value:m}))}function T7(e){let{children:t,location:n}=e;return h7(Wb(t),n)}new Promise(()=>{});function Wb(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,i)=>{if(!g.isValidElement(r))return;let a=[...t,i];if(r.type===g.Fragment){n.push.apply(n,Wb(r.props.children,a));return}r.type!==dt&&Rt(!1),!r.props.index||!r.props.children||Rt(!1);let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Wb(r.props.children,a)),n.push(o)}),n}/** + * React Router DOM v6.28.1 + * + * 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 Hb(){return Hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function k7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function M7(e,t){return e.button===0&&(!t||t==="_self")&&!k7(e)}const R7=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],$7="6";try{window.__reactRouterVersion=$7}catch{}const D7="startTransition",YN=HM[D7];function I7(e){let{basename:t,children:n,future:r,window:i}=e,a=g.useRef();a.current==null&&(a.current=DW({window:i,v5Compat:!0}));let o=a.current,[s,c]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=g.useCallback(f=>{u&&YN?YN(()=>c(f)):c(f)},[c,u]);return g.useLayoutEffect(()=>o.listen(d),[o,d]),g.useEffect(()=>O7(r),[r]),g.createElement(E7,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const L7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",F7=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Br=g.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:s,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,h=_7(t,R7),{basename:p}=g.useContext(Ro),v,m=!1;if(typeof u=="string"&&F7.test(u)&&(v=u,L7))try{let w=new URL(window.location.href),C=u.startsWith("//")?new URL(w.protocol+u):new URL(u),S=Sj(C.pathname,p);C.origin===w.origin&&S!=null?u=S+C.search+C.hash:m=!0}catch{}let y=c7(u,{relative:i}),x=B7(u,{replace:o,state:s,target:c,preventScrollReset:d,relative:i,viewTransition:f});function b(w){r&&r(w),w.defaultPrevented||x(w)}return g.createElement("a",Hb({},h,{href:v||y,onClick:m||a?r:b,ref:n,target:c}))});var XN;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(XN||(XN={}));var QN;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(QN||(QN={}));function B7(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,c=Us(),u=qc(),d=tD(e,{relative:o});return g.useCallback(f=>{if(M7(f,n)){f.preventDefault();let h=r!==void 0?r:gm(u)===gm(d);c(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,c,d,r,i,n,e,a,o,s])}var Gc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ts=typeof window>"u"||"Deno"in globalThis;function br(){}function U7(e,t){return typeof e=="function"?e(t):e}function Kb(e){return typeof e=="number"&&e>=0&&e!==1/0}function iD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function kl(e,t){return typeof e=="function"?e(t):e}function Jr(e,t){return typeof e=="function"?e(t):e}function JN(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Oj(o,t.options))return!1}else if(!Hd(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function ZN(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(_s(t.options.mutationKey)!==_s(a))return!1}else if(!Hd(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Oj(e,t){return((t==null?void 0:t.queryKeyHashFn)||_s)(e)}function _s(e){return JSON.stringify(e,(t,n)=>qb(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Hd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Hd(e[n],t[n])):!1}function aD(e,t){if(e===t)return e;const n=eA(e)&&eA(t);if(n||qb(e)&&qb(t)){const r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),o=a.length,s=n?[]:{};let c=0;for(let u=0;u{setTimeout(t,e)})}function Gb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?aD(e,t):t}function V7(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function W7(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Nj=Symbol();function oD(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Nj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var cs,qa,Vl,PM,H7=(PM=class extends Gc{constructor(){super();ve(this,cs);ve(this,qa);ve(this,Vl);ce(this,Vl,t=>{if(!Ts&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){L(this,qa)||this.setEventListener(L(this,Vl))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,qa))==null||t.call(this),ce(this,qa,void 0))}setEventListener(t){var n;ce(this,Vl,t),(n=L(this,qa))==null||n.call(this),ce(this,qa,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){L(this,cs)!==t&&(ce(this,cs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof L(this,cs)=="boolean"?L(this,cs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},cs=new WeakMap,qa=new WeakMap,Vl=new WeakMap,PM),Aj=new H7,Wl,Ga,Hl,OM,K7=(OM=class extends Gc{constructor(){super();ve(this,Wl,!0);ve(this,Ga);ve(this,Hl);ce(this,Hl,t=>{if(!Ts&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){L(this,Ga)||this.setEventListener(L(this,Hl))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Ga))==null||t.call(this),ce(this,Ga,void 0))}setEventListener(t){var n;ce(this,Hl,t),(n=L(this,Ga))==null||n.call(this),ce(this,Ga,t(this.setOnline.bind(this)))}setOnline(t){L(this,Wl)!==t&&(ce(this,Wl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,Wl)}},Wl=new WeakMap,Ga=new WeakMap,Hl=new WeakMap,OM),bm=new K7;function Yb(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function q7(e){return Math.min(1e3*2**e,3e4)}function sD(e){return(e??"online")==="online"?bm.isOnline():!0}var lD=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function F0(e){return e instanceof lD}function cD(e){let t=!1,n=0,r=!1,i;const a=Yb(),o=m=>{var y;r||(h(new lD(m)),(y=e.abort)==null||y.call(e))},s=()=>{t=!0},c=()=>{t=!1},u=()=>Aj.isFocused()&&(e.networkMode==="always"||bm.isOnline())&&e.canRun(),d=()=>sD(e.networkMode)&&e.canRun(),f=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),i==null||i(),a.resolve(m))},h=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),i==null||i(),a.reject(m))},p=()=>new Promise(m=>{var y;i=x=>{(r||u())&&m(x)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(x){m=Promise.reject(x)}Promise.resolve(m).then(f).catch(x=>{var j;if(r)return;const b=e.retry??(Ts?0:3),w=e.retryDelay??q7,C=typeof w=="function"?w(n,x):w,S=b===!0||typeof b=="number"&&nu()?void 0:p()).then(()=>{t?h(x):v()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:c,canStart:d,start:()=>(d()?v():p().then(v),a)}}function G7(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(c=>{n(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||o()}return c},batchCalls:s=>(...c)=>{a(()=>{s(...c)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Vt=G7(),us,NM,uD=(NM=class{constructor(){ve(this,us)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kb(this.gcTime)&&ce(this,us,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ts?1/0:5*60*1e3))}clearGcTimeout(){L(this,us)&&(clearTimeout(L(this,us)),ce(this,us,void 0))}},us=new WeakMap,NM),Kl,ql,xr,pn,zf,ds,Kr,ta,AM,Y7=(AM=class extends uD{constructor(t){super();ve(this,Kr);ve(this,Kl);ve(this,ql);ve(this,xr);ve(this,pn);ve(this,zf);ve(this,ds);ce(this,ds,!1),ce(this,zf,t.defaultOptions),this.setOptions(t.options),this.observers=[],ce(this,xr,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ce(this,Kl,X7(this.options)),this.state=t.state??L(this,Kl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=L(this,pn))==null?void 0:t.promise}setOptions(t){this.options={...L(this,zf),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,xr).remove(this)}setData(t,n){const r=Gb(this.state.data,t,this.options);return ke(this,Kr,ta).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ke(this,Kr,ta).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=L(this,pn))==null?void 0:r.promise;return(i=L(this,pn))==null||i.cancel(t),n?n.then(br).catch(br):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(L(this,Kl))}isActive(){return this.observers.some(t=>Jr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!iD(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,pn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,pn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,xr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(L(this,pn)&&(L(this,ds)?L(this,pn).cancel({revert:!0}):L(this,pn).cancelRetry()),this.scheduleGc()),L(this,xr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ke(this,Kr,ta).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(L(this,pn))return L(this,pn).continueRetry(),L(this,pn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ce(this,ds,!0),r.signal)})},a=()=>{const f=oD(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),ce(this,ds,!1),this.options.persister?this.options.persister(f,h,this):f(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(o),(c=this.options.behavior)==null||c.onFetch(o,this),ce(this,ql,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&ke(this,Kr,ta).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const s=f=>{var h,p,v,m;F0(f)&&f.silent||ke(this,Kr,ta).call(this,{type:"error",error:f}),F0(f)||((p=(h=L(this,xr).config).onError)==null||p.call(h,f,this),(m=(v=L(this,xr).config).onSettled)==null||m.call(v,this.state.data,f,this)),this.scheduleGc()};return ce(this,pn,cD({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,p,v,m;if(f===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){s(y);return}(p=(h=L(this,xr).config).onSuccess)==null||p.call(h,f,this),(m=(v=L(this,xr).config).onSettled)==null||m.call(v,f,this.state.error,this),this.scheduleGc()},onError:s,onFail:(f,h)=>{ke(this,Kr,ta).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{ke(this,Kr,ta).call(this,{type:"pause"})},onContinue:()=>{ke(this,Kr,ta).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),L(this,pn).start()}},Kl=new WeakMap,ql=new WeakMap,xr=new WeakMap,pn=new WeakMap,zf=new WeakMap,ds=new WeakMap,Kr=new WeakSet,ta=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dD(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return F0(i)&&i.revert&&L(this,ql)?{...L(this,ql),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Vt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),L(this,xr).notify({query:this,type:"updated",action:t})})},AM);function dD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function X7(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var gi,EM,Q7=(EM=class extends Gc{constructor(t={}){super();ve(this,gi);this.config=t,ce(this,gi,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??Oj(i,n);let o=this.get(a);return o||(o=new Y7({cache:this,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){L(this,gi).has(t.queryHash)||(L(this,gi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=L(this,gi).get(t.queryHash);n&&(t.destroy(),n===t&&L(this,gi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,gi).get(t)}getAll(){return[...L(this,gi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>JN(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>JN(t,r)):n}notify(t){Vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Vt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Vt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gi=new WeakMap,EM),yi,Pn,fs,xi,La,TM,J7=(TM=class extends uD{constructor(t){super();ve(this,xi);ve(this,yi);ve(this,Pn);ve(this,fs);this.mutationId=t.mutationId,ce(this,Pn,t.mutationCache),ce(this,yi,[]),this.state=t.state||fD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,yi).includes(t)||(L(this,yi).push(t),this.clearGcTimeout(),L(this,Pn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ce(this,yi,L(this,yi).filter(n=>n!==t)),this.scheduleGc(),L(this,Pn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,yi).length||(this.state.status==="pending"?this.scheduleGc():L(this,Pn).remove(this))}continue(){var t;return((t=L(this,fs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,o,s,c,u,d,f,h,p,v,m,y,x,b,w,C,S,j,P;ce(this,fs,cD({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,N)=>{ke(this,xi,La).call(this,{type:"failed",failureCount:O,error:N})},onPause:()=>{ke(this,xi,La).call(this,{type:"pause"})},onContinue:()=>{ke(this,xi,La).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Pn).canRun(this)}));const n=this.state.status==="pending",r=!L(this,fs).canStart();try{if(!n){ke(this,xi,La).call(this,{type:"pending",variables:t,isPaused:r}),await((a=(i=L(this,Pn).config).onMutate)==null?void 0:a.call(i,t,this));const N=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,t));N!==this.state.context&&ke(this,xi,La).call(this,{type:"pending",context:N,variables:t,isPaused:r})}const O=await L(this,fs).start();return await((u=(c=L(this,Pn).config).onSuccess)==null?void 0:u.call(c,O,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,O,t,this.state.context)),await((p=(h=L(this,Pn).config).onSettled)==null?void 0:p.call(h,O,null,this.state.variables,this.state.context,this)),await((m=(v=this.options).onSettled)==null?void 0:m.call(v,O,null,t,this.state.context)),ke(this,xi,La).call(this,{type:"success",data:O}),O}catch(O){try{throw await((x=(y=L(this,Pn).config).onError)==null?void 0:x.call(y,O,t,this.state.context,this)),await((w=(b=this.options).onError)==null?void 0:w.call(b,O,t,this.state.context)),await((S=(C=L(this,Pn).config).onSettled)==null?void 0:S.call(C,void 0,O,this.state.variables,this.state.context,this)),await((P=(j=this.options).onSettled)==null?void 0:P.call(j,void 0,O,t,this.state.context)),O}finally{ke(this,xi,La).call(this,{type:"error",error:O})}}finally{L(this,Pn).runNext(this)}}},yi=new WeakMap,Pn=new WeakMap,fs=new WeakMap,xi=new WeakSet,La=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Vt.batch(()=>{L(this,yi).forEach(r=>{r.onMutationUpdate(t)}),L(this,Pn).notify({mutation:this,type:"updated",action:t})})},TM);function fD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gn,Vf,_M,Z7=(_M=class extends Gc{constructor(t={}){super();ve(this,Gn);ve(this,Vf);this.config=t,ce(this,Gn,new Map),ce(this,Vf,Date.now())}build(t,n,r){const i=new J7({mutationCache:this,mutationId:++Ph(this,Vf)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Wh(t),r=L(this,Gn).get(n)??[];r.push(t),L(this,Gn).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Wh(t);if(L(this,Gn).has(n)){const i=(r=L(this,Gn).get(n))==null?void 0:r.filter(a=>a!==t);i&&(i.length===0?L(this,Gn).delete(n):L(this,Gn).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=L(this,Gn).get(Wh(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=L(this,Gn).get(Wh(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...L(this,Gn).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ZN(n,r))}findAll(t={}){return this.getAll().filter(n=>ZN(t,n))}notify(t){Vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Vt.batch(()=>Promise.all(t.map(n=>n.continue().catch(br))))}},Gn=new WeakMap,Vf=new WeakMap,_M);function Wh(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function nA(e){return{onFetch:(t,n)=>{var d,f,h,p,v;const r=t.options,i=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const u=async()=>{let m=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},x=oD(t.options,t.fetchOptions),b=async(w,C,S)=>{if(m)return Promise.reject();if(C==null&&w.pages.length)return Promise.resolve(w);const j={queryKey:t.queryKey,pageParam:C,direction:S?"backward":"forward",meta:t.options.meta};y(j);const P=await x(j),{maxPages:O}=t.options,N=S?W7:V7;return{pages:N(w.pages,P,O),pageParams:N(w.pageParams,C,O)}};if(i&&a.length){const w=i==="backward",C=w?e9:rA,S={pages:a,pageParams:o},j=C(r,S);s=await b(S,j,w)}else{const w=e??a.length;do{const C=c===0?o[0]??r.initialPageParam:rA(r,s);if(c>0&&C==null)break;s=await b(s,C),c++}while(c{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function rA(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function e9(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ot,Ya,Xa,Gl,Yl,Qa,Xl,Ql,kM,t9=(kM=class{constructor(e={}){ve(this,Ot);ve(this,Ya);ve(this,Xa);ve(this,Gl);ve(this,Yl);ve(this,Qa);ve(this,Xl);ve(this,Ql);ce(this,Ot,e.queryCache||new Q7),ce(this,Ya,e.mutationCache||new Z7),ce(this,Xa,e.defaultOptions||{}),ce(this,Gl,new Map),ce(this,Yl,new Map),ce(this,Qa,0)}mount(){Ph(this,Qa)._++,L(this,Qa)===1&&(ce(this,Xl,Aj.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,Ot).onFocus())})),ce(this,Ql,bm.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,Ot).onOnline())})))}unmount(){var e,t;Ph(this,Qa)._--,L(this,Qa)===0&&((e=L(this,Xl))==null||e.call(this),ce(this,Xl,void 0),(t=L(this,Ql))==null||t.call(this),ce(this,Ql,void 0))}isFetching(e){return L(this,Ot).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,Ya).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,Ot).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=L(this,Ot).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(kl(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return L(this,Ot).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=L(this,Ot).get(r.queryHash),a=i==null?void 0:i.state.data,o=U7(t,a);if(o!==void 0)return L(this,Ot).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Vt.batch(()=>L(this,Ot).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,Ot).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=L(this,Ot);Vt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=L(this,Ot),r={type:"active",...e};return Vt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Vt.batch(()=>L(this,Ot).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(br).catch(br)}invalidateQueries(e,t={}){return Vt.batch(()=>{if(L(this,Ot).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Vt.batch(()=>L(this,Ot).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(br)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(br)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=L(this,Ot).build(this,t);return n.isStaleByTime(kl(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(br).catch(br)}fetchInfiniteQuery(e){return e.behavior=nA(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(br).catch(br)}ensureInfiniteQueryData(e){return e.behavior=nA(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return bm.isOnline()?L(this,Ya).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,Ot)}getMutationCache(){return L(this,Ya)}getDefaultOptions(){return L(this,Xa)}setDefaultOptions(e){ce(this,Xa,e)}setQueryDefaults(e,t){L(this,Gl).set(_s(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Gl).values()],n={};return t.forEach(r=>{Hd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){L(this,Yl).set(_s(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Yl).values()];let n={};return t.forEach(r=>{Hd(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,Xa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Oj(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Nj&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,Xa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,Ot).clear(),L(this,Ya).clear()}},Ot=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Gl=new WeakMap,Yl=new WeakMap,Qa=new WeakMap,Xl=new WeakMap,Ql=new WeakMap,kM),$n,Be,Wf,On,hs,Jl,Ja,bi,Hf,Zl,ec,ps,ms,Za,tc,Ke,Gu,Xb,Qb,Jb,Zb,ew,tw,nw,hD,MM,n9=(MM=class extends Gc{constructor(t,n){super();ve(this,Ke);ve(this,$n);ve(this,Be);ve(this,Wf);ve(this,On);ve(this,hs);ve(this,Jl);ve(this,Ja);ve(this,bi);ve(this,Hf);ve(this,Zl);ve(this,ec);ve(this,ps);ve(this,ms);ve(this,Za);ve(this,tc,new Set);this.options=n,ce(this,$n,t),ce(this,bi,null),ce(this,Ja,Yb()),this.options.experimental_prefetchInRender||L(this,Ja).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Be).addObserver(this),iA(L(this,Be),this.options)?ke(this,Ke,Gu).call(this):this.updateResult(),ke(this,Ke,Zb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rw(L(this,Be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rw(L(this,Be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ke(this,Ke,ew).call(this),ke(this,Ke,tw).call(this),L(this,Be).removeObserver(this)}setOptions(t,n){const r=this.options,i=L(this,Be);if(this.options=L(this,$n).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Jr(this.options.enabled,L(this,Be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ke(this,Ke,nw).call(this),L(this,Be).setOptions(this.options),r._defaulted&&!xm(this.options,r)&&L(this,$n).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Be),observer:this});const a=this.hasListeners();a&&aA(L(this,Be),i,this.options,r)&&ke(this,Ke,Gu).call(this),this.updateResult(n),a&&(L(this,Be)!==i||Jr(this.options.enabled,L(this,Be))!==Jr(r.enabled,L(this,Be))||kl(this.options.staleTime,L(this,Be))!==kl(r.staleTime,L(this,Be)))&&ke(this,Ke,Xb).call(this);const o=ke(this,Ke,Qb).call(this);a&&(L(this,Be)!==i||Jr(this.options.enabled,L(this,Be))!==Jr(r.enabled,L(this,Be))||o!==L(this,Za))&&ke(this,Ke,Jb).call(this,o)}getOptimisticResult(t){const n=L(this,$n).getQueryCache().build(L(this,$n),t),r=this.createResult(n,t);return i9(this,r)&&(ce(this,On,r),ce(this,Jl,this.options),ce(this,hs,L(this,Be).state)),r}getCurrentResult(){return L(this,On)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){L(this,tc).add(t)}getCurrentQuery(){return L(this,Be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=L(this,$n).defaultQueryOptions(t),r=L(this,$n).getQueryCache().build(L(this,$n),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ke(this,Ke,Gu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,On)))}createResult(t,n){var O;const r=L(this,Be),i=this.options,a=L(this,On),o=L(this,hs),s=L(this,Jl),u=t!==r?t.state:L(this,Wf),{state:d}=t;let f={...d},h=!1,p;if(n._optimisticResults){const N=this.hasListeners(),A=!N&&iA(t,n),_=N&&aA(t,r,n,i);(A||_)&&(f={...f,...dD(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:y}=f;if(n.select&&f.data!==void 0)if(a&&f.data===(o==null?void 0:o.data)&&n.select===L(this,Hf))p=L(this,Zl);else try{ce(this,Hf,n.select),p=n.select(f.data),p=Gb(a==null?void 0:a.data,p,n),ce(this,Zl,p),ce(this,bi,null)}catch(N){ce(this,bi,N)}else p=f.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let N;if(a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))N=a.data;else if(N=typeof n.placeholderData=="function"?n.placeholderData((O=L(this,ec))==null?void 0:O.state.data,L(this,ec)):n.placeholderData,n.select&&N!==void 0)try{N=n.select(N),ce(this,bi,null)}catch(A){ce(this,bi,A)}N!==void 0&&(y="success",p=Gb(a==null?void 0:a.data,N,n),h=!0)}L(this,bi)&&(v=L(this,bi),p=L(this,Zl),m=Date.now(),y="error");const x=f.fetchStatus==="fetching",b=y==="pending",w=y==="error",C=b&&x,S=p!==void 0,P={status:y,fetchStatus:f.fetchStatus,isPending:b,isSuccess:y==="success",isError:w,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:w&&!S,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:w&&S,isStale:Ej(t,n),refetch:this.refetch,promise:L(this,Ja)};if(this.options.experimental_prefetchInRender){const N=E=>{P.status==="error"?E.reject(P.error):P.data!==void 0&&E.resolve(P.data)},A=()=>{const E=ce(this,Ja,P.promise=Yb());N(E)},_=L(this,Ja);switch(_.status){case"pending":t.queryHash===r.queryHash&&N(_);break;case"fulfilled":(P.status==="error"||P.data!==_.value)&&A();break;case"rejected":(P.status!=="error"||P.error!==_.reason)&&A();break}}return P}updateResult(t){const n=L(this,On),r=this.createResult(L(this,Be),this.options);if(ce(this,hs,L(this,Be).state),ce(this,Jl,this.options),L(this,hs).data!==void 0&&ce(this,ec,L(this,Be)),xm(r,n))return;ce(this,On,r);const i={},a=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!L(this,tc).size)return!0;const c=new Set(s??L(this,tc));return this.options.throwOnError&&c.add("error"),Object.keys(L(this,On)).some(u=>{const d=u;return L(this,On)[d]!==n[d]&&c.has(d)})};(t==null?void 0:t.listeners)!==!1&&a()&&(i.listeners=!0),ke(this,Ke,hD).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ke(this,Ke,Zb).call(this)}},$n=new WeakMap,Be=new WeakMap,Wf=new WeakMap,On=new WeakMap,hs=new WeakMap,Jl=new WeakMap,Ja=new WeakMap,bi=new WeakMap,Hf=new WeakMap,Zl=new WeakMap,ec=new WeakMap,ps=new WeakMap,ms=new WeakMap,Za=new WeakMap,tc=new WeakMap,Ke=new WeakSet,Gu=function(t){ke(this,Ke,nw).call(this);let n=L(this,Be).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(br)),n},Xb=function(){ke(this,Ke,ew).call(this);const t=kl(this.options.staleTime,L(this,Be));if(Ts||L(this,On).isStale||!Kb(t))return;const r=iD(L(this,On).dataUpdatedAt,t)+1;ce(this,ps,setTimeout(()=>{L(this,On).isStale||this.updateResult()},r))},Qb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Be)):this.options.refetchInterval)??!1},Jb=function(t){ke(this,Ke,tw).call(this),ce(this,Za,t),!(Ts||Jr(this.options.enabled,L(this,Be))===!1||!Kb(L(this,Za))||L(this,Za)===0)&&ce(this,ms,setInterval(()=>{(this.options.refetchIntervalInBackground||Aj.isFocused())&&ke(this,Ke,Gu).call(this)},L(this,Za)))},Zb=function(){ke(this,Ke,Xb).call(this),ke(this,Ke,Jb).call(this,ke(this,Ke,Qb).call(this))},ew=function(){L(this,ps)&&(clearTimeout(L(this,ps)),ce(this,ps,void 0))},tw=function(){L(this,ms)&&(clearInterval(L(this,ms)),ce(this,ms,void 0))},nw=function(){const t=L(this,$n).getQueryCache().build(L(this,$n),this.options);if(t===L(this,Be))return;const n=L(this,Be);ce(this,Be,t),ce(this,Wf,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},hD=function(t){Vt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(L(this,On))}),L(this,$n).getQueryCache().notify({query:L(this,Be),type:"observerResultsUpdated"})})},MM);function r9(e,t){return Jr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function iA(e,t){return r9(e,t)||e.state.data!==void 0&&rw(e,t,t.refetchOnMount)}function rw(e,t,n){if(Jr(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ej(e,t)}return!1}function aA(e,t,n,r){return(e!==t||Jr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ej(e,n)}function Ej(e,t){return Jr(t.enabled,e)!==!1&&e.isStaleByTime(kl(t.staleTime,e))}function i9(e,t){return!xm(e.getCurrentResult(),t)}var eo,to,Dn,ia,ma,$p,iw,RM,a9=(RM=class extends Gc{constructor(n,r){super();ve(this,ma);ve(this,eo);ve(this,to);ve(this,Dn);ve(this,ia);ce(this,eo,n),this.setOptions(r),this.bindMethods(),ke(this,ma,$p).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=L(this,eo).defaultMutationOptions(n),xm(this.options,r)||L(this,eo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:L(this,Dn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&_s(r.mutationKey)!==_s(this.options.mutationKey)?this.reset():((i=L(this,Dn))==null?void 0:i.state.status)==="pending"&&L(this,Dn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=L(this,Dn))==null||n.removeObserver(this)}onMutationUpdate(n){ke(this,ma,$p).call(this),ke(this,ma,iw).call(this,n)}getCurrentResult(){return L(this,to)}reset(){var n;(n=L(this,Dn))==null||n.removeObserver(this),ce(this,Dn,void 0),ke(this,ma,$p).call(this),ke(this,ma,iw).call(this)}mutate(n,r){var i;return ce(this,ia,r),(i=L(this,Dn))==null||i.removeObserver(this),ce(this,Dn,L(this,eo).getMutationCache().build(L(this,eo),this.options)),L(this,Dn).addObserver(this),L(this,Dn).execute(n)}},eo=new WeakMap,to=new WeakMap,Dn=new WeakMap,ia=new WeakMap,ma=new WeakSet,$p=function(){var r;const n=((r=L(this,Dn))==null?void 0:r.state)??fD();ce(this,to,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},iw=function(n){Vt.batch(()=>{var r,i,a,o,s,c,u,d;if(L(this,ia)&&this.hasListeners()){const f=L(this,to).variables,h=L(this,to).context;(n==null?void 0:n.type)==="success"?((i=(r=L(this,ia)).onSuccess)==null||i.call(r,n.data,f,h),(o=(a=L(this,ia)).onSettled)==null||o.call(a,n.data,null,f,h)):(n==null?void 0:n.type)==="error"&&((c=(s=L(this,ia)).onError)==null||c.call(s,n.error,f,h),(d=(u=L(this,ia)).onSettled)==null||d.call(u,void 0,n.error,f,h))}this.listeners.forEach(f=>{f(L(this,to))})})},RM),pD=g.createContext(void 0),Qf=e=>{const t=g.useContext(pD);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},o9=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(pD.Provider,{value:e,children:t})),mD=g.createContext(!1),s9=()=>g.useContext(mD);mD.Provider;function l9(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var c9=g.createContext(l9()),u9=()=>g.useContext(c9);function vD(e,t){return typeof e=="function"?e(...t):!!e}function aw(){}var d9=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},f9=e=>{g.useEffect(()=>{e.clearReset()},[e])},h9=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&vD(n,[e.error,r]),p9=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},m9=(e,t)=>e.isLoading&&e.isFetching&&!t,v9=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,oA=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function g9(e,t,n){var d,f,h,p,v;const r=Qf(),i=s9(),a=u9(),o=r.defaultQueryOptions(e);(f=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",p9(o),d9(o,a),f9(a);const s=!r.getQueryCache().get(o.queryHash),[c]=g.useState(()=>new t(r,o)),u=c.getOptimisticResult(o);if(g.useSyncExternalStore(g.useCallback(m=>{const y=i?aw:c.subscribe(Vt.batchCalls(m));return c.updateResult(),y},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),v9(o,u))throw oA(o,c,a);if(h9({result:u,errorResetBoundary:a,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((p=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||p.call(h,o,u),o.experimental_prefetchInRender&&!Ts&&m9(u,i)){const m=s?oA(o,c,a):(v=r.getQueryCache().get(o.queryHash))==null?void 0:v.promise;m==null||m.catch(aw).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function xt(e,t){return g9(e,n9)}function B0(e,t){const n=Qf(),[r]=g.useState(()=>new a9(n,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);const i=g.useSyncExternalStore(g.useCallback(o=>r.subscribe(Vt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=g.useCallback((o,s)=>{r.mutate(o,s).catch(aw)},[r]);if(i.error&&vD(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gD=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var x9={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b9=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},c)=>g.createElement("svg",{ref:c,...x9,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:gD("lucide",i),...s},[...o.map(([u,d])=>g.createElement(u,d)),...Array.isArray(a)?a:[a]]));/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const re=(e,t)=>{const n=g.forwardRef(({className:r,...i},a)=>g.createElement(b9,{ref:a,iconNode:t,className:gD(`lucide-${y9(e)}`,r),...i}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w9=re("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ys=re("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yD=re("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S9=re("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j9=re("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C9=re("Binary",[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P9=re("Blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O9=re("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Yc=re("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fg=re("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sA=re("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wm=re("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N9=re("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rr=re("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A9=re("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E9=re("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T9=re("CircuitBoard",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _9=re("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lA=re("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k9=re("Coffee",[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cA=re("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hg=re("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pg=re("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M9=re("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R9=re("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Kd=re("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $9=re("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tj=re("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const D9=re("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _j=re("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sm=re("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I9=re("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L9=re("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xD=re("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const F9=re("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const B9=re("FolderClosed",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M2 10h20",key:"1ir3d8"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bD=re("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uA=re("Gem",[["path",{d:"M6 3h12l4 6-10 13L2 9Z",key:"1pcd5k"}],["path",{d:"M11 3 8 9l4 13 4-13-3-6",key:"1fcu3u"}],["path",{d:"M2 9h20",key:"16fsjt"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const U9=re("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jf=re("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z9=re("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kj=re("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const V9=re("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ni=re("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const W9=re("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const H9=re("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zf=re("MemoryStick",[["path",{d:"M6 19v-3",key:"1nvgqn"}],["path",{d:"M10 19v-3",key:"iu8nkm"}],["path",{d:"M14 19v-3",key:"kcehxu"}],["path",{d:"M18 19v-3",key:"1vh91z"}],["path",{d:"M8 11V9",key:"63erz4"}],["path",{d:"M16 11V9",key:"fru6f3"}],["path",{d:"M12 11V9",key:"ha00sb"}],["path",{d:"M2 15h20",key:"16ne18"}],["path",{d:"M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z",key:"lhddv3"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const K9=re("MessageCircleQuestion",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const q9=re("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dA=re("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const G9=re("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Y9=re("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const X9=re("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wn=re("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Q9=re("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wD=re("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const J9=re("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ve=re("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mj=re("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SD=re("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zs=re("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Z9=re("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eH=re("SendToBack",[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",key:"1b0bso"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",key:"1x09vl"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1",key:"pao6x6"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1",key:"19tdru"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ba=re("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jD=re("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tH=re("ShieldBan",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CD=re("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nH=re("SquareKanban",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 7v7",key:"1x2jlm"}],["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M16 7v9",key:"1hp2iy"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rH=re("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PD=re("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fA=re("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iH=re("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aH=re("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mg=re("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oH=re("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Co=re("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rj=re("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OD=re("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sH=re("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lH=re("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ow=re("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fd=re("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cH=re("Variable",[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uH=re("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/** + * @license lucide-react v0.469.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vg=re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ND(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=hH(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split($j);return s[0]===""&&s.length!==1&&s.shift(),AD(s,t)||fH(o)},getConflictingClassGroupIds:(o,s)=>{const c=n[o]||[];return s&&r[o]?[...c,...r[o]]:c}}},AD=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?AD(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join($j);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},hA=/^\[(.+)\]$/,fH=e=>{if(hA.test(e)){const t=hA.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},hH=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return mH(Object.entries(e.classGroups),n).forEach(([a,o])=>{sw(o,r,a,t)}),r},sw=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:pA(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(pH(i)){sw(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{sw(o,pA(t,a),n,r)})})},pA=(e,t)=>{let n=e;return t.split($j).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},pH=e=>e.isThemeGetter,mH=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[n,i]}):e,vH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},ED="!",gH=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const c=[];let u=0,d=0,f;for(let y=0;yd?f-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}};return n?s=>n({className:s,parseClassName:o}):o},yH=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},xH=e=>({cache:vH(e.cacheSize),parseClassName:gH(e),...dH(e)}),bH=/\s+/,wH=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(bH);let s="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let v=!!p,m=r(v?h.substring(0,p):h);if(!m){if(!v){s=u+(s.length>0?" "+s:s);continue}if(m=r(h),!m){s=u+(s.length>0?" "+s:s);continue}v=!1}const y=yH(d).join(":"),x=f?y+ED:y,b=x+m;if(a.includes(b))continue;a.push(b);const w=i(m,v);for(let C=0;C0?" "+s:s)}return s};function SH(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(d),e());return n=xH(u),r=n.cache.get,i=n.cache.set,a=s,s(c)}function s(c){const u=r(c);if(u)return u;const d=wH(c,n);return i(c,d),d}return function(){return a(SH.apply(null,arguments))}}const ct=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},_D=/^\[(?:([a-z-]+):)?(.+)\]$/i,CH=/^\d+\/\d+$/,PH=new Set(["px","full","screen"]),OH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,AH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,EH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zi=e=>Ml(e)||PH.has(e)||CH.test(e),Da=e=>Xc(e,"length",LH),Ml=e=>!!e&&!Number.isNaN(Number(e)),U0=e=>Xc(e,"number",Ml),Tu=e=>!!e&&Number.isInteger(Number(e)),_H=e=>e.endsWith("%")&&Ml(e.slice(0,-1)),Ee=e=>_D.test(e),Ia=e=>OH.test(e),kH=new Set(["length","size","percentage"]),MH=e=>Xc(e,kH,kD),RH=e=>Xc(e,"position",kD),$H=new Set(["image","url"]),DH=e=>Xc(e,$H,BH),IH=e=>Xc(e,"",FH),_u=()=>!0,Xc=(e,t,n)=>{const r=_D.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},LH=e=>NH.test(e)&&!AH.test(e),kD=()=>!1,FH=e=>EH.test(e),BH=e=>TH.test(e),UH=()=>{const e=ct("colors"),t=ct("spacing"),n=ct("blur"),r=ct("brightness"),i=ct("borderColor"),a=ct("borderRadius"),o=ct("borderSpacing"),s=ct("borderWidth"),c=ct("contrast"),u=ct("grayscale"),d=ct("hueRotate"),f=ct("invert"),h=ct("gap"),p=ct("gradientColorStops"),v=ct("gradientColorStopPositions"),m=ct("inset"),y=ct("margin"),x=ct("opacity"),b=ct("padding"),w=ct("saturate"),C=ct("scale"),S=ct("sepia"),j=ct("skew"),P=ct("space"),O=ct("translate"),N=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",Ee,t],E=()=>[Ee,t],k=()=>["",Zi,Da],M=()=>["auto",Ml,Ee],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Ee],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Ml,Ee];return{cacheSize:500,separator:":",theme:{colors:[_u],spacing:[Zi,Da],blur:["none","",Ia,Ee],brightness:z(),borderColor:[e],borderRadius:["none","","full",Ia,Ee],borderSpacing:E(),borderWidth:k(),contrast:z(),grayscale:R(),hueRotate:z(),invert:R(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[_H,Da],inset:_(),margin:_(),opacity:z(),padding:E(),saturate:z(),scale:z(),sepia:R(),skew:z(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",Ee]}],container:["container"],columns:[{columns:[Ia]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),Ee]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Tu,Ee]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ee]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",Tu,Ee]}],"grid-cols":[{"grid-cols":[_u]}],"col-start-end":[{col:["auto",{span:["full",Tu,Ee]},Ee]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[_u]}],"row-start-end":[{row:["auto",{span:[Tu,Ee]},Ee]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ee]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ee,t]}],"min-w":[{"min-w":[Ee,t,"min","max","fit"]}],"max-w":[{"max-w":[Ee,t,"none","full","min","max","fit","prose",{screen:[Ia]},Ia]}],h:[{h:[Ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ia,Da]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",U0]}],"font-family":[{font:[_u]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ee]}],"line-clamp":[{"line-clamp":["none",Ml,U0]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Zi,Ee]}],"list-image":[{"list-image":["none",Ee]}],"list-style-type":[{list:["none","disc","decimal",Ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Zi,Da]}],"underline-offset":[{"underline-offset":["auto",Zi,Ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),RH]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",MH]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},DH]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:D()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[Zi,Ee]}],"outline-w":[{outline:[Zi,Da]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Zi,Da]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ia,IH]}],"shadow-color":[{shadow:[_u]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ia,Ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ee]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",Ee]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Tu,Ee]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ee]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Zi,Da,U0]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},zH=jH(UH);function le(...e){return zH(Fe(e))}const me=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("rounded-xl border bg-card text-card-foreground shadow",e),...t}));me.displayName="Card";const je=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("flex flex-col space-y-1.5 p-6",e),...t}));je.displayName="CardHeader";const Te=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("font-semibold leading-none tracking-tight",e),...t}));Te.displayName="CardTitle";const An=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("text-sm text-muted-foreground",e),...t}));An.displayName="CardDescription";const ge=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("p-6 pt-0",e),...t}));ge.displayName="CardContent";const eh=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("flex items-center p-6 pt-0",e),...t}));eh.displayName="CardFooter";function VH(e,t){const n=g.createContext(t),r=a=>{const{children:o,...s}=a,c=g.useMemo(()=>s,Object.values(s));return l.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(a){const o=g.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function un(e,t=[]){let n=[];function r(a,o){const s=g.createContext(o),c=n.length;n=[...n,o];const u=f=>{var x;const{scope:h,children:p,...v}=f,m=((x=h==null?void 0:h[e])==null?void 0:x[c])||s,y=g.useMemo(()=>v,Object.values(v));return l.jsx(m.Provider,{value:y,children:p})};u.displayName=a+"Provider";function d(f,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[c])||s,v=g.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,d]}const i=()=>{const a=n.map(o=>g.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return g.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[r,WH(i,...t)]}function WH(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:c,scopeName:u})=>{const f=c(a)[`__scope${u}`];return{...s,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function mA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gg(...e){return t=>{let n=!1;const r=e.map(i=>{const a=mA(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=g.Children.toArray(n),a=i.find(HH);if(a){const o=a.props.children,s=i.map(c=>c===a?g.Children.count(o)>1?g.Children.only(null):g.isValidElement(o)?o.props.children:null:c);return l.jsx(lw,{...r,ref:t,children:g.isValidElement(o)?g.cloneElement(o,void 0,s):null})}return l.jsx(lw,{...r,ref:t,children:n})});Po.displayName="Slot";var lw=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const i=qH(n);return g.cloneElement(n,{...KH(r,n.props),ref:t?gg(t,i):i})}return g.Children.count(n)>1?g.Children.only(null):null});lw.displayName="SlotClone";var Dj=({children:e})=>l.jsx(l.Fragment,{children:e});function HH(e){return g.isValidElement(e)&&e.type===Dj}function KH(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function qH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yg(e){const t=e+"CollectionProvider",[n,r]=un(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:v,children:m}=p,y=T.useRef(null),x=T.useRef(new Map).current;return l.jsx(i,{scope:v,itemMap:x,collectionRef:y,children:m})};o.displayName=t;const s=e+"CollectionSlot",c=T.forwardRef((p,v)=>{const{scope:m,children:y}=p,x=a(s,m),b=_e(v,x.collectionRef);return l.jsx(Po,{ref:b,children:y})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=T.forwardRef((p,v)=>{const{scope:m,children:y,...x}=p,b=T.useRef(null),w=_e(v,b),C=a(u,m);return T.useEffect(()=>(C.itemMap.set(b,{ref:b,...x}),()=>void C.itemMap.delete(b))),l.jsx(Po,{[d]:"",ref:w,children:y})});f.displayName=u;function h(p){const v=a(e+"CollectionConsumer",p);return T.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,S)=>x.indexOf(C.ref.current)-x.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},h,r]}function ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Lt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Mr({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=GH({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Lt(n),c=g.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else i(u)},[a,e,i,s]);return[o,c]}function GH({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,i=g.useRef(r),a=Lt(t);return g.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var YH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pe=YH.reduce((e,t)=>{const n=g.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?Po:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function MD(e,t){e&&Wc.flushSync(()=>e.dispatchEvent(t))}var qt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{};function XH(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Jt=e=>{const{present:t,children:n}=e,r=QH(t),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),a=_e(r.ref,JH(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:a}):null};Jt.displayName="Presence";function QH(e){const[t,n]=g.useState(),r=g.useRef({}),i=g.useRef(e),a=g.useRef("none"),o=e?"mounted":"unmounted",[s,c]=XH(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=Hh(r.current);a.current=s==="mounted"?u:"none"},[s]),qt(()=>{const u=r.current,d=i.current;if(d!==e){const h=a.current,p=Hh(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),qt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const m=Hh(r.current).includes(p.animationName);if(p.target===t&&m&&(c("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(a.current=Hh(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Hh(e){return(e==null?void 0:e.animationName)||"none"}function JH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZH=HM.useId||(()=>{}),eK=0;function ir(e){const[t,n]=g.useState(ZH());return qt(()=>{n(r=>r??String(eK++))},[e]),t?`radix-${t}`:""}var Ij="Collapsible",[tK,RD]=un(Ij),[nK,Lj]=tK(Ij),$D=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c=!1,u]=Mr({prop:r,defaultProp:i,onChange:o});return l.jsx(nK,{scope:n,disabled:a,contentId:ir(),open:c,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),children:l.jsx(pe.div,{"data-state":Bj(c),"data-disabled":a?"":void 0,...s,ref:t})})});$D.displayName=Ij;var DD="CollapsibleTrigger",ID=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Lj(DD,n);return l.jsx(pe.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Bj(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:ne(e.onClick,i.onOpenToggle)})});ID.displayName=DD;var Fj="CollapsibleContent",LD=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Lj(Fj,e.__scopeCollapsible);return l.jsx(Jt,{present:n||i.open,children:({present:a})=>l.jsx(rK,{...r,ref:t,present:a})})});LD.displayName=Fj;var rK=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Lj(Fj,n),[s,c]=g.useState(r),u=g.useRef(null),d=_e(t,u),f=g.useRef(0),h=f.current,p=g.useRef(0),v=p.current,m=o.open||s,y=g.useRef(m),x=g.useRef(void 0);return g.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),qt(()=>{const b=u.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,p.current=w.width,y.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),c(r)}},[o.open,r]),l.jsx(pe.div,{"data-state":Bj(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...a,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:m&&i})});function Bj(e){return e?"open":"closed"}var iK=$D,aK=ID,oK=LD,sK=g.createContext(void 0);function Qc(e){const t=g.useContext(sK);return e||t||"ltr"}var Ea="Accordion",lK=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Uj,cK,uK]=yg(Ea),[xg,A_e]=un(Ea,[uK,RD]),zj=RD(),FD=T.forwardRef((e,t)=>{const{type:n,...r}=e,i=r,a=r;return l.jsx(Uj.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(pK,{...a,ref:t}):l.jsx(hK,{...i,ref:t})})});FD.displayName=Ea;var[BD,dK]=xg(Ea),[UD,fK]=xg(Ea,{collapsible:!1}),hK=T.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=Mr({prop:n,defaultProp:r,onChange:i});return l.jsx(BD,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:T.useCallback(()=>a&&c(""),[a,c]),children:l.jsx(UD,{scope:e.__scopeAccordion,collapsible:a,children:l.jsx(zD,{...o,ref:t})})})}),pK=T.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o=[],s]=Mr({prop:n,defaultProp:r,onChange:i}),c=T.useCallback(d=>s((f=[])=>[...f,d]),[s]),u=T.useCallback(d=>s((f=[])=>f.filter(h=>h!==d)),[s]);return l.jsx(BD,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:l.jsx(UD,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(zD,{...a,ref:t})})})}),[mK,bg]=xg(Ea),zD=T.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:a="vertical",...o}=e,s=T.useRef(null),c=_e(s,t),u=cK(n),f=Qc(i)==="ltr",h=ne(e.onKeyDown,p=>{var O;if(!lK.includes(p.key))return;const v=p.target,m=u().filter(N=>{var A;return!((A=N.ref.current)!=null&&A.disabled)}),y=m.findIndex(N=>N.ref.current===v),x=m.length;if(y===-1)return;p.preventDefault();let b=y;const w=0,C=x-1,S=()=>{b=y+1,b>C&&(b=w)},j=()=>{b=y-1,b{const{__scopeAccordion:n,value:r,...i}=e,a=bg(jm,n),o=dK(jm,n),s=zj(n),c=ir(),u=r&&o.value.includes(r)||!1,d=a.disabled||e.disabled;return l.jsx(vK,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx(iK,{"data-orientation":a.orientation,"data-state":YD(u),...s,...i,ref:t,disabled:d,open:u,onOpenChange:f=>{f?o.onItemOpen(r):o.onItemClose(r)}})})});VD.displayName=jm;var WD="AccordionHeader",HD=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=bg(Ea,n),a=Vj(WD,n);return l.jsx(pe.h3,{"data-orientation":i.orientation,"data-state":YD(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});HD.displayName=WD;var cw="AccordionTrigger",KD=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=bg(Ea,n),a=Vj(cw,n),o=fK(cw,n),s=zj(n);return l.jsx(Uj.ItemSlot,{scope:n,children:l.jsx(aK,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});KD.displayName=cw;var qD="AccordionContent",GD=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=bg(Ea,n),a=Vj(qD,n),o=zj(n);return l.jsx(oK,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});GD.displayName=qD;function YD(e){return e?"open":"closed"}var gK=FD,yK=VD,xK=HD,XD=KD,QD=GD;const bK=gK,JD=g.forwardRef(({className:e,...t},n)=>l.jsx(yK,{ref:n,className:le("border-b",e),...t}));JD.displayName="AccordionItem";const ZD=g.forwardRef(({className:e,children:t,...n},r)=>l.jsx(xK,{className:"flex",children:l.jsxs(XD,{ref:r,className:le("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(fg,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));ZD.displayName=XD.displayName;const eI=g.forwardRef(({className:e,children:t,...n},r)=>l.jsx(QD,{ref:r,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:le("pb-4 pt-0",e),children:t})}));eI.displayName=QD.displayName;const vA=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gA=Fe,wg=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gA(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],f=a==null?void 0:a[u];if(d===null)return null;const h=vA(d)||vA(f);return i[u][h]}),s=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(v=>{let[m,y]=v;return Array.isArray(y)?y.includes({...a,...s}[m]):{...a,...s}[m]===y})?[...u,f,h]:u},[]);return gA(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},Wj=wg("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),V=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?Po:"button";return l.jsx(o,{className:le(Wj({variant:t,size:n,className:e})),ref:a,...i})});V.displayName="Button";function wK(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Sg(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const uw=e=>Array.isArray(e);function tI(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Hj(e,t,n,r){if(typeof t=="function"){const[i,a]=yA(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=yA(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function jg(e,t,n){const r=e.getProps();return Hj(r,t,n!==void 0?n:r.custom,e)}const Kj=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qj=["initial",...Kj],th=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vs=new Set(th),ua=e=>e*1e3,da=e=>e/1e3,SK={type:"spring",stiffness:500,damping:25,restSpeed:10},jK=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),CK={type:"keyframes",duration:.8},PK={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},OK=(e,{keyframes:t})=>t.length>2?CK:Vs.has(e)?e.startsWith("scale")?jK(t[1]):SK:PK;function Gj(e,t){return e?e[t]||e.default||e:void 0}const NK={skipAnimations:!1,useManualTiming:!1},AK=e=>e!==null;function Cg(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(AK),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const ar=e=>e;let dw=ar;function EK(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(u){a.has(u)&&(c.schedule(u),e()),u(o)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&r?t:n;return d&&a.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),a.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(u))}};return c}const Kh=["read","resolveKeyframes","update","preRender","render","postRender"],TK=40;function nI(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Kh.reduce((x,b)=>(x[b]=EK(a),x),{}),{read:s,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=o,p=()=>{const x=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,TK),1),i.timestamp=x,i.isProcessing=!0,s.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},v=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Kh.reduce((x,b)=>{const w=o[b];return x[b]=(C,S=!1,j=!1)=>(n||v(),w.schedule(C,S,j)),x},{}),cancel:x=>{for(let b=0;b(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,_K=1e-7,kK=12;function MK(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=rI(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>_K&&++sMK(a,0,1,e,n);return a=>a===0||a===1?a:rI(i(a),t,r)}const iI=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,aI=e=>t=>1-e(1-t),oI=nh(.33,1.53,.69,.99),Yj=aI(oI),sI=iI(Yj),lI=e=>(e*=2)<1?.5*Yj(e):.5*(2-Math.pow(2,-10*(e-1))),Xj=e=>1-Math.sin(Math.acos(e)),cI=aI(Xj),uI=iI(Xj),dI=e=>/^0[^.\s]+$/u.test(e);function RK(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||dI(e):!0}const fI=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),hI=e=>t=>typeof t=="string"&&t.startsWith(e),pI=hI("--"),$K=hI("var(--"),Qj=e=>$K(e)?DK.test(e.split("/*")[0].trim()):!1,DK=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,IK=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function LK(e){const t=IK.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function mI(e,t,n=1){const[r,i]=LK(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return fI(o)?parseFloat(o):o}return Qj(i)?mI(i,t,n+1):i}const wa=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Gd={...Jc,transform:e=>wa(0,1,e)},qh={...Jc,default:1},rh=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Fa=rh("deg"),Ai=rh("%"),xe=rh("px"),FK=rh("vh"),BK=rh("vw"),xA={...Ai,parse:e=>Ai.parse(e)/100,transform:e=>Ai.transform(e*100)},UK=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),bA=e=>e===Jc||e===xe,wA=(e,t)=>parseFloat(e.split(", ")[t]),SA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return wA(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?wA(a[1],e):0}},zK=new Set(["x","y","z"]),VK=th.filter(e=>!zK.has(e));function WK(e){const t=[];return VK.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const cc={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:SA(4,13),y:SA(5,14)};cc.translateX=cc.x;cc.translateY=cc.y;const vI=e=>t=>t.test(e),HK={test:e=>e==="auto",parse:e=>e},gI=[Jc,xe,Ai,Fa,BK,FK,HK],jA=e=>gI.find(vI(e)),xs=new Set;let fw=!1,hw=!1;function yI(){if(hw){const e=Array.from(xs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=WK(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}hw=!1,fw=!1,xs.forEach(e=>e.complete()),xs.clear()}function xI(){xs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hw=!0)})}function KK(){xI(),yI()}class Jj{constructor(t,n,r,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(xs.add(this),fw||(fw=!0,mt.read(xI),mt.resolveKeyframes(yI))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;aMath.round(e*1e5)/1e5,Zj=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qK(e){return e==null}const GK=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eC=(e,t)=>n=>!!(typeof n=="string"&&GK.test(n)&&n.startsWith(e)||t&&!qK(n)&&Object.prototype.hasOwnProperty.call(n,t)),bI=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(Zj);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},YK=e=>wa(0,255,e),V0={...Jc,transform:e=>Math.round(YK(e))},ns={test:eC("rgb","red"),parse:bI("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+V0.transform(e)+", "+V0.transform(t)+", "+V0.transform(n)+", "+hd(Gd.transform(r))+")"};function XK(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const pw={test:eC("#"),parse:XK,transform:ns.transform},gl={test:eC("hsl","hue"),parse:bI("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ai.transform(hd(t))+", "+Ai.transform(hd(n))+", "+hd(Gd.transform(r))+")"},mn={test:e=>ns.test(e)||pw.test(e)||gl.test(e),parse:e=>ns.test(e)?ns.parse(e):gl.test(e)?gl.parse(e):pw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ns.transform(e):gl.transform(e)},QK=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function JK(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Zj))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(QK))===null||n===void 0?void 0:n.length)||0)>0}const wI="number",SI="color",ZK="var",eq="var(",CA="${}",tq=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yd(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(tq,c=>(mn.test(c)?(r.color.push(a),i.push(SI),n.push(mn.parse(c))):c.startsWith(eq)?(r.var.push(a),i.push(ZK),n.push(c)):(r.number.push(a),i.push(wI),n.push(parseFloat(c))),++a,CA)).split(CA);return{values:n,split:s,indexes:r,types:i}}function jI(e){return Yd(e).values}function CI(e){const{split:t,types:n}=Yd(e),r=t.length;return i=>{let a="";for(let o=0;otypeof e=="number"?0:e;function rq(e){const t=jI(e);return CI(e)(t.map(nq))}const No={test:JK,parse:jI,createTransformer:CI,getAnimatableNone:rq},iq=new Set(["brightness","contrast","saturate","opacity"]);function aq(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Zj)||[];if(!r)return e;const i=n.replace(r,"");let a=iq.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const oq=/\b([a-z-]*)\(.*?\)/gu,mw={...No,getAnimatableNone:e=>{const t=e.match(oq);return t?t.map(aq).join(" "):e}},sq={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,radius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,top:xe,right:xe,bottom:xe,left:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,backgroundPositionX:xe,backgroundPositionY:xe},lq={rotate:Fa,rotateX:Fa,rotateY:Fa,rotateZ:Fa,scale:qh,scaleX:qh,scaleY:qh,scaleZ:qh,skew:Fa,skewX:Fa,skewY:Fa,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:Gd,originX:xA,originY:xA,originZ:xe},PA={...Jc,transform:Math.round},tC={...sq,...lq,zIndex:PA,size:xe,fillOpacity:Gd,strokeOpacity:Gd,numOctaves:PA},cq={...tC,color:mn,backgroundColor:mn,outlineColor:mn,fill:mn,stroke:mn,borderColor:mn,borderTopColor:mn,borderRightColor:mn,borderBottomColor:mn,borderLeftColor:mn,filter:mw,WebkitFilter:mw},nC=e=>cq[e];function PI(e,t){let n=nC(e);return n!==mw&&(n=No),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uq=new Set(["auto","none","0"]);function dq(e,t,n){let r=0,i;for(;r{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function rC(e){return typeof e=="function"}let Dp;function fq(){Dp=void 0}const Ei={now:()=>(Dp===void 0&&Ei.set(an.isProcessing||NK.useManualTiming?an.timestamp:performance.now()),Dp),set:e=>{Dp=e,queueMicrotask(fq)}},OA=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(No.test(e)||e==="0")&&!e.startsWith("url("));function hq(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nmq?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&KK(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ei.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:c,isGenerator:u}=this.options;if(!u&&!pq(t,r,i,a))if(o)this.options.duration=0;else{c==null||c(Cg(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const uc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},AI=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a{const d=u*o,f=d*e,h=d-n,p=vw(u,o),v=Math.exp(-f);return W0-h/p*v},a=u=>{const f=u*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-f),m=vw(Math.pow(u,2),o);return(-i(u)+W0>0?-1:1)*((h-p)*v)/m}):(i=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-W0+d*f},a=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const s=5/e,c=xq(i,a,s);if(e=ua(e),isNaN(c))return{stiffness:Nt.stiffness,damping:Nt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const yq=12;function xq(e,t,n){let r=n;for(let i=1;i=gw?1/0:t}const bq=["duration","bounce"],wq=["stiffness","damping","mass"];function NA(e,t){return t.some(n=>e[n]!==void 0)}function Sq(e){let t={velocity:Nt.velocity,stiffness:Nt.stiffness,damping:Nt.damping,mass:Nt.mass,isResolvedFromDuration:!1,...e};if(!NA(e,wq)&&NA(e,bq))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*wa(.05,1,1-e.bounce)*Math.sqrt(i);t={...t,mass:Nt.mass,stiffness:i,damping:a}}else{const n=gq(e);t={...t,...n,mass:Nt.mass},t.isResolvedFromDuration=!0}return t}function kI(e=Nt.visualDuration,t=Nt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=Sq({...n,velocity:-da(n.velocity||0)}),v=h||0,m=u/(2*Math.sqrt(c*d)),y=o-a,x=da(Math.sqrt(c/d)),b=Math.abs(y)<5;r||(r=b?Nt.restSpeed.granular:Nt.restSpeed.default),i||(i=b?Nt.restDelta.granular:Nt.restDelta.default);let w;if(m<1){const S=vw(x,m);w=j=>{const P=Math.exp(-m*x*j);return o-P*((v+m*x*y)/S*Math.sin(S*j)+y*Math.cos(S*j))}}else if(m===1)w=S=>o-Math.exp(-x*S)*(y+(v+x*y)*S);else{const S=x*Math.sqrt(m*m-1);w=j=>{const P=Math.exp(-m*x*j),O=Math.min(S*j,300);return o-P*((v+m*x*y)*Math.sinh(O)+S*y*Math.cosh(O))/S}}const C={calculatedDuration:p&&f||null,next:S=>{const j=w(S);if(p)s.done=S>=f;else{let P=0;m<1&&(P=S===0?ua(v):TI(w,S,j));const O=Math.abs(P)<=r,N=Math.abs(o-j)<=i;s.done=O&&N}return s.value=s.done?o:j,s},toString:()=>{const S=Math.min(_I(C),gw),j=AI(P=>C.next(S*P).value,S,30);return S+"ms "+j}};return C}function AA({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=O=>s!==void 0&&Oc,v=O=>s===void 0?c:c===void 0||Math.abs(s-O)-m*Math.exp(-O/r),w=O=>x+b(O),C=O=>{const N=b(O),A=w(O);h.done=Math.abs(N)<=u,h.value=h.done?x:A};let S,j;const P=O=>{p(h.value)&&(S=O,j=kI({keyframes:[h.value,v(h.value)],velocity:TI(w,O,h.value),damping:i,stiffness:a,restDelta:u,restSpeed:d}))};return P(0),{calculatedDuration:null,next:O=>{let N=!1;return!j&&S===void 0&&(N=!0,C(O),P(O)),S!==void 0&&O>=S?j.next(O-S):(!N&&C(O),h)}}}const jq=nh(.42,0,1,1),Cq=nh(0,0,.58,1),MI=nh(.42,0,.58,1),Pq=e=>Array.isArray(e)&&typeof e[0]!="number",iC=e=>Array.isArray(e)&&typeof e[0]=="number",EA={linear:ar,easeIn:jq,easeInOut:MI,easeOut:Cq,circIn:Xj,circInOut:uI,circOut:cI,backIn:Yj,backInOut:sI,backOut:oI,anticipate:lI},TA=e=>{if(iC(e)){dw(e.length===4);const[t,n,r,i]=e;return nh(t,n,r,i)}else if(typeof e=="string")return dw(EA[e]!==void 0),EA[e];return e},Oq=(e,t)=>n=>t(e(n)),ih=(...e)=>e.reduce(Oq),St=(e,t,n)=>e+(t-e)*n;function H0(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Nq({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=H0(c,s,e+1/3),a=H0(c,s,e),o=H0(c,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Cm(e,t){return n=>n>0?t:e}const K0=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Aq=[pw,ns,gl],Eq=e=>Aq.find(t=>t.test(e));function _A(e){const t=Eq(e);if(!t)return!1;let n=t.parse(e);return t===gl&&(n=Nq(n)),n}const kA=(e,t)=>{const n=_A(e),r=_A(t);if(!n||!r)return Cm(e,t);const i={...n};return a=>(i.red=K0(n.red,r.red,a),i.green=K0(n.green,r.green,a),i.blue=K0(n.blue,r.blue,a),i.alpha=St(n.alpha,r.alpha,a),ns.transform(i))},yw=new Set(["none","hidden"]);function Tq(e,t){return yw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function _q(e,t){return n=>St(e,t,n)}function aC(e){return typeof e=="number"?_q:typeof e=="string"?Qj(e)?Cm:mn.test(e)?kA:Rq:Array.isArray(e)?RI:typeof e=="object"?mn.test(e)?kA:kq:Cm}function RI(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>aC(a)(a,t[o]));return a=>{for(let o=0;o{for(const a in r)n[a]=r[a](i);return n}}function Mq(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a{const n=No.createTransformer(t),r=Yd(e),i=Yd(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?yw.has(e)&&!i.values.length||yw.has(t)&&!r.values.length?Tq(e,t):ih(RI(Mq(r,i),i.values),n):Cm(e,t)};function $I(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?St(e,t,n):aC(e)(e,t)}function $q(e,t,n){const r=[],i=n||$I,a=e.length-1;for(let o=0;ot[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=$q(t,r,i),s=o.length,c=u=>{let d=0;if(s>1)for(;dc(wa(e[0],e[a-1],u)):c}function Iq(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=uc(0,t,r);e.push(St(n,1,i))}}function Lq(e){const t=[0];return Iq(t,e.length-1),t}function Fq(e,t){return e.map(n=>n*t)}function Bq(e,t){return e.map(()=>t||MI).splice(0,e.length-1)}function Pm({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Pq(r)?r.map(TA):TA(r),a={done:!1,value:t[0]},o=Fq(n&&n.length===t.length?n:Lq(t),e),s=Dq(o,t,{ease:Array.isArray(i)?i:Bq(t,i)});return{calculatedDuration:e,next:c=>(a.value=s(c),a.done=c>=e,a)}}const Uq=e=>{const t=({timestamp:n})=>e(n);return{start:()=>mt.update(t,!0),stop:()=>Oo(t),now:()=>an.isProcessing?an.timestamp:Ei.now()}},zq={decay:AA,inertia:AA,tween:Pm,keyframes:Pm,spring:kI},Vq=e=>e/100;class oC extends NI{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Jj,s=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=rC(n)?n:zq[n]||Pm;let c,u;s!==Pm&&typeof t[0]!="number"&&(c=ih(Vq,$I(t[0],t[1])),t=[0,100]);const d=s({...this.options,keyframes:t});a==="mirror"&&(u=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=_I(d));const{calculatedDuration:f}=d,h=f+i,p=h*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return a.next(0);const{delay:h,repeat:p,repeatType:v,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,C=a;if(p){const O=Math.min(this.currentTime,d)/f;let N=Math.floor(O),A=O%1;!A&&O>=1&&(A=1),A===1&&N--,N=Math.min(N,p+1),!!(N%2)&&(v==="reverse"?(A=1-A,m&&(A-=m/f)):v==="mirror"&&(C=o)),w=wa(0,1,A)*f}const S=b?{done:!1,value:c[0]}:C.next(w);s&&(S.value=s(S.value));let{done:j}=S;!b&&u!==null&&(j=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return P&&i!==void 0&&(S.value=Cg(c,this.options,i)),y&&y(S.value),P&&this.finish(),S}get duration(){const{resolved:t}=this;return t?da(t.calculatedDuration):0}get time(){return da(this.currentTime)}set time(t){t=ua(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=da(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Uq,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Wq=new Set(["opacity","clipPath","filter","transform"]);function sC(e){let t;return()=>(t===void 0&&(t=e()),t)}const Hq={linearEasing:void 0};function Kq(e,t){const n=sC(e);return()=>{var r;return(r=Hq[t])!==null&&r!==void 0?r:n()}}const Om=Kq(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function DI(e){return!!(typeof e=="function"&&Om()||!e||typeof e=="string"&&(e in xw||Om())||iC(e)||Array.isArray(e)&&e.every(DI))}const Yu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yu([0,.65,.55,1]),circOut:Yu([.55,0,1,.45]),backIn:Yu([.31,.01,.66,-.59]),backOut:Yu([.33,1.53,.69,.99])};function II(e,t){if(e)return typeof e=="function"&&Om()?AI(e,t):iC(e)?Yu(e):Array.isArray(e)?e.map(n=>II(n,t)||xw.easeOut):xw[e]}function qq(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=II(s,i);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function MA(e,t){e.timeline=t,e.onfinish=null}const Gq=sC(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Nm=10,Yq=2e4;function Xq(e){return rC(e.type)||e.type==="spring"||!DI(e.ease)}function Qq(e,t){const n=new oC({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&athis.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:s,motionValue:c,name:u,startTime:d}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Om()&&Jq(o)&&(o=LI[o]),Xq(this.options)){const{onComplete:h,onUpdate:p,motionValue:v,element:m,...y}=this.options,x=Qq(t,y);t=x.keyframes,t.length===1&&(t[1]=t[0]),i=x.duration,a=x.times,o=x.ease,s="keyframes"}const f=qq(c.owner.current,u,t,{...this.options,duration:i,times:a,ease:o});return f.startTime=d??this.calcStartTime(),this.pendingTimeline?(MA(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:h}=this.options;c.set(Cg(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:a,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return da(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return da(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ua(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ar;const{animation:r}=n;MA(r,t)}return ar}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...p}=this.options,v=new oC({...p,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),m=ua(this.time);u.setWithVelocity(v.sample(m-Nm).value,v.sample(m).value,Nm)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:s}=t;return Gq()&&r&&Wq.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const Zq=sC(()=>window.ScrollTimeline!==void 0);class eG{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;rZq()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function tG({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const lC=(e,t,n,r={},i,a)=>o=>{const s=Gj(r,e)||{},c=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ua(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};tG(s)||(d={...d,...OK(e,d)}),d.duration&&(d.duration=ua(d.duration)),d.repeatDelay&&(d.repeatDelay=ua(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!a&&t.get()!==void 0){const h=Cg(d.keyframes,s);if(h!==void 0)return mt.update(()=>{d.onUpdate(h),d.onComplete()}),new eG([])}return!a&&RA.supports(d)?new RA(d):new oC(d)},nG=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),rG=e=>uw(e)?e[e.length-1]||0:e;function cC(e,t){e.indexOf(t)===-1&&e.push(t)}function uC(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class dC{constructor(){this.subscriptions=[]}add(t){return cC(this.subscriptions,t),()=>uC(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a!isNaN(parseFloat(e));class aG{constructor(t,n={}){this.version="11.15.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Ei.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ei.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=iG(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new dC);const r=this.events[t].add(n);return t==="change"?()=>{r(),mt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ei.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$A)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$A);return EI(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xd(e,t){return new aG(e,t)}function oG(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xd(n))}function sG(e,t){const n=jg(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=rG(a[o]);oG(e,o,s)}}const fC=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lG="framerAppearId",FI="data-"+fC(lG);function BI(e){return e.props[FI]}const wn=e=>!!(e&&e.getVelocity);function cG(e){return!!(wn(e)&&e.add)}function bw(e,t){const n=e.getValue("willChange");if(cG(n))return n.add(t)}function uG({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function UI(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...c}=t;r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in c){const h=e.getValue(f,(a=e.latestValues[f])!==null&&a!==void 0?a:null),p=c[f];if(p===void 0||d&&uG(d,f))continue;const v={delay:n,...Gj(o||{},f)};let m=!1;if(window.MotionHandoffAnimation){const x=BI(e);if(x){const b=window.MotionHandoffAnimation(x,f,mt);b!==null&&(v.startTime=b,m=!0)}}bw(e,f),h.start(lC(f,h,p,e.shouldReduceMotion&&Vs.has(f)?{type:!1}:v,e,m));const y=h.animation;y&&u.push(y)}return s&&Promise.all(u).then(()=>{mt.update(()=>{s&&sG(e,s)})}),u}function ww(e,t,n={}){var r;const i=jg(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(UI(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=a;return dG(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=a;if(c){const[u,d]=c==="beforeChildren"?[o,s]:[s,o];return u().then(()=>d())}else return Promise.all([o(),s(n.delay)])}function dG(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,c=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(fG).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(ww(u,t,{...a,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function fG(e,t){return e.sortNodePosition(t)}function hG(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>ww(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=ww(e,t,n);else{const i=typeof t=="function"?jg(e,t,n.custom):t;r=Promise.all(UI(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const pG=qj.length;function zI(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?zI(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>hG(e,n,r)))}function yG(e){let t=gG(e),n=DA(),r=!0;const i=c=>(u,d)=>{var f;const h=jg(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:v,...m}=h;u={...u,...m,...v}}return u};function a(c){t=c(e)}function o(c){const{props:u}=e,d=zI(e.parent)||{},f=[],h=new Set;let p={},v=1/0;for(let y=0;yv&&C,N=!1;const A=Array.isArray(w)?w:[w];let _=A.reduce(i(x),{});S===!1&&(_={});const{prevResolvedValues:E={}}=b,k={...E,..._},M=B=>{O=!0,h.has(B)&&(N=!0,h.delete(B)),b.needsAnimating[B]=!0;const I=e.getValue(B);I&&(I.liveStyle=!1)};for(const B in k){const I=_[B],R=E[B];if(p.hasOwnProperty(B))continue;let F=!1;uw(I)&&uw(R)?F=!tI(I,R):F=I!==R,F?I!=null?M(B):h.add(B):I!==void 0&&h.has(B)?M(B):b.protectedKeys[B]=!0}b.prevProp=w,b.prevResolvedValues=_,b.isActive&&(p={...p,..._}),r&&e.blockInitialAnimation&&(O=!1),O&&(!(j&&P)||N)&&f.push(...A.map(B=>({animation:B,options:{type:x}})))}if(h.size){const y={};h.forEach(x=>{const b=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),y[x]=b??null}),f.push({animation:y})}let m=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function s(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=o(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=DA(),r=!0}}}function xG(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!tI(t,e):!1}function Wo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function DA(){return{animate:Wo(!0),whileInView:Wo(),whileHover:Wo(),whileTap:Wo(),whileDrag:Wo(),whileFocus:Wo(),exit:Wo()}}class $o{constructor(t){this.isMounted=!1,this.node=t}update(){}}class bG extends $o{constructor(t){super(t),t.animationState||(t.animationState=yG(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Sg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let wG=0;class SG extends $o{constructor(){super(...arguments),this.id=wG++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const jG={animation:{Feature:bG},exit:{Feature:SG}},Vr={x:!1,y:!1};function VI(){return Vr.x||Vr.y}function CG(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const a=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function WI(e,t){const n=CG(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function IA(e){return t=>{t.pointerType==="touch"||VI()||e(t)}}function PG(e,t,n={}){const[r,i,a]=WI(e,n),o=IA(s=>{const{target:c}=s,u=t(s);if(!u||!c)return;const d=IA(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,i)});return r.forEach(s=>{s.addEventListener("pointerenter",o,i)}),a}const hC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Xu=new WeakSet;function LA(e){return t=>{t.key==="Enter"&&e(t)}}function q0(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const OG=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=LA(()=>{if(Xu.has(n))return;q0(n,"down");const i=LA(()=>{q0(n,"up")}),a=()=>q0(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)},NG=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function AG(e){return NG.has(e.tagName)||e.tabIndex!==-1}const HI=(e,t)=>t?e===t?!0:HI(e,t.parentElement):!1;function FA(e){return hC(e)&&!VI()}function EG(e,t,n={}){const[r,i,a]=WI(e,n),o=s=>{const c=s.currentTarget;if(!FA(s)||Xu.has(c))return;Xu.add(c);const u=t(s),d=(p,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!FA(p)||!Xu.has(c))&&(Xu.delete(c),u&&u(p,{success:v}))},f=p=>{d(p,n.useGlobalTarget||HI(c,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return r.forEach(s=>{AG(s)||(s.tabIndex=0),(n.useGlobalTarget?window:s).addEventListener("pointerdown",o,i),s.addEventListener("focus",u=>OG(u,i),i)}),a}function TG(e){return e==="x"||e==="y"?Vr[e]?null:(Vr[e]=!0,()=>{Vr[e]=!1}):Vr.x||Vr.y?null:(Vr.x=Vr.y=!0,()=>{Vr.x=Vr.y=!1})}function ah(e){return{point:{x:e.pageX,y:e.pageY}}}const _G=e=>t=>hC(t)&&e(t,ah(t));function Qd(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function pd(e,t,n,r){return Qd(e,t,_G(n),r)}const BA=(e,t)=>Math.abs(e-t);function kG(e,t){const n=BA(e.x,t.x),r=BA(e.y,t.y);return Math.sqrt(n**2+r**2)}class KI{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Y0(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=kG(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:v}=f,{timestamp:m}=an;this.history.push({...v,timestamp:m});const{onStart:y,onMove:x}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=G0(h,this.transformPagePoint),mt.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:v,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Y0(f.type==="pointercancel"?this.lastMoveEventInfo:G0(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,y),v&&v(f,y)},!hC(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=ah(t),s=G0(o,this.transformPagePoint),{point:c}=s,{timestamp:u}=an;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Y0(s,this.history)),this.removeListeners=ih(pd(this.contextWindow,"pointermove",this.handlePointerMove),pd(this.contextWindow,"pointerup",this.handlePointerUp),pd(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Oo(this.updatePoint)}}function G0(e,t){return t?{point:t(e.point)}:e}function UA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Y0({point:e},t){return{point:e,delta:UA(e,qI(t)),offset:UA(e,MG(t)),velocity:RG(t,.1)}}function MG(e){return e[0]}function qI(e){return e[e.length-1]}function RG(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qI(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ua(t)));)n--;if(!r)return{x:0,y:0};const a=da(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function yl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const GI=1e-4,$G=1-GI,DG=1+GI,YI=.01,IG=0-YI,LG=0+YI;function cr(e){return e.max-e.min}function FG(e,t,n){return Math.abs(e-t)<=n}function zA(e,t,n,r=.5){e.origin=r,e.originPoint=St(t.min,t.max,e.origin),e.scale=cr(n)/cr(t),e.translate=St(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$G&&e.scale<=DG||isNaN(e.scale))&&(e.scale=1),(e.translate>=IG&&e.translate<=LG||isNaN(e.translate))&&(e.translate=0)}function md(e,t,n,r){zA(e.x,t.x,n.x,r?r.originX:void 0),zA(e.y,t.y,n.y,r?r.originY:void 0)}function VA(e,t,n){e.min=n.min+t.min,e.max=e.min+cr(t)}function BG(e,t,n){VA(e.x,t.x,n.x),VA(e.y,t.y,n.y)}function WA(e,t,n){e.min=t.min-n.min,e.max=e.min+cr(t)}function vd(e,t,n){WA(e.x,t.x,n.x),WA(e.y,t.y,n.y)}function UG(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?St(n,e,r.max):Math.min(e,n)),e}function HA(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zG(e,{top:t,left:n,bottom:r,right:i}){return{x:HA(e.x,n,i),y:HA(e.y,t,r)}}function KA(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=uc(t.min,t.max-r,e.min):r>i&&(n=uc(e.min,e.max-i,t.min)),wa(0,1,n)}function HG(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Sw=.35;function KG(e=Sw){return e===!1?e=0:e===!0&&(e=Sw),{x:qA(e,"left","right"),y:qA(e,"top","bottom")}}function qA(e,t,n){return{min:GA(e,t),max:GA(e,n)}}function GA(e,t){return typeof e=="number"?e:e[t]||0}const YA=()=>({translate:0,scale:1,origin:0,originPoint:0}),xl=()=>({x:YA(),y:YA()}),XA=()=>({min:0,max:0}),kt=()=>({x:XA(),y:XA()});function yr(e){return[e("x"),e("y")]}function XI({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function qG({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function GG(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function X0(e){return e===void 0||e===1}function jw({scale:e,scaleX:t,scaleY:n}){return!X0(e)||!X0(t)||!X0(n)}function Go(e){return jw(e)||QI(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function QI(e){return QA(e.x)||QA(e.y)}function QA(e){return e&&e!=="0%"}function Am(e,t,n){const r=e-n,i=t*r;return n+i}function JA(e,t,n,r,i){return i!==void 0&&(e=Am(e,i,r)),Am(e,n,r)+t}function Cw(e,t=0,n=1,r,i){e.min=JA(e.min,t,n,r,i),e.max=JA(e.max,t,n,r,i)}function JI(e,{x:t,y:n}){Cw(e.x,t.translate,t.scale,t.originPoint),Cw(e.y,n.translate,n.scale,n.originPoint)}const ZA=.999999999999,eE=1.0000000000001;function YG(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;sZA&&(t.x=1),t.yZA&&(t.y=1)}function bl(e,t){e.min=e.min+t,e.max=e.max+t}function tE(e,t,n,r,i=.5){const a=St(e.min,e.max,i);Cw(e,t,n,a,r)}function wl(e,t){tE(e.x,t.x,t.scaleX,t.scale,t.originX),tE(e.y,t.y,t.scaleY,t.scale,t.originY)}function ZI(e,t){return XI(GG(e.getBoundingClientRect(),t))}function XG(e,t,n){const r=ZI(e,n),{scroll:i}=t;return i&&(bl(r.x,i.offset.x),bl(r.y,i.offset.y)),r}const e4=({current:e})=>e?e.ownerDocument.defaultView:null,QG=new WeakMap;class JG{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=kt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ah(d).point)},a=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:v}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TG(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yr(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Ai.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[y];w&&(x=cr(w)*(parseFloat(x)/100))}}this.originPoint[y]=x}),v&&mt.postRender(()=>v(d,f)),bw(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:v,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=ZG(y),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(d,f)},s=(d,f)=>this.stop(d,f),c=()=>yr(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new KI(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:e4(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&mt.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Gh(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=UG(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&yl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=zG(i.layoutBox,n):this.constraints=!1,this.elastic=KG(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&yr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=HG(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yl(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=XG(r,i.root,this.visualElement.getTransformPagePoint());let o=VG(i.layout.layoutBox,a);if(n){const s=n(qG(o));this.hasMutatedConstraints=!!s,s&&(o=XI(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},u=yr(d=>{if(!Gh(d,n,this.currentDirection))return;let f=c[d]||{};o&&(f={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,v={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(d,v)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return bw(this.visualElement,t),r.start(lC(t,r,0,n,this.visualElement,!1))}stopAnimation(){yr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){yr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yr(n=>{const{drag:r}=this.getProps();if(!Gh(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-St(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!yl(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};yr(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const c=s.get();i[o]=WG({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),yr(o=>{if(!Gh(o,t,null))return;const s=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];s.set(St(c,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;QG.set(this.visualElement,this);const t=this.visualElement.current,n=pd(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();yl(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),mt.read(r);const o=Qd(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(yr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=Sw,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Gh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ZG(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class eY extends $o{constructor(t){super(t),this.removeGroupControls=ar,this.removeListeners=ar,this.controls=new JG(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ar}unmount(){this.removeGroupControls(),this.removeListeners()}}const nE=e=>(t,n)=>{e&&mt.postRender(()=>e(t,n))};class tY extends $o{constructor(){super(...arguments),this.removePointerDownListener=ar}onPointerDown(t){this.session=new KI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:e4(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:nE(t),onStart:nE(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&mt.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=pd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Pg=g.createContext(null);function nY(){const e=g.useContext(Pg);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=g.useId();g.useEffect(()=>r(i),[]);const a=g.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const pC=g.createContext({}),t4=g.createContext({}),Ip={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ku={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=rE(e,t.target.x),r=rE(e,t.target.y);return`${n}% ${r}%`}},rY={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=No.parse(e);if(i.length>5)return r;const a=No.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;const u=St(s,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}},Em={};function iY(e){Object.assign(Em,e)}const{schedule:mC,cancel:E_e}=nI(queueMicrotask,!1);class aY extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;iY(oY),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Ip.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||mt.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),mC.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function n4(e){const[t,n]=nY(),r=g.useContext(pC);return l.jsx(aY,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(t4),isPresent:t,safeToRemove:n})}const oY={borderRadius:{...ku,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ku,borderTopRightRadius:ku,borderBottomLeftRadius:ku,borderBottomRightRadius:ku,boxShadow:rY},r4=["TopLeft","TopRight","BottomLeft","BottomRight"],sY=r4.length,iE=e=>typeof e=="string"?parseFloat(e):e,aE=e=>typeof e=="number"||xe.test(e);function lY(e,t,n,r,i,a){i?(e.opacity=St(0,n.opacity!==void 0?n.opacity:1,cY(r)),e.opacityExit=St(t.opacity!==void 0?t.opacity:1,0,uY(r))):a&&(e.opacity=St(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(uc(e,t,r))}function sE(e,t){e.min=t.min,e.max=t.max}function pr(e,t){sE(e.x,t.x),sE(e.y,t.y)}function lE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function cE(e,t,n,r,i){return e-=t,e=Am(e,1/n,r),i!==void 0&&(e=Am(e,1/i,r)),e}function dY(e,t=0,n=1,r=.5,i,a=e,o=e){if(Ai.test(t)&&(t=parseFloat(t),t=St(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=St(a.min,a.max,r);e===a&&(s-=t),e.min=cE(e.min,t,n,s,i),e.max=cE(e.max,t,n,s,i)}function uE(e,t,[n,r,i],a,o){dY(e,t[n],t[r],t[i],t.scale,a,o)}const fY=["x","scaleX","originX"],hY=["y","scaleY","originY"];function dE(e,t,n,r){uE(e.x,t,fY,n?n.x:void 0,r?r.x:void 0),uE(e.y,t,hY,n?n.y:void 0,r?r.y:void 0)}function fE(e){return e.translate===0&&e.scale===1}function a4(e){return fE(e.x)&&fE(e.y)}function hE(e,t){return e.min===t.min&&e.max===t.max}function pY(e,t){return hE(e.x,t.x)&&hE(e.y,t.y)}function pE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function o4(e,t){return pE(e.x,t.x)&&pE(e.y,t.y)}function mE(e){return cr(e.x)/cr(e.y)}function vE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class mY{constructor(){this.members=[]}add(t){cC(this.members,t),t.scheduleRender()}remove(t){if(uC(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vY(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const gY=(e,t)=>e.depth-t.depth;class yY{constructor(){this.children=[],this.isDirty=!1}add(t){cC(this.children,t),this.isDirty=!0}remove(t){uC(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gY),this.isDirty=!1,this.children.forEach(t)}}function Lp(e){const t=wn(e)?e.get():e;return nG(t)?t.toValue():t}function xY(e,t){const n=Ei.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Oo(r),e(a-t))};return mt.read(r,!0),()=>Oo(r)}function bY(e){return e instanceof SVGElement&&e.tagName!=="svg"}function wY(e,t,n){const r=wn(e)?e:Xd(e);return r.start(lC("",r,t,n)),r.animation}const Yo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Qu=typeof window<"u"&&window.MotionDebug!==void 0,Q0=["","X","Y","Z"],SY={visibility:"hidden"},gE=1e3;let jY=0;function J0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function s4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=BI(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",mt,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&s4(r)}function l4({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=jY++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Qu&&(Yo.totalNodes=Yo.resolvedTargetDeltas=Yo.recalculatedProjection=0),this.nodes.forEach(OY),this.nodes.forEach(_Y),this.nodes.forEach(kY),this.nodes.forEach(NY),Qu&&window.MotionDebug.record(Yo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=xY(h,250),Ip.hasAnimatedSinceResize&&(Ip.hasAnimatedSinceResize=!1,this.nodes.forEach(xE))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||IY,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=d.getProps(),b=!this.targetLayout||!o4(this.targetLayout,v)||p,w=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const C={...Gj(m,"layout"),onPlay:y,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else h||xE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Oo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(MY),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&s4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const S=C/1e3;bE(f.x,o.x,S),bE(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vd(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$Y(this.relativeTarget,this.relativeTargetOrigin,h,S),w&&pY(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=kt()),pr(w,this.relativeTarget)),m&&(this.animationValues=d,lY(d,u,this.latestValues,S,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Oo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=mt.update(()=>{Ip.hasAnimatedSinceResize=!0,this.currentAnimation=wY(0,gE,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:c,layout:u,latestValues:d}=o;if(!(!s||!c||!u)){if(this!==o&&this.layout&&u&&c4(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||kt();const f=cr(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=cr(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}pr(s,c),wl(s,d),md(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new mY),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const u={};c.z&&J0("z",o,u,this.animationValues);for(let d=0;d{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(yE),this.root.sharedNodes.clear()}}}function CY(e){e.updateLayout()}function PY(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?yr(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=cr(h);h.min=r[f].min,h.max=h.min+p}):c4(a,n.layoutBox,r)&&yr(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=cr(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const s=xl();md(s,r,n.layoutBox);const c=xl();o?md(c,e.applyTransform(i,!0),n.measuredBox):md(c,r,n.layoutBox);const u=!a4(s);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const v=kt();vd(v,n.layoutBox,h.layoutBox);const m=kt();vd(m,r,p.layoutBox),o4(v,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function OY(e){Qu&&Yo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function NY(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function AY(e){e.clearSnapshot()}function yE(e){e.clearMeasurements()}function EY(e){e.isLayoutDirty=!1}function TY(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function xE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function _Y(e){e.resolveTargetDelta()}function kY(e){e.calcProjection()}function MY(e){e.resetSkewAndRotation()}function RY(e){e.removeLeadSnapshot()}function bE(e,t,n){e.translate=St(t.translate,0,n),e.scale=St(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function wE(e,t,n,r){e.min=St(t.min,n.min,r),e.max=St(t.max,n.max,r)}function $Y(e,t,n,r){wE(e.x,t.x,n.x,r),wE(e.y,t.y,n.y,r)}function DY(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const IY={duration:.45,ease:[.4,0,.1,1]},SE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),jE=SE("applewebkit/")&&!SE("chrome/")?Math.round:ar;function CE(e){e.min=jE(e.min),e.max=jE(e.max)}function LY(e){CE(e.x),CE(e.y)}function c4(e,t,n){return e==="position"||e==="preserve-aspect"&&!FG(mE(t),mE(n),.2)}function FY(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const BY=l4({attachResizeListener:(e,t)=>Qd(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Z0={current:void 0},u4=l4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Z0.current){const e=new BY({});e.mount(window),e.setOptions({layoutScroll:!0}),Z0.current=e}return Z0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),UY={pan:{Feature:tY},drag:{Feature:eY,ProjectionNode:u4,MeasureLayout:n4}};function PE(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&mt.postRender(()=>a(t,ah(t)))}class zY extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=PG(t,n=>(PE(this.node,n,"Start"),r=>PE(this.node,r,"End"))))}unmount(){}}class VY extends $o{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ih(Qd(this.node.current,"focus",()=>this.onFocus()),Qd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function OE(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&mt.postRender(()=>a(t,ah(t)))}class WY extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=EG(t,n=>(OE(this.node,n,"Start"),(r,{success:i})=>OE(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Pw=new WeakMap,ex=new WeakMap,HY=e=>{const t=Pw.get(e.target);t&&t(e)},KY=e=>{e.forEach(HY)};function qY({root:e,...t}){const n=e||document;ex.has(n)||ex.set(n,{});const r=ex.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(KY,{root:e,...t})),r[i]}function GY(e,t,n){const r=qY(t);return Pw.set(e,n),r.observe(e),()=>{Pw.delete(e),r.unobserve(e)}}const YY={some:0,all:1};class XY extends $o{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:YY[i]},s=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return GY(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(QY(t,n))&&this.startObserver()}unmount(){}}function QY({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const JY={inView:{Feature:XY},tap:{Feature:WY},focus:{Feature:VY},hover:{Feature:zY}},ZY={layout:{ProjectionNode:u4,MeasureLayout:n4}},vC=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Og=g.createContext({}),gC=typeof window<"u",d4=gC?g.useLayoutEffect:g.useEffect,f4=g.createContext({strict:!1});function eX(e,t,n,r,i){var a,o;const{visualElement:s}=g.useContext(Og),c=g.useContext(f4),u=g.useContext(Pg),d=g.useContext(vC).reducedMotion,f=g.useRef(null);r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,p=g.useContext(t4);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&tX(f.current,n,i,p);const v=g.useRef(!1);g.useInsertionEffect(()=>{h&&v.current&&h.update(n,u)});const m=n[FI],y=g.useRef(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return d4(()=>{h&&(v.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),mC.render(h.render),y.current&&h.animationState&&h.animationState.animateChanges())}),g.useEffect(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,m)}),y.current=!1))}),h}function tX(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:h4(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&yl(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function h4(e){if(e)return e.options.allowProjection!==!1?e.projection:h4(e.parent)}function nX(e,t,n){return g.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):yl(n)&&(n.current=r))},[t])}function Ng(e){return Sg(e.animate)||qj.some(t=>qd(e[t]))}function p4(e){return!!(Ng(e)||e.variants)}function rX(e,t){if(Ng(e)){const{initial:n,animate:r}=e;return{initial:n===!1||qd(n)?n:void 0,animate:qd(r)?r:void 0}}return e.inherit!==!1?t:{}}function iX(e){const{initial:t,animate:n}=rX(e,g.useContext(Og));return g.useMemo(()=>({initial:t,animate:n}),[NE(t),NE(n)])}function NE(e){return Array.isArray(e)?e.join(" "):e}const AE={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},dc={};for(const e in AE)dc[e]={isEnabled:t=>AE[e].some(n=>!!t[n])};function aX(e){for(const t in e)dc[t]={...dc[t],...e[t]}}const oX=Symbol.for("motionComponentSymbol");function sX({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&aX(e);function a(s,c){let u;const d={...g.useContext(vC),...s,layoutId:lX(s)},{isStatic:f}=d,h=iX(s),p=r(s,f);if(!f&&gC){cX();const v=uX(d);u=v.MeasureLayout,h.visualElement=eX(i,p,d,t,v.ProjectionNode)}return l.jsxs(Og.Provider,{value:h,children:[u&&h.visualElement?l.jsx(u,{visualElement:h.visualElement,...d}):null,n(i,s,nX(p,h.visualElement,c),p,f,h.visualElement)]})}const o=g.forwardRef(a);return o[oX]=i,o}function lX({layoutId:e}){const t=g.useContext(pC).id;return t&&e!==void 0?t+"-"+e:e}function cX(e,t){g.useContext(f4).strict}function uX(e){const{drag:t,layout:n}=dc;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const dX=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yC(e){return typeof e!="string"||e.includes("-")?!1:!!(dX.indexOf(e)>-1||/[A-Z]/u.test(e))}function m4(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const v4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function g4(e,t,n,r){m4(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(v4.has(i)?i:fC(i),t.attrs[i])}function y4(e,{layout:t,layoutId:n}){return Vs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Em[e]||e==="opacity")}function xC(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(wn(i[o])||t.style&&wn(t.style[o])||y4(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return a}function x4(e,t,n){const r=xC(e,t,n);for(const i in e)if(wn(e[i])||wn(t[i])){const a=th.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function bC(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}function fX({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:hX(r,i,a,e),renderState:t()};return n&&(o.mount=s=>n(r,s,o)),o}const b4=e=>(t,n)=>{const r=g.useContext(Og),i=g.useContext(Pg),a=()=>fX(e,t,r,i);return n?a():bC(a)};function hX(e,t,n,r){const i={},a=r(e,{});for(const h in a)i[h]=Lp(a[h]);let{initial:o,animate:s}=e;const c=Ng(e),u=p4(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?s:o;if(f&&typeof f!="boolean"&&!Sg(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p({style:{},transform:{},transformOrigin:{},vars:{}}),w4=()=>({...wC(),attrs:{}}),S4=(e,t)=>t&&typeof e=="number"?t.transform(e):e,pX={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mX=th.length;function vX(e,t,n){let r="",i=!0;for(let a=0;atypeof e=="string"&&e.toLowerCase()==="svg",wX={useVisualState:b4({scrapeMotionValuesFromProps:x4,createRenderState:w4,onMount:(e,t,{renderState:n,latestValues:r})=>{mt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),mt.render(()=>{jC(n,r,CC(t.tagName),e.transformTemplate),g4(t,n)})}})},SX={useVisualState:b4({scrapeMotionValuesFromProps:xC,createRenderState:wC})};function j4(e,t,n){for(const r in t)!wn(t[r])&&!y4(r,n)&&(e[r]=t[r])}function jX({transformTemplate:e},t){return g.useMemo(()=>{const n=wC();return SC(n,t,e),Object.assign({},n.vars,n.style)},[t])}function CX(e,t){const n=e.style||{},r={};return j4(r,n,e),Object.assign(r,jX(e,t)),r}function PX(e,t){const n={},r=CX(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const OX=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Tm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||OX.has(e)}let C4=e=>!Tm(e);function NX(e){e&&(C4=t=>t.startsWith("on")?!Tm(t):e(t))}try{NX(require("@emotion/is-prop-valid").default)}catch{}function AX(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(C4(i)||n===!0&&Tm(i)||!t&&!Tm(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function EX(e,t,n,r){const i=g.useMemo(()=>{const a=w4();return jC(a,t,CC(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};j4(a,e.style,e),i.style={...a,...i.style}}return i}function TX(e=!1){return(n,r,i,{latestValues:a},o)=>{const c=(yC(n)?EX:PX)(r,a,o,n),u=AX(r,typeof n=="string",e),d=n!==g.Fragment?{...u,...c,ref:i}:{},{children:f}=r,h=g.useMemo(()=>wn(f)?f.get():f,[f]);return g.createElement(n,{...d,children:h})}}function _X(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...yC(r)?wX:SX,preloadedFeatures:e,useRender:TX(i),createVisualElement:t,Component:r};return sX(o)}}const Ow={current:null},P4={current:!1};function kX(){if(P4.current=!0,!!gC)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ow.current=e.matches;e.addListener(t),t()}else Ow.current=!1}function MX(e,t,n){for(const r in t){const i=t[r],a=n[r];if(wn(i))e.addValue(r,i);else if(wn(a))e.addValue(r,Xd(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Xd(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const TE=new WeakMap,RX=[...gI,mn,No],$X=e=>RX.find(vI(e)),_E=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class DX{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Jj,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Ei.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),P4.current||kX(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ow.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){TE.delete(this.current),this.projection&&this.projection.unmount(),Oo(this.notifyUpdate),Oo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Vs.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&mt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in dc){const n=dc[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):kt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<_E.length;r++){const i=_E[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=MX(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Xd(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(fI(i)||dI(i))?i=parseFloat(i):!$X(i)&&No.test(n)&&(i=PI(t,n)),this.setBaseTarget(t,wn(i)?i.get():i)),wn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Hj(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!wn(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new dC),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class O4 extends DX{constructor(){super(...arguments),this.KeyframeResolver=OI}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function IX(e){return window.getComputedStyle(e)}class LX extends O4{constructor(){super(...arguments),this.type="html",this.renderInstance=m4}readValueFromInstance(t,n){if(Vs.has(n)){const r=nC(n);return r&&r.default||0}else{const r=IX(t),i=(pI(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ZI(t,n)}build(t,n,r){SC(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return xC(t,n,r)}}class FX extends O4{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Vs.has(n)){const r=nC(n);return r&&r.default||0}return n=v4.has(n)?n:fC(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return x4(t,n,r)}build(t,n,r){jC(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){g4(t,n,r,i)}mount(t){this.isSVGTag=CC(t.tagName),super.mount(t)}}const BX=(e,t)=>yC(e)?new FX(t):new LX(t,{allowProjection:e!==g.Fragment}),UX=_X({...jG,...JY,...UY,...ZY},BX),zX=wK(UX);class VX extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function WX({children:e,isPresent:t}){const n=g.useId(),r=g.useRef(null),i=g.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=g.useContext(vC);return g.useInsertionEffect(()=>{const{width:o,height:s,top:c,left:u}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return a&&(d.nonce=a),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${s}px !important; + top: ${c}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(d)}},[t]),l.jsx(VX,{isPresent:t,childRef:r,sizeRef:i,children:g.cloneElement(e,{ref:r})})}const HX=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{const s=bC(KX),c=g.useId(),u=g.useCallback(f=>{s.set(f,!0);for(const h of s.values())if(!h)return;r&&r()},[s,r]),d=g.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:u,register:f=>(s.set(f,!1),()=>s.delete(f))}),a?[Math.random(),u]:[n,u]);return g.useMemo(()=>{s.forEach((f,h)=>s.set(h,!1))},[n]),g.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),o==="popLayout"&&(e=l.jsx(WX,{isPresent:n,children:e})),l.jsx(Pg.Provider,{value:d,children:e})};function KX(){return new Map}const Yh=e=>e.key||"";function kE(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const N4=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o="sync"})=>{const s=g.useMemo(()=>kE(e),[e]),c=s.map(Yh),u=g.useRef(!0),d=g.useRef(s),f=bC(()=>new Map),[h,p]=g.useState(s),[v,m]=g.useState(s);d4(()=>{u.current=!1,d.current=s;for(let b=0;b{const w=Yh(b),C=s===v||c.includes(w),S=()=>{if(f.has(w))f.set(w,!0);else return;let j=!0;f.forEach(P=>{P||(j=!1)}),j&&(x==null||x(),m(d.current),i&&i())};return l.jsx(HX,{isPresent:C,initial:!u.current||r?void 0:!1,custom:C?void 0:n,presenceAffectsLayout:a,mode:o,onExitComplete:C?void 0:S,children:b},w)})})};function qX(e,t=globalThis==null?void 0:globalThis.document){const n=Lt(e);g.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var GX="DismissableLayer",Nw="dismissableLayer.update",YX="dismissableLayer.pointerDownOutside",XX="dismissableLayer.focusOutside",ME,A4=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zc=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,u=g.useContext(A4),[d,f]=g.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=g.useState({}),v=_e(t,P=>f(P)),m=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(y),b=d?m.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=b>=x,S=ZX(P=>{const O=P.target,N=[...u.branches].some(A=>A.contains(O));!C||N||(i==null||i(P),o==null||o(P),P.defaultPrevented||s==null||s())},h),j=eQ(P=>{const O=P.target;[...u.branches].some(A=>A.contains(O))||(a==null||a(P),o==null||o(P),P.defaultPrevented||s==null||s())},h);return qX(P=>{b===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},h),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ME=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),RE(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ME)}},[d,h,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),RE())},[d,u]),g.useEffect(()=>{const P=()=>p({});return document.addEventListener(Nw,P),()=>document.removeEventListener(Nw,P)},[]),l.jsx(pe.div,{...c,ref:v,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:ne(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ne(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ne(e.onPointerDownCapture,S.onPointerDownCapture)})});Zc.displayName=GX;var QX="DismissableLayerBranch",JX=g.forwardRef((e,t)=>{const n=g.useContext(A4),r=g.useRef(null),i=_e(t,r);return g.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(pe.div,{...e,ref:i})});JX.displayName=QX;function ZX(e,t=globalThis==null?void 0:globalThis.document){const n=Lt(e),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){E4(YX,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function eQ(e,t=globalThis==null?void 0:globalThis.document){const n=Lt(e),r=g.useRef(!1);return g.useEffect(()=>{const i=a=>{a.target&&!r.current&&E4(XX,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function RE(){const e=new CustomEvent(Nw);document.dispatchEvent(e)}function E4(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?MD(i,a):i.dispatchEvent(a)}var tx=0;function PC(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$E()),document.body.insertAdjacentElement("beforeend",e[1]??$E()),tx++,()=>{tx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tx--}},[])}function $E(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nx="focusScope.autoFocusOnMount",rx="focusScope.autoFocusOnUnmount",DE={bubbles:!1,cancelable:!0},tQ="FocusScope",Ag=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=g.useState(null),u=Lt(i),d=Lt(a),f=g.useRef(null),h=_e(t,m=>c(m)),p=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let m=function(w){if(p.paused||!s)return;const C=w.target;s.contains(C)?f.current=C:Ba(f.current,{select:!0})},y=function(w){if(p.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||Ba(f.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Ba(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const b=new MutationObserver(x);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),b.disconnect()}}},[r,s,p.paused]),g.useEffect(()=>{if(s){LE.add(p);const m=document.activeElement;if(!s.contains(m)){const x=new CustomEvent(nx,DE);s.addEventListener(nx,u),s.dispatchEvent(x),x.defaultPrevented||(nQ(sQ(T4(s)),{select:!0}),document.activeElement===m&&Ba(s))}return()=>{s.removeEventListener(nx,u),setTimeout(()=>{const x=new CustomEvent(rx,DE);s.addEventListener(rx,d),s.dispatchEvent(x),x.defaultPrevented||Ba(m??document.body,{select:!0}),s.removeEventListener(rx,d),LE.remove(p)},0)}}},[s,u,d,p]);const v=g.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(y&&x){const b=m.currentTarget,[w,C]=rQ(b);w&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&Ba(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&Ba(C,{select:!0})):x===b&&m.preventDefault()}},[n,r,p.paused]);return l.jsx(pe.div,{tabIndex:-1,...o,ref:h,onKeyDown:v})});Ag.displayName=tQ;function nQ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ba(r,{select:t}),document.activeElement!==n)return}function rQ(e){const t=T4(e),n=IE(t,e),r=IE(t.reverse(),e);return[n,r]}function T4(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function IE(e,t){for(const n of e)if(!iQ(n,{upTo:t}))return n}function iQ(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function aQ(e){return e instanceof HTMLInputElement&&"select"in e}function Ba(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&aQ(e)&&t&&e.select()}}var LE=oQ();function oQ(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=FE(e,t),e.unshift(t)},remove(t){var n;e=FE(e,t),(n=e[0])==null||n.resume()}}}function FE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sQ(e){return e.filter(t=>t.tagName!=="A")}const lQ=["top","right","bottom","left"],Ao=Math.min,Zn=Math.max,_m=Math.round,Xh=Math.floor,Ti=e=>({x:e,y:e}),cQ={left:"right",right:"left",bottom:"top",top:"bottom"},uQ={start:"end",end:"start"};function Aw(e,t,n){return Zn(e,Ao(t,n))}function Sa(e,t){return typeof e=="function"?e(t):e}function ja(e){return e.split("-")[0]}function eu(e){return e.split("-")[1]}function OC(e){return e==="x"?"y":"x"}function NC(e){return e==="y"?"height":"width"}function Eo(e){return["top","bottom"].includes(ja(e))?"y":"x"}function AC(e){return OC(Eo(e))}function dQ(e,t,n){n===void 0&&(n=!1);const r=eu(e),i=AC(e),a=NC(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=km(o)),[o,km(o)]}function fQ(e){const t=km(e);return[Ew(e),t,Ew(t)]}function Ew(e){return e.replace(/start|end/g,t=>uQ[t])}function hQ(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function pQ(e,t,n,r){const i=eu(e);let a=hQ(ja(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(Ew)))),a}function km(e){return e.replace(/left|right|bottom|top/g,t=>cQ[t])}function mQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function _4(e){return typeof e!="number"?mQ(e):{top:e,right:e,bottom:e,left:e}}function Mm(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function BE(e,t,n){let{reference:r,floating:i}=e;const a=Eo(t),o=AC(t),s=NC(o),c=ja(t),u=a==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[s]/2-i[s]/2;let p;switch(c){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(eu(t)){case"start":p[o]-=h*(n&&u?-1:1);break;case"end":p[o]+=h*(n&&u?-1:1);break}return p}const vQ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=BE(u,r,c),h=r,p={},v=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:u,padding:d=0}=Sa(e,t)||{};if(u==null)return{};const f=_4(d),h={x:n,y:r},p=AC(i),v=NC(p),m=await o.getDimensions(u),y=p==="y",x=y?"top":"left",b=y?"bottom":"right",w=y?"clientHeight":"clientWidth",C=a.reference[v]+a.reference[p]-h[p]-a.floating[v],S=h[p]-a.reference[p],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let P=j?j[w]:0;(!P||!await(o.isElement==null?void 0:o.isElement(j)))&&(P=s.floating[w]||a.floating[v]);const O=C/2-S/2,N=P/2-m[v]/2-1,A=Ao(f[x],N),_=Ao(f[b],N),E=A,k=P-m[v]-_,M=P/2-m[v]/2+O,$=Aw(E,M,k),D=!c.arrow&&eu(i)!=null&&M!==$&&a.reference[v]/2-(MM<=0)){var _,E;const M=(((_=a.flip)==null?void 0:_.index)||0)+1,$=P[M];if($)return{data:{index:M,overflows:A},reset:{placement:$}};let D=(E=A.filter(B=>B.overflows[0]<=0).sort((B,I)=>B.overflows[1]-I.overflows[1])[0])==null?void 0:E.placement;if(!D)switch(p){case"bestFit":{var k;const B=(k=A.filter(I=>{if(j){const R=Eo(I.placement);return R===b||R==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(R=>R>0).reduce((R,F)=>R+F,0)]).sort((I,R)=>I[1]-R[1])[0])==null?void 0:k[0];B&&(D=B);break}case"initialPlacement":D=s;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function UE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zE(e){return lQ.some(t=>e[t]>=0)}const xQ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Sa(e,t);switch(r){case"referenceHidden":{const a=await Jd(t,{...i,elementContext:"reference"}),o=UE(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:zE(o)}}}case"escaped":{const a=await Jd(t,{...i,altBoundary:!0}),o=UE(a,n.floating);return{data:{escapedOffsets:o,escaped:zE(o)}}}default:return{}}}}};async function bQ(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ja(n),s=eu(n),c=Eo(n)==="y",u=["left","top"].includes(o)?-1:1,d=a&&c?-1:1,f=Sa(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const wQ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,c=await bQ(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},SQ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x,y:b}=y;return{x,y:b}}},...c}=Sa(e,t),u={x:n,y:r},d=await Jd(t,c),f=Eo(ja(i)),h=OC(f);let p=u[h],v=u[f];if(a){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=p+d[y],w=p-d[x];p=Aw(b,p,w)}if(o){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",b=v+d[y],w=v-d[x];v=Aw(b,v,w)}const m=s.fn({...t,[h]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:a,[f]:o}}}}}},jQ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Sa(e,t),d={x:n,y:r},f=Eo(i),h=OC(f);let p=d[h],v=d[f];const m=Sa(s,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const w=h==="y"?"height":"width",C=a.reference[h]-a.floating[w]+y.mainAxis,S=a.reference[h]+a.reference[w]-y.mainAxis;pS&&(p=S)}if(u){var x,b;const w=h==="y"?"width":"height",C=["top","left"].includes(ja(i)),S=a.reference[f]-a.floating[w]+(C&&((x=o.offset)==null?void 0:x[f])||0)+(C?0:y.crossAxis),j=a.reference[f]+a.reference[w]+(C?0:((b=o.offset)==null?void 0:b[f])||0)-(C?y.crossAxis:0);vj&&(v=j)}return{[h]:p,[f]:v}}}},CQ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...u}=Sa(e,t),d=await Jd(t,u),f=ja(i),h=eu(i),p=Eo(i)==="y",{width:v,height:m}=a.floating;let y,x;f==="top"||f==="bottom"?(y=f,x=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(x=f,y=h==="end"?"top":"bottom");const b=m-d.top-d.bottom,w=v-d.left-d.right,C=Ao(m-d[y],b),S=Ao(v-d[x],w),j=!t.middlewareData.shift;let P=C,O=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=b),j&&!h){const A=Zn(d.left,0),_=Zn(d.right,0),E=Zn(d.top,0),k=Zn(d.bottom,0);p?O=v-2*(A!==0||_!==0?A+_:Zn(d.left,d.right)):P=m-2*(E!==0||k!==0?E+k:Zn(d.top,d.bottom))}await c({...t,availableWidth:O,availableHeight:P});const N=await o.getDimensions(s.floating);return v!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Eg(){return typeof window<"u"}function tu(e){return k4(e)?(e.nodeName||"").toLowerCase():"#document"}function or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ki(e){var t;return(t=(k4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function k4(e){return Eg()?e instanceof Node||e instanceof or(e).Node:!1}function si(e){return Eg()?e instanceof Element||e instanceof or(e).Element:!1}function Ri(e){return Eg()?e instanceof HTMLElement||e instanceof or(e).HTMLElement:!1}function VE(e){return!Eg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof or(e).ShadowRoot}function oh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=li(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function PQ(e){return["table","td","th"].includes(tu(e))}function Tg(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function EC(e){const t=TC(),n=si(e)?li(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function OQ(e){let t=To(e);for(;Ri(t)&&!fc(t);){if(EC(t))return t;if(Tg(t))return null;t=To(t)}return null}function TC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fc(e){return["html","body","#document"].includes(tu(e))}function li(e){return or(e).getComputedStyle(e)}function _g(e){return si(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function To(e){if(tu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||VE(e)&&e.host||Ki(e);return VE(t)?t.host:t}function M4(e){const t=To(e);return fc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ri(t)&&oh(t)?t:M4(t)}function Zd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=M4(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=or(i);if(a){const s=Tw(o);return t.concat(o,o.visualViewport||[],oh(i)?i:[],s&&n?Zd(s):[])}return t.concat(i,Zd(i,[],n))}function Tw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function R4(e){const t=li(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ri(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=_m(n)!==a||_m(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function _C(e){return si(e)?e:e.contextElement}function Rl(e){const t=_C(e);if(!Ri(t))return Ti(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=R4(t);let o=(a?_m(n.width):n.width)/r,s=(a?_m(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const NQ=Ti(0);function $4(e){const t=or(e);return!TC()||!t.visualViewport?NQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==or(e)?!1:t}function ks(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=_C(e);let o=Ti(1);t&&(r?si(r)&&(o=Rl(r)):o=Rl(e));const s=AQ(a,n,r)?$4(a):Ti(0);let c=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(a){const h=or(a),p=r&&si(r)?or(r):r;let v=h,m=Tw(v);for(;m&&r&&p!==v;){const y=Rl(m),x=m.getBoundingClientRect(),b=li(m),w=x.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,C=x.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=w,u+=C,v=or(m),m=Tw(v)}}return Mm({width:d,height:f,x:c,y:u})}function kC(e,t){const n=_g(e).scrollLeft;return t?t.left+n:ks(Ki(e)).left+n}function D4(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:kC(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function EQ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=Ki(r),s=t?Tg(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Ti(1);const d=Ti(0),f=Ri(r);if((f||!f&&!a)&&((tu(r)!=="body"||oh(o))&&(c=_g(r)),Ri(r))){const p=ks(r);u=Rl(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=o&&!f&&!a?D4(o,c,!0):Ti(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function TQ(e){return Array.from(e.getClientRects())}function _Q(e){const t=Ki(e),n=_g(e),r=e.ownerDocument.body,i=Zn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Zn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+kC(e);const s=-n.scrollTop;return li(r).direction==="rtl"&&(o+=Zn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function kQ(e,t){const n=or(e),r=Ki(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const u=TC();(!u||u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function MQ(e,t){const n=ks(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ri(e)?Rl(e):Ti(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,u=r*a.y;return{width:o,height:s,x:c,y:u}}function WE(e,t,n){let r;if(t==="viewport")r=kQ(e,n);else if(t==="document")r=_Q(Ki(e));else if(si(t))r=MQ(t,n);else{const i=$4(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Mm(r)}function I4(e,t){const n=To(e);return n===t||!si(n)||fc(n)?!1:li(n).position==="fixed"||I4(n,t)}function RQ(e,t){const n=t.get(e);if(n)return n;let r=Zd(e,[],!1).filter(s=>si(s)&&tu(s)!=="body"),i=null;const a=li(e).position==="fixed";let o=a?To(e):e;for(;si(o)&&!fc(o);){const s=li(o),c=EC(o);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||oh(o)&&!c&&I4(e,o))?r=r.filter(d=>d!==o):i=s,o=To(o)}return t.set(e,r),r}function $Q(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Tg(t)?[]:RQ(t,this._c):[].concat(n),r],s=o[0],c=o.reduce((u,d)=>{const f=WE(t,d,i);return u.top=Zn(f.top,u.top),u.right=Ao(f.right,u.right),u.bottom=Ao(f.bottom,u.bottom),u.left=Zn(f.left,u.left),u},WE(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function DQ(e){const{width:t,height:n}=R4(e);return{width:t,height:n}}function IQ(e,t,n){const r=Ri(t),i=Ki(t),a=n==="fixed",o=ks(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Ti(0);if(r||!r&&!a)if((tu(t)!=="body"||oh(i))&&(s=_g(t)),r){const h=ks(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&(c.x=kC(i));const u=i&&!r&&!a?D4(i,s):Ti(0),d=o.left+s.scrollLeft-c.x-u.x,f=o.top+s.scrollTop-c.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function ix(e){return li(e).position==="static"}function HE(e,t){if(!Ri(e)||li(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ki(e)===n&&(n=n.ownerDocument.body),n}function L4(e,t){const n=or(e);if(Tg(e))return n;if(!Ri(e)){let i=To(e);for(;i&&!fc(i);){if(si(i)&&!ix(i))return i;i=To(i)}return n}let r=HE(e,t);for(;r&&PQ(r)&&ix(r);)r=HE(r,t);return r&&fc(r)&&ix(r)&&!EC(r)?n:r||OQ(e)||n}const LQ=async function(e){const t=this.getOffsetParent||L4,n=this.getDimensions,r=await n(e.floating);return{reference:IQ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function FQ(e){return li(e).direction==="rtl"}const BQ={convertOffsetParentRelativeRectToViewportRelativeRect:EQ,getDocumentElement:Ki,getClippingRect:$Q,getOffsetParent:L4,getElementRects:LQ,getClientRects:TQ,getDimensions:DQ,getScale:Rl,isElement:si,isRTL:FQ};function UQ(e,t){let n=null,r;const i=Ki(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=Xh(d),v=Xh(i.clientWidth-(u+f)),m=Xh(i.clientHeight-(d+h)),y=Xh(u),b={rootMargin:-p+"px "+-v+"px "+-m+"px "+-y+"px",threshold:Zn(0,Ao(1,c))||1};let w=!0;function C(S){const j=S[0].intersectionRatio;if(j!==c){if(!w)return o();j?o(!1,j):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(C,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,b)}n.observe(e)}return o(!0),a}function zQ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=_C(e),d=i||a?[...u?Zd(u):[],...Zd(t)]:[];d.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const f=u&&s?UQ(u,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(x=>{let[b]=x;b&&b.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let v,m=c?ks(e):null;c&&y();function y(){const x=ks(e);m&&(x.x!==m.x||x.y!==m.y||x.width!==m.width||x.height!==m.height)&&n(),m=x,v=requestAnimationFrame(y)}return n(),()=>{var x;d.forEach(b=>{i&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),f==null||f(),(x=p)==null||x.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const VQ=wQ,WQ=SQ,HQ=yQ,KQ=CQ,qQ=xQ,KE=gQ,GQ=jQ,YQ=(e,t,n)=>{const r=new Map,i={platform:BQ,...n},a={...i.platform,_c:r};return vQ(e,t,{...i,platform:a})};var Fp=typeof document<"u"?g.useLayoutEffect:g.useEffect;function Rm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Rm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Rm(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function F4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qE(e,t){const n=F4(e);return Math.round(t*n)/n}function ax(e){const t=g.useRef(e);return Fp(()=>{t.current=e}),t}function XQ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,f]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=g.useState(r);Rm(h,r)||p(r);const[v,m]=g.useState(null),[y,x]=g.useState(null),b=g.useCallback(I=>{I!==j.current&&(j.current=I,m(I))},[]),w=g.useCallback(I=>{I!==P.current&&(P.current=I,x(I))},[]),C=a||v,S=o||y,j=g.useRef(null),P=g.useRef(null),O=g.useRef(d),N=c!=null,A=ax(c),_=ax(i),E=ax(u),k=g.useCallback(()=>{if(!j.current||!P.current)return;const I={placement:t,strategy:n,middleware:h};_.current&&(I.platform=_.current),YQ(j.current,P.current,I).then(R=>{const F={...R,isPositioned:E.current!==!1};M.current&&!Rm(O.current,F)&&(O.current=F,Wc.flushSync(()=>{f(F)}))})},[h,t,n,_,E]);Fp(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[u]);const M=g.useRef(!1);Fp(()=>(M.current=!0,()=>{M.current=!1}),[]),Fp(()=>{if(C&&(j.current=C),S&&(P.current=S),C&&S){if(A.current)return A.current(C,S,k);k()}},[C,S,k,A,N]);const $=g.useMemo(()=>({reference:j,floating:P,setReference:b,setFloating:w}),[b,w]),D=g.useMemo(()=>({reference:C,floating:S}),[C,S]),B=g.useMemo(()=>{const I={position:n,left:0,top:0};if(!D.floating)return I;const R=qE(D.floating,d.x),F=qE(D.floating,d.y);return s?{...I,transform:"translate("+R+"px, "+F+"px)",...F4(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:F}},[n,s,D.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:k,refs:$,elements:D,floatingStyles:B}),[d,k,$,D,B])}const QQ=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?KE({element:r.current,padding:i}).fn(n):{}:r?KE({element:r,padding:i}).fn(n):{}}}},JQ=(e,t)=>({...VQ(e),options:[e,t]}),ZQ=(e,t)=>({...WQ(e),options:[e,t]}),eJ=(e,t)=>({...GQ(e),options:[e,t]}),tJ=(e,t)=>({...HQ(e),options:[e,t]}),nJ=(e,t)=>({...KQ(e),options:[e,t]}),rJ=(e,t)=>({...qQ(e),options:[e,t]}),iJ=(e,t)=>({...QQ(e),options:[e,t]});var aJ="Arrow",B4=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return l.jsx(pe.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});B4.displayName=aJ;var oJ=B4;function U4(e){const[t,n]=g.useState(void 0);return qt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,s=u.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var MC="Popper",[z4,Do]=un(MC),[sJ,V4]=z4(MC),W4=e=>{const{__scopePopper:t,children:n}=e,[r,i]=g.useState(null);return l.jsx(sJ,{scope:t,anchor:r,onAnchorChange:i,children:n})};W4.displayName=MC;var H4="PopperAnchor",K4=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=V4(H4,n),o=g.useRef(null),s=_e(t,o);return g.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:l.jsx(pe.div,{...i,ref:s})});K4.displayName=H4;var RC="PopperContent",[lJ,cJ]=z4(RC),q4=g.forwardRef((e,t)=>{var q,se,X,Z,te,W;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:v,...m}=e,y=V4(RC,n),[x,b]=g.useState(null),w=_e(t,Se=>b(Se)),[C,S]=g.useState(null),j=U4(C),P=(j==null?void 0:j.width)??0,O=(j==null?void 0:j.height)??0,N=r+(a!=="center"?"-"+a:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},_=Array.isArray(u)?u:[u],E=_.length>0,k={padding:A,boundary:_.filter(dJ),altBoundary:E},{refs:M,floatingStyles:$,placement:D,isPositioned:B,middlewareData:I}=XQ({strategy:"fixed",placement:N,whileElementsMounted:(...Se)=>zQ(...Se,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[JQ({mainAxis:i+O,alignmentAxis:o}),c&&ZQ({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?eJ():void 0,...k}),c&&tJ({...k}),nJ({...k,apply:({elements:Se,rects:be,availableWidth:ze,availableHeight:He})=>{const{width:Xe,height:tn}=be.reference,dn=Se.floating.style;dn.setProperty("--radix-popper-available-width",`${ze}px`),dn.setProperty("--radix-popper-available-height",`${He}px`),dn.setProperty("--radix-popper-anchor-width",`${Xe}px`),dn.setProperty("--radix-popper-anchor-height",`${tn}px`)}}),C&&iJ({element:C,padding:s}),fJ({arrowWidth:P,arrowHeight:O}),h&&rJ({strategy:"referenceHidden",...k})]}),[R,F]=X4(D),z=Lt(v);qt(()=>{B&&(z==null||z())},[B,z]);const U=(q=I.arrow)==null?void 0:q.x,H=(se=I.arrow)==null?void 0:se.y,J=((X=I.arrow)==null?void 0:X.centerOffset)!==0,[ae,ee]=g.useState();return qt(()=>{x&&ee(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Z=I.transformOrigin)==null?void 0:Z.x,(te=I.transformOrigin)==null?void 0:te.y].join(" "),...((W=I.hide)==null?void 0:W.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(lJ,{scope:n,placedSide:R,onArrowChange:S,arrowX:U,arrowY:H,shouldHideArrow:J,children:l.jsx(pe.div,{"data-side":R,"data-align":F,...m,ref:w,style:{...m.style,animation:B?void 0:"none"}})})})});q4.displayName=RC;var G4="PopperArrow",uJ={top:"bottom",right:"left",bottom:"top",left:"right"},Y4=g.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=cJ(G4,r),o=uJ[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(oJ,{...i,ref:n,style:{...i.style,display:"block"}})})});Y4.displayName=G4;function dJ(e){return e!==null}var fJ=e=>({name:"transformOrigin",options:e,fn(t){var y,x,b;const{placement:n,rects:r,middlewareData:i}=t,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,s=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=X4(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((x=i.arrow)==null?void 0:x.x)??0)+s/2,p=(((b=i.arrow)==null?void 0:b.y)??0)+c/2;let v="",m="";return u==="bottom"?(v=o?f:`${h}px`,m=`${-c}px`):u==="top"?(v=o?f:`${h}px`,m=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,m=o?f:`${p}px`):u==="left"&&(v=`${r.floating.width+c}px`,m=o?f:`${p}px`),{data:{x:v,y:m}}}});function X4(e){const[t,n="center"]=e.split("-");return[t,n]}var kg=W4,Mg=K4,Rg=q4,$g=Y4,hJ="Portal",sh=g.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=g.useState(!1);qt(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?G$.createPortal(l.jsx(pe.div,{...r,ref:t}),o):null});sh.displayName=hJ;var ox="rovingFocusGroup.onEntryFocus",pJ={bubbles:!1,cancelable:!0},Dg="RovingFocusGroup",[_w,Q4,mJ]=yg(Dg),[vJ,Ig]=un(Dg,[mJ]),[gJ,yJ]=vJ(Dg),J4=g.forwardRef((e,t)=>l.jsx(_w.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(_w.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(xJ,{...e,ref:t})})}));J4.displayName=Dg;var xJ=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=g.useRef(null),p=_e(t,h),v=Qc(a),[m=null,y]=Mr({prop:o,defaultProp:s,onChange:c}),[x,b]=g.useState(!1),w=Lt(u),C=Q4(n),S=g.useRef(!1),[j,P]=g.useState(0);return g.useEffect(()=>{const O=h.current;if(O)return O.addEventListener(ox,w),()=>O.removeEventListener(ox,w)},[w]),l.jsx(gJ,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:m,onItemFocus:g.useCallback(O=>y(O),[y]),onItemShiftTab:g.useCallback(()=>b(!0),[]),onFocusableItemAdd:g.useCallback(()=>P(O=>O+1),[]),onFocusableItemRemove:g.useCallback(()=>P(O=>O-1),[]),children:l.jsx(pe.div,{tabIndex:x||j===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:ne(e.onMouseDown,()=>{S.current=!0}),onFocus:ne(e.onFocus,O=>{const N=!S.current;if(O.target===O.currentTarget&&N&&!x){const A=new CustomEvent(ox,pJ);if(O.currentTarget.dispatchEvent(A),!A.defaultPrevented){const _=C().filter(D=>D.focusable),E=_.find(D=>D.active),k=_.find(D=>D.id===m),$=[E,k,..._].filter(Boolean).map(D=>D.ref.current);tL($,d)}}S.current=!1}),onBlur:ne(e.onBlur,()=>b(!1))})})}),Z4="RovingFocusGroupItem",eL=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=ir(),c=a||s,u=yJ(Z4,n),d=u.currentTabStopId===c,f=Q4(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=u;return g.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),l.jsx(_w.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:l.jsx(pe.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:ne(e.onMouseDown,v=>{r?u.onItemFocus(c):v.preventDefault()}),onFocus:ne(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ne(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const m=SJ(v,u.orientation,u.dir);if(m!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=f().filter(b=>b.focusable).map(b=>b.ref.current);if(m==="last")x.reverse();else if(m==="prev"||m==="next"){m==="prev"&&x.reverse();const b=x.indexOf(v.currentTarget);x=u.loop?jJ(x,b+1):x.slice(b+1)}setTimeout(()=>tL(x))}})})})});eL.displayName=Z4;var bJ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wJ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function SJ(e,t,n){const r=wJ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return bJ[r]}function tL(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function jJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var nL=J4,rL=eL,CJ=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qs=new WeakMap,Qh=new WeakMap,Jh={},sx=0,iL=function(e){return e&&(e.host||iL(e.parentNode))},PJ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=iL(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},OJ=function(e,t,n,r){var i=PJ(t,Array.isArray(e)?e:[e]);Jh[n]||(Jh[n]=new WeakMap);var a=Jh[n],o=[],s=new Set,c=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))d(h);else try{var p=h.getAttribute(r),v=p!==null&&p!=="false",m=(Qs.get(h)||0)+1,y=(a.get(h)||0)+1;Qs.set(h,m),a.set(h,y),o.push(h),m===1&&v&&Qh.set(h,!0),y===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return d(t),s.clear(),sx++,function(){o.forEach(function(f){var h=Qs.get(f)-1,p=a.get(f)-1;Qs.set(f,h),a.set(f,p),h||(Qh.has(f)||f.removeAttribute(r),Qh.delete(f)),p||f.removeAttribute(n)}),sx--,sx||(Qs=new WeakMap,Qs=new WeakMap,Qh=new WeakMap,Jh={})}},$C=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=CJ(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),OJ(r,i,n,"aria-hidden")):function(){return null}},Si=function(){return Si=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return VJ;var t=WJ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},KJ=lL(),$l="data-scroll-locked",qJ=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(AJ,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body[`).concat($l,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(Bp,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Up,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Bp," .").concat(Bp,` { + right: 0 `).concat(r,`; + } + + .`).concat(Up," .").concat(Up,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat($l,`] { + `).concat(EJ,": ").concat(s,`px; + } +`)},YE=function(){var e=parseInt(document.body.getAttribute($l)||"0",10);return isFinite(e)?e:0},GJ=function(){g.useEffect(function(){return document.body.setAttribute($l,(YE()+1).toString()),function(){var e=YE()-1;e<=0?document.body.removeAttribute($l):document.body.setAttribute($l,e.toString())}},[])},YJ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;GJ();var a=g.useMemo(function(){return HJ(i)},[i]);return g.createElement(KJ,{styles:qJ(a,!t,i,n?"":"!important")})},kw=!1;if(typeof window<"u")try{var Zh=Object.defineProperty({},"passive",{get:function(){return kw=!0,!0}});window.addEventListener("test",Zh,Zh),window.removeEventListener("test",Zh,Zh)}catch{kw=!1}var Js=kw?{passive:!1}:!1,XJ=function(e){return e.tagName==="TEXTAREA"},cL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!XJ(e)&&n[t]==="visible")},QJ=function(e){return cL(e,"overflowY")},JJ=function(e){return cL(e,"overflowX")},XE=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=uL(e,r);if(i){var a=dL(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ZJ=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},eZ=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},uL=function(e,t){return e==="v"?QJ(t):JJ(t)},dL=function(e,t){return e==="v"?ZJ(t):eZ(t)},tZ=function(e,t){return e==="h"&&t==="rtl"?-1:1},nZ=function(e,t,n,r,i){var a=tZ(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),u=!1,d=o>0,f=0,h=0;do{var p=dL(e,s),v=p[0],m=p[1],y=p[2],x=m-y-a*v;(v||x)&&uL(e,s)&&(f+=x,h+=v),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(d&&(Math.abs(f)<1||!i)||!d&&(Math.abs(h)<1||!i))&&(u=!0),u},ep=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},QE=function(e){return[e.deltaX,e.deltaY]},JE=function(e){return e&&"current"in e?e.current:e},rZ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},iZ=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},aZ=0,Zs=[];function oZ(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(aZ++)[0],a=g.useState(lL)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=NJ([e.lockRef.current],(e.shards||[]).map(JE),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var x=ep(m),b=n.current,w="deltaX"in m?m.deltaX:b[0]-x[0],C="deltaY"in m?m.deltaY:b[1]-x[1],S,j=m.target,P=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in m&&P==="h"&&j.type==="range")return!1;var O=XE(P,j);if(!O)return!0;if(O?S=P:(S=P==="v"?"h":"v",O=XE(P,j)),!O)return!1;if(!r.current&&"changedTouches"in m&&(w||C)&&(r.current=S),!S)return!0;var N=r.current||S;return nZ(N,y,m,N==="h"?w:C,!0)},[]),c=g.useCallback(function(m){var y=m;if(!(!Zs.length||Zs[Zs.length-1]!==a)){var x="deltaY"in y?QE(y):ep(y),b=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&rZ(S.delta,x)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(JE).filter(Boolean).filter(function(S){return S.contains(y.target)}),C=w.length>0?s(y,w[0]):!o.current.noIsolation;C&&y.cancelable&&y.preventDefault()}}},[]),u=g.useCallback(function(m,y,x,b){var w={name:m,delta:y,target:x,should:b,shadowParent:sZ(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=g.useCallback(function(m){n.current=ep(m),r.current=void 0},[]),f=g.useCallback(function(m){u(m.type,QE(m),m.target,s(m,e.lockRef.current))},[]),h=g.useCallback(function(m){u(m.type,ep(m),m.target,s(m,e.lockRef.current))},[]);g.useEffect(function(){return Zs.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Js),document.addEventListener("touchmove",c,Js),document.addEventListener("touchstart",d,Js),function(){Zs=Zs.filter(function(m){return m!==a}),document.removeEventListener("wheel",c,Js),document.removeEventListener("touchmove",c,Js),document.removeEventListener("touchstart",d,Js)}},[]);var p=e.removeScrollBar,v=e.inert;return g.createElement(g.Fragment,null,v?g.createElement(a,{styles:iZ(i)}):null,p?g.createElement(YJ,{gapMode:e.gapMode}):null)}function sZ(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const lZ=DJ(sL,oZ);var Fg=g.forwardRef(function(e,t){return g.createElement(Lg,Si({},e,{ref:t,sideCar:lZ}))});Fg.classNames=Lg.classNames;var Mw=["Enter"," "],cZ=["ArrowDown","PageUp","Home"],fL=["ArrowUp","PageDown","End"],uZ=[...cZ,...fL],dZ={ltr:[...Mw,"ArrowRight"],rtl:[...Mw,"ArrowLeft"]},fZ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},lh="Menu",[ef,hZ,pZ]=yg(lh),[Ws,hL]=un(lh,[pZ,Do,Ig]),Bg=Do(),pL=Ig(),[mZ,Hs]=Ws(lh),[vZ,ch]=Ws(lh),mL=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Bg(t),[c,u]=g.useState(null),d=g.useRef(!1),f=Lt(a),h=Qc(i);return g.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),l.jsx(kg,{...s,children:l.jsx(mZ,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:l.jsx(vZ,{scope:t,onClose:g.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:o,children:r})})})};mL.displayName=lh;var gZ="MenuAnchor",DC=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Bg(n);return l.jsx(Mg,{...i,...r,ref:t})});DC.displayName=gZ;var IC="MenuPortal",[yZ,vL]=Ws(IC,{forceMount:void 0}),gL=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Hs(IC,t);return l.jsx(yZ,{scope:t,forceMount:n,children:l.jsx(Jt,{present:n||a.open,children:l.jsx(sh,{asChild:!0,container:i,children:r})})})};gL.displayName=IC;var Or="MenuContent",[xZ,LC]=Ws(Or),yL=g.forwardRef((e,t)=>{const n=vL(Or,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Hs(Or,e.__scopeMenu),o=ch(Or,e.__scopeMenu);return l.jsx(ef.Provider,{scope:e.__scopeMenu,children:l.jsx(Jt,{present:r||a.open,children:l.jsx(ef.Slot,{scope:e.__scopeMenu,children:o.modal?l.jsx(bZ,{...i,ref:t}):l.jsx(wZ,{...i,ref:t})})})})}),bZ=g.forwardRef((e,t)=>{const n=Hs(Or,e.__scopeMenu),r=g.useRef(null),i=_e(t,r);return g.useEffect(()=>{const a=r.current;if(a)return $C(a)},[]),l.jsx(FC,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ne(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),wZ=g.forwardRef((e,t)=>{const n=Hs(Or,e.__scopeMenu);return l.jsx(FC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),FC=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:v,...m}=e,y=Hs(Or,n),x=ch(Or,n),b=Bg(n),w=pL(n),C=hZ(n),[S,j]=g.useState(null),P=g.useRef(null),O=_e(t,P,y.onContentChange),N=g.useRef(0),A=g.useRef(""),_=g.useRef(0),E=g.useRef(null),k=g.useRef("right"),M=g.useRef(0),$=v?Fg:g.Fragment,D=v?{as:Po,allowPinchZoom:!0}:void 0,B=R=>{var q,se;const F=A.current+R,z=C().filter(X=>!X.disabled),U=document.activeElement,H=(q=z.find(X=>X.ref.current===U))==null?void 0:q.textValue,J=z.map(X=>X.textValue),ae=MZ(J,F,H),ee=(se=z.find(X=>X.textValue===ae))==null?void 0:se.ref.current;(function X(Z){A.current=Z,window.clearTimeout(N.current),Z!==""&&(N.current=window.setTimeout(()=>X(""),1e3))})(F),ee&&setTimeout(()=>ee.focus())};g.useEffect(()=>()=>window.clearTimeout(N.current),[]),PC();const I=g.useCallback(R=>{var z,U;return k.current===((z=E.current)==null?void 0:z.side)&&$Z(R,(U=E.current)==null?void 0:U.area)},[]);return l.jsx(xZ,{scope:n,searchRef:A,onItemEnter:g.useCallback(R=>{I(R)&&R.preventDefault()},[I]),onItemLeave:g.useCallback(R=>{var F;I(R)||((F=P.current)==null||F.focus(),j(null))},[I]),onTriggerLeave:g.useCallback(R=>{I(R)&&R.preventDefault()},[I]),pointerGraceTimerRef:_,onPointerGraceIntentChange:g.useCallback(R=>{E.current=R},[]),children:l.jsx($,{...D,children:l.jsx(Ag,{asChild:!0,trapped:i,onMountAutoFocus:ne(a,R=>{var F;R.preventDefault(),(F=P.current)==null||F.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:l.jsx(Zc,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:l.jsx(nL,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:j,onEntryFocus:ne(c,R=>{x.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Rg,{role:"menu","aria-orientation":"vertical","data-state":RL(y.open),"data-radix-menu-content":"",dir:x.dir,...b,...m,ref:O,style:{outline:"none",...m.style},onKeyDown:ne(m.onKeyDown,R=>{const z=R.target.closest("[data-radix-menu-content]")===R.currentTarget,U=R.ctrlKey||R.altKey||R.metaKey,H=R.key.length===1;z&&(R.key==="Tab"&&R.preventDefault(),!U&&H&&B(R.key));const J=P.current;if(R.target!==J||!uZ.includes(R.key))return;R.preventDefault();const ee=C().filter(q=>!q.disabled).map(q=>q.ref.current);fL.includes(R.key)&&ee.reverse(),_Z(ee)}),onBlur:ne(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(N.current),A.current="")}),onPointerMove:ne(e.onPointerMove,tf(R=>{const F=R.target,z=M.current!==R.clientX;if(R.currentTarget.contains(F)&&z){const U=R.clientX>M.current?"right":"left";k.current=U,M.current=R.clientX}}))})})})})})})});yL.displayName=Or;var SZ="MenuGroup",BC=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(pe.div,{role:"group",...r,ref:t})});BC.displayName=SZ;var jZ="MenuLabel",xL=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(pe.div,{...r,ref:t})});xL.displayName=jZ;var $m="MenuItem",ZE="menu.itemSelect",Ug=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=g.useRef(null),o=ch($m,e.__scopeMenu),s=LC($m,e.__scopeMenu),c=_e(t,a),u=g.useRef(!1),d=()=>{const f=a.current;if(!n&&f){const h=new CustomEvent(ZE,{bubbles:!0,cancelable:!0});f.addEventListener(ZE,p=>r==null?void 0:r(p),{once:!0}),MD(f,h),h.defaultPrevented?u.current=!1:o.onClose()}};return l.jsx(bL,{...i,ref:c,disabled:n,onClick:ne(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:ne(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:ne(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||Mw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Ug.displayName=$m;var bL=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=LC($m,n),s=pL(n),c=g.useRef(null),u=_e(t,c),[d,f]=g.useState(!1),[h,p]=g.useState("");return g.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[a.children]),l.jsx(ef.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:l.jsx(rL,{asChild:!0,...s,focusable:!r,children:l.jsx(pe.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:ne(e.onPointerMove,tf(v=>{r?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ne(e.onPointerLeave,tf(v=>o.onItemLeave(v))),onFocus:ne(e.onFocus,()=>f(!0)),onBlur:ne(e.onBlur,()=>f(!1))})})})}),CZ="MenuCheckboxItem",wL=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return l.jsx(OL,{scope:e.__scopeMenu,checked:n,children:l.jsx(Ug,{role:"menuitemcheckbox","aria-checked":Dm(n)?"mixed":n,...i,ref:t,"data-state":zC(n),onSelect:ne(i.onSelect,()=>r==null?void 0:r(Dm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});wL.displayName=CZ;var SL="MenuRadioGroup",[PZ,OZ]=Ws(SL,{value:void 0,onValueChange:()=>{}}),jL=g.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=Lt(r);return l.jsx(PZ,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(BC,{...i,ref:t})})});jL.displayName=SL;var CL="MenuRadioItem",PL=g.forwardRef((e,t)=>{const{value:n,...r}=e,i=OZ(CL,e.__scopeMenu),a=n===i.value;return l.jsx(OL,{scope:e.__scopeMenu,checked:a,children:l.jsx(Ug,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":zC(a),onSelect:ne(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});PL.displayName=CL;var UC="MenuItemIndicator",[OL,NZ]=Ws(UC,{checked:!1}),NL=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=NZ(UC,n);return l.jsx(Jt,{present:r||Dm(a.checked)||a.checked===!0,children:l.jsx(pe.span,{...i,ref:t,"data-state":zC(a.checked)})})});NL.displayName=UC;var AZ="MenuSeparator",AL=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(pe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});AL.displayName=AZ;var EZ="MenuArrow",EL=g.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Bg(n);return l.jsx($g,{...i,...r,ref:t})});EL.displayName=EZ;var TZ="MenuSub",[__e,TL]=Ws(TZ),Ju="MenuSubTrigger",_L=g.forwardRef((e,t)=>{const n=Hs(Ju,e.__scopeMenu),r=ch(Ju,e.__scopeMenu),i=TL(Ju,e.__scopeMenu),a=LC(Ju,e.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>d,[d]),g.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),c(null)}},[s,c]),l.jsx(DC,{asChild:!0,...u,children:l.jsx(bL,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":RL(n.open),...e,ref:gg(t,i.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ne(e.onPointerMove,tf(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ne(e.onPointerLeave,tf(f=>{var p,v;d();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const m=(v=n.content)==null?void 0:v.dataset.side,y=m==="right",x=y?-5:5,b=h[y?"left":"right"],w=h[y?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:m}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:ne(e.onKeyDown,f=>{var p;const h=a.searchRef.current!=="";e.disabled||h&&f.key===" "||dZ[r.dir].includes(f.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),f.preventDefault())})})})});_L.displayName=Ju;var kL="MenuSubContent",ML=g.forwardRef((e,t)=>{const n=vL(Or,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Hs(Or,e.__scopeMenu),o=ch(Or,e.__scopeMenu),s=TL(kL,e.__scopeMenu),c=g.useRef(null),u=_e(t,c);return l.jsx(ef.Provider,{scope:e.__scopeMenu,children:l.jsx(Jt,{present:r||a.open,children:l.jsx(ef.Slot,{scope:e.__scopeMenu,children:l.jsx(FC,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ne(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:ne(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:ne(e.onKeyDown,d=>{var p;const f=d.currentTarget.contains(d.target),h=fZ[o.dir].includes(d.key);f&&h&&(a.onOpenChange(!1),(p=s.trigger)==null||p.focus(),d.preventDefault())})})})})})});ML.displayName=kL;function RL(e){return e?"open":"closed"}function Dm(e){return e==="indeterminate"}function zC(e){return Dm(e)?"indeterminate":e?"checked":"unchecked"}function _Z(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function MZ(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=kZ(e,Math.max(a,0));i.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function RZ(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;ar!=d>r&&n<(u-s)*(r-c)/(d-c)+s&&(i=!i)}return i}function $Z(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return RZ(n,t)}function tf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var DZ=mL,IZ=DC,LZ=gL,FZ=yL,BZ=BC,UZ=xL,zZ=Ug,VZ=wL,WZ=jL,HZ=PL,KZ=NL,qZ=AL,GZ=EL,YZ=_L,XZ=ML,VC="DropdownMenu",[QZ,k_e]=un(VC,[hL]),Rn=hL(),[JZ,$L]=QZ(VC),DL=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Rn(t),u=g.useRef(null),[d=!1,f]=Mr({prop:i,defaultProp:a,onChange:o});return l.jsx(JZ,{scope:t,triggerId:ir(),triggerRef:u,contentId:ir(),open:d,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(h=>!h),[f]),modal:s,children:l.jsx(DZ,{...c,open:d,onOpenChange:f,dir:r,modal:s,children:n})})};DL.displayName=VC;var IL="DropdownMenuTrigger",LL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=$L(IL,n),o=Rn(n);return l.jsx(IZ,{asChild:!0,...o,children:l.jsx(pe.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:gg(t,a.triggerRef),onPointerDown:ne(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:ne(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});LL.displayName=IL;var ZZ="DropdownMenuPortal",FL=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Rn(t);return l.jsx(LZ,{...r,...n})};FL.displayName=ZZ;var BL="DropdownMenuContent",UL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$L(BL,n),a=Rn(n),o=g.useRef(!1);return l.jsx(FZ,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:ne(e.onCloseAutoFocus,s=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:ne(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!i.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});UL.displayName=BL;var eee="DropdownMenuGroup",tee=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(BZ,{...i,...r,ref:t})});tee.displayName=eee;var nee="DropdownMenuLabel",zL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(UZ,{...i,...r,ref:t})});zL.displayName=nee;var ree="DropdownMenuItem",VL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(zZ,{...i,...r,ref:t})});VL.displayName=ree;var iee="DropdownMenuCheckboxItem",WL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(VZ,{...i,...r,ref:t})});WL.displayName=iee;var aee="DropdownMenuRadioGroup",oee=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(WZ,{...i,...r,ref:t})});oee.displayName=aee;var see="DropdownMenuRadioItem",HL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(HZ,{...i,...r,ref:t})});HL.displayName=see;var lee="DropdownMenuItemIndicator",KL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(KZ,{...i,...r,ref:t})});KL.displayName=lee;var cee="DropdownMenuSeparator",qL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(qZ,{...i,...r,ref:t})});qL.displayName=cee;var uee="DropdownMenuArrow",dee=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(GZ,{...i,...r,ref:t})});dee.displayName=uee;var fee="DropdownMenuSubTrigger",GL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(YZ,{...i,...r,ref:t})});GL.displayName=fee;var hee="DropdownMenuSubContent",YL=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rn(n);return l.jsx(XZ,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});YL.displayName=hee;var pee=DL,mee=LL,vee=FL,XL=UL,QL=zL,JL=VL,ZL=WL,eF=HL,tF=KL,nF=qL,rF=GL,iF=YL;const nf=pee,rf=mee,gee=g.forwardRef(({className:e,inset:t,children:n,...r},i)=>l.jsxs(rF,{ref:i,className:le("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,l.jsx(wm,{className:"ml-auto"})]}));gee.displayName=rF.displayName;const yee=g.forwardRef(({className:e,...t},n)=>l.jsx(iF,{ref:n,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));yee.displayName=iF.displayName;const hc=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(vee,{children:l.jsx(XL,{ref:r,sideOffset:t,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));hc.displayName=XL.displayName;const gn=g.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(JL,{ref:r,className:le("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));gn.displayName=JL.displayName;const xee=g.forwardRef(({className:e,children:t,checked:n,...r},i)=>l.jsxs(ZL,{ref:i,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(tF,{children:l.jsx(Yc,{className:"h-4 w-4"})})}),t]}));xee.displayName=ZL.displayName;const bee=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(eF,{ref:r,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(tF,{children:l.jsx(E9,{className:"h-2 w-2 fill-current"})})}),t]}));bee.displayName=eF.displayName;const zg=g.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(QL,{ref:r,className:le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));zg.displayName=QL.displayName;const WC=g.forwardRef(({className:e,...t},n)=>l.jsx(nF,{ref:n,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));WC.displayName=nF.displayName;var HC="Avatar",[wee,M_e]=un(HC),[See,aF]=wee(HC),oF=g.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=g.useState("idle");return l.jsx(See,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:l.jsx(pe.span,{...r,ref:t})})});oF.displayName=HC;var sF="AvatarImage",lF=g.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=aF(sF,n),s=jee(r,a.referrerPolicy),c=Lt(u=>{i(u),o.onImageLoadingStatusChange(u)});return qt(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?l.jsx(pe.img,{...a,ref:t,src:r}):null});lF.displayName=sF;var cF="AvatarFallback",uF=g.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=aF(cF,n),[o,s]=g.useState(r===void 0);return g.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(c)}},[r]),o&&a.imageLoadingStatus!=="loaded"?l.jsx(pe.span,{...i,ref:t}):null});uF.displayName=cF;function jee(e,t){const[n,r]=g.useState("idle");return qt(()=>{if(!e){r("error");return}let i=!0;const a=new window.Image,o=s=>()=>{i&&r(s)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var dF=oF,fF=lF,hF=uF;const Vg=g.forwardRef(({className:e,...t},n)=>l.jsx(dF,{ref:n,className:le("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Vg.displayName=dF.displayName;const KC=g.forwardRef(({className:e,...t},n)=>l.jsx(fF,{ref:n,className:le("aspect-square h-full w-full",e),...t}));KC.displayName=fF.displayName;const Wg=g.forwardRef(({className:e,...t},n)=>l.jsx(hF,{ref:n,className:le("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Wg.displayName=hF.displayName;var Cee="Separator",e2="horizontal",Pee=["horizontal","vertical"],pF=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=e2,...i}=e,a=Oee(r)?r:e2,s=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return l.jsx(pe.div,{"data-orientation":a,...s,...i,ref:t})});pF.displayName=Cee;function Oee(e){return Pee.includes(e)}var mF=pF;const Rw=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},i)=>l.jsx(mF,{ref:i,decorative:n,orientation:t,className:le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Rw.displayName=mF.displayName;const Nee=wg("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Pt({className:e,variant:t,...n}){return l.jsx("div",{className:le(Nee({variant:t}),e),...n})}function Aee(){const[e,t]=g.useState(0);return g.useEffect(()=>{const n=setTimeout(()=>{t(100)},100);return()=>clearTimeout(n)},[]),l.jsxs("div",{className:"fixed inset-0 bg-neutral-950 z-50 flex flex-col items-center justify-center",children:[l.jsx("div",{className:"fixed top-0 left-0 w-full h-0.5 bg-neutral-900",children:l.jsx("div",{className:"h-full bg-white transition-all duration-1000 ease-out",style:{width:`${e}%`}})}),l.jsxs("div",{className:"flex flex-col items-center gap-8",children:[l.jsx(Ni,{className:"h-10 w-10 text-white animate-spin"}),l.jsx("div",{className:"font-mono text-xs text-neutral-500",children:"Prism 0.5.0-alpha2 (Adelante)"})]})]})}function Eee({children:e}){const[t,n]=g.useState(!0),[r,i]=g.useState(0);g.useEffect(()=>{const o=setInterval(()=>{i(c=>c<100?c+10:100)},60),s=setTimeout(()=>{n(!1),clearInterval(o)},600);return()=>{clearTimeout(s),clearInterval(o)}},[]);const a={initial:{opacity:0,y:40,scale:.98,filter:"blur(12px)"},animate:{opacity:1,y:0,scale:1,filter:"blur(0px)",transition:{type:"spring",stiffness:120,damping:18,mass:1.1,duration:.3}},exit:{opacity:0,y:-40,scale:.98,filter:"blur(12px)",transition:{duration:.15}}};return l.jsx("div",{className:"relative w-full min-h-[200px]",children:l.jsx(N4,{mode:"wait",children:t?l.jsxs("div",{className:"fixed inset-0 bg-transparent z-50 flex flex-col items-center justify-center",children:[l.jsx("div",{className:"fixed top-0 left-0 w-full h-0.5 bg-neutral-900",children:l.jsx("div",{className:"h-full bg-white transition-all duration-1000 ease-out",style:{width:`${r}%`}})}),l.jsx(Ni,{className:"h-10 w-10 text-white animate-spin"})]}):l.jsx(zX.div,{initial:"initial",animate:"animate",exit:"exit",variants:a,className:"w-full",style:{transformOrigin:"center",willChange:"transform, opacity, filter"},children:e},"content")})})}function Tee(){var k;const[e,t]=g.useState(!0),[n,r]=g.useState(!1),[i,a]=g.useState(0),[o,s]=g.useState({username:"",id:""}),[c,u]=g.useState({name:"",status:"offline",ip:"",port:""}),[d,f]=g.useState(0),h=5,p=5e3,v=Us(),m=qc(),{id:y}=Hi(),x=m.pathname.includes("/server/"),b=m.pathname.includes("/admin/"),w=g.useRef(null),C=g.useRef(!0),S=async()=>{try{const M=await fetch("/api/user/logout",{method:"POST",headers:{"Content-Type":"application/json"}});M.ok?v("/auth"):console.error("Logout failed:",await M.text())}catch(M){console.error("Logout error:",M)}},j=M=>{var $;if(C.current)try{const D=JSON.parse(M.data);switch(D.event){case"auth success":($=w.current)==null||$.send(JSON.stringify({event:"send stats",args:[null]}));break;case"status":u(B=>({...B,status:D.args[0]}));break}}catch(D){console.error("WebSocket message handling error:",D)}};g.useEffect(()=>{C.current=!0;const M=async()=>{if(!(!y||!C.current))try{const D=await(await fetch(`/api/server/${y}/websocket`)).json(),B=new WebSocket(D.data.socket);B.onopen=()=>{if(!C.current){B.close();return}console.log("WebSocket connected"),f(0),B.send(JSON.stringify({event:"auth",args:[D.data.token]}))},B.onmessage=j,B.onclose=()=>{C.current&&(console.log("WebSocket disconnected"),d{C.current&&(f(I=>I+1),M())},p))},B.onerror=I=>{console.error("WebSocket error:",I)},w.current=B}catch($){console.error("WebSocket connection error:",$)}};return M(),()=>{C.current=!1,w.current&&(w.current.close(),w.current=null)}},[y,d]),g.useEffect(()=>{const M=async()=>{try{const z=await(await fetch("/api/admin")).json();r(z.admin===!0)}catch(F){console.error("Failed to check admin status:",F),r(!1)}};M();const $=setInterval(M,3e4),D=async()=>{try{const z=await(await fetch("/api/user")).json();s(z)}catch(F){console.error("Failed to fetch user data:",F),s({username:"User",id:"00000"})}},B=async()=>{try{const z=await(await fetch("/api/coins")).json();a(z.coins)}catch(F){console.error("Failed to fetch coins balance:",F),a(0)}};setInterval(B,3e3);const I=async()=>{var F,z,U,H,J,ae,ee,q,se,X;if(y)try{const te=await(await fetch(`/api/server/${y}`)).json();u({name:te.attributes.name,status:te.attributes.status,ip:(J=(H=(U=(z=(F=te.attributes.relationships)==null?void 0:F.allocations)==null?void 0:z.data)==null?void 0:U[0])==null?void 0:H.attributes)==null?void 0:J.ip_alias,port:(X=(se=(q=(ee=(ae=te.attributes.relationships)==null?void 0:ae.allocations)==null?void 0:ee.data)==null?void 0:q[0])==null?void 0:se.attributes)==null?void 0:X.port})}catch(Z){console.error("Failed to fetch server info:",Z)}},R=setTimeout(()=>{t(!1)},1500);return D(),B(),I(),()=>{clearTimeout(R),clearInterval($)}},[y]);const P=M=>{var $;(($=w.current)==null?void 0:$.readyState)===WebSocket.OPEN&&w.current.send(JSON.stringify({event:"set state",args:[M]}))},O=M=>{switch(M==null?void 0:M.toLowerCase()){case"running":return"success";case"starting":case"stopping":return"warning";case"offline":case"stopped":return"secondary";default:return"secondary"}},N=[{icon:l.jsx(G9,{className:"w-4 h-4"}),label:"Overview",path:`/server/${y}/overview`},{icon:l.jsx(mg,{className:"w-4 h-4"}),label:"Console",path:`/server/${y}/console`},{icon:l.jsx(B9,{className:"w-4 h-4"}),label:"Files",path:`/server/${y}/files`},{icon:l.jsx(U9,{className:"w-4 h-4"}),label:"Network",path:`/server/${y}/network`},{icon:l.jsx(ow,{className:"w-4 h-4"}),label:"Users",path:`/server/${y}/users`},{icon:l.jsx(ys,{className:"w-4 h-4"}),label:"Backups",path:`/server/${y}/backups`},{icon:l.jsx(cA,{className:"w-4 h-4"}),label:"Settings",path:`/server/${y}/settings`}],A=[{icon:l.jsx(P9,{className:"w-4 h-4"}),label:"Plugins",path:`/server/${y}/plugins`},{icon:l.jsx(eH,{className:"w-4 h-4"}),label:"Players",path:`/server/${y}/players`}],_=[{icon:l.jsx(nH,{className:"w-4 h-4"}),label:"Overview",path:"/admin/overview"},{icon:l.jsx(fd,{className:"w-4 h-4"}),label:"Users",path:"/admin/users"},{icon:l.jsx(uH,{className:"w-4 h-4"}),label:"Nodes",path:"/admin/nodes"},{icon:l.jsx(tH,{className:"w-4 h-4"}),label:"Radar",path:"/admin/radar"},{icon:l.jsx(oH,{className:"w-4 h-4"}),label:"Tickets",path:"/admin/tickets"}],E=M=>m.pathname===M;return e?l.jsx(Aee,{}):l.jsxs("div",{className:"min-h-screen bg-neutral-950",children:[l.jsx("style",{jsx:!0,global:!0,children:` + * { + --removed-focus-outline: none !important; + } + `}),l.jsx("header",{className:"sticky top-0 z-50 w-full border-b border-neutral-800 bg-neutral-900/95 backdrop-blur supports-[backdrop-filter]:bg-neutral-900/60",children:l.jsxs("div",{className:"flex h-14 items-center px-4",children:[l.jsxs("div",{className:"flex items-center gap-4 mr-4",children:[l.jsx(Br,{to:"/dashboard",className:"flex items-center gap-2 text-neutral-400 hover:text-white transition-colors",children:l.jsx("img",{src:"https://i.imgur.com/TinuetS.png",alt:"Logo",className:"w-6 h-6 ml-1.5"})}),l.jsx(Rw,{orientation:"vertical",className:"h-6 bg-neutral-800"})]}),l.jsxs("nav",{className:"flex items-center space-x-2",children:[l.jsx(V,{variant:m.pathname==="/dashboard"?"secondary":"ghost",size:"sm",className:`${m.pathname==="/dashboard"?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Br,{to:"/dashboard",className:"flex items-center gap-2",children:[l.jsx(V9,{className:"w-4 h-4"}),l.jsx("span",{children:"Dashboard"})]})}),l.jsx(V,{variant:m.pathname==="/account"?"secondary":"ghost",size:"sm",className:`${m.pathname==="/account"?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Br,{to:"/account",className:"flex items-center gap-2",children:[l.jsx(ow,{className:"w-4 h-4"}),l.jsx("span",{children:"Account"})]})}),l.jsx(V,{variant:m.pathname==="/referrals"?"secondary":"ghost",size:"sm",className:`${m.pathname==="/referrals"?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Br,{to:"/referrals",className:"flex items-center gap-2",children:[l.jsx(aH,{className:"w-4 h-4"}),l.jsx("span",{children:"Referrals"})]})}),l.jsx(V,{variant:m.pathname==="/tickets"?"secondary":"ghost",size:"sm",className:`${m.pathname==="/tickets"?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Br,{to:"/tickets",className:"flex items-center gap-2",children:[l.jsx(K9,{className:"w-4 h-4"}),l.jsx("span",{children:"Support"})]})}),n&&l.jsx(V,{variant:m.pathname.startsWith("/admin/")?"secondary":"ghost",size:"sm",className:`${m.pathname.startsWith("/admin/")?"":"text-neutral-400"} focus:ring-0 focus-visible:ring-0 pl-4 focus-visible:ring-offset-0`,asChild:!0,children:l.jsxs(Br,{to:"/admin/overview",className:"flex items-center gap-2",children:[l.jsx(cA,{className:"w-4 h-4"}),l.jsx("span",{children:"Admin"})]})})]}),l.jsxs("div",{className:"flex items-center ml-auto gap-4",children:[l.jsxs("div",{className:"relative group",children:[l.jsxs(V,{variant:"ghost",size:"sm",className:"flex items-center gap-2 text-neutral-400 focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 group-hover:bg-neutral-800/50",children:[l.jsx(hg,{className:"w-4 h-4"}),l.jsxs("span",{className:"text-sm",children:[i.toFixed(2)," coins"]})]}),l.jsx("div",{className:"absolute right-0 w-72 mt-1 invisible translate-y-4 opacity-0 group-hover:visible group-hover:translate-y-0 group-hover:opacity-100 transition-all duration-300 ease-[cubic-bezier(0.26,1.05,0.7,1)]",children:l.jsxs("div",{className:"bg-neutral-900 border border-neutral-800 rounded-md shadow-lg p-2",children:[l.jsxs(Br,{to:"/coins/afk",className:"flex items-start gap-3 p-3 rounded-md hover:bg-neutral-800/50 transition-colors duration-200",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-800/75 flex items-center justify-center",children:l.jsx(k9,{className:"w-5 h-5 text-neutral-400"})})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium text-neutral-200",children:"AFK Page"}),l.jsx("p",{className:"text-xs text-neutral-400 mt-0.5",children:"Earn coins while being AFK"})]})]}),l.jsxs(Br,{to:"/coins/store",className:"flex items-start gap-3 p-3 mt-1 rounded-md hover:bg-neutral-800/50 transition-colors duration-200",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-800/75 flex items-center justify-center",children:l.jsx(iH,{className:"w-5 h-5 text-neutral-400"})})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium text-neutral-200",children:"Resources Store"}),l.jsx("p",{className:"text-xs text-neutral-400 mt-0.5",children:"Buy resources with your coins"})]})]})]})})]}),l.jsx(Rw,{orientation:"vertical",className:"h-6 bg-neutral-800"}),l.jsxs(nf,{children:[l.jsx(rf,{asChild:!0,children:l.jsxs(V,{variant:"ghost",size:"sm",className:"flex items-center gap-2 text-neutral-400 focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0",children:[l.jsxs(Vg,{className:"h-6 w-6",children:[l.jsx(KC,{src:"https://i.imgur.com/J4jb4zO.png"}),l.jsx(Wg,{children:"U"})]}),l.jsx("span",{className:"hidden lg:inline",children:o.username}),n&&l.jsx(Pt,{variant:"secondary",className:"ml-1 text-xs bg-white/10 hover:bg-white/20",children:"Admin"}),l.jsx(fg,{className:"w-4 h-4"})]})}),l.jsxs(hc,{align:"end",className:"w-56 bg-neutral-900 border-neutral-800",children:[l.jsxs(zg,{className:"text-neutral-400 text-xs font-mono",children:["User ",o.id]}),l.jsx(WC,{className:"bg-neutral-800"}),l.jsxs(gn,{className:"text-neutral-400 hover:text-white focus:text-white cursor-pointer focus:bg-neutral-800 hover:bg-neutral-800",children:[l.jsx(jD,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:"Settings"})]}),l.jsxs(gn,{className:"cursor-pointer text-red-500 hover:text-red-400 focus:text-red-400 focus:bg-neutral-800 hover:bg-neutral-800",onClick:S,children:[l.jsx(W9,{className:"mr-2 h-4 w-4"}),l.jsx("span",{children:"Log out"})]})]})]})]})]})}),l.jsxs("div",{className:"flex",children:[x&&l.jsx("aside",{className:"w-64 min-h-[calc(100vh-3.5rem)] bg-neutral-900/20 border-r border-neutral-800/20",children:l.jsxs("div",{className:"p-4",children:[l.jsxs(V,{variant:"ghost",size:"sm",className:"w-full justify-start text-neutral-400 hover:text-white mb-4",onClick:()=>v("/dashboard"),children:[l.jsx(sA,{className:"w-4 h-4 mr-2"}),"Back to Dashboard"]}),l.jsxs(me,{className:"p-4 mb-4 bg-neutral-900/40 border-neutral-800/40",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ba,{className:"w-4 h-4 text-neutral-400"}),l.jsx("span",{className:"font-medium text-sm text-white",children:c.name})]}),l.jsxs(nf,{children:[l.jsx(rf,{asChild:!0,children:l.jsx(V,{variant:"ghost",size:"icon",className:"h-8 w-8",children:l.jsx(Tj,{className:"w-4 h-4"})})}),l.jsxs(hc,{align:"end",className:"w-40 bg-neutral-900 border-neutral-800",children:[l.jsxs(gn,{className:"text-neutral-400 hover:text-white cursor-pointer",onClick:()=>P("start"),disabled:["starting","running"].includes(c.status),children:[l.jsx(wD,{className:"w-4 h-4 mr-2"}),"Start"]}),l.jsxs(gn,{className:"text-neutral-400 hover:text-white cursor-pointer",onClick:()=>P("restart"),disabled:!["running"].includes(c.status),children:[l.jsx(SD,{className:"w-4 h-4 mr-2"}),"Restart"]}),l.jsxs(gn,{className:"text-neutral-400 hover:text-white cursor-pointer",onClick:()=>P("stop"),disabled:!["running"].includes(c.status),children:[l.jsx(PD,{className:"w-4 h-4 mr-2"}),"Stop"]})]})]})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx(Pt,{variant:O(c.status),className:"mb-2",children:(k=c.status)==null?void 0:k.toUpperCase()}),l.jsxs("p",{className:"text-xs text-neutral-400",children:[c.ip,":",c.port]})]})]}),l.jsx("div",{className:"space-y-1",children:N.map(M=>l.jsx(V,{variant:E(M.path)?"secondary":"ghost",size:"sm",className:`w-full justify-start ${E(M.path)?"":"text-neutral-400"}`,asChild:!0,children:l.jsxs(Br,{to:M.path,className:"flex items-center gap-2",children:[M.icon,l.jsx("span",{children:M.label})]})},M.label))}),l.jsxs("div",{className:"mt-4",children:[l.jsx("h3",{className:"text-xs font-medium text-neutral-500 mb-2 px-2",children:"More"}),l.jsx("div",{className:"space-y-1",children:A.map(M=>l.jsx(V,{variant:E(M.path)?"secondary":"ghost",size:"sm",className:`w-full justify-start ${E(M.path)?"":"text-neutral-400"}`,asChild:!0,children:l.jsxs(Br,{to:M.path,className:"flex items-center gap-2",children:[M.icon,l.jsx("span",{children:M.label})]})},M.label))})]})]})}),b&&l.jsx("aside",{className:"w-64 min-h-[calc(100vh-3.5rem)] bg-neutral-900/20 border-r border-neutral-800/20",children:l.jsxs("div",{className:"p-4",children:[l.jsxs(V,{variant:"ghost",size:"sm",className:"w-full justify-start text-neutral-400 hover:text-white mb-4",onClick:()=>v("/dashboard"),children:[l.jsx(sA,{className:"w-4 h-4 mr-2"}),"Back to Dashboard"]}),l.jsx("nav",{className:"space-y-2",children:_.map(M=>l.jsx(V,{variant:E(M.path)?"secondary":"ghost",size:"sm",className:`w-full justify-start ${E(M.path)?"":"text-neutral-400"}`,asChild:!0,children:l.jsxs(Br,{to:M.path,className:"flex items-center gap-2",children:[M.icon,l.jsx("span",{children:M.label})]})},M.label))})]})}),l.jsx(N4,{mode:"wait",children:l.jsx("main",{className:`flex-1 ${x||b?"max-w-[calc(100%-16rem)]":"max-w-7xl mx-auto"} px-4 sm:px-6 lg:px-8 py-6 text-white`,children:l.jsx(Eee,{children:l.jsx(A7,{})},m.pathname)})})]})]})}var _ee=Array.isArray,Hn=_ee,kee=typeof Oh=="object"&&Oh&&Oh.Object===Object&&Oh,vF=kee,Mee=vF,Ree=typeof self=="object"&&self&&self.Object===Object&&self,$ee=Mee||Ree||Function("return this")(),qi=$ee,Dee=qi,Iee=Dee.Symbol,uh=Iee,t2=uh,gF=Object.prototype,Lee=gF.hasOwnProperty,Fee=gF.toString,Mu=t2?t2.toStringTag:void 0;function Bee(e){var t=Lee.call(e,Mu),n=e[Mu];try{e[Mu]=void 0;var r=!0}catch{}var i=Fee.call(e);return r&&(t?e[Mu]=n:delete e[Mu]),i}var Uee=Bee,zee=Object.prototype,Vee=zee.toString;function Wee(e){return Vee.call(e)}var Hee=Wee,n2=uh,Kee=Uee,qee=Hee,Gee="[object Null]",Yee="[object Undefined]",r2=n2?n2.toStringTag:void 0;function Xee(e){return e==null?e===void 0?Yee:Gee:r2&&r2 in Object(e)?Kee(e):qee(e)}var Ta=Xee;function Qee(e){return e!=null&&typeof e=="object"}var _a=Qee,Jee=Ta,Zee=_a,ete="[object Symbol]";function tte(e){return typeof e=="symbol"||Zee(e)&&Jee(e)==ete}var nu=tte,nte=Hn,rte=nu,ite=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ate=/^\w*$/;function ote(e,t){if(nte(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||rte(e)?!0:ate.test(e)||!ite.test(e)||t!=null&&e in Object(t)}var qC=ote;function ste(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Io=ste;const ru=Ze(Io);var lte=Ta,cte=Io,ute="[object AsyncFunction]",dte="[object Function]",fte="[object GeneratorFunction]",hte="[object Proxy]";function pte(e){if(!cte(e))return!1;var t=lte(e);return t==dte||t==fte||t==ute||t==hte}var GC=pte;const Re=Ze(GC);var mte=qi,vte=mte["__core-js_shared__"],gte=vte,dx=gte,i2=function(){var e=/[^.]+$/.exec(dx&&dx.keys&&dx.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function yte(e){return!!i2&&i2 in e}var xte=yte,bte=Function.prototype,wte=bte.toString;function Ste(e){if(e!=null){try{return wte.call(e)}catch{}try{return e+""}catch{}}return""}var yF=Ste,jte=GC,Cte=xte,Pte=Io,Ote=yF,Nte=/[\\^$.*+?()[\]{}|]/g,Ate=/^\[object .+?Constructor\]$/,Ete=Function.prototype,Tte=Object.prototype,_te=Ete.toString,kte=Tte.hasOwnProperty,Mte=RegExp("^"+_te.call(kte).replace(Nte,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Rte(e){if(!Pte(e)||Cte(e))return!1;var t=jte(e)?Mte:Ate;return t.test(Ote(e))}var $te=Rte;function Dte(e,t){return e==null?void 0:e[t]}var Ite=Dte,Lte=$te,Fte=Ite;function Bte(e,t){var n=Fte(e,t);return Lte(n)?n:void 0}var Ks=Bte,Ute=Ks,zte=Ute(Object,"create"),Hg=zte,a2=Hg;function Vte(){this.__data__=a2?a2(null):{},this.size=0}var Wte=Vte;function Hte(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Kte=Hte,qte=Hg,Gte="__lodash_hash_undefined__",Yte=Object.prototype,Xte=Yte.hasOwnProperty;function Qte(e){var t=this.__data__;if(qte){var n=t[e];return n===Gte?void 0:n}return Xte.call(t,e)?t[e]:void 0}var Jte=Qte,Zte=Hg,ene=Object.prototype,tne=ene.hasOwnProperty;function nne(e){var t=this.__data__;return Zte?t[e]!==void 0:tne.call(t,e)}var rne=nne,ine=Hg,ane="__lodash_hash_undefined__";function one(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ine&&t===void 0?ane:t,this}var sne=one,lne=Wte,cne=Kte,une=Jte,dne=rne,fne=sne;function iu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Ene=Ane,Tne=Kg;function _ne(e,t){var n=this.__data__,r=Tne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var kne=_ne,Mne=mne,Rne=jne,$ne=One,Dne=Ene,Ine=kne;function au(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},rs=function(t){return dh(t)&&t.indexOf("%")===t.length-1},oe=function(t){return aie(t)&&!su(t)},Ht=function(t){return oe(t)||dh(t)},cie=0,lu=function(t){var n=++cie;return"".concat(t||"").concat(n)},Ms=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!oe(t)&&!dh(t))return r;var a;if(rs(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return su(a)&&(a=r),i&&a>n&&(a=n),a},il=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},uie=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Dw(e){"@babel/helpers - typeof";return Dw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dw(e)}var f2={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},fa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},h2=null,hx=null,iP=function e(t){if(t===h2&&Array.isArray(hx))return hx;var n=[];return g.Children.forEach(t,function(r){De(r)||(eie.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),hx=n,h2=t,n};function Ar(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return fa(i)}):r=[fa(t)],iP(e).forEach(function(i){var a=Nr(i,"type.displayName")||Nr(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function Qn(e,t){var n=Ar(e,t);return n[0]}var p2=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!oe(r)||r<=0||!oe(i)||i<=0)},gie=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],yie=function(t){return t&&t.type&&dh(t.type)&&gie.indexOf(t.type)>=0},AF=function(t){return t&&Dw(t)==="object"&&"clipDot"in t},xie=function(t,n,r,i){var a,o=(a=fx==null?void 0:fx[i])!==null&&a!==void 0?a:[];return!Re(t)&&(i&&o.includes(n)||fie.includes(n))||r&&rP.includes(n)},Me=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(g.isValidElement(t)&&(i=t.props),!ru(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;xie((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},Iw=function e(t,n){if(t===n)return!0;var r=g.Children.count(t);if(r!==g.Children.count(n))return!1;if(r===0)return!0;if(r===1)return m2(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Fw(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,u=jie(e,Sie),d=i||{width:n,height:r,x:0,y:0},f=Fe("recharts-surface",a);return T.createElement("svg",Lw({},Me(u,!0,"svg"),{className:f,width:n,height:r,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),T.createElement("title",null,s),T.createElement("desc",null,c),t)}var Pie=["children","className"];function Bw(){return Bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ot=T.forwardRef(function(e,t){var n=e.children,r=e.className,i=Oie(e,Pie),a=Fe("recharts-layer",r);return T.createElement("g",Bw({className:a},Me(i,!0),{ref:t}),n)}),bs=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;ai?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=r?e:Tie(e,t,n)}var kie=_ie,Mie="\\ud800-\\udfff",Rie="\\u0300-\\u036f",$ie="\\ufe20-\\ufe2f",Die="\\u20d0-\\u20ff",Iie=Rie+$ie+Die,Lie="\\ufe0e\\ufe0f",Fie="\\u200d",Bie=RegExp("["+Fie+Mie+Iie+Lie+"]");function Uie(e){return Bie.test(e)}var EF=Uie;function zie(e){return e.split("")}var Vie=zie,TF="\\ud800-\\udfff",Wie="\\u0300-\\u036f",Hie="\\ufe20-\\ufe2f",Kie="\\u20d0-\\u20ff",qie=Wie+Hie+Kie,Gie="\\ufe0e\\ufe0f",Yie="["+TF+"]",Uw="["+qie+"]",zw="\\ud83c[\\udffb-\\udfff]",Xie="(?:"+Uw+"|"+zw+")",_F="[^"+TF+"]",kF="(?:\\ud83c[\\udde6-\\uddff]){2}",MF="[\\ud800-\\udbff][\\udc00-\\udfff]",Qie="\\u200d",RF=Xie+"?",$F="["+Gie+"]?",Jie="(?:"+Qie+"(?:"+[_F,kF,MF].join("|")+")"+$F+RF+")*",Zie=$F+RF+Jie,eae="(?:"+[_F+Uw+"?",Uw,kF,MF,Yie].join("|")+")",tae=RegExp(zw+"(?="+zw+")|"+eae+Zie,"g");function nae(e){return e.match(tae)||[]}var rae=nae,iae=Vie,aae=EF,oae=rae;function sae(e){return aae(e)?oae(e):iae(e)}var lae=sae,cae=kie,uae=EF,dae=lae,fae=SF;function hae(e){return function(t){t=fae(t);var n=uae(t)?dae(t):void 0,r=n?n[0]:t.charAt(0),i=n?cae(n,1).join(""):t.slice(1);return r[e]()+i}}var pae=hae,mae=pae,vae=mae("toUpperCase"),gae=vae;const oy=Ze(gae);function it(e){return function(){return e}}const DF=Math.cos,Bm=Math.sin,ci=Math.sqrt,Um=Math.PI,sy=2*Um,Vw=Math.PI,Ww=2*Vw,Xo=1e-6,yae=Ww-Xo;function IF(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return IF;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;iXo)if(!(Math.abs(f*c-u*d)>Xo)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-o,v=i-s,m=c*c+u*u,y=p*p+v*v,x=Math.sqrt(m),b=Math.sqrt(h),w=a*Math.tan((Vw-Math.acos((m+h-y)/(2*x*b)))/2),C=w/b,S=w/x;Math.abs(C-1)>Xo&&this._append`L${t+C*d},${n+C*f}`,this._append`A${a},${a},0,0,${+(f*p>d*v)},${this._x1=t+S*c},${this._y1=n+S*u}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),u=t+s,d=n+c,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Xo||Math.abs(this._y1-d)>Xo)&&this._append`L${u},${d}`,r&&(h<0&&(h=h%Ww+Ww),h>yae?this._append`A${r},${r},0,1,${f},${t-s},${n-c}A${r},${r},0,1,${f},${this._x1=u},${this._y1=d}`:h>Xo&&this._append`A${r},${r},0,${+(h>=Vw)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function aP(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new bae(t)}function oP(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function LF(e){this._context=e}LF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ly(e){return new LF(e)}function FF(e){return e[0]}function BF(e){return e[1]}function UF(e,t){var n=it(!0),r=null,i=ly,a=null,o=aP(s);e=typeof e=="function"?e:e===void 0?FF:it(e),t=typeof t=="function"?t:t===void 0?BF:it(t);function s(c){var u,d=(c=oP(c)).length,f,h=!1,p;for(r==null&&(a=i(p=o())),u=0;u<=d;++u)!(u=p;--v)s.point(w[v],C[v]);s.lineEnd(),s.areaEnd()}x&&(w[h]=+e(y,h,f),C[h]=+t(y,h,f),s.point(r?+r(y,h,f):w[h],n?+n(y,h,f):C[h]))}if(b)return s=null,b+""||null}function d(){return UF().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:it(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:it(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:it(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:it(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:it(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:it(+f),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:it(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class zF{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function wae(e){return new zF(e,!0)}function Sae(e){return new zF(e,!1)}const sP={draw(e,t){const n=ci(t/Um);e.moveTo(n,0),e.arc(0,0,n,0,sy)}},jae={draw(e,t){const n=ci(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},VF=ci(1/3),Cae=VF*2,Pae={draw(e,t){const n=ci(t/Cae),r=n*VF;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Oae={draw(e,t){const n=ci(t),r=-n/2;e.rect(r,r,n,n)}},Nae=.8908130915292852,WF=Bm(Um/10)/Bm(7*Um/10),Aae=Bm(sy/10)*WF,Eae=-DF(sy/10)*WF,Tae={draw(e,t){const n=ci(t*Nae),r=Aae*n,i=Eae*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=sy*a/5,s=DF(o),c=Bm(o);e.lineTo(c*n,-s*n),e.lineTo(s*r-c*i,c*r+s*i)}e.closePath()}},px=ci(3),_ae={draw(e,t){const n=-ci(t/(px*3));e.moveTo(0,n*2),e.lineTo(-px*n,-n),e.lineTo(px*n,-n),e.closePath()}},mr=-.5,vr=ci(3)/2,Hw=1/ci(12),kae=(Hw/2+1)*3,Mae={draw(e,t){const n=ci(t/kae),r=n/2,i=n*Hw,a=r,o=n*Hw+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(mr*r-vr*i,vr*r+mr*i),e.lineTo(mr*a-vr*o,vr*a+mr*o),e.lineTo(mr*s-vr*c,vr*s+mr*c),e.lineTo(mr*r+vr*i,mr*i-vr*r),e.lineTo(mr*a+vr*o,mr*o-vr*a),e.lineTo(mr*s+vr*c,mr*c-vr*s),e.closePath()}};function Rae(e,t){let n=null,r=aP(i);e=typeof e=="function"?e:it(e||sP),t=typeof t=="function"?t:it(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:it(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:it(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function zm(){}function Vm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function HF(e){this._context=e}HF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Vm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Vm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $ae(e){return new HF(e)}function KF(e){this._context=e}KF.prototype={areaStart:zm,areaEnd:zm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Vm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dae(e){return new KF(e)}function qF(e){this._context=e}qF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Vm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Iae(e){return new qF(e)}function GF(e){this._context=e}GF.prototype={areaStart:zm,areaEnd:zm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Lae(e){return new GF(e)}function g2(e){return e<0?-1:1}function y2(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(g2(a)+g2(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function x2(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mx(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Wm(e){this._context=e}Wm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mx(this,this._t0,x2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mx(this,x2(this,n=y2(this,e,t)),n);break;default:mx(this,this._t0,n=y2(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function YF(e){this._context=new XF(e)}(YF.prototype=Object.create(Wm.prototype)).point=function(e,t){Wm.prototype.point.call(this,t,e)};function XF(e){this._context=e}XF.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Fae(e){return new Wm(e)}function Bae(e){return new YF(e)}function QF(e){this._context=e}QF.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=b2(e),i=b2(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function zae(e){return new cy(e,.5)}function Vae(e){return new cy(e,0)}function Wae(e){return new cy(e,1)}function pc(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function Hae(e,t){return e[t]}function Kae(e){const t=[];return t.key=e,t}function qae(){var e=it([]),t=Kw,n=pc,r=Hae;function i(a){var o=Array.from(e.apply(this,arguments),Kae),s,c=o.length,u=-1,d;for(const f of a)for(s=0,++u;s0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function noe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var JF={symbolCircle:sP,symbolCross:jae,symbolDiamond:Pae,symbolSquare:Oae,symbolStar:Tae,symbolTriangle:_ae,symbolWye:Mae},roe=Math.PI/180,ioe=function(t){var n="symbol".concat(oy(t));return JF[n]||sP},aoe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*roe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ooe=function(t,n){JF["symbol".concat(oy(t))]=n},lP=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,c=toe(t,Qae),u=S2(S2({},c),{},{type:r,size:a,sizeType:s}),d=function(){var y=ioe(r),x=Rae().type(y).size(aoe(a,s,r));return x()},f=u.className,h=u.cx,p=u.cy,v=Me(u,!0);return h===+h&&p===+p&&a===+a?T.createElement("path",qw({},v,{className:Fe("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};lP.registerSymbol=ooe;function mc(e){"@babel/helpers - typeof";return mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(e)}function Gw(){return Gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=p.inactive?u:p.color;return T.createElement("li",Gw({className:y,style:f,key:"legend-item-".concat(v)},Fm(r.props,p,v)),T.createElement(Fw,{width:o,height:o,viewBox:d,style:h},r.renderIcon(p)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(x,p,v):x))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(g.PureComponent);of(cP,"displayName","Legend");of(cP,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var voe=qg;function goe(){this.__data__=new voe,this.size=0}var yoe=goe;function xoe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var boe=xoe;function woe(e){return this.__data__.get(e)}var Soe=woe;function joe(e){return this.__data__.has(e)}var Coe=joe,Poe=qg,Ooe=XC,Noe=QC,Aoe=200;function Eoe(e,t){var n=this.__data__;if(n instanceof Poe){var r=n.__data__;if(!Ooe||r.lengths))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=n&Qoe?new qoe:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=tle}var hP=nle,rle=Ta,ile=hP,ale=_a,ole="[object Arguments]",sle="[object Array]",lle="[object Boolean]",cle="[object Date]",ule="[object Error]",dle="[object Function]",fle="[object Map]",hle="[object Number]",ple="[object Object]",mle="[object RegExp]",vle="[object Set]",gle="[object String]",yle="[object WeakMap]",xle="[object ArrayBuffer]",ble="[object DataView]",wle="[object Float32Array]",Sle="[object Float64Array]",jle="[object Int8Array]",Cle="[object Int16Array]",Ple="[object Int32Array]",Ole="[object Uint8Array]",Nle="[object Uint8ClampedArray]",Ale="[object Uint16Array]",Ele="[object Uint32Array]",ft={};ft[wle]=ft[Sle]=ft[jle]=ft[Cle]=ft[Ple]=ft[Ole]=ft[Nle]=ft[Ale]=ft[Ele]=!0;ft[ole]=ft[sle]=ft[xle]=ft[lle]=ft[ble]=ft[cle]=ft[ule]=ft[dle]=ft[fle]=ft[hle]=ft[ple]=ft[mle]=ft[vle]=ft[gle]=ft[yle]=!1;function Tle(e){return ale(e)&&ile(e.length)&&!!ft[rle(e)]}var _le=Tle;function kle(e){return function(t){return e(t)}}var c5=kle,Gm={exports:{}};Gm.exports;(function(e,t){var n=vF,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Gm,Gm.exports);var Mle=Gm.exports,Rle=_le,$le=c5,E2=Mle,T2=E2&&E2.isTypedArray,Dle=T2?$le(T2):Rle,u5=Dle,Ile=Bse,Lle=dP,Fle=Hn,Ble=l5,Ule=fP,zle=u5,Vle=Object.prototype,Wle=Vle.hasOwnProperty;function Hle(e,t){var n=Fle(e),r=!n&&Lle(e),i=!n&&!r&&Ble(e),a=!n&&!r&&!i&&zle(e),o=n||r||i||a,s=o?Ile(e.length,String):[],c=s.length;for(var u in e)(t||Wle.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ule(u,c)))&&s.push(u);return s}var Kle=Hle,qle=Object.prototype;function Gle(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||qle;return e===n}var Yle=Gle;function Xle(e,t){return function(n){return e(t(n))}}var d5=Xle,Qle=d5,Jle=Qle(Object.keys,Object),Zle=Jle,ece=Yle,tce=Zle,nce=Object.prototype,rce=nce.hasOwnProperty;function ice(e){if(!ece(e))return tce(e);var t=[];for(var n in Object(e))rce.call(e,n)&&n!="constructor"&&t.push(n);return t}var ace=ice,oce=GC,sce=hP;function lce(e){return e!=null&&sce(e.length)&&!oce(e)}var uy=lce,cce=Kle,uce=ace,dce=uy;function fce(e){return dce(e)?cce(e):uce(e)}var pP=fce,hce=Ase,pce=Lse,mce=pP;function vce(e){return hce(e,mce,pce)}var gce=vce,_2=gce,yce=1,xce=Object.prototype,bce=xce.hasOwnProperty;function wce(e,t,n,r,i,a){var o=n&yce,s=_2(e),c=s.length,u=_2(t),d=u.length;if(c!=d&&!o)return!1;for(var f=c;f--;){var h=s[f];if(!(o?h in t:bce.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=o;++f-1}var bde=xde;function wde(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=Dde){var u=t?null:Rde(e);if(u)return $de(u);o=!1,i=Mde,c=new Tde}else c=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zde(e){return e.value}function efe(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var n=Qde(t,Vde);return T.createElement(cP,n)}var q2=1,Il=function(e){function t(){var n;Wde(this,t);for(var r=arguments.length,i=new Array(r),a=0;aq2||Math.abs(i.height-this.lastBoundingBox.height)>q2)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ea({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,c=i.margin,u=i.chartWidth,d=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();h={top:((d||0)-v.height)/2}}else h=s==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return ea(ea({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,s=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,d=i.payload,f=ea(ea({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(c)),c);return T.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},efe(a,ea(ea({},this.props),{},{payload:g5(d,u,Zde)})))}}],[{key:"getWithHeight",value:function(r,i){var a=ea(ea({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&oe(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])}(g.PureComponent);dy(Il,"displayName","Legend");dy(Il,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var G2=uh,tfe=dP,nfe=Hn,Y2=G2?G2.isConcatSpreadable:void 0;function rfe(e){return nfe(e)||tfe(e)||!!(Y2&&e&&e[Y2])}var ife=rfe,afe=o5,ofe=ife;function b5(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=ofe),i||(i=[]);++a0&&n(s)?t>1?b5(s,t-1,n,r,i):afe(i,s):r||(i[i.length]=s)}return i}var w5=b5;function sfe(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var lfe=sfe,cfe=lfe,ufe=cfe(),dfe=ufe,ffe=dfe,hfe=pP;function pfe(e,t){return e&&ffe(e,t,hfe)}var S5=pfe,mfe=uy;function vfe(e,t){return function(n,r){if(n==null)return n;if(!mfe(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++at||a&&o&&c&&!s&&!u||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&e=s)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var Tfe=Efe,xx=ZC,_fe=eP,kfe=fu,Mfe=j5,Rfe=Pfe,$fe=c5,Dfe=Tfe,Ife=du,Lfe=Hn;function Ffe(e,t,n){t.length?t=xx(t,function(a){return Lfe(a)?function(o){return _fe(o,a.length===1?a[0]:a)}:a}):t=[Ife];var r=-1;t=xx(t,$fe(kfe));var i=Mfe(e,function(a,o,s){var c=xx(t,function(u){return u(a)});return{criteria:c,index:++r,value:a}});return Rfe(i,function(a,o){return Dfe(a,o,n)})}var Bfe=Ffe;function Ufe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var zfe=Ufe,Vfe=zfe,Q2=Math.max;function Wfe(e,t,n){return t=Q2(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Q2(r.length-t,0),o=Array(a);++i0){if(++t>=ehe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ihe=rhe,ahe=Zfe,ohe=ihe,she=ohe(ahe),lhe=she,che=du,uhe=Hfe,dhe=lhe;function fhe(e,t){return dhe(uhe(e,t,che),e+"")}var hhe=fhe,phe=YC,mhe=uy,vhe=fP,ghe=Io;function yhe(e,t,n){if(!ghe(n))return!1;var r=typeof t;return(r=="number"?mhe(n)&&vhe(t,n.length):r=="string"&&t in n)?phe(n[t],e):!1}var fy=yhe,xhe=w5,bhe=Bfe,whe=hhe,Z2=fy,She=whe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Z2(e,t[0],t[1])?t=[]:n>2&&Z2(t[0],t[1],t[2])&&(t=[t[0]]),bhe(e,xhe(t,1),[])}),jhe=She;const gP=Ze(jhe);function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}function n1(){return n1=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Ru,"-left"),oe(n)&&t&&oe(t.x)&&n=t.y),"".concat(Ru,"-top"),oe(r)&&t&&oe(t.y)&&rm?Math.max(d,c[r]):Math.max(f,c[r])}function Lhe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Fhe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,u,d,f;return o.height>0&&o.width>0&&n?(d=nT({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),f=nT({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=Lhe({translateX:d,translateY:f,useTranslate3d:s})):u=Dhe,{cssProperties:u,cssClasses:Ihe({translateX:d,translateY:f,coordinate:n})}}function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}function rT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iT(e){for(var t=1;taT||Math.abs(r.height-this.state.lastBoundingBox.height)>aT)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,c=i.animationEasing,u=i.children,d=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,v=i.position,m=i.reverseDirection,y=i.useTranslate3d,x=i.viewBox,b=i.wrapperStyle,w=Fhe({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:p,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),C=w.cssClasses,S=w.cssProperties,j=iT(iT({transition:h&&a?"transform ".concat(s,"ms ").concat(c):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return T.createElement("div",{tabIndex:-1,className:C,style:j,ref:function(O){r.wrapperNode=O}},u)}}])}(g.PureComponent),Yhe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},_i={isSsr:Yhe(),get:function(t){return _i[t]},set:function(t,n){if(typeof t=="string")_i[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){_i[i]=t[i]})}}};function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function oT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sT(e){for(var t=1;t0;return T.createElement(Ghe,{allowEscapeViewBox:o,animationDuration:s,animationEasing:c,isAnimationActive:h,active:a,coordinate:d,hasPayload:j,offset:p,position:y,reverseDirection:x,useTranslate3d:b,viewBox:w,wrapperStyle:C},ape(u,sT(sT({},this.props),{},{payload:S})))}}])}(g.PureComponent);yP(Gr,"displayName","Tooltip");yP(Gr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!_i.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var ope=qi,spe=function(){return ope.Date.now()},lpe=spe,cpe=/\s/;function upe(e){for(var t=e.length;t--&&cpe.test(e.charAt(t)););return t}var dpe=upe,fpe=dpe,hpe=/^\s+/;function ppe(e){return e&&e.slice(0,fpe(e)+1).replace(hpe,"")}var mpe=ppe,vpe=mpe,lT=Io,gpe=nu,cT=NaN,ype=/^[-+]0x[0-9a-f]+$/i,xpe=/^0b[01]+$/i,bpe=/^0o[0-7]+$/i,wpe=parseInt;function Spe(e){if(typeof e=="number")return e;if(gpe(e))return cT;if(lT(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=lT(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=vpe(e);var n=xpe.test(e);return n||bpe.test(e)?wpe(e.slice(2),n?2:8):ype.test(e)?cT:+e}var E5=Spe,jpe=Io,wx=lpe,uT=E5,Cpe="Expected a function",Ppe=Math.max,Ope=Math.min;function Npe(e,t,n){var r,i,a,o,s,c,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Cpe);t=uT(t)||0,jpe(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Ppe(uT(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h);function p(j){var P=r,O=i;return r=i=void 0,u=j,o=e.apply(O,P),o}function v(j){return u=j,s=setTimeout(x,t),d?p(j):o}function m(j){var P=j-c,O=j-u,N=t-P;return f?Ope(N,a-O):N}function y(j){var P=j-c,O=j-u;return c===void 0||P>=t||P<0||f&&O>=a}function x(){var j=wx();if(y(j))return b(j);s=setTimeout(x,m(j))}function b(j){return s=void 0,h&&r?p(j):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),u=0,r=c=i=s=void 0}function C(){return s===void 0?o:b(wx())}function S(){var j=wx(),P=y(j);if(r=arguments,i=this,c=j,P){if(s===void 0)return v(c);if(f)return clearTimeout(s),s=setTimeout(x,t),p(c)}return s===void 0&&(s=setTimeout(x,t)),o}return S.cancel=w,S.flush=C,S}var Ape=Npe,Epe=Ape,Tpe=Io,_pe="Expected a function";function kpe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(_pe);return Tpe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Epe(e,t,{leading:r,maxWait:t,trailing:i})}var Mpe=kpe;const T5=Ze(Mpe);function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}function dT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ip(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(k=T5(k,m,{trailing:!0,leading:!1}));var M=new ResizeObserver(k),$=S.current.getBoundingClientRect(),D=$.width,B=$.height;return _(D,B),M.observe(S.current),function(){M.disconnect()}},[_,m]);var E=g.useMemo(function(){var k=N.containerWidth,M=N.containerHeight;if(k<0||M<0)return null;bs(rs(o)||rs(c),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,c),bs(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=rs(o)?k:o,D=rs(c)?M:c;n&&n>0&&($?D=$/n:D&&($=D*n),h&&D>h&&(D=h)),bs($>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,$,D,o,c,d,f,n);var B=!Array.isArray(p)&&fa(p.type).endsWith("Chart");return T.Children.map(p,function(I){return T.isValidElement(I)?g.cloneElement(I,ip({width:$,height:D},B?{style:ip({height:"100%",width:"100%",maxHeight:D,maxWidth:$},I.props.style)}:{})):I})},[n,p,c,h,f,d,N,o]);return T.createElement("div",{id:y?"".concat(y):void 0,className:Fe("recharts-responsive-container",x),style:ip(ip({},C),{},{width:o,height:c,minWidth:d,minHeight:f,maxHeight:h}),ref:S},E)}),k5=function(t){return null};k5.displayName="Cell";function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uf(e)}function hT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function o1(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||_i.isSsr)return{width:0,height:0};var r=qpe(n),i=JSON.stringify({text:t,copyStyle:r});if(el.widthCache[i])return el.widthCache[i];try{var a=document.getElementById(pT);a||(a=document.createElement("span"),a.setAttribute("id",pT),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=o1(o1({},Kpe),r);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),c={width:s.width,height:s.height};return el.widthCache[i]=c,++el.cacheCount>Hpe&&(el.cacheCount=0,el.widthCache={}),c}catch{return{width:0,height:0}}},Gpe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function df(e){"@babel/helpers - typeof";return df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}function Jm(e,t){return Jpe(e)||Qpe(e,t)||Xpe(e,t)||Ype()}function Ype(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xpe(e,t){if(e){if(typeof e=="string")return mT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mT(e,t)}}function mT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wT(e,t){return vme(e)||mme(e,t)||pme(e,t)||hme()}function hme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pme(e,t){if(e){if(typeof e=="string")return ST(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ST(e,t)}}function ST(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(D,B){var I=B.word,R=B.width,F=D[D.length-1];if(F&&(i==null||a||F.width+R+rB.width?D:B})};if(!d)return p;for(var m="…",y=function($){var D=f.slice(0,$),B=D5({breakAll:u,style:c,children:D+m}).wordsWithComputedWidth,I=h(B),R=I.length>o||v(I).width>Number(i);return[R,I]},x=0,b=f.length-1,w=0,C;x<=b&&w<=f.length-1;){var S=Math.floor((x+b)/2),j=S-1,P=y(j),O=wT(P,2),N=O[0],A=O[1],_=y(S),E=wT(_,1),k=E[0];if(!N&&!k&&(x=S+1),N&&k&&(b=S-1),!N&&k){C=A;break}w++}return C||p},jT=function(t){var n=De(t)?[]:t.toString().split($5);return[{words:n}]},yme=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((n||r)&&!_i.isSsr){var c,u,d=D5({breakAll:o,children:i,style:a});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;c=f,u=h}else return jT(i);return gme({breakAll:o,children:i,maxLines:s,style:a},c,u,n,r)}return jT(i)},CT="#808080",Zm=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,v=t.verticalAnchor,m=v===void 0?"end":v,y=t.fill,x=y===void 0?CT:y,b=bT(t,ume),w=g.useMemo(function(){return yme({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),C=b.dx,S=b.dy,j=b.angle,P=b.className,O=b.breakAll,N=bT(b,dme);if(!Ht(r)||!Ht(a))return null;var A=r+(oe(C)?C:0),_=a+(oe(S)?S:0),E;switch(m){case"start":E=Sx("calc(".concat(u,")"));break;case"middle":E=Sx("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:E=Sx("calc(".concat(w.length-1," * -").concat(s,")"));break}var k=[];if(f){var M=w[0].width,$=b.width;k.push("scale(".concat((oe($)?$/M:1)/M,")"))}return j&&k.push("rotate(".concat(j,", ").concat(A,", ").concat(_,")")),k.length&&(N.transform=k.join(" ")),T.createElement("text",s1({},Me(N,!0),{x:A,y:_,className:Fe("recharts-text",P),textAnchor:p,fill:x.includes("url")?CT:x}),w.map(function(D,B){var I=D.words.join(O?"":" ");return T.createElement("tspan",{x:A,dy:B===0?E:s,key:"".concat(I,"-").concat(B)},I)}))};function go(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function xme(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function xP(e){let t,n,r;e.length!==2?(t=go,n=(s,c)=>go(e(s),c),r=(s,c)=>e(s)-c):(t=e===go||e===xme?e:bme,n=e,r=e);function i(s,c,u=0,d=s.length){if(u>>1;n(s[f],c)<0?u=f+1:d=f}while(u>>1;n(s[f],c)<=0?u=f+1:d=f}while(uu&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:i,center:o,right:a}}function bme(){return 0}function I5(e){return e===null?NaN:+e}function*wme(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Sme=xP(go),fh=Sme.right;xP(I5).center;class PT extends Map{constructor(t,n=Pme){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(OT(this,t))}has(t){return super.has(OT(this,t))}set(t,n){return super.set(jme(this,t),n)}delete(t){return super.delete(Cme(this,t))}}function OT({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function jme({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Cme({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Pme(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Ome(e=go){if(e===go)return L5;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function L5(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Nme=Math.sqrt(50),Ame=Math.sqrt(10),Eme=Math.sqrt(2);function ev(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=Nme?10:a>=Ame?5:a>=Eme?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),c=Math.round(t*u),s/ut&&--c,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),c=Math.round(t/u),s*ut&&--c),c0))return[];if(e===t)return[e];const r=t=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let u=0;u=r)&&(n=r);return n}function AT(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function F5(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?L5:Ome(i);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(t-u*f/c+h)),v=Math.min(r,Math.floor(t+(c-u)*f/c+h));F5(e,t,p,v,i)}const a=e[t];let o=n,s=r;for($u(e,n,t),i(e[r],a)>0&&$u(e,n,r);o0;)--s}i(e[n],a)===0?$u(e,n,s):(++s,$u(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function $u(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Tme(e,t,n){if(e=Float64Array.from(wme(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return AT(e);if(t>=1)return NT(e);var r,i=(r-1)*t,a=Math.floor(i),o=NT(F5(e,a).subarray(0,a+1)),s=AT(e.subarray(a+1));return o+(s-o)*(i-a)}}function _me(e,t,n=I5){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function kme(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?op(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?op(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Rme.exec(e))?new Fn(t[1],t[2],t[3],1):(t=$me.exec(e))?new Fn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Dme.exec(e))?op(t[1],t[2],t[3],t[4]):(t=Ime.exec(e))?op(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Lme.exec(e))?$T(t[1],t[2]/100,t[3]/100,1):(t=Fme.exec(e))?$T(t[1],t[2]/100,t[3]/100,t[4]):ET.hasOwnProperty(e)?kT(ET[e]):e==="transparent"?new Fn(NaN,NaN,NaN,0):null}function kT(e){return new Fn(e>>16&255,e>>8&255,e&255,1)}function op(e,t,n,r){return r<=0&&(e=t=n=NaN),new Fn(e,t,n,r)}function zme(e){return e instanceof hh||(e=mf(e)),e?(e=e.rgb(),new Fn(e.r,e.g,e.b,e.opacity)):new Fn}function f1(e,t,n,r){return arguments.length===1?zme(e):new Fn(e,t,n,r??1)}function Fn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}wP(Fn,f1,U5(hh,{brighter(e){return e=e==null?tv:Math.pow(tv,e),new Fn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hf:Math.pow(hf,e),new Fn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fn(ws(this.r),ws(this.g),ws(this.b),nv(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:MT,formatHex:MT,formatHex8:Vme,formatRgb:RT,toString:RT}));function MT(){return`#${is(this.r)}${is(this.g)}${is(this.b)}`}function Vme(){return`#${is(this.r)}${is(this.g)}${is(this.b)}${is((isNaN(this.opacity)?1:this.opacity)*255)}`}function RT(){const e=nv(this.opacity);return`${e===1?"rgb(":"rgba("}${ws(this.r)}, ${ws(this.g)}, ${ws(this.b)}${e===1?")":`, ${e})`}`}function nv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ws(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function is(e){return e=ws(e),(e<16?"0":"")+e.toString(16)}function $T(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Zr(e,t,n,r)}function z5(e){if(e instanceof Zr)return new Zr(e.h,e.s,e.l,e.opacity);if(e instanceof hh||(e=mf(e)),!e)return new Zr;if(e instanceof Zr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(n-r)/s+(n0&&c<1?0:o,new Zr(o,s,c,e.opacity)}function Wme(e,t,n,r){return arguments.length===1?z5(e):new Zr(e,t,n,r??1)}function Zr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}wP(Zr,Wme,U5(hh,{brighter(e){return e=e==null?tv:Math.pow(tv,e),new Zr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hf:Math.pow(hf,e),new Zr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Fn(jx(e>=240?e-240:e+120,i,r),jx(e,i,r),jx(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Zr(DT(this.h),sp(this.s),sp(this.l),nv(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=nv(this.opacity);return`${e===1?"hsl(":"hsla("}${DT(this.h)}, ${sp(this.s)*100}%, ${sp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function DT(e){return e=(e||0)%360,e<0?e+360:e}function sp(e){return Math.max(0,Math.min(1,e||0))}function jx(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const SP=e=>()=>e;function Hme(e,t){return function(n){return e+n*t}}function Kme(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function qme(e){return(e=+e)==1?V5:function(t,n){return n-t?Kme(t,n,e):SP(isNaN(t)?n:t)}}function V5(e,t){var n=t-e;return n?Hme(e,n):SP(isNaN(e)?t:e)}const IT=function e(t){var n=qme(t);function r(i,a){var o=n((i=f1(i)).r,(a=f1(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),u=V5(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=s(d),i.b=c(d),i.opacity=u(d),i+""}}return r.gamma=e,r}(1);function Gme(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;in&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:rv(r,i)})),n=Cx.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function ave(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?ove:ave,c=u=null,f}function f(h){return h==null||isNaN(h=+h)?a:(c||(c=s(e.map(r),t,n)))(r(o(h)))}return f.invert=function(h){return o(i((u||(u=s(t,e.map(r),rv)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,iv),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=jP,d()},f.clamp=function(h){return arguments.length?(o=h?!0:En,d()):o!==En},f.interpolate=function(h){return arguments.length?(n=h,d()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return r=h,i=p,d()}}function CP(){return hy()(En,En)}function sve(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function av(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function xc(e){return e=av(Math.abs(e)),e?e[1]:NaN}function lve(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function cve(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var uve=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vf(e){if(!(t=uve.exec(e)))throw new Error("invalid format: "+e);var t;return new PP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}vf.prototype=PP.prototype;function PP(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}PP.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function dve(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var W5;function fve(e,t){var n=av(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(W5=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+av(e,Math.max(0,t+a-1))[0]}function FT(e,t){var n=av(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const BT={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:sve,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>FT(e*100,t),r:FT,s:fve,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function UT(e){return e}var zT=Array.prototype.map,VT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function hve(e){var t=e.grouping===void 0||e.thousands===void 0?UT:lve(zT.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?UT:cve(zT.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=vf(f);var h=f.fill,p=f.align,v=f.sign,m=f.symbol,y=f.zero,x=f.width,b=f.comma,w=f.precision,C=f.trim,S=f.type;S==="n"?(b=!0,S="g"):BT[S]||(w===void 0&&(w=12),C=!0,S="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var j=m==="$"?n:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",P=m==="$"?r:/[%p]/.test(S)?o:"",O=BT[S],N=/[defgprs%]/.test(S);w=w===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function A(_){var E=j,k=P,M,$,D;if(S==="c")k=O(_)+k,_="";else{_=+_;var B=_<0||1/_<0;if(_=isNaN(_)?c:O(Math.abs(_),w),C&&(_=dve(_)),B&&+_==0&&v!=="+"&&(B=!1),E=(B?v==="("?v:s:v==="-"||v==="("?"":v)+E,k=(S==="s"?VT[8+W5/3]:"")+k+(B&&v==="("?")":""),N){for(M=-1,$=_.length;++M<$;)if(D=_.charCodeAt(M),48>D||D>57){k=(D===46?i+_.slice(M+1):_.slice(M))+k,_=_.slice(0,M);break}}}b&&!y&&(_=t(_,1/0));var I=E.length+_.length+k.length,R=I>1)+E+_+k+R.slice(I);break;default:_=R+E+_+k;break}return a(_)}return A.toString=function(){return f+""},A}function d(f,h){var p=u((f=vf(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(xc(h)/3)))*3,m=Math.pow(10,-v),y=VT[8+v/3];return function(x){return p(m*x)+y}}return{format:u,formatPrefix:d}}var lp,OP,H5;pve({thousands:",",grouping:[3],currency:["$",""]});function pve(e){return lp=hve(e),OP=lp.format,H5=lp.formatPrefix,lp}function mve(e){return Math.max(0,-xc(Math.abs(e)))}function vve(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xc(t)/3)))*3-xc(Math.abs(e)))}function gve(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xc(t)-xc(e))+1}function K5(e,t,n,r){var i=u1(e,t,n),a;switch(r=vf(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=vve(i,o))&&(r.precision=a),H5(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=gve(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=mve(i))&&(r.precision=a-(r.type==="%")*2);break}}return OP(r)}function Lo(e){var t=e.domain;return e.ticks=function(n){var r=t();return l1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return K5(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,u,d=10;for(s0;){if(u=c1(o,s,n),u===c)return r[i]=o,r[a]=s,t(r);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;c=u}return e},e}function ov(){var e=CP();return e.copy=function(){return ph(e,ov())},Dr.apply(e,arguments),Lo(e)}function q5(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,iv),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return q5(e).unknown(t)},e=arguments.length?Array.from(e,iv):[0,1],Lo(n)}function G5(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return aMath.pow(e,t)}function Sve(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function KT(e){return(t,n)=>-e(-t,n)}function NP(e){const t=e(WT,HT),n=t.domain;let r=10,i,a;function o(){return i=Sve(r),a=wve(r),n()[0]<0?(i=KT(i),a=KT(a),e(yve,xve)):e(WT,HT),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const c=n();let u=c[0],d=c[c.length-1];const f=d0){for(;h<=p;++h)for(v=1;vd)break;x.push(m)}}else for(;h<=p;++h)for(v=r-1;v>=1;--v)if(m=h>0?v/a(-h):v*a(h),!(md)break;x.push(m)}x.length*2{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=vf(c)).precision==null&&(c.trim=!0),c=OP(c)),s===1/0)return c;const u=Math.max(1,r*s/t.ticks().length);return d=>{let f=d/a(Math.round(i(d)));return f*rn(G5(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function Y5(){const e=NP(hy()).domain([1,10]);return e.copy=()=>ph(e,Y5()).base(e.base()),Dr.apply(e,arguments),e}function qT(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function GT(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function AP(e){var t=1,n=e(qT(t),GT(t));return n.constant=function(r){return arguments.length?e(qT(t=+r),GT(t)):t},Lo(n)}function X5(){var e=AP(hy());return e.copy=function(){return ph(e,X5()).constant(e.constant())},Dr.apply(e,arguments)}function YT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function jve(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Cve(e){return e<0?-e*e:e*e}function EP(e){var t=e(En,En),n=1;function r(){return n===1?e(En,En):n===.5?e(jve,Cve):e(YT(n),YT(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Lo(t)}function TP(){var e=EP(hy());return e.copy=function(){return ph(e,TP()).exponent(e.exponent())},Dr.apply(e,arguments),e}function Pve(){return TP.apply(null,arguments).exponent(.5)}function XT(e){return Math.sign(e)*e*e}function Ove(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Q5(){var e=CP(),t=[0,1],n=!1,r;function i(a){var o=Ove(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(XT(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,iv)).map(XT)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Q5(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Dr.apply(i,arguments),Lo(i)}function J5(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Z5().domain([e,t]).range(i).unknown(a)},Dr.apply(Lo(o),arguments)}function e3(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[fh(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return e3().domain(e).range(t).unknown(n)},Dr.apply(i,arguments)}const Px=new Date,Ox=new Date;function Gt(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return c;let u;do c.push(u=new Date(+a)),t(a,s),e(a);while(uGt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Px.setTime(+a),Ox.setTime(+o),e(Px),e(Ox),Math.floor(n(Px,Ox))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const sv=Gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);sv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):sv);sv.range;const sa=1e3,Cr=sa*60,la=Cr*60,Ca=la*24,_P=Ca*7,QT=Ca*30,Nx=Ca*365,as=Gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*sa)},(e,t)=>(t-e)/sa,e=>e.getUTCSeconds());as.range;const kP=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*sa)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getMinutes());kP.range;const MP=Gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getUTCMinutes());MP.range;const RP=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*sa-e.getMinutes()*Cr)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getHours());RP.range;const $P=Gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getUTCHours());$P.range;const mh=Gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Cr)/Ca,e=>e.getDate()-1);mh.range;const py=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ca,e=>e.getUTCDate()-1);py.range;const t3=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ca,e=>Math.floor(e/Ca));t3.range;function qs(e){return Gt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Cr)/_P)}const my=qs(0),lv=qs(1),Nve=qs(2),Ave=qs(3),bc=qs(4),Eve=qs(5),Tve=qs(6);my.range;lv.range;Nve.range;Ave.range;bc.range;Eve.range;Tve.range;function Gs(e){return Gt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/_P)}const vy=Gs(0),cv=Gs(1),_ve=Gs(2),kve=Gs(3),wc=Gs(4),Mve=Gs(5),Rve=Gs(6);vy.range;cv.range;_ve.range;kve.range;wc.range;Mve.range;Rve.range;const DP=Gt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());DP.range;const IP=Gt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());IP.range;const Pa=Gt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Pa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Pa.range;const Oa=Gt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Oa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Oa.range;function n3(e,t,n,r,i,a){const o=[[as,1,sa],[as,5,5*sa],[as,15,15*sa],[as,30,30*sa],[a,1,Cr],[a,5,5*Cr],[a,15,15*Cr],[a,30,30*Cr],[i,1,la],[i,3,3*la],[i,6,6*la],[i,12,12*la],[r,1,Ca],[r,2,2*Ca],[n,1,_P],[t,1,QT],[t,3,3*QT],[e,1,Nx]];function s(u,d,f){const h=dy).right(o,h);if(p===o.length)return e.every(u1(u/Nx,d/Nx,f));if(p===0)return sv.every(Math.max(u1(u,d,f),1));const[v,m]=o[h/o[p-1][2]53)return null;"w"in W||(W.w=1),"Z"in W?(be=Ex(Du(W.y,0,1)),ze=be.getUTCDay(),be=ze>4||ze===0?cv.ceil(be):cv(be),be=py.offset(be,(W.V-1)*7),W.y=be.getUTCFullYear(),W.m=be.getUTCMonth(),W.d=be.getUTCDate()+(W.w+6)%7):(be=Ax(Du(W.y,0,1)),ze=be.getDay(),be=ze>4||ze===0?lv.ceil(be):lv(be),be=mh.offset(be,(W.V-1)*7),W.y=be.getFullYear(),W.m=be.getMonth(),W.d=be.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),ze="Z"in W?Ex(Du(W.y,0,1)).getUTCDay():Ax(Du(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(ze+5)%7:W.w+W.U*7-(ze+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,Ex(W)):Ax(W)}}function O(X,Z,te,W){for(var Se=0,be=Z.length,ze=te.length,He,Xe;Se=ze)return-1;if(He=Z.charCodeAt(Se++),He===37){if(He=Z.charAt(Se++),Xe=S[He in JT?Z.charAt(Se++):He],!Xe||(W=Xe(X,te,W))<0)return-1}else if(He!=te.charCodeAt(W++))return-1}return W}function N(X,Z,te){var W=u.exec(Z.slice(te));return W?(X.p=d.get(W[0].toLowerCase()),te+W[0].length):-1}function A(X,Z,te){var W=p.exec(Z.slice(te));return W?(X.w=v.get(W[0].toLowerCase()),te+W[0].length):-1}function _(X,Z,te){var W=f.exec(Z.slice(te));return W?(X.w=h.get(W[0].toLowerCase()),te+W[0].length):-1}function E(X,Z,te){var W=x.exec(Z.slice(te));return W?(X.m=b.get(W[0].toLowerCase()),te+W[0].length):-1}function k(X,Z,te){var W=m.exec(Z.slice(te));return W?(X.m=y.get(W[0].toLowerCase()),te+W[0].length):-1}function M(X,Z,te){return O(X,t,Z,te)}function $(X,Z,te){return O(X,n,Z,te)}function D(X,Z,te){return O(X,r,Z,te)}function B(X){return o[X.getDay()]}function I(X){return a[X.getDay()]}function R(X){return c[X.getMonth()]}function F(X){return s[X.getMonth()]}function z(X){return i[+(X.getHours()>=12)]}function U(X){return 1+~~(X.getMonth()/3)}function H(X){return o[X.getUTCDay()]}function J(X){return a[X.getUTCDay()]}function ae(X){return c[X.getUTCMonth()]}function ee(X){return s[X.getUTCMonth()]}function q(X){return i[+(X.getUTCHours()>=12)]}function se(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var Z=j(X+="",w);return Z.toString=function(){return X},Z},parse:function(X){var Z=P(X+="",!1);return Z.toString=function(){return X},Z},utcFormat:function(X){var Z=j(X+="",C);return Z.toString=function(){return X},Z},utcParse:function(X){var Z=P(X+="",!0);return Z.toString=function(){return X},Z}}}var JT={"-":"",_:" ",0:"0"},Zt=/^\s*\d+/,Bve=/^%/,Uve=/[\\^$*+?|[\]().{}]/g;function We(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[t.toLowerCase(),n]))}function Vve(e,t,n){var r=Zt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Wve(e,t,n){var r=Zt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Hve(e,t,n){var r=Zt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Kve(e,t,n){var r=Zt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function qve(e,t,n){var r=Zt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ZT(e,t,n){var r=Zt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function e_(e,t,n){var r=Zt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Gve(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Yve(e,t,n){var r=Zt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Xve(e,t,n){var r=Zt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function t_(e,t,n){var r=Zt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Qve(e,t,n){var r=Zt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function n_(e,t,n){var r=Zt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Jve(e,t,n){var r=Zt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Zve(e,t,n){var r=Zt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ege(e,t,n){var r=Zt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function tge(e,t,n){var r=Zt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function nge(e,t,n){var r=Bve.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function rge(e,t,n){var r=Zt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ige(e,t,n){var r=Zt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function r_(e,t){return We(e.getDate(),t,2)}function age(e,t){return We(e.getHours(),t,2)}function oge(e,t){return We(e.getHours()%12||12,t,2)}function sge(e,t){return We(1+mh.count(Pa(e),e),t,3)}function r3(e,t){return We(e.getMilliseconds(),t,3)}function lge(e,t){return r3(e,t)+"000"}function cge(e,t){return We(e.getMonth()+1,t,2)}function uge(e,t){return We(e.getMinutes(),t,2)}function dge(e,t){return We(e.getSeconds(),t,2)}function fge(e){var t=e.getDay();return t===0?7:t}function hge(e,t){return We(my.count(Pa(e)-1,e),t,2)}function i3(e){var t=e.getDay();return t>=4||t===0?bc(e):bc.ceil(e)}function pge(e,t){return e=i3(e),We(bc.count(Pa(e),e)+(Pa(e).getDay()===4),t,2)}function mge(e){return e.getDay()}function vge(e,t){return We(lv.count(Pa(e)-1,e),t,2)}function gge(e,t){return We(e.getFullYear()%100,t,2)}function yge(e,t){return e=i3(e),We(e.getFullYear()%100,t,2)}function xge(e,t){return We(e.getFullYear()%1e4,t,4)}function bge(e,t){var n=e.getDay();return e=n>=4||n===0?bc(e):bc.ceil(e),We(e.getFullYear()%1e4,t,4)}function wge(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+We(t/60|0,"0",2)+We(t%60,"0",2)}function i_(e,t){return We(e.getUTCDate(),t,2)}function Sge(e,t){return We(e.getUTCHours(),t,2)}function jge(e,t){return We(e.getUTCHours()%12||12,t,2)}function Cge(e,t){return We(1+py.count(Oa(e),e),t,3)}function a3(e,t){return We(e.getUTCMilliseconds(),t,3)}function Pge(e,t){return a3(e,t)+"000"}function Oge(e,t){return We(e.getUTCMonth()+1,t,2)}function Nge(e,t){return We(e.getUTCMinutes(),t,2)}function Age(e,t){return We(e.getUTCSeconds(),t,2)}function Ege(e){var t=e.getUTCDay();return t===0?7:t}function Tge(e,t){return We(vy.count(Oa(e)-1,e),t,2)}function o3(e){var t=e.getUTCDay();return t>=4||t===0?wc(e):wc.ceil(e)}function _ge(e,t){return e=o3(e),We(wc.count(Oa(e),e)+(Oa(e).getUTCDay()===4),t,2)}function kge(e){return e.getUTCDay()}function Mge(e,t){return We(cv.count(Oa(e)-1,e),t,2)}function Rge(e,t){return We(e.getUTCFullYear()%100,t,2)}function $ge(e,t){return e=o3(e),We(e.getUTCFullYear()%100,t,2)}function Dge(e,t){return We(e.getUTCFullYear()%1e4,t,4)}function Ige(e,t){var n=e.getUTCDay();return e=n>=4||n===0?wc(e):wc.ceil(e),We(e.getUTCFullYear()%1e4,t,4)}function Lge(){return"+0000"}function a_(){return"%"}function o_(e){return+e}function s_(e){return Math.floor(+e/1e3)}var tl,s3,l3;Fge({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Fge(e){return tl=Fve(e),s3=tl.format,tl.parse,l3=tl.utcFormat,tl.utcParse,tl}function Bge(e){return new Date(e)}function Uge(e){return e instanceof Date?+e:+new Date(+e)}function LP(e,t,n,r,i,a,o,s,c,u){var d=CP(),f=d.invert,h=d.domain,p=u(".%L"),v=u(":%S"),m=u("%I:%M"),y=u("%I %p"),x=u("%a %d"),b=u("%b %d"),w=u("%B"),C=u("%Y");function S(j){return(c(j)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>Tme(e,a/r))},n.copy=function(){return f3(t).domain(e)},ka.apply(n,arguments)}function yy(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,u=En,d,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+d(m))-a)*(r*mt}var Yge=Gge,Xge=v3,Qge=Yge,Jge=du;function Zge(e){return e&&e.length?Xge(e,Jge,Qge):void 0}var eye=Zge;const ao=Ze(eye);function tye(e,t){return ee.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=re.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};fe.decimalPlaces=fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*ht;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};fe.dividedBy=fe.div=function(e){return ha(this,new this.constructor(e))};fe.dividedToIntegerBy=fe.idiv=function(e){var t=this,n=t.constructor;return rt(ha(t,new n(e),0,1),n.precision)};fe.equals=fe.eq=function(e){return!this.cmp(e)};fe.exponent=function(){return Ft(this)};fe.greaterThan=fe.gt=function(e){return this.cmp(e)>0};fe.greaterThanOrEqualTo=fe.gte=function(e){return this.cmp(e)>=0};fe.isInteger=fe.isint=function(){return this.e>this.d.length-2};fe.isNegative=fe.isneg=function(){return this.s<0};fe.isPositive=fe.ispos=function(){return this.s>0};fe.isZero=function(){return this.s===0};fe.lessThan=fe.lt=function(e){return this.cmp(e)<0};fe.lessThanOrEqualTo=fe.lte=function(e){return this.cmp(e)<1};fe.logarithm=fe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(er))throw Error(Rr+"NaN");if(n.s<1)throw Error(Rr+(n.s?"NaN":"-Infinity"));return n.eq(er)?new r(0):(yt=!1,t=ha(gf(n,a),gf(e,a),a),yt=!0,rt(t,i))};fe.minus=fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?b3(t,e):y3(t,(e.s=-e.s,e))};fe.modulo=fe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Rr+"NaN");return n.s?(yt=!1,t=ha(n,e,0,1).times(e),yt=!0,n.minus(t)):rt(new r(n),i)};fe.naturalExponential=fe.exp=function(){return x3(this)};fe.naturalLogarithm=fe.ln=function(){return gf(this)};fe.negated=fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};fe.plus=fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?y3(t,e):b3(t,(e.s=-e.s,e))};fe.precision=fe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ss+e);if(t=Ft(i)+1,r=i.d.length-1,n=r*ht+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};fe.squareRoot=fe.sqrt=function(){var e,t,n,r,i,a,o,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(Rr+"NaN")}for(e=Ft(s),yt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ji(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=mu((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(i.toString()),n=c.precision,i=o=n+3;;)if(a=r,r=a.plus(ha(s,a,o+2)).times(.5),ji(a.d).slice(0,o)===(t=ji(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(rt(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return yt=!0,rt(r,n)};fe.times=fe.mul=function(e){var t,n,r,i,a,o,s,c,u,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,c=h.length,u=p.length,c=0;){for(t=0,i=c+r;i>r;)s=a[i]+p[r]*h[i-r-1]+t,a[i--]=s%Yt|0,t=s/Yt|0;a[i]=(a[i]+t)%Yt|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,yt?rt(e,f.precision):e};fe.toDecimalPlaces=fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:($i(e,0,pu),t===void 0?t=r.rounding:$i(t,0,8),rt(n,e+Ft(n)+1,t))};fe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Rs(r,!0):($i(e,0,pu),t===void 0?t=i.rounding:$i(t,0,8),r=rt(new i(r),e+1,t),n=Rs(r,!0,e+1)),n};fe.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Rs(i):($i(e,0,pu),t===void 0?t=a.rounding:$i(t,0,8),r=rt(new a(i),e+Ft(i)+1,t),n=Rs(r.abs(),!1,e+Ft(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};fe.toInteger=fe.toint=function(){var e=this,t=e.constructor;return rt(new t(e),Ft(e)+1,t.rounding)};fe.toNumber=function(){return+this};fe.toPower=fe.pow=function(e){var t,n,r,i,a,o,s=this,c=s.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(er);if(s=new c(s),!s.s){if(e.s<1)throw Error(Rr+"Infinity");return s}if(s.eq(er))return s;if(r=c.precision,e.eq(er))return rt(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=d<0?-d:d)<=g3){for(i=new c(er),t=Math.ceil(r/ht+4),yt=!1;n%2&&(i=i.times(s),u_(i.d,t)),n=mu(n/2),n!==0;)s=s.times(s),u_(s.d,t);return yt=!0,e.s<0?new c(er).div(i):rt(i,r)}}else if(a<0)throw Error(Rr+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,yt=!1,i=e.times(gf(s,r+u)),yt=!0,i=x3(i),i.s=a,i};fe.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=Ft(i),r=Rs(i,n<=a.toExpNeg||n>=a.toExpPos)):($i(e,1,pu),t===void 0?t=a.rounding:$i(t,0,8),i=rt(new a(i),e,t),n=Ft(i),r=Rs(i,e<=n||n<=a.toExpNeg,e)),r};fe.toSignificantDigits=fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):($i(e,1,pu),t===void 0?t=r.rounding:$i(t,0,8)),rt(new r(n),e,t)};fe.toString=fe.valueOf=fe.val=fe.toJSON=fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ft(e),n=e.constructor;return Rs(e,t<=n.toExpNeg||t>=n.toExpPos)};function y3(e,t){var n,r,i,a,o,s,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),yt?rt(t,f):t;if(c=e.d,u=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(r=c,a=-a,s=u.length):(r=u,i=o,s=c.length),o=Math.ceil(f/ht),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=c.length,a=u.length,s-a<0&&(a=s,r=u,u=c,c=r),n=0;a;)n=(c[--a]=c[a]+u[a]+n)/Yt|0,c[a]%=Yt;for(n&&(c.unshift(n),++i),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=i,yt?rt(t,f):t}function $i(e,t,n){if(e!==~~e||en)throw Error(Ss+e)}function ji(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=c=0;si[s]?1:-1;break}return c}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]1;)r.shift()}return function(r,i,a,o){var s,c,u,d,f,h,p,v,m,y,x,b,w,C,S,j,P,O,N=r.constructor,A=r.s==i.s?1:-1,_=r.d,E=i.d;if(!r.s)return new N(r);if(!i.s)throw Error(Rr+"Division by zero");for(c=r.e-i.e,P=E.length,S=_.length,p=new N(A),v=p.d=[],u=0;E[u]==(_[u]||0);)++u;if(E[u]>(_[u]||0)&&--c,a==null?b=a=N.precision:o?b=a+(Ft(r)-Ft(i))+1:b=a,b<0)return new N(0);if(b=b/ht+2|0,u=0,P==1)for(d=0,E=E[0],b++;(u1&&(E=e(E,d),_=e(_,d),P=E.length,S=_.length),C=P,m=_.slice(0,P),y=m.length;y=Yt/2&&++j;do d=0,s=t(E,m,P,y),s<0?(x=m[0],P!=y&&(x=x*Yt+(m[1]||0)),d=x/j|0,d>1?(d>=Yt&&(d=Yt-1),f=e(E,d),h=f.length,y=m.length,s=t(f,m,h,y),s==1&&(d--,n(f,P16)throw Error(UP+Ft(e));if(!e.s)return new d(er);for(t==null?(yt=!1,s=f):s=t,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(Jo(2,u))/Math.LN10*2+5|0,s+=r,n=i=a=new d(er),d.precision=s;;){if(i=rt(i.times(e),s),n=n.times(++c),o=a.plus(ha(i,n,s)),ji(o.d).slice(0,s)===ji(a.d).slice(0,s)){for(;u--;)a=rt(a.times(a),s);return d.precision=f,t==null?(yt=!0,rt(a,f)):a}a=o}}function Ft(e){for(var t=e.e*ht,n=e.d[0];n>=10;n/=10)t++;return t}function Tx(e,t,n){if(t>e.LN10.sd())throw yt=!0,n&&(e.precision=n),Error(Rr+"LN10 precision limit exceeded");return rt(new e(e.LN10),t)}function Wa(e){for(var t="";e--;)t+="0";return t}function gf(e,t){var n,r,i,a,o,s,c,u,d,f=1,h=10,p=e,v=p.d,m=p.constructor,y=m.precision;if(p.s<1)throw Error(Rr+(p.s?"NaN":"-Infinity"));if(p.eq(er))return new m(0);if(t==null?(yt=!1,u=y):u=t,p.eq(10))return t==null&&(yt=!0),Tx(m,u);if(u+=h,m.precision=u,n=ji(v),r=n.charAt(0),a=Ft(p),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ji(p.d),r=n.charAt(0),f++;a=Ft(p),r>1?(p=new m("0."+n),a++):p=new m(r+"."+n.slice(1))}else return c=Tx(m,u+2,y).times(a+""),p=gf(new m(r+"."+n.slice(1)),u-h).plus(c),m.precision=y,t==null?(yt=!0,rt(p,y)):p;for(s=o=p=ha(p.minus(er),p.plus(er),u),d=rt(p.times(p),u),i=3;;){if(o=rt(o.times(d),u),c=s.plus(ha(o,new m(i),u)),ji(c.d).slice(0,u)===ji(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Tx(m,u+2,y).times(a+""))),s=ha(s,new m(f),u),m.precision=y,t==null?(yt=!0,rt(s,y)):s;s=c,i+=2}}function c_(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=mu(n/ht),e.d=[],r=(n+1)%ht,n<0&&(r+=ht),ruv||e.e<-uv))throw Error(UP+n)}else e.s=0,e.e=0,e.d=[0];return e}function rt(e,t,n){var r,i,a,o,s,c,u,d,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=ht,i=t,u=f[d=0];else{if(d=Math.ceil((r+1)/ht),a=f.length,d>=a)return e;for(u=a=f[d],o=1;a>=10;a/=10)o++;r%=ht,i=r-ht+o}if(n!==void 0&&(a=Jo(10,o-i-1),s=u/a%10|0,c=t<0||f[d+1]!==void 0||u%a,c=n<4?(s||c)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||c||n==6&&(r>0?i>0?u/Jo(10,o-i):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(a=Ft(e),f.length=1,t=t-a-1,f[0]=Jo(10,(ht-t%ht)%ht),e.e=mu(-t/ht)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,a=1,d--):(f.length=d+1,a=Jo(10,ht-r),f[d]=i>0?(u/Jo(10,o-i)%Jo(10,i)|0)*a:0),c)for(;;)if(d==0){(f[0]+=a)==Yt&&(f[0]=1,++e.e);break}else{if(f[d]+=a,f[d]!=Yt)break;f[d--]=0,a=1}for(r=f.length;f[--r]===0;)f.pop();if(yt&&(e.e>uv||e.e<-uv))throw Error(UP+Ft(e));return e}function b3(e,t){var n,r,i,a,o,s,c,u,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),yt?rt(t,p):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),o=u-r,o){for(d=o<0,d?(n=c,o=-o,s=f.length):(n=f,r=u,s=c.length),i=Math.max(Math.ceil(p/ht),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=c.length,s=f.length,d=i0;--i)c[s++]=0;for(i=f.length;i>o;){if(c[--i]0?a=a.charAt(0)+"."+a.slice(1)+Wa(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Wa(-i-1)+a,n&&(r=n-o)>0&&(a+=Wa(r))):i>=o?(a+=Wa(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Wa(r))):((r=i+1)0&&(i+1===o&&(a+="."),a+=Wa(r))),e.s<0?"-"+a:a}function u_(e,t){if(e.length>t)return e.length=t,!0}function w3(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ss+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return c_(o,a.toString())}else if(typeof a!="string")throw Error(Ss+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,jye.test(a))c_(o,a);else throw Error(Ss+a)}if(i.prototype=fe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=w3,i.config=i.set=Cye,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Ss+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ss+n+": "+r);return this}var zP=w3(Sye);er=new zP(1);const Je=zP;function Pye(e){return Eye(e)||Aye(e)||Nye(e)||Oye()}function Oye(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nye(e,t){if(e){if(typeof e=="string")return m1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m1(e,t)}}function Aye(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Eye(e){if(Array.isArray(e))return m1(e)}function m1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-o,d_(function(){for(var s=arguments.length,c=new Array(s),u=0;ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,a=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function Wye(e){if(Array.isArray(e))return e}function O3(e){var t=yf(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function N3(e,t,n){if(e.lte(0))return new Je(0);var r=wy.getDigitCount(e.toNumber()),i=new Je(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new Je(Math.ceil(a.div(o).toNumber())).add(n).mul(o),c=s.mul(i);return t?c:new Je(Math.ceil(c))}function Hye(e,t,n){var r=1,i=new Je(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Je(10).pow(wy.getDigitCount(e)-1),i=new Je(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Je(Math.floor(e)))}else e===0?i=new Je(Math.floor((t-1)/2)):n||(i=new Je(Math.floor(e)));var o=Math.floor((t-1)/2),s=Mye(kye(function(c){return i.add(new Je(c-o).mul(r)).toNumber()}),v1);return s(0,t)}function A3(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Je(0),tickMin:new Je(0),tickMax:new Je(0)};var a=N3(new Je(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Je(0):(o=new Je(e).add(t).div(2),o=o.sub(new Je(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new Je(t).sub(o).div(a).toNumber()),u=s+c+1;return u>n?A3(e,t,n,r,i+1):(u0?c+(n-u):c,s=t>0?s:s+(n-u)),{step:a,tickMin:o.sub(new Je(s).mul(a)),tickMax:o.add(new Je(c).mul(a))})}function Kye(e){var t=yf(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=O3([n,r]),c=yf(s,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(y1(v1(0,i-1).map(function(){return 1/0}))):[].concat(y1(v1(0,i-1).map(function(){return-1/0})),[d]);return n>r?g1(f):f}if(u===d)return Hye(u,i,a);var h=A3(u,d,o,a),p=h.step,v=h.tickMin,m=h.tickMax,y=wy.rangeStep(v,m.add(new Je(.1).mul(p)),p);return n>r?g1(y):y}function qye(e,t){var n=yf(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=O3([r,i]),s=yf(o,2),c=s[0],u=s[1];if(c===-1/0||u===1/0)return[r,i];if(c===u)return[c];var d=Math.max(t,2),f=N3(new Je(u).sub(c).div(d-1),a,0),h=[].concat(y1(wy.rangeStep(new Je(c),new Je(u).sub(new Je(.99).mul(f)),f)),[u]);return r>i?g1(h):h}var Gye=C3(Kye),Yye=C3(qye),Xye="Invariant failed";function $s(e,t){throw new Error(Xye)}var Qye=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function jc(e){"@babel/helpers - typeof";return jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jc(e)}function dv(){return dv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function a0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o0e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(ti(f-d)!==ti(h-f)){var v=[];if(ti(h-f)===ti(c[1]-c[0])){p=h;var m=f+c[1]-c[0];v[0]=Math.min(m,(m+d)/2),v[1]=Math.max(m,(m+d)/2)}else{p=d;var y=h+c[1]-c[0];v[0]=Math.min(f,(y+f)/2),v[1]=Math.max(f,(y+f)/2)}var x=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>x[0]&&t<=x[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var b=Math.min(d,h),w=Math.max(d,h);if(t>(b+f)/2&&t<=(w+f)/2){o=i[u].index;break}}}else for(var C=0;C0&&C(r[C].coordinate+r[C-1].coordinate)/2&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C===s-1&&t>(r[C].coordinate+r[C-1].coordinate)/2){o=r[C].index;break}return o},VP=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:s;break;default:c=s;break}return c},j0e=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),c=0,u=s.length;c=0});if(x&&x.length){var b=x[0].type.defaultProps,w=b!==void 0?Et(Et({},b),x[0].props):x[0].props,C=w.barSize,S=w[y];o[S]||(o[S]=[]);var j=De(C)?n:C;o[S].push({item:x[0],stackList:x.slice(1),barSize:De(j)?void 0:Ms(j,r,0)})}}return o},C0e=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,c=o.length;if(c<1)return null;var u=Ms(n,i,0,!0),d,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=i/c,v=o.reduce(function(C,S){return C+S.barSize||0},0);v+=(c-1)*u,v>=i&&(v-=(c-1)*u,u=0),v>=i&&p>0&&(h=!0,p*=.9,v=c*p);var m=(i-v)/2>>0,y={offset:m-u,size:0};d=o.reduce(function(C,S){var j={item:S.item,position:{offset:y.offset+y.size+u,size:h?p:S.barSize}},P=[].concat(p_(C),[j]);return y=P[P.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(O){P.push({item:O,position:y})}),P},f)}else{var x=Ms(r,i,0,!0);i-2*x-(c-1)*u<=0&&(u=0);var b=(i-2*x-(c-1)*u)/c;b>1&&(b>>=0);var w=s===+s?Math.min(b,s):b;d=o.reduce(function(C,S,j){var P=[].concat(p_(C),[{item:S.item,position:{offset:x+(b+u)*j+(b-w)/2,size:w}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(O){P.push({item:O,position:P[P.length-1].position})}),P},f)}return d},P0e=function(t,n,r,i){var a=r.children,o=r.width,s=r.margin,c=o-(s.left||0)-(s.right||0),u=k3({children:a,legendWidth:c});if(u){var d=i||{},f=d.width,h=d.height,p=u.align,v=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&p!=="center"&&oe(t[p]))return Et(Et({},t),{},Fl({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&v!=="middle"&&oe(t[v]))return Et(Et({},t),{},Fl({},v,t[v]+(h||0)))}return t},O0e=function(t,n,r){return De(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},M3=function(t,n,r,i,a){var o=n.props.children,s=Ar(o,vh).filter(function(u){return O0e(i,a,u.props.direction)});if(s&&s.length){var c=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=_n(d,r);if(De(f))return u;var h=Array.isArray(f)?[xy(f),ao(f)]:[f,f],p=c.reduce(function(v,m){var y=_n(d,m,0),x=h[0]-Math.abs(Array.isArray(y)?y[0]:y),b=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,v[0]),Math.max(b,v[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},N0e=function(t,n,r,i,a){var o=n.map(function(s){return M3(t,s,r,a,i)}).filter(function(s){return!De(s)});return o&&o.length?o.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]):null},R3=function(t,n,r,i,a){var o=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&M3(t,c,u,i)||xd(t,u,r,a)});if(r==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(c,u){for(var d=0,f=u.length;d=2?ti(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+u,value:f,offset:u}});return d.filter(function(f){return!su(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+u,value:f,index:h,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,h){return{coordinate:i(f)+u,value:a?a[f]:f,index:h,offset:u}})},_x=new WeakMap,cp=function(t,n){if(typeof n!="function")return t;_x.has(t)||_x.set(t,new WeakMap);var r=_x.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},A0e=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:ff(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:ov(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:yd(),realScaleType:"point"}:a==="category"?{scale:ff(),realScaleType:"band"}:{scale:ov(),realScaleType:"linear"};if(dh(i)){var c="scale".concat(oy(i));return{scale:(l_[c]||yd)(),realScaleType:l_[c]?c:"point"}}return Re(i)?{scale:i}:{scale:yd(),realScaleType:"point"}},v_=1e-4,E0e=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-v_,o=Math.max(i[0],i[1])+v_,s=t(n[0]),c=t(n[r-1]);(so||co)&&t.domain([n[0],n[r-1]])}},T0e=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][r][0]=a,t[s][r][1]=a+c,a=t[s][r][1]):(t[s][r][0]=o,t[s][r][1]=o+c,o=t[s][r][1])}},M0e=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[o][r][0]=a,t[o][r][1]=a+s,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},R0e={sign:k0e,expand:Gae,none:pc,silhouette:Yae,wiggle:Xae,positive:M0e},$0e=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),a=R0e[r],o=qae().keys(i).value(function(s,c){return+_n(s,c,0)}).order(Kw).offset(a);return o(t)},D0e=function(t,n,r,i,a,o){if(!t)return null;var s=o?n.reverse():n,c={},u=s.reduce(function(f,h){var p,v=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Et(Et({},h.type.defaultProps),h.props):h.props,m=v.stackId,y=v.hide;if(y)return f;var x=v[r],b=f[x]||{hasStack:!1,stackGroups:{}};if(Ht(m)){var w=b.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};w.items.push(h),b.hasStack=!0,b.stackGroups[m]=w}else b.stackGroups[lu("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return Et(Et({},f),{},Fl({},x,b))},c),d={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,y){var x=p.stackGroups[y];return Et(Et({},m),{},Fl({},y,{numericAxisId:r,cateAxisId:i,items:x.items,stackedData:$0e(t,x.items,a)}))},v)}return Et(Et({},f),{},Fl({},h,p))},d)},I0e=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=Gye(u,a,s);return t.domain([xy(d),ao(d)]),{niceTicks:d}}if(a&&i==="number"){var f=t.domain(),h=Yye(f,a,s);return{niceTicks:h}}return null};function hv(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!De(i[t.dataKey])){var s=Im(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var c=_n(i,De(o)?t.dataKey:o);return De(c)?null:t.scale(c)}var g_=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var c=_n(o,n.dataKey,n.domain[s]);return De(c)?null:n.scale(c)-a/2+i},L0e=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},F0e=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Ht(a)){var o=n[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},B0e=function(t){return t.reduce(function(n,r){return[xy(r.concat([n[0]]).filter(oe)),ao(r.concat([n[1]]).filter(oe))]},[1/0,-1/0])},D3=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,c=s.reduce(function(u,d){var f=B0e(d.slice(n,r+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},y_=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,x_=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,S1=function(t,n,r){if(Re(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(oe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(y_.test(t[0])){var a=+y_.exec(t[0])[1];i[0]=n[0]-a}else Re(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(oe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(x_.test(t[1])){var o=+x_.exec(t[1])[1];i[1]=n[1]+o}else Re(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},pv=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=gP(n,function(f){return f.coordinate}),o=1/0,s=1,c=a.length;so&&(u=2*Math.PI-u),{radius:s,angle:W0e(u),angleInRadian:u}},q0e=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},G0e=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},j_=function(t,n){var r=t.x,i=t.y,a=K0e({x:r,y:i},n),o=a.radius,s=a.angle,c=n.innerRadius,u=n.outerRadius;if(ou)return!1;if(o===0)return!0;var d=q0e(n),f=d.startAngle,h=d.endAngle,p=s,v;if(f<=h){for(;p>h;)p-=360;for(;p=f&&p<=h}else{for(;p>f;)p-=360;for(;p=h&&p<=f}return v?S_(S_({},n),{},{radius:o,angle:G0e(p,n)}):null};function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(e)}var Y0e=["offset"];function X0e(e){return exe(e)||Z0e(e)||J0e(e)||Q0e()}function Q0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J0e(e,t){if(e){if(typeof e=="string")return j1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j1(e,t)}}function Z0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function exe(e){if(Array.isArray(e))return j1(e)}function j1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function C_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t=0?1:-1,w,C;i==="insideStart"?(w=p+b*o,C=m):i==="insideEnd"?(w=v-b*o,C=!m):i==="end"&&(w=v+b*o,C=m),C=x<=0?C:!C;var S=sn(u,d,y,w),j=sn(u,d,y,w+(C?1:-1)*359),P="M".concat(S.x,",").concat(S.y,` + A`).concat(y,",").concat(y,",0,1,").concat(C?0:1,`, + `).concat(j.x,",").concat(j.y),O=De(t.id)?lu("recharts-radial-line-"):t.id;return T.createElement("text",jf({},r,{dominantBaseline:"central",className:Fe("recharts-radial-bar-label",s)}),T.createElement("defs",null,T.createElement("path",{id:O,d:P})),T.createElement("textPath",{xlinkHref:"#".concat(O)},n))},cxe=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,s=a.cy,c=a.innerRadius,u=a.outerRadius,d=a.startAngle,f=a.endAngle,h=(d+f)/2;if(i==="outside"){var p=sn(o,s,u+r,h),v=p.x,m=p.y;return{x:v,y:m,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(c+u)/2,x=sn(o,s,y,h),b=x.x,w=x.y;return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},uxe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,s=o.x,c=o.y,u=o.width,d=o.height,f=d>=0?1:-1,h=f*i,p=f>0?"end":"start",v=f>0?"start":"end",m=u>=0?1:-1,y=m*i,x=m>0?"end":"start",b=m>0?"start":"end";if(a==="top"){var w={x:s+u/2,y:c-f*i,textAnchor:"middle",verticalAnchor:p};return Ut(Ut({},w),r?{height:Math.max(c-r.y,0),width:u}:{})}if(a==="bottom"){var C={x:s+u/2,y:c+d+h,textAnchor:"middle",verticalAnchor:v};return Ut(Ut({},C),r?{height:Math.max(r.y+r.height-(c+d),0),width:u}:{})}if(a==="left"){var S={x:s-y,y:c+d/2,textAnchor:x,verticalAnchor:"middle"};return Ut(Ut({},S),r?{width:Math.max(S.x-r.x,0),height:d}:{})}if(a==="right"){var j={x:s+u+y,y:c+d/2,textAnchor:b,verticalAnchor:"middle"};return Ut(Ut({},j),r?{width:Math.max(r.x+r.width-j.x,0),height:d}:{})}var P=r?{width:u,height:d}:{};return a==="insideLeft"?Ut({x:s+y,y:c+d/2,textAnchor:b,verticalAnchor:"middle"},P):a==="insideRight"?Ut({x:s+u-y,y:c+d/2,textAnchor:x,verticalAnchor:"middle"},P):a==="insideTop"?Ut({x:s+u/2,y:c+h,textAnchor:"middle",verticalAnchor:v},P):a==="insideBottom"?Ut({x:s+u/2,y:c+d-h,textAnchor:"middle",verticalAnchor:p},P):a==="insideTopLeft"?Ut({x:s+y,y:c+h,textAnchor:b,verticalAnchor:v},P):a==="insideTopRight"?Ut({x:s+u-y,y:c+h,textAnchor:x,verticalAnchor:v},P):a==="insideBottomLeft"?Ut({x:s+y,y:c+d-h,textAnchor:b,verticalAnchor:p},P):a==="insideBottomRight"?Ut({x:s+u-y,y:c+d-h,textAnchor:x,verticalAnchor:p},P):ru(a)&&(oe(a.x)||rs(a.x))&&(oe(a.y)||rs(a.y))?Ut({x:s+Ms(a.x,u),y:c+Ms(a.y,d),textAnchor:"end",verticalAnchor:"end"},P):Ut({x:s+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},P)},dxe=function(t){return"cx"in t&&oe(t.cx)};function xn(e){var t=e.offset,n=t===void 0?5:t,r=txe(e,Y0e),i=Ut({offset:n},r),a=i.viewBox,o=i.position,s=i.value,c=i.children,u=i.content,d=i.className,f=d===void 0?"":d,h=i.textBreakAll;if(!a||De(s)&&De(c)&&!g.isValidElement(u)&&!Re(u))return null;if(g.isValidElement(u))return g.cloneElement(u,i);var p;if(Re(u)){if(p=g.createElement(u,i),g.isValidElement(p))return p}else p=oxe(i);var v=dxe(a),m=Me(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return lxe(i,p,m);var y=v?cxe(i):uxe(i);return T.createElement(Zm,jf({className:Fe("recharts-label",f)},m,y,{breakAll:h}),p)}xn.displayName="Label";var L3=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,v=t.left,m=t.width,y=t.height,x=t.clockWise,b=t.labelViewBox;if(b)return b;if(oe(m)&&oe(y)){if(oe(f)&&oe(h))return{x:f,y:h,width:m,height:y};if(oe(p)&&oe(v))return{x:p,y:v,width:m,height:y}}return oe(f)&&oe(h)?{x:f,y:h,width:0,height:0}:oe(n)&&oe(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:d||c||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},fxe=function(t,n){return t?t===!0?T.createElement(xn,{key:"label-implicit",viewBox:n}):Ht(t)?T.createElement(xn,{key:"label-implicit",viewBox:n,value:t}):g.isValidElement(t)?t.type===xn?g.cloneElement(t,{key:"label-implicit",viewBox:n}):T.createElement(xn,{key:"label-implicit",content:t,viewBox:n}):Re(t)?T.createElement(xn,{key:"label-implicit",content:t,viewBox:n}):ru(t)?T.createElement(xn,jf({viewBox:n},t,{key:"label-implicit"})):null:null},hxe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=L3(t),o=Ar(i,xn).map(function(c,u){return g.cloneElement(c,{viewBox:n||a,key:"label-".concat(u)})});if(!r)return o;var s=fxe(t.label,n||a);return[s].concat(X0e(o))};xn.parseViewBox=L3;xn.renderCallByParent=hxe;function pxe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var mxe=pxe;const vxe=Ze(mxe);function Cf(e){"@babel/helpers - typeof";return Cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(e)}var gxe=["valueAccessor"],yxe=["data","dataKey","clockWise","id","textBreakAll"];function xxe(e){return jxe(e)||Sxe(e)||wxe(e)||bxe()}function bxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wxe(e,t){if(e){if(typeof e=="string")return C1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C1(e,t)}}function Sxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jxe(e){if(Array.isArray(e))return C1(e)}function C1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Axe=function(t){return Array.isArray(t.value)?vxe(t.value):t.value};function pa(e){var t=e.valueAccessor,n=t===void 0?Axe:t,r=N_(e,gxe),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,c=r.textBreakAll,u=N_(r,yxe);return!i||!i.length?null:T.createElement(ot,{className:"recharts-label-list"},i.map(function(d,f){var h=De(a)?n(d,f):_n(d&&d.payload,a),p=De(s)?{}:{id:"".concat(s,"-").concat(f)};return T.createElement(xn,vv({},Me(d,!0),u,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:c,viewBox:xn.parseViewBox(De(o)?d:O_(O_({},d),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}pa.displayName="LabelList";function Exe(e,t){return e?e===!0?T.createElement(pa,{key:"labelList-implicit",data:t}):T.isValidElement(e)||Re(e)?T.createElement(pa,{key:"labelList-implicit",data:t,content:e}):ru(e)?T.createElement(pa,vv({data:t},e,{key:"labelList-implicit"})):null:null}function Txe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Ar(r,pa).map(function(o,s){return g.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var a=Exe(e.label,t);return[a].concat(xxe(i))}pa.renderCallByParent=Txe;function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}function P1(){return P1=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, + `).concat(f.x,",").concat(f.y,` + `);if(i>0){var p=sn(n,r,i,o),v=sn(n,r,i,u);h+="L ".concat(v.x,",").concat(v.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`, + `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},$xe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=ti(d-u),h=up({cx:n,cy:r,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:c}),p=h.circleTangency,v=h.lineTangency,m=h.theta,y=up({cx:n,cy:r,radius:a,angle:d,sign:-f,cornerRadius:o,cornerIsExternal:c}),x=y.circleTangency,b=y.lineTangency,w=y.theta,C=c?Math.abs(u-d):Math.abs(u-d)-m-w;if(C<0)return s?"M ".concat(v.x,",").concat(v.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):F3({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d});var S="M ".concat(v.x,",").concat(v.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` + A`).concat(a,",").concat(a,",0,").concat(+(C>180),",").concat(+(f<0),",").concat(x.x,",").concat(x.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` + `);if(i>0){var j=up({cx:n,cy:r,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),P=j.circleTangency,O=j.lineTangency,N=j.theta,A=up({cx:n,cy:r,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),_=A.circleTangency,E=A.lineTangency,k=A.theta,M=c?Math.abs(u-d):Math.abs(u-d)-N-k;if(M<0&&o===0)return"".concat(S,"L").concat(n,",").concat(r,"Z");S+="L".concat(E.x,",").concat(E.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,` + A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(f>0),",").concat(P.x,",").concat(P.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,"Z")}else S+="L".concat(n,",").concat(r,"Z");return S},Dxe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},B3=function(t){var n=E_(E_({},Dxe),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,d=n.startAngle,f=n.endAngle,h=n.className;if(o0&&Math.abs(d-f)<360?y=$xe({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,v/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):y=F3({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:d,endAngle:f}),T.createElement("path",P1({},Me(n,!0),{className:p,d:y,role:"img"}))};function Of(e){"@babel/helpers - typeof";return Of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Of(e)}function O1(){return O1=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Qxe(e,t){return vu(e.getTime(),t.getTime())}function I_(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),a=0,o,s;(o=i.next())&&!o.done;){for(var c=t.entries(),u=!1,d=0;(s=c.next())&&!s.done;){var f=o.value,h=f[0],p=f[1],v=s.value,m=v[0],y=v[1];!u&&!r[d]&&(u=n.equals(h,m,a,d,e,t,n)&&n.equals(p,y,h,m,e,t,n))&&(r[d]=!0),d++}if(!u)return!1;a++}return!0}function Jxe(e,t,n){var r=D_(e),i=r.length;if(D_(t).length!==i)return!1;for(var a;i-- >0;)if(a=r[i],a===H3&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!W3(t,a)||!n.equals(e[a],t[a],a,a,e,t,n))return!1;return!0}function Uu(e,t,n){var r=R_(e),i=r.length;if(R_(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=r[i],a===H3&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!W3(t,a)||!n.equals(e[a],t[a],a,a,e,t,n)||(o=$_(e,a),s=$_(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Zxe(e,t){return vu(e.valueOf(),t.valueOf())}function ebe(e,t){return e.source===t.source&&e.flags===t.flags}function L_(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),a,o;(a=i.next())&&!a.done;){for(var s=t.values(),c=!1,u=0;(o=s.next())&&!o.done;)!c&&!r[u]&&(c=n.equals(a.value,o.value,a.value,o.value,e,t,n))&&(r[u]=!0),u++;if(!c)return!1}return!0}function tbe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var nbe="[object Arguments]",rbe="[object Boolean]",ibe="[object Date]",abe="[object Map]",obe="[object Number]",sbe="[object Object]",lbe="[object RegExp]",cbe="[object Set]",ube="[object String]",dbe=Array.isArray,F_=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,B_=Object.assign,fbe=Object.prototype.toString.call.bind(Object.prototype.toString);function hbe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,a=e.arePrimitiveWrappersEqual,o=e.areRegExpsEqual,s=e.areSetsEqual,c=e.areTypedArraysEqual;return function(d,f,h){if(d===f)return!0;if(d==null||f==null||typeof d!="object"||typeof f!="object")return d!==d&&f!==f;var p=d.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(d,f,h);if(dbe(d))return t(d,f,h);if(F_!=null&&F_(d))return c(d,f,h);if(p===Date)return n(d,f,h);if(p===RegExp)return o(d,f,h);if(p===Map)return r(d,f,h);if(p===Set)return s(d,f,h);var v=fbe(d);return v===ibe?n(d,f,h):v===lbe?o(d,f,h):v===abe?r(d,f,h):v===cbe?s(d,f,h):v===sbe?typeof d.then!="function"&&typeof f.then!="function"&&i(d,f,h):v===nbe?i(d,f,h):v===rbe||v===obe||v===ube?a(d,f,h):!1}}function pbe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Uu:Xxe,areDatesEqual:Qxe,areMapsEqual:r?M_(I_,Uu):I_,areObjectsEqual:r?Uu:Jxe,arePrimitiveWrappersEqual:Zxe,areRegExpsEqual:ebe,areSetsEqual:r?M_(L_,Uu):L_,areTypedArraysEqual:r?Uu:tbe};if(n&&(i=B_({},i,n(i))),t){var a=fp(i.areArraysEqual),o=fp(i.areMapsEqual),s=fp(i.areObjectsEqual),c=fp(i.areSetsEqual);i=B_({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:c})}return i}function mbe(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function vbe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,a=e.strict;if(r)return function(c,u){var d=r(),f=d.cache,h=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return n(c,u,{cache:h,equals:i,meta:p,strict:a})};if(t)return function(c,u){return n(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(c,u){return n(c,u,o)}}var gbe=Bo();Bo({strict:!0});Bo({circular:!0});Bo({circular:!0,strict:!0});Bo({createInternalComparator:function(){return vu}});Bo({strict:!0,createInternalComparator:function(){return vu}});Bo({circular:!0,createInternalComparator:function(){return vu}});Bo({circular:!0,createInternalComparator:function(){return vu},strict:!0});function Bo(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=pbe(e),c=hbe(s),u=r?r(c):mbe(c);return vbe({circular:n,comparator:c,createState:i,equals:u,strict:o})}function ybe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function U_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):ybe(i)};requestAnimationFrame(r)}function N1(e){"@babel/helpers - typeof";return N1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N1(e)}function xbe(e){return jbe(e)||Sbe(e)||wbe(e)||bbe()}function bbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wbe(e,t){if(e){if(typeof e=="string")return z_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z_(e,t)}}function z_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:x<0?0:x},m=function(x){for(var b=x>1?1:x,w=b,C=0;C<8;++C){var S=f(w)-b,j=p(w);if(Math.abs(S-b)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,c=function(d,f,h){var p=-(d-f)*r,v=h*a,m=h+(p-v)*s/1e3,y=h*s/1e3+d;return Math.abs(y-f)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ewe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function kx(e){return iwe(e)||rwe(e)||nwe(e)||twe()}function twe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nwe(e,t){if(e){if(typeof e=="string")return k1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k1(e,t)}}function rwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iwe(e){if(Array.isArray(e))return k1(e)}function k1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xv(e)}var Di=function(e){cwe(n,e);var t=uwe(n);function n(r,i){var a;awe(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,c=o.attributeName,u=o.from,d=o.to,f=o.steps,h=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind($1(a)),a.changeStyle=a.changeStyle.bind($1(a)),!s||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:d}),R1(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof h=="function")return a.state={style:u},R1(a);a.state={style:c?Zu({},c,u):u}}else a.state={style:{}};return a}return swe(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,c=a.attributeName,u=a.shouldReAnimate,d=a.to,f=a.from,h=this.state.style;if(s){if(!o){var p={style:c?Zu({},c,d):d};this.state&&h&&(c&&h[c]!==d||!c&&h!==d)&&this.setState(p);return}if(!(gbe(i.to,d)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||u?f:i.to;if(this.state&&h){var y={style:c?Zu({},c,m):m};(c&&h[c]!==m||!c&&h!==m)&&this.setState(y)}this.runAnimation(Ur(Ur({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,c=i.duration,u=i.easing,d=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=Qbe(o,s,Bbe(u),c,this.changeStyle),v=function(){a.stopJSAnimation=p()};this.manager.start([h,d,v,c,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,c=i.onAnimationStart,u=o[0],d=u.style,f=u.duration,h=f===void 0?0:f,p=function(m,y,x){if(x===0)return m;var b=y.duration,w=y.easing,C=w===void 0?"ease":w,S=y.style,j=y.properties,P=y.onAnimationEnd,O=x>0?o[x-1]:y,N=j||Object.keys(S);if(typeof C=="function"||C==="spring")return[].concat(kx(m),[a.runJSAnimation.bind(a,{from:O.style,to:S,duration:b,easing:C}),b]);var A=H_(N,b,C),_=Ur(Ur(Ur({},O.style),S),{},{transition:A});return[].concat(kx(m),[_,b,P]).filter(Abe)};return this.manager.start([c].concat(kx(o.reduce(p,[d,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Cbe());var a=i.begin,o=i.duration,s=i.attributeName,c=i.to,u=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=s?Zu({},s,c):c,y=H_(Object.keys(m),o,u);v.start([d,a,Ur(Ur({},m),{},{transition:y}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=Zbe(i,Jbe),u=g.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!s||u===0||o<=0)return a;var f=function(p){var v=p.props,m=v.style,y=m===void 0?{}:m,x=v.className,b=g.cloneElement(p,Ur(Ur({},c),{},{style:Ur(Ur({},y),d),className:x}));return b};return u===1?f(g.Children.only(a)):T.createElement("div",null,g.Children.map(a,function(h){return f(h)}))}}]),n}(g.PureComponent);Di.displayName="Animate";Di.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Di.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function bv(){return bv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,c=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,d;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,p=4;ho?o:a[h];d="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(n)),d+="L ".concat(t+r-c*f[1],",").concat(n),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, + `).concat(t+r,",").concat(n+s*f[1])),d+="L ".concat(t+r,",").concat(n+i-s*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, + `).concat(t+r-c*f[2],",").concat(n+i)),d+="L ".concat(t+c*f[3],",").concat(n+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, + `).concat(t,",").concat(n+i-s*f[3])),d+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);d="M ".concat(t,",").concat(n+s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+c*v,",").concat(n,` + L `).concat(t+r-c*v,",").concat(n,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*v,` + L `).concat(t+r,",").concat(n+i-s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+r-c*v,",").concat(n+i,` + L `).concat(t+c*v,",").concat(n+i,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(n+i-s*v," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},bwe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,c=n.height;if(Math.abs(s)>0&&Math.abs(c)>0){var u=Math.min(a,a+s),d=Math.max(a,a+s),f=Math.min(o,o+c),h=Math.max(o,o+c);return r>=u&&r<=d&&i>=f&&i<=h}return!1},wwe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},WP=function(t){var n=Z_(Z_({},wwe),t),r=g.useRef(),i=g.useState(-1),a=fwe(i,2),o=a[0],s=a[1];g.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var C=r.current.getTotalLength();C&&s(C)}catch{}},[]);var c=n.x,u=n.y,d=n.width,f=n.height,h=n.radius,p=n.className,v=n.animationEasing,m=n.animationDuration,y=n.animationBegin,x=n.isAnimationActive,b=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var w=Fe("recharts-rectangle",p);return b?T.createElement(Di,{canBegin:o>0,from:{width:d,height:f,x:c,y:u},to:{width:d,height:f,x:c,y:u},duration:m,animationEasing:v,isActive:b},function(C){var S=C.width,j=C.height,P=C.x,O=C.y;return T.createElement(Di,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:x,easing:v},T.createElement("path",bv({},Me(n,!0),{className:w,d:ek(P,O,S,j,h),ref:r})))}):T.createElement("path",bv({},Me(n,!0),{className:w,d:ek(c,u,d,f,h)}))};function D1(){return D1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Awe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ewe=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},Twe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,v=t.className,m=Nwe(t,Swe),y=jwe({x:r,y:a,top:s,left:u,width:f,height:p},m);return!oe(r)||!oe(a)||!oe(f)||!oe(p)||!oe(s)||!oe(u)?null:T.createElement("path",I1({},Me(y,!0),{className:Fe("recharts-cross",v),d:Ewe(r,a,f,p,s,u)}))},_we=d5,kwe=_we(Object.getPrototypeOf,Object),Mwe=kwe,Rwe=Ta,$we=Mwe,Dwe=_a,Iwe="[object Object]",Lwe=Function.prototype,Fwe=Object.prototype,J3=Lwe.toString,Bwe=Fwe.hasOwnProperty,Uwe=J3.call(Object);function zwe(e){if(!Dwe(e)||Rwe(e)!=Iwe)return!1;var t=$we(e);if(t===null)return!0;var n=Bwe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&J3.call(n)==Uwe}var Vwe=zwe;const Wwe=Ze(Vwe);var Hwe=Ta,Kwe=_a,qwe="[object Boolean]";function Gwe(e){return e===!0||e===!1||Kwe(e)&&Hwe(e)==qwe}var Ywe=Gwe;const Xwe=Ze(Ywe);function _f(e){"@babel/helpers - typeof";return _f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_f(e)}function wv(){return wv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:h,x:c,y:u},duration:m,animationEasing:v,isActive:x},function(w){var C=w.upperWidth,S=w.lowerWidth,j=w.height,P=w.x,O=w.y;return T.createElement(Di,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:v},T.createElement("path",wv({},Me(n,!0),{className:b,d:ak(P,O,C,S,j),ref:r})))}):T.createElement("g",null,T.createElement("path",wv({},Me(n,!0),{className:b,d:ak(c,u,d,f,h)})))},s1e=["option","shapeType","propTransformer","activeClassName","isActive"];function kf(e){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(e)}function l1e(e,t){if(e==null)return{};var n=c1e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function c1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ok(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sv(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),qn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),qn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),qn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),qn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),qn(r,"handleSlideDragStart",function(i){var a=hk(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return G1e(t,e),W1e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,c=s.gap,u=s.data,d=u.length-1,f=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(o,f),v=t.getIndexInRange(o,h);return{startIndex:p-p%c,endIndex:v===d?d:v-v%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,c=_n(a[r],s,r);return Re(o)?o(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,h=c.startIndex,p=c.endIndex,v=c.onChange,m=r.pageX-a;m>0?m=Math.min(m,u+d-f-s,u+d-f-o):m<0&&(m=Math.max(m,u-o,u-s));var y=this.getIndex({startX:o+m,endX:s+m});(y.startIndex!==h||y.endIndex!==p)&&v&&v(y),this.setState({startX:o+m,endX:s+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=hk(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,c=i.startX,u=this.state[o],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,v=d.onChange,m=d.gap,y=d.data,x={startX:this.state.startX,endX:this.state.endX},b=r.pageX-a;b>0?b=Math.min(b,f+h-p-u):b<0&&(b=Math.max(b,f-u)),x[o]=u+b;var w=this.getIndex(x),C=w.startIndex,S=w.endIndex,j=function(){var O=y.length-1;return o==="startX"&&(s>c?C%m===0:S%m===0)||sc?S%m===0:C%m===0)||s>c&&S===O};this.setState(qn(qn({},o,u+b),"brushMoveStartX",r.pageX),function(){v&&j()&&v(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,c=o.startX,u=o.endX,d=this.state[i],f=s.indexOf(d);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=u||i==="endX"&&p<=c||this.setState(qn({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,c=r.fill,u=r.stroke;return T.createElement("rect",{stroke:u,fill:c,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,c=r.data,u=r.children,d=r.padding,f=g.Children.only(u);return f?T.cloneElement(f,{x:i,y:a,width:o,height:s,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,s=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,h=c.traveller,p=c.ariaLabel,v=c.data,m=c.startIndex,y=c.endIndex,x=Math.max(r,this.props.x),b=Rx(Rx({},Me(this.props,!1)),{},{x,y:u,width:d,height:f}),w=p||"Min value: ".concat((a=v[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[y])===null||o===void 0?void 0:o.name);return T.createElement(ot,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),s.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,b))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,c=a.stroke,u=a.travellerWidth,d=Math.min(r,i)+u,f=Math.max(Math.abs(i-r)-u,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:o,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,c=r.travellerWidth,u=r.stroke,d=this.state,f=d.startX,h=d.endX,p=5,v={pointerEvents:"none",fill:u};return T.createElement(ot,{className:"recharts-brush-texts"},T.createElement(Zm,Cv({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:o+s/2},v),this.getTextOfTick(i)),T.createElement(Zm,Cv({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+c+p,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,c=r.y,u=r.width,d=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,v=h.endX,m=h.isTextActive,y=h.isSlideMoving,x=h.isTravellerMoving,b=h.isTravellerFocused;if(!i||!i.length||!oe(s)||!oe(c)||!oe(u)||!oe(d)||u<=0||d<=0)return null;var w=Fe("recharts-brush",a),C=T.Children.count(o)===1,S=z1e("userSelect","none");return T.createElement(ot,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(m||y||x||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,c=r.stroke,u=Math.floor(a+s/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:i,y:a,width:o,height:s,fill:c,stroke:"none"}),T.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return T.isValidElement(r)?a=T.cloneElement(r,i):Re(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,c=r.travellerWidth,u=r.updateId,d=r.startIndex,f=r.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return Rx({prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?X1e({data:a,width:o,x:s,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([s,s+o-c]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var c=Math.floor((o+s)/2);r[c]>i?s=c:o=c}return i>=r[s]?s:o}}])}(g.PureComponent);qn(Oc,"displayName","Brush");qn(Oc,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Q1e=vP;function J1e(e,t){var n;return Q1e(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var Z1e=J1e,eSe=r5,tSe=fu,nSe=Z1e,rSe=Hn,iSe=fy;function aSe(e,t,n){var r=rSe(e)?eSe:nSe;return n&&iSe(e,t,n)&&(t=void 0),r(e,tSe(t))}var oSe=aSe;const sSe=Ze(oSe);var Mi=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},pk=C5;function lSe(e,t,n){t=="__proto__"&&pk?pk(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var cSe=lSe,uSe=cSe,dSe=S5,fSe=fu;function hSe(e,t){var n={};return t=fSe(t),dSe(e,function(r,i,a){uSe(n,i,t(r,i,a))}),n}var pSe=hSe;const mSe=Ze(pSe);function vSe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $Se(e,t){var n=e.x,r=e.y,i=MSe(e,ESe),a="".concat(n),o=parseInt(a,10),s="".concat(r),c=parseInt(s,10),u="".concat(t.height||i.height),d=parseInt(u,10),f="".concat(t.width||i.width),h=parseInt(f,10);return zu(zu(zu(zu(zu({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function vk(e){return T.createElement(v1e,F1({shapeType:"rectangle",propTransformer:$Se,activeClassName:"recharts-active-bar"},e))}var DSe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=typeof r=="number";return a?t(r,i):(a||$s(),n)}},ISe=["value","background"],nB;function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function LSe(e,t){if(e==null)return{};var n=FSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs($)0&&Math.abs(M)0&&(k=Math.min((J||0)-(M[ae-1]||0),k))}),Number.isFinite(k)){var $=k/E,D=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(P=$*D/2),m.padding==="no-gap"){var B=Ms(t.barCategoryGap,$*D),I=$*D/2;P=I-B-(I-B)/D*B}}}i==="xAxis"?O=[r.left+(w.left||0)+(P||0),r.left+r.width-(w.right||0)-(P||0)]:i==="yAxis"?O=c==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(P||0),r.top+r.height-(w.bottom||0)-(P||0)]:O=m.range,S&&(O=[O[1],O[0]]);var R=A0e(m,a,h),F=R.scale,z=R.realScaleType;F.domain(x).range(O),E0e(F);var U=I0e(F,Yr(Yr({},m),{},{realScaleType:z}));i==="xAxis"?(_=y==="top"&&!C||y==="bottom"&&C,N=r.left,A=f[j]-_*m.height):i==="yAxis"&&(_=y==="left"&&!C||y==="right"&&C,N=f[j]-_*m.width,A=r.top);var H=Yr(Yr(Yr({},m),U),{},{realScaleType:z,x:N,y:A,scale:F,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return H.bandSize=pv(H,U),!m.hide&&i==="xAxis"?f[j]+=(_?-1:1)*H.height:m.hide||(f[j]+=(_?-1:1)*H.width),Yr(Yr({},p),{},Py({},v,H))},{})},sB=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},XSe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return sB({x:n,y:r},{x:i,y:a})},lB=function(){function e(t){qSe(this,e),this.scale=t}return GSe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();Py(lB,"EPS",1e-4);var HP=function(t){var n=Object.keys(t).reduce(function(r,i){return Yr(Yr({},r),{},Py({},i,lB.create(t[i])))},{});return Yr(Yr({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return mSe(i,function(c,u){return n[u].apply(c,{bandAware:o,position:s})})},isInRange:function(i){return ASe(i,function(a,o){return n[o].isInRange(a)})}})};function QSe(e){return(e%180+180)%180}var JSe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=QSe(i),o=a*Math.PI/180,s=Math.atan(r/n),c=o>s&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function Fje(e,t){return PB(e,t+1)}function Bje(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,u=1,d=o,f=function(){var v=r==null?void 0:r[c];if(v===void 0)return{v:PB(r,u)};var m=c,y,x=function(){return y===void 0&&(y=n(v,m)),y},b=v.coordinate,w=c===0||_v(e,b,x,d,s);w||(c=0,d=o,u+=1),w&&(d=b+e*(x()/2+i),c+=u)},h;u<=a.length;)if(h=f(),h)return h.v;return[]}function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function Ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t0?p.coordinate-y*e:p.coordinate})}else a[h]=p=vn(vn({},p),{},{tickCoord:p.coordinate});var x=_v(e,p.tickCoord,m,s,c);x&&(c=p.tickCoord-e*(m()/2+i),a[h]=vn(vn({},p),{},{isShow:!0}))},d=o-1;d>=0;d--)u(d);return a}function Hje(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,u=t.end;if(a){var d=r[s-1],f=n(d,s-1),h=e*(d.coordinate+e*f/2-u);o[s-1]=d=vn(vn({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=_v(e,d.tickCoord,function(){return f},c,u);p&&(u=d.tickCoord-e*(f/2+i),o[s-1]=vn(vn({},d),{},{isShow:!0}))}for(var v=a?s-1:s,m=function(b){var w=o[b],C,S=function(){return C===void 0&&(C=n(w,b)),C};if(b===0){var j=e*(w.coordinate-e*S()/2-c);o[b]=w=vn(vn({},w),{},{tickCoord:j<0?w.coordinate-j*e:w.coordinate})}else o[b]=w=vn(vn({},w),{},{tickCoord:w.coordinate});var P=_v(e,w.tickCoord,S,c,u);P&&(c=w.tickCoord+e*(S()/2+i),o[b]=vn(vn({},w),{},{isShow:!0}))},y=0;y=2?ti(i[1].coordinate-i[0].coordinate):1,x=Lje(a,y,p);return c==="equidistantPreserveStart"?Bje(y,x,m,i,o):(c==="preserveStart"||c==="preserveStartEnd"?h=Hje(y,x,m,i,o,c==="preserveStartEnd"):h=Wje(y,x,m,i,o),h.filter(function(b){return b.isShow}))}var qje=["viewBox"],Gje=["viewBox"],Yje=["ticks"];function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _k(e,t){for(var n=0;n0?c(this.props):c(p)),o<=0||s<=0||!v||!v.length?null:T.createElement(ot,{className:Fe("recharts-cartesian-axis",u),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),xn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o;return T.isValidElement(r)?o=T.cloneElement(r,i):Re(r)?o=r(i):o=T.createElement(Zm,jl({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(g.Component);GP(Ty,"displayName","CartesianAxis");GP(Ty,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var iCe=["type","layout","connectNulls","ref"],aCe=["key"];function kc(e){"@babel/helpers - typeof";return kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kc(e)}function kk(e,t){if(e==null)return{};var n=oCe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oCe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wd(){return wd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nf){p=[].concat(nl(c.slice(0,v)),[f-m]);break}var y=p.length%2===0?[0,h]:[h];return[].concat(nl(t.repeat(c,d)),nl(p),y).map(function(x){return"".concat(x,"px")}).join(", ")}),Xr(n,"id",lu("recharts-line-")),Xr(n,"pathRef",function(o){n.mainCurve=o}),Xr(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Xr(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return vCe(t,e),fCe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,c=a.yAxis,u=a.layout,d=a.children,f=Ar(d,vh);if(!f)return null;var h=function(m,y){return{x:m.x,y:m.y,value:m.value,errorVal:_n(m.payload,y)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return T.createElement(ot,p,f.map(function(v){return T.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,c=s.dot,u=s.points,d=s.dataKey,f=Me(this.props,!1),h=Me(c,!0),p=u.map(function(m,y){var x=Kn(Kn(Kn({key:"dot-".concat(y),r:3},f),h),{},{value:m.value,dataKey:d,cx:m.x,cy:m.y,index:y,payload:m.payload});return t.renderDotItem(c,x)}),v={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return T.createElement(ot,wd({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(r,i,a,o){var s=this.props,c=s.type,u=s.layout,d=s.connectNulls;s.ref;var f=kk(s,iCe),h=Kn(Kn(Kn({},Me(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:r},o),{},{type:c,layout:u,connectNulls:d});return T.createElement(Bl,wd({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var a=this,o=this.props,s=o.points,c=o.strokeDasharray,u=o.isAnimationActive,d=o.animationBegin,f=o.animationDuration,h=o.animationEasing,p=o.animationId,v=o.animateNewValues,m=o.width,y=o.height,x=this.state,b=x.prevPoints,w=x.totalLength;return T.createElement(Di,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var S=C.t;if(b){var j=b.length/s.length,P=s.map(function(E,k){var M=Math.floor(k*j);if(b[M]){var $=b[M],D=on($.x,E.x),B=on($.y,E.y);return Kn(Kn({},E),{},{x:D(S),y:B(S)})}if(v){var I=on(m*2,E.x),R=on(y/2,E.y);return Kn(Kn({},E),{},{x:I(S),y:R(S)})}return Kn(Kn({},E),{},{x:E.x,y:E.y})});return a.renderCurveStatically(P,r,i)}var O=on(0,w),N=O(S),A;if(c){var _="".concat(c).split(/[,\s]+/gim).map(function(E){return parseFloat(E)});A=a.getStrokeDasharray(N,w,_)}else A=a.generateSimpleStrokeDasharray(w,N);return a.renderCurveStatically(s,r,i,{strokeDasharray:A})})}},{key:"renderCurve",value:function(r,i){var a=this.props,o=a.points,s=a.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return s&&o&&o.length&&(!u&&d>0||!Sc(u,o))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(o,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,s=i.points,c=i.className,u=i.xAxis,d=i.yAxis,f=i.top,h=i.left,p=i.width,v=i.height,m=i.isAnimationActive,y=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,b=s.length===1,w=Fe("recharts-line",c),C=u&&u.allowDataOverflow,S=d&&d.allowDataOverflow,j=C||S,P=De(y)?this.id:y,O=(r=Me(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=O.r,A=N===void 0?3:N,_=O.strokeWidth,E=_===void 0?2:_,k=AF(o)?o:{},M=k.clipDot,$=M===void 0?!0:M,D=A*2+E;return T.createElement(ot,{className:w},C||S?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(P)},T.createElement("rect",{x:C?h:h-p/2,y:S?f:f-v/2,width:C?p:p*2,height:S?v:v*2})),!$&&T.createElement("clipPath",{id:"clipPath-dots-".concat(P)},T.createElement("rect",{x:h-D/2,y:f-D/2,width:p+D,height:v+D}))):null,!b&&this.renderCurve(j,P),this.renderErrorBar(j,P),(b||o)&&this.renderDots(j,$,P),(!m||x)&&pa.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var a=r.length%2!==0?[].concat(nl(r),[0]):r,o=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bCe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Sc(d,o)||!Sc(f,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,s,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,s=i.points,c=i.className,u=i.top,d=i.left,f=i.xAxis,h=i.yAxis,p=i.width,v=i.height,m=i.isAnimationActive,y=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,b=s.length===1,w=Fe("recharts-area",c),C=f&&f.allowDataOverflow,S=h&&h.allowDataOverflow,j=C||S,P=De(y)?this.id:y,O=(r=Me(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=O.r,A=N===void 0?3:N,_=O.strokeWidth,E=_===void 0?2:_,k=AF(o)?o:{},M=k.clipDot,$=M===void 0?!0:M,D=A*2+E;return T.createElement(ot,{className:w},C||S?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(P)},T.createElement("rect",{x:C?d:d-p/2,y:S?u:u-v/2,width:C?p:p*2,height:S?v:v*2})),!$&&T.createElement("clipPath",{id:"clipPath-dots-".concat(P)},T.createElement("rect",{x:d-D/2,y:u-D/2,width:p+D,height:v+D}))):null,b?null:this.renderArea(j,P),(o||b)&&this.renderDots(j,$,P),(!m||x)&&pa.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(g.PureComponent);TB=Uo;Ci(Uo,"displayName","Area");Ci(Uo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!_i.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ci(Uo,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(oe(s)&&typeof s=="number")return s;var c=i==="horizontal"?r:n,u=c.scale.domain();if(c.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});Ci(Uo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,v=u&&u.length,m=TB.getBaseValue(t,n,r,i),y=p==="horizontal",x=!1,b=f.map(function(C,S){var j;v?j=u[d+S]:(j=_n(C,c),Array.isArray(j)?x=!0:j=[m,j]);var P=j[1]==null||v&&_n(C,c)==null;return y?{x:hv({axis:r,ticks:a,bandSize:s,entry:C,index:S}),y:P?null:i.scale(j[1]),value:j,payload:C}:{x:P?null:r.scale(j[1]),y:hv({axis:i,ticks:o,bandSize:s,entry:C,index:S}),value:j,payload:C}}),w;return v||x?w=b.map(function(C){var S=Array.isArray(C.value)?C.value[0]:null;return y?{x:C.x,y:S!=null&&C.y!=null?i.scale(S):null}:{x:S!=null?r.scale(S):null,y:C.y}}):w=y?i.scale(m):r.scale(m),Ua({points:b,baseLine:w,layout:p,isRange:x},h)});Ci(Uo,"renderDotItem",function(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(Re(e))n=e(t);else{var r=Fe("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=_B(t,xCe);n=T.createElement(Sy,ss({},a,{key:i,className:r}))}return n});function $c(e){"@babel/helpers - typeof";return $c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(e)}function ACe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ECe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function vPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gPe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?o:t&&t.length&&oe(i)&&oe(a)?t.slice(i,a+1):[]};function qB(e){return e==="number"?[0,"auto"]:void 0}var aS=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=_y(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?s:f;h=Im(p,o.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Lc(c),[I3(u,h)]):c},[])},zk=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=EPe(a,r),s=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=S0e(o,s,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,h=aS(t,n,d,f),p=TPe(r,s,d,a);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},_Pe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=$3(d,a);return r.reduce(function(v,m){var y,x=m.type.defaultProps!==void 0?Y(Y({},m.type.defaultProps),m.props):m.props,b=x.type,w=x.dataKey,C=x.allowDataOverflow,S=x.allowDuplicatedCategory,j=x.scale,P=x.ticks,O=x.includeHidden,N=x[o];if(v[N])return v;var A=_y(t.data,{graphicalItems:i.filter(function(U){var H,J=o in U.props?U.props[o]:(H=U.type.defaultProps)===null||H===void 0?void 0:H[o];return J===N}),dataStartIndex:c,dataEndIndex:u}),_=A.length,E,k,M;rPe(x.domain,C,b)&&(E=S1(x.domain,null,C),p&&(b==="number"||j!=="auto")&&(M=xd(A,w,"category")));var $=qB(b);if(!E||E.length===0){var D,B=(D=x.domain)!==null&&D!==void 0?D:$;if(w){if(E=xd(A,w,b),b==="category"&&p){var I=uie(E);S&&I?(k=E,E=jv(0,_)):S||(E=b_(B,E,m).reduce(function(U,H){return U.indexOf(H)>=0?U:[].concat(Lc(U),[H])},[]))}else if(b==="category")S?E=E.filter(function(U){return U!==""&&!De(U)}):E=b_(B,E,m).reduce(function(U,H){return U.indexOf(H)>=0||H===""||De(H)?U:[].concat(Lc(U),[H])},[]);else if(b==="number"){var R=N0e(A,i.filter(function(U){var H,J,ae=o in U.props?U.props[o]:(H=U.type.defaultProps)===null||H===void 0?void 0:H[o],ee="hide"in U.props?U.props.hide:(J=U.type.defaultProps)===null||J===void 0?void 0:J.hide;return ae===N&&(O||!ee)}),w,a,d);R&&(E=R)}p&&(b==="number"||j!=="auto")&&(M=xd(A,w,"category"))}else p?E=jv(0,_):s&&s[N]&&s[N].hasStack&&b==="number"?E=h==="expand"?[0,1]:D3(s[N].stackGroups,c,u):E=R3(A,i.filter(function(U){var H=o in U.props?U.props[o]:U.type.defaultProps[o],J="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return H===N&&(O||!J)}),b,d,!0);if(b==="number")E=nS(f,E,N,a,P),B&&(E=S1(B,E,C));else if(b==="category"&&B){var F=B,z=E.every(function(U){return F.indexOf(U)>=0});z&&(E=F)}}return Y(Y({},v),{},ye({},N,Y(Y({},x),{},{axisType:a,domain:E,categoricalDomain:M,duplicateDomain:k,originalDomain:(y=x.domain)!==null&&y!==void 0?y:$,isCategorical:p,layout:d})))},{})},kPe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,h=_y(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),p=h.length,v=$3(d,a),m=-1;return r.reduce(function(y,x){var b=x.type.defaultProps!==void 0?Y(Y({},x.type.defaultProps),x.props):x.props,w=b[o],C=qB("number");if(!y[w]){m++;var S;return v?S=jv(0,p):s&&s[w]&&s[w].hasStack?(S=D3(s[w].stackGroups,c,u),S=nS(f,S,w,a)):(S=S1(C,R3(h,r.filter(function(j){var P,O,N=o in j.props?j.props[o]:(P=j.type.defaultProps)===null||P===void 0?void 0:P[o],A="hide"in j.props?j.props.hide:(O=j.type.defaultProps)===null||O===void 0?void 0:O.hide;return N===w&&!A}),"number",d),i.defaultProps.allowDataOverflow),S=nS(f,S,w,a)),Y(Y({},y),{},ye({},w,Y(Y({axisType:a},i.defaultProps),{},{hide:!0,orientation:Nr(NPe,"".concat(a,".").concat(m%2),null),domain:S,originalDomain:C,isCategorical:v,layout:d})))}return y},{})},MPe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.children,f="".concat(i,"Id"),h=Ar(d,a),p={};return h.length?p=_Pe(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(p=kPe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:c,dataEndIndex:u})),p},RPe=function(t){var n=il(t),r=os(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:gP(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:pv(n,r)}},Vk=function(t){var n=t.children,r=t.defaultShowTooltip,i=Qn(n,Oc),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},$Pe=function(t){return!t||!t.length?!1:t.some(function(n){var r=fa(n&&n.type);return r&&r.indexOf("Bar")>=0})},Wk=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},DPe=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,c=s===void 0?{}:s,u=r.width,d=r.height,f=r.children,h=r.margin||{},p=Qn(f,Oc),v=Qn(f,Il),m=Object.keys(c).reduce(function(S,j){var P=c[j],O=P.orientation;return!P.mirror&&!P.hide?Y(Y({},S),{},ye({},O,S[O]+P.width)):S},{left:h.left||0,right:h.right||0}),y=Object.keys(o).reduce(function(S,j){var P=o[j],O=P.orientation;return!P.mirror&&!P.hide?Y(Y({},S),{},ye({},O,Nr(S,"".concat(O))+P.height)):S},{top:h.top||0,bottom:h.bottom||0}),x=Y(Y({},y),m),b=x.bottom;p&&(x.bottom+=p.props.height||Oc.defaultProps.height),v&&n&&(x=P0e(x,i,r,n));var w=u-x.left-x.right,C=d-x.top-x.bottom;return Y(Y({brushBottom:b},x),{},{width:Math.max(w,0),height:Math.max(C,0)})},IPe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},GB=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(x,b){var w=b.graphicalItems,C=b.stackGroups,S=b.offset,j=b.updateId,P=b.dataStartIndex,O=b.dataEndIndex,N=x.barSize,A=x.layout,_=x.barGap,E=x.barCategoryGap,k=x.maxBarSize,M=Wk(A),$=M.numericAxisName,D=M.cateAxisName,B=$Pe(w),I=[];return w.forEach(function(R,F){var z=_y(x.data,{graphicalItems:[R],dataStartIndex:P,dataEndIndex:O}),U=R.type.defaultProps!==void 0?Y(Y({},R.type.defaultProps),R.props):R.props,H=U.dataKey,J=U.maxBarSize,ae=U["".concat($,"Id")],ee=U["".concat(D,"Id")],q={},se=c.reduce(function(ue,we){var $e=b["".concat(we.axisType,"Map")],$t=U["".concat(we.axisType,"Id")];$e&&$e[$t]||we.axisType==="zAxis"||$s();var jn=$e[$t];return Y(Y({},ue),{},ye(ye({},we.axisType,jn),"".concat(we.axisType,"Ticks"),os(jn)))},q),X=se[D],Z=se["".concat(D,"Ticks")],te=C&&C[ae]&&C[ae].hasStack&&F0e(R,C[ae].stackGroups),W=fa(R.type).indexOf("Bar")>=0,Se=pv(X,Z),be=[],ze=B&&j0e({barSize:N,stackGroups:C,totalSize:IPe(se,D)});if(W){var He,Xe,tn=De(J)?k:J,dn=(He=(Xe=pv(X,Z,!0))!==null&&Xe!==void 0?Xe:tn)!==null&&He!==void 0?He:0;be=C0e({barGap:_,barCategoryGap:E,bandSize:dn!==Se?dn:Se,sizeList:ze[ee],maxBarSize:tn}),dn!==Se&&(be=be.map(function(ue){return Y(Y({},ue),{},{position:Y(Y({},ue.position),{},{offset:ue.position.offset-dn/2})})}))}var G=R&&R.type&&R.type.getComposedData;G&&I.push({props:Y(Y({},G(Y(Y({},se),{},{displayedData:z,props:x,dataKey:H,item:R,bandSize:Se,barPosition:be,offset:S,stackedData:te,layout:A,dataStartIndex:P,dataEndIndex:O}))),{},ye(ye(ye({key:R.key||"item-".concat(F)},$,se[$]),D,se[D]),"animationId",j)),childIndex:wie(R,x.children),item:R})}),I},p=function(x,b){var w=x.props,C=x.dataStartIndex,S=x.dataEndIndex,j=x.updateId;if(!p2({props:w}))return null;var P=w.children,O=w.layout,N=w.stackOffset,A=w.data,_=w.reverseStackOrder,E=Wk(O),k=E.numericAxisName,M=E.cateAxisName,$=Ar(P,r),D=D0e(A,$,"".concat(k,"Id"),"".concat(M,"Id"),N,_),B=c.reduce(function(U,H){var J="".concat(H.axisType,"Map");return Y(Y({},U),{},ye({},J,MPe(w,Y(Y({},H),{},{graphicalItems:$,stackGroups:H.axisType===k&&D,dataStartIndex:C,dataEndIndex:S}))))},{}),I=DPe(Y(Y({},B),{},{props:w,graphicalItems:$}),b==null?void 0:b.legendBBox);Object.keys(B).forEach(function(U){B[U]=d(w,B[U],I,U.replace("Map",""),n)});var R=B["".concat(M,"Map")],F=RPe(R),z=h(w,Y(Y({},B),{},{dataStartIndex:C,dataEndIndex:S,updateId:j,graphicalItems:$,stackGroups:D,offset:I}));return Y(Y({formattedGraphicalItems:z,graphicalItems:$,offset:I,stackGroups:D},F),B)},v=function(y){function x(b){var w,C,S;return vPe(this,x),S=xPe(this,x,[b]),ye(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ye(S,"accessibilityManager",new nPe),ye(S,"handleLegendBBoxUpdate",function(j){if(j){var P=S.state,O=P.dataStartIndex,N=P.dataEndIndex,A=P.updateId;S.setState(Y({legendBBox:j},p({props:S.props,dataStartIndex:O,dataEndIndex:N,updateId:A},Y(Y({},S.state),{},{legendBBox:j}))))}}),ye(S,"handleReceiveSyncEvent",function(j,P,O){if(S.props.syncId===j){if(O===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(P)}}),ye(S,"handleBrushChange",function(j){var P=j.startIndex,O=j.endIndex;if(P!==S.state.dataStartIndex||O!==S.state.dataEndIndex){var N=S.state.updateId;S.setState(function(){return Y({dataStartIndex:P,dataEndIndex:O},p({props:S.props,dataStartIndex:P,dataEndIndex:O,updateId:N},S.state))}),S.triggerSyncEvent({dataStartIndex:P,dataEndIndex:O})}}),ye(S,"handleMouseEnter",function(j){var P=S.getMouseInfo(j);if(P){var O=Y(Y({},P),{},{isTooltipActive:!0});S.setState(O),S.triggerSyncEvent(O);var N=S.props.onMouseEnter;Re(N)&&N(O,j)}}),ye(S,"triggeredAfterMouseMove",function(j){var P=S.getMouseInfo(j),O=P?Y(Y({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(O),S.triggerSyncEvent(O);var N=S.props.onMouseMove;Re(N)&&N(O,j)}),ye(S,"handleItemMouseEnter",function(j){S.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),ye(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),ye(S,"handleMouseMove",function(j){j.persist(),S.throttleTriggeredAfterMouseMove(j)}),ye(S,"handleMouseLeave",function(j){S.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};S.setState(P),S.triggerSyncEvent(P);var O=S.props.onMouseLeave;Re(O)&&O(P,j)}),ye(S,"handleOuterEvent",function(j){var P=bie(j),O=Nr(S.props,"".concat(P));if(P&&Re(O)){var N,A;/.*touch.*/i.test(P)?A=S.getMouseInfo(j.changedTouches[0]):A=S.getMouseInfo(j),O((N=A)!==null&&N!==void 0?N:{},j)}}),ye(S,"handleClick",function(j){var P=S.getMouseInfo(j);if(P){var O=Y(Y({},P),{},{isTooltipActive:!0});S.setState(O),S.triggerSyncEvent(O);var N=S.props.onClick;Re(N)&&N(O,j)}}),ye(S,"handleMouseDown",function(j){var P=S.props.onMouseDown;if(Re(P)){var O=S.getMouseInfo(j);P(O,j)}}),ye(S,"handleMouseUp",function(j){var P=S.props.onMouseUp;if(Re(P)){var O=S.getMouseInfo(j);P(O,j)}}),ye(S,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),ye(S,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseDown(j.changedTouches[0])}),ye(S,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseUp(j.changedTouches[0])}),ye(S,"handleDoubleClick",function(j){var P=S.props.onDoubleClick;if(Re(P)){var O=S.getMouseInfo(j);P(O,j)}}),ye(S,"handleContextMenu",function(j){var P=S.props.onContextMenu;if(Re(P)){var O=S.getMouseInfo(j);P(O,j)}}),ye(S,"triggerSyncEvent",function(j){S.props.syncId!==void 0&&Dx.emit(Ix,S.props.syncId,j,S.eventEmitterSymbol)}),ye(S,"applySyncEvent",function(j){var P=S.props,O=P.layout,N=P.syncMethod,A=S.state.updateId,_=j.dataStartIndex,E=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)S.setState(Y({dataStartIndex:_,dataEndIndex:E},p({props:S.props,dataStartIndex:_,dataEndIndex:E,updateId:A},S.state)));else if(j.activeTooltipIndex!==void 0){var k=j.chartX,M=j.chartY,$=j.activeTooltipIndex,D=S.state,B=D.offset,I=D.tooltipTicks;if(!B)return;if(typeof N=="function")$=N(I,j);else if(N==="value"){$=-1;for(var R=0;R=0){var te,W;if(k.dataKey&&!k.allowDuplicatedCategory){var Se=typeof k.dataKey=="function"?Z:"payload.".concat(k.dataKey.toString());te=Im(R,Se,$),W=F&&z&&Im(z,Se,$)}else te=R==null?void 0:R[M],W=F&&z&&z[M];if(ee||ae){var be=j.props.activeIndex!==void 0?j.props.activeIndex:M;return[g.cloneElement(j,Y(Y(Y({},N.props),se),{},{activeIndex:be})),null,null]}if(!De(te))return[X].concat(Lc(S.renderActivePoints({item:N,activePoint:te,basePoint:W,childIndex:M,isRange:F})))}else{var ze,He=(ze=S.getItemByXY(S.state.activeCoordinate))!==null&&ze!==void 0?ze:{graphicalItem:X},Xe=He.graphicalItem,tn=Xe.item,dn=tn===void 0?j:tn,G=Xe.childIndex,ue=Y(Y(Y({},N.props),se),{},{activeIndex:G});return[g.cloneElement(dn,ue),null,null]}return F?[X,null,null]:[X,null]}),ye(S,"renderCustomized",function(j,P,O){return g.cloneElement(j,Y(Y({key:"recharts-customized-".concat(O)},S.props),S.state))}),ye(S,"renderMap",{CartesianGrid:{handler:pp,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:pp},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:pp},YAxis:{handler:pp},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((w=b.id)!==null&&w!==void 0?w:lu("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=T5(S.triggeredAfterMouseMove,(C=b.throttleDelay)!==null&&C!==void 0?C:1e3/60),S.state={},S}return SPe(x,y),yPe(x,[{key:"componentDidMount",value:function(){var w,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,C=w.children,S=w.data,j=w.height,P=w.layout,O=Qn(C,Gr);if(O){var N=O.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,_=aS(this.state,S,N,A),E=this.state.tooltipTicks[N].coordinate,k=(this.state.offset.top+j)/2,M=P==="horizontal",$=M?{x:E,y:k}:{y:E,x:k},D=this.state.formattedGraphicalItems.find(function(I){var R=I.item;return R.type.name==="Scatter"});D&&($=Y(Y({},$),D.props.points[N].tooltipPosition),_=D.props.points[N].tooltipPayload);var B={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:A,activePayload:_,activeCoordinate:$};this.setState(B),this.renderCursor(O),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var S,j;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(w){Iw([Qn(w.children,Gr)],[Qn(this.props.children,Gr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=Qn(this.props.children,Gr);if(w&&typeof w.props.shared=="boolean"){var C=w.props.shared?"axis":"item";return s.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var C=this.container,S=C.getBoundingClientRect(),j=Gpe(S),P={chartX:Math.round(w.pageX-j.left),chartY:Math.round(w.pageY-j.top)},O=S.width/C.offsetWidth||1,N=this.inRange(P.chartX,P.chartY,O);if(!N)return null;var A=this.state,_=A.xAxisMap,E=A.yAxisMap,k=this.getTooltipEventType();if(k!=="axis"&&_&&E){var M=il(_).scale,$=il(E).scale,D=M&&M.invert?M.invert(P.chartX):null,B=$&&$.invert?$.invert(P.chartY):null;return Y(Y({},P),{},{xValue:D,yValue:B})}var I=zk(this.state,this.props.data,this.props.layout,N);return I?Y(Y({},P),I):null}},{key:"inRange",value:function(w,C){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,P=w/S,O=C/S;if(j==="horizontal"||j==="vertical"){var N=this.state.offset,A=P>=N.left&&P<=N.left+N.width&&O>=N.top&&O<=N.top+N.height;return A?{x:P,y:O}:null}var _=this.state,E=_.angleAxisMap,k=_.radiusAxisMap;if(E&&k){var M=il(E);return j_({x:P,y:O},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,C=this.getTooltipEventType(),S=Qn(w,Gr),j={};S&&C==="axis"&&(S.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var P=Lm(this.props,this.handleOuterEvent);return Y(Y({},P),j)}},{key:"addListener",value:function(){Dx.on(Ix,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Dx.removeListener(Ix,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,C,S){for(var j=this.state.formattedGraphicalItems,P=0,O=j.length;Pl.jsx("input",{type:t,className:le("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ce.displayName="Input";function oS(e,[t,n]){return Math.min(n,Math.max(t,e))}function BPe(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var YP="ScrollArea",[YB,R_e]=un(YP),[UPe,Ir]=YB(YP),XB=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(null),[p,v]=g.useState(null),[m,y]=g.useState(null),[x,b]=g.useState(0),[w,C]=g.useState(0),[S,j]=g.useState(!1),[P,O]=g.useState(!1),N=_e(t,_=>c(_)),A=Qc(i);return l.jsx(UPe,{scope:n,type:r,dir:A,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:v,scrollbarXEnabled:S,onScrollbarXEnabledChange:j,scrollbarY:m,onScrollbarYChange:y,scrollbarYEnabled:P,onScrollbarYEnabledChange:O,onCornerWidthChange:b,onCornerHeightChange:C,children:l.jsx(pe.div,{dir:A,...o,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});XB.displayName=YP;var QB="ScrollAreaViewport",JB=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=Ir(QB,n),s=g.useRef(null),c=_e(t,s,o.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),l.jsx(pe.div,{"data-radix-scroll-area-viewport":"",...a,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});JB.displayName=QB;var Gi="ScrollAreaScrollbar",XP=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Ir(Gi,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation==="horizontal";return g.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type==="hover"?l.jsx(zPe,{...r,ref:t,forceMount:n}):i.type==="scroll"?l.jsx(VPe,{...r,ref:t,forceMount:n}):i.type==="auto"?l.jsx(ZB,{...r,ref:t,forceMount:n}):i.type==="always"?l.jsx(QP,{...r,ref:t}):null});XP.displayName=Gi;var zPe=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Ir(Gi,e.__scopeScrollArea),[a,o]=g.useState(!1);return g.useEffect(()=>{const s=i.scrollArea;let c=0;if(s){const u=()=>{window.clearTimeout(c),o(!0)},d=()=>{c=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),l.jsx(Jt,{present:n||a,children:l.jsx(ZB,{"data-state":a?"visible":"hidden",...r,ref:t})})}),VPe=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Ir(Gi,e.__scopeScrollArea),a=e.orientation==="horizontal",o=My(()=>c("SCROLL_END"),100),[s,c]=BPe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,i.scrollHideDelay,c]),g.useEffect(()=>{const u=i.viewport,d=a?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const p=u[d];f!==p&&(c("SCROLL"),o()),f=p};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[i.viewport,a,c,o]),l.jsx(Jt,{present:n||s!=="hidden",children:l.jsx(QP,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ne(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ne(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),ZB=g.forwardRef((e,t)=>{const n=Ir(Gi,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=g.useState(!1),s=e.orientation==="horizontal",c=My(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=Ir(Gi,e.__scopeScrollArea),a=g.useRef(null),o=g.useRef(0),[s,c]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=i6(s.viewport,s.content),d={...r,sizes:s,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function f(h,p){return YPe(h,o.current,s,p)}return n==="horizontal"?l.jsx(WPe,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const h=i.viewport.scrollLeft,p=Hk(h,s,i.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=f(h,i.dir))}}):n==="vertical"?l.jsx(HPe,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const h=i.viewport.scrollTop,p=Hk(h,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=f(h))}}):null}),WPe=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=Ir(Gi,e.__scopeScrollArea),[o,s]=g.useState(),c=g.useRef(null),u=_e(t,c,a.onScrollbarXChange);return g.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),l.jsx(t6,{"data-orientation":"horizontal",...i,ref:u,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ky(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(a.viewport){const h=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),o6(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Fv(o.paddingLeft),paddingEnd:Fv(o.paddingRight)}})}})}),HPe=g.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=Ir(Gi,e.__scopeScrollArea),[o,s]=g.useState(),c=g.useRef(null),u=_e(t,c,a.onScrollbarYChange);return g.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),l.jsx(t6,{"data-orientation":"vertical",...i,ref:u,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ky(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(a.viewport){const h=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),o6(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Fv(o.paddingTop),paddingEnd:Fv(o.paddingBottom)}})}})}),[KPe,e6]=YB(Gi),t6=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,p=Ir(Gi,n),[v,m]=g.useState(null),y=_e(t,N=>m(N)),x=g.useRef(null),b=g.useRef(""),w=p.viewport,C=r.content-r.viewport,S=Lt(d),j=Lt(c),P=My(f,10);function O(N){if(x.current){const A=N.clientX-x.current.left,_=N.clientY-x.current.top;u({x:A,y:_})}}return g.useEffect(()=>{const N=A=>{const _=A.target;(v==null?void 0:v.contains(_))&&S(A,C)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[w,v,C,S]),g.useEffect(j,[r,j]),Fc(v,P),Fc(p.content,P),l.jsx(KPe,{scope:n,scrollbar:v,hasThumb:i,onThumbChange:Lt(a),onThumbPointerUp:Lt(o),onThumbPositionChange:j,onThumbPointerDown:Lt(s),children:l.jsx(pe.div,{...h,ref:y,style:{position:"absolute",...h.style},onPointerDown:ne(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),x.current=v.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),O(N))}),onPointerMove:ne(e.onPointerMove,O),onPointerUp:ne(e.onPointerUp,N=>{const A=N.target;A.hasPointerCapture(N.pointerId)&&A.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),x.current=null})})})}),Lv="ScrollAreaThumb",n6=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=e6(Lv,e.__scopeScrollArea);return l.jsx(Jt,{present:n||i.hasThumb,children:l.jsx(qPe,{ref:t,...r})})}),qPe=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,a=Ir(Lv,n),o=e6(Lv,n),{onThumbPositionChange:s}=o,c=_e(t,f=>o.onThumbChange(f)),u=g.useRef(void 0),d=My(()=>{u.current&&(u.current(),u.current=void 0)},100);return g.useEffect(()=>{const f=a.viewport;if(f){const h=()=>{if(d(),!u.current){const p=XPe(f,s);u.current=p,s()}};return s(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[a.viewport,d,s]),l.jsx(pe.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ne(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),v=f.clientX-p.left,m=f.clientY-p.top;o.onThumbPointerDown({x:v,y:m})}),onPointerUp:ne(e.onPointerUp,o.onThumbPointerUp)})});n6.displayName=Lv;var JP="ScrollAreaCorner",r6=g.forwardRef((e,t)=>{const n=Ir(JP,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(GPe,{...e,ref:t}):null});r6.displayName=JP;var GPe=g.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=Ir(JP,n),[a,o]=g.useState(0),[s,c]=g.useState(0),u=!!(a&&s);return Fc(i.scrollbarX,()=>{var f;const d=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(d),c(d)}),Fc(i.scrollbarY,()=>{var f;const d=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(d),o(d)}),u?l.jsx(pe.div,{...r,ref:t,style:{width:a,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Fv(e){return e?parseInt(e,10):0}function i6(e,t){const n=e/t;return isNaN(n)?0:n}function ky(e){const t=i6(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function YPe(e,t,n,r="ltr"){const i=ky(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return a6([c,u],f)(e)}function Hk(e,t,n="ltr"){const r=ky(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=n==="ltr"?[0,o]:[o*-1,0],u=oS(e,c);return a6([0,o],[0,s])(u)}function a6(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function o6(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function My(e,t){const n=Lt(e),r=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),g.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Fc(e,t){const n=Lt(t);qt(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var s6=XB,QPe=JB,JPe=r6;const fr=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(s6,{ref:r,className:le("relative overflow-hidden",e),...n,children:[l.jsx(QPe,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(l6,{}),l.jsx(JPe,{})]}));fr.displayName=s6.displayName;const l6=g.forwardRef(({className:e,orientation:t="vertical",...n},r)=>l.jsx(XP,{ref:r,orientation:t,className:le("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:l.jsx(n6,{className:"relative flex-1 rounded-full bg-border"})}));l6.displayName=XP.displayName;var ZPe="VisuallyHidden",ZP=g.forwardRef((e,t)=>l.jsx(pe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ZP.displayName=ZPe;var eOe=ZP,[Ry,$_e]=un("Tooltip",[Do]),$y=Do(),c6="TooltipProvider",tOe=700,sS="tooltip.open",[nOe,eO]=Ry(c6),u6=e=>{const{__scopeTooltip:t,delayDuration:n=tOe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,[o,s]=g.useState(!0),c=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(nOe,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:g.useCallback(d=>{c.current=d},[]),disableHoverableContent:i,children:a})};u6.displayName=c6;var Dy="Tooltip",[rOe,yh]=Ry(Dy),d6=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=eO(Dy,e.__scopeTooltip),u=$y(t),[d,f]=g.useState(null),h=ir(),p=g.useRef(0),v=o??c.disableHoverableContent,m=s??c.delayDuration,y=g.useRef(!1),[x=!1,b]=Mr({prop:r,defaultProp:i,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(sS))):c.onClose(),a==null||a(P)}}),w=g.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),C=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,b(!0)},[b]),S=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),j=g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,b(!0),p.current=0},m)},[m,b]);return g.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),l.jsx(kg,{...u,children:l.jsx(rOe,{scope:t,contentId:h,open:x,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayed?j():C()},[c.isOpenDelayed,j,C]),onTriggerLeave:g.useCallback(()=>{v?S():(window.clearTimeout(p.current),p.current=0)},[S,v]),onOpen:C,onClose:S,disableHoverableContent:v,children:n})})};d6.displayName=Dy;var lS="TooltipTrigger",f6=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=yh(lS,n),a=eO(lS,n),o=$y(n),s=g.useRef(null),c=_e(t,s,i.onTriggerChange),u=g.useRef(!1),d=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(Mg,{asChild:!0,...o,children:l.jsx(pe.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:ne(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:ne(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:ne(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ne(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:ne(e.onBlur,i.onClose),onClick:ne(e.onClick,i.onClose)})})});f6.displayName=lS;var tO="TooltipPortal",[iOe,aOe]=Ry(tO,{forceMount:void 0}),h6=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=yh(tO,t);return l.jsx(iOe,{scope:t,forceMount:n,children:l.jsx(Jt,{present:n||a.open,children:l.jsx(sh,{asChild:!0,container:i,children:r})})})};h6.displayName=tO;var Bc="TooltipContent",p6=g.forwardRef((e,t)=>{const n=aOe(Bc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=yh(Bc,e.__scopeTooltip);return l.jsx(Jt,{present:r||o.open,children:o.disableHoverableContent?l.jsx(m6,{side:i,...a,ref:t}):l.jsx(oOe,{side:i,...a,ref:t})})}),oOe=g.forwardRef((e,t)=>{const n=yh(Bc,e.__scopeTooltip),r=eO(Bc,e.__scopeTooltip),i=g.useRef(null),a=_e(t,i),[o,s]=g.useState(null),{trigger:c,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,h=g.useCallback(()=>{s(null),f(!1)},[f]),p=g.useCallback((v,m)=>{const y=v.currentTarget,x={x:v.clientX,y:v.clientY},b=uOe(x,y.getBoundingClientRect()),w=dOe(x,b),C=fOe(m.getBoundingClientRect()),S=pOe([...w,...C]);s(S),f(!0)},[f]);return g.useEffect(()=>()=>h(),[h]),g.useEffect(()=>{if(c&&d){const v=y=>p(y,d),m=y=>p(y,c);return c.addEventListener("pointerleave",v),d.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",m)}}},[c,d,p,h]),g.useEffect(()=>{if(o){const v=m=>{const y=m.target,x={x:m.clientX,y:m.clientY},b=(c==null?void 0:c.contains(y))||(d==null?void 0:d.contains(y)),w=!hOe(x,o);b?h():w&&(h(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,d,o,u,h]),l.jsx(m6,{...e,ref:a})}),[sOe,lOe]=Ry(Dy,{isInside:!1}),m6=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=yh(Bc,n),u=$y(n),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(sS,d),()=>document.removeEventListener(sS,d)),[d]),g.useEffect(()=>{if(c.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx(Zc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Rg,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(Dj,{children:r}),l.jsx(sOe,{scope:n,isInside:!0,children:l.jsx(eOe,{id:c.contentId,role:"tooltip",children:i||r})})]})})});p6.displayName=Bc;var v6="TooltipArrow",cOe=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=$y(n);return lOe(v6,n).isInside?null:l.jsx($g,{...i,...r,ref:t})});cOe.displayName=v6;function uOe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function dOe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function fOe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function hOe(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;ar!=d>r&&n<(u-s)*(r-c)/(d-c)+s&&(i=!i)}return i}function pOe(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),mOe(t)}function mOe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vOe=u6,gOe=d6,yOe=f6,xOe=h6,g6=p6;const cS=vOe,Sd=gOe,jd=yOe,Ul=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(xOe,{children:l.jsx(g6,{ref:r,sideOffset:t,className:le("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Ul.displayName=g6.displayName;var nO="Tabs",[bOe,D_e]=un(nO,[Ig]),y6=Ig(),[wOe,rO]=bOe(nO),x6=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:s,activationMode:c="automatic",...u}=e,d=Qc(s),[f,h]=Mr({prop:r,onChange:i,defaultProp:a});return l.jsx(wOe,{scope:n,baseId:ir(),value:f,onValueChange:h,orientation:o,dir:d,activationMode:c,children:l.jsx(pe.div,{dir:d,"data-orientation":o,...u,ref:t})})});x6.displayName=nO;var b6="TabsList",w6=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=rO(b6,n),o=y6(n);return l.jsx(nL,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:l.jsx(pe.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});w6.displayName=b6;var S6="TabsTrigger",j6=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=rO(S6,n),s=y6(n),c=O6(o.baseId,r),u=N6(o.baseId,r),d=r===o.value;return l.jsx(rL,{asChild:!0,...s,focusable:!i,active:d,children:l.jsx(pe.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:t,onMouseDown:ne(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:ne(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:ne(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!i&&f&&o.onValueChange(r)})})})});j6.displayName=S6;var C6="TabsContent",P6=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=rO(C6,n),c=O6(s.baseId,r),u=N6(s.baseId,r),d=r===s.value,f=g.useRef(d);return g.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(Jt,{present:i||d,children:({present:h})=>l.jsx(pe.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&a})})});P6.displayName=C6;function O6(e,t){return`${e}-trigger-${t}`}function N6(e,t){return`${e}-content-${t}`}var SOe=x6,A6=w6,E6=j6,T6=P6;const iO=SOe,Iy=g.forwardRef(({className:e,...t},n)=>l.jsx(A6,{ref:n,className:le("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Iy.displayName=A6.displayName;const yo=g.forwardRef(({className:e,...t},n)=>l.jsx(E6,{ref:n,className:le("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));yo.displayName=E6.displayName;const xo=g.forwardRef(({className:e,...t},n)=>l.jsx(T6,{ref:n,className:le("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));xo.displayName=T6.displayName;function _6(e,t){return function(){return e.apply(t,arguments)}}const{toString:jOe}=Object.prototype,{getPrototypeOf:aO}=Object,Ly=(e=>t=>{const n=jOe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ui=e=>(e=e.toLowerCase(),t=>Ly(t)===e),Fy=e=>t=>typeof t===e,{isArray:xu}=Array,Bf=Fy("undefined");function COe(e){return e!==null&&!Bf(e)&&e.constructor!==null&&!Bf(e.constructor)&&sr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const k6=ui("ArrayBuffer");function POe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&k6(e.buffer),t}const OOe=Fy("string"),sr=Fy("function"),M6=Fy("number"),By=e=>e!==null&&typeof e=="object",NOe=e=>e===!0||e===!1,zp=e=>{if(Ly(e)!=="object")return!1;const t=aO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},AOe=ui("Date"),EOe=ui("File"),TOe=ui("Blob"),_Oe=ui("FileList"),kOe=e=>By(e)&&sr(e.pipe),MOe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||sr(e.append)&&((t=Ly(e))==="formdata"||t==="object"&&sr(e.toString)&&e.toString()==="[object FormData]"))},ROe=ui("URLSearchParams"),[$Oe,DOe,IOe,LOe]=["ReadableStream","Request","Response","Headers"].map(ui),FOe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xh(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),xu(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ls=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$6=e=>!Bf(e)&&e!==ls;function uS(){const{caseless:e}=$6(this)&&this||{},t={},n=(r,i)=>{const a=e&&R6(t,i)||i;zp(t[a])&&zp(r)?t[a]=uS(t[a],r):zp(r)?t[a]=uS({},r):xu(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r(xh(t,(i,a)=>{n&&sr(i)?e[a]=_6(i,n):e[a]=i},{allOwnKeys:r}),e),UOe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zOe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},VOe=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&aO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},WOe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},HOe=e=>{if(!e)return null;if(xu(e))return e;let t=e.length;if(!M6(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},KOe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&aO(Uint8Array)),qOe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},GOe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},YOe=ui("HTMLFormElement"),XOe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Kk=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),QOe=ui("RegExp"),D6=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};xh(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},JOe=e=>{D6(e,(t,n)=>{if(sr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(sr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ZOe=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return xu(e)?r(e):r(String(e).split(t)),n},eNe=()=>{},tNe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Fx="abcdefghijklmnopqrstuvwxyz",qk="0123456789",I6={DIGIT:qk,ALPHA:Fx,ALPHA_DIGIT:Fx+Fx.toUpperCase()+qk},nNe=(e=16,t=I6.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function rNe(e){return!!(e&&sr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const iNe=e=>{const t=new Array(10),n=(r,i)=>{if(By(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=xu(r)?[]:{};return xh(r,(o,s)=>{const c=n(o,i+1);!Bf(c)&&(a[s]=c)}),t[i]=void 0,a}}return r};return n(e,0)},aNe=ui("AsyncFunction"),oNe=e=>e&&(By(e)||sr(e))&&sr(e.then)&&sr(e.catch),L6=((e,t)=>e?setImmediate:t?((n,r)=>(ls.addEventListener("message",({source:i,data:a})=>{i===ls&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ls.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",sr(ls.postMessage)),sNe=typeof queueMicrotask<"u"?queueMicrotask.bind(ls):typeof process<"u"&&process.nextTick||L6,K={isArray:xu,isArrayBuffer:k6,isBuffer:COe,isFormData:MOe,isArrayBufferView:POe,isString:OOe,isNumber:M6,isBoolean:NOe,isObject:By,isPlainObject:zp,isReadableStream:$Oe,isRequest:DOe,isResponse:IOe,isHeaders:LOe,isUndefined:Bf,isDate:AOe,isFile:EOe,isBlob:TOe,isRegExp:QOe,isFunction:sr,isStream:kOe,isURLSearchParams:ROe,isTypedArray:KOe,isFileList:_Oe,forEach:xh,merge:uS,extend:BOe,trim:FOe,stripBOM:UOe,inherits:zOe,toFlatObject:VOe,kindOf:Ly,kindOfTest:ui,endsWith:WOe,toArray:HOe,forEachEntry:qOe,matchAll:GOe,isHTMLForm:YOe,hasOwnProperty:Kk,hasOwnProp:Kk,reduceDescriptors:D6,freezeMethods:JOe,toObjectSet:ZOe,toCamelCase:XOe,noop:eNe,toFiniteNumber:tNe,findKey:R6,global:ls,isContextDefined:$6,ALPHABET:I6,generateString:nNe,isSpecCompliantForm:rNe,toJSONObject:iNe,isAsyncFn:aNe,isThenable:oNe,setImmediate:L6,asap:sNe};function Ae(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}K.inherits(Ae,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const F6=Ae.prototype,B6={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{B6[e]={value:e}});Object.defineProperties(Ae,B6);Object.defineProperty(F6,"isAxiosError",{value:!0});Ae.from=(e,t,n,r,i,a)=>{const o=Object.create(F6);return K.toFlatObject(e,o,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Ae.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const lNe=null;function dS(e){return K.isPlainObject(e)||K.isArray(e)}function U6(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function Gk(e,t,n){return e?e.concat(t).map(function(i,a){return i=U6(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function cNe(e){return K.isArray(e)&&!e.some(dS)}const uNe=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function Uy(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!K.isUndefined(y[m])});const r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(K.isDate(v))return v.toISOString();if(!c&&K.isBlob(v))throw new Ae("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(v)||K.isTypedArray(v)?c&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,m,y){let x=v;if(v&&!y&&typeof v=="object"){if(K.endsWith(m,"{}"))m=r?m:m.slice(0,-2),v=JSON.stringify(v);else if(K.isArray(v)&&cNe(v)||(K.isFileList(v)||K.endsWith(m,"[]"))&&(x=K.toArray(v)))return m=U6(m),x.forEach(function(w,C){!(K.isUndefined(w)||w===null)&&t.append(o===!0?Gk([m],C,a):o===null?m:m+"[]",u(w))}),!1}return dS(v)?!0:(t.append(Gk(y,m,a),u(v)),!1)}const f=[],h=Object.assign(uNe,{defaultVisitor:d,convertValue:u,isVisitable:dS});function p(v,m){if(!K.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(v),K.forEach(v,function(x,b){(!(K.isUndefined(x)||x===null)&&i.call(t,x,K.isString(b)?b.trim():b,m,h))===!0&&p(x,m?m.concat(b):[b])}),f.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Yk(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function oO(e,t){this._pairs=[],e&&Uy(e,this,t)}const z6=oO.prototype;z6.append=function(t,n){this._pairs.push([t,n])};z6.toString=function(t){const n=t?function(r){return t.call(this,r,Yk)}:Yk;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function dNe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function V6(e,t,n){if(!t)return e;const r=n&&n.encode||dNe;K.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(i?a=i(t,n):a=K.isURLSearchParams(t)?t.toString():new oO(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Xk{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,function(r){r!==null&&t(r)})}}const W6={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fNe=typeof URLSearchParams<"u"?URLSearchParams:oO,hNe=typeof FormData<"u"?FormData:null,pNe=typeof Blob<"u"?Blob:null,mNe={isBrowser:!0,classes:{URLSearchParams:fNe,FormData:hNe,Blob:pNe},protocols:["http","https","file","blob","url","data"]},sO=typeof window<"u"&&typeof document<"u",fS=typeof navigator=="object"&&navigator||void 0,vNe=sO&&(!fS||["ReactNative","NativeScript","NS"].indexOf(fS.product)<0),gNe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yNe=sO&&window.location.href||"http://localhost",xNe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sO,hasStandardBrowserEnv:vNe,hasStandardBrowserWebWorkerEnv:gNe,navigator:fS,origin:yNe},Symbol.toStringTag,{value:"Module"})),bn={...xNe,...mNe};function bNe(e,t){return Uy(e,new bn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return bn.isNode&&K.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function wNe(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function SNe(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r=n.length;return o=!o&&K.isArray(i)?i.length:o,c?(K.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!K.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&K.isArray(i[o])&&(i[o]=SNe(i[o])),!s)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(r,i)=>{t(wNe(r),i,n,0)}),n}return null}function jNe(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const bh={transitional:W6,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=K.isObject(t);if(a&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return i?JSON.stringify(H6(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return bNe(t,this.formSerializer).toString();if((s=K.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Uy(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),jNe(t)):t}],transformResponse:[function(t){const n=this.transitional||bh.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?Ae.from(s,Ae.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bn.classes.FormData,Blob:bn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{bh.headers[e]={}});const CNe=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),PNe=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&CNe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Qk=Symbol("internals");function Vu(e){return e&&String(e).trim().toLowerCase()}function Vp(e){return e===!1||e==null?e:K.isArray(e)?e.map(Vp):String(e)}function ONe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const NNe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Bx(e,t,n,r,i){if(K.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!K.isString(t)){if(K.isString(r))return t.indexOf(r)!==-1;if(K.isRegExp(r))return r.test(t)}}function ANe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ENe(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class Vn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,c,u){const d=Vu(c);if(!d)throw new Error("header name must be a non-empty string");const f=K.findKey(i,d);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=Vp(s))}const o=(s,c)=>K.forEach(s,(u,d)=>a(u,d,c));if(K.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(K.isString(t)&&(t=t.trim())&&!NNe(t))o(PNe(t),n);else if(K.isHeaders(t))for(const[s,c]of t.entries())a(c,s,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=Vu(t),t){const r=K.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return ONe(i);if(K.isFunction(n))return n.call(this,i,r);if(K.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Vu(t),t){const r=K.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Bx(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Vu(o),o){const s=K.findKey(r,o);s&&(!n||Bx(r,r[s],s,n))&&(delete r[s],i=!0)}}return K.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||Bx(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return K.forEach(this,(i,a)=>{const o=K.findKey(r,a);if(o){n[o]=Vp(i),delete n[a];return}const s=t?ANe(a):String(a).trim();s!==a&&delete n[a],n[s]=Vp(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&K.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Qk]=this[Qk]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Vu(o);r[s]||(ENe(i,o),r[s]=!0)}return K.isArray(t)?t.forEach(a):a(t),this}}Vn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);K.reduceDescriptors(Vn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});K.freezeMethods(Vn);function Ux(e,t){const n=this||bh,r=t||n,i=Vn.from(r.headers);let a=r.data;return K.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function K6(e){return!!(e&&e.__CANCEL__)}function bu(e,t,n){Ae.call(this,e??"canceled",Ae.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(bu,Ae,{__CANCEL__:!0});function q6(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ae("Request failed with status code "+n.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function TNe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function _Ne(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[a];o||(o=u),n[i]=c,r[i]=u;let f=a,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{n=d,i=null,a&&(clearTimeout(a),a=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?o(u,d):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},r-f)))},()=>i&&o(i)]}const Bv=(e,t,n=3)=>{let r=0;const i=_Ne(50,250);return kNe(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,c=o-r,u=i(c),d=o<=s;r=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&d?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},Jk=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Zk=e=>(...t)=>K.asap(()=>e(...t)),MNe=bn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,bn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(bn.origin),bn.navigator&&/(msie|trident)/i.test(bn.navigator.userAgent)):()=>!0,RNe=bn.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];K.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),K.isString(r)&&o.push("path="+r),K.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $Ne(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function DNe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function G6(e,t){return e&&!$Ne(t)?DNe(e,t):t}const eM=e=>e instanceof Vn?{...e}:e;function Ds(e,t){t=t||{};const n={};function r(u,d,f,h){return K.isPlainObject(u)&&K.isPlainObject(d)?K.merge.call({caseless:h},u,d):K.isPlainObject(d)?K.merge({},d):K.isArray(d)?d.slice():d}function i(u,d,f,h){if(K.isUndefined(d)){if(!K.isUndefined(u))return r(void 0,u,f,h)}else return r(u,d,f,h)}function a(u,d){if(!K.isUndefined(d))return r(void 0,d)}function o(u,d){if(K.isUndefined(d)){if(!K.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function s(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,d,f)=>i(eM(u),eM(d),f,!0)};return K.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=c[d]||i,h=f(e[d],t[d],d);K.isUndefined(h)&&f!==s||(n[d]=h)}),n}const Y6=e=>{const t=Ds({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;t.headers=o=Vn.from(o),t.url=V6(G6(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(K.isFormData(n)){if(bn.hasStandardBrowserEnv||bn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...d].join("; "))}}if(bn.hasStandardBrowserEnv&&(r&&K.isFunction(r)&&(r=r(t)),r||r!==!1&&MNe(t.url))){const u=i&&a&&RNe.read(a);u&&o.set(i,u)}return t},INe=typeof XMLHttpRequest<"u",LNe=INe&&function(e){return new Promise(function(n,r){const i=Y6(e);let a=i.data;const o=Vn.from(i.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:u}=i,d,f,h,p,v;function m(){p&&p(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function x(){if(!y)return;const w=Vn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:e,request:y};q6(function(P){n(P),m()},function(P){r(P),m()},S),y=null}"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(x)},y.onabort=function(){y&&(r(new Ae("Request aborted",Ae.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new Ae("Network Error",Ae.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||W6;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new Ae(C,S.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,y)),y=null},a===void 0&&o.setContentType(null),"setRequestHeader"in y&&K.forEach(o.toJSON(),function(C,S){y.setRequestHeader(S,C)}),K.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),s&&s!=="json"&&(y.responseType=i.responseType),u&&([h,v]=Bv(u,!0),y.addEventListener("progress",h)),c&&y.upload&&([f,p]=Bv(c),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(d=w=>{y&&(r(!w||w.type?new bu(null,e,y):w),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const b=TNe(i.url);if(b&&bn.protocols.indexOf(b)===-1){r(new Ae("Unsupported protocol "+b+":",Ae.ERR_BAD_REQUEST,e));return}y.send(a||null)})},FNe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(u){if(!i){i=!0,s();const d=u instanceof Error?u:this.reason;r.abort(d instanceof Ae?d:new bu(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,a(new Ae(`timeout ${t} of ms exceeded`,Ae.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>K.asap(s),c}},BNe=function*(e,t){let n=e.byteLength;if(n{const i=UNe(e,t);let a=0,o,s=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){s(),c.close();return}let f=d.byteLength;if(n){let h=a+=f;n(h)}c.enqueue(new Uint8Array(d))}catch(u){throw s(u),u}},cancel(c){return s(c),i.return()}},{highWaterMark:2})},zy=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",X6=zy&&typeof ReadableStream=="function",VNe=zy&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Q6=(e,...t)=>{try{return!!e(...t)}catch{return!1}},WNe=X6&&Q6(()=>{let e=!1;const t=new Request(bn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),nM=64*1024,hS=X6&&Q6(()=>K.isReadableStream(new Response("").body)),Uv={stream:hS&&(e=>e.body)};zy&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Uv[t]&&(Uv[t]=K.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ae(`Response type '${t}' is not supported`,Ae.ERR_NOT_SUPPORT,r)})})})(new Response);const HNe=async e=>{if(e==null)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e))return(await new Request(bn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(K.isArrayBufferView(e)||K.isArrayBuffer(e))return e.byteLength;if(K.isURLSearchParams(e)&&(e=e+""),K.isString(e))return(await VNe(e)).byteLength},KNe=async(e,t)=>{const n=K.toFiniteNumber(e.getContentLength());return n??HNe(t)},qNe=zy&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:h}=Y6(e);u=u?(u+"").toLowerCase():"text";let p=FNe([i,a&&a.toAbortSignal()],o),v;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(c&&WNe&&n!=="get"&&n!=="head"&&(y=await KNe(d,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),j;if(K.isFormData(r)&&(j=S.headers.get("content-type"))&&d.setContentType(j),S.body){const[P,O]=Jk(y,Bv(Zk(c)));r=tM(S.body,nM,P,O)}}K.isString(f)||(f=f?"include":"omit");const x="credentials"in Request.prototype;v=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:x?f:void 0});let b=await fetch(v);const w=hS&&(u==="stream"||u==="response");if(hS&&(s||w&&m)){const S={};["status","statusText","headers"].forEach(N=>{S[N]=b[N]});const j=K.toFiniteNumber(b.headers.get("content-length")),[P,O]=s&&Jk(j,Bv(Zk(s),!0))||[];b=new Response(tM(b.body,nM,P,()=>{O&&O(),m&&m()}),S)}u=u||"text";let C=await Uv[K.findKey(Uv,u)||"text"](b,e);return!w&&m&&m(),await new Promise((S,j)=>{q6(S,j,{data:C,headers:Vn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:v})})}catch(x){throw m&&m(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,e,v),{cause:x.cause||x}):Ae.from(x,x&&x.code,e,v)}}),pS={http:lNe,xhr:LNe,fetch:qNe};K.forEach(pS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const rM=e=>`- ${e}`,GNe=e=>K.isFunction(e)||e===null||e===!1,J6={getAdapter:e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since : +`+a.map(rM).join(` +`):" "+rM(a[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:pS};function zx(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bu(null,e)}function iM(e){return zx(e),e.headers=Vn.from(e.headers),e.data=Ux.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),J6.getAdapter(e.adapter||bh.adapter)(e).then(function(r){return zx(e),r.data=Ux.call(e,e.transformResponse,r),r.headers=Vn.from(r.headers),r},function(r){return K6(r)||(zx(e),r&&r.response&&(r.response.data=Ux.call(e,e.transformResponse,r.response),r.response.headers=Vn.from(r.response.headers))),Promise.reject(r)})}const Z6="1.7.9",Vy={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vy[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const aM={};Vy.transitional=function(t,n,r){function i(a,o){return"[Axios v"+Z6+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new Ae(i(o," has been removed"+(n?" in "+n:"")),Ae.ERR_DEPRECATED);return n&&!aM[o]&&(aM[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};Vy.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function YNe(e,t,n){if(typeof e!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],c=s===void 0||o(s,a,e);if(c!==!0)throw new Ae("option "+a+" must be "+c,Ae.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ae("Unknown option "+a,Ae.ERR_BAD_OPTION)}}const Wp={assertOptions:YNe,validators:Vy},mi=Wp.validators;class js{constructor(t){this.defaults=t,this.interceptors={request:new Xk,response:new Xk}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ds(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&Wp.assertOptions(r,{silentJSONParsing:mi.transitional(mi.boolean),forcedJSONParsing:mi.transitional(mi.boolean),clarifyTimeoutError:mi.transitional(mi.boolean)},!1),i!=null&&(K.isFunction(i)?n.paramsSerializer={serialize:i}:Wp.assertOptions(i,{encode:mi.function,serialize:mi.function},!0)),Wp.assertOptions(n,{baseUrl:mi.spelling("baseURL"),withXsrfToken:mi.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&K.merge(a.common,a[n.method]);a&&K.forEach(["delete","get","head","post","put","patch","common"],v=>{delete a[v]}),n.headers=Vn.concat(o,a);const s=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,h;if(!c){const v=[iM.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,u),h=v.length,d=Promise.resolve(n);f{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new bu(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new lO(function(i){t=i}),cancel:t}}}function XNe(e){return function(n){return e.apply(null,n)}}function QNe(e){return K.isObject(e)&&e.isAxiosError===!0}const mS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mS).forEach(([e,t])=>{mS[t]=e});function eU(e){const t=new js(e),n=_6(js.prototype.request,t);return K.extend(n,js.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return eU(Ds(e,i))},n}const ie=eU(bh);ie.Axios=js;ie.CanceledError=bu;ie.CancelToken=lO;ie.isCancel=K6;ie.VERSION=Z6;ie.toFormData=Uy;ie.AxiosError=Ae;ie.Cancel=ie.CanceledError;ie.all=function(t){return Promise.all(t)};ie.spread=XNe;ie.isAxiosError=QNe;ie.mergeConfig=Ds;ie.AxiosHeaders=Vn;ie.formToJSON=e=>H6(K.isHTMLForm(e)?new FormData(e):e);ie.getAdapter=J6.getAdapter;ie.HttpStatusCode=mS;ie.default=ie;const JNe=5,ZNe=5e3,mp=50,ed={cpu:"#3B82F6",memory:"#3B82F6",disk:"#A855F7",network:"#F59E0B"},eAe=({data:e,dataKey:t,color:n,label:r,unit:i="",domain:a})=>l.jsx("div",{className:"h-36",children:l.jsx(_5,{width:"100%",height:"100%",children:l.jsxs(FPe,{data:e,margin:{top:5,right:5,left:5,bottom:5},children:[l.jsx("defs",{children:l.jsxs("linearGradient",{id:`gradient-${t}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"5%",stopColor:n,stopOpacity:.3}),l.jsx("stop",{offset:"95%",stopColor:n,stopOpacity:0})]})}),l.jsx(gu,{dataKey:"time",tick:{fontSize:10,fill:"#6B7280"},stroke:"#374151",interval:"preserveStart"}),l.jsx(yu,{domain:a||[0,"auto"],tick:{fontSize:10,fill:"#6B7280"},stroke:"#374151",width:40}),l.jsx(Gr,{content:({active:o,payload:s})=>o&&(s!=null&&s[0])?l.jsxs("div",{className:"bg-neutral-900 border border-neutral-800 p-2 rounded-lg shadow-lg",children:[l.jsx("p",{className:"text-sm text-neutral-300",children:`${r}: ${s[0].value.toFixed(1)}${i}`}),l.jsx("p",{className:"text-xs text-neutral-500",children:s[0].payload.time})]}):null}),l.jsx(Uo,{type:"monotone",dataKey:t,stroke:n,fill:`url(#gradient-${t})`,strokeWidth:2,isAnimationActive:!1})]})})}),vp=({icon:e,title:t,value:n,secondaryValue:r,chartData:i,dataKey:a,color:o,unit:s,domain:c})=>l.jsxs(me,{className:"border-neutral-800/50 overflow-hidden",children:[l.jsx(je,{className:"p-4 pb-0",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"bg-neutral-900 p-2.5 rounded-lg",children:l.jsx(e,{className:"w-5 h-5 text-neutral-400"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium text-neutral-400",children:t}),l.jsxs("div",{className:"flex items-baseline gap-2",children:[l.jsx("p",{className:"text-lg font-semibold text-white truncate",children:n}),r&&l.jsx("p",{className:"text-sm text-neutral-500 truncate",children:r})]})]})]})}),l.jsx(ge,{className:"p-4 pt-2",children:(i==null?void 0:i.length)>0&&l.jsx(eAe,{data:i,dataKey:a,color:o,label:t,unit:s,domain:c})})]}),tAe=({data:e})=>l.jsx("div",{className:"h-36",children:l.jsx(_5,{width:"100%",height:"100%",children:l.jsxs(LPe,{data:e,margin:{top:5,right:5,left:5,bottom:5},children:[l.jsx(gu,{dataKey:"time",tick:{fontSize:10,fill:"#6B7280"},stroke:"#374151",interval:"preserveStart"}),l.jsx(yu,{tick:{fontSize:10,fill:"#6B7280"},stroke:"#374151",width:40}),l.jsx(Gr,{content:({active:t,payload:n})=>t&&(n!=null&&n.length)?l.jsxs("div",{className:"bg-neutral-900 border border-neutral-800 p-2 rounded-lg shadow-lg",children:[l.jsx("p",{className:"text-sm text-neutral-300",children:`Upload: ${n[0].value.toFixed(1)} KB/s`}),l.jsx("p",{className:"text-sm text-neutral-300",children:`Download: ${n[1].value.toFixed(1)} KB/s`}),l.jsx("p",{className:"text-xs text-neutral-500",children:n[0].payload.time})]}):null}),l.jsx(Mc,{type:"monotone",dataKey:"up",stroke:ed.network,strokeWidth:2,dot:!1,isAnimationActive:!1}),l.jsx(Mc,{type:"monotone",dataKey:"down",stroke:"#60A5FA",strokeWidth:2,dot:!1,isAnimationActive:!1})]})})}),nAe=e=>e.replace(/\u001b\[(\d+)m/g,(t,n)=>``).replace(/\u001b\[0m/g,"").replace(/\n/g,"
");function rAe(){var k,M,$,D,B,I,R,F,z,U,H,J,ae;const{id:e}=Hi(),t=g.useRef(null),[n,r]=g.useState("offline"),[i,a]=g.useState([]),[o,s]=g.useState(""),[c,u]=g.useState([]),[d,f]=g.useState(-1),[h,p]=g.useState(0),[v,m]=g.useState({cpu:[],memory:[],disk:[],network:[]}),[y,x]=g.useState({cpu:0,memory:0,disk:0,network:{up:0,down:0},uptime:"0h 0m 0s"});g.useRef(null);const b=g.useRef(!0),{data:w,error:C}=xt({queryKey:["server",e],queryFn:async()=>{const{data:ee}=await ie.get(`/api/server/${e}`);return ee.attributes}}),S=g.useCallback(ee=>{var q,se;if(b.current)try{const X=JSON.parse(ee.data);switch(X.event){case"auth success":(q=t.current)==null||q.send(JSON.stringify({event:"send logs",args:[null]})),(se=t.current)==null||se.send(JSON.stringify({event:"send stats",args:[null]}));break;case"console output":a(te=>[...te.slice(-1e3),X.args[0]]);break;case"stats":const Z=JSON.parse(X.args[0]);if(!Z||!b.current)return;x(te=>{var W,Se;return{...te,cpu:(Z.cpu_absolute||0).toFixed(1),memory:(Z.memory_bytes/1024/1024||0).toFixed(0),disk:(Z.disk_bytes/1024/1024||0).toFixed(0),network:{up:(((W=Z.network)==null?void 0:W.tx_bytes)/1024||0).toFixed(2),down:(((Se=Z.network)==null?void 0:Se.rx_bytes)/1024||0).toFixed(2)}}});break;case"status":r(X.args[0]);break}}catch(X){console.error("WebSocket message handling error:",X)}},[]);g.useEffect(()=>{b.current=!0;const ee=async()=>{try{if(!b.current)return;const{data:q}=await ie.get(`/api/server/${e}/websocket`),se=new WebSocket(q.data.socket);se.onopen=()=>{if(!b.current){se.close();return}console.log("WebSocket connected"),p(0),se.send(JSON.stringify({event:"auth",args:[q.data.token]}))},se.onmessage=S,se.onclose=()=>{b.current&&(console.log("WebSocket disconnected"),h{b.current&&(p(X=>X+1),ee())},ZNe))},se.onerror=X=>{console.error("WebSocket error:",X)},t.current=se}catch(q){console.error("WebSocket connection error:",q)}};return ee(),()=>{b.current=!1,t.current&&(t.current.close(),t.current=null)}},[e,h,S]),g.useEffect(()=>{if(!b.current)return;const ee=new Date().toLocaleTimeString();m(q=>({cpu:[...q.cpu.slice(-mp),{time:ee,value:parseFloat(y.cpu)}],memory:[...q.memory.slice(-mp),{time:ee,value:parseFloat(y.memory)}],disk:[...q.disk.slice(-mp),{time:ee,value:parseFloat(y.disk)}],network:[...q.network.slice(-mp),{time:ee,up:parseFloat(y.network.up)||0,down:parseFloat(y.network.down)||0}]}))},[y]);const j=g.useRef(null),[P,O]=g.useState(!0);g.useEffect(()=>{if(P&&j.current){const ee=j.current.querySelector("[data-radix-scroll-area-viewport]");ee&&setTimeout(()=>{ee.scrollTo({top:ee.scrollHeight,behavior:"instant"})},0)}},[i,P]);const N=g.useCallback(ee=>{const q=ee.currentTarget,se=Math.abs(q.scrollHeight-q.clientHeight-q.scrollTop)<50;O(se)},[]),A=ee=>{ee==null||ee.preventDefault(),!(!o.trim()||!t.current)&&(t.current.send(JSON.stringify({event:"send command",args:[o]})),u(q=>[o,...q.slice(0,99)]),s(""),f(-1))},_=ee=>{ee.key==="ArrowUp"?(ee.preventDefault(),f(q=>{if(q{if(q>-1){const se=q-1;return s(se===-1?"":c[se]),se}return q}))},E=ee=>{var q;((q=t.current)==null?void 0:q.readyState)===WebSocket.OPEN&&t.current.send(JSON.stringify({event:"set state",args:[ee]}))};return w?C?l.jsx("div",{className:"flex items-center justify-center min-h-[400px] text-red-400",children:"Failed to load server data"}):l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:w==null?void 0:w.name}),l.jsx(Pt,{variant:n==="running"?"success":n==="starting"?"warning":"secondary",className:"rounded-md",children:n.toUpperCase()})]}),l.jsx(cS,{children:l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(V,{variant:"outline",size:"icon",onClick:()=>E("start"),disabled:["starting","running"].includes(n),children:l.jsx(wD,{className:"w-4 h-4"})})}),l.jsx(Ul,{children:"Start Server"})]}),l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(V,{variant:"outline",size:"icon",onClick:()=>E("restart"),disabled:!["running"].includes(n),children:l.jsx(SD,{className:"w-4 h-4"})})}),l.jsx(Ul,{children:"Restart Server"})]}),l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(V,{variant:"outline",size:"icon",onClick:()=>E("stop"),disabled:!["running"].includes(n),children:l.jsx(PD,{className:"w-4 h-4"})})}),l.jsx(Ul,{children:"Stop Server"})]})]})})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-4 gap-4",children:[l.jsx(vp,{icon:pg,title:"CPU Usage",value:`${(y==null?void 0:y.cpu)??0}%`,secondaryValue:`${((k=w==null?void 0:w.limits)==null?void 0:k.cpu)??0}% Limit`,chartData:v.cpu,dataKey:"value",color:ed.cpu,unit:"%",domain:[0,100]}),l.jsx(vp,{icon:Zf,title:"Memory Usage",value:`${y.memory} MB`,secondaryValue:`${w==null?void 0:w.limits.memory} MB Limit`,chartData:v.memory,dataKey:"value",color:ed.memory,unit:" MB",domain:[0,w==null?void 0:w.limits.memory]}),l.jsx(vp,{icon:Jf,title:"Storage Usage",value:`${y.disk} MB`,secondaryValue:`${(w==null?void 0:w.limits.disk)===0?"∞":(w==null?void 0:w.limits.disk)+" MB"} Limit`,chartData:v.disk,dataKey:"value",color:ed.disk,unit:" MB",domain:w!=null&&w.limits.disk?[0,w.limits.disk]:void 0}),l.jsx(vp,{icon:dA,title:"Network Traffic",value:`↑${y.network.up} KB/s`,secondaryValue:`↓${y.network.down} KB/s`,chartData:v.network,dataKey:"up",color:ed.network,unit:" KB/s",Chart:tAe})]}),l.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-12 gap-6",children:[l.jsx("div",{className:"xl:col-span-9",children:l.jsx(me,{className:"border-neutral-800/50",children:l.jsxs(iO,{defaultValue:"console",className:"w-full",children:[l.jsx(je,{className:"border-b border-neutral-800/50",children:l.jsx("div",{className:"flex items-center justify-between",children:l.jsxs(Iy,{className:"bg-neutral-900",children:[l.jsxs(yo,{value:"console",className:"gap-2",children:[l.jsx(mg,{className:"w-4 h-4"}),"Console"]}),l.jsxs(yo,{value:"stats",className:"gap-2",children:[l.jsx(R9,{className:"w-4 h-4"}),"Statistics"]})]})})}),l.jsx(xo,{value:"console",className:"m-0",children:l.jsxs(ge,{className:"p-0",children:[l.jsx(fr,{ref:j,className:"h-[600px] p-4 font-['JetBrains_Mono'] text-sm bg-neutral-950/50",onScroll:N,children:i.map((ee,q)=>l.jsx("div",{className:"py-0.5 font-['JetBrains_Mono']",dangerouslySetInnerHTML:{__html:nAe(ee)}},q))}),l.jsxs("div",{className:"p-4 border-t border-neutral-800/50",children:[l.jsx("div",{className:"flex items-center gap-2 mb-2",children:l.jsxs(V,{variant:"ghost",size:"sm",className:"h-8 hidden",onClick:()=>O(!P),children:[l.jsx(Ve,{className:`w-4 h-4 mr-2 ${P?"text-green-500":"text-neutral-500"}`}),"Auto-scroll ",P?"enabled":"disabled"]})}),l.jsxs("form",{onSubmit:A,className:"flex gap-2",children:[l.jsx(Ce,{value:o,onChange:ee=>s(ee.target.value),onKeyDown:_,placeholder:"Type a command...",className:"flex-1 bg-neutral-950/50 border-neutral-800/50"}),l.jsx(V,{type:"submit",children:"Send"})]})]})]})}),l.jsx(xo,{value:"stats",className:"m-0",children:l.jsx(ge,{className:"p-4",children:l.jsx("div",{className:"space-y-6",children:l.jsxs("div",{className:"grid gap-4",children:[l.jsx("div",{className:"flex items-center gap-3",children:l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"Uptime"}),l.jsx("p",{className:"text-sm text-white font-medium",children:y.uptime||"-"})]})}),l.jsx("div",{className:"flex items-center gap-3",children:l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"Status"}),l.jsx("p",{className:"text-sm text-white font-medium",children:n})]})})]})})})})]})})}),l.jsx("div",{className:"xl:col-span-3 space-y-6",children:l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"flex items-center gap-2 text-base",children:"Server information"})}),l.jsx(ge,{className:"space-y-4",children:l.jsxs("div",{className:"grid gap-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(ba,{className:"w-4 h-4 text-neutral-400"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"Node"}),l.jsx("p",{className:"text-sm text-white font-medium",children:w==null?void 0:w.node})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(dA,{className:"w-4 h-4 text-neutral-400"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"IP Address"}),l.jsxs("p",{className:"text-sm text-white font-medium",children:[(I=(B=(D=($=(M=w==null?void 0:w.relationships)==null?void 0:M.allocations)==null?void 0:$.data)==null?void 0:D[0])==null?void 0:B.attributes)==null?void 0:I.ip_alias,":",(H=(U=(z=(F=(R=w==null?void 0:w.relationships)==null?void 0:R.allocations)==null?void 0:F.data)==null?void 0:z[0])==null?void 0:U.attributes)==null?void 0:H.port]})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(sH,{className:"w-4 h-4 text-neutral-400"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-neutral-500",children:"SFTP"}),l.jsxs("p",{className:"text-sm text-white font-medium",children:[((J=w==null?void 0:w.sftp_details)==null?void 0:J.ip)||"-",":",((ae=w==null?void 0:w.sftp_details)==null?void 0:ae.port)||"-"]})]})]})]})})]})})]})]}):l.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})})}function iAe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sM(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function oAe(e,t){if(e==null)return{};var n=aAe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sAe(e,t){return lAe(e)||cAe(e,t)||uAe(e,t)||dAe()}function lAe(e){if(Array.isArray(e))return e}function cAe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,a=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function uAe(e,t){if(e){if(typeof e=="string")return lM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lM(e,t)}}function lM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,i):function(){for(var o=arguments.length,s=new Array(o),c=0;c1&&arguments[1]!==void 0?arguments[1]:{};gp.initial(e),gp.handler(t);var n={current:e},r=td(PAe)(n,t),i=td(CAe)(n),a=td(gp.changes)(e),o=td(jAe)(n);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return gp.selector(u),u(n.current)}function c(u){hAe(r,i,a,o)(u)}return[s,c]}function jAe(e,t){return Uf(t)?t(e.current):t}function CAe(e,t){return e.current=uM(uM({},e.current),t),t}function PAe(e,t,n){return Uf(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var OAe={create:SAe},NAe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function AAe(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),a=0;a=e.length?e.apply(this,i):function(){for(var o=arguments.length,s=new Array(o),c=0;c{r.current=!1}:e,t)}var Jn=ZAe;function Cd(){}function Pl(e,t,n,r){return eEe(e,r)||tEe(e,t,n,r)}function eEe(e,t){return e.editor.getModel(lU(e,t))}function tEe(e,t,n,r){return e.editor.createModel(t,n,r?lU(e,r):void 0)}function lU(e,t){return e.Uri.parse(t)}function nEe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:a,modifiedModelPath:o,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:f={},height:h="100%",width:p="100%",className:v,wrapperProps:m={},beforeMount:y=Cd,onMount:x=Cd}){let[b,w]=g.useState(!1),[C,S]=g.useState(!0),j=g.useRef(null),P=g.useRef(null),O=g.useRef(null),N=g.useRef(x),A=g.useRef(y),_=g.useRef(!1);sU(()=>{let $=aU.init();return $.then(D=>(P.current=D)&&S(!1)).catch(D=>(D==null?void 0:D.type)!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>j.current?M():$.cancel()}),Jn(()=>{if(j.current&&P.current){let $=j.current.getOriginalEditor(),D=Pl(P.current,e||"",r||n||"text",a||"");D!==$.getModel()&&$.setModel(D)}},[a],b),Jn(()=>{if(j.current&&P.current){let $=j.current.getModifiedEditor(),D=Pl(P.current,t||"",i||n||"text",o||"");D!==$.getModel()&&$.setModel(D)}},[o],b),Jn(()=>{let $=j.current.getModifiedEditor();$.getOption(P.current.editor.EditorOption.readOnly)?$.setValue(t||""):t!==$.getValue()&&($.executeEdits("",[{range:$.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),$.pushUndoStop())},[t],b),Jn(()=>{var $,D;(D=($=j.current)==null?void 0:$.getModel())==null||D.original.setValue(e||"")},[e],b),Jn(()=>{let{original:$,modified:D}=j.current.getModel();P.current.editor.setModelLanguage($,r||n||"text"),P.current.editor.setModelLanguage(D,i||n||"text")},[n,r,i],b),Jn(()=>{var $;($=P.current)==null||$.editor.setTheme(u)},[u],b),Jn(()=>{var $;($=j.current)==null||$.updateOptions(f)},[f],b);let E=g.useCallback(()=>{var B;if(!P.current)return;A.current(P.current);let $=Pl(P.current,e||"",r||n||"text",a||""),D=Pl(P.current,t||"",i||n||"text",o||"");(B=j.current)==null||B.setModel({original:$,modified:D})},[n,t,i,e,r,a,o]),k=g.useCallback(()=>{var $;!_.current&&O.current&&(j.current=P.current.editor.createDiffEditor(O.current,{automaticLayout:!0,...f}),E(),($=P.current)==null||$.editor.setTheme(u),w(!0),_.current=!0)},[f,u,E]);g.useEffect(()=>{b&&N.current(j.current,P.current)},[b]),g.useEffect(()=>{!C&&!b&&k()},[C,b,k]);function M(){var D,B,I,R;let $=(D=j.current)==null?void 0:D.getModel();s||((B=$==null?void 0:$.original)==null||B.dispose()),c||((I=$==null?void 0:$.modified)==null||I.dispose()),(R=j.current)==null||R.dispose()}return T.createElement(oU,{width:p,height:h,isEditorReady:b,loading:d,_ref:O,className:v,wrapperProps:m})}var rEe=nEe;g.memo(rEe);function iEe(e){let t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}var aEe=iEe,yp=new Map;function oEe({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:a,theme:o="light",line:s,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:h=!1,width:p="100%",height:v="100%",className:m,wrapperProps:y={},beforeMount:x=Cd,onMount:b=Cd,onChange:w,onValidate:C=Cd}){let[S,j]=g.useState(!1),[P,O]=g.useState(!0),N=g.useRef(null),A=g.useRef(null),_=g.useRef(null),E=g.useRef(b),k=g.useRef(x),M=g.useRef(),$=g.useRef(r),D=aEe(a),B=g.useRef(!1),I=g.useRef(!1);sU(()=>{let z=aU.init();return z.then(U=>(N.current=U)&&O(!1)).catch(U=>(U==null?void 0:U.type)!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>A.current?F():z.cancel()}),Jn(()=>{var U,H,J,ae;let z=Pl(N.current,e||r||"",t||i||"",a||n||"");z!==((U=A.current)==null?void 0:U.getModel())&&(f&&yp.set(D,(H=A.current)==null?void 0:H.saveViewState()),(J=A.current)==null||J.setModel(z),f&&((ae=A.current)==null||ae.restoreViewState(yp.get(a))))},[a],S),Jn(()=>{var z;(z=A.current)==null||z.updateOptions(u)},[u],S),Jn(()=>{!A.current||r===void 0||(A.current.getOption(N.current.editor.EditorOption.readOnly)?A.current.setValue(r):r!==A.current.getValue()&&(I.current=!0,A.current.executeEdits("",[{range:A.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),A.current.pushUndoStop(),I.current=!1))},[r],S),Jn(()=>{var U,H;let z=(U=A.current)==null?void 0:U.getModel();z&&i&&((H=N.current)==null||H.editor.setModelLanguage(z,i))},[i],S),Jn(()=>{var z;s!==void 0&&((z=A.current)==null||z.revealLine(s))},[s],S),Jn(()=>{var z;(z=N.current)==null||z.editor.setTheme(o)},[o],S);let R=g.useCallback(()=>{var z;if(!(!_.current||!N.current)&&!B.current){k.current(N.current);let U=a||n,H=Pl(N.current,r||e||"",t||i||"",U||"");A.current=(z=N.current)==null?void 0:z.editor.create(_.current,{model:H,automaticLayout:!0,...u},d),f&&A.current.restoreViewState(yp.get(U)),N.current.editor.setTheme(o),s!==void 0&&A.current.revealLine(s),j(!0),B.current=!0}},[e,t,n,r,i,a,u,d,f,o,s]);g.useEffect(()=>{S&&E.current(A.current,N.current)},[S]),g.useEffect(()=>{!P&&!S&&R()},[P,S,R]),$.current=r,g.useEffect(()=>{var z,U;S&&w&&((z=M.current)==null||z.dispose(),M.current=(U=A.current)==null?void 0:U.onDidChangeModelContent(H=>{I.current||w(A.current.getValue(),H)}))},[S,w]),g.useEffect(()=>{if(S){let z=N.current.editor.onDidChangeMarkers(U=>{var J;let H=(J=A.current.getModel())==null?void 0:J.uri;if(H&&U.find(ae=>ae.path===H.path)){let ae=N.current.editor.getModelMarkers({resource:H});C==null||C(ae)}});return()=>{z==null||z.dispose()}}return()=>{}},[S,C]);function F(){var z,U;(z=M.current)==null||z.dispose(),h?f&&yp.set(a,A.current.saveViewState()):(U=A.current.getModel())==null||U.dispose(),A.current.dispose()}return T.createElement(oU,{width:p,height:v,isEditorReady:S,loading:c,_ref:_,className:m,wrapperProps:y})}var sEe=oEe,lEe=g.memo(sEe),cO="Dialog",[cU,uU]=un(cO),[cEe,di]=cU(cO),dU=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=g.useRef(null),c=g.useRef(null),[u=!1,d]=Mr({prop:r,defaultProp:i,onChange:a});return l.jsx(cEe,{scope:t,triggerRef:s,contentRef:c,contentId:ir(),titleId:ir(),descriptionId:ir(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:o,children:n})};dU.displayName=cO;var fU="DialogTrigger",hU=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=di(fU,n),a=_e(t,i.triggerRef);return l.jsx(pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fO(i.open),...r,ref:a,onClick:ne(e.onClick,i.onOpenToggle)})});hU.displayName=fU;var uO="DialogPortal",[uEe,pU]=cU(uO,{forceMount:void 0}),mU=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=di(uO,t);return l.jsx(uEe,{scope:t,forceMount:n,children:g.Children.map(r,o=>l.jsx(Jt,{present:n||a.open,children:l.jsx(sh,{asChild:!0,container:i,children:o})}))})};mU.displayName=uO;var Vv="DialogOverlay",vU=g.forwardRef((e,t)=>{const n=pU(Vv,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=di(Vv,e.__scopeDialog);return a.modal?l.jsx(Jt,{present:r||a.open,children:l.jsx(dEe,{...i,ref:t})}):null});vU.displayName=Vv;var dEe=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=di(Vv,n);return l.jsx(Fg,{as:Po,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(pe.div,{"data-state":fO(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Is="DialogContent",gU=g.forwardRef((e,t)=>{const n=pU(Is,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=di(Is,e.__scopeDialog);return l.jsx(Jt,{present:r||a.open,children:a.modal?l.jsx(fEe,{...i,ref:t}):l.jsx(hEe,{...i,ref:t})})});gU.displayName=Is;var fEe=g.forwardRef((e,t)=>{const n=di(Is,e.__scopeDialog),r=g.useRef(null),i=_e(t,n.contentRef,r);return g.useEffect(()=>{const a=r.current;if(a)return $C(a)},[]),l.jsx(yU,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ne(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:ne(e.onFocusOutside,a=>a.preventDefault())})}),hEe=g.forwardRef((e,t)=>{const n=di(Is,e.__scopeDialog),r=g.useRef(!1),i=g.useRef(!1);return l.jsx(yU,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),yU=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=di(Is,n),c=g.useRef(null),u=_e(t,c);return PC(),l.jsxs(l.Fragment,{children:[l.jsx(Ag,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(Zc,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":fO(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(mEe,{titleId:s.titleId}),l.jsx(gEe,{contentRef:c,descriptionId:s.descriptionId})]})]})}),dO="DialogTitle",xU=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=di(dO,n);return l.jsx(pe.h2,{id:i.titleId,...r,ref:t})});xU.displayName=dO;var bU="DialogDescription",wU=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=di(bU,n);return l.jsx(pe.p,{id:i.descriptionId,...r,ref:t})});wU.displayName=bU;var SU="DialogClose",jU=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=di(SU,n);return l.jsx(pe.button,{type:"button",...r,ref:t,onClick:ne(e.onClick,()=>i.onOpenChange(!1))})});jU.displayName=SU;function fO(e){return e?"open":"closed"}var CU="DialogTitleWarning",[pEe,PU]=VH(CU,{contentName:Is,titleName:dO,docsSlug:"dialog"}),mEe=({titleId:e})=>{const t=PU(CU),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},vEe="DialogDescriptionWarning",gEe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${PU(vEe).contentName}}.`;return g.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},OU=dU,yEe=hU,NU=mU,hO=vU,pO=gU,mO=xU,vO=wU,gO=jU;const st=OU,xEe=NU,AU=g.forwardRef(({className:e,...t},n)=>l.jsx(hO,{ref:n,className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));AU.displayName=hO.displayName;const et=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(xEe,{children:[l.jsx(AU,{}),l.jsxs(pO,{ref:r,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(gO,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(vg,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));et.displayName=pO.displayName;const tt=({className:e,...t})=>l.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});tt.displayName="DialogHeader";const Bt=({className:e,...t})=>l.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Bt.displayName="DialogFooter";const nt=g.forwardRef(({className:e,...t},n)=>l.jsx(mO,{ref:n,className:le("text-lg font-semibold leading-none tracking-tight",e),...t}));nt.displayName=mO.displayName;const Kt=g.forwardRef(({className:e,...t},n)=>l.jsx(vO,{ref:n,className:le("text-sm text-muted-foreground",e),...t}));Kt.displayName=vO.displayName;const bEe=wg("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Tt=g.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("div",{ref:r,role:"alert",className:le(bEe({variant:t}),e),...n}));Tt.displayName="Alert";const EU=g.forwardRef(({className:e,...t},n)=>l.jsx("h5",{ref:n,className:le("mb-1 font-medium leading-none tracking-tight",e),...t}));EU.displayName="AlertTitle";const _t=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:le("text-sm [&_p]:leading-relaxed",e),...t}));_t.displayName="AlertDescription";var wEe="Label",TU=g.forwardRef((e,t)=>l.jsx(pe.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));TU.displayName=wEe;var _U=TU;const SEe=wg("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ei=g.forwardRef(({className:e,...t},n)=>l.jsx(_U,{ref:n,className:le(SEe(),e),...t}));ei.displayName=_U.displayName;const Yi=g.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:le("w-full caption-bottom text-sm",e),...t})}));Yi.displayName="Table";const Xi=g.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:le("[&_tr]:border-b",e),...t}));Xi.displayName="TableHeader";const Qi=g.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:le("[&_tr:last-child]:border-0",e),...t}));Qi.displayName="TableBody";const jEe=g.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:le("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));jEe.displayName="TableFooter";const lt=g.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:le("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));lt.displayName="TableRow";const Oe=g.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:le("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Oe.displayName="TableHead";const he=g.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:le("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));he.displayName="TableCell";const CEe=g.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:le("mt-4 text-sm text-muted-foreground",e),...t}));CEe.displayName="TableCaption";var yO="Progress",xO=100,[PEe,I_e]=un(yO),[OEe,NEe]=PEe(yO),kU=g.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=AEe,...o}=e;(i||i===0)&&!fM(i)&&console.error(EEe(`${i}`,"Progress"));const s=fM(i)?i:xO;r!==null&&!hM(r,s)&&console.error(TEe(`${r}`,"Progress"));const c=hM(r,s)?r:null,u=Wv(c)?a(c,s):void 0;return l.jsx(OEe,{scope:n,value:c,max:s,children:l.jsx(pe.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Wv(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":$U(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});kU.displayName=yO;var MU="ProgressIndicator",RU=g.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=NEe(MU,n);return l.jsx(pe.div,{"data-state":$U(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});RU.displayName=MU;function AEe(e,t){return`${Math.round(e/t*100)}%`}function $U(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Wv(e){return typeof e=="number"}function fM(e){return Wv(e)&&!isNaN(e)&&e>0}function hM(e,t){return Wv(e)&&!isNaN(e)&&e<=t&&e>=0}function EEe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${xO}\`.`}function TEe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: + - a positive number + - less than the value passed to \`max\` (or ${xO} if no \`max\` prop is set) + - \`null\` or \`undefined\` if the progress is indeterminate. + +Defaulting to \`null\`.`}var DU=kU,_Ee=RU;const Cs=g.forwardRef(({className:e,value:t,...n},r)=>l.jsx(DU,{ref:r,className:le("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:l.jsx(_Ee,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Cs.displayName=DU.displayName;function IU(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var bO="Checkbox",[kEe,L_e]=un(bO),[MEe,REe]=kEe(bO),LU=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c="on",onCheckedChange:u,form:d,...f}=e,[h,p]=g.useState(null),v=_e(t,C=>p(C)),m=g.useRef(!1),y=h?d||!!h.closest("form"):!0,[x=!1,b]=Mr({prop:i,defaultProp:a,onChange:u}),w=g.useRef(x);return g.useEffect(()=>{const C=h==null?void 0:h.form;if(C){const S=()=>b(w.current);return C.addEventListener("reset",S),()=>C.removeEventListener("reset",S)}},[h,b]),l.jsxs(MEe,{scope:n,state:x,disabled:s,children:[l.jsx(pe.button,{type:"button",role:"checkbox","aria-checked":wo(x)?"mixed":x,"aria-required":o,"data-state":UU(x),"data-disabled":s?"":void 0,disabled:s,value:c,...f,ref:v,onKeyDown:ne(e.onKeyDown,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:ne(e.onClick,C=>{b(S=>wo(S)?!0:!S),y&&(m.current=C.isPropagationStopped(),m.current||C.stopPropagation())})}),y&&l.jsx($Ee,{control:h,bubbles:!m.current,name:r,value:c,checked:x,required:o,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:wo(a)?!1:a})]})});LU.displayName=bO;var FU="CheckboxIndicator",BU=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=REe(FU,n);return l.jsx(Jt,{present:r||wo(a.state)||a.state===!0,children:l.jsx(pe.span,{"data-state":UU(a.state),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});BU.displayName=FU;var $Ee=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...a}=e,o=g.useRef(null),s=IU(n),c=U4(t);g.useEffect(()=>{const d=o.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&p){const v=new Event("click",{bubbles:r});d.indeterminate=wo(n),p.call(d,wo(n)?!1:n),d.dispatchEvent(v)}},[s,n,r]);const u=g.useRef(wo(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??u.current,...a,tabIndex:-1,ref:o,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function wo(e){return e==="indeterminate"}function UU(e){return wo(e)?"indeterminate":e?"checked":"unchecked"}var zU=LU,DEe=BU;const Hv=g.forwardRef(({className:e,...t},n)=>l.jsx(zU,{ref:n,className:le("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(DEe,{className:le("flex items-center justify-center text-current"),children:l.jsx(Yc,{className:"h-4 w-4"})})}));Hv.displayName=zU.displayName;const IEe=1,LEe=1e6;let Kx=0;function FEe(){return Kx=(Kx+1)%Number.MAX_SAFE_INTEGER,Kx.toString()}const qx=new Map,pM=e=>{if(qx.has(e))return;const t=setTimeout(()=>{qx.delete(e),Pd({type:"REMOVE_TOAST",toastId:e})},LEe);qx.set(e,t)},BEe=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,IEe)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?pM(n):e.toasts.forEach(r=>{pM(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Hp=[];let Kp={toasts:[]};function Pd(e){Kp=BEe(Kp,e),Hp.forEach(t=>{t(Kp)})}function vS({...e}){const t=FEe(),n=i=>Pd({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Pd({type:"DISMISS_TOAST",toastId:t});return Pd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function UEe(){const[e,t]=g.useState(Kp);return g.useEffect(()=>(Hp.push(t),()=>{const n=Hp.indexOf(t);n>-1&&Hp.splice(n,1)}),[e]),{...e,toast:vS,dismiss:n=>Pd({type:"DISMISS_TOAST",toastId:n})}}const zEe=e=>{if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,n)).toFixed(1)} ${t[n]}`},VEe=e=>{const t=new Date(e);return new Intl.DateTimeFormat("en-US",{dateStyle:"medium",timeStyle:"short"}).format(t)},WEe=e=>{var r;const t=(r=e.split(".").pop())==null?void 0:r.toLowerCase();return{js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",java:"java",json:"json",xml:"xml",html:"html",css:"css",md:"markdown",yml:"yaml",yaml:"yaml",sh:"shell",bash:"shell",txt:"plaintext",properties:"properties",ini:"ini",sql:"sql",php:"php",rb:"ruby",rs:"rust",go:"go",c:"c",cpp:"cpp",cs:"csharp"}[t]||"plaintext"},mM=e=>{var i,a,o;if(!(e!=null&&e.is_file))return l.jsx(bD,{className:"h-4 w-4 text-blue-500"});const t=(i=e.name.split(".").pop())==null?void 0:i.toLowerCase(),n=["js","jsx","ts","tsx","py","java","php","rb","go","rs","c","cpp","cs"],r=["zip","tar","gz","rar","7z"];return n.includes(t)?l.jsx(Sm,{className:"h-4 w-4 text-violet-500"}):r.includes(t)?l.jsx(ys,{className:"h-4 w-4 text-yellow-500"}):(a=e.mimetype)!=null&&a.includes("json")?l.jsx(I9,{className:"h-4 w-4 text-green-500"}):(o=e.mimetype)!=null&&o.includes("text")?l.jsx(xD,{className:"h-4 w-4 text-orange-500"}):["jar","exe","bin","dll"].includes(t)?l.jsx(C9,{className:"h-4 w-4 text-purple-500"}):l.jsx(F9,{className:"h-4 w-4 text-gray-500"})},HEe=()=>{const{id:e}=Hi(),[t,n]=g.useState([]),[r,i]=g.useState("/"),[a,o]=g.useState(["/"]),[s,c]=g.useState(!1),[u,d]=g.useState(null),[f,h]=g.useState(null),[p,v]=g.useState([]),[m,y]=g.useState(!1),[x,b]=g.useState(null),[w,C]=g.useState(""),[S,j]=g.useState(!1),[P,O]=g.useState(0),[N,A]=g.useState(!1),[_,E]=g.useState({oldName:"",newName:""}),[k,M]=g.useState(!1),[$,D]=g.useState(""),[B,I]=g.useState("plaintext"),[R,F]=g.useState(!1),[z,U]=g.useState(!1),H=g.useCallback(G=>(G=G.replace(/\/+/g,"/"),G.endsWith("/")?G:`${G}/`),[]),J=g.useCallback((...G)=>H(G.join("/")),[H]),ae=g.useCallback((G,ue=null)=>{var $e,$t;console.error("Operation failed:",G);const we=ue||(($t=($e=G==null?void 0:G.response)==null?void 0:$e.data)==null?void 0:$t.error)||G.message||"Operation failed";d(we),vS({variant:"destructive",title:"Error",description:we,duration:5e3})},[]),ee=g.useCallback(G=>{vS({title:"Success",description:G,duration:3e3})},[]),q=g.useCallback(async(G="/")=>{c(!0),d(null);try{const ue=H(G),we=await fetch(`/api/server/${e}/files/list?directory=${encodeURIComponent(ue)}`);if(!we.ok)throw new Error(`Failed to fetch files: ${we.statusText}`);const $e=await we.json();if($e.object==="list"){n($e.data.map(jn=>jn.attributes)),i(ue);const $t=ue==="/"?["/"]:["/",...ue.split("/").filter(Boolean)];o($t)}else throw new Error("Invalid response format")}catch(ue){ae(ue,"Failed to fetch files")}finally{c(!1)}},[e,H,ae]),se=g.useCallback(async G=>{try{c(!0);const ue=J(r,G.name),we=await fetch(`/api/server/${e}/files/contents?file=${encodeURIComponent(ue)}`);if(!we.ok)throw new Error(`Failed to fetch file contents: ${we.statusText}`);const $e=await we.text();I(WEe(G.name)),D($e),h(G),F(!1)}catch(ue){ae(ue,"Failed to view file contents")}finally{c(!1)}},[e,r,J,ae]),X=async()=>{if(f)try{U(!0);const G=J(r,f.name),ue=await fetch(`/api/server/${e}/files/write?file=${encodeURIComponent(G)}`,{method:"POST",body:$});if(!ue.ok)throw new Error(`Failed to save file: ${ue.statusText}`);ee("File saved successfully"),F(!1)}catch(G){ae(G,"Failed to save file")}finally{U(!1)}},Z=async()=>{if(!w.trim()){ae(new Error("Name cannot be empty"));return}try{const G=H(r);if(x==="folder"){const ue=await fetch(`/api/server/${e}/files/create-folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:G,name:w})});if(!ue.ok)throw new Error(`Failed to create folder: ${ue.statusText}`)}else{const ue=J(r,w),we=await fetch(`/api/server/${e}/files/write?file=${encodeURIComponent(ue)}`,{method:"POST",body:" "});if(!we.ok)throw new Error(`Failed to create file: ${we.statusText}`)}ee(`${x==="folder"?"Folder":"File"} created successfully`),q(G),y(!1),C(""),b(null)}catch(G){ae(G,`Failed to create ${x}`)}},te=async()=>{if(!_.newName.trim()){ae(new Error("New name cannot be empty"));return}try{const G=H(r),ue=await fetch(`/api/server/${e}/files/rename`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:G,files:[{from:_.oldName,to:_.newName}]})});if(!ue.ok)throw new Error(`Failed to rename file: ${ue.statusText}`);ee("File renamed successfully"),q(G),A(!1),E({oldName:"",newName:""})}catch(G){ae(G,"Failed to rename file")}},W=async G=>{const ue=Array.isArray(G)?G:[G];try{const we=H(r),$e=await fetch(`/api/server/${e}/files/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:we,files:ue})});if(!$e.ok)throw new Error(`Failed to delete files: ${$e.statusText}`);ee(ue.length>1?`${ue.length} files deleted`:"File deleted successfully"),q(we),v([])}catch(we){ae(we,"Failed to delete file(s)")}},Se=async G=>{const ue=Array.isArray(G)?G:[G];try{const we=H(r),$e=await fetch(`/api/server/${e}/files/compress`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:we,files:ue})});if(!$e.ok)throw new Error(`Failed to create archive: ${$e.statusText}`);ee("Files archived successfully"),q(we),M(!1),v([])}catch(we){ae(we,"Failed to archive files")}},be=async G=>{try{const ue=H(r),we=await fetch(`/api/server/${e}/files/decompress`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ue,file:G.name})});if(!we.ok)throw new Error(`Failed to unarchive file: ${we.statusText}`);ee("File unarchived successfully"),q(ue)}catch(ue){ae(ue,"Failed to unarchive file")}},ze=async G=>{try{const ue=H(r),we=J(ue,G.name),$e=await fetch(`/api/server/${e}/files/download?file=${encodeURIComponent(we)}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(!$e.ok)throw new Error(`Failed to get download URL: ${$e.statusText}`);const $t=await $e.json();if($t.object==="signed_url"){const jn=document.createElement("a");jn.href=$t.attributes.url,jn.download=G.name,document.body.appendChild(jn),jn.click(),document.body.removeChild(jn),ee("Download started")}else throw new Error("Invalid download URL response")}catch(ue){ae(ue,"Failed to download file")}},He=async G=>{const ue=Array.from(G.target.files);if(ue.length!==0)try{O(0);const we=H(r),$e=await fetch(`/api/server/${e}/files/upload`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(!$e.ok)throw new Error(`Failed to get upload URL: ${$e.statusText}`);const $t=await $e.json();if($t.object!=="signed_url")throw new Error("Invalid upload URL response");const jn=new FormData;ue.forEach(fi=>jn.append("files",fi));const Ji=new XMLHttpRequest;Ji.open("POST",$t.attributes.url),Ji.upload.onprogress=fi=>{if(fi.lengthComputable){const s0=Math.round(fi.loaded/fi.total*100);O(s0)}},Ji.onload=()=>{if(Ji.status===200)ee(`${ue.length} file(s) uploaded successfully`),q(we),j(!1),O(0);else throw new Error(`Upload failed with status: ${Ji.status}`)},Ji.onerror=()=>{throw new Error("Upload failed")},Ji.send(jn)}catch(we){ae(we,"Failed to upload file(s)"),O(0)}},Xe=g.useCallback(G=>{R?window.confirm("You have unsaved changes. Are you sure you want to navigate away?")&&(h(null),D(""),F(!1),q(G)):q(G)},[R,q]),tn=g.useCallback(()=>{if(r==="/")return;const G=r.split("/").slice(0,-2).join("/")||"/";Xe(G)},[r,Xe]);g.useEffect(()=>{q()},[q]),g.useEffect(()=>{const G=ue=>{(ue.ctrlKey||ue.metaKey)&&ue.key==="s"&&f&&(ue.preventDefault(),X())};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[f,X]);const dn=g.useCallback(G=>l.jsxs(nf,{children:[l.jsx(rf,{asChild:!0,children:l.jsx(V,{variant:"ghost",size:"icon",children:l.jsx(Tj,{className:"h-4 w-4"})})}),l.jsxs(hc,{align:"end",className:"w-48",children:[l.jsx(zg,{children:"Actions"}),G.is_file&&l.jsxs(l.Fragment,{children:[l.jsxs(gn,{onClick:()=>se(G),children:[l.jsx(xD,{className:"mr-2 h-4 w-4"})," View/Edit"]}),l.jsxs(gn,{onClick:()=>ze(G),children:[l.jsx(Kd,{className:"mr-2 h-4 w-4"})," Download"]}),G.name.match(/\.(zip|tar|gz|rar|7z)$/i)?l.jsxs(gn,{onClick:()=>be(G),children:[l.jsx(ys,{className:"mr-2 h-4 w-4"})," Extract"]}):l.jsxs(gn,{onClick:()=>Se(G.name),children:[l.jsx(ys,{className:"mr-2 h-4 w-4"})," Archive"]}),l.jsx(WC,{})]}),l.jsxs(gn,{onClick:()=>{E({oldName:G.name,newName:G.name}),A(!0)},children:[l.jsx(Y9,{className:"mr-2 h-4 w-4"})," Rename"]}),l.jsxs(gn,{className:"text-destructive focus:text-destructive",onClick:()=>W(G.name),children:[l.jsx(Co,{className:"mr-2 h-4 w-4"})," Delete"]})]})]}),[se,ze,be,Se,W]);return l.jsxs("div",{className:"min-h-screen bg-background p-6",children:[l.jsxs(me,{className:"max-w-[1600px] mx-auto",children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[r!=="/"&&l.jsx(cS,{children:l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(V,{variant:"ghost",size:"icon",onClick:tn,children:l.jsx(yD,{className:"h-4 w-4"})})}),l.jsx(Ul,{children:"Go up"})]})}),l.jsx("div",{className:"flex items-center space-x-1",children:a.map((G,ue)=>l.jsxs(T.Fragment,{children:[l.jsx(V,{variant:"ghost",className:"h-8 text-sm px-2 hover:bg-accent",onClick:()=>{const we=a.slice(0,ue+1).join("");Xe(we)},children:G==="/"?"Root":G}),ue{b("file"),y(!0)},children:[l.jsx(L9,{className:"mr-2 h-4 w-4"})," New File"]}),l.jsxs(gn,{onClick:()=>{b("folder"),y(!0)},children:[l.jsx(bD,{className:"mr-2 h-4 w-4"})," New Folder"]})]})]}),l.jsxs(V,{variant:"outline",onClick:()=>j(!0),children:[l.jsx(lA,{className:"mr-2 h-4 w-4"})," Upload"]}),l.jsx(cS,{children:l.jsxs(Sd,{children:[l.jsx(jd,{asChild:!0,children:l.jsx(V,{variant:"outline",size:"icon",onClick:()=>q(r),disabled:s,children:l.jsx(J9,{className:`h-4 w-4 ${s?"animate-spin":""}`})})}),l.jsx(Ul,{children:"Refresh"})]})})]})]})}),l.jsxs(ge,{children:[u&&l.jsxs(Tt,{variant:"destructive",className:"mb-4",children:[l.jsx(OD,{className:"h-4 w-4"}),l.jsx(EU,{children:"Error"}),l.jsx(_t,{children:u})]}),l.jsx(fr,{className:"h-[600px] rounded-md border",children:l.jsxs(Yi,{children:[l.jsx(Xi,{children:l.jsxs(lt,{children:[l.jsx(Oe,{className:"w-12",children:l.jsx(Hv,{checked:t.length>0&&p.length===t.length,onCheckedChange:G=>{v(G?t.map(ue=>ue.name):[])}})}),l.jsx(Oe,{children:"Name"}),l.jsx(Oe,{children:"Size"}),l.jsx(Oe,{children:"Modified"}),l.jsx(Oe,{children:"Permissions"}),l.jsx(Oe,{className:"w-[100px]",children:"Actions"})]})}),l.jsxs(Qi,{children:[t.map(G=>l.jsxs(lt,{className:p.includes(G.name)?"bg-accent":"",children:[l.jsx(he,{children:l.jsx(Hv,{checked:p.includes(G.name),onCheckedChange:ue=>{v(ue?[...p,G.name]:p.filter(we=>we!==G.name))}})}),l.jsx(he,{children:l.jsxs("div",{className:"flex items-center space-x-2 cursor-pointer hover:text-primary",onClick:()=>{G.is_file?se(G):Xe(J(r,G.name))},children:[mM(G),l.jsx("span",{className:"font-medium",children:G.name})]})}),l.jsx(he,{children:zEe(G.size)}),l.jsx(he,{children:VEe(G.modified_at)}),l.jsx(he,{children:l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:G.mode})}),l.jsx(he,{children:dn(G)})]},G.name)),t.length===0&&!s&&l.jsx(lt,{children:l.jsx(he,{colSpan:6,className:"h-32 text-center text-muted-foreground",children:"This folder is empty"})})]})]})})]})]}),l.jsx(st,{open:m,onOpenChange:y,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsxs(nt,{children:["Create New ",x==="folder"?"Folder":"File"]}),l.jsxs(Kt,{children:["Enter a name for the new ",x]})]}),l.jsx("div",{className:"grid gap-4 py-4",children:l.jsxs("div",{className:"grid gap-2",children:[l.jsx(ei,{htmlFor:"name",children:"Name"}),l.jsx(Ce,{id:"name",value:w,onChange:G=>C(G.target.value),placeholder:x==="folder"?"New Folder":"file.txt",onKeyDown:G=>{G.key==="Enter"&&Z()}})]})}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"outline",onClick:()=>{y(!1),C(""),b(null)},children:"Cancel"}),l.jsx(V,{onClick:Z,disabled:!w.trim(),children:"Create"})]})]})}),l.jsx(st,{open:S,onOpenChange:j,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Upload Files"}),l.jsx(Kt,{children:"Drag and drop files or click to select"})]}),l.jsxs("div",{className:"grid gap-4 py-4",children:[l.jsxs("div",{className:"border-2 border-dashed rounded-lg p-12 text-center cursor-pointer hover:border-primary transition-colors relative",onClick:()=>document.getElementById("file-upload").click(),onDragOver:G=>{G.preventDefault(),G.currentTarget.classList.add("border-primary")},onDragLeave:G=>{G.preventDefault(),G.currentTarget.classList.remove("border-primary")},onDrop:G=>{if(G.preventDefault(),G.currentTarget.classList.remove("border-primary"),Array.from(G.dataTransfer.files).length>0){const we=document.getElementById("file-upload");we.files=G.dataTransfer.files,He({target:we})}},children:[l.jsx(lA,{className:"h-12 w-12 mx-auto text-muted-foreground"}),l.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Drop files here or click to browse"}),l.jsx("input",{id:"file-upload",type:"file",className:"hidden",multiple:!0,onChange:He})]}),P>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(Cs,{value:P,className:"w-full"}),l.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:[P,"% uploaded"]})]})]})]})}),l.jsx(st,{open:f!==null,onOpenChange:G=>{!G&&R?window.confirm("You have unsaved changes. Are you sure you want to close?")&&(h(null),D(""),F(!1)):G||(h(null),D(""),F(!1))},children:l.jsxs(et,{className:"max-w-6xl h-[80vh]",children:[l.jsx(tt,{children:l.jsxs(nt,{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[mM(f||{}),l.jsx("span",{children:f==null?void 0:f.name}),R&&l.jsx("span",{className:"text-sm text-muted-foreground",children:"(unsaved)"})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(V,{variant:R?"default":"outline",size:"sm",onClick:X,disabled:!R||z,children:z?l.jsxs(l.Fragment,{children:[l.jsx(Ni,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):l.jsxs(l.Fragment,{children:[l.jsx(zs,{className:"h-4 w-4 mr-2"}),"Save"]})}),l.jsx(V,{variant:"ghost",size:"icon",onClick:()=>{R?window.confirm("You have unsaved changes. Are you sure you want to close?")&&(h(null),D(""),F(!1)):(h(null),D(""))},children:l.jsx(vg,{className:"h-4 w-4"})})]})]})}),l.jsx("div",{className:"h-[calc(80vh-8rem)]",children:l.jsx(lEe,{height:"100%",language:B,value:$,onChange:G=>{D(G||""),F(!0)},theme:"vs-dark",options:{minimap:{enabled:!0},fontSize:14,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,tabSize:2,renderWhitespace:"selection",cursorBlinking:"smooth",smoothScrolling:!0,bracketPairColorization:!0},loading:l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx(Ni,{className:"h-8 w-8 animate-spin"})})})})]})}),l.jsx(st,{open:N,onOpenChange:A,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Rename Item"}),l.jsx(Kt,{children:"Enter a new name for the item"})]}),l.jsx("div",{className:"grid gap-4 py-4",children:l.jsxs("div",{className:"grid gap-2",children:[l.jsx(ei,{htmlFor:"newName",children:"New name"}),l.jsx(Ce,{id:"newName",value:_.newName,onChange:G=>E({..._,newName:G.target.value}),onKeyDown:G=>{G.key==="Enter"&&te()}})]})}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"outline",onClick:()=>{A(!1),E({oldName:"",newName:""})},children:"Cancel"}),l.jsx(V,{onClick:te,disabled:!_.newName.trim()||_.newName===_.oldName,children:"Rename"})]})]})}),l.jsx(st,{open:k,onOpenChange:M,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Create Archive"}),l.jsxs(Kt,{children:[p.length," file(s) will be archived"]})]}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"outline",onClick:()=>{M(!1)},children:"Cancel"}),l.jsx(V,{onClick:Se,children:"Create Archive"})]})]})}),p.length>0&&l.jsx("div",{className:"fixed bottom-6 left-1/2 transform -translate-x-1/2 z-50",children:l.jsx(me,{className:"shadow-lg",children:l.jsxs(ge,{className:"flex items-center gap-4 p-4",children:[l.jsxs("span",{className:"text-sm text-muted-foreground",children:[p.length," item",p.length!==1?"s":""," selected"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(V,{variant:"outline",size:"sm",onClick:()=>Se(p),children:[l.jsx(ys,{className:"h-4 w-4 mr-2"}),"Archive Selected"]}),l.jsxs(V,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive-foreground hover:bg-destructive",onClick:()=>{window.confirm(`Are you sure you want to delete ${p.length} file(s)?`)&&W(p)},children:[l.jsx(Co,{className:"h-4 w-4 mr-2"}),"Delete Selected"]})]})]})})}),s&&l.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm flex items-center justify-center z-50",children:l.jsxs("div",{className:"flex items-center gap-2 bg-background p-4 rounded-lg shadow-lg",children:[l.jsx(Ni,{className:"h-6 w-6 animate-spin"}),l.jsx("span",{className:"text-sm",children:"Loading..."})]})})]})},KEe=()=>{var S,j,P,O;const{id:e}=Hi(),[t,n]=g.useState([]),[r,i]=g.useState(""),[a,o]=g.useState(!1),[s,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(!1),[p,v]=g.useState({success:null,message:""}),[m,y]=g.useState(!1),x=async(N="")=>{o(!0),c(null);try{console.log("Fetching plugins with query:",N);const A=N?"/api/plugins/search":"/api/plugins/list",_=await ie.get(A,{params:{query:N}});console.log("Plugins fetched:",_.data),n(_.data)}catch(A){c("Failed to fetch plugins. Please try again later."),console.error(A)}finally{o(!1)}},b=N=>{N.preventDefault(),x(r)},w=async N=>{var A,_;y(!0);try{const E=await ie.post(`/api/plugins/install/${e}`,{pluginId:N});v({success:!0,message:E.data.message})}catch(E){v({success:!1,message:((_=(A=E.response)==null?void 0:A.data)==null?void 0:_.message)||"Failed to install plugin."}),console.error(E)}finally{y(!1),h(!0)}},C=N=>{d(N),h(!0)};return g.useEffect(()=>{x()},[]),l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:"Plugins"}),l.jsxs("form",{onSubmit:b,className:"flex gap-2",children:[l.jsx(Ce,{value:r,onChange:N=>i(N.target.value),placeholder:"Search plugins...",className:"flex-1 bg-neutral-950/50 border-neutral-800/50"}),l.jsxs(V,{type:"submit",children:[l.jsx(Z9,{className:"w-4 h-4 mr-2"}),"Search"]})]})]}),l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Available Plugins"})}),l.jsx(ge,{children:a?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})}):s?l.jsx("div",{className:"flex items-center justify-center min-h-[200px] text-red-400",children:s}):l.jsx(fr,{className:"h-[600px]",children:l.jsxs(Yi,{children:[l.jsx(Xi,{children:l.jsxs(lt,{children:[l.jsx(Oe,{children:"Name"}),l.jsx(Oe,{children:"Description"}),l.jsx(Oe,{children:"Downloads"}),l.jsx(Oe,{children:"Rating"}),l.jsx(Oe,{children:"Actions"})]})}),l.jsx(Qi,{children:t.map(N=>{var A,_;return l.jsxs(lt,{onClick:()=>C(N),className:"cursor-pointer hover:bg-neutral-800/50",children:[l.jsx(he,{className:"font-medium",children:N.name}),l.jsx(he,{className:"text-neutral-400",children:N.tag}),l.jsx(he,{children:l.jsx(Pt,{variant:"secondary",children:N.downloads.toLocaleString()})}),l.jsx(he,{children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(fA,{className:"w-4 h-4 text-yellow-400"}),l.jsx("span",{children:((_=(A=N.rating)==null?void 0:A.average)==null?void 0:_.toFixed(1))||"N/A"})]})}),l.jsx(he,{children:N.premium?l.jsxs(V,{size:"sm",variant:"premium",disabled:!0,children:[l.jsx(uA,{className:"w-4 h-4 mr-2"}),"Premium"]}):l.jsxs(V,{size:"sm",onClick:E=>{E.stopPropagation(),w(N.id)},disabled:m,children:[m?l.jsx(Ni,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Kd,{className:"w-4 h-4 mr-2"}),m?"Installing...":"Install"]})})]},N.id)})})]})})})]}),l.jsx(st,{open:f,onOpenChange:h,children:l.jsx(et,{children:u?l.jsxs(l.Fragment,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:u.name}),l.jsx(Kt,{children:u.tag})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(Pt,{variant:"secondary",children:["Downloads: ",u.downloads.toLocaleString()]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(fA,{className:"w-4 h-4 text-yellow-400"}),l.jsx("span",{children:((j=(S=u.rating)==null?void 0:S.average)==null?void 0:j.toFixed(1))||"N/A"})]})]}),l.jsxs("p",{className:"text-sm text-neutral-400",children:["Author: ",((P=u.author)==null?void 0:P.id)||"Unknown"]}),l.jsxs("p",{className:"text-sm text-neutral-400",children:["Version: ",((O=u.version)==null?void 0:O.id)||"N/A"]})]}),l.jsx(Bt,{children:u.premium?l.jsxs(V,{variant:"premium",disabled:!0,className:"w-full",children:[l.jsx(uA,{className:"w-4 h-4 mr-2"}),"Premium"]}):l.jsxs(V,{onClick:()=>w(u.id),className:"w-full",disabled:m,children:[m?l.jsx(Ni,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Kd,{className:"w-4 h-4 mr-2"}),m?"Installing...":"Install Plugin"]})})]}):l.jsxs(l.Fragment,{children:[l.jsx(tt,{children:l.jsx(nt,{children:p.success?"Success":"Error"})}),l.jsx(Kt,{children:p.message}),l.jsx(Bt,{children:l.jsx(V,{onClick:()=>h(!1),children:"Close"})})]})})})]})},qEe=5,GEe=5e3,YEe=e=>e.replace(/\u001b\[(\d+)m/g,(t,n)=>``).replace(/\u001b\[0m/g,"").replace(/\n/g,"
");function XEe(){const{id:e}=Hi(),t=g.useRef(null),[n,r]=g.useState("offline"),[i,a]=g.useState([]),[o,s]=g.useState(""),[c,u]=g.useState([]),[d,f]=g.useState(-1),[h,p]=g.useState(0),[v,m]=g.useState(!0),y=g.useRef(null),x=g.useRef(!0),b=g.useCallback(j=>{var P;if(x.current)try{const O=JSON.parse(j.data);switch(O.event){case"auth success":(P=t.current)==null||P.send(JSON.stringify({event:"send logs",args:[null]}));break;case"console output":a(N=>[...N.slice(-1e3),O.args[0]]);break;case"status":r(O.args[0]);break}}catch(O){console.error("WebSocket message handling error:",O)}},[]);g.useEffect(()=>{x.current=!0;const j=async()=>{try{if(!x.current)return;const{data:P}=await ie.get(`/api/server/${e}/websocket`),O=new WebSocket(P.data.socket);O.onopen=()=>{if(!x.current){O.close();return}console.log("WebSocket connected"),p(0),O.send(JSON.stringify({event:"auth",args:[P.data.token]}))},O.onmessage=b,O.onclose=()=>{x.current&&(console.log("WebSocket disconnected"),h{x.current&&(p(N=>N+1),j())},GEe))},t.current=O}catch(P){console.error("WebSocket connection error:",P)}};return j(),()=>{x.current=!1,t.current&&(t.current.close(),t.current=null)}},[e,h,b]),g.useEffect(()=>{if(v&&y.current){const j=y.current.querySelector("[data-radix-scroll-area-viewport]");j&&setTimeout(()=>{j.scrollTo({top:j.scrollHeight,behavior:"instant"})},0)}},[i,v]);const w=g.useCallback(j=>{const P=j.currentTarget,O=Math.abs(P.scrollHeight-P.clientHeight-P.scrollTop)<50;m(O)},[]),C=j=>{j==null||j.preventDefault(),!(!o.trim()||!t.current)&&(t.current.send(JSON.stringify({event:"send command",args:[o]})),u(P=>[o,...P.slice(0,99)]),s(""),f(-1))},S=j=>{j.key==="ArrowUp"?(j.preventDefault(),f(P=>{if(P{if(P>-1){const O=P-1;return s(O===-1?"":c[O]),O}return P}))};return l.jsxs("div",{className:"min-h-screen bg-neutral-950 p-6",children:[l.jsx(fr,{ref:y,className:"h-[600px] p-4 font-mono text-sm bg-neutral-950/50",onScroll:w,children:i.map((j,P)=>l.jsx("div",{className:"py-0.5",dangerouslySetInnerHTML:{__html:YEe(j)}},P))}),l.jsxs("div",{className:"border-t border-neutral-800/50",children:[l.jsx("div",{className:"hidden flex items-center gap-2 mb-2 pt-4",children:l.jsxs(V,{variant:"ghost",size:"sm",className:"h-8",onClick:()=>m(!v),children:[l.jsx(Ve,{className:`w-4 h-4 mr-2 ${v?"text-green-500":"text-neutral-500"}`}),"Auto-scroll ",v?"enabled":"disabled"]})}),l.jsxs("form",{onSubmit:C,className:"flex gap-2 pt-4",children:[l.jsx(Ce,{value:o,onChange:j=>s(j.target.value),onKeyDown:S,placeholder:"Type a command...",className:"flex-1 bg-neutral-950/50 border-neutral-800/50"}),l.jsx(V,{type:"submit",children:"Send"})]})]})]})}const QEe=()=>{const{id:e}=Hi(),[t,n]=g.useState([]),[r,i]=g.useState(!1),[a,o]=g.useState(null),[s,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(!1),[p,v]=g.useState(!1),[m,y]=g.useState(null),[x,b]=g.useState(!1),[w,C]=g.useState(!1),S=async()=>{i(!0),o(null);try{const O=await ie.get(`/api/server/${e}/allocations`);n(O.data)}catch(O){o("Failed to fetch allocations. Please try again later."),console.error(O)}finally{i(!1)}},j=async()=>{var O,N,A,_,E;d(null),b(!0);try{const k=await ie.post(`/api/server/${e}/allocations`,{});n([...t,k.data]),h(!1)}catch(k){const M=(E=(_=(A=(N=(O=k.response)==null?void 0:O.data)==null?void 0:N.details)==null?void 0:A.errors)==null?void 0:_[0])==null?void 0:E.detail;d(M||"Failed to create allocation. Please try again later."),console.error(k)}finally{b(!1)}},P=async()=>{var O,N,A,_,E;c(null),C(!0);try{await ie.delete(`/api/server/${e}/allocations/${m.id}`),n(t.filter(k=>k.id!==m.id)),v(!1)}catch(k){const M=(E=(_=(A=(N=(O=k.response)==null?void 0:O.data)==null?void 0:N.details)==null?void 0:A.errors)==null?void 0:_[0])==null?void 0:E.detail;c(M||"Failed to delete allocation. Please try again later."),console.error(k)}finally{C(!1)}};return g.useEffect(()=>{S()},[e]),g.useEffect(()=>{p||(c(null),C(!1))},[p]),g.useEffect(()=>{f||(d(null),b(!1))},[f]),l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:"Network"}),l.jsxs(V,{onClick:()=>h(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add Allocation"]})]}),l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"IP allocations"})}),l.jsx(ge,{children:r?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})}):a?l.jsx("div",{className:"flex items-center justify-center min-h-[200px] text-red-400",children:a}):l.jsx(fr,{className:"h-[600px]",children:l.jsxs(Yi,{children:[l.jsx(Xi,{children:l.jsxs(lt,{children:[l.jsx(Oe,{children:"IP Address"}),l.jsx(Oe,{children:"Port"}),l.jsx(Oe,{children:"Primary"}),l.jsx(Oe,{children:"Alias"}),l.jsx(Oe,{children:"Actions"})]})}),l.jsx(Qi,{children:t.map(O=>l.jsxs(lt,{children:[l.jsx(he,{children:O.ip}),l.jsx(he,{children:O.port}),l.jsx(he,{children:O.is_primary?"Yes":"No"}),l.jsx(he,{children:O.alias||"N/A"}),l.jsx(he,{children:l.jsxs(V,{size:"sm",variant:"destructive",onClick:()=>{y(O),v(!0)},children:[l.jsx(Co,{className:"w-4 h-4 mr-2"}),"Delete"]})})]},O.id))})]})})})]}),l.jsx(st,{open:f,onOpenChange:h,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Add Allocation"}),l.jsx(Kt,{children:"A new allocation with a random port will be added to the server."})]}),u&&l.jsx(Tt,{variant:"destructive",className:"mt-2",children:l.jsx(_t,{children:u})}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"secondary",onClick:()=>h(!1),children:"Cancel"}),l.jsxs(V,{onClick:j,disabled:x,children:[x?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add Allocation"]})]})]})}),l.jsx(st,{open:p,onOpenChange:v,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Delete Allocation"}),l.jsx(Kt,{children:"Are you sure you want to delete this allocation?"})]}),s&&l.jsx(Tt,{variant:"destructive",className:"mt-2",children:l.jsx(_t,{children:s})}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"secondary",onClick:()=>v(!1),children:"Cancel"}),l.jsxs(V,{variant:"destructive",onClick:P,disabled:w,children:[w?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Co,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})]})},JEe=()=>{const{id:e}=Hi(),[t,n]=g.useState([]),[r,i]=g.useState(!1),[a,o]=g.useState(null),[s,c]=g.useState(!1),[u,d]=g.useState(!1),[f,h]=g.useState(null),[p,v]=g.useState(""),m=async()=>{try{await ie.post("/api/subuser-servers-sync")}catch(w){console.error("Failed to sync subuser servers:",w)}},y=async()=>{i(!0),o(null);try{const w=await ie.get(`/api/server/${e}/users`);n(w.data.data),await m()}catch(w){o("Failed to fetch users. Please try again later."),console.error(w)}finally{i(!1)}},x=async()=>{try{const w=await ie.post(`/api/server/${e}/users`,{email:p});n([...t,w.data]),c(!1),v(""),await m()}catch(w){o("Failed to add user. Please try again later."),console.error(w)}},b=async()=>{try{await ie.delete(`/api/server/${e}/users/${f.attributes.uuid}`),n(t.filter(w=>w.attributes.uuid!==f.attributes.uuid)),d(!1),await m()}catch(w){o("Failed to delete user. Please try again later."),console.error(w)}};return g.useEffect(()=>{y()},[e]),l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:"Users"}),l.jsxs(V,{onClick:()=>c(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add User"]})]}),l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Sub-users"})}),l.jsx(ge,{children:r?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})}):a?l.jsx("div",{className:"flex items-center justify-center min-h-[200px] text-red-400",children:a}):l.jsx(fr,{className:"h-[600px]",children:l.jsxs(Yi,{children:[l.jsx(Xi,{children:l.jsxs(lt,{children:[l.jsx(Oe,{children:"Username"}),l.jsx(Oe,{children:"Email"}),l.jsx(Oe,{children:"Actions"})]})}),l.jsx(Qi,{children:t.map(w=>l.jsxs(lt,{children:[l.jsx(he,{children:w.attributes.username}),l.jsx(he,{children:w.attributes.email}),l.jsx(he,{children:l.jsxs(V,{size:"sm",variant:"destructive",onClick:()=>{h(w),d(!0)},children:[l.jsx(Co,{className:"w-4 h-4 mr-2"}),"Delete"]})})]},w.attributes.username))})]})})})]}),l.jsx(st,{open:s,onOpenChange:c,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Add User"}),l.jsx(Kt,{children:"Add a new user to the server by entering their email address."})]}),l.jsx("div",{className:"space-y-4",children:l.jsx(Ce,{placeholder:"Email",value:p,onChange:w=>v(w.target.value)})}),l.jsx(Bt,{children:l.jsxs(V,{onClick:x,children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add User"]})})]})}),l.jsx(st,{open:u,onOpenChange:d,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Delete User"}),l.jsx(Kt,{children:"Are you sure you want to delete this user?"})]}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"secondary",onClick:()=>d(!1),children:"Cancel"}),l.jsxs(V,{variant:"destructive",onClick:b,children:[l.jsx(Co,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})]})};var VU="AlertDialog",[ZEe,F_e]=un(VU,[uU]),Ma=uU(),WU=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ma(t);return l.jsx(OU,{...r,...n,modal:!0})};WU.displayName=VU;var e2e="AlertDialogTrigger",t2e=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ma(n);return l.jsx(yEe,{...i,...r,ref:t})});t2e.displayName=e2e;var n2e="AlertDialogPortal",HU=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ma(t);return l.jsx(NU,{...r,...n})};HU.displayName=n2e;var r2e="AlertDialogOverlay",KU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ma(n);return l.jsx(hO,{...i,...r,ref:t})});KU.displayName=r2e;var zl="AlertDialogContent",[i2e,a2e]=ZEe(zl),qU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,a=Ma(n),o=g.useRef(null),s=_e(t,o),c=g.useRef(null);return l.jsx(pEe,{contentName:zl,titleName:GU,docsSlug:"alert-dialog",children:l.jsx(i2e,{scope:n,cancelRef:c,children:l.jsxs(pO,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:ne(i.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(Dj,{children:r}),l.jsx(s2e,{contentRef:o})]})})})});qU.displayName=zl;var GU="AlertDialogTitle",YU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ma(n);return l.jsx(mO,{...i,...r,ref:t})});YU.displayName=GU;var XU="AlertDialogDescription",QU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ma(n);return l.jsx(vO,{...i,...r,ref:t})});QU.displayName=XU;var o2e="AlertDialogAction",JU=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ma(n);return l.jsx(gO,{...i,...r,ref:t})});JU.displayName=o2e;var ZU="AlertDialogCancel",ez=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=a2e(ZU,n),a=Ma(n),o=_e(t,i);return l.jsx(gO,{...a,...r,ref:o})});ez.displayName=ZU;var s2e=({contentRef:e})=>{const t=`\`${zl}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${zl}\` by passing a \`${XU}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${zl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},l2e=WU,c2e=HU,tz=KU,nz=qU,rz=JU,iz=ez,az=YU,oz=QU;const Na=l2e,u2e=c2e,sz=g.forwardRef(({className:e,...t},n)=>l.jsx(tz,{className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));sz.displayName=tz.displayName;const Ii=g.forwardRef(({className:e,...t},n)=>l.jsxs(u2e,{children:[l.jsx(sz,{}),l.jsx(nz,{ref:n,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Ii.displayName=nz.displayName;const Li=({className:e,...t})=>l.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});Li.displayName="AlertDialogHeader";const Fi=({className:e,...t})=>l.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Fi.displayName="AlertDialogFooter";const Bi=g.forwardRef(({className:e,...t},n)=>l.jsx(az,{ref:n,className:le("text-lg font-semibold",e),...t}));Bi.displayName=az.displayName;const Ui=g.forwardRef(({className:e,...t},n)=>l.jsx(oz,{ref:n,className:le("text-sm text-muted-foreground",e),...t}));Ui.displayName=oz.displayName;const zi=g.forwardRef(({className:e,...t},n)=>l.jsx(rz,{ref:n,className:le(Wj(),e),...t}));zi.displayName=rz.displayName;const Vi=g.forwardRef(({className:e,...t},n)=>l.jsx(iz,{ref:n,className:le(Wj({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vi.displayName=iz.displayName;const d2e=6e4,f2e=({player:e,onAction:t})=>{const[n,r]=g.useState(!1),[i,a]=g.useState(null),o=c=>{a(c),r(!0)},s=()=>{t(i,e.name),r(!1)};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(V,{variant:"destructive",size:"sm",onClick:()=>o("ban"),children:[l.jsx(j9,{className:"w-4 h-4 mr-2"}),"Ban"]}),l.jsxs(V,{variant:"default",size:"sm",onClick:()=>o("op"),children:[l.jsx(M9,{className:"w-4 h-4 mr-2"}),"Make OP"]})]}),l.jsx(Na,{open:n,onOpenChange:r,children:l.jsxs(Ii,{children:[l.jsxs(Li,{children:[l.jsx(Bi,{children:i==="ban"?"Ban Player":"Make Player OP"}),l.jsx(Ui,{children:i==="ban"?`Are you sure you want to ban ${e.name}? This action can be undone later.`:`Are you sure you want to give ${e.name} operator privileges?`})]}),l.jsxs(Fi,{children:[l.jsx(Vi,{children:"Cancel"}),l.jsx(zi,{onClick:s,variant:i==="ban"?"destructive":"default",children:"Confirm"})]})]})})]})};function h2e(){var p;const{id:e}=Hi(),t=g.useRef(null),[n,r]=g.useState(null),[i,a]=g.useState(!0),[o,s]=g.useState(null),c=g.useRef(!0),u=g.useRef(null),d=g.useCallback(async()=>{var v,m,y,x,b,w,C,S,j,P;try{const{data:O}=await ie.get(`/api/server/${e}`);console.log("Server Info:",O);const{data:N}=await ie.get(`https://api.mcsrvstat.us/3/${(b=(x=(y=(m=(v=O==null?void 0:O.attributes.relationships)==null?void 0:v.allocations)==null?void 0:m.data)==null?void 0:y[0])==null?void 0:x.attributes)==null?void 0:b.ip_alias}:${(P=(j=(S=(C=(w=O==null?void 0:O.attributes.relationships)==null?void 0:w.allocations)==null?void 0:C.data)==null?void 0:S[0])==null?void 0:j.attributes)==null?void 0:P.port}`);c.current&&(r(N),s(null))}catch(O){c.current&&s(O.message)}finally{c.current&&a(!1)}},[e]);g.useEffect(()=>(c.current=!0,d(),u.current=setInterval(d,d2e),()=>{c.current=!1,u.current&&clearInterval(u.current)}),[d]),g.useEffect(()=>((async()=>{try{const{data:m}=await ie.get(`/api/server/${e}/websocket`),y=new WebSocket(m.data.socket);y.onopen=()=>{if(!c.current){y.close();return}y.send(JSON.stringify({event:"auth",args:[m.data.token]}))},t.current=y}catch(m){console.error("WebSocket connection error:",m)}})(),()=>{t.current&&(t.current.close(),t.current=null)}),[e]);const f=(v,m)=>{if(!t.current)return;const y=v==="ban"?`ban ${m}`:`op ${m}`;t.current.send(JSON.stringify({event:"send command",args:[y]}))},h=()=>{a(!0),d()};return i?l.jsx(me,{className:"mt-6",children:l.jsx(je,{children:l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(fd,{className:"w-5 h-5"}),"Loading Server Status..."]})})}):o||!n?l.jsxs(me,{className:"mt-6",children:[l.jsx(je,{children:l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(fd,{className:"w-5 h-5"}),"Server Error"]})}),l.jsxs(ge,{children:[l.jsx("p",{className:"text-neutral-500",children:"Unable to query the Minecraft server. This might mean the server is offline or not running Minecraft: Java Edition."}),l.jsxs(V,{variant:"outline",size:"sm",onClick:h,className:"mt-4",children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})]}):n.online?l.jsxs(me,{className:"mt-6",children:[l.jsxs(je,{className:"flex flex-row items-center justify-between",children:[l.jsxs("div",{children:[l.jsxs(Te,{className:"flex items-center gap-2",children:["Online Players (",n.players.online,"/",n.players.max,")"]}),l.jsxs("p",{className:"text-sm text-neutral-500 mt-1",children:["Minecraft version ",n.version]})]}),l.jsxs(V,{variant:"outline",size:"sm",onClick:h,children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),l.jsx(ge,{children:(p=n.players.list)!=null&&p.length?l.jsx(fr,{className:"h-[400px] pr-4",children:l.jsx("div",{className:"space-y-4",children:n.players.list.map(v=>l.jsx(me,{className:"bg-neutral-950/50",children:l.jsxs(ge,{className:"flex items-center justify-between p-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("img",{src:`https://minotar.net/avatar/${v.name}/64`,alt:`${v.name}'s skin`,className:"w-10 h-10 rounded"}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium",children:v.name}),l.jsxs("a",{href:`https://namemc.com/profile/${v.uuid}`,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-neutral-500 hover:text-neutral-400 flex items-center gap-1",children:["View on NameMC",l.jsx(S9,{className:"w-3 h-3"})]})]})]}),l.jsx(f2e,{player:v,onAction:f})]})},v.uuid))})}):l.jsx("p",{className:"text-neutral-500",children:"No players are currently online."})})]}):l.jsxs(me,{className:"mt-6",children:[l.jsx(je,{children:l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(fd,{className:"w-5 h-5"}),"Server Offline"]})}),l.jsxs(ge,{children:[l.jsx("p",{className:"text-neutral-500",children:"The Minecraft server is currently offline."}),l.jsxs(V,{variant:"outline",size:"sm",onClick:h,className:"mt-4",children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Check Again"]})]})]})}const p2e=()=>{const{id:e}=Hi(),[t,n]=g.useState([]),[r,i]=g.useState(!1),[a,o]=g.useState(null),[s,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(!1),[p,v]=g.useState(!1),[m,y]=g.useState(null),[x,b]=g.useState(!1),[w,C]=g.useState(!1),S=async()=>{i(!1),o(null);try{const E=await ie.get(`/api/server/${e}/backups`);n(E.data.data)}catch(E){o("Failed to fetch backups. Please try again later."),console.error(E)}},j=async()=>{c(null),b(!0);try{const E=await ie.post(`/api/server/${e}/backups`);n([...t,E.data]),h(!1)}catch(E){c("Failed to create backup. Please try again later."),console.error(E)}finally{b(!1)}},P=async()=>{d(null),C(!0);try{await ie.delete(`/api/server/${e}/backups/${m.attributes.uuid}`),n(t.filter(E=>E.attributes.uuid!==m.attributes.uuid)),v(!1)}catch(E){d("Failed to delete backup. Please try again later."),console.error(E)}finally{C(!1)}},O=async E=>{try{const k=await ie.get(`/api/server/${e}/backups/${E.attributes.uuid}/download`);window.open(k.data.attributes.url,"_blank")}catch(k){console.error("Failed to generate download link:",k)}},N=E=>!E.attributes.is_successful&&E.attributes.bytes===0?"Creating":E.attributes.is_successful?"Completed":"Failed",A=E=>{if(E===0)return"Pending";const k=1024,M=["Bytes","KB","MB","GB","TB"],$=Math.floor(Math.log(E)/Math.log(k));return parseFloat((E/Math.pow(k,$)).toFixed(2))+" "+M[$]},_=E=>new Date(E).toLocaleString();return g.useEffect(()=>{S();const E=setInterval(S,3e3);return()=>clearInterval(E)},[e]),g.useEffect(()=>{p||(d(null),C(!1))},[p]),g.useEffect(()=>{f||(c(null),b(!1))},[f]),l.jsxs("div",{className:"space-y-6 p-6 bg-neutral-950",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h1",{className:"text-2xl font-bold text-white",children:"Backups"}),l.jsxs(V,{onClick:()=>h(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Backup"]})]}),l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Server backups"})}),l.jsx(ge,{children:r?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})}):a?l.jsx("div",{className:"flex items-center justify-center min-h-[200px] text-red-400",children:a}):l.jsx(fr,{className:"h-[600px]",children:l.jsxs(Yi,{children:[l.jsx(Xi,{children:l.jsxs(lt,{children:[l.jsx(Oe,{children:"Name"}),l.jsx(Oe,{children:"Size"}),l.jsx(Oe,{children:"Created"}),l.jsx(Oe,{children:"Status"}),l.jsx(Oe,{children:"Actions"})]})}),l.jsx(Qi,{children:t.map(E=>l.jsxs(lt,{children:[l.jsx(he,{children:E.attributes.name||"Backup"}),l.jsx(he,{children:A(E.attributes.bytes)}),l.jsx(he,{children:_(E.attributes.created_at)}),l.jsx(he,{children:l.jsxs("div",{className:"flex items-center",children:[N(E)==="Creating"&&l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),N(E)]})}),l.jsxs(he,{className:"space-x-2",children:[l.jsxs(V,{size:"sm",variant:"secondary",onClick:()=>O(E),disabled:!E.attributes.is_successful,children:[l.jsx(Kd,{className:"w-4 h-4 mr-2"}),"Download"]}),l.jsxs(V,{size:"sm",variant:"destructive",onClick:()=>{y(E),v(!0)},children:[l.jsx(Co,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]},E.attributes.uuid))})]})})})]}),l.jsx(st,{open:f,onOpenChange:h,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Create Backup"}),l.jsx(Kt,{children:"Create a new backup of your server. This may take some time depending on the size of your server."})]}),s&&l.jsx(Tt,{variant:"destructive",className:"mt-2",children:l.jsx(_t,{children:s})}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"secondary",onClick:()=>h(!1),children:"Cancel"}),l.jsxs(V,{onClick:j,disabled:x,children:[x?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Backup"]})]})]})}),l.jsx(st,{open:p,onOpenChange:v,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Delete Backup"}),l.jsx(Kt,{children:"Are you sure you want to delete this backup? This action cannot be undone."})]}),u&&l.jsx(Tt,{variant:"destructive",className:"mt-2",children:l.jsx(_t,{children:u})}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"secondary",onClick:()=>v(!1),children:"Cancel"}),l.jsxs(V,{variant:"destructive",onClick:P,disabled:w,children:[w?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Co,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})]})};var m2e=e=>{switch(e){case"success":return y2e;case"info":return b2e;case"warning":return x2e;case"error":return w2e;default:return null}},v2e=Array(12).fill(0),g2e=({visible:e,className:t})=>T.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},T.createElement("div",{className:"sonner-spinner"},v2e.map((n,r)=>T.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),y2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},T.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),x2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},T.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),b2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},T.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),w2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},T.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),S2e=T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},T.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),T.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),j2e=()=>{let[e,t]=T.useState(document.hidden);return T.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},gS=1,C2e=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:gS++,a=this.toasts.find(s=>s.id===i),o=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:n}),{...s,...e,id:i,dismissible:o,title:n}):s):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,a,o=r.then(async c=>{if(a=["resolve",c],T.isValidElement(c))i=!1,this.create({id:n,type:"default",message:c});else if(O2e(c)&&!c.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;i&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),s=()=>new Promise((c,u)=>o.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||gS++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Yn=new C2e,P2e=(e,t)=>{let n=(t==null?void 0:t.id)||gS++;return Yn.addToast({title:e,...t,id:n}),n},O2e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",N2e=P2e,A2e=()=>Yn.toasts,rl=Object.assign(N2e,{success:Yn.success,info:Yn.info,warning:Yn.warning,error:Yn.error,custom:Yn.custom,message:Yn.message,promise:Yn.promise,dismiss:Yn.dismiss,loading:Yn.loading},{getHistory:A2e});function E2e(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}E2e(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);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;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} +`);function xp(e){return e.label!==void 0}var T2e=3,_2e="32px",vM=4e3,k2e=356,M2e=14,R2e=20,$2e=200;function D2e(...e){return e.filter(Boolean).join(" ")}var I2e=e=>{var t,n,r,i,a,o,s,c,u,d,f;let{invert:h,toast:p,unstyled:v,interacting:m,setHeights:y,visibleToasts:x,heights:b,index:w,toasts:C,expanded:S,removeToast:j,defaultRichColors:P,closeButton:O,style:N,cancelButtonStyle:A,actionButtonStyle:_,className:E="",descriptionClassName:k="",duration:M,position:$,gap:D,loadingIcon:B,expandByDefault:I,classNames:R,icons:F,closeButtonAriaLabel:z="Close toast",pauseWhenPageIsHidden:U,cn:H}=e,[J,ae]=T.useState(!1),[ee,q]=T.useState(!1),[se,X]=T.useState(!1),[Z,te]=T.useState(!1),[W,Se]=T.useState(!1),[be,ze]=T.useState(0),[He,Xe]=T.useState(0),tn=T.useRef(p.duration||M||vM),dn=T.useRef(null),G=T.useRef(null),ue=w===0,we=w+1<=x,$e=p.type,$t=p.dismissible!==!1,jn=p.className||"",Ji=p.descriptionClassName||"",fi=T.useMemo(()=>b.findIndex(Ne=>Ne.toastId===p.id)||0,[b,p.id]),s0=T.useMemo(()=>{var Ne;return(Ne=p.closeButton)!=null?Ne:O},[p.closeButton,O]);T.useMemo(()=>p.duration||M||vM,[p.duration,M]);let l0=T.useRef(0),Ys=T.useRef(0),EO=T.useRef(0),jh=T.useRef(null),[TO,a8]=$.split("-"),_O=T.useMemo(()=>b.reduce((Ne,Qe,vt)=>vt>=fi?Ne:Ne+Qe.height,0),[b,fi]),kO=j2e(),o8=p.invert||h,c0=$e==="loading";Ys.current=T.useMemo(()=>fi*D+_O,[fi,_O]),T.useEffect(()=>{ae(!0)},[]),T.useEffect(()=>{let Ne=G.current;if(Ne){let Qe=Ne.getBoundingClientRect().height;return Xe(Qe),y(vt=>[{toastId:p.id,height:Qe,position:p.position},...vt]),()=>y(vt=>vt.filter(Lr=>Lr.toastId!==p.id))}},[y,p.id]),T.useLayoutEffect(()=>{if(!J)return;let Ne=G.current,Qe=Ne.style.height;Ne.style.height="auto";let vt=Ne.getBoundingClientRect().height;Ne.style.height=Qe,Xe(vt),y(Lr=>Lr.find(hi=>hi.toastId===p.id)?Lr.map(hi=>hi.toastId===p.id?{...hi,height:vt}:hi):[{toastId:p.id,height:vt,position:p.position},...Lr])},[J,p.title,p.description,y,p.id]);let Ra=T.useCallback(()=>{q(!0),ze(Ys.current),y(Ne=>Ne.filter(Qe=>Qe.toastId!==p.id)),setTimeout(()=>{j(p)},$2e)},[p,j,y,Ys]);T.useEffect(()=>{if(p.promise&&$e==="loading"||p.duration===1/0||p.type==="loading")return;let Ne;return S||m||U&&kO?(()=>{if(EO.current{var Qe;(Qe=p.onAutoClose)==null||Qe.call(p,p),Ra()},tn.current)),()=>clearTimeout(Ne)},[S,m,p,$e,U,kO,Ra]),T.useEffect(()=>{p.delete&&Ra()},[Ra,p.delete]);function s8(){var Ne,Qe,vt;return F!=null&&F.loading?T.createElement("div",{className:H(R==null?void 0:R.loader,(Ne=p==null?void 0:p.classNames)==null?void 0:Ne.loader,"sonner-loader"),"data-visible":$e==="loading"},F.loading):B?T.createElement("div",{className:H(R==null?void 0:R.loader,(Qe=p==null?void 0:p.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":$e==="loading"},B):T.createElement(g2e,{className:H(R==null?void 0:R.loader,(vt=p==null?void 0:p.classNames)==null?void 0:vt.loader),visible:$e==="loading"})}return T.createElement("li",{tabIndex:0,ref:G,className:H(E,jn,R==null?void 0:R.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[$e],(n=p==null?void 0:p.classNames)==null?void 0:n[$e]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:P,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":J,"data-promise":!!p.promise,"data-swiped":W,"data-removed":ee,"data-visible":we,"data-y-position":TO,"data-x-position":a8,"data-index":w,"data-front":ue,"data-swiping":se,"data-dismissible":$t,"data-type":$e,"data-invert":o8,"data-swipe-out":Z,"data-expanded":!!(S||I&&J),style:{"--index":w,"--toasts-before":w,"--z-index":C.length-w,"--offset":`${ee?be:Ys.current}px`,"--initial-height":I?"auto":`${He}px`,...N,...p.style},onPointerDown:Ne=>{c0||!$t||(dn.current=new Date,ze(Ys.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(X(!0),jh.current={x:Ne.clientX,y:Ne.clientY}))},onPointerUp:()=>{var Ne,Qe,vt,Lr;if(Z||!$t)return;jh.current=null;let hi=Number(((Ne=G.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ch=new Date().getTime()-((Qe=dn.current)==null?void 0:Qe.getTime()),l8=Math.abs(hi)/Ch;if(Math.abs(hi)>=R2e||l8>.11){ze(Ys.current),(vt=p.onDismiss)==null||vt.call(p,p),Ra(),te(!0),Se(!1);return}(Lr=G.current)==null||Lr.style.setProperty("--swipe-amount","0px"),X(!1)},onPointerMove:Ne=>{var Qe,vt;if(!jh.current||!$t)return;let Lr=Ne.clientY-jh.current.y,hi=((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0,Ch=TO==="top"?Math.min(0,Lr):Math.max(0,Lr);Math.abs(Ch)>0&&Se(!0),!hi&&((vt=G.current)==null||vt.style.setProperty("--swipe-amount",`${Ch}px`))}},s0&&!p.jsx?T.createElement("button",{"aria-label":z,"data-disabled":c0,"data-close-button":!0,onClick:c0||!$t?()=>{}:()=>{var Ne;Ra(),(Ne=p.onDismiss)==null||Ne.call(p,p)},className:H(R==null?void 0:R.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},(a=F==null?void 0:F.close)!=null?a:S2e):null,p.jsx||T.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:T.createElement(T.Fragment,null,$e||p.icon||p.promise?T.createElement("div",{"data-icon":"",className:H(R==null?void 0:R.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||s8():null,p.type!=="loading"?p.icon||(F==null?void 0:F[$e])||m2e($e):null):null,T.createElement("div",{"data-content":"",className:H(R==null?void 0:R.content,(s=p==null?void 0:p.classNames)==null?void 0:s.content)},T.createElement("div",{"data-title":"",className:H(R==null?void 0:R.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?T.createElement("div",{"data-description":"",className:H(k,Ji,R==null?void 0:R.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),T.isValidElement(p.cancel)?p.cancel:p.cancel&&xp(p.cancel)?T.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||A,onClick:Ne=>{var Qe,vt;xp(p.cancel)&&$t&&((vt=(Qe=p.cancel).onClick)==null||vt.call(Qe,Ne),Ra())},className:H(R==null?void 0:R.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,T.isValidElement(p.action)?p.action:p.action&&xp(p.action)?T.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||_,onClick:Ne=>{var Qe,vt;xp(p.action)&&((vt=(Qe=p.action).onClick)==null||vt.call(Qe,Ne),!Ne.defaultPrevented&&Ra())},className:H(R==null?void 0:R.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function gM(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}g.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:o,className:s,offset:c,theme:u="light",richColors:d,duration:f,style:h,visibleToasts:p=T2e,toastOptions:v,dir:m=gM(),gap:y=M2e,loadingIcon:x,icons:b,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:C,cn:S=D2e}=e,[j,P]=T.useState([]),O=T.useMemo(()=>Array.from(new Set([r].concat(j.filter(U=>U.position).map(U=>U.position)))),[j,r]),[N,A]=T.useState([]),[_,E]=T.useState(!1),[k,M]=T.useState(!1),[$,D]=T.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=T.useRef(null),I=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=T.useRef(null),F=T.useRef(!1),z=T.useCallback(U=>{P(H=>{var J;return(J=H.find(ae=>ae.id===U.id))!=null&&J.delete||Yn.dismiss(U.id),H.filter(({id:ae})=>ae!==U.id)})},[]);return T.useEffect(()=>Yn.subscribe(U=>{if(U.dismiss){P(H=>H.map(J=>J.id===U.id?{...J,delete:!0}:J));return}setTimeout(()=>{G$.flushSync(()=>{P(H=>{let J=H.findIndex(ae=>ae.id===U.id);return J!==-1?[...H.slice(0,J),{...H[J],...U},...H.slice(J+1)]:[U,...H]})})})}),[]),T.useEffect(()=>{if(u!=="system"){D(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:H})=>{D(H?"dark":"light")})}catch{U.addListener(({matches:J})=>{try{D(J?"dark":"light")}catch(ae){console.error(ae)}})}},[u]),T.useEffect(()=>{j.length<=1&&E(!1)},[j]),T.useEffect(()=>{let U=H=>{var J,ae;i.every(ee=>H[ee]||H.code===ee)&&(E(!0),(J=B.current)==null||J.focus()),H.code==="Escape"&&(document.activeElement===B.current||(ae=B.current)!=null&&ae.contains(document.activeElement))&&E(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[i]),T.useEffect(()=>{if(B.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,F.current=!1)}},[B.current]),T.createElement("section",{"aria-label":`${w} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},O.map((U,H)=>{var J;let[ae,ee]=U.split("-");return j.length?T.createElement("ol",{key:U,dir:m==="auto"?gM():m,tabIndex:-1,ref:B,className:s,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":ae,"data-lifted":_&&j.length>1&&!a,"data-x-position":ee,style:{"--front-toast-height":`${((J=N[0])==null?void 0:J.height)||0}px`,"--offset":typeof c=="number"?`${c}px`:c||_2e,"--width":`${k2e}px`,"--gap":`${y}px`,...h},onBlur:q=>{F.current&&!q.currentTarget.contains(q.relatedTarget)&&(F.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||F.current||(F.current=!0,R.current=q.relatedTarget)},onMouseEnter:()=>E(!0),onMouseMove:()=>E(!0),onMouseLeave:()=>{k||E(!1)},onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},j.filter(q=>!q.position&&H===0||q.position===U).map((q,se)=>{var X,Z;return T.createElement(I2e,{key:q.id,icons:b,index:se,toast:q,defaultRichColors:d,duration:(X=v==null?void 0:v.duration)!=null?X:f,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:p,closeButton:(Z=v==null?void 0:v.closeButton)!=null?Z:o,interacting:k,position:U,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:z,toasts:j.filter(te=>te.position==q.position),heights:N.filter(te=>te.position==q.position),setHeights:A,expandByDefault:a,gap:y,loadingIcon:x,expanded:_,pauseWhenPageIsHidden:C,cn:S})})):null}))});var L2e=[" ","Enter","ArrowUp","ArrowDown"],F2e=[" ","Enter"],Sh="Select",[Hy,Ky,B2e]=yg(Sh),[wu,B_e]=un(Sh,[B2e,Do]),qy=Do(),[U2e,zo]=wu(Sh),[z2e,V2e]=wu(Sh),lz=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:p,form:v}=e,m=qy(t),[y,x]=g.useState(null),[b,w]=g.useState(null),[C,S]=g.useState(!1),j=Qc(u),[P=!1,O]=Mr({prop:r,defaultProp:i,onChange:a}),[N,A]=Mr({prop:o,defaultProp:s,onChange:c}),_=g.useRef(null),E=y?v||!!y.closest("form"):!0,[k,M]=g.useState(new Set),$=Array.from(k).map(D=>D.props.value).join(";");return l.jsx(kg,{...m,children:l.jsxs(U2e,{required:p,scope:t,trigger:y,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:ir(),value:N,onValueChange:A,open:P,onOpenChange:O,dir:j,triggerPointerDownPosRef:_,disabled:h,children:[l.jsx(Hy.Provider,{scope:t,children:l.jsx(z2e,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(D=>{M(B=>new Set(B).add(D))},[]),onNativeOptionRemove:g.useCallback(D=>{M(B=>{const I=new Set(B);return I.delete(D),I})},[]),children:n})}),E?l.jsxs(Mz,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:N,onChange:D=>A(D.target.value),disabled:h,form:v,children:[N===void 0?l.jsx("option",{value:""}):null,Array.from(k)]},$):null]})})};lz.displayName=Sh;var cz="SelectTrigger",uz=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=qy(n),o=zo(cz,n),s=o.disabled||r,c=_e(t,o.onTriggerChange),u=Ky(n),d=g.useRef("touch"),[f,h,p]=Rz(m=>{const y=u().filter(w=>!w.disabled),x=y.find(w=>w.value===o.value),b=$z(y,m,x);b!==void 0&&o.onValueChange(b.value)}),v=m=>{s||(o.onOpenChange(!0),p()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(Mg,{asChild:!0,...a,children:l.jsx(pe.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":kz(o.value)?"":void 0,...i,ref:c,onClick:ne(i.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&v(m)}),onPointerDown:ne(i.onPointerDown,m=>{d.current=m.pointerType;const y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:ne(i.onKeyDown,m=>{const y=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(y&&m.key===" ")&&L2e.includes(m.key)&&(v(),m.preventDefault())})})})});uz.displayName=cz;var dz="SelectValue",fz=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...s}=e,c=zo(dz,n),{onValueNodeHasChildrenChange:u}=c,d=a!==void 0,f=_e(t,c.onValueNodeChange);return qt(()=>{u(d)},[u,d]),l.jsx(pe.span,{...s,ref:f,style:{pointerEvents:"none"},children:kz(c.value)?l.jsx(l.Fragment,{children:o}):a})});fz.displayName=dz;var W2e="SelectIcon",hz=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return l.jsx(pe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});hz.displayName=W2e;var H2e="SelectPortal",pz=e=>l.jsx(sh,{asChild:!0,...e});pz.displayName=H2e;var Ls="SelectContent",mz=g.forwardRef((e,t)=>{const n=zo(Ls,e.__scopeSelect),[r,i]=g.useState();if(qt(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?Wc.createPortal(l.jsx(vz,{scope:e.__scopeSelect,children:l.jsx(Hy.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(gz,{...e,ref:t})});mz.displayName=Ls;var Wr=10,[vz,Vo]=wu(Ls),K2e="SelectContentImpl",gz=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:m,avoidCollisions:y,...x}=e,b=zo(Ls,n),[w,C]=g.useState(null),[S,j]=g.useState(null),P=_e(t,q=>C(q)),[O,N]=g.useState(null),[A,_]=g.useState(null),E=Ky(n),[k,M]=g.useState(!1),$=g.useRef(!1);g.useEffect(()=>{if(w)return $C(w)},[w]),PC();const D=g.useCallback(q=>{const[se,...X]=E().map(W=>W.ref.current),[Z]=X.slice(-1),te=document.activeElement;for(const W of q)if(W===te||(W==null||W.scrollIntoView({block:"nearest"}),W===se&&S&&(S.scrollTop=0),W===Z&&S&&(S.scrollTop=S.scrollHeight),W==null||W.focus(),document.activeElement!==te))return},[E,S]),B=g.useCallback(()=>D([O,w]),[D,O,w]);g.useEffect(()=>{k&&B()},[k,B]);const{onOpenChange:I,triggerPointerDownPosRef:R}=b;g.useEffect(()=>{if(w){let q={x:0,y:0};const se=Z=>{var te,W;q={x:Math.abs(Math.round(Z.pageX)-(((te=R.current)==null?void 0:te.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((W=R.current)==null?void 0:W.y)??0))}},X=Z=>{q.x<=10&&q.y<=10?Z.preventDefault():w.contains(Z.target)||I(!1),document.removeEventListener("pointermove",se),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",se),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",se),document.removeEventListener("pointerup",X,{capture:!0})}}},[w,I,R]),g.useEffect(()=>{const q=()=>I(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[I]);const[F,z]=Rz(q=>{const se=E().filter(te=>!te.disabled),X=se.find(te=>te.ref.current===document.activeElement),Z=$z(se,q,X);Z&&setTimeout(()=>Z.ref.current.focus())}),U=g.useCallback((q,se,X)=>{const Z=!$.current&&!X;(b.value!==void 0&&b.value===se||Z)&&(N(q),Z&&($.current=!0))},[b.value]),H=g.useCallback(()=>w==null?void 0:w.focus(),[w]),J=g.useCallback((q,se,X)=>{const Z=!$.current&&!X;(b.value!==void 0&&b.value===se||Z)&&_(q)},[b.value]),ae=r==="popper"?yS:yz,ee=ae===yS?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:v,hideWhenDetached:m,avoidCollisions:y}:{};return l.jsx(vz,{scope:n,content:w,viewport:S,onViewportChange:j,itemRefCallback:U,selectedItem:O,onItemLeave:H,itemTextRefCallback:J,focusSelectedItem:B,selectedItemText:A,position:r,isPositioned:k,searchRef:F,children:l.jsx(Fg,{as:Po,allowPinchZoom:!0,children:l.jsx(Ag,{asChild:!0,trapped:b.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:ne(i,q=>{var se;(se=b.trigger)==null||se.focus({preventScroll:!0}),q.preventDefault()}),children:l.jsx(Zc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:l.jsx(ae,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:q=>q.preventDefault(),...x,...ee,onPlaced:()=>M(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:ne(x.onKeyDown,q=>{const se=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!se&&q.key.length===1&&z(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let Z=E().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(q.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const te=q.target,W=Z.indexOf(te);Z=Z.slice(W+1)}setTimeout(()=>D(Z)),q.preventDefault()}})})})})})})});gz.displayName=K2e;var q2e="SelectItemAlignedPosition",yz=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=zo(Ls,n),o=Vo(Ls,n),[s,c]=g.useState(null),[u,d]=g.useState(null),f=_e(t,P=>d(P)),h=Ky(n),p=g.useRef(!1),v=g.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:x,focusSelectedItem:b}=o,w=g.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&m&&y&&x){const P=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),N=a.valueNode.getBoundingClientRect(),A=x.getBoundingClientRect();if(a.dir!=="rtl"){const te=A.left-O.left,W=N.left-te,Se=P.left-W,be=P.width+Se,ze=Math.max(be,O.width),He=window.innerWidth-Wr,Xe=oS(W,[Wr,Math.max(Wr,He-ze)]);s.style.minWidth=be+"px",s.style.left=Xe+"px"}else{const te=O.right-A.right,W=window.innerWidth-N.right-te,Se=window.innerWidth-P.right-W,be=P.width+Se,ze=Math.max(be,O.width),He=window.innerWidth-Wr,Xe=oS(W,[Wr,Math.max(Wr,He-ze)]);s.style.minWidth=be+"px",s.style.right=Xe+"px"}const _=h(),E=window.innerHeight-Wr*2,k=m.scrollHeight,M=window.getComputedStyle(u),$=parseInt(M.borderTopWidth,10),D=parseInt(M.paddingTop,10),B=parseInt(M.borderBottomWidth,10),I=parseInt(M.paddingBottom,10),R=$+D+k+I+B,F=Math.min(y.offsetHeight*5,R),z=window.getComputedStyle(m),U=parseInt(z.paddingTop,10),H=parseInt(z.paddingBottom,10),J=P.top+P.height/2-Wr,ae=E-J,ee=y.offsetHeight/2,q=y.offsetTop+ee,se=$+D+q,X=R-se;if(se<=J){const te=_.length>0&&y===_[_.length-1].ref.current;s.style.bottom="0px";const W=u.clientHeight-m.offsetTop-m.offsetHeight,Se=Math.max(ae,ee+(te?H:0)+W+B),be=se+Se;s.style.height=be+"px"}else{const te=_.length>0&&y===_[0].ref.current;s.style.top="0px";const Se=Math.max(J,$+m.offsetTop+(te?U:0)+ee)+X;s.style.height=Se+"px",m.scrollTop=se-J+m.offsetTop}s.style.margin=`${Wr}px 0`,s.style.minHeight=F+"px",s.style.maxHeight=E+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,s,u,m,y,x,a.dir,r]);qt(()=>w(),[w]);const[C,S]=g.useState();qt(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const j=g.useCallback(P=>{P&&v.current===!0&&(w(),b==null||b(),v.current=!1)},[w,b]);return l.jsx(Y2e,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:l.jsx(pe.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});yz.displayName=q2e;var G2e="SelectPopperPosition",yS=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Wr,...a}=e,o=qy(n);return l.jsx(Rg,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});yS.displayName=G2e;var[Y2e,wO]=wu(Ls,{}),xS="SelectViewport",xz=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=Vo(xS,n),o=wO(xS,n),s=_e(t,a.onViewportChange),c=g.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Hy.Slot,{scope:n,children:l.jsx(pe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ne(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const p=Math.abs(c.current-d.scrollTop);if(p>0){const v=window.innerHeight-Wr*2,m=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),x=Math.max(m,y);if(x0?C:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});xz.displayName=xS;var bz="SelectGroup",[X2e,Q2e]=wu(bz),J2e=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=ir();return l.jsx(X2e,{scope:n,id:i,children:l.jsx(pe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});J2e.displayName=bz;var wz="SelectLabel",Sz=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Q2e(wz,n);return l.jsx(pe.div,{id:i.id,...r,ref:t})});Sz.displayName=wz;var Kv="SelectItem",[Z2e,jz]=wu(Kv),Cz=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=zo(Kv,n),c=Vo(Kv,n),u=s.value===r,[d,f]=g.useState(a??""),[h,p]=g.useState(!1),v=_e(t,b=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,b,r,i)}),m=ir(),y=g.useRef("touch"),x=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(Z2e,{scope:n,value:r,disabled:i,textId:m,isSelected:u,onItemTextChange:g.useCallback(b=>{f(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:l.jsx(Hy.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:l.jsx(pe.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:v,onFocus:ne(o.onFocus,()=>p(!0)),onBlur:ne(o.onBlur,()=>p(!1)),onClick:ne(o.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:ne(o.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:ne(o.onPointerDown,b=>{y.current=b.pointerType}),onPointerMove:ne(o.onPointerMove,b=>{var w;y.current=b.pointerType,i?(w=c.onItemLeave)==null||w.call(c):y.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(o.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:ne(o.onKeyDown,b=>{var C;((C=c.searchRef)==null?void 0:C.current)!==""&&b.key===" "||(F2e.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});Cz.displayName=Kv;var nd="SelectItemText",Pz=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=zo(nd,n),s=Vo(nd,n),c=jz(nd,n),u=V2e(nd,n),[d,f]=g.useState(null),h=_e(t,x=>f(x),c.onItemTextChange,x=>{var b;return(b=s.itemTextRefCallback)==null?void 0:b.call(s,x,c.value,c.disabled)}),p=d==null?void 0:d.textContent,v=g.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=u;return qt(()=>(m(v),()=>y(v)),[m,y,v]),l.jsxs(l.Fragment,{children:[l.jsx(pe.span,{id:c.textId,...a,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Wc.createPortal(a.children,o.valueNode):null]})});Pz.displayName=nd;var Oz="SelectItemIndicator",Nz=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return jz(Oz,n).isSelected?l.jsx(pe.span,{"aria-hidden":!0,...r,ref:t}):null});Nz.displayName=Oz;var bS="SelectScrollUpButton",Az=g.forwardRef((e,t)=>{const n=Vo(bS,e.__scopeSelect),r=wO(bS,e.__scopeSelect),[i,a]=g.useState(!1),o=_e(t,r.onScrollButtonChange);return qt(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?l.jsx(Tz,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});Az.displayName=bS;var wS="SelectScrollDownButton",Ez=g.forwardRef((e,t)=>{const n=Vo(wS,e.__scopeSelect),r=wO(wS,e.__scopeSelect),[i,a]=g.useState(!1),o=_e(t,r.onScrollButtonChange);return qt(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?l.jsx(Tz,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});Ez.displayName=wS;var Tz=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Vo("SelectScrollButton",n),o=g.useRef(null),s=Ky(n),c=g.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),qt(()=>{var d;const u=s().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),l.jsx(pe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ne(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ne(i.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ne(i.onPointerLeave,()=>{c()})})}),eTe="SelectSeparator",_z=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(pe.div,{"aria-hidden":!0,...r,ref:t})});_z.displayName=eTe;var SS="SelectArrow",tTe=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=qy(n),a=zo(SS,n),o=Vo(SS,n);return a.open&&o.position==="popper"?l.jsx($g,{...i,...r,ref:t}):null});tTe.displayName=SS;function kz(e){return e===""||e===void 0}var Mz=g.forwardRef((e,t)=>{const{value:n,...r}=e,i=g.useRef(null),a=_e(t,i),o=IU(n);return g.useEffect(()=>{const s=i.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==n&&d){const f=new Event("change",{bubbles:!0});d.call(s,n),s.dispatchEvent(f)}},[o,n]),l.jsx(ZP,{asChild:!0,children:l.jsx("select",{...r,ref:a,defaultValue:n})})});Mz.displayName="BubbleSelect";function Rz(e){const t=Lt(e),n=g.useRef(""),r=g.useRef(0),i=g.useCallback(o=>{const s=n.current+o;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),a=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function $z(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=nTe(e,Math.max(a,0));i.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function nTe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rTe=lz,Dz=uz,iTe=fz,aTe=hz,oTe=pz,Iz=mz,sTe=xz,Lz=Sz,Fz=Cz,lTe=Pz,cTe=Nz,Bz=Az,Uz=Ez,zz=_z;const ii=rTe,ai=iTe,Er=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Dz,{ref:r,className:le("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(aTe,{asChild:!0,children:l.jsx(fg,{className:"h-4 w-4 opacity-50"})})]}));Er.displayName=Dz.displayName;const Vz=g.forwardRef(({className:e,...t},n)=>l.jsx(Bz,{ref:n,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(N9,{className:"h-4 w-4"})}));Vz.displayName=Bz.displayName;const Wz=g.forwardRef(({className:e,...t},n)=>l.jsx(Uz,{ref:n,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(fg,{className:"h-4 w-4"})}));Wz.displayName=Uz.displayName;const Tr=g.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>l.jsx(oTe,{children:l.jsxs(Iz,{ref:i,className:le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(Vz,{}),l.jsx(sTe,{className:le("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(Wz,{})]})}));Tr.displayName=Iz.displayName;const uTe=g.forwardRef(({className:e,...t},n)=>l.jsx(Lz,{ref:n,className:le("px-2 py-1.5 text-sm font-semibold",e),...t}));uTe.displayName=Lz.displayName;const Le=g.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Fz,{ref:r,className:le("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(cTe,{children:l.jsx(Yc,{className:"h-4 w-4"})})}),l.jsx(lTe,{children:t})]}));Le.displayName=Fz.displayName;const dTe=g.forwardRef(({className:e,...t},n)=>l.jsx(zz,{ref:n,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));dTe.displayName=zz.displayName;const fTe=()=>{var j,P,O;const{id:e}=Hi(),t=Qf(),[n,r]=g.useState(!1),[i,a]=g.useState(""),[o,s]=g.useState(!1),{data:c,isLoading:u}=xt({queryKey:["server",e],queryFn:async()=>{const{data:N}=await ie.get(`/api/server/${e}`);return a(N.attributes.name),N}}),{data:d,isLoading:f}=xt({queryKey:["server",e,"startup"],queryFn:async()=>{const{data:N}=await ie.get(`/api/server/${e}/variables`);return N}}),h=B0({mutationFn:async({key:N,value:A})=>{await ie.put(`/api/server/${e}/variables`,{key:N,value:A})},onSuccess:()=>{t.invalidateQueries(["server",e,"startup"]),rl.success("Variable updated successfully")},onError:N=>{var A,_;rl.error(((_=(A=N.response)==null?void 0:A.data)==null?void 0:_.error)||"Failed to update variable")}}),p=B0({mutationFn:async()=>{await ie.post(`/api/server/${e}/reinstall`)},onSuccess:()=>{rl.success("Server reinstallation initiated"),r(!1)},onError:N=>{var A,_;rl.error(((_=(A=N.response)==null?void 0:A.data)==null?void 0:_.error)||"Failed to reinstall server")}}),v=B0({mutationFn:async N=>{await ie.post(`/api/server/${e}/rename`,{name:N})},onSuccess:()=>{t.invalidateQueries(["server",e]),rl.success("Server renamed successfully"),s(!1)},onError:N=>{var A,_;rl.error(((_=(A=N.response)==null?void 0:A.data)==null?void 0:_.error)||"Failed to rename server")}});if(u||f)return l.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:l.jsx(Ve,{className:"w-6 h-6 text-neutral-400 animate-spin"})});const m=c==null?void 0:c.attributes,y=(d==null?void 0:d.data)||[],x=((j=d==null?void 0:d.meta)==null?void 0:j.docker_images)||{},b=((P=d==null?void 0:d.meta)==null?void 0:P.startup_command)||(m==null?void 0:m.invocation),w=(O=d==null?void 0:d.meta)==null?void 0:O.raw_startup_command,C=async(N,A)=>{h.mutate({key:N,value:A})},S=async N=>{N.preventDefault(),i.trim()&&i!==m.name&&v.mutate(i)};return l.jsxs("div",{className:"space-y-6 p-6",children:[l.jsx("div",{className:"flex items-center justify-between",children:l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Settings"}),l.jsx("p",{className:"text-sm text-neutral-400",children:"Manage your server configuration and variables"})]})}),l.jsxs(iO,{defaultValue:"general",children:[l.jsxs(Iy,{children:[l.jsxs(yo,{value:"general",className:"flex items-center gap-2",children:[l.jsx(jD,{className:"w-4 h-4"}),"General"]}),l.jsxs(yo,{value:"startup",className:"flex items-center gap-2",children:[l.jsx(mg,{className:"w-4 h-4"}),"Startup"]}),l.jsxs(yo,{value:"variables",className:"flex items-center gap-2",children:[l.jsx(cH,{className:"w-4 h-4"}),"Variables"]})]}),l.jsx(xo,{value:"general",className:"space-y-4",children:l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Server Details"}),l.jsx(An,{children:"View and modify basic server settings"})]}),l.jsxs(ge,{className:"space-y-4",children:[l.jsx("form",{onSubmit:S,className:"space-y-4",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx(ei,{htmlFor:"name",children:"Server Name"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Ce,{id:"name",value:i,onChange:N=>a(N.target.value),placeholder:"Enter server name"}),l.jsxs(V,{type:"submit",disabled:!i.trim()||i===m.name||v.isLoading,children:[v.isLoading?l.jsx(Ni,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(zs,{className:"w-4 h-4 mr-2"}),"Save"]})]})]})}),l.jsx("div",{className:"pt-4 space-y-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium",children:"Dangerous Zone"}),l.jsx("p",{className:"text-sm text-neutral-400",children:"These actions can cause data loss"})]}),l.jsxs(V,{variant:"destructive",onClick:()=>r(!0),disabled:p.isLoading,children:[p.isLoading?l.jsx(Ni,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Q9,{className:"w-4 h-4 mr-2"}),"Reinstall Server"]})]})})]})]})}),l.jsx(xo,{value:"startup",className:"space-y-4",children:l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Startup Configuration"}),l.jsx(An,{children:"View and modify server startup parameters"})]}),l.jsx(ge,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(ei,{children:"Startup Command"}),l.jsxs("div",{className:"relative",children:[l.jsx(Ce,{value:b||"",disabled:!0}),w&&l.jsxs("div",{className:"mt-2",children:[l.jsx(ei,{className:"text-xs text-neutral-400",children:"Raw Command"}),l.jsx(Ce,{value:w,disabled:!0,className:"mt-1 font-mono text-sm"})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(ei,{children:"Docker Image"}),l.jsxs(ii,{disabled:!0,defaultValue:m==null?void 0:m.docker_image,children:[l.jsx(Er,{children:l.jsx(ai,{placeholder:"Select Docker image"})}),l.jsx(Tr,{children:Object.entries(x).map(([N,A])=>l.jsx(Le,{value:A,children:N},A))})]})]})]})})]})}),l.jsx(xo,{value:"variables",className:"space-y-4",children:l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Environment Variables"}),l.jsx(An,{children:"Configure environment-specific settings"})]}),l.jsx(ge,{children:l.jsx(fr,{className:"h-[400px] pr-4",children:l.jsx("div",{className:"space-y-4",children:y.map(N=>l.jsxs("div",{className:"space-y-2",children:[l.jsxs(ei,{htmlFor:N.attributes.env_variable,children:[N.attributes.name,N.attributes.description&&l.jsx("span",{className:"block text-xs text-neutral-400 mt-1",children:N.attributes.description})]}),l.jsx("div",{className:"flex gap-2",children:l.jsx(Ce,{id:N.attributes.env_variable,defaultValue:N.attributes.server_value||N.attributes.default_value,disabled:!N.attributes.is_editable,onBlur:A=>{A.target.value!==(N.attributes.server_value||N.attributes.default_value)&&C(N.attributes.env_variable,A.target.value)}})})]},N.attributes.env_variable))})})})]})})]}),l.jsx(Na,{open:n,onOpenChange:r,children:l.jsxs(Ii,{children:[l.jsxs(Li,{children:[l.jsx(Bi,{children:"Are you absolutely sure?"}),l.jsx(Ui,{children:"This action will reinstall your server. All data will be lost and cannot be recovered."})]}),l.jsxs(Fi,{children:[l.jsx(Vi,{children:"Cancel"}),l.jsx(zi,{onClick:()=>p.mutate(),className:"bg-red-600 hover:bg-red-700",children:"Reinstall Server"})]})]})})]})};function wt({className:e,...t}){return l.jsx("div",{className:le("animate-pulse rounded-md bg-primary/10",e),...t})}function yM(e,t=2){if(e===0)return"0 MB";const n=1024,r=t<0?0:t,i=["B","KB","MB","GB","TB"],a=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,a)).toFixed(r))+" "+i[a]}function bp({icon:e,title:t,used:n,total:r,unit:i}){const a=r?n/r*100:0,o=a>90?"bg-red-500":a>70?"bg-yellow-500":"bg-zinc-800";return l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{className:"pb-2",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(e,{className:"w-4 h-4 text-neutral-400"})}),l.jsx(Te,{className:"text-sm font-medium",children:t})]}),l.jsxs("span",{className:"text-sm text-neutral-400",children:[n,i," / ",r,i]})]})}),l.jsxs(ge,{children:[l.jsx(Cs,{value:a,className:`h-2 ${o}`}),l.jsxs("p",{className:"text-xs text-neutral-500 mt-2",children:[a.toFixed(1),"% utilized"]})]})]})}function hTe({isOpen:e,onClose:t,server:n}){var v;const[r,i]=g.useState(""),[a,o]=g.useState(""),[s,c]=g.useState(""),[u,d]=g.useState(""),[f,h]=g.useState(!1);g.useEffect(()=>{n!=null&&n.attributes&&(i(n.attributes.limits.memory.toString()),o(n.attributes.limits.disk.toString()),c(n.attributes.limits.cpu.toString()))},[n]);const p=async()=>{var m,y;try{if(d(""),h(!0),!r||!a||!s)throw new Error("All resource values are required");await ie.patch(`/api/v5/servers/${n.attributes.id}`,{ram:parseInt(r),disk:parseInt(a),cpu:parseInt(s)}),t(),window.location.reload()}catch(x){d(((y=(m=x.response)==null?void 0:m.data)==null?void 0:y.error)||x.message)}finally{h(!1)}};return l.jsx(st,{open:e,onOpenChange:t,children:l.jsxs(et,{children:[l.jsx(tt,{children:l.jsxs(nt,{children:["Edit Server - ",(v=n==null?void 0:n.attributes)==null?void 0:v.name]})}),l.jsxs("div",{className:"grid gap-4 py-4",children:[l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"RAM (MB)"}),l.jsx(Ce,{type:"number",placeholder:"2048",value:r,onChange:m=>i(m.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Disk (MB)"}),l.jsx(Ce,{type:"number",placeholder:"10240",value:a,onChange:m=>o(m.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"CPU (%)"}),l.jsx(Ce,{type:"number",placeholder:"100",value:s,onChange:m=>c(m.target.value)})]})]}),u&&l.jsxs(Tt,{variant:"destructive",children:[l.jsx(rr,{className:"w-4 h-4"}),l.jsx(_t,{children:u})]})]}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"outline",onClick:t,children:"Cancel"}),l.jsxs(V,{onClick:p,disabled:f,children:[f?l.jsx(Ve,{className:"w-4 h-4 animate-spin mr-2"}):l.jsx(zs,{className:"w-4 h-4 mr-2"}),"Update Server"]})]})]})})}function pTe({isOpen:e,onClose:t}){const[n,r]=g.useState(""),[i,a]=g.useState(""),[o,s]=g.useState(""),[c,u]=g.useState(""),[d,f]=g.useState(""),[h,p]=g.useState(""),[v,m]=g.useState(""),[y,x]=g.useState(!1),{data:b}=xt({queryKey:["eggs"],queryFn:async()=>{const{data:j}=await ie.get("/api/v5/eggs");return j}}),{data:w}=xt({queryKey:["locations"],queryFn:async()=>{const{data:j}=await ie.get("/api/v5/locations");return j}}),C=b==null?void 0:b.find(j=>j.id===i),S=async()=>{var j,P;try{if(m(""),x(!0),!(n!=null&&n.trim()))throw new Error("Server name is required");if(!i)throw new Error("Server type is required");if(!o)throw new Error("Location is required");if(!c||!d||!h)throw new Error("Resource values are required");await ie.post("/api/v5/servers",{name:n.trim(),egg:i,location:o,ram:parseInt(c),disk:parseInt(d),cpu:parseInt(h)}),t(),window.location.reload()}catch(O){m(((P=(j=O.response)==null?void 0:j.data)==null?void 0:P.error)||O.message)}finally{x(!1)}};return l.jsx(st,{open:e,onOpenChange:t,children:l.jsxs(et,{children:[l.jsx(tt,{children:l.jsx(nt,{children:"Create New Server"})}),l.jsxs("div",{className:"grid gap-4 py-4",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Server Name"}),l.jsx(Ce,{placeholder:"My Awesome Server",value:n,onChange:j=>r(j.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Server Type"}),l.jsxs(ii,{value:i,onValueChange:a,children:[l.jsx(Er,{children:l.jsx(ai,{placeholder:"Select Server Type"})}),l.jsx(Tr,{children:b==null?void 0:b.map(j=>l.jsx(Le,{value:j.id,children:j.name},j.id))})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Location"}),l.jsxs(ii,{value:o,onValueChange:s,children:[l.jsx(Er,{children:l.jsx(ai,{placeholder:"Select Location"})}),l.jsx(Tr,{children:w==null?void 0:w.map(j=>l.jsx(Le,{value:j.id,children:j.name},j.id))})]})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"RAM (MB)"}),l.jsx(Ce,{type:"number",placeholder:"2048",value:c,onChange:j=>u(j.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"Disk (MB)"}),l.jsx(Ce,{type:"number",placeholder:"10240",value:d,onChange:j=>f(j.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-neutral-400",children:"CPU (%)"}),l.jsx(Ce,{type:"number",placeholder:"100",value:h,onChange:j=>p(j.target.value)})]})]}),C&&l.jsxs(Tt,{children:[l.jsx(rr,{className:"w-4 h-4"}),l.jsxs(_t,{children:["Minimum requirements: ",C.minimum.ram,"MB RAM, ",C.minimum.disk,"MB Disk, ",C.minimum.cpu,"% CPU"]})]}),v&&l.jsxs(Tt,{variant:"destructive",children:[l.jsx(rr,{className:"w-4 h-4"}),l.jsx(_t,{children:v})]})]}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"outline",onClick:t,children:"Cancel"}),l.jsxs(V,{onClick:S,disabled:y,children:[y?l.jsx(Ve,{className:"w-4 h-4 animate-spin mr-2"}):l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Server"]})]})]})})}function xM({server:e,onDelete:t,onEdit:n,wsStatus:r,stats:i}){var m,y;const a=Us(),o={running:"bg-green-500/10 text-green-500 border-green-500/20",starting:"bg-yellow-500/10 text-yellow-500 border-yellow-500/20",stopping:"bg-yellow-500/10 text-yellow-500 border-yellow-500/20",offline:"bg-neutral-500/10 text-neutral-500 border-neutral-500/20"},{id:s,identifier:c,name:u,limits:d={}}=(e==null?void 0:e.attributes)||{};let f,h;e!=null&&e.attributes?f=e.attributes.identifier:f=e.id,e!=null&&e.attributes?h=e.attributes.name:h=e.name;const p=(r==null?void 0:r[f])||"offline",v=(i==null?void 0:i[f])||{cpu:0,memory:0,disk:0};return l.jsxs(me,{className:"border-neutral-800/50 hover:border-neutral-700/50 transition-all",children:[l.jsx(je,{className:"pb-3",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(ba,{className:"w-4 h-4 text-neutral-400"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-sm",children:h||"Unnamed Server"}),l.jsx("p",{className:"text-xs text-neutral-500",children:f||"Unknown"})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(V,{variant:"ghost",size:"sm",onClick:()=>a(`/server/${f}/overview`),children:l.jsx(mg,{className:"w-4 h-4"})}),n&&l.jsx(V,{variant:"ghost",size:"sm",onClick:()=>n(e),children:l.jsx(X9,{className:"w-4 h-4"})}),t&&l.jsx(V,{variant:"ghost",size:"sm",className:"text-red-500",onClick:()=>t(s,u),children:l.jsx(Rj,{className:"w-4 h-4"})})]})]})}),l.jsx(ge,{className:"pb-3",children:l.jsxs("div",{className:"grid gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between text-xs text-neutral-400 mb-1",children:[l.jsx("span",{children:"Memory"}),l.jsxs("span",{children:[((m=v.memory)==null?void 0:m.toFixed(0))||0," / ",d.memory||0," MB"]})]}),l.jsx(Cs,{value:d.memory?v.memory/d.memory*100:0,className:"h-1.5"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between text-xs text-neutral-400 mb-1",children:[l.jsx("span",{children:"CPU"}),l.jsxs("span",{children:[((y=v.cpu)==null?void 0:y.toFixed(1))||0," / ",d.cpu||0,"%"]})]}),l.jsx(Cs,{value:d.cpu?v.cpu/d.cpu*100:0,className:"h-1.5"})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between text-xs text-neutral-400 mb-1",children:[l.jsx("span",{children:"Disk"}),l.jsxs("span",{children:[yM(v.disk||0)," / ",yM((d.disk||0)*1024*1024)]})]}),l.jsx(Cs,{value:d.disk?v.disk/(d.disk*1024*1024)*100:0,className:"h-1.5"})]})]})}),l.jsx(eh,{children:l.jsx(Pt,{variant:"outline",className:`w-full justify-center ${o[p]}`,children:p.toUpperCase()})})]})}function mTe(){var E,k,M,$,D,B,I,R;const[e,t]=g.useState(!1),[n,r]=g.useState(!1),[i,a]=g.useState(!1),[o,s]=g.useState(null),[c,u]=g.useState(null),[d,f]=g.useState({}),[h,p]=g.useState({}),v=g.useRef({}),{data:m,isLoading:y}=xt({queryKey:["resources"],queryFn:async()=>{const{data:F}=await ie.get("/api/v5/resources");return F}}),{data:x,isLoading:b}=xt({queryKey:["servers"],queryFn:async()=>{const{data:F}=await ie.get("/api/v5/servers");return F}}),{data:w,isLoading:C}=xt({queryKey:["subuser-servers"],queryFn:async()=>{const{data:F}=await ie.get("/api/subuser-servers");return F}});g.useEffect(()=>{if(!(!x&&!w))return x==null||x.forEach(F=>{v.current[F.attributes.identifier]||S(F)}),w==null||w.forEach(F=>{v.current[F.id]||S(F)}),()=>{Object.values(v.current).forEach(F=>F.close()),v.current={}}},[x,w]);const S=async F=>{try{const{data:z}=await ie.get(`/api/server/${F.attributes.identifier}/websocket`),U=new WebSocket(z.data.socket);U.onopen=()=>{U.send(JSON.stringify({event:"auth",args:[z.data.token]}))},U.onmessage=H=>{const J=JSON.parse(H.data);j(J,F.attributes.identifier)},U.onclose=()=>{delete v.current[F.attributes.identifier],setTimeout(()=>S(F),5e3)},v.current[F.attributes.identifier]=U}catch(z){console.error(`WebSocket connection error for ${F.attributes.identifier}:`,z)}},j=(F,z)=>{switch(F.event){case"auth success":v.current[z].send(JSON.stringify({event:"send stats",args:[null]}));break;case"stats":const U=JSON.parse(F.args[0]);if(!U)return;p(H=>({...H,[z]:{cpu:U.cpu_absolute||0,memory:U.memory_bytes/1024/1024||0,disk:U.disk_bytes||0}}));break;case"status":f(H=>({...H,[z]:F.args[0]}));break}},P=async(F,z)=>{u({id:F,name:z}),a(!0)},O=async()=>{if(c)try{await ie.delete(`/api/v5/servers/${c.id}`),window.location.reload()}catch(F){console.error("Failed to delete server:",F),alert("Failed to delete server. Please try again.")}finally{a(!1),u(null)}},N=F=>{s(F),r(!0)};if(y||b||C)return l.jsxs("div",{className:"space-y-6 p-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(wt,{className:"h-8 w-32"}),l.jsx(wt,{className:"h-10 w-24"})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[...Array(4)].map((F,z)=>l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{className:"pb-2",children:l.jsx(wt,{className:"h-6 w-32"})}),l.jsx(ge,{children:l.jsx(wt,{className:"h-2 w-full"})})]},z))}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(3)].map((F,z)=>l.jsx(wt,{className:"h-[200px]"},z))})]});const A=(w==null?void 0:w.length)>0,_=(x==null?void 0:x.length)>0;return l.jsxs("div",{className:"space-y-6 p-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Dashboard"}),l.jsxs(V,{onClick:()=>t(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"New Server"]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[l.jsx(bp,{icon:Zf,title:"Memory",used:((E=m==null?void 0:m.current)==null?void 0:E.ram)||0,total:((k=m==null?void 0:m.limits)==null?void 0:k.ram)||0,unit:"MB"}),l.jsx(bp,{icon:pg,title:"CPU",used:((M=m==null?void 0:m.current)==null?void 0:M.cpu)||0,total:(($=m==null?void 0:m.limits)==null?void 0:$.cpu)||0,unit:"%"}),l.jsx(bp,{icon:Jf,title:"Storage",used:((D=m==null?void 0:m.current)==null?void 0:D.disk)/1024||0,total:((B=m==null?void 0:m.limits)==null?void 0:B.disk)/1024||0,unit:"GB"}),l.jsx(bp,{icon:ba,title:"Servers",used:((I=m==null?void 0:m.current)==null?void 0:I.servers)||0,total:((R=m==null?void 0:m.limits)==null?void 0:R.servers)||0,unit:""})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsx("h2",{className:"text-lg font-medium flex items-center gap-2",children:"Your servers"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[x==null?void 0:x.map(F=>l.jsx(xM,{server:F,onDelete:P,onEdit:N,wsStatus:d,stats:h},F.attributes.id)),!_&&l.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center p-12 text-center border border-dashed border-neutral-800 rounded-lg",children:[l.jsx(ba,{className:"w-12 h-12 text-neutral-600 mb-4"}),l.jsx("h3",{className:"text-lg font-medium text-neutral-400 mb-2",children:"No servers yet"}),l.jsx("p",{className:"text-sm text-neutral-500 mb-4",children:"Create your first server to get started"}),l.jsxs(V,{onClick:()=>t(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Server"]})]})]})]}),A&&l.jsxs("div",{className:"space-y-4",children:[l.jsx("h2",{className:"text-lg font-medium flex items-center gap-2",children:"Servers you can access"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:w.map(F=>l.jsx(xM,{server:F,onDelete:null,onEdit:null,wsStatus:d,stats:h},F.id))})]}),l.jsx(pTe,{isOpen:e,onClose:()=>t(!1)}),l.jsx(hTe,{isOpen:n,onClose:()=>{r(!1),s(null)},server:o}),l.jsx(Na,{open:i,onOpenChange:a,children:l.jsxs(Ii,{children:[l.jsxs(Li,{children:[l.jsx(Bi,{children:"Delete Server"}),l.jsxs(Ui,{children:["Are you sure you want to delete ",c==null?void 0:c.name,"? This action cannot be undone."]})]}),l.jsxs(Fi,{children:[l.jsx(Vi,{onClick:()=>u(null),children:"Cancel"}),l.jsx(zi,{onClick:O,className:"bg-red-500 hover:bg-red-600",children:"Delete Server"})]})]})})]})}var vTe=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function jS(){return jS=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function wp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yTe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,CS(e,t)}function CS(e,t){return CS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},CS(e,t)}var Gy=function(e){yTe(t,e);function t(){var r;return r=e.call(this)||this,r.handleExpired=r.handleExpired.bind(wp(r)),r.handleErrored=r.handleErrored.bind(wp(r)),r.handleChange=r.handleChange.bind(wp(r)),r.handleRecaptchaRef=r.handleRecaptchaRef.bind(wp(r)),r}var n=t.prototype;return n.getCaptchaFunction=function(i){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[i]:this.props.grecaptcha[i]:null},n.getValue=function(){var i=this.getCaptchaFunction("getResponse");return i&&this._widgetId!==void 0?i(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var i=this.getCaptchaFunction("execute");if(i&&this._widgetId!==void 0)return i(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var i=this;return new Promise(function(a,o){i.executionResolve=a,i.executionReject=o,i.execute()})},n.reset=function(){var i=this.getCaptchaFunction("reset");i&&this._widgetId!==void 0&&i(this._widgetId)},n.forceReset=function(){var i=this.getCaptchaFunction("reset");i&&i()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(i){this.props.onChange&&this.props.onChange(i),this.executionResolve&&(this.executionResolve(i),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var i=this.getCaptchaFunction("render");if(i&&this._widgetId===void 0){var a=document.createElement("div");this._widgetId=i(a,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(a)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(i){this.captcha=i},n.render=function(){var i=this.props;i.sitekey,i.onChange,i.theme,i.type,i.tabindex,i.onExpired,i.onErrored,i.size,i.stoken,i.grecaptcha,i.badge,i.hl,i.isolated;var a=gTe(i,vTe);return g.createElement("div",jS({},a,{ref:this.handleRecaptchaRef}))},t}(g.Component);Gy.displayName="ReCAPTCHA";Gy.propTypes={sitekey:Pe.string.isRequired,onChange:Pe.func,grecaptcha:Pe.object,theme:Pe.oneOf(["dark","light"]),type:Pe.oneOf(["image","audio"]),tabindex:Pe.number,onExpired:Pe.func,onErrored:Pe.func,size:Pe.oneOf(["compact","normal","invisible"]),stoken:Pe.string,hl:Pe.string,badge:Pe.oneOf(["bottomright","bottomleft","inline"]),isolated:Pe.bool};Gy.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Hz={exports:{}},Ye={};/** @license React v16.13.1 + * react-is.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 en=typeof Symbol=="function"&&Symbol.for,SO=en?Symbol.for("react.element"):60103,jO=en?Symbol.for("react.portal"):60106,Yy=en?Symbol.for("react.fragment"):60107,Xy=en?Symbol.for("react.strict_mode"):60108,Qy=en?Symbol.for("react.profiler"):60114,Jy=en?Symbol.for("react.provider"):60109,Zy=en?Symbol.for("react.context"):60110,CO=en?Symbol.for("react.async_mode"):60111,e0=en?Symbol.for("react.concurrent_mode"):60111,t0=en?Symbol.for("react.forward_ref"):60112,n0=en?Symbol.for("react.suspense"):60113,xTe=en?Symbol.for("react.suspense_list"):60120,r0=en?Symbol.for("react.memo"):60115,i0=en?Symbol.for("react.lazy"):60116,bTe=en?Symbol.for("react.block"):60121,wTe=en?Symbol.for("react.fundamental"):60117,STe=en?Symbol.for("react.responder"):60118,jTe=en?Symbol.for("react.scope"):60119;function hr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case SO:switch(e=e.type,e){case CO:case e0:case Yy:case Qy:case Xy:case n0:return e;default:switch(e=e&&e.$$typeof,e){case Zy:case t0:case i0:case r0:case Jy:return e;default:return t}}case jO:return t}}}function Kz(e){return hr(e)===e0}Ye.AsyncMode=CO;Ye.ConcurrentMode=e0;Ye.ContextConsumer=Zy;Ye.ContextProvider=Jy;Ye.Element=SO;Ye.ForwardRef=t0;Ye.Fragment=Yy;Ye.Lazy=i0;Ye.Memo=r0;Ye.Portal=jO;Ye.Profiler=Qy;Ye.StrictMode=Xy;Ye.Suspense=n0;Ye.isAsyncMode=function(e){return Kz(e)||hr(e)===CO};Ye.isConcurrentMode=Kz;Ye.isContextConsumer=function(e){return hr(e)===Zy};Ye.isContextProvider=function(e){return hr(e)===Jy};Ye.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===SO};Ye.isForwardRef=function(e){return hr(e)===t0};Ye.isFragment=function(e){return hr(e)===Yy};Ye.isLazy=function(e){return hr(e)===i0};Ye.isMemo=function(e){return hr(e)===r0};Ye.isPortal=function(e){return hr(e)===jO};Ye.isProfiler=function(e){return hr(e)===Qy};Ye.isStrictMode=function(e){return hr(e)===Xy};Ye.isSuspense=function(e){return hr(e)===n0};Ye.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Yy||e===e0||e===Qy||e===Xy||e===n0||e===xTe||typeof e=="object"&&e!==null&&(e.$$typeof===i0||e.$$typeof===r0||e.$$typeof===Jy||e.$$typeof===Zy||e.$$typeof===t0||e.$$typeof===wTe||e.$$typeof===STe||e.$$typeof===jTe||e.$$typeof===bTe)};Ye.typeOf=hr;Hz.exports=Ye;var CTe=Hz.exports,PO=CTe,PTe={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},OTe={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},NTe={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},qz={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},OO={};OO[PO.ForwardRef]=NTe;OO[PO.Memo]=qz;function bM(e){return PO.isMemo(e)?qz:OO[e.$$typeof]||PTe}var ATe=Object.defineProperty,ETe=Object.getOwnPropertyNames,wM=Object.getOwnPropertySymbols,TTe=Object.getOwnPropertyDescriptor,_Te=Object.getPrototypeOf,SM=Object.prototype;function Gz(e,t,n){if(typeof t!="string"){if(SM){var r=_Te(t);r&&r!==SM&&Gz(e,r,n)}var i=ETe(t);wM&&(i=i.concat(wM(t)));for(var a=bM(e),o=bM(t),s=0;s=0)&&(n[i]=e[i]);return n}function $Te(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var zr={},DTe=0;function ITe(e,t){return t=t||{},function(r){var i=r.displayName||r.name||"Component",a=function(s){$Te(c,s);function c(d,f){var h;return h=s.call(this,d,f)||this,h.state={},h.__scriptURL="",h}var u=c.prototype;return u.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+DTe++),this.__scriptLoaderID},u.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},u.asyncScriptLoaderHandleLoad=function(f){var h=this;this.setState(f,function(){return h.props.asyncScriptOnLoad&&h.props.asyncScriptOnLoad(h.state)})},u.asyncScriptLoaderTriggerOnScriptLoaded=function(){var f=zr[this.__scriptURL];if(!f||!f.loaded)throw new Error("Script is not loaded.");for(var h in f.observers)f.observers[h](f);delete window[t.callbackName]},u.componentDidMount=function(){var f=this,h=this.setupScriptURL(),p=this.asyncScriptLoaderGetScriptLoaderID(),v=t,m=v.globalName,y=v.callbackName,x=v.scriptId;if(m&&typeof window[m]<"u"&&(zr[h]={loaded:!0,observers:{}}),zr[h]){var b=zr[h];if(b&&(b.loaded||b.errored)){this.asyncScriptLoaderHandleLoad(b);return}b.observers[p]=function(P){return f.asyncScriptLoaderHandleLoad(P)};return}var w={};w[p]=function(P){return f.asyncScriptLoaderHandleLoad(P)},zr[h]={loaded:!1,observers:w};var C=document.createElement("script");C.src=h,C.async=!0;for(var S in t.attributes)C.setAttribute(S,t.attributes[S]);x&&(C.id=x);var j=function(O){if(zr[h]){var N=zr[h],A=N.observers;for(var _ in A)O(A[_])&&delete A[_]}};y&&typeof window<"u"&&(window[y]=function(){return f.asyncScriptLoaderTriggerOnScriptLoaded()}),C.onload=function(){var P=zr[h];P&&(P.loaded=!0,j(function(O){return y?!1:(O(P),!0)}))},C.onerror=function(){var P=zr[h];P&&(P.errored=!0,j(function(O){return O(P),!0}))},document.body.appendChild(C)},u.componentWillUnmount=function(){var f=this.__scriptURL;if(t.removeOnUnmount===!0)for(var h=document.getElementsByTagName("script"),p=0;p-1&&h[p].parentNode&&h[p].parentNode.removeChild(h[p]);var v=zr[f];v&&(delete v.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete zr[f])},u.render=function(){var f=t.globalName,h=this.props;h.asyncScriptOnLoad;var p=h.forwardedRef,v=RTe(h,["asyncScriptOnLoad","forwardedRef"]);return f&&typeof window<"u"&&(v[f]=typeof window[f]<"u"?window[f]:void 0),v.ref=p,g.createElement(r,v)},c}(g.Component),o=g.forwardRef(function(s,c){return g.createElement(a,PS({},s,{forwardedRef:c}))});return o.displayName="AsyncScriptLoader("+i+")",o.propTypes={asyncScriptOnLoad:Pe.func},MTe(o,r)}}var OS="onloadcallback",LTe="grecaptcha";function NS(){return typeof window<"u"&&window.recaptchaOptions||{}}function FTe(){var e=NS(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+OS+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+OS+"&render=explicit"}const BTe=ITe(FTe,{callbackName:OS,globalName:LTe,attributes:NS().nonce?{nonce:NS().nonce}:{}})(Gy),UTe=()=>{const[e,t]=g.useState("signin"),[n,r]=g.useState(!1),[i,a]=g.useState(""),[o,s]=g.useState({enabled:!1,site_key:null}),[c,u]=g.useState(null),d=Us(),{toast:f}=UEe(),h=T.useRef(null),[p,v]=g.useState(""),[m,y]=g.useState(""),[x,b]=g.useState("");g.useEffect(()=>{(async()=>{try{const O=await(await fetch("/api/captcha")).json();s({enabled:O.captcha_enabled,site_key:O.captcha_site_key})}catch(P){console.error("Failed to fetch captcha config:",P)}})()},[]),g.useEffect(()=>{u(null),h.current&&h.current.reset()},[e]);const w=j=>{u(j)},C=j=>j.length>=12&&/[A-Z]/.test(j)&&/[a-z]/.test(j)&&/[0-9]/.test(j)&&/[^A-Za-z0-9]/.test(j),S=async j=>{if(j.preventDefault(),e==="register"&&o.enabled&&!c){a("Please complete the reCAPTCHA");return}if((e==="signin"||e==="register")&&!m){a("Password is required");return}if(e==="register"&&!C(m)){a("Password must be at least 12 characters long and contain uppercase, lowercase, number, and special character");return}r(!0),a("");try{const P={signin:"/auth/login",register:"/auth/register",reset:"/auth/reset-password-request",magic:"/auth/magic-link"}[e],O={email:p,...e!=="reset"&&e!=="magic"&&{password:m},...e==="register"&&{username:x},...e==="register"&&o.enabled&&{recaptchaResponse:c}},N=await fetch(P,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)}),A=await N.json();N.ok?e==="signin"?d("/dashboard"):(f({title:"Success",description:A.message||"Operation completed successfully"}),e!=="magic"&&(t("signin"),v(""),y(""),b(""))):a(A.error||"An error occurred")}catch{a("An error occurred. Please try again.")}finally{r(!1),o.enabled&&e==="register"&&h.current&&(h.current.reset(),u(null))}};return l.jsx("div",{className:"min-h-screen grid place-items-center bg-background p-4",children:l.jsxs(me,{className:"w-full max-w-md",children:[l.jsxs(je,{className:"space-y-1",children:[e!=="signin"&&l.jsx(V,{variant:"ghost",size:"icon",className:"absolute left-4 top-4",onClick:()=>{a(""),v(""),y(""),b(""),t("signin")},children:l.jsx(yD,{className:"h-4 w-4"})}),l.jsx(Te,{className:"text-2xl font-semibold tracking-tight",children:e==="signin"?"Welcome back":e==="register"?"Create account":e==="reset"?"Reset password":"Magic link"}),l.jsx(An,{className:"text-muted-foreground",children:e==="signin"?"Sign in to your account":e==="register"?"Create a new account to get started":e==="reset"?"Enter your email to reset your password":"Get a passwordless login link"})]}),l.jsxs(ge,{children:[i&&l.jsxs(Tt,{variant:"destructive",className:"mb-6 border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(_t,{className:"ml-2",children:i})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[e==="register"&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(ei,{htmlFor:"username",children:"Username"}),l.jsx(Ce,{id:"username",placeholder:"johndoe",value:x,onChange:j=>b(j.target.value),required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(ei,{htmlFor:"email",children:"Email"}),l.jsx(Ce,{id:"email",type:"email",placeholder:"name@example.com",value:p,onChange:j=>v(j.target.value),required:!0})]}),(e==="signin"||e==="register")&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(ei,{htmlFor:"password",children:"Password"}),l.jsx(Ce,{id:"password",type:"password",placeholder:"••••••••",value:m,onChange:j=>y(j.target.value),required:!0}),e==="register"&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Must be at least 12 characters with uppercase, lowercase, number and special character."})]}),e==="register"&&o.enabled&&l.jsx("div",{className:"flex justify-center py-2",children:l.jsx(BTe,{ref:h,sitekey:o.site_key,onChange:w})}),l.jsxs(V,{type:"submit",className:"w-full",disabled:n||e==="register"&&o.enabled&&!c,children:[n&&l.jsx(Ni,{className:"mr-2 h-4 w-4 animate-spin"}),e==="signin"?"Sign in":e==="register"?"Create account":e==="reset"?"Send reset link":"Send magic link"]})]}),e==="signin"&&l.jsxs("div",{className:"mt-4 space-y-2",children:[l.jsxs(V,{variant:"outline",className:"w-full hidden",onClick:()=>t("magic"),children:[l.jsx(H9,{className:"mr-2 h-4 w-4"}),"Continue with magic link"]}),l.jsxs("div",{className:"flex items-center justify-between text-sm",children:[l.jsx(V,{variant:"link",className:"px-0 text-muted-foreground",onClick:()=>t("register"),children:"Create account"}),l.jsx(V,{variant:"link",className:"px-0 text-muted-foreground hidden",onClick:()=>t("reset"),children:"Forgot password?"})]})]})]})]})})},zTe=()=>{const e=Us();return l.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:[l.jsx(me,{className:"w-full max-w-md",children:l.jsx(ge,{className:"pt-6",children:l.jsxs("div",{className:"text-center space-y-16",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx("h1",{className:"text-4xl mt-8 font-bold animate-fade-in",children:"404"}),l.jsx("div",{className:"h-px w-16 bg-border mx-auto animate-scale-x"}),l.jsx("p",{className:"text-xl text-muted-foreground animate-fade-in-up",children:"Oops! This page seems to be missing."}),l.jsx("p",{className:"text-sm text-muted-foreground/80 animate-fade-in-up delay-100",children:"Prism couldn't find the page you were looking for."})]}),l.jsxs("div",{className:"space-y-3 animate-fade-in-up delay-200",children:[l.jsxs(V,{className:"w-full",onClick:()=>e("/dashboard"),children:[l.jsx(z9,{className:"mr-2 h-4 w-4"}),"Return to Dashboard"]}),l.jsx(V,{variant:"outline",className:"w-full",onClick:()=>e(-1),children:"Go Back"})]})]})})}),l.jsx("style",{jsx:!0,global:!0,children:` + @keyframes scale-x { + from { transform: scaleX(0); } + to { transform: scaleX(1); } + } + + @keyframes fade-in { + from { opacity: 0; } + to { opacity: 1; } + } + + @keyframes fade-in-up { + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0); + } + } + + .animate-scale-x { + animation: scale-x 0.5s ease-out forwards; + } + + .animate-fade-in { + animation: fade-in 0.5s ease-out forwards; + } + + .animate-fade-in-up { + animation: fade-in-up 0.5s ease-out forwards; + } + + .delay-100 { + animation-delay: 100ms; + } + + .delay-200 { + animation-delay: 200ms; + } + `})]})};function VTe(){const[e,t]=g.useState(!1),[n,r]=g.useState(6e4),[i,a]=g.useState(1.5),[o,s]=g.useState(0),[c,u]=g.useState(0),[d,f]=g.useState("");g.useEffect(()=>{const p=new WebSocket("/ws");p.onopen=()=>{t(!0),f("")},p.onmessage=m=>{const y=JSON.parse(m.data);y.type==="afk_state"&&(r(y.nextRewardIn),a(y.coinsPerMinute),s(x=>x+(y.nextRewardIn===0?y.coinsPerMinute:0)))},p.onclose=m=>{t(!1),m.code===4001?f("You must be logged in to earn AFK rewards"):m.code===4002?f("AFK rewards are already running in another tab"):f("Connection lost. Please refresh the page.")};const v=setInterval(()=>{u(m=>m+1)},1e3);return()=>{p.close(),clearInterval(v)}},[]);const h=p=>{const v=Math.floor(p/3600),m=Math.floor(p%3600/60),y=p%60;return`${v.toString().padStart(2,"0")}:${m.toString().padStart(2,"0")}:${y.toString().padStart(2,"0")}`};return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"AFK page"}),l.jsx(Pt,{variant:e?"success":"destructive",className:"px-4 py-1",children:e?"CONNECTED":"DISCONNECTED"})]}),d&&l.jsxs(Tt,{variant:"destructive",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(_t,{children:d})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 gap-6",children:[l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(hg,{className:"w-4 h-4 text-white"})}),l.jsx(Te,{className:"text-sm",children:"Earnings Rate"})]})}),l.jsx(ge,{children:l.jsxs("div",{className:"text-2xl font-bold text-white",children:[i.toFixed(1)," coins/min"]})})]}),l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(_9,{className:"w-4 h-4 text-white"})}),l.jsx(Te,{className:"text-sm",children:"Session Time"})]})}),l.jsx(ge,{children:l.jsx("div",{className:"text-2xl font-bold text-white",children:h(c)})})]})]}),l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{className:"text-sm",children:"Next Reward"})}),l.jsx(ge,{children:l.jsx(Cs,{value:(6e4-n)/6e4*100,className:"h-2"})}),l.jsx(eh,{children:l.jsxs("p",{className:"text-sm text-neutral-400",children:["Next reward in ",Math.ceil(n/1e3)," seconds"]})})]}),l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{children:"How it works"})}),l.jsxs(ge,{className:"space-y-2",children:[l.jsxs("p",{className:"text-sm text-neutral-400",children:["Earn coins automatically just by keeping this page open! You'll receive ",i," coins every minute."]}),l.jsx("p",{className:"text-sm text-neutral-400",children:"You can use these coins to purchase resources and upgrades in the store."})]})]})]})}function WTe(){const[e,t]=g.useState({}),[n,r]=g.useState(""),[i,a]=g.useState(null),{data:o}=xt({queryKey:["storeConfig"],queryFn:async()=>(await ie.get("/api/store/config")).data,retry:!1}),s={ram:"MB RAM",disk:"MB Storage",cpu:"% CPU",servers:"Server Slots"},c=async(d,f)=>{var h,p;try{t(v=>({...v,[d]:!0})),r(""),await ie.post("/api/store/buy",{resourceType:d,amount:parseInt(f)}),window.location.reload()}catch(v){r(((p=(h=v.response)==null?void 0:h.data)==null?void 0:p.error)||"Failed to make purchase")}finally{t(v=>({...v,[d]:!1})),a(null)}},u=({title:d,icon:f,type:h,description:p,pricePerUnit:v})=>{var j,P,O;const[m,y]=g.useState(1),x=m*v,b=((j=o==null?void 0:o.canAfford)==null?void 0:j[h])&&o.userBalance>=x,w=m*(((P=o==null?void 0:o.multipliers)==null?void 0:P[h])||0),C=((O=o==null?void 0:o.limits)==null?void 0:O[h])||10,S=()=>{a({type:h,amount:m,resourceAmount:w,totalPrice:x,title:d,unit:s[h]})};return l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 bg-neutral-900 rounded-lg",children:l.jsx(f,{className:"w-4 h-4 text-white"})}),l.jsx(Te,{className:"text-sm",children:d})]})}),l.jsxs(ge,{className:"space-y-4",children:[l.jsx("p",{className:"text-sm text-neutral-400",children:p}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ce,{type:"number",min:"1",max:C,value:m,onChange:N=>y(Math.max(1,Math.min(C,parseInt(N.target.value)||1))),className:"w-24"}),l.jsx("span",{className:"text-sm text-neutral-400",children:"units"})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-neutral-400",children:"Amount:"}),l.jsxs("span",{className:"text-white",children:[w," ",s[h]]})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-neutral-400",children:"Price:"}),l.jsxs("span",{className:"text-white",children:[x," coins"]})]})]})]}),l.jsx(eh,{children:l.jsxs(V,{className:"w-full",onClick:S,disabled:!b||e[h],children:[e[h]?l.jsx(Ve,{className:"w-4 h-4 animate-spin mr-2"}):b?l.jsx(Wn,{className:"w-4 h-4 mr-2"}):l.jsx("div",{}),b?"Purchase":"Insufficient balance"]})})]})};return o?l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Resources store"}),l.jsxs(Pt,{variant:"outline",className:"px-4 py-1 flex items-center gap-2",children:[l.jsx(hg,{className:"w-4 h-4"}),o.userBalance," coins"]})]}),n&&l.jsxs(Tt,{variant:"destructive",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(_t,{children:n})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[l.jsx(u,{title:"Memory",icon:Zf,type:"ram",description:"Purchase additional RAM for your servers",pricePerUnit:o.prices.resources.ram}),l.jsx(u,{title:"Storage",icon:Jf,type:"disk",description:"Purchase additional storage space",pricePerUnit:o.prices.resources.disk}),l.jsx(u,{title:"CPU",icon:pg,type:"cpu",description:"Purchase additional CPU power",pricePerUnit:o.prices.resources.cpu}),l.jsx(u,{title:"Server Slots",icon:ba,type:"servers",description:"Purchase additional server slots",pricePerUnit:o.prices.resources.servers})]}),l.jsxs(me,{className:"border-neutral-800/50",children:[l.jsx(je,{children:l.jsx(Te,{children:"More information"})}),l.jsx(ge,{className:"space-y-2",children:l.jsxs("p",{className:"text-sm text-neutral-400",children:["Purchase additional resources for your servers using coins. Maximum limits per resource type:",Object.entries(o.limits).map(([d,f])=>l.jsxs("span",{className:"ml-1",children:[d,": ",f,","]},d))]})})]}),l.jsx(st,{open:!!i,onOpenChange:()=>a(null),children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Confirm Purchase"}),l.jsxs(Kt,{className:"pt-4",children:["Are you sure you want to purchase:",l.jsxs("div",{className:"mt-4 space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Resource:"}),l.jsx("span",{className:"font-medium",children:i==null?void 0:i.title})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Amount:"}),l.jsxs("span",{className:"font-medium",children:[i==null?void 0:i.resourceAmount," ",i==null?void 0:i.unit]})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Cost:"}),l.jsxs("span",{className:"font-medium",children:[i==null?void 0:i.totalPrice," coins"]})]}),l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{children:"Balance after purchase:"}),l.jsxs("span",{className:"font-medium",children:[o.userBalance-((i==null?void 0:i.totalPrice)||0)," coins"]})]})]})]})]}),l.jsxs(Bt,{className:"mt-4",children:[l.jsx(V,{variant:"outline",onClick:()=>a(null),children:"Cancel"}),l.jsx(V,{onClick:()=>c(i.type,i.amount),children:"Confirm Purchase"})]})]})})]}):l.jsx("div",{className:"p-6",children:l.jsxs(Tt,{children:[l.jsx(Ve,{className:"h-4 w-4 animate-spin"}),l.jsx(_t,{children:"Loading store configuration..."})]})})}const HTe=()=>{const[e,t]=g.useState(""),[n,r]=g.useState(null),[i,a]=g.useState(!1),o=async()=>{if(!e){r({type:"error",text:"Please enter a code"});return}a(!0);try{const c=await(await fetch(`/generate?code=${encodeURIComponent(e)}`)).json();c.error?r({type:"error",text:c.error}):(r({type:"success",text:"Successfully created referral code!"}),t(""))}catch{r({type:"error",text:"Failed to generate code. Please try again."})}a(!1)};return l.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[l.jsxs(me,{children:[l.jsx(je,{children:l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(A9,{className:"h-5 w-5"}),"Information"]})}),l.jsx(ge,{children:l.jsx("div",{className:"space-y-4",children:l.jsxs("div",{className:"bg-neutral-800/20 rounded-lg p-4",children:[l.jsx("h3",{className:"font-medium flex items-center gap-2 mb-2",children:"Rewards"}),l.jsxs("ul",{className:"space-y-2 text-sm text-neutral-300",children:[l.jsxs("li",{children:["• When someone uses your code, you get ",l.jsx("span",{className:"text-yellow-500",children:"80 coins"})]}),l.jsxs("li",{children:["• They receive ",l.jsx("span",{className:"text-yellow-500",children:"250 coins"})," for using a referral code"]}),l.jsx("li",{children:"• Each user can only claim one referral code"}),l.jsx("li",{children:"• You cannot claim your own referral code"})]})]})})})]}),l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Generate Referral Code"}),l.jsx(An,{children:"Create a unique code for others to use"})]}),l.jsxs(ge,{children:[l.jsxs("div",{className:"flex gap-3",children:[l.jsx(Ce,{placeholder:"Enter desired code (max 15 chars)",value:e,onChange:s=>t(s.target.value),maxLength:15,className:"bg-neutral-800/50"}),l.jsx(V,{onClick:o,disabled:i,children:i?"Creating...":"Generate"})]}),n&&l.jsx(Tt,{className:`mt-3 ${n.type==="error"?"bg-red-900/20 text-red-400":"bg-green-900/20 text-green-400"}`,children:l.jsx(_t,{children:n.text})})]})]})]})},a0=g.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:le("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));a0.displayName="Textarea";const Yz=({priority:e})=>{const t={low:"bg-blue-100 text-blue-800 border-blue-200",medium:"bg-yellow-100 text-yellow-800 border-yellow-200",high:"bg-orange-100 text-orange-800 border-orange-200",urgent:"bg-red-100 text-red-800 border-red-200"};return l.jsx(Pt,{variant:"outline",className:t[e],children:e.charAt(0).toUpperCase()+e.slice(1)})},KTe=({isOpen:e,onClose:t})=>{const[n,r]=g.useState({subject:"",category:"technical",priority:"low",description:""}),[i,a]=g.useState(!1),o=async s=>{s.preventDefault(),a(!0);try{if(!(await fetch("/api/tickets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})).ok)throw new Error("Failed to create ticket");window.location.reload(),t()}catch(c){console.error("Error creating ticket:",c)}finally{a(!1)}};return l.jsx(st,{open:e,onOpenChange:t,children:l.jsxs(et,{className:"sm:max-w-xl",children:[l.jsx(tt,{children:l.jsx(nt,{children:"Create New Ticket"})}),l.jsxs("form",{onSubmit:o,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Subject"}),l.jsx(Ce,{value:n.subject,onChange:s=>r(c=>({...c,subject:s.target.value})),placeholder:"Enter ticket subject",required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Category"}),l.jsxs(ii,{value:n.category,onValueChange:s=>r(c=>({...c,category:s})),children:[l.jsx(Er,{children:l.jsx(ai,{placeholder:"Select category"})}),l.jsxs(Tr,{children:[l.jsx(Le,{value:"technical",children:"Technical Support"}),l.jsx(Le,{value:"billing",children:"Billing"}),l.jsx(Le,{value:"general",children:"General Inquiry"}),l.jsx(Le,{value:"abuse",children:"Abuse Report"})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Priority"}),l.jsxs(ii,{value:n.priority,onValueChange:s=>r(c=>({...c,priority:s})),children:[l.jsx(Er,{children:l.jsx(ai,{placeholder:"Select priority"})}),l.jsxs(Tr,{children:[l.jsx(Le,{value:"low",children:"Low"}),l.jsx(Le,{value:"medium",children:"Medium"}),l.jsx(Le,{value:"high",children:"High"}),l.jsx(Le,{value:"urgent",children:"Urgent"})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Description"}),l.jsx(a0,{value:n.description,onChange:s=>r(c=>({...c,description:s.target.value})),placeholder:"Describe your issue",rows:4,required:!0})]}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"outline",onClick:t,children:"Cancel"}),l.jsxs(V,{type:"submit",disabled:i,children:[i?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Create Ticket"]})]})]})]})})},qTe=({isOpen:e,onClose:t,ticketId:n})=>{const[r,i]=g.useState(""),[a,o]=g.useState(!1),{data:s,isLoading:c}=xt({queryKey:["ticket",n],queryFn:async()=>(await fetch(`/api/tickets/${n}`)).json(),enabled:!!n}),u=async d=>{d.preventDefault(),o(!0);try{if(!(await fetch(`/api/tickets/${n}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:r})})).ok)throw new Error("Failed to send reply");i("")}catch(f){console.error("Error sending reply:",f)}finally{o(!1)}};return c||!s?null:l.jsx(st,{open:e,onOpenChange:t,children:l.jsxs(et,{className:"sm:max-w-2xl",children:[l.jsx(tt,{children:l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{children:[l.jsx(nt,{children:s.subject}),l.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["#",s.id.slice(0,8)]})]}),l.jsx(Yz,{priority:s.priority})]})}),l.jsx("div",{className:"space-y-4 max-h-96 overflow-y-auto",children:s.messages.map((d,f)=>l.jsxs("div",{className:`bg-gray-50 rounded-lg p-4 ${d.isStaff?"ml-8":"mr-8"}`,children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsx(Pt,{variant:d.isStaff?"secondary":"outline",children:d.isStaff?"Staff":"You"}),l.jsx("span",{className:"text-xs text-gray-400",children:new Date(d.timestamp).toLocaleString()})]}),l.jsx("p",{className:"mt-2 text-sm",children:d.content})]},f))}),s.status==="open"&&l.jsxs("form",{onSubmit:u,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Reply"}),l.jsx(a0,{value:r,onChange:d=>i(d.target.value),placeholder:"Type your reply...",rows:3,required:!0})]}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"destructive",onClick:()=>{},type:"button",children:"Close Ticket"}),l.jsxs(V,{type:"submit",disabled:a,children:[a?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(zs,{className:"w-4 h-4 mr-2"}),"Send Reply"]})]})]})]})})},jM=({tickets:e,onViewTicket:t})=>e!=null&&e.length?l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b",children:[l.jsx("th",{className:"text-left py-3 px-4",children:"Subject"}),l.jsx("th",{className:"text-left py-3 px-4",children:"Category"}),l.jsx("th",{className:"text-left py-3 px-4",children:"Priority"}),l.jsx("th",{className:"text-left py-3 px-4",children:"Last Update"}),l.jsx("th",{className:"text-center py-3 px-4",children:"Status"}),l.jsx("th",{className:"text-center py-3 px-4",children:"Actions"})]})}),l.jsx("tbody",{children:e.map(n=>l.jsxs("tr",{className:"border-b",children:[l.jsx("td",{className:"py-3 px-4",children:l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:n.subject}),l.jsxs("div",{className:"text-sm text-gray-500",children:["#",n.id.slice(0,8)]})]})}),l.jsx("td",{className:"py-3 px-4",children:l.jsx(Pt,{variant:"outline",children:n.category})}),l.jsx("td",{className:"py-3 px-4",children:l.jsx(Yz,{priority:n.priority})}),l.jsx("td",{className:"py-3 px-4 text-sm text-gray-500",children:new Date(n.updated).toLocaleString()}),l.jsx("td",{className:"py-3 px-4 text-center",children:l.jsx(Pt,{variant:n.status==="open"?"success":"secondary",children:n.status})}),l.jsx("td",{className:"py-3 px-4 text-center",children:l.jsx(V,{variant:"ghost",size:"sm",onClick:()=>t(n.id),children:l.jsx(_j,{className:"w-4 h-4"})})})]},n.id))})]})}):l.jsxs("div",{className:"text-center py-12",children:[l.jsx(q9,{className:"mx-auto h-12 w-12 text-gray-400"}),l.jsx("h3",{className:"mt-4 text-sm font-medium",children:"No tickets found"}),l.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Create a new ticket to get started."})]});function GTe(){const[e,t]=g.useState(!1),[n,r]=g.useState(null),[i,a]=g.useState(!1),[o,s]=g.useState(null),{data:c,refetch:u}=xt({queryKey:["ticket-stats"],queryFn:async()=>(await fetch("/api/tickets/count")).json()}),{data:d,refetch:f}=xt({queryKey:["tickets"],queryFn:async()=>(await fetch("/api/tickets")).json()}),h=(d==null?void 0:d.filter(b=>b.status==="open"))||[],p=(d==null?void 0:d.filter(b=>b.status==="closed"))||[],v=async()=>{await Promise.all([u(),f()]),t(!1)},m=async()=>{await Promise.all([u(),f()]),a(!1),s(null)},y=b=>{s(b),a(!0)},x=async()=>{if(o)try{if(!(await fetch(`/api/tickets/${o.id}`,{method:"DELETE"})).ok)throw new Error("Failed to delete ticket");await m()}catch(b){console.error("Error deleting ticket:",b)}};return l.jsxs("div",{className:"space-y-6 p-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"flex items-center gap-3",children:l.jsx("div",{children:l.jsx("h1",{className:"text-2xl font-semibold",children:"Support"})})}),l.jsxs(V,{onClick:()=>t(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"New Ticket"]})]}),l.jsxs(me,{children:[l.jsx(je,{children:l.jsx(Te,{children:"Active Tickets"})}),l.jsx(ge,{children:l.jsx(jM,{tickets:h,onViewTicket:r,onDelete:y})})]}),l.jsxs(me,{children:[l.jsx(je,{children:l.jsx(Te,{children:"Closed Tickets"})}),l.jsx(ge,{children:l.jsx(jM,{tickets:p,onViewTicket:r})})]}),l.jsx(KTe,{isOpen:e,onClose:()=>t(!1),onCreated:v}),l.jsx(qTe,{isOpen:!!n,onClose:()=>r(null),ticketId:n}),l.jsx(Na,{open:i,onOpenChange:a,children:l.jsxs(Ii,{children:[l.jsxs(Li,{children:[l.jsx(Bi,{children:"Delete Ticket"}),l.jsx(Ui,{children:"Are you sure you want to delete this ticket? This action cannot be undone."})]}),l.jsxs(Fi,{children:[l.jsx(Vi,{onClick:()=>s(null),children:"Cancel"}),l.jsx(zi,{onClick:x,className:"bg-red-500 hover:bg-red-600",children:"Delete Ticket"})]})]})})]})}const YTe=()=>{const[e,t]=g.useState(""),[n,r]=g.useState(null),[i,a]=g.useState(!1),[o,s]=g.useState(null),[c,u]=g.useState(0),[d,f]=g.useState(!0),[h,p]=g.useState(!1),[v,m]=g.useState(""),[y,x]=g.useState(""),[b,w]=g.useState(""),[C,S]=g.useState(null);g.useEffect(()=>{(async()=>{try{const _=await(await fetch("/api/user")).json();s(_);const k=await(await fetch("/api/coins")).json();u(k.coins);const $=await(await fetch("/api/password")).json();m($.password)}catch(A){console.error("Failed to fetch data:",A)}finally{f(!1)}})();const N=setInterval(async()=>{try{const _=await(await fetch("/api/coins")).json();u(_.coins)}catch(A){console.error("Failed to fetch coins balance:",A)}},3e3);return()=>clearInterval(N)},[]);const j=async()=>{if(!e){r({type:"error",text:"Please enter a referral code"});return}a(!0);try{const N=await(await fetch(`/claim?code=${encodeURIComponent(e)}`)).json();N.error?r({type:"error",text:N.error}):(r({type:"success",text:"Successfully claimed referral code! You received 250 coins."}),t(""))}catch{r({type:"error",text:"Failed to claim code. Please try again."})}a(!1)},P=async()=>{if(y!==b){S({type:"error",text:"Passwords do not match"});return}try{const N=await(await fetch("/api/password/change",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:y,confirmPassword:b})})).json();if(N.error)S({type:"error",text:N.error});else{S({type:"success",text:"Password updated successfully"}),x(""),w("");const _=await(await fetch("/api/password")).json();m(_.password)}}catch{S({type:"error",text:"Failed to update password"})}};return d||!o?l.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:"Loading..."}):l.jsx("div",{className:"max-w-4xl mx-auto space-y-6 p-6",children:l.jsxs("div",{className:"grid gap-6",children:[l.jsxs(me,{children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsxs(Vg,{className:"h-16 w-16",children:[l.jsx(KC,{src:"https://i.imgur.com/J4jb4zO.png"}),l.jsx(Wg,{children:l.jsx(ow,{className:"h-8 w-8"})})]}),l.jsxs("div",{children:[l.jsx(Te,{className:"text-2xl font-bold",children:o.username}),l.jsx(An,{children:l.jsxs("div",{className:"space-y-1",children:[l.jsxs("p",{children:["User ID: ",o.id]}),l.jsxs("p",{children:["Email: ",o.email]}),o.global_name&&l.jsxs("p",{children:["Display Name: ",o.global_name]})]})})]})]})}),l.jsx(ge,{children:l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx("div",{className:"p-2 bg-neutral-800 rounded-lg",children:l.jsx(hg,{className:"h-5 w-5 text-yellow-500"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm text-neutral-400",children:"Coins Balance"}),l.jsx("p",{className:"text-lg font-medium",children:c.toFixed(2)})]})]})})]}),l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"SFTP Credentials"}),l.jsx(An,{children:"Your SFTP login details for server access"})]}),l.jsx(ge,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm text-neutral-400 mb-1",children:"Username"}),l.jsx("p",{className:"font-medium",children:o.username})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm text-neutral-400 mb-1",children:"Password"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ce,{type:h?"text":"password",value:v,readOnly:!0,className:"bg-neutral-800/50"}),l.jsx(V,{variant:"outline",size:"icon",onClick:()=>p(!h),children:h?l.jsx(D9,{className:"h-4 w-4"}):l.jsx(_j,{className:"h-4 w-4"})})]})]})]})})]}),l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Change SFTP Password"}),l.jsx(An,{children:"Set a custom password for SFTP"})]}),l.jsx(ge,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{children:l.jsx(Ce,{type:"password",placeholder:"New password",value:y,onChange:O=>x(O.target.value),className:"bg-neutral-800/50"})}),l.jsx("div",{children:l.jsx(Ce,{type:"password",placeholder:"Confirm new password",value:b,onChange:O=>w(O.target.value),className:"bg-neutral-800/50"})}),l.jsx(V,{onClick:P,children:"Update Password"}),C&&l.jsx(Tt,{className:`mt-3 ${C.type==="error"?"bg-red-900/20 text-red-400":"bg-green-900/20 text-green-400"}`,children:l.jsx(_t,{children:C.text})})]})})]}),l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Claim Referral Code"}),l.jsx(An,{children:"Enter a referral code to claim 250 coins. The code owner will receive 80 coins."})]}),l.jsxs(ge,{children:[l.jsxs("div",{className:"flex gap-3",children:[l.jsx(Ce,{placeholder:"Enter referral code",value:e,onChange:O=>t(O.target.value),className:"bg-neutral-800/50",maxLength:15}),l.jsx(V,{onClick:j,disabled:i,children:i?"Claiming...":"Claim Code"})]}),n&&l.jsx(Tt,{className:`mt-3 ${n.type==="error"?"bg-red-900/20 text-red-400":"bg-green-900/20 text-green-400"}`,children:l.jsx(_t,{children:n.text})})]})]})]})})};function XTe({isOpen:e,onClose:t}){const[n,r]=g.useState(!1),i=()=>{n&&localStorage.setItem("prismWelcomeShown","true"),t()};return l.jsx(st,{open:e,onOpenChange:t,children:l.jsxs(et,{className:"max-w-2xl",children:[l.jsx("div",{className:"py-10",children:l.jsxs("div",{className:"relative space-y-4",children:[l.jsx("img",{src:"https://i.imgur.com/ZLb7kak.png",alt:"Prism Logo",className:"w-auto h-12 mb-6"}),l.jsx("h2",{className:"text-3xl font-bold text-black",children:"Prism 0.5 (Adelante)"}),l.jsx("p",{className:"text-neutral-700 max-w-lg",children:"The next generation of Prism is here. New year, new look, new features and improvements. We're excited to have you join us now that you've upgraded from Heliactyl!"}),l.jsxs("div",{className:"flex space-x-4 items-center",children:[l.jsx(Hv,{id:"dontShowAgain",checked:n,onCheckedChange:r,className:"text-primary-500"}),l.jsx("label",{htmlFor:"dontShowAgain",className:"text-sm text-neutral-600 cursor-pointer",children:"Don't show this again"})]})]})}),l.jsx(Bt,{className:"flex-col space-y-4",children:l.jsx(V,{onClick:i,className:"w-96 mr-auto",children:"Explore Prism"})})]})})}function QTe(){const{data:e,isLoading:t}=xt({queryKey:["system-stats"],queryFn:async()=>{const[r,i,a]=await Promise.all([ie.get("/api/servers"),ie.get("/api/users"),ie.get("/api/nodes")]);return{servers:r.data.meta.pagination.total||0,users:i.data.meta.pagination.total||0,nodes:a.data.meta.pagination.total||0}},refetchInterval:6e4}),n=[{icon:ba,label:"Total Servers",value:(e==null?void 0:e.servers)||0},{icon:fd,label:"Total Users",value:(e==null?void 0:e.users)||0},{icon:T9,label:"Active Nodes",value:(e==null?void 0:e.nodes)||0}];return l.jsx("div",{className:"grid grid-cols-3 gap-4",children:n.map((r,i)=>l.jsx(me,{children:l.jsx(ge,{className:"pt-6",children:l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx("div",{className:"p-3 bg-neutral-900 rounded-lg",children:l.jsx(r.icon,{className:"w-6 h-6 text-neutral-400"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-neutral-400",children:r.label}),l.jsx("p",{className:"text-2xl font-bold",children:t?l.jsx("div",{className:"h-8 w-16 bg-neutral-800 animate-pulse rounded"}):r.value.toLocaleString()})]})]})})},i))})}function JTe({isOpen:e,onClose:t}){const[n,r]=g.useState(null),[i,a]=g.useState(!1),[o,s]=g.useState(""),[c,u]=g.useState(!1),{data:d,isLoading:f,refetch:h}=xt({queryKey:["backups"],queryFn:async()=>{const{data:y}=await ie.get("/api/config/backups");return y},enabled:e}),p=async()=>{var y,x;try{a(!0),s(""),await ie.post(`/api/config/backups/${n.name}/restore`),u(!0),h()}catch(b){s(((x=(y=b.response)==null?void 0:y.data)==null?void 0:x.error)||"Failed to restore backup")}finally{a(!1)}},v=async()=>{try{await ie.post("/api/reboot"),t(),setTimeout(()=>window.location.reload(),7e3)}catch{s("Failed to reboot dashboard")}},m=y=>new Date(y).toLocaleString();return c?l.jsx(Na,{open:!0,onOpenChange:()=>u(!1),children:l.jsxs(Ii,{children:[l.jsxs(Li,{children:[l.jsx(Bi,{children:"Configuration Restored"}),l.jsx(Ui,{children:"The configuration has been restored. Would you like to reboot the dashboard now to apply the changes?"})]}),l.jsxs(Fi,{children:[l.jsx(Vi,{onClick:()=>{u(!1),t()},children:"Later"}),l.jsx(zi,{onClick:v,children:"Reboot Now"})]})]})}):l.jsx(st,{open:e,onOpenChange:t,children:l.jsxs(et,{className:"max-w-4xl",children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Configuration Backups"}),l.jsx(Kt,{children:"View and manage your dashboard configuration backups. You can restore to a previous version if needed."})]}),l.jsxs("div",{className:"space-y-4",children:[o&&l.jsxs(Tt,{variant:"destructive",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(_t,{children:o})]}),l.jsx(fr,{className:"h-[400px] rounded-md border border-neutral-800",children:l.jsxs(Yi,{children:[l.jsx(Xi,{children:l.jsxs(lt,{children:[l.jsx(Oe,{children:"Date"}),l.jsx(Oe,{children:"Filename"}),l.jsx(Oe,{className:"text-right",children:"Actions"})]})}),l.jsx(Qi,{children:f?l.jsx(lt,{children:l.jsx(he,{colSpan:3,children:l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx(Ve,{className:"w-4 h-4 animate-spin"})})})}):l.jsxs(l.Fragment,{children:[d==null?void 0:d.map(y=>l.jsxs(lt,{children:[l.jsx(he,{children:m(y.timestamp)}),l.jsx(he,{className:"font-mono text-sm",children:y.name}),l.jsxs(he,{className:"text-right space-x-2",children:[l.jsxs(V,{variant:"outline",size:"sm",onClick:()=>window.open(`/api/config/backups/${y.name}`,"_blank"),children:[l.jsx(Sm,{className:"w-4 h-4 mr-2"}),"View"]}),l.jsxs(V,{variant:"outline",size:"sm",onClick:()=>r(y),children:[l.jsx(Mj,{className:"w-4 h-4 mr-2"}),"Restore"]})]})]},y.name)),!(d!=null&&d.length)&&l.jsx(lt,{children:l.jsx(he,{colSpan:3,className:"text-center text-neutral-500",children:"No backups found"})})]})})]})})]}),n&&l.jsx(Na,{open:!0,onOpenChange:()=>r(null),children:l.jsxs(Ii,{children:[l.jsxs(Li,{children:[l.jsx(Bi,{children:"Restore Configuration"}),l.jsxs(Ui,{children:["Are you sure you want to restore the configuration from ",m(n.timestamp),"? This will overwrite your current configuration and require a dashboard reboot."]})]}),l.jsxs(Fi,{children:[l.jsx(Vi,{onClick:()=>r(null),children:"Cancel"}),l.jsx(zi,{onClick:p,disabled:i,children:i?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),"Restoring..."]}):"Restore Configuration"})]})]})}),l.jsx(Bt,{children:l.jsx(V,{variant:"outline",onClick:t,children:"Close"})})]})})}function ZTe(){const[e,t]=g.useState(()=>!localStorage.getItem("prismWelcomeShown")),[n,r]=g.useState(""),[i,a]=g.useState(!1),[o,s]=g.useState(!1),[c,u]=g.useState(""),[d,f]=g.useState(!1),[h,p]=g.useState(!1),{data:v,isLoading:m}=xt({queryKey:["config"],queryFn:async()=>{const{data:S}=await ie.get("/api/config");return S}}),{data:y,isLoading:x}=xt({queryKey:["rebootStatus"],queryFn:async()=>{const{data:S}=await ie.get("/api/reboot/status");return S},refetchInterval:5e3});g.useEffect(()=>{(async()=>{try{const{data:j}=await ie.get("/api/config/raw");r(j)}catch{u("Failed to load configuration file")}})()},[]);const b=async()=>{var S,j;try{f(!0),u("");const O=`config-${Date.now()}.toml`;await ie.post("/api/config/raw",n,{headers:{"Content-Type":"text/plain"}}),u("Configuration saved successfully. A reboot is required to apply changes.")}catch(P){u(((j=(S=P.response)==null?void 0:S.data)==null?void 0:j.error)||"Failed to save configuration")}finally{f(!1)}},w=async()=>{try{p(!0),a(!1),await ie.post("/api/reboot"),setTimeout(()=>window.location.reload(),7e3)}catch{u("Failed to initiate reboot"),p(!1)}},C=async()=>{try{u(""),await b(),s(!0)}catch{u("Failed to create backup")}};return m||x?l.jsxs("div",{className:"p-6",children:[l.jsx("div",{className:"h-8 w-32 bg-neutral-800 rounded animate-pulse mb-6"}),l.jsxs("div",{className:"grid gap-6",children:[l.jsx("div",{className:"h-40 bg-neutral-800 rounded animate-pulse"}),l.jsx("div",{className:"h-40 bg-neutral-800 rounded animate-pulse"})]})]}):l.jsxs("div",{className:"min-h-screen bg-neutral-950",children:[l.jsx(XTe,{isOpen:e,onClose:()=>t(!1)}),l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsx("div",{children:l.jsx("h1",{className:"text-2xl font-bold",children:"Overview"})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(V,{variant:"outline",onClick:C,children:[l.jsx(ys,{className:"w-4 h-4 mr-2"}),"Create Backup"]}),l.jsx(V,{onClick:()=>a(!0),variant:y!=null&&y.needsReboot?"default":"outline",disabled:h,children:h?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),"Rebooting..."]}):y!=null&&y.needsReboot?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Reboot Required"]}):l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2"}),"Reboot Dashboard"]})})]})]}),l.jsx("div",{className:"grid gap-6 mb-6",children:l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"System Overview"}),l.jsx(An,{children:"Current system status and statistics"})]}),l.jsxs(ge,{className:"space-y-6",children:[l.jsx("div",{className:"space-y-1",children:l.jsxs("div",{className:"flex items-center text-sm",children:[l.jsx(Pt,{variant:"outline",className:"mr-2",children:v==null?void 0:v.version}),l.jsx(wm,{className:"w-4 h-4 text-neutral-500"}),l.jsxs("span",{className:"text-neutral-400",children:["Platform Level ",v==null?void 0:v.platform_level]}),l.jsx(wm,{className:"w-4 h-4 text-neutral-500"}),l.jsx("span",{className:"text-neutral-400",children:v==null?void 0:v.platform_codename})]})}),l.jsx(QTe,{})]})]})}),l.jsxs("div",{className:"grid gap-6 grid-cols-4",children:[l.jsx("div",{className:"col-span-3",children:l.jsxs(me,{className:"flex flex-col h-[calc(100vh-20rem)]",children:[l.jsxs(je,{children:[l.jsxs(Te,{className:"flex items-center gap-2",children:[l.jsx(Sm,{className:"w-4 h-4"}),"Configuration Editor"]}),l.jsx(An,{children:"Edit your dashboard's configuration file directly. Be careful as incorrect changes may break your dashboard."})]}),l.jsx(ge,{className:"flex-1 pb-0",children:l.jsx("div",{className:"h-full",children:l.jsx("textarea",{value:n,onChange:S=>r(S.target.value),className:"w-full h-full p-4 bg-neutral-950 font-mono text-sm resize-none focus:outline-none border border-neutral-800 rounded-md",spellCheck:!1})})}),l.jsxs(eh,{className:"flex justify-between mt-4",children:[l.jsx("div",{className:"text-sm text-neutral-500",children:(y==null?void 0:y.needsReboot)&&l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(rr,{className:"w-4 h-4 text-yellow-500"}),"Reboot required to apply changes"]})}),l.jsxs(V,{onClick:b,disabled:d,children:[d?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(zs,{className:"w-4 h-4 mr-2"}),"Save Changes"]})]})]})}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Quick Actions"}),l.jsx(An,{children:"Common administrative tasks"})]}),l.jsx(ge,{children:l.jsxs("div",{className:"space-y-2",children:[l.jsxs(V,{variant:"outline",className:"w-full justify-start",onClick:()=>s(!0),children:[l.jsx(ys,{className:"w-4 h-4 mr-2"}),"Manage Backups"]}),l.jsxs(V,{variant:"outline",className:"w-full justify-start",onClick:()=>window.open("/api/config/backups","_blank"),children:[l.jsx(Sm,{className:"w-4 h-4 mr-2"}),"View Backup Files"]}),l.jsxs(V,{variant:"outline",className:"w-full justify-start",onClick:async()=>{try{await ie.post("/api/panel/rebuild"),u("Panel rebuild initiated successfully")}catch{u("Failed to rebuild panel")}},children:[l.jsx(O9,{className:"w-4 h-4 mr-2"}),"Rebuild Panel"]})]})})]}),c&&l.jsxs(Tt,{variant:c.includes("successfully")?"default":"destructive",children:[c.includes("successfully")?l.jsx(Yc,{className:"h-4 w-4"}):l.jsx(rr,{className:"h-4 w-4"}),l.jsx(_t,{children:c})]})]})]})]}),l.jsx(JTe,{isOpen:o,onClose:()=>s(!1)}),l.jsx(Na,{open:i,onOpenChange:a,children:l.jsxs(Ii,{children:[l.jsxs(Li,{children:[l.jsx(Bi,{children:"Reboot Dashboard"}),l.jsxs(Ui,{children:["Are you sure you want to reboot the dashboard? All active connections will be temporarily disconnected.",(y==null?void 0:y.needsReboot)&&l.jsxs(Tt,{className:"mt-2",children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(_t,{children:"Configuration changes have been detected that require a reboot to take effect."})]})]})]}),l.jsxs(Fi,{children:[l.jsx(Vi,{onClick:()=>a(!1),children:"Cancel"}),l.jsx(zi,{onClick:w,disabled:h,children:h?"Rebooting...":"Reboot Dashboard"})]})]})})]})}const Sp=({title:e,value:t,className:n})=>l.jsx(me,{children:l.jsxs(ge,{className:"p-6",children:[l.jsx("h3",{className:"text-sm font-medium text-gray-500",children:e}),l.jsx("p",{className:`mt-2 text-3xl font-semibold ${n}`,children:t})]})}),Xz=({priority:e})=>{const t={low:"bg-blue-100 text-blue-800 border-blue-200",medium:"bg-yellow-100 text-yellow-800 border-yellow-200",high:"bg-orange-100 text-orange-800 border-orange-200",urgent:"bg-red-100 text-red-800 border-red-200"};return l.jsx(Pt,{variant:"outline",className:t[e],children:e.charAt(0).toUpperCase()+e.slice(1)})},Qz=({status:e})=>l.jsx(Pt,{variant:e==="open"?"success":"secondary",children:e.charAt(0).toUpperCase()+e.slice(1)}),e_e=({isOpen:e,onClose:t,ticketId:n,onStatusChange:r})=>{const[i,a]=g.useState(""),[o,s]=g.useState(!1),{data:c,refetch:u}=xt({queryKey:["ticket",n],queryFn:async()=>(await fetch(`/api/tickets/${n}`)).json(),enabled:!!n}),d=async f=>{f.preventDefault(),s(!0);try{await fetch(`/api/tickets/${n}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:i})}),a(""),u()}catch(h){console.error("Error sending reply:",h)}finally{s(!1)}};return c?l.jsx(st,{open:e,onOpenChange:t,children:l.jsxs(et,{className:"sm:max-w-2xl",children:[l.jsx(tt,{children:l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsxs("div",{children:[l.jsx(nt,{children:c.subject}),l.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["#",c.id.slice(0,8)]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Xz,{priority:c.priority}),l.jsx(Qz,{status:c.status})]})]})}),l.jsx("div",{className:"space-y-4 max-h-[400px] overflow-y-auto",children:c.messages.map((f,h)=>l.jsxs("div",{className:`bg-gray-50 rounded-lg p-4 ${f.isStaff?"ml-8":"mr-8"}`,children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsx(Pt,{variant:f.isSystem?"outline":f.isStaff?"secondary":"default",children:f.isSystem?"System":f.isStaff?"Staff":"User"}),l.jsx("span",{className:"text-xs text-gray-400",children:new Date(f.timestamp).toLocaleString()})]}),l.jsx("p",{className:"mt-2 text-sm text-gray-700",children:f.content})]},h))}),l.jsx("div",{className:"border-t pt-4",children:l.jsxs("form",{onSubmit:d,className:"space-y-4",children:[l.jsx(a0,{value:i,onChange:f=>a(f.target.value),placeholder:"Type your reply...",className:"min-h-[100px]"}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx(V,{type:"button",variant:c.status==="open"?"destructive":"default",onClick:()=>r(c.id,c.status==="open"?"closed":"open"),children:c.status==="open"?l.jsxs(l.Fragment,{children:[l.jsx(vg,{className:"w-4 h-4 mr-2"})," Close Ticket"]}):l.jsxs(l.Fragment,{children:[l.jsx(Mj,{className:"w-4 h-4 mr-2"})," Reopen Ticket"]})}),l.jsxs(V,{type:"submit",disabled:o,children:[o?l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}):l.jsx(zs,{className:"w-4 h-4 mr-2"}),"Send Reply"]})]})]})})]})}):null},t_e=({isOpen:e,onClose:t,ticketId:n,onUpdate:r})=>{const[i,a]=g.useState("low");return l.jsx(st,{open:e,onOpenChange:t,children:l.jsxs(et,{children:[l.jsx(tt,{children:l.jsx(nt,{children:"Update Priority"})}),l.jsxs(ii,{value:i,onValueChange:a,children:[l.jsx(Er,{children:l.jsx(ai,{placeholder:"Select priority"})}),l.jsxs(Tr,{children:[l.jsx(Le,{value:"low",children:"Low"}),l.jsx(Le,{value:"medium",children:"Medium"}),l.jsx(Le,{value:"high",children:"High"}),l.jsx(Le,{value:"urgent",children:"Urgent"})]})]}),l.jsxs(Bt,{children:[l.jsx(V,{variant:"outline",onClick:t,children:"Cancel"}),l.jsx(V,{onClick:()=>r(n,i),children:"Update"})]})]})})};function n_e(){const[e,t]=g.useState({search:"",priority:"all",category:"all",status:"all"}),[n,r]=g.useState(1),[i,a]=g.useState(null),[o,s]=g.useState(null),c=10,{data:u}=xt({queryKey:["ticket-stats"],queryFn:async()=>(await fetch("/api/tickets/stats")).json()}),{data:d,refetch:f}=xt({queryKey:["tickets"],queryFn:async()=>(await fetch("/api/tickets/all")).json()}),h=(d==null?void 0:d.filter(x=>!(e.search&&!x.subject.toLowerCase().includes(e.search.toLowerCase())&&!x.user.username.toLowerCase().includes(e.search.toLowerCase())||e.priority!=="all"&&x.priority!==e.priority||e.category!=="all"&&x.category!==e.category||e.status!=="all"&&x.status!==e.status)))||[],p=h.slice((n-1)*c,n*c),v=async(x,b)=>{try{await fetch(`/api/tickets/${x}/status`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:b})}),f()}catch(w){console.error("Error updating ticket status:",w)}},m=async(x,b)=>{try{await fetch(`/api/tickets/${x}/priority`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})}),f(),s(null)}catch(w){console.error("Error updating priority:",w)}},y=async()=>{try{const b=await(await fetch("/api/tickets/export")).blob(),w=window.URL.createObjectURL(b),C=document.createElement("a");C.href=w,C.download=`tickets-${new Date().toISOString()}.csv`,document.body.appendChild(C),C.click(),document.body.removeChild(C),window.URL.revokeObjectURL(w)}catch(x){console.error("Error exporting tickets:",x)}};return l.jsxs("div",{className:"space-y-6 p-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"flex items-center gap-3",children:l.jsx("div",{children:l.jsx("h1",{className:"text-2xl font-semibold",children:"Support Tickets"})})}),l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsxs(ii,{value:e.priority,onValueChange:x=>t(b=>({...b,priority:x})),children:[l.jsx(Er,{className:"w-[150px]",children:l.jsx(ai,{placeholder:"Priority"})}),l.jsxs(Tr,{children:[l.jsx(Le,{value:"all",children:"All Priorities"}),l.jsx(Le,{value:"low",children:"Low"}),l.jsx(Le,{value:"medium",children:"Medium"}),l.jsx(Le,{value:"high",children:"High"}),l.jsx(Le,{value:"urgent",children:"Urgent"})]})]}),l.jsxs(ii,{value:e.category,onValueChange:x=>t(b=>({...b,category:x})),children:[l.jsx(Er,{className:"w-[150px]",children:l.jsx(ai,{placeholder:"Category"})}),l.jsxs(Tr,{children:[l.jsx(Le,{value:"all",children:"All Categories"}),l.jsx(Le,{value:"technical",children:"Technical"}),l.jsx(Le,{value:"billing",children:"Billing"}),l.jsx(Le,{value:"general",children:"General"}),l.jsx(Le,{value:"abuse",children:"Abuse"})]})]}),l.jsxs(ii,{value:e.status,onValueChange:x=>t(b=>({...b,status:x})),children:[l.jsx(Er,{className:"w-[150px]",children:l.jsx(ai,{placeholder:"Status"})}),l.jsxs(Tr,{children:[l.jsx(Le,{value:"all",children:"All Status"}),l.jsx(Le,{value:"open",children:"Open"}),l.jsx(Le,{value:"closed",children:"Closed"})]})]}),l.jsx(Ce,{placeholder:"Search tickets...",value:e.search,onChange:x=>t(b=>({...b,search:x.target.value})),className:"w-[200px]"}),l.jsxs(V,{onClick:y,children:[l.jsx(Kd,{className:"w-4 h-4 mr-2"}),"Export CSV"]})]})]}),l.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[l.jsx(Sp,{title:"Total Tickets",value:(u==null?void 0:u.total)||"-"}),l.jsx(Sp,{title:"Open Tickets",value:(u==null?void 0:u.open)||"-",className:"text-emerald-600"}),l.jsx(Sp,{title:"Avg. Response Time",value:u!=null&&u.averageResponseTime?`${Math.round(u.averageResponseTime/6e4)}m`:"-",className:"text-amber-600"}),l.jsx(Sp,{title:"Last 7 Days",value:(u==null?void 0:u.ticketsLastWeek)||"-",className:"text-blue-600"})]}),l.jsxs(me,{children:[l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b",children:[l.jsx("th",{className:"text-left p-4",children:"Ticket"}),l.jsx("th",{className:"text-left p-4",children:"User"}),l.jsx("th",{className:"text-left p-4",children:"Category"}),l.jsx("th",{className:"text-left p-4",children:"Priority"}),l.jsx("th",{className:"text-left p-4",children:"Status"}),l.jsx("th",{className:"text-center p-4",children:"Actions"})]})}),l.jsx("tbody",{children:p.map(x=>l.jsxs("tr",{className:"border-b",children:[l.jsx("td",{className:"p-4",children:l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:x.subject}),l.jsxs("div",{className:"text-sm text-gray-500",children:["#",x.id.slice(0,8)]})]})}),l.jsxs("td",{className:"p-4",children:[l.jsx("div",{className:"text-sm",children:x.user.username}),l.jsx("div",{className:"text-xs text-gray-500",children:x.user.email})]}),l.jsx("td",{className:"p-4",children:l.jsx(Pt,{variant:"outline",children:x.category})}),l.jsx("td",{className:"p-4",children:l.jsx(Xz,{priority:x.priority})}),l.jsx("td",{className:"p-4",children:l.jsx(Qz,{status:x.status})}),l.jsx("td",{className:"p-4",children:l.jsxs("div",{className:"flex justify-center gap-2",children:[l.jsx(V,{variant:"ghost",size:"sm",onClick:()=>a(x.id),children:l.jsx(_j,{className:"w-4 h-4"})}),l.jsx(V,{variant:"ghost",size:"sm",onClick:()=>s(x.id),children:l.jsx(Tj,{className:"w-4 h-4"})}),l.jsx(V,{variant:"ghost",size:"sm",onClick:()=>v(x.id,x.status==="open"?"closed":"open"),children:x.status==="open"?l.jsx(vg,{className:"w-4 h-4 text-red-500"}):l.jsx(Mj,{className:"w-4 h-4 text-emerald-500"})})]})})]},x.id))})]})}),l.jsxs("div",{className:"flex items-center justify-between p-4 border-t",children:[l.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",(n-1)*c+1," to"," ",Math.min(n*c,h.length)," of"," ",h.length," tickets"]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(V,{variant:"outline",disabled:n===1,onClick:()=>r(x=>x-1),children:"Previous"}),Array.from({length:Math.ceil(h.length/c)}).map((x,b)=>{const w=b+1;return w===1||w===Math.ceil(h.length/c)||w>=n-2&&w<=n+2?l.jsx(V,{variant:n===w?"default":"outline",onClick:()=>r(w),children:w},w):w===2&&n>4||w===Math.ceil(h.length/c)-1&&nr(x=>x+1),children:"Next"})]})]})]}),l.jsx(e_e,{isOpen:!!i,onClose:()=>a(null),ticketId:i,onStatusChange:v}),l.jsx(t_e,{isOpen:!!o,onClose:()=>s(null),ticketId:o,onUpdate:m})]})}var Gx,NO="HoverCard",[Jz,U_e]=un(NO,[Do]),o0=Do(),[r_e,AO]=Jz(NO),Zz=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,c=o0(t),u=g.useRef(0),d=g.useRef(0),f=g.useRef(!1),h=g.useRef(!1),[p=!1,v]=Mr({prop:r,defaultProp:i,onChange:a}),m=g.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>v(!0),o)},[o,v]),y=g.useCallback(()=>{clearTimeout(u.current),!f.current&&!h.current&&(d.current=window.setTimeout(()=>v(!1),s))},[s,v]),x=g.useCallback(()=>v(!1),[v]);return g.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),l.jsx(r_e,{scope:t,open:p,onOpenChange:v,onOpen:m,onClose:y,onDismiss:x,hasSelectionRef:f,isPointerDownOnContentRef:h,children:l.jsx(kg,{...c,children:n})})};Zz.displayName=NO;var e8="HoverCardTrigger",t8=g.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=AO(e8,n),a=o0(n);return l.jsx(Mg,{asChild:!0,...a,children:l.jsx(pe.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:ne(e.onPointerEnter,Gv(i.onOpen)),onPointerLeave:ne(e.onPointerLeave,Gv(i.onClose)),onFocus:ne(e.onFocus,i.onOpen),onBlur:ne(e.onBlur,i.onClose),onTouchStart:ne(e.onTouchStart,o=>o.preventDefault())})})});t8.displayName=e8;var i_e="HoverCardPortal",[z_e,a_e]=Jz(i_e,{forceMount:void 0}),qv="HoverCardContent",n8=g.forwardRef((e,t)=>{const n=a_e(qv,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=AO(qv,e.__scopeHoverCard);return l.jsx(Jt,{present:r||a.open,children:l.jsx(o_e,{"data-state":a.open?"open":"closed",...i,onPointerEnter:ne(e.onPointerEnter,Gv(a.onOpen)),onPointerLeave:ne(e.onPointerLeave,Gv(a.onClose)),ref:t})})});n8.displayName=qv;var o_e=g.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,c=AO(qv,n),u=o0(n),d=g.useRef(null),f=_e(t,d),[h,p]=g.useState(!1);return g.useEffect(()=>{if(h){const v=document.body;return Gx=v.style.userSelect||v.style.webkitUserSelect,v.style.userSelect="none",v.style.webkitUserSelect="none",()=>{v.style.userSelect=Gx,v.style.webkitUserSelect=Gx}}},[h]),g.useEffect(()=>{if(d.current){const v=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",v),()=>{document.removeEventListener("pointerup",v),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),g.useEffect(()=>{d.current&&c_e(d.current).forEach(m=>m.setAttribute("tabindex","-1"))}),l.jsx(Zc,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:ne(a,v=>{v.preventDefault()}),onDismiss:c.onDismiss,children:l.jsx(Rg,{...u,...s,onPointerDown:ne(s.onPointerDown,v=>{v.currentTarget.contains(v.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:f,style:{...s.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),s_e="HoverCardArrow",l_e=g.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=o0(n);return l.jsx($g,{...i,...r,ref:t})});l_e.displayName=s_e;function Gv(e){return t=>t.pointerType==="touch"?void 0:e()}function c_e(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var u_e=Zz,d_e=t8,r8=n8;const f_e=u_e,h_e=d_e,i8=g.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>l.jsx(r8,{ref:i,align:t,sideOffset:n,className:le("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));i8.displayName=r8.displayName;function Yx({label:e,icon:t,used:n,total:r,unit:i}){return l.jsx("div",{className:"space-y-1 w-48",children:l.jsxs("div",{className:"flex items-center justify-between text-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 text-neutral-400",children:[l.jsx(t,{className:"w-4 h-4"}),e]}),l.jsxs("span",{children:[r.toLocaleString(),i]})]})})}function CM({user:e,onSubmit:t,isSubmitting:n}){const[r,i]=g.useState({email:"",username:"",first_name:"",last_name:"",password:"",coins:0,ram:0,disk:0,cpu:0,servers:0,admin:!1});return g.useEffect(()=>{var a,o,s,c;e&&i({email:e.attributes.email||"",username:e.attributes.username||"",first_name:e.attributes.first_name||"",last_name:e.attributes.last_name||"",password:"",coins:e.coins||0,ram:((a=e.resources)==null?void 0:a.ram)||0,disk:((o=e.resources)==null?void 0:o.disk)||0,cpu:((s=e.resources)==null?void 0:s.cpu)||0,servers:((c=e.resources)==null?void 0:c.servers)||0,admin:e.attributes.root_admin||!1})},[e]),l.jsxs("div",{className:"grid gap-6 py-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Email"}),l.jsx(Ce,{value:r.email,onChange:a=>i({...r,email:a.target.value}),placeholder:"user@example.com"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Username"}),l.jsx(Ce,{value:r.username,onChange:a=>i({...r,username:a.target.value}),placeholder:"username"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"First Name"}),l.jsx(Ce,{value:r.first_name,onChange:a=>i({...r,first_name:a.target.value}),placeholder:"John"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Last Name"}),l.jsx(Ce,{value:r.last_name,onChange:a=>i({...r,last_name:a.target.value}),placeholder:"Doe"})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:e?"New Password (leave empty to keep unchanged)":"Password"}),l.jsx(Ce,{type:"password",value:r.password,onChange:a=>i({...r,password:a.target.value}),placeholder:"••••••••"})]}),l.jsxs(iO,{defaultValue:"resources",children:[l.jsxs(Iy,{children:[l.jsx(yo,{value:"resources",children:"Resources"}),l.jsx(yo,{value:"permissions",children:"Permissions"})]}),l.jsxs(xo,{value:"resources",className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Coins"}),l.jsx(Ce,{type:"number",value:r.coins,onChange:a=>i({...r,coins:parseInt(a.target.value)||0})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Server Limit"}),l.jsx(Ce,{type:"number",value:r.servers,onChange:a=>i({...r,servers:parseInt(a.target.value)||0})})]})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"RAM (MB)"}),l.jsx(Ce,{type:"number",value:r.ram,onChange:a=>i({...r,ram:parseInt(a.target.value)||0})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Disk (MB)"}),l.jsx(Ce,{type:"number",value:r.disk,onChange:a=>i({...r,disk:parseInt(a.target.value)||0})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"CPU (%)"}),l.jsx(Ce,{type:"number",value:r.cpu,onChange:a=>i({...r,cpu:parseInt(a.target.value)||0})})]})]})]}),l.jsx(xo,{value:"permissions",children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("input",{type:"checkbox",id:"admin",checked:r.admin,onChange:a=>i({...r,admin:a.target.checked}),className:"rounded border-neutral-300"}),l.jsx("label",{htmlFor:"admin",className:"text-sm font-medium",children:"Administrator Access"})]}),r.admin&&l.jsxs(Tt,{children:[l.jsx(rr,{className:"h-4 w-4"}),l.jsx(_t,{children:"This user will have full administrative access to the panel."})]})]})})]}),l.jsxs("div",{className:"flex justify-end space-x-2",children:[l.jsx(V,{variant:"outline",onClick:()=>t(null),children:"Cancel"}),l.jsx(V,{onClick:()=>t(r),disabled:n,children:n?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving Changes..."]}):l.jsxs(l.Fragment,{children:[l.jsx(zs,{className:"w-4 h-4 mr-2"}),"Save Changes"]})})]})]})}function p_e(){var _,E;const e=Qf(),[t,n]=g.useState(""),[r,i]=g.useState("10"),[a,o]=g.useState(1),[s,c]=g.useState(!1),[u,d]=g.useState(!1),[f,h]=g.useState(!1),[p,v]=g.useState(null),[m,y]=g.useState(""),[x,b]=g.useState(!1),{data:w,isLoading:C}=xt({queryKey:["users"],queryFn:async()=>{const{data:k}=await ie.get("/api/users");return await Promise.all(k.data.map(async $=>{try{const[D,B]=await Promise.all([ie.get(`/api/users/${$.attributes.id}/coins`),ie.get(`/api/users/${$.attributes.id}/resources`)]);return{...$,coins:D.data.coins||0,resources:B.data||{ram:0,disk:0,cpu:0,servers:0}}}catch(D){return console.error(`Error fetching data for user ${$.attributes.username}:`,D),{...$,coins:0,resources:{ram:0,disk:0,cpu:0,servers:0}}}}))},refetchInterval:3e4}),S=g.useMemo(()=>w?w.filter(k=>k.attributes.username.toLowerCase().includes(t.toLowerCase())||k.attributes.email.toLowerCase().includes(t.toLowerCase())||k.attributes.first_name.toLowerCase().includes(t.toLowerCase())||k.attributes.last_name.toLowerCase().includes(t.toLowerCase())).sort((k,M)=>k.attributes.root_admin!==M.attributes.root_admin?M.attributes.root_admin?1:-1:k.attributes.username.localeCompare(M.attributes.username)):[],[w,t]),j=S.slice((a-1)*parseInt(r),a*parseInt(r)),P=Math.ceil(S.length/parseInt(r)),O=async k=>{var M,$;if(!k){c(!1);return}try{b(!0),y("");const{data:D}=await ie.post("/api/users",{email:k.email,username:k.username,first_name:k.first_name,last_name:k.last_name,password:k.password,root_admin:k.admin});await new Promise(B=>setTimeout(B,1e3)),await Promise.all([ie.patch(`/api/users/${D.data.attributes.id}/resources`,{ram:k.ram,disk:k.disk,cpu:k.cpu,servers:k.servers}),ie.patch(`/api/users/${D.data.attributes.id}/coins`,{coins:k.coins})]),c(!1),e.invalidateQueries("users"),y("success:User created successfully")}catch(D){y((($=(M=D.response)==null?void 0:M.data)==null?void 0:$.error)||"Failed to create user")}finally{b(!1)}},N=async k=>{var M,$;if(!k){d(!1),v(null);return}try{b(!0),y("");const D={email:k.email,username:k.username,first_name:k.first_name,last_name:k.last_name,root_admin:k.admin};k.password&&(D.password=k.password),await ie.patch(`/api/users/${p.attributes.id}`,D),await Promise.all([ie.patch(`/api/users/${p.attributes.id}/resources`,{ram:k.ram,disk:k.disk,cpu:k.cpu,servers:k.servers}),ie.patch(`/api/users/${p.attributes.id}/coins`,{coins:k.coins})]),d(!1),v(null),e.invalidateQueries("users"),y("success:User updated successfully")}catch(D){y((($=(M=D.response)==null?void 0:M.data)==null?void 0:$.error)||"Failed to update user")}finally{b(!1)}},A=async()=>{var k,M;try{await ie.delete(`/api/users/${p.attributes.id}`),h(!1),v(null),e.invalidateQueries("users"),y("success:User deleted successfully")}catch($){y(((M=(k=$.response)==null?void 0:k.data)==null?void 0:M.error)||"Failed to delete user")}};return l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Users"}),l.jsx("p",{className:"text-sm text-neutral-500",children:"Manage user accounts and permissions"})]}),l.jsxs(V,{onClick:()=>c(!0),children:[l.jsx(lH,{className:"w-4 h-4 mr-2"}),"New User"]})]}),m&&l.jsxs(Tt,{variant:m.startsWith("success:")?"default":"destructive",className:"mb-6",children:[m.startsWith("success:")?l.jsx(Yc,{className:"h-4 w-4"}):l.jsx(rr,{className:"h-4 w-4"}),l.jsx(_t,{children:m.replace("success:","")})]}),l.jsxs(me,{children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Te,{children:"Users"}),l.jsxs("div",{className:"flex gap-4",children:[l.jsx(Ce,{placeholder:"Search users...",value:t,onChange:k=>n(k.target.value),className:"w-64"}),l.jsxs(ii,{value:r,onValueChange:i,children:[l.jsx(Er,{className:"w-36",children:l.jsx(ai,{})}),l.jsxs(Tr,{children:[l.jsx(Le,{value:"10",children:"10 per page"}),l.jsx(Le,{value:"25",children:"25 per page"}),l.jsx(Le,{value:"50",children:"50 per page"}),l.jsx(Le,{value:"100",children:"100 per page"})]})]})]})]})}),l.jsxs(ge,{children:[l.jsxs(Yi,{children:[l.jsx(Xi,{children:l.jsxs(lt,{children:[l.jsx(Oe,{children:"User"}),l.jsx(Oe,{children:"Email"}),l.jsx(Oe,{children:"Purchased Resources"}),l.jsx(Oe,{children:"Coins"}),l.jsx(Oe,{children:"Status"}),l.jsx(Oe,{className:"text-right",children:"Actions"})]})}),l.jsx(Qi,{children:C?[...Array(5)].map((k,M)=>l.jsxs(lt,{children:[l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-32"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-48"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-64"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-16"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-24"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-24"})})]},M)):j.map(k=>{var M,$,D,B,I,R;return l.jsxs(lt,{children:[l.jsx(he,{children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Vg,{className:"h-8 w-8",children:l.jsx(Wg,{children:k.attributes.username.slice(0,2).toUpperCase()})}),l.jsxs("div",{children:[l.jsxs("div",{className:"font-medium flex items-center gap-2",children:[k.attributes.username,k.attributes.root_admin&&l.jsxs(f_e,{children:[l.jsx(h_e,{children:l.jsx(Pt,{variant:"default",className:"bg-red-500",children:"Admin"})}),l.jsx(i8,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(CD,{className:"w-4 h-4 text-red-500"}),l.jsx("span",{className:"text-sm",children:"Administrator account with full access"})]})})]})]}),l.jsxs("div",{className:"text-sm text-neutral-500",children:[k.attributes.first_name," ",k.attributes.last_name]})]})]})}),l.jsx(he,{children:l.jsx("div",{className:"text-sm",children:k.attributes.email})}),l.jsx(he,{children:l.jsxs("div",{className:"space-y-2",children:[l.jsx(Yx,{label:"Memory",icon:Zf,used:((M=k.resources)==null?void 0:M.ram)||0,total:(($=k.resources)==null?void 0:$.ram)||0,unit:"MB"}),l.jsx(Yx,{label:"Storage",icon:Jf,used:((D=k.resources)==null?void 0:D.disk)||0,total:((B=k.resources)==null?void 0:B.disk)||0,unit:"MB"}),l.jsx(Yx,{label:"CPU",icon:pg,used:((I=k.resources)==null?void 0:I.cpu)||0,total:((R=k.resources)==null?void 0:R.cpu)||0,unit:"%"})]})}),l.jsx(he,{children:l.jsx("div",{className:"space-y-1",children:l.jsxs("div",{className:"text-sm text-neutral-500",children:[k.coins.toFixed(2)||"Unknown"," coins"]})})}),l.jsx(he,{children:l.jsx(Pt,{variant:k.attributes.root_admin?"destructive":"success",children:k.attributes.root_admin?"Administrator":"User"})}),l.jsx(he,{children:l.jsx("div",{className:"flex justify-end",children:l.jsxs(nf,{children:[l.jsx(rf,{asChild:!0,children:l.jsx(V,{variant:"ghost",size:"sm",children:l.jsx($9,{className:"w-4 h-4"})})}),l.jsxs(hc,{align:"end",className:"w-48",children:[l.jsx(zg,{children:"User Actions"}),l.jsxs(gn,{onClick:()=>{v(k),d(!0)},children:[l.jsx(rH,{className:"w-4 h-4 mr-2"}),"Edit User"]}),l.jsxs(gn,{onClick:()=>{v(k),h(!0)},children:[l.jsx(Rj,{className:"w-4 h-4 mr-2 text-red-500"}),"Delete User"]})]})]})})})]},k.attributes.id)})})]}),l.jsxs("div",{className:"flex items-center justify-between mt-4",children:[l.jsxs("div",{className:"text-sm text-neutral-500",children:["Showing ",(a-1)*parseInt(r)+1," to ",Math.min(a*parseInt(r),S.length)," of ",S.length," users"]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(V,{variant:"outline",size:"sm",onClick:()=>o(k=>k-1),disabled:a===1,children:"Previous"}),[...Array(P)].map((k,M)=>l.jsx(V,{variant:a===M+1?"default":"outline",size:"sm",onClick:()=>o(M+1),children:M+1},M)),l.jsx(V,{variant:"outline",size:"sm",onClick:()=>o(k=>k+1),disabled:a===P,children:"Next"})]})]})]})]}),l.jsx(st,{open:s,onOpenChange:c,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Create New User"}),l.jsx(Kt,{children:"Create a new user account with specified permissions and resources."})]}),l.jsx(CM,{onSubmit:O,isSubmitting:x})]})}),l.jsx(st,{open:u,onOpenChange:d,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsxs(nt,{children:["Edit User - ",(_=p==null?void 0:p.attributes)==null?void 0:_.username]}),l.jsx(Kt,{children:"Modify user account settings, permissions, and resources."})]}),l.jsx(CM,{user:p,onSubmit:N,isSubmitting:x})]})}),l.jsx(Na,{open:f,onOpenChange:h,children:l.jsxs(Ii,{children:[l.jsxs(Li,{children:[l.jsx(Bi,{children:"Delete User"}),l.jsxs(Ui,{children:["Are you sure you want to delete ",(E=p==null?void 0:p.attributes)==null?void 0:E.username,"? This action cannot be undone, and all associated servers will be removed."]})]}),l.jsxs(Fi,{children:[l.jsx(Vi,{onClick:()=>h(!1),children:"Cancel"}),l.jsx(zi,{onClick:A,className:"bg-red-500 hover:bg-red-600",children:"Delete User"})]})]})})]})}function m_e({status:e}){const t={online:"bg-green-500/10 text-green-500 border-green-500/20",offline:"bg-red-500/10 text-red-500 border-red-500/20",maintenance:"bg-yellow-500/10 text-yellow-500 border-yellow-500/20",installing:"bg-blue-500/10 text-blue-500 border-blue-500/20"};return l.jsx(Pt,{variant:"outline",className:t[e==null?void 0:e.toLowerCase()]||t.offline,children:e||"Unknown"})}function v_e({node:e,isOpen:t,onClose:n}){var a,o,s,c,u,d,f,h;const{data:r,isLoading:i}=xt({queryKey:["nodeConfig",(a=e==null?void 0:e.attributes)==null?void 0:a.id],queryFn:async()=>{var v;const{data:p}=await ie.get(`/api/nodes/${(v=e==null?void 0:e.attributes)==null?void 0:v.id}/configuration`);return p},enabled:t&&!!((o=e==null?void 0:e.attributes)!=null&&o.id)});return l.jsx(st,{open:t,onOpenChange:n,children:l.jsxs(et,{className:"max-w-4xl",children:[l.jsx(tt,{children:l.jsxs(nt,{className:"flex items-center gap-2",children:[l.jsx(ba,{className:"w-5 h-5"}),"Node Details - ",(s=e==null?void 0:e.attributes)==null?void 0:s.name]})}),l.jsxs("div",{className:"grid gap-6",children:[l.jsxs(me,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Basic Information"})}),l.jsx(ge,{className:"grid gap-4",children:l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-400",children:"Name"}),l.jsx("div",{children:(c=e==null?void 0:e.attributes)==null?void 0:c.name})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-400",children:"FQDN"}),l.jsx("div",{children:(u=e==null?void 0:e.attributes)==null?void 0:u.fqdn})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-400",children:"Status"}),l.jsx("div",{children:l.jsx(m_e,{status:(d=e==null?void 0:e.attributes)==null?void 0:d.status})})]})]})})]}),l.jsxs(me,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Resources"})}),l.jsx(ge,{children:l.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-neutral-400",children:[l.jsx(Zf,{className:"w-4 h-4"}),"Memory"]}),l.jsxs("div",{children:[((f=e==null?void 0:e.attributes)==null?void 0:f.memory)/1024||0," GB"]})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-neutral-400",children:[l.jsx(Jf,{className:"w-4 h-4"}),"Storage"]}),l.jsxs("div",{children:[((h=e==null?void 0:e.attributes)==null?void 0:h.disk)/1024||0," GB"]})]})]})})]}),l.jsxs(me,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Node Configuration"})}),l.jsx(ge,{children:i?l.jsxs("div",{className:"space-y-2",children:[l.jsx(wt,{className:"h-4 w-full"}),l.jsx(wt,{className:"h-4 w-3/4"}),l.jsx(wt,{className:"h-4 w-1/2"})]}):l.jsx(fr,{className:"h-64 rounded-md border p-4",children:l.jsx("pre",{className:"text-sm font-mono",children:JSON.stringify(r,null,2)})})})]})]})]})})}function g_e(){const[e,t]=g.useState(""),[n,r]=g.useState("10"),[i,a]=g.useState(1),[o,s]=g.useState(null),{data:c,isLoading:u}=xt({queryKey:["nodes"],queryFn:async()=>{const{data:p}=await ie.get("/api/nodes");return p.data}}),d=(c==null?void 0:c.filter(p=>p.attributes.name.toLowerCase().includes(e.toLowerCase())||p.attributes.fqdn.toLowerCase().includes(e.toLowerCase())))||[],f=d.slice((i-1)*parseInt(n),i*parseInt(n)),h=Math.ceil(d.length/parseInt(n));return l.jsxs("div",{className:"p-6",children:[l.jsx("div",{className:"flex items-center justify-between mb-6",children:l.jsx("h1",{className:"text-2xl font-bold",children:"Nodes"})}),l.jsxs(me,{children:[l.jsx(je,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Te,{children:"Nodes"}),l.jsxs("div",{className:"flex gap-4",children:[l.jsx(Ce,{placeholder:"Search nodes...",value:e,onChange:p=>t(p.target.value),className:"w-64"}),l.jsxs(ii,{value:n,onValueChange:r,children:[l.jsx(Er,{className:"w-36",children:l.jsx(ai,{})}),l.jsxs(Tr,{children:[l.jsx(Le,{value:"10",children:"10 per page"}),l.jsx(Le,{value:"25",children:"25 per page"}),l.jsx(Le,{value:"50",children:"50 per page"})]})]})]})]})}),l.jsxs(ge,{children:[l.jsxs(Yi,{children:[l.jsx(Xi,{children:l.jsxs(lt,{children:[l.jsx(Oe,{children:"Node"}),l.jsx(Oe,{children:"Memory"}),l.jsx(Oe,{children:"Storage"}),l.jsx(Oe,{className:"text-right",children:"Actions"})]})}),l.jsx(Qi,{children:u?[...Array(5)].map((p,v)=>l.jsxs(lt,{children:[l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-48"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-16"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-24"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-24"})})]},v)):f.map(p=>l.jsxs(lt,{children:[l.jsx(he,{children:l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:p.attributes.name}),l.jsx("div",{className:"text-sm text-neutral-500",children:p.attributes.fqdn})]})}),l.jsxs(he,{children:[p.attributes.memory/1024||0," GB"]}),l.jsxs(he,{children:[p.attributes.disk/1024||0," GB"]}),l.jsx(he,{className:"text-right",children:l.jsx(V,{variant:"ghost",size:"sm",onClick:()=>s(p),children:l.jsx(kj,{className:"w-4 h-4"})})})]},p.attributes.id))})]}),l.jsxs("div",{className:"flex items-center justify-between mt-4",children:[l.jsxs("div",{className:"text-sm text-neutral-500",children:["Showing ",(i-1)*parseInt(n)+1," to ",Math.min(i*parseInt(n),d.length)," of ",d.length," nodes"]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(V,{variant:"outline",size:"sm",onClick:()=>a(p=>p-1),disabled:i===1,children:"Previous"}),[...Array(h)].map((p,v)=>l.jsx(V,{variant:i===v+1?"default":"outline",size:"sm",onClick:()=>a(v+1),children:v+1},v)),l.jsx(V,{variant:"outline",size:"sm",onClick:()=>a(p=>p+1),disabled:i===h,children:"Next"})]})]})]})]}),l.jsx(v_e,{node:o,isOpen:!!o,onClose:()=>s(null)})]})}function y_e({node:e,onSubmit:t,isSubmitting:n}){const[r,i]=g.useState({name:(e==null?void 0:e.name)||"",fqdn:(e==null?void 0:e.fqdn)||"",port:(e==null?void 0:e.port)||"",webhookUrl:(e==null?void 0:e.webhookUrl)||""});return l.jsxs("div",{className:"grid gap-6 py-4",children:[l.jsxs("div",{className:"grid gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Node Name"}),l.jsx(Ce,{value:r.name,onChange:a=>i({...r,name:a.target.value}),placeholder:"Production Node 1"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"FQDN / IP Address"}),l.jsx(Ce,{value:r.fqdn,onChange:a=>i({...r,fqdn:a.target.value}),placeholder:"radar.example.com"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Port"}),l.jsx(Ce,{type:"number",value:r.port,onChange:a=>i({...r,port:a.target.value}),placeholder:"8080"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Webhook URL (Optional)"}),l.jsx(Ce,{value:r.webhookUrl,onChange:a=>i({...r,webhookUrl:a.target.value}),placeholder:"https://discord.com/api/webhooks/..."})]})]}),l.jsxs("div",{className:"flex justify-end space-x-2",children:[l.jsx(V,{variant:"outline",onClick:()=>t(null),children:"Cancel"}),l.jsx(V,{onClick:()=>t(r),disabled:n,children:n?l.jsxs(l.Fragment,{children:[l.jsx(Ve,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving Changes..."]}):l.jsx(l.Fragment,{children:"Save Changes"})})]})]})}function x_e({node:e,onClose:t}){var i,a;const{data:n,isLoading:r}=xt({queryKey:["node",e==null?void 0:e.id],queryFn:async()=>{const{data:o}=await ie.get(`/api/radar/nodes/${e==null?void 0:e.id}`);return o},enabled:!!(e!=null&&e.id),refetchInterval:5e3});return l.jsx(st,{open:!!e,onOpenChange:t,children:l.jsxs(et,{className:"max-w-3xl",children:[l.jsxs(tt,{children:[l.jsxs(nt,{className:"flex items-center gap-2",children:[l.jsx(ba,{className:"w-5 h-5"}),"Node Details - ",e==null?void 0:e.name]}),l.jsx(Kt,{children:"View detailed information and statistics for this Radar node"})]}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs(me,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Node Information"})}),l.jsx(ge,{className:"space-y-4",children:l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Status"}),l.jsx(Pt,{variant:(n==null?void 0:n.status)==="online"?"success":"destructive",children:(n==null?void 0:n.status)||"Unknown"})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Address"}),l.jsxs("div",{children:[e==null?void 0:e.fqdn,":",e==null?void 0:e.port]})]}),(e==null?void 0:e.webhookUrl)&&l.jsxs("div",{className:"col-span-2",children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Webhook URL"}),l.jsx("div",{className:"font-mono text-sm truncate",children:e==null?void 0:e.webhookUrl})]})]})})]}),(n==null?void 0:n.status)==="online"&&(n==null?void 0:n.stats)&&l.jsxs(me,{children:[l.jsx(je,{children:l.jsx(Te,{className:"text-base",children:"Detection Statistics"})}),l.jsxs(ge,{children:[l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Total Detections"}),l.jsx("div",{className:"text-2xl font-bold",children:((i=n.stats.total_detections)==null?void 0:i.toLocaleString())||0})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Recent Detections"}),l.jsx("div",{className:"text-2xl font-bold",children:((a=n.stats.recent_detections)==null?void 0:a.toLocaleString())||0})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500",children:"Detection Types"}),l.jsx("div",{className:"text-2xl font-bold",children:Object.keys(n.stats.detection_types||{}).length})]})]}),n.stats.detection_types&&l.jsxs("div",{className:"mt-6",children:[l.jsx("div",{className:"text-sm font-medium text-neutral-500 mb-2",children:"Detection Breakdown"}),l.jsx(fr,{className:"h-48",children:l.jsx("div",{className:"space-y-2",children:Object.entries(n.stats.detection_types).map(([o,s])=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"font-mono text-sm",children:o}),l.jsx(Pt,{variant:"secondary",children:s.toLocaleString()})]},o))})})]})]})]})]})]})})}function b_e(){const e=Qf(),[t,n]=g.useState(!1),[r,i]=g.useState(!1),[a,o]=g.useState(null),[s,c]=g.useState(null),[u,d]=g.useState(""),[f,h]=g.useState(!1),{data:p,isLoading:v}=xt({queryKey:["radar-nodes"],queryFn:async()=>{const{data:x}=await ie.get("/api/radar/nodes");return x},refetchInterval:1e4}),m=async x=>{var b,w;if(!x){n(!1);return}try{h(!0),d(""),await ie.post("/api/radar/nodes",x),n(!1),e.invalidateQueries("radar-nodes"),d("success:Node created successfully")}catch(C){d(((w=(b=C.response)==null?void 0:b.data)==null?void 0:w.error)||"Failed to create node")}finally{h(!1)}},y=async()=>{var x,b;try{await ie.delete(`/api/radar/nodes/${a.id}`),i(!1),o(null),e.invalidateQueries("radar-nodes"),d("success:Node deleted successfully")}catch(w){d(((b=(x=w.response)==null?void 0:x.data)==null?void 0:b.error)||"Failed to delete node")}};return l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Radar"}),l.jsx("p",{className:"text-sm text-neutral-500",children:"Manage and monitor your Radar 6 nodes"})]}),l.jsxs(V,{onClick:()=>n(!0),children:[l.jsx(Wn,{className:"w-4 h-4 mr-2"}),"Add Node"]})]}),u&&l.jsxs(Tt,{variant:u.startsWith("success:")?"default":"destructive",className:"mb-6",children:[u.startsWith("success:")?l.jsx(Yc,{className:"h-4 w-4"}):l.jsx(rr,{className:"h-4 w-4"}),l.jsx(_t,{children:u.replace("success:","")})]}),l.jsxs(me,{children:[l.jsxs(je,{children:[l.jsx(Te,{children:"Radar Nodes"}),l.jsx(An,{children:"Active detection nodes in your network"})]}),l.jsx(ge,{children:l.jsxs(Yi,{children:[l.jsx(Xi,{children:l.jsxs(lt,{children:[l.jsx(Oe,{children:"Node"}),l.jsx(Oe,{children:"Status"}),l.jsx(Oe,{children:"Total Detections"}),l.jsx(Oe,{children:"Recent Activity"}),l.jsx(Oe,{className:"text-right",children:"Actions"})]})}),l.jsx(Qi,{children:v?[...Array(3)].map((x,b)=>l.jsxs(lt,{children:[l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-48"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-24"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-32"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-32"})}),l.jsx(he,{children:l.jsx(wt,{className:"h-6 w-24"})})]},b)):(p==null?void 0:p.length)===0?l.jsx(lt,{children:l.jsx(he,{colSpan:5,className:"text-center text-neutral-500 py-8",children:l.jsxs("div",{className:"flex flex-col items-center gap-2",children:[l.jsx(CD,{className:"w-8 h-8 text-neutral-400"}),l.jsx("div",{children:"No Radar nodes found"}),l.jsx(V,{variant:"outline",size:"sm",onClick:()=>n(!0),children:"Add Your First Node"})]})})}):p==null?void 0:p.map(x=>{var b,w,C;return l.jsxs(lt,{children:[l.jsx(he,{children:l.jsxs("div",{children:[l.jsx("div",{className:"font-medium",children:x.name}),l.jsxs("div",{className:"text-sm text-neutral-500",children:[x.fqdn,":",x.port]})]})}),l.jsx(he,{children:l.jsx(Pt,{variant:x.status==="online"?"success":"destructive",className:"capitalize",children:x.status})}),l.jsx(he,{children:x.status==="online"?((w=(b=x.stats)==null?void 0:b.total_detections)==null?void 0:w.toLocaleString())||"0":"-"}),l.jsx(he,{children:x.status==="online"?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(w9,{className:"w-4 h-4 text-green-500"}),((C=x.stats)==null?void 0:C.recent_detections)||0," recent"]}):"-"}),l.jsx(he,{children:l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(V,{variant:"ghost",size:"sm",onClick:()=>c(x),children:l.jsx(kj,{className:"w-4 h-4"})}),l.jsx(V,{variant:"ghost",size:"sm",onClick:()=>{o(x),i(!0)},children:l.jsx(Rj,{className:"w-4 h-4"})})]})})]},x.id)})})]})})]}),l.jsx(st,{open:t,onOpenChange:n,children:l.jsxs(et,{children:[l.jsxs(tt,{children:[l.jsx(nt,{children:"Add Radar Node"}),l.jsx(Kt,{children:"Add a new Radar detection node to your network"})]}),l.jsx(y_e,{onSubmit:m,isSubmitting:f})]})}),l.jsx(Na,{open:r,onOpenChange:i,children:l.jsxs(Ii,{children:[l.jsxs(Li,{children:[l.jsx(Bi,{children:"Delete Node"}),l.jsxs(Ui,{children:["Are you sure you want to delete ",a==null?void 0:a.name,"? This action cannot be undone, and all historical detection data will be lost."]})]}),l.jsxs(Fi,{children:[l.jsx(Vi,{onClick:()=>i(!1),children:"Cancel"}),l.jsx(zi,{onClick:y,className:"bg-red-500 hover:bg-red-600",children:"Delete Node"})]})]})}),l.jsx(x_e,{node:s,onClose:()=>c(null)})]})}class w_e extends T.Component{constructor(n){super(n);u0(this,"startCountdown",()=>{this.countdownInterval=setInterval(()=>{this.setState(n=>({countdown:n.countdown-1}),()=>{this.state.countdown===0&&(clearInterval(this.countdownInterval),window.location.reload())})},1e3)});u0(this,"handleRefreshNow",()=>{window.location.reload()});this.state={hasError:!1,error:null,countdown:3}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,r){console.error("Error caught by boundary:",n,r)}componentDidUpdate(n,r){this.state.hasError&&!r.hasError&&this.startCountdown()}componentWillUnmount(){this.countdownInterval&&clearInterval(this.countdownInterval)}render(){var n;return this.state.hasError?l.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:l.jsxs(me,{className:"w-full max-w-md",children:[l.jsxs(je,{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(OD,{className:"h-5 w-5 text-destructive"}),l.jsx(Te,{children:"Something went wrong with Prism"})]}),l.jsx(An,{children:"An error occurred while rendering the page."})]}),l.jsxs(ge,{className:"space-y-4",children:[l.jsx("div",{className:"bg-muted/50 rounded-lg p-4 text-sm font-mono overflow-auto max-h-[200px]",children:((n=this.state.error)==null?void 0:n.message)||"Unknown error"}),l.jsx(bK,{type:"single",collapsible:!0,className:"w-full",children:l.jsxs(JD,{value:"system-info",children:[l.jsx(ZD,{className:"text-sm",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(kj,{className:"h-4 w-4"}),"System information"]})}),l.jsx(eI,{children:l.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[l.jsx("p",{children:"Version: Prism 0.5.0-alpha2"}),l.jsx("p",{children:"Codename: Adelante"}),l.jsx("p",{children:"Platform: 120"}),l.jsxs("p",{children:["User Agent: ",navigator.userAgent]}),l.jsxs("p",{children:["Timestamp: ",new Date().toISOString()]})]})})]})}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Refreshing in ",this.state.countdown,"..."]}),l.jsxs(V,{variant:"outline",size:"sm",onClick:this.handleRefreshNow,className:"gap-2",children:[l.jsx(Ve,{className:"h-4 w-4"}),"Refresh Now"]})]})]})]})}):this.props.children}}const S_e=()=>l.jsx(N7,{to:"/dashboard",replace:!0}),j_e=({children:e})=>{const[t,n]=g.useState(!0),r=Us();return g.useEffect(()=>{(async()=>{try{if(!(await fetch("/api/v5/state",{credentials:"include"})).ok)throw new Error("Unauthorized");n(!1)}catch(a){console.error("Auth check failed:",a),window.location.href="/auth"}})()},[r]),t?null:e};function C_e(){return l.jsx(w_e,{children:l.jsx("div",{className:"dark",children:l.jsxs(T7,{children:[l.jsx(dt,{path:"/",element:l.jsx(S_e,{})}),l.jsxs(dt,{element:l.jsx(j_e,{children:l.jsx(Tee,{})}),children:[l.jsx(dt,{path:"/server/:id/overview",element:l.jsx(rAe,{})}),l.jsx(dt,{path:"/server/:id/console",element:l.jsx(XEe,{})}),l.jsx(dt,{path:"/server/:id/files",element:l.jsx(HEe,{})}),l.jsx(dt,{path:"/server/:id/plugins",element:l.jsx(KEe,{})}),l.jsx(dt,{path:"/server/:id/network",element:l.jsx(QEe,{})}),l.jsx(dt,{path:"/server/:id/users",element:l.jsx(JEe,{})}),l.jsx(dt,{path:"/server/:id/players",element:l.jsx(h2e,{})}),l.jsx(dt,{path:"/server/:id/backups",element:l.jsx(p2e,{})}),l.jsx(dt,{path:"/server/:id/settings",element:l.jsx(fTe,{})}),l.jsx(dt,{path:"/dashboard",element:l.jsx(mTe,{})}),l.jsx(dt,{path:"/coins/afk",element:l.jsx(VTe,{})}),l.jsx(dt,{path:"/coins/store",element:l.jsx(WTe,{})}),l.jsx(dt,{path:"/referrals",element:l.jsx(HTe,{})}),l.jsx(dt,{path:"/tickets",element:l.jsx(GTe,{})}),l.jsx(dt,{path:"/account",element:l.jsx(YTe,{})}),l.jsx(dt,{path:"/admin/overview",element:l.jsx(ZTe,{})}),l.jsx(dt,{path:"/admin/users",element:l.jsx(p_e,{})}),l.jsx(dt,{path:"/admin/nodes",element:l.jsx(g_e,{})}),l.jsx(dt,{path:"/admin/radar",element:l.jsx(b_e,{})}),l.jsx(dt,{path:"/admin/tickets",element:l.jsx(n_e,{})})]}),l.jsx(dt,{path:"/auth",element:l.jsx(UTe,{})}),l.jsx(dt,{path:"*",element:l.jsx(zTe,{})})]})})})}const P_e=new t9;Xx.createRoot(document.getElementById("MonoApp")).render(l.jsx(T.StrictMode,{children:l.jsx(o9,{client:P_e,children:l.jsx(I7,{basename:"/app",children:l.jsx(C_e,{})})})})); diff --git a/app/dist/index.html b/app/dist/index.html index ee91b03..48aa3b9 100644 --- a/app/dist/index.html +++ b/app/dist/index.html @@ -4,8 +4,8 @@ Prism - - + +
diff --git a/app/src/App.jsx b/app/src/App.jsx index dc28d2f..436e1d8 100644 --- a/app/src/App.jsx +++ b/app/src/App.jsx @@ -32,6 +32,7 @@ import Tickets from './pages/SupportTickets'; import AccountPage from './pages/Account'; import AdminOverview from './pages/admin/Overview'; +import AdminTickets from './pages/admin/Tickets'; import Users from './pages/admin/Users'; import Nodes from './pages/admin/Nodes'; import Radar from './pages/admin/Radar'; @@ -226,6 +227,7 @@ export default function App() { } /> } /> } /> + } /> {/* Auth route */} diff --git a/app/src/pages/admin/Tickets.jsx b/app/src/pages/admin/Tickets.jsx new file mode 100644 index 0000000..3733908 --- /dev/null +++ b/app/src/pages/admin/Tickets.jsx @@ -0,0 +1,520 @@ +import React, { useState, useEffect } from 'react'; +import { useQuery } from '@tanstack/react-query'; +import { Card, CardContent } from '@/components/ui/card'; +import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog'; +import { Alert, AlertDescription } from '@/components/ui/alert'; +import { Button } from '@/components/ui/button'; +import { Input } from '@/components/ui/input'; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; +import { Badge } from '@/components/ui/badge'; +import { Textarea } from '@/components/ui/textarea'; +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from "@/components/ui/alert-dialog"; +import { + MessageSquare, + Eye, + RefreshCw, + Save, + X, + RotateCcw, + MoreHorizontal, + Download +} from 'lucide-react'; + +const StatsCard = ({ title, value, className }) => ( + + +

{title}

+

{value}

+
+
+); + +const PriorityBadge = ({ priority }) => { + const variants = { + low: "bg-blue-100 text-blue-800 border-blue-200", + medium: "bg-yellow-100 text-yellow-800 border-yellow-200", + high: "bg-orange-100 text-orange-800 border-orange-200", + urgent: "bg-red-100 text-red-800 border-red-200" + }; + + return ( + + {priority.charAt(0).toUpperCase() + priority.slice(1)} + + ); +}; + +const StatusBadge = ({ status }) => ( + + {status.charAt(0).toUpperCase() + status.slice(1)} + +); + +const ViewTicketDialog = ({ isOpen, onClose, ticketId, onStatusChange }) => { + const [replyContent, setReplyContent] = useState(''); + const [isSubmitting, setIsSubmitting] = useState(false); + + const { data: ticket, refetch } = useQuery({ + queryKey: ['ticket', ticketId], + queryFn: async () => { + const response = await fetch(`/api/tickets/${ticketId}`); + return response.json(); + }, + enabled: !!ticketId + }); + + const handleSubmitReply = async (e) => { + e.preventDefault(); + setIsSubmitting(true); + + try { + await fetch(`/api/tickets/${ticketId}/messages`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ content: replyContent }) + }); + + setReplyContent(''); + refetch(); + } catch (error) { + console.error('Error sending reply:', error); + } finally { + setIsSubmitting(false); + } + }; + + if (!ticket) return null; + + return ( + + + +
+
+ {ticket.subject} +

#{ticket.id.slice(0, 8)}

+
+
+ + +
+
+
+ +
+ {ticket.messages.map((msg, idx) => ( +
+
+ + {msg.isSystem ? 'System' : msg.isStaff ? 'Staff' : 'User'} + + + {new Date(msg.timestamp).toLocaleString()} + +
+

{msg.content}

+
+ ))} +
+ +
+
+